ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CaloRawTowerEval Class Reference

#include <coresoftware/blob/master/simulation/g4simulation/g4eval/CaloRawTowerEval.h>

+ Collaboration diagram for CaloRawTowerEval:

Public Member Functions

 CaloRawTowerEval (PHCompositeNode *topNode, const std::string &caloname)
 example caloname: CEMC, HCALIN, HCALOUT
 
virtual ~CaloRawTowerEval ()
 
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
 
CaloTruthEvalget_truth_eval ()
 get a copy of the lower level truth eval and its memory cache
 
bool has_reduced_node_pointers ()
 has the eval initialized correctly for reduced sim DST nodes?
 
std::set< PHG4Shower * > all_truth_primary_showers (RawTower *tower)
 what primary showers contributed energy to this tower?
 
PHG4Showermax_truth_primary_shower_by_energy (RawTower *tower)
 which primary shower contributed the most energy to this tower?
 
std::set< RawTower * > all_towers_from (PHG4Shower *primary)
 what towers did this primary shower contribute energy to?
 
RawTowerbest_tower_from (PHG4Shower *primary)
 which tower did this primary shower contribute the most energy to?
 
float get_energy_contribution (RawTower *tower, PHG4Shower *primary)
 how much energy did this primary shower contribute to this tower?
 
std::set< PHG4Particle * > all_truth_primary_particles (RawTower *tower)
 what particles contributed energy to this tower?
 
PHG4Particlemax_truth_primary_particle_by_energy (RawTower *tower)
 which particle contributed the most energy to this tower?
 
std::set< RawTower * > all_towers_from (PHG4Particle *primary)
 what towers did this primary truth particle contribute energy to?
 
RawTowerbest_tower_from (PHG4Particle *primary)
 which tower did the primary truth particle contribute the most energy to?
 
float get_energy_contribution (RawTower *tower, PHG4Particle *primary)
 how much energy did this primary truth particle contribute to this tower?
 
bool has_full_node_pointers ()
 has the eval initialized correctly for full sim DST nodes?
 
std::set< PHG4Hit * > all_truth_hits (RawTower *tower)
 what truth hits contributed energy to this tower?
 

Private Member Functions

void get_node_pointers (PHCompositeNode *topNode)
 

Private Attributes

std::string _caloname
 
CaloTruthEval _trutheval
 
RawTowerContainer_towers
 
PHG4CellContainer_g4cells
 
PHG4HitContainer_g4hits
 
PHG4TruthInfoContainer_truthinfo
 
bool _strict
 
int _verbosity
 
unsigned int _errors
 
bool _do_cache
 
std::map< RawTower *, std::set
< PHG4Shower * > > 
_cache_all_truth_primary_showers
 
std::map< RawTower
*, PHG4Shower * > 
_cache_max_truth_primary_shower_by_energy
 
std::map< PHG4Shower
*, std::set< RawTower * > > 
_cache_all_towers_from_primary_shower
 
std::map< PHG4Shower
*, RawTower * > 
_cache_best_tower_from_primary_shower
 
std::map< std::pair< RawTower
*, PHG4Shower * >, float > 
_cache_get_energy_contribution_primary_shower
 
std::map< RawTower *, std::set
< PHG4Particle * > > 
_cache_all_truth_primary_particles
 
std::map< RawTower
*, PHG4Particle * > 
_cache_max_truth_primary_particle_by_energy
 
std::map< PHG4Particle
*, std::set< RawTower * > > 
_cache_all_towers_from_primary_particle
 
std::map< PHG4Particle
*, RawTower * > 
_cache_best_tower_from_primary_particle
 
std::map< std::pair< RawTower
*, PHG4Particle * >, float > 
_cache_get_energy_contribution_primary_particle
 
std::map< RawTower *, std::set
< PHG4Hit * > > 
_cache_all_truth_hits
 

Detailed Description

