CbmRoot
Loading...
Searching...
No Matches
cbm::ca::IdealHitProducerDet< DetID > Class Template Reference

Ideal hit producer class. More...

#include <CbmCaIdealHitProducerDet.h>

Inheritance diagram for cbm::ca::IdealHitProducerDet< DetID >:
[legend]
Collaboration diagram for cbm::ca::IdealHitProducerDet< DetID >:
[legend]

Classes

struct  HitParameters
 A structure to keep hit adjustment/creation settings for each station. More...
 

Public Types

using Hit_t = HitTypes_t::at<DetID>
 
using Point_t = PointTypes_t::at<DetID>
 

Public Member Functions

 IdealHitProducerDet ()=default
 Constructor.
 
 ~IdealHitProducerDet ()
 Destructor.
 
 IdealHitProducerDet (const IdealHitProducerDet &)=delete
 Copy constructor.
 
 IdealHitProducerDet (IdealHitProducerDet &&)=delete
 Move constructor.
 
IdealHitProducerDetoperator= (const IdealHitProducerDet &)=delete
 Copy assignment operator.
 
IdealHitProducerDetoperator= (IdealHitProducerDet &&)=delete
 Move assignment operator.
 
InitStatus Init ()
 Initialization of the task.
 
InitStatus ReInit ()
 Re-initialization of the task.
 
void Exec (Option_t *option)
 Execution of the task.
 
void SetRandomSeed (int seed)
 Sets random seed (1 by default)
 
void SetConfigName (const char *name)
 Sets YAML configuration file name.
 

Private Member Functions

std::optional< CbmLinkGetMatchedPointLink (int iH)
 Gets pointer to matched MC point.
 
void ParseConfig ()
 Parses the YAML configuration file.
 
void PushBackHit (const Hit_t *pHit)
 Pushes back a hit into the hits branch.
 
void SmearValue (double &value, double sigma, int opt)
 Smears the value by a given standard deviation with a selected function.
 
void FillPointIsLegit (int iEvGlob)
 Fills map of legit points (inside MC event!)
 

Private Attributes

CbmTrackingDetectorInterfaceBasefpDetInterface = nullptr
 Detector interface.
 
CbmTimeSlicefpTimeSlice = nullptr
 Current time slice.
 
TClonesArray * fpRecoEvents = nullptr
 Array of reconstructed events.
 
CbmMCEventListfpMCEventList = nullptr
 MC event list.
 
CbmMCDataObjectfpMCEventHeader = nullptr
 MC event header.
 
CbmMCDataArrayfpBrPoints = nullptr
 Branch: array of MC points.
 
CbmMCDataArrayfpBrMCTracks = nullptr
 Branch: array of MC tracks.
 
TClonesArray * fpBrHits = nullptr
 Branch: array of hits.
 
TClonesArray * fpBrHitMatches = nullptr
 Branch: array of hit matches.
 
TClonesArray * fpBrHitsTmp = nullptr
 Temporary array of hits.
 
TClonesArray * fpBrHitMatchesTmp = nullptr
 Temporary array of hit matches.
 
ECbmDataType fHitDataType = ECbmDataType::kUnknown
 Hit data type.
 
std::string fsConfigName = ""
 Name of configuration file.
 
std::vector< HitParametersfvStationPars
 Parameters, stored for each station.
 
std::vector< unsigned char > fvbPointIsLegit
 Map of used point index.
 
ca::Random fRandom {1}
 Random generator.
 
bool fbRunTheRoutine = true
 Management flag, which does run the routine if there was a request.
 
int fHitCounter = 0
 Hit counter in a new branch.
 

Static Private Attributes

static constexpr double kHitWSize = 3.5
 half-width for the bounded gaussian [sigma]
 

Detailed Description

template<ca::EDetectorID DetID>
class cbm::ca::IdealHitProducerDet< DetID >

Ideal hit producer class.

Definition at line 65 of file CbmCaIdealHitProducerDet.h.

Member Typedef Documentation

◆ Hit_t

template<ca::EDetectorID DetID>
using cbm::ca::IdealHitProducerDet< DetID >::Hit_t = HitTypes_t::at<DetID>

Definition at line 67 of file CbmCaIdealHitProducerDet.h.

◆ Point_t

template<ca::EDetectorID DetID>
using cbm::ca::IdealHitProducerDet< DetID >::Point_t = PointTypes_t::at<DetID>

Definition at line 68 of file CbmCaIdealHitProducerDet.h.

Constructor & Destructor Documentation

◆ IdealHitProducerDet() [1/3]

template<ca::EDetectorID DetID>
cbm::ca::IdealHitProducerDet< DetID >::IdealHitProducerDet ( )
default

Constructor.

◆ ~IdealHitProducerDet()

Destructor.

Definition at line 199 of file CbmCaIdealHitProducerDet.h.

