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

#include <fun4all_eicdetectors/blob/master/simulation/g4simulation/g4lblvtx/TrackFastSimEval.h>

+ Inheritance diagram for TrackFastSimEval:
+ Collaboration diagram for TrackFastSimEval:

Public Types

enum  Flag { NONE = 0 }
 

Public Member Functions

 TrackFastSimEval (const std::string &name="TrackFastSimEval", const std::string &filename="g4eval.root", const std::string &trackmapname="SvtxTrackMap")
 
int Init (PHCompositeNode *)
 
int process_event (PHCompositeNode *)
 
int End (PHCompositeNode *)
 Called at the end of all processing.
 
void set_filename (const char *file)
 
void set_flag (const Flag &flag, const bool &value)
 
void reset_variables ()
 
void AddProjection (const std::string &name)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int InitRun (PHCompositeNode *)
 
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

void fill_track_tree (PHCompositeNode *)
 
void fill_vertex_tree (PHCompositeNode *)
 
int GetNodes (PHCompositeNode *)
 

Private Attributes

std::string _outfile_name
 
std::string _trackmapname
 
int _event
 
unsigned int _flags
 
TTree * _eval_tree_tracks
 
TTree * _eval_tree_vertex
 
int event
 
int gtrackID
 
int gflavor
 
float gpx
 
float gpy
 
float gpz
 
float gvx
 
float gvy
 
float gvz
 
float gvt
 
int trackID
 
int charge
 
int nhits
 
float px
 
float py
 
float pz
 
float pcax
 
float pcay
 
float pcaz
 
float dca2d
 
float proj [3][nproj]
 
float proj_p [3][nproj]
 
float ref [3][nproj]
 
float ref_p [3][nproj]
 
float vx
 
float vy
 
float vz
 
float deltavx
 
float deltavy
 
float deltavz
 
int ntracks
 
int n_from_truth
 
TH2D * _h2d_Delta_mom_vs_truth_mom
 
TH2D * _h2d_Delta_mom_vs_truth_eta
 
PHG4TruthInfoContainer_truth_container
 
SvtxTrackMap_trackmap
 
SvtxVertexMap_vertexmap
 
std::map< std::string, intm_ProjectionNameMap
 

Static Private Attributes

static const int nproj = 3
 

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 21 of file TrackFastSimEval.h

Member Enumeration Documentation

Enumerator:
NONE 

Definition at line 45 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 45 of file TrackFastSimEval.h

Constructor & Destructor Documentation

TrackFastSimEval::TrackFastSimEval ( const std::string &  name = "TrackFastSimEval",
const std::string &  filename = "g4eval.root",
const std::string &  trackmapname = "SvtxTrackMap" 
)

Definition at line 42 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 42 of file TrackFastSimEval.cc

References reset_variables().

+ Here is the call graph for this function:

Member Function Documentation

void TrackFastSimEval::AddProjection ( const std::string &  name)

Definition at line 534 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 534 of file TrackFastSimEval.cc

References m_ProjectionNameMap.

int TrackFastSimEval::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 173 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 173 of file TrackFastSimEval.cc

References _eval_tree_tracks, _eval_tree_vertex, _h2d_Delta_mom_vs_truth_eta, _h2d_Delta_mom_vs_truth_mom, _outfile_name, PHTFileServer::cd(), Fun4AllReturnCodes::EVENT_OK, and PHTFileServer::get().

+ Here is the call graph for this function:

void TrackFastSimEval::fill_track_tree ( PHCompositeNode topNode)
private

Definition at line 192 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 192 of file TrackFastSimEval.cc

References _eval_tree_tracks, _event, _h2d_Delta_mom_vs_truth_eta, _h2d_Delta_mom_vs_truth_mom, _trackmap, _truth_container, SvtxTrackMap::begin(), SvtxTrack_v1::begin_states(), charge, dca2d, SvtxTrackMap::end(), SvtxTrack_v1::end_states(), SvtxTrack_v1::get_charge(), SvtxTrack_v1::get_dca2d(), SvtxTrack_v1::get_id(), PHG4Particle::get_pid(), PHG4Particle::get_px(), SvtxTrack_v1::get_px(), PHG4Particle::get_py(), SvtxTrack_v1::get_py(), PHG4Particle::get_pz(), SvtxTrack_v1::get_pz(), PHG4VtxPoint::get_t(), PHG4Particle::get_track_id(), SvtxTrack_FastSim::get_truth_track_id(), PHG4Particle::get_vtx_id(), PHG4VtxPoint::get_x(), SvtxTrack_v1::get_x(), PHG4VtxPoint::get_y(), SvtxTrack_v1::get_y(), PHG4VtxPoint::get_z(), SvtxTrack_v1::get_z(), PHG4HitContainer::getHits(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), PHG4TruthInfoContainer::GetVtx(), gflavor, gpx, gpy, gpz, gtrackID, gvt, gvx, gvy, gvz, hits(), k, LogError, m_ProjectionNameMap, nhits, nproj, pcax, pcay, pcaz, proj, proj_p, px, py, pz, ref, ref_p, reset_variables(), SvtxTrack_v1::size_clusters(), track, and trackID.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void TrackFastSimEval::fill_vertex_tree ( PHCompositeNode topNode)
private

