AliTPCROC.h
Go to the documentation of this file.
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  UInt_t GetNSectors() const { return fNSectorsAll;}
28  UInt_t GetNRows(UInt_t sector) const { return (sector<fNSectors[1]) ? fNRows[0]:fNRows[1];}
29  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  UInt_t irow=(row<GetNRows(sector))?row:(GetNRows(sector)-1);
32  return (sector<fNSectors[1]) ? fNPads[0][irow]:fNPads[1][irow];}
33  const UInt_t * GetRowIndexes(UInt_t sector) const {return (sector<fNSectors[1]) ? fRowPosIndex[0]:fRowPosIndex[1];}
34  //
35  //get sector parameters
36  //
37  Float_t GetInnerRadiusLow() const {return fInnerRadiusLow;}
38  Float_t GetInnerRadiusUp() const {return fInnerRadiusUp;}
39  Float_t GetOuterRadiusLow() const {return fOuterRadiusLow;}
40  Float_t GetOuterRadiusUp() const {return fOuterRadiusUp;}
41  Float_t GetInnerFrameSpace() const {return fInnerFrameSpace;}
42  Float_t GetOuterFrameSpace() const {return fOuterFrameSpace;}
43  Float_t GetInnerWireMount() const {return fInnerWireMount;}
44  Float_t GetOuterWireMount() const {return fOuterWireMount;}
45  Float_t GetInnerAngle() const {return fInnerAngle;}
46  Float_t GetOuterAngle() const {return fOuterAngle;}
47  UInt_t GetNInnerSector() const {return fNSectors[0];}
48  UInt_t GetNOuterSector() const {return fNSectors[1];}
49  UInt_t GetNSector() const {return fNSectorsAll;}
50  Float_t GetZLength(Int_t sector) const {return (sector<35) ? fZLength-0.275 : fZLength-0.302;}
51  UInt_t GetNRowLow() const {return fNRowLow; }
52  UInt_t GetNRowUp1() const {return fNRowUp1; }
53  UInt_t GetNRowUp2() const {return fNRowUp2; }
54  Float_t GetInnerPadLength() const {return fInnerPadLength; }
55  Float_t GetInnerPadWidth() const {return fInnerPadWidth; }
56  Float_t GetOuterPadWidth() const {return fOuterPadWidth; }
57  Float_t GetOuter1PadLength() const {return fOuter1PadLength; }
58  Float_t GetOuter2PadLength() const {return fOuter2PadLength; }
59  //
60  // get pad row parameters
61  //
62  Float_t GetPadRowRadiiLow(UInt_t irow) const {return ( irow<fNRowLow ) ? fPadRowLow[irow]: 0;} //get the pad row (irow) radii
63  Float_t GetPadRowRadiiUp(UInt_t irow) const {return ( irow<fNRowUp ) ? fPadRowUp[irow]: 0;} //get the pad row (irow) radii
64  Float_t GetPadRowRadii(UInt_t isec, UInt_t irow) const {
65  return ( (isec < fNSectors[0]) ?GetPadRowRadiiLow(irow):GetPadRowRadiiUp(irow));}
66  //
67  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
68  static Float_t GetIdealPosition(UInt_t sector, UInt_t row, UInt_t pad, coordType coord);
69 protected:
70  //
71  // number of pads
72  //
73  void SetGeometry(); // set geometry parameters
74  UInt_t fNSectorsAll; ///< number of sectors
75  UInt_t fNSectors[2]; ///< number of sectors - inner outer
76  UInt_t fNRows[2]; ///< number of row - inner outer
77  UInt_t fNChannels[2]; ///< total number of pads - inner sector - outer sector
78  UInt_t *fNPads[2]; ///< number of pads in row - inner - outer
79  UInt_t *fRowPosIndex[2]; ///< index array - inner - outer
80  //
81  //
82  //---------------------------------------------------------------------
83  // ALICE TPC sector geometry
84  //--------------------------------------------------------------------
85  Float_t fInnerRadiusLow; ///< lower radius of inner sector-IP
86  Float_t fInnerRadiusUp; ///< upper radius of inner sector-IP
87  Float_t fOuterRadiusUp; ///< upper radius of outer sector-IP
88  Float_t fOuterRadiusLow; ///< lower radius of outer sector-IP
89  Float_t fInnerFrameSpace; ///< space for inner frame in the phi direction
90  Float_t fOuterFrameSpace; ///< space for outer frame in the phi direction
91  Float_t fInnerWireMount; ///< space for wire mount, inner sector
92  Float_t fOuterWireMount; ///< space for wire mount, outer sector
93  Float_t fZLength; ///< length of the drift region of the TPC
94  Float_t fInnerAngle; ///< angular coverage
95  Float_t fOuterAngle; ///< angular coverage
96  //
97  //---------------------------------------------------------------------
98  // ALICE TPC wires geometry - for GEM we can consider that it is gating
99  //--------------------------------------------------------------------
100  UInt_t fNInnerWiresPerPad; ///< Number of wires per pad
101  Float_t fInnerWWPitch; ///< pitch between wires in inner sector - calculated
102  UInt_t fInnerDummyWire; ///< number of wires without pad readout
103  Float_t fInnerOffWire; ///< oofset of first wire to the begining of the sector
104  Float_t fRInnerFirstWire; ///< position of the first wire -calculated
105  Float_t fRInnerLastWire; ///< position of the last wire -calculated
106  Float_t fLastWireUp1; ///< position of the last wire in outer1 sector
107  UInt_t fNOuter1WiresPerPad; ///< Number of wires per pad
108  UInt_t fNOuter2WiresPerPad; ///< Number of wires per pad
109  Float_t fOuterWWPitch; ///< pitch between wires in outer sector -calculated
110  UInt_t fOuterDummyWire; ///< number of wires without pad readout
111  Float_t fOuterOffWire; ///< oofset of first wire to the begining of the sector
112  Float_t fROuterFirstWire; ///< position of the first wire -calulated
113  Float_t fROuterLastWire; ///< position of the last wire -calculated
114  //---------------------------------------------------------------------
115  // ALICE TPC pad parameters
116  //--------------------------------------------------------------------
117  Float_t fInnerPadPitchLength; ///< Inner pad pitch length
118  Float_t fInnerPadPitchWidth; ///< Inner pad pitch width
119  Float_t fInnerPadLength; ///< Inner pad length
120  Float_t fInnerPadWidth; ///< Inner pad width
121  Float_t fOuter1PadPitchLength; ///< Outer pad pitch length
122  Float_t fOuter2PadPitchLength; ///< Outer pad pitch length
123  Float_t fOuterPadPitchWidth; ///< Outer pad pitch width
124  Float_t fOuter1PadLength; ///< Outer pad length
125  Float_t fOuter2PadLength; ///< Outer pad length
126  Float_t fOuterPadWidth; ///< Outer pad width
127  //
128  UInt_t fNRowLow; ///< number of pad rows per low sector -set
129  UInt_t fNRowUp1; ///< number of short pad rows per sector up -set
130  UInt_t fNRowUp2; ///< number of long pad rows per sector up -set
131  UInt_t fNRowUp; ///< number of pad rows per sector up -calculated
132  UInt_t fNtRows; ///< total number of rows in TPC -calculated
133  Float_t fPadRowLow[100]; ///< Lower sector, pad row radii -calculated
134  Float_t fPadRowUp[100]; ///< Upper sector, pad row radii -calculated
135  UInt_t fNPadsLow[100]; ///< Lower sector, number of pads per row -calculated
136  UInt_t fNPadsUp[100]; ///< Upper sector, number of pads per row -calculated
137  Float_t fYInner[100]; ///< Inner sector, wire-length
138  Float_t fYOuter[100]; ///< Outer sector, wire-length
139  protected:
140  static AliTPCROC* fgInstance; //!<! Instance of this class (singleton implementation)
141  /// \cond CLASSIMP
142  // ClassDef(AliTPCROC,0) // TPC ROC class
143  /// \endcond
144 };
145 
146 #endif
UInt_t fNInnerWiresPerPad
Number of wires per pad.
Definition: AliTPCROC.h:100
Float_t fOuterPadWidth
Outer pad width.
Definition: AliTPCROC.h:126
Float_t fOuterFrameSpace
space for outer frame in the phi direction
Definition: AliTPCROC.h:90
Float_t fOuter1PadLength
Outer pad length.
Definition: AliTPCROC.h:124
Float_t fOuterRadiusUp
upper radius of outer sector-IP
Definition: AliTPCROC.h:87
AliTPCROC & operator=(const AliTPCROC &roc)
Definition: AliTPCROC.cxx:389
UInt_t fNRowUp1
number of short pad rows per sector up -set
Definition: AliTPCROC.h:129
UInt_t fNPadsLow[100]
Lower sector, number of pads per row -calculated.
Definition: AliTPCROC.h:135
Float_t GetOuterAngle() const
Definition: AliTPCROC.h:46
static Float_t GetIdealPosition(UInt_t sector, UInt_t row, UInt_t pad, coordType coord)
Definition: AliTPCROC.cxx:444
Float_t fOuterOffWire
oofset of first wire to the begining of the sector
Definition: AliTPCROC.h:111
UInt_t GetNChannels(UInt_t sector) const
Definition: AliTPCROC.h:29
Float_t GetZLength(Int_t sector) const
Definition: AliTPCROC.h:50
Float_t fOuter2PadPitchLength
Outer pad pitch length.
Definition: AliTPCROC.h:122
Float_t fInnerPadWidth
Inner pad width.
Definition: AliTPCROC.h:120
auto coord(Vector &v, unsigned int n) noexcept
Returns an object to manage the coordinate n of a vector.
Float_t GetOuterPadWidth() const
Definition: AliTPCROC.h:56
Float_t fYInner[100]
Inner sector, wire-length.
Definition: AliTPCROC.h:137
Float_t fOuterAngle
angular coverage
Definition: AliTPCROC.h:95
UInt_t fNtRows
total number of rows in TPC -calculated
Definition: AliTPCROC.h:132
Float_t fRInnerFirstWire
position of the first wire -calculated
Definition: AliTPCROC.h:104
virtual ~AliTPCROC()
Definition: AliTPCROC.cxx:399
UInt_t GetNSector() const
Definition: AliTPCROC.h:49
Float_t GetInnerPadLength() const
Definition: AliTPCROC.h:54
Float_t GetPadRowRadii(UInt_t isec, UInt_t irow) const
Definition: AliTPCROC.h:64
Float_t GetInnerAngle() const
Definition: AliTPCROC.h:45
Float_t GetOuter1PadLength() const
Definition: AliTPCROC.h:57
UInt_t fNRowUp2
number of long pad rows per sector up -set
Definition: AliTPCROC.h:130
const UInt_t * GetRowIndexes(UInt_t sector) const
Definition: AliTPCROC.h:33
Float_t fInnerWireMount
space for wire mount, inner sector
Definition: AliTPCROC.h:91
UInt_t fOuterDummyWire
number of wires without pad readout
Definition: AliTPCROC.h:110
static AliTPCROC * Instance()
Definition: AliTPCROC.cxx:34
UInt_t GetNRows(UInt_t sector) const
Definition: AliTPCROC.h:28
Float_t fOuterPadPitchWidth
Outer pad pitch width.
Definition: AliTPCROC.h:123
UInt_t GetNRowLow() const
Definition: AliTPCROC.h:51
Float_t fZLength
length of the drift region of the TPC
Definition: AliTPCROC.h:93
Float_t fInnerPadPitchWidth
Inner pad pitch width.
Definition: AliTPCROC.h:118
Float_t fROuterLastWire
position of the last wire -calculated
Definition: AliTPCROC.h:113
UInt_t fNOuter1WiresPerPad
Number of wires per pad.
Definition: AliTPCROC.h:107
Float_t GetOuterRadiusUp() const
Definition: AliTPCROC.h:40
static AliTPCROC * fgInstance
Definition: AliTPCROC.h:140
Float_t fYOuter[100]
Outer sector, wire-length.
Definition: AliTPCROC.h:138
Float_t fROuterFirstWire
position of the first wire -calulated
Definition: AliTPCROC.h:112
Float_t GetInnerFrameSpace() const
Definition: AliTPCROC.h:41
Float_t fLastWireUp1
position of the last wire in outer1 sector
Definition: AliTPCROC.h:106
UInt_t GetNOuterSector() const
Definition: AliTPCROC.h:48
UInt_t * fRowPosIndex[2]
index array - inner - outer
Definition: AliTPCROC.h:79
UInt_t GetNSectors() const
Definition: AliTPCROC.h:27
UInt_t fNRows[2]
number of row - inner outer
Definition: AliTPCROC.h:76
UInt_t fNOuter2WiresPerPad
Number of wires per pad.
Definition: AliTPCROC.h:108
void SetGeometry()
Definition: AliTPCROC.cxx:98
Float_t fOuterRadiusLow
lower radius of outer sector-IP
Definition: AliTPCROC.h:88
Float_t GetOuterWireMount() const
Definition: AliTPCROC.h:44
Float_t fInnerAngle
angular coverage
Definition: AliTPCROC.h:94
Float_t fInnerOffWire
oofset of first wire to the begining of the sector
Definition: AliTPCROC.h:103
Float_t GetPadRowRadiiLow(UInt_t irow) const
Definition: AliTPCROC.h:62
UInt_t fNRowLow
number of pad rows per low sector -set
Definition: AliTPCROC.h:128
Float_t fPadRowUp[100]
Upper sector, pad row radii -calculated.
Definition: AliTPCROC.h:134
Float_t fPadRowLow[100]
Lower sector, pad row radii -calculated.
Definition: AliTPCROC.h:133
Float_t fOuterWireMount
space for wire mount, outer sector
Definition: AliTPCROC.h:92
Float_t fInnerWWPitch
pitch between wires in inner sector - calculated
Definition: AliTPCROC.h:101
Float_t GetOuterRadiusLow() const
Definition: AliTPCROC.h:39
Float_t fOuterWWPitch
pitch between wires in outer sector -calculated
Definition: AliTPCROC.h:109
Float_t fInnerPadPitchLength
Inner pad pitch length.
Definition: AliTPCROC.h:117
Geometry class for a single ROC.
Definition: AliTPCROC.h:14
Float_t GetPadRowRadiiUp(UInt_t irow) const
Definition: AliTPCROC.h:63
UInt_t GetNInnerSector() const
Definition: AliTPCROC.h:47
UInt_t fInnerDummyWire
number of wires without pad readout
Definition: AliTPCROC.h:102
UInt_t GetNRowUp2() const
Definition: AliTPCROC.h:53
UInt_t GetNPads(UInt_t sector, UInt_t row) const
Definition: AliTPCROC.h:30
Float_t fInnerFrameSpace
space for inner frame in the phi direction
Definition: AliTPCROC.h:89
Float_t GetInnerWireMount() const
Definition: AliTPCROC.h:43
Float_t fOuter2PadLength
Outer pad length.
Definition: AliTPCROC.h:125
UInt_t fNPadsUp[100]
Upper sector, number of pads per row -calculated.
Definition: AliTPCROC.h:136
UInt_t fNSectors[2]
number of sectors - inner outer
Definition: AliTPCROC.h:75
Float_t fInnerRadiusUp
upper radius of inner sector-IP
Definition: AliTPCROC.h:86
UInt_t fNSectorsAll
number of sectors
Definition: AliTPCROC.h:74
UInt_t fNRowUp
number of pad rows per sector up -calculated
Definition: AliTPCROC.h:131
Float_t fOuter1PadPitchLength
Outer pad pitch length.
Definition: AliTPCROC.h:121
static UInt_t GetTPCUniqueID(UInt_t sector, UInt_t row, UInt_t pad)
Definition: AliTPCROC.h:67
UInt_t fNChannels[2]
total number of pads - inner sector - outer sector
Definition: AliTPCROC.h:77
Float_t GetInnerPadWidth() const
Definition: AliTPCROC.h:55
Float_t GetOuter2PadLength() const
Definition: AliTPCROC.h:58
Float_t GetOuterFrameSpace() const
Definition: AliTPCROC.h:42
Float_t fInnerPadLength
Inner pad length.
Definition: AliTPCROC.h:119
UInt_t GetNRowUp1() const
Definition: AliTPCROC.h:52
Float_t fRInnerLastWire
position of the last wire -calculated
Definition: AliTPCROC.h:105
Float_t GetInnerRadiusUp() const
Definition: AliTPCROC.h:38
Float_t GetInnerRadiusLow() const
Definition: AliTPCROC.h:37
void GetPositionLocal(UInt_t sector, UInt_t row, UInt_t pad, Float_t *pos)
Definition: AliTPCROC.cxx:414
void Init()
Definition: AliTPCROC.cxx:49
void GetPositionGlobal(UInt_t sector, UInt_t row, UInt_t pad, Float_t *pos)
Definition: AliTPCROC.cxx:432
UInt_t * fNPads[2]
number of pads in row - inner - outer
Definition: AliTPCROC.h:78
Float_t fInnerRadiusLow
lower radius of inner sector-IP
Definition: AliTPCROC.h:85