PandaRoot
PndEmcHitsToWaveform.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------
2 // File and Version Information:
3 // $Id: Exp $
4 //
5 // Description:
6 // Class PndEmcHitsToWaveform. Module to take the hit list for the
7 // calorimeter and make ADC waveforms from them.
8 //
9 // Software developed for the BaBar Detector at the SLAC B-Factory.
10 // Adapted for the PANDA experiment at GSI
11 //
12 // Author List:
13 // Phil Strother Original author
14 // Dima Melnichuk - adaption for PANDA
15 // Copyright Information:
16 // Copyright (C) 1996 Imperial College
17 //----------------------------------------------------------------------
18 //#pragma once
19 #ifndef PndEmcHitsToWaveform_H
20 #define PndEmcHitsToWaveform_H
21 
22 #include <PndPersistencyTask.h>
23 #include "PndEmcWaveform.h"
24 #include "PndEmcTwoCoordIndex.h"
25 
26 // class PndEmcTwoCoordIndex;
27 // class PndEmcWaveform;
28 class PndEmcMapper;
29 
30 class TClonesArray;
31 class PndEmcDigiPar;
32 class PndEmcGeoPar;
35 
41  public:
42  // Constructors
43  PndEmcHitsToWaveform(Int_t verbose = 0, Bool_t storewaves = kTRUE);
44  // Destructor
45  virtual ~PndEmcHitsToWaveform();
46 
47  virtual InitStatus Init();
48  virtual void Exec(Option_t *opt);
49 
50  // PndEmcWaveform * AddWaveform(Int_t detId,Int_t hitIndex,Int_t numOfSamples);
51  PndEmcWaveform *AddWaveform(Int_t detId, Int_t hitIndex, Int_t numOfSamples, Double_t timeStamp, Double_t sampleRate, Int_t MCTrackID);
52 
53  void SetStorageOfData(Bool_t val); // Method to specify whether waveforms are stored or not.
54 
55  void RunTimeBased() { fTimeOrderedWaveform = kTRUE; }
56 
57  void FinishTask();
58 
59  protected:
61  virtual void SetParContainers();
62 
63  private:
64  // don't allow copying (-Weffc++)
65  PndEmcHitsToWaveform(const PndEmcHitsToWaveform &); // no implementation
66  PndEmcHitsToWaveform &operator=(const PndEmcHitsToWaveform &); // no implementation
67 
68  private:
70  TClonesArray *fHitArray;
71 
73  TClonesArray *fWaveformArray;
74  PndEmcWaveformWriteoutBuffer *fDataBuffer;
75  Bool_t fTimeOrderedWaveform;
76 
77  Double_t fOneBitResolution;
78  Double_t fOneBitResolutionBW;
79  Double_t fOneBitResolutionPMT;
80  Double_t fOneBitResolutionFWD;
81 
82  Int_t fNBits;
83  Double_t fDetectedPhotonsPerMeV;
84  Double_t fDetectedPhotonsPerMeV_PMT;
85  Double_t fNPhotoElectronsPerMeVAPDBarrel;
86  Double_t fNPhotoElectronsPerMeVAPDBWD;
87  Double_t fNPhotoElectronsPerMeVVPT;
88  Double_t fNPhotoElectronsPerMeVPMT;
89  Double_t fSensitiveAreaAPD; // mm^2
90  Double_t fSensitiveAreaVPT; // mm^2
91  Double_t fQuantumEfficiencyAPD;
92  Double_t fQuantumEfficiencyVPT;
93  Double_t fQuantumEfficiencyPMT;
94  Double_t fExcessNoiseFactorAPD;
95  Double_t fExcessNoiseFactorVPT;
96  Double_t fExcessNoiseFactorPMT;
97  Double_t fIncoherent_elec_noise_width_GeV_APD; // GeV
98  Double_t fIncoherent_elec_noise_width_GeV_VPT; // GeV
99  Double_t fEnergyRange; // GeV
100  Double_t fEnergyRangeBW; // GeV
101  Double_t fFirstSamplePhase;
102  Int_t fNumber_of_samples_in_waveform;
103  Int_t fNumber_of_samples_in_waveform_pmt;
104  Int_t fNumber_of_samples_in_waveform_fwd;
105  Double_t fASIC_Shaping_int_time; // s
106  Double_t fPMT_Shaping_int_time; // s
107  Double_t fPMT_Shaping_diff_time; // s
108  Double_t fFWD_Shaping_int_time; // s
109  Double_t fFWD_time_constant; // s
110  Double_t fCrystal_time_constant; // s
111  Double_t fShashlyk_time_constant; // s
112  Double_t fShashlykSamplingFactor;
113  Double_t fSampleRate;
114  Double_t fSampleRate_PMT;
115  Double_t fSampleRate_FWD;
116  Int_t fUse_shaped_noise;
117  Int_t fUse_photon_statistic;
118  Int_t fNoiseAllChannels;
119  Int_t fMapVersion;
120 
121  Double_t fFirstADCBinTime;
122 
123  Double_t fGevPeakAnalogue;
124  Double_t fGevPeakAnalogue_PMT;
125  Double_t fGevPeakAnalogue_FWD;
126 
127  PndEmcDigiPar *fDigiPar;
128  PndEmcGeoPar *fGeoPar;
131  Int_t fVerbose;
132 
133  // counters for task
134  Int_t HowManyHit;
135  Int_t nWaveformProduced;
136  Int_t HowManyEventPileup;
137 
138  // pulse shapes
139  PndEmcAbsPulseshape *pulseshape1;
140  PndEmcAbsPulseshape *pulseshape2;
141  PndEmcAbsPulseshape *pulseshape3;
142 
143  ClassDef(PndEmcHitsToWaveform, 2);
144 };
145 
146 #endif
Takes list of PndEmcHits and creates PndEmcWaveform.
PndEmcHitsToWaveform(Int_t verbose=0, Bool_t storewaves=kTRUE)
PndEmcWaveform * AddWaveform(Int_t detId, Int_t hitIndex, Int_t numOfSamples, Double_t timeStamp, Double_t sampleRate, Int_t MCTrackID)
Emc geometry mapper.
Definition: PndEmcMapper.h:22
virtual InitStatus Init()
virtual void Exec(Option_t *opt)
void SetStorageOfData(Bool_t val)
parameter set of Emc digitisation
Definition: PndEmcDigiPar.h:12
represents a simulated waveform in an emc crystal
virtual ~PndEmcHitsToWaveform()
pulseshape interface
virtual void SetParContainers()