CbmRoot
Loading...
Searching...
No Matches
CbmTofDigitize Class Reference

CBM ToF digitizer using beam data distributions as hit/cluster models. More...

#include <CbmTofDigitize.h>

Inheritance diagram for CbmTofDigitize:
[legend]
Collaboration diagram for CbmTofDigitize:
[legend]

Public Types

typedef std::pair< std::unique_ptr< CbmTofDigi >, std::unique_ptr< CbmMatch > > Data
 Short for data to be handled (pair of digi and match)
 

Public Member Functions

 CbmTofDigitize ()
 Constructor.
 
 CbmTofDigitize (const char *name, Int_t verbose=1)
 Constructor.
 
virtual ~CbmTofDigitize ()
 Destructor.
 
ECbmModuleId GetSystemId () const
 Detector system ID.
 
virtual InitStatus Init ()
 Inherited from FairTask.
 
virtual void SetParContainers ()
 Inherited from FairTask.
 
virtual void Exec (Option_t *option)
 Inherited from FairTask.
 
virtual void Finish ()
 Inherited from FairTask.
 
void SetInputFileName (TString FileName)
 
Bool_t SetHistoFileName (TString sFilenameIn="./tofDigiBdf.hst.root")
 
void SetMonitorHistograms (Bool_t bMonitor=kTRUE)
 
void UseMcTrackMonitoring (Bool_t bMcTrkMonitor=kTRUE)
 
void AllowPointsWithoutTrack (Bool_t bAllow=kTRUE)
 
void SetDigiTimeConvFactor (Double_t dfac)
 
Bool_t CheckOutput ()
 Check the output for being time-sorted.
 
Double_t GetLatency () const
 Return the detector specific latency @value latency.
 
void ClearOutput ()
 Clear the output arrays.
 
ULong64_t FillTimeSlice (CbmTimeSlice *timeSlice)
 Move data from the DaqBuffer into the current time slice.
 
ULong64_t FillTimeSlice (CbmTimeSlice *timeSlice, Double_t fillTime)
 Move data from the DaqBuffer into the current time slice.
 
ULong64_t GetDaqBufferSize () const
 Size of DAQ buffer @value Number of data in the DAQ buffer.
 
std::string GetDaqBufferStatus () const
 Debug output of DAQ buffer status @value String with status of DAQ buffer.
 
Double_t GetDaqBufferTimeFirst () const
 Time stamp of first data in the DAQ buffer @value Time stamp of first data in the DAQ buffer.
 
Double_t GetDaqBufferTimeLast () const
 Time stamp of last data in the DAQ buffer @value Time stamp of last data in the DAQ buffer.
 
void RegisterOutput ()
 Register the output arrays.
 
void SendData (Double_t time, CbmTofDigi *digi, CbmMatch *match=nullptr)
 Send a digi and the corresponding match object to the DAQ.
 
virtual void FillCustomData (Double_t, Bool_t=kTRUE)
 Fill custom data into time slice.
 
void GetEventInfo ()
 Get event information.
 
Double_t GetEventTime () const
 Current event time @value Start time of current event [ns].
 
void SetCreateMatches (Bool_t choice=kTRUE)
 Set creation of links to MC.
 
void SetEventMode (Bool_t choice=kTRUE)
 Set event-by-event mode.
 
void SetInactiveChannelFile (const char *fileName)
 Set the file containing the list of inactive channels.
 
void SetProduceNoise (Bool_t choice=kTRUE)
 Set production of inter-event noise.
 
void SetRunStartTime (Double_t time)
 Set the run start time.
 

Protected Member Functions

virtual std::pair< size_t, bool > ReadInactiveChannels ()
 Set of inactive channels, indicated by CbmAddress.
 

Protected Attributes

Bool_t fEventMode
 
Bool_t fProduceNoise
 Flag for event-by-event mode.
 
Bool_t fCreateMatches
 Flag for production of inter-event noise.
 
Double_t fRunStartTime
 Flag for creation of links to MC.
 
Int_t fCurrentInput
 Start time of run [ns].
 
Int_t fCurrentEvent
 Number of current input.
 
Int_t fCurrentMCEntry
 Number of current MC event.
 
Double_t fCurrentEventTime
 Number of current MC entry.
 
TString fInactiveChannelFileName
 Time of current MC event [ns].
 
std::set< uint32_t > fInactiveChannels
 Name of file with inactive channels.
 

Private Member Functions

 CbmTofDigitize (const CbmTofDigitize &)
 Copy constructor.
 
CbmTofDigitizeoperator= (const CbmTofDigitize &)
 Copy operator.
 
Bool_t RegisterInputs ()
 Recover pointer on input TClonesArray: TofPoints, ...
 
Bool_t InitParameters ()
 Initialize other parameters not included in parameter classes.
 
Bool_t LoadBeamtimeValues ()
 Load the beamtime values designed in the parameters: histograms or single values.
 
Bool_t CreateHistos ()
 
Bool_t FillHistos ()
 
Bool_t WriteHistos ()
 
Bool_t DeleteHistos ()
 
Bool_t MergeSameChanDigis ()
 Merge the digis on he same readout channel.
 
Double_t GenerateClusterRadius (Int_t iSmType, Int_t iRpc)
 Generate a value for the cluster radius from the beamtime data corresponding.
 
Bool_t DigitizeDirectClusterSize ()
 Convert TofPoints in input TClonesArray to Tof Digis using directly the.
 
Bool_t DigitizeFlatDisc ()
 Convert TofPoints in input TClonesArray to Tof Digis using an approximation of the.
 
