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

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

+ Inheritance diagram for QAG4SimulationTracking:
+ Collaboration diagram for QAG4SimulationTracking:

Public Member Functions

 QAG4SimulationTracking (const std::string &name="QAG4SimulationTracking")
 
virtual ~QAG4SimulationTracking ()=default
 
int Init (PHCompositeNode *topNode)
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *topNode)
 
std::string get_histo_prefix ()
 
void addEmbeddingID (int embeddingID)
 
void setEtaRange (double low, double high)
 range of the truth track eta to be analyzed
 
void setUniqueTrackingMatch (bool b)
 only count unique truth<->reco track pair in tracking efficiency
 
void set_embed_id_cut (const int id)
 
- 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

using G4HitSet = std::set< PHG4Hit * >
 

Private Member Functions

int load_nodes (PHCompositeNode *)
 load nodes
 
void get_dca (SvtxTrack *track, float &dca3dxy, float &dca3dz, float &dca3dxysigma, float &dca3dzsigma)
 
G4HitSet find_g4hits (TrkrDefs::cluskey) const
 

Private Attributes

std::unique_ptr< SvtxEvalStackm_svtxEvalStack
 
std::set< int > m_embeddingIDs
 
std::pair< double, doublem_etaRange = {-1, 1}
 range of the truth track eta to be analyzed
 
bool m_uniqueTrackingMatch = true
 only count unique truth<->reco track pair in tracking efficiency
 
int m_embed_id_cut = 0
 cut for selecting on foreground
 
PHG4TruthInfoContainerm_truthContainer = nullptr
 
SvtxTrackMapm_trackMap = nullptr
 
GlobalVertexMapm_vertexMap = nullptr
 
TrkrClusterContainerm_cluster_map = nullptr
 
TrkrClusterHitAssocm_cluster_hit_map = nullptr
 
TrkrHitTruthAssocm_hit_truth_map = nullptr
 
PHG4HitContainerm_g4hits_tpc = nullptr
 
PHG4HitContainerm_g4hits_intt = nullptr
 
PHG4HitContainerm_g4hits_mvtx = nullptr
 
PHG4HitContainerm_g4hits_micromegas = nullptr
 

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 27 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 27 of file QAG4SimulationTracking.h

Member Typedef Documentation

Definition at line 67 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 67 of file QAG4SimulationTracking.h

Constructor & Destructor Documentation

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

Definition at line 50 of file QAG4SimulationTracking.cc.

View newest version in sPHENIX GitHub at line 50 of file QAG4SimulationTracking.cc

virtual QAG4SimulationTracking::~QAG4SimulationTracking ( )
virtualdefault

Member Function Documentation

void QAG4SimulationTracking::addEmbeddingID ( int  embeddingID)

If added, only process truth particle associated with the selected list of EmbeddingIDs Call multiple times to add multiple EmbeddingIDs For EmbeddingID<0, all negative embedding IDs are accepted for pile up events.

Definition at line 208 of file QAG4SimulationTracking.cc.

View newest version in sPHENIX GitHub at line 208 of file QAG4SimulationTracking.cc

References m_embeddingIDs.

QAG4SimulationTracking::G4HitSet QAG4SimulationTracking::find_g4hits ( TrkrDefs::cluskey  cluster_key) const
private

Definition at line 716 of file QAG4SimulationTracking.cc.

View newest version in sPHENIX GitHub at line 716 of file QAG4SimulationTracking.cc

References assert, PHG4HitContainer::findHit(), TrkrHitTruthAssoc::getG4Hits(), TrkrClusterHitAssoc::getHits(), TrkrDefs::getHitSetKeyFromClusKey(), TrkrDefs::getTrkrId(), TrkrDefs::inttId, m_cluster_hit_map, m_g4hits_intt, m_g4hits_micromegas, m_g4hits_mvtx, m_g4hits_tpc, m_hit_truth_map, TrkrDefs::micromegasId, TrkrDefs::mvtxId, out, and TrkrDefs::tpcId.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QAG4SimulationTracking::get_dca ( SvtxTrack track,
float &  dca3dxy,
float &  dca3dz,
float &  dca3dxysigma,
float &  dca3dzsigma 
)
private

Definition at line 660 of file QAG4SimulationTracking.cc.

View newest version in sPHENIX GitHub at line 660 of file QAG4SimulationTracking.cc

References GlobalVertexMap::get(), TrackAnalysisUtils::get_dca(), SvtxTrack::get_vertex_id(), and m_vertexMap.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string QAG4SimulationTracking::get_histo_prefix ( )

Definition at line 711 of file QAG4SimulationTracking.cc.

View newest version in sPHENIX GitHub at line 711 of file QAG4SimulationTracking.cc

References Fun4AllBase::Name().

Referenced by Init(), and process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationTracking::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 77 of file QAG4SimulationTracking.cc.

View newest version in sPHENIX GitHub at line 77 of file QAG4SimulationTracking.cc

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

+ Here is the call graph for this function:

int QAG4SimulationTracking::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 55 of file QAG4SimulationTracking.cc.

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

References Fun4AllReturnCodes::ABORTRUN, Fun4AllReturnCodes::EVENT_OK, m_svtxEvalStack, m_trackMap, m_vertexMap, PHWHERE, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int QAG4SimulationTracking::load_nodes ( PHCompositeNode topNode)
private

load nodes

Definition at line 678 of file QAG4SimulationTracking.cc.

View newest version in sPHENIX GitHub at line 678 of file QAG4SimulationTracking.cc

References assert, Fun4AllReturnCodes::EVENT_OK, m_cluster_hit_map, m_cluster_map, m_g4hits_intt, m_g4hits_micromegas, m_g4hits_mvtx, m_g4hits_tpc, m_hit_truth_map, and m_truthContainer.

