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

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

+ Inheritance diagram for EMCalCalib:
+ Collaboration diagram for EMCalCalib:

Public Types

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

Public Member Functions

 EMCalCalib (const std::string &filename="cemc_ana.root", enu_flags flags=kDefaultFlag)
 
virtual ~EMCalCalib ()
 
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_MCPhoton (PHCompositeNode *topNode)
 
int process_event_MCPhoton (PHCompositeNode *topNode)
 
int Init_UpslisonTrig (PHCompositeNode *topNode)
 
int process_event_UpslisonTrig (PHCompositeNode *topNode)
 
void eval_photon (PHG4Particle *primary_particle, MCPhoton &trk, PHCompositeNode *topNode)
 project a photon to calorimeters and collect towers around it
 
void eval_photon_proj (PHG4Particle *g4particle, MCPhoton &trk, enu_calo calo_id, const double gvz, PHCompositeNode *topNode)
 

Private Attributes

SvtxEvalStack_eval_stack
 
TTree * _T_EMCalTrk
 
MCPhoton_mc_photon
 
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 EMCalCalib.h.

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

Member Enumeration Documentation

enum EMCalCalib::enu_calo
private
Enumerator:
kCEMC 
kHCALIN 
kHCALOUT 

Definition at line 128 of file EMCalCalib.h.

View newest version in sPHENIX GitHub at line 128 of file EMCalCalib.h

Enumerator:
kProcessSF 
kProcessTower 
kProcessMCPhoton 
kProcessUpslisonTrig 
kDefaultFlag 

Definition at line 33 of file EMCalCalib.h.

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

Constructor & Destructor Documentation

EMCalCalib::~EMCalCalib ( )
virtual

Definition at line 76 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 76 of file EMCalCalib.C

References _eval_stack.

Member Function Documentation

int EMCalCalib::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 153 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 153 of file EMCalCalib.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 EMCalCalib::eval_photon ( PHG4Particle primary_particle,
MCPhoton trk,
PHCompositeNode topNode 
)
private

project a photon to calorimeters and collect towers around it

Definition at line 366 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 366 of file EMCalCalib.C

References _eval_stack, SvtxTruthEval::all_truth_hits(), assert, SvtxTrack::begin_clusters(), SvtxTrackEval::best_track_from(), SvtxTrack::CEMC, MCPhoton::cemcdeta, MCPhoton::cemcdphi, MCPhoton::cemce, MCPhoton::cemce3x3, MCPhoton::charge, charge(), MCPhoton::chisq, INTTVtxZ::dca, MCPhoton::dca2d, MCPhoton::dca2dsigma, SvtxTrack::end_clusters(), eval_photon_proj(), MCPhoton::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(), MCPhoton::gflavor, gflavor, MCPhoton::gfpx, MCPhoton::gfpy, MCPhoton::gfpz, MCPhoton::gfx, MCPhoton::gfy, MCPhoton::gfz, MCPhoton::gpx, gpx, MCPhoton::gpy, gpy, MCPhoton::gpz, gpz, MCPhoton::gtrackID, gtrackID, MCPhoton::gvx, MCPhoton::gvy, MCPhoton::gvz, SvtxTrack::HCALIN, MCPhoton::hcalindeta, MCPhoton::hcalindphi, MCPhoton::hcaline, MCPhoton::hcaline3x3, SvtxTrack::HCALOUT, MCPhoton::hcaloutdeta, MCPhoton::hcaloutdphi, MCPhoton::hcaloute, MCPhoton::hcaloute3x3, kCEMC, kHCALIN, layer, MCPhoton::layers, MCPhoton::ndf, MCPhoton::nfromtruth, ng4hits, MCPhoton::ng4hits, MCPhoton::nhits, MCPhoton::pcax, MCPhoton::pcay, MCPhoton::pcaz, SvtxTrack::PRES, MCPhoton::presdeta, MCPhoton::presdphi, MCPhoton::prese, MCPhoton::prese3x3, MCPhoton::px, MCPhoton::py, MCPhoton::pz, MCPhoton::quality, SvtxEvalStack::set_strict(), SvtxTrack::size_clusters(), MCPhoton::trackID, and trackID.

