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 ()
 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

const cbm::algo::RecoSetupUnit_t< ToCbmModuleId(DetID)> * fpDetInterface = 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.
 
std::unordered_map< uint32_t, double > fTofRpcZpos
 
ca::Random fRandom {1}
 < z-position of TOF RPCs (filled only for TOF)
 
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 64 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 66 of file CbmCaIdealHitProducerDet.h.

◆ Point_t

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

Definition at line 67 of file CbmCaIdealHitProducerDet.h.

Constructor & Destructor Documentation

◆ IdealHitProducerDet() [1/3]

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

◆ ~IdealHitProducerDet()

template<ca::EDetectorID DetID>
IdealHitProducerDet::~IdealHitProducerDet ( )

Destructor.

Definition at line 27 of file CbmCaIdealHitProducerDet.cxx.

References fpBrHitMatchesTmp, and fpBrHitsTmp.

◆ IdealHitProducerDet() [2/3]

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

Copy constructor.

References IdealHitProducerDet().

◆ IdealHitProducerDet() [3/3]

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

Move constructor.

References IdealHitProducerDet().

Member Function Documentation

◆ Exec()

◆ FillPointIsLegit()

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

Fills map of legit points (inside MC event!)

Definition at line 493 of file CbmCaIdealHitProducerDet.cxx.

References cbm::GeoNodeMap::ApplyMask(), fpBrHitMatches, fpBrPoints, fpMCEventList, fTofRpcZpos, fvbPointIsLegit, cbm::algo::ca::kTof, and kTof.

Referenced by Exec().

◆ GetMatchedPointLink()

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

Gets pointer to matched MC point.

Parameters
iHIndex of hit
Returns
link to matched point

Definition at line 254 of file CbmCaIdealHitProducerDet.h.

References fpBrHitMatchesTmp.

Referenced by Exec().

◆ Init()

template<ca::EDetectorID DetID>
InitStatus IdealHitProducerDet::Init ( )

Initialization of the task.

Definition at line 45 of file CbmCaIdealHitProducerDet.cxx.

References fpBrMCTracks, fpMCEventHeader, fpMCEventList, fpRecoEvents, fpTimeSlice, and cbm::RecoSetupManager::Instance().

Referenced by ReInit().

◆ operator=() [1/2]

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

Copy assignment operator.

References IdealHitProducerDet().

◆ operator=() [2/2]

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

Move assignment operator.

References IdealHitProducerDet().

◆ ParseConfig()

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

◆ PushBackHit()

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

Pushes back a hit into the hits branch.

Parameters
pHitPointer to source hit

Definition at line 200 of file CbmCaIdealHitProducerDet.h.

References dpos, fHitCounter, cbm::algo::ca::kMuch, cbm::algo::ca::kMvd, cbm::algo::ca::kSts, cbm::algo::ca::kTof, cbm::algo::ca::kTrd, and pos.

Referenced by Exec().

◆ ReInit()

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

Re-initialization of the task.

Definition at line 91 of file CbmCaIdealHitProducerDet.h.

References 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 102 of file CbmCaIdealHitProducerDet.h.

References fsConfigName.

◆ 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 98 of file CbmCaIdealHitProducerDet.h.

References fRandom.

◆ SmearValue()

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

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 270 of file CbmCaIdealHitProducerDet.h.

References fRandom, and kHitWSize.

Referenced by Exec().

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 186 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec().

◆ fHitCounter

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

Hit counter in a new branch.

Definition at line 189 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), and PushBackHit().

◆ fHitDataType

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

Hit data type.

Definition at line 173 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec().

◆ fpBrHitMatches

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

Branch: array of hit matches.

Definition at line 168 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), and FillPointIsLegit().

◆ fpBrHitMatchesTmp

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

Temporary array of hit matches.

Definition at line 171 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), GetMatchedPointLink(), and ~IdealHitProducerDet().

◆ fpBrHits

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

Branch: array of hits.

Definition at line 167 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec().

◆ fpBrHitsTmp

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

Temporary array of hits.

Definition at line 170 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), and ~IdealHitProducerDet().

◆ fpBrMCTracks

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

Branch: array of MC tracks.

Definition at line 165 of file CbmCaIdealHitProducerDet.h.

Referenced by Init().

◆ fpBrPoints

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

Branch: array of MC points.

Definition at line 164 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), and FillPointIsLegit().

◆ fpDetInterface

template<ca::EDetectorID DetID>
const cbm::algo::RecoSetupUnit_t<ToCbmModuleId(DetID)>* cbm::ca::IdealHitProducerDet< DetID >::fpDetInterface = nullptr
private

Detector interface.

Definition at line 157 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), and ParseConfig().

◆ fpMCEventHeader

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

MC event header.

Definition at line 163 of file CbmCaIdealHitProducerDet.h.

Referenced by Init().

◆ fpMCEventList

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

MC event list.

Definition at line 162 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), FillPointIsLegit(), and Init().

◆ fpRecoEvents

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

Array of reconstructed events.

Definition at line 161 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), and Init().

◆ fpTimeSlice

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

Current time slice.

Definition at line 160 of file CbmCaIdealHitProducerDet.h.

Referenced by Init().

◆ fRandom

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

< z-position of TOF RPCs (filled only for TOF)

Random generator

Definition at line 183 of file CbmCaIdealHitProducerDet.h.

Referenced by SetRandomSeed(), and SmearValue().

◆ fsConfigName

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

Name of configuration file.

Definition at line 175 of file CbmCaIdealHitProducerDet.h.

Referenced by ParseConfig(), and SetConfigName().

◆ fTofRpcZpos

template<ca::EDetectorID DetID>
std::unordered_map<uint32_t, double> cbm::ca::IdealHitProducerDet< DetID >::fTofRpcZpos
private

Definition at line 181 of file CbmCaIdealHitProducerDet.h.

Referenced by FillPointIsLegit().

◆ fvbPointIsLegit

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

Map of used point index.

Definition at line 179 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), and FillPointIsLegit().

◆ fvStationPars

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

Parameters, stored for each station.

Definition at line 177 of file CbmCaIdealHitProducerDet.h.

Referenced by Exec(), and ParseConfig().

◆ kHitWSize

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

half-width for the bounded gaussian [sigma]

Definition at line 105 of file CbmCaIdealHitProducerDet.h.

Referenced by SmearValue().


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