Double_t ComputeClusterAreaOnChannel (Int_t iChanId, Double_t dClustRadius, Double_t dClustCentX, Double_t dClustCentY)
 Compute geometrical intersection area of a cluster and a channel.
 
Bool_t DigitizeGaussCharge ()
 Convert TofPoints in input TClonesArray to Tof Digis using an approximation of the.
 
Double_t TriangleArea (Double_t dXa, Double_t dYa, Double_t dXb, Double_t dYb, Double_t dXc, Double_t dYc)
 Compute triangle area from its corners.
 
Double_t DiscSectionArea (Double_t dDiscRadius, Double_t dDistBaseToCenter)
 Compute area of a disc section from the disc radius and the distance of the.
 
Double_t CircleIntersectPosX (Int_t iChanId, Double_t dClustRadius, Double_t dClustCentX, Double_t dClustCentY, Bool_t bUpperSide)
 Compute the x position of the intersection of a circle with the upper or.
 
Double_t CircleIntersectPosY (Int_t iChanId, Double_t dClustRadius, Double_t dClustCentX, Double_t dClustCentY, Bool_t bRightSide)
 Compute the y position of the intersection of a circle with the left or right edge of a channel. Assume single intersection in edge range!
 
Double_t DistanceCircleToBase (Double_t dClustRadius, Double_t dBaseXa, Double_t dBaseYa, Double_t dBaseXb, Double_t dBaseYb)
 Compute the distance from the cluster center to the base of a disc.
 
Bool_t CompareTimes (CbmTofDigi *p1, CbmTofDigi *p2)
 
 ClassDef (CbmTofDigitize, 1)
 
ULong64_t FillTimeSlice (CbmTimeSlice *timeSlice, Bool_t checkLimit, Double_t fillTime)
 Move data from the DaqBuffer into the current time slice.
 
bool IsChannelActive (const CbmTofDigi &digi)
 Test if the channel of a digi object is set active.
 

Private Attributes

Double_t fdFeeGainSigma
 
Double_t fdFeeTotThr
 
Double_t fdTimeResElec
 
Double_t fdSignalPropSpeed
 
std::vector< TH1 * > fh1ClusterSizeProb
 
std::vector< TH1 * > fh1ClusterTotProb
 
std::vector< std::vector< std::vector< Double_t > > > fvdSignalVelocityRpc
 
std::vector< std::vector< std::vector< Double_t > > > fdChannelGain
 
CbmTofGeoHandlerfGeoHandler
 
CbmTofDetectorIdfTofId
 
CbmTofDigiParfDigiPar
 
CbmTofCellfChannelInfo
 
CbmTofDigiBdfParfDigiBdfPar
 
Int_t fiNbElecChTot
 
std::vector< std::vector< std::vector< Int_t > > > fvRpcChOffs
 
TClonesArray * fTofPointsColl
 
TClonesArray * fMcTracksColl
 
std::vector< std::vector< std::vector< std::vector< std::pair< CbmTofDigi *, CbmMatch * > > > > > fStorDigi
 
std::vector< std::vector< std::vector< std::vector< Int_t > > > > fStorDigiMatch
 
std::vector< std::vector< ULong64_t > > fvlTrckChAddr
 
std::vector< std::vector< ULong64_t > > fvlTrckRpcAddr
 
std::vector< std::vector< Double_t > > fvlTrckRpcTime
 
Int_t fiNbDigis
 
TString fsHistoOutFilename
 
TH1 * fhTofPointsPerTrack
 
TH2 * fhTofPtsInTrkVsGapInd
 
TH2 * fhTofPtsInTrkVsGapIndPrm
 
TH2 * fhTofPtsInTrkVsGapIndSec
 
TH2 * fhTofPtsPosVsGap [10]
 
TH1 * fhEvtProcTime
 
TH1 * fhDigiMergeTime
 
TH1 * fhDigiNbElecCh
 
TH2 * fhProcTimeEvtSize
 
TH1 * fhMeanDigiPerTrack
 
TH1 * fhMeanFiredPerTrack
 
TH1 * fhPtTime
 
TH1 * fhDigiTime
 
TH1 * fhDigiTimeRes
 
TH2 * fhDigiTimeResB
 
TH1 * fhToTDist
 
TH1 * fhElecChOccup
 
TH1 * fhMultiDigiEvtElCh
 
TH2 * fhNbDigiEvtElCh
 
TH2 * fhNbTracksEvtElCh
 
TH1 * fhFiredEvtElCh
 
TH1 * fhMultiProbElCh
 
TTimeStamp fStart
 
TTimeStamp fStop
 
Double_t fdDigitizeTime
 
Double_t fdMergeTime
 
TStopwatch fTimer
 ROOT timer.
 
Int_t fiNofEvents
 Total number of events processed.
 
Double_t fdNofTofMcTrkTot
 Total number of MC tracks with TOF points.
 
Double_t fdNofPointsTot
 Total number of points processed.
 
Double_t fdNofDigisTot
 Total number of digis created.
 
Double_t fdTimeTot
 Total execution time.
 
TString fsBeamInputFile
 
Bool_t fbMonitorHistos
 
Bool_t fbMcTrkMonitor
 
Bool_t fbTimeBasedOutput
 
Bool_t fbAllowPointsWithoutTrack
 
Double_t fdDigiTimeConvFactor
 
TString fBranchName
 Output branch name.
 
std::vector< CbmTofDigi > * fDigis
 
std::vector< CbmMatch > * fMatches
 Output array (Digi)
 
std::multimap< double, DatafDaqBuffer
 Output array (CbmMatch)
 

