EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackEvaluation Class Reference

#include <fun4all_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
 
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 *) 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 &, std::set< PHG4Hit * >) const
 
void add_truth_information_micromegas (TrackEvaluationContainerv1::ClusterStruct &, int, std::set< PHG4Hit * >) const
 

Private Attributes

TrackEvaluationContainerv1m_container = nullptr
 evaluation node
 
int m_flags = EvalEvent | EvalClusters | EvalTracks
 flags
 
ActsSurfaceMapsm_surfmaps = nullptr
 Acts surface maps for surface lookup.
 
ActsTrackingGeometrym_tGeometry = nullptr
 Acts tracking geometry for surface lookup.
 
ActsTransformations m_transformer
 acts transformation
 
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
 
PHG4CylinderCellGeomContainerm_tpc_geom_container = nullptr
 tpc geometry
 
PHG4CylinderGeomContainerm_micromegas_geom_container = nullptr
 micromegas geometry
 
G4HitMap m_g4hit_map
 
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 36 of file TrackEvaluation.h.

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

Member Typedef Documentation

Definition at line 161 of file TrackEvaluation.h.

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

using TrackEvaluation::G4HitSet = std::set<PHG4Hit*>
private

Definition at line 81 of file TrackEvaluation.h.

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

Member Enumeration Documentation

Enumerator:
EvalEvent 
EvalClusters 
EvalTracks 

Definition at line 55 of file TrackEvaluation.h.

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

Constructor & Destructor Documentation

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

constructor

Definition at line 317 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 317 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 746 of file TrackEvaluation.cc.

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

References cos(), 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(), G4TTL::layer, TrackEvaluationContainerv1::ClusterStruct::layer, m_micromegas_geom_container, 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_micromegas ( TrackEvaluationContainerv1::ClusterStruct cluster,
int  tileid,
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 908 of file TrackEvaluation.cc.

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

References cos(), PHG4Hitv1::get_px(), PHG4Hitv1::get_py(), PHG4Hitv1::get_pz(), QAG4Util::get_r(), PHG4Hitv1::get_x(), PHG4Hitv1::get_y(), PHG4Hitv1::get_z(), PHG4CylinderGeomContainer::GetLayerGeom(), G4TTL::layer, TrackEvaluationContainerv1::ClusterStruct::layer, m_micromegas_geom_container, 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 
) const
private

create cluster structure from cluster

Definition at line 688 of file TrackEvaluation.cc.

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

References QAG4Util::get_r(), ActsTransformations::getGlobalPosition(), TrkrDefs::getLayer(), TrkrCluster::getRPhiError(), TrkrCluster::getZError(), TrackEvaluationContainerv1::ClusterStruct::layer, m_surfmaps, m_tGeometry, m_transformer, TrackEvaluationContainerv1::ClusterStruct::phi, TrackEvaluationContainerv1::ClusterStruct::phi_error, TrackEvaluationContainerv1::ClusterStruct::r, 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 374 of file TrackEvaluation.cc.

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

References Fun4AllReturnCodes::EVENT_OK.

void TrackEvaluation::evaluate_clusters ( )
private

evaluate clusters

Definition at line 470 of file TrackEvaluation.cc.

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

References add_truth_information(), add_truth_information_micromegas(), TrackEvaluationContainerv1::addCluster(), TrackEvaluationContainerv1::clearClusters(), create_cluster(), find_g4hits(), TrkrClusterContainer::getClusters(), TrkrHitSetContainer::getHitSets(), 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 430 of file TrackEvaluation.cc.

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

References TrackEvaluationContainerv1::addEvent(), TrkrClusterContainer::getClusters(), TrkrHitSetContainer::getHitSets(), TrkrDefs::getLayer(), TrkrDefs::getTrkrId(), TrkrDefs::inttId, G4TTL::layer, m_cluster_map, m_container, m_hitsetcontainer, 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 507 of file TrackEvaluation.cc.

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

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

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 591 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 591 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, TrkrDefs::mvtxId, 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:

int TrackEvaluation::get_embed ( PHG4Particle particle) const
private

get embedded id for given g4track

Definition at line 684 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 684 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 652 of file TrackEvaluation.cc.

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

References SvtxTrack::begin_cluster_keys(), SvtxTrack::end_cluster_keys(), find_g4hits(), 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 322 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 322 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 351 of file TrackEvaluation.cc.

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

References Fun4AllReturnCodes::EVENT_OK.

int TrackEvaluation::load_nodes ( PHCompositeNode topNode)
private

load nodes

Definition at line 378 of file TrackEvaluation.cc.

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

References 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_surfmaps, 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 355 of file TrackEvaluation.cc.

View newest version in sPHENIX GitHub at line 355 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 63 of file TrackEvaluation.h.

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

References m_flags.

Member Data Documentation

TrkrClusterHitAssoc* TrackEvaluation::m_cluster_hit_map = nullptr
private

cluster to hit association

Definition at line 135 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 135 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 132 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 132 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 114 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 114 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 117 of file TrackEvaluation.h.

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

Referenced by process_event(), and set_flags().

G4HitMap TrackEvaluation::m_g4hit_map
mutableprivate

Definition at line 162 of file TrackEvaluation.h.

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

Referenced by find_g4hits(), and process_event().

PHG4HitContainer* TrackEvaluation::m_g4hits_intt = nullptr
private

Definition at line 146 of file TrackEvaluation.h.

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

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* TrackEvaluation::m_g4hits_micromegas = nullptr
private

Definition at line 148 of file TrackEvaluation.h.

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

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* TrackEvaluation::m_g4hits_mvtx = nullptr
private

Definition at line 147 of file TrackEvaluation.h.

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

Referenced by find_g4hits(), and load_nodes().

PHG4HitContainer* TrackEvaluation::m_g4hits_tpc = 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().

PHG4TruthInfoContainer* TrackEvaluation::m_g4truthinfo = nullptr
private

truth information

Definition at line 152 of file TrackEvaluation.h.

View newest version in sPHENIX GitHub at line 152 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 138 of file TrackEvaluation.h.

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

Referenced by find_g4hits(), and load_nodes().

TrkrHitSetContainer* TrackEvaluation::m_hitsetcontainer = nullptr
private

hits

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(), and load_nodes().

PHG4CylinderGeomContainer* TrackEvaluation::m_micromegas_geom_container = nullptr
private

micromegas geometry

Definition at line 158 of file TrackEvaluation.h.

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

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

ActsSurfaceMaps* TrackEvaluation::m_surfmaps = nullptr
private

Acts surface maps for surface lookup.

Definition at line 120 of file TrackEvaluation.h.

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

Referenced by create_cluster(), and load_nodes().

ActsTrackingGeometry* 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 create_cluster(), and load_nodes().

PHG4CylinderCellGeomContainer* TrackEvaluation::m_tpc_geom_container = nullptr
private

tpc 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_truth_information(), and load_nodes().

SvtxTrackMap* TrackEvaluation::m_track_map = nullptr
private

tracks

Definition at line 141 of file TrackEvaluation.h.

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

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

ActsTransformations TrackEvaluation::m_transformer
private

acts transformation

Definition at line 126 of file TrackEvaluation.h.

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

Referenced by create_cluster().


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