]>
Commit | Line | Data |
---|---|---|
7e8c2e88 | 1 | #ifndef ALITOFSDIGITIZER_H |
2 | #define ALITOFSDIGITIZER_H | |
0e46b9ae | 3 | |
517b7f8f | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
0e46b9ae | 7 | //__________________________________________// |
8 | // // | |
f21fc003 | 9 | // Class for making SDigits in TOF // |
0e46b9ae | 10 | // // |
11 | //-- Authors: F. Pierella, A. De Caro // | |
12 | // // | |
13 | //__________________________________________// | |
517b7f8f | 14 | |
0e46b9ae | 15 | /* $Id$ */ |
517b7f8f | 16 | |
f21fc003 | 17 | #include "TNamed.h" |
0e46b9ae | 18 | |
19 | class TF1; | |
20 | class TString; | |
21 | ||
d61f73d9 | 22 | class AliLoader; |
0e46b9ae | 23 | class AliRunLoader; |
3f296ed3 | 24 | |
25 | class AliTOFcalib; | |
26 | ||
f21fc003 | 27 | class AliTOFSDigitizer: public TNamed { |
517b7f8f | 28 | |
29 | public: | |
30 | AliTOFSDigitizer() ; // ctor | |
d61f73d9 | 31 | //AliTOFSDigitizer(const char* HeaderFile) ; // par ctor |
32 | AliTOFSDigitizer(const char* HeaderFile, Int_t evNumber1=-1, Int_t nEvents=0) ; // par ctor | |
517b7f8f | 33 | |
7aeeaf38 | 34 | AliTOFSDigitizer(const AliTOFSDigitizer &source); // copy constructor |
2f584d46 | 35 | AliTOFSDigitizer& operator=(const AliTOFSDigitizer &/*source*/); // ass. op. |
7aeeaf38 | 36 | |
517b7f8f | 37 | virtual ~AliTOFSDigitizer() ; // dtor |
bfec09a6 | 38 | |
43f77f2d | 39 | //static Float_t WidthTdcBin() {return fgkTdcBin;}; |
40 | ||
f21fc003 | 41 | virtual void Digitize(Option_t *verboseOption); |
7e8c2e88 | 42 | void SetSDigitsFile(char * /*file*/ ) const {;} |
3408aff3 | 43 | |
f73548c4 | 44 | void InitParameters(); |
45 | virtual void PrintParameters() const ; | |
d61f73d9 | 46 | virtual void SimulateDetectorResponse(Float_t z0, Float_t x0, Float_t geantTime, Int_t& nActivatedPads, Int_t& nFiredPads, Bool_t* isFired, Int_t* nPlace, Float_t* qInduced, Float_t* tofTime, Float_t& averageTime); |
2608880a | 47 | virtual void SimulateDetectorResponseOLD(Float_t z0, Float_t x0, Float_t geantTime, Int_t& nActivatedPads, Int_t& nFiredPads, Bool_t* isFired, Int_t* nPlace, Float_t* qInduced, Float_t* tofTime, Float_t& averageTime); |
ea7a588a | 48 | virtual void Print(Option_t* opt) const ; |
d61f73d9 | 49 | void SetFirstEvent(Int_t event1) {fEvent1 = event1;} |
50 | void SetSecondEvent(Int_t event2) {fEvent2 = event2;} | |
ea7a588a | 51 | Int_t GetFirstEvent() const {return fEvent1;} |
52 | Int_t GetSecondEvent() const {return fEvent2;} | |
53 | Int_t GetNEvents() const {return (fEvent2-fEvent1);} | |
55991c8b | 54 | void SelectSectorAndPlate(Int_t sector, Int_t plate); |
517b7f8f | 55 | |
f73548c4 | 56 | // setters and getters for detector simulation |
57 | // it summarizes all it is known about TOF strip | |
58 | void SetPadefficiency(Float_t padefficiency) {fpadefficiency=padefficiency;} | |
59 | void SetEdgeEffect(Int_t edgeEffect) {fEdgeEffect=edgeEffect;} | |
60 | void SetEdgeTails(Int_t edgeTails) {fEdgeTails=edgeTails;} | |
61 | void SetHparameter(Float_t hparameter) {fHparameter=hparameter;} | |
62 | void SetH2parameter(Float_t h2parameter) {fH2parameter=h2parameter;} | |
63 | void SetKparameter(Float_t kparameter) {fKparameter=kparameter;} | |
64 | void SetK2parameter(Float_t k2parameter) {fK2parameter=k2parameter;} | |
65 | void SetEffCenter(Float_t effCenter) {fEffCenter=effCenter;} | |
66 | void SetEffBoundary(Float_t effBoundary) {fEffBoundary=effBoundary;} | |
67 | void SetEff2Boundary(Float_t eff2Boundary) {fEff2Boundary=eff2Boundary;} | |
68 | void SetEff3Boundary(Float_t eff3Boundary) {fEff3Boundary=eff3Boundary;} | |
7e6dce66 | 69 | void SetAddTRes(Float_t addTRes) {fAddTRes=addTRes;} |
f73548c4 | 70 | void SetResCenter (Float_t resCenter) {fResCenter=resCenter;} |
71 | void SetResBoundary(Float_t resBoundary) {fResBoundary=resBoundary;} | |
72 | void SetResSlope(Float_t resSlope) {fResSlope=resSlope;} | |
73 | void SetTimeWalkCenter(Float_t timeWalkCenter) {fTimeWalkCenter=timeWalkCenter;} | |
74 | void SetTimeWalkBoundary(Float_t timeWalkBoundary){fTimeWalkBoundary=timeWalkBoundary;} | |
75 | void SetTimeWalkSlope(Float_t timeWalkSlope) {fTimeWalkSlope=timeWalkSlope;} | |
76 | ||
77 | void SetTimeDelayFlag(Int_t timeDelayFlag) {fTimeDelayFlag=timeDelayFlag;} | |
78 | void SetPulseHeightSlope(Float_t pulseHeightSlope){fPulseHeightSlope=pulseHeightSlope;} | |
79 | void SetTimeDelaySlope(Float_t timeDelaySlope) {fTimeDelaySlope=timeDelaySlope;} | |
80 | void SetMinimumCharge(Float_t minimumCharge) {fMinimumCharge=minimumCharge;} | |
81 | void SetChargeSmearing(Float_t chargeSmearing) {fChargeSmearing=chargeSmearing;} | |
82 | void SetLogChargeSmearing(Float_t logChargeSmearing){fLogChargeSmearing=logChargeSmearing;} | |
83 | void SetTimeSmearing(Float_t timeSmearing) {fTimeSmearing=timeSmearing;} | |
84 | void SetAverageTimeFlag(Int_t averageTimeFlag) {fAverageTimeFlag=averageTimeFlag;} | |
43f77f2d | 85 | |
ea7a588a | 86 | void SetAdcBin(Float_t adcBin) {fAdcBin=adcBin;} |
87 | void SetAdcMean(Float_t adcMean) {fAdcMean=adcMean;} | |
88 | void SetAdcRms(Float_t adcRms) {fAdcRms=adcRms;} | |
f73548c4 | 89 | |
3f296ed3 | 90 | void SetTimeResolution(Float_t time) {fTimeResolution=time;} |
91 | ||
f73548c4 | 92 | Float_t GetPadefficiency() const {return fpadefficiency;} |
93 | Int_t GetEdgeEffect() const {return fEdgeEffect;} | |
94 | Int_t GetEdgeTails() const {return fEdgeTails;} | |
95 | Float_t GetHparameter() const {return fHparameter;} | |
96 | Float_t GetH2parameter() const {return fH2parameter;} | |
97 | Float_t GetKparameter() const {return fKparameter;} | |
98 | Float_t GetK2parameter() const {return fK2parameter;} | |
99 | Float_t GetEffCenter() const {return fEffCenter;} | |
100 | Float_t GetEffBoundary() const {return fEffBoundary;} | |
101 | Float_t GetEff2Boundary() const {return fEff2Boundary;} | |
102 | Float_t GetEff3Boundary() const {return fEff3Boundary;} | |
7e6dce66 | 103 | Float_t GetAddTRes () const {return fAddTRes;} |
f73548c4 | 104 | Float_t GetResCenter () const {return fResCenter;} |
105 | Float_t GetResBoundary() const {return fResBoundary;} | |
106 | Float_t GetResSlope() const {return fResSlope;} | |
107 | Float_t GetTimeWalkCenter() const {return fTimeWalkCenter;} | |
108 | Float_t GetTimeWalkBoundary() const {return fTimeWalkBoundary;} | |
109 | Float_t GetTimeWalkSlope() const {return fTimeWalkSlope;} | |
110 | Int_t GetTimeDelayFlag() const {return fTimeDelayFlag;} | |
111 | Float_t GetPulseHeightSlope() const {return fPulseHeightSlope;} | |
112 | Float_t GetTimeDelaySlope() const {return fTimeDelaySlope;} | |
113 | Float_t GetMinimumCharge() const {return fMinimumCharge;} | |
114 | Float_t GetChargeSmearing() const {return fChargeSmearing;} | |
115 | Float_t GetLogChargeSmearing()const {return fLogChargeSmearing;} | |
116 | Float_t GetTimeSmearing() const {return fTimeSmearing;} | |
117 | Int_t GetAverageTimeFlag() const {return fAverageTimeFlag;} | |
43f77f2d | 118 | |
ea7a588a | 119 | Float_t GetAdcBin() const {return fAdcBin;} |
120 | Float_t GetAdcMean() const {return fAdcMean;} | |
121 | Float_t GetAdcRms() const {return fAdcRms;} | |
f73548c4 | 122 | |
3f296ed3 | 123 | Float_t GetTimeResolution() const {return fTimeResolution;} |
124 | ||
517b7f8f | 125 | |
7e6dce66 | 126 | protected: |
127 | ||
128 | ||
517b7f8f | 129 | private: |
ea7a588a | 130 | Int_t fEvent1; // lower bound for events to sdigitize |
131 | Int_t fEvent2; // upper bound for events to sdigitize | |
f73548c4 | 132 | TF1 *ftail; // pointer to formula for time with tail |
5919c40c | 133 | TString fHeadersFile; // input file |
d61f73d9 | 134 | AliRunLoader* fRunLoader; //! Run Loader |
135 | AliLoader* fTOFLoader; //! Loader | |
d3c7bfac | 136 | |
55991c8b | 137 | Int_t fSelectedSector; // sector number for sdigitization |
138 | Int_t fSelectedPlate ; // plate number for sdigitization | |
517b7f8f | 139 | |
f73548c4 | 140 | // detector response simulation |
141 | // Intrisic MRPC time resolution and pad (edge effect) parameters | |
3f296ed3 | 142 | Float_t fTimeResolution; // time resolution (ps) |
f73548c4 | 143 | Float_t fpadefficiency; // intrinsic pad efficiency, used if fEdgeEffect==0 |
144 | Int_t fEdgeEffect; // edge effects option | |
145 | Int_t fEdgeTails; // edge tails option | |
d61f73d9 | 146 | Float_t fHparameter; // sensitive edge (to produce hits on the neighbouring pads) |
147 | // 0.7 cm (old); 0.4 cm (new) | |
f73548c4 | 148 | Float_t fH2parameter; // parameter to fit the efficiency |
d61f73d9 | 149 | Float_t fKparameter; // sensitive edge (going ahead towards the center |
150 | // no delay effects are suffered) 1.0 cm (old); 0.5 cm (new) | |
f73548c4 | 151 | Float_t fK2parameter; // parameter to fit the efficiency |
152 | // Pad Efficiency and Resolution parameters | |
153 | Float_t fEffCenter; // efficiency in the central region of the pad | |
154 | Float_t fEffBoundary; // efficiency at the boundary of the pad | |
155 | Float_t fEff2Boundary; // efficiency value at H2parameter | |
156 | Float_t fEff3Boundary; // efficiency value at K2parameter | |
7e6dce66 | 157 | Float_t fAddTRes; // additional contribution to |
158 | // the intrinsic MRPC time resolution (ps) | |
f73548c4 | 159 | Float_t fResCenter; // resolution (ps) in the central region of the pad |
160 | Float_t fResBoundary; // resolution (ps) at the boundary of the pad | |
161 | Float_t fResSlope; // slope (ps/K) for neighbouring pad | |
162 | // Time Walk parameters | |
163 | Float_t fTimeWalkCenter; // time walk (ps) in the central region of the pad | |
164 | Float_t fTimeWalkBoundary;// time walk (ps) at the boundary of the pad | |
165 | Float_t fTimeWalkSlope; // slope (ps/K) for neighbouring pad | |
166 | Int_t fTimeDelayFlag; // flag for delay due to the PulseHeightEffect | |
167 | Float_t fPulseHeightSlope;// It determines the charge amount induced | |
168 | // due to edge effect, using the formula | |
169 | // qInduced=exp(-PulseHeightSlope*x) | |
170 | Float_t fTimeDelaySlope; // It determines the time delay. This is the slope | |
171 | // in the T1-T2 vs log(q1/q2) plot | |
172 | // ADC-TDC correlation parameters | |
173 | Float_t fMinimumCharge; // Minimum charge amount which could be induced | |
174 | Float_t fChargeSmearing; // Smearing in charge in (q1/q2) vs x plot | |
175 | Float_t fLogChargeSmearing;// Smearing in log of charge ratio | |
176 | Float_t fTimeSmearing; // Smearing in time in time vs log(q1/q2) plot | |
177 | Int_t fAverageTimeFlag; // flag (see the setter for details) | |
43f77f2d | 178 | |
ea7a588a | 179 | Float_t fAdcBin; // charge-window for the ADC bins [pC] |
180 | Float_t fAdcMean; // mean value for the ADC spectrum [bins] | |
181 | Float_t fAdcRms; // rms value for the ADC spectrum [bins] | |
f73548c4 | 182 | |
3f296ed3 | 183 | AliTOFcalib * fCalib; //! calibration object |
184 | ||
f21fc003 | 185 | ClassDef(AliTOFSDigitizer,5) // creates TOF SDigits |
517b7f8f | 186 | |
187 | }; | |
188 | ||
7e8c2e88 | 189 | #endif // AliTOFSDIGITIZER_H |