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

#include <analysis/blob/master/EMCal-analysis/EMCalAna/EMCalAna.h>

+ Inheritance diagram for EMCalAna:
+ Collaboration diagram for EMCalAna:

Public Types

enum  enu_flags {
  kProcessSF = 1 << 1, kProcessTower = 1 << 2, kProcessTrk = 1 << 3, kProcessUpslisonTrig = 1 << 4,
  kDefaultFlag = kProcessSF | kProcessTower
}
 

Public Member Functions

 EMCalAna (const std::string &filename="cemc_ana.root", enu_flags flags=kDefaultFlag)
 
virtual ~EMCalAna ()
 
int Init (PHCompositeNode *topNode)
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *topNode)
 
int End (PHCompositeNode *topNode)
 Called at the end of all processing.
 
uint32_t get_flags () const
 
void set_flags (enu_flags flags)
 
void set_flag (enu_flags flag)
 
bool flag (enu_flags flag)
 
void reset_flag (enu_flags flag)
 
float get_mag_field () const
 
void set_mag_field (float magfield)
 
- 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 Types

enum  enu_calo { kCEMC, kHCALIN, kHCALOUT }
 

Private Member Functions

Fun4AllHistoManagerget_HistoManager ()
 
int Init_SF (PHCompositeNode *topNode)
 
int process_event_SF (PHCompositeNode *topNode)
 
int Init_Tower (PHCompositeNode *topNode)
 
int process_event_Tower (PHCompositeNode *topNode)
 
int Init_Trk (PHCompositeNode *topNode)
 
int process_event_Trk (PHCompositeNode *topNode)
 
int Init_UpslisonTrig (PHCompositeNode *topNode)
 
int process_event_UpslisonTrig (PHCompositeNode *topNode)
 
void eval_trk (PHG4Particle *primary_particle, EMCalTrk &trk, PHCompositeNode *topNode)
 
void eval_trk_proj (SvtxTrack *track, EMCalTrk &trk, enu_calo calo_id, const double gvz, PHCompositeNode *topNode)
 

Private Attributes

SvtxEvalStack_eval_stack
 
TTree * _T_EMCalTrk
 
EMCalTrk_trk
 
double _magfield
 
PHG4HoughTransform _hough
 
std::string _filename
 
uint32_t _flags
 
unsigned long _ievent
 
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_magnet_hit_container
 
PHG4HitContainer_bh_hit_container
 
PHG4HitContainer_bh_plus_hit_container
 
PHG4HitContainer_bh_minus_hit_container
 
PHG4HitContainer_cemc_electronics_hit_container
 
PHG4HitContainer_hcalin_spt_hit_container
 
PHG4HitContainer_svtx_hit_container
 
PHG4HitContainer_svtx_support_hit_container
 

Additional Inherited Members

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

Detailed Description

Definition at line 28 of file EMCalAna.h.

View newest version in sPHENIX GitHub at line 28 of file EMCalAna.h

Member Enumeration Documentation

enum EMCalAna::enu_calo
private
Enumerator:
kCEMC 
kHCALIN 
kHCALOUT 

Definition at line 117 of file EMCalAna.h.

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

Enumerator:
kProcessSF 
kProcessTower 
kProcessTrk 
kProcessUpslisonTrig 
kDefaultFlag 

Definition at line 33 of file EMCalAna.h.

View newest version in sPHENIX GitHub at line 33 of file EMCalAna.h

Constructor & Destructor Documentation

EMCalAna::~EMCalAna ( )
virtual

Definition at line 90 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 90 of file EMCalAna.C

References _eval_stack.

Member Function Documentation

int EMCalAna::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 165 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 165 of file EMCalAna.C

References _filename, _T_EMCalTrk, assert, PHTFileServer::cd(), Fun4AllReturnCodes::EVENT_OK, PHTFileServer::get(), get_HistoManager(), Fun4AllHistoManager::getHisto(), i, and Fun4AllHistoManager::nHistos().

+ Here is the call graph for this function:

void EMCalAna::eval_trk ( PHG4Particle primary_particle,
EMCalTrk trk,
PHCompositeNode topNode 
)
private

Definition at line 364 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 364 of file EMCalAna.C

