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

#include <analysis/blob/master/Ana/PHAna.h>

+ Inheritance diagram for PHAna:
+ Collaboration diagram for PHAna:

Public Types

enum  Flag {
  NONE = 0, TRUTH = (1<<0), HIST = (1<<1), SF = (1<<2),
  HCALIN_TOWER = (1<<3), ALL = (1<<4)-1
}
 

Public Member Functions

 PHAna (const std::string &name="PHAna")
 
int Init (PHCompositeNode *)
 
int process_event (PHCompositeNode *)
 
int End (PHCompositeNode *)
 Called at the end of all processing.
 
void set_filename (const char *file)
 
float Square (float x)
 
void set_flag (const Flag &flag, const bool &value)
 
void fill_truth_ntuple (PHCompositeNode *)
 
void fill_sf_ntuple (PHCompositeNode *)
 
void create_histos ()
 
void fill_histos (PHCompositeNode *)
 
- 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 GetNodes (PHCompositeNode *)
 

Private Attributes

std::string _outfile
 
int _event
 
unsigned int _flags
 
TNtuple * _truth
 
TNtuple * _sf
 
TNtuple * _hcalin_towers
 
PHG4TruthInfoContainer_truth_container
 
PHG4HitContainer_hcalout_hit_container
 
PHG4HitContainer_hcalin_hit_container
 
PHG4HitContainer_cemc_hit_container
 
PHG4HitContainer_hcalout_abs_hit_container
 
PHG4HitContainer_hcalin_abs_hit_container
 
PHG4HitContainer_cemc_abs_hit_container
 
PHG4HitContainer_cemc_electronics_hit_container
 
PHG4HitContainer_hcalin_spt_hit_container
 

Additional Inherited Members

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

Detailed Description

Definition at line 16 of file PHAna.h.

View newest version in sPHENIX GitHub at line 16 of file PHAna.h

Member Enumeration Documentation

Enumerator:
NONE 
TRUTH 
HIST 
SF 
HCALIN_TOWER 
ALL 

Definition at line 38 of file PHAna.h.

View newest version in sPHENIX GitHub at line 38 of file PHAna.h

Constructor & Destructor Documentation

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

Definition at line 21 of file PHAna.cc.

View newest version in sPHENIX GitHub at line 21 of file PHAna.cc

References _event, _hcalin_towers, _outfile, _sf, and _truth.

Member Function Documentation

void PHAna::create_histos ( )

Definition at line 204 of file PHAna.cc.

View newest version in sPHENIX GitHub at line 204 of file PHAna.cc

References Fun4AllServer::getHistoManager(), Fun4AllServer::instance(), Fun4AllHistoManager::registerHisto(), and Fun4AllServer::registerHistoManager().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHAna::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 262 of file PHAna.cc.

View newest version in sPHENIX GitHub at line 262 of file PHAna.cc

References _flags, _outfile, _sf, _truth, PHTFileServer::cd(), PHTFileServer::get(), Fun4AllHistoManager::getHisto(), Fun4AllServer::getHistoManager(), HIST, i, Fun4AllServer::instance(), and Fun4AllHistoManager::nHistos().

+ Here is the call graph for this function:

void PHAna::fill_histos ( PHCompositeNode topNode)

Definition at line 62 of file PHAna.cc.

View newest version in sPHENIX GitHub at line 62 of file PHAna.cc

References _truth_container, PHG4VtxPoint::get_x(), PHG4VtxPoint::get_y(), PHG4VtxPoint::get_z(), Fun4AllHistoManager::getHisto(), Fun4AllServer::getHistoManager(), PHG4TruthInfoContainer::GetPrimaryVertexIndex(), PHG4TruthInfoContainer::GetPrimaryVtx(), h, and Fun4AllServer::instance().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHAna::fill_sf_ntuple ( PHCompositeNode topNode)

Definition at line 106 of file PHAna.cc.

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

References _cemc_abs_hit_container, _cemc_electronics_hit_container, _cemc_hit_container, _event, _hcalin_abs_hit_container, _hcalin_hit_container, _hcalin_spt_hit_container, _hcalout_abs_hit_container, _hcalout_hit_container, _sf, PHG4Hit::get_edep(), PHG4Hit::get_light_yield(), and PHG4HitContainer::getHits().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHAna::fill_truth_ntuple ( PHCompositeNode topNode)

Definition at line 81 of file PHAna.cc.

View newest version in sPHENIX GitHub at line 81 of file PHAna.cc

References _event, _truth, _truth_container, PHG4Particle::get_e(), PHG4Particle::get_pid(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), particle, and Square().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHAna::GetNodes ( PHCompositeNode topNode)
private

Definition at line 220 of file PHAna.cc.

