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

#include <coresoftware/blob/master/offline/QA/modules/QAG4SimulationJet.h>

+ Inheritance diagram for QAG4SimulationJet:
+ Collaboration diagram for QAG4SimulationJet:

Public Types

enum  enu_flags { kProcessTruthSpectrum = 1 << 1, kProcessRecoSpectrum = 1 << 2, kProcessTruthMatching = 1 << 3, kDefaultFlag = kProcessTruthSpectrum | kProcessRecoSpectrum | kProcessTruthMatching }
 

Public Member Functions

 QAG4SimulationJet (const std::string &truth_jet, enu_flags flags=kDefaultFlag)
 
virtual ~QAG4SimulationJet ()
 
int add_reco_jet (const std::string &reco_jet)
 
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)
 
double get_jet_match_dE_Ratio () const
 Energy ratio difference cut from 1 for matched jets.
 
void set_jet_match_dE_Ratio (double jetMatchDERatio)
 Energy ratio difference cut from 1 for matched jets.
 
double get_jet_match_dEta () const
 Eta difference cut for matched jets.
 
void set_jet_match_dEta (double jetMatchDEta)
 Eta difference cut for matched jets.
 
double get_jet_match_dPhi () const
 Phi difference cut for matched jets.
 
void set_jet_match_dPhi (double jetMatchDPhi)
 Phi difference cut for matched jets.
 
void set_eta_range (double low, double high)
 set eta range
 
int Init (PHCompositeNode *topNode)
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *topNode)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int End (PHCompositeNode *)
 Called at the end of all processing.
 
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

typedef std::map< std::string,
std::shared_ptr< JetEvalStack > > 
jetevalstacks_map
 cache the jet evaluation modules
 

Private Member Functions

int Init_Spectrum (PHCompositeNode *topNode, const std::string &jet_name)
 
int process_Spectrum (PHCompositeNode *topNode, const std::string &jet_name, const bool is_reco_jet)
 
int Init_TruthMatching (PHCompositeNode *topNode, const std::string &reco_jet_name)
 
int process_TruthMatching (PHCompositeNode *topNode, const std::string &reco_jet_name)
 
std::string get_histo_prefix (const std::string &src_jet_name="", const std::string &reco_jet_name="")
 common prefix for QA histograms
 
TString get_eta_range_str (const char *eta_name="#eta_{Jet}") const
 
bool jet_acceptance_cut (const Jet *jet) const
 acceptance cut on jet object
 

Private Attributes

jetevalstacks_map _jetevalstacks
 
std::shared_ptr< JetTruthEval_jettrutheval
 
std::string _truth_jet
 truth jet name
 
std::set< std::string > _reco_jets
 list of reco jet
 
uint32_t _flags
 
std::pair< double, double > eta_range
 eta range
 
double _jet_match_dEta
 Eta difference cut for matched jets.
 
double _jet_match_dPhi
 Phi difference cut for matched jets.
 
double _jet_match_dE_Ratio
 Energy ratio difference cut from 1 for matched jets.
 

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 21 of file QAG4SimulationJet.h

Member Typedef Documentation

typedef std::map<std::string, std::shared_ptr<JetEvalStack> > QAG4SimulationJet::jetevalstacks_map
private

cache the jet evaluation modules

Definition at line 145 of file QAG4SimulationJet.h.

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

Member Enumeration Documentation

Enumerator:
kProcessTruthSpectrum 

spectrum of truth jets

kProcessRecoSpectrum 

spectrum of reconstructed jets

kProcessTruthMatching 

comparison of reco jet VS truth

kDefaultFlag 

default. Do everything

Definition at line 24 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 24 of file QAG4SimulationJet.h

Constructor & Destructor Documentation

QAG4SimulationJet::QAG4SimulationJet ( const std::string &  truth_jet,
enu_flags  flags = kDefaultFlag 
)

Definition at line 34 of file QAG4SimulationJet.cc.

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

virtual QAG4SimulationJet::~QAG4SimulationJet ( )
inlinevirtual

Definition at line 41 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 41 of file QAG4SimulationJet.h

Member Function Documentation

int QAG4SimulationJet::add_reco_jet ( const std::string &  reco_jet)
inline

add reco jet to the process list

Returns
number of reco jet on list

Definition at line 45 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 45 of file QAG4SimulationJet.h

References _reco_jets.

Referenced by Jet_QA().

+ Here is the caller graph for this function:

bool QAG4SimulationJet::flag ( enu_flags  flag)
inline

Definition at line 70 of file QAG4SimulationJet.h.

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

References _flags.

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

+ Here is the caller graph for this function:

TString QAG4SimulationJet::get_eta_range_str ( const char *  eta_name = "#eta_{Jet}") const
private

string description of eta range

Returns
TString as ROOT likes

Definition at line 196 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 196 of file QAG4SimulationJet.cc

References eta_range.

Referenced by Init_Spectrum(), and Init_TruthMatching().

+ Here is the caller graph for this function:

uint32_t QAG4SimulationJet::get_flags ( ) const
inline

Definition at line 52 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 52 of file QAG4SimulationJet.h

References _flags.

std::string QAG4SimulationJet::get_histo_prefix ( const std::string &  src_jet_name = "",
const std::string &  reco_jet_name = "" 
)
private

common prefix for QA histograms

Definition at line 212 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 212 of file QAG4SimulationJet.cc

Referenced by Init_Spectrum(), Init_TruthMatching(), process_Spectrum(), and process_TruthMatching().

+ Here is the caller graph for this function:

double QAG4SimulationJet::get_jet_match_dE_Ratio ( ) const
inline

Energy ratio difference cut from 1 for matched jets.

Definition at line 83 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 83 of file QAG4SimulationJet.h

References _jet_match_dE_Ratio.

double QAG4SimulationJet::get_jet_match_dEta ( ) const
inline

Eta difference cut for matched jets.

Definition at line 97 of file QAG4SimulationJet.h.

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

References _jet_match_dEta.

double QAG4SimulationJet::get_jet_match_dPhi ( ) const
inline

Phi difference cut for matched jets.

Definition at line 111 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 111 of file QAG4SimulationJet.h

References _jet_match_dPhi.

int QAG4SimulationJet::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 87 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 87 of file QAG4SimulationJet.cc

References _reco_jets, _truth_jet, Fun4AllReturnCodes::EVENT_OK, flag(), QAHistManagerDef::getHistoManager(), Init_Spectrum(), Init_TruthMatching(), kProcessRecoSpectrum, kProcessTruthMatching, kProcessTruthSpectrum, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int QAG4SimulationJet::Init_Spectrum ( PHCompositeNode topNode,
const std::string &  jet_name 
)
private

Definition at line 231 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 231 of file QAG4SimulationJet.cc

References e, Fun4AllReturnCodes::EVENT_OK, get_eta_range_str(), get_histo_prefix(), QAHistManagerDef::getHistoManager(), Acts::UnitConstants::h, M_PI, Fun4AllHistoManager::registerHisto(), and QAHistManagerDef::useLogBins().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationJet::Init_TruthMatching ( PHCompositeNode topNode,
const std::string &  reco_jet_name 
)
private

Definition at line 556 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 556 of file QAG4SimulationJet.cc

References _truth_jet, Fun4AllReturnCodes::EVENT_OK, get_eta_range_str(), get_histo_prefix(), QAHistManagerDef::getHistoManager(), Acts::UnitConstants::h, and Fun4AllHistoManager::registerHisto().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationJet::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 48 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 48 of file QAG4SimulationJet.cc

References _jetevalstacks, _jettrutheval, _reco_jets, _truth_jet, Fun4AllReturnCodes::EVENT_OK, flag(), kProcessRecoSpectrum, kProcessTruthMatching, kProcessTruthSpectrum, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

bool QAG4SimulationJet::jet_acceptance_cut ( const Jet jet) const
private

acceptance cut on jet object

Definition at line 204 of file QAG4SimulationJet.cc.

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

References eta_range, and Jet::get_eta().

Referenced by process_Spectrum(), and process_TruthMatching().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationJet::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 129 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 129 of file QAG4SimulationJet.cc

References _jetevalstacks, _jettrutheval, _reco_jets, _truth_jet, Fun4AllReturnCodes::EVENT_OK, flag(), kProcessRecoSpectrum, kProcessTruthMatching, kProcessTruthSpectrum, process_Spectrum(), process_TruthMatching(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

int QAG4SimulationJet::process_Spectrum ( PHCompositeNode topNode,
const std::string &  jet_name,
const bool  is_reco_jet 
)
private

Definition at line 321 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 321 of file QAG4SimulationJet.cc

References _jetevalstacks, _jettrutheval, JetMap::begin(), Jet::CEMC_CLUSTER, Jet::CEMC_TOWER, JetMap::end(), Fun4AllReturnCodes::EVENT_OK, g4zmq::exit(), Jet::get_e(), JetRecoEval::get_energy_contribution(), Jet::get_et(), Jet::get_eta(), get_histo_prefix(), Jet::get_mass(), Jet::get_phi(), PHG4HitDefs::get_volume_id(), Fun4AllHistoManager::getHisto(), QAHistManagerDef::getHistoManager(), Jet::HCALIN_CLUSTER, Jet::HCALIN_TOWER, Jet::identify(), it, jet_acceptance_cut(), JetMap::size(), Jet::size_comp(), Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_A_LOT.

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int QAG4SimulationJet::process_TruthMatching ( PHCompositeNode topNode,
const std::string &  reco_jet_name 
)
private

Definition at line 605 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 605 of file QAG4SimulationJet.cc

References _jet_match_dE_Ratio, _jet_match_dEta, _jet_match_dPhi, _jetevalstacks, _truth_jet, JetMap::begin(), JetRecoEval::best_jet_from(), e, JetMap::end(), Fun4AllReturnCodes::EVENT_OK, g4zmq::exit(), Jet::get_e(), Jet::get_et(), Jet::get_eta(), get_histo_prefix(), Jet::get_phi(), Fun4AllHistoManager::getHisto(), QAHistManagerDef::getHistoManager(), Jet::identify(), jet_acceptance_cut(), JetRecoEval::max_truth_jet_by_energy(), JetRecoEval::unique_reco_jet_from_truth(), JetRecoEval::unique_truth_jet_from_reco(), and Fun4AllBase::Verbosity().

Referenced by process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QAG4SimulationJet::reset_flag ( enu_flags  flag)
inline

Definition at line 76 of file QAG4SimulationJet.h.

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

References _flags.

void QAG4SimulationJet::set_eta_range ( double  low,
double  high 
)

set eta range

Definition at line 183 of file QAG4SimulationJet.cc.

View newest version in sPHENIX GitHub at line 183 of file QAG4SimulationJet.cc

References eta_range, and boost::swap().

+ Here is the call graph for this function:

void QAG4SimulationJet::set_flag ( enu_flags  flag)
inline

Definition at line 64 of file QAG4SimulationJet.h.

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

References _flags.

void QAG4SimulationJet::set_flags ( enu_flags  flags)
inline

Definition at line 58 of file QAG4SimulationJet.h.

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

References _flags.

void QAG4SimulationJet::set_jet_match_dE_Ratio ( double  jetMatchDERatio)
inline

Energy ratio difference cut from 1 for matched jets.

Definition at line 90 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 90 of file QAG4SimulationJet.h

References _jet_match_dE_Ratio.

void QAG4SimulationJet::set_jet_match_dEta ( double  jetMatchDEta)
inline

Eta difference cut for matched jets.

Definition at line 104 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 104 of file QAG4SimulationJet.h

References _jet_match_dEta.

void QAG4SimulationJet::set_jet_match_dPhi ( double  jetMatchDPhi)
inline

Phi difference cut for matched jets.

Definition at line 118 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 118 of file QAG4SimulationJet.h

References _jet_match_dPhi.

Member Data Documentation

uint32_t QAG4SimulationJet::_flags
private

Definition at line 155 of file QAG4SimulationJet.h.

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

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

double QAG4SimulationJet::_jet_match_dE_Ratio
private

Energy ratio difference cut from 1 for matched jets.

Definition at line 176 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 176 of file QAG4SimulationJet.h

Referenced by get_jet_match_dE_Ratio(), process_TruthMatching(), and set_jet_match_dE_Ratio().

double QAG4SimulationJet::_jet_match_dEta
private

Eta difference cut for matched jets.

Definition at line 170 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 170 of file QAG4SimulationJet.h

Referenced by get_jet_match_dEta(), process_TruthMatching(), and set_jet_match_dEta().

double QAG4SimulationJet::_jet_match_dPhi
private

Phi difference cut for matched jets.

Definition at line 173 of file QAG4SimulationJet.h.

View newest version in sPHENIX GitHub at line 173 of file QAG4SimulationJet.h

Referenced by get_jet_match_dPhi(), process_TruthMatching(), and set_jet_match_dPhi().

jetevalstacks_map QAG4SimulationJet::_jetevalstacks
private

Definition at line 146 of file QAG4SimulationJet.h.

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

Referenced by InitRun(), process_event(), process_Spectrum(), and process_TruthMatching().

std::shared_ptr<JetTruthEval> QAG4SimulationJet::_jettrutheval
private

Definition at line 147 of file QAG4SimulationJet.h.

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

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

std::set<std::string> QAG4SimulationJet::_reco_jets
private

list of reco jet

Definition at line 153 of file QAG4SimulationJet.h.

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

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

std::string QAG4SimulationJet::_truth_jet
private

truth jet name

Definition at line 150 of file QAG4SimulationJet.h.

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

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

std::pair<double, double> QAG4SimulationJet::eta_range
private

eta range

Definition at line 158 of file QAG4SimulationJet.h.

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

Referenced by get_eta_range_str(), jet_acceptance_cut(), and set_eta_range().


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