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

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

+ Inheritance diagram for TrackEvaluation:
+ Collaboration diagram for TrackEvaluation:

Public Types

enum  Flags { EvalEvent = 1 << 0, EvalClusters = 1 << 1, EvalTracks = 1 << 2 }
 

Public Member Functions

 TrackEvaluation (const std::string &="TrackEvaluation")
 constructor
 
int Init (PHCompositeNode *) override
 global initialization
 
int InitRun (PHCompositeNode *) override
 run initialization
 
int process_event (PHCompositeNode *) override
 event processing
 
int End (PHCompositeNode *) override
 end of processing
 
void set_flags (int flags)
 set flags. Should be a bitwise or of Flags enum
 
- 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.
 
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 * >
 
using G4HitMap = std::map< TrkrDefs::cluskey, G4HitSet >
 

Private Member Functions

int load_nodes (PHCompositeNode *)
 load nodes
 
void evaluate_event ()
 evaluate event
 
void evaluate_clusters ()
 evaluate clusters
 
void evaluate_tracks ()
 evaluate tracks
 
G4HitSet find_g4hits (TrkrDefs::cluskey) const
 
G4HitSet find_g4hits (TrkrDefs::cluskey, int id) const
 
std::pair< int, int > get_max_contributor (SvtxTrack *) const
 get G4Particle id of max contributor to a given track
 
int get_embed (PHG4Particle *) const
 get embedded id for given g4track
 
TrackEvaluationContainerv1::ClusterStruct create_cluster (TrkrDefs::cluskey, TrkrCluster *, SvtxTrack *) const
 create cluster structure from cluster
 
void add_trk_information (TrackEvaluationContainerv1::ClusterStruct &, SvtxTrackState *) const
 add track information to a cluster
 
void add_trk_information_micromegas (TrackEvaluationContainerv1::ClusterStruct &, int, SvtxTrackState *) const
 add track information to a cluster for the micromegas case
 
void add_truth_information (TrackEvaluationContainerv1::ClusterStruct &, const std::set< PHG4Hit * > &) const
 
void add_truth_information_micromegas (TrackEvaluationContainerv1::ClusterStruct &, int, const std::set< PHG4Hit * > &) const
 

Private Attributes

TrackEvaluationContainerv1m_container = nullptr
 evaluation node
 
int m_flags = EvalEvent | EvalClusters | EvalTracks
 flags
 
ActsGeometrym_tGeometry = nullptr
 Acts tracking geometry for surface lookup.
 
TrkrHitSetContainerm_hitsetcontainer = nullptr
 hits
 
TrkrClusterContainerm_cluster_map = nullptr
 clusters
 
TrkrClusterHitAssocm_cluster_hit_map = nullptr
 cluster to hit association
 
TrkrHitTruthAssocm_hit_truth_map = nullptr
 hit to truth association
 
SvtxTrackMapm_track_map = nullptr
 tracks
 
PHG4TruthInfoContainerm_g4truthinfo = nullptr
 truth information
 
PHG4TpcCylinderGeomContainerm_tpc_geom_container = nullptr
 tpc geometry
 
PHG4CylinderGeomContainerm_micromegas_geom_container = nullptr
 micromegas geometry
 
G4HitMap m_g4hit_map
 
ClusterErrorPara _ClusErrPara
 
geant4 hits
PHG4HitContainerm_g4hits_tpc = nullptr
 
PHG4HitContainerm_g4hits_intt = nullptr
 
PHG4HitContainerm_g4hits_mvtx = nullptr
 
PHG4HitContainerm_g4hits_micromegas = nullptr
 

Additional Inherited Members

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

Detailed Description

Definition at line 38 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 38 of file TrackEvaluation.h

Member Typedef Documentation

Definition at line 158 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 158 of file TrackEvaluation.h

Definition at line 83 of file TrackEvaluation.h.

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

Member Enumeration Documentation

Enumerator:
EvalEvent 
EvalClusters 
EvalTracks 

Definition at line 56 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 56 of file TrackEvaluation.h

Constructor & Destructor Documentation

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

constructor

Definition at line 358 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 358 of file TrackEvaluation.cc

Member Function Documentation

void TrackEvaluation::add_trk_information ( TrackEvaluationContainerv1::ClusterStruct cluster,
SvtxTrackState state 
) const
private
void TrackEvaluation::add_trk_information_micromegas ( TrackEvaluationContainerv1::ClusterStruct cluster,
int  tileid,
SvtxTrackState state 
) const
private

add track information to a cluster for the micromegas case

the difference between this and the generic method is that the track state to the tiles detector plane, and not to the same radius as the cluster

Definition at line 889 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 889 of file TrackEvaluation.cc

