11#include <RtypesCore.h>
25#define FASP_WINDOW 200
27#define NGRAPH (NFASPMOD * NFASPCH + 1)
38 virtual void Clear(Option_t* opt =
"");
40 virtual void Draw(Option_t* opt =
"");
46 virtual Bool_t
Go(ULong64_t time);
57 virtual void PhysToRaw(std::vector<std::pair<CbmTrdDigi*, CbmMatch*>>* digi);
59 virtual void Print(Option_t* opt =
"")
const;
96 void ScanDigi(std::vector<std::pair<CbmTrdDigi*, CbmMatch*>>* digi);
98 void ScanDigiNE(std::vector<std::pair<CbmTrdDigi*, CbmMatch*>>* digi);
107 std::vector<std::pair<CbmTrdDigi*, CbmMatch*>>*
fDigi =
nullptr;
113 std::vector<std::tuple<UInt_t, UInt_t, UInt_t, Bool_t>>
fDigiProc =
129 std::vector<Float_t>
fOut = {0.};
130 std::map<int, std::array<int, NFASPCH>>
static Float_t GetBaselineCorr()
Return the baseline value in ADC ch.
void GetShaperSignal(Double_t charge)
Retrive linear interpolation of CADENCE for signal.
int fAsicId[2]
identifier of FASP(s) in module
std::vector< Float_t > fShaperNext
next channel shaper analog
TLine * fGthr
graph representation of various thresholds
static const Int_t fgkNDB
DB shaper size.
Int_t fNphys[2]
number of physical digi in the current [0] and next [1] shaper
Int_t ProcessShaper(Char_t typ='T')
Calculate output FASP signal and CS timming for the signal array stored in fShaper.
UInt_t fProcTime
time window [ns] for actual digi processing (excluded fgkBufferKeep)
static void SetNeighbourTrigger(Bool_t nb=kTRUE)
Set FASP trigger mode.
static Bool_t fgNeighbour
Neighbour enable flag.
void SetProcTime(ULong64_t t=0)
Set limit in time for processing digis.
Int_t fTimeDY
Time decay from FT [5*ns].
static void SetLGminLength(Int_t nclk)
Set linear-gate minimum length.
Int_t fNraw
number of raw digi for the tilt channel
virtual void InitChannel(int id, const CbmTrdParFaspChannel *par, int asicId=-1, int chId=-1)
[Re]Initialize one of the two FASP channels
static const Int_t fgkBufferKeep
length of buffer time in 5ns which is kept between cycles
TGraph * fGraphShp[NGRAPH]
graph representations of FASP shaper
virtual Bool_t Go(ULong64_t time)
Check if there is enough time elapsed from fStartTime to run simulator.
static const Int_t fgkNclkFT
length of flat top in FASP clocks
Float_t fFT
Flat Top value [V].
static Float_t fgShaperThr
shaper threshold [V]
virtual void Clear(Option_t *opt="")
Finalize currently stored data.
void ScanDigi(std::vector< std::pair< CbmTrdDigi *, CbmMatch * > > *digi)
Read digi array for one pair T/R defined by the pad column.
static const Float_t fgkShaperLUT[SHAPER_LUT]
shaper LUT
Double_t MakeOut(Int_t t)
Make convolution of shaper1 superposition and theoretic shaping model (see fgkShaperPar)
TGraph * fGraphPhys[NGRAPH]
graph representations of physics digi
virtual void Print(Option_t *opt="") const
Print-out FASP analog/digital response to currently stored data.
virtual void Draw(Option_t *opt="")
Graphical representation of FASP analog/digital response to currently stored data.
TCanvas * fMonitor
monitor canvas when drawing
static void SetShaperThr(Float_t thr=0.2)
Set threshold for the current channel. CADENCE value.
int fChId[2]
FASP channels being processed.
void WriteDigi()
Write processed digi to output array.
std::vector< bool > fHitThPrev
previous channel hit threshold
static const Float_t fgkShaperPar[4]
shaper parameters
void ScanDigiNE(std::vector< std::pair< CbmTrdDigi *, CbmMatch * > > *digi)
Read digi array for neighbour trigger processing.
CbmTrdFASP(UInt_t uslice=1000)
Constructor of FASP simulator.
std::vector< std::pair< CbmTrdDigi *, CbmMatch * > > * fDigi
link to digi vector to be transformed
static Float_t fgBaseline
FASP baseline [V].
int fPad
current pad as defined by CbmTrdModuleAbstract::GetPadAddress()
virtual void PhysToRaw(std::vector< std::pair< CbmTrdDigi *, CbmMatch * > > *digi)
Convert physics information in digi to the raw format.
Int_t fTimeLG
Linear gate time length [5*ns].
static Float_t fgNeighbourThr
neighbour threshold [V] for fgNeighbour=kTRUE
Float_t fSignal[FASP_WINDOW]
temporary array to store shaper analog signal for current charge interpolation
virtual ULong64_t GetStartTime() const
static Int_t fgNclkLG
length of linear-gate command in FASP clocks
int AddGraph(char typ='T')
std::vector< Float_t > fOut
analog output for the current channel
void SetStartTime(ULong64_t t)
Set buffer time offset [ns].
ULong64_t fStartTime
time offset [ns] for the current simulation
std::vector< Float_t > fShaper
current channel shaper analog
TGraph * fGraph[NGRAPH]
graph representations of analog FASP response
std::map< int, std::array< int, NFASPCH > > fGraphMap
map of ASIC_id and (ch_id, output_id of FASP signals graphs) pairs
static const Float_t fgkShaper[fgkNDB][FASP_WINDOW]
DB shaper signals for each input charge discretization.
int fNgraph
No of graphs generated.
static void SetNeighbourThr(Float_t thr=0.1)
Set threshold for the neighbour channel. CADENCE value.
virtual ULong64_t GetEndTime() const
const CbmTrdParFaspChannel * fPar[2]
current FASP ASIC parametrization
static Float_t fgOutGain
FASP -> ADC gain [V/4095 ADC].
static const Float_t fgkCharge[fgkNDB]
DB input charge discretization.
Int_t fTimeFT
Chip Select time legth [5*ns].
static const Float_t fgkDecayLUT[SHAPER_LUT]
forced discharged of FASP LUT
std::vector< std::tuple< UInt_t, UInt_t, UInt_t, Bool_t > > fDigiProc
proccessed info wrt fStartTime <hit_time[ns], CS_time[ns], OUT[ADC], trigger>
Definition of FASP channel calibration container.