]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/TPCbase/AliTPCParam.h
doxy: TPC/TPCbase converted
[u/mrichter/AliRoot.git] / TPC / TPCbase / AliTPCParam.h
CommitLineData
73042f01 1#ifndef ALITPCPARAM_H
2#define ALITPCPARAM_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
3da30618 6
7d855b04 7/// \class AliTPCParam
8/// \brief Manager class for TPC parameters
8c555625 9
cc80f89e 10#include "AliDetectorParam.h"
11#include "TMath.h"
1283eee5 12
01473f7b 13#include <TGeoMatrix.h>
c94bc995 14#include <TVectorD.h>
61c82c27 15class TString;
e185e9d8 16class TGraphErrors;
61c82c27 17
cc80f89e 18class AliTPCParam : public AliDetectorParam {
8c555625 19 //////////////////////////////////////////////////////
20 //////////////////////////////////////////////////////
7d855b04 21 //ALITPCParam object to be possible change
22 //geometry and some other parameters of TPC
23 //used by AliTPC and AliTPCSector
24
8c555625 25public:
7d855b04 26 AliTPCParam();
cc80f89e 27 virtual ~AliTPCParam();
7d855b04 28 TGeoHMatrix * Tracking2LocalMatrix(const TGeoHMatrix * geoMatrix, Int_t sector) const;
cc80f89e 29 virtual Bool_t Transform(Float_t *xyz, Int_t *index, Int_t* oindex);
7d855b04 30 //transformation from input coodination system to output coordination system
cc80f89e 31 Int_t Transform0to1(Float_t *xyz, Int_t *index) const;
7d855b04 32 //trasforamtion from global to global - adjust index[0] sector
cc80f89e 33 //return value is equal to sector corresponding to global position
74707dd2 34 void Transform1to2Ideal(Float_t *xyz, Int_t *index) const;
7d855b04 35 //transformation to rotated coordinata - ideal frame
73042f01 36 void Transform1to2(Float_t *xyz, Int_t *index) const;
7d855b04 37 //transformation to rotated coordinata
73042f01 38 void Transform2to1(Float_t *xyz, Int_t *index) const;
cc80f89e 39 //transformation from rotated coordinata to global coordinata
73042f01 40 void Transform2to2(Float_t *xyz, Int_t *index, Int_t *oindex) const;
cc80f89e 41 //transform rotated coordinata of one sector to rotated
42 //coordinata relative to another sector
73042f01 43 Float_t Transform2to2NearestWire(Float_t *xyz, Int_t *index) const;
cc80f89e 44 //round x position to nearest wire
73042f01 45 Int_t Transform2to3(Float_t *xyz, Int_t *index) const;
cc80f89e 46 //calulate coresponding index[2] -pad row for straight rows
7d855b04 47 //does not change xyz[]
48 //return pad - row
73042f01 49 void Transform3to4(Float_t *xyz, Int_t *index) const;
cc80f89e 50 //valid only for straight rows straight rows
51 //calculate xyz[0] position relative to given index
7d855b04 52 //return pad - row
73042f01 53 void Transform4to3(Float_t *xyz, Int_t *index) const;
cc80f89e 54 //valid only for straight rows straight rows
55 //transform xyz[0] position relative to given index
73042f01 56 void Transform2to5( Float_t *xyz, Int_t *index) const;
cc80f89e 57 //transform [x,y,z] to [r,rphi,z]
73042f01 58 void Transform5to2(Float_t *xyz, Int_t *index) const;
7d855b04 59 //transform [r,rphi,z] coordinata to [x,y,z]
73042f01 60 void Transform4to8(Float_t *xyz, Int_t *index) const;
cc80f89e 61 //transform xyz coordinata to 'digit' coordinata
73042f01 62 void Transform8to4(Float_t *xyz, Int_t *index) const;
7d855b04 63 //transform 'digit' coordinata to xyz coordinata
73042f01 64 void Transform6to8(Float_t *xyz, Int_t *index) const;
cc80f89e 65 //transform dr,f coordinata to 'digit' coordinata
73042f01 66 void Transform8to6(Float_t *xyz, Int_t *index) const;
7d855b04 67 //transform 'digit' coordinata to dr,f coordinata
cc80f89e 68
176aff27 69 virtual Int_t Transform2toPadRow(Float_t */*xyz*/, Int_t */*index*/) const{return 0;}
cc80f89e 70 //transform rotated to
71
72 virtual Int_t GetPadRow(Float_t *xyz, Int_t *index) const ;
73 //return pad row of point xyz - xyz is given in coordinate system -(given by index)
74 //output system is 3 for straight row and 7 for cylindrical row
7d855b04 75 virtual void XYZtoCRXYZ(Float_t */*xyz*/,
176aff27 76 Int_t &/*sector*/, Int_t &/*padrow*/, Int_t /*option*/) const {;}
8c555625 77 //transform global position to the position relative to the sector padrow
78 //if option=0 X calculate absolute calculate sector
79 //if option=1 X absolute use input sector
80 //if option=2 X relative to pad row calculate sector
81 //if option=3 X relative use input sector
82
176aff27 83 virtual void CRXYZtoXYZ(Float_t */*xyz*/,
7d855b04 84 const Int_t &/*sector*/, const Int_t & /*padrow*/, Int_t /*option*/) const {;}
8c555625 85 //transform relative position to the gloabal position
86
7d855b04 87 virtual void CRTimePadtoYZ(Float_t &/*y*/, Float_t &/*z*/,
176aff27 88 const Float_t &/*time*/, const Float_t &/*pad*/,
89 Int_t /*sector*/, Int_t /*padrow*/ ){;}
7d855b04 90 //transform position in digit units (time slices and pads) to "normal"
91 //units (cm)
92 virtual void CRYZtoTimePad(const Float_t &/*y*/, const Float_t &/*z*/,
176aff27 93 Float_t &/*time*/, Float_t &/*pad*/,
94 Int_t /*sector*/, Int_t /*padrow*/){;}
7d855b04 95 //transform position in cm to position in digit unit
176aff27 96 virtual Int_t CalcResponse(Float_t* /*x*/, Int_t * /*index*/, Int_t /*row*/){return 0;}
7d855b04 97 //calculate bin response as function of the input position -x and the weight
98 //if row -pad row is equal -1 calculate response for each pad row
cc80f89e 99 //otherwise it calculate only in given pad row
100 //return number of valid response bin
7d855b04 101 virtual void SetDefault(); //set defaut TPCparam
102 virtual Bool_t Update(); //recalculate and check geometric parameters
103 virtual Bool_t ReadGeoMatrices(); //read geo matrixes
104 Bool_t GetStatus() const; //get information about object consistency
105 Int_t GetIndex(Int_t sector, Int_t row) const; //give index of the given sector and pad row
106 Int_t GetNSegmentsTotal() const {return fNtRows;}
8c555625 107 Double_t GetLowMaxY(Int_t irow) const {return irow*0.;}
108 Double_t GetUpMaxY(Int_t irow) const {return irow*0;}
cc80f89e 109 //additional geometrical function - for Belikov
7d855b04 110
cc80f89e 111 Bool_t AdjustSectorRow(Int_t index, Int_t & sector, Int_t &row) const; //return sector and padrow
8c555625 112 //for given index
8c555625 113
73042f01 114 void AdjustCosSin(Int_t isec, Float_t &cos, Float_t &sin) const;
7d855b04 115 //set cosinus and sinus of rotation angles for sector isec
73042f01 116 Float_t GetAngle(Int_t isec) const;
01473f7b 117 // void GetChamberPos(Int_t isec, Float_t* xyz) const;
118 // void GetChamberRot(Int_t isec, Float_t* angles) const;
cc80f89e 119 //
120 //set sector parameters
121 //
122 void SetInnerRadiusLow(Float_t InnerRadiusLow ) { fInnerRadiusLow=InnerRadiusLow;}
7d855b04 123 void SetOuterRadiusLow(Float_t OuterRadiusLow ) { fOuterRadiusLow=OuterRadiusLow;}
124 void SetInnerRadiusUp(Float_t InnerRadiusUp) { fInnerRadiusUp= InnerRadiusUp;}
125 void SetOuterRadiusUp(Float_t OuterRadiusUp) { fOuterRadiusUp= OuterRadiusUp;}
cc80f89e 126 void SetSectorAngles(Float_t innerangle, Float_t innershift, Float_t outerangle,
127 Float_t outershift);
128 void SetInnerFrameSpace(Float_t frspace) {fInnerFrameSpace = frspace;}
129 void SetOuterFrameSpace(Float_t frspace) {fOuterFrameSpace = frspace;}
130 void SetInnerWireMount(Float_t fmount) {fInnerWireMount = fmount;}
131 void SetOuterWireMount(Float_t fmount) {fOuterWireMount = fmount;}
7d855b04 132 void SetZLength(Float_t zlength) {fZLength = zlength;}
cc80f89e 133 void SetGeometryType(Int_t type) {fGeometryType = type;}
134 //
f03e3423 135 // pad rows geometry
136 //
137 void SetRowNLow( Int_t NRowLow){fNRowLow = NRowLow;}
7d855b04 138 void SetRowNUp1 (Int_t NRowUp1){fNRowUp1 = NRowUp1 ;} //upper sec short pads
f03e3423 139 void SetRowNUp2 (Int_t NRowUp2){fNRowUp2 = NRowUp2 ;} //upper sec long pads
7d855b04 140 void SetRowNUp (Int_t NRowUp){fNRowUp = NRowUp ;}
f03e3423 141 //
cc80f89e 142 //set wire parameters
143 //
144 void SetInnerNWires(Int_t nWires){ fNInnerWiresPerPad=nWires;}
145 void SetInnerDummyWire(Int_t dummy) {fInnerDummyWire = dummy;}
7d855b04 146 void SetInnerOffWire(Float_t offset) {fInnerOffWire =offset;}
f03e3423 147 void SetOuter1NWires(Int_t nWires){ fNOuter1WiresPerPad=nWires;}
148 void SetOuter2NWire(Int_t nWires){ fNOuter2WiresPerPad=nWires;}
cc80f89e 149 void SetOuterDummyWire(Int_t dummy) {fOuterDummyWire = dummy;}
7d855b04 150 void SetOuterOffWire(Float_t offset) {fOuterOffWire =offset;}
f03e3423 151 void SetInnerWWPitch( Float_t wwPitch) {fInnerWWPitch = wwPitch;}
152 void SetRInnerFirstWire(Float_t firstWire){fRInnerFirstWire = firstWire;}
153 void SetRInnerLastWire(Float_t lastWire){fRInnerLastWire = lastWire;}
154 void SetOuterWWPitch(Float_t wwPitch){fOuterWWPitch = wwPitch;}
7d855b04 155 void SetLastWireUp1(Float_t wireUp1){fLastWireUp1 = wireUp1;}
f03e3423 156 void SetROuterFirstWire(Float_t firstWire){fROuterFirstWire = firstWire;}
7d855b04 157 void SetROuterLastWire(Float_t lastWire){fROuterLastWire = lastWire;}
cc80f89e 158 //
159 //set pad parameter
160 //
161 void SetInnerPadPitchLength(Float_t PadPitchLength){ fInnerPadPitchLength=PadPitchLength;}
162 void SetInnerPadPitchWidth(Float_t PadPitchWidth){ fInnerPadPitchWidth = PadPitchWidth;}
163 void SetInnerPadLength(Float_t PadLength){ fInnerPadLength=PadLength;}
7d855b04 164 void SetInnerPadWidth(Float_t PadWidth) { fInnerPadWidth=PadWidth;}
f03e3423 165 void SetOuter1PadPitchLength(Float_t PadPitchLength){ fOuter1PadPitchLength=PadPitchLength;}
166 void SetOuter2PadPitchLength(Float_t PadPitchLength){ fOuter2PadPitchLength=PadPitchLength;}
cc80f89e 167 void SetOuterPadPitchWidth(Float_t PadPitchWidth){ fOuterPadPitchWidth = PadPitchWidth;}
f03e3423 168 void SetOuter1PadLength(Float_t PadLength){ fOuter1PadLength=PadLength;}
169 void SetOuter2PadLength(Float_t PadLength){ fOuter2PadLength=PadLength;}
170 void SetOuterPadWidth(Float_t PadWidth) { fOuterPadWidth=PadWidth;}
cc80f89e 171 void SetMWPCReadout(Bool_t type) {fBMWPCReadout = type;}
172 void SetNCrossRows(Int_t rows){fNCrossRows = rows;}
173 //
174 //set gas paremeters
175 //
176 void SetDiffT(Float_t DiffT){ fDiffT= DiffT;}
177 void SetDiffL(Float_t DiffL){ fDiffL=DiffL;}
178 void SetGasGain(Float_t GasGain){ fGasGain=GasGain;}
179 void SetDriftV(Float_t DriftV){ fDriftV= DriftV;}
180 void SetOmegaTau(Float_t OmegaTau){ fOmegaTau=OmegaTau;}
181 void SetAttCoef(Float_t AttCoef){ fAttCoef=AttCoef;}
182 void SetOxyCont(Float_t OxyCont){ fOxyCont=OxyCont;}
e185e9d8 183 void SetGainSlopesHV(TGraphErrors * gainSlopesHV){ fGainSlopesHV=gainSlopesHV;}
184 void SetGainSlopesPT(TGraphErrors * gainSlopesPT){ fGainSlopesPT=gainSlopesPT;}
185 void SetNominalGainSlopes();
c94bc995 186 void SetComposition(Float_t c1, Float_t c2, Float_t c3, Float_t c4, Float_t c5, Float_t c6){fComposition[0]=c1;
187 fComposition[1]=c2;
188 fComposition[2]=c3;
189 fComposition[3]=c4;
190 fComposition[4]=c5;
191 fComposition[5]=c6;}
192 void SetFpot(Float_t fpot){fFpot=fpot;}
193 void SetNprim(Float_t prim){fNprim=prim;}
194 void SetNtot(Float_t ntot){fNtot=ntot;}
195 void SetWmean(Float_t wmean){fWmean=wmean;}
196 void SetExp(Float_t exp){fExp=exp;}
197 void SetEend(Float_t end){fEend=end;}
198 void SetBetheBloch(TVectorD *v){
2505f4c6 199 if (fBetheBloch) delete fBetheBloch;
200 fBetheBloch=0;
201 if (v) fBetheBloch=new TVectorD(*v);
c94bc995 202 }
d075dab5 203 void SetBetheBlochMC(TVectorD *v){
204 if (fBetheBlochMC) delete fBetheBlochMC;
205 fBetheBlochMC=0;
206 if (v) fBetheBlochMC=new TVectorD(*v);
207 }
2505f4c6 208 static TVectorD * GetBetheBlochParamNa49();
209 static TVectorD * GetBetheBlochParamAlice();
c57ed4a8 210 static TVectorD * GetBetheBlochParamAliceMC();
2505f4c6 211 static void RegisterBBParam(TVectorD* param, Int_t position);
cc80f89e 212 //
7d855b04 213 //set electronivc parameters
cc80f89e 214 //
215 void SetPadCoupling(Float_t PadCoupling){ fPadCoupling=PadCoupling;}
216 void SetZeroSup(Int_t ZeroSup) { fZeroSup=ZeroSup;}
217 void SetNoise(Float_t Noise ) { fNoise= Noise;}
218 void SetChipGain(Float_t ChipGain){ fChipGain= ChipGain;}
219 void SetChipNorm(Float_t ChipNorm){ fChipNorm= ChipNorm;}
220 void SetTSample(Float_t TSample) { fTSample=TSample;}
221 void SetTFWHM(Float_t fwhm) { fTSigma=fwhm/2.35;}
222 void SetMaxTBin(Int_t maxtbin) { fMaxTBin = maxtbin;}
223 void SetADCSat(Int_t adcsat) { fADCSat = adcsat;}
224 void SetADCDynRange(Float_t adcdynrange) {fADCDynRange = adcdynrange;}
661f340b 225 //
226 // High voltage parameters
227 //
228 void SetNominalVoltage(Float_t v, UInt_t i) {if (i<72) fNominalVoltage[i]=v;}
229 void SetMaxVoltageDeviation(Float_t voltage) { fMaxVoltageDeviation=voltage; }
230 void SetMaxDipVoltage(Float_t voltage) { fMaxDipVoltage=voltage; }
231 void SetMaxFractionHVbad(Float_t frac ) { fMaxHVfractionBad=frac; }
232 void SetVoltageDipScanPeriod(Float_t period) { fVoltageDipScanPeriod=period; }
cc80f89e 233 //
7d855b04 234 //set response parameters
cc80f89e 235 //
7d855b04 236 void SetNResponseMax(Int_t max) { fNResponseMax = max;}
cc80f89e 237 void SetResponseThreshold(Int_t threshold) {fResponseThreshold = threshold;}
01473f7b 238 //set L1 parameters
239 void SetGateDelay(Float_t delay) {fGateDelay = delay;}
240 void SetL1Delay(Float_t delay) {fL1Delay = delay;}
241 void SetNTBinsBeforeL1(UShort_t nbins) {fNTBinsBeforeL1 = nbins;}
cc80f89e 242 //
243 //get sector parameters
244 //
245 Float_t GetInnerRadiusLow() const {return fInnerRadiusLow;}
7d855b04 246 Float_t GetInnerRadiusUp() const {return fInnerRadiusUp;}
247 Float_t GetOuterRadiusLow() const {return fOuterRadiusLow;}
248 Float_t GetOuterRadiusUp() const {return fOuterRadiusUp;}
cc80f89e 249 Float_t GetInnerFrameSpace() const {return fInnerFrameSpace;}
250 Float_t GetOuterFrameSpace() const {return fOuterFrameSpace;}
251 Float_t GetInnerWireMount() const {return fInnerWireMount;}
252 Float_t GetOuterWireMount() const {return fOuterWireMount;}
253 Float_t GetInnerAngle() const ;
254 Float_t GetInnerAngleShift() const ;
255 Float_t GetOuterAngle() const ;
7d855b04 256 Float_t GetOuterAngleShift() const ;
cc80f89e 257 Int_t GetNInnerSector() const {return fNInnerSector;}
258 Int_t GetNOuterSector() const {return fNOuterSector;}
259 Int_t GetNSector() const {return fNSector;}
f0043941 260 Float_t GetZLength(Int_t sector=0) const;
cc80f89e 261 Int_t GetGeometryType() const {return fGeometryType;}
262
263 //
264 //get wires parameter
265 //
266 Int_t GetInnerNWires() const {return fNInnerWiresPerPad;}
7d855b04 267 Float_t GetInnerWWPitch() const {return fInnerWWPitch;}
cc80f89e 268 Int_t GetInnerDummyWire() const {return fInnerDummyWire;}
269 Float_t GetInnerOffWire() const {return fInnerOffWire;}
270 Float_t GetRInnerFirstWire() const {return fRInnerFirstWire;}
271 Float_t GetRInnerLastWire() const {return fRInnerLastWire;}
f03e3423 272 Int_t GetOuter1NWires() const {return fNOuter1WiresPerPad;}
273 Int_t GetOuter2NWires() const {return fNOuter2WiresPerPad;}
7d855b04 274 Float_t GetOuterWWPitch() const {return fOuterWWPitch;}
cc80f89e 275 Int_t GetOuterDummyWire() const {return fOuterDummyWire;}
276 Float_t GetOuterOffWire() const {return fOuterOffWire;}
bf6adc12 277 Float_t GetLastWireUp1() const {return fLastWireUp1;}
cc80f89e 278 Float_t GetROuterFirstWire() const {return fROuterFirstWire;}
7d855b04 279 Float_t GetROuterLastWire() const {return fROuterLastWire;}
cc80f89e 280 Float_t GetWWPitch(Int_t isector = 0) const {
7d855b04 281 return ( (isector < fNInnerSector) ? fInnerWWPitch :fOuterWWPitch);}
cc80f89e 282 //
283 //get pad parameters
284 //
285 Float_t GetInnerPadPitchLength() const {return fInnerPadPitchLength;}
286 Float_t GetInnerPadPitchWidth() const {return fInnerPadPitchWidth;}
287 Float_t GetInnerPadLength() const {return fInnerPadLength;}
f03e3423 288 Float_t GetInnerPadWidth() const {return fInnerPadWidth;}
289 Float_t GetOuter1PadPitchLength() const {return fOuter1PadPitchLength;}
7d855b04 290 Float_t GetOuter2PadPitchLength() const {return fOuter2PadPitchLength;}
cc80f89e 291 Float_t GetOuterPadPitchWidth() const {return fOuterPadPitchWidth;}
f03e3423 292 Float_t GetOuter1PadLength() const {return fOuter1PadLength;}
293 Float_t GetOuter2PadLength() const {return fOuter2PadLength;}
7d855b04 294 Float_t GetOuterPadWidth() const {return fOuterPadWidth;}
cc80f89e 295 Bool_t GetMWPCReadout() const {return fBMWPCReadout;}
296 Int_t GetNCrossRows() const {return fNCrossRows;}
297 Float_t GetPadPitchWidth(Int_t isector = 0) const {
298 return ( (isector < fNInnerSector) ? fInnerPadPitchWidth :fOuterPadPitchWidth);}
f03e3423 299 Float_t GetPadPitchLength(Int_t isector = 0, Int_t padrow=0) const
7d855b04 300 { if (isector < fNInnerSector) return fInnerPadPitchLength;
bf6adc12 301 else return ((padrow<fNRowUp1) ? fOuter1PadPitchLength:fOuter2PadPitchLength);}
8c555625 302 Int_t GetNRowLow() const; //get the number of pad rows in low sector
303 Int_t GetNRowUp() const; //get the number of pad rows in up sector
7d855b04 304 Int_t GetNRowUp1() const; // number of short rows in up sector
f03e3423 305 Int_t GetNRowUp2() const; // number of long rows in up sector
cc80f89e 306 Int_t GetNRow(Int_t isec) const {return ((isec<fNInnerSector) ? fNRowLow:fNRowUp);}
bf6adc12 307 Int_t GetNRowsTotal() const {return fNtRows;} //get total nuber of rows
8c555625 308 Float_t GetPadRowRadiiLow(Int_t irow) const; //get the pad row (irow) radii
309 Float_t GetPadRowRadiiUp(Int_t irow) const; //get the pad row (irow) radii
310 Float_t GetPadRowRadii(Int_t isec,Int_t irow) const {
1283eee5 311 return ( (isec < fNInnerSector) ?GetPadRowRadiiLow(irow):GetPadRowRadiiUp(irow));}
cc80f89e 312 //retrun radii of the pad row irow in sector i
7d855b04 313 Int_t GetNPadsLow(Int_t irow) const; //get the number of pads in row irow
8c555625 314 Int_t GetNPadsUp(Int_t irow) const; //get the number of pads in row irow
cc80f89e 315 Int_t GetNPads(Int_t isector,Int_t irow) const{
7d855b04 316 return ( (isector < fNInnerSector) ?GetNPadsLow(irow) : GetNPadsUp(irow));}
0ad1a123 317 Int_t GetWireSegment(Int_t sector, Int_t row) const ; // get Anode wire segment index IROC --> [0,4], OROC[0,7]
318 Int_t GetNPadsPerSegment(Int_t segmentID) const; // get number of pads for a given Anode wire segment
f03e3423 319
320 Float_t GetYInner(Int_t irow) const; // wire length in low sec row
7d855b04 321 Float_t GetYOuter(Int_t irow) const; // wire length in up sec row
01473f7b 322 Int_t GetSectorIndex(Float_t angle, Int_t row, Float_t z) const; // get sector index
74707dd2 323 Float_t GetChamberCenter(Int_t isec, Float_t * center = 0) const; // get readout chamber positions
01473f7b 324 TGeoHMatrix *GetTrackingMatrix(Int_t isec) const {
325 return fTrackingMatrix[isec];}
326 TGeoHMatrix *GetClusterMatrix(Int_t isec) const {
327 return fClusterMatrix[isec];}
328 TGeoHMatrix *GetGlobalMatrix(Int_t isec) const {
329 return fGlobalMatrix[isec];}
330 Bool_t IsGeoRead(){ return fGlobalMatrix!=0;}
cc80f89e 331 //
7d855b04 332 //get GAS parameters
cc80f89e 333 //
334 Float_t GetDiffT() const {return fDiffT;}
335 Float_t GetDiffL() const {return fDiffL;}
336 Float_t GetGasGain() const {return fGasGain;}
337 Float_t GetDriftV() const {return fDriftV;}
338 Float_t GetOmegaTau() const {return fOmegaTau;}
339 Float_t GetAttCoef() const {return fAttCoef;}
7d855b04 340 Float_t GetOxyCont() const {return fOxyCont;}
e185e9d8 341 TGraphErrors * GetGainSlopesHV() const { return fGainSlopesHV;}
342 TGraphErrors * GetGainSlopesPT() const { return fGainSlopesPT;}
c94bc995 343 Float_t* GetComposition() {return fComposition;}
344 Float_t GetFpot()const {return fFpot;}
345 Float_t GetNprim() const {return fNprim;}
346 Float_t GetNtot() const {return fNtot;}
347 Float_t GetWmean()const {return fWmean;}
348 Float_t GetExp()const {return fExp;}
349 Float_t GetEend()const {return fEend;}
7d855b04 350 TVectorD* GetBetheBlochParameters(){return fBetheBloch;}
351 TVectorD* GetBetheBlochParametersMC(){return fBetheBlochMC;}
2505f4c6 352 static Double_t BetheBlochAleph(Double_t bb, Int_t type=0);
cc80f89e 353 //
354 //get Electronic parameters
355 //
356 Float_t GetPadCoupling() const {return fPadCoupling;}
357 Int_t GetZeroSup() const {return fZeroSup;}
358 Float_t GetNoise() const {return fNoise;}
359 Float_t GetChipGain() const {return fChipGain;}
360 Float_t GetChipNorm() const {return fChipNorm;}
361 Float_t GetTSample() const {return fTSample;}
362 Float_t GetZWidth() const {return fZWidth;}
363 Float_t GetTFWHM() const {return fTSigma*2.35;}
7d855b04 364 Float_t GetZSigma() const {return fTSigma*fDriftV;}
bf6adc12 365 virtual Float_t GetZOffset() const {return 3*fTSigma*fDriftV;}
cc80f89e 366 Int_t GetMaxTBin() const {return fMaxTBin;}
367 Int_t GetADCSat() const {return fADCSat;}
368 Float_t GetADCDynRange() const {return fADCDynRange;}
369 Float_t GetTotalNormFac() const {return fTotalNormFac;}
370 Float_t GetNoiseNormFac() const {return fNoiseNormFac;}
661f340b 371 //
372 // High voltage parameters
373 //
61c82c27 374 Float_t GetNominalVoltage(UInt_t i) const {return (i<72)?fNominalVoltage[i]:0;} //0-35:IROC, 36-71:OROC
661f340b 375 Float_t GetMaxVoltageDeviation() const { return fMaxVoltageDeviation; }
376 Float_t GetMaxDipVoltage() const { return fMaxDipVoltage; }
377 Float_t GetMaxFractionHVbad() const { return fMaxHVfractionBad; }
378 Float_t GetVoltageDipScanPeriod() const { return fVoltageDipScanPeriod; }
7d855b04 379
cc80f89e 380 //
381 // get response data
7d855b04 382 //
383 Int_t * GetResBin(Int_t i);
384 //return response bin i - bin given by padrow [0] pad[1] timebin[2]
de61d5d5 385 Float_t & GetResWeight(Int_t i);
cc80f89e 386 //return weight of response bin i
01473f7b 387
388 // get L1 data
389 Float_t GetGateDelay() const {return fGateDelay;}
390 Float_t GetL1Delay() const {return fL1Delay;}
391 UShort_t GetNTBinsBeforeL1() const {return fNTBinsBeforeL1;}
392 Float_t GetNTBinsL1() const {return fNTBinsL1;}
cc80f89e 393protected :
8c555625 394
7d855b04 395 Bool_t fbStatus; ///< indicates consistency of the data
8c555625 396 //---------------------------------------------------------------------
397 // ALICE TPC sector geometry
7d855b04 398 //--------------------------------------------------------------------
399 Float_t fInnerRadiusLow; ///< lower radius of inner sector-IP
400 Float_t fInnerRadiusUp; ///< upper radius of inner sector-IP
401 Float_t fOuterRadiusUp; ///< upper radius of outer sector-IP
402 Float_t fOuterRadiusLow; ///< lower radius of outer sector-IP
403 Float_t fInnerAngle; ///< opening angle of Inner sector
404 Float_t fInnerAngleShift; ///< shift of first inner sector center to the 0
405 Float_t fOuterAngle; ///< opening angle of outer sector
406 Float_t fOuterAngleShift; ///< shift of first sector center to the 0
407 Float_t fInnerFrameSpace; ///< space for inner frame in the phi direction
408 Float_t fOuterFrameSpace; ///< space for outer frame in the phi direction
409 Float_t fInnerWireMount; ///< space for wire mount, inner sector
410 Float_t fOuterWireMount; ///< space for wire mount, outer sector
411 Int_t fNInnerSector; ///< number of inner sectors -calculated
412 Int_t fNOuterSector; ///< number of outer sectors -calculated
413 Int_t fNSector; ///< total number of sectors -calculated
414 Float_t fZLength; ///< length of the drift region of the TPC
415 /// sin and cos of rotation angles for different sectors - calculated
416 Float_t *fRotAngle; //[fNSector]
417 Int_t fGeometryType; ///< type of geometry -0 straight rows
418 // Float_t *fChamberPos; //[fNSector] displacements of the readout chambers
01473f7b 419 //with respect to the 'idead' geometry
420 //in local corrdinate system
7d855b04 421 // Float_t *fChamberRot; //[fNSector] rotation angles of the readout chambers
01473f7b 422 //with respect to the 'idead' geometry
423 //in local corrdinate system
7d855b04 424 /// transformation matrices of the tracking coordinate system
425 TGeoHMatrix **fTrackingMatrix; //![fNSector]
426 /// transformation matrices of the cluster coordinate system
427 TGeoHMatrix **fClusterMatrix; //![fNSector]
428 /// fTrackingMatrix * fClusterMatrix
429 TGeoHMatrix **fGlobalMatrix; //![fNSector]
01473f7b 430
cc80f89e 431 //1-cylindrical
432 //---------------------------------------------------------------------
7d855b04 433 // ALICE TPC wires geometry - for GEM we can consider that it is gating
8c555625 434 //--------------------------------------------------------------------
7d855b04 435 Int_t fNInnerWiresPerPad; ///< Number of wires per pad
436 Float_t fInnerWWPitch; ///< pitch between wires in inner sector - calculated
437 Int_t fInnerDummyWire; ///< number of wires without pad readout
438 Float_t fInnerOffWire; ///< oofset of first wire to the begining of the sector
439 Float_t fRInnerFirstWire; ///< position of the first wire -calculated
440 Float_t fRInnerLastWire; ///< position of the last wire -calculated
441 Float_t fLastWireUp1; ///< position of the last wire in outer1 sector
442 Int_t fNOuter1WiresPerPad; ///< Number of wires per pad
443 Int_t fNOuter2WiresPerPad; ///< Number of wires per pad
444 Float_t fOuterWWPitch; ///< pitch between wires in outer sector -calculated
445 Int_t fOuterDummyWire; ///< number of wires without pad readout
446 Float_t fOuterOffWire; ///< oofset of first wire to the begining of the sector
447 Float_t fROuterFirstWire; ///< position of the first wire -calulated
448 Float_t fROuterLastWire; ///< position of the last wire -calculated
1283eee5 449 //---------------------------------------------------------------------
450 // ALICE TPC pad parameters
451 //--------------------------------------------------------------------
7d855b04 452 Float_t fInnerPadPitchLength; ///< Inner pad pitch length
453 Float_t fInnerPadPitchWidth; ///< Inner pad pitch width
454 Float_t fInnerPadLength; ///< Inner pad length
455 Float_t fInnerPadWidth; ///< Inner pad width
456 Float_t fOuter1PadPitchLength; ///< Outer pad pitch length
457 Float_t fOuter2PadPitchLength; ///< Outer pad pitch length
458 Float_t fOuterPadPitchWidth; ///< Outer pad pitch width
459 Float_t fOuter1PadLength; ///< Outer pad length
460 Float_t fOuter2PadLength; ///< Outer pad length
461 Float_t fOuterPadWidth; ///< Outer pad width
462 Bool_t fBMWPCReadout; ///< indicate wire readout - kTRUE or GEM readout -kFALSE
463 Int_t fNCrossRows; ///< number of rows to crostalk calculation
464
465 Int_t fNRowLow; ///< number of pad rows per low sector -set
466 Int_t fNRowUp1; ///< number of short pad rows per sector up -set
467 Int_t fNRowUp2; ///< number of long pad rows per sector up -set
468 Int_t fNRowUp; ///< number of pad rows per sector up -calculated
469 Int_t fNtRows; ///< total number of rows in TPC -calculated
470 Float_t fPadRowLow[600]; ///< Lower sector, pad row radii -calculated
471 Float_t fPadRowUp[600]; ///< Upper sector, pad row radii -calculated
472 Int_t fNPadsLow[600]; ///< Lower sector, number of pads per row -calculated
473 Int_t fNPadsUp[600]; ///< Upper sector, number of pads per row -calculated
474 Float_t fYInner[600]; ///< Inner sector, wire-length
475 Float_t fYOuter[600]; ///< Outer sector, wire-length
8c555625 476 //---------------------------------------------------------------------
477 // ALICE TPC Gas Parameters
478 //--------------------------------------------------------------------
7d855b04 479 Float_t fDiffT; ///< tangencial diffusion constant
480 Float_t fDiffL; ///< longutudinal diffusion constant
481 Float_t fGasGain; ///< gas gain constant
482 Float_t fDriftV; ///< drift velocity constant
483 Float_t fOmegaTau; ///< omega tau ExB coeficient
484 Float_t fAttCoef; ///< attachment coefitients
485 Float_t fOxyCont; ///< oxygen content
486 Float_t fFpot; ///< first ionisation potential
487 Float_t fNprim; ///< number of primary electrons/cm
488 Float_t fNtot; ///< total number of electrons/c (MIP)
489 Float_t fWmean; ///< mean energy for electron/ion pair
490 Float_t fExp; ///< de = f(E) - energy loss parametrization
491 Float_t fEend; ///< upper cutoff for de generation
492 TVectorD* fBetheBloch; ///< Bethe-Bloch parametrization
493 TVectorD* fBetheBlochMC; ///< Bethe-Bloch parametrization
c94bc995 494 // gas mixture composition
7d855b04 495 Float_t fComposition[6];
496 TGraphErrors * fGainSlopesHV; ///< graph with the gain slope as function of HV - per chamber
497 TGraphErrors * fGainSlopesPT; ///< graph with the gain slope as function of P/T - per chamber
8c555625 498 //---------------------------------------------------------------------
499 // ALICE TPC Electronics Parameters
500 //--------------------------------------------------------------------
7d855b04 501 Float_t fPadCoupling; ///< coupling factor ration of anode signal
502 //and total pads signal
503 Int_t fZeroSup; ///< zero suppresion constant
504 Float_t fNoise; ///< noise sigma constant
505 Float_t fChipGain; ///< preamp shaper constant
506 Float_t fChipNorm; ///< preamp shaper normalisation
507 Float_t fTSample; ///< sampling time
508 Float_t fZWidth; ///< derived value calculated using TSample and driftw -computed
509 Float_t fTSigma; ///< width of the Preamp/Shaper function
510 Int_t fMaxTBin; ///< maximum time bin number
511 Int_t fADCSat; ///< saturation value of ADC (10 bits)
512 Float_t fADCDynRange; ///< input dynamic range (mV)
513 Float_t fTotalNormFac; ///< full normalisation factor - calculated
514 Float_t fNoiseNormFac; ///< normalisation factor to transform noise in electron to ADC channel
661f340b 515 //---------------------------------------------------------------------
516 // High voltage parameters
517 //---------------------------------------------------------------------
7d855b04 518 Float_t fNominalVoltage[72]; ///< nominal voltage in [V] per chamber
519 Float_t fMaxVoltageDeviation; ///< maximum voltage deviation from nominal voltage before a chamber is masked
520 Float_t fMaxDipVoltage; ///< maximum voltage deviation from median before a dip event is marked
521 Float_t fMaxHVfractionBad; ///< maximum fraction of bad HV entries (deviation from Median) before a chamber is marked bad
522 Float_t fVoltageDipScanPeriod; ///< scanning period to detect a high volrage dip: event time stamp +- fVoltageDipScanPeriod [sec]
523
cc80f89e 524 //---------------------------------------------------------------------
7d855b04 525 // ALICE TPC response data
cc80f89e 526 //---------------------------------------------------------------------
7d855b04 527 Int_t fNResponseMax; ///< maximal dimension of response
528 Float_t fResponseThreshold; ///< threshold for accepted response
529 Int_t fCurrentMax; //!< current maximal dimension -calulated
530 Int_t *fResponseBin; //!< array with bins -calulated
531 Float_t *fResponseWeight; //!< array with response -calulated
cc80f89e 532
01473f7b 533 //---------------------------------------------------------------------
534 // ALICE TPC L1 Parameters
535 //--------------------------------------------------------------------
7d855b04 536 Float_t fGateDelay; ///< Delay of L1 arrival for the TPC gate signal
537 Float_t fL1Delay; ///< Delay of L1 arrival for the TPC readout
538 UShort_t fNTBinsBeforeL1; ///< Number of time bins before L1 arrival which are being read out
539 Float_t fNTBinsL1; ///< Overall L1 delay in time bins
2505f4c6 540 protected:
7d855b04 541 static TObjArray *fBBParam; ///< array of the Bethe-Bloch parameters.
2505f4c6 542 private:
bf6adc12 543 AliTPCParam(const AliTPCParam &);
544 AliTPCParam & operator=(const AliTPCParam &);
c828a869 545
546 void CleanGeoMatrices();
547
7d855b04 548 /// \cond CLASSIMP
c57ed4a8 549 ClassDef(AliTPCParam,10) //parameter object for set:TPC
7d855b04 550 /// \endcond
8c555625 551};
552
7d855b04 553
cc80f89e 554inline Int_t * AliTPCParam::GetResBin(Int_t i)
555{
7d855b04 556 /// return response bin i - bin given by padrow [0] pad[1] timebin[2]
557
cc80f89e 558 if (i<fCurrentMax) return &fResponseBin[i*3];
559 else return 0;
925e6570 560}
7d855b04 561
de61d5d5 562inline Float_t &AliTPCParam::GetResWeight(Int_t i)
cc80f89e 563{
7d855b04 564 /// return weight of response bin i
565
cc80f89e 566 if (i<fCurrentMax) return fResponseWeight[i];
de61d5d5 567 else return fResponseWeight[i];
cc80f89e 568}
8c555625 569
cc80f89e 570
73042f01 571inline void AliTPCParam::AdjustCosSin(Int_t isec, Float_t &cos, Float_t &sin) const
cc80f89e 572{
7d855b04 573 /// set cosinus and sinus of rotation angles for sector isec
574
cc80f89e 575 cos=fRotAngle[isec*4];
576 sin=fRotAngle[isec*4+1];
577}
578
73042f01 579inline Float_t AliTPCParam::GetAngle(Int_t isec) const
cc80f89e 580{
7d855b04 581 /// return rotation angle of given sector
582
cc80f89e 583 return fRotAngle[isec*4+2];
584}
585
586
74707dd2 587inline void AliTPCParam::Transform1to2Ideal(Float_t *xyz, Int_t *index) const
cc80f89e 588{
7d855b04 589 /// transformation to rotated coordinates
590 /// we must have information about sector!
591 /// rotate to given sector
592 /// ideal frame
74707dd2 593
cc80f89e 594 Float_t cos,sin;
01473f7b 595 AdjustCosSin(index[1],cos,sin);
cc80f89e 596 Float_t x1=xyz[0]*cos + xyz[1]*sin;
01473f7b 597 Float_t y1=-xyz[0]*sin + xyz[1]*cos;
cc80f89e 598 xyz[0]=x1;
599 xyz[1]=y1;
01473f7b 600 xyz[2]=fZLength-TMath::Abs(xyz[2]);
cc80f89e 601 index[0]=2;
602}
603
01473f7b 604
74707dd2 605inline void AliTPCParam::Transform1to2(Float_t *xyz, Int_t *index) const
606{
7d855b04 607 /// transformation to rotated coordinates
608 /// we must have information about sector!
609 /// rotate to given sector
610
74707dd2 611 Double_t xyzmaster[3] = {xyz[0],xyz[1],xyz[2]};
f99d7d41 612 Double_t xyzlocal[3]={0,0,0};
7d855b04 613 if (index[1]>=0 && index[1]<fNSector)
34bcefc7 614 fGlobalMatrix[index[1]]->MasterToLocal(xyzmaster,xyzlocal);
74707dd2 615 xyz[0] = xyzlocal[0];
616 xyz[1] = xyzlocal[1];
617 xyz[2] = xyzlocal[2];
618 index[0]=2;
619}
620
01473f7b 621
622
623
cc80f89e 624inline void AliTPCParam::Transform2to1(Float_t *xyz, Int_t *index) const
625{
7d855b04 626 /// transformation from rotated coordinates to global coordinates
627
cc80f89e 628 Float_t cos,sin;
7d855b04 629 AdjustCosSin(index[1],cos,sin);
cc80f89e 630 Float_t x1=xyz[0]*cos - xyz[1]*sin;
7d855b04 631 Float_t y1=xyz[0]*sin + xyz[1]*cos;
cc80f89e 632 xyz[0]=x1;
633 xyz[1]=y1;
7d855b04 634 xyz[2]=fZLength-xyz[2];
cc80f89e 635 if (index[1]<fNInnerSector)
4f57cad7 636 {if ( index[1]>=(fNInnerSector>>1)) xyz[2]*=-1.;}
7d855b04 637 else
4f57cad7 638 {if ( (index[1]-fNInnerSector) >= (fNOuterSector>>1) ) xyz[2]*=-1;}
cc80f89e 639 index[0]=1;
640}
641
642inline void AliTPCParam::Transform2to2(Float_t *xyz, Int_t *index, Int_t *oindex) const
643{
7d855b04 644 /// transform rotated coordinats of one sector to rotated
645 /// coordinates relative to another sector
646
cc80f89e 647 Transform2to1(xyz,index);
648 Transform1to2(xyz,oindex);
649 index[0]=2;
7d855b04 650 index[1]=oindex[1];
cc80f89e 651}
652
653inline Float_t AliTPCParam::Transform2to2NearestWire(Float_t *xyz, Int_t *index) const
654{
7d855b04 655 /// asigns the x-position of the closest wire to xyz[0], return the
656 /// electron to closest wire distance
657
cc80f89e 658 Float_t xnew,dx;
659 if (index[1]<fNInnerSector) {
660 xnew = fRInnerFirstWire+TMath::Nint((xyz[0]-fRInnerFirstWire)/fInnerWWPitch)*fInnerWWPitch;
b9d0a01d 661 }
cc80f89e 662 else {
663 xnew = fROuterFirstWire+TMath::Nint((xyz[0]-fROuterFirstWire)/fOuterWWPitch)*fOuterWWPitch;
664 }
665 dx = xnew-xyz[0];
666 xyz[0]=xnew;
667 return dx;
668}
669
670inline Int_t AliTPCParam::Transform2to3(Float_t *xyz, Int_t *index) const
671{
7d855b04 672 /// calulates coresponding pad row number, sets index[2] for straight rows
673 /// does not change xyz[] information
674 /// valid only for straight row
675
676 if (index[1]<fNInnerSector)
cc80f89e 677 index[2] =TMath::Nint((xyz[0]-fPadRowLow[0])/fInnerPadPitchLength);
678 else
f03e3423 679 if (xyz[0] < fLastWireUp1 )
680 index[2] = TMath::Nint((xyz[0]-fPadRowUp[0])/fOuter1PadPitchLength);
7d855b04 681 else
f03e3423 682 index[2] = TMath::Nint(fNRowUp1+(xyz[0]-fPadRowUp[64])/fOuter2PadPitchLength);
cc80f89e 683 index[0]=3;
684 return index[2];
685}
686
687inline void AliTPCParam::Transform3to4(Float_t *xyz, Int_t *index) const
688{
7d855b04 689 /// valid only for straight rows straight rows
690 /// calculate xyz[0] position relative to given index
691
692 if (index[1]<fNInnerSector)
cc80f89e 693 xyz[0] -=index[2]*fInnerPadPitchLength+fPadRowLow[0];
694 else
f03e3423 695 if (index[2]<fNRowUp1)
696 xyz[0] -=index[2]*fOuter1PadPitchLength+fPadRowUp[0];
7d855b04 697 else
f03e3423 698 xyz[0] -=(index[2]-fNRowUp1)*fOuter2PadPitchLength+fPadRowUp[64];
cc80f89e 699 index[0] =4;
700}
701
702inline void AliTPCParam::Transform4to3(Float_t *xyz, Int_t *index) const
703{
7d855b04 704 /// valid only for straight rows
705 /// transforms relative xyz[0] to the global one within given sector
706
707 if (index[1]<fNInnerSector)
cc80f89e 708 xyz[0] +=index[2]*fInnerPadPitchLength+fPadRowLow[0];
709 else
f03e3423 710 if(index[2]<fNRowUp1)
711 xyz[0] +=index[2]*fOuter1PadPitchLength+fPadRowUp[0];
7d855b04 712 else
f03e3423 713 xyz[0] +=index[2]*fOuter2PadPitchLength+fPadRowUp[64];
cc80f89e 714 index[0] =3;
715}
716
717
718inline void AliTPCParam::Transform2to5( Float_t *xyz, Int_t *index) const
719{
7d855b04 720 /// transform [x,y,z] to [r,phi,z]
721
cc80f89e 722 Float_t angle;
723 Float_t r = TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]);
724 if ((xyz[0]==0)&&(xyz[1]==0)) angle = 0;
725 else
726 {
727 angle =TMath::ASin(xyz[1]/r);
728 if (xyz[0]<0) angle=TMath::Pi()-angle;
729 if ( (xyz[0]>0) && (xyz[1]<0) ) angle=2*TMath::Pi()+angle;
730 }
731 xyz[0]=r;
732 xyz[1]=angle;
733 index[0]=5;
734}
735
736inline void AliTPCParam::Transform5to2( Float_t *xyz, Int_t *index) const
737{
7d855b04 738 /// transform [r,rphi,z] to [x,y,z]
739
cc80f89e 740 Float_t r = xyz[0];
741 Float_t angle= xyz[1];
742 xyz[0]=r*TMath::Cos(angle);
743 xyz[1]=r*TMath::Sin(angle);
744 index[0]=2;
745}
746
747inline void AliTPCParam::Transform4to8(Float_t *xyz, Int_t *index) const
748{
7d855b04 749 /// transform xyz coordinates to 'digit' coordinates
f03e3423 750
e30e6a9c 751 if (index[1]<fNInnerSector) {
752 if ( index[1]>=(fNInnerSector>>1)) xyz[1]*=-1.;
753 }
754 else {
7d855b04 755 if ( (index[1]-fNInnerSector) >= (fNOuterSector>>1) ) xyz[1]*=-1;
e30e6a9c 756 }
757
7d855b04 758 xyz[2]/=fZWidth;
759 if (index[1]<fNInnerSector) {
cc80f89e 760 xyz[0]/=fInnerPadPitchLength;
761 xyz[1]/=fInnerPadPitchWidth;
cc80f89e 762 }
7d855b04 763 else{
764 xyz[1]/=fOuterPadPitchWidth;
765 if (index[2]<fNRowUp1 ) xyz[0]/=fOuter1PadPitchLength;
766 else xyz[0]/=fOuter2PadPitchLength;
f03e3423 767 }
01473f7b 768 xyz[1]-=0.5;
cc80f89e 769 index[0]=8;
770}
771
772inline void AliTPCParam::Transform8to4(Float_t *xyz, Int_t *index) const
773{
7d855b04 774 /// transforms 'digit' coordinates to xyz coordinates
775
e30e6a9c 776 if (index[1]<fNInnerSector) {
777 if ( index[1]>=(fNInnerSector>>1)) xyz[1]*=-1.;
778 }
779 else {
7d855b04 780 if ( (index[1]-fNInnerSector) >= (fNOuterSector>>1) ) xyz[1]*=-1;
e30e6a9c 781 }
782
f03e3423 783 xyz[2]*=fZWidth;
7d855b04 784 if (index[1]<fNInnerSector) {
cc80f89e 785 xyz[0]*=fInnerPadPitchLength;
7d855b04 786 xyz[1]*=fInnerPadPitchWidth;
cc80f89e 787 }
7d855b04 788 else{
789 xyz[1]*=fOuterPadPitchWidth;
f03e3423 790 if (index[2] < fNRowUp1 ) xyz[0]*=fOuter1PadPitchLength;
7d855b04 791 else xyz[0]*=fOuter2PadPitchLength;
792 }
cc80f89e 793 index[0]=4;
794}
795
796inline void AliTPCParam::Transform6to8(Float_t *xyz, Int_t *index) const
797{
7d855b04 798 /// transforms cylindrical xyz coordinates to 'digit' coordinates
799
f03e3423 800 xyz[2]/=fZWidth;
7d855b04 801 if (index[1]<fNInnerSector) {
cc80f89e 802 xyz[0]/=fInnerPadPitchLength;
803 xyz[1]*=xyz[0]/fInnerPadPitchWidth;
cc80f89e 804 }
7d855b04 805 else{
cc80f89e 806 xyz[1]*=xyz[0]/fOuterPadPitchWidth;
f03e3423 807 if (index[2] < fNRowUp1 ) xyz[0]/=fOuter1PadPitchLength;
7d855b04 808 else xyz[0]/=fOuter2PadPitchLength;
f03e3423 809 }
cc80f89e 810 index[0]=8;
811}
812
813inline void AliTPCParam::Transform8to6(Float_t *xyz, Int_t *index) const
814{
7d855b04 815 /// transforms 'digit' coordinates to cylindrical xyz coordinates
816
f03e3423 817 xyz[2]*=fZWidth;
7d855b04 818 if (index[1]<fNInnerSector) {
cc80f89e 819 xyz[0]*=fInnerPadPitchLength;
820 xyz[1]/=xyz[0]/fInnerPadPitchWidth;
cc80f89e 821 }
7d855b04 822 else{
823 xyz[1]/=xyz[0]/fOuterPadPitchWidth;
f03e3423 824 if (index[2] < fNRowUp1 ) xyz[0]*=fOuter1PadPitchLength;
7d855b04 825 else xyz[0]*=fOuter2PadPitchLength;
826 }
cc80f89e 827 index[0]=6;
828}
f0043941 829inline Float_t AliTPCParam::GetZLength(Int_t sector) const
830{ if(sector <18 || (sector>35&&sector<54)) return fZLength-0.275;
831 else return fZLength-0.302;
832}
7d855b04 833#endif