CbmRoot
Loading...
Searching...
No Matches
DigiRec.h
Go to the documentation of this file.
1/* Copyright (C) 2018-2020 Horia Hulubei National Institute of Physics and Nuclear Engineering, Bucharest
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci[committer] */
4
5#pragma once
6
7#include "CbmTrdDigi.h"
8#include "compat/RTypes.h"
9
23namespace cbm::algo::trd
24{
25 class DigiRec : public CbmTrdDigi {
26 friend class Cluster2D;
27 friend class HitFinder2D;
28
29 public:
31 DigiRec();
33 DigiRec(const CbmTrdDigi& d, double* g = NULL, double* t = NULL);
35 DigiRec(const CbmTrdDigi& dt, const CbmTrdDigi& dr, double* g = NULL, double* t = NULL);
36
37 virtual ~DigiRec() { ; }
38
41 double GetTiltCharge(bool& on) const { return GetCharge(0, on); }
43 double GetTiltTime() const { return GetTime(0); }
46 double GetRectCharge(bool& on) const { return GetCharge(1, on); }
48 double GetRectTime() const { return GetTime(1); }
53 double GetCharge(int typ, bool& on) const;
57 double GetTime(int typ) const;
58 bool HasRectOvf() const { return TESTBIT(fStatus, 1); }
59 bool HasTiltOvf() const { return TESTBIT(fStatus, 0); }
61 void Init(double g[2], double t[3]);
62
63 static float GetBaselineCorr() { return 4095. * fgBaseline / fgOutGain; }
64
65 private:
66 unsigned char fStatus; //< bit map to store calibration flags
67 double fG[2]; //< FEE gain correction for channel T & R
68 double fT[3]; //< FEE time walk correction as function of charge
69
70 static float fgBaseline;
71 static float fgOutGain;
72 };
73
74} // namespace cbm::algo::trd
Compatibility header for basic ROOT macros.
#define TESTBIT(n, i)
Definition RTypes.h:17
double GetTime() const
Getter for physical time [ns]. Accounts for clock representation of each ASIC. In SPADIC case physica...
Definition CbmTrdDigi.h:153
double GetCharge() const
Common purpose charge getter.
Data Container for TRD clusters.
Definition Cluster2D.h:22
bool HasRectOvf() const
Definition DigiRec.h:58
static float fgOutGain
FASP -> ADC gain [V/4095 ADC].
Definition DigiRec.h:71
double GetTiltCharge(bool &on) const
Return calibrated tilt signal.
Definition DigiRec.h:41
static float fgBaseline
FASP baseline [V].
Definition DigiRec.h:70
double GetTiltTime() const
Return calibrated tilt time [ns].
Definition DigiRec.h:43
DigiRec()
Default constructor.
Definition DigiRec.cxx:17
static float GetBaselineCorr()
Definition DigiRec.h:63
unsigned char fStatus
Definition DigiRec.h:66
bool HasTiltOvf() const
Definition DigiRec.h:59
double GetRectCharge(bool &on) const
Return calibrated rect signal.
Definition DigiRec.h:46
void Init(double g[2], double t[3])
Init FEE gain and time walk corrections.
Definition DigiRec.cxx:116
double GetRectTime() const
Return calibrated rect time [ns].
Definition DigiRec.h:48
Cluster finding and hit reconstruction algorithms for the TRD(2D) module.
Definition HitFinder2D.h:42