PandaRoot
PndEmcMultiWaveformToCalibratedDigi.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //----------------------------------------------------------------------
14 // File and Version Information:
15 // $Id: Exp $
16 //
17 // Description:
18 // Class PndEmcMultiWaveformToCalibratedDigi. Module to take the hit list for the
19 // calorimeter and make ADC waveforms from them.
20 //
21 // Software developed for the BaBar Detector at the SLAC B-Factory.
22 // Adapted for the PANDA experiment at GSI
23 //
24 // Author List:
25 // Phil Strother Original Author
26 // Dima Melnichuk - adaption for PANDA
27 //
28 // Copyright Information:
29 // Copyright (C) 1996 Imperial College
30 //
31 //----------------------------------------------------------------------
32 //#pragma once
33 #ifndef PndEmcMultiWaveformToCalibratedDigi_H
34 #define PndEmcMultiWaveformToCalibratedDigi_H
35 
36 #include <PndPersistencyTask.h>
37 #include <string>
38 #include <map>
39 #include "TString.h"
40 //#include <vector>
41 
42 class PndEmcHit;
45 class PndEmcWaveform;
46 
47 class TClonesArray;
48 class PndEmcDigiPar;
49 class PndEmcRecoPar;
50 class PndEmcAbsPSA;
52 
60 {
61 
62 public:
63 
64  // Constructors
65 
66  PndEmcMultiWaveformToCalibratedDigi(Int_t verbose=0, Bool_t storedigis=kTRUE);
67 
68  // Destructor
69 
71 
73  virtual InitStatus Init();
74 
75  void SetCalibrationFile(const char* calibrationfilename){fCalibrationFileName = calibrationfilename;};
76 
78  virtual void Exec(Option_t* opt);
79 
80  void SetStorageOfData(Bool_t val); // Method to specify whether digis are stored or not.
81 
82  virtual void SetPSAAlgorithm(PndEmcAbsPSA *psa){fpsaAlgorithm=psa;}
83  virtual void SetPSAAlgorithmPMT(PndEmcAbsPSA *psa){fpsaAlgorithm_pmt=psa;}
84 
85 private:
86  void ReadCalibrationFile();
88  TClonesArray* fWaveformArray;
89 
91  TClonesArray* fDigiArray;
92 
93  Double_t fSampleRate;
94  Double_t fSampleRate_PMT;
95  Double_t fEnergyDigiThreshold;
96  Double_t fASIC_Shaping_int_time; //s
97  Double_t fPMT_Shaping_int_time; //s
98  Double_t fPMT_Shaping_diff_time; //s
99  Double_t fCrystal_time_constant; //s
100  Double_t fShashlyk_time_constant; //s
101  Int_t fNumber_of_samples_in_waveform;
102  Int_t fNumber_of_samples_in_waveform_pmt;
103 
104  //std::string fDigiPosMethod;// "surface" or "depth"
105  TString fDigiPosMethod;
106  Double_t fEmcDigiRescaleFactor;
107  Double_t fEmcDigiPositionDepthPWO;
108  Double_t fEmcDigiPositionDepthShashlyk;
109 
110  PndEmcAbsPulseshape* fPulseshape;
111  PndEmcAbsPulseshape* fPulseshape_pmt;
112  PndEmcAbsPSA *fpsaAlgorithm;
113  PndEmcAbsPSA *fpsaAlgorithm_pmt;
114 
115  PndEmcDigiPar* fDigiPar;
116  PndEmcRecoPar* fRecoPar;
118  virtual void SetParContainers();
119 
121  Int_t fVerbose;
122 
123  Bool_t fStoreDigis;
124 
125  Double_t fWfNormalisation; // Waveform normalisation constant
126  Double_t fWfNormalisation_pmt;
127  Double_t fWfNormalisation_proto192;
128 
129  std::map<Int_t,Double_t> fCalibrationMap;
130  std::map<Int_t,Double_t> fGainMap;
131  TString fCalibrationFileName;
132 
134 
135 
136 };
137 
138 #endif
139 
140 
141 
142 
143 
Module to take the hit list for the calorimeter and make ADC waveforms from them. ...
stores crystal index coordinates (x,y) or (theta,phi)
parameter set of Emc digitisation
Definition: PndEmcDigiPar.h:24
void SetCalibrationFile(const char *calibrationfilename)
represents a simulated waveform in an emc crystal
Class to hold multiple waveforms from one Emc Hit / ADC readout.
virtual void Exec(Option_t *opt)
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: PndEmcAbsPSA.h:33
represents the deposited energy of one emc crystal from simulation
Definition: PndEmcHit.h:40
pulseshape interface
PndEmcMultiWaveformToCalibratedDigi(Int_t verbose=0, Bool_t storedigis=kTRUE)
Parameter set for Emc Reco.
Definition: PndEmcRecoPar.h:25