Detailed Description

CBM ToF digitizer using beam data distributions as hit/cluster models.

Author
Pierre-Alain Loizeau loize.nosp@m.au@p.nosp@m.hysi..nosp@m.uni-.nosp@m.heide.nosp@m.lber.nosp@m.g.de
Version
1.0

Definition at line 39 of file CbmTofDigitize.h.

Member Typedef Documentation

◆ Data

typedef std::pair<std::unique_ptr<CbmTofDigi>, std::unique_ptr<CbmMatch> > CbmDigitize< CbmTofDigi >::Data
inherited

Short for data to be handled (pair of digi and match)

Definition at line 48 of file CbmDigitize.h.

Constructor & Destructor Documentation

◆ CbmTofDigitize() [1/3]

◆ CbmTofDigitize() [2/3]

◆ ~CbmTofDigitize()

CbmTofDigitize::~CbmTofDigitize ( )
virtual

Destructor.

Definition at line 235 of file CbmTofDigitize.cxx.

References fGeoHandler.

◆ CbmTofDigitize() [3/3]

CbmTofDigitize::CbmTofDigitize ( const CbmTofDigitize & )
private

Copy constructor.

References CbmTofDigitize().

Member Function Documentation

◆ AllowPointsWithoutTrack()

void CbmTofDigitize::AllowPointsWithoutTrack ( Bool_t bAllow = kTRUE)
inline

Definition at line 87 of file CbmTofDigitize.h.

References fbAllowPointsWithoutTrack.

◆ CheckOutput()

Bool_t CbmDigitize< CbmTofDigi >::CheckOutput ( )
inlinevirtualinherited

Check the output for being time-sorted.

Implements CbmDigitizeBase.

Definition at line 67 of file CbmDigitize.h.

◆ CircleIntersectPosX()

Double_t CbmTofDigitize::CircleIntersectPosX ( Int_t iChanId,
Double_t dClustRadius,
Double_t dClustCentX,
Double_t dClustCentY,
Bool_t bUpperSide )
private

Compute the x position of the intersection of a circle with the upper or.

lower edge of a channel. Assume 1 single intersection exists in edge range!

=> Please check/insure before that it is the case!

Returns 0 if no intersection (neg. root) or 2 intersections

Definition at line 3788 of file CbmTofDigitize.cxx.

References fChannelInfo, and fDigiPar.

Referenced by ComputeClusterAreaOnChannel().

◆ CircleIntersectPosY()

Double_t CbmTofDigitize::CircleIntersectPosY ( Int_t iChanId,
Double_t dClustRadius,
Double_t dClustCentX,
Double_t dClustCentY,
Bool_t bRightSide )
private

Compute the y position of the intersection of a circle with the left or right edge of a channel. Assume single intersection in edge range!

=> Please check/insure before that it is the case!

Returns 0 if no intersection (neg. root) or 2 intersections

Definition at line 3848 of file CbmTofDigitize.cxx.

References fChannelInfo, and fDigiPar.

Referenced by ComputeClusterAreaOnChannel().

◆ ClassDef()

CbmTofDigitize::ClassDef ( CbmTofDigitize ,
1  )
private

References CbmTofDigitize().

◆ ClearOutput()

void CbmDigitize< CbmTofDigi >::ClearOutput ( )
inlinevirtualinherited

Clear the output arrays.

Implements CbmDigitizeBase.

Definition at line 96 of file CbmDigitize.h.

◆ CompareTimes()

Bool_t CbmTofDigitize::CompareTimes ( CbmTofDigi * p1,
CbmTofDigi * p2 )
private

Definition at line 3931 of file CbmTofDigitize.cxx.

References CbmTofDigi::GetTime().

◆ ComputeClusterAreaOnChannel()

Double_t CbmTofDigitize::ComputeClusterAreaOnChannel ( Int_t iChanId,
Double_t dClustRadius,
Double_t dClustCentX,
Double_t dClustCentY )
private

Compute geometrical intersection area of a cluster and a channel.

Definition at line 3390 of file CbmTofDigitize.cxx.

References CircleIntersectPosX(), CircleIntersectPosY(), DiscSectionArea(), DistanceCircleToBase(), fChannelInfo, fDigiPar, and TriangleArea().

Referenced by DigitizeFlatDisc().

◆ CreateHistos()

◆ DeleteHistos()

◆ DigitizeDirectClusterSize()

Bool_t CbmTofDigitize::DigitizeDirectClusterSize ( )
private

Convert TofPoints in input TClonesArray to Tof Digis using directly the.

cluster size distribution from beamtime. The charge is encoded as ToT in ns and

shared among strips using a gauss distribution centered on the TofPoints.

Works only for strip RPC !!!!!

Generate higher cluster size than input as after digi merging a combination of strips

fired by each gap remains (e.g. size 1.5, 8 gaps can make 0 1 2l 2r 1 1 0 2l, ending in

size 3) => FIXME!

Returns the number of processed TofPoints

Definition at line 1339 of file CbmTofDigitize.cxx.

References fbAllowPointsWithoutTrack, fbMcTrkMonitor, fChannelInfo, fdChannelGain, fDigiBdfPar, fDigiPar, fdTimeResElec, CbmDigitize< CbmTofDigi >::fEventMode, fGeoHandler, fh1ClusterSizeProb, fh1ClusterTotProb, fMcTracksColl, fStorDigi, fStorDigiMatch, fTofId, fTofPointsColl, fvdSignalVelocityRpc, fvlTrckChAddr, fvlTrckRpcAddr, fvlTrckRpcTime, CbmMCTrack::GetMotherId(), CbmMCTrack::GetNPoints(), CbmTofAddress::GetUniqueAddress(), k14a, kiNbIntPts, kTof, size(), and x.

Referenced by Exec().

◆ DigitizeFlatDisc()

Bool_t CbmTofDigitize::DigitizeFlatDisc ( )
private

Convert TofPoints in input TClonesArray to Tof Digis using an approximation of the.

cluster charge distribution by a "Flat disc". The charge is encoded as ToT in ns.

Returns the number of processed TofPoints

Definition at line 1793 of file CbmTofDigitize.cxx.

References ComputeClusterAreaOnChannel(), fbAllowPointsWithoutTrack, fbMcTrkMonitor, fbTimeBasedOutput, fChannelInfo, fdChannelGain, fDigiBdfPar, fDigiPar, fdTimeResElec, fGeoHandler, fh1ClusterTotProb, fMcTracksColl, fStorDigi, fStorDigiMatch, fTofId, fTofPointsColl, fvdSignalVelocityRpc, fvlTrckChAddr, fvlTrckRpcAddr, fvlTrckRpcTime, GenerateClusterRadius(), CbmMCTrack::GetMotherId(), CbmMCTrack::GetNPoints(), CbmTofAddress::GetUniqueAddress(), k14a, kTof, and size().

Referenced by Exec().

◆ DigitizeGaussCharge()

Bool_t CbmTofDigitize::DigitizeGaussCharge ( )
private

Convert TofPoints in input TClonesArray to Tof Digis using an approximation of the.

cluster charge distribution by a 2D symetric Gauss function, with the approx. that

sigmaX = sigmaY = cluster size/2 and the following limits:

d(ch. center, cluster) < 3*sigma AND Tot(Ch) > 0.2ns

Returns the number of processed TofPoints

Definition at line 2576 of file CbmTofDigitize.cxx.

References fbAllowPointsWithoutTrack, fbMcTrkMonitor, fbTimeBasedOutput, CbmTofDetectorInfo::fCell, fChannelInfo, fdChannelGain, fDigiBdfPar, fDigiPar, fdTimeResElec, fGeoHandler, fh1ClusterTotProb, fMcTracksColl, fStorDigi, fStorDigiMatch, fTofId, fTofPointsColl, fvdSignalVelocityRpc, fvlTrckChAddr, fvlTrckRpcAddr, fvlTrckRpcTime, GenerateClusterRadius(), CbmMCTrack::GetMotherId(), CbmMCTrack::GetNPoints(), CbmTofAddress::GetUniqueAddress(), k14a, kTof, and size().

Referenced by Exec().

◆ DiscSectionArea()

Double_t CbmTofDigitize::DiscSectionArea ( Double_t dDiscRadius,
Double_t dDistBaseToCenter )
private

Compute area of a disc section from the disc radius and the distance of the.

section base to the disc center

Definition at line 3768 of file CbmTofDigitize.cxx.

Referenced by ComputeClusterAreaOnChannel().

◆ DistanceCircleToBase()

Double_t CbmTofDigitize::DistanceCircleToBase ( Double_t dClustRadius,
Double_t dBaseXa,
Double_t dBaseYa,
Double_t dBaseXb,
Double_t dBaseYb )
private

Compute the distance from the cluster center to the base of a disc.

section, described by its 2 endpoints.

Assumes that the endpoints are on the circle

=> Please make sure of it before calling this method.

Definition at line 3911 of file CbmTofDigitize.cxx.

Referenced by ComputeClusterAreaOnChannel().

◆ Exec()

◆ FillCustomData()

virtual void CbmDigitizeBase::FillCustomData ( Double_t ,
Bool_t = kTRUE )
inlinevirtualinherited

Fill custom data into time slice.

Parameters
fillTimeTime until data can be filled
limitIf kTRUE, only data up to fillTime will be treated; otherwise, all.

This method allows the digitizer to implement additional functionality than writing digis and match objects. It will be called from CbmDaq.

Definition at line 75 of file CbmDigitizeBase.h.

◆ FillHistos()

Bool_t CbmTofDigitize::FillHistos ( )
private

Definition at line 784 of file CbmTofDigitize.cxx.

◆ FillTimeSlice() [1/3]

ULong64_t CbmDigitize< CbmTofDigi >::FillTimeSlice ( CbmTimeSlice * timeSlice)
inlinevirtualinherited

Move data from the DaqBuffer into the current time slice.

Parameters
timeSlicePointer to current time slice object @value Number of digi objects filled into the time slice.

For regular time slices, all data with time stamp within the interval of the current time slice are moved from the buffer to the time slice. For time slices of type kFlexible or kEvent, all data will be moved.

Implements CbmDigitizeBase.

Definition at line 114 of file CbmDigitize.h.

◆ FillTimeSlice() [2/3]

ULong64_t CbmDigitize< CbmTofDigi >::FillTimeSlice ( CbmTimeSlice * timeSlice,
Bool_t checkLimit,
Double_t fillTime )
inlineprivateinherited

Move data from the DaqBuffer into the current time slice.

Parameters
timeSlicePointer to current time slice object
fillTimeTime up to which data will be moved [ns] @value Number of digi objects filled into the time slice.

For regular time slices, all data with time stamp within the interval of the current time slice are moved from the buffer to the time slice. For time slices of type kFlexible or kEvent, all data will be moved.

If checkLimit is selected, only data with time stamp less than fillTime are moved.

Definition at line 273 of file CbmDigitize.h.

◆ FillTimeSlice() [3/3]

