]>
Commit | Line | Data |
---|---|---|
7a0ff78e | 1 | #ifndef ALITPCROC_H |
2 | #define ALITPCROC_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliTPCROC.h,v */ | |
7 | ||
8 | ////////////////////////////////////////////////// | |
9 | // // | |
10 | // TPC geometry class for ROC // | |
11 | // // | |
12 | ////////////////////////////////////////////////// | |
13 | ||
14 | #include <TObject.h> | |
15 | ||
16 | //_____________________________________________________________________________ | |
17 | class AliTPCROC : public TObject { | |
18 | public: | |
19 | static AliTPCROC* Instance(); | |
20 | AliTPCROC(); | |
21 | AliTPCROC(const AliTPCROC &roc); | |
179c6296 | 22 | AliTPCROC &operator = (const AliTPCROC & roc); //assignment operator |
7a0ff78e | 23 | void Init(); |
24 | virtual ~AliTPCROC(); | |
38bc857e | 25 | void GetPositionLocal(UInt_t sector, UInt_t row, UInt_t pad, Float_t *pos); |
26 | void GetPositionGlobal(UInt_t sector, UInt_t row, UInt_t pad, Float_t *pos); | |
7a0ff78e | 27 | // |
28 | // numbering | |
c5bbaa2c | 29 | UInt_t GetNSectors() const { return fNSectorsAll;} |
30 | UInt_t GetNRows(UInt_t sector) const { return (sector<fNSectors[1]) ? fNRows[0]:fNRows[1];} | |
31 | UInt_t GetNChannels(UInt_t sector) const { return (sector<fNSectors[1]) ? fNChannels[0]:fNChannels[1];} | |
cc8c268f | 32 | UInt_t GetNPads(UInt_t sector,UInt_t row) const { |
33 | UInt_t irow=(row<GetNRows(sector))?row:(GetNRows(sector)-1); | |
34 | return (sector<fNSectors[1]) ? fNPads[0][irow]:fNPads[1][irow];} | |
c5bbaa2c | 35 | const UInt_t * GetRowIndexes(UInt_t sector) const {return (sector<fNSectors[1]) ? fRowPosIndex[0]:fRowPosIndex[1];} |
7a0ff78e | 36 | // |
37 | //get sector parameters | |
38 | // | |
39 | Float_t GetInnerRadiusLow() const {return fInnerRadiusLow;} | |
40 | Float_t GetInnerRadiusUp() const {return fInnerRadiusUp;} | |
41 | Float_t GetOuterRadiusLow() const {return fOuterRadiusLow;} | |
42 | Float_t GetOuterRadiusUp() const {return fOuterRadiusUp;} | |
43 | Float_t GetInnerFrameSpace() const {return fInnerFrameSpace;} | |
44 | Float_t GetOuterFrameSpace() const {return fOuterFrameSpace;} | |
45 | Float_t GetInnerWireMount() const {return fInnerWireMount;} | |
46 | Float_t GetOuterWireMount() const {return fOuterWireMount;} | |
47 | Float_t GetInnerAngle() const {return fInnerAngle;} | |
48 | Float_t GetOuterAngle() const {return fOuterAngle;} | |
c5bbaa2c | 49 | UInt_t GetNInnerSector() const {return fNSectors[0];} |
50 | UInt_t GetNOuterSector() const {return fNSectors[1];} | |
51 | UInt_t GetNSector() const {return fNSectorsAll;} | |
a1ec4d07 | 52 | Float_t GetZLength(Int_t sector) const {return (sector<35) ? fZLength-0.275 : fZLength-0.302;} |
7a0ff78e | 53 | // |
38bc857e | 54 | // get pad row parameters |
55 | // | |
28be5586 | 56 | Float_t GetPadRowRadiiLow(UInt_t irow) const {return ( irow<fNRowLow ) ? fPadRowLow[irow]: 0;} //get the pad row (irow) radii |
57 | Float_t GetPadRowRadiiUp(UInt_t irow) const {return ( irow<fNRowUp ) ? fPadRowUp[irow]: 0;} //get the pad row (irow) radii | |
58 | Float_t GetPadRowRadii(UInt_t isec, UInt_t irow) const { | |
38bc857e | 59 | return ( (isec < fNSectors[0]) ?GetPadRowRadiiLow(irow):GetPadRowRadiiUp(irow));} |
60 | // | |
6e153bec | 61 | static ULong64_t GetTPCUniqueID(UInt_t sector, UInt_t row, UInt_t pad, UInt_t time){ULong64_t uid=sector+(row<<7)+(pad<<14)+(time<<22); return uid; |
f618a956 | 62 | } // unique Id can be used for absolute adressing of the TPC element |
38bc857e | 63 | protected: |
7a0ff78e | 64 | // |
65 | // number of pads | |
66 | // | |
67 | void SetGeometry(); // set geometry parameters | |
c5bbaa2c | 68 | UInt_t fNSectorsAll; // number of sectors |
69 | UInt_t fNSectors[2]; // number of sectors - inner outer | |
70 | UInt_t fNRows[2]; // number of row - inner outer | |
71 | UInt_t fNChannels[2]; // total number of pads - inner sector - outer sector | |
72 | UInt_t *fNPads[2]; // number of pads in row - inner - outer | |
73 | UInt_t *fRowPosIndex[2]; // index array - inner - outer | |
7a0ff78e | 74 | // |
75 | // | |
76 | //--------------------------------------------------------------------- | |
77 | // ALICE TPC sector geometry | |
78 | //-------------------------------------------------------------------- | |
79 | Float_t fInnerRadiusLow; // lower radius of inner sector-IP | |
80 | Float_t fInnerRadiusUp; // upper radius of inner sector-IP | |
81 | Float_t fOuterRadiusUp; // upper radius of outer sector-IP | |
82 | Float_t fOuterRadiusLow; // lower radius of outer sector-IP | |
83 | Float_t fInnerFrameSpace; //space for inner frame in the phi direction | |
84 | Float_t fOuterFrameSpace; //space for outer frame in the phi direction | |
85 | Float_t fInnerWireMount; //space for wire mount, inner sector | |
86 | Float_t fOuterWireMount; //space for wire mount, outer sector | |
87 | Float_t fZLength; //length of the drift region of the TPC | |
88 | Float_t fInnerAngle; //angular coverage | |
89 | Float_t fOuterAngle; //angular coverage | |
90 | // | |
91 | //--------------------------------------------------------------------- | |
92 | // ALICE TPC wires geometry - for GEM we can consider that it is gating | |
93 | //-------------------------------------------------------------------- | |
c5bbaa2c | 94 | UInt_t fNInnerWiresPerPad; //Number of wires per pad |
7a0ff78e | 95 | Float_t fInnerWWPitch; //pitch between wires in inner sector - calculated |
c5bbaa2c | 96 | UInt_t fInnerDummyWire; //number of wires without pad readout |
7a0ff78e | 97 | Float_t fInnerOffWire; //oofset of first wire to the begining of the sector |
98 | Float_t fRInnerFirstWire; //position of the first wire -calculated | |
99 | Float_t fRInnerLastWire; //position of the last wire -calculated | |
100 | Float_t fLastWireUp1; //position of the last wire in outer1 sector | |
c5bbaa2c | 101 | UInt_t fNOuter1WiresPerPad; //Number of wires per pad |
102 | UInt_t fNOuter2WiresPerPad; // Number of wires per pad | |
7a0ff78e | 103 | Float_t fOuterWWPitch; //pitch between wires in outer sector -calculated |
c5bbaa2c | 104 | UInt_t fOuterDummyWire; //number of wires without pad readout |
7a0ff78e | 105 | Float_t fOuterOffWire; //oofset of first wire to the begining of the sector |
106 | Float_t fROuterFirstWire; //position of the first wire -calulated | |
107 | Float_t fROuterLastWire; //position of the last wire -calculated | |
108 | //--------------------------------------------------------------------- | |
109 | // ALICE TPC pad parameters | |
110 | //-------------------------------------------------------------------- | |
111 | Float_t fInnerPadPitchLength; //Inner pad pitch length | |
112 | Float_t fInnerPadPitchWidth; //Inner pad pitch width | |
113 | Float_t fInnerPadLength; //Inner pad length | |
114 | Float_t fInnerPadWidth; //Inner pad width | |
115 | Float_t fOuter1PadPitchLength; //Outer pad pitch length | |
116 | Float_t fOuter2PadPitchLength; //Outer pad pitch length | |
117 | Float_t fOuterPadPitchWidth; //Outer pad pitch width | |
118 | Float_t fOuter1PadLength; //Outer pad length | |
119 | Float_t fOuter2PadLength; //Outer pad length | |
120 | Float_t fOuterPadWidth; //Outer pad width | |
121 | // | |
c5bbaa2c | 122 | UInt_t fNRowLow; //number of pad rows per low sector -set |
123 | UInt_t fNRowUp1; //number of short pad rows per sector up -set | |
124 | UInt_t fNRowUp2; //number of long pad rows per sector up -set | |
125 | UInt_t fNRowUp; //number of pad rows per sector up -calculated | |
126 | UInt_t fNtRows; //total number of rows in TPC -calculated | |
38bc857e | 127 | Float_t fPadRowLow[100]; //Lower sector, pad row radii -calculated |
128 | Float_t fPadRowUp[100]; //Upper sector, pad row radii -calculated | |
129 | UInt_t fNPadsLow[100]; //Lower sector, number of pads per row -calculated | |
130 | UInt_t fNPadsUp[100]; //Upper sector, number of pads per row -calculated | |
131 | Float_t fYInner[100]; //Inner sector, wire-length | |
132 | Float_t fYOuter[100]; //Outer sector, wire-length | |
7a0ff78e | 133 | protected: |
a411fffe | 134 | static AliTPCROC* fgInstance; //! Instance of this class (singleton implementation) |
135 | ClassDef(AliTPCROC,0) // TPC ROC class | |
7a0ff78e | 136 | }; |
137 | ||
138 | #endif |