CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
RunManager Class Reference

#include <RunManager.h>

Public Member Functions

void abortEvent ()
 
void abortRun (bool softAbort=false)
 
void Connect (RunAction *)
 
void Connect (EventAction *)
 
void Connect (TrackingAction *)
 
void Connect (SteppingAction *)
 
const G4Event * currentEvent () const
 
const G4Run * currentRun () const
 
const Generatorgenerator () const
 
SimTrackManagerGetSimTrackManager ()
 
void initG4 (const edm::EventSetup &es)
 
void initializeRun ()
 
void initializeUserActions ()
 
void produce (edm::Event &inpevt, const edm::EventSetup &es)
 
std::vector< std::shared_ptr< SimProducer > > producers () const
 
 RunManager (edm::ParameterSet const &p, edm::ConsumesCollector &&i)
 
std::vector< SensitiveCaloDetector * > & sensCaloDetectors ()
 
std::vector< SensitiveTkDetector * > & sensTkDetectors ()
 
G4SimEventsimEvent ()
 
void stopG4 ()
 
void terminateRun ()
 
 ~RunManager ()
 

Protected Member Functions

void DumpMagneticField (const G4Field *) const
 
G4Event * generateEvent (edm::Event &inpevt)
 
void resetGenParticleId (edm::Event &inpevt)
 

Private Attributes

bool firstRun
 
edm::ESWatcher< IdealGeometryRecordidealGeomRcdWatcher_
 
edm::ESWatcher< IdealMagneticFieldRecordidealMagRcdWatcher_
 
bool m_check
 
G4Event * m_currentEvent
 
G4Run * m_currentRun
 
int m_EvtMgrVerbosity
 
std::string m_FieldFile
 
std::vector< std::string > m_G4Commands
 
edm::ParameterSet m_g4overlap
 
Generatorm_generator
 
bool m_hasWatchers
 
edm::EDGetTokenT< edm::HepMCProductm_HepMC
 
G4RunManagerKernel * m_kernel
 
edm::EDGetTokenT< edm::LHCTransportLinkContainerm_LHCtr
 
bool m_managerInitialized
 
bool m_nonBeam
 
edm::ParameterSet m_p
 
edm::ParameterSet m_pEventAction
 
edm::ParameterSet m_pField
 
edm::ParameterSet m_pGenerator
 
std::unique_ptr< PhysicsListm_physicsList
 
std::string m_PhysicsTablesDir
 
edm::ParameterSet m_pPhysics
 
PrimaryTransformerm_primaryTransformer
 
std::vector< std::shared_ptr< SimProducer > > m_producers
 
edm::ParameterSet m_pRunAction
 
edm::ParameterSet m_pStackingAction
 
edm::ParameterSet m_pSteppingAction
 
edm::ParameterSet m_pTrackingAction
 
bool m_pUseMagneticField
 
std::string m_RegionFile
 
SimActivityRegistry m_registry
 
bool m_RestorePhysicsTables
 
bool m_runAborted
 
bool m_runInitialized
 
SimRunInterfacem_runInterface
 
bool m_runTerminated
 
std::vector< SensitiveCaloDetector * > m_sensCaloDets
 
std::vector< SensitiveTkDetector * > m_sensTkDets
 
G4SimEventm_simEvent
 
bool m_StorePhysicsTables
 
std::unique_ptr< CMSSteppingVerbosem_sVerbose
 
std::unique_ptr< SimTrackManagerm_trackManager
 
std::unique_ptr< CustomUIsessionm_UIsession
 
bool m_UseParametrisedEMPhysics
 
RunActionm_userRunAction
 
std::vector< std::shared_ptr< SimWatcher > > m_watchers
 
std::string m_WriteFile
 

Detailed Description

Definition at line 54 of file RunManager.h.

Constructor & Destructor Documentation

RunManager::RunManager ( edm::ParameterSet const &  p,
edm::ConsumesCollector &&  i 
)

Definition at line 114 of file RunManager.cc.

References SimActivityRegistry::connect(), createWatchers(), g4SimHits_cfi::CustomUIsession, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), m_check, m_FieldFile, m_hasWatchers, m_kernel, m_p, m_physicsList, m_producers, m_RegionFile, m_registry, m_runInterface, m_sVerbose, m_UIsession, m_userRunAction, m_watchers, m_WriteFile, and AlCaHLTBitMon_QueryRunRegistry::string.