Referenced by process_event_MCPhoton().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool EMCalCalib::flag ( enu_flags  flag)
inline

Definition at line 76 of file EMCalCalib.h.

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

References _flags.

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

+ Here is the caller graph for this function:

uint32_t EMCalCalib::get_flags ( ) const
inline

Definition at line 58 of file EMCalCalib.h.

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

References _flags.

Fun4AllHistoManager * EMCalCalib::get_HistoManager ( )
private

Definition at line 766 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 766 of file EMCalCalib.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 EMCalCalib::get_mag_field ( ) const
inline

Definition at line 88 of file EMCalCalib.h.

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

References _magfield.

int EMCalCalib::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 175 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 175 of file EMCalCalib.C

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

+ Here is the call graph for this function:

int EMCalCalib::Init_MCPhoton ( PHCompositeNode topNode)
private

Definition at line 724 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 724 of file EMCalCalib.C

References Fun4AllReturnCodes::EVENT_OK.

Referenced by Init().

+ Here is the caller graph for this function:

int EMCalCalib::Init_SF ( PHCompositeNode topNode)
private

Definition at line 787 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 787 of file EMCalCalib.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 EMCalCalib::Init_Tower ( PHCompositeNode topNode)
private

Definition at line 991 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 991 of file EMCalCalib.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 EMCalCalib::Init_UpslisonTrig ( PHCompositeNode topNode)
private

Definition at line 235 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 235 of file EMCalCalib.C

References Fun4AllReturnCodes::EVENT_OK.

Referenced by Init().

+ Here is the caller graph for this function:

int EMCalCalib::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 85 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 85 of file EMCalCalib.C

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

+ Here is the call graph for this function:

int EMCalCalib::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 209 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 209 of file EMCalCalib.C

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

+ Here is the call graph for this function:

int EMCalCalib::process_event_MCPhoton ( PHCompositeNode topNode)
private

Definition at line 736 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 736 of file EMCalCalib.C

References _eval_stack, _mc_photon, assert, eval_photon(), 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 EMCalCalib::process_event_SF ( PHCompositeNode topNode)
private

Definition at line 824 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 824 of file EMCalCalib.C

References _cemc_abs_hit_container, _cemc_hit_container, _hcalin_abs_hit_container, _hcalin_hit_container, _hcalout_abs_hit_container, _hcalout_hit_container, assert, Acts::UnitConstants::e, Fun4AllReturnCodes::EVENT_OK, PHG4Hit::get_avg_x(), PHG4Hit::get_avg_y(), PHG4Hit::get_avg_z(), PHG4Hit::get_edep(), get_HistoManager(), PHG4Hit::get_light_yield(), Fun4AllHistoManager::getHisto(), PHG4HitContainer::getHits(), h, and verbosity.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int EMCalCalib::process_event_Tower ( PHCompositeNode topNode)
private

Definition at line 1040 of file EMCalCalib.C.

View newest version in sPHENIX GitHub at line 1040 of file EMCalCalib.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 EMCalCalib::process_event_UpslisonTrig ( PHCompositeNode topNode)
private

Definition at line 242 of file EMCalCalib.C.

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

References Fun4AllReturnCodes::EVENT_OK, and verbosity.

Referenced by process_event().

+ Here is the caller graph for this function:

void EMCalCalib::reset_flag ( enu_flags  flag)
inline

Definition at line 82 of file EMCalCalib.h.

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

References _flags.

void EMCalCalib::set_flag ( enu_flags  flag)
inline

Definition at line 70 of file EMCalCalib.h.

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

References _flags.

void EMCalCalib::set_flags ( enu_flags  flags)
inline

Definition at line 64 of file EMCalCalib.h.

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

References _flags.

void EMCalCalib::set_mag_field ( float  magfield)
inline

