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

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

+ Inheritance diagram for FillTruthRecoMatchTree:
+ Collaboration diagram for FillTruthRecoMatchTree:

Public Member Functions

 FillTruthRecoMatchTree (bool _fill_clusters=true, bool _fill_svtxnomatch=false, float _cluster_nzwidths=0.5, float _cluster_nphiwidths=0.5, const std::string &tfile_name="trackclusmatch.root")
 
virtual ~FillTruthRecoMatchTree ()
 
int Init (PHCompositeNode *) override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *) override
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
void clear_clusvecs (const std::string &tag="")
 
void print_mvtx_diagnostics ()
 
- 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 Member Functions

int createNodes (PHCompositeNode *topNode)
 

Private Attributes

G4Eval::TrkrClusterComparer m_cluster_comp {1., 1.}
 
G4Eval::ClusCntr m_cluscntr
 
EmbRecoMatchContainerm_EmbRecoMatchContainer {nullptr}
 
PHG4TruthInfoContainerm_PHG4TruthInfoContainer {nullptr}
 
SvtxTrackMapm_SvtxTrackMap {nullptr}
 
TrkrTruthTrackContainerm_TrkrTruthTrackContainer {nullptr}
 
TTree * m_ttree
 
bool m_fill_clusters
 
bool m_fill_SvU
 
std::string m_outfile_name
 
int nevent {-1}
 
int nphg4 {0}
 
int nsvtx {0}
 
int ntrackmatches {0}
 
int nphg4_part {0}
 
float centrality {0.}
 
TH2D * h2_G4_nPixelsPhi
 
TH2D * h2_G4_nPixelsZ
 
TH2D * h2_Sv_nPixelsPhi
 
TH2D * h2_Sv_nPixelsZ
 
int b_trackid {}
 
bool b_is_g4track {}
 
bool b_is_Svtrack {}
 
bool b_is_matched {}
 
float b_trkpt {}
 
float b_trkphi {}
 
float b_trketa {}
 
int b_nclus {}
 
int b_nclustpc {}
 
int b_nclusmvtx {}
 
int b_nclusintt {}
 
float b_matchrat {}
 
float b_matchrat_intt {}
 
float b_matchrat_mvtx {}
 
float b_matchrat_tpc {}
 
std::vector< bool > b_clusmatch {}
 
std::vector< float > b_clus_x {}
 
std::vector< float > b_clus_y {}
 
std::vector< float > b_clus_z {}
 
std::vector< float > b_clus_r {}
 
std::vector< int > b_clus_layer {}
 
std::vector< int > b_clus_nphibins {}
 
std::vector< int > b_clus_ntbins {}
 

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 71 of file FillTruthRecoMatchTree.h.

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

Constructor & Destructor Documentation

FillTruthRecoMatchTree::FillTruthRecoMatchTree ( bool  _fill_clusters = true,
bool  _fill_svtxnomatch = false,
float  _cluster_nzwidths = 0.5,
float  _cluster_nphiwidths = 0.5,
const std::string &  tfile_name = "trackclusmatch.root" 
)

Definition at line 31 of file FillTruthRecoMatchTree.cc.

View newest version in sPHENIX GitHub at line 31 of file FillTruthRecoMatchTree.cc

virtual FillTruthRecoMatchTree::~FillTruthRecoMatchTree ( )
virtual

Member Function Documentation

void FillTruthRecoMatchTree::clear_clusvecs ( const std::string &  tag = "")

Definition at line 564 of file FillTruthRecoMatchTree.cc.

View newest version in sPHENIX GitHub at line 564 of file FillTruthRecoMatchTree.cc

References b_clus_layer, b_clus_nphibins, b_clus_ntbins, b_clus_r, b_clus_x, b_clus_y, b_clus_z, b_clusmatch, and ambiguity_solver_full_chain::x.

Referenced by process_event().

+ Here is the caller graph for this function:

int FillTruthRecoMatchTree::createNodes ( PHCompositeNode topNode)
private

Definition at line 122 of file FillTruthRecoMatchTree.cc.

View newest version in sPHENIX GitHub at line 122 of file FillTruthRecoMatchTree.cc