115  : m_generator(new Generator(p.getParameter<edm::ParameterSet>("Generator"))),
116  m_HepMC(iC.consumes<edm::HepMCProduct>(
117  p.getParameter<edm::ParameterSet>("Generator").getParameter<edm::InputTag>("HepMCProductLabel"))),
118  m_LHCtr(iC.consumes<edm::LHCTransportLinkContainer>(p.getParameter<edm::InputTag>("theLHCTlinkTag"))),
119  m_nonBeam(p.getParameter<bool>("NonBeamEvent")),
120  m_primaryTransformer(nullptr),
121  m_managerInitialized(false),
122  m_runInitialized(false),
123  m_runTerminated(false),
124  m_runAborted(false),
125  firstRun(true),
126  m_pUseMagneticField(p.getParameter<bool>("UseMagneticField")),
127  m_currentRun(nullptr),
128  m_currentEvent(nullptr),
129  m_simEvent(nullptr),
130  m_PhysicsTablesDir(p.getUntrackedParameter<std::string>("PhysicsTablesDirectory", "")),
131  m_StorePhysicsTables(p.getUntrackedParameter<bool>("StorePhysicsTables", false)),
132  m_RestorePhysicsTables(p.getUntrackedParameter<bool>("RestorePhysicsTables", false)),
133  m_UseParametrisedEMPhysics(p.getUntrackedParameter<bool>("UseParametrisedEMPhysics")),
134  m_EvtMgrVerbosity(p.getUntrackedParameter<int>("G4EventManagerVerbosity", 0)),
135  m_pField(p.getParameter<edm::ParameterSet>("MagneticField")),
136  m_pGenerator(p.getParameter<edm::ParameterSet>("Generator")),
137  m_pPhysics(p.getParameter<edm::ParameterSet>("Physics")),
138  m_pRunAction(p.getParameter<edm::ParameterSet>("RunAction")),
139  m_pEventAction(p.getParameter<edm::ParameterSet>("EventAction")),
140  m_pStackingAction(p.getParameter<edm::ParameterSet>("StackingAction")),
141  m_pTrackingAction(p.getParameter<edm::ParameterSet>("TrackingAction")),
142  m_pSteppingAction(p.getParameter<edm::ParameterSet>("SteppingAction")),
143  m_g4overlap(p.getUntrackedParameter<edm::ParameterSet>("G4CheckOverlap")),
144  m_G4Commands(p.getParameter<std::vector<std::string> >("G4Commands")),
145  m_p(p) {
146  m_UIsession.reset(new CustomUIsession());
147  m_kernel = new G4RunManagerKernel();
148  G4StateManager::GetStateManager()->SetExceptionHandler(new ExceptionHandler());
149 
150  m_physicsList.reset(nullptr);
151 
152  m_check = p.getUntrackedParameter<bool>("CheckGeometry", false);
153  m_WriteFile = p.getUntrackedParameter<std::string>("FileNameGDML", "");
154  m_FieldFile = p.getUntrackedParameter<std::string>("FileNameField", "");
155  m_RegionFile = p.getUntrackedParameter<std::string>("FileNameRegions", "");
156 
157  m_userRunAction = nullptr;
158  m_runInterface = nullptr;
159 
160  //Look for an outside SimActivityRegistry
161  // this is used by the visualization code
162  edm::Service<SimActivityRegistry> otherRegistry;
163  if (otherRegistry) {
164  m_registry.connect(*otherRegistry);
165  }
166  m_sVerbose.reset(nullptr);
167 
168  std::vector<edm::ParameterSet> watchers = p.getParameter<std::vector<edm::ParameterSet> >("Watchers");
169  m_hasWatchers = (watchers.empty()) ? false : true;
170 
171  if (m_hasWatchers) {
173  }
174 }
T getParameter(std::string const &) const
bool m_check
Definition: RunManager.h:119
edm::ParameterSet m_pGenerator
Definition: RunManager.h:121
edm::EDGetTokenT< edm::HepMCProduct > m_HepMC
Definition: RunManager.h:92
G4Event * m_currentEvent
Definition: RunManager.h:109
edm::EDGetTokenT< edm::LHCTransportLinkContainer > m_LHCtr
Definition: RunManager.h:93
SimActivityRegistry m_registry
Definition: RunManager.h:136
edm::ParameterSet m_p
Definition: RunManager.h:130
std::vector< std::shared_ptr< SimProducer > > m_producers
Definition: RunManager.h:138
void connect(Observer< const BeginOfJob * > *iObject)
Generator * m_generator
Definition: RunManager.h:90
static void createWatchers(const edm::ParameterSet &iP, SimActivityRegistry &iReg, std::vector< std::shared_ptr< SimWatcher > > &oWatchers, std::vector< std::shared_ptr< SimProducer > > &oProds)
Definition: RunManager.cc:88
bool m_hasWatchers
Definition: RunManager.h:106
bool m_pUseMagneticField
Definition: RunManager.h:105
bool m_nonBeam
Definition: RunManager.h:95
int m_EvtMgrVerbosity
Definition: RunManager.h:118
std::string m_WriteFile
Definition: RunManager.h:146
bool firstRun
Definition: RunManager.h:104
SimRunInterface * m_runInterface
Definition: RunManager.h:112
bool m_UseParametrisedEMPhysics
Definition: RunManager.h:117
bool m_RestorePhysicsTables
Definition: RunManager.h:116
std::vector< std::shared_ptr< SimWatcher > > m_watchers
Definition: RunManager.h:137
std::unique_ptr< CMSSteppingVerbose > m_sVerbose
Definition: RunManager.h:135
G4Run * m_currentRun
Definition: RunManager.h:108
edm::ParameterSet m_pStackingAction
Definition: RunManager.h:125
edm::ParameterSet m_pEventAction
Definition: RunManager.h:124
bool m_runTerminated
Definition: RunManager.h:102
edm::ParameterSet m_pField
Definition: RunManager.h:120
edm::ParameterSet m_pPhysics
Definition: RunManager.h:122
edm::ParameterSet m_pSteppingAction
Definition: RunManager.h:127
edm::ParameterSet m_g4overlap
Definition: RunManager.h:128
RunAction * m_userRunAction
Definition: RunManager.h:111
bool m_runInitialized
Definition: RunManager.h:101
std::string m_RegionFile
Definition: RunManager.h:147
std::vector< LHCTransportLink > LHCTransportLinkContainer
PrimaryTransformer * m_primaryTransformer
Definition: RunManager.h:98
std::string m_PhysicsTablesDir
Definition: RunManager.h:114
bool m_StorePhysicsTables
Definition: RunManager.h:115
std::unique_ptr< CustomUIsession > m_UIsession
Definition: RunManager.h:96
edm::ParameterSet m_pRunAction
Definition: RunManager.h:123
edm::ParameterSet m_pTrackingAction
Definition: RunManager.h:126
std::vector< std::string > m_G4Commands
Definition: RunManager.h:129
std::string m_FieldFile
Definition: RunManager.h:145
std::unique_ptr< PhysicsList > m_physicsList
Definition: RunManager.h:97
G4SimEvent * m_simEvent
Definition: RunManager.h:110
bool m_managerInitialized
Definition: RunManager.h:100
G4RunManagerKernel * m_kernel
Definition: RunManager.h:88
bool m_runAborted
Definition: RunManager.h:103
RunManager::~RunManager ( )

Definition at line 176 of file RunManager.cc.

References m_generator, m_runInterface, m_runTerminated, and terminateRun().

176  {
177  if (!m_runTerminated) {
178  terminateRun();
179  }
180  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
181  G4GeometryManager::GetInstance()->OpenGeometry();
182  // if (m_kernel!=0) delete m_kernel;
183  delete m_runInterface;
184  delete m_generator;
185 }
Generator * m_generator
Definition: RunManager.h:90
SimRunInterface * m_runInterface
Definition: RunManager.h:112
void terminateRun()
Definition: RunManager.cc:520
bool m_runTerminated
Definition: RunManager.h:102

Member Function Documentation

void RunManager::abortEvent ( )

Definition at line 454 of file RunManager.cc.

References m_currentEvent, m_kernel, m_runTerminated, TrackingAction::PostUserTrackingAction(), and OrderedSet::t.

Referenced by SimRunInterface::abortEvent(), and abortRun().

454  {
455  if (m_runTerminated) {
456  return;
457  }
458  G4Track* t = m_kernel->GetEventManager()->GetTrackingManager()->GetTrack();
459  t->SetTrackStatus(fStopAndKill);
460 
461  // CMS-specific act
462  //
463  TrackingAction* uta = (TrackingAction*)m_kernel->GetEventManager()->GetUserTrackingAction();
464  uta->PostUserTrackingAction(t);
465 
466  m_currentEvent->SetEventAborted();
467  m_kernel->GetEventManager()->GetStackManager()->clear();
468  m_kernel->GetEventManager()->GetTrackingManager()->EventAborted();
469 
470  G4StateManager* stateManager = G4StateManager::GetStateManager();
471  stateManager->SetNewState(G4State_GeomClosed);
472 }
G4Event * m_currentEvent
Definition: RunManager.h:109
bool m_runTerminated
Definition: RunManager.h:102
void PostUserTrackingAction(const G4Track *aTrack) override
G4RunManagerKernel * m_kernel
Definition: RunManager.h:88
void RunManager::abortRun ( bool  softAbort = false)