ULong64_t CbmDigitize< CbmTofDigi >::FillTimeSlice ( CbmTimeSlice * timeSlice,
Double_t fillTime )
inlinevirtualinherited

Move data from the DaqBuffer into the current time slice.

Parameters
timeSlicePointer to current time slice object
fillTimeTime up to which data will be moved [ns] @value Number of digi objects filled into the time slice.

Move data with time stamp up to fillTime from the buffer to the time slice. For regular time slices, only data with time stamp within the time slice interval will be moved. For time slices of type kFlexible or kEvent, all data up to fillTime will be moved.

Implements CbmDigitizeBase.

Definition at line 129 of file CbmDigitize.h.

◆ Finish()

void CbmTofDigitize::Finish ( )
virtual

◆ GenerateClusterRadius()

Double_t CbmTofDigitize::GenerateClusterRadius ( Int_t iSmType,
Int_t iRpc )
private

Generate a value for the cluster radius from the beamtime data corresponding.

to this SmType/Rpc pair.

Definition at line 1257 of file CbmTofDigitize.cxx.

References fChannelInfo, fDigiBdfPar, and fh1ClusterSizeProb.

Referenced by DigitizeFlatDisc(), and DigitizeGaussCharge().

◆ GetDaqBufferSize()

ULong64_t CbmDigitize< CbmTofDigi >::GetDaqBufferSize ( ) const
inlinevirtualinherited

Size of DAQ buffer @value Number of data in the DAQ buffer.

Implements CbmDigitizeBase.

Definition at line 140 of file CbmDigitize.h.

◆ GetDaqBufferStatus()

std::string CbmDigitize< CbmTofDigi >::GetDaqBufferStatus ( ) const
inlinevirtualinherited

Debug output of DAQ buffer status @value String with status of DAQ buffer.

Implements CbmDigitizeBase.

Definition at line 148 of file CbmDigitize.h.

◆ GetDaqBufferTimeFirst()

Double_t CbmDigitize< CbmTofDigi >::GetDaqBufferTimeFirst ( ) const
inlinevirtualinherited

Time stamp of first data in the DAQ buffer @value Time stamp of first data in the DAQ buffer.

Implements CbmDigitizeBase.

Definition at line 162 of file CbmDigitize.h.

◆ GetDaqBufferTimeLast()

Double_t CbmDigitize< CbmTofDigi >::GetDaqBufferTimeLast ( ) const
inlinevirtualinherited

Time stamp of last data in the DAQ buffer @value Time stamp of last data in the DAQ buffer.

Implements CbmDigitizeBase.

Definition at line 174 of file CbmDigitize.h.

◆ GetEventInfo()

void CbmDigitizeBase::GetEventInfo ( )
inherited

Get event information.

MC input number, entry number and event time are taken from FairEventHeader and stored in the private data members for convenience. Note that the MC entry number need not coincide with the event number, for instance if the run does not start with the first MC entry, or in the case of mixed MC inputs to digitization.

Definition at line 107 of file CbmDigitizeBase.cxx.

Referenced by CbmTofDigitize::Exec().

◆ GetEventTime()

Double_t CbmDigitizeBase::GetEventTime ( ) const
inlineinherited

Current event time @value Start time of current event [ns].

Definition at line 113 of file CbmDigitizeBase.h.

◆ GetLatency()

Double_t CbmDigitize< CbmTofDigi >::GetLatency ( ) const
inlinevirtualinherited

Return the detector specific latency @value latency.

If there is no detector sopecific implementation the return value is 0. which does not change the default value set in CbmDaq.

Implements CbmDigitizeBase.

Definition at line 92 of file CbmDigitize.h.

◆ GetSystemId()

ECbmModuleId CbmTofDigitize::GetSystemId ( ) const
inlinevirtual

Detector system ID.

Returns
Detector system ID [ECbmModuleId]

Implements CbmDigitizeBase.

Definition at line 56 of file CbmTofDigitize.h.

References kTof.

◆ Init()

◆ InitParameters()

Bool_t CbmTofDigitize::InitParameters ( )
private

Initialize other parameters not included in parameter classes.

Definition at line 392 of file CbmTofDigitize.cxx.

References fDigiPar, fGeoHandler, fTofId, CbmTofCreateDigiPar::Init(), k12b, k14a, and k21a.

Referenced by Init().

◆ IsChannelActive()

bool CbmDigitize< CbmTofDigi >::IsChannelActive ( const CbmTofDigi & digi)
inlineprivateinherited

Test if the channel of a digi object is set active.

Parameters
digiobject
Returns
.true. if the respective channel is active

Definition at line 355 of file CbmDigitize.h.

◆ LoadBeamtimeValues()

Bool_t CbmTofDigitize::LoadBeamtimeValues ( )
private

Load the beamtime values designed in the parameters: histograms or single values.

In case of histograms, compute the projection to [0;1].

This is done for each RPC type.

Definition at line 421 of file CbmTofDigitize.cxx.

References bFakeBeamCounter, fdChannelGain, fdFeeGainSigma, fdFeeTotThr, fDigiBdfPar, fDigiPar, fdSignalPropSpeed, fdTimeResElec, fGeoHandler, fh1ClusterSizeProb, fh1ClusterTotProb, fiNbElecChTot, fsBeamInputFile, fStorDigi, fStorDigiMatch, fTofId, fvdSignalVelocityRpc, and fvRpcChOffs.

Referenced by Init().

◆ MergeSameChanDigis()

◆ operator=()

CbmTofDigitize & CbmTofDigitize::operator= ( const CbmTofDigitize & )
private

Copy operator.

References CbmTofDigitize().

