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

Task class for simulating the detector response of the STS. More...

#include <CbmStsDigitize.h>

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

Public Types

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

Public Member Functions

 CbmStsDigitize ()
 
virtual ~CbmStsDigitize ()
 
void CreateDigi (Int_t address, UShort_t channel, Long64_t time, UShort_t adc, const CbmMatch &match)
 
ECbmModuleId GetSystemId () const
 Detector system ID.
 
virtual void SetParContainers ()
 Inherited from FairTask.
 
virtual void Exec (Option_t *opt)
 
Int_t GetNofSignalsF () const
 
Int_t GetNofSignalsB () const
 
void InitSetup ()
 
virtual InitStatus ReInit ()
 
void SetGlobalAsicParams (UShort_t nChannels, UShort_t nAdc, Double_t dynRange, Double_t threshold, Double_t timeResolution, Double_t deadTime, Double_t noise, Double_t zeroNoiseRate)
 Set individual module parameters.
 
void SetGlobalFracDeadChannels (Double_t fraction)
 Set global fraction of dead channels.
 
void SetGlobalModuleParams (UInt_t nChannels, UInt_t nAsicChannels)
 Set the global module parameters.
 
void SetGlobalSensorConditions (Double_t vDep, Double_t vBias, Double_t temperature, Double_t cCoupling, Double_t cInterstrip)
 Set the global sensor conditions.
 
void SetModuleParameterFile (const char *fileName)
 Set the file name with module parameters.
 
void SetProcesses (CbmStsELoss eLossModel, Bool_t useLorentzShift=kTRUE, Bool_t useDiffusion=kTRUE, Bool_t useCrossTalk=kTRUE)
 
void SetSensorConditionFile (const char *fileName)
 Set the file name with sensor conditions.
 
void SetSensorParameterFile (const char *fileName)
 Set the file name with sensor parameters.
 
void UseOnlyPrimaries (Bool_t flag=kTRUE)
 Discard processing of secondary tracks.
 
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, CbmStsDigi *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 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

Int_t BufferSize () const
 Number of signals in the analogue buffers @value nSignals Sum of number of signals in all modules.
 
std::string BufferStatus () const
 Status of the analogue buffers.
 
virtual void Finish ()
 
virtual InitStatus Init ()
 
UInt_t InitModules ()
 Instantiate modules.
 
void InitParams ()
 Initialise the parameters.
 
UInt_t InitSensors ()
 Instantiate sensors.
 
bool IsChannelActiveSts (Int_t address, UShort_t channel)
 Test if the channel of a digi object is set active.
 
void ProcessAnalogBuffers (Double_t readoutTime)
 
void ProcessMCEvent ()
 
void ProcessPoint (const CbmStsPoint *point, Double_t eventTime, const CbmLink &link)
 
std::pair< size_t, bool > ReadInactiveChannels ()
 Read the list of inactive channels from file.
 
void ResetCounters ()
 Reset event counters.
 
void SetGlobalDefaults ()
 Set global default parameters.
 
 CbmStsDigitize (const CbmStsDigitize &)
 
CbmStsDigitize operator= (const CbmStsDigitize &)
 
 ClassDef (CbmStsDigitize, 5)
 
ULong64_t FillTimeSlice (CbmTimeSlice *timeSlice, Bool_t checkLimit, Double_t fillTime)
 Move data from the DaqBuffer into the current time slice.
 
bool IsChannelActive (const CbmStsDigi &digi)
 Test if the channel of a digi object is set active.
 

Private Attributes

Bool_t fIsInitialised
 kTRUE if Init() was called
 
CbmStsSetupfSetup
 
CbmStsSimSensorFactoryfSensorFactory = nullptr
 STS setup interface.
 
TClonesArray * fPoints
 Sensor factory.
 
TClonesArray * fTracks
 Input array of CbmMCTrack.
 
TStopwatch fTimer
 ROOT timer.
 
std::map< UInt_t, CbmStsSimModule * > fModules {}
 
std::map< UInt_t, std::unique_ptr< CbmStsSimSensor > > fSensors {}
 
CbmStsParSimfUserParSim = nullptr
 Settings for simulation.
 
CbmStsParAsicfUserParAsic = nullptr
 User defined, global.
 
CbmStsParModulefUserParModule = nullptr
 User defined, global.
 
