G4 main simulator class. More...
#include <MdEdepSimulator.h>
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::Stopwatch & | GetStopwatch () |
const utl::Stopwatch & | GetStopwatch () 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::Scintillator * | GetCurrentDetectorScintillator () |
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... | |
SteppingAction * | fSteppingAction |
bool | fTrajVisOn |
G4UImanager * | fUImanager |
utl::UnitsConfig | fUnits |
Units configuration. More... | |
bool | fUseGlobalPhysicsList |
int | fVerbosityLevel |
G4VisManager * | fVisManager |
Static Private Attributes | |
static const mdet::Scintillator * | fCurrentDetectorScintillator = 0 |
static mevt::Module::ScintillatorIterator | fCurrentEventScintillatorIt |
static mevt::ScintillatorSimData::ParticleIterator | fCurrentParticleIt |
Friends | |
class | PrimaryGenerator |
G4 main simulator class.
class that handles Geant4 energy deposition in scintillators for AMIGA muon Scintillators
Definition at line 33 of file MdEdepSimulator.h.
|
protectedinherited |
|
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. |
|
inherited |
EdepSimulator::EdepSimulator | ( | ) |
Definition at line 61 of file MdEdepSimulator.cc.
References fGeomVisOn, fTrajVisOn, and fUseGlobalPhysicsList.
EdepSimulatorAG::EdepSimulator::EdepSimulator | ( | const mdet::MDetector & | ) |
|
virtual |
Definition at line 71 of file MdEdepSimulator.cc.
|
private |
Definition at line 181 of file MdEdepSimulator.cc.
References EdepSimulatorAG::SteppingAction::ClearMap(), data, EdepSimulatorAG::Data::Edep, fSteppingAction, EdepSimulatorAG::SteppingAction::GetImpingingParticle(), EdepSimulatorAG::SteppingAction::GetScintMap(), EdepSimulatorAG::Data::KinE, EdepSimulatorAG::Data::ParentID, EdepSimulatorAG::Data::PDGCode, EdepSimulatorAG::Data::Pname, EdepSimulatorAG::Data::PParent, EdepSimulatorAG::Data::px, EdepSimulatorAG::Data::py, EdepSimulatorAG::Data::pz, EdepSimulatorAG::Data::Sname, EdepSimulatorAG::Data::Time, EdepSimulatorAG::Data::TrackID, EdepSimulatorAG::Data::x, EdepSimulatorAG::Data::y, and EdepSimulatorAG::Data::z.
Referenced by Run().
|
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.
|
inlinestaticprivate |
Private members.
Definition at line 37 of file MdEdepSimulator.h.
References fCurrentDetectorScintillator.
Referenced by EdepSimulatorAG::PrimaryGenerator::GeneratePrimaries().
|
inlinestaticprivate |
Definition at line 40 of file MdEdepSimulator.h.
References fCurrentEventScintillatorIt.
|
inlinestaticprivate |
Definition at line 43 of file MdEdepSimulator.h.
References fCurrentParticleIt.
Referenced by EdepSimulatorAG::PrimaryGenerator::GeneratePrimaries().
|
staticinherited |
Definition at line 8 of file VModule.cc.
References fwk::VModule::eBreakLoop, fwk::VModule::eContinueLoop, fwk::VModule::eFailure, and fwk::VModule::eSuccess.
Referenced by fwk::RunController::DoNextInSequence(), fwk::RunController::FinishBranch(), and fwk::RunController::InitBranch().
|
inlineinherited |
Definition at line 106 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inlineinherited |
Definition at line 107 of file VModule.h.
References fwk::VModule::fStopwatch.
|
inherited |
Retrieve different sorts of module version info.
Definition at line 26 of file VModule.cc.
Referenced by fwk::CentralConfig::GetConfig(), ThresholdCalculatorKG::ThresholdCalculator::Init(), fdDoubleBumpFinder::FdDoubleBumpFinder::Init(), LaserGeneratorNA::LaserGenerator::Init(), LaserLightSimulatorNA::LaserLightSimulator::Init(), FdElectronicsSimulatorOG::FdElectronicsSimulator::Init(), TelescopeSimulatorKG::TelescopeSimulator::Init(), TelescopeSimulatorKG2::TelescopeSimulator::Init(), SdSimpleSimKG::SdSimpleSim::Init(), ShowerPhotonGeneratorOG::ShowerPhotonGenerator::Init(), and testRunController::testModuleVersionInfo().
|
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().
|
inlineinherited |
Definition at line 95 of file VModule.h.
References fwk::VModule::fStopwatch, and utl::Stopwatch::Reset().
|
private |
|
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.
|
inlineinherited |
Definition at line 98 of file VModule.h.
References fwk::VModule::fStopwatch, fwk::VModule::Run(), utl::Stopwatch::Start(), and utl::Stopwatch::Stop().
Referenced by fwk::RunController::DoNextInSequence().
|
friend |
Definition at line 68 of file MdEdepSimulator.h.
Referenced by Init().
|
staticprivate |
Definition at line 46 of file MdEdepSimulator.h.
Referenced by GetCurrentDetectorScintillator(), and Run().
|
staticprivate |
Definition at line 47 of file MdEdepSimulator.h.
Referenced by GetCurrentEventScintillatorIt(), and Run().
|
staticprivate |
Definition at line 48 of file MdEdepSimulator.h.
Referenced by GetCurrentParticleIt(), and Run().
|
private |
Definition at line 70 of file MdEdepSimulator.h.
Referenced by EdepSimulator(), and Init().
|
protectedinherited |
Definition at line 123 of file VModule.h.
Referenced by RdChannelASCIINoiseImporterRD::RdChannelASCIINoiseImporterRD::Init(), Rd2dLDFFitter::Rd2dLDFFitter::Init(), RdChannelNoiseImporter_AERA::RdChannelNoiseImporter_AERA::Init(), and Rd2dLDFFitter::Rd2dLDFFitter::Run().
|
private |
Output messages handler.
Definition at line 78 of file MdEdepSimulator.h.
|
private |
Private G4 members.
Definition at line 61 of file MdEdepSimulator.h.
|
private |
Definition at line 64 of file MdEdepSimulator.h.
Referenced by AddUpContributions(), Init(), and Run().
|
private |
Definition at line 71 of file MdEdepSimulator.h.
Referenced by EdepSimulator(), and Init().
|
private |
Definition at line 62 of file MdEdepSimulator.h.
Referenced by Init().
|
private |
Units configuration.
Definition at line 82 of file MdEdepSimulator.h.
|
private |
Definition at line 72 of file MdEdepSimulator.h.
Referenced by EdepSimulator(), Finish(), Init(), and Run().
|
private |
Definition at line 73 of file MdEdepSimulator.h.
Referenced by Init().
|
private |
Definition at line 63 of file MdEdepSimulator.h.
Referenced by Init().