]>
Commit | Line | Data |
---|---|---|
d48cca74 | 1 | #ifndef AliRICHParam_h |
2 | #define AliRICHParam_h | |
3 | ||
4 | #include <TObject.h> | |
5 | #include "AliRICHConst.h" | |
6 | ||
7 | class AliRICHParam :public TObject | |
8 | { | |
9 | public: | |
853634d3 | 10 | AliRICHParam(); |
11 | virtual ~AliRICHParam() {;} | |
12 | ||
c2c6679b | 13 | void Recalc(); //Recalculates dependent parameters after changes applied |
c60862bf | 14 | Int_t Sector(Float_t &x,Float_t &y)const; //Returns sector number for given point (x,y) |
15 | Int_t L2P(Float_t x,Float_t y,Int_t &padx,Int_t &pady)const;//Which pad contains point (x,y), returns sector code | |
16 | inline Int_t L2Px(Float_t x,Float_t y)const; //Which pad contains point (x,y), returns padx | |
17 | inline Int_t L2Py(Float_t x,Float_t y)const; //Which pad contains point (x,y), returns padx | |
c2c6679b | 18 | inline Int_t Wire(Float_t x)const; //Returns wire number for local point (x,y) |
19 | inline void SigGenInit(Float_t x,Float_t y); | |
20 | inline Bool_t SigGenCond(Float_t x,Float_t y); | |
21 | Float_t Gain(Float_t y); //Returns total charge induced by single photon | |
22 | Float_t TotalCharge(Int_t iPID,Float_t eloss,Float_t y); //Returns total charge induced by particle lost eloss GeV | |
34988b46 | 23 | Float_t PadCharge(Int_t /* iPadX */,Int_t /* iPadY */) {return 0;} //Returns charge for a given pad |
c60862bf | 24 | void FirstPad(Float_t x,Float_t y); |
25 | ||
26 | void Segmentation(Int_t Nx,Int_t Ny) {fNpadsX=Nx;fNpadsY=Ny;Recalc();} | |
27 | Int_t NpadsX() const{return fNpadsX;} | |
28 | Int_t NpadsY() const{return fNpadsY;} | |
3ba5db3e | 29 | void DeadZone(Float_t a) { fDeadZone=a;Recalc();} |
30 | Float_t DeadZone() const{return fDeadZone;} | |
c2c6679b | 31 | void PadSize(Float_t x,Float_t y) { fPadSizeX=x;fPadSizeY=y;Recalc();} |
32 | Float_t PadSizeX() const{return fPadSizeX;} | |
33 | Float_t PadSizeY() const{return fPadSizeY;} | |
34 | Float_t SectorSizeX() const{return fSectorSizeX;} | |
35 | Float_t SectorSizeY() const{return fSectorSizeY;} | |
36 | Float_t PcSizeX() const{return fPcSizeX;} | |
37 | Float_t PcSizeY() const{return fPcSizeY;} | |
38 | ||
3ba5db3e | 39 | void Size(Float_t x,Float_t y,Float_t z){fSizeX=x;fSizeY=y;fSizeZ=z;} |
853634d3 | 40 | void GeantSize(Float_t *pArr) const{pArr[0]=fSizeX/2;pArr[1]=fSizeY/2;pArr[2]=fSizeZ/2;} |
3ba5db3e | 41 | Float_t SizeX() const{return fSizeX;} |
42 | Float_t SizeY() const{return fSizeY;} | |
43 | Float_t SizeZ() const{return fSizeZ;} | |
44 | void Offset(Float_t offset) { fOffset=offset;} | |
45 | Float_t Offset() const{return fOffset;} | |
853634d3 | 46 | void Angles(Float_t xy,Float_t yz) { fAngleXY=xy;fAngleYZ=yz;} |
a277aaca | 47 | Float_t AngleYZ() const{return fAngleYZ*kD2r;} |
48 | Float_t AngleXY() const{return fAngleXY*kD2r;} | |
3ba5db3e | 49 | void AngleRot(Float_t angle) { fAngleRot=angle;} |
a277aaca | 50 | Float_t AngleRot() const{return fAngleRot*kD2r;} |
3ba5db3e | 51 | void GapThickness(Float_t a) { fGapThickness=a;} |
52 | Float_t GapThickness() const{return fGapThickness;} | |
53 | void ProximityGapThickness(Float_t a) { fProximityGapThickness=a;} | |
54 | Float_t ProximityGapThickness() const{return fProximityGapThickness;} | |
55 | void QuartzLength(Float_t a) { fQuartzLength=a;} | |
56 | Float_t QuartzLength() const{return fQuartzLength;} | |
57 | void QuartzWidth(Float_t a) { fQuartzWidth=a;} | |
58 | Float_t QuartzWidth() const{return fQuartzWidth;} | |
59 | void QuartzThickness(Float_t a) { fQuartzThickness=a;} | |
60 | Float_t QuartzThickness() const{return fQuartzThickness;} | |
61 | void OuterFreonLength(Float_t a) { fOuterFreonLength=a;} | |
62 | Float_t OuterFreonLength() const{return fOuterFreonLength;} | |
63 | void OuterFreonWidth(Float_t a) { fOuterFreonWidth=a;} | |
64 | Float_t OuterFreonWidth() const{return fOuterFreonWidth;} | |
65 | void InnerFreonLength(Float_t a) { fInnerFreonLength=a;} | |
66 | Float_t InnerFreonLength() const{return fInnerFreonLength;} | |
67 | void InnerFreonWidth(Float_t a) { fInnerFreonWidth=a;} | |
68 | Float_t InnerFreonWidth() const{return fInnerFreonWidth;} | |
69 | void FreonThickness(Float_t a) { fFreonThickness=a;} | |
70 | Float_t FreonThickness() const{return fFreonThickness;} | |
71 | void RadiatorToPads(Float_t a) { fRadiatorToPads=a;} | |
72 | Float_t RadiatorToPads() const{return fRadiatorToPads;} | |
73 | ||
74 | void SigmaIntegration(Float_t a) { fSigmaIntegration=a;} | |
75 | Float_t SigmaIntegration() const{return fSigmaIntegration;} | |
76 | void ChargeSpreadX(Float_t a) { fChargeSpreadX=a;} | |
77 | Float_t ChargeSpreadX() const{return fChargeSpreadX;} | |
c60862bf | 78 | void ChargeSpreadY(Float_t a) { fChargeSpreadY=a;} |
79 | Float_t ChargeSpreadY() const{return fChargeSpreadY;} | |
80 | Float_t AreaX() const{return fSigmaIntegration*fChargeSpreadX;} | |
81 | Float_t AreaY() const{return fSigmaIntegration*fChargeSpreadY;} | |
3ba5db3e | 82 | void ChargeSlope(Float_t a) { fChargeSlope=a;} |
83 | Float_t ChargeSlope() {return fChargeSlope;} | |
c60862bf | 84 | void MaxAdc(Int_t a) { fMaxAdc=a;} |
85 | Int_t MaxAdc() const{return fMaxAdc;} | |
c2c6679b | 86 | void Pitch(Float_t a) { fPitch=a;} |
3ba5db3e | 87 | Float_t Pitch() const{return fPitch;} |
88 | void AlphaFeedback(Float_t a) { fAlphaFeedback=a;} | |
89 | Float_t AlphaFeedback() const{return fAlphaFeedback;} | |
90 | void EIonisation(Float_t a) { fEIonisation=a;} | |
91 | Float_t EIonisation() const{return fEIonisation;} | |
92 | void SqrtKx3(Float_t a) { fSqrtKx3=a;}; | |
c2c6679b | 93 | void Kx2(Float_t a) { fKx2=a;} |
94 | void Kx4(Float_t a) { fKx4=a;} | |
95 | void SqrtKy3(Float_t a) { fSqrtKy3=a;} | |
96 | void Ky2(Float_t a) { fKy2=a;} | |
97 | void Ky4(Float_t a) { fKy4=a;} | |
98 | void WireSag(Int_t a) { fWireSag=a;} | |
99 | void Voltage(Int_t a) { fVoltage=a;} | |
100 | Float_t Voltage() const{return fVoltage;} | |
d48cca74 | 101 | protected: |
c60862bf | 102 | Int_t fNpadsX; Int_t fNpadsY; //number of pads along X-Y in whole chamber (6 sectors) |
103 | Int_t fNpadsXsector; Int_t fNpadsYsector; //number of pads along X-Y in one sector | |
c2c6679b | 104 | Float_t fDeadZone; //space between PC sectors, cm |
105 | Float_t fPadSizeX,fPadSizeY; //pad size, cm | |
106 | Float_t fSectorSizeX,fSectorSizeY; //photocathod sector size, cm | |
c60862bf | 107 | Float_t fWirePitch; // |
c2c6679b | 108 | |
109 | Int_t fCurrentPadX,fCurrentPadY; //??? | |
110 | Int_t fCurrentWire; //??? | |
111 | ||
112 | Float_t fSizeX; Float_t fSizeY; Float_t fSizeZ; //chamber outer size, cm | |
113 | Float_t fAngleRot; //azimuthal rotation XY plane, deg | |
114 | Float_t fAngleYZ; //angle between chambers YZ plane, deg | |
115 | Float_t fAngleXY; //angle between chambers XY plane, deg | |
116 | Float_t fOffset; //chambers offset from IP, cm | |
117 | Float_t fGapThickness; //gap thickness, cm | |
118 | Float_t fProximityGapThickness; //proximity gap thickness, cm | |
119 | Float_t fQuartzLength; Float_t fQuartzWidth; Float_t fQuartzThickness; //quartz window size, cm | |
120 | Float_t fOuterFreonLength; Float_t fOuterFreonWidth; //freon box outer size, cm | |
121 | Float_t fInnerFreonLength; Float_t fInnerFreonWidth; //freon box inner size, cm | |
122 | Float_t fFreonThickness; //freon thickness | |
123 | Float_t fRadiatorToPads; //distance from radiator to pads, cm | |
124 | Float_t fPcSizeX,fPcSizeY; //photocathod active area size,cm | |
d48cca74 | 125 | |
d48cca74 | 126 | Float_t fChargeSlope; //Slope of the charge distribution |
127 | Float_t fChargeSpreadX; //Width of the charge distribution in x | |
128 | Float_t fChargeSpreadY; //Width of the charge distribution in y | |
129 | Float_t fSigmaIntegration; //Number of sigma's used for charge distribution | |
130 | Float_t fAlphaFeedback; //Feedback photons coefficient | |
131 | Float_t fEIonisation; //Mean ionisation energy | |
c60862bf | 132 | Int_t fMaxAdc; //Maximum ADC channel |
d48cca74 | 133 | Float_t fSqrtKx3; //Mathieson parameters for x |
134 | Float_t fKx2; //Mathieson parameters for x | |
135 | Float_t fKx4; //Mathieson parameters for x | |
136 | Float_t fSqrtKy3; //Mathieson parameters for y | |
137 | Float_t fKy2; //Mathieson parameters for y | |
138 | Float_t fKy4; //Mathieson parameters for y | |
139 | Float_t fPitch; //Anode-cathode pitch | |
140 | Int_t fWireSag; //Flag to turn on/off (0/1) wire sag | |
141 | Int_t fVoltage; //Working voltage (2000, 2050, 2100, 2150) | |
142 | ||
143 | ClassDef(AliRICHParam,1) //RICH main parameters | |
144 | }; | |
c2c6679b | 145 | //__________________________________________________________________________________________________ |
146 | Int_t AliRICHParam::Wire(Float_t x)const | |
147 | { | |
148 | Int_t iWire=(x>0)?Int_t(x/fWirePitch)+1:Int_t(x/fWirePitch)-1; | |
149 | return iWire; | |
150 | }//Int_t AliRICHParam::Wire(Float_t x, Float_t y) | |
151 | //__________________________________________________________________________________________________ | |
152 | void AliRICHParam::SigGenInit(Float_t x,Float_t y) | |
153 | {//Initialises pad and wire position during stepping | |
154 | L2P(x,y,fCurrentPadX,fCurrentPadY); | |
155 | fCurrentWire= (x>0) ? Int_t(x/fWirePitch)+1 : Int_t(x/fWirePitch)-1 ; | |
156 | } | |
157 | //__________________________________________________________________________________________________ | |
158 | Bool_t AliRICHParam::SigGenCond(Float_t x,Float_t y) | |
159 | {//Signal will be generated if particle crosses pad boundary or boundary between two wires. | |
160 | Int_t curPadX,curPadY; | |
161 | L2P(x,y,curPadX,curPadY); | |
162 | Int_t currentWire=(x>0) ? Int_t(x/fWirePitch)+1 : Int_t(x/fWirePitch)-1; | |
163 | if((curPadX != fCurrentPadX) || (curPadY != fCurrentPadY) || (currentWire!=fCurrentWire)) | |
164 | return kTRUE; | |
165 | else | |
166 | return kFALSE; | |
c60862bf | 167 | }//Bool_t AliRICHParam::SigGenCond(Float_t x,Float_t y) |
168 | //__________________________________________________________________________________________________ | |
169 | Int_t AliRICHParam::L2Px(Float_t x,Float_t y)const | |
170 | { | |
171 | Int_t padx,pady; | |
172 | L2P(x,y,padx,pady); | |
173 | return padx; | |
174 | }//Int_t AliRICHParam::L2Px(Float_t x,Float_t y) | |
175 | //__________________________________________________________________________________________________ | |
176 | Int_t AliRICHParam::L2Py(Float_t x,Float_t y)const | |
177 | { | |
178 | Int_t padx,pady; | |
179 | L2P(x,y,padx,pady); | |
180 | return pady; | |
181 | }//Int_t AliRICHParam::L2Px(Float_t x,Float_t y) | |
c2c6679b | 182 | //__________________________________________________________________________________________________ |
d48cca74 | 183 | #endif //AliRICHParam_h |