ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
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>
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 | |
Fun4AllHistoManager * | getHistoManager () |
void | makeScoringHistograms () |
based on G4VScoreWriter::DumpAllQuantitiesToFile() | |
Private Attributes | |
std::vector< std::string > | m_commands |
std::string | m_outputFileName |
std::pair< double, double > | m_vertexHistRange {-5e2 ,5e2 } |
std::pair< double, double > | m_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 = INT_MAX - 10 } |
Protected Member Functions inherited from SubsysReco | |
SubsysReco (const std::string &name="NONAME") | |
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
PHG4ScoringManager::PHG4ScoringManager | ( | ) |
Definition at line 59 of file PHG4ScoringManager.cc.
View newest version in sPHENIX GitHub at line 59 of file PHG4ScoringManager.cc
|
inlineoverride |
Definition at line 37 of file PHG4ScoringManager.h.
View newest version in sPHENIX GitHub at line 37 of file PHG4ScoringManager.h
|
overridevirtual |
end of run method
Reimplemented from SubsysReco.
Definition at line 220 of file PHG4ScoringManager.cc.
View newest version in sPHENIX GitHub at line 220 of file PHG4ScoringManager.cc
References PHTFileServer::cd(), Fun4AllReturnCodes::EVENT_OK, PHTFileServer::get(), Fun4AllHistoManager::getHisto(), getHistoManager(), m_outputFileName, makeScoringHistograms(), and Fun4AllHistoManager::nHistos().
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
Definition at line 122 of file PHG4ScoringManager.cc.
View newest version in sPHENIX GitHub at line 122 of file PHG4ScoringManager.cc
References m_commands.
|
private |
Definition at line 411 of file PHG4ScoringManager.cc.
View newest version in sPHENIX GitHub at line 411 of file PHG4ScoringManager.cc
References Fun4AllServer::getHistoManager(), Fun4AllServer::instance(), Fun4AllServer::registerHistoManager(), and Fun4AllBase::Verbosity().
Referenced by End(), InitRun(), makeScoringHistograms(), and process_event().
|
overridevirtual |
full initialization
Reimplemented from SubsysReco.
Definition at line 64 of file PHG4ScoringManager.cc.
View newest version in sPHENIX GitHub at line 64 of file PHG4ScoringManager.cc
References Fun4AllReturnCodes::ABORTRUN, G4UImanager::ApplyCommand(), Fun4AllReturnCodes::EVENT_OK, PHTFileServer::get(), getHistoManager(), G4RunManager::GetRunManager(), G4ScoringManager::GetScoringManager(), G4UImanager::GetUIpointer(), Acts::UnitConstants::h, m_commands, m_outputFileName, m_vertexHistRange, PHTFileServer::open(), Fun4AllHistoManager::registerHisto(), Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_SOME.
|
private |
based on G4VScoreWriter::DumpAllQuantitiesToFile()
Definition at line 240 of file PHG4ScoringManager.cc.
View newest version in sPHENIX GitHub at line 240 of file PHG4ScoringManager.cc
References cm, G4String::data(), G4String::first(), G4VScoringMesh::GetDivisionAxisNames(), getHistoManager(), G4ScoringManager::GetMesh(), G4ScoringManager::GetNumberOfMesh(), G4VScoringMesh::GetNumberOfSegments(), G4VScoringMesh::GetPSUnit(), G4VScoringMesh::GetPSUnitValue(), G4VScoringMesh::GetScoreMap(), G4ScoringManager::GetScoringManager(), G4VScoringMesh::GetShape(), G4VScoringMesh::GetSize(), G4VScoringMesh::GetTranslation(), G4VScoringMesh::GetWorldName(), Acts::UnitConstants::h, incremental_prev_tag::idx, int(), G4VScoringMesh::List(), M_PI, Fun4AllHistoManager::registerHisto(), Fun4AllBase::Verbosity(), x, y, and z.
Referenced by End().
|
overridevirtual |
event processing method
Reimplemented from SubsysReco.
Definition at line 130 of file PHG4ScoringManager.cc.
View newest version in sPHENIX GitHub at line 130 of file PHG4ScoringManager.cc
References Fun4AllReturnCodes::ABORTEVENT, 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, PHHepMCGenEventMap::size(), and Fun4AllBase::Verbosity().
|
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.
|
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, max, and min.
|
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, max, and min.
|
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().
|
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().
|
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().
|
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().