Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PHG4Reco Class Reference

Runs G4 as a subsystem. More...

#include </dev/shm/kenichi/update-github-e1039-doc/e1039-core/simulation/g4main/PHG4Reco.h>

+ Inheritance diagram for PHG4Reco:
+ Collaboration diagram for PHG4Reco:

Public Member Functions

 PHG4Reco (const std::string &name="PHG4RECO")
 constructor More...
 
virtual ~PHG4Reco ()
 destructor More...
 
int Init (PHCompositeNode *)
 full initialization More...
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *)
 event processing method More...
 
int ResetEvent (PHCompositeNode *)
 Clean up after each event. More...
 
int End (PHCompositeNode *)
 end of run method More...
 
void Print (const std::string &what=std::string()) const
 print info More...
 
void registerSubsystem (PHG4Subsystem *subsystem)
 register subsystem More...
 
int ApplyCommand (const std::string &cmd)
 interface to G4 cmd interpreter More...
 
int StartGui ()
 start the gui More...
 
int InitField (PHCompositeNode *topNode)
 
void set_field (const float tesla)
 set default magnetic field strength with a constant magnetic field. Only valid if set_field_map() is not used. If available, Field map setting on DST take higher priority. More...
 
void set_field_map (const std::string &fmap, const PHFieldConfig::FieldConfigTypes dim)
 
void set_field_rescale (const float rescale)
 set default scaling factor for input magnetic field map. If available, Field map setting on DST take higher priority. More...
 
void set_decayer_active (bool b)
 
void set_force_decay (EDecayType force_decay_type)
 
void set_optical_photon (bool b)
 speed-up options setters More...
 
void set_energy_threshold (double t)
 
void set_zero_field_line (double z)
 
void save_DST_geometry (bool b)
 Save geometry from Geant4 to DST. More...
 
void SetWorldSizeX (const double sx)
 
void SetWorldSizeY (const double sy)
 
void SetWorldSizeZ (const double sz)
 
double GetWorldSizeX () const
 
double GetWorldSizeY () const
 
double GetWorldSizeZ () const
 
void SetWorldShape (const std::string &s)
 
void SetWorldMaterial (const std::string &s)
 
void SetPhysicsList (const std::string &s)
 
void set_rapidity_coverage (const double eta)
 
int setupInputEventNodeReader (PHCompositeNode *)
 
void setGeneratorAction (G4VUserPrimaryGeneratorAction *action)
 
PHG4SubsystemgetSubsystem (const std::string &name)
 
void Dump_GDML (const std::string &filename)
 
void G4Verbosity (const int i)
 
- Public Member Functions inherited from SubsysReco
virtual ~SubsysReco ()
 
virtual int EndRun (const int)
 Called at the end of each run. More...
 
virtual int Reset (PHCompositeNode *)
 Reset. More...
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module. More...
 
virtual void Name (const std::string &name)
 Sets the name of this module. More...
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet). More...
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet). More...
 
virtual int Verbosity () const
 Gets the verbosity of this module. More...
 

Static Public Member Functions

static void G4Seed (const unsigned int i)
 

Protected Types

typedef std::list
< PHG4Subsystem * > 
SubsystemList
 list of subsystems More...
 

Protected Member Functions

int InitUImanager ()
 
void DefineMaterials ()
 
void DefineRegions ()
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 
- Protected Member Functions inherited from Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 

Protected Attributes

float magfield
 
float magfield_rescale
 
double WorldSize [3]
 
G4TBMagneticFieldSetupfield_
 magnetic field More...
 
G4RunManager * runManager_
 pointer to geant run manager More...
 
PHG4UIsessionuisession_
 pointer to geant ui session More...
 
PHG4PhenixDetectordetector_
 pointer to detector More...
 
PHG4PhenixEventActioneventAction_
 pointer to main event action More...
 
PHG4PhenixSteppingActionsteppingAction_
 pointer to main stepping action More...
 
PHG4PhenixTrackingActiontrackingAction_
 pointer to main tracking action More...
 
PHG4PrimaryGeneratorActiongeneratorAction_
 event generator (read from PHG4INEVENT node) More...
 
SubsystemList subsystems_
 
G4VisManager * visManager
 
double _eta_coverage
 