References _eval_stack, SvtxTruthEval::all_truth_hits(), assert, SvtxTrack::begin_clusters(), SvtxTrackEval::best_track_from(), SvtxTrack::CEMC, EMCalTrk::cemcdeta, EMCalTrk::cemcdphi, EMCalTrk::cemce, EMCalTrk::cemce3x3, EMCalTrk::charge, charge(), EMCalTrk::chisq, EMCalTrk::dca, INTTVtxZ::dca, EMCalTrk::dca2d, EMCalTrk::dca2dsigma, SvtxTrack::end_clusters(), eval_trk_proj(), EMCalTrk::gembed, SvtxTrack::get_cal_cluster_e(), SvtxTrack::get_cal_deta(), SvtxTrack::get_cal_dphi(), SvtxTrack::get_cal_energy_3x3(), SvtxTrack::get_charge(), SvtxTrack::get_chisq(), SvtxTrack::get_dca(), SvtxTrack::get_dca2d(), SvtxTrack::get_dca2d_error(), SvtxTruthEval::get_embed(), SvtxTrack::get_id(), SvtxTrackEval::get_nclusters_contribution(), SvtxTrack::get_ndf(), SvtxTruthEval::get_outermost_truth_hit(), PHG4Particle::get_pid(), PHG4Particle::get_px(), PHG4Hit::get_px(), SvtxTrack::get_px(), PHG4Particle::get_py(), PHG4Hit::get_py(), SvtxTrack::get_py(), PHG4Particle::get_pz(), PHG4Hit::get_pz(), SvtxTrack::get_pz(), SvtxTrack::get_quality(), SvtxEvalStack::get_track_eval(), PHG4Particle::get_track_id(), SvtxEvalStack::get_truth_eval(), SvtxTruthEval::get_vertex(), PHG4VtxPoint::get_x(), PHG4Hit::get_x(), SvtxTrack::get_x(), PHG4VtxPoint::get_y(), PHG4Hit::get_y(), SvtxTrack::get_y(), PHG4VtxPoint::get_z(), PHG4Hit::get_z(), SvtxTrack::get_z(), EMCalTrk::gflavor, gflavor, EMCalTrk::gfpx, EMCalTrk::gfpy, EMCalTrk::gfpz, EMCalTrk::gfx, EMCalTrk::gfy, EMCalTrk::gfz, EMCalTrk::gpx, gpx, EMCalTrk::gpy, gpy, EMCalTrk::gpz, gpz, EMCalTrk::gtrackID, gtrackID, EMCalTrk::gvx, EMCalTrk::gvy, EMCalTrk::gvz, SvtxTrack::HCALIN, EMCalTrk::hcalindeta, EMCalTrk::hcalindphi, EMCalTrk::hcaline, EMCalTrk::hcaline3x3, SvtxTrack::HCALOUT, EMCalTrk::hcaloutdeta, EMCalTrk::hcaloutdphi, EMCalTrk::hcaloute, EMCalTrk::hcaloute3x3, kCEMC, kHCALIN, layer, EMCalTrk::layers, EMCalTrk::ndf, EMCalTrk::nfromtruth, ng4hits, EMCalTrk::ng4hits, EMCalTrk::nhits, EMCalTrk::pcax, EMCalTrk::pcay, EMCalTrk::pcaz, SvtxTrack::PRES, EMCalTrk::presdeta, EMCalTrk::presdphi, EMCalTrk::prese, EMCalTrk::prese3x3, EMCalTrk::px, EMCalTrk::py, EMCalTrk::pz, EMCalTrk::quality, SvtxEvalStack::set_strict(), SvtxTrack::size_clusters(), EMCalTrk::trackID, and trackID.

Referenced by process_event_Trk(), and process_event_UpslisonTrig().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EMCalAna::eval_trk_proj ( SvtxTrack track,
EMCalTrk trk,
EMCalAna::enu_calo  calo_id,
const double  gvz,
PHCompositeNode topNode 
)
private
bool EMCalAna::flag ( enu_flags  flag)
inline

Definition at line 76 of file EMCalAna.h.

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

References _flags.

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

+ Here is the caller graph for this function:

uint32_t EMCalAna::get_flags ( ) const
inline

Definition at line 58 of file EMCalAna.h.

View newest version in sPHENIX GitHub at line 58 of file EMCalAna.h

References _flags.

Fun4AllHistoManager * EMCalAna::get_HistoManager ( )
private

Definition at line 930 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 930 of file EMCalAna.C

References assert, Fun4AllServer::getHistoManager(), Fun4AllServer::instance(), and Fun4AllServer::registerHistoManager().

Referenced by End(), Init_SF(), Init_Tower(), process_event_SF(), and process_event_Tower().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float EMCalAna::get_mag_field ( ) const
inline

Definition at line 87 of file EMCalAna.h.

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