Definition at line 540 of file RunManager.cc.

References abortEvent(), m_currentRun, m_runAborted, and terminateRun().

Referenced by SimRunInterface::abortRun(), and produce().

540  {
541  if (m_runAborted) {
542  return;
543  }
544  if (!softAbort) {
545  abortEvent();
546  }
547  if (m_currentRun != nullptr) {
548  delete m_currentRun;
549  m_currentRun = nullptr;
550  }
551  terminateRun();
552  m_runAborted = true;
553 }
void abortEvent()
Definition: RunManager.cc:454
void terminateRun()
Definition: RunManager.cc:520
G4Run * m_currentRun
Definition: RunManager.h:108
bool m_runAborted
Definition: RunManager.h:103
void RunManager::Connect ( RunAction runAction)

Definition at line 565 of file RunManager.cc.

References SimActivityRegistry::beginOfRunSignal_, sim_act::Signaler< T >::connect(), SimActivityRegistry::endOfRunSignal_, RunAction::m_beginOfRunSignal, RunAction::m_endOfRunSignal, and m_registry.

Referenced by SimRunInterface::Connect(), and initializeUserActions().

565  {
568 }
SimActivityRegistry m_registry
Definition: RunManager.h:136
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:24
BeginOfRunSignal beginOfRunSignal_
EndOfRunSignal endOfRunSignal_
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:55
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:23
void RunManager::Connect ( EventAction eventAction)

Definition at line 570 of file RunManager.cc.

References SimActivityRegistry::beginOfEventSignal_, sim_act::Signaler< T >::connect(), SimActivityRegistry::endOfEventSignal_, EventAction::m_beginOfEventSignal, EventAction::m_endOfEventSignal, and m_registry.

570  {
573 }
SimActivityRegistry m_registry
Definition: RunManager.h:136
EndOfEventSignal endOfEventSignal_
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:44
BeginOfEventSignal beginOfEventSignal_
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:55
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:43
void RunManager::Connect ( TrackingAction trackingAction)

Definition at line 575 of file RunManager.cc.

References SimActivityRegistry::beginOfTrackSignal_, sim_act::Signaler< T >::connect(), SimActivityRegistry::endOfTrackSignal_, TrackingAction::m_beginOfTrackSignal, TrackingAction::m_endOfTrackSignal, and m_registry.

575  {
578 }
SimActivityRegistry m_registry
Definition: RunManager.h:136
SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:55
EndOfTrackSignal endOfTrackSignal_
BeginOfTrackSignal beginOfTrackSignal_
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal
void RunManager::Connect ( SteppingAction steppingAction)

Definition at line 580 of file RunManager.cc.

References sim_act::Signaler< T >::connect(), SimActivityRegistry::g4StepSignal_, SteppingAction::m_g4StepSignal, and m_registry.

580  {
582 }
SimActivityRegistry m_registry
Definition: RunManager.h:136
SimActivityRegistry::G4StepSignal m_g4StepSignal
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:55
const G4Event* RunManager::currentEvent ( ) const
inline

Definition at line 70 of file RunManager.h.

70 { return m_currentEvent; }
G4Event * m_currentEvent
Definition: RunManager.h:109
const G4Run* RunManager::currentRun ( ) const
inline

Definition at line 66 of file RunManager.h.

66 { return m_currentRun; }
G4Run * m_currentRun
Definition: RunManager.h:108
void RunManager::DumpMagneticField ( const G4Field *  field) const
protected

Definition at line 584 of file RunManager.cc.

References funct::cos(), flavorHistoryFilter_cfi::dr, PVValHelper::dz, groupFilesInBlocks::fout, mps_fire::i, createfilelist::int, dqmiolumiharvest::j, m_FieldFile, EgHLTOffHistBins_cfi::nr, MillePedeFileConverter_cfg::out, phi, point, alignCSCRings::r, funct::sin(), z, HLTMuonOfflineAnalyzer_cfi::z0, and SiStripMonitorCluster_cfi::zmax.

Referenced by initG4().

