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

PHG4DSTReader save information from DST to an evaluator, which could include hit. particle, vertex, towers and jet (to be activated) More...

#include <fun4all_coresoftware/blob/master/simulation/g4simulation/g4eval/PHG4DSTReader.h>

+ Inheritance diagram for PHG4DSTReader:
+ Collaboration diagram for PHG4DSTReader:

Classes

struct  record
 

Public Member Functions

 PHG4DSTReader (const std::string &filename)
 
 ~PHG4DSTReader () override
 
int Init (PHCompositeNode *) override
 full initialization
 
int process_event (PHCompositeNode *) override
 event processing method
 
int End (PHCompositeNode *) override
 end of run method
 
void AddNode (const std::string &name)
 
void AddHit (const std::string &name)
 
void AddTower (const std::string &name)
 
void AddJet (const std::string &name)
 
void set_load_all_particle (bool b)
 
void set_load_active_particle (bool b)
 load all particle that produced a saved hit
 
void set_save_particle (bool b)
 Switch for saving any particles at all.
 
void set_save_vertex (bool b)
 Switch for vertex.
 
double get_tower_zero_sup ()
 zero suppression for all calorimeters
 
void set_tower_zero_sup (double b)
 zero suppression for all calorimeters
 
- 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.
 

Protected Types

typedef boost::shared_ptr
< TClonesArray > 
arr_ptr
 
typedef std::vector< recordrecords_t
 
typedef std::set< int > PartSet_t
 

Protected Member Functions

void add_particle (record &rec, PHG4Particle *part)
 add a particle and associated vertex if _save_vertex
 
void build_tree ()
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 
- Protected Member Functions inherited from Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 

Protected Attributes

std::vector< std::string > _node_postfix
 
std::vector< std::string > _tower_postfix
 
std::vector< std::string > _jet_postfix
 
int nblocks
 
records_t _records
 
int _event
 
std::string _out_file_name
 
TTree * _T
 
bool _save_particle
 master switch to save particles
 
bool _load_all_particle
 load all particle in truth info module?
 
bool _load_active_particle
 load all particle that produced a saved hit
 
PartSet_t _particle_set
 
PartSet_t _vertex_set
 
bool _save_vertex
 save vertex for particles?
 
double _tower_zero_sup
 zero suppression for all calorimeters
 

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 = INT_MAX - 10
}
 

Detailed Description

PHG4DSTReader save information from DST to an evaluator, which could include hit. particle, vertex, towers and jet (to be activated)

Definition at line 32 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 32 of file PHG4DSTReader.h

Member Typedef Documentation

typedef boost::shared_ptr<TClonesArray> PHG4DSTReader::arr_ptr
protected

Definition at line 121 of file PHG4DSTReader.h.

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

typedef std::set<int> PHG4DSTReader::PartSet_t
protected

Definition at line 159 of file PHG4DSTReader.h.

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

Definition at line 140 of file PHG4DSTReader.h.

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

Constructor & Destructor Documentation

PHG4DSTReader::PHG4DSTReader ( const std::string &  filename)

Definition at line 57 of file PHG4DSTReader.cc.

View newest version in sPHENIX GitHub at line 57 of file PHG4DSTReader.cc

PHG4DSTReader::~PHG4DSTReader ( )
override

Definition at line 75 of file PHG4DSTReader.cc.

View newest version in sPHENIX GitHub at line 75 of file PHG4DSTReader.cc

References _records, _T, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

Member Function Documentation

void PHG4DSTReader::add_particle ( PHG4DSTReader::record rec,
PHG4Particle part 
)
protected

add a particle and associated vertex if _save_vertex

Definition at line 616 of file PHG4DSTReader.cc.

View newest version in sPHENIX GitHub at line 616 of file PHG4DSTReader.cc

References PHG4DSTReader::record::_arr, PHG4DSTReader::record::_cnt, _vertex_set, boost::shared_ptr< T >::get(), PHG4Particle::get_e(), PHG4Particle::get_name(), PHG4Particle::get_parent_id(), PHG4Particle::get_pid(), PHG4Particle::get_primary_id(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), PHG4Particle::get_track_id(), PHG4Particle::get_vtx_id(), PHG4Particlev2::set_e(), PHG4Particlev1::set_name(), PHG4Particlev2::set_parent_id(), PHG4Particlev1::set_pid(), PHG4Particlev2::set_primary_id(), PHG4Particlev1::set_px(), PHG4Particlev1::set_py(), PHG4Particlev1::set_pz(), PHG4Particlev2::set_track_id(), and PHG4Particlev2::set_vtx_id().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4DSTReader::AddHit ( const std::string &  name)
inline