Referenced by process_event().

+ Here is the caller graph for this function:

int QAG4SimulationTracking::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 213 of file QAG4SimulationTracking.cc.

View newest version in sPHENIX GitHub at line 213 of file QAG4SimulationTracking.cc

References Fun4AllReturnCodes::ABORTRUN, assert, SvtxTrackMap::begin(), TrackSeed::begin_cluster_keys(), SvtxTrackEval::best_track_from(), SvtxTrackMap::end(), TrackSeed::end_cluster_keys(), Fun4AllReturnCodes::EVENT_OK, find_g4hits(), get_dca(), SvtxTruthEval::get_embed(), get_histo_prefix(), SvtxTrack::get_id(), PHG4Particle::get_pid(), PHG4Particle::get_px(), SvtxTrack::get_px(), PHG4Particle::get_py(), SvtxTrack::get_py(), PHG4Particle::get_pz(), SvtxTrack::get_pz(), SvtxTrack::get_silicon_seed(), SvtxTrack::get_tpc_seed(), PHG4Particle::get_track_id(), geta, TrkrClusterContainer::getClusters(), Fun4AllHistoManager::getHisto(), QAHistManagerDef::getHistoManager(), TrkrClusterContainer::getHitSetKeys(), TrkrDefs::getLayer(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), TrkrDefs::getTrkrId(), gpx, gpy, gpz, PHG4Particle::identify(), TrkrDefs::inttId, layer, load_nodes(), m_cluster_map, m_embed_id_cut, m_embeddingIDs, m_etaRange, m_svtxEvalStack, m_trackMap, m_truthContainer, m_uniqueTrackingMatch, SvtxTrackEval::max_truth_particle_by_nclusters(), TrkrDefs::mvtxId, train_ambiguity_solver::pid, physmon_track_finding_ttbar::pt, TrkrDefs::tpcId, testSigmaEff::v, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void QAG4SimulationTracking::set_embed_id_cut ( const int  id)
inline

Definition at line 58 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 58 of file QAG4SimulationTracking.h

References train_ambiguity_solver::id, and m_embed_id_cut.

void QAG4SimulationTracking::setEtaRange ( double  low,
double  high 
)
inline

range of the truth track eta to be analyzed

Definition at line 46 of file QAG4SimulationTracking.h.

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

References m_etaRange.

void QAG4SimulationTracking::setUniqueTrackingMatch ( bool  b)
inline

only count unique truth<->reco track pair in tracking efficiency

Definition at line 53 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 53 of file QAG4SimulationTracking.h

References KFPMath::b, and m_uniqueTrackingMatch.

Member Data Documentation

TrkrClusterHitAssoc* QAG4SimulationTracking::m_cluster_hit_map = nullptr
private

Definition at line 87 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 87 of file QAG4SimulationTracking.h

Referenced by find_g4hits(), and load_nodes().

TrkrClusterContainer* QAG4SimulationTracking::m_cluster_map = nullptr
private

Definition at line 86 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 86 of file QAG4SimulationTracking.h

Referenced by load_nodes(), and process_event().

int QAG4SimulationTracking::m_embed_id_cut = 0
private

cut for selecting on foreground

Definition at line 80 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 80 of file QAG4SimulationTracking.h

Referenced by process_event(), and set_embed_id_cut().

std::set<int> QAG4SimulationTracking::m_embeddingIDs
private

Definition at line 71 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 71 of file QAG4SimulationTracking.h

Referenced by addEmbeddingID(), and process_event().

std::pair<double, double> QAG4SimulationTracking::m_etaRange = {-1, 1}
private

range of the truth track eta to be analyzed

Definition at line 74 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 74 of file QAG4SimulationTracking.h

Referenced by process_event(), and setEtaRange().

PHG4HitContainer* QAG4SimulationTracking::m_g4hits_intt = nullptr
private

Definition at line 91 of file QAG4SimulationTracking.h.

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

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* QAG4SimulationTracking::m_g4hits_micromegas = nullptr
private

Definition at line 93 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 93 of file QAG4SimulationTracking.h

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* QAG4SimulationTracking::m_g4hits_mvtx = nullptr
private

Definition at line 92 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 92 of file QAG4SimulationTracking.h

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* QAG4SimulationTracking::m_g4hits_tpc = nullptr
private

Definition at line 90 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 90 of file QAG4SimulationTracking.h

Referenced by find_g4hits(), and load_nodes().

TrkrHitTruthAssoc* QAG4SimulationTracking::m_hit_truth_map = nullptr
private

Definition at line 88 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 88 of file QAG4SimulationTracking.h

Referenced by find_g4hits(), and load_nodes().

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

Definition at line 70 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 70 of file QAG4SimulationTracking.h

Referenced by InitRun(), and process_event().

SvtxTrackMap* QAG4SimulationTracking::m_trackMap = nullptr
private

Definition at line 83 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 83 of file QAG4SimulationTracking.h

Referenced by InitRun(), and process_event().

PHG4TruthInfoContainer* QAG4SimulationTracking::m_truthContainer = nullptr
private

Definition at line 82 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 82 of file QAG4SimulationTracking.h

Referenced by load_nodes(), and process_event().

bool QAG4SimulationTracking::m_uniqueTrackingMatch = true
private

only count unique truth<->reco track pair in tracking efficiency

Definition at line 77 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 77 of file QAG4SimulationTracking.h

Referenced by process_event(), and setUniqueTrackingMatch().

GlobalVertexMap* QAG4SimulationTracking::m_vertexMap = nullptr
private

Definition at line 84 of file QAG4SimulationTracking.h.

View newest version in sPHENIX GitHub at line 84 of file QAG4SimulationTracking.h

Referenced by get_dca(), and InitRun().


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