Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QAG4SimulationCalorimeterSum Class Reference

#include <coresoftware/blob/master/offline/QA/modules/QAG4SimulationCalorimeterSum.h>

+ Inheritance diagram for QAG4SimulationCalorimeterSum:
+ Collaboration diagram for QAG4SimulationCalorimeterSum:

Public Types

enum  enu_flags { kProcessCluster = 1 << 2, kProcessTrackProj = 1 << 3, kDefaultFlag = kProcessCluster | kProcessTrackProj }
 

Public Member Functions

 QAG4SimulationCalorimeterSum (enu_flags flags=kDefaultFlag)
 
virtual ~QAG4SimulationCalorimeterSum ()
 
int Init (PHCompositeNode *topNode)
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *topNode)
 
uint32_t get_flags () const
 
void set_flags (enu_flags flags)
 
void set_flag (enu_flags flag)
 
bool flag (enu_flags flag)
 
void reset_flag (enu_flags flag)
 
std::string get_histo_prefix ()
 common prefix for QA histograms
 
std::string get_calo_name_cemc () const
 
void set_calo_name_cemc (const std::string &caloNameCemc)
 
std::string get_calo_name_hcalin () const
 
void set_calo_name_hcalin (const std::string &caloNameHcalin)
 
std::string get_calo_name_hcalout () const
 
void set_calo_name_hcalout (const std::string &caloNameHcalout)
 
float get_mag_field () const
 
void set_mag_field (float magField)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int End (PHCompositeNode *)
 Called at the end of all processing.
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int Reset (PHCompositeNode *)
 Reset.
 
virtual int ResetEvent (PHCompositeNode *)
 Clean up after each event.
 
void Print (const std::string &="ALL") const override
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module.
 
virtual void Name (const std::string &name)
 Sets the name of this module.
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual int Verbosity () const
 Gets the verbosity of this module.
 

Private Types

enum  { Max_N_Tower = 11 }
 

Private Member Functions

int Init_Cluster (PHCompositeNode *topNode)
 
int process_event_Cluster (PHCompositeNode *topNode)
 
int Init_TrackProj (PHCompositeNode *topNode)
 
int process_event_TrackProj (PHCompositeNode *topNode)
 
PHG4Particleget_truth_particle ()
 fetch the truth particle to be analyzed. By default it is the last primary particle in truth container (therefore works in single particle embedding)
 
bool eval_trk_proj (const std::string &detector, SvtxTrack *track, PHCompositeNode *topNode)
 fetch tower around track and histogram energy distributions
 

Private Attributes

std::shared_ptr< CaloEvalStack_caloevalstack_cemc
 
std::shared_ptr< CaloEvalStack_caloevalstack_hcalin
 
std::shared_ptr< CaloEvalStack_caloevalstack_hcalout
 
std::shared_ptr< SvtxEvalStack_svtxevalstack
 
uint32_t _flags
 
std::string _calo_name_cemc
 
std::string _calo_name_hcalin
 
std::string _calo_name_hcalout
 
PHG4TruthInfoContainer_truth_container
 
float _magField
 central magnetic field strength in T
 

Additional Inherited Members

- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 

Detailed Description

Definition at line 18 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 18 of file QAG4SimulationCalorimeterSum.h

Member Enumeration Documentation

anonymous enum
private
Enumerator:
Max_N_Tower 

max number of tower row/column to process around a track projection

Definition at line 148 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 148 of file QAG4SimulationCalorimeterSum.h

Enumerator:
kProcessCluster 
kProcessTrackProj 
kDefaultFlag 

Definition at line 21 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 21 of file QAG4SimulationCalorimeterSum.h

Constructor & Destructor Documentation

QAG4SimulationCalorimeterSum::QAG4SimulationCalorimeterSum ( QAG4SimulationCalorimeterSum::enu_flags  flags = kDefaultFlag)

Definition at line 39 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 39 of file QAG4SimulationCalorimeterSum.cc

virtual QAG4SimulationCalorimeterSum::~QAG4SimulationCalorimeterSum ( )
inlinevirtual

Definition at line 32 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 32 of file QAG4SimulationCalorimeterSum.h

Member Function Documentation

bool QAG4SimulationCalorimeterSum::eval_trk_proj ( const std::string &  detector,
SvtxTrack track,
PHCompositeNode topNode 
)
private
bool QAG4SimulationCalorimeterSum::flag ( enu_flags  flag)
inline

Definition at line 57 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 57 of file QAG4SimulationCalorimeterSum.h

References _flags.

Referenced by Init(), InitRun(), and process_event().

+ Here is the caller graph for this function:

std::string QAG4SimulationCalorimeterSum::get_calo_name_cemc ( ) const
inline

Definition at line 73 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 73 of file QAG4SimulationCalorimeterSum.h

References _calo_name_cemc.

std::string QAG4SimulationCalorimeterSum::get_calo_name_hcalin ( ) const
inline

Definition at line 85 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 85 of file QAG4SimulationCalorimeterSum.h

References _calo_name_hcalin.

std::string QAG4SimulationCalorimeterSum::get_calo_name_hcalout ( ) const
inline

Definition at line 97 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 97 of file QAG4SimulationCalorimeterSum.h

References _calo_name_hcalout.

uint32_t QAG4SimulationCalorimeterSum::get_flags ( ) const
inline

Definition at line 39 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 39 of file QAG4SimulationCalorimeterSum.h

References _flags.

std::string QAG4SimulationCalorimeterSum::get_histo_prefix ( )

common prefix for QA histograms

Definition at line 193 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 193 of file QAG4SimulationCalorimeterSum.cc

Referenced by eval_trk_proj(), Init(), Init_Cluster(), Init_TrackProj(), process_event(), process_event_Cluster(), and process_event_TrackProj().

+ Here is the caller graph for this function:

float QAG4SimulationCalorimeterSum::get_mag_field ( ) const
inline

Definition at line 108 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 108 of file QAG4SimulationCalorimeterSum.h

References _magField.

PHG4Particle * QAG4SimulationCalorimeterSum::get_truth_particle ( )
private

fetch the truth particle to be analyzed. By default it is the last primary particle in truth container (therefore works in single particle embedding)

Definition at line 199 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 199 of file QAG4SimulationCalorimeterSum.cc

References _truth_container, assert, and PHG4TruthInfoContainer::GetMap().

Referenced by process_event_Cluster(), and process_event_TrackProj().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationCalorimeterSum::Init ( PHCompositeNode )
virtual

Called during initialization. Typically this is where you can book histograms, and e.g. register them to Fun4AllServer (so they can be output to file using Fun4AllServer::dumpHistos() method).

Reimplemented from SubsysReco.

Definition at line 100 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 100 of file QAG4SimulationCalorimeterSum.cc

References _calo_name_cemc, _calo_name_hcalin, _calo_name_hcalout, assert, Fun4AllReturnCodes::EVENT_OK, flag(), get_histo_prefix(), QAHistManagerDef::getHistoManager(), h, i, Init_Cluster(), Init_TrackProj(), kProcessCluster, kProcessTrackProj, Fun4AllHistoManager::registerHisto(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int QAG4SimulationCalorimeterSum::Init_Cluster ( PHCompositeNode topNode)
private

Definition at line 470 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 470 of file QAG4SimulationCalorimeterSum.cc

References _calo_name_cemc, _calo_name_hcalin, _calo_name_hcalout, assert, Fun4AllReturnCodes::EVENT_OK, get_histo_prefix(), QAHistManagerDef::getHistoManager(), and Fun4AllHistoManager::registerHisto().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationCalorimeterSum::Init_TrackProj ( PHCompositeNode topNode)
private

Definition at line 210 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 210 of file QAG4SimulationCalorimeterSum.cc

References _calo_name_cemc, _calo_name_hcalin, _calo_name_hcalout, assert, Fun4AllReturnCodes::EVENT_OK, get_histo_prefix(), QAHistManagerDef::getHistoManager(), Max_N_Tower, and Fun4AllHistoManager::registerHisto().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationCalorimeterSum::InitRun ( PHCompositeNode )
virtual

Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number.

Reimplemented from SubsysReco.

Definition at line 51 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 51 of file QAG4SimulationCalorimeterSum.cc

References _calo_name_cemc, _calo_name_hcalin, _calo_name_hcalout, _caloevalstack_cemc, _caloevalstack_hcalin, _caloevalstack_hcalout, _svtxevalstack, _truth_container, assert, Fun4AllReturnCodes::EVENT_OK, flag(), kProcessCluster, kProcessTrackProj, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int QAG4SimulationCalorimeterSum::process_event ( PHCompositeNode )
virtual

Called for each event. This is where you do the real work.

Reimplemented from SubsysReco.

Definition at line 143 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 143 of file QAG4SimulationCalorimeterSum.cc

References _caloevalstack_cemc, _caloevalstack_hcalin, _caloevalstack_hcalout, _svtxevalstack, assert, Fun4AllReturnCodes::EVENT_OK, flag(), get_histo_prefix(), Fun4AllHistoManager::getHisto(), QAHistManagerDef::getHistoManager(), kProcessCluster, kProcessTrackProj, process_event_Cluster(), process_event_TrackProj(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int QAG4SimulationCalorimeterSum::process_event_Cluster ( PHCompositeNode topNode)
private

Definition at line 505 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 505 of file QAG4SimulationCalorimeterSum.cc

References _calo_name_cemc, _calo_name_hcalin, _calo_name_hcalout, _caloevalstack_cemc, _caloevalstack_hcalin, _caloevalstack_hcalout, assert, Fun4AllReturnCodes::DISCARDEVENT, Acts::UnitConstants::e, Fun4AllReturnCodes::EVENT_OK, PHG4Particle::get_e(), RawCluster::get_energy(), get_histo_prefix(), get_truth_particle(), Fun4AllHistoManager::getHisto(), QAHistManagerDef::getHistoManager(), h2, and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationCalorimeterSum::process_event_TrackProj ( PHCompositeNode topNode)
private

Definition at line 249 of file QAG4SimulationCalorimeterSum.cc.

View newest version in sPHENIX GitHub at line 249 of file QAG4SimulationCalorimeterSum.cc

References _calo_name_cemc, _calo_name_hcalin, _calo_name_hcalout, _svtxevalstack, assert, SvtxTrackEval::best_track_from(), SvtxTrack::CEMC, Fun4AllReturnCodes::DISCARDEVENT, Acts::UnitConstants::e, eval_trk_proj(), Fun4AllReturnCodes::EVENT_OK, SvtxTrack::get_cal_energy_3x3(), SvtxTrack::get_cal_energy_5x5(), PHG4Particle::get_e(), get_histo_prefix(), get_truth_particle(), Fun4AllHistoManager::getHisto(), QAHistManagerDef::getHistoManager(), SvtxTrack::HCALIN, SvtxTrack::HCALOUT, and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QAG4SimulationCalorimeterSum::reset_flag ( enu_flags  flag)
inline

Definition at line 63 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 63 of file QAG4SimulationCalorimeterSum.h

References _flags.

void QAG4SimulationCalorimeterSum::set_calo_name_cemc ( const std::string &  caloNameCemc)
inline

Definition at line 79 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 79 of file QAG4SimulationCalorimeterSum.h

References _calo_name_cemc.

void QAG4SimulationCalorimeterSum::set_calo_name_hcalin ( const std::string &  caloNameHcalin)
inline

Definition at line 91 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 91 of file QAG4SimulationCalorimeterSum.h

References _calo_name_hcalin.

void QAG4SimulationCalorimeterSum::set_calo_name_hcalout ( const std::string &  caloNameHcalout)
inline

Definition at line 103 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 103 of file QAG4SimulationCalorimeterSum.h

References _calo_name_hcalout.

void QAG4SimulationCalorimeterSum::set_flag ( enu_flags  flag)
inline

Definition at line 51 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 51 of file QAG4SimulationCalorimeterSum.h

References _flags.

void QAG4SimulationCalorimeterSum::set_flags ( enu_flags  flags)
inline

Definition at line 45 of file QAG4SimulationCalorimeterSum.h.

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

References _flags.

void QAG4SimulationCalorimeterSum::set_mag_field ( float  magField)
inline

Definition at line 109 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 109 of file QAG4SimulationCalorimeterSum.h

References _magField.

Member Data Documentation

std::string QAG4SimulationCalorimeterSum::_calo_name_cemc
private
std::string QAG4SimulationCalorimeterSum::_calo_name_hcalin
private
std::string QAG4SimulationCalorimeterSum::_calo_name_hcalout
private
std::shared_ptr<CaloEvalStack> QAG4SimulationCalorimeterSum::_caloevalstack_cemc
private

Definition at line 123 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 123 of file QAG4SimulationCalorimeterSum.h

Referenced by InitRun(), process_event(), and process_event_Cluster().

std::shared_ptr<CaloEvalStack> QAG4SimulationCalorimeterSum::_caloevalstack_hcalin
private

Definition at line 124 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 124 of file QAG4SimulationCalorimeterSum.h

Referenced by InitRun(), process_event(), and process_event_Cluster().

std::shared_ptr<CaloEvalStack> QAG4SimulationCalorimeterSum::_caloevalstack_hcalout
private

Definition at line 125 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 125 of file QAG4SimulationCalorimeterSum.h

Referenced by InitRun(), process_event(), and process_event_Cluster().

uint32_t QAG4SimulationCalorimeterSum::_flags
private

Definition at line 128 of file QAG4SimulationCalorimeterSum.h.

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

Referenced by flag(), get_flags(), reset_flag(), set_flag(), and set_flags().

float QAG4SimulationCalorimeterSum::_magField
private

central magnetic field strength in T

Definition at line 146 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 146 of file QAG4SimulationCalorimeterSum.h

Referenced by get_mag_field(), and set_mag_field().

std::shared_ptr<SvtxEvalStack> QAG4SimulationCalorimeterSum::_svtxevalstack
private

Definition at line 126 of file QAG4SimulationCalorimeterSum.h.

View newest version in sPHENIX GitHub at line 126 of file QAG4SimulationCalorimeterSum.h

Referenced by InitRun(), process_event(), and process_event_TrackProj().

PHG4TruthInfoContainer* QAG4SimulationCalorimeterSum::_truth_container
private

Definition at line 134 of file QAG4SimulationCalorimeterSum.h.

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

Referenced by get_truth_particle(), and InitRun().


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