CbmRoot
|
FASP channel simulator. More...
#include <CbmTrdFASP.h>
Public Member Functions | |
CbmTrdFASP (UInt_t uslice=1000) | |
Constructor of FASP simulator. More... | |
virtual | ~CbmTrdFASP () |
virtual void | Clear (Option_t *opt="") |
Finalize currently stored data. More... | |
virtual void | Draw (Option_t *opt="") |
Graphical representation of FASP analog/digital response to currently stored data. More... | |
virtual ULong64_t | GetEndTime () const |
virtual ULong64_t | GetStartTime () const |
virtual Bool_t | Go (ULong64_t time) |
Check if there is enough time elapsed from fStartTime to run simulator. More... | |
virtual void | Init (Int_t col, CbmTrdParFaspChannel *par) |
[Re]Start processing of one channel More... | |
virtual void | PhysToRaw (std::vector< std::pair< CbmTrdDigi *, CbmMatch * >> *digi, Int_t col=0, Int_t row=0) |
Convert physics information in digi to the raw format. More... | |
virtual void | Print (Option_t *opt="") const |
Print-out FASP analog/digital response to currently stored data. More... | |
void | SetCol (Int_t col) |
Set column for the current channel. More... | |
void | SetProcTime (ULong64_t t=0) |
Set limit in time for processing digis. More... | |
void | SetStartTime (ULong64_t t) |
Set buffer time offset [ns]. More... | |
Static Public Member Functions | |
static Float_t | GetBaselineCorr () |
Return the baseline value in ADC ch. More... | |
static void | SetLGminLength (Int_t nclk) |
Set linear-gate minimum length. More... | |
static void | SetNeighbourTrigger (Bool_t nb=kTRUE) |
Set FASP trigger mode. More... | |
static void | SetNeighbourThr (Float_t thr=0.1) |
Set threshold for the neighbour channel. CADENCE value. More... | |
static void | SetShaperThr (Float_t thr=0.2) |
Set threshold for the current channel. CADENCE value. More... | |
Protected Member Functions | |
void | GetShaperSignal (Double_t charge) |
Retrive linear interpolation of CADENCE for signal. More... | |
Double_t | MakeOut (Int_t t) |
Make convolution of shaper1 superposition and theoretic shaping model (see fgkShaperPar) More... | |
Int_t | ProcessShaper (Char_t typ='T') |
Calculate output FASP signal and CS timming for the signal array stored in fShaper. More... | |
void | ScanDigi (std::vector< std::pair< CbmTrdDigi *, CbmMatch * >> *digi, Int_t col, Int_t row) |
Read digi array for single channel processing. More... | |
void | ScanDigiNE (std::vector< std::pair< CbmTrdDigi *, CbmMatch * >> *digi, Int_t col, Int_t row) |
Read digi array for neighbour trigger processing. More... | |
void | WriteDigi () |
Write processed digi to output array. More... | |
Protected Attributes | |
ULong64_t | fStartTime |
time offset [ns] for the current simulation More... | |
UInt_t | fProcTime |
time window [ns] for actual digi processing (excluded fgkBufferKeep) More... | |
Int_t | fCol |
current column More... | |
Int_t | fRow |
current row More... | |
Int_t | fAsicId |
identifier of FASP in module More... | |
Int_t | fNphys [2] |
number of physical digi in the current [0] and next [1] shaper More... | |
Int_t | fNraw |
number of raw digi for the tilt channel More... | |
std::vector< std::pair< CbmTrdDigi *, CbmMatch * > > * | fDigi |
link to digi vector to be transformed More... | |
std::vector< bool > | fHitThPrev |
previous channel hit threshold More... | |
std::vector< Float_t > | fShaper |
current channel shaper analog More... | |
std::vector< Float_t > | fShaperNext |
next channel shaper analog More... | |
std::vector< std::tuple< UInt_t, UInt_t, UInt_t, Bool_t > > | fDigiProc |
proccessed info <hit_time[ns], CS_time[ns], OUT[ADC], trigger> More... | |
Float_t | fSignal [FASP_WINDOW] |
temporary array to store shaper analog signal for current charge interpolation More... | |
CbmTrdParFaspChannel * | fPar |
current FASP channel parametrization More... | |
Int_t | fTimeLG |
Linear gate time length [5*ns]. More... | |
Int_t | fTimeFT |
Chip Select time legth [5*ns]. More... | |
Int_t | fTimeDY |
Time decay from FT [5*ns]. More... | |
Float_t | fFT |
Flat Top value [V]. More... | |
Int_t | fGraphId |
current graph to be filled if draw support is compiled More... | |
std::vector< Float_t > | fOut |
analog output for the current channel More... | |
std::vector< std::pair< Int_t, Int_t > > | fGraphMap |
map of ASIC id and output FASP signals More... | |
TGraph * | fGraph [NGRAPH] |
graph representations of analog FASP response More... | |
TGraph * | fGraphShp [NGRAPH] |
graph representations of FASP shaper More... | |
TGraph * | fGraphPhys [NGRAPH] |
graph representations of physics digi More... | |
TLine * | fGthr |
graph representation of various thresholds More... | |
TCanvas * | fMonitor |
monitor canvas when drawing More... | |
Static Protected Attributes | |
static const Int_t | fgkNDB = 53 |
DB shaper size. More... | |
static const Float_t | fgkCharge [fgkNDB] |
DB input charge discretization. More... | |
static const Float_t | fgkShaper [fgkNDB][FASP_WINDOW] |
DB shaper signals for each input charge discretization. More... | |
static const Float_t | fgkShaperPar [4] = {0.068, 26.1, 2.61, 50} |
shaper parameters More... | |
static const Float_t | fgkShaperLUT [SHAPER_LUT] |
shaper LUT More... | |
static const Float_t | fgkDecayLUT [SHAPER_LUT] |
forced discharged of FASP LUT More... | |
static const Int_t | fgkNclkFT = 14 |
length of flat top in FASP clocks More... | |
static Int_t | fgNclkLG = 31 |
length of linear-gate command in FASP clocks More... | |
static Bool_t | fgNeighbour = kTRUE |
Neighbour enable flag. More... | |
static Float_t | fgNeighbourThr = 0.04 |
neighbour threshold [V] for fgNeighbour=kTRUE More... | |
static Float_t | fgShaperThr = 0.05 |
shaper threshold [V] More... | |
static Float_t | fgBaseline = 0.25 |
FASP baseline [V]. More... | |
static Float_t | fgOutGain = 2.025 |
FASP -> ADC gain [V/4095 ADC]. More... | |
static const Int_t | fgkBufferKeep = 400 |
length of buffer time in 5ns which is kept between cycles More... | |
FASP channel simulator.
Definition at line 24 of file CbmTrdFASP.h.
CbmTrdFASP::CbmTrdFASP | ( | UInt_t | uslice = 1000 | ) |
Constructor of FASP simulator.
[in] | uslice | length of microslice [ns] |
Build the FASP simulator for a microslice of 5*uslice [ns]
Definition at line 40 of file CbmTrdFASP.cxx.
References DRAW, fgkBufferKeep, fGraph, fGraphPhys, fGraphShp, fHitThPrev, fNphys, fOut, fShaper, fShaperNext, memset(), NGRAPH, and SetProcTime().
|
virtual |
Definition at line 84 of file CbmTrdFASP.cxx.
References DRAW, fGraph, fGraphPhys, fGraphShp, fMonitor, NGRAPH, and VERBOSE.
|
virtual |
Finalize currently stored data.
Definition at line 97 of file CbmTrdFASP.cxx.
References Draw(), fHitThPrev, fNphys, ProcessShaper(), and WriteDigi().
Referenced by CbmTrdModuleSimT::FlushBuffer(), and ScanDigiNE().
|
virtual |
Graphical representation of FASP analog/digital response to currently stored data.
Definition at line 109 of file CbmTrdFASP.cxx.
References buffer, DRAW, fgNeighbourThr, fGraph, fGraphId, fGraphMap, fGraphPhys, fGraphShp, fgShaperThr, fGthr, first, fMonitor, fOut, and NGRAPH.
Referenced by Clear().
|
inlinestatic |
Return the baseline value in ADC ch.
Definition at line 38 of file CbmTrdFASP.h.
References fgBaseline, and fgOutGain.
Referenced by CbmTrdModuleRecT::LoadDigis().
|
inlinevirtual |
Definition at line 35 of file CbmTrdFASP.h.
References fProcTime, and fStartTime.
Referenced by CbmTrdModuleSimT::FlushBuffer().
|
protected |
Retrive linear interpolation of CADENCE for signal.
[in] | charge | charge on channel |
Retrive linear interpolation of CADENCE simulations around the input charge and store them in the fSignal array for further processing
Definition at line 228 of file CbmTrdFASP.cxx.
References FASP_WINDOW, fgkCharge, fgkNDB, fgkShaper, fSignal, and VERBOSE.
Referenced by ScanDigi(), and ScanDigiNE().
|
inlinevirtual |
Definition at line 36 of file CbmTrdFASP.h.
References fStartTime.
Referenced by CbmTrdModuleSimT::FlushBuffer().
|
virtual |
Check if there is enough time elapsed from fStartTime to run simulator.
Start FASP simulator if at least the fProcTime has elapsed from buffer start time. time - event time in ns
Definition at line 206 of file CbmTrdFASP.cxx.
References fProcTime, and fStartTime.
Referenced by CbmTrdModuleSimT::FlushBuffer().
|
virtual |
[Re]Start processing of one channel
[in] | col | current column |
[in] | par | FASP channel parametrization |
Definition at line 268 of file CbmTrdFASP.cxx.
|
protected |
Make convolution of shaper1 superposition and theoretic shaping model (see fgkShaperPar)
Definition at line 271 of file CbmTrdFASP.cxx.
References fFT, fgkDecayLUT, fgkShaperLUT, fShaper, fTimeDY, fTimeFT, i, and SHAPER_LUT.
Referenced by ProcessShaper().
|
virtual |
Convert physics information in digi to the raw format.
[in] | digi | list of digits for the current channel |
[in] | col | column of current digis |
[in] | row | row of current digis |
Public interface for converting physical digi to raw digi. See ScanDigi and ScanDigiNE for the actual algorithms
Definition at line 296 of file CbmTrdFASP.cxx.
References fgNeighbour, ScanDigi(), and ScanDigiNE().
Referenced by CbmTrdModuleSimT::FlushBuffer().
|
virtual |
Print-out FASP analog/digital response to currently stored data.
Dump settings for the FASP simulator and optionally the content of the current buffers.
Definition at line 310 of file CbmTrdFASP.cxx.
References CbmTrdDigi::Clk(), fCol, fgkNclkFT, fgNclkLG, fgNeighbour, fgNeighbourThr, fgShaperThr, fShaper, fShaperNext, and CbmTrdDigi::kFASP.
|
protected |
Calculate output FASP signal and CS timming for the signal array stored in fShaper.
Simulate the logic block of the FASP ASIC and apply shapper forming time (see MakeOut()). Calculate the following logic signals:
Optionally the analog input and output for the current channel are also saved if DRAW is defined.
Definition at line 341 of file CbmTrdFASP.cxx.
References CbmTrdDigi::Clk(), DRAW, fAsicId, fCol, fDigiProc, fFT, fgBaseline, fgkNclkFT, fgNclkLG, fgNeighbour, fgNeighbourThr, fgOutGain, fGraph, fGraphId, fGraphMap, fGraphShp, fgShaperThr, fHitThPrev, fNphys, fOut, fRow, fShaper, fShaperNext, fStartTime, fTimeDY, fTimeFT, fTimeLG, i, CbmTrdDigi::kFASP, MakeOut(), max(), memset(), NGRAPH, SHAPER_LUT, and VERBOSE.
Referenced by Clear(), ScanDigi(), and ScanDigiNE().
|
protected |
Read digi array for single channel processing.
Transform point like time distribution of digis into the time dependent analog signal of the first FASP shaper
Definition at line 528 of file CbmTrdFASP.cxx.
References DRAW, fAsicId, FASP_WINDOW, fCol, fDigi, fGraphId, fGraphPhys, fNphys, fNraw, fOut, fRow, fShaper, fShaperNext, fSignal, fStartTime, CbmTrdDigi::GetCharge(), GetShaperSignal(), CbmTrdDigi::GetTimeDAQ(), memset(), ProcessShaper(), VERBOSE, and WriteDigi().
Referenced by PhysToRaw().
|
protected |
Read digi array for neighbour trigger processing.
Transform point like time distribution of digis into the time dependent analog signal of the first FASP shaper and process output (see ProcessShaper())
Definition at line 612 of file CbmTrdFASP.cxx.
References Clear(), DRAW, fAsicId, FASP_WINDOW, fCol, fDigi, fGraphId, fGraphPhys, fNphys, fNraw, fOut, fRow, fShaper, fShaperNext, fSignal, fStartTime, CbmTrdDigi::GetCharge(), GetShaperSignal(), CbmTrdDigi::GetTimeDAQ(), memset(), ProcessShaper(), VERBOSE, and WriteDigi().
Referenced by PhysToRaw().
|
inline |
Set column for the current channel.
[in] | col | column number in the current row. Default -1 for the first data |
Definition at line 59 of file CbmTrdFASP.h.
References fCol.
|
inlinestatic |
Set linear-gate minimum length.
[in] | nclk | number of clock cycles at current clock frequency |
Definition at line 63 of file CbmTrdFASP.h.
References fgNclkLG.
Referenced by CbmTrdModuleSimT::FlushBuffer().
|
inlinestatic |
Set threshold for the neighbour channel. CADENCE value.
[in] | thr | Threshold value [V] - default 100 mV |
Definition at line 71 of file CbmTrdFASP.h.
References fgNeighbourThr.
|
inlinestatic |
Set FASP trigger mode.
[in] | nb | Enable trigger for neighbor channels [default = on] |
Definition at line 67 of file CbmTrdFASP.h.
References fgNeighbour.
Referenced by CbmTrdModuleSimT::FlushBuffer().
void CbmTrdFASP::SetProcTime | ( | ULong64_t | t = 0 | ) |
Set limit in time for processing digis.
Definition at line 798 of file CbmTrdFASP.cxx.
References fgkBufferKeep, fProcTime, fShaper, and fStartTime.
Referenced by CbmTrdFASP(), and CbmTrdModuleSimT::FlushBuffer().
|
inlinestatic |
Set threshold for the current channel. CADENCE value.
[in] | thr | Threshold value [V] - default 200 mV |
Definition at line 75 of file CbmTrdFASP.h.
References fgShaperThr.
|
inline |
Set buffer time offset [ns].
Definition at line 79 of file CbmTrdFASP.h.
References fStartTime.
Referenced by CbmTrdModuleSimT::FlushBuffer().
|
protected |
Write processed digi to output array.
Definition at line 807 of file CbmTrdFASP.cxx.
References CbmTrdDigi::Clk(), fDigi, fDigiProc, fNraw, fProcTime, fStartTime, CbmTrdDigi::GetCharge(), CbmTrdDigi::GetTime(), CbmTrdDigi::GetTimeDAQ(), CbmTrdDigi::GetTriggerType(), CbmTrdDigi::IsFlagged(), CbmTrdDigi::kFASP, CbmTrdDigi::SetFlag(), CbmMatch::ToString(), CbmTrdDigi::ToString(), and VERBOSE.
Referenced by Clear(), ScanDigi(), and ScanDigiNE().
|
protected |
identifier of FASP in module
Definition at line 108 of file CbmTrdFASP.h.
Referenced by ProcessShaper(), ScanDigi(), and ScanDigiNE().
|
protected |
current column
Definition at line 106 of file CbmTrdFASP.h.
Referenced by Print(), ProcessShaper(), ScanDigi(), ScanDigiNE(), and SetCol().
|
protected |
link to digi vector to be transformed
Definition at line 113 of file CbmTrdFASP.h.
Referenced by ScanDigi(), ScanDigiNE(), and WriteDigi().
|
protected |
proccessed info <hit_time[ns], CS_time[ns], OUT[ADC], trigger>
Definition at line 120 of file CbmTrdFASP.h.
Referenced by ProcessShaper(), and WriteDigi().
|
protected |
Flat Top value [V].
Definition at line 129 of file CbmTrdFASP.h.
Referenced by MakeOut(), and ProcessShaper().
|
staticprotected |
FASP baseline [V].
Definition at line 160 of file CbmTrdFASP.h.
Referenced by GetBaselineCorr(), and ProcessShaper().
|
staticprotected |
length of buffer time in 5ns which is kept between cycles
Definition at line 165 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), and SetProcTime().
|
staticprotected |
DB input charge discretization.
Definition at line 144 of file CbmTrdFASP.h.
Referenced by GetShaperSignal().
|
staticprotected |
forced discharged of FASP LUT
Definition at line 151 of file CbmTrdFASP.h.
Referenced by MakeOut().
|
staticprotected |
length of flat top in FASP clocks
Definition at line 154 of file CbmTrdFASP.h.
Referenced by Print(), and ProcessShaper().
|
staticprotected |
|
staticprotected |
DB shaper signals for each input charge discretization.
Definition at line 145 of file CbmTrdFASP.h.
Referenced by GetShaperSignal().
|
staticprotected |
shaper LUT
Definition at line 149 of file CbmTrdFASP.h.
Referenced by MakeOut().
|
staticprotected |
shaper parameters
Definition at line 148 of file CbmTrdFASP.h.
|
staticprotected |
length of linear-gate command in FASP clocks
Definition at line 155 of file CbmTrdFASP.h.
Referenced by Print(), ProcessShaper(), and SetLGminLength().
|
staticprotected |
Neighbour enable flag.
Definition at line 156 of file CbmTrdFASP.h.
Referenced by PhysToRaw(), Print(), ProcessShaper(), and SetNeighbourTrigger().
|
staticprotected |
neighbour threshold [V] for fgNeighbour=kTRUE
Definition at line 158 of file CbmTrdFASP.h.
Referenced by Draw(), Print(), ProcessShaper(), and SetNeighbourThr().
|
staticprotected |
FASP -> ADC gain [V/4095 ADC].
Definition at line 161 of file CbmTrdFASP.h.
Referenced by GetBaselineCorr(), and ProcessShaper().
|
protected |
graph representations of analog FASP response
Definition at line 136 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), Draw(), ProcessShaper(), and ~CbmTrdFASP().
|
protected |
current graph to be filled if draw support is compiled
Definition at line 132 of file CbmTrdFASP.h.
Referenced by Draw(), ProcessShaper(), ScanDigi(), and ScanDigiNE().
|
protected |
map of ASIC id and output FASP signals
Definition at line 135 of file CbmTrdFASP.h.
Referenced by Draw(), and ProcessShaper().
|
protected |
graph representations of physics digi
Definition at line 138 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), Draw(), ScanDigi(), ScanDigiNE(), and ~CbmTrdFASP().
|
protected |
graph representations of FASP shaper
Definition at line 137 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), Draw(), ProcessShaper(), and ~CbmTrdFASP().
|
staticprotected |
shaper threshold [V]
Definition at line 159 of file CbmTrdFASP.h.
Referenced by Draw(), Print(), ProcessShaper(), and SetShaperThr().
|
protected |
graph representation of various thresholds
Definition at line 139 of file CbmTrdFASP.h.
Referenced by Draw().
|
protected |
previous channel hit threshold
Definition at line 116 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), Clear(), and ProcessShaper().
|
protected |
monitor canvas when drawing
Definition at line 140 of file CbmTrdFASP.h.
Referenced by Draw(), and ~CbmTrdFASP().
|
protected |
number of physical digi in the current [0] and next [1] shaper
Definition at line 109 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), Clear(), ProcessShaper(), ScanDigi(), and ScanDigiNE().
|
protected |
number of raw digi for the tilt channel
Definition at line 111 of file CbmTrdFASP.h.
Referenced by ScanDigi(), ScanDigiNE(), and WriteDigi().
|
protected |
analog output for the current channel
Definition at line 133 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), Draw(), ProcessShaper(), ScanDigi(), and ScanDigiNE().
|
protected |
current FASP channel parametrization
Definition at line 125 of file CbmTrdFASP.h.
|
protected |
time window [ns] for actual digi processing (excluded fgkBufferKeep)
Definition at line 105 of file CbmTrdFASP.h.
Referenced by GetEndTime(), Go(), SetProcTime(), and WriteDigi().
|
protected |
current row
Definition at line 107 of file CbmTrdFASP.h.
Referenced by ProcessShaper(), ScanDigi(), and ScanDigiNE().
|
protected |
current channel shaper analog
Definition at line 117 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), MakeOut(), Print(), ProcessShaper(), ScanDigi(), ScanDigiNE(), and SetProcTime().
|
protected |
next channel shaper analog
Definition at line 118 of file CbmTrdFASP.h.
Referenced by CbmTrdFASP(), Print(), ProcessShaper(), ScanDigi(), and ScanDigiNE().
|
protected |
temporary array to store shaper analog signal for current charge interpolation
Definition at line 121 of file CbmTrdFASP.h.
Referenced by GetShaperSignal(), ScanDigi(), and ScanDigiNE().
|
protected |
time offset [ns] for the current simulation
Definition at line 103 of file CbmTrdFASP.h.
Referenced by GetEndTime(), GetStartTime(), Go(), ProcessShaper(), ScanDigi(), ScanDigiNE(), SetProcTime(), SetStartTime(), and WriteDigi().
|
protected |
Time decay from FT [5*ns].
Definition at line 128 of file CbmTrdFASP.h.
Referenced by MakeOut(), and ProcessShaper().
|
protected |
Chip Select time legth [5*ns].
Definition at line 127 of file CbmTrdFASP.h.
Referenced by MakeOut(), and ProcessShaper().
|
protected |
Linear gate time length [5*ns].
Definition at line 126 of file CbmTrdFASP.h.
Referenced by ProcessShaper().