References _magfield.

int EMCalAna::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 186 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 186 of file EMCalAna.C

References _filename, _ievent, Fun4AllReturnCodes::EVENT_OK, flag(), PHTFileServer::get(), Init_SF(), Init_Tower(), Init_Trk(), Init_UpslisonTrig(), kProcessSF, kProcessTower, kProcessTrk, kProcessUpslisonTrig, and PHTFileServer::open().

+ Here is the call graph for this function:

int EMCalAna::Init_SF ( PHCompositeNode topNode)
private

Definition at line 949 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 949 of file EMCalAna.C

References assert, Fun4AllReturnCodes::EVENT_OK, get_HistoManager(), and Fun4AllHistoManager::registerHisto().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int EMCalAna::Init_Tower ( PHCompositeNode topNode)
private

Definition at line 1251 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 1251 of file EMCalAna.C

References assert, Fun4AllReturnCodes::EVENT_OK, get_HistoManager(), and Fun4AllHistoManager::registerHisto().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int EMCalAna::Init_Trk ( PHCompositeNode topNode)
private

Definition at line 890 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 890 of file EMCalAna.C

References Fun4AllReturnCodes::EVENT_OK.

Referenced by Init().

+ Here is the caller graph for this function:

int EMCalAna::Init_UpslisonTrig ( PHCompositeNode topNode)
private

Definition at line 242 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 242 of file EMCalAna.C

References Fun4AllReturnCodes::EVENT_OK.

Referenced by Init().

+ Here is the caller graph for this function:

int EMCalAna::InitRun ( PHCompositeNode )
virtual

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 98 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 98 of file EMCalAna.C

References _cemc_abs_hit_container, _cemc_hit_container, _hcalin_abs_hit_container, _hcalin_hit_container, _hcalout_abs_hit_container, _hcalout_hit_container, _ievent, _trk, assert, Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), flag(), kProcessTrk, kProcessUpslisonTrig, and PHWHERE.

+ Here is the call graph for this function:

int EMCalAna::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 218 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 218 of file EMCalAna.C

References _eval_stack, Fun4AllReturnCodes::EVENT_OK, flag(), kProcessSF, kProcessTower, kProcessTrk, kProcessUpslisonTrig, SvtxEvalStack::next_event(), process_event_SF(), process_event_Tower(), process_event_Trk(), process_event_UpslisonTrig(), and verbosity.

+ Here is the call graph for this function:

int EMCalAna::process_event_Tower ( PHCompositeNode topNode)
private

Definition at line 1298 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 1298 of file EMCalAna.C

References Fun4AllReturnCodes::ABORTEVENT, assert, Fun4AllReturnCodes::DISCARDEVENT, energy, Fun4AllReturnCodes::EVENT_OK, RawTower::get_energy(), RawTowerGeomContainer::get_etabins(), get_HistoManager(), RawTowerGeomContainer::get_phibins(), Fun4AllHistoManager::getHisto(), RawTowerContainer::getTower(), h, PHWHERE, round(), size, and verbosity.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int EMCalAna::process_event_Trk ( PHCompositeNode topNode)
private

Definition at line 901 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 901 of file EMCalAna.C

References _eval_stack, _trk, assert, eval_trk(), Fun4AllReturnCodes::EVENT_OK, PHG4TruthInfoContainer::GetPrimaryParticleRange(), SvtxEvalStack::set_strict(), and verbosity.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int EMCalAna::process_event_UpslisonTrig ( PHCompositeNode topNode)
private

Definition at line 247 of file EMCalAna.C.

View newest version in sPHENIX GitHub at line 247 of file EMCalAna.C

References _eval_stack, assert, Fun4AllReturnCodes::DISCARDEVENT, eval_trk(), Fun4AllReturnCodes::EVENT_OK, PHG4Particle::get_pid(), PHG4Particle::get_track_id(), UpsilonPair::get_trk(), PHG4TruthInfoContainer::GetMap(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), UpsilonPair::gmass, UpsilonPair::good_upsilon, mass, UpsilonPair::mass, particle, EMCalTrk::px, EMCalTrk::py, EMCalTrk::pz, SvtxEvalStack::set_strict(), and verbosity.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EMCalAna::reset_flag ( enu_flags  flag)
inline

Definition at line 82 of file EMCalAna.h.

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

References _flags.

void EMCalAna::set_flag ( enu_flags  flag)
inline

Definition at line 70 of file EMCalAna.h.

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

References _flags.