Definition at line 361 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 361 of file TrackFastSimEval.cc

References _eval_tree_vertex, _event, _trackmap, _truth_container, _vertexmap, SvtxVertexMap::begin(), SvtxVertex::begin_tracks(), deltavx, deltavy, deltavz, SvtxTrackMap::end(), SvtxVertexMap::end(), SvtxVertex::end_tracks(), SvtxTrackMap::find(), SvtxVertex::get_error(), SvtxVertex::get_id(), SvtxTrack_FastSim::get_truth_track_id(), PHG4Particle::get_vtx_id(), SvtxVertex::get_x(), SvtxVertex::get_y(), SvtxVertex::get_z(), PHG4TruthInfoContainer::GetParticle(), PHG4TruthInfoContainer::GetVtx(), gtrackID, gvt, gvx, gvy, gvz, LogError, n_from_truth, ntracks, reset_variables(), SvtxVertex::size_tracks(), trackID, vx, vy, and vz.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TrackFastSimEval::GetNodes ( PHCompositeNode topNode)
private

Definition at line 499 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 499 of file TrackFastSimEval.cc

References _event, _trackmap, _trackmapname, _truth_container, _vertexmap, Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, PHWHERE, and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int TrackFastSimEval::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 63 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 63 of file TrackFastSimEval.cc

References _eval_tree_tracks, _eval_tree_vertex, _h2d_Delta_mom_vs_truth_eta, _h2d_Delta_mom_vs_truth_mom, _outfile_name, charge, dca2d, deltavx, deltavy, deltavz, event, Fun4AllReturnCodes::EVENT_OK, PHTFileServer::get(), gflavor, gpx, gpy, gpz, gtrackID, gvt, gvx, gvy, gvz, m_ProjectionNameMap, n_from_truth, nhits, ntracks, PHTFileServer::open(), pcax, pcay, pcaz, PHWHERE, proj, proj_p, px, py, pz, ref, ref_p, trackID, vx, vy, and vz.

+ Here is the call graph for this function:

int TrackFastSimEval::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 152 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 152 of file TrackFastSimEval.cc

References _event, Fun4AllReturnCodes::EVENT_OK, fill_track_tree(), fill_vertex_tree(), GetNodes(), PHWHERE, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void TrackFastSimEval::reset_variables ( )

Definition at line 457 of file TrackFastSimEval.cc.

View newest version in sPHENIX GitHub at line 457 of file TrackFastSimEval.cc

References charge, dca2d, deltavx, deltavy, deltavz, gflavor, gpx, gpy, gpz, gtrackID, gvt, gvx, gvy, gvz, n_from_truth, nhits, ntracks, pcax, pcay, pcaz, px, py, pz, trackID, vx, vy, and vz.

Referenced by fill_track_tree(), fill_vertex_tree(), and TrackFastSimEval().

+ Here is the caller graph for this function:

void TrackFastSimEval::set_filename ( const char *  file)
inline

Definition at line 39 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 39 of file TrackFastSimEval.h

References _outfile_name, and file.

void TrackFastSimEval::set_flag ( const Flag flag,
const bool &  value 
)
inline

Definition at line 53 of file TrackFastSimEval.h.

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

References _flags.

Member Data Documentation

TTree* TrackFastSimEval::_eval_tree_tracks
private

Definition at line 85 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 85 of file TrackFastSimEval.h

Referenced by End(), fill_track_tree(), and Init().

TTree* TrackFastSimEval::_eval_tree_vertex
private

Definition at line 86 of file TrackFastSimEval.h.

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

Referenced by End(), fill_vertex_tree(), and Init().

int TrackFastSimEval::_event
private

Definition at line 76 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 76 of file TrackFastSimEval.h

Referenced by fill_track_tree(), fill_vertex_tree(), GetNodes(), and process_event().

unsigned int TrackFastSimEval::_flags
private

Definition at line 82 of file TrackFastSimEval.h.

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

Referenced by set_flag().

TH2D* TrackFastSimEval::_h2d_Delta_mom_vs_truth_eta
private