CbmStsParSensorfUserParSensor = nullptr
 User defined, global.
 
CbmStsParSensorCondfUserParCond = nullptr
 User defined, global.
 
Double_t fUserDinactive = 0.
 Size of inactive sensor border [cm].
 
Double_t fUserFracDeadChan = 0.
 Fraction of inactive ASIC channels.
 
CbmStsParSimfParSim = nullptr
 Simulation settings.
 
CbmStsParSetModulefParSetModule = nullptr
 Module parameter.
 
CbmStsParSetSensorfParSetSensor = nullptr
 Sensor parameters.
 
CbmStsParSetSensorCondfParSetCond = nullptr
 Sensor conditions.
 
Double_t fSensorDinact
 Size of inactive border [cm].
 
Double_t fSensorPitch
 Strip pitch [cm].
 
Double_t fSensorStereoF
 Stereo angle front side [degrees].
 
Double_t fSensorStereoB
 Stereo angle back side [degrees].
 
TString fSensorParameterFile
 File with sensor parameters.
 
TString fSensorConditionFile
 File with sensor conditions.
 
TString fModuleParameterFile
 File with module parameters.
 
Double_t fTimePointLast
 
Double_t fTimeDigiFirst
 Time of first digi sent to DAQ.
 
Double_t fTimeDigiLast
 Time of last digi sent to DAQ.
 
Int_t fNofPointsProc = 0
 Number of processed points.
 
Int_t fNofPointsIgno = 0
 Number of ignored points.
 
Int_t fNofSignalsF = 0
 Number of signals on front side.
 
Int_t fNofSignalsB = 0
 Number of signals on back side.
 
Int_t fNofDigis = 0
 Number of created digis in Exec.
 
Int_t fNofEvents = 0
 Total number of processed events.
 
Double_t fNofPointsProcTot = 0
 Total number of processed points.
 
Double_t fNofPointsIgnoTot = 0
 Total number of ignored points.
 
Double_t fNofSignalsFTot = 0
 Number of signals on front side.
 
Double_t fNofSignalsBTot = 0
 Number of signals on back side.
 
Double_t fNofDigisTot = 0
 Total number of digis created.
 
Double_t fNofNoiseTot = 0
 Total number of noise digis.
 
Double_t fTimeTot = 0.
 Total execution time.
 
std::map< Int_t, std::set< UShort_t > > fInactiveChannelsSts = {}
 
TString fBranchName
 Output branch name.
 
std::vector< CbmStsDigi > * fDigis
 
std::vector< CbmMatch > * fMatches
 Output array (Digi)
 
std::multimap< double, DatafDaqBuffer
 Output array (CbmMatch)
 

Detailed Description

Task class for simulating the detector response of the STS.

Author
Volker Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
23.05.2014
Version
2.0

The STS digitiser task reads CbmStsPoint from the input and produces objects of type CbmStsDigi. The StsPoints are distributed to the respective sensors, where the analogue response is calculated. This is buffered and digitised by the connected module. The digitiser task triggers the readout of each module after the end of each call to Exec(), i.e. after processing one input MC event. All buffered data prior to the MC time of the current event are read out and stored in the output.

Definition at line 55 of file CbmStsDigitize.h.

Member Typedef Documentation

◆ Data

std::pair<std::unique_ptr<CbmStsDigi>, std::unique_ptr<CbmMatch> > CbmDigitize< CbmStsDigi >::Data
inherited

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

Definition at line 48 of file CbmDigitize.h.

Constructor & Destructor Documentation

◆ CbmStsDigitize() [1/2]

CbmStsDigitize::CbmStsDigitize ( )

Constructor

Definition at line 73 of file CbmStsDigitize.cxx.

References ResetCounters(), and SetGlobalDefaults().

◆ ~CbmStsDigitize()

CbmStsDigitize::~CbmStsDigitize ( )
virtual

Destructor

Definition at line 100 of file CbmStsDigitize.cxx.

◆ CbmStsDigitize() [2/2]

CbmStsDigitize::CbmStsDigitize ( const CbmStsDigitize & )
private

Prevent usage of copy constructor and assignment operator

Member Function Documentation

◆ BufferSize()

Int_t CbmStsDigitize::BufferSize ( ) const
private

