Analysis Software
Documentation for sPHENIX simulation 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 <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 = 0
 
records_t _records
 
int _event = 0
 
std::string _out_file_name
 
TTree * _T = nullptr
 
bool _save_particle = true
 master switch to save particles
 
bool _load_all_particle = true
 load all particle in truth info module?
 
bool _load_active_particle = true
 load all particle that produced a saved hit
 
PartSet_t _particle_set
 
PartSet_t _vertex_set
 
bool _save_vertex = true
 save vertex for particles?
 
double _tower_zero_sup = 0.
 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 = std::numeric_limits<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

typedef std::vector<record> PHG4DSTReader::records_t
protected

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 55 of file PHG4DSTReader.cc.

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

PHG4DSTReader::~PHG4DSTReader ( )
override

Definition at line 62 of file PHG4DSTReader.cc.

View newest version in sPHENIX GitHub at line 62 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 620 of file PHG4DSTReader.cc.

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

References PHG4DSTReader::record::_arr, PHG4DSTReader::record::_cnt, _vertex_set, assert, 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(), Fun4All_G4_Calos(), Fun4All_G4_LeadBrick(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), Fun4All_G4_TPC(), Fun4All_G4_W(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_EICIR(), and G4DSTreader_fsPHENIX().

+ 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 Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), G4DSTreader(), G4DSTreader_EICDetector(), and G4DSTreader_fsPHENIX().

+ Here is the caller graph for this function:

void PHG4DSTReader::build_tree ( )
protected

Definition at line 208 of file PHG4DSTReader.cc.

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

References _out_file_name, _records, _T, BUFFER_SIZE, PHTFileServer::get(), 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 654 of file PHG4DSTReader.cc.

View newest version in sPHENIX GitHub at line 654 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
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, and KFPMath::b.

Referenced by Fun4All_G4_block(), Fun4All_G4_Calos(), Fun4All_G4_LeadBrick(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), Fun4All_G4_TPC(), Fun4All_G4_W(), Fun4All_MCEventGen(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_EICIR(), and G4DSTreader_fsPHENIX().

+ 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, and KFPMath::b.

Referenced by Fun4All_G4_block(), Fun4All_G4_Calos(), Fun4All_G4_LeadBrick(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), Fun4All_G4_TPC(), Fun4All_G4_W(), Fun4All_MCEventGen(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_EICIR(), and G4DSTreader_fsPHENIX().

+ 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, and KFPMath::b.

Referenced by Fun4All_G4_block(), Fun4All_G4_Calos(), Fun4All_G4_LeadBrick(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), Fun4All_G4_TPC(), Fun4All_G4_W(), Fun4All_MCEventGen(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_EICIR(), and G4DSTreader_fsPHENIX().

+ 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, and KFPMath::b.

Referenced by Fun4All_G4_block(), Fun4All_G4_Calos(), Fun4All_G4_LeadBrick(), Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), Fun4All_G4_TPC(), Fun4All_G4_W(), Fun4All_MCEventGen(), G4DSTreader(), G4DSTreader_EICDetector(), G4DSTreader_EICIR(), and G4DSTreader_fsPHENIX().

+ 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, and KFPMath::b.

Referenced by Fun4All_G4_Prototype2(), Fun4All_G4_Prototype3(), Fun4All_G4_Prototype4(), G4DSTreader(), G4DSTreader_EICDetector(), and G4DSTreader_fsPHENIX().

+ Here is the caller graph for this function:

Member Data Documentation

int PHG4DSTReader::_event = 0
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 = true
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 = true
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 = true
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 = true
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 = nullptr
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 = 0.
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 = 0
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: