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

#include <analysis/blob/master/HF-Jet/SoftLeptonTagging/SoftLeptonTaggingTruth.h>

+ Inheritance diagram for SoftLeptonTaggingTruth:
+ Collaboration diagram for SoftLeptonTaggingTruth:

Public Types

enum  enu_flags { kProcessTruthSpectrum = 1 << 1, kDefaultFlag = kProcessTruthSpectrum }
 

Public Member Functions

 SoftLeptonTaggingTruth (const std::string &truth_jet, enu_flags flags=kDefaultFlag)
 
virtual ~SoftLeptonTaggingTruth ()
 
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_E_Ratio () const
 Energy ratio difference cut from 1 for matched jets.
 
void set_jet_match_E_Ratio (double jetMatchDERatio)
 Energy ratio difference cut from 1 for matched jets.
 
double get_jet_match_dR () const
 Eta difference cut for matched jets.
 
void set_jet_match_dR (double jetMatchDEta)
 Eta difference cut for matched jets.
 
double get_jet_match_dca () const
 Phi difference cut for matched jets.
 
void set_jet_match_dca (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)
 
int End (PHCompositeNode *topNode)
 Called at the end of all processing.
 
- 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.
 

Static Public Member Functions

static Fun4AllHistoManagergetHistoManager ()
 Get a pointer to the default hist manager for QA modules.
 

Private Types

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

Private Member Functions

void useLogBins (TAxis *axis)
 utility function to
 
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)
 
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
 
PHG4TruthInfoContainer_truth_container
 
uint32_t _flags
 
std::pair< double, doubleeta_range
 eta range
 
double _jet_match_dR
 Eta difference cut for matched jets.
 
double _jet_match_dca
 Phi difference cut for matched jets.
 
double _jet_match_E_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 28 of file SoftLeptonTaggingTruth.h.

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

Member Typedef Documentation

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

cache the jet evaluation modules

Definition at line 162 of file SoftLeptonTaggingTruth.h.

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

Member Enumeration Documentation

Enumerator:
kProcessTruthSpectrum 

spectrum of truth jets

kDefaultFlag 

Definition at line 33 of file SoftLeptonTaggingTruth.h.

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

Constructor & Destructor Documentation

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

Definition at line 42 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 42 of file SoftLeptonTaggingTruth.C

SoftLeptonTaggingTruth::~SoftLeptonTaggingTruth ( )
virtual

Definition at line 53 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 53 of file SoftLeptonTaggingTruth.C

Member Function Documentation

int SoftLeptonTaggingTruth::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 49 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 49 of file SoftLeptonTaggingTruth.h

References _reco_jets.

int SoftLeptonTaggingTruth::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 84 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 84 of file SoftLeptonTaggingTruth.C

References Fun4AllReturnCodes::EVENT_OK.

bool SoftLeptonTaggingTruth::flag ( enu_flags  flag)
inline

Definition at line 74 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 74 of file SoftLeptonTaggingTruth.h

References _flags.

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

+ Here is the caller graph for this function:

TString SoftLeptonTaggingTruth::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 151 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 151 of file SoftLeptonTaggingTruth.C

References assert, and eta_range.

Referenced by Init_Spectrum().

+ Here is the caller graph for this function:

uint32_t SoftLeptonTaggingTruth::get_flags ( ) const
inline

Definition at line 56 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 56 of file SoftLeptonTaggingTruth.h

References _flags.

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

common prefix for QA histograms

Definition at line 169 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 169 of file SoftLeptonTaggingTruth.C

Referenced by Init_Spectrum(), and process_Spectrum().

+ Here is the caller graph for this function:

double SoftLeptonTaggingTruth::get_jet_match_dca ( ) const
inline

Phi difference cut for matched jets.

Definition at line 115 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 115 of file SoftLeptonTaggingTruth.h

References _jet_match_dca.

double SoftLeptonTaggingTruth::get_jet_match_dR ( ) const
inline

Eta difference cut for matched jets.

Definition at line 101 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 101 of file SoftLeptonTaggingTruth.h

References _jet_match_dR.

double SoftLeptonTaggingTruth::get_jet_match_E_Ratio ( ) const
inline

Energy ratio difference cut from 1 for matched jets.

Definition at line 87 of file SoftLeptonTaggingTruth.h.

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

References _jet_match_E_Ratio.

Fun4AllHistoManager * SoftLeptonTaggingTruth::getHistoManager ( )
static

Get a pointer to the default hist manager for QA modules.

Definition at line 615 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 615 of file SoftLeptonTaggingTruth.C

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

Referenced by Fun4All_G4_sPHENIX(), Init(), Init_Spectrum(), and process_Spectrum().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int SoftLeptonTaggingTruth::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 91 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 91 of file SoftLeptonTaggingTruth.C

References _truth_jet, assert, Fun4AllReturnCodes::EVENT_OK, flag(), getHistoManager(), Init_Spectrum(), kProcessTruthSpectrum, and verbosity.

+ Here is the call graph for this function:

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

Definition at line 189 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 189 of file SoftLeptonTaggingTruth.C

