CbmRoot
CbmTrdParModDigi.h
Go to the documentation of this file.
1 #ifndef CBMTRDPARMODDIGI_H
2 #define CBMTRDPARMODDIGI_H
3 
4 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
5 #include <RtypesCore.h> // for Double_t, Int_t, Bool_t, Option_t
6 #include <TArrayD.h> // for TArrayD
7 
8 #include "CbmTrdParMod.h" // for CbmTrdParMod
9 
10 class CbmTrdPoint;
11 class TVector3;
12 
15 public:
17  CbmTrdParModDigi(Double_t x,
18  Double_t y,
19  Double_t z,
20  Double_t sizex,
21  Double_t sizey,
22  Double_t sizez,
23  Int_t nofSectors,
24  Int_t orientation,
25  const TArrayD& sectorSizeX,
26  const TArrayD& sectorSizeY,
27  const TArrayD& padSizeX,
28  const TArrayD& padSizeY);
29  virtual ~CbmTrdParModDigi() { ; }
30  Int_t GetNofColumns() const;
31  Int_t GetNofRows() const;
32 
33  Int_t GetNofColumnsInSector(Int_t i) const;
34  Int_t GetNofRowsInSector(Int_t i) const;
35  Int_t GetOrientation() const { return fOrientation; }
36  Double_t GetPadSizeX(Int_t i) const { return fPadSizeX.At(i); }
37  Double_t GetPadSizeY(Int_t i) const { return fPadSizeY.At(i); }
38  Double_t GetSectorBeginX(Int_t i) const { return fSectorBeginX.At(i); }
39  Double_t GetSectorBeginY(Int_t i) const { return fSectorBeginY.At(i); }
40  Double_t GetSectorSizeX(Int_t i) const { return fSectorSizeX.At(i); }
41  Double_t GetSectorSizeY(Int_t i) const { return fSectorSizeY.At(i); }
42 
43  Double_t GetAnodeWireToPadPlaneDistance() const {
45  }
46  Double_t GetAnodeWireOffset() const { return fAnodeWireOffset; }
47  Double_t GetAnodeWireSpacing() const { return fAnodeWireSpacing; }
48 
49  Int_t GetNofSectors() const { return fNofSectors; }
50 
51  Int_t GetModuleRow(Int_t& sectorId, Int_t& rowId) const;
59  Int_t GetSectorRow(Int_t growId, Int_t& srowId) const;
60 
61  Bool_t GetPadInfo(const Double_t* local_point,
62  Int_t& sectorId,
63  Int_t& columnId,
64  Int_t& rowId) const;
65 
66  void GetPadInfo(const CbmTrdPoint* trdPoint,
67  Int_t& sectorId,
68  Int_t& columnId,
69  Int_t& rowId) const;
70 
71  // function for the pad position with the new address format for rectangular
72  // modules
73  void GetPadPosition(const Int_t sector,
74  const Int_t col,
75  const Int_t row,
76  TVector3& padPos,
77  TVector3& padPosErr) const;
78 
79  // get pad position from channel number in CbmTrdDigi implementation of the
80  // pad position
81  void GetPadPosition(const Int_t padAddress,
82  bool isCbmTrdDigiAddress,
83  TVector3& padPos,
84  TVector3& padPosErr) const;
85 
86  // standard implementation of the pad position
87  void GetPadPosition(const Int_t padAddress,
88  TVector3& padPos,
89  TVector3& padPosErr) const;
90 
91  void GetPosition(
92  // Int_t moduleAddress,
93  Int_t sectorId,
94  Int_t columnId,
95  Int_t rowId,
96  TVector3& padPos,
97  TVector3& padSize) const;
98 
99  Int_t GetPadColumn(
100  const Int_t channelNumber) const; // calculate the pad column based on
101  // the channeNumber as defined in the
102  // CbmTrdDigi
103  Int_t
104  GetPadRow(const Int_t channelNumber) const; // calculate the pad row based on
105  // the channeNumber as defined in the
106  // CbmTrdDigi
107 
108  Int_t GetSector(Int_t npady, Int_t& rowId) const;
109  Double_t GetSizeX() const { return fSizeX; }
110  Double_t GetSizeY() const { return fSizeY; }
111  Double_t GetSizeZ() const { return fSizeZ; }
112  Double_t GetX() const { return fX; }
113  Double_t GetY() const { return fY; }
114  Double_t GetZ() const { return fZ; }
115  void Print(Option_t* opt = "") const;
116 
117  void ProjectPositionToNextAnodeWire(Double_t* local_point) const;
120  }
121  void SetAnodeWireOffset(Double_t off) { fAnodeWireOffset = off; }
122  void SetAnodeWireSpacing(Double_t dw) { fAnodeWireSpacing = dw; }
123  void TransformHitError(TVector3& hitErr) const;
124 
125  void TransformToLocalPad(const Double_t* local_point,
126  Double_t& posX,
127  Double_t& posY) const;
128 
129 private:
132 
134  /*Int_t moduleAddress, */ const Double_t* local_point,
135  Int_t& sectorId,
136  Int_t& columnId,
137  Int_t& rowId) const;
138 
139  void TransformToLocalCorner(const Double_t* local_point,
140  Double_t& posX,
141  Double_t& posY) const;
142 
143  void TransformToLocalSector(const Double_t* local_point,
144  Double_t& posX,
145  Double_t& posY) const;
146 
147  Int_t GetSector(const Double_t* local_point) const;
148 
149  Int_t fNofSectors;
150  Int_t
152  Double_t fAnodeWireOffset;
154  Double_t fAnodeWireSpacing;
155  Double_t
157 
158  Double_t fX;
159  Double_t fY;
160  Double_t fZ;
161  Double_t fSizeX;
162  Double_t fSizeY;
163  Double_t fSizeZ;
164  TArrayD fSectorX;
165  TArrayD fSectorY;
166  TArrayD fSectorZ;
167  TArrayD fSectorBeginX;
168  TArrayD fSectorBeginY;
169  TArrayD fSectorEndX;
170  TArrayD fSectorEndY;
171  TArrayD fSectorSizeX;
172  TArrayD fSectorSizeY;
173 
174  TArrayD fPadSizeX;
175  TArrayD fPadSizeY;
176 
177  ClassDef(CbmTrdParModDigi,
178  1) // Definition of read-out parameters for one TRD module
179 };
180 
181 #endif
CbmTrdParModDigi::GetSectorSizeY
Double_t GetSectorSizeY(Int_t i) const
Definition: CbmTrdParModDigi.h:41
CbmTrdParModDigi::GetPadSizeY
Double_t GetPadSizeY(Int_t i) const
Definition: CbmTrdParModDigi.h:37
CbmTrdParModDigi::ProjectPositionToNextAnodeWire
void ProjectPositionToNextAnodeWire(Double_t *local_point) const
Definition: CbmTrdParModDigi.cxx:190
CbmTrdParModDigi::GetX
Double_t GetX() const
Definition: CbmTrdParModDigi.h:112
CbmTrdParModDigi::fSectorSizeY
TArrayD fSectorSizeY
sector size in y [cm]
Definition: CbmTrdParModDigi.h:172
CbmTrdParModDigi::SetAnodeWireSpacing
void SetAnodeWireSpacing(Double_t dw)
Definition: CbmTrdParModDigi.h:122
CbmTrdParModDigi::GetNofRowsInSector
Int_t GetNofRowsInSector(Int_t i) const
Definition: CbmTrdParModDigi.cxx:366
CbmTrdParModDigi::TransformHitError
void TransformHitError(TVector3 &hitErr) const
Definition: CbmTrdParModDigi.cxx:676
CbmTrdParModDigi::GetNofRows
Int_t GetNofRows() const
Definition: CbmTrdParModDigi.cxx:340
CbmTrdParModDigi::~CbmTrdParModDigi
virtual ~CbmTrdParModDigi()
Definition: CbmTrdParModDigi.h:29
CbmTrdParModDigi::GetNofColumnsInSector
Int_t GetNofColumnsInSector(Int_t i) const
Definition: CbmTrdParModDigi.cxx:359
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmTrdParModDigi::fSizeZ
Double_t fSizeZ
module half size in z [cm]
Definition: CbmTrdParModDigi.h:163
CbmTrdParModDigi::GetSectorBeginX
Double_t GetSectorBeginX(Int_t i) const
Definition: CbmTrdParModDigi.h:38
CbmTrdParModDigi::GetModuleInformation
void GetModuleInformation(const Double_t *local_point, Int_t &sectorId, Int_t &columnId, Int_t &rowId) const
Definition: CbmTrdParModDigi.cxx:695
CbmTrdParModDigi::fAnodeWireToPadPlaneDistance
Double_t fAnodeWireToPadPlaneDistance
Anode Wire to PadPlane Distance [cm].
Definition: CbmTrdParModDigi.h:156
CbmTrdParModDigi::GetSizeX
Double_t GetSizeX() const
Definition: CbmTrdParModDigi.h:109
CbmTrdParModDigi::fY
Double_t fY
center of module in global c.s. [cm]
Definition: CbmTrdParModDigi.h:159
CbmTrdParModDigi::fSizeY
Double_t fSizeY
module half size in y [cm]
Definition: CbmTrdParModDigi.h:162
CbmTrdParModDigi::GetY
Double_t GetY() const
Definition: CbmTrdParModDigi.h:113
CbmTrdParModDigi::GetSectorBeginY
Double_t GetSectorBeginY(Int_t i) const
Definition: CbmTrdParModDigi.h:39
CbmTrdParModDigi::GetPadInfo
Bool_t GetPadInfo(const Double_t *local_point, Int_t &sectorId, Int_t &columnId, Int_t &rowId) const
Definition: CbmTrdParModDigi.cxx:436
CbmTrdParModDigi::GetPadSizeX
Double_t GetPadSizeX(Int_t i) const
Definition: CbmTrdParModDigi.h:36
CbmTrdParModDigi::fPadSizeY
TArrayD fPadSizeY
size of the readout pad in y [cm]
Definition: CbmTrdParModDigi.h:175
CbmTrdParModDigi::GetPadRow
Int_t GetPadRow(const Int_t channelNumber) const
Definition: CbmTrdParModDigi.cxx:914
CbmTrdParModDigi::fSectorEndX
TArrayD fSectorEndX
end of sector [cm]
Definition: CbmTrdParModDigi.h:169
CbmTrdParModDigi::fSectorSizeX
TArrayD fSectorSizeX
sector size in x [cm]
Definition: CbmTrdParModDigi.h:171
CbmTrdParModDigi::GetSectorSizeX
Double_t GetSectorSizeX(Int_t i) const
Definition: CbmTrdParModDigi.h:40
CbmTrdParModDigi::fSizeX
Double_t fSizeX
module half size in x [cm]
Definition: CbmTrdParModDigi.h:161
CbmTrdParModDigi::GetSector
Int_t GetSector(Int_t npady, Int_t &rowId) const
Definition: CbmTrdParModDigi.cxx:274
CbmTrdParModDigi::CbmTrdParModDigi
CbmTrdParModDigi()
Definition: CbmTrdParModDigi.cxx:18
CbmTrdParModDigi::GetAnodeWireSpacing
Double_t GetAnodeWireSpacing() const
Definition: CbmTrdParModDigi.h:47
CbmTrdParModDigi::GetNofSectors
Int_t GetNofSectors() const
Definition: CbmTrdParModDigi.h:49
CbmTrdParModDigi::CbmTrdParModDigi
CbmTrdParModDigi(const CbmTrdParModDigi &ref)
d
double d
Definition: P4_F64vec2.h:24
CbmTrdParModDigi::GetOrientation
Int_t GetOrientation() const
Definition: CbmTrdParModDigi.h:35
CbmTrdParModDigi
Definition of chamber gain conversion for one TRD module.
Definition: CbmTrdParModDigi.h:14
CbmTrdParMod
Definition of generic parameters for one TRD module.
Definition: CbmTrdParMod.h:9
CbmTrdParModDigi::GetPadPosition
void GetPadPosition(const Int_t sector, const Int_t col, const Int_t row, TVector3 &padPos, TVector3 &padPosErr) const
Definition: CbmTrdParModDigi.cxx:718
CbmTrdParModDigi::fSectorBeginX
TArrayD fSectorBeginX
begin of sector [cm]
Definition: CbmTrdParModDigi.h:167
CbmTrdParModDigi::fAnodeWireSpacing
Double_t fAnodeWireSpacing
anode wire pitch [cm]
Definition: CbmTrdParModDigi.h:154
CbmTrdParModDigi::fSectorX
TArrayD fSectorX
center of sectors local c.s. [cm]
Definition: CbmTrdParModDigi.h:164
CbmTrdParModDigi::GetZ
Double_t GetZ() const
Definition: CbmTrdParModDigi.h:114
CbmTrdParModDigi::TransformToLocalCorner
void TransformToLocalCorner(const Double_t *local_point, Double_t &posX, Double_t &posY) const
Definition: CbmTrdParModDigi.cxx:596
CbmTrdPoint
Definition: CbmTrdPoint.h:23
CbmTrdParModDigi::GetSizeZ
Double_t GetSizeZ() const
Definition: CbmTrdParModDigi.h:111
CbmTrdParModDigi::TransformToLocalPad
void TransformToLocalPad(const Double_t *local_point, Double_t &posX, Double_t &posY) const
Definition: CbmTrdParModDigi.cxx:634
CbmTrdParModDigi::GetPosition
void GetPosition(Int_t sectorId, Int_t columnId, Int_t rowId, TVector3 &padPos, TVector3 &padSize) const
Definition: CbmTrdParModDigi.cxx:806
CbmTrdParModDigi::GetPadColumn
Int_t GetPadColumn(const Int_t channelNumber) const
Definition: CbmTrdParModDigi.cxx:902
CbmTrdParModDigi::fAnodeWireOffset
Double_t fAnodeWireOffset
Anode Wire Offset [cm].
Definition: CbmTrdParModDigi.h:153
CbmTrdParModDigi::fOrientation
Int_t fOrientation
Definition: CbmTrdParModDigi.h:151
CbmTrdParModDigi::GetSizeY
Double_t GetSizeY() const
Definition: CbmTrdParModDigi.h:110
CbmTrdParModDigi::operator=
const CbmTrdParModDigi & operator=(const CbmTrdParModDigi &ref)
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTrdParModDigi::fX
Double_t fX
center of module in global c.s. [cm]
Definition: CbmTrdParModDigi.h:158
CbmTrdParModDigi::fSectorY
TArrayD fSectorY
center of sectors local c.s. [cm]
Definition: CbmTrdParModDigi.h:165
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTrdParModDigi::fPadSizeX
TArrayD fPadSizeX
size of the readout pad in x [cm]
Definition: CbmTrdParModDigi.h:174
CbmTrdParModDigi::fSectorEndY
TArrayD fSectorEndY
end of sector [cm]
Definition: CbmTrdParModDigi.h:170
CbmTrdParMod.h
CbmTrdParModDigi::GetModuleRow
Int_t GetModuleRow(Int_t &sectorId, Int_t &rowId) const
Definition: CbmTrdParModDigi.cxx:373
CbmTrdParModDigi::GetAnodeWireToPadPlaneDistance
Double_t GetAnodeWireToPadPlaneDistance() const
Definition: CbmTrdParModDigi.h:43
CbmTrdParModDigi::Print
void Print(Option_t *opt="") const
Definition: CbmTrdParModDigi.cxx:147
CbmTrdParModDigi::fSectorZ
TArrayD fSectorZ
center of sectors local c.s. [cm]
Definition: CbmTrdParModDigi.h:166
CbmTrdParModDigi::fNofSectors
Int_t fNofSectors
number sectors for this module
Definition: CbmTrdParModDigi.h:149
CbmTrdParModDigi::fSectorBeginY
TArrayD fSectorBeginY
begin of sector [cm]
Definition: CbmTrdParModDigi.h:168
CbmTrdParModDigi::SetAnodeWireOffset
void SetAnodeWireOffset(Double_t off)
Definition: CbmTrdParModDigi.h:121
CbmTrdParModDigi::GetSectorRow
Int_t GetSectorRow(Int_t growId, Int_t &srowId) const
Find the sector wise row given the module row. Inverse of GetModuleRow()
Definition: CbmTrdParModDigi.cxx:411
CbmTrdParModDigi::fZ
Double_t fZ
center of module in global c.s. [cm]
Definition: CbmTrdParModDigi.h:160
CbmTrdParModDigi::TransformToLocalSector
void TransformToLocalSector(const Double_t *local_point, Double_t &posX, Double_t &posY) const
Definition: CbmTrdParModDigi.cxx:614
CbmTrdParModDigi::SetAnodeWireToPadPlaneDistance
void SetAnodeWireToPadPlaneDistance(Double_t d)
Definition: CbmTrdParModDigi.h:118
CbmTrdParModDigi::GetAnodeWireOffset
Double_t GetAnodeWireOffset() const
Definition: CbmTrdParModDigi.h:46
CbmTrdParModDigi::GetNofColumns
Int_t GetNofColumns() const
Definition: CbmTrdParModDigi.cxx:321