◆ ReadInactiveChannels()

std::pair< size_t, bool > CbmDigitizeBase::ReadInactiveChannels ( )
protectedvirtualinherited

Set of inactive channels, indicated by CbmAddress.

Read the list of inactive channels from file

Parameters
fileNameFile name
Returns
Number of channels read from file, success of file reading

Reading from the file will stop when a read error occurs. In that case, or when the file could not be opened at all, the success flag will be .false.

Definition at line 203 of file CbmDigitizeBase.cxx.

Referenced by CbmTofDigitize::Init().

◆ RegisterInputs()

Bool_t CbmTofDigitize::RegisterInputs ( )
private

Recover pointer on input TClonesArray: TofPoints, ...

Definition at line 372 of file CbmTofDigitize.cxx.

References fMcTracksColl, and fTofPointsColl.

Referenced by Init().

◆ RegisterOutput()

void CbmDigitize< CbmTofDigi >::RegisterOutput ( )
inlineinherited

Register the output arrays.

Arrays for the digis and the match objects will be created and registered as output to the ROOT tree. The current implementation uses std::vector as container.

Definition at line 189 of file CbmDigitize.h.

Referenced by CbmTofDigitize::Init().

◆ SendData()

void CbmDigitize< CbmTofDigi >::SendData ( Double_t time,
CbmTofDigi * digi,
CbmMatch * match = nullptr )
inlineinherited

Send a digi and the corresponding match object to the DAQ.

Parameters
timeGlobal time of the digi
digiPointer to digi object (template parameter)
matchPointer to match object

Time is passed as a seperate parameter because the global time might be too large for some digi classes to store internally. So digis are not required to have a valid timestamp at this point. Later on when the time slices are known, the timestamp is overwritten with the relative time to the beginning of the time slice.

TODO: The interface should be unique pointers, meaning that the digitisers have to create objects by unique pointers from the start.

Definition at line 237 of file CbmDigitize.h.

Referenced by CbmTofDigitize::MergeSameChanDigis().

◆ SetCreateMatches()

void CbmDigitizeBase::SetCreateMatches ( Bool_t choice = kTRUE)
inlineinherited

Set creation of links to MC.

Parameters
ChoiceIf kTRUE, the match objects will be created

Definition at line 154 of file CbmDigitizeBase.h.

◆ SetDigiTimeConvFactor()

void CbmTofDigitize::SetDigiTimeConvFactor ( Double_t dfac)
inline

Definition at line 89 of file CbmTofDigitize.h.

References fdDigiTimeConvFactor.

◆ SetEventMode()

void CbmDigitizeBase::SetEventMode ( Bool_t choice = kTRUE)
inlineinherited

Set event-by-event mode.

Parameters
ChoiceIf kTRUE, the digitizer will run in event-by-event mode

Definition at line 160 of file CbmDigitizeBase.h.

◆ SetHistoFileName()

Bool_t CbmTofDigitize::SetHistoFileName ( TString sFilenameIn = "./tofDigiBdf.hst.root")

Definition at line 932 of file CbmTofDigitize.cxx.

References fsHistoOutFilename.

◆ SetInactiveChannelFile()

void CbmDigitizeBase::SetInactiveChannelFile ( const char * fileName)
inlineinherited

Set the file containing the list of inactive channels.

Parameters
fileNameName of file

Channels are identified by their CbmAddress. The file must contain a list of addresses, one per line. Comments after the address are allowed if separated by a blank.

Definition at line 169 of file CbmDigitizeBase.h.

◆ SetInputFileName()

void CbmTofDigitize::SetInputFileName ( TString FileName)
inline

Definition at line 79 of file CbmTofDigitize.h.

References fsBeamInputFile.

Referenced by Init().

◆ SetMonitorHistograms()

void CbmTofDigitize::SetMonitorHistograms ( Bool_t bMonitor = kTRUE)
inline

Definition at line 83 of file CbmTofDigitize.h.

References fbMonitorHistos.

◆ SetParContainers()

void CbmTofDigitize::SetParContainers ( )
virtual

Inherited from FairTask.

Definition at line 286 of file CbmTofDigitize.cxx.

References fDigiBdfPar, and fDigiPar.

◆ SetProduceNoise()

void CbmDigitizeBase::SetProduceNoise ( Bool_t choice = kTRUE)
inlineinherited

Set production of inter-event noise.

Parameters
ChoiceIf kTRUE, the digitizer will produce noise

Definition at line 175 of file CbmDigitizeBase.h.

◆ SetRunStartTime()

void CbmDigitizeBase::SetRunStartTime ( Double_t time)
inlineinherited

Set the run start time.

Parameters
Runstart time [ns]

Definition at line 181 of file CbmDigitizeBase.h.

◆ TriangleArea()

Double_t CbmTofDigitize::TriangleArea ( Double_t dXa,
Double_t dYa,
Double_t dXb,
Double_t dYb,
Double_t dXc,
Double_t dYc )
private

Compute triangle area from its corners.

Definition at line 3762 of file CbmTofDigitize.cxx.

Referenced by ComputeClusterAreaOnChannel().

◆ UseMcTrackMonitoring()

void CbmTofDigitize::UseMcTrackMonitoring ( Bool_t bMcTrkMonitor = kTRUE)
inline

Definition at line 85 of file CbmTofDigitize.h.

References fbMcTrkMonitor.

◆ WriteHistos()

Member Data Documentation

◆ fbAllowPointsWithoutTrack

Bool_t CbmTofDigitize::fbAllowPointsWithoutTrack
private

◆ fbMcTrkMonitor

