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