Number of signals in the analogue buffers @value nSignals Sum of number of signals in all modules.

Definition at line 105 of file CbmStsDigitize.cxx.

References fModules.

Referenced by Finish().

◆ BufferStatus()

string CbmStsDigitize::BufferStatus ( ) const
private

Status of the analogue buffers.

Parameters
[out]nSignalsSum of number of signals in alll modules @value String output

Definition at line 123 of file CbmStsDigitize.cxx.

References fModules.

Referenced by Exec(), and Finish().

◆ CheckOutput()

Bool_t CbmDigitize< CbmStsDigi >::CheckOutput ( )
inlinevirtualinherited

Check the output for being time-sorted.

Implements CbmDigitizeBase.

Definition at line 67 of file CbmDigitize.h.

◆ ClassDef()

CbmStsDigitize::ClassDef ( CbmStsDigitize ,
5  )
private

◆ ClearOutput()

void CbmDigitize< CbmStsDigi >::ClearOutput ( )
inlinevirtualinherited

Clear the output arrays.

Implements CbmDigitizeBase.

Definition at line 96 of file CbmDigitize.h.

◆ CreateDigi()

void CbmStsDigitize::CreateDigi ( Int_t address,
UShort_t channel,
Long64_t time,
UShort_t adc,
const CbmMatch & match )

Create a digi and send it for further processing

Parameters
addressUnique channel address
timeAbsolute time [ns]
adcDigitised charge [ADC channels]
matchMC Match object

Definition at line 152 of file CbmStsDigitize.cxx.

References CbmDigitizeBase::fCreateMatches, fNofDigis, fTimeDigiFirst, fTimeDigiLast, IsChannelActiveSts(), and CbmDigitize< CbmStsDigi >::SendData().

Referenced by CbmStsSimModule::Digitize().

◆ 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.

◆ FillTimeSlice() [1/3]

ULong64_t CbmDigitize< CbmStsDigi >::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< CbmStsDigi >::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< CbmStsDigi >::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()

◆ GetDaqBufferSize()

ULong64_t CbmDigitize< CbmStsDigi >::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< CbmStsDigi >::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< CbmStsDigi >::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< CbmStsDigi >::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 57 of file CbmDigitizeBase.cxx.

References CbmDigitizeBase::fCurrentEvent, CbmDigitizeBase::fCurrentEventTime, CbmDigitizeBase::fCurrentInput, and CbmDigitizeBase::fCurrentMCEntry.

Referenced by CbmBmonDigitize::Exec(), CbmFsdDigitize::Exec(), CbmMuchDigitizeGem::Exec(), CbmMvdDigitizer::Exec(), CbmPsdSimpleDigitizer::Exec(), CbmRichDigitizer::Exec(), Exec(), CbmStsDigitizePixel::Exec(), CbmTofDigitize::Exec(), and CbmTrdDigitizer::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.

References CbmDigitizeBase::fCurrentEventTime.

◆ GetLatency()

Double_t CbmDigitize< CbmStsDigi >::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.

◆ GetNofSignalsB()

Int_t CbmStsDigitize::GetNofSignalsB ( ) const
inline

Get number of signals back side

Definition at line 95 of file CbmStsDigitize.h.

References fNofSignalsB.

◆ GetNofSignalsF()

Int_t CbmStsDigitize::GetNofSignalsF ( ) const
inline

Get number of signals front side

Definition at line 91 of file CbmStsDigitize.h.

References fNofSignalsF.

◆ GetSystemId()

ECbmModuleId CbmStsDigitize::GetSystemId ( ) const
inlinevirtual

Detector system ID.

Returns
kSts

Implements CbmDigitizeBase.

Definition at line 78 of file CbmStsDigitize.h.

References kSts.

◆ Init()

◆ InitModules()

UInt_t CbmStsDigitize::InitModules ( )
private

Instantiate modules.

Returns
Number of instantiated modules

Definition at line 393 of file CbmStsDigitize.cxx.

References fModules, fParSetModule, fSetup, CbmStsElement::GetAddress(), CbmStsSetup::GetModule(), CbmStsSetup::GetNofModules(), and CbmStsParSetModule::GetParModule().

Referenced by Init().

◆ InitParams()

◆ InitSensors()

◆ InitSetup()

void CbmStsDigitize::InitSetup ( )