Bool_t CbmTofDigitize::fbMcTrkMonitor
private

◆ fbMonitorHistos

Bool_t CbmTofDigitize::fbMonitorHistos
private

◆ fBranchName

TString CbmDigitize< CbmTofDigi >::fBranchName
privateinherited

Output branch name.

Definition at line 248 of file CbmDigitize.h.

◆ fbTimeBasedOutput

Bool_t CbmTofDigitize::fbTimeBasedOutput
private

◆ fChannelInfo

◆ fCreateMatches

Bool_t CbmDigitizeBase::fCreateMatches
protectedinherited

Flag for production of inter-event noise.

Definition at line 187 of file CbmDigitizeBase.h.

Referenced by CbmTofDigitize::MergeSameChanDigis().

◆ fCurrentEvent

Int_t CbmDigitizeBase::fCurrentEvent
protectedinherited

Number of current input.

Definition at line 190 of file CbmDigitizeBase.h.

Referenced by CbmTofDigitize::Exec().

◆ fCurrentEventTime

Double_t CbmDigitizeBase::fCurrentEventTime
protectedinherited

Number of current MC entry.

Definition at line 192 of file CbmDigitizeBase.h.

Referenced by CbmTofDigitize::Exec(), and CbmTofDigitize::MergeSameChanDigis().

◆ fCurrentInput

Int_t CbmDigitizeBase::fCurrentInput
protectedinherited

Start time of run [ns].

Definition at line 189 of file CbmDigitizeBase.h.

Referenced by CbmTofDigitize::MergeSameChanDigis().

◆ fCurrentMCEntry

Int_t CbmDigitizeBase::fCurrentMCEntry
protectedinherited

Number of current MC event.

Definition at line 191 of file CbmDigitizeBase.h.

Referenced by CbmTofDigitize::MergeSameChanDigis().

◆ fDaqBuffer

std::multimap<double, Data> CbmDigitize< CbmTofDigi >::fDaqBuffer
privateinherited

Output array (CbmMatch)

DAQ buffer. Here, the digis and matches are buffered until they are filled into the time slice output (ROOT branch). The map key is the digi time.

Definition at line 257 of file CbmDigitize.h.

◆ fdChannelGain

std::vector<std::vector<std::vector<Double_t> > > CbmTofDigitize::fdChannelGain
private

◆ fdDigiTimeConvFactor

Double_t CbmTofDigitize::fdDigiTimeConvFactor
private

◆ fdDigitizeTime

Double_t CbmTofDigitize::fdDigitizeTime
private

Definition at line 308 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and Exec().

◆ fdFeeGainSigma

Double_t CbmTofDigitize::fdFeeGainSigma
private

Get event information (Is now in base class)

Parameters
[out]eventNumberNumber of MC event
[out]inputNumberNumber of input
[out]eventTimeStart time of event [ns]

In case of being run with FairRunAna, this information is taken from FairEventHeader. If the task is run with FairRunSim, the FairEventHeader is not filled, so the respective information is taken from FairMCEventHeader. void GetEventInfo(Int_t& inputNr, Int_t& eventNr, Double_t& eventTime);

Definition at line 228 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and LoadBeamtimeValues().

◆ fdFeeTotThr

Double_t CbmTofDigitize::fdFeeTotThr
private

Definition at line 229 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and LoadBeamtimeValues().

◆ fDigiBdfPar

◆ fDigiPar

◆ fDigis

std::vector<CbmTofDigi>* CbmDigitize< CbmTofDigi >::fDigis
privateinherited

Definition at line 249 of file CbmDigitize.h.

◆ fdMergeTime

Double_t CbmTofDigitize::fdMergeTime
private

Definition at line 309 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and Exec().

◆ fdNofDigisTot

Double_t CbmTofDigitize::fdNofDigisTot
private

Total number of digis created.

Definition at line 315 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), Exec(), and Finish().

◆ fdNofPointsTot

Double_t CbmTofDigitize::fdNofPointsTot
private

Total number of points processed.

Definition at line 314 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), Exec(), and Finish().

◆ fdNofTofMcTrkTot

Double_t CbmTofDigitize::fdNofTofMcTrkTot
private

Total number of MC tracks with TOF points.

Definition at line 313 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and Finish().

◆ fdSignalPropSpeed

Double_t CbmTofDigitize::fdSignalPropSpeed
private

Definition at line 231 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and LoadBeamtimeValues().

◆ fdTimeResElec

Double_t CbmTofDigitize::fdTimeResElec
private

◆ fdTimeTot

Double_t CbmTofDigitize::fdTimeTot
private

Total execution time.

Definition at line 316 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), Exec(), and Finish().

◆ fEventMode

Bool_t CbmDigitizeBase::fEventMode
protectedinherited

◆ fGeoHandler

◆ fh1ClusterSizeProb

std::vector<TH1*> CbmTofDigitize::fh1ClusterSizeProb
private

◆ fh1ClusterTotProb

std::vector<TH1*> CbmTofDigitize::fh1ClusterTotProb
private

◆ fhDigiMergeTime

TH1* CbmTofDigitize::fhDigiMergeTime
private

◆ fhDigiNbElecCh

TH1* CbmTofDigitize::fhDigiNbElecCh
private

◆ fhDigiTime

TH1* CbmTofDigitize::fhDigiTime
private

◆ fhDigiTimeRes

TH1* CbmTofDigitize::fhDigiTimeRes
private

◆ fhDigiTimeResB

TH2* CbmTofDigitize::fhDigiTimeResB
private

◆ fhElecChOccup

