CbmRoot
Loading...
Searching...
No Matches
CbmTrdParModDigi.h
Go to the documentation of this file.
1/* Copyright (C) 2018-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer], Pascal Raisig, Alexandru Bercuci*/
4
5#ifndef CBMTRDPARMODDIGI_H
6#define CBMTRDPARMODDIGI_H
7
8#include "CbmTrdDefs.h" // for cbm::trd namespace
9#include "CbmTrdParMod.h" // for CbmTrdParMod
10
11#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
12#include <RtypesCore.h> // for Double_t, Int_t, Bool_t, Option_t
13#include <TArrayD.h> // for TArrayD
14
15class CbmTrdPoint;
16class TVector3;
17
20public:
22 CbmTrdParModDigi(Double_t x, Double_t y, Double_t z, Double_t sizex, Double_t sizey, Double_t sizez, Int_t nofSectors,
23 Int_t orientation, const TArrayD& sectorSizeX, const TArrayD& sectorSizeY, const TArrayD& padSizeX,
24 const TArrayD& padSizeY);
25 virtual ~CbmTrdParModDigi() { ; }
26 Int_t GetNofColumns() const;
27 Int_t GetNofRows() const;
28
29 Int_t GetNofColumnsInSector(Int_t i) const;
30 Int_t GetNofRowsInSector(Int_t i) const;
31 Int_t GetOrientation() const { return fOrientation; }
32 Double_t GetPadSizeX(Int_t i) const { return fPadSizeX.At(i); }
33 Double_t GetPadSizeY(Int_t i) const { return fPadSizeY.At(i); }
34 Double_t GetSectorBeginX(Int_t i) const { return fSectorBeginX.At(i); }
35 Double_t GetSectorBeginY(Int_t i) const { return fSectorBeginY.At(i); }
36 Double_t GetSectorSizeX(Int_t i) const { return fSectorSizeX.At(i); }
37 Double_t GetSectorSizeY(Int_t i) const { return fSectorSizeY.At(i); }
38
40 Double_t GetAnodeWireOffset() const { return fAnodeWireOffset; }
41 Double_t GetAnodeWireSpacing() const { return fAnodeWireSpacing; }
42
43 Int_t GetNofSectors() const { return fNofSectors; }
44
45 Int_t GetModuleRow(Int_t& sectorId, Int_t& rowId) const;
53 Int_t GetSectorRow(Int_t growId, Int_t& srowId) const;
54
55 Bool_t GetPadInfo(const Double_t* local_point, Int_t& sectorId, Int_t& columnId, Int_t& rowId) const;
56
57 void GetPadInfo(const CbmTrdPoint* trdPoint, Int_t& sectorId, Int_t& columnId, Int_t& rowId) const;
58
59 // function for the pad position with the new address format for rectangular
60 // modules
61 void GetPadPosition(const Int_t sector, const Int_t col, const Int_t row, TVector3& padPos,
62 TVector3& padPosErr) const;
63
64 // get pad position from channel number in CbmTrdDigi implementation of the
65 // pad position
66 void GetPadPosition(const Int_t padAddress, bool isCbmTrdDigiAddress, TVector3& padPos, TVector3& padPosErr) const;
67
68 // standard implementation of the pad position
69 void GetPadPosition(const Int_t padAddress, TVector3& padPos, TVector3& padPosErr) const;
70
71 void GetPosition(
72 // Int_t moduleAddress,
73 Int_t sectorId, Int_t columnId, Int_t rowId, TVector3& padPos, TVector3& padSize) const;
74
75 Int_t GetPadColumn(const Int_t channelNumber) const; // calculate the pad column based on
76 // the channeNumber as defined in the
77 // CbmTrdDigi
78 Int_t GetPadRow(const Int_t channelNumber) const; // calculate the pad row based on
79 // the channeNumber as defined in the
80 // CbmTrdDigi
81
82 Int_t GetSector(Int_t npady, Int_t& rowId) const;
83 Double_t GetSizeX() const { return fSizeX; }
84 Double_t GetSizeY() const { return fSizeY; }
85 Double_t GetSizeZ() const { return fSizeZ; }
86 Double_t GetX() const { return fX; }
87 Double_t GetY() const { return fY; }
88 Double_t GetZ() const { return fZ; }
89
95 int GetPadPlaneType() const;
96 bool IsPadPlane1D() const { return (GetPadPlaneType() >= 0) && !bool(GetPadPlaneType()); }
97 bool IsPadPlane2D() const { return (GetPadPlaneType() >= 0) && bool(GetPadPlaneType()); }
98
99 void Print(Option_t* opt = "") const;
100
101 void ProjectPositionToNextAnodeWire(Double_t* local_point) const;
103 void SetAnodeWireOffset(Double_t off) { fAnodeWireOffset = off; }
104 void SetAnodeWireSpacing(Double_t dw) { fAnodeWireSpacing = dw; }
105 void TransformHitError(TVector3& hitErr) const;
106
107 void TransformToLocalPad(const Double_t* local_point, Double_t& posX, Double_t& posY) const;
108
109private:
112
114 /*Int_t moduleAddress, */ const Double_t* local_point, Int_t& sectorId, Int_t& columnId, Int_t& rowId) const;
115
116 void TransformToLocalCorner(const Double_t* local_point, Double_t& posX, Double_t& posY) const;
117
118 void TransformToLocalSector(const Double_t* local_point, Double_t& posX, Double_t& posY) const;
119
120 Int_t GetSector(const Double_t* local_point) const;
121
128
129 Double_t fX;
130 Double_t fY;
131 Double_t fZ;
132 Double_t fSizeX;
133 Double_t fSizeY;
134 Double_t fSizeZ;
135 TArrayD fSectorX;
136 TArrayD fSectorY;
137 TArrayD fSectorZ;
140 TArrayD fSectorEndX;
141 TArrayD fSectorEndY;
142 TArrayD fSectorSizeX;
143 TArrayD fSectorSizeY;
144
145 TArrayD fPadSizeX;
146 TArrayD fPadSizeY;
147
148 ClassDef(CbmTrdParModDigi,
149 1) // Definition of read-out parameters for one TRD module
150};
151
152#endif
Definition of chamber gain conversion for one TRD module.
Double_t GetSectorBeginY(Int_t i) const
void Print(Option_t *opt="") const
TArrayD fSectorZ
center of sectors local c.s. [cm]
TArrayD fSectorBeginX
begin of sector [cm]
Double_t GetSectorSizeX(Int_t i) const
virtual ~CbmTrdParModDigi()
Bool_t GetPadInfo(const Double_t *local_point, Int_t &sectorId, Int_t &columnId, Int_t &rowId) const
TArrayD fSectorY
center of sectors local c.s. [cm]
Double_t GetX() const
Double_t fAnodeWireOffset
Anode Wire Offset [cm].
TArrayD fSectorSizeY
sector size in y [cm]
Int_t GetNofSectors() const
Int_t GetPadRow(const Int_t channelNumber) const
void SetAnodeWireToPadPlaneDistance(Double_t d)
void GetPosition(Int_t sectorId, Int_t columnId, Int_t rowId, TVector3 &padPos, TVector3 &padSize) const
int GetPadPlaneType() const
Access the basic type of pad plane topology. For convenience also specific accessors are added for ea...
bool IsPadPlane2D() const
TArrayD fSectorBeginY
begin of sector [cm]
Double_t GetSizeY() const
Double_t fZ
center of module in global c.s. [cm]
void TransformHitError(TVector3 &hitErr) const
Int_t GetNofColumnsInSector(Int_t i) const
void SetAnodeWireOffset(Double_t off)
Int_t GetOrientation() const
Double_t fSizeX
module half size in x [cm]
Int_t GetSectorRow(Int_t growId, Int_t &srowId) const
Find the sector wise row given the module row. Inverse of GetModuleRow()
TArrayD fSectorEndX
end of sector [cm]
TArrayD fPadSizeY
size of the readout pad in y [cm]
TArrayD fSectorX
center of sectors local c.s. [cm]
Int_t GetNofRows() const
void TransformToLocalSector(const Double_t *local_point, Double_t &posX, Double_t &posY) const
Int_t fNofSectors
number sectors for this module
bool IsPadPlane1D() const
void GetPadPosition(const Int_t sector, const Int_t col, const Int_t row, TVector3 &padPos, TVector3 &padPosErr) const
Double_t GetAnodeWireSpacing() const
Double_t GetPadSizeY(Int_t i) const
CbmTrdParModDigi(const CbmTrdParModDigi &ref)
Double_t GetSizeZ() const
Double_t fSizeY
module half size in y [cm]
void SetAnodeWireSpacing(Double_t dw)
Double_t GetSectorSizeY(Int_t i) const
Int_t GetNofRowsInSector(Int_t i) const
Double_t GetSectorBeginX(Int_t i) const
Double_t GetAnodeWireOffset() const
Int_t GetPadColumn(const Int_t channelNumber) const
Int_t GetSector(Int_t npady, Int_t &rowId) const
void ProjectPositionToNextAnodeWire(Double_t *local_point) const
Double_t GetPadSizeX(Int_t i) const
Double_t fAnodeWireToPadPlaneDistance
Anode Wire to PadPlane Distance [cm].
void TransformToLocalCorner(const Double_t *local_point, Double_t &posX, Double_t &posY) const
Double_t fY
center of module in global c.s. [cm]
Double_t GetAnodeWireToPadPlaneDistance() const
Double_t fX
center of module in global c.s. [cm]
TArrayD fSectorEndY
end of sector [cm]
Int_t GetNofColumns() const
Double_t GetZ() const
void GetModuleInformation(const Double_t *local_point, Int_t &sectorId, Int_t &columnId, Int_t &rowId) const
TArrayD fPadSizeX
size of the readout pad in x [cm]
Double_t GetSizeX() const
Double_t fSizeZ
module half size in z [cm]
void TransformToLocalPad(const Double_t *local_point, Double_t &posX, Double_t &posY) const
const CbmTrdParModDigi & operator=(const CbmTrdParModDigi &ref)
TArrayD fSectorSizeX
sector size in x [cm]
Double_t GetY() const
Double_t fAnodeWireSpacing
anode wire pitch [cm]
Int_t GetModuleRow(Int_t &sectorId, Int_t &rowId) const
Definition of generic parameters for one TRD module.