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

#include <fun4all_eic_qa/blob/master/source/SamplingFractionReco.h>

+ Inheritance diagram for SamplingFractionReco:
+ Collaboration diagram for SamplingFractionReco:

Public Member Functions

 SamplingFractionReco (const std::string &name="SamplingFractionReco", const std::string &filename="output.root")
 
virtual ~SamplingFractionReco ()
 
int Init (PHCompositeNode *topNode) override
 
int InitRun (PHCompositeNode *topNode) override
 
int process_event (PHCompositeNode *topNode) override
 
int ResetEvent (PHCompositeNode *topNode) override
 Clean up internals after each event.
 
int EndRun (const int runnumber) override
 Called at the end of each run.
 
int End (PHCompositeNode *topNode) override
 Called at the end of all processing.
 
int Reset (PHCompositeNode *) override
 Reset.
 
void Print (const std::string &what="ALL") const override
 
void Detector (const std::string &name)
 
void add_support_eloss (const int i=1)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () 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 Attributes

TNtuple * ntup = nullptr
 
TFile * outfile = nullptr
 
int m_SupportFlag = 0
 
std::string outfilename
 
std::string m_Detector
 
std::string m_HitNodeName
 
std::string m_AbsorberNodeName
 
std::string m_SupportNodeName
 

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

Definition at line 14 of file SamplingFractionReco.h.

View newest version in sPHENIX GitHub at line 14 of file SamplingFractionReco.h

Constructor & Destructor Documentation

SamplingFractionReco::SamplingFractionReco ( const std::string &  name = "SamplingFractionReco",
const std::string &  filename = "output.root" 
)

Definition at line 21 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 21 of file SamplingFractionReco.cc

SamplingFractionReco::~SamplingFractionReco ( )
virtual

Definition at line 28 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 28 of file SamplingFractionReco.cc

Member Function Documentation

void SamplingFractionReco::add_support_eloss ( const int  i = 1)
inline

Definition at line 56 of file SamplingFractionReco.h.

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

References m_SupportFlag.

Referenced by RunSampling().

+ Here is the caller graph for this function:

void SamplingFractionReco::Detector ( const std::string &  name)

Definition at line 182 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 182 of file SamplingFractionReco.cc

References m_AbsorberNodeName, m_Detector, m_HitNodeName, m_SupportNodeName, and name.

Referenced by RunSampling().

+ Here is the caller graph for this function:

int SamplingFractionReco::End ( PHCompositeNode topNode)
overridevirtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 160 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 160 of file SamplingFractionReco.cc

References Fun4AllReturnCodes::EVENT_OK, ntup, and outfile.

int SamplingFractionReco::EndRun ( const int  runnumber)
overridevirtual

Called at the end of each run.

Reimplemented from SubsysReco.

Definition at line 154 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 154 of file SamplingFractionReco.cc

References Fun4AllReturnCodes::EVENT_OK.

int SamplingFractionReco::Init ( PHCompositeNode topNode)
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 33 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 33 of file SamplingFractionReco.cc

References Fun4AllReturnCodes::EVENT_OK, m_Detector, ntup, outfile, outfilename, and title().

+ Here is the call graph for this function:

int SamplingFractionReco::InitRun ( PHCompositeNode topNode)
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. A place to book histograms which have to know the run number.

Reimplemented from SubsysReco.

Definition at line 49 of file SamplingFractionReco.cc.

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

References Fun4AllReturnCodes::EVENT_OK.

void SamplingFractionReco::Print ( const std::string &  what = "ALL") const
overridevirtual

Print out some info about this module.

Parameters
whatcan be used to specify what to print exactly.

Reimplemented from SubsysReco.

Definition at line 177 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 177 of file SamplingFractionReco.cc

int SamplingFractionReco::process_event ( PHCompositeNode topNode)
overridevirtual

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

Reimplemented from SubsysReco.

Definition at line 55 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 55 of file SamplingFractionReco.cc

References Acts::VectorHelpers::eta(), Fun4AllReturnCodes::EVENT_OK, PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), PHG4HitContainer::getHits(), PHG4TruthInfoContainer::GetPrimaryParticleRange(), m_AbsorberNodeName, m_HitNodeName, M_PI, m_SupportFlag, m_SupportNodeName, charm_jet_coverage::mom, ntup, phi, and theta().

+ Here is the call graph for this function:

int SamplingFractionReco::Reset ( PHCompositeNode topNode)
overridevirtual

Reset.

Reimplemented from SubsysReco.

Definition at line 171 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 171 of file SamplingFractionReco.cc

References Fun4AllReturnCodes::EVENT_OK.

int SamplingFractionReco::ResetEvent ( PHCompositeNode topNode)
overridevirtual

Clean up internals after each event.

Reimplemented from SubsysReco.

Definition at line 148 of file SamplingFractionReco.cc.

View newest version in sPHENIX GitHub at line 148 of file SamplingFractionReco.cc

References Fun4AllReturnCodes::EVENT_OK.

Member Data Documentation

std::string SamplingFractionReco::m_AbsorberNodeName
private

Definition at line 68 of file SamplingFractionReco.h.

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

Referenced by Detector(), and process_event().

std::string SamplingFractionReco::m_Detector
private

Definition at line 65 of file SamplingFractionReco.h.

View newest version in sPHENIX GitHub at line 65 of file SamplingFractionReco.h

Referenced by Detector(), and Init().

std::string SamplingFractionReco::m_HitNodeName
private

Definition at line 67 of file SamplingFractionReco.h.

View newest version in sPHENIX GitHub at line 67 of file SamplingFractionReco.h

Referenced by Detector(), and process_event().

int SamplingFractionReco::m_SupportFlag = 0
private

Definition at line 62 of file SamplingFractionReco.h.

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

Referenced by add_support_eloss(), and process_event().

std::string SamplingFractionReco::m_SupportNodeName
private

Definition at line 69 of file SamplingFractionReco.h.

View newest version in sPHENIX GitHub at line 69 of file SamplingFractionReco.h

Referenced by Detector(), and process_event().

TNtuple* SamplingFractionReco::ntup = nullptr
private

Definition at line 59 of file SamplingFractionReco.h.

View newest version in sPHENIX GitHub at line 59 of file SamplingFractionReco.h

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

TFile* SamplingFractionReco::outfile = nullptr
private

Definition at line 60 of file SamplingFractionReco.h.

View newest version in sPHENIX GitHub at line 60 of file SamplingFractionReco.h

Referenced by End(), and Init().

std::string SamplingFractionReco::outfilename
private

Definition at line 64 of file SamplingFractionReco.h.

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

Referenced by Init().


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