References assert, SvtxTrackState::get_phi_error(), SvtxTrackState::get_px(), SvtxTrackState::get_py(), SvtxTrackState::get_pz(), QAG4Util::get_r(), SvtxTrackState::get_x(), SvtxTrackState::get_y(), SvtxTrackState::get_z(), SvtxTrackState::get_z_error(), PHG4CylinderGeomContainer::GetLayerGeom(), TrackEvaluationContainerv1::ClusterStruct::layer, layer, m_micromegas_geom_container, m_tGeometry, TrackEvaluationContainerv1::ClusterStruct::trk_alpha, TrackEvaluationContainerv1::ClusterStruct::trk_beta, TrackEvaluationContainerv1::ClusterStruct::trk_phi, TrackEvaluationContainerv1::ClusterStruct::trk_phi_error, TrackEvaluationContainerv1::ClusterStruct::trk_px, TrackEvaluationContainerv1::ClusterStruct::trk_py, TrackEvaluationContainerv1::ClusterStruct::trk_pz, TrackEvaluationContainerv1::ClusterStruct::trk_r, TrackEvaluationContainerv1::ClusterStruct::trk_x, TrackEvaluationContainerv1::ClusterStruct::trk_y, TrackEvaluationContainerv1::ClusterStruct::trk_z, TrackEvaluationContainerv1::ClusterStruct::trk_z_error, TrackEvaluationContainerv1::ClusterStruct::x, TrackEvaluationContainerv1::ClusterStruct::y, and TrackEvaluationContainerv1::ClusterStruct::z.

Referenced by evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TrackEvaluation::add_truth_information ( TrackEvaluationContainerv1::ClusterStruct cluster,
const std::set< PHG4Hit * > &  g4hits 
) const
private
void TrackEvaluation::add_truth_information_micromegas ( TrackEvaluationContainerv1::ClusterStruct cluster,
int  tileid,
const std::set< PHG4Hit * > &  g4hits 
) const
private

the difference between this and the generic method is that the track state to the tiles detector plane, and not to the same radius as the cluster

Definition at line 1057 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 1057 of file TrackEvaluation.cc

References assert, QAG4Util::get_r(), PHG4CylinderGeomContainer::GetLayerGeom(), i, TrackEvaluationContainerv1::ClusterStruct::layer, layer, m_micromegas_geom_container, m_tGeometry, TrackEvaluationContainerv1::ClusterStruct::truth_alpha, TrackEvaluationContainerv1::ClusterStruct::truth_beta, TrackEvaluationContainerv1::ClusterStruct::truth_phi, TrackEvaluationContainerv1::ClusterStruct::truth_px, TrackEvaluationContainerv1::ClusterStruct::truth_py, TrackEvaluationContainerv1::ClusterStruct::truth_pz, TrackEvaluationContainerv1::ClusterStruct::truth_r, TrackEvaluationContainerv1::ClusterStruct::truth_size, TrackEvaluationContainerv1::ClusterStruct::truth_x, TrackEvaluationContainerv1::ClusterStruct::truth_y, TrackEvaluationContainerv1::ClusterStruct::truth_z, TrackEvaluationContainerv1::ClusterStruct::x, TrackEvaluationContainerv1::ClusterStruct::y, and TrackEvaluationContainerv1::ClusterStruct::z.

Referenced by evaluate_clusters(), and evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TrackEvaluationContainerv1::ClusterStruct TrackEvaluation::create_cluster ( TrkrDefs::cluskey  key,
TrkrCluster cluster,
SvtxTrack track 
) const
private

create cluster structure from cluster

Definition at line 792 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 792 of file TrackEvaluation.cc

References ClusterErrorPara::get_cluster_error(), ClusterErrorPara::get_clusterv5_modified_error(), TrackSeed::get_qOverR(), QAG4Util::get_r(), SvtxTrack::get_silicon_seed(), TrackSeed::get_slope(), SvtxTrack::get_tpc_seed(), ActsGeometry::getGlobalPosition(), TrkrDefs::getLayer(), TrkrCluster::getRPhiError(), TrkrCluster::getZError(), TrackEvaluationContainerv1::ClusterStruct::layer, m_tGeometry, TrackEvaluationContainerv1::ClusterStruct::para_phi_error, TrackEvaluationContainerv1::ClusterStruct::para_z_error, TrackEvaluationContainerv1::ClusterStruct::phi, TrackEvaluationContainerv1::ClusterStruct::phi_error, TrackEvaluationContainerv1::ClusterStruct::r, physmon_track_finding_ttbar::r, TrackEvaluationContainerv1::ClusterStruct::trk_alpha, TrackEvaluationContainerv1::ClusterStruct::trk_beta, TrackEvaluationContainerv1::ClusterStruct::trk_radius, TrackEvaluationContainerv1::ClusterStruct::x, TrackEvaluationContainerv1::ClusterStruct::y, TrackEvaluationContainerv1::ClusterStruct::z, and TrackEvaluationContainerv1::ClusterStruct::z_error.

