List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
EdepSimulatorAG::EdepSimulator Class Reference

G4 main simulator class. More...

#include <MdEdepSimulator.h>

Inheritance diagram for EdepSimulatorAG::EdepSimulator:
Inheritance graph
[legend]

Public Types

enum  ResultFlag { eSuccess, eFailure, eBreakLoop, eContinueLoop }
 Flag returned by module methods to the RunController. More...
 
enum  VersionInfoType {
  eFilename = 1, eRevisionNumber = 2, eDate = 3, eTime = 4,
  eLastEditor = 5
}
 Different types of version info that can be retrieved from GetVersionInfo. More...
 

Public Member Functions

 EdepSimulator ()
 
 EdepSimulator (const mdet::MDetector &)
 
fwk::VModule::ResultFlag Finish ()
 Finish: invoked at end of the run (NOT end of the event) More...
 
utl::StopwatchGetStopwatch ()
 
const utl::StopwatchGetStopwatch () const
 
std::string GetVersionInfo (const VersionInfoType v) const
 Retrieve different sorts of module version info. More...
 
fwk::VModule::ResultFlag Init ()
 Initialize: invoked at beginning of run (NOT beginning of event) More...
 
void InitTiming ()
 
fwk::VModule::ResultFlag Run (evt::Event &theEvent)
 Run: invoked once per event. More...
 
ResultFlag RunWithTiming (evt::Event &event)
 
virtual ~EdepSimulator ()
 

Static Public Member Functions

static std::string GetResultFlagByName (const ResultFlag flag)
 

Protected Types

enum  InfoLevel { eInfoNone = 0, eInfoFinal = 1, eInfoIntermediate = 2, eInfoDebug = 3 }
 

Protected Attributes

int fInfoLevel = 0
 

Private Member Functions

void AddUpContributions (SteppingAction::ScintMap &)
 
 REGISTER_MODULE ("EdepSimulatorAG", EdepSimulator)
 

Static Private Member Functions

static const mdet::ScintillatorGetCurrentDetectorScintillator ()
 Private members. More...
 
static
mevt::Module::ScintillatorIterator 
GetCurrentEventScintillatorIt ()
 
static
mevt::ScintillatorSimData::ParticleIterator 
GetCurrentParticleIt ()
 

Private Attributes

bool fGeomVisOn
 
utl::MessageLoggerConfig fLog
 Output messages handler. More...
 
G4RunManager * fRunManager
 Private G4 members. More...
 
SteppingActionfSteppingAction
 
bool fTrajVisOn
 
G4UImanager * fUImanager
 
utl::UnitsConfig fUnits
 Units configuration. More...
 
bool fUseGlobalPhysicsList
 
int fVerbosityLevel
 
G4VisManager * fVisManager
 

Static Private Attributes

static const mdet::ScintillatorfCurrentDetectorScintillator = 0
 
static
mevt::Module::ScintillatorIterator 
fCurrentEventScintillatorIt
 
static
mevt::ScintillatorSimData::ParticleIterator 
fCurrentParticleIt
 

Friends

class PrimaryGenerator
 

Detailed Description

G4 main simulator class.

class that handles Geant4 energy deposition in scintillators for AMIGA muon Scintillators

Author
F. Sanchez
Date
29 March 2012

Definition at line 33 of file MdEdepSimulator.h.

Member Enumeration Documentation

enum fwk::VModule::InfoLevel
protectedinherited
Enumerator
eInfoNone 
eInfoFinal 
eInfoIntermediate 
eInfoDebug 

Definition at line 125 of file VModule.h.

enum fwk::VModule::ResultFlag
inherited

Flag returned by module methods to the RunController.

Enumerator
eSuccess 

Report success to RunController.

eFailure 

Report failure to RunController, causing RunController to terminate execution.

eBreakLoop 

Break current loop. It works for nested loops too!

eContinueLoop 

Skip remaining modules in the current loop and continue with next iteration of the loop.

Definition at line 60 of file VModule.h.

Different types of version info that can be retrieved from GetVersionInfo.

Enumerator
eFilename 
eRevisionNumber 
eDate 
eTime 
eLastEditor 

Definition at line 110 of file VModule.h.

Constructor & Destructor Documentation

EdepSimulator::EdepSimulator ( )

Definition at line 61 of file MdEdepSimulator.cc.

References fGeomVisOn, fTrajVisOn, and fUseGlobalPhysicsList.

