CbmRoot
CbmTrdParSpadic.h
Go to the documentation of this file.
1 #ifndef CBMTRDPARSPADIC_H
2 #define CBMTRDPARSPADIC_H
3 
4 #define NSPADICCH 32
5 
6 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
7 #include <RtypesCore.h> // for Int_t, Double_t, UInt_t
8 
9 #include <stdint.h> // for uint64_t, uint8_t, uint16_t
10 
11 #include "CbmTrdParAsic.h" // for CbmTrdParAsic
12 
13 class FairParamList;
14 
17 public:
18  CbmTrdParSpadic(Int_t address = 0,
19  Int_t FebGrouping = -1,
20  Double_t x = 0,
21  Double_t y = 0,
22  Double_t z = 0,
23  std::uint64_t compId = 0);
24  virtual ~CbmTrdParSpadic() { ; }
25 
26  virtual void LoadParams(
27  FairParamList*
28  inList);
29 
30  virtual Int_t GetNchannels() const { return NSPADICCH; };
31 
32  virtual Double_t GetSizeX() const { return fgSizeX; }
33  virtual Double_t GetSizeY() const { return fgSizeY; }
34  virtual Double_t GetSizeZ() const { return fgSizeZ; }
35 
36  static std::uint64_t CreateComponentId(
37  Int_t criId,
38  Int_t crobId,
39  Int_t nThCrobOnModule,
40  Int_t
41  eLinkId);
42 
43  static Int_t GetNasicsOnModule(
44  Int_t
45  moduleType);
46  static Int_t GetNasicsPerCrob(
47  Int_t
48  moduleType);
49  static std::uint16_t GetCriId(
50  std::uint64_t
51  componentId);
52  static std::uint8_t
53  GetCrobId(std::uint64_t
54  componentId);
55  static std::uint8_t GetCrobNumber(
56  std::uint64_t
57  componentId);
58  static std::uint8_t GetElinkId(
59  std::uint64_t componentId,
60  Int_t
61  channelId);
62 
63  std::uint16_t GetCriId();
64  std::uint8_t GetCrobId();
65  std::uint8_t GetCrobNumber();
66  std::uint8_t GetElinkId(
67  Int_t
68  channelId);
69  UInt_t GetAddressOnModule() const {
70  return fAddress % 1000;
71  }
72  Int_t GetAsicChAddress(const Int_t asicChannel);
74 
75 
76 private:
77  static Double_t fgSizeX;
78  static Double_t fgSizeY;
79  static Double_t fgSizeZ;
80 
81  const std::vector<Int_t> fVecSpadicChannels = {
82  23, 7, 22, 6, 21, 19, 5, 20, 18, 4, 3, 17, 16, 2, 1, 0,
83  31, 30, 29, 15, 14, 28, 27, 13, 11, 26, 12, 10, 25, 9, 24, 8};
84 
85 
86  ClassDef(CbmTrdParSpadic, 2) // Definition of SPADIC ASIC parameters
87 };
88 
89 #endif
CbmTrdParSpadic::GetNasicsOnModule
static Int_t GetNasicsOnModule(Int_t moduleType)
Returns the number of asics on a given moduleType defined in eCbmTrdModuleTypes.
Definition: CbmTrdParSpadic.cxx:148
CbmTrdParSpadic::LoadParams
virtual void LoadParams(FairParamList *inList)
Loads the specific params for the spadic placed at fAddress, e.g. channel calibration parameters.
Definition: CbmTrdParSpadic.cxx:29
CbmTrdParAsic
Definition of ASIC parameters.
Definition: CbmTrdParAsic.h:15
CbmTrdParSpadic::GetCriId
std::uint16_t GetCriId()
Definition: CbmTrdParSpadic.cxx:80
CbmTrdParSpadic::GetAddressOnModule
UInt_t GetAddressOnModule() const
Returns the number of the asic on the module counted from top left.
Definition: CbmTrdParSpadic.h:69
CbmTrdParSpadic::GetElinkId
static std::uint8_t GetElinkId(std::uint64_t componentId, Int_t channelId)
eLinkId for the given asicAddress and channelId (in the asic coordinates, i.e. 00....
Definition: CbmTrdParSpadic.cxx:119
CbmTrdParSpadic::CreateComponentId
static std::uint64_t CreateComponentId(Int_t criId, Int_t crobId, Int_t nThCrobOnModule, Int_t eLinkId)
Create the componentId from a given criId, crobId, eLinkId and the nThCrobOnModule count,...
Definition: CbmTrdParSpadic.cxx:68
CbmTrdParSpadic::GetSizeX
virtual Double_t GetSizeX() const
Definition: CbmTrdParSpadic.h:32
CbmTrdParSpadic::GetNasicsPerCrob
static Int_t GetNasicsPerCrob(Int_t moduleType)
Returns the number of asics per Crob on a given moduleType defined in eCbmTrdModuleTypes.
Definition: CbmTrdParSpadic.cxx:162
CbmTrdParSpadic::GetAsicChAddress
Int_t GetAsicChAddress(const Int_t asicChannel)
Returns the nth asic Channel in asic coordinates in single asic padplane coordinates....
Definition: CbmTrdParSpadic.cxx:187
CbmTrdParSpadic::GetSizeY
virtual Double_t GetSizeY() const
Definition: CbmTrdParSpadic.h:33
CbmTrdParSpadic::fgSizeY
static Double_t fgSizeY
SPADIC half size in y [cm].
Definition: CbmTrdParSpadic.h:78
CbmTrdParSpadic::GetNchannels
virtual Int_t GetNchannels() const
Definition: CbmTrdParSpadic.h:30
CbmTrdParAsic.h
CbmTrdParSpadic::fgSizeX
static Double_t fgSizeX
SPADIC half size in x [cm].
Definition: CbmTrdParSpadic.h:77
CbmTrdParSpadic::CbmTrdParSpadic
CbmTrdParSpadic(Int_t address=0, Int_t FebGrouping=-1, Double_t x=0, Double_t y=0, Double_t z=0, std::uint64_t compId=0)
Definition: CbmTrdParSpadic.cxx:18
CbmTrdParSpadic::~CbmTrdParSpadic
virtual ~CbmTrdParSpadic()
Definition: CbmTrdParSpadic.h:24
CbmTrdParSpadic::GetSizeZ
virtual Double_t GetSizeZ() const
Definition: CbmTrdParSpadic.h:34
CbmTrdParSpadic::fVecSpadicChannels
const std::vector< Int_t > fVecSpadicChannels
Definition: CbmTrdParSpadic.h:81
CbmTrdParSpadic::fgSizeZ
static Double_t fgSizeZ
SPADIC half size in z [cm].
Definition: CbmTrdParSpadic.h:79
NSPADICCH
#define NSPADICCH
Definition: CbmTrdParSpadic.h:4
CbmTrdParAsic::fAddress
Int_t fAddress
unique ASIC ID
Definition: CbmTrdParAsic.h:69
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTrdParSpadic::GetCrobId
std::uint8_t GetCrobId()
Definition: CbmTrdParSpadic.cxx:90
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTrdParSpadic
Definition of SPADIC parameters.
Definition: CbmTrdParSpadic.h:16
CbmTrdParSpadic::GetCrobNumber
std::uint8_t GetCrobNumber()
Definition: CbmTrdParSpadic.cxx:101