584  {
585  std::ofstream fout(m_FieldFile.c_str(), std::ios::out);
586  if (fout.fail()) {
587  edm::LogWarning("SimG4CoreApplication") << " RunManager WARNING : "
588  << "error opening file <" << m_FieldFile << "> for magnetic field";
589  } else {
590  double rmax = 9000 * mm;
591  double zmax = 16000 * mm;
592 
593  double dr = 5 * cm;
594  double dz = 20 * cm;
595 
596  int nr = (int)(rmax / dr);
597  int nz = 2 * (int)(zmax / dz);
598 
599  double r = 0.0;
600  double z0 = -zmax;
601  double z;
602 
603  double phi = 0.0;
604  double cosf = cos(phi);
605  double sinf = sin(phi);
606 
607  double point[4] = {0.0, 0.0, 0.0, 0.0};
608  double bfield[3] = {0.0, 0.0, 0.0};
609 
610  fout << std::setprecision(6);
611  for (int i = 0; i <= nr; ++i) {
612  z = z0;
613  for (int j = 0; j <= nz; ++j) {
614  point[0] = r * cosf;
615  point[1] = r * sinf;
616  point[2] = z;
617  field->GetFieldValue(point, bfield);
618  fout << "R(mm)= " << r / mm << " phi(deg)= " << phi / degree << " Z(mm)= " << z / mm
619  << " Bz(tesla)= " << bfield[2] / tesla << " Br(tesla)= " << (bfield[0] * cosf + bfield[1] * sinf) / tesla
620  << " Bphi(tesla)= " << (bfield[0] * sinf - bfield[1] * cosf) / tesla << G4endl;
621  z += dz;
622  }
623  r += dr;
624  }
625 
626  fout.close();
627  }
628 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::string m_FieldFile
Definition: RunManager.h:145
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
G4Event * RunManager::generateEvent ( edm::Event inpevt)
protected

Definition at line 420 of file RunManager.cc.

References edm::EventID::event(), runTauDisplay::evtid, edm::Event::getByToken(), edm::HepMCProduct::GetEvent(), Generator::HepMC2G4(), edm::EventBase::id(), m_currentEvent, m_generator, m_HepMC, m_nonBeam, m_simEvent, Generator::nonBeamEvent2G4(), resetGenParticleId(), and Generator::setGenEvent().

Referenced by produce().

420  {
421  if (m_currentEvent != nullptr) {
422  delete m_currentEvent;
423  }
424  m_currentEvent = nullptr;
425  if (m_simEvent != nullptr) {
426  delete m_simEvent;
427  }
428  m_simEvent = nullptr;
429 
430  // 64 bits event ID in CMSSW converted into Geant4 event ID
431  G4int evtid = (G4int)inpevt.id().event();
432  G4Event* evt = new G4Event(evtid);
433 
435 
436  inpevt.getByToken(m_HepMC, HepMCEvt);
437 
438  m_generator->setGenEvent(HepMCEvt->GetEvent());
439 
440  // required to reset the GenParticle Id for particles transported
441  // along the beam pipe
442  // to their original value for SimTrack creation
443  resetGenParticleId(inpevt);
444 
445  if (!m_nonBeam) {
446  m_generator->HepMC2G4(HepMCEvt->GetEvent(), evt);
447  } else {
448  m_generator->nonBeamEvent2G4(HepMCEvt->GetEvent(), evt);
449  }
450 
451  return evt;
452 }
EventNumber_t event() const
Definition: EventID.h:40
edm::EDGetTokenT< edm::HepMCProduct > m_HepMC
Definition: RunManager.h:92
G4Event * m_currentEvent
Definition: RunManager.h:109
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:101
Generator * m_generator
Definition: RunManager.h:90
bool m_nonBeam
Definition: RunManager.h:95
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:24
void resetGenParticleId(edm::Event &inpevt)
Definition: RunManager.cc:555
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
void nonBeamEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:527
edm::EventID id() const
Definition: EventBase.h:59
G4SimEvent * m_simEvent
Definition: RunManager.h:110
const Generator* RunManager::generator ( ) const
inline

Definition at line 69 of file RunManager.h.

69 { return m_generator; }
Generator * m_generator
Definition: RunManager.h:90
SimTrackManager * RunManager::GetSimTrackManager ( )

Definition at line 563 of file RunManager.cc.

References m_trackManager.

Referenced by SimRunInterface::SimRunInterface().

563 { return m_trackManager.get(); }
std::unique_ptr< SimTrackManager > m_trackManager
Definition: RunManager.h:140
void RunManager::initG4 ( const edm::EventSetup es)

Definition at line 187 of file RunManager.cc.

References SimActivityRegistry::beginOfJobSignal_, getEcalConditions_orcoffint2r_cff::catalog, edm::ESWatcher< T >::check(), RPCNoise_example::check, mps_setup::cmd, edm::errors::Configuration, AttachSD::create(), beamerCreator::create(), L1TMuonDQMOffline_cfi::cuts, SimActivityRegistry::dddWorldSignal_, DeadROC_duringRun::dir, DumpMagneticField(), Exception, firstRun, g, ecalTB2006H4_GenSimDigiReco_cfg::G4cout, edm::EventSetup::get(), timingPdfMaker::get, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), DDDWorld::GetWorldVolume(), GeV, idealGeomRcdWatcher_, idealMagRcdWatcher_, recoMuon::in, initializeRun(), initializeUserActions(), edm::errors::LogicError, m_check, m_FieldFile, m_G4Commands, m_g4overlap, m_kernel, m_managerInitialized, m_p, m_pField, m_physicsList, m_PhysicsTablesDir, m_pPhysics, m_primaryTransformer, m_pUseMagneticField, m_registry, m_RestorePhysicsTables, m_sensCaloDets, m_sensTkDets, m_StorePhysicsTables, m_sVerbose, m_trackManager, m_UIsession, m_UseParametrisedEMPhysics, m_WriteFile, SiStripPI::max, groupFilesInBlocks::nn, edm::ESTransientHandle< T >::product(), edm::ESHandle< T >::product(), FSQDQM_cfi::pvs, AlCaHLTBitMon_QueryRunRegistry::string, and pfDeepBoostedJetPreprocessParams_cfi::sv.

