CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2018PsdPar.h
Go to the documentation of this file.
1/* Copyright (C) 2019-2021 Institute for Nuclear Research, Moscow
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Nikolay Karpushkin [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmMcbm2018PsdPar header file -----
7// ----- Created 26.09.2019 by N.Karpushkin -----
8// ----- based on CbmMcbm2018TofPar by P.-A. Loizeau -----
9// -------------------------------------------------------------------------
10
11#ifndef CbmMcbm2018PsdPar_H
12#define CbmMcbm2018PsdPar_H
13
14#include "FairParGenericSet.h"
15
16#include "TArrayD.h"
17#include "TArrayI.h"
18
19class FairParIo;
20class FairParamList;
21
22
23class CbmMcbm2018PsdPar : public FairParGenericSet {
24
25public:
27 CbmMcbm2018PsdPar(const char* name = "CbmMcbm2018PsdPar", const char* title = "Psd unpacker parameters",
28 const char* context = "Default");
29
31 virtual ~CbmMcbm2018PsdPar();
32
34 virtual void clear();
35
36 void putParams(FairParamList*);
37 Bool_t getParams(FairParamList*);
38
39 static constexpr UInt_t GetNbByteMessage() { return kuBytesPerMessage; }
40
41 //static constexpr UInt_t GetNrOfChannelsPerFee() { return kuNbChannelsPerFee; }
42 static constexpr UInt_t GetNrOfFeePerGbtx() { return kuNbFeePerGbtx; }
43 static constexpr UInt_t GetNrOfGbtxPerGdpb() { return kuNbGbtxPerGdpb; }
44 static constexpr UInt_t GetNrOfChannelsPerGbtx() { return kuNbChannelsPerGbtx; }
45 static constexpr UInt_t GetNrOfChannelsPerGdpb() { return kuNbChannelsPerGdpb; }
46 static constexpr UInt_t GetNrOfFeePerGdpb() { return kuNbFeePerGdpb; }
48
49 Int_t FeeChanToGbtChan(UInt_t uChannelInFee);
50
51 inline Int_t GetDataVersion() { return fiDataVersion; }
52 inline Int_t GetNrOfGdpbs() { return fiNrOfGdpb; }
53 inline Int_t GetGdpbId(Int_t i) { return fiGdpbIdArray[i]; }
54 inline Int_t GetNrOfFeesPerGdpb() { return fiNrOfFeesPerGdpb; }
56
57 inline Int_t GetNrOfGbtx() { return fiNrOfGbtx; }
58 inline Int_t GetNrOfModules() { return fiNrOfModules; }
59 Int_t GetModuleId(UInt_t uGbtx);
60
61 inline Int_t GetNrOfSections() { return fiNrOfSections; }
62 inline Double_t GetMipCalibration(UInt_t i) { return fdMipCalibration[i]; }
63
64 inline Int_t GetNbMsTot() { return fiNbMsTot; }
65 inline Int_t GetNbMsOverlap() { return fiNbMsOverlap; }
66 inline Double_t GetSizeMsInNs() { return fdSizeMsInNs; }
67
68 Double_t GetTsDeadtimePeriod(); // { return fdTsDeadtimePeriod;}
69
70
71private:
74 static const uint32_t kuBytesPerMessage = 8;
76 static const uint32_t kuNbChannelsPerFee = 10;
77 static const uint32_t kuNbFeePerGbtx = 1;
78 static const uint32_t kuNbGbtxPerGdpb = 1;
83 const UInt_t kuFeeToGbt[kuNbChannelsPerFee] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
84
85 Int_t fiDataVersion; // Data Version
86 Int_t fiNrOfGdpb; // Total number of GDPBs
87 TArrayI fiGdpbIdArray; // Array to hold the unique IDs for all Psd GDPBs
88
89 Int_t fiNrOfFeesPerGdpb; // Number of FEEs which are connected to one GDPB
90 Int_t fiNrOfChannelsPerFee; // Number of channels per FEE
91
92 Int_t fiNrOfGbtx; // Total number of Gbtx links
93 Int_t fiNrOfModules; // Total number of Modules
94 TArrayI fiModuleId; // Module Identifier connected to Gbtx link, has to match geometry
95
96 Int_t fiNrOfSections; // Nr of sections
97 TArrayD fdMipCalibration; // Calibration array
98
99 Int_t fiNbMsTot; // Total number of MS per link in TS
100 Int_t fiNbMsOverlap; // Number of overlap MS per TS
101 Double_t fdSizeMsInNs; // Size of the MS in ns, needed for MS border detection
102
103 Double_t
104 fdTsDeadtimePeriod; // Period (ns) in the first MS of each TS where events with missing triggers should be built using the overlap MS of previous TS (overlap events)
105
107};
108#endif // CbmMcbm2018PsdPar_H
static constexpr UInt_t GetNrOfFeePerGbtx()
Bool_t getParams(FairParamList *)
CbmMcbm2018PsdPar(const char *name="CbmMcbm2018PsdPar", const char *title="Psd unpacker parameters", const char *context="Default")
static constexpr UInt_t GetNrOfChannelsPerGbtx()
const UInt_t kuFeeToGbt[kuNbChannelsPerFee]
Mapping.
ClassDef(CbmMcbm2018PsdPar, 1)
static const uint32_t kuNbChannelsPerGdpb
static const uint32_t kuNbFeePerGbtx
Int_t GetGdpbId(Int_t i)
void putParams(FairParamList *)
Int_t GetModuleId(UInt_t uGbtx)
static const uint32_t kuNbFeePerGdpb
Int_t FeeChanToGbtChan(UInt_t uChannelInFee)
static const uint32_t kuNbChannelsPerFee
Readout chain.
static constexpr UInt_t GetNrOfFeePerGdpb()
static const uint32_t kuNbChannelsPerGbtx
static const uint32_t kuNbGbtxPerGdpb
Double_t GetTsDeadtimePeriod()
static constexpr UInt_t GetNrOfGbtxPerGdpb()
Double_t GetMipCalibration(UInt_t i)
static constexpr UInt_t GetNrOfChannelsPerGdpb()
static constexpr UInt_t GetNbByteMessage()
static const uint32_t kuBytesPerMessage
Int_t fiDataVersion
Map from Psd channel to Gbt channel.