CbmRoot
Loading...
Searching...
No Matches
CbmTrdModuleAbstract.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], Alexandru Bercuci */
4
5#ifndef CBMTRDMODULEABSTRACT_H
6#define CBMTRDMODULEABSTRACT_H
7
8#include "CbmTrdDefs.h" // for cbm::trd namespace
9#include "CbmTrdParModAsic.h" // for CbmTrdParSetAsic
10#include "CbmTrdParModDigi.h" // for CbmTrdParModDigi
11#include "CbmTrdParModGeo.h" // for CbmTrdParModGeo
12
13#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
14#include <RtypesCore.h> // for Int_t, Double_t, Char_t, UChar_t, USho...
15#include <TNamed.h> // for TNamed
16
18class CbmTrdParModGas;
19
20using namespace cbm::trd;
34class CbmTrdModuleAbstract : public TNamed {
35public:
39 CbmTrdModuleAbstract(Int_t mod, Int_t ly, Int_t rot);
40
41 virtual ~CbmTrdModuleAbstract();
42
44 virtual Double_t GetDx() const { return fGeoPar ? fGeoPar->GetDX() : 0.; }
46 virtual Double_t GetDy() const { return fGeoPar ? fGeoPar->GetDY() : 0.; }
48 virtual Double_t GetDz() const { return fGeoPar ? fGeoPar->GetDZ() : 0.; }
50 virtual Int_t GetNasics() const { return fAsicPar ? fAsicPar->GetNofAsics() : 0; }
52 virtual Int_t GetNcols() const { return fDigiPar ? fDigiPar->GetNofColumns() : 0; }
54 virtual Int_t GetNrows() const { return fDigiPar ? fDigiPar->GetNofRows() : 0; }
59 virtual Int_t GetAsicAddress(Int_t id) const { return fModAddress * 1000 + id; }
65 virtual Int_t GetPadAddress(Int_t r, Int_t c) const { return r * GetNcols() + c; }
71 virtual inline Int_t GetPadRowCol(Int_t address, Int_t& c) const;
72 virtual const Char_t* GetPath() const { return fGeoPar ? fGeoPar->GetTitle() : ""; }
73
77 bool IsChannelMasked(int ch) const;
78
79 virtual void LocalToMaster(Double_t in[3], Double_t out[3]);
80
81 virtual void SetAsicPar(CbmTrdParModAsic* p = nullptr) { fAsicPar = p; }
82 virtual void SetChmbPar(const CbmTrdParModGas* p) { fChmbPar = p; }
83 virtual void SetDigiPar(const CbmTrdParModDigi* p) { fDigiPar = p; }
84 virtual void SetGainPar(const CbmTrdParModGain* p) { fGainPar = p; }
85 virtual void SetGeoPar(const CbmTrdParModGeo* p) { fGeoPar = p; }
86protected:
87 // geometrical definitions imported from CbmTrdGeoHandler
88 UShort_t fModAddress = 0;
89 Char_t fLayerId = -1;
90 UChar_t fRotation = 0;
91
92 // calibration objects
93 const CbmTrdParModDigi* fDigiPar = nullptr;
94 const CbmTrdParModGas* fChmbPar = nullptr;
96 const CbmTrdParModGain* fGainPar = nullptr;
97 const CbmTrdParModGeo* fGeoPar = nullptr;
98
99private:
102
103 ClassDef(CbmTrdModuleAbstract, 2)
104};
105
106//_______________________________________________________________________________
107Int_t CbmTrdModuleAbstract::GetPadRowCol(Int_t address, Int_t& c) const
108{
109 if (!fDigiPar) {
110 c = -1;
111 return -1;
112 }
113 c = address % GetNcols();
114 return address / GetNcols();
115}
116
117#endif
Abstract class for the TRD module It provides access to the basic properties of the chamber as follow...
Char_t fLayerId
layer identifier
CbmTrdModuleAbstract(const CbmTrdModuleAbstract &ref)
virtual Int_t GetNcols() const
Shortcut getter column size.
bool IsChannelMasked(int ch) const
Inquire the ASIC par set.
const CbmTrdParModDigi * fDigiPar
read-out description of module
virtual Double_t GetDz() const
Shortcut getter size z/2 [cm].
virtual void LocalToMaster(Double_t in[3], Double_t out[3])
const CbmTrdParModGeo * fGeoPar
link to gGeometry for module
virtual Int_t GetNrows() const
Shortcut getter row wise.
const CbmTrdParModGain * fGainPar
Analog to digital conversion for module.
virtual Int_t GetPadAddress(Int_t r, Int_t c) const
Addressing read-out pads on module based on (row,col)
UChar_t fRotation
rotation angle for current module
CbmTrdModuleAbstract()
Default constructor.
virtual Double_t GetDx() const
Shortcut getter size x/2 [cm].
virtual const Char_t * GetPath() const
UShort_t fModAddress
unique identifier for current module
virtual Int_t GetNasics() const
Shortcut getter ASICs number module wise.
virtual void SetDigiPar(const CbmTrdParModDigi *p)
virtual void SetGeoPar(const CbmTrdParModGeo *p)
const CbmTrdParModGas * fChmbPar
detection description (HV, drift) of module
CbmTrdParModAsic * fAsicPar
the set of ASIC operating on the module (owned)
virtual void SetGainPar(const CbmTrdParModGain *p)
virtual Int_t GetPadRowCol(Int_t address, Int_t &c) const
Addressing read-out pads based on module address.
virtual Double_t GetDy() const
Shortcut getter size y/2 [cm].
virtual void SetAsicPar(CbmTrdParModAsic *p=nullptr)
const CbmTrdModuleAbstract & operator=(const CbmTrdModuleAbstract &ref)
virtual Int_t GetAsicAddress(Int_t id) const
Addressing ASIC on module based on id.
virtual void SetChmbPar(const CbmTrdParModGas *p)
Describe TRD module ASIC settings (electronic gain, delays, etc)
virtual int GetNofAsics() const
Returns the DEFAULT number of ASICs for the current module.
Definition of chamber gain conversion for one TRD module.
Int_t GetNofRows() const
Int_t GetNofColumns() const
Definition of gain parameters for one TRD module.
Definition of gas parameters for one TRD module.
Definition of geometry for one TRD module.
virtual Double_t GetDY() const
virtual Double_t GetDX() const
virtual Double_t GetDZ() const