Definition at line 93 of file EMCalCalib.h.

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

References _magfield, and G4MAGNET::magfield.

Member Data Documentation

PHG4HitContainer* EMCalCalib::_bh_hit_container
private

Definition at line 160 of file EMCalCalib.h.

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

Referenced by EMCalCalib().

PHG4HitContainer* EMCalCalib::_bh_minus_hit_container
private

Definition at line 162 of file EMCalCalib.h.

View newest version in sPHENIX GitHub at line 162 of file EMCalCalib.h

Referenced by EMCalCalib().

PHG4HitContainer* EMCalCalib::_bh_plus_hit_container
private

Definition at line 161 of file EMCalCalib.h.

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

Referenced by EMCalCalib().

PHG4HitContainer* EMCalCalib::_cemc_abs_hit_container
private

Definition at line 158 of file EMCalCalib.h.

View newest version in sPHENIX GitHub at line 158 of file EMCalCalib.h

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

PHG4HitContainer* EMCalCalib::_cemc_electronics_hit_container
private

Definition at line 163 of file EMCalCalib.h.

View newest version in sPHENIX GitHub at line 163 of file EMCalCalib.h

Referenced by EMCalCalib().

PHG4HitContainer* EMCalCalib::_cemc_hit_container
private

Definition at line 155 of file EMCalCalib.h.

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

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

SvtxEvalStack* EMCalCalib::_eval_stack
private

Definition at line 141 of file EMCalCalib.h.

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

Referenced by eval_photon(), eval_photon_proj(), process_event(), process_event_MCPhoton(), and ~EMCalCalib().

std::string EMCalCalib::_filename
private

Definition at line 148 of file EMCalCalib.h.

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

Referenced by End(), and Init().

uint32_t EMCalCalib::_flags
private

Definition at line 150 of file EMCalCalib.h.

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

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

PHG4HitContainer* EMCalCalib::_hcalin_abs_hit_container
private

Definition at line 157 of file EMCalCalib.h.

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

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

PHG4HitContainer* EMCalCalib::_hcalin_hit_container
private

Definition at line 154 of file EMCalCalib.h.

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

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

PHG4HitContainer* EMCalCalib::_hcalin_spt_hit_container
private

Definition at line 164 of file EMCalCalib.h.

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

Referenced by EMCalCalib().

PHG4HitContainer* EMCalCalib::_hcalout_abs_hit_container
private

Definition at line 156 of file EMCalCalib.h.

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

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

PHG4HitContainer* EMCalCalib::_hcalout_hit_container
private

Definition at line 153 of file EMCalCalib.h.

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

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

PHG4HoughTransform EMCalCalib::_hough
private

Definition at line 146 of file EMCalCalib.h.

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

unsigned long EMCalCalib::_ievent
private

Definition at line 151 of file EMCalCalib.h.

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

Referenced by Init(), and InitRun().

double EMCalCalib::_magfield
private

Definition at line 145 of file EMCalCalib.h.

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

Referenced by get_mag_field(), and set_mag_field().

PHG4HitContainer* EMCalCalib::_magnet_hit_container
private

Definition at line 159 of file EMCalCalib.h.

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

Referenced by EMCalCalib().

MCPhoton* EMCalCalib::_mc_photon
private

Definition at line 143 of file EMCalCalib.h.

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

Referenced by InitRun(), and process_event_MCPhoton().

PHG4HitContainer* EMCalCalib::_svtx_hit_container
private

Definition at line 165 of file EMCalCalib.h.

View newest version in sPHENIX GitHub at line 165 of file EMCalCalib.h

Referenced by EMCalCalib().

PHG4HitContainer* EMCalCalib::_svtx_support_hit_container
private

Definition at line 166 of file EMCalCalib.h.

View newest version in sPHENIX GitHub at line 166 of file EMCalCalib.h

Referenced by EMCalCalib().

TTree* EMCalCalib::_T_EMCalTrk
private

Definition at line 142 of file EMCalCalib.h.

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

Referenced by End().


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