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

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

+ Inheritance diagram for SvtxTruthRecoTableEval:
+ Collaboration diagram for SvtxTruthRecoTableEval:

Public Member Functions

 SvtxTruthRecoTableEval (const std::string &name="SvtxTruthRecoTableEval")
 
virtual ~SvtxTruthRecoTableEval ()
 
int Init (PHCompositeNode *) override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int ResetEvent (PHCompositeNode *topNode) override
 Clean up after each event.
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
void setMinMomentumTruthMap (const double v)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int Reset (PHCompositeNode *)
 Reset.
 
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 Member Functions

int createNodes (PHCompositeNode *topNode)
 
void fillTruthMap (PHCompositeNode *topNode)
 
void fillRecoMap (PHCompositeNode *topNode)
 

Private Attributes

bool m_scanForPrimaries = false
 
double m_minMomentumTruthMap = 50e-3
 
PHG4ParticleSvtxMapm_truthMap = nullptr
 
SvtxPHG4ParticleMapm_recoMap = nullptr
 
std::unique_ptr< SvtxEvalStackm_svtxevalstack
 

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 16 of file SvtxTruthRecoTableEval.h.

View newest version in sPHENIX GitHub at line 16 of file SvtxTruthRecoTableEval.h

Constructor & Destructor Documentation

SvtxTruthRecoTableEval::SvtxTruthRecoTableEval ( const std::string &  name = "SvtxTruthRecoTableEval")

Definition at line 29 of file SvtxTruthRecoTableEval.cc.

View newest version in sPHENIX GitHub at line 29 of file SvtxTruthRecoTableEval.cc

SvtxTruthRecoTableEval::~SvtxTruthRecoTableEval ( )
virtualdefault

Member Function Documentation

int SvtxTruthRecoTableEval::createNodes ( PHCompositeNode topNode)
private

Definition at line 214 of file SvtxTruthRecoTableEval.cc.

View newest version in sPHENIX GitHub at line 214 of file SvtxTruthRecoTableEval.cc

References PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), m_recoMap, and m_truthMap.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int SvtxTruthRecoTableEval::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 101 of file SvtxTruthRecoTableEval.cc.

View newest version in sPHENIX GitHub at line 101 of file SvtxTruthRecoTableEval.cc

References Fun4AllReturnCodes::EVENT_OK.

void SvtxTruthRecoTableEval::fillRecoMap ( PHCompositeNode topNode)
private

Definition at line 176 of file SvtxTruthRecoTableEval.cc.

View newest version in sPHENIX GitHub at line 176 of file SvtxTruthRecoTableEval.cc

References SvtxTrackEval::all_truth_particles(), assert, SvtxTrackEval::get_nclusters_contribution(), SvtxPHG4ParticleMap::insert(), m_recoMap, m_svtxevalstack, SvtxPHG4ParticleMap::setProcessed(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SvtxTruthRecoTableEval::fillTruthMap ( PHCompositeNode topNode)
private

We fill the map with a key corresponding to the ncluster contribution. This weight could in principle be anything we choose

Definition at line 106 of file SvtxTruthRecoTableEval.cc.

View newest version in sPHENIX GitHub at line 106 of file SvtxTruthRecoTableEval.cc

References SvtxTrackEval::all_tracks_from(), assert, SvtxTrackEval::get_nclusters_contribution(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), PHG4Particle::get_track_id(), PHG4TruthInfoContainer::GetParticleRange(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), gtrackID, PHG4ParticleSvtxMap::insert(), m_minMomentumTruthMap, m_scanForPrimaries, m_svtxevalstack, m_truthMap, momentum, SvtxTrackEval::set_verbosity(), PHG4ParticleSvtxMap::setProcessed(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int SvtxTruthRecoTableEval::Init ( PHCompositeNode )
overridevirtual

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 38 of file SvtxTruthRecoTableEval.cc.

View newest version in sPHENIX GitHub at line 38 of file SvtxTruthRecoTableEval.cc

References Fun4AllReturnCodes::EVENT_OK.

int SvtxTruthRecoTableEval::InitRun ( PHCompositeNode )
overridevirtual

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 44 of file SvtxTruthRecoTableEval.cc.

View newest version in sPHENIX GitHub at line 44 of file SvtxTruthRecoTableEval.cc

References Fun4AllReturnCodes::ABORTEVENT, createNodes(), and Fun4AllReturnCodes::EVENT_OK.

+ Here is the call graph for this function:

int SvtxTruthRecoTableEval::process_event ( PHCompositeNode )
overridevirtual

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

Reimplemented from SubsysReco.

Definition at line 55 of file SvtxTruthRecoTableEval.cc.

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

References Fun4AllReturnCodes::EVENT_OK, fillRecoMap(), fillTruthMap(), m_svtxevalstack, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int SvtxTruthRecoTableEval::ResetEvent ( PHCompositeNode )
overridevirtual

Clean up after each event.

Reimplemented from SubsysReco.

Definition at line 87 of file SvtxTruthRecoTableEval.cc.

View newest version in sPHENIX GitHub at line 87 of file SvtxTruthRecoTableEval.cc

References Fun4AllReturnCodes::EVENT_OK, SvtxPHG4ParticleMap::identify(), PHG4ParticleSvtxMap::identify(), m_recoMap, m_truthMap, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void SvtxTruthRecoTableEval::setMinMomentumTruthMap ( const double  v)
inline

minimal momentum of particle to trigger an analysis and entry into the truth map. default to 50MeV, bending before reaching the active TPC

Definition at line 32 of file SvtxTruthRecoTableEval.h.

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

References m_minMomentumTruthMap, and testSigmaEff::v.

Member Data Documentation

double SvtxTruthRecoTableEval::m_minMomentumTruthMap = 50e-3
private

minimal momentum of particle to trigger an analysis and entry into the truth map. default to 50MeV, bending before reaching the active TPC

Definition at line 44 of file SvtxTruthRecoTableEval.h.

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

Referenced by fillTruthMap(), and setMinMomentumTruthMap().

SvtxPHG4ParticleMap* SvtxTruthRecoTableEval::m_recoMap = nullptr
private

Definition at line 47 of file SvtxTruthRecoTableEval.h.

View newest version in sPHENIX GitHub at line 47 of file SvtxTruthRecoTableEval.h

Referenced by createNodes(), fillRecoMap(), and ResetEvent().

bool SvtxTruthRecoTableEval::m_scanForPrimaries = false
private

Definition at line 40 of file SvtxTruthRecoTableEval.h.

View newest version in sPHENIX GitHub at line 40 of file SvtxTruthRecoTableEval.h

Referenced by fillTruthMap().

std::unique_ptr<SvtxEvalStack> SvtxTruthRecoTableEval::m_svtxevalstack
private

Definition at line 48 of file SvtxTruthRecoTableEval.h.

View newest version in sPHENIX GitHub at line 48 of file SvtxTruthRecoTableEval.h

Referenced by fillRecoMap(), fillTruthMap(), and process_event().

PHG4ParticleSvtxMap* SvtxTruthRecoTableEval::m_truthMap = nullptr
private

Definition at line 46 of file SvtxTruthRecoTableEval.h.

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

Referenced by createNodes(), fillTruthMap(), and ResetEvent().


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