EdepSimulatorAG::EdepSimulator::EdepSimulator ( const mdet::MDetector )
EdepSimulator::~EdepSimulator ( )
virtual

Definition at line 71 of file MdEdepSimulator.cc.

Member Function Documentation

void EdepSimulator::AddUpContributions ( SteppingAction::ScintMap scintMap)
private
VModule::ResultFlag EdepSimulator::Finish ( )
virtual

Finish: invoked at end of the run (NOT end of the event)

This method is for things that should be done at the end of the run (for example, closing files or writing out histograms) {You must override this method in your concrete module}

Implements fwk::VModule.

Definition at line 452 of file MdEdepSimulator.cc.

References fwk::VModule::eSuccess, fRunManager, and fUseGlobalPhysicsList.

static const mdet::Scintillator* EdepSimulatorAG::EdepSimulator::GetCurrentDetectorScintillator ( )
inlinestaticprivate

Private members.

Definition at line 37 of file MdEdepSimulator.h.

References fCurrentDetectorScintillator.

Referenced by EdepSimulatorAG::PrimaryGenerator::GeneratePrimaries().

static mevt::Module::ScintillatorIterator EdepSimulatorAG::EdepSimulator::GetCurrentEventScintillatorIt ( )
inlinestaticprivate

Definition at line 40 of file MdEdepSimulator.h.

References fCurrentEventScintillatorIt.

static mevt::ScintillatorSimData::ParticleIterator EdepSimulatorAG::EdepSimulator::GetCurrentParticleIt ( )
inlinestaticprivate
std::string fwk::VModule::GetResultFlagByName ( const ResultFlag  flag)
staticinherited
utl::Stopwatch& fwk::VModule::GetStopwatch ( )
inlineinherited

Definition at line 106 of file VModule.h.

References fwk::VModule::fStopwatch.

const utl::Stopwatch& fwk::VModule::GetStopwatch ( ) const
inlineinherited

Definition at line 107 of file VModule.h.

References fwk::VModule::fStopwatch.

std::string fwk::VModule::GetVersionInfo ( const VersionInfoType  v) const
inherited
VModule::ResultFlag EdepSimulator::Init ( )
virtual

Initialize: invoked at beginning of run (NOT beginning of event)

This method is for things that should be done once at the beginning of a run (for example, booking histograms, performing calculations that need to be done only once, initializing parameters) {You must override this method in your concrete module}

Implements fwk::VModule.

Definition at line 74 of file MdEdepSimulator.cc.

References utl::cm, utl::UnitsConfig::Configure(), utl::MessageLoggerConfig::Configure(), fwk::VModule::eSuccess, fGeomVisOn, fLog, fRunManager, fSteppingAction, fTrajVisOn, fUImanager, fUnits, fUseGlobalPhysicsList, fVerbosityLevel, fVisManager, utl::Branch::GetChild(), utl::Branch::GetTopBranch(), INFO, utl::LoadConfig(), utl::MeV, out, PrimaryGenerator, utl::UnitsConfig::SetEnergyDefault(), utl::UnitsConfig::SetLengthDefault(), tls::Geant4Customization::SetPrimaryGenerator(), and tls::Geant4Customization::SetSteppingAction().

void fwk::VModule::InitTiming ( )
inlineinherited

Definition at line 95 of file VModule.h.

References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().

EdepSimulatorAG::EdepSimulator::REGISTER_MODULE ( "EdepSimulatorAG"  ,
EdepSimulator   
)
private
VModule::ResultFlag EdepSimulator::Run ( evt::Event event)
virtual

Run: invoked once per event.

This method is for things that should be done once per event {You must override this method in your concrete module}

Implements fwk::VModule.

Definition at line 272 of file MdEdepSimulator.cc.