Definition at line 23 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 23 of file CaloRawTowerEval.h

Constructor & Destructor Documentation

CaloRawTowerEval::CaloRawTowerEval ( PHCompositeNode topNode,
const std::string &  caloname 
)

example caloname: CEMC, HCALIN, HCALOUT

Definition at line 27 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 27 of file CaloRawTowerEval.cc

References get_node_pointers().

+ Here is the call graph for this function:

CaloRawTowerEval::~CaloRawTowerEval ( )
virtual

Definition at line 53 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 53 of file CaloRawTowerEval.cc

References _errors, and _verbosity.

Member Function Documentation

std::set< RawTower * > CaloRawTowerEval::all_towers_from ( PHG4Shower primary)

what towers did this primary shower contribute energy to?

Definition at line 282 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 282 of file CaloRawTowerEval.cc

References _cache_all_towers_from_primary_shower, _do_cache, _errors, _strict, _towers, _trutheval, all_truth_primary_showers(), PHG4Shower::get_id(), RawTowerContainer::getTowers(), has_reduced_node_pointers(), and CaloTruthEval::is_primary().

Referenced by all_towers_from(), and best_tower_from().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::set< RawTower * > CaloRawTowerEval::all_towers_from ( PHG4Particle primary)

what towers did this primary truth particle contribute energy to?

Definition at line 493 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 493 of file CaloRawTowerEval.cc

References _cache_all_towers_from_primary_particle, _do_cache, _errors, _strict, _trutheval, all_towers_from(), CaloTruthEval::get_primary_particle(), CaloTruthEval::get_primary_shower(), get_truth_eval(), has_reduced_node_pointers(), and CaloTruthEval::is_primary().

+ Here is the call graph for this function:

std::set< PHG4Hit * > CaloRawTowerEval::all_truth_hits ( RawTower tower)

what truth hits contributed energy to this tower?

Definition at line 690 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 690 of file CaloRawTowerEval.cc

References _cache_all_truth_hits, _do_cache, _errors, _g4cells, _g4hits, _strict, PHG4CellContainer::findCell(), PHG4HitContainer::findHit(), RawTower::get_g4cells(), PHG4Cell::get_g4hits(), and has_full_node_pointers().

Referenced by CaloRawClusterEval::all_truth_hits(), and JetRecoEval::all_truth_hits().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::set< PHG4Particle * > CaloRawTowerEval::all_truth_primary_particles ( RawTower tower)

what particles contributed energy to this tower?

Definition at line 395 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 395 of file CaloRawTowerEval.cc

References _cache_all_truth_primary_particles, _do_cache, _errors, _strict, all_truth_primary_showers(), CaloTruthEval::get_primary_particle(), get_truth_eval(), and has_reduced_node_pointers().

Referenced by JetRecoEval::all_truth_particles().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::set< PHG4Shower * > CaloRawTowerEval::all_truth_primary_showers ( RawTower tower)

what primary showers contributed energy to this tower?

Definition at line 102 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 102 of file CaloRawTowerEval.cc

References _cache_all_truth_primary_showers, _do_cache, _errors, _strict, _truthinfo, RawTower::get_g4showers(), PHG4TruthInfoContainer::GetShower(), and has_reduced_node_pointers().

Referenced by all_towers_from(), all_truth_primary_particles(), CaloRawClusterEval::all_truth_primary_showers(), JetRecoEval::all_truth_showers(), and max_truth_primary_shower_by_energy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

RawTower * CaloRawTowerEval::best_tower_from ( PHG4Shower primary)

which tower did this primary shower contribute the most energy to?

Definition at line 219 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 219 of file CaloRawTowerEval.cc

References _cache_best_tower_from_primary_shower, _do_cache, _errors, _strict, _trutheval, all_towers_from(), energy, FLT_MAX, get_energy_contribution(), has_reduced_node_pointers(), and CaloTruthEval::is_primary().

Referenced by best_tower_from().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

RawTower * CaloRawTowerEval::best_tower_from ( PHG4Particle primary)

which tower did the primary truth particle contribute the most energy to?

Definition at line 550 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 550 of file CaloRawTowerEval.cc

References _cache_best_tower_from_primary_particle, _do_cache, _errors, _strict, _trutheval, best_tower_from(), CaloTruthEval::get_primary_particle(), CaloTruthEval::get_primary_shower(), get_truth_eval(), has_reduced_node_pointers(), and CaloTruthEval::is_primary().

+ Here is the call graph for this function:

void CaloRawTowerEval::do_caching ( bool  do_cache)
inline

activate or deactivate the memory caching inside the evaluation module

Definition at line 37 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 37 of file CaloRawTowerEval.h

References _do_cache, _trutheval, and CaloTruthEval::do_caching().

Referenced by CaloRawClusterEval::do_caching().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int CaloRawTowerEval::get_caloid ( )
inline

get the hash id for this calorimeter volume

Definition at line 31 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 31 of file CaloRawTowerEval.h

References CaloTruthEval::get_caloid(), and get_truth_eval().

+ Here is the call graph for this function:

float CaloRawTowerEval::get_energy_contribution ( RawTower tower,
PHG4Shower primary 
)

how much energy did this primary shower contribute to this tower?

Definition at line 350 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 350 of file CaloRawTowerEval.cc

References _cache_get_energy_contribution_primary_shower, _do_cache, _errors, _strict, _trutheval, energy, RawTower::find_g4shower(), RawTower::get_g4showers(), PHG4Shower::get_id(), has_reduced_node_pointers(), and CaloTruthEval::is_primary().

Referenced by best_tower_from(), CaloEvaluator::fillOutputNtuples(), CaloRawClusterEval::get_energy_contribution(), get_energy_contribution(), JetRecoEval::get_energy_contribution(), and max_truth_primary_shower_by_energy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float CaloRawTowerEval::get_energy_contribution ( RawTower tower,
PHG4Particle primary 
)

how much energy did this primary truth particle contribute to this tower?

Definition at line 605 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 605 of file CaloRawTowerEval.cc

References _cache_get_energy_contribution_primary_particle, _do_cache, _errors, _strict, _trutheval, energy, get_energy_contribution(), CaloTruthEval::get_primary_particle(), CaloTruthEval::get_primary_shower(), get_truth_eval(), has_reduced_node_pointers(), and CaloTruthEval::is_primary().

+ Here is the call graph for this function:

unsigned int CaloRawTowerEval::get_errors ( )
inline

get a count of the errors discovered thus far

Definition at line 52 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 52 of file CaloRawTowerEval.h

References _errors, _trutheval, and CaloTruthEval::get_errors().

Referenced by CaloRawClusterEval::get_errors().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaloRawTowerEval::get_node_pointers ( PHCompositeNode topNode)
private

Definition at line 764 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 764 of file CaloRawTowerEval.cc

References _caloname, _g4cells, _g4hits, _towers, and _truthinfo.

Referenced by CaloRawTowerEval(), and next_event().

+ Here is the caller graph for this function:

CaloTruthEval* CaloRawTowerEval::get_truth_eval ( )
inline

get a copy of the lower level truth eval and its memory cache

Definition at line 62 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 62 of file CaloRawTowerEval.h

References _trutheval.

Referenced by all_towers_from(), all_truth_primary_particles(), best_tower_from(), get_caloid(), get_energy_contribution(), CaloRawClusterEval::get_truth_eval(), has_full_node_pointers(), has_reduced_node_pointers(), and max_truth_primary_particle_by_energy().

+ Here is the caller graph for this function:

bool CaloRawTowerEval::has_full_node_pointers ( )

has the eval initialized correctly for full sim DST nodes?

Definition at line 663 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 663 of file CaloRawTowerEval.cc

References _g4cells, _g4hits, _strict, _towers, _truthinfo, and get_truth_eval().

Referenced by all_truth_hits().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool CaloRawTowerEval::has_reduced_node_pointers ( )

has the eval initialized correctly for reduced sim DST nodes?

Definition at line 85 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 85 of file CaloRawTowerEval.cc

References _strict, _towers, _truthinfo, and get_truth_eval().

Referenced by all_towers_from(), all_truth_primary_particles(), all_truth_primary_showers(), best_tower_from(), get_energy_contribution(), max_truth_primary_particle_by_energy(), and max_truth_primary_shower_by_energy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHG4Particle * CaloRawTowerEval::max_truth_primary_particle_by_energy ( RawTower tower)

which particle contributed the most energy to this tower?

Definition at line 452 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 452 of file CaloRawTowerEval.cc

References _cache_max_truth_primary_particle_by_energy, _do_cache, _errors, _strict, CaloTruthEval::get_primary_particle(), get_truth_eval(), has_reduced_node_pointers(), and max_truth_primary_shower_by_energy().

Referenced by CaloEvaluator::fillOutputNtuples(), EventEvaluator::fillOutputNtuples(), and EventEvaluatorEIC::fillOutputNtuples().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHG4Shower * CaloRawTowerEval::max_truth_primary_shower_by_energy ( RawTower tower)

which primary shower contributed the most energy to this tower?

Definition at line 157 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 157 of file CaloRawTowerEval.cc

References _cache_max_truth_primary_shower_by_energy, _do_cache, _errors, _strict, all_truth_primary_showers(), e, FLT_MAX, get_energy_contribution(), and has_reduced_node_pointers().

Referenced by max_truth_primary_particle_by_energy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaloRawTowerEval::next_event ( PHCompositeNode topNode)

reinitialize the eval for a new event

Definition at line 64 of file CaloRawTowerEval.cc.

View newest version in sPHENIX GitHub at line 64 of file CaloRawTowerEval.cc

References _cache_all_towers_from_primary_particle, _cache_all_towers_from_primary_shower, _cache_all_truth_hits, _cache_all_truth_primary_particles, _cache_all_truth_primary_showers, _cache_best_tower_from_primary_particle, _cache_best_tower_from_primary_shower, _cache_get_energy_contribution_primary_particle, _cache_get_energy_contribution_primary_shower, _cache_max_truth_primary_particle_by_energy, _cache_max_truth_primary_shower_by_energy, _trutheval, get_node_pointers(), and CaloTruthEval::next_event().

Referenced by CaloRawClusterEval::next_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaloRawTowerEval::set_strict ( bool  strict)
inline

strict mode will assert when an error is detected non-strict mode will notice and report at the End()

Definition at line 45 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 45 of file CaloRawTowerEval.h

References _strict, _trutheval, and CaloTruthEval::set_strict().

Referenced by CaloRawClusterEval::set_strict().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaloRawTowerEval::set_verbosity ( int  verbosity)
inline

adjust the messaging from the evalutaion module

Definition at line 55 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 55 of file CaloRawTowerEval.h

References _trutheval, _verbosity, and CaloTruthEval::set_verbosity().

Referenced by CaloRawClusterEval::set_verbosity().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::map<PHG4Particle*, std::set<RawTower*> > CaloRawTowerEval::_cache_all_towers_from_primary_particle
private

Definition at line 135 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 135 of file CaloRawTowerEval.h

Referenced by all_towers_from(), and next_event().

std::map<PHG4Shower*, std::set<RawTower*> > CaloRawTowerEval::_cache_all_towers_from_primary_shower
private

Definition at line 129 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 129 of file CaloRawTowerEval.h

Referenced by all_towers_from(), and next_event().

std::map<RawTower*, std::set<PHG4Hit*> > CaloRawTowerEval::_cache_all_truth_hits
private

Definition at line 139 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 139 of file CaloRawTowerEval.h