Definition at line 54 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 54 of file PHG4DSTReader.h

References _node_postfix.

void PHG4DSTReader::AddJet ( const std::string &  name)
inline

Definition at line 66 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 66 of file PHG4DSTReader.h

References _jet_postfix.

void PHG4DSTReader::AddNode ( const std::string &  name)
inline

Definition at line 48 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 48 of file PHG4DSTReader.h

References _node_postfix.

Referenced by Fun4All_G4_block(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_fsPHENIX(), and G4DSTreader_LBLDetector().

+ Here is the caller graph for this function:

void PHG4DSTReader::AddTower ( const std::string &  name)
inline

Definition at line 60 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 60 of file PHG4DSTReader.h

References _tower_postfix.

Referenced by G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_fsPHENIX(), and G4DSTreader_LBLDetector().

+ Here is the caller graph for this function:

void PHG4DSTReader::build_tree ( )
protected

Definition at line 229 of file PHG4DSTReader.cc.

View newest version in sPHENIX GitHub at line 229 of file PHG4DSTReader.cc

References PHG4DSTReader::record::_arr_ptr, PHG4DSTReader::record::_cnt, PHG4DSTReader::record::_name, _out_file_name, _records, _T, BUFFER_SIZE, PHTFileServer::get(), it, nblocks, PHTFileServer::open(), and Fun4AllBase::Verbosity().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHG4DSTReader::End ( PHCompositeNode )
overridevirtual

end of run method

Reimplemented from SubsysReco.

Definition at line 650 of file PHG4DSTReader.cc.

View newest version in sPHENIX GitHub at line 650 of file PHG4DSTReader.cc

References _out_file_name, _records, _T, PHTFileServer::cd(), PHTFileServer::get(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

double PHG4DSTReader::get_tower_zero_sup ( )
inline

zero suppression for all calorimeters

Definition at line 102 of file PHG4DSTReader.h.

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

References _save_particle.

int PHG4DSTReader::Init ( PHCompositeNode )
overridevirtual
int PHG4DSTReader::process_event ( PHCompositeNode topNode)
overridevirtual

event processing method

Reimplemented from SubsysReco.

Definition at line 267 of file PHG4DSTReader.cc.

View newest version in sPHENIX GitHub at line 267 of file PHG4DSTReader.cc

References PHG4DSTReader::record::_arr, PHG4DSTReader::record::_arr_ptr, PHG4DSTReader::record::_cnt, _event, _load_active_particle, _load_all_particle, PHG4DSTReader::record::_name, _particle_set, _records, _T, _tower_zero_sup, PHG4DSTReader::record::_type, _vertex_set, Fun4AllReturnCodes::ABORTEVENT, add_particle(), JetMap::begin(), JetMap::end(), boost::shared_ptr< T >::get(), RawTowerv1::get_energy(), Jet::get_eta(), PHG4Hit::get_hit_id(), PHG4VtxPoint::get_id(), Jet::get_phi(), Jet::get_pt(), PHG4VtxPoint::get_t(), PHG4Hit::get_trkid(), PHG4VtxPoint::get_x(), PHG4VtxPoint::get_y(), PHG4VtxPoint::get_z(), findNode::getClass(), PHG4HitContainer::getHits(), PHG4TruthInfoContainer::GetMap(), PHG4TruthInfoContainer::GetParticle(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), RawTowerContainer::getTowers(), PHG4TruthInfoContainer::GetVtx(), it, particle, PHG4VtxPointv1::set_id(), PHG4VtxPointv1::set_t(), PHG4VtxPointv1::set_x(), PHG4VtxPointv1::set_y(), PHG4VtxPointv1::set_z(), RawTowerContainer::size(), JetMap::size(), PHG4HitContainer::size(), PHG4DSTReader::record::typ_hit, PHG4DSTReader::record::typ_jets, PHG4DSTReader::record::typ_part, PHG4DSTReader::record::typ_tower, PHG4DSTReader::record::typ_vertex, v, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void PHG4DSTReader::set_load_active_particle ( bool  b)
inline

load all particle that produced a saved hit

Definition at line 81 of file PHG4DSTReader.h.

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

References _load_active_particle.

Referenced by Fun4All_G4_block(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_fsPHENIX(), and G4DSTreader_LBLDetector().

+ Here is the caller graph for this function:

void PHG4DSTReader::set_load_all_particle ( bool  b)
inline

load all particle in truth info module? size could be very large, e.g. showers

Definition at line 74 of file PHG4DSTReader.h.

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

References _load_all_particle.

Referenced by Fun4All_G4_block(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_fsPHENIX(), and G4DSTreader_LBLDetector().

+ Here is the caller graph for this function:

void PHG4DSTReader::set_save_particle ( bool  b)
inline

Switch for saving any particles at all.

Definition at line 88 of file PHG4DSTReader.h.

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

References _save_particle.

Referenced by Fun4All_G4_block(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_fsPHENIX(), and G4DSTreader_LBLDetector().

+ Here is the caller graph for this function:

void PHG4DSTReader::set_save_vertex ( bool  b)
inline

Switch for vertex.

Definition at line 95 of file PHG4DSTReader.h.

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

References _save_vertex.

Referenced by Fun4All_G4_block(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_fsPHENIX(), and G4DSTreader_LBLDetector().

+ Here is the caller graph for this function:

void PHG4DSTReader::set_tower_zero_sup ( double  b)
inline

zero suppression for all calorimeters

Definition at line 109 of file PHG4DSTReader.h.

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

References _tower_zero_sup.

Referenced by G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_fsPHENIX(), and G4DSTreader_LBLDetector().

+ Here is the caller graph for this function:

Member Data Documentation

int PHG4DSTReader::_event
protected

Definition at line 143 of file PHG4DSTReader.h.

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

Referenced by process_event().

std::vector<std::string> PHG4DSTReader::_jet_postfix
protected

Definition at line 117 of file PHG4DSTReader.h.

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

Referenced by AddJet(), and Init().

bool PHG4DSTReader::_load_active_particle
protected

load all particle that produced a saved hit

Definition at line 157 of file PHG4DSTReader.h.

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

Referenced by process_event(), and set_load_active_particle().

bool PHG4DSTReader::_load_all_particle
protected

load all particle in truth info module?

Definition at line 154 of file PHG4DSTReader.h.

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

Referenced by process_event(), and set_load_all_particle().

std::vector<std::string> PHG4DSTReader::_node_postfix
protected

Definition at line 115 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 115 of file PHG4DSTReader.h

Referenced by AddHit(), AddNode(), and Init().

std::string PHG4DSTReader::_out_file_name
protected

Definition at line 145 of file PHG4DSTReader.h.

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

Referenced by build_tree(), and End().

PartSet_t PHG4DSTReader::_particle_set
protected

Definition at line 160 of file PHG4DSTReader.h.

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

Referenced by process_event().

records_t PHG4DSTReader::_records
protected

Definition at line 141 of file PHG4DSTReader.h.

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

Referenced by build_tree(), End(), Init(), process_event(), and ~PHG4DSTReader().

bool PHG4DSTReader::_save_particle
protected

master switch to save particles

Definition at line 151 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 151 of file PHG4DSTReader.h

Referenced by get_tower_zero_sup(), Init(), and set_save_particle().

bool PHG4DSTReader::_save_vertex
protected

save vertex for particles?

Definition at line 164 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 164 of file PHG4DSTReader.h

Referenced by Init(), and set_save_vertex().

TTree* PHG4DSTReader::_T
protected

Definition at line 148 of file PHG4DSTReader.h.

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

Referenced by build_tree(), End(), process_event(), and ~PHG4DSTReader().

std::vector<std::string> PHG4DSTReader::_tower_postfix
protected

Definition at line 116 of file PHG4DSTReader.h.

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

Referenced by AddTower(), and Init().

double PHG4DSTReader::_tower_zero_sup
protected

zero suppression for all calorimeters

Definition at line 167 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 167 of file PHG4DSTReader.h

Referenced by Init(), process_event(), and set_tower_zero_sup().

PartSet_t PHG4DSTReader::_vertex_set
protected

Definition at line 161 of file PHG4DSTReader.h.

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

Referenced by add_particle(), and process_event().

int PHG4DSTReader::nblocks
protected

Definition at line 119 of file PHG4DSTReader.h.

View newest version in sPHENIX GitHub at line 119 of file PHG4DSTReader.h

Referenced by build_tree(), and Init().


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