187  {
188  bool geomChanged = idealGeomRcdWatcher_.check(es);
189  if (geomChanged && (!firstRun)) {
190  throw cms::Exception("BadConfig") << "[SimG4Core RunManager]\n"
191  << "The Geometry configuration is changed during the job execution\n"
192  << "this is not allowed, the geometry must stay unchanged\n";
193  }
194  bool geoFromDD4hep = m_p.getParameter<bool>("g4GeometryDD4hepSource");
195  bool cuts = m_pPhysics.getParameter<bool>("CutsPerRegion");
196  bool protonCut = m_pPhysics.getParameter<bool>("CutsOnProton");
197  int verb = std::max(m_pPhysics.getUntrackedParameter<int>("Verbosity", 0),
198  m_p.getUntrackedParameter<int>("SteppingVerbosity", 0));
199  edm::LogVerbatim("SimG4CoreApplication")
200  << "RunManager: start initialising of geometry DD4Hep: " << geoFromDD4hep << "\n"
201  << " cutsPerRegion: " << cuts << " cutForProton: " << protonCut << "\n"
202  << " G4 verbosity: " << verb;
203 
204  if (m_pUseMagneticField) {
205  bool magChanged = idealMagRcdWatcher_.check(es);
206  if (magChanged && (!firstRun)) {
208  << "[SimG4Core RunManager]\n"
209  << "The MagneticField configuration is changed during the job execution\n"
210  << "this is not allowed, the MagneticField must stay unchanged\n";
211  }
212  }
213 
215  return;
216 
217  // initialise geometry
218  const DDCompactView* pDD = nullptr;
219  const cms::DDCompactView* pDD4hep = nullptr;
220  if (geoFromDD4hep) {
222  es.get<IdealGeometryRecord>().get(ph);
223  pDD4hep = ph.product();
224  } else {
226  es.get<IdealGeometryRecord>().get(ph);
227  pDD = ph.product();
228  }
230  const DDDWorld* world = new DDDWorld(pDD, pDD4hep, catalog, verb, cuts, protonCut);
231  G4VPhysicalVolume* pworld = world->GetWorldVolume();
232 
233  const G4RegionStore* regStore = G4RegionStore::GetInstance();
234  const G4PhysicalVolumeStore* pvs = G4PhysicalVolumeStore::GetInstance();
235  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
236  unsigned int numPV = pvs->size();
237  unsigned int numLV = lvs->size();
238  unsigned int nn = regStore->size();
239  edm::LogVerbatim("SimG4CoreApplication")
240  << "###RunManager: " << numPV << " PhysVolumes; " << numLV << " LogVolumes; " << nn << " Regions.";
241 
242  m_kernel->DefineWorldVolume(pworld, true);
244 
245  if (m_pUseMagneticField) {
246  // setup the magnetic field
248  es.get<IdealMagneticFieldRecord>().get(pMF);
249  const GlobalPoint g(0., 0., 0.);
250 
251  sim::FieldBuilder fieldBuilder(pMF.product(), m_pField);
252  CMSFieldManager* fieldManager = new CMSFieldManager();
253  G4TransportationManager* tM = G4TransportationManager::GetTransportationManager();
254  tM->SetFieldManager(fieldManager);
255  fieldBuilder.build(fieldManager, tM->GetPropagatorInField());
256 
257  if (!m_FieldFile.empty()) {
258  DumpMagneticField(tM->GetFieldManager()->GetDetectorField());
259  }
260  }
261 
262  // we need the track manager now
263  m_trackManager = std::unique_ptr<SimTrackManager>(new SimTrackManager);
264 
265  // attach sensitive detector
266  AttachSD attach;
267  auto sensDets = attach.create(es, catalog, m_p, m_trackManager.get(), m_registry);
268 
269  m_sensTkDets.swap(sensDets.first);
270  m_sensCaloDets.swap(sensDets.second);
271 
272  edm::LogVerbatim("SimG4CoreApplication")
273  << " RunManager: Sensitive Detector "
274  << "building finished; found " << m_sensTkDets.size() << " Tk type Producers, and " << m_sensCaloDets.size()
275  << " Calo type producers ";
276 
278  es.get<PDTRecord>().get(fTable);
279  const HepPDT::ParticleDataTable* fPDGTable = &(*fTable);
280 
282 
283  std::unique_ptr<PhysicsListMakerBase> physicsMaker(
285  if (physicsMaker.get() == nullptr) {
286  throw edm::Exception(edm::errors::Configuration) << "Unable to find the Physics list requested";
287  }
288  m_physicsList = physicsMaker->make(m_pPhysics, m_registry);
289 
290  PhysicsList* phys = m_physicsList.get();
291  if (phys == nullptr) {
292  throw edm::Exception(edm::errors::Configuration) << "Physics list construction failed!";
293  }
294 
295  // exotic particle physics
296  double monopoleMass = m_pPhysics.getUntrackedParameter<double>("MonopoleMass", 0.);
297  if (monopoleMass > 0.0) {
298  phys->RegisterPhysics(new CMSMonopolePhysics(fPDGTable, m_pPhysics));
299  }
300  bool exotica = m_pPhysics.getUntrackedParameter<bool>("ExoticaTransport", false);
301  if (exotica) {
302  CMSExoticaPhysics exo(phys, m_pPhysics);
303  }
304 
305  // adding GFlash, Russian Roulette for eletrons and gamma,
306  // step limiters on top of any Physics Lists
308  phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions", m_pPhysics));
309 
310  std::string tableDir = m_PhysicsTablesDir;
312  m_physicsList->SetPhysicsTableRetrieved(tableDir);
313  }
314  edm::LogInfo("SimG4CoreApplication") << "RunManager: start initialisation of PhysicsList";
315 
316  m_physicsList->SetDefaultCutValue(m_pPhysics.getParameter<double>("DefaultCutValue") * CLHEP::cm);
317  m_physicsList->SetCutsWithDefault();
318  m_kernel->SetPhysics(phys);
319  m_kernel->InitializePhysics();
320 
321  if (m_kernel->RunInitialization()) {
322  m_managerInitialized = true;
323  } else {
324  throw edm::Exception(edm::errors::LogicError) << "G4RunManagerKernel initialization failed!";
325  }
326 
327  if (m_StorePhysicsTables) {
328  std::ostringstream dir;
329  dir << tableDir << '\0';
330  std::string cmd = std::string("/control/shell mkdir -p ") + tableDir;
331  if (!std::ifstream(dir.str().c_str(), std::ios::in))
332  G4UImanager::GetUIpointer()->ApplyCommand(cmd);
333  m_physicsList->StorePhysicsTable(tableDir);
334  }
335 
336  //tell all interesting parties that we are beginning the job
337  BeginOfJob aBeginOfJob(&es);
338  m_registry.beginOfJobSignal_(&aBeginOfJob);
339 
340  G4int sv = m_p.getUntrackedParameter<int>("SteppingVerbosity", 0);
341  G4double elim = m_p.getUntrackedParameter<double>("StepVerboseThreshold", 0.1) * CLHEP::GeV;
342  std::vector<int> ve = m_p.getUntrackedParameter<std::vector<int> >("VerboseEvents");
343  std::vector<int> vn = m_p.getUntrackedParameter<std::vector<int> >("VertexNumber");
344  std::vector<int> vt = m_p.getUntrackedParameter<std::vector<int> >("VerboseTracks");
345 
346  if (sv > 0) {
347  m_sVerbose.reset(new CMSSteppingVerbose(sv, elim, ve, vn, vt));
348  }
350 
351  if (!m_G4Commands.empty()) {
352  G4cout << "RunManager: Requested UI commands: " << G4endl;
353  for (unsigned it = 0; it < m_G4Commands.size(); ++it) {
354  G4cout << " " << m_G4Commands[it] << G4endl;
355  G4UImanager::GetUIpointer()->ApplyCommand(m_G4Commands[it]);
356  }
357  }
358  G4StateManager::GetStateManager()->SetNewState(G4State_Init);
359 
360  if (!m_WriteFile.empty()) {
361  G4GDMLParser gdml;
362  gdml.SetRegionExport(true);
363  gdml.SetEnergyCutsExport(true);
364  gdml.Write(m_WriteFile, pworld, true);
365  }
366 
367  // G4Region dump file name
368  auto regionFile = m_p.getUntrackedParameter<std::string>("FileNameRegions", "");
369 
370  // Geometry checks
371  if (m_check || !regionFile.empty()) {
372  CMSG4CheckOverlap check(m_g4overlap, regionFile, m_UIsession.get(), pworld);
373  }
374 
375  // If the Geant4 particle table is needed, decomment the lines below
376  //
377  // G4cout << "Output of G4ParticleTable DumpTable:" << G4endl;
378  // G4ParticleTable::GetParticleTable()->DumpTable("ALL");
379 
380  initializeRun();
381  firstRun = false;
382 }
T getParameter(std::string const &) const
bool m_check
Definition: RunManager.h:119
T getUntrackedParameter(std::string const &, T const &) const
edm::ESWatcher< IdealMagneticFieldRecord > idealMagRcdWatcher_
Definition: RunManager.h:143
const double GeV
Definition: MathUtil.h:16
def create(alignables, pedeDump, additionalData, outputFile, config)
SimActivityRegistry m_registry
Definition: RunManager.h:136
edm::ParameterSet m_p
Definition: RunManager.h:130
HepPDT::ParticleDataTable ParticleDataTable
void initializeRun()
Definition: RunManager.cc:507
void initializeUserActions()
Definition: RunManager.cc:474
bool m_pUseMagneticField
Definition: RunManager.h:105
edm::ESWatcher< IdealGeometryRecord > idealGeomRcdWatcher_
Definition: RunManager.h:142
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::vector< SensitiveCaloDetector * > m_sensCaloDets
Definition: RunManager.h:133
std::vector< SensitiveTkDetector * > m_sensTkDets
Definition: RunManager.h:132
BeginOfJobSignal beginOfJobSignal_
std::pair< std::vector< SensitiveTkDetector * >, std::vector< SensitiveCaloDetector * > > create(const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *, SimActivityRegistry &reg) const
Definition: AttachSD.cc:15
std::string m_WriteFile
Definition: RunManager.h:146
bool firstRun
Definition: RunManager.h:104
bool m_UseParametrisedEMPhysics
Definition: RunManager.h:117
bool m_RestorePhysicsTables
Definition: RunManager.h:116
std::unique_ptr< CMSSteppingVerbose > m_sVerbose
Definition: RunManager.h:135
G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:24
edm::ParameterSet m_pField
Definition: RunManager.h:120
edm::ParameterSet m_pPhysics
Definition: RunManager.h:122
edm::ParameterSet m_g4overlap
Definition: RunManager.h:128
DDDWorldSignal dddWorldSignal_
T const * product() const
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
void DumpMagneticField(const G4Field *) const
Definition: RunManager.cc:584
list cmd
Definition: mps_setup.py:244
T get() const
Definition: EventSetup.h:73
PrimaryTransformer * m_primaryTransformer
Definition: RunManager.h:98
std::string m_PhysicsTablesDir
Definition: RunManager.h:114
bool m_StorePhysicsTables
Definition: RunManager.h:115
std::unique_ptr< CustomUIsession > m_UIsession
Definition: RunManager.h:96
std::unique_ptr< SimTrackManager > m_trackManager
Definition: RunManager.h:140
T const * product() const
Definition: ESHandle.h:86
std::vector< std::string > m_G4Commands
Definition: RunManager.h:129
std::unique_ptr< PhysicsList > m_physicsList
Definition: RunManager.h:97
std::string m_FieldFile
Definition: RunManager.h:145
bool m_managerInitialized
Definition: RunManager.h:100
G4RunManagerKernel * m_kernel
Definition: RunManager.h:88
void RunManager::initializeRun ( )