Referenced by all_truth_hits(), and next_event().

std::map<RawTower*, std::set<PHG4Particle*> > CaloRawTowerEval::_cache_all_truth_primary_particles
private

Definition at line 133 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 133 of file CaloRawTowerEval.h

Referenced by all_truth_primary_particles(), and next_event().

std::map<RawTower*, std::set<PHG4Shower*> > CaloRawTowerEval::_cache_all_truth_primary_showers
private

Definition at line 127 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 127 of file CaloRawTowerEval.h

Referenced by all_truth_primary_showers(), and next_event().

std::map<PHG4Particle*, RawTower*> CaloRawTowerEval::_cache_best_tower_from_primary_particle
private

Definition at line 136 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 136 of file CaloRawTowerEval.h

Referenced by best_tower_from(), and next_event().

std::map<PHG4Shower*, RawTower*> CaloRawTowerEval::_cache_best_tower_from_primary_shower
private

Definition at line 130 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 130 of file CaloRawTowerEval.h

Referenced by best_tower_from(), and next_event().

std::map<std::pair<RawTower*, PHG4Particle*>, float> CaloRawTowerEval::_cache_get_energy_contribution_primary_particle
private

Definition at line 137 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 137 of file CaloRawTowerEval.h

Referenced by get_energy_contribution(), and next_event().

std::map<std::pair<RawTower*, PHG4Shower*>, float> CaloRawTowerEval::_cache_get_energy_contribution_primary_shower
private

Definition at line 131 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 131 of file CaloRawTowerEval.h

Referenced by get_energy_contribution(), and next_event().

std::map<RawTower*, PHG4Particle*> CaloRawTowerEval::_cache_max_truth_primary_particle_by_energy
private

Definition at line 134 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 134 of file CaloRawTowerEval.h

Referenced by max_truth_primary_particle_by_energy(), and next_event().

std::map<RawTower*, PHG4Shower*> CaloRawTowerEval::_cache_max_truth_primary_shower_by_energy
private

Definition at line 128 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 128 of file CaloRawTowerEval.h

Referenced by max_truth_primary_shower_by_energy(), and next_event().

std::string CaloRawTowerEval::_caloname
private

Definition at line 114 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 114 of file CaloRawTowerEval.h

Referenced by get_node_pointers().

PHG4CellContainer* CaloRawTowerEval::_g4cells
private

Definition at line 117 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 117 of file CaloRawTowerEval.h

Referenced by all_truth_hits(), get_node_pointers(), and has_full_node_pointers().

PHG4HitContainer* CaloRawTowerEval::_g4hits
private

Definition at line 118 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 118 of file CaloRawTowerEval.h

Referenced by all_truth_hits(), get_node_pointers(), and has_full_node_pointers().

RawTowerContainer* CaloRawTowerEval::_towers
private

Definition at line 116 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 116 of file CaloRawTowerEval.h

Referenced by all_towers_from(), get_node_pointers(), has_full_node_pointers(), and has_reduced_node_pointers().

CaloTruthEval CaloRawTowerEval::_trutheval
private

Definition at line 115 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 115 of file CaloRawTowerEval.h

Referenced by all_towers_from(), best_tower_from(), do_caching(), get_energy_contribution(), get_errors(), get_truth_eval(), next_event(), set_strict(), and set_verbosity().

PHG4TruthInfoContainer* CaloRawTowerEval::_truthinfo
private

Definition at line 119 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 119 of file CaloRawTowerEval.h

Referenced by all_truth_primary_showers(), get_node_pointers(), has_full_node_pointers(), and has_reduced_node_pointers().

int CaloRawTowerEval::_verbosity
private

Definition at line 122 of file CaloRawTowerEval.h.

View newest version in sPHENIX GitHub at line 122 of file CaloRawTowerEval.h

Referenced by set_verbosity(), and ~CaloRawTowerEval().


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