Belle II Software development
|
Class to organize and present the Monte Carlo hit information. More...
#include <CDCMCMap.h>
Public Member Functions | |
CDCMCMap ()=default | |
Default constructor, needs to be public for initialization in CDCMCManager. | |
CDCMCMap & | operator= (const CDCMCMap &)=delete |
Delete the assignment operator in order to avoid accidental copies. | |
CDCMCMap (CDCMCMap &)=delete | |
For the same reason, also delete copy constructor. | |
void | clear () |
Clear all information from the former event. | |
void | fill () |
Fill the Monte Carlo information retrieved from the DataStore into the local multimaps. | |
MayBePtr< const CDCSimHit > | getSimHit (const CDCHit *hit) const |
Seeks the CDCSimHit related to the CDCHit. | |
MayBePtr< const CDCHit > | getHit (const CDCSimHit *simHit) const |
Seeks the CDCHit related to the CDCSimHit - nullptr if no CDCHit is related. | |
bool | isBackground (const CDCSimHit *simHit) const |
Indicates if the CDCSimHit is considered background. | |
bool | isBackground (const CDCHit *hit) const |
Indicates if the CDCSimHit is considered background. | |
MayBePtr< const MCParticle > | getMCParticle (const CDCHit *hit) const |
Seeks the MCParticle related to the CDCHit. | |
MayBePtr< const MCParticle > | getMCParticle (const CDCSimHit *simHit) const |
Seeks the MCParticle related to the CDCSimHit. | |
auto | getSimHits (const MCParticle *mcParticle) const |
Getter for the range MCParticle to CDCSimHits relations which come from the given MCParticle. | |
auto | getHits (const MCParticle *mcParticle) const |
Getter for the range MCParticle to CDCHits relations which come from the given MCParticle. | |
bool | isReassignedSecondary (const CDCSimHit *ptrSimHit) const |
Indicates if the CDCSimHit has been reassigned to a primary MCParticle. | |
bool | isReassignedSecondary (const CDCHit *ptrHit) const |
Indicates if the CDCHit has been reassigned to a primary MCParticle. | |
const std::set< const CDCHit * > & | getReassignedSecondaryHits () const |
Getter for all reassigned secondary CDCHits. | |
const std::set< const CDCSimHit * > & | getReassignedSecondarySimHits () const |
Getter for all reassigned secondary CDCSimHits. | |
const std::multimap< const CDCHit *, const CDCSimHit * > & | getSimHitsByHit () const |
Getter for the CDCHit -> CDCSimHit relations. | |
const std::multimap< const MCParticle *, const CDCHit * > & | getHitsByMCParticle () const |
Getter for the MCParticle -> CDCHit relations. | |
const std::multimap< const MCParticle *, const CDCSimHit * > & | getSimHitsByMCParticle () const |
Getter for the MCParticle -> CDCSimHit relations. | |
Private Member Functions | |
void | fillSimHitByHitMap () |
Retrieve the relations array from CDCSimHits to CDCHits and fill it in to the local map which does the inverse mapping. | |
void | fillMCParticleByHitMap () |
Retrieve the relations array from MCParticle to CDCHits and fill it in to the local map which does the inverse mapping. | |
void | fillMCParticleBySimHitMap () |
Retrieve the relations array from MCParticle to CDCSimHits and fill it in to the local map which does the inverse mapping. | |
void | validateRelations () const |
Checks if the relations CDCHit -> MCParticle and CDCHit -> CDCSimHit -> MCParticle commute. | |
void | validateReassignedSecondaries () const |
Checks if each CDCHit is marked as reassigned secondary is related to a reassigned secondary CDCSimHit. | |
Static Private Member Functions | |
static bool | indicatesReassignedSecondary (double weight) |
Indicate if the given weight suggests that the corresponding hit to MCParticle relation has been redirected to point to a primary particle instead of the discarded secondary particle. | |
Private Attributes | |
std::multimap< const CDCHit *, const CDCSimHit * > | m_simHitsByHit |
Memory for a one to one relation from CDCHit to CDCSimHits. | |
std::multimap< const MCParticle *, const CDCHit * > | m_hitsByMCParticle |
Memory for a one to n relation from MCParticles to CDCHit. | |
std::multimap< const MCParticle *, const CDCSimHit * > | m_simHitsByMCParticle |
Memory for a one to n relation from MCParticles to CDCSimHit. | |
std::set< const CDCHit * > | m_reassignedSecondaryHits |
The set of reassigned secondary CDCHits. | |
std::set< const CDCSimHit * > | m_reassignedSecondarySimHits |
The set of reassigned secondary CDCSimHits. | |
Class to organize and present the Monte Carlo hit information.
Definition at line 28 of file CDCMCMap.h.
void clear | ( | ) |
Clear all information from the former event.
Definition at line 32 of file CDCMCMap.cc.
void fill | ( | ) |
Fill the Monte Carlo information retrieved from the DataStore into the local multimaps.
Definition at line 44 of file CDCMCMap.cc.
|
private |
Retrieve the relations array from MCParticle to CDCHits and fill it in to the local map which does the inverse mapping.
Definition at line 103 of file CDCMCMap.cc.
|
private |
Retrieve the relations array from MCParticle to CDCSimHits and fill it in to the local map which does the inverse mapping.
Definition at line 185 of file CDCMCMap.cc.
|
private |
Retrieve the relations array from CDCSimHits to CDCHits and fill it in to the local map which does the inverse mapping.
Definition at line 65 of file CDCMCMap.cc.
Seeks the CDCHit related to the CDCSimHit - nullptr if no CDCHit is related.
Definition at line 254 of file CDCMCMap.cc.
|
inline |
Getter for the range MCParticle to CDCHits relations which come from the given MCParticle.
Definition at line 104 of file CDCMCMap.h.
|
inline |
Getter for the MCParticle -> CDCHit relations.
Definition at line 140 of file CDCMCMap.h.
MayBePtr< const MCParticle > getMCParticle | ( | const CDCHit * | hit | ) | const |
Seeks the MCParticle related to the CDCHit.
Nullptr if no MCParticle is related, this is also the case for background hits.
Definition at line 269 of file CDCMCMap.cc.
MayBePtr< const MCParticle > getMCParticle | ( | const CDCSimHit * | simHit | ) | const |
Seeks the MCParticle related to the CDCSimHit.
Nullptr if no MCParticle is related, this is also the case for background hits.
Definition at line 274 of file CDCMCMap.cc.
|
inline |
Getter for all reassigned secondary CDCHits.
Definition at line 122 of file CDCMCMap.h.
|
inline |
Getter for all reassigned secondary CDCSimHits.
Definition at line 128 of file CDCMCMap.h.
Seeks the CDCSimHit related to the CDCHit.
Definition at line 249 of file CDCMCMap.cc.
|
inline |
Getter for the range MCParticle to CDCSimHits relations which come from the given MCParticle.
Definition at line 98 of file CDCMCMap.h.
Getter for the CDCHit -> CDCSimHit relations.
Definition at line 134 of file CDCMCMap.h.
|
inline |
Getter for the MCParticle -> CDCSimHit relations.
Definition at line 146 of file CDCMCMap.h.
|
inlinestaticprivate |
Indicate if the given weight suggests that the corresponding hit to MCParticle relation has been redirected to point to a primary particle instead of the discarded secondary particle.
Definition at line 52 of file CDCMCMap.h.
bool isBackground | ( | const CDCHit * | hit | ) | const |
Indicates if the CDCSimHit is considered background.
Definition at line 264 of file CDCMCMap.cc.
bool isBackground | ( | const CDCSimHit * | simHit | ) | const |
Indicates if the CDCSimHit is considered background.
Definition at line 259 of file CDCMCMap.cc.
|
inline |
Indicates if the CDCHit has been reassigned to a primary MCParticle.
Definition at line 116 of file CDCMCMap.h.
|
inline |
Indicates if the CDCSimHit has been reassigned to a primary MCParticle.
Definition at line 110 of file CDCMCMap.h.
|
private |
Checks if each CDCHit is marked as reassigned secondary is related to a reassigned secondary CDCSimHit.
Definition at line 238 of file CDCMCMap.cc.
|
private |
Checks if the relations CDCHit -> MCParticle and CDCHit -> CDCSimHit -> MCParticle commute.
Definition at line 219 of file CDCMCMap.cc.
|
private |
Memory for a one to n relation from MCParticles to CDCHit.
Definition at line 156 of file CDCMCMap.h.
|
private |
The set of reassigned secondary CDCHits.
Definition at line 162 of file CDCMCMap.h.
|
private |
The set of reassigned secondary CDCSimHits.
Definition at line 165 of file CDCMCMap.h.
Memory for a one to one relation from CDCHit to CDCSimHits.
Definition at line 153 of file CDCMCMap.h.
|
private |
Memory for a one to n relation from MCParticles to CDCSimHit.
Definition at line 159 of file CDCMCMap.h.