References Fun4AllReturnCodes::ABORTEVENT, PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), m_EmbRecoMatchContainer, m_PHG4TruthInfoContainer, m_SvtxTrackMap, m_TrkrTruthTrackContainer, and PHWHERE.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int FillTruthRecoMatchTree::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 547 of file FillTruthRecoMatchTree.cc.

View newest version in sPHENIX GitHub at line 547 of file FillTruthRecoMatchTree.cc

References PHTFileServer::cd(), Fun4AllReturnCodes::EVENT_OK, PHTFileServer::get(), h2_G4_nPixelsPhi, h2_G4_nPixelsZ, h2_Sv_nPixelsPhi, h2_Sv_nPixelsZ, m_outfile_name, m_ttree, PHWHERE, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int FillTruthRecoMatchTree::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 94 of file FillTruthRecoMatchTree.cc.

View newest version in sPHENIX GitHub at line 94 of file FillTruthRecoMatchTree.cc

References Fun4AllReturnCodes::EVENT_OK, PHCompositeNode::print(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int FillTruthRecoMatchTree::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 106 of file FillTruthRecoMatchTree.cc.

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

References Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::ABORTRUN, createNodes(), Fun4AllReturnCodes::EVENT_OK, G4Eval::TrkrClusterComparer::init(), and m_cluster_comp.

+ Here is the call graph for this function:

void FillTruthRecoMatchTree::print_mvtx_diagnostics ( )

Definition at line 481 of file FillTruthRecoMatchTree.cc.

View newest version in sPHENIX GitHub at line 481 of file FillTruthRecoMatchTree.cc

References G4Eval::ClusCntr::addClusKeys(), entry, G4Eval::ClusCntr::get_PHG4_clusters(), G4Eval::ClusCntr::get_SVTX_clusters(), TrkrClusterContainer::getClusters(), TrkrClusterContainer::getHitSetKeys(), TrkrDefs::getLayer(), TrkrTruthTrackContainer::getMap(), m_cluscntr, m_SvtxTrackMap, m_TrkrTruthTrackContainer, G4Eval::ClusCntr::phg4_cntclus(), physmon_track_finding_ttbar::r, SvtxTrackMap::size(), and G4Eval::ClusCntr::svtx_cntclus().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int FillTruthRecoMatchTree::process_event ( PHCompositeNode )
overridevirtual

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

Reimplemented from SubsysReco.

Definition at line 195 of file FillTruthRecoMatchTree.cc.

View newest version in sPHENIX GitHub at line 195 of file FillTruthRecoMatchTree.cc

References G4Eval::ClusCntr::addClusKeys(), b_clus_layer, b_clus_nphibins, b_clus_ntbins, b_clus_r, b_clus_x, b_clus_y, b_clus_z, b_clusmatch, b_is_g4track, b_is_matched, b_is_Svtrack, b_matchrat, b_matchrat_intt, b_matchrat_mvtx, b_matchrat_tpc, b_nclus, b_nclusintt, b_nclusmvtx, b_nclustpc, b_trackid, b_trketa, b_trkphi, b_trkpt, clear_clusvecs(), G4Eval::ClusCntr::clusloc_matched(), clusters, Fun4AllReturnCodes::EVENT_OK, G4Eval::ClusCntr::find_matches(), SvtxTrackMap::get(), G4Eval::ClusCntr::get_PHG4_clusters(), G4Eval::ClusCntr::get_SVTX_clusters(), TrkrClusterContainer::getClusters(), TrkrClusterContainer::getHitSetKeys(), TrkrDefs::getLayer(), TrkrTruthTrackContainer::getMap(), EmbRecoMatchContainer::getMatches(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), TrkrTruthTrackContainer::getTruthTrack(), h2_G4_nPixelsPhi, h2_G4_nPixelsZ, h2_Sv_nPixelsPhi, h2_Sv_nPixelsZ, EmbRecoMatchContainer::ids_TruthUnmatched(), layer, loc, m_cluscntr, m_EmbRecoMatchContainer, m_fill_clusters, m_fill_SvU, m_PHG4TruthInfoContainer, m_SvtxTrackMap, m_TrkrTruthTrackContainer, m_ttree, nevent, nphg4, nphg4_part, nsvtx, ntrackmatches, G4Eval::ClusCntr::phg4_clusloc_all(), G4Eval::ClusCntr::phg4_clusloc_unmatched(), G4Eval::ClusCntr::phg4_cnt_matchedclus(), G4Eval::ClusCntr::phg4_cntclus(), print_mvtx_diagnostics(), SvtxTrackMap::size(), G4Eval::ClusCntr::svtx_clusloc_all(), G4Eval::ClusCntr::svtx_clusloc_unmatched(), G4Eval::ClusCntr::svtx_cntclus(), G4Eval::unmatchedSvtxTrkIds(), Fun4AllBase::Verbosity(), ambiguity_solver_full_chain::x, and y.

+ Here is the call graph for this function:

Member Data Documentation

std::vector<int> FillTruthRecoMatchTree::b_clus_layer {}
private

Definition at line 157 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 157 of file FillTruthRecoMatchTree.h

Referenced by clear_clusvecs(), and process_event().

std::vector<int> FillTruthRecoMatchTree::b_clus_nphibins {}
private

Definition at line 158 of file FillTruthRecoMatchTree.h.

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

Referenced by clear_clusvecs(), and process_event().

std::vector<int> FillTruthRecoMatchTree::b_clus_ntbins {}
private

Definition at line 159 of file FillTruthRecoMatchTree.h.

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

Referenced by clear_clusvecs(), and process_event().

std::vector<float> FillTruthRecoMatchTree::b_clus_r {}
private

Definition at line 156 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 156 of file FillTruthRecoMatchTree.h

Referenced by clear_clusvecs(), and process_event().

std::vector<float> FillTruthRecoMatchTree::b_clus_x {}
private

Definition at line 153 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 153 of file FillTruthRecoMatchTree.h

Referenced by clear_clusvecs(), and process_event().

std::vector<float> FillTruthRecoMatchTree::b_clus_y {}
private

Definition at line 154 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 154 of file FillTruthRecoMatchTree.h

Referenced by clear_clusvecs(), and process_event().

std::vector<float> FillTruthRecoMatchTree::b_clus_z {}
private

Definition at line 155 of file FillTruthRecoMatchTree.h.

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

Referenced by clear_clusvecs(), and process_event().

std::vector<bool> FillTruthRecoMatchTree::b_clusmatch {}
private

Definition at line 152 of file FillTruthRecoMatchTree.h.

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

Referenced by clear_clusvecs(), and process_event().

bool FillTruthRecoMatchTree::b_is_g4track {}
private

Definition at line 134 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 134 of file FillTruthRecoMatchTree.h

Referenced by process_event().

bool FillTruthRecoMatchTree::b_is_matched {}
private

Definition at line 136 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 136 of file FillTruthRecoMatchTree.h

Referenced by process_event().

bool FillTruthRecoMatchTree::b_is_Svtrack {}
private

Definition at line 135 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

float FillTruthRecoMatchTree::b_matchrat {}
private

Definition at line 147 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

float FillTruthRecoMatchTree::b_matchrat_intt {}
private

Definition at line 148 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

float FillTruthRecoMatchTree::b_matchrat_mvtx {}
private

Definition at line 149 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

float FillTruthRecoMatchTree::b_matchrat_tpc {}
private

Definition at line 150 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 150 of file FillTruthRecoMatchTree.h

Referenced by process_event().

int FillTruthRecoMatchTree::b_nclus {}
private

Definition at line 142 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

int FillTruthRecoMatchTree::b_nclusintt {}
private

Definition at line 145 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

int FillTruthRecoMatchTree::b_nclusmvtx {}
private

Definition at line 144 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

int FillTruthRecoMatchTree::b_nclustpc {}
private

Definition at line 143 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

int FillTruthRecoMatchTree::b_trackid {}
private

Definition at line 133 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 133 of file FillTruthRecoMatchTree.h

Referenced by process_event().

float FillTruthRecoMatchTree::b_trketa {}
private

Definition at line 140 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 140 of file FillTruthRecoMatchTree.h

Referenced by process_event().

float FillTruthRecoMatchTree::b_trkphi {}
private

Definition at line 139 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 139 of file FillTruthRecoMatchTree.h

Referenced by process_event().

float FillTruthRecoMatchTree::b_trkpt {}
private

Definition at line 138 of file FillTruthRecoMatchTree.h.

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

Referenced by process_event().

float FillTruthRecoMatchTree::centrality {0.}
private

Definition at line 114 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 114 of file FillTruthRecoMatchTree.h

TH2D* FillTruthRecoMatchTree::h2_G4_nPixelsPhi
private

Definition at line 127 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 127 of file FillTruthRecoMatchTree.h

Referenced by End(), and process_event().

TH2D* FillTruthRecoMatchTree::h2_G4_nPixelsZ
private

Definition at line 128 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 128 of file FillTruthRecoMatchTree.h

Referenced by End(), and process_event().

TH2D* FillTruthRecoMatchTree::h2_Sv_nPixelsPhi
private

Definition at line 129 of file FillTruthRecoMatchTree.h.

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

Referenced by End(), and process_event().

TH2D* FillTruthRecoMatchTree::h2_Sv_nPixelsZ
private

Definition at line 130 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 130 of file FillTruthRecoMatchTree.h

Referenced by End(), and process_event().

G4Eval::ClusCntr FillTruthRecoMatchTree::m_cluscntr
private

Definition at line 92 of file FillTruthRecoMatchTree.h.

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

Referenced by print_mvtx_diagnostics(), and process_event().

G4Eval::TrkrClusterComparer FillTruthRecoMatchTree::m_cluster_comp {1., 1.}
private

Definition at line 91 of file FillTruthRecoMatchTree.h.

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

Referenced by InitRun().

EmbRecoMatchContainer* FillTruthRecoMatchTree::m_EmbRecoMatchContainer {nullptr}
private

Definition at line 95 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 95 of file FillTruthRecoMatchTree.h

Referenced by createNodes(), and process_event().

bool FillTruthRecoMatchTree::m_fill_clusters
private

Definition at line 104 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 104 of file FillTruthRecoMatchTree.h

Referenced by process_event().

bool FillTruthRecoMatchTree::m_fill_SvU
private

Definition at line 105 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 105 of file FillTruthRecoMatchTree.h

Referenced by process_event().

std::string FillTruthRecoMatchTree::m_outfile_name
private

Definition at line 106 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 106 of file FillTruthRecoMatchTree.h

Referenced by End().

PHG4TruthInfoContainer* FillTruthRecoMatchTree::m_PHG4TruthInfoContainer {nullptr}
private

Definition at line 96 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 96 of file FillTruthRecoMatchTree.h

Referenced by createNodes(), and process_event().

SvtxTrackMap* FillTruthRecoMatchTree::m_SvtxTrackMap {nullptr}
private

Definition at line 97 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 97 of file FillTruthRecoMatchTree.h

Referenced by createNodes(), print_mvtx_diagnostics(), and process_event().

TrkrTruthTrackContainer* FillTruthRecoMatchTree::m_TrkrTruthTrackContainer {nullptr}
private

Definition at line 100 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 100 of file FillTruthRecoMatchTree.h

Referenced by createNodes(), print_mvtx_diagnostics(), and process_event().

TTree* FillTruthRecoMatchTree::m_ttree
private

Definition at line 103 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 103 of file FillTruthRecoMatchTree.h

Referenced by End(), and process_event().

int FillTruthRecoMatchTree::nevent {-1}
private

Definition at line 109 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 109 of file FillTruthRecoMatchTree.h

Referenced by process_event().

int FillTruthRecoMatchTree::nphg4 {0}
private

Definition at line 110 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 110 of file FillTruthRecoMatchTree.h

Referenced by process_event().

int FillTruthRecoMatchTree::nphg4_part {0}
private

Definition at line 113 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 113 of file FillTruthRecoMatchTree.h

Referenced by process_event().

int FillTruthRecoMatchTree::nsvtx {0}
private

Definition at line 111 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 111 of file FillTruthRecoMatchTree.h

Referenced by process_event().

int FillTruthRecoMatchTree::ntrackmatches {0}
private

Definition at line 112 of file FillTruthRecoMatchTree.h.

View newest version in sPHENIX GitHub at line 112 of file FillTruthRecoMatchTree.h

Referenced by process_event().


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