Definition at line 507 of file RunManager.cc.

References RunAction::BeginOfRunAction(), m_currentRun, m_runAborted, m_runInitialized, and m_userRunAction.

Referenced by initG4().

507  {
508  m_runInitialized = false;
509  if (m_currentRun == nullptr) {
510  m_currentRun = new G4Run();
511  }
512  G4StateManager::GetStateManager()->SetNewState(G4State_GeomClosed);
513  if (m_userRunAction != nullptr) {
515  }
516  m_runAborted = false;
517  m_runInitialized = true;
518 }
void BeginOfRunAction(const G4Run *aRun) override
Definition: RunAction.cc:17
G4Run * m_currentRun
Definition: RunManager.h:108
RunAction * m_userRunAction
Definition: RunManager.h:111
bool m_runInitialized
Definition: RunManager.h:101
bool m_runAborted
Definition: RunManager.h:103
void RunManager::initializeUserActions ( )

Definition at line 474 of file RunManager.cc.

References Connect(), g4SimHits_cfi::EventAction, m_EvtMgrVerbosity, m_generator, m_hasWatchers, m_kernel, m_pEventAction, m_pRunAction, m_pStackingAction, m_pSteppingAction, m_pTrackingAction, m_runInterface, m_sVerbose, m_trackManager, m_userRunAction, g4SimHits_cfi::RunAction, CastorDigiValidation::StackingAction, CastorDigiValidation::SteppingAction, and g4SimHits_cfi::TrackingAction.

Referenced by initG4().

474  {
475  m_runInterface = new SimRunInterface(this, false);
476 
479 
480  G4EventManager* eventManager = m_kernel->GetEventManager();
481  eventManager->SetVerboseLevel(m_EvtMgrVerbosity);
482 
483  if (m_generator != nullptr) {
484  EventAction* userEventAction =
486  Connect(userEventAction);
487  eventManager->SetUserAction(userEventAction);
488 
489  TrackingAction* userTrackingAction = new TrackingAction(userEventAction, m_pTrackingAction, m_sVerbose.get());
490  Connect(userTrackingAction);
491  eventManager->SetUserAction(userTrackingAction);
492 
493  SteppingAction* userSteppingAction =
494  new SteppingAction(userEventAction, m_pSteppingAction, m_sVerbose.get(), m_hasWatchers);
495  Connect(userSteppingAction);
496  eventManager->SetUserAction(userSteppingAction);
497 
498  eventManager->SetUserAction(new StackingAction(userTrackingAction, m_pStackingAction, m_sVerbose.get()));
499 
500  } else {
501  edm::LogWarning("SimG4CoreApplication") << " RunManager: WARNING : "
502  << "No generator; initialized "
503  << "only RunAction!";
504  }
505 }
Generator * m_generator
Definition: RunManager.h:90
bool m_hasWatchers
Definition: RunManager.h:106
RunAction
list of unwanted particles (gluons and quarks)
int m_EvtMgrVerbosity
Definition: RunManager.h:118
SimRunInterface * m_runInterface
Definition: RunManager.h:112
std::unique_ptr< CMSSteppingVerbose > m_sVerbose
Definition: RunManager.h:135
edm::ParameterSet m_pStackingAction
Definition: RunManager.h:125
edm::ParameterSet m_pEventAction
Definition: RunManager.h:124
edm::ParameterSet m_pSteppingAction
Definition: RunManager.h:127
RunAction * m_userRunAction
Definition: RunManager.h:111
void Connect(RunAction *)
Definition: RunManager.cc:565
edm::ParameterSet m_pRunAction
Definition: RunManager.h:123
std::unique_ptr< SimTrackManager > m_trackManager
Definition: RunManager.h:140
edm::ParameterSet m_pTrackingAction
Definition: RunManager.h:126
G4RunManagerKernel * m_kernel
Definition: RunManager.h:88
void RunManager::produce ( edm::Event inpevt,
const edm::EventSetup es 
)

Definition at line 391 of file RunManager.cc.