Referenced by evaluate_clusters(), and evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TrackEvaluation::End ( PHCompositeNode )
overridevirtual

end of processing

Reimplemented from SubsysReco.

Definition at line 436 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 436 of file TrackEvaluation.cc

References Fun4AllReturnCodes::EVENT_OK.

void TrackEvaluation::evaluate_clusters ( )
private

evaluate clusters

Definition at line 536 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 536 of file TrackEvaluation.cc

References add_truth_information(), add_truth_information_micromegas(), TrackEvaluationContainerv1::addCluster(), TrackEvaluationContainerv1::clearClusters(), create_cluster(), find_g4hits(), TrkrClusterContainer::getClusters(), TrkrClusterContainer::getHitSetKeys(), MicromegasDefs::getTileId(), TrkrDefs::getTrkrId(), m_cluster_hit_map, m_cluster_map, m_container, m_hitsetcontainer, and TrkrDefs::micromegasId.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TrackEvaluation::evaluate_event ( )
private

evaluate event

Definition at line 490 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 490 of file TrackEvaluation.cc

References TrackEvaluationContainerv1::addEvent(), assert, clusters, distance(), event, TrkrClusterContainer::getClusters(), TrkrClusterContainer::getHitSetKeys(), TrkrDefs::getLayer(), TrkrDefs::getTrkrId(), TrkrDefs::inttId, layer, m_cluster_map, m_container, TrackEvaluationContainerv1::EventStruct::max_layer, TrkrDefs::micromegasId, TrkrDefs::mvtxId, and TrkrDefs::tpcId.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TrackEvaluation::evaluate_tracks ( )
private

evaluate tracks

Definition at line 576 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 576 of file TrackEvaluation.cc

References add_trk_information(), add_trk_information_micromegas(), add_truth_information(), add_truth_information_micromegas(), TrackEvaluationContainerv1::addTrack(), TrackEvaluationContainerv1::clearTracks(), create_cluster(), find_g4hits(), TrkrClusterContainer::findCluster(), TrackAnalysisUtils::get_cluster_keys(), get_embed(), get_max_contributor(), QAG4Util::get_r(), PHG4TruthInfoContainer::GetParticle(), MicromegasDefs::getTileId(), TrkrDefs::getTrkrId(), train_ambiguity_solver::id, m_cluster_hit_map, m_cluster_map, m_container, m_g4truthinfo, m_hitsetcontainer, m_track_map, and TrkrDefs::micromegasId.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 663 of file TrackEvaluation.cc.

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

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

Referenced by evaluate_clusters(), evaluate_tracks(), and get_max_contributor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4HitSet TrackEvaluation::find_g4hits ( TrkrDefs::cluskey  ,
int  id 
) const
private
int TrackEvaluation::get_embed ( PHG4Particle particle) const
private

get embedded id for given g4track

Definition at line 786 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 786 of file TrackEvaluation.cc

References PHG4Particle::get_primary_id(), PHG4TruthInfoContainer::isEmbeded(), and m_g4truthinfo.

Referenced by evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::pair< int, int > TrackEvaluation::get_max_contributor ( SvtxTrack track) const
private

get G4Particle id of max contributor to a given track

Definition at line 743 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 743 of file TrackEvaluation.cc

References find_g4hits(), TrackAnalysisUtils::get_cluster_keys(), m_cluster_map, m_g4truthinfo, and m_track_map.

Referenced by evaluate_tracks().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TrackEvaluation::Init ( PHCompositeNode topNode)
overridevirtual

global initialization

Reimplemented from SubsysReco.

Definition at line 364 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 364 of file TrackEvaluation.cc

References Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, and PHNodeIterator::findFirst().

+ Here is the call graph for this function:

int TrackEvaluation::InitRun ( PHCompositeNode )
overridevirtual

run initialization

Reimplemented from SubsysReco.

Definition at line 393 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 393 of file TrackEvaluation.cc

References Fun4AllReturnCodes::EVENT_OK.

int TrackEvaluation::load_nodes ( PHCompositeNode topNode)
private

load nodes

Definition at line 442 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 442 of file TrackEvaluation.cc

References assert, Fun4AllReturnCodes::EVENT_OK, m_cluster_hit_map, m_cluster_map, m_container, m_g4hits_intt, m_g4hits_micromegas, m_g4hits_mvtx, m_g4hits_tpc, m_g4truthinfo, m_hit_truth_map, m_hitsetcontainer, m_micromegas_geom_container, m_tGeometry, m_tpc_geom_container, and m_track_map.