◆ IdealHitProducerDet() [2/3]

template<ca::EDetectorID DetID>
cbm::ca::IdealHitProducerDet< DetID >::IdealHitProducerDet ( const IdealHitProducerDet< DetID > & )
delete

Copy constructor.

◆ IdealHitProducerDet() [3/3]

template<ca::EDetectorID DetID>
cbm::ca::IdealHitProducerDet< DetID >::IdealHitProducerDet ( IdealHitProducerDet< DetID > && )
delete

Move constructor.

Member Function Documentation

◆ Exec()

◆ FillPointIsLegit()

template<ca::EDetectorID DetID>
void cbm::ca::IdealHitProducerDet< DetID >::FillPointIsLegit ( int iEvGlob)
private

Fills map of legit points (inside MC event!)

Definition at line 745 of file CbmCaIdealHitProducerDet.h.

◆ GetMatchedPointLink()

template<ca::EDetectorID DetID>
std::optional< CbmLink > cbm::ca::IdealHitProducerDet< DetID >::GetMatchedPointLink ( int iH)
private

Gets pointer to matched MC point.

Parameters
iHIndex of hit
Returns
link to matched point

Definition at line 470 of file CbmCaIdealHitProducerDet.h.

◆ Init()

◆ operator=() [1/2]

template<ca::EDetectorID DetID>
IdealHitProducerDet & cbm::ca::IdealHitProducerDet< DetID >::operator= ( const IdealHitProducerDet< DetID > & )
delete

Copy assignment operator.

◆ operator=() [2/2]

template<ca::EDetectorID DetID>
IdealHitProducerDet & cbm::ca::IdealHitProducerDet< DetID >::operator= ( IdealHitProducerDet< DetID > && )
delete

Move assignment operator.

◆ ParseConfig()

template<ca::EDetectorID DetID>
void cbm::ca::IdealHitProducerDet< DetID >::ParseConfig ( )
private

Parses the YAML configuration file.

Definition at line 324 of file CbmCaIdealHitProducerDet.h.

◆ PushBackHit()

template<ca::EDetectorID DetID>
void cbm::ca::IdealHitProducerDet< DetID >::PushBackHit ( const Hit_t * pHit)
private

Pushes back a hit into the hits branch.

Parameters
pHitPointer to source hit

Definition at line 416 of file CbmCaIdealHitProducerDet.h.

References dpos, and pos.

◆ ReInit()

template<ca::EDetectorID DetID>
InitStatus cbm::ca::IdealHitProducerDet< DetID >::ReInit ( )
inline

Re-initialization of the task.

Definition at line 92 of file CbmCaIdealHitProducerDet.h.

References cbm::ca::IdealHitProducerDet< DetID >::Init().

◆ SetConfigName()

template<ca::EDetectorID DetID>
void cbm::ca::IdealHitProducerDet< DetID >::SetConfigName ( const char * name)
inline

Sets YAML configuration file name.

Parameters
nameName of the configuration file

Definition at line 103 of file CbmCaIdealHitProducerDet.h.

References cbm::ca::IdealHitProducerDet< DetID >::fsConfigName.

Referenced by cbm::ca::IdealHitProducer::SetConfigName().

◆ SetRandomSeed()

template<ca::EDetectorID DetID>
void cbm::ca::IdealHitProducerDet< DetID >::SetRandomSeed ( int seed)
inline

Sets random seed (1 by default)

Parameters
seedRandom seed

Definition at line 99 of file CbmCaIdealHitProducerDet.h.

References cbm::ca::IdealHitProducerDet< DetID >::fRandom, and cbm::algo::ca::Random::SetSeed().

◆ SmearValue()

template<ca::EDetectorID DetID>
void cbm::ca::IdealHitProducerDet< DetID >::SmearValue ( double & value,
double sigma,
int opt )
private

Smears the value by a given standard deviation with a selected function.

Parameters
valueValue to be smeared
sigmaValue of the standard deviation
optFunction (0 - BoundedGaus, 1 - Uniform)

Definition at line 486 of file CbmCaIdealHitProducerDet.h.

Member Data Documentation

◆ fbRunTheRoutine

template<ca::EDetectorID DetID>
bool cbm::ca::IdealHitProducerDet< DetID >::fbRunTheRoutine = true
private

Management flag, which does run the routine if there was a request.

Definition at line 185 of file CbmCaIdealHitProducerDet.h.

◆ fHitCounter

template<ca::EDetectorID DetID>
int cbm::ca::IdealHitProducerDet< DetID >::fHitCounter = 0
private

Hit counter in a new branch.

Definition at line 188 of file CbmCaIdealHitProducerDet.h.

◆ fHitDataType

template<ca::EDetectorID DetID>
ECbmDataType cbm::ca::IdealHitProducerDet< DetID >::fHitDataType = ECbmDataType::kUnknown
private