References abortRun(), G4SimEvent::collisionPoint(), edm::EventID::event(), Generator::eventWeight(), generateEvent(), Generator::genEvent(), Generator::genVertex(), G4SimEvent::hepEvent(), edm::EventBase::id(), m_currentEvent, m_generator, m_kernel, m_simEvent, G4SimEvent::nGenParts(), G4SimEvent::nTracks(), G4SimEvent::nVertices(), edm::second(), contentValuesCheck::ss, and G4SimEvent::weight().

391  {
392  m_currentEvent = generateEvent(inpevt);
393  m_simEvent = new G4SimEvent;
396  if (m_generator->genVertex() != nullptr) {
398  m_generator->genVertex()->y() / centimeter,
399  m_generator->genVertex()->z() / centimeter,
400  m_generator->genVertex()->t() / second));
401  }
402  if (m_currentEvent->GetNumberOfPrimaryVertex() == 0) {
403  std::stringstream ss;
404  ss << " RunManager::produce(): event " << inpevt.id().event() << " with no G4PrimaryVertices\n";
405  throw SimG4Exception(ss.str());
406 
407  abortRun(false);
408  } else {
409  edm::LogInfo("SimG4CoreApplication") << "RunManager::produce: start Event " << inpevt.id().event() << " of weight "
410  << m_simEvent->weight() << " with " << m_simEvent->nTracks() << " tracks and "
411  << m_simEvent->nVertices() << " vertices, generated by "
412  << m_simEvent->nGenParts() << " particles ";
413 
414  m_kernel->GetEventManager()->ProcessOneEvent(m_currentEvent);
415 
416  edm::LogInfo("SimG4CoreApplication") << " RunManager::produce: ended Event " << inpevt.id().event();
417  }
418 }
EventNumber_t event() const
Definition: EventID.h:40
virtual const math::XYZTLorentzVector * genVertex() const
Definition: Generator.h:31
virtual const double eventWeight() const
Definition: Generator.h:32
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
G4Event * m_currentEvent
Definition: RunManager.h:109
void abortRun(bool softAbort=false)
Definition: RunManager.cc:540
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:30
Generator * m_generator
Definition: RunManager.h:90
U second(std::pair< T, U > const &p)
void weight(float w)
Definition: G4SimEvent.h:25
void hepEvent(const HepMC::GenEvent *r)
Definition: G4SimEvent.h:23
unsigned int nTracks() const
Definition: G4SimEvent.h:20
unsigned int nVertices() const
Definition: G4SimEvent.h:21
unsigned int nGenParts() const
Definition: G4SimEvent.h:22
G4Event * generateEvent(edm::Event &inpevt)
Definition: RunManager.cc:420
edm::EventID id() const
Definition: EventBase.h:59
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: G4SimEvent.h:27
G4SimEvent * m_simEvent
Definition: RunManager.h:110
G4RunManagerKernel * m_kernel
Definition: RunManager.h:88
std::vector<std::shared_ptr<SimProducer> > RunManager::producers ( ) const
inline

Definition at line 74 of file RunManager.h.

74 { return m_producers; }
std::vector< std::shared_ptr< SimProducer > > m_producers
Definition: RunManager.h:138
void RunManager::resetGenParticleId ( edm::Event inpevt)
protected

Definition at line 555 of file RunManager.cc.

References edm::Event::getByToken(), edm::HandleBase::isValid(), m_LHCtr, m_trackManager, and edm::Handle< T >::product().

Referenced by generateEvent().

555  {
557  inpevt.getByToken(m_LHCtr, theLHCTlink);
558  if (theLHCTlink.isValid()) {
559  m_trackManager->setLHCTransportLink(theLHCTlink.product());
560  }
561 }
edm::EDGetTokenT< edm::LHCTransportLinkContainer > m_LHCtr
Definition: RunManager.h:93
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool isValid() const
Definition: HandleBase.h:70
T const * product() const
Definition: Handle.h:69
std::unique_ptr< SimTrackManager > m_trackManager
Definition: RunManager.h:140
std::vector<SensitiveCaloDetector*>& RunManager::sensCaloDetectors ( )
inline

Definition at line 73 of file RunManager.h.

73 { return m_sensCaloDets; }
std::vector< SensitiveCaloDetector * > m_sensCaloDets
Definition: RunManager.h:133
std::vector<SensitiveTkDetector*>& RunManager::sensTkDetectors ( )
inline

Definition at line 72 of file RunManager.h.

72 { return m_sensTkDets; }
std::vector< SensitiveTkDetector * > m_sensTkDets
Definition: RunManager.h:132
G4SimEvent* RunManager::simEvent ( )
inline

Definition at line 71 of file RunManager.h.

Referenced by SimRunInterface::simEvent().

71 { return m_simEvent; }
G4SimEvent * m_simEvent
Definition: RunManager.h:110
void RunManager::stopG4 ( )

Definition at line 384 of file RunManager.cc.

References m_runTerminated, and terminateRun().

384  {
385  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
386  if (!m_runTerminated) {
387  terminateRun();
388  }
389 }
void terminateRun()
Definition: RunManager.cc:520
bool m_runTerminated
Definition: RunManager.h:102
void RunManager::terminateRun ( )

Definition at line 520 of file RunManager.cc.

References RunAction::EndOfRunAction(), m_currentEvent, m_currentRun, m_kernel, m_runInitialized, m_runTerminated, m_simEvent, and m_userRunAction.

Referenced by abortRun(), stopG4(), and ~RunManager().

520  {
521  if (m_runTerminated) {
522  return;
523  }
524  if (m_userRunAction != nullptr) {
526  delete m_userRunAction;
527  m_userRunAction = nullptr;
528  }
529  delete m_currentEvent;
530  m_currentEvent = nullptr;
531  delete m_simEvent;
532  m_simEvent = nullptr;
533  if (m_kernel != nullptr) {
534  m_kernel->RunTermination();
535  }
536  m_runInitialized = false;
537  m_runTerminated = true;
538 }
G4Event * m_currentEvent
Definition: RunManager.h:109
G4Run * m_currentRun
Definition: RunManager.h:108
bool m_runTerminated
Definition: RunManager.h:102
RunAction * m_userRunAction
Definition: RunManager.h:111
bool m_runInitialized
Definition: RunManager.h:101
G4SimEvent * m_simEvent
Definition: RunManager.h:110
void EndOfRunAction(const G4Run *aRun) override
Definition: RunAction.cc:26
G4RunManagerKernel * m_kernel
Definition: RunManager.h:88

Member Data Documentation

bool RunManager::firstRun
private

Definition at line 104 of file RunManager.h.

Referenced by initG4().

edm::ESWatcher<IdealGeometryRecord> RunManager::idealGeomRcdWatcher_
private

Definition at line 142 of file RunManager.h.

Referenced by initG4().