◆ IsChannelActive()

bool CbmDigitize< CbmStsDigi >::IsChannelActive ( const CbmStsDigi & 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 350 of file CbmDigitize.h.

◆ IsChannelActiveSts()

bool CbmStsDigitize::IsChannelActiveSts ( Int_t address,
UShort_t channel )
private

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

Parameters
addressCbmStdAddress of module
channelChannel number in module
Returns
.true. if the respective channel is active

We do not use the base class method IsChannelActive(), because unlike for the other detector systems, an STS channel is not identified by the address only, but by address plus channel number.

Definition at line 617 of file CbmStsDigitize.cxx.

References fInactiveChannelsSts.

Referenced by CreateDigi().

◆ operator=()

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

◆ ProcessAnalogBuffers()

void CbmStsDigitize::ProcessAnalogBuffers ( Double_t readoutTime)
private

Process the analog buffers of all modules

Parameters
readoutTimeTime of readout [ns]

Definition at line 628 of file CbmStsDigitize.cxx.

References fModules.

Referenced by Exec().

◆ ProcessMCEvent()

◆ ProcessPoint()

void CbmStsDigitize::ProcessPoint ( const CbmStsPoint * point,
Double_t eventTime,
const CbmLink & link )
private

Process one MCPoint

Parameters
pointPointer to CbmStsPoint to be processed
linkLink to MCPoint

Definition at line 680 of file CbmStsDigitize.cxx.

References fNofSignalsB, fNofSignalsF, and fSensors.

Referenced by ProcessMCEvent().

◆ ReadInactiveChannels()

std::pair< size_t, bool > CbmStsDigitize::ReadInactiveChannels ( )
privatevirtual

Read the list of inactive channels from file.

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

This re-implements the respective method from the base class by reading not only the address, but also the channel number from file. The file must contain one line for each channel containing the module address and the channel number, separated by a blank. Comments can follow after the channel number, if separated by a blank.

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 from CbmDigitizeBase.

Definition at line 702 of file CbmStsDigitize.cxx.

References CbmDigitizeBase::fInactiveChannelFileName, and fInactiveChannelsSts.

Referenced by Init().

◆ RegisterOutput()

void CbmDigitize< CbmStsDigi >::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 Init(), and CbmStsDigitizePixel::Init().

◆ ReInit()

InitStatus CbmStsDigitize::ReInit ( )
virtual

Re-initialisation

Definition at line 726 of file CbmStsDigitize.cxx.

References fSetup, and CbmStsSetup::Instance().

◆ ResetCounters()

void CbmStsDigitize::ResetCounters ( )
private

Reset event counters.

Definition at line 737 of file CbmStsDigitize.cxx.

References fNofDigis, fNofPointsIgno, fNofPointsProc, fNofSignalsB, fNofSignalsF, fTimeDigiFirst, and fTimeDigiLast.

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

◆ SendData()

void CbmDigitize< CbmStsDigi >::SendData ( Double_t time,
CbmStsDigi * 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 CreateDigi(), and CbmStsDigitizePixel::Exec().

◆ 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.

References CbmDigitizeBase::fCreateMatches.

Referenced by CbmStsDigitizePixel::Init(), and CbmDigitization::Run().

◆ 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.

References CbmDigitizeBase::fEventMode.

Referenced by CbmDigitization::Run().

◆ SetGlobalAsicParams()

void CbmStsDigitize::SetGlobalAsicParams ( UShort_t nChannels,
UShort_t nAdc,
Double_t dynRange,
Double_t threshold,
Double_t timeResolution,
Double_t deadTime,
Double_t noise,
Double_t zeroNoiseRate )

Set individual module parameters.

Parameters
parMapMap of module addresses and corresponding module parameters

These parameters will be applied to individual modules after the global defaults are set. TODO: Include this with the new parameter scheme

Set the global ASIC parameters

Parameters
nChannelsNumber of readout channels
nAdcNumber of ADC channels
dynRangeDynamic range [e]
thresholdThreshold [e]
timeResolutionTime resolution [ns]
deadTimeChannel dead time [ns]
noiseNoise RMS [e]
zeroNoiseRateZero-threshold noise rate [1/ns]

These parameters will be applied to all ASICS in all modules.

Definition at line 820 of file CbmStsDigitize.cxx.

References fIsInitialised, and fUserParAsic.

◆ SetGlobalDefaults()

void CbmStsDigitize::SetGlobalDefaults ( )
private

Set global default parameters.

The global module and sensor parameters will be applied for all modules and sensors if no element-specific parameters are applied. Default values for the global parameters are hard-coded here. They can be changed from the macro level by the appropriate methods (e.g. SetGlobalSensorConditions).

Definition at line 750 of file CbmStsDigitize.cxx.

References fIsInitialised, fUserDinactive, fUserParAsic, fUserParCond, fUserParModule, fUserParSensor, fUserParSim, kDssdStereo, kUrban, CbmStsParSim::SetEventMode(), CbmStsParSim::SetGenerateNoise(), CbmStsParSensor::SetPar(), and CbmStsParSim::SetProcesses().

Referenced by CbmStsDigitize().

◆ SetGlobalFracDeadChannels()

void CbmStsDigitize::SetGlobalFracDeadChannels ( Double_t fraction)
inline

Set global fraction of dead channels.

Parameters
fractionFraction of dead channels

If this number is different from zero, in each ASIC a number of channels corresponding to this fraction are deactivated.

Definition at line 141 of file CbmStsDigitize.h.

References fUserFracDeadChan.

◆ SetGlobalModuleParams()

void CbmStsDigitize::SetGlobalModuleParams ( UInt_t nChannels,
UInt_t nAsicChannels )

Set the global module parameters.

Parameters
nChannelsNumber of readout channels
nAsicChannelsNumber of readout channels per ASIC

These parameters will be applied to all modules.

Definition at line 834 of file CbmStsDigitize.cxx.

References fIsInitialised, and fUserParModule.

◆ SetGlobalSensorConditions()

void CbmStsDigitize::SetGlobalSensorConditions ( Double_t vDep,
Double_t vBias,
Double_t temperature,
Double_t cCoupling,
Double_t cInterstrip )

Set the global sensor conditions.

Parameters
vDepFull-depletion voltage [V]
vBiasBias voltage [V]
temperatureTemperature [K]
cCouplingCoupling capacitance [pF]
cInterstripInter-strip capacitance [pF]

These parameters will be applied to all sensors when no condition file is specified.

Definition at line 845 of file CbmStsDigitize.cxx.

References fIsInitialised, and fUserParCond.

◆ 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.

References CbmDigitizeBase::fInactiveChannelFileName.

◆ SetModuleParameterFile()

void CbmStsDigitize::SetModuleParameterFile ( const char * fileName)

Set the file name with module parameters.

Parameters
fileNameFile name with module parameters

The format of the file must comply with CbmStsSetup::ReadModuleParameters(const char*)

Definition at line 857 of file CbmStsDigitize.cxx.

References fIsInitialised, and fModuleParameterFile.

◆ SetParContainers()

void CbmStsDigitize::SetParContainers ( )
virtual

Inherited from FairTask.

Definition at line 310 of file CbmStsDigitize.cxx.

References fParSetCond, fParSetModule, fParSetSensor, and fParSim.

◆ SetProcesses()

void CbmStsDigitize::SetProcesses ( CbmStsELoss eLossModel,
Bool_t useLorentzShift = kTRUE,
Bool_t useDiffusion = kTRUE,
Bool_t useCrossTalk = kTRUE )

Set physics processes

Parameters
eLossModelEnergy loss model
useLorentzShiftIf kTRUE, activate Lorentz shift
useDiffusionIf kTRUE, activate diffusion
useCrossTalkIf kTRUE, activate cross talk

Changing the physics flags is only allowed before Init() is called.

Definition at line 867 of file CbmStsDigitize.cxx.

References fIsInitialised, fUserParSim, and CbmStsParSim::SetProcesses().

◆ 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.

References CbmDigitizeBase::fProduceNoise.

Referenced by CbmDigitization::Run().

◆ 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.

References CbmDigitizeBase::fRunStartTime.

Referenced by CbmDigitization::Run().

◆ SetSensorConditionFile()

void CbmStsDigitize::SetSensorConditionFile ( const char * fileName)

Set the file name with sensor conditions.

Parameters
fileNameFile name with sensor conditions

The format of the file must comply with CbmStsSetup::ReadSensorConditions(const char*)

Definition at line 882 of file CbmStsDigitize.cxx.

References fIsInitialised, and fSensorConditionFile.

◆ SetSensorParameterFile()

void CbmStsDigitize::SetSensorParameterFile ( const char * fileName)

Set the file name with sensor parameters.

Parameters
fileNameFile name with sensor parameters

The format of the file must comply with CbmStsSetup::ReadSensorParameters(const char*)

Definition at line 895 of file CbmStsDigitize.cxx.

References fIsInitialised, and fSensorParameterFile.

◆ UseOnlyPrimaries()

void CbmStsDigitize::UseOnlyPrimaries ( Bool_t flag = kTRUE)

Discard processing of secondary tracks.

Set the sensor strip pitch

Parameters
pitchStrip pitch [cm]

The internal sensor parameters like pitch, stereo angle etc. are normally taken from a sensor database. This method allows to override the value for the strip pitch defined there, in order to easily test different sensor layout options without defining new types in the database. It has effect only for strip sensor types. The specified strip pitch will be applied for all sensors in the setup.

TODO: Functionality still used? Should be included in new parameter scheme, then. Through CbmStsParSensor.

Parameters
flagkTRUE if secondaries shall be discarded

This flag enables the user to suppress the digitisation of StsPoints from secondary tracks for debug purposes. By default, points from all tracks are processed.

Definition at line 908 of file CbmStsDigitize.cxx.

References fUserParSim, and CbmStsParSim::SetOnlyPrimaries().

Member Data Documentation

◆ fBranchName

TString CbmDigitize< CbmStsDigi >::fBranchName
privateinherited

Output branch name.

Definition at line 248 of file CbmDigitize.h.

◆ fCreateMatches

◆ fCurrentEvent

◆ fCurrentEventTime

◆ fCurrentInput

◆ fCurrentMCEntry

◆ fDaqBuffer

std::multimap<double, Data> CbmDigitize< CbmStsDigi >::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.

◆ fDigis

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

Definition at line 249 of file CbmDigitize.h.

◆ fEventMode

◆ fInactiveChannelFileName

◆ fInactiveChannels

std::set<uint32_t> CbmDigitizeBase::fInactiveChannels = {}
protectedinherited

◆ fInactiveChannelsSts

std::map<Int_t, std::set<UShort_t> > CbmStsDigitize::fInactiveChannelsSts = {}
private

Definition at line 303 of file CbmStsDigitize.h.

Referenced by Init(), IsChannelActiveSts(), and ReadInactiveChannels().

◆ fIsInitialised

◆ fMatches

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

Output array (Digi)

Definition at line 250 of file CbmDigitize.h.

◆ fModuleParameterFile

TString CbmStsDigitize::fModuleParameterFile
private

File with module parameters.

Definition at line 274 of file CbmStsDigitize.h.

Referenced by SetModuleParameterFile().

◆ fModules

std::map<UInt_t, CbmStsSimModule*> CbmStsDigitize::fModules {}
private

Map of modules. Key is the address.

Definition at line 245 of file CbmStsDigitize.h.

Referenced by BufferSize(), BufferStatus(), Exec(), Finish(), InitModules(), InitSensors(), and ProcessAnalogBuffers().

◆ fNofDigis

Int_t CbmStsDigitize::fNofDigis = 0
private

Number of created digis in Exec.

Definition at line 288 of file CbmStsDigitize.h.

Referenced by CreateDigi(), Exec(), Finish(), and ResetCounters().

◆ fNofDigisTot

Double_t CbmStsDigitize::fNofDigisTot = 0
private

Total number of digis created.

Definition at line 296 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fNofEvents

Int_t CbmStsDigitize::fNofEvents = 0
private

Total number of processed events.

Definition at line 291 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fNofNoiseTot

Double_t CbmStsDigitize::fNofNoiseTot = 0
private

Total number of noise digis.

Definition at line 297 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fNofPointsIgno

Int_t CbmStsDigitize::fNofPointsIgno = 0
private

Number of ignored points.

Definition at line 285 of file CbmStsDigitize.h.

Referenced by Exec(), Finish(), ProcessMCEvent(), and ResetCounters().

◆ fNofPointsIgnoTot

Double_t CbmStsDigitize::fNofPointsIgnoTot = 0
private

Total number of ignored points.

Definition at line 293 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fNofPointsProc

Int_t CbmStsDigitize::fNofPointsProc = 0
private

Number of processed points.

Definition at line 284 of file CbmStsDigitize.h.

Referenced by Exec(), Finish(), ProcessMCEvent(), and ResetCounters().

◆ fNofPointsProcTot

Double_t CbmStsDigitize::fNofPointsProcTot = 0
private

Total number of processed points.

Definition at line 292 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fNofSignalsB

Int_t CbmStsDigitize::fNofSignalsB = 0
private

Number of signals on back side.

Definition at line 287 of file CbmStsDigitize.h.

Referenced by Exec(), Finish(), GetNofSignalsB(), ProcessPoint(), and ResetCounters().

◆ fNofSignalsBTot

Double_t CbmStsDigitize::fNofSignalsBTot = 0
private

Number of signals on back side.

Definition at line 295 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fNofSignalsF

Int_t CbmStsDigitize::fNofSignalsF = 0
private

Number of signals on front side.

Definition at line 286 of file CbmStsDigitize.h.

Referenced by Exec(), Finish(), GetNofSignalsF(), ProcessPoint(), and ResetCounters().

◆ fNofSignalsFTot

Double_t CbmStsDigitize::fNofSignalsFTot = 0
private

Number of signals on front side.

Definition at line 294 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fParSetCond

CbmStsParSetSensorCond* CbmStsDigitize::fParSetCond = nullptr
private

Sensor conditions.

Definition at line 263 of file CbmStsDigitize.h.

Referenced by InitParams(), InitSensors(), InitSetup(), and SetParContainers().

◆ fParSetModule

CbmStsParSetModule* CbmStsDigitize::fParSetModule = nullptr
private

Module parameter.

Definition at line 261 of file CbmStsDigitize.h.

Referenced by InitModules(), InitParams(), InitSetup(), and SetParContainers().

◆ fParSetSensor

CbmStsParSetSensor* CbmStsDigitize::fParSetSensor = nullptr
private

Sensor parameters.

Definition at line 262 of file CbmStsDigitize.h.

Referenced by InitParams(), InitSensors(), InitSetup(), and SetParContainers().

◆ fParSim

CbmStsParSim* CbmStsDigitize::fParSim = nullptr
private

Simulation settings.

Definition at line 260 of file CbmStsDigitize.h.

Referenced by Exec(), InitParams(), InitSensors(), ProcessMCEvent(), and SetParContainers().

◆ fPoints

TClonesArray* CbmStsDigitize::fPoints
private

Sensor factory.

Input array of CbmStsPoint

Definition at line 240 of file CbmStsDigitize.h.

Referenced by Init(), and ProcessMCEvent().

◆ fProduceNoise

Bool_t CbmDigitizeBase::fProduceNoise
protectedinherited

Flag for event-by-event mode.

Definition at line 186 of file CbmDigitizeBase.h.

Referenced by CbmRichDigitizer::Exec(), InitParams(), CbmStsDigitizePixel::InitParams(), and CbmDigitizeBase::SetProduceNoise().

◆ fRunStartTime

Double_t CbmDigitizeBase::fRunStartTime = 0
protectedinherited

Flag for creation of links to MC.

Definition at line 188 of file CbmDigitizeBase.h.

Referenced by CbmRichDigitizer::Exec(), Exec(), and CbmDigitizeBase::SetRunStartTime().

◆ fSensorConditionFile

TString CbmStsDigitize::fSensorConditionFile
private

File with sensor conditions.

Definition at line 273 of file CbmStsDigitize.h.

Referenced by SetSensorConditionFile().

◆ fSensorDinact

Double_t CbmStsDigitize::fSensorDinact
private

Size of inactive border [cm].

Definition at line 266 of file CbmStsDigitize.h.

◆ fSensorFactory

CbmStsSimSensorFactory* CbmStsDigitize::fSensorFactory = nullptr
private

STS setup interface.

Definition at line 239 of file CbmStsDigitize.h.

Referenced by InitSensors().

◆ fSensorParameterFile

TString CbmStsDigitize::fSensorParameterFile
private

File with sensor parameters.

Definition at line 272 of file CbmStsDigitize.h.

Referenced by SetSensorParameterFile().

◆ fSensorPitch

Double_t CbmStsDigitize::fSensorPitch
private

Strip pitch [cm].

Definition at line 267 of file CbmStsDigitize.h.

◆ fSensors

std::map<UInt_t, std::unique_ptr<CbmStsSimSensor> > CbmStsDigitize::fSensors {}
private

Map of sensors. Key is the address.

Definition at line 248 of file CbmStsDigitize.h.

Referenced by InitSensors(), and ProcessPoint().

◆ fSensorStereoB

Double_t CbmStsDigitize::fSensorStereoB
private

Stereo angle back side [degrees].

Definition at line 269 of file CbmStsDigitize.h.

◆ fSensorStereoF

Double_t CbmStsDigitize::fSensorStereoF
private

Stereo angle front side [degrees].

Definition at line 268 of file CbmStsDigitize.h.

◆ fSetup

CbmStsSetup* CbmStsDigitize::fSetup
private

Definition at line 238 of file CbmStsDigitize.h.

Referenced by Init(), InitModules(), InitParams(), InitSensors(), InitSetup(), and ReInit().

◆ fTimeDigiFirst

Double_t CbmStsDigitize::fTimeDigiFirst
private

Time of first digi sent to DAQ.

Definition at line 280 of file CbmStsDigitize.h.

Referenced by CreateDigi(), Finish(), and ResetCounters().

◆ fTimeDigiLast

Double_t CbmStsDigitize::fTimeDigiLast
private

Time of last digi sent to DAQ.

Definition at line 281 of file CbmStsDigitize.h.

Referenced by CreateDigi(), Finish(), and ResetCounters().

◆ fTimePointLast

Double_t CbmStsDigitize::fTimePointLast
private

Definition at line 277 of file CbmStsDigitize.h.

◆ fTimer

TStopwatch CbmStsDigitize::fTimer
private

ROOT timer.

Definition at line 242 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fTimeTot

Double_t CbmStsDigitize::fTimeTot = 0.
private

Total execution time.

Definition at line 298 of file CbmStsDigitize.h.

Referenced by Exec(), and Finish().

◆ fTracks

TClonesArray* CbmStsDigitize::fTracks
private

Input array of CbmMCTrack.

Definition at line 241 of file CbmStsDigitize.h.

Referenced by Init(), and ProcessMCEvent().

◆ fUserDinactive

Double_t CbmStsDigitize::fUserDinactive = 0.
private

Size of inactive sensor border [cm].

Definition at line 256 of file CbmStsDigitize.h.

Referenced by InitParams(), and SetGlobalDefaults().

◆ fUserFracDeadChan

Double_t CbmStsDigitize::fUserFracDeadChan = 0.
private

Fraction of inactive ASIC channels.

Definition at line 257 of file CbmStsDigitize.h.

Referenced by InitParams(), and SetGlobalFracDeadChannels().

◆ fUserParAsic

CbmStsParAsic* CbmStsDigitize::fUserParAsic = nullptr
private

User defined, global.

Definition at line 252 of file CbmStsDigitize.h.

Referenced by InitParams(), SetGlobalAsicParams(), and SetGlobalDefaults().

◆ fUserParCond

CbmStsParSensorCond* CbmStsDigitize::fUserParCond = nullptr
private

User defined, global.

Definition at line 255 of file CbmStsDigitize.h.

Referenced by InitParams(), SetGlobalDefaults(), and SetGlobalSensorConditions().

◆ fUserParModule

CbmStsParModule* CbmStsDigitize::fUserParModule = nullptr
private

User defined, global.

Definition at line 253 of file CbmStsDigitize.h.

Referenced by InitParams(), SetGlobalDefaults(), and SetGlobalModuleParams().

◆ fUserParSensor

CbmStsParSensor* CbmStsDigitize::fUserParSensor = nullptr
private

User defined, global.

Definition at line 254 of file CbmStsDigitize.h.

Referenced by InitParams(), and SetGlobalDefaults().

◆ fUserParSim

CbmStsParSim* CbmStsDigitize::fUserParSim = nullptr
private

Settings for simulation.

Definition at line 251 of file CbmStsDigitize.h.

Referenced by InitParams(), SetGlobalDefaults(), SetProcesses(), and UseOnlyPrimaries().


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