Definition at line 131 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 131 of file TrackFastSimEval.h

Referenced by End(), fill_track_tree(), and Init().

TH2D* TrackFastSimEval::_h2d_Delta_mom_vs_truth_mom
private

Definition at line 130 of file TrackFastSimEval.h.

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

Referenced by End(), fill_track_tree(), and Init().

std::string TrackFastSimEval::_outfile_name
private

Definition at line 70 of file TrackFastSimEval.h.

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

Referenced by End(), Init(), and set_filename().

SvtxTrackMap* TrackFastSimEval::_trackmap
private

Definition at line 135 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), fill_vertex_tree(), and GetNodes().

std::string TrackFastSimEval::_trackmapname
private

Definition at line 73 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 73 of file TrackFastSimEval.h

Referenced by GetNodes().

PHG4TruthInfoContainer* TrackFastSimEval::_truth_container
private

Definition at line 134 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), fill_vertex_tree(), and GetNodes().

SvtxVertexMap* TrackFastSimEval::_vertexmap
private

Definition at line 136 of file TrackFastSimEval.h.

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

Referenced by fill_vertex_tree(), and GetNodes().

int TrackFastSimEval::charge
private

Definition at line 101 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 101 of file TrackFastSimEval.h

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::dca2d
private

Definition at line 109 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::deltavx
private

Definition at line 123 of file TrackFastSimEval.h.

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

Referenced by fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::deltavy
private

Definition at line 124 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 124 of file TrackFastSimEval.h

Referenced by fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::deltavz
private

Definition at line 125 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 125 of file TrackFastSimEval.h

Referenced by fill_vertex_tree(), Init(), and reset_variables().

int TrackFastSimEval::event
private

Definition at line 87 of file TrackFastSimEval.h.

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

Referenced by Init().

int TrackFastSimEval::gflavor
private

Definition at line 90 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::gpx
private

Definition at line 91 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::gpy
private

Definition at line 92 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::gpz
private

Definition at line 93 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

int TrackFastSimEval::gtrackID
private

Definition at line 89 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 89 of file TrackFastSimEval.h

Referenced by fill_track_tree(), fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::gvt
private

Definition at line 97 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::gvx
private

Definition at line 94 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 94 of file TrackFastSimEval.h

Referenced by fill_track_tree(), fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::gvy
private

Definition at line 95 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::gvz
private

Definition at line 96 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), fill_vertex_tree(), Init(), and reset_variables().

std::map<std::string, int> TrackFastSimEval::m_ProjectionNameMap
private

Definition at line 138 of file TrackFastSimEval.h.

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

Referenced by AddProjection(), fill_track_tree(), and Init().

int TrackFastSimEval::n_from_truth
private

Definition at line 127 of file TrackFastSimEval.h.

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

Referenced by fill_vertex_tree(), Init(), and reset_variables().

int TrackFastSimEval::nhits
private

Definition at line 102 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 102 of file TrackFastSimEval.h

Referenced by fill_track_tree(), Init(), and reset_variables().

const int TrackFastSimEval::nproj = 3
staticprivate

Definition at line 111 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree().

int TrackFastSimEval::ntracks
private

Definition at line 126 of file TrackFastSimEval.h.

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

Referenced by fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::pcax
private

Definition at line 106 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::pcay
private

Definition at line 107 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 107 of file TrackFastSimEval.h

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::pcaz
private

Definition at line 108 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 108 of file TrackFastSimEval.h

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::proj[3][nproj]
private

Definition at line 113 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), and Init().

float TrackFastSimEval::proj_p[3][nproj]
private

Definition at line 114 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), and Init().

float TrackFastSimEval::px
private

Definition at line 103 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::py
private

Definition at line 104 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::pz
private

Definition at line 105 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), Init(), and reset_variables().

float TrackFastSimEval::ref[3][nproj]
private

Definition at line 116 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 116 of file TrackFastSimEval.h

Referenced by fill_track_tree(), and Init().

float TrackFastSimEval::ref_p[3][nproj]
private

Definition at line 117 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), and Init().

int TrackFastSimEval::trackID
private

Definition at line 100 of file TrackFastSimEval.h.

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

Referenced by fill_track_tree(), fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::vx
private

Definition at line 120 of file TrackFastSimEval.h.

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

Referenced by fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::vy
private

Definition at line 121 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 121 of file TrackFastSimEval.h

Referenced by fill_vertex_tree(), Init(), and reset_variables().

float TrackFastSimEval::vz
private

Definition at line 122 of file TrackFastSimEval.h.

View newest version in sPHENIX GitHub at line 122 of file TrackFastSimEval.h

Referenced by fill_vertex_tree(), Init(), and reset_variables().


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