edm::ESWatcher<IdealMagneticFieldRecord> RunManager::idealMagRcdWatcher_
private

Definition at line 143 of file RunManager.h.

Referenced by initG4().

bool RunManager::m_check
private

Definition at line 119 of file RunManager.h.

Referenced by initG4(), and RunManager().

G4Event* RunManager::m_currentEvent
private

Definition at line 109 of file RunManager.h.

Referenced by abortEvent(), generateEvent(), produce(), and terminateRun().

G4Run* RunManager::m_currentRun
private

Definition at line 108 of file RunManager.h.

Referenced by abortRun(), initializeRun(), and terminateRun().

int RunManager::m_EvtMgrVerbosity
private

Definition at line 118 of file RunManager.h.

Referenced by initializeUserActions().

std::string RunManager::m_FieldFile
private

Definition at line 145 of file RunManager.h.

Referenced by DumpMagneticField(), initG4(), and RunManager().

std::vector<std::string> RunManager::m_G4Commands
private

Definition at line 129 of file RunManager.h.

Referenced by initG4().

edm::ParameterSet RunManager::m_g4overlap
private

Definition at line 128 of file RunManager.h.

Referenced by initG4().

Generator* RunManager::m_generator
private

Definition at line 90 of file RunManager.h.

Referenced by generateEvent(), initializeUserActions(), produce(), and ~RunManager().

bool RunManager::m_hasWatchers
private

Definition at line 106 of file RunManager.h.

Referenced by initializeUserActions(), and RunManager().

edm::EDGetTokenT<edm::HepMCProduct> RunManager::m_HepMC
private

Definition at line 92 of file RunManager.h.

Referenced by generateEvent().

G4RunManagerKernel* RunManager::m_kernel
private
edm::EDGetTokenT<edm::LHCTransportLinkContainer> RunManager::m_LHCtr
private

Definition at line 93 of file RunManager.h.

Referenced by resetGenParticleId().

bool RunManager::m_managerInitialized
private

Definition at line 100 of file RunManager.h.

Referenced by initG4().

bool RunManager::m_nonBeam
private

Definition at line 95 of file RunManager.h.

Referenced by generateEvent().

edm::ParameterSet RunManager::m_p
private

Definition at line 130 of file RunManager.h.

Referenced by initG4(), and RunManager().

edm::ParameterSet RunManager::m_pEventAction
private

Definition at line 124 of file RunManager.h.

Referenced by initializeUserActions().

edm::ParameterSet RunManager::m_pField
private

Definition at line 120 of file RunManager.h.

Referenced by initG4().

edm::ParameterSet RunManager::m_pGenerator
private

Definition at line 121 of file RunManager.h.

std::unique_ptr<PhysicsList> RunManager::m_physicsList
private

Definition at line 97 of file RunManager.h.

Referenced by initG4(), and RunManager().

std::string RunManager::m_PhysicsTablesDir
private

Definition at line 114 of file RunManager.h.

Referenced by initG4().

edm::ParameterSet RunManager::m_pPhysics
private

Definition at line 122 of file RunManager.h.

Referenced by initG4().

PrimaryTransformer* RunManager::m_primaryTransformer
private

Definition at line 98 of file RunManager.h.

Referenced by initG4().

std::vector<std::shared_ptr<SimProducer> > RunManager::m_producers
private

Definition at line 138 of file RunManager.h.

Referenced by RunManager().

edm::ParameterSet RunManager::m_pRunAction
private

Definition at line 123 of file RunManager.h.

Referenced by initializeUserActions().

edm::ParameterSet RunManager::m_pStackingAction
private

Definition at line 125 of file RunManager.h.

Referenced by initializeUserActions().

edm::ParameterSet RunManager::m_pSteppingAction
private

Definition at line 127 of file RunManager.h.

Referenced by initializeUserActions().

edm::ParameterSet RunManager::m_pTrackingAction
private

Definition at line 126 of file RunManager.h.

Referenced by initializeUserActions().

bool RunManager::m_pUseMagneticField
private

Definition at line 105 of file RunManager.h.

Referenced by initG4().

std::string RunManager::m_RegionFile
private

Definition at line 147 of file RunManager.h.

Referenced by RunManager().

SimActivityRegistry RunManager::m_registry
private

Definition at line 136 of file RunManager.h.

Referenced by Connect(), initG4(), and RunManager().

bool RunManager::m_RestorePhysicsTables
private

Definition at line 116 of file RunManager.h.

Referenced by initG4().

bool RunManager::m_runAborted
private

Definition at line 103 of file RunManager.h.

Referenced by abortRun(), and initializeRun().

bool RunManager::m_runInitialized
private

Definition at line 101 of file RunManager.h.

Referenced by initializeRun(), and terminateRun().

SimRunInterface* RunManager::m_runInterface
private

Definition at line 112 of file RunManager.h.

Referenced by initializeUserActions(), RunManager(), and ~RunManager().

bool RunManager::m_runTerminated
private

Definition at line 102 of file RunManager.h.

Referenced by abortEvent(), stopG4(), terminateRun(), and ~RunManager().

std::vector<SensitiveCaloDetector*> RunManager::m_sensCaloDets
private

Definition at line 133 of file RunManager.h.

Referenced by initG4().

std::vector<SensitiveTkDetector*> RunManager::m_sensTkDets
private

Definition at line 132 of file RunManager.h.

Referenced by initG4().

G4SimEvent* RunManager::m_simEvent
private

Definition at line 110 of file RunManager.h.

Referenced by generateEvent(), produce(), and terminateRun().

bool RunManager::m_StorePhysicsTables
private

Definition at line 115 of file RunManager.h.

Referenced by initG4().

std::unique_ptr<CMSSteppingVerbose> RunManager::m_sVerbose
private

Definition at line 135 of file RunManager.h.

Referenced by initG4(), initializeUserActions(), and RunManager().

std::unique_ptr<SimTrackManager> RunManager::m_trackManager
private
std::unique_ptr<CustomUIsession> RunManager::m_UIsession
private

Definition at line 96 of file RunManager.h.

Referenced by initG4(), and RunManager().

bool RunManager::m_UseParametrisedEMPhysics
private

Definition at line 117 of file RunManager.h.

Referenced by initG4().

RunAction* RunManager::m_userRunAction
private

Definition at line 111 of file RunManager.h.

Referenced by initializeRun(), initializeUserActions(), RunManager(), and terminateRun().

std::vector<std::shared_ptr<SimWatcher> > RunManager::m_watchers
private

Definition at line 137 of file RunManager.h.

Referenced by RunManager().

std::string RunManager::m_WriteFile
private

Definition at line 146 of file RunManager.h.

Referenced by initG4(), and RunManager().