PHFieldConfig::FieldConfigTypes mapdim
 
std::string fieldmapfile
 
std::string worldshape
 
std::string worldmaterial
 
std::string physicslist
 
bool active_decayer_
 
bool active_force_decay_
 
EDecayType force_decay_type_
 
bool save_DST_geometry_
 
PHTimeServer::timer _timer
 module timer. More...
 
bool optical_photon_
 speed up options More...
 
double energy_threshold_
 
double zero_field_line_
 
- Protected Attributes inherited from Fun4AllBase
std::string ThisName
 
int verbosity
 The verbosity level. 0 means not verbose at all. More...
 

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
}
 

Detailed Description

Runs G4 as a subsystem.

Definition at line 38 of file PHG4Reco.h.

Member Typedef Documentation

typedef std::list<PHG4Subsystem *> PHG4Reco::SubsystemList
protected

list of subsystems

Definition at line 171 of file PHG4Reco.h.

Constructor & Destructor Documentation

PHG4Reco::PHG4Reco ( const std::string &  name = "PHG4RECO")

constructor

Definition at line 118 of file PHG4Reco.cc.

References WorldSize.

PHG4Reco::~PHG4Reco ( void  )
virtual

destructor

Definition at line 158 of file PHG4Reco.cc.

References field_, gui_thread, runManager_, subsystems_, uisession_, and visManager.

Member Function Documentation

int PHG4Reco::ApplyCommand ( const std::string &  cmd)

interface to G4 cmd interpreter

Definition at line 566 of file PHG4Reco.cc.

References InitUImanager(), and UImanager.

Referenced by DisplayOn(), int_run(), and matscan().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4Reco::DefineMaterials ( )
protected

ePHENIX TPC - Jin Huang jhuan.nosp@m.g@bn.nosp@m.l.gov Ref: B. Yu et al. A gem based tpc for the legs experiment. In Nuclear Science Symposium Conference Record, 2005 IEEE, volume 2, pages 924-928, 2005. doi:10.1109/NSSMIC.2005.1596405.

Definition at line 751 of file PHG4Reco.cc.

References Fun4AllBase::verbosity.

Referenced by Init().

+ Here is the caller graph for this function:

void PHG4Reco::DefineRegions ( )
protected

Definition at line 1366 of file PHG4Reco.cc.

Referenced by Init().

+ Here is the caller graph for this function:

void PHG4Reco::Dump_GDML ( const std::string &  filename)

Definition at line 560 of file PHG4Reco.cc.

References detector_, PHG4GDMLUtility::Dump_GDML(), and PHG4PhenixDetector::GetPhysicalVolume().

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHG4Reco::End ( PHCompositeNode )
virtual

end of run method

Reimplemented from SubsysReco.

Definition at line 672 of file PHG4Reco.cc.

void PHG4Reco::G4Seed ( const unsigned int  i)
static

Definition at line 725 of file PHG4Reco.cc.

Referenced by Init().

+ Here is the caller graph for this function:

void PHG4Reco::G4Verbosity ( const int  i)

Definition at line 1403 of file PHG4Reco.cc.

References runManager_.

PHG4Subsystem * PHG4Reco::getSubsystem ( const std::string &  name)

Definition at line 1384 of file PHG4Reco.cc.

References subsystems_, and Fun4AllBase::verbosity.

double PHG4Reco::GetWorldSizeX ( ) const
inline

Definition at line 114 of file PHG4Reco.h.

References WorldSize.

double PHG4Reco::GetWorldSizeY ( ) const
inline

Definition at line 115 of file PHG4Reco.h.

References WorldSize.

double PHG4Reco::GetWorldSizeZ ( ) const
inline

Definition at line 116 of file PHG4Reco.h.

References WorldSize.

int PHG4Reco::Init ( PHCompositeNode topNode)
virtual

full initialization

Reimplemented from SubsysReco.

Definition at line 175 of file PHG4Reco.cc.

References active_decayer_, active_force_decay_, DefineMaterials(), DefineRegions(), force_decay_type_, G4Seed(), PHWHERE, physicslist, runManager_, P6DExtDecayerPhysics::SetForceDecay(), subsystems_, uisession_, and Fun4AllBase::verbosity.

