CbmRoot
CbmTrdModuleAbstract.h
Go to the documentation of this file.
1 #ifndef CBMTRDMODULEABSTRACT_H
2 #define CBMTRDMODULEABSTRACT_H
3 
4 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
5 #include <RtypesCore.h> // for Int_t, Double_t, Char_t, UChar_t, USho...
6 #include <TNamed.h> // for TNamed
7 
8 #include "CbmTrdParModDigi.h" // for CbmTrdParModDigi
9 #include "CbmTrdParModGeo.h" // for CbmTrdParModGeo
10 #include "CbmTrdParSetAsic.h" // for CbmTrdParSetAsic
11 
12 class CbmTrdParModGain;
13 class CbmTrdParModGas;
14 
18 class CbmTrdModuleAbstract : public TNamed {
19 public:
23  CbmTrdModuleAbstract(Int_t mod, Int_t ly, Int_t rot);
24 
25  virtual ~CbmTrdModuleAbstract();
26 
28  virtual Double_t GetDx() const { return fGeoPar ? fGeoPar->GetDX() : 0.; }
30  virtual Double_t GetDy() const { return fGeoPar ? fGeoPar->GetDY() : 0.; }
32  virtual Double_t GetDz() const { return fGeoPar ? fGeoPar->GetDZ() : 0.; }
34  virtual Int_t GetNasics() const {
35  return fAsicPar ? fAsicPar->GetNofAsics() : 0;
36  }
38  virtual Int_t GetNcols() const {
39  return fDigiPar ? fDigiPar->GetNofColumns() : 0;
40  }
42  virtual Int_t GetNrows() const {
43  return fDigiPar ? fDigiPar->GetNofRows() : 0;
44  }
49  virtual Int_t GetAsicAddress(Int_t id) const {
50  return fModAddress * 1000 + id;
51  }
57  virtual Int_t GetPadAddress(Int_t r, Int_t c) const {
58  return r * GetNcols() + c;
59  }
65  virtual inline Int_t GetPadRowCol(Int_t address, Int_t& c) const;
66  virtual const Char_t* GetPath() const {
67  return fGeoPar ? fGeoPar->GetTitle() : "";
68  }
69  virtual void LocalToMaster(Double_t in[3], Double_t out[3]);
70  virtual void SetAsicPar(CbmTrdParSetAsic* p = nullptr) { fAsicPar = p; }
71  virtual void SetChmbPar(const CbmTrdParModGas* p) { fChmbPar = p; }
72  virtual void SetDigiPar(const CbmTrdParModDigi* p) { fDigiPar = p; }
73  virtual void SetGainPar(const CbmTrdParModGain* p) { fGainPar = p; }
74  virtual void SetGeoPar(const CbmTrdParModGeo* p) { fGeoPar = p; }
75 
76 protected:
77  // geometrical definitions imported from CbmTrdGeoHandler
78  UShort_t fModAddress;
79  Char_t fLayerId;
80  UChar_t fRotation;
81 
82  // calibration objects
84  const CbmTrdParModGas*
88  const CbmTrdParModGain*
91 
92 private:
95 
96  ClassDef(CbmTrdModuleAbstract, 1)
97 };
98 
99 //_______________________________________________________________________________
100 Int_t CbmTrdModuleAbstract::GetPadRowCol(Int_t address, Int_t& c) const {
101  if (!fDigiPar) {
102  c = -1;
103  return -1;
104  }
105  c = address % GetNcols();
106  return address / GetNcols();
107 }
108 
109 #endif
CbmTrdModuleAbstract::CbmTrdModuleAbstract
CbmTrdModuleAbstract()
Default constructor.
Definition: CbmTrdModuleAbstract.cxx:4
CbmTrdModuleAbstract::operator=
const CbmTrdModuleAbstract & operator=(const CbmTrdModuleAbstract &ref)
CbmTrdModuleAbstract::GetAsicAddress
virtual Int_t GetAsicAddress(Int_t id) const
Addressing ASIC on module based on id.
Definition: CbmTrdModuleAbstract.h:49
CbmTrdModuleAbstract::fGainPar
const CbmTrdParModGain * fGainPar
Analog to digital conversion for module.
Definition: CbmTrdModuleAbstract.h:89
CbmTrdModuleAbstract::fModAddress
UShort_t fModAddress
unique identifier for current module
Definition: CbmTrdModuleAbstract.h:78
CbmTrdParSetAsic::GetNofAsics
virtual Int_t GetNofAsics() const
Definition: CbmTrdParSetAsic.h:48
CbmTrdParModDigi::GetNofRows
Int_t GetNofRows() const
Definition: CbmTrdParModDigi.cxx:340
CbmTrdModuleAbstract::fAsicPar
CbmTrdParSetAsic * fAsicPar
the set of ASIC operating on the module (owned)
Definition: CbmTrdModuleAbstract.h:87
CbmTrdModuleAbstract::GetPadAddress
virtual Int_t GetPadAddress(Int_t r, Int_t c) const
Addressing read-out pads on module based on (row,col)
Definition: CbmTrdModuleAbstract.h:57
CbmTrdParModGeo::GetDX
virtual Double_t GetDX() const
Definition: CbmTrdParModGeo.cxx:19
CbmTrdModuleAbstract::GetPath
virtual const Char_t * GetPath() const
Definition: CbmTrdModuleAbstract.h:66
CbmTrdParSetAsic
Describe TRD module ASIC settings (electronic gain, delays, etc)
Definition: CbmTrdParSetAsic.h:18
CbmTrdModuleAbstract::GetDy
virtual Double_t GetDy() const
Shortcut getter size y/2 [cm].
Definition: CbmTrdModuleAbstract.h:30
CbmTrdModuleAbstract::SetAsicPar
virtual void SetAsicPar(CbmTrdParSetAsic *p=nullptr)
Definition: CbmTrdModuleAbstract.h:70
CbmTrdModuleAbstract::GetNasics
virtual Int_t GetNasics() const
Shortcut getter ASICs number module wise.
Definition: CbmTrdModuleAbstract.h:34
CbmTrdParModGeo.h
CbmTrdModuleAbstract::GetDz
virtual Double_t GetDz() const
Shortcut getter size z/2 [cm].
Definition: CbmTrdModuleAbstract.h:32
CbmTrdParSetAsic.h
CbmTrdModuleAbstract::~CbmTrdModuleAbstract
virtual ~CbmTrdModuleAbstract()
Definition: CbmTrdModuleAbstract.cxx:28
CbmTrdModuleAbstract::GetNrows
virtual Int_t GetNrows() const
Shortcut getter row wise.
Definition: CbmTrdModuleAbstract.h:42
CbmTrdParModGeo
Definition of geometry for one TRD module.
Definition: CbmTrdParModGeo.h:12
CbmTrdParModDigi
Definition of chamber gain conversion for one TRD module.
Definition: CbmTrdParModDigi.h:14
CbmTrdParModDigi.h
CbmTrdModuleAbstract::SetDigiPar
virtual void SetDigiPar(const CbmTrdParModDigi *p)
Definition: CbmTrdModuleAbstract.h:72
CbmTrdModuleAbstract::fChmbPar
const CbmTrdParModGas * fChmbPar
detection description (HV, drift) of module
Definition: CbmTrdModuleAbstract.h:85
CbmTrdModuleAbstract::GetNcols
virtual Int_t GetNcols() const
Shortcut getter column size.
Definition: CbmTrdModuleAbstract.h:38
CbmTrdModuleAbstract::SetChmbPar
virtual void SetChmbPar(const CbmTrdParModGas *p)
Definition: CbmTrdModuleAbstract.h:71
CbmTrdModuleAbstract::fDigiPar
const CbmTrdParModDigi * fDigiPar
read-out description of module
Definition: CbmTrdModuleAbstract.h:83
CbmTrdModuleAbstract::GetPadRowCol
virtual Int_t GetPadRowCol(Int_t address, Int_t &c) const
Addressing read-out pads based on module address.
Definition: CbmTrdModuleAbstract.h:100
CbmTrdParModGeo::GetDY
virtual Double_t GetDY() const
Definition: CbmTrdParModGeo.cxx:24
CbmTrdModuleAbstract::SetGeoPar
virtual void SetGeoPar(const CbmTrdParModGeo *p)
Definition: CbmTrdModuleAbstract.h:74
CbmTrdModuleAbstract::fLayerId
Char_t fLayerId
layer identifier
Definition: CbmTrdModuleAbstract.h:79
CbmTrdModuleAbstract
Abstract class for TRD module.
Definition: CbmTrdModuleAbstract.h:18
CbmTrdParModGeo::GetDZ
virtual Double_t GetDZ() const
Definition: CbmTrdParModGeo.cxx:29
CbmTrdModuleAbstract::CbmTrdModuleAbstract
CbmTrdModuleAbstract(const CbmTrdModuleAbstract &ref)
CbmTrdModuleAbstract::LocalToMaster
virtual void LocalToMaster(Double_t in[3], Double_t out[3])
Definition: CbmTrdModuleAbstract.cxx:33
CbmTrdModuleAbstract::GetDx
virtual Double_t GetDx() const
Shortcut getter size x/2 [cm].
Definition: CbmTrdModuleAbstract.h:28
CbmTrdModuleAbstract::SetGainPar
virtual void SetGainPar(const CbmTrdParModGain *p)
Definition: CbmTrdModuleAbstract.h:73
CbmTrdModuleAbstract::fRotation
UChar_t fRotation
rotation angle for current module
Definition: CbmTrdModuleAbstract.h:80
CbmTrdModuleAbstract::fGeoPar
const CbmTrdParModGeo * fGeoPar
link to gGeometry for module
Definition: CbmTrdModuleAbstract.h:90
CbmTrdParModGas
Definition of gas parameters for one TRD module.
Definition: CbmTrdParModGas.h:16
CbmTrdParModGain
Definition of gain parameters for one TRD module.
Definition: CbmTrdParModGain.h:9
CbmTrdParModDigi::GetNofColumns
Int_t GetNofColumns() const
Definition: CbmTrdParModDigi.cxx:321