View newest version in sPHENIX GitHub at line 220 of file PHAna.cc

References _cemc_abs_hit_container, _cemc_electronics_hit_container, _cemc_hit_container, _event, _hcalin_abs_hit_container, _hcalin_hit_container, _hcalin_spt_hit_container, _hcalout_abs_hit_container, _hcalout_hit_container, _truth_container, and PHWHERE.

Referenced by process_event().

+ Here is the caller graph for this function:

int PHAna::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 34 of file PHAna.cc.

View newest version in sPHENIX GitHub at line 34 of file PHAna.cc

References _flags, _outfile, _sf, _truth, create_histos(), PHTFileServer::get(), HIST, PHTFileServer::open(), PHWHERE, SF, and TRUTH.

+ Here is the call graph for this function:

int PHAna::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 47 of file PHAna.cc.

View newest version in sPHENIX GitHub at line 47 of file PHAna.cc

References _event, _flags, fill_histos(), fill_sf_ntuple(), fill_truth_ntuple(), GetNodes(), HIST, PHWHERE, SF, and TRUTH.

+ Here is the call graph for this function:

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

Definition at line 32 of file PHAna.h.

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

References _outfile, and file.

Referenced by Fun4All_Ana().

+ Here is the caller graph for this function:

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

Definition at line 61 of file PHAna.h.

View newest version in sPHENIX GitHub at line 61 of file PHAna.h

References _flags.

Referenced by Fun4All_Ana().

+ Here is the caller graph for this function:

float PHAna::Square ( float  x)
inline

Definition at line 35 of file PHAna.h.

View newest version in sPHENIX GitHub at line 35 of file PHAna.h

References ambiguity_solver_full_chain::x.

Referenced by fill_truth_ntuple().

+ Here is the caller graph for this function:

Member Data Documentation

PHG4HitContainer* PHAna::_cemc_abs_hit_container
private

Definition at line 98 of file PHAna.h.

View newest version in sPHENIX GitHub at line 98 of file PHAna.h

Referenced by fill_sf_ntuple(), and GetNodes().

PHG4HitContainer* PHAna::_cemc_electronics_hit_container
private

Definition at line 99 of file PHAna.h.

View newest version in sPHENIX GitHub at line 99 of file PHAna.h

Referenced by fill_sf_ntuple(), and GetNodes().

PHG4HitContainer* PHAna::_cemc_hit_container
private

Definition at line 95 of file PHAna.h.

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

Referenced by fill_sf_ntuple(), and GetNodes().

int PHAna::_event
private

Definition at line 78 of file PHAna.h.

View newest version in sPHENIX GitHub at line 78 of file PHAna.h

Referenced by fill_sf_ntuple(), fill_truth_ntuple(), GetNodes(), PHAna(), and process_event().

unsigned int PHAna::_flags
private

Definition at line 84 of file PHAna.h.

View newest version in sPHENIX GitHub at line 84 of file PHAna.h

Referenced by End(), Init(), process_event(), and set_flag().

PHG4HitContainer* PHAna::_hcalin_abs_hit_container
private

Definition at line 97 of file PHAna.h.

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

Referenced by fill_sf_ntuple(), and GetNodes().

PHG4HitContainer* PHAna::_hcalin_hit_container
private

Definition at line 94 of file PHAna.h.

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

Referenced by fill_sf_ntuple(), and GetNodes().

PHG4HitContainer* PHAna::_hcalin_spt_hit_container
private

Definition at line 100 of file PHAna.h.

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

Referenced by fill_sf_ntuple(), and GetNodes().

TNtuple* PHAna::_hcalin_towers
private

Definition at line 89 of file PHAna.h.

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

Referenced by PHAna().

PHG4HitContainer* PHAna::_hcalout_abs_hit_container
private

Definition at line 96 of file PHAna.h.

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

Referenced by fill_sf_ntuple(), and GetNodes().

PHG4HitContainer* PHAna::_hcalout_hit_container
private

Definition at line 93 of file PHAna.h.

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

Referenced by fill_sf_ntuple(), and GetNodes().

std::string PHAna::_outfile
private

Definition at line 75 of file PHAna.h.

View newest version in sPHENIX GitHub at line 75 of file PHAna.h

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

TNtuple* PHAna::_sf
private

Definition at line 88 of file PHAna.h.

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

Referenced by End(), fill_sf_ntuple(), Init(), and PHAna().

TNtuple* PHAna::_truth
private

Definition at line 87 of file PHAna.h.

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

Referenced by End(), fill_truth_ntuple(), Init(), and PHAna().

PHG4TruthInfoContainer* PHAna::_truth_container
private

Definition at line 92 of file PHAna.h.

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

Referenced by fill_histos(), fill_truth_ntuple(), and GetNodes().


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