+ Here is the call graph for this function:

int PHG4Reco::InitField ( PHCompositeNode topNode)

Definition at line 279 of file PHG4Reco.cc.

References Fun4AllReturnCodes::EVENT_OK, field_, fieldmapfile, PHFieldUtility::GetFieldMapNode(), magfield, magfield_rescale, mapdim, Fun4AllBase::Verbosity(), and Fun4AllBase::verbosity.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHG4Reco::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 320 of file PHG4Reco.cc.

References PHG4PhenixSteppingAction::AddAction(), PHG4PhenixTrackingAction::AddAction(), PHG4PhenixEventAction::AddAction(), PHG4PhenixDetector::AddDetector(), detector_, Dump_GDML(), energy_threshold_, Fun4AllReturnCodes::EVENT_OK, eventAction_, field_, PHGeomUtility::GenerateGeometryFileName(), G4TBMagneticFieldSetup::GetDummyFieldManager(), PHGeomUtility::ImportGeomFile(), InitField(), recoConsts::instance(), optical_photon_, PHGeomUtility::RemoveGeometryFile(), runManager_, save_DST_geometry_, PHG4PhenixSteppingAction::set_energy_threshold(), PHFlag::set_FloatFlag(), setupInputEventNodeReader(), PHG4PhenixDetector::SetWorldMaterial(), PHG4PhenixDetector::SetWorldShape(), PHG4PhenixDetector::SetWorldSizeX(), PHG4PhenixDetector::SetWorldSizeY(), PHG4PhenixDetector::SetWorldSizeZ(), PHG4PhenixDetector::SetZeroFieldManager(), PHG4PhenixDetector::SetZeroFieldStartZ(), steppingAction_, subsystems_, trackingAction_, uisession_, PHG4UIsession::Verbosity(), PHG4PhenixDetector::Verbosity(), Fun4AllBase::verbosity, worldmaterial, worldshape, WorldSize, and zero_field_line_.

Referenced by DisplayOn(), EventDisplay4Sim(), InitInput(), and matscan().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHG4Reco::InitUImanager ( )
protected

Definition at line 586 of file PHG4Reco.cc.

References UImanager, and visManager.

Referenced by ApplyCommand(), and StartGui().

+ Here is the caller graph for this function:

void PHG4Reco::Print ( const std::string &  what = std::string()) const
virtual

print info

Reimplemented from SubsysReco.

Definition at line 677 of file PHG4Reco.cc.

References subsystems_.

int PHG4Reco::process_event ( PHCompositeNode topNode)
virtual

event processing method

Reimplemented from SubsysReco.

Definition at line 600 of file PHG4Reco.cc.

References _timer, Fun4AllReturnCodes::ABORTEVENT, generatorAction_, PHTimeServer::timer::get(), PHG4InEvent::identify(), PHWHERE, PHTimer::restart(), runManager_, PHG4PrimaryGeneratorAction::SetInEvent(), PHTimer::stop(), subsystems_, and Fun4AllBase::Verbosity().

+ Here is the call graph for this function:

void PHG4Reco::registerSubsystem ( PHG4Subsystem subsystem)
inline
int PHG4Reco::ResetEvent ( PHCompositeNode topNode)
virtual

Clean up after each event.

Reimplemented from SubsysReco.

Definition at line 661 of file PHG4Reco.cc.

References subsystems_.

void PHG4Reco::save_DST_geometry ( bool  b)
inline

Save geometry from Geant4 to DST.

Definition at line 110 of file PHG4Reco.h.

References save_DST_geometry_.

void PHG4Reco::set_decayer_active ( bool  b)
inline

Definition at line 96 of file PHG4Reco.h.

References active_decayer_.

void PHG4Reco::set_energy_threshold ( double  t)
inline

Definition at line 106 of file PHG4Reco.h.

References energy_threshold_.

void PHG4Reco::set_field ( const float  tesla)
inline

set default magnetic field strength with a constant magnetic field. Only valid if set_field_map() is not used. If available, Field map setting on DST take higher priority.

Definition at line 79 of file PHG4Reco.h.

References magfield.

Referenced by Fun4All_G4_BNL(), Fun4All_G4_BNL_R1(), Fun4All_G4_E1039(), and Fun4All_G4_E1039_R1().

+ Here is the caller graph for this function:

void PHG4Reco::set_field_map ( const std::string &  fmap,
const PHFieldConfig::FieldConfigTypes  dim 
)
inline

Set default field map. If available, Field map setting on DST take higher priority.

Parameters
[in]fmapField map ROOT file
[in]dimField map format. See PHFieldConfig::FieldConfigTypes for available formats.

Definition at line 87 of file PHG4Reco.h.

References fieldmapfile, and mapdim.

Referenced by EventDisplay4Sim(), Fun4All_G4_E1039_R2(), Fun4All_G4_E1039_R2_V2(), Fun4All_Test(), Fun4CODA(), Fun4DQ(), Fun4DST(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4MainDaq(), Fun4PatternDB(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4SRawEvent(), Fun4TrkDev(), and RecoE1039Sim().

+ Here is the caller graph for this function:

void PHG4Reco::set_field_rescale ( const float  rescale)
inline

set default scaling factor for input magnetic field map. If available, Field map setting on DST take higher priority.

Definition at line 94 of file PHG4Reco.h.

References magfield_rescale.

void PHG4Reco::set_force_decay ( EDecayType  force_decay_type)
inline

Definition at line 97 of file PHG4Reco.h.

References active_decayer_, active_force_decay_, and force_decay_type_.

void PHG4Reco::set_optical_photon ( bool  b)
inline

speed-up options setters

Definition at line 105 of file PHG4Reco.h.

References optical_photon_.

void PHG4Reco::set_rapidity_coverage ( const double  eta)

Definition at line 719 of file PHG4Reco.cc.

References _eta_coverage, and PHG4Utils::SetPseudoRapidityCoverage().

+ Here is the call graph for this function:

void PHG4Reco::set_zero_field_line ( double  z)
inline

Definition at line 107 of file PHG4Reco.h.

References zero_field_line_.

void PHG4Reco::setGeneratorAction ( G4VUserPrimaryGeneratorAction *  action)

Definition at line 710 of file PHG4Reco.cc.

References runManager_.

void PHG4Reco::SetPhysicsList ( const std::string &  s)
inline

Definition at line 119 of file PHG4Reco.h.

References physicslist, and DPGEN::s.

Referenced by EventDisplay4Sim(), Fun4All_G4_BNL(), Fun4All_G4_BNL_R1(), Fun4All_G4_E1039(), Fun4All_G4_E1039_R1(), Fun4All_G4_E1039_R2(), Fun4All_G4_E1039_R2_V2(), Fun4All_Test(), Fun4CODA(), Fun4DQ(), Fun4DST(), Fun4E1039Shielding(), Fun4HodoAccGap(), Fun4MainDaq(), Fun4PatternDB(), Fun4Pythia8Demo(), Fun4Sim(), Fun4Sim_TrkQA(), Fun4SRawEvent(), Fun4TrkDev(), InitInput(), and RecoE1039Sim().

+ Here is the caller graph for this function:

int PHG4Reco::setupInputEventNodeReader ( PHCompositeNode topNode)

Definition at line 692 of file PHG4Reco.cc.

References PHCompositeNode::addNode(), PHNodeIterator::findFirst(), generatorAction_, and runManager_.

Referenced by InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PHG4Reco::SetWorldMaterial ( const std::string &  s)
inline
void PHG4Reco::SetWorldShape ( const std::string &  s)
inline
void PHG4Reco::SetWorldSizeX ( const double  sx)
inline
void PHG4Reco::SetWorldSizeY ( const double  sy)
inline
void PHG4Reco::SetWorldSizeZ ( const double  sz)
inline
int PHG4Reco::StartGui ( )

start the gui

Definition at line 574 of file PHG4Reco.cc.

References g4guithread(), gui_thread, and InitUImanager().

+ Here is the call graph for this function:

Member Data Documentation

double PHG4Reco::_eta_coverage
protected

Definition at line 177 of file PHG4Reco.h.

Referenced by set_rapidity_coverage().

PHTimeServer::timer PHG4Reco::_timer
protected

module timer.

Definition at line 192 of file PHG4Reco.h.

Referenced by process_event().

bool PHG4Reco::active_decayer_
protected

Definition at line 185 of file PHG4Reco.h.

Referenced by Init(), set_decayer_active(), and set_force_decay().

bool PHG4Reco::active_force_decay_
protected

Definition at line 186 of file PHG4Reco.h.

Referenced by Init(), and set_force_decay().

PHG4PhenixDetector* PHG4Reco::detector_
protected

pointer to detector

Definition at line 156 of file PHG4Reco.h.

Referenced by Dump_GDML(), and InitRun().

double PHG4Reco::energy_threshold_
protected

Definition at line 196 of file PHG4Reco.h.

Referenced by InitRun(), and set_energy_threshold().

PHG4PhenixEventAction* PHG4Reco::eventAction_
protected

pointer to main event action

Definition at line 159 of file PHG4Reco.h.

Referenced by InitRun().

G4TBMagneticFieldSetup* PHG4Reco::field_
protected

magnetic field

Definition at line 147 of file PHG4Reco.h.

Referenced by InitField(), InitRun(), and ~PHG4Reco().

std::string PHG4Reco::fieldmapfile
protected

Definition at line 179 of file PHG4Reco.h.

Referenced by InitField(), and set_field_map().

EDecayType PHG4Reco::force_decay_type_
protected

Definition at line 187 of file PHG4Reco.h.

Referenced by Init(), and set_force_decay().

PHG4PrimaryGeneratorAction* PHG4Reco::generatorAction_
protected

event generator (read from PHG4INEVENT node)

Definition at line 168 of file PHG4Reco.h.

Referenced by process_event(), and setupInputEventNodeReader().

float PHG4Reco::magfield
protected

Definition at line 142 of file PHG4Reco.h.

Referenced by InitField(), and set_field().

float PHG4Reco::magfield_rescale
protected

Definition at line 143 of file PHG4Reco.h.

Referenced by InitField(), and set_field_rescale().

PHFieldConfig::FieldConfigTypes PHG4Reco::mapdim
protected

Definition at line 178 of file PHG4Reco.h.

Referenced by InitField(), and set_field_map().

bool PHG4Reco::optical_photon_
protected

speed up options

Definition at line 195 of file PHG4Reco.h.

Referenced by InitRun(), and set_optical_photon().

std::string PHG4Reco::physicslist
protected

Definition at line 182 of file PHG4Reco.h.

Referenced by Init(), and SetPhysicsList().

G4RunManager* PHG4Reco::runManager_
protected

pointer to geant run manager

Definition at line 150 of file PHG4Reco.h.

Referenced by G4Verbosity(), Init(), InitRun(), process_event(), setGeneratorAction(), setupInputEventNodeReader(), and ~PHG4Reco().

bool PHG4Reco::save_DST_geometry_
protected

Definition at line 189 of file PHG4Reco.h.

Referenced by InitRun(), and save_DST_geometry().

PHG4PhenixSteppingAction* PHG4Reco::steppingAction_
protected

pointer to main stepping action

Definition at line 162 of file PHG4Reco.h.

Referenced by InitRun().

SubsystemList PHG4Reco::subsystems_
protected
PHG4PhenixTrackingAction* PHG4Reco::trackingAction_
protected

pointer to main tracking action

Definition at line 165 of file PHG4Reco.h.

Referenced by InitRun().

PHG4UIsession* PHG4Reco::uisession_
protected

pointer to geant ui session

Definition at line 153 of file PHG4Reco.h.

Referenced by Init(), InitRun(), and ~PHG4Reco().

G4VisManager* PHG4Reco::visManager
protected

Definition at line 175 of file PHG4Reco.h.

Referenced by InitUImanager(), and ~PHG4Reco().

std::string PHG4Reco::worldmaterial
protected

Definition at line 181 of file PHG4Reco.h.

Referenced by InitRun(), and SetWorldMaterial().

std::string PHG4Reco::worldshape
protected

Definition at line 180 of file PHG4Reco.h.

Referenced by InitRun(), and SetWorldShape().

double PHG4Reco::WorldSize[3]
protected
double PHG4Reco::zero_field_line_
protected

Definition at line 197 of file PHG4Reco.h.

Referenced by InitRun(), and set_zero_field_line().


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