CbmRoot
|
Class for the digitization of the CBM-FSD. More...
#include <CbmFsdDigitize.h>
Public Types | |
typedef std::pair< std::unique_ptr< CbmFsdDigi >, std::unique_ptr< CbmMatch > > | Data |
Short for data to be handled (pair of digi and match) | |
Public Member Functions | |
CbmFsdDigitize () | |
virtual | ~CbmFsdDigitize ()=default |
CbmFsdDigitize (const CbmFsdDigitize &)=delete | |
CbmFsdDigitize | operator= (const CbmFsdDigitize &)=delete |
ECbmModuleId | GetSystemId () const |
Detector system ID. | |
virtual InitStatus | Init () |
Inherited from FairTask. | |
virtual void | SetParContainers () |
Inherited from FairTask. | |
virtual void | Exec (Option_t *opt) |
virtual void | Finish () |
End-of-run action. | |
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, CbmFsdDigi *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 = 0 |
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 | |
void | InitParams () |
Initialise the parameters. | |
void | ReleaseBuffer (Bool_t sendEverything) |
release digi from local buffer to CbmDaq TIME BASED | |
ClassDef (CbmFsdDigitize, 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 CbmFsdDigi &digi) |
Test if the channel of a digi object is set active. | |
Private Attributes | |
CbmFsdDigiPar * | fDigiPar = nullptr |
Int_t | fNumPhotoDets = -1 |
Int_t | fNumUnits = -1 |
TArrayD | fTimeResolution {} |
TArrayD | fEnergyResolution {} |
TArrayD | fDeadTime {} |
Int_t | fNumEvents = 0 |
Double_t | fNumPoints = 0. |
Double_t | fNumDigis = 0. |
Double_t | fTimeTot = 0. |
TClonesArray * | fPointArray = nullptr |
std::map< int32_t, std::pair< CbmFsdDigi *, CbmMatch * > > | fDigiBuffer |
TString | fBranchName |
Output branch name. | |
std::vector< CbmFsdDigi > * | fDigis |
std::vector< CbmMatch > * | fMatches |
Output array (Digi) | |
std::multimap< double, Data > | fDaqBuffer |
Output array (CbmMatch) | |
Class for the digitization of the CBM-FSD.
The digitizer produces digits of type CbmFsdDigi as sum of Edep of Points and adds smearing in energy and time according to parameters
Definition at line 27 of file CbmFsdDigitize.h.
|
inherited |
Short for data to be handled (pair of digi and match)
Definition at line 48 of file CbmDigitize.h.
|
inline |
Default constructor
Definition at line 31 of file CbmFsdDigitize.h.
|
virtualdefault |
Destructor
|
delete |
|
inlinevirtualinherited |
Check the output for being time-sorted.
Implements CbmDigitizeBase.
Definition at line 67 of file CbmDigitize.h.
|
private |
|
inlinevirtualinherited |
|
virtual |
Virtual method Exec
Definition at line 121 of file CbmFsdDigitize.cxx.
References CbmMatch::AddLink(), CbmDigitizeBase::fCreateMatches, CbmDigitizeBase::fCurrentEvent, CbmDigitizeBase::fCurrentEventTime, CbmDigitizeBase::fCurrentInput, CbmDigitizeBase::fCurrentMCEntry, fDeadTime, fDigiBuffer, fEnergyResolution, CbmDigitizeBase::fEventMode, fNumDigis, fNumEvents, fNumPhotoDets, fNumPoints, fPointArray, fTimeResolution, fTimeTot, CbmFsdAddress::GetAddress(), CbmFsdAddress::GetElementId(), CbmDigitizeBase::GetEventInfo(), CbmFsdDigi::GetTime(), CbmFsdAddress::Module, ReleaseBuffer(), CbmDigitize< CbmFsdDigi >::SendData(), and CbmFsdAddress::Unit.
|
inlinevirtualinherited |
Fill custom data into time slice.
fillTime | Time until data can be filled |
limit | If 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.
|
inlinevirtualinherited |
Move data from the DaqBuffer into the current time slice.
timeSlice | Pointer 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.
|
inlineprivateinherited |
Move data from the DaqBuffer into the current time slice.
timeSlice | Pointer to current time slice object |
fillTime | Time 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.
|
inlinevirtualinherited |
Move data from the DaqBuffer into the current time slice.
timeSlice | Pointer to current time slice object |
fillTime | Time 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.
|
virtual |
End-of-run action.
Definition at line 227 of file CbmFsdDigitize.cxx.
References CbmDigitizeBase::fEventMode, fNumDigis, fNumEvents, fNumPoints, fTimeTot, and ReleaseBuffer().
|
inlinevirtualinherited |
Size of DAQ buffer @value Number of data in the DAQ buffer.
Implements CbmDigitizeBase.
Definition at line 140 of file CbmDigitize.h.
|
inlinevirtualinherited |
Debug output of DAQ buffer status @value String with status of DAQ buffer.
Implements CbmDigitizeBase.
Definition at line 148 of file CbmDigitize.h.
|
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.
|
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.
|
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 57 of file CbmDigitizeBase.cxx.
References CbmDigitizeBase::fCurrentEvent, CbmDigitizeBase::fCurrentEventTime, CbmDigitizeBase::fCurrentInput, and CbmDigitizeBase::fCurrentMCEntry.
Referenced by CbmBmonDigitize::Exec(), Exec(), CbmMuchDigitizeGem::Exec(), CbmMvdDigitizer::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmRichDigitizer::Exec(), CbmStsDigitize::Exec(), CbmStsDigitizePixel::Exec(), CbmTofDigitize::Exec(), and CbmTrdDigitizer::Exec().
|
inlineinherited |
Current event time @value Start time of current event [ns].
Definition at line 113 of file CbmDigitizeBase.h.
References CbmDigitizeBase::fCurrentEventTime.
|
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.
|
inlinevirtual |
Detector system ID.
Implements CbmDigitizeBase.
Definition at line 39 of file CbmFsdDigitize.h.
References kFsd.
|
virtual |
Inherited from FairTask.
Definition at line 41 of file CbmFsdDigitize.cxx.
References CbmDigitizeBase::fEventMode, fNumDigis, fNumEvents, fNumPoints, fPointArray, fTimeTot, InitParams(), and CbmDigitize< CbmFsdDigi >::RegisterOutput().
|
private |
Initialise the parameters.
Definition at line 93 of file CbmFsdDigitize.cxx.
References fDeadTime, fDigiPar, fEnergyResolution, fNumPhotoDets, fNumUnits, fTimeResolution, CbmFsdDigiPar::GetDeadTime(), CbmFsdDigiPar::GetEnergyResolution(), CbmFsdDigiPar::GetNumPhotoDets(), CbmFsdDigiPar::GetNumUnits(), and CbmFsdDigiPar::GetTimeResolution().
Referenced by Init().
|
inlineprivateinherited |
Test if the channel of a digi object is set active.
digi | object |
Definition at line 350 of file CbmDigitize.h.
|
delete |
|
protectedvirtualinherited |
Set of inactive channels, indicated by CbmAddress.
Read the list of inactive channels from file
fileName | File name |
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.
Reimplemented in CbmStsDigitize.
Definition at line 80 of file CbmDigitizeBase.cxx.
References CbmDigitizeBase::fInactiveChannelFileName, and CbmDigitizeBase::fInactiveChannels.
Referenced by CbmBmonDigitize::Init(), CbmMuchDigitizeGem::Init(), CbmMvdDigitizer::Init(), CbmPsdSimpleDigitizer::Init(), CbmRichDigitizer::Init(), CbmTofDigitize::Init(), and CbmTrdDigitizer::Init().
|
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 Init().
|
private |
release digi from local buffer to CbmDaq TIME BASED
EVENT BASED
Definition at line 244 of file CbmFsdDigitize.cxx.
References CbmDigitizeBase::fCreateMatches, CbmDigitizeBase::fCurrentEventTime, fDeadTime, fDigiBuffer, CbmFsdAddress::GetElementId(), CbmFsdDigi::GetTime(), CbmDigitize< CbmFsdDigi >::SendData(), and CbmFsdAddress::Unit.
|
inlineinherited |
Send a digi and the corresponding match object to the DAQ.
time | Global time of the digi |
digi | Pointer to digi object (template parameter) |
match | Pointer 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 Exec(), and ReleaseBuffer().
|
inlineinherited |
Set creation of links to MC.
Choice | If kTRUE, the match objects will be created |
Definition at line 154 of file CbmDigitizeBase.h.
References CbmDigitizeBase::fCreateMatches.
Referenced by CbmStsDigitizePixel::Init(), and CbmDigitization::Run().
|
inlineinherited |
Set event-by-event mode.
Choice | If kTRUE, the digitizer will run in event-by-event mode |
Definition at line 160 of file CbmDigitizeBase.h.
References CbmDigitizeBase::fEventMode.
Referenced by CbmDigitization::Run().
|
inlineinherited |
Set the file containing the list of inactive channels.
fileName | Name 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.
References CbmDigitizeBase::fInactiveChannelFileName.
|
virtual |
|
inlineinherited |
Set production of inter-event noise.
Choice | If kTRUE, the digitizer will produce noise |
Definition at line 175 of file CbmDigitizeBase.h.
References CbmDigitizeBase::fProduceNoise.
Referenced by CbmDigitization::Run().
|
inlineinherited |
Set the run start time.
Run | start time [ns] |
Definition at line 181 of file CbmDigitizeBase.h.
References CbmDigitizeBase::fRunStartTime.
Referenced by CbmDigitization::Run().
|
privateinherited |
Output branch name.
Definition at line 248 of file CbmDigitize.h.
|
protectedinherited |
Flag for production of inter-event noise.
Definition at line 187 of file CbmDigitizeBase.h.
Referenced by CbmDigitize< Digi >::ClearOutput(), CbmStsDigitize::CreateDigi(), CbmBmonDigitize::Exec(), Exec(), CbmMvdDigitizer::Exec(), CbmStsDigitizePixel::Exec(), CbmDigitize< Digi >::FillTimeSlice(), CbmMvdDigitizer::Finish(), CbmRichDigitizer::ProcessBuffers(), CbmDigitize< Digi >::RegisterOutput(), ReleaseBuffer(), and CbmDigitizeBase::SetCreateMatches().
|
protectedinherited |
Number of current input.
Definition at line 190 of file CbmDigitizeBase.h.
Referenced by CbmMuchDigitizeGem::BufferSignals(), Exec(), CbmMuchDigitizeGem::Exec(), CbmMvdDigitizer::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmRichDigitizer::Exec(), CbmTofDigitize::Exec(), CbmTrdDigitizer::Exec(), CbmMuchDigitizeGem::GenerateNoise(), CbmDigitizeBase::GetEventInfo(), and CbmRichDigitizer::ProcessMcEvent().
|
protectedinherited |
Number of current MC entry.
Definition at line 192 of file CbmDigitizeBase.h.
Referenced by CbmMuchDigitizeGem::AddCharge(), CbmRichDigitizer::AddEventNoise(), CbmMuchDigitizeGem::BufferSignals(), CbmBmonDigitize::Exec(), Exec(), CbmMuchDigitizeGem::Exec(), CbmMvdDigitizer::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmRichDigitizer::Exec(), CbmStsDigitize::Exec(), CbmStsDigitizePixel::Exec(), CbmTofDigitize::Exec(), CbmTrdDigitizer::Exec(), CbmMuchDigitizeGem::GenerateNoise(), CbmDigitizeBase::GetEventInfo(), CbmDigitizeBase::GetEventTime(), CbmTofDigitize::MergeSameChanDigis(), CbmStsDigitize::ProcessMCEvent(), CbmRichDigitizer::ProcessMcEvent(), CbmRichDigitizer::ProcessPoint(), and ReleaseBuffer().
|
protectedinherited |
Start time of run [ns].
Definition at line 189 of file CbmDigitizeBase.h.
Referenced by CbmMuchDigitizeGem::AddCharge(), CbmMuchDigitizeGem::BufferSignals(), CbmBmonDigitize::Exec(), Exec(), CbmMuchDigitizeGem::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmStsDigitizePixel::Exec(), CbmTrdDigitizer::Exec(), CbmDigitizeBase::GetEventInfo(), CbmTofDigitize::MergeSameChanDigis(), CbmStsDigitize::ProcessMCEvent(), and CbmRichDigitizer::ProcessMcEvent().
|
protectedinherited |
Number of current MC event.
Definition at line 191 of file CbmDigitizeBase.h.
Referenced by CbmMuchDigitizeGem::AddCharge(), CbmMuchDigitizeGem::BufferSignals(), CbmBmonDigitize::Exec(), Exec(), CbmPsdSimpleDigitizer::Exec(), CbmStsDigitizePixel::Exec(), CbmTrdDigitizer::Exec(), CbmDigitizeBase::GetEventInfo(), CbmTofDigitize::MergeSameChanDigis(), CbmStsDigitize::ProcessMCEvent(), and CbmRichDigitizer::ProcessMcEvent().
|
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.
|
private |
Definition at line 67 of file CbmFsdDigitize.h.
Referenced by Exec(), InitParams(), and ReleaseBuffer().
|
private |
Definition at line 78 of file CbmFsdDigitize.h.
Referenced by Exec(), and ReleaseBuffer().
|
private |
Definition at line 61 of file CbmFsdDigitize.h.
Referenced by InitParams(), and SetParContainers().
|
privateinherited |
Definition at line 249 of file CbmDigitize.h.
|
private |
Definition at line 66 of file CbmFsdDigitize.h.
Referenced by Exec(), and InitParams().
|
protectedinherited |
Definition at line 185 of file CbmDigitizeBase.h.
Referenced by CbmTofDigitize::DigitizeDirectClusterSize(), Exec(), CbmMuchDigitizeGem::Exec(), CbmRichDigitizer::Exec(), CbmStsDigitize::Exec(), Finish(), CbmMuchDigitizeGem::Finish(), CbmRichDigitizer::Finish(), CbmStsDigitize::Finish(), Init(), CbmMuchDigitizeGem::Init(), CbmMvdDigitizer::Init(), CbmRichDigitizer::Init(), CbmTofDigitize::Init(), CbmTrdDigitizer::Init(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::InitParams(), and CbmDigitizeBase::SetEventMode().
|
protectedinherited |
Time of current MC event [ns].
Definition at line 193 of file CbmDigitizeBase.h.
Referenced by CbmBmonDigitize::Init(), CbmMuchDigitizeGem::Init(), CbmMvdDigitizer::Init(), CbmPsdSimpleDigitizer::Init(), CbmRichDigitizer::Init(), CbmStsDigitize::Init(), CbmTofDigitize::Init(), CbmTrdDigitizer::Init(), CbmDigitizeBase::ReadInactiveChannels(), CbmStsDigitize::ReadInactiveChannels(), and CbmDigitizeBase::SetInactiveChannelFile().
|
protectedinherited |
Name of file with inactive channels.
Definition at line 194 of file CbmDigitizeBase.h.
Referenced by CbmBmonDigitize::Init(), CbmMuchDigitizeGem::Init(), CbmMvdDigitizer::Init(), CbmPsdSimpleDigitizer::Init(), CbmRichDigitizer::Init(), CbmTofDigitize::Init(), CbmTrdDigitizer::Init(), CbmDigitize< Digi >::IsChannelActive(), and CbmDigitizeBase::ReadInactiveChannels().
|
privateinherited |
Output array (Digi)
Definition at line 250 of file CbmDigitize.h.
|
private |
Definition at line 71 of file CbmFsdDigitize.h.
|
private |
Definition at line 69 of file CbmFsdDigitize.h.
|
private |
Definition at line 63 of file CbmFsdDigitize.h.
Referenced by Exec(), and InitParams().
|
private |
Definition at line 70 of file CbmFsdDigitize.h.
|
private |
Definition at line 64 of file CbmFsdDigitize.h.
Referenced by InitParams().
|
private |
Input array of CbmFsdPoints
Definition at line 75 of file CbmFsdDigitize.h.
|
protectedinherited |
Flag for event-by-event mode.
Definition at line 186 of file CbmDigitizeBase.h.
Referenced by CbmRichDigitizer::Exec(), CbmStsDigitize::InitParams(), CbmStsDigitizePixel::InitParams(), and CbmDigitizeBase::SetProduceNoise().
|
protectedinherited |
Flag for creation of links to MC.
Definition at line 188 of file CbmDigitizeBase.h.
Referenced by CbmRichDigitizer::Exec(), CbmStsDigitize::Exec(), and CbmDigitizeBase::SetRunStartTime().
|
private |
Definition at line 65 of file CbmFsdDigitize.h.
Referenced by Exec(), and InitParams().
|
private |
Definition at line 72 of file CbmFsdDigitize.h.