Referenced by process_event().

+ Here is the caller graph for this function:

int TrackEvaluation::process_event ( PHCompositeNode topNode)
overridevirtual

event processing

Reimplemented from SubsysReco.

Definition at line 399 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 399 of file TrackEvaluation.cc

References EvalClusters, EvalEvent, EvalTracks, evaluate_clusters(), evaluate_event(), evaluate_tracks(), Fun4AllReturnCodes::EVENT_OK, load_nodes(), m_container, m_flags, m_g4hit_map, and TrackEvaluationContainerv1::Reset().

+ Here is the call graph for this function:

void TrackEvaluation::set_flags ( int  flags)
inline

set flags. Should be a bitwise or of Flags enum

Definition at line 64 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 64 of file TrackEvaluation.h

References m_flags.

Member Data Documentation

ClusterErrorPara TrackEvaluation::_ClusErrPara
private

Definition at line 160 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 160 of file TrackEvaluation.h

TrkrClusterHitAssoc* TrackEvaluation::m_cluster_hit_map = nullptr
private

cluster to hit association

Definition at line 132 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 132 of file TrackEvaluation.h

Referenced by evaluate_clusters(), evaluate_tracks(), find_g4hits(), and load_nodes().

TrkrClusterContainer* TrackEvaluation::m_cluster_map = nullptr
private

clusters

Definition at line 129 of file TrackEvaluation.h.

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

Referenced by evaluate_clusters(), evaluate_event(), evaluate_tracks(), get_max_contributor(), and load_nodes().

TrackEvaluationContainerv1* TrackEvaluation::m_container = nullptr
private

evaluation node

Definition at line 117 of file TrackEvaluation.h.

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

Referenced by evaluate_clusters(), evaluate_event(), evaluate_tracks(), load_nodes(), and process_event().

int TrackEvaluation::m_flags = EvalEvent | EvalClusters | EvalTracks
private

flags

Definition at line 120 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 120 of file TrackEvaluation.h

Referenced by process_event(), and set_flags().

G4HitMap TrackEvaluation::m_g4hit_map
mutableprivate

Definition at line 159 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 159 of file TrackEvaluation.h

Referenced by find_g4hits(), and process_event().

PHG4HitContainer* TrackEvaluation::m_g4hits_intt = nullptr
private

Definition at line 143 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 143 of file TrackEvaluation.h

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* TrackEvaluation::m_g4hits_micromegas = nullptr
private

Definition at line 145 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 145 of file TrackEvaluation.h

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* TrackEvaluation::m_g4hits_mvtx = nullptr
private

Definition at line 144 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 144 of file TrackEvaluation.h

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* TrackEvaluation::m_g4hits_tpc = nullptr
private

Definition at line 142 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 142 of file TrackEvaluation.h

Referenced by find_g4hits(), and load_nodes().

PHG4TruthInfoContainer* TrackEvaluation::m_g4truthinfo = nullptr
private

truth information

Definition at line 149 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 149 of file TrackEvaluation.h

Referenced by evaluate_tracks(), get_embed(), get_max_contributor(), and load_nodes().

TrkrHitTruthAssoc* TrackEvaluation::m_hit_truth_map = nullptr
private

hit to truth association

Definition at line 135 of file TrackEvaluation.h.

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

Referenced by find_g4hits(), and load_nodes().

TrkrHitSetContainer* TrackEvaluation::m_hitsetcontainer = nullptr
private

hits

Definition at line 126 of file TrackEvaluation.h.

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

Referenced by evaluate_clusters(), evaluate_tracks(), and load_nodes().

PHG4CylinderGeomContainer* TrackEvaluation::m_micromegas_geom_container = nullptr
private

micromegas geometry

Definition at line 155 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 155 of file TrackEvaluation.h

Referenced by add_trk_information_micromegas(), add_truth_information_micromegas(), and load_nodes().

ActsGeometry* TrackEvaluation::m_tGeometry = nullptr
private

Acts tracking geometry for surface lookup.

Definition at line 123 of file TrackEvaluation.h.

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

Referenced by add_trk_information_micromegas(), add_truth_information_micromegas(), create_cluster(), and load_nodes().

PHG4TpcCylinderGeomContainer* TrackEvaluation::m_tpc_geom_container = nullptr
private

tpc geometry

Definition at line 152 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 152 of file TrackEvaluation.h

Referenced by add_truth_information(), and load_nodes().

SvtxTrackMap* TrackEvaluation::m_track_map = nullptr
private

tracks

Definition at line 138 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 138 of file TrackEvaluation.h

Referenced by evaluate_tracks(), get_max_contributor(), and load_nodes().


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