void EMCalAna::set_flags ( enu_flags  flags)
inline

Definition at line 64 of file EMCalAna.h.

View newest version in sPHENIX GitHub at line 64 of file EMCalAna.h

References _flags.

void EMCalAna::set_mag_field ( float  magfield)
inline

Definition at line 88 of file EMCalAna.h.

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

References _magfield, and G4MAGNET::magfield.

Member Data Documentation

PHG4HitContainer* EMCalAna::_bh_hit_container
private

Definition at line 151 of file EMCalAna.h.

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

Referenced by EMCalAna().

PHG4HitContainer* EMCalAna::_bh_minus_hit_container
private

Definition at line 153 of file EMCalAna.h.

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

Referenced by EMCalAna().

PHG4HitContainer* EMCalAna::_bh_plus_hit_container
private

Definition at line 152 of file EMCalAna.h.

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

Referenced by EMCalAna().

PHG4HitContainer* EMCalAna::_cemc_abs_hit_container
private

Definition at line 149 of file EMCalAna.h.

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

Referenced by EMCalAna(), InitRun(), and process_event_SF().

PHG4HitContainer* EMCalAna::_cemc_electronics_hit_container
private

Definition at line 154 of file EMCalAna.h.

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

Referenced by EMCalAna().

PHG4HitContainer* EMCalAna::_cemc_hit_container
private

Definition at line 146 of file EMCalAna.h.

View newest version in sPHENIX GitHub at line 146 of file EMCalAna.h

Referenced by EMCalAna(), InitRun(), and process_event_SF().

SvtxEvalStack* EMCalAna::_eval_stack
private

Definition at line 132 of file EMCalAna.h.

View newest version in sPHENIX GitHub at line 132 of file EMCalAna.h

Referenced by eval_trk(), eval_trk_proj(), process_event(), process_event_Trk(), process_event_UpslisonTrig(), and ~EMCalAna().

std::string EMCalAna::_filename
private

Definition at line 139 of file EMCalAna.h.

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

Referenced by End(), and Init().

uint32_t EMCalAna::_flags
private

Definition at line 141 of file EMCalAna.h.

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

Referenced by flag(), get_flags(), reset_flag(), set_flag(), and set_flags().

PHG4HitContainer* EMCalAna::_hcalin_abs_hit_container
private

Definition at line 148 of file EMCalAna.h.

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

Referenced by EMCalAna(), InitRun(), and process_event_SF().

PHG4HitContainer* EMCalAna::_hcalin_hit_container
private

Definition at line 145 of file EMCalAna.h.

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

Referenced by EMCalAna(), InitRun(), and process_event_SF().

PHG4HitContainer* EMCalAna::_hcalin_spt_hit_container
private

Definition at line 155 of file EMCalAna.h.

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

Referenced by EMCalAna().

PHG4HitContainer* EMCalAna::_hcalout_abs_hit_container
private

Definition at line 147 of file EMCalAna.h.

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

Referenced by EMCalAna(), InitRun(), and process_event_SF().

PHG4HitContainer* EMCalAna::_hcalout_hit_container
private

Definition at line 144 of file EMCalAna.h.

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

Referenced by EMCalAna(), InitRun(), and process_event_SF().

PHG4HoughTransform EMCalAna::_hough
private

Definition at line 137 of file EMCalAna.h.

View newest version in sPHENIX GitHub at line 137 of file EMCalAna.h

Referenced by eval_trk_proj().

unsigned long EMCalAna::_ievent
private

Definition at line 142 of file EMCalAna.h.

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

Referenced by Init(), and InitRun().

double EMCalAna::_magfield
private

Definition at line 136 of file EMCalAna.h.

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

Referenced by eval_trk_proj(), get_mag_field(), and set_mag_field().

PHG4HitContainer* EMCalAna::_magnet_hit_container
private

Definition at line 150 of file EMCalAna.h.

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

Referenced by EMCalAna().

PHG4HitContainer* EMCalAna::_svtx_hit_container
private

Definition at line 156 of file EMCalAna.h.

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

Referenced by EMCalAna().

PHG4HitContainer* EMCalAna::_svtx_support_hit_container
private

Definition at line 157 of file EMCalAna.h.

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

Referenced by EMCalAna().

TTree* EMCalAna::_T_EMCalTrk
private

Definition at line 133 of file EMCalAna.h.

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

Referenced by End().

EMCalTrk* EMCalAna::_trk
private

Definition at line 134 of file EMCalAna.h.

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

Referenced by InitRun(), and process_event_Trk().


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