EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
#include <fun4all_coresoftware/blob/master/simulation/g4simulation/g4eval/CaloTruthEval.h>
Public Member Functions | |
CaloTruthEval (PHCompositeNode *topNode, const std::string &caloname) | |
example caloname: CEMC, HCALIN, HCALOUT | |
virtual | ~CaloTruthEval () |
int | get_caloid () |
get the hash id for this calorimeter volume | |
void | next_event (PHCompositeNode *topNode) |
reinitialize the eval for a new event | |
void | do_caching (bool do_cache) |
activate or deactivate the memory caching inside the evaluation module | |
void | set_strict (bool strict) |
unsigned int | get_errors () |
get a count of the errors discovered thus far | |
void | set_verbosity (int verbosity) |
adjust the messaging from the evalutaion module | |
bool | has_reduced_node_pointers () |
has the eval initialized correctly for reduced sim DST nodes? | |
PHG4Shower * | get_primary_shower (PHG4Shower *shower) |
what was the primary shower associated with the shower object? | |
PHG4Shower * | get_primary_shower (PHG4Particle *particle) |
what was the primary shower associated with the shower object? | |
PHG4Particle * | get_primary_particle (PHG4Shower *shower) |
what was the primary particle associated with the shower object? | |
PHG4Particle * | get_primary_particle (PHG4Particle *particle) |
what was the primary particle associated with another or same particle? | |
int | get_embed (PHG4Particle *particle) |
what was the embed flag passed with this particle? | |
PHG4VtxPoint * | get_vertex (PHG4Particle *particle) |
what was particle's creation point? | |
bool | are_same_shower (PHG4Shower *s1, PHG4Shower *s2) |
are these two pointers in fact the same shower? | |
bool | are_same_particle (PHG4Particle *p1, PHG4Particle *p2) |
are these two pointers in fact the same particle? | |
bool | are_same_vertex (PHG4VtxPoint *vtx1, PHG4VtxPoint *vtx2) |
are these two pointers in fact the same vertex? | |
bool | is_primary (PHG4Shower *shower) |
is this a primary shower? | |
bool | is_primary (PHG4Particle *particle) |
is this a primary particle? | |
float | get_shower_energy_deposit (PHG4Particle *primary) |
how much energy did this primary and its shower deposit in the calo volume? | |
float | get_shower_eh_ratio (PHG4Particle *primary) |
what was the electron/hadron radio of energy deposits inside the calo colume? | |
bool | has_full_node_pointers () |
has the eval initialized correctly for full sim DST nodes? | |
std::set< PHG4Hit * > | all_truth_hits (PHG4Shower *shower) |
what truth hits are contained within this shower entry in this calo volume? | |
std::set< PHG4Hit * > | all_truth_hits (PHG4Particle *particle) |
what truth hits were left behind by this particle in this calo volume? | |
PHG4Particle * | get_parent_particle (PHG4Hit *g4hit) |
what particle created this truth hit? | |
PHG4Particle * | get_primary_particle (PHG4Hit *g4hit) |
what primary particle was responsible for this truth hit? | |
bool | is_g4hit_from_particle (PHG4Hit *g4hit, PHG4Particle *particle) |
did this particle create this truth hit? | |
std::set< PHG4Hit * > | get_shower_hits_from_primary (PHG4Particle *primary) |
what truth hits are the result of this primary particle and its shower | |
Private Member Functions | |
void | get_node_pointers (PHCompositeNode *topNode) |
Private Attributes | |
BaseTruthEval | _basetrutheval |
std::string | _caloname |
int | _caloid |
PHG4TruthInfoContainer * | _truthinfo |
PHG4HitContainer * | _g4hits |
int | _g4hit_container_id |
bool | _strict |
int | _verbosity |
unsigned int | _errors |
bool | _do_cache |
std::map< PHG4Particle *, float > | _cache_get_shower_energy_deposit |
std::map< PHG4Shower *, std::set< PHG4Hit * > > | _cache_all_truth_hits_g4shower |
std::map< PHG4Particle *, std::set< PHG4Hit * > > | _cache_all_truth_hits_g4particle |
std::map< PHG4Hit *, PHG4Particle * > | _cache_get_primary_particle_g4hit |
std::map< PHG4Particle *, std::set< PHG4Hit * > > | _cache_get_shower_hits_from_primary |
Definition at line 19 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 19 of file CaloTruthEval.h
CaloTruthEval::CaloTruthEval | ( | PHCompositeNode * | topNode, |
const std::string & | caloname | ||
) |
example caloname: CEMC, HCALIN, HCALOUT
Definition at line 19 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 19 of file CaloTruthEval.cc
References get_node_pointers().
|
virtual |
Definition at line 39 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 39 of file CaloTruthEval.cc
References _errors, and _verbosity.
std::set< PHG4Hit * > CaloTruthEval::all_truth_hits | ( | PHG4Shower * | shower | ) |
what truth hits are contained within this shower entry in this calo volume?
Definition at line 224 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 224 of file CaloTruthEval.cc
References _cache_all_truth_hits_g4shower, _do_cache, _errors, _g4hit_container_id, _g4hits, _strict, PHG4Shower::end_g4hit_id(), PHG4Shower::find_g4hit_id(), PHG4HitContainer::findHit(), and has_full_node_pointers().
Referenced by get_shower_hits_from_primary().
std::set< PHG4Hit * > CaloTruthEval::all_truth_hits | ( | PHG4Particle * | particle | ) |
what truth hits were left behind by this particle in this calo volume?
Definition at line 284 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 284 of file CaloTruthEval.cc
References _cache_all_truth_hits_g4particle, _do_cache, _errors, _g4hits, _strict, PHG4HitContainer::getHits(), has_full_node_pointers(), and is_g4hit_from_particle().
bool CaloTruthEval::are_same_particle | ( | PHG4Particle * | p1, |
PHG4Particle * | p2 | ||
) |
are these two pointers in fact the same particle?
Definition at line 110 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 110 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::are_same_particle().
bool CaloTruthEval::are_same_shower | ( | PHG4Shower * | s1, |
PHG4Shower * | s2 | ||
) |
are these two pointers in fact the same shower?
Definition at line 105 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 105 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::are_same_shower().
bool CaloTruthEval::are_same_vertex | ( | PHG4VtxPoint * | vtx1, |
PHG4VtxPoint * | vtx2 | ||
) |
are these two pointers in fact the same vertex?
Definition at line 115 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 115 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::are_same_vertex().
|
inline |
activate or deactivate the memory caching inside the evaluation module
Definition at line 33 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 33 of file CaloTruthEval.h
References _do_cache.
Referenced by CaloRawTowerEval::do_caching().
|
inline |
get the hash id for this calorimeter volume
Definition at line 27 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 27 of file CaloTruthEval.h
References _caloid.
Referenced by CaloEvaluator::fillOutputNtuples(), CaloEvalStack::get_caloid(), CaloRawClusterEval::get_caloid(), CaloRawTowerEval::get_caloid(), and get_shower_eh_ratio().
int CaloTruthEval::get_embed | ( | PHG4Particle * | particle | ) |
what was the embed flag passed with this particle?
Definition at line 95 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 95 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::get_embed().
Referenced by CaloEvaluator::fillOutputNtuples(), and CaloEvaluator::printOutputInfo().
|
inline |
get a count of the errors discovered thus far
Definition at line 44 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 44 of file CaloTruthEval.h
References _errors.
Referenced by CaloRawTowerEval::get_errors().
|
private |
Definition at line 440 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 440 of file CaloTruthEval.cc
References _caloname, _g4hit_container_id, _g4hits, _truthinfo, PHG4HitDefs::get_volume_id(), and name.
Referenced by CaloTruthEval(), and next_event().
PHG4Particle * CaloTruthEval::get_parent_particle | ( | PHG4Hit * | g4hit | ) |
what particle created this truth hit?
Definition at line 334 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 334 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::get_particle().
PHG4Particle * CaloTruthEval::get_primary_particle | ( | PHG4Shower * | shower | ) |
what was the primary particle associated with the shower object?
Definition at line 85 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 85 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::get_primary_particle().
Referenced by CaloRawClusterEval::all_clusters_from(), CaloRawTowerEval::all_towers_from(), CaloRawClusterEval::all_truth_primary_particles(), CaloRawTowerEval::all_truth_primary_particles(), CaloRawClusterEval::best_cluster_from(), CaloRawTowerEval::best_tower_from(), CaloRawClusterEval::get_energy_contribution(), CaloRawTowerEval::get_energy_contribution(), get_shower_energy_deposit(), get_shower_hits_from_primary(), CaloRawClusterEval::max_truth_primary_particle_by_energy(), and CaloRawTowerEval::max_truth_primary_particle_by_energy().
PHG4Particle * CaloTruthEval::get_primary_particle | ( | PHG4Particle * | particle | ) |
what was the primary particle associated with another or same particle?
Definition at line 90 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 90 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::get_primary_particle().
PHG4Particle * CaloTruthEval::get_primary_particle | ( | PHG4Hit * | g4hit | ) |
what primary particle was responsible for this truth hit?
Definition at line 339 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 339 of file CaloTruthEval.cc
References _basetrutheval, _cache_get_primary_particle_g4hit, _do_cache, _errors, _strict, BaseTruthEval::get_primary_particle(), and has_full_node_pointers().
PHG4Shower * CaloTruthEval::get_primary_shower | ( | PHG4Shower * | shower | ) |
what was the primary shower associated with the shower object?
Definition at line 75 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 75 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::get_primary_shower().
Referenced by CaloRawClusterEval::all_clusters_from(), CaloRawTowerEval::all_towers_from(), JetTruthEval::all_truth_showers(), CaloRawClusterEval::best_cluster_from(), CaloRawTowerEval::best_tower_from(), CaloEvaluator::fillOutputNtuples(), CaloRawClusterEval::get_energy_contribution(), CaloRawTowerEval::get_energy_contribution(), get_shower_eh_ratio(), get_shower_energy_deposit(), and get_shower_hits_from_primary().
PHG4Shower * CaloTruthEval::get_primary_shower | ( | PHG4Particle * | particle | ) |
what was the primary shower associated with the shower object?
Definition at line 80 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 80 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::get_primary_shower().
float CaloTruthEval::get_shower_eh_ratio | ( | PHG4Particle * | primary | ) |
what was the electron/hadron radio of energy deposits inside the calo colume?
Definition at line 181 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 181 of file CaloTruthEval.cc
References _errors, _strict, get_caloid(), PHG4Shower::get_eh_ratio(), get_primary_shower(), has_full_node_pointers(), is_primary(), and ratio.
float CaloTruthEval::get_shower_energy_deposit | ( | PHG4Particle * | primary | ) |
how much energy did this primary and its shower deposit in the calo volume?
Definition at line 130 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 130 of file CaloTruthEval.cc
References _cache_get_shower_energy_deposit, _do_cache, _errors, _g4hit_container_id, _strict, PHG4Shower::get_edep(), get_primary_particle(), get_primary_shower(), has_reduced_node_pointers(), and is_primary().
Referenced by CaloEvaluator::fillOutputNtuples(), and CaloEvaluator::printOutputInfo().
std::set< PHG4Hit * > CaloTruthEval::get_shower_hits_from_primary | ( | PHG4Particle * | primary | ) |
what truth hits are the result of this primary particle and its shower
Definition at line 388 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 388 of file CaloTruthEval.cc
References _cache_get_shower_hits_from_primary, _do_cache, _errors, _strict, all_truth_hits(), get_primary_particle(), get_primary_shower(), has_full_node_pointers(), and is_primary().
PHG4VtxPoint * CaloTruthEval::get_vertex | ( | PHG4Particle * | particle | ) |
what was particle's creation point?
Definition at line 100 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 100 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::get_vertex().
Referenced by CaloEvaluator::fillOutputNtuples(), and CaloEvaluator::printOutputInfo().
bool CaloTruthEval::has_full_node_pointers | ( | ) |
has the eval initialized correctly for full sim DST nodes?
Definition at line 209 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 209 of file CaloTruthEval.cc
References _basetrutheval, _g4hits, _strict, _truthinfo, and BaseTruthEval::has_full_node_pointers().
Referenced by all_truth_hits(), get_primary_particle(), get_shower_eh_ratio(), and get_shower_hits_from_primary().
bool CaloTruthEval::has_reduced_node_pointers | ( | ) |
has the eval initialized correctly for reduced sim DST nodes?
Definition at line 63 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 63 of file CaloTruthEval.cc
References _basetrutheval, _strict, _truthinfo, and BaseTruthEval::has_reduced_node_pointers().
Referenced by get_shower_energy_deposit().
bool CaloTruthEval::is_g4hit_from_particle | ( | PHG4Hit * | g4hit, |
PHG4Particle * | particle | ||
) |
did this particle create this truth hit?
Definition at line 383 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 383 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::is_g4hit_from_particle().
Referenced by all_truth_hits().
bool CaloTruthEval::is_primary | ( | PHG4Shower * | shower | ) |
is this a primary shower?
Definition at line 120 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 120 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::is_primary().
Referenced by CaloRawClusterEval::all_clusters_from(), CaloRawTowerEval::all_towers_from(), CaloRawTowerEval::best_tower_from(), CaloRawTowerEval::get_energy_contribution(), get_shower_eh_ratio(), get_shower_energy_deposit(), and get_shower_hits_from_primary().
bool CaloTruthEval::is_primary | ( | PHG4Particle * | particle | ) |
is this a primary particle?
Definition at line 125 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 125 of file CaloTruthEval.cc
References _basetrutheval, and BaseTruthEval::is_primary().
void CaloTruthEval::next_event | ( | PHCompositeNode * | topNode | ) |
reinitialize the eval for a new event
Definition at line 50 of file CaloTruthEval.cc.
View newest version in sPHENIX GitHub at line 50 of file CaloTruthEval.cc
References _basetrutheval, _cache_all_truth_hits_g4particle, _cache_all_truth_hits_g4shower, _cache_get_primary_particle_g4hit, _cache_get_shower_energy_deposit, _cache_get_shower_hits_from_primary, get_node_pointers(), and BaseTruthEval::next_event().
Referenced by CaloRawTowerEval::next_event().
|
inline |
strict mode will assert when an error is detected non-strict mode will notice and report at the End()
Definition at line 37 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 37 of file CaloTruthEval.h
References _basetrutheval, _strict, and BaseTruthEval::set_strict().
Referenced by CaloRawTowerEval::set_strict().
|
inline |
adjust the messaging from the evalutaion module
Definition at line 47 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 47 of file CaloTruthEval.h
References _basetrutheval, _verbosity, and BaseTruthEval::set_verbosity().
Referenced by CaloRawTowerEval::set_verbosity().
|
private |
Definition at line 123 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 123 of file CaloTruthEval.h
Referenced by are_same_particle(), are_same_shower(), are_same_vertex(), get_embed(), get_parent_particle(), get_primary_particle(), get_primary_shower(), get_vertex(), has_full_node_pointers(), has_reduced_node_pointers(), is_g4hit_from_particle(), is_primary(), next_event(), set_strict(), and set_verbosity().
|
private |
Definition at line 138 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 138 of file CaloTruthEval.h
Referenced by all_truth_hits(), and next_event().
|
private |
Definition at line 137 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 137 of file CaloTruthEval.h
Referenced by all_truth_hits(), and next_event().
|
private |
Definition at line 139 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 139 of file CaloTruthEval.h
Referenced by get_primary_particle(), and next_event().
|
private |
Definition at line 136 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 136 of file CaloTruthEval.h
Referenced by get_shower_energy_deposit(), and next_event().
|
private |
Definition at line 140 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 140 of file CaloTruthEval.h
Referenced by get_shower_hits_from_primary(), and next_event().
|
private |
Definition at line 126 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 126 of file CaloTruthEval.h
Referenced by get_caloid().
|
private |
Definition at line 125 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 125 of file CaloTruthEval.h
Referenced by get_node_pointers().
|
private |
Definition at line 135 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 135 of file CaloTruthEval.h
Referenced by all_truth_hits(), do_caching(), get_primary_particle(), get_shower_energy_deposit(), and get_shower_hits_from_primary().
|
private |
Definition at line 133 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 133 of file CaloTruthEval.h
Referenced by all_truth_hits(), get_errors(), get_primary_particle(), get_shower_eh_ratio(), get_shower_energy_deposit(), get_shower_hits_from_primary(), and ~CaloTruthEval().
|
private |
Definition at line 129 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 129 of file CaloTruthEval.h
Referenced by all_truth_hits(), get_node_pointers(), and get_shower_energy_deposit().
|
private |
Definition at line 128 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 128 of file CaloTruthEval.h
Referenced by all_truth_hits(), get_node_pointers(), and has_full_node_pointers().
|
private |
Definition at line 131 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 131 of file CaloTruthEval.h
Referenced by all_truth_hits(), get_primary_particle(), get_shower_eh_ratio(), get_shower_energy_deposit(), get_shower_hits_from_primary(), has_full_node_pointers(), has_reduced_node_pointers(), and set_strict().
|
private |
Definition at line 127 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 127 of file CaloTruthEval.h
Referenced by get_node_pointers(), has_full_node_pointers(), and has_reduced_node_pointers().
|
private |
Definition at line 132 of file CaloTruthEval.h.
View newest version in sPHENIX GitHub at line 132 of file CaloTruthEval.h
Referenced by set_verbosity(), and ~CaloTruthEval().