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