References mevt::ScintillatorSimData::AddParticle(), AddUpContributions(), mevt::ScintillatorSimData::ClearParticleList(), mevt::MEvent::CountersBegin(), mevt::MEvent::CountersEnd(), data, EdepSimulatorAG::Data::Edep, fwk::VModule::eFailure, utl::endc, utl::endr, ERROR, utl::Particle::eShower, fwk::VModule::eSuccess, fCurrentDetectorScintillator, fCurrentEventScintillatorIt, fCurrentParticleIt, fLog, fRunManager, fSteppingAction, fUnits, fUseGlobalPhysicsList, mdet::MDetector::GetCounter(), utl::UnitsConfig::GetEnergyName(), utl::UnitsConfig::GetEnergyUnit(), det::DetectorComponent< C, ManagerProvider >::GetId(), utl::UnitsConfig::GetLengthName(), utl::UnitsConfig::GetLengthUnit(), utl::MessageLoggerConfig::GetLevel(), det::MPositionable< Config >::GetLocalCoordinateSystem(), mdet::Counter::GetModule(), mevt::MEvent::GetNumberOfCounters(), mevt::ScintillatorSimData::GetNumberOfParticles(), mdet::Module::GetScintillator(), evt::Event::HasMEvent(), utl::hline(), INFO, is(), EdepSimulatorAG::Data::KinE, utl::m, utl::MeV, ns, utl::ns, EdepSimulatorAG::Data::ParentID, mevt::ScintillatorSimData::ParticlesBegin(), mevt::ScintillatorSimData::ParticlesEnd(), EdepSimulatorAG::Data::PDGCode, EdepSimulatorAG::Data::Pname, EdepSimulatorAG::Data::PParent, EdepSimulatorAG::Data::px, EdepSimulatorAG::Data::py, EdepSimulatorAG::Data::pz, EdepSimulatorAG::SteppingAction::SetImpingingParticle(), utl::Particle::SetParent(), EdepSimulatorAG::SteppingAction::SetScintillatorId(), EdepSimulatorAG::Data::Time, EdepSimulatorAG::Data::TrackID, EdepSimulatorAG::Data::x, EdepSimulatorAG::Data::y, and EdepSimulatorAG::Data::z.

ResultFlag fwk::VModule::RunWithTiming ( evt::Event event)
inlineinherited

Friends And Related Function Documentation

friend class PrimaryGenerator
friend

Definition at line 68 of file MdEdepSimulator.h.

Referenced by Init().

Member Data Documentation

const mdet::Scintillator * EdepSimulator::fCurrentDetectorScintillator = 0
staticprivate

Definition at line 46 of file MdEdepSimulator.h.

Referenced by GetCurrentDetectorScintillator(), and Run().

mevt::Module::ScintillatorIterator EdepSimulator::fCurrentEventScintillatorIt
staticprivate

Definition at line 47 of file MdEdepSimulator.h.

Referenced by GetCurrentEventScintillatorIt(), and Run().

mevt::ScintillatorSimData::ParticleIterator EdepSimulator::fCurrentParticleIt
staticprivate

Definition at line 48 of file MdEdepSimulator.h.

Referenced by GetCurrentParticleIt(), and Run().

bool EdepSimulatorAG::EdepSimulator::fGeomVisOn
private

Definition at line 70 of file MdEdepSimulator.h.

Referenced by EdepSimulator(), and Init().

int fwk::VModule::fInfoLevel = 0
protectedinherited
utl::MessageLoggerConfig EdepSimulatorAG::EdepSimulator::fLog
private

Output messages handler.

Definition at line 78 of file MdEdepSimulator.h.

Referenced by Init(), and Run().

G4RunManager* EdepSimulatorAG::EdepSimulator::fRunManager
private

Private G4 members.

Definition at line 61 of file MdEdepSimulator.h.

Referenced by Finish(), Init(), and Run().

SteppingAction* EdepSimulatorAG::EdepSimulator::fSteppingAction
private

Definition at line 64 of file MdEdepSimulator.h.

Referenced by AddUpContributions(), Init(), and Run().

bool EdepSimulatorAG::EdepSimulator::fTrajVisOn
private

Definition at line 71 of file MdEdepSimulator.h.

Referenced by EdepSimulator(), and Init().

G4UImanager* EdepSimulatorAG::EdepSimulator::fUImanager
private

Definition at line 62 of file MdEdepSimulator.h.

Referenced by Init().

utl::UnitsConfig EdepSimulatorAG::EdepSimulator::fUnits
private

Units configuration.

Definition at line 82 of file MdEdepSimulator.h.

Referenced by Init(), and Run().

bool EdepSimulatorAG::EdepSimulator::fUseGlobalPhysicsList
private

Definition at line 72 of file MdEdepSimulator.h.

Referenced by EdepSimulator(), Finish(), Init(), and Run().

int EdepSimulatorAG::EdepSimulator::fVerbosityLevel
private

Definition at line 73 of file MdEdepSimulator.h.

Referenced by Init().

G4VisManager* EdepSimulatorAG::EdepSimulator::fVisManager
private

Definition at line 63 of file MdEdepSimulator.h.

Referenced by Init().


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

, generated on Tue Sep 26 2023.