TH1* CbmTofDigitize::fhElecChOccup
private

◆ fhEvtProcTime

TH1* CbmTofDigitize::fhEvtProcTime
private

◆ fhFiredEvtElCh

TH1* CbmTofDigitize::fhFiredEvtElCh
private

◆ fhMeanDigiPerTrack

TH1* CbmTofDigitize::fhMeanDigiPerTrack
private

◆ fhMeanFiredPerTrack

TH1* CbmTofDigitize::fhMeanFiredPerTrack
private

◆ fhMultiDigiEvtElCh

TH1* CbmTofDigitize::fhMultiDigiEvtElCh
private

◆ fhMultiProbElCh

TH1* CbmTofDigitize::fhMultiProbElCh
private

◆ fhNbDigiEvtElCh

TH2* CbmTofDigitize::fhNbDigiEvtElCh
private

◆ fhNbTracksEvtElCh

TH2* CbmTofDigitize::fhNbTracksEvtElCh
private

◆ fhProcTimeEvtSize

TH2* CbmTofDigitize::fhProcTimeEvtSize
private

◆ fhPtTime

TH1* CbmTofDigitize::fhPtTime
private

◆ fhTofPointsPerTrack

TH1* CbmTofDigitize::fhTofPointsPerTrack
private

◆ fhTofPtsInTrkVsGapInd

TH2* CbmTofDigitize::fhTofPtsInTrkVsGapInd
private

◆ fhTofPtsInTrkVsGapIndPrm

TH2* CbmTofDigitize::fhTofPtsInTrkVsGapIndPrm
private

◆ fhTofPtsInTrkVsGapIndSec

TH2* CbmTofDigitize::fhTofPtsInTrkVsGapIndSec
private

◆ fhTofPtsPosVsGap

TH2* CbmTofDigitize::fhTofPtsPosVsGap[10]
private

◆ fhToTDist

TH1* CbmTofDigitize::fhToTDist
private

◆ fInactiveChannelFileName

TString CbmDigitizeBase::fInactiveChannelFileName
protectedinherited

Time of current MC event [ns].

Definition at line 193 of file CbmDigitizeBase.h.

Referenced by CbmTofDigitize::Init().

◆ fInactiveChannels

std::set<uint32_t> CbmDigitizeBase::fInactiveChannels
protectedinherited

Name of file with inactive channels.

Definition at line 194 of file CbmDigitizeBase.h.

Referenced by CbmTofDigitize::Init().

◆ fiNbDigis

Int_t CbmTofDigitize::fiNbDigis
private

Definition at line 270 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), Exec(), and MergeSameChanDigis().

◆ fiNbElecChTot

Int_t CbmTofDigitize::fiNbElecChTot
private

Definition at line 249 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), CreateHistos(), and LoadBeamtimeValues().

◆ fiNofEvents

Int_t CbmTofDigitize::fiNofEvents
private

Total number of events processed.

Definition at line 312 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), Exec(), and Finish().

◆ fMatches

std::vector<CbmMatch>* CbmDigitize< CbmTofDigi >::fMatches
privateinherited

Output array (Digi)

Definition at line 250 of file CbmDigitize.h.

◆ fMcTracksColl

TClonesArray* CbmTofDigitize::fMcTracksColl
private

◆ fProduceNoise

Bool_t CbmDigitizeBase::fProduceNoise
protectedinherited

Flag for event-by-event mode.

Definition at line 186 of file CbmDigitizeBase.h.

◆ fRunStartTime

Double_t CbmDigitizeBase::fRunStartTime
protectedinherited

Flag for creation of links to MC.

Definition at line 188 of file CbmDigitizeBase.h.

◆ fsBeamInputFile

TString CbmTofDigitize::fsBeamInputFile
private

◆ fsHistoOutFilename

TString CbmTofDigitize::fsHistoOutFilename
private

Definition at line 273 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), SetHistoFileName(), and WriteHistos().

◆ fStart

TTimeStamp CbmTofDigitize::fStart
private

Definition at line 306 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and Exec().

◆ fStop

TTimeStamp CbmTofDigitize::fStop
private

Definition at line 307 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and Exec().

◆ fStorDigi

std::vector<std::vector<std::vector<std::vector<std::pair<CbmTofDigi*, CbmMatch*> > > > > CbmTofDigitize::fStorDigi
private

◆ fStorDigiMatch

std::vector<std::vector<std::vector<std::vector<Int_t> > > > CbmTofDigitize::fStorDigiMatch
private

◆ fTimer

TStopwatch CbmTofDigitize::fTimer
private

ROOT timer.

Definition at line 311 of file CbmTofDigitize.h.

Referenced by CbmTofDigitize(), CbmTofDigitize(), and Exec().

◆ fTofId

◆ fTofPointsColl

TClonesArray* CbmTofDigitize::fTofPointsColl
private

◆ fvdSignalVelocityRpc

std::vector<std::vector<std::vector<Double_t> > > CbmTofDigitize::fvdSignalVelocityRpc
private

◆ fvlTrckChAddr

std::vector<std::vector<ULong64_t> > CbmTofDigitize::fvlTrckChAddr
private

◆ fvlTrckRpcAddr

std::vector<std::vector<ULong64_t> > CbmTofDigitize::fvlTrckRpcAddr
private

◆ fvlTrckRpcTime

std::vector<std::vector<Double_t> > CbmTofDigitize::fvlTrckRpcTime
private

◆ fvRpcChOffs

std::vector<std::vector<std::vector<Int_t> > > CbmTofDigitize::fvRpcChOffs
private

The documentation for this class was generated from the following files: