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

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

+ Inheritance diagram for QAG4SimulationKFParticle:
+ Collaboration diagram for QAG4SimulationKFParticle:

Public Member Functions

 QAG4SimulationKFParticle (const std::string &name, const std::string &mother_name, double min_m, double max_m)
 
virtual ~QAG4SimulationKFParticle ()=default
 
int Init (PHCompositeNode *topNode)
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *topNode)
 
std::string get_histo_prefix ()
 
void setTrackMapName (const std::string &name)
 
- 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.
 

Protected Attributes

SvtxClusterEvalclustereval = nullptr
 
int m_mother_id = 0
 
double m_min_mass = 0.
 
double m_max_mass = 10.
 
std::string m_mother_name
 

Private Member Functions

int load_nodes (PHCompositeNode *)
 
SvtxTrackgetTrack (unsigned int track_id, SvtxTrackMap *trackmap)
 
PHG4ParticlegetTruthTrack (SvtxTrack *thisTrack)
 
CLHEP::HepLorentzVector * makeHepLV (PHCompositeNode *topNode, int track_number)
 

Private Attributes

PHG4TruthInfoContainerm_truthContainer = nullptr
 
std::unique_ptr< SvtxEvalStackm_svtxEvalStack
 
SvtxTrackMapm_trackMap = nullptr
 
PHG4TruthInfoContainerm_truthInfo = nullptr
 
KFParticle_Containerm_kfpContainer = nullptr
 
std::map< std::string,
std::pair< int, float > > 
particleMasses
 
std::string m_trackMapName = "SvtxTrackMap"
 

Additional Inherited Members

- Public Types inherited from Fun4AllBase
enum  enu_Verbosity {
  VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3,
  VERBOSITY_A_LOT = 4, VERBOSITY_MAX = std::numeric_limits<int>::max() - 10
}
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 

Detailed Description

Definition at line 26 of file QAG4SimulationKFParticle.h.

View newest version in sPHENIX GitHub at line 26 of file QAG4SimulationKFParticle.h

Constructor & Destructor Documentation

QAG4SimulationKFParticle::QAG4SimulationKFParticle ( const std::string &  name,
const std::string &  mother_name,
double  min_m,
double  max_m 
)

Definition at line 55 of file QAG4SimulationKFParticle.cc.

View newest version in sPHENIX GitHub at line 55 of file QAG4SimulationKFParticle.cc

References KFParticle_Tools::getParticleID(), m_max_mass, m_min_mass, m_mother_id, and m_mother_name.

+ Here is the call graph for this function:

virtual QAG4SimulationKFParticle::~QAG4SimulationKFParticle ( )
virtualdefault

Member Function Documentation

std::string QAG4SimulationKFParticle::get_histo_prefix ( )

Definition at line 416 of file QAG4SimulationKFParticle.cc.

View newest version in sPHENIX GitHub at line 416 of file QAG4SimulationKFParticle.cc

References m_trackMapName, and Fun4AllBase::Name().

Referenced by Init(), and process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SvtxTrack * QAG4SimulationKFParticle::getTrack ( unsigned int  track_id,
SvtxTrackMap trackmap 
)
private

Definition at line 318 of file QAG4SimulationKFParticle.cc.

View newest version in sPHENIX GitHub at line 318 of file QAG4SimulationKFParticle.cc

References SvtxTrackMap::begin(), and SvtxTrackMap::end().

Referenced by makeHepLV(), and process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHG4Particle * QAG4SimulationKFParticle::getTruthTrack ( SvtxTrack thisTrack)
private

Definition at line 332 of file QAG4SimulationKFParticle.cc.

View newest version in sPHENIX GitHub at line 332 of file QAG4SimulationKFParticle.cc

References SvtxTrack::begin_cluster_keys(), clustereval, m_svtxEvalStack, SvtxClusterEval::max_truth_particle_by_cluster_energy(), and particle.

Referenced by makeHepLV().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationKFParticle::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 89 of file QAG4SimulationKFParticle.cc.

View newest version in sPHENIX GitHub at line 89 of file QAG4SimulationKFParticle.cc

References assert, Fun4AllReturnCodes::EVENT_OK, get_histo_prefix(), QAHistManagerDef::getHistoManager(), h, m_max_mass, m_min_mass, and Fun4AllHistoManager::registerHisto().

+ Here is the call graph for this function:

int QAG4SimulationKFParticle::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 64 of file QAG4SimulationKFParticle.cc.

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

References Fun4AllReturnCodes::ABORTRUN, Fun4AllReturnCodes::EVENT_OK, m_svtxEvalStack, m_trackMap, m_trackMapName, m_truthInfo, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int QAG4SimulationKFParticle::load_nodes ( PHCompositeNode topNode)
private

Definition at line 395 of file QAG4SimulationKFParticle.cc.

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

References assert, Fun4AllReturnCodes::EVENT_OK, m_kfpContainer, m_mother_name, and m_truthContainer.

