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

PHG4ScoringManager is the connection between Fun4All to G4ScoringManager Track primitive score like flux or energy deposition integrated over events and save to histograms More on G4ScoringManager see Manual http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/BackupVersions/V9.6/html/ch04s08.html And talk http://geant4.slac.stanford.edu/JLAB2012/Scoring1.pdf. More...

#include <coresoftware/blob/master/simulation/g4simulation/g4main/PHG4ScoringManager.h>

+ Inheritance diagram for PHG4ScoringManager:
+ Collaboration diagram for PHG4ScoringManager:

Public Member Functions

 PHG4ScoringManager ()
 
 ~PHG4ScoringManager () override
 
int InitRun (PHCompositeNode *topNode) override
 full initialization
 
int process_event (PHCompositeNode *) override
 event processing method
 
int End (PHCompositeNode *) override
 end of run method
 
void setOutputFileName (const std::string &outputfilename)
 Output result to a ROOT file with this name.
 
void G4Command (const std::string &cmd)
 Run this Geant4 command after initialization of G4ScoringManager in the InitRun() stage You can call this command multiple times to stage multiple commands to run.
 
void setVertexHistRange (double min, double max)
 
void setVertexAcceptanceRange (double min, double max)
 
- Public Member Functions inherited from SubsysReco
 ~SubsysReco () override
 
virtual int EndRun (const int)
 Called at the end of each run.
 
virtual int Init (PHCompositeNode *)
 
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

Fun4AllHistoManagergetHistoManager ()
 
void makeScoringHistograms ()
 based on G4VScoreWriter::DumpAllQuantitiesToFile()
 

Private Attributes

std::vector< std::string > m_commands
 
std::string m_outputFileName
 
std::pair< double, doublem_vertexHistRange {-5e2 ,5e2 }
 
std::pair< double, doublem_vertexAcceptanceRange {-5e2 ,5e2 }
 

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 = std::numeric_limits<int>::max() - 10
}
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 

Detailed Description

PHG4ScoringManager is the connection between Fun4All to G4ScoringManager Track primitive score like flux or energy deposition integrated over events and save to histograms More on G4ScoringManager see Manual http://geant4-userdoc.web.cern.ch/geant4-userdoc/UsersGuides/ForApplicationDeveloper/BackupVersions/V9.6/html/ch04s08.html And talk http://geant4.slac.stanford.edu/JLAB2012/Scoring1.pdf.

Definition at line 32 of file PHG4ScoringManager.h.

View newest version in sPHENIX GitHub at line 32 of file PHG4ScoringManager.h

Constructor & Destructor Documentation

PHG4ScoringManager::PHG4ScoringManager ( )

Definition at line 62 of file PHG4ScoringManager.cc.

View newest version in sPHENIX GitHub at line 62 of file PHG4ScoringManager.cc

PHG4ScoringManager::~PHG4ScoringManager ( )
inlineoverride

Definition at line 37 of file PHG4ScoringManager.h.

View newest version in sPHENIX GitHub at line 37 of file PHG4ScoringManager.h

Member Function Documentation

int PHG4ScoringManager::End ( PHCompositeNode )
overridevirtual

end of run method

Reimplemented from SubsysReco.

Definition at line 223 of file PHG4ScoringManager.cc.

View newest version in sPHENIX GitHub at line 223 of file PHG4ScoringManager.cc

References assert, PHTFileServer::cd(), Fun4AllReturnCodes::EVENT_OK, PHTFileServer::get(), Fun4AllHistoManager::getHisto(), getHistoManager(), i, m_outputFileName, makeScoringHistograms(), and Fun4AllHistoManager::nHistos().

+ Here is the call graph for this function:

void PHG4ScoringManager::G4Command ( const std::string &  cmd)

Run this Geant4 command after initialization of G4ScoringManager in the InitRun() stage You can call this command multiple times to stage multiple commands to run.

Example

g4score->G4Command("/score/create/cylinderMesh cyl_score");
g4score->G4Command("/score/mesh/cylinderSize 100. 400. cm");
g4score->G4Command("/score/mesh/nBin 100 800 8");
g4score->G4Command("/score/quantity/eDep cyl_edep");
g4score->G4Command("/score/quantity/cellFlux cyl_flux");
g4score->G4Command("/score/close");

