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

JetHepMCLoader loads special jet objects encoded in HepMC records to DST Jet nodes. Example use are loading sHijing HIJFRG jets. More...

#include <coresoftware/blob/master/simulation/g4simulation/g4jets/JetHepMCLoader.h>

+ Inheritance diagram for JetHepMCLoader:
+ Collaboration diagram for JetHepMCLoader:

Classes

struct  hepmc_jet_src
 

Public Member Functions

 JetHepMCLoader (const std::string &jetInputCategory)
 
 ~JetHepMCLoader () override
 
int Init (PHCompositeNode *topNode) override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
void addJet (const std::string &name, int embeddingID, Jet::ALGO algorithm, double parameter, int tagPID, int tagStatus)
 addJet add HepMC entries for a particular type of jets Example of adding sHijing HIJFRG truth jets with R=0.4:
 
void saveQAPlots (bool b=true)
 
- 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 Member Functions

int CreateNodes (PHCompositeNode *topNode)
 
Fun4AllHistoManagergetHistoManager ()
 

Private Attributes

std::string m_jetInputCategory
 
bool m_saveQAPlots
 
std::vector< hepmc_jet_srcm_jetSrc
 

Additional Inherited Members

- Public Types inherited from Fun4AllBase
enum  enu_Verbosity {
  VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3,
  VERBOSITY_A_LOT = 4, VERBOSITY_MAX = INT_MAX - 10
}
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 

Detailed Description

JetHepMCLoader loads special jet objects encoded in HepMC records to DST Jet nodes. Example use are loading sHijing HIJFRG jets.

Example use for readback HIJFRAG truth jets from the sHijing HepMC records:

JetHepMCLoader * hepmcjet = new JetHepMCLoader("sHijing_HIJFRG");
hepmcjet->saveQAPlots();
hepmcjet->addJet("AntiKt_sHijing_HIJFRG_r02",0,Jet::ANTIKT,0.2,2000000,103);
hepmcjet->addJet("AntiKt_sHijing_HIJFRG_r04",0,Jet::ANTIKT,0.4,4000000,103);
hepmcjet->addJet("AntiKt_sHijing_HIJFRG_r06",0,Jet::ANTIKT,0.6,6000000,103);
se->registerSubsystem(hepmcjet);

Definition at line 42 of file JetHepMCLoader.h.

View newest version in sPHENIX GitHub at line 42 of file JetHepMCLoader.h

Constructor & Destructor Documentation

JetHepMCLoader::JetHepMCLoader ( const std::string &  jetInputCategory)
Parameters
[in]jetInputCategoryis the DST PHCompositeNode name that list the output jet maps, e.g. sHijing_HIJFRG for sHijing HIJFRG truth jets

Definition at line 49 of file JetHepMCLoader.cc.

View newest version in sPHENIX GitHub at line 49 of file JetHepMCLoader.cc

JetHepMCLoader::~JetHepMCLoader ( )
override

Definition at line 56 of file JetHepMCLoader.cc.

View newest version in sPHENIX GitHub at line 56 of file JetHepMCLoader.cc

Member Function Documentation

void JetHepMCLoader::addJet ( const std::string &  name,
int  embeddingID,
Jet::ALGO  algorithm,
double  parameter,
int  tagPID,
int  tagStatus 
)

addJet add HepMC entries for a particular type of jets Example of adding sHijing HIJFRG truth jets with R=0.4:

addJet("AntiKt_sHijing_HIJFRG_r04",0,"ANTIKT",0.4,4000000,103);
Parameters
[in]namename of the jet category
[in]embeddingIDhepmc event's embedding ID
[in]algorithmpick one from Jet::ALGO
[in]parameterjet parameter, e.g. radius
[in]tagPIDHepMC entry identifying tag on PID
[in]tagStatusHepMC entry identifying tag on status

Definition at line 215 of file JetHepMCLoader.cc.

View newest version in sPHENIX GitHub at line 215 of file JetHepMCLoader.cc

References algorithm, Jet::ANTIKT, Jet::CAMBRIDGE, Jet::KT, and m_jetSrc.

int JetHepMCLoader::CreateNodes ( PHCompositeNode topNode)
private

Definition at line 249 of file JetHepMCLoader.cc.

View newest version in sPHENIX GitHub at line 249 of file JetHepMCLoader.cc

References Fun4AllReturnCodes::ABORTRUN, PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), m_jetInputCategory, m_jetSrc, and PHWHERE.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int JetHepMCLoader::End ( PHCompositeNode )
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 201 of file JetHepMCLoader.cc.

View newest version in sPHENIX GitHub at line 201 of file JetHepMCLoader.cc

References Fun4AllHistoManager::dumpHistos(), Fun4AllReturnCodes::EVENT_OK, getHistoManager(), m_saveQAPlots, and Fun4AllBase::Name().

+ Here is the call graph for this function:

Fun4AllHistoManager * JetHepMCLoader::getHistoManager ( )
private

Definition at line 292 of file JetHepMCLoader.cc.

View newest version in sPHENIX GitHub at line 292 of file JetHepMCLoader.cc

References Fun4AllServer::getHistoManager(), Fun4AllServer::instance(), Fun4AllBase::Name(), and Fun4AllServer::registerHistoManager().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int JetHepMCLoader::Init ( PHCompositeNode )
overridevirtual

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 60 of file JetHepMCLoader.cc.

View newest version in sPHENIX GitHub at line 60 of file JetHepMCLoader.cc

References Fun4AllReturnCodes::EVENT_OK.

int JetHepMCLoader::InitRun ( PHCompositeNode )
overridevirtual

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 65 of file JetHepMCLoader.cc.

View newest version in sPHENIX GitHub at line 65 of file JetHepMCLoader.cc

References CreateNodes(), getHistoManager(), Acts::UnitConstants::h, m_jetSrc, m_saveQAPlots, and Fun4AllHistoManager::registerHisto().

+ Here is the call graph for this function:

int JetHepMCLoader::process_event ( PHCompositeNode )
overridevirtual
void JetHepMCLoader::saveQAPlots ( bool  b = true)
inline

Definition at line 73 of file JetHepMCLoader.h.

View newest version in sPHENIX GitHub at line 73 of file JetHepMCLoader.h

References b, and m_saveQAPlots.

Member Data Documentation

std::string JetHepMCLoader::m_jetInputCategory
private

Definition at line 79 of file JetHepMCLoader.h.

View newest version in sPHENIX GitHub at line 79 of file JetHepMCLoader.h

Referenced by CreateNodes().

std::vector<hepmc_jet_src> JetHepMCLoader::m_jetSrc
private

Definition at line 106 of file JetHepMCLoader.h.

View newest version in sPHENIX GitHub at line 106 of file JetHepMCLoader.h

Referenced by addJet(), CreateNodes(), InitRun(), and process_event().

bool JetHepMCLoader::m_saveQAPlots
private

Definition at line 81 of file JetHepMCLoader.h.

View newest version in sPHENIX GitHub at line 81 of file JetHepMCLoader.h

Referenced by End(), InitRun(), process_event(), and saveQAPlots().


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