References assert, Acts::UnitConstants::e, Fun4AllReturnCodes::EVENT_OK, get_eta_range_str(), get_histo_prefix(), getHistoManager(), h, h2, i, Fun4AllHistoManager::registerHisto(), and useLogBins().

Referenced by Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int SoftLeptonTaggingTruth::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 58 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 58 of file SoftLeptonTaggingTruth.C

References _jettrutheval, _truth_container, _truth_jet, assert, Fun4AllReturnCodes::EVENT_OK, flag(), kProcessTruthSpectrum, and verbosity.

+ Here is the call graph for this function:

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

acceptance cut on jet object

Definition at line 160 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 160 of file SoftLeptonTaggingTruth.C

References assert, eta_range, and Jet::get_eta().

Referenced by process_Spectrum().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int SoftLeptonTaggingTruth::process_event ( PHCompositeNode )
virtual

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

Reimplemented from SubsysReco.

Definition at line 109 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 109 of file SoftLeptonTaggingTruth.C

References _jetevalstacks, _jettrutheval, _truth_jet, assert, Fun4AllReturnCodes::EVENT_OK, flag(), kProcessTruthSpectrum, process_Spectrum(), and verbosity.

+ Here is the call graph for this function:

int SoftLeptonTaggingTruth::process_Spectrum ( PHCompositeNode topNode,
const std::string &  jet_name,
const bool  is_reco_jet 
)
private
void SoftLeptonTaggingTruth::reset_flag ( enu_flags  flag)
inline

Definition at line 80 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 80 of file SoftLeptonTaggingTruth.h

References _flags.

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

set eta range

Definition at line 137 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 137 of file SoftLeptonTaggingTruth.C

References assert, eta_range, and swap().

+ Here is the call graph for this function:

void SoftLeptonTaggingTruth::set_flag ( enu_flags  flag)
inline

Definition at line 68 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 68 of file SoftLeptonTaggingTruth.h

References _flags.

void SoftLeptonTaggingTruth::set_flags ( enu_flags  flags)
inline

Definition at line 62 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 62 of file SoftLeptonTaggingTruth.h

References _flags.

void SoftLeptonTaggingTruth::set_jet_match_dca ( double  jetMatchDPhi)
inline

Phi difference cut for matched jets.

Definition at line 122 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 122 of file SoftLeptonTaggingTruth.h

References _jet_match_dca.

void SoftLeptonTaggingTruth::set_jet_match_dR ( double  jetMatchDEta)
inline

Eta difference cut for matched jets.

Definition at line 108 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 108 of file SoftLeptonTaggingTruth.h

References _jet_match_dR.

void SoftLeptonTaggingTruth::set_jet_match_E_Ratio ( double  jetMatchDERatio)
inline

Energy ratio difference cut from 1 for matched jets.

Definition at line 94 of file SoftLeptonTaggingTruth.h.

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

References _jet_match_E_Ratio.

void SoftLeptonTaggingTruth::useLogBins ( TAxis *  axis)
private

utility function to

Definition at line 637 of file SoftLeptonTaggingTruth.C.

View newest version in sPHENIX GitHub at line 637 of file SoftLeptonTaggingTruth.C

References assert, bins, i, and width.

Referenced by Init_Spectrum().

+ Here is the caller graph for this function:

Member Data Documentation

uint32_t SoftLeptonTaggingTruth::_flags
private

Definition at line 175 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 175 of file SoftLeptonTaggingTruth.h

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

double SoftLeptonTaggingTruth::_jet_match_dca
private

Phi difference cut for matched jets.

Definition at line 193 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 193 of file SoftLeptonTaggingTruth.h

Referenced by get_jet_match_dca(), process_Spectrum(), and set_jet_match_dca().

double SoftLeptonTaggingTruth::_jet_match_dR
private

Eta difference cut for matched jets.

Definition at line 190 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 190 of file SoftLeptonTaggingTruth.h

Referenced by get_jet_match_dR(), process_Spectrum(), and set_jet_match_dR().

double SoftLeptonTaggingTruth::_jet_match_E_Ratio
private

Energy ratio difference cut from 1 for matched jets.

Definition at line 196 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 196 of file SoftLeptonTaggingTruth.h

Referenced by get_jet_match_E_Ratio(), process_Spectrum(), and set_jet_match_E_Ratio().

jetevalstacks_map SoftLeptonTaggingTruth::_jetevalstacks
private

Definition at line 163 of file SoftLeptonTaggingTruth.h.

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

Referenced by process_event(), and process_Spectrum().

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

Definition at line 164 of file SoftLeptonTaggingTruth.h.

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

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

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

list of reco jet

Definition at line 171 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 171 of file SoftLeptonTaggingTruth.h

Referenced by add_reco_jet().

PHG4TruthInfoContainer* SoftLeptonTaggingTruth::_truth_container
private

Definition at line 173 of file SoftLeptonTaggingTruth.h.

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

Referenced by InitRun(), and process_Spectrum().

std::string SoftLeptonTaggingTruth::_truth_jet
private

truth jet name

Definition at line 168 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 168 of file SoftLeptonTaggingTruth.h

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

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

eta range

Definition at line 178 of file SoftLeptonTaggingTruth.h.

View newest version in sPHENIX GitHub at line 178 of file SoftLeptonTaggingTruth.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: