CbmRoot
CbmTrdParFasp.h
Go to the documentation of this file.
1 #ifndef CBMTRDPARFASP_H
2 #define CBMTRDPARFASP_H
3 
4 #define NFASPCH 16
5 
6 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef, TESTBIT
7 #include <RtypesCore.h> // for Int_t, Double_t, Bool_t, Float_t, UChar_t
8 #include <TObject.h> // for TObject
9 
10 #include <vector> // for vector
11 
12 #include "CbmTrdParAsic.h" // for CbmTrdParAsic
13 
14 class FairParamList;
15 class TArrayI;
16 
18 class CbmTrdParFaspChannel : public TObject {
19  friend class CbmTrdParFasp;
20 
21 public:
23  kPair = 0 //< pad pairing type definition see SetPairing()
24  };
28  CbmTrdParFaspChannel(Int_t pup = 300,
29  Int_t ft = 14,
30  Int_t thr = 600,
31  Int_t smin = 2586,
32  Float_t dtPar = 4.181e-6);
33 
34  Int_t GetFlatTop() const { return fFlatTop; }
35  Int_t GetMinDelaySignal() const { return fMinDelaySignal; }
36  Float_t GetMinDelayParam() const { return fMinDelayParam; }
37  Int_t GetPileUpTime() const { return fPileUpTime; }
38  Int_t GetThreshold() const { return fThreshold; }
39 
43  Bool_t HasPairing(Bool_t rect) const {
44  return (rect && TESTBIT(fConfig, kPair))
45  || (!rect && !TESTBIT(fConfig, kPair));
46  }
47  void Print(Option_t* opt = "") const;
51  void SetPairing(Bool_t rect) {
52  rect ? SETBIT(fConfig, kPair) : CLRBIT(fConfig, kPair);
53  }
54 
55 protected:
56  UShort_t fPileUpTime;
57  UChar_t fFlatTop;
58  UChar_t fConfig;
59 
60  // threshold
61  UShort_t fThreshold;
62 
63  // timming
64  UShort_t
66  Float_t
68 
69  ClassDef(CbmTrdParFaspChannel,
70  1) // Definition of FASP channel calibration container
71 };
72 
74 class CbmTrdParFasp : public CbmTrdParAsic {
75 public:
76  CbmTrdParFasp(Int_t address = 0,
77  Int_t FebGrouping = -1,
78  Double_t x = 0,
79  Double_t y = 0,
80  Double_t z = 0);
81  virtual ~CbmTrdParFasp() { ; }
82  const CbmTrdParFaspChannel* GetChannel(Int_t pad_address, UChar_t pair) const;
83  virtual Int_t GetNchannels() const { return NFASPCH; };
84 
85  Int_t GetChannelAddress(Int_t ich) const {
86  return ((ich < 0 || ich >= GetNchannels()) ? 0
87  : 0.5 * fChannelAddresses[ich]);
88  }
89  Double_t GetSizeX() const { return fgSizeX; }
90  Double_t GetSizeY() const { return fgSizeY; }
91  Double_t GetSizeZ() const { return fgSizeZ; }
92  virtual void LoadParams(FairParamList* l);
93  void LoadParams(TArrayI&, Int_t);
94  virtual void Print(Option_t* opt = "") const;
99  virtual Bool_t SetCalibParameters(Int_t ch, Double_t const* par);
100 
101 private:
102  static Double_t fgSizeX;
103  static Double_t fgSizeY;
104  static Double_t fgSizeZ;
105 
107 
108  ClassDef(CbmTrdParFasp, 1) // Definition of FASP ASIC parameters
109 };
110 
111 #endif
CbmTrdParFasp::fgSizeX
static Double_t fgSizeX
FASP half size in x [cm].
Definition: CbmTrdParFasp.h:102
CbmTrdParFaspChannel::GetThreshold
Int_t GetThreshold() const
Definition: CbmTrdParFasp.h:38
CbmTrdParAsic
Definition of ASIC parameters.
Definition: CbmTrdParAsic.h:15
CbmTrdParFaspChannel::GetMinDelayParam
Float_t GetMinDelayParam() const
Definition: CbmTrdParFasp.h:36
CbmTrdParFasp::Print
virtual void Print(Option_t *opt="") const
Definition: CbmTrdParFasp.cxx:100
NFASPCH
#define NFASPCH
Definition: CbmTrdParFasp.h:4
CbmTrdParFaspChannel::HasPairing
Bool_t HasPairing(Bool_t rect) const
Query pad pairing type.
Definition: CbmTrdParFasp.h:43
CbmTrdParFasp::fCalib
CbmTrdParFaspChannel fCalib[NFASPCH]
calibration map for FASP channels
Definition: CbmTrdParFasp.h:106
CbmTrdParFasp::GetChannel
const CbmTrdParFaspChannel * GetChannel(Int_t pad_address, UChar_t pair) const
Definition: CbmTrdParFasp.cxx:27
CbmTrdParFasp::GetSizeZ
Double_t GetSizeZ() const
Definition: CbmTrdParFasp.h:91
CbmTrdParFaspChannel::kPair
@ kPair
Definition: CbmTrdParFasp.h:23
CbmTrdParFaspChannel
Definition of FASP channel calibration container.
Definition: CbmTrdParFasp.h:18
CbmTrdParFaspChannel::Print
void Print(Option_t *opt="") const
Definition: CbmTrdParFasp.cxx:126
CbmTrdParAsic.h
CbmTrdParFasp::LoadParams
virtual void LoadParams(FairParamList *l)
Definition: CbmTrdParFasp.cxx:35
CbmTrdParFaspChannel::fFlatTop
UChar_t fFlatTop
Length of Flat-Top in clocks.
Definition: CbmTrdParFasp.h:57
CbmTrdParFaspChannel::CbmTrdParFaspChannelDef
CbmTrdParFaspChannelDef
Definition: CbmTrdParFasp.h:22
CbmTrdParFaspChannel::fThreshold
UShort_t fThreshold
Threshold in ADC units.
Definition: CbmTrdParFasp.h:61
CbmTrdParFaspChannel::CbmTrdParFaspChannel
CbmTrdParFaspChannel(Int_t pup=300, Int_t ft=14, Int_t thr=600, Int_t smin=2586, Float_t dtPar=4.181e-6)
Parametrization of a FASP channel based on CADENCE simulations from 12.01.2018 and parabolic parametr...
Definition: CbmTrdParFasp.cxx:112
CbmTrdParFaspChannel::fMinDelayParam
Float_t fMinDelayParam
Factor of parabolic dependence dt=fdt*(s-s0)^2 to calculate trigger.
Definition: CbmTrdParFasp.h:67
CbmTrdParFaspChannel::fConfig
UChar_t fConfig
configuration bit map
Definition: CbmTrdParFasp.h:58
CbmTrdParFasp::GetSizeY
Double_t GetSizeY() const
Definition: CbmTrdParFasp.h:90
CbmTrdParAsic::fChannelAddresses
std::vector< Int_t > fChannelAddresses
addresses of individual output channels
Definition: CbmTrdParAsic.h:77
CbmTrdParFasp::fgSizeY
static Double_t fgSizeY
FASP half size in y [cm].
Definition: CbmTrdParFasp.h:103
CbmTrdParFasp::fgSizeZ
static Double_t fgSizeZ
FASP half size in z [cm].
Definition: CbmTrdParFasp.h:104
CbmTrdParFaspChannel::fMinDelaySignal
UShort_t fMinDelaySignal
Signal in ADC for minimum delay i.e. fPileUpTime.
Definition: CbmTrdParFasp.h:65
CbmTrdParFasp
Definition of FASP parameters.
Definition: CbmTrdParFasp.h:74
CbmTrdParFaspChannel::GetPileUpTime
Int_t GetPileUpTime() const
Definition: CbmTrdParFasp.h:37
CbmTrdParFaspChannel::fPileUpTime
UShort_t fPileUpTime
Signal formation time in ns.
Definition: CbmTrdParFasp.h:56
CbmTrdParFaspChannel::SetPairing
void SetPairing(Bool_t rect)
Specify pad pairing type.
Definition: CbmTrdParFasp.h:51
CbmTrdParFasp::GetChannelAddress
Int_t GetChannelAddress(Int_t ich) const
Definition: CbmTrdParFasp.h:85
CbmTrdParFaspChannel::GetFlatTop
Int_t GetFlatTop() const
Definition: CbmTrdParFasp.h:34
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTrdParFasp::GetNchannels
virtual Int_t GetNchannels() const
Definition: CbmTrdParFasp.h:83
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmTrdParFasp::GetSizeX
Double_t GetSizeX() const
Definition: CbmTrdParFasp.h:89
CbmTrdParFasp::CbmTrdParFasp
CbmTrdParFasp(Int_t address=0, Int_t FebGrouping=-1, Double_t x=0, Double_t y=0, Double_t z=0)
Definition: CbmTrdParFasp.cxx:16
CbmTrdParFasp::~CbmTrdParFasp
virtual ~CbmTrdParFasp()
Definition: CbmTrdParFasp.h:81
CbmTrdParFasp::SetCalibParameters
virtual Bool_t SetCalibParameters(Int_t ch, Double_t const *par)
Load FASP calibration parameters for a specific channel.
Definition: CbmTrdParFasp.cxx:77
CbmTrdParFaspChannel::GetMinDelaySignal
Int_t GetMinDelaySignal() const
Definition: CbmTrdParFasp.h:35