Referenced by process_event().

+ Here is the caller graph for this function:

CLHEP::HepLorentzVector * QAG4SimulationKFParticle::makeHepLV ( PHCompositeNode topNode,
int  track_number 
)
private

Definition at line 345 of file QAG4SimulationKFParticle.cc.

View newest version in sPHENIX GitHub at line 345 of file QAG4SimulationKFParticle.cc

References assert, PHHepMCGenEventMap::get(), PHG4Particle::get_barcode(), SvtxTrack::get_px(), SvtxTrack::get_py(), SvtxTrack::get_pz(), PHHepMCGenEvent::getEvent(), KFParticle_Tools::getParticleMass(), getTrack(), getTruthTrack(), m_mother_id, m_trackMap, and merge_hashes::p.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationKFParticle::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 153 of file QAG4SimulationKFParticle.cc.

View newest version in sPHENIX GitHub at line 153 of file QAG4SimulationKFParticle.cc

References assert, KFParticle_Container::begin(), KFParticle_Container::end(), Fun4AllReturnCodes::EVENT_OK, get_histo_prefix(), SvtxTrack::get_id(), Fun4AllHistoManager::getHisto(), QAHistManagerDef::getHistoManager(), getTrack(), i, j, load_nodes(), m_kfpContainer, m_mother_id, m_svtxEvalStack, m_trackMap, KFParticle_Tools::makeAllPrimaryVertices(), makeHepLV(), KFParticle_Container::returnParticlesByPDGid(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void QAG4SimulationKFParticle::setTrackMapName ( const std::string &  name)
inline

Definition at line 39 of file QAG4SimulationKFParticle.h.

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

References m_trackMapName, and perf_headwind::name.

Member Data Documentation

SvtxClusterEval* QAG4SimulationKFParticle::clustereval = nullptr
protected

Definition at line 42 of file QAG4SimulationKFParticle.h.

View newest version in sPHENIX GitHub at line 42 of file QAG4SimulationKFParticle.h

Referenced by getTruthTrack().

KFParticle_Container* QAG4SimulationKFParticle::m_kfpContainer = nullptr
private

Definition at line 61 of file QAG4SimulationKFParticle.h.

View newest version in sPHENIX GitHub at line 61 of file QAG4SimulationKFParticle.h

Referenced by load_nodes(), and process_event().

double QAG4SimulationKFParticle::m_max_mass = 10.
protected

Definition at line 45 of file QAG4SimulationKFParticle.h.

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

Referenced by Init(), and QAG4SimulationKFParticle().

double QAG4SimulationKFParticle::m_min_mass = 0.
protected

Definition at line 44 of file QAG4SimulationKFParticle.h.

View newest version in sPHENIX GitHub at line 44 of file QAG4SimulationKFParticle.h

Referenced by Init(), and QAG4SimulationKFParticle().

int QAG4SimulationKFParticle::m_mother_id = 0
protected

Definition at line 43 of file QAG4SimulationKFParticle.h.

View newest version in sPHENIX GitHub at line 43 of file QAG4SimulationKFParticle.h

Referenced by makeHepLV(), process_event(), and QAG4SimulationKFParticle().

std::string QAG4SimulationKFParticle::m_mother_name
protected

Definition at line 46 of file QAG4SimulationKFParticle.h.

View newest version in sPHENIX GitHub at line 46 of file QAG4SimulationKFParticle.h

Referenced by load_nodes(), and QAG4SimulationKFParticle().

std::unique_ptr<SvtxEvalStack> QAG4SimulationKFParticle::m_svtxEvalStack
private

Definition at line 57 of file QAG4SimulationKFParticle.h.

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

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

SvtxTrackMap* QAG4SimulationKFParticle::m_trackMap = nullptr
private

Definition at line 59 of file QAG4SimulationKFParticle.h.

View newest version in sPHENIX GitHub at line 59 of file QAG4SimulationKFParticle.h

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

std::string QAG4SimulationKFParticle::m_trackMapName = "SvtxTrackMap"
private

Definition at line 63 of file QAG4SimulationKFParticle.h.

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

Referenced by get_histo_prefix(), InitRun(), and setTrackMapName().

PHG4TruthInfoContainer* QAG4SimulationKFParticle::m_truthContainer = nullptr
private

Definition at line 55 of file QAG4SimulationKFParticle.h.

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

Referenced by load_nodes().

PHG4TruthInfoContainer* QAG4SimulationKFParticle::m_truthInfo = nullptr
private

Definition at line 60 of file QAG4SimulationKFParticle.h.

View newest version in sPHENIX GitHub at line 60 of file QAG4SimulationKFParticle.h

Referenced by InitRun().

std::map<std::string, std::pair<int, float> > QAG4SimulationKFParticle::particleMasses
private

Definition at line 62 of file QAG4SimulationKFParticle.h.

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


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