Definition at line 125 of file PHG4ScoringManager.cc.

View newest version in sPHENIX GitHub at line 125 of file PHG4ScoringManager.cc

References m_commands.

Fun4AllHistoManager * PHG4ScoringManager::getHistoManager ( )
private

Definition at line 414 of file PHG4ScoringManager.cc.

View newest version in sPHENIX GitHub at line 414 of file PHG4ScoringManager.cc

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHG4ScoringManager::InitRun ( PHCompositeNode topNode)
overridevirtual

full initialization

Reimplemented from SubsysReco.

Definition at line 67 of file PHG4ScoringManager.cc.

View newest version in sPHENIX GitHub at line 67 of file PHG4ScoringManager.cc

References Fun4AllReturnCodes::ABORTRUN, assert, runCondor_beamspot::cmd, Fun4AllReturnCodes::EVENT_OK, PHTFileServer::get(), getHistoManager(), h, i, m_commands, m_outputFileName, m_vertexHistRange, PHTFileServer::open(), Fun4AllHistoManager::registerHisto(), Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_SOME.

+ Here is the call graph for this function:

void PHG4ScoringManager::makeScoringHistograms ( )
private

based on G4VScoreWriter::DumpAllQuantitiesToFile()

Definition at line 243 of file PHG4ScoringManager.cc.

View newest version in sPHENIX GitHub at line 243 of file PHG4ScoringManager.cc

References assert, Acts::UnitConstants::cm, configureMap::data, material_mapping_optimisation::format, getHistoManager(), h, ambiguity_solver_full_chain::idx, Fun4AllHistoManager::registerHisto(), material_mapping_optimisation::score, str, value, Fun4AllBase::Verbosity(), ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.

Referenced by End().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHG4ScoringManager::process_event ( PHCompositeNode topNode)
overridevirtual

event processing method

Reimplemented from SubsysReco.

Definition at line 133 of file PHG4ScoringManager.cc.

View newest version in sPHENIX GitHub at line 133 of file PHG4ScoringManager.cc

References Fun4AllReturnCodes::ABORTEVENT, assert, Fun4AllReturnCodes::EVENT_OK, PHHepMCGenEvent::get_collision_vertex(), PHHepMCGenEventMap::get_map(), PHG4Particle::get_pid(), PHG4Particle::get_px(), PHG4Particle::get_py(), PHG4Particle::get_pz(), Fun4AllHistoManager::getHisto(), getHistoManager(), PHG4InEvent::GetParticles(), PHHepMCGenEvent::identify(), m_vertexAcceptanceRange, merge_hashes::p, PHHepMCGenEventMap::size(), and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void PHG4ScoringManager::setOutputFileName ( const std::string &  outputfilename)
inline

Output result to a ROOT file with this name.

Definition at line 49 of file PHG4ScoringManager.h.

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

References m_outputFileName.

void PHG4ScoringManager::setVertexAcceptanceRange ( double  min,
double  max 
)
inline

Definition at line 70 of file PHG4ScoringManager.h.

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

References m_vertexAcceptanceRange, and Acts::UnitConstants::min.

void PHG4ScoringManager::setVertexHistRange ( double  min,
double  max 
)
inline

Definition at line 69 of file PHG4ScoringManager.h.

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

References m_vertexHistRange, and Acts::UnitConstants::min.

Member Data Documentation

std::vector<std::string> PHG4ScoringManager::m_commands
private

Definition at line 76 of file PHG4ScoringManager.h.

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

Referenced by G4Command(), and InitRun().

std::string PHG4ScoringManager::m_outputFileName
private

Definition at line 78 of file PHG4ScoringManager.h.

View newest version in sPHENIX GitHub at line 78 of file PHG4ScoringManager.h

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

std::pair<double, double> PHG4ScoringManager::m_vertexAcceptanceRange {-5e2 ,5e2 }
private

Definition at line 81 of file PHG4ScoringManager.h.

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

Referenced by process_event(), and setVertexAcceptanceRange().

std::pair<double, double> PHG4ScoringManager::m_vertexHistRange {-5e2 ,5e2 }
private

Definition at line 80 of file PHG4ScoringManager.h.

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

Referenced by InitRun(), and setVertexHistRange().


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