Go to the documentation of this file.
5 #include <FairLogger.h>
15 using std::stringstream;
36 : fInfo(0), fCharge(0.), fTime(time) {
59 : fInfo(0), fCharge(0.), fTime(time) {
82 <<
"CbmTrdDigi::AddCharge(CbmTrdDigi*, Double_t) : Only available for "
83 "FASP. Use AddCharge(Double_t, Double_t) instead.";
111 LOG(warn) <<
"CbmTrdDigi::AddCharge(Double_t, Double_t) : Only available "
112 "for SPADIC. Use AddCharge(CbmTrdDigi*, Double_t) instead.";
135 LOG(warn) <<
"CbmTrdDigi::GetCharge() : Use Double_t GetCharge(Double_t "
151 LOG(warn) <<
"CbmTrdDigi::GetCharge(Double_t &) : Use Double_t GetCharge() "
166 if (iflag < 0 || iflag >=
kNflags)
return kFALSE;
199 if (r > 0xfff) r = 0xfff;
200 if (t > 0xfff) t = 0xfff;
216 if (iflag < 0 || iflag >=
kNflags)
return;
238 if (ttype < kBeginTriggerTypes || ttype >=
kNTrg)
return;
245 ss <<
"CbmTrdDigi(" << (
GetType() ==
kFASP ?
"T)" :
"R)")
248 <<
" | time[ns]=" << std::fixed << std::setprecision(1) <<
GetTime();
252 Bool_t ttrg(trg & 1), rtrg((trg & 2) >> 1);
253 ss <<
" | pu=" << (
IsPileUp() ?
"y" :
"n")
254 <<
" | mask=" << (
IsMasked() ?
"y" :
"n") <<
" |charge=" << std::fixed
255 << std::setw(6) << std::setprecision(1) << t
256 << (!ttrg && t > 0 ?
'*' :
' ') <<
"/" << r
257 << (!rtrg && r > 0 ?
'*' :
' ') <<
"[" << dt <<
"]";
Double_t GetChargeError() const
Charge error parametrisation. SPADIC specific see GetErrorClass()
Bool_t IsPileUp() const
Query digi pile-up (FASP only)
static UInt_t GetAddress(Int_t layerId, Int_t moduleId, Int_t sectorId, Int_t rowId, Int_t columnId)
Return address from system ID, layer, module, sector, column and row IDs.
Helper class to convert unique channel ID back and forth.
void SetTimeOffset(Char_t t)
Set time offset of rectangular to tilt pads for FASP (clk)
Bool_t IsFlagged(const Int_t iflag) const
Query flag status (generic)
Int_t GetErrorClass() const
Channel status. SPADIC specific see LUT.
static Double_t fgClk[kNTypes]
void SetCharge(Float_t c)
Charge setter for SPADIC ASIC.
static const Int_t fgkRoOffset
Int_t GetAddressChannel() const
Getter read-out id.
void SetFlag(const Int_t iflag, Bool_t set=kTRUE)
Generic flag status setter.
static UInt_t GetLayerId(UInt_t address)
Return layer ID from address.
static UInt_t GetModuleId(UInt_t address)
Return module ID from address.
void AddCharge(CbmTrdDigi *sd, Double_t f)
Charge addition in case of pile-up (FASP simulation only)
void SetLayer(const Int_t a)
void SetAddress(const Int_t a)
Module address setter for digi.
static const Int_t fgkFlgOffset
static Float_t fgPrecission[kNTypes]
CbmTrdDigi()
Default constructor.
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Bool_t IsMasked() const
Query digi mask (FASP only)
CbmTrdAsicType GetType() const
Channel FEE SPADIC/FASP according to CbmTrdAsicType.
static const Int_t fgkTrgOffset
void SetTriggerType(const Int_t ttype)
Set digi trigger type (SPADIC only)
Int_t GetTriggerType() const
Channel trigger type. SPADIC specific see CbmTrdTriggerType.
Double_t GetTime() const
Getter for physical time [ns]. Accounts for clock representation of each ASIC. In SPADIC case physica...
static const Int_t fgkTypOffset
void SetModule(const Int_t a)
void SetAsic(CbmTrdAsicType ty=kSPADIC)
void SetTime(Double_t t)
Set global digi time (ns)
void SetChannel(const Int_t a)
Double_t GetCharge() const
Charge getter for SPADIC.
void SetErrorClass(const Int_t n)
Set digi error class (SPADIC only)
Int_t GetAddressModule() const
Getter module address in the experiment.
std::string ToString() const
String representation of a TRD digi. Account for digi type and specific information.