Hit data type.

Definition at line 174 of file CbmCaIdealHitProducerDet.h.

◆ fpBrHitMatches

template<ca::EDetectorID DetID>
TClonesArray* cbm::ca::IdealHitProducerDet< DetID >::fpBrHitMatches = nullptr
private

Branch: array of hit matches.

Definition at line 169 of file CbmCaIdealHitProducerDet.h.

◆ fpBrHitMatchesTmp

template<ca::EDetectorID DetID>
TClonesArray* cbm::ca::IdealHitProducerDet< DetID >::fpBrHitMatchesTmp = nullptr
private

Temporary array of hit matches.

Definition at line 172 of file CbmCaIdealHitProducerDet.h.

◆ fpBrHits

template<ca::EDetectorID DetID>
TClonesArray* cbm::ca::IdealHitProducerDet< DetID >::fpBrHits = nullptr
private

Branch: array of hits.

Definition at line 168 of file CbmCaIdealHitProducerDet.h.

◆ fpBrHitsTmp

template<ca::EDetectorID DetID>
TClonesArray* cbm::ca::IdealHitProducerDet< DetID >::fpBrHitsTmp = nullptr
private

Temporary array of hits.

Definition at line 171 of file CbmCaIdealHitProducerDet.h.

◆ fpBrMCTracks

template<ca::EDetectorID DetID>
CbmMCDataArray* cbm::ca::IdealHitProducerDet< DetID >::fpBrMCTracks = nullptr
private

Branch: array of MC tracks.

Definition at line 166 of file CbmCaIdealHitProducerDet.h.

◆ fpBrPoints

template<ca::EDetectorID DetID>
CbmMCDataArray* cbm::ca::IdealHitProducerDet< DetID >::fpBrPoints = nullptr
private

Branch: array of MC points.

Definition at line 165 of file CbmCaIdealHitProducerDet.h.

◆ fpDetInterface

template<ca::EDetectorID DetID>
CbmTrackingDetectorInterfaceBase* cbm::ca::IdealHitProducerDet< DetID >::fpDetInterface = nullptr
private

Detector interface.

Definition at line 158 of file CbmCaIdealHitProducerDet.h.

◆ fpMCEventHeader

template<ca::EDetectorID DetID>
CbmMCDataObject* cbm::ca::IdealHitProducerDet< DetID >::fpMCEventHeader = nullptr
private

MC event header.

Definition at line 164 of file CbmCaIdealHitProducerDet.h.

◆ fpMCEventList

template<ca::EDetectorID DetID>
CbmMCEventList* cbm::ca::IdealHitProducerDet< DetID >::fpMCEventList = nullptr
private

MC event list.

Definition at line 163 of file CbmCaIdealHitProducerDet.h.

◆ fpRecoEvents

template<ca::EDetectorID DetID>
TClonesArray* cbm::ca::IdealHitProducerDet< DetID >::fpRecoEvents = nullptr
private

Array of reconstructed events.

Definition at line 162 of file CbmCaIdealHitProducerDet.h.

◆ fpTimeSlice

template<ca::EDetectorID DetID>
CbmTimeSlice* cbm::ca::IdealHitProducerDet< DetID >::fpTimeSlice = nullptr
private

Current time slice.

Definition at line 161 of file CbmCaIdealHitProducerDet.h.

◆ fRandom

template<ca::EDetectorID DetID>
ca::Random cbm::ca::IdealHitProducerDet< DetID >::fRandom {1}
private

Random generator.

Definition at line 182 of file CbmCaIdealHitProducerDet.h.

Referenced by cbm::ca::IdealHitProducerDet< DetID >::SetRandomSeed().

◆ fsConfigName

template<ca::EDetectorID DetID>
std::string cbm::ca::IdealHitProducerDet< DetID >::fsConfigName = ""
private

Name of configuration file.

Definition at line 176 of file CbmCaIdealHitProducerDet.h.

Referenced by cbm::ca::IdealHitProducerDet< DetID >::SetConfigName().

◆ fvbPointIsLegit

template<ca::EDetectorID DetID>
std::vector<unsigned char> cbm::ca::IdealHitProducerDet< DetID >::fvbPointIsLegit
private

Map of used point index.

Definition at line 180 of file CbmCaIdealHitProducerDet.h.

◆ fvStationPars

template<ca::EDetectorID DetID>
std::vector<HitParameters> cbm::ca::IdealHitProducerDet< DetID >::fvStationPars
private

Parameters, stored for each station.

Definition at line 178 of file CbmCaIdealHitProducerDet.h.

◆ kHitWSize

template<ca::EDetectorID DetID>
double cbm::ca::IdealHitProducerDet< DetID >::kHitWSize = 3.5
staticconstexprprivate

half-width for the bounded gaussian [sigma]

Definition at line 106 of file CbmCaIdealHitProducerDet.h.


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