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 (EventAction *)
 
void Connect (RunAction *)
 
void Connect (SteppingAction *)
 
void Connect (TrackingAction *)
 
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
 
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::RunManager ( edm::ParameterSet const &  p,
edm::ConsumesCollector &&  i 
)

Definition at line 115 of file RunManager.cc.

116  : m_generator(new Generator(p.getParameter<edm::ParameterSet>("Generator"))),
117  m_HepMC(iC.consumes<edm::HepMCProduct>(
118  p.getParameter<edm::ParameterSet>("Generator").getParameter<edm::InputTag>("HepMCProductLabel"))),
119  m_LHCtr(iC.consumes<edm::LHCTransportLinkContainer>(p.getParameter<edm::InputTag>("theLHCTlinkTag"))),
120  m_nonBeam(p.getParameter<bool>("NonBeamEvent")),
121  m_primaryTransformer(nullptr),
122  m_managerInitialized(false),
123  m_runInitialized(false),
124  m_runTerminated(false),
125  m_runAborted(false),
126  firstRun(true),
127  m_pUseMagneticField(p.getParameter<bool>("UseMagneticField")),
128  m_currentRun(nullptr),
129  m_currentEvent(nullptr),
130  m_simEvent(nullptr),
131  m_PhysicsTablesDir(p.getUntrackedParameter<std::string>("PhysicsTablesDirectory", "")),
132  m_StorePhysicsTables(p.getUntrackedParameter<bool>("StorePhysicsTables", false)),
133  m_RestorePhysicsTables(p.getUntrackedParameter<bool>("RestorePhysicsTables", false)),
134  m_UseParametrisedEMPhysics(p.getUntrackedParameter<bool>("UseParametrisedEMPhysics")),
135  m_EvtMgrVerbosity(p.getUntrackedParameter<int>("G4EventManagerVerbosity", 0)),
136  m_pField(p.getParameter<edm::ParameterSet>("MagneticField")),
137  m_pGenerator(p.getParameter<edm::ParameterSet>("Generator")),
138  m_pPhysics(p.getParameter<edm::ParameterSet>("Physics")),
139  m_pRunAction(p.getParameter<edm::ParameterSet>("RunAction")),
140  m_pEventAction(p.getParameter<edm::ParameterSet>("EventAction")),
141  m_pStackingAction(p.getParameter<edm::ParameterSet>("StackingAction")),
142  m_pTrackingAction(p.getParameter<edm::ParameterSet>("TrackingAction")),
143  m_pSteppingAction(p.getParameter<edm::ParameterSet>("SteppingAction")),
144  m_g4overlap(p.getUntrackedParameter<edm::ParameterSet>("G4CheckOverlap")),
145  m_G4Commands(p.getParameter<std::vector<std::string> >("G4Commands")),
146  m_p(p) {
148  m_kernel = new G4RunManagerKernel();
149  G4StateManager::GetStateManager()->SetExceptionHandler(new ExceptionHandler());
150 
151  m_physicsList.reset(nullptr);
152 
153  m_check = p.getUntrackedParameter<bool>("CheckGeometry", false);
154  m_WriteFile = p.getUntrackedParameter<std::string>("FileNameGDML", "");
155  m_FieldFile = p.getUntrackedParameter<std::string>("FileNameField", "");
156  m_RegionFile = p.getUntrackedParameter<std::string>("FileNameRegions", "");
157 
158  m_userRunAction = nullptr;
159  m_runInterface = nullptr;
160 
161  //Look for an outside SimActivityRegistry
162  // this is used by the visualization code
163  edm::Service<SimActivityRegistry> otherRegistry;
164  if (otherRegistry) {
165  m_registry.connect(*otherRegistry);
166  }
167  m_sVerbose.reset(nullptr);
168 
169  std::vector<edm::ParameterSet> watchers = p.getParameter<std::vector<edm::ParameterSet> >("Watchers");
170  m_hasWatchers = (watchers.empty()) ? false : true;
171 
172  if (m_hasWatchers) {
174  }
175 }

References SimActivityRegistry::connect(), createWatchers(), g4SimHits_cfi::CustomUIsession, 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, AlCaHLTBitMon_ParallelJobs::p, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~RunManager()

RunManager::~RunManager ( )

Definition at line 177 of file RunManager.cc.

177  {
178  if (!m_runTerminated) {
179  terminateRun();
180  }
181  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
182  G4GeometryManager::GetInstance()->OpenGeometry();
183  // if (m_kernel!=0) delete m_kernel;
184  delete m_runInterface;
185  delete m_generator;
186 }

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

Member Function Documentation

◆ abortEvent()

void RunManager::abortEvent ( )

Definition at line 455 of file RunManager.cc.

455  {
456  if (m_runTerminated) {
457  return;
458  }
459  G4Track* t = m_kernel->GetEventManager()->GetTrackingManager()->GetTrack();
460  t->SetTrackStatus(fStopAndKill);
461 
462  // CMS-specific act
463  //
464  TrackingAction* uta = (TrackingAction*)m_kernel->GetEventManager()->GetUserTrackingAction();
466 
467  m_currentEvent->SetEventAborted();
468  m_kernel->GetEventManager()->GetStackManager()->clear();
469  m_kernel->GetEventManager()->GetTrackingManager()->EventAborted();
470 
471  G4StateManager* stateManager = G4StateManager::GetStateManager();
472  stateManager->SetNewState(G4State_GeomClosed);
473 }

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

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

◆ abortRun()

void RunManager::abortRun ( bool  softAbort = false)

Definition at line 541 of file RunManager.cc.

541  {
542  if (m_runAborted) {
543  return;
544  }
545  if (!softAbort) {
546  abortEvent();
547  }
548  if (m_currentRun != nullptr) {
549  delete m_currentRun;
550  m_currentRun = nullptr;
551  }
552  terminateRun();
553  m_runAborted = true;
554 }

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

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

◆ Connect() [1/4]

void RunManager::Connect ( EventAction eventAction)

◆ Connect() [2/4]

void RunManager::Connect ( RunAction runAction)

◆ Connect() [3/4]

void RunManager::Connect ( SteppingAction steppingAction)

◆ Connect() [4/4]

void RunManager::Connect ( TrackingAction trackingAction)

◆ currentEvent()

const G4Event* RunManager::currentEvent ( ) const
inline

Definition at line 70 of file RunManager.h.

70 { return m_currentEvent; }

References m_currentEvent.

◆ currentRun()

const G4Run* RunManager::currentRun ( ) const
inline

Definition at line 66 of file RunManager.h.

66 { return m_currentRun; }

References m_currentRun.

◆ DumpMagneticField()

void RunManager::DumpMagneticField ( const G4Field *  field) const
protected

Definition at line 585 of file RunManager.cc.

585  {
586  std::ofstream fout(m_FieldFile.c_str(), std::ios::out);
587  if (fout.fail()) {
588  edm::LogWarning("SimG4CoreApplication") << " RunManager WARNING : "
589  << "error opening file <" << m_FieldFile << "> for magnetic field";
590  } else {
591  double rmax = 9000 * mm;
592  double zmax = 16000 * mm;
593 
594  double dr = 5 * cm;
595  double dz = 20 * cm;
596 
597  int nr = (int)(rmax / dr);
598  int nz = 2 * (int)(zmax / dz);
599 
600  double r = 0.0;
601  double z0 = -zmax;
602  double z;
603 
604  double phi = 0.0;
605  double cosf = cos(phi);
606  double sinf = sin(phi);
607 
608  double point[4] = {0.0, 0.0, 0.0, 0.0};
609  double bfield[3] = {0.0, 0.0, 0.0};
610 
611  fout << std::setprecision(6);
612  for (int i = 0; i <= nr; ++i) {
613  z = z0;
614  for (int j = 0; j <= nz; ++j) {
615  point[0] = r * cosf;
616  point[1] = r * sinf;
617  point[2] = z;
618  field->GetFieldValue(point, bfield);
619  fout << "R(mm)= " << r / mm << " phi(deg)= " << phi / degree << " Z(mm)= " << z / mm
620  << " Bz(tesla)= " << bfield[2] / tesla << " Br(tesla)= " << (bfield[0] * cosf + bfield[1] * sinf) / tesla
621  << " Bphi(tesla)= " << (bfield[0] * sinf - bfield[1] * cosf) / tesla << G4endl;
622  z += dz;
623  }
624  r += dr;
625  }
626 
627  fout.close();
628  }
629 }

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().

◆ generateEvent()

G4Event * RunManager::generateEvent ( edm::Event inpevt)
protected

Definition at line 421 of file RunManager.cc.

421  {
422  if (m_currentEvent != nullptr) {
423  delete m_currentEvent;
424  }
425  m_currentEvent = nullptr;
426  if (m_simEvent != nullptr) {
427  delete m_simEvent;
428  }
429  m_simEvent = nullptr;
430 
431  // 64 bits event ID in CMSSW converted into Geant4 event ID
432  G4int evtid = (G4int)inpevt.id().event();
433  G4Event* evt = new G4Event(evtid);
434 
436 
437  inpevt.getByToken(m_HepMC, HepMCEvt);
438 
439  m_generator->setGenEvent(HepMCEvt->GetEvent());
440 
441  // required to reset the GenParticle Id for particles transported
442  // along the beam pipe
443  // to their original value for SimTrack creation
444  resetGenParticleId(inpevt);
445 
446  if (!m_nonBeam) {
447  m_generator->HepMC2G4(HepMCEvt->GetEvent(), evt);
448  } else {
449  m_generator->nonBeamEvent2G4(HepMCEvt->GetEvent(), evt);
450  }
451 
452  return evt;
453 }

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().

◆ generator()

const Generator* RunManager::generator ( ) const
inline

Definition at line 69 of file RunManager.h.

69 { return m_generator; }

References m_generator.

◆ GetSimTrackManager()

SimTrackManager * RunManager::GetSimTrackManager ( )

Definition at line 564 of file RunManager.cc.

564 { return m_trackManager.get(); }

References m_trackManager.

Referenced by SimRunInterface::SimRunInterface().

◆ initG4()

void RunManager::initG4 ( const edm::EventSetup es)

Definition at line 188 of file RunManager.cc.

188  {
189  bool geomChanged = idealGeomRcdWatcher_.check(es);
190  if (geomChanged && (!firstRun)) {
191  throw cms::Exception("BadConfig") << "[SimG4Core RunManager]\n"
192  << "The Geometry configuration is changed during the job execution\n"
193  << "this is not allowed, the geometry must stay unchanged\n";
194  }
195  bool geoFromDD4hep = m_p.getParameter<bool>("g4GeometryDD4hepSource");
196  bool cuts = m_pPhysics.getParameter<bool>("CutsPerRegion");
197  bool protonCut = m_pPhysics.getParameter<bool>("CutsOnProton");
198  int verb = std::max(m_pPhysics.getUntrackedParameter<int>("Verbosity", 0),
199  m_p.getUntrackedParameter<int>("SteppingVerbosity", 0));
200  edm::LogVerbatim("SimG4CoreApplication")
201  << "RunManager: start initialising of geometry DD4Hep: " << geoFromDD4hep << "\n"
202  << " cutsPerRegion: " << cuts << " cutForProton: " << protonCut << "\n"
203  << " G4 verbosity: " << verb;
204 
205  if (m_pUseMagneticField) {
206  bool magChanged = idealMagRcdWatcher_.check(es);
207  if (magChanged && (!firstRun)) {
209  << "[SimG4Core RunManager]\n"
210  << "The MagneticField configuration is changed during the job execution\n"
211  << "this is not allowed, the MagneticField must stay unchanged\n";
212  }
213  }
214 
216  return;
217 
218  // initialise geometry
219  const DDCompactView* pDD = nullptr;
220  const cms::DDCompactView* pDD4hep = nullptr;
221  if (geoFromDD4hep) {
223  es.get<IdealGeometryRecord>().get(ph);
224  pDD4hep = ph.product();
225  } else {
227  es.get<IdealGeometryRecord>().get(ph);
228  pDD = ph.product();
229  }
231  const DDDWorld* world = new DDDWorld(pDD, pDD4hep, catalog, verb, cuts, protonCut);
232  G4VPhysicalVolume* pworld = world->GetWorldVolume();
233 
234  const G4RegionStore* regStore = G4RegionStore::GetInstance();
235  const G4PhysicalVolumeStore* pvs = G4PhysicalVolumeStore::GetInstance();
236  const G4LogicalVolumeStore* lvs = G4LogicalVolumeStore::GetInstance();
237  unsigned int numPV = pvs->size();
238  unsigned int numLV = lvs->size();
239  unsigned int nn = regStore->size();
240  edm::LogVerbatim("SimG4CoreApplication")
241  << "###RunManager: " << numPV << " PhysVolumes; " << numLV << " LogVolumes; " << nn << " Regions.";
242 
243  m_kernel->DefineWorldVolume(pworld, true);
245 
246  if (m_pUseMagneticField) {
247  // setup the magnetic field
249  es.get<IdealMagneticFieldRecord>().get(pMF);
250  const GlobalPoint g(0., 0., 0.);
251 
252  sim::FieldBuilder fieldBuilder(pMF.product(), m_pField);
253  CMSFieldManager* fieldManager = new CMSFieldManager();
254  G4TransportationManager* tM = G4TransportationManager::GetTransportationManager();
255  tM->SetFieldManager(fieldManager);
256  fieldBuilder.build(fieldManager, tM->GetPropagatorInField());
257 
258  if (!m_FieldFile.empty()) {
259  DumpMagneticField(tM->GetFieldManager()->GetDetectorField());
260  }
261  }
262 
263  // we need the track manager now
264  m_trackManager = std::unique_ptr<SimTrackManager>(new SimTrackManager);
265 
266  // attach sensitive detector
267  AttachSD attach;
268  auto sensDets = attach.create(es, catalog, m_p, m_trackManager.get(), m_registry);
269 
270  m_sensTkDets.swap(sensDets.first);
271  m_sensCaloDets.swap(sensDets.second);
272 
273  edm::LogVerbatim("SimG4CoreApplication")
274  << " RunManager: Sensitive Detector "
275  << "building finished; found " << m_sensTkDets.size() << " Tk type Producers, and " << m_sensCaloDets.size()
276  << " Calo type producers ";
277 
279  es.get<PDTRecord>().get(fTable);
280  const HepPDT::ParticleDataTable* fPDGTable = &(*fTable);
281 
283 
284  std::unique_ptr<PhysicsListMakerBase> physicsMaker(
286  if (physicsMaker.get() == nullptr) {
287  throw edm::Exception(edm::errors::Configuration) << "Unable to find the Physics list requested";
288  }
289  m_physicsList = physicsMaker->make(m_pPhysics, m_registry);
290 
291  PhysicsList* phys = m_physicsList.get();
292  if (phys == nullptr) {
293  throw edm::Exception(edm::errors::Configuration) << "Physics list construction failed!";
294  }
295 
296  // exotic particle physics
297  double monopoleMass = m_pPhysics.getUntrackedParameter<double>("MonopoleMass", 0.);
298  if (monopoleMass > 0.0) {
299  phys->RegisterPhysics(new CMSMonopolePhysics(fPDGTable, m_pPhysics));
300  }
301  bool exotica = m_pPhysics.getUntrackedParameter<bool>("ExoticaTransport", false);
302  if (exotica) {
303  CMSExoticaPhysics exo(phys, m_pPhysics);
304  }
305 
306  // adding GFlash, Russian Roulette for eletrons and gamma,
307  // step limiters on top of any Physics Lists
309  phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions", m_pPhysics));
310 
311  std::string tableDir = m_PhysicsTablesDir;
313  m_physicsList->SetPhysicsTableRetrieved(tableDir);
314  }
315  edm::LogInfo("SimG4CoreApplication") << "RunManager: start initialisation of PhysicsList";
316 
317  m_physicsList->SetDefaultCutValue(m_pPhysics.getParameter<double>("DefaultCutValue") * CLHEP::cm);
318  m_physicsList->SetCutsWithDefault();
319  m_kernel->SetPhysics(phys);
320  m_kernel->InitializePhysics();
321 
322  if (m_kernel->RunInitialization()) {
323  m_managerInitialized = true;
324  } else {
325  throw edm::Exception(edm::errors::LogicError) << "G4RunManagerKernel initialization failed!";
326  }
327 
328  if (m_StorePhysicsTables) {
329  std::ostringstream dir;
330  dir << tableDir << '\0';
331  std::string cmd = std::string("/control/shell mkdir -p ") + tableDir;
332  if (!std::ifstream(dir.str().c_str(), std::ios::in))
333  G4UImanager::GetUIpointer()->ApplyCommand(cmd);
334  m_physicsList->StorePhysicsTable(tableDir);
335  }
336 
337  //tell all interesting parties that we are beginning the job
338  BeginOfJob aBeginOfJob(&es);
339  m_registry.beginOfJobSignal_(&aBeginOfJob);
340 
341  G4int sv = m_p.getUntrackedParameter<int>("SteppingVerbosity", 0);
342  G4double elim = m_p.getUntrackedParameter<double>("StepVerboseThreshold", 0.1) * CLHEP::GeV;
343  std::vector<int> ve = m_p.getUntrackedParameter<std::vector<int> >("VerboseEvents");
344  std::vector<int> vn = m_p.getUntrackedParameter<std::vector<int> >("VertexNumber");
345  std::vector<int> vt = m_p.getUntrackedParameter<std::vector<int> >("VerboseTracks");
346 
347  if (sv > 0) {
348  m_sVerbose.reset(new CMSSteppingVerbose(sv, elim, ve, vn, vt));
349  }
351 
352  if (!m_G4Commands.empty()) {
353  G4cout << "RunManager: Requested UI commands: " << G4endl;
354  for (unsigned it = 0; it < m_G4Commands.size(); ++it) {
355  G4cout << " " << m_G4Commands[it] << G4endl;
356  G4UImanager::GetUIpointer()->ApplyCommand(m_G4Commands[it]);
357  }
358  }
359  G4StateManager::GetStateManager()->SetNewState(G4State_Init);
360 
361  if (!m_WriteFile.empty()) {
362  G4GDMLParser gdml;
363  gdml.SetRegionExport(true);
364  gdml.SetEnergyCutsExport(true);
365  gdml.Write(m_WriteFile, pworld, true);
366  }
367 
368  // G4Region dump file name
369  auto regionFile = m_p.getUntrackedParameter<std::string>("FileNameRegions", "");
370 
371  // Geometry checks
372  if (m_check || !regionFile.empty()) {
373  CMSG4CheckOverlap check(m_g4overlap, regionFile, m_UIsession, pworld);
374  }
375 
376  // If the Geant4 particle table is needed, decomment the lines below
377  //
378  // G4cout << "Output of G4ParticleTable DumpTable:" << G4endl;
379  // G4ParticleTable::GetParticleTable()->DumpTable("ALL");
380 
381  initializeRun();
382  firstRun = false;
383 }

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(), 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.

◆ initializeRun()

void RunManager::initializeRun ( )

Definition at line 508 of file RunManager.cc.

508  {
509  m_runInitialized = false;
510  if (m_currentRun == nullptr) {
511  m_currentRun = new G4Run();
512  }
513  G4StateManager::GetStateManager()->SetNewState(G4State_GeomClosed);
514  if (m_userRunAction != nullptr) {
516  }
517  m_runAborted = false;
518  m_runInitialized = true;
519 }

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

Referenced by initG4().

◆ initializeUserActions()

void RunManager::initializeUserActions ( )

Definition at line 475 of file RunManager.cc.

475  {
476  m_runInterface = new SimRunInterface(this, false);
477 
480 
481  G4EventManager* eventManager = m_kernel->GetEventManager();
482  eventManager->SetVerboseLevel(m_EvtMgrVerbosity);
483 
484  if (m_generator != nullptr) {
485  EventAction* userEventAction =
487  Connect(userEventAction);
488  eventManager->SetUserAction(userEventAction);
489 
490  TrackingAction* userTrackingAction = new TrackingAction(userEventAction, m_pTrackingAction, m_sVerbose.get());
491  Connect(userTrackingAction);
492  eventManager->SetUserAction(userTrackingAction);
493 
494  SteppingAction* userSteppingAction =
495  new SteppingAction(userEventAction, m_pSteppingAction, m_sVerbose.get(), m_hasWatchers);
496  Connect(userSteppingAction);
497  eventManager->SetUserAction(userSteppingAction);
498 
499  eventManager->SetUserAction(new StackingAction(userTrackingAction, m_pStackingAction, m_sVerbose.get()));
500 
501  } else {
502  edm::LogWarning("SimG4CoreApplication") << " RunManager: WARNING : "
503  << "No generator; initialized "
504  << "only RunAction!";
505  }
506 }

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().

◆ produce()

void RunManager::produce ( edm::Event inpevt,
const edm::EventSetup es 
)

Definition at line 392 of file RunManager.cc.

392  {
393  m_currentEvent = generateEvent(inpevt);
394  m_simEvent = new G4SimEvent;
397  if (m_generator->genVertex() != nullptr) {
399  m_generator->genVertex()->y() / centimeter,
400  m_generator->genVertex()->z() / centimeter,
401  m_generator->genVertex()->t() / second));
402  }
403  if (m_currentEvent->GetNumberOfPrimaryVertex() == 0) {
404  std::stringstream ss;
405  ss << " RunManager::produce(): event " << inpevt.id().event() << " with no G4PrimaryVertices\n";
406  throw SimG4Exception(ss.str());
407 
408  abortRun(false);
409  } else {
410  edm::LogInfo("SimG4CoreApplication") << "RunManager::produce: start Event " << inpevt.id().event() << " of weight "
411  << m_simEvent->weight() << " with " << m_simEvent->nTracks() << " tracks and "
412  << m_simEvent->nVertices() << " vertices, generated by "
413  << m_simEvent->nGenParts() << " particles ";
414 
415  m_kernel->GetEventManager()->ProcessOneEvent(m_currentEvent);
416 
417  edm::LogInfo("SimG4CoreApplication") << " RunManager::produce: ended Event " << inpevt.id().event();
418  }
419 }

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().

◆ producers()

std::vector<std::shared_ptr<SimProducer> > RunManager::producers ( ) const
inline

Definition at line 74 of file RunManager.h.

74 { return m_producers; }

References m_producers.

◆ resetGenParticleId()

void RunManager::resetGenParticleId ( edm::Event inpevt)
protected

Definition at line 556 of file RunManager.cc.

556  {
558  inpevt.getByToken(m_LHCtr, theLHCTlink);
559  if (theLHCTlink.isValid()) {
560  m_trackManager->setLHCTransportLink(theLHCTlink.product());
561  }
562 }

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

Referenced by generateEvent().

◆ sensCaloDetectors()

std::vector<SensitiveCaloDetector*>& RunManager::sensCaloDetectors ( )
inline

Definition at line 73 of file RunManager.h.

73 { return m_sensCaloDets; }

References m_sensCaloDets.

◆ sensTkDetectors()

std::vector<SensitiveTkDetector*>& RunManager::sensTkDetectors ( )
inline

Definition at line 72 of file RunManager.h.

72 { return m_sensTkDets; }

References m_sensTkDets.

◆ simEvent()

G4SimEvent* RunManager::simEvent ( )
inline

Definition at line 71 of file RunManager.h.

71 { return m_simEvent; }

References m_simEvent.

Referenced by SimRunInterface::simEvent().

◆ stopG4()

void RunManager::stopG4 ( )

Definition at line 385 of file RunManager.cc.

385  {
386  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
387  if (!m_runTerminated) {
388  terminateRun();
389  }
390 }

References m_runTerminated, and terminateRun().

◆ terminateRun()

void RunManager::terminateRun ( )

Definition at line 521 of file RunManager.cc.

521  {
522  if (m_runTerminated) {
523  return;
524  }
525  if (m_userRunAction != nullptr) {
527  delete m_userRunAction;
528  m_userRunAction = nullptr;
529  }
530  delete m_currentEvent;
531  m_currentEvent = nullptr;
532  delete m_simEvent;
533  m_simEvent = nullptr;
534  if (m_kernel != nullptr) {
535  m_kernel->RunTermination();
536  }
537  m_runInitialized = false;
538  m_runTerminated = true;
539 }

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

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

Member Data Documentation

◆ firstRun

bool RunManager::firstRun
private

Definition at line 104 of file RunManager.h.

Referenced by initG4().

◆ idealGeomRcdWatcher_

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

Definition at line 142 of file RunManager.h.

Referenced by initG4().

◆ idealMagRcdWatcher_

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

Definition at line 143 of file RunManager.h.

Referenced by initG4().

◆ m_check

bool RunManager::m_check
private

Definition at line 119 of file RunManager.h.

Referenced by initG4(), and RunManager().

◆ m_currentEvent

G4Event* RunManager::m_currentEvent
private

Definition at line 109 of file RunManager.h.

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

◆ m_currentRun

G4Run* RunManager::m_currentRun
private

Definition at line 108 of file RunManager.h.

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

◆ m_EvtMgrVerbosity

int RunManager::m_EvtMgrVerbosity
private

Definition at line 118 of file RunManager.h.

Referenced by initializeUserActions().

◆ m_FieldFile

std::string RunManager::m_FieldFile
private

Definition at line 145 of file RunManager.h.

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

◆ m_G4Commands

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

Definition at line 129 of file RunManager.h.

Referenced by initG4().

◆ m_g4overlap

edm::ParameterSet RunManager::m_g4overlap
private

Definition at line 128 of file RunManager.h.

Referenced by initG4().

◆ m_generator

Generator* RunManager::m_generator
private

Definition at line 90 of file RunManager.h.

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

◆ m_hasWatchers

bool RunManager::m_hasWatchers
private

Definition at line 106 of file RunManager.h.

Referenced by initializeUserActions(), and RunManager().

◆ m_HepMC

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

Definition at line 92 of file RunManager.h.

Referenced by generateEvent().

◆ m_kernel

G4RunManagerKernel* RunManager::m_kernel
private

◆ m_LHCtr

edm::EDGetTokenT<edm::LHCTransportLinkContainer> RunManager::m_LHCtr
private

Definition at line 93 of file RunManager.h.

Referenced by resetGenParticleId().

◆ m_managerInitialized

bool RunManager::m_managerInitialized
private

Definition at line 100 of file RunManager.h.

Referenced by initG4().

◆ m_nonBeam

bool RunManager::m_nonBeam
private

Definition at line 95 of file RunManager.h.

Referenced by generateEvent().

◆ m_p

edm::ParameterSet RunManager::m_p
private

Definition at line 130 of file RunManager.h.

Referenced by initG4(), and RunManager().

◆ m_pEventAction

edm::ParameterSet RunManager::m_pEventAction
private

Definition at line 124 of file RunManager.h.

Referenced by initializeUserActions().

◆ m_pField

edm::ParameterSet RunManager::m_pField
private

Definition at line 120 of file RunManager.h.

Referenced by initG4().

◆ m_pGenerator

edm::ParameterSet RunManager::m_pGenerator
private

Definition at line 121 of file RunManager.h.

◆ m_physicsList

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

Definition at line 97 of file RunManager.h.

Referenced by initG4(), and RunManager().

◆ m_PhysicsTablesDir

std::string RunManager::m_PhysicsTablesDir
private

Definition at line 114 of file RunManager.h.

Referenced by initG4().

◆ m_pPhysics

edm::ParameterSet RunManager::m_pPhysics
private

Definition at line 122 of file RunManager.h.

Referenced by initG4().

◆ m_primaryTransformer

PrimaryTransformer* RunManager::m_primaryTransformer
private

Definition at line 98 of file RunManager.h.

Referenced by initG4().

◆ m_producers

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

Definition at line 138 of file RunManager.h.

Referenced by producers(), and RunManager().

◆ m_pRunAction

edm::ParameterSet RunManager::m_pRunAction
private

Definition at line 123 of file RunManager.h.

Referenced by initializeUserActions().

◆ m_pStackingAction

edm::ParameterSet RunManager::m_pStackingAction
private

Definition at line 125 of file RunManager.h.

Referenced by initializeUserActions().

◆ m_pSteppingAction

edm::ParameterSet RunManager::m_pSteppingAction
private

Definition at line 127 of file RunManager.h.

Referenced by initializeUserActions().

◆ m_pTrackingAction

edm::ParameterSet RunManager::m_pTrackingAction
private

Definition at line 126 of file RunManager.h.

Referenced by initializeUserActions().

◆ m_pUseMagneticField

bool RunManager::m_pUseMagneticField
private

Definition at line 105 of file RunManager.h.

Referenced by initG4().

◆ m_RegionFile

std::string RunManager::m_RegionFile
private

Definition at line 147 of file RunManager.h.

Referenced by RunManager().

◆ m_registry

SimActivityRegistry RunManager::m_registry
private

Definition at line 136 of file RunManager.h.

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

◆ m_RestorePhysicsTables

bool RunManager::m_RestorePhysicsTables
private

Definition at line 116 of file RunManager.h.

Referenced by initG4().

◆ m_runAborted

bool RunManager::m_runAborted
private

Definition at line 103 of file RunManager.h.

Referenced by abortRun(), and initializeRun().

◆ m_runInitialized

bool RunManager::m_runInitialized
private

Definition at line 101 of file RunManager.h.

Referenced by initializeRun(), and terminateRun().

◆ m_runInterface

SimRunInterface* RunManager::m_runInterface
private

Definition at line 112 of file RunManager.h.

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

◆ m_runTerminated

bool RunManager::m_runTerminated
private

Definition at line 102 of file RunManager.h.

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

◆ m_sensCaloDets

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

Definition at line 133 of file RunManager.h.

Referenced by initG4(), and sensCaloDetectors().

◆ m_sensTkDets

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

Definition at line 132 of file RunManager.h.

Referenced by initG4(), and sensTkDetectors().

◆ m_simEvent

G4SimEvent* RunManager::m_simEvent
private

Definition at line 110 of file RunManager.h.

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

◆ m_StorePhysicsTables

bool RunManager::m_StorePhysicsTables
private

Definition at line 115 of file RunManager.h.

Referenced by initG4().

◆ m_sVerbose

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

Definition at line 135 of file RunManager.h.

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

◆ m_trackManager

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

◆ m_UIsession

CustomUIsession* RunManager::m_UIsession
private

Definition at line 96 of file RunManager.h.

Referenced by initG4(), and RunManager().

◆ m_UseParametrisedEMPhysics

bool RunManager::m_UseParametrisedEMPhysics
private

Definition at line 117 of file RunManager.h.

Referenced by initG4().

◆ m_userRunAction

RunAction* RunManager::m_userRunAction
private

Definition at line 111 of file RunManager.h.

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

◆ m_watchers

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

Definition at line 137 of file RunManager.h.

Referenced by RunManager().

◆ m_WriteFile

std::string RunManager::m_WriteFile
private

Definition at line 146 of file RunManager.h.

Referenced by initG4(), and RunManager().

Generator::eventWeight
virtual const double eventWeight() const
Definition: Generator.h:32
G4SimEvent::hepEvent
void hepEvent(const HepMC::GenEvent *r)
Definition: G4SimEvent.h:23
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_setup.cmd
list cmd
Definition: mps_setup.py:244
RunManager::m_g4overlap
edm::ParameterSet m_g4overlap
Definition: RunManager.h:128
RunManager::idealGeomRcdWatcher_
edm::ESWatcher< IdealGeometryRecord > idealGeomRcdWatcher_
Definition: RunManager.h:142
SimTrackManager
Definition: SimTrackManager.h:35
ParametrisedEMPhysics
Definition: ParametrisedEMPhysics.h:16
g4SimHits_cfi.Generator
Generator
Definition: g4SimHits_cfi.py:189
mps_fire.i
i
Definition: mps_fire.py:355
edm::LHCTransportLinkContainer
std::vector< LHCTransportLink > LHCTransportLinkContainer
Definition: LHCTransportLinkContainer.h:8
Generator::nonBeamEvent2G4
void nonBeamEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:527
EventAction
Definition: EventAction.h:23
G4SimEvent
Definition: G4SimEvent.h:14
RunManager::m_pEventAction
edm::ParameterSet m_pEventAction
Definition: RunManager.h:124
edm::ESTransientHandle::product
T const * product() const
Definition: ESTransientHandle.h:51
edm::Handle::product
T const * product() const
Definition: Handle.h:70
RunManager::m_sensCaloDets
std::vector< SensitiveCaloDetector * > m_sensCaloDets
Definition: RunManager.h:133
ExceptionHandler
Definition: ExceptionHandler.h:19
getEcalConditions_orcoffint2r_cff.catalog
catalog
Definition: getEcalConditions_orcoffint2r_cff.py:40
RunManager::m_sVerbose
std::unique_ptr< CMSSteppingVerbose > m_sVerbose
Definition: RunManager.h:135
G4SimEvent::nVertices
unsigned int nVertices() const
Definition: G4SimEvent.h:21
DDDWorld
Definition: DDDWorld.h:14
RunManager::m_pPhysics
edm::ParameterSet m_pPhysics
Definition: RunManager.h:122
RunManager::m_primaryTransformer
PrimaryTransformer * m_primaryTransformer
Definition: RunManager.h:98
EventAction::m_beginOfEventSignal
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:43
RunManager::m_sensTkDets
std::vector< SensitiveTkDetector * > m_sensTkDets
Definition: RunManager.h:132
EventAction::m_endOfEventSignal
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:44
runTauDisplay.evtid
evtid
Definition: runTauDisplay.py:293
RunManager::m_pSteppingAction
edm::ParameterSet m_pSteppingAction
Definition: RunManager.h:127
edm::errors::LogicError
Definition: EDMException.h:37
SimActivityRegistry::endOfEventSignal_
EndOfEventSignal endOfEventSignal_
Definition: SimActivityRegistry.h:84
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TrackingAction::PostUserTrackingAction
void PostUserTrackingAction(const G4Track *aTrack) override
Definition: TrackingAction.cc:43
CMSExoticaPhysics
Definition: CMSExoticaPhysics.h:13
RunManager::m_UIsession
CustomUIsession * m_UIsession
Definition: RunManager.h:96
math::XYZTLorentzVectorD
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
SimG4Exception
Definition: SimG4Exception.h:13
Generator::genVertex
virtual const math::XYZTLorentzVector * genVertex() const
Definition: Generator.h:31
RunManager::m_UseParametrisedEMPhysics
bool m_UseParametrisedEMPhysics
Definition: RunManager.h:117
RunManager::m_runInterface
SimRunInterface * m_runInterface
Definition: RunManager.h:112
edm::LogInfo
Definition: MessageLogger.h:254
CMSFieldManager
Definition: CMSFieldManager.h:24
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
RunManager::m_managerInitialized
bool m_managerInitialized
Definition: RunManager.h:100
SimActivityRegistry::dddWorldSignal_
DDDWorldSignal dddWorldSignal_
Definition: SimActivityRegistry.h:54
SteppingAction
Definition: SteppingAction.h:30
RunManager::m_runAborted
bool m_runAborted
Definition: RunManager.h:103
CMSSteppingVerbose
Definition: CMSSteppingVerbose.h:25
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
AttachSD::create
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
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
RunManager::m_userRunAction
RunAction * m_userRunAction
Definition: RunManager.h:111
RunManager::m_currentEvent
G4Event * m_currentEvent
Definition: RunManager.h:109
CastorDigiValidation.StackingAction
StackingAction
Definition: CastorDigiValidation.py:136
SimActivityRegistry::g4StepSignal_
G4StepSignal g4StepSignal_
Definition: SimActivityRegistry.h:74
RunManager::m_runTerminated
bool m_runTerminated
Definition: RunManager.h:102
edm::Handle< edm::HepMCProduct >
createWatchers
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:89
RunAction::m_beginOfRunSignal
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:23
RunManager::m_pField
edm::ParameterSet m_pField
Definition: RunManager.h:120
RunManager::m_simEvent
G4SimEvent * m_simEvent
Definition: RunManager.h:110
RunManager::m_registry
SimActivityRegistry m_registry
Definition: RunManager.h:136
RunManager::m_physicsList
std::unique_ptr< PhysicsList > m_physicsList
Definition: RunManager.h:97
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
RunManager::m_PhysicsTablesDir
std::string m_PhysicsTablesDir
Definition: RunManager.h:114
g4SimHits_cfi.RunAction
RunAction
list of unwanted particles (gluons and quarks)
Definition: g4SimHits_cfi.py:211
G4SimEvent::nTracks
unsigned int nTracks() const
Definition: G4SimEvent.h:20
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
TrackingAction
Definition: TrackingAction.h:16
PrimaryTransformer
Definition: PrimaryTransformer.h:6
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
RunManager::Connect
void Connect(RunAction *)
Definition: RunManager.cc:566
RunManager::m_RegionFile
std::string m_RegionFile
Definition: RunManager.h:147
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
RunManager::DumpMagneticField
void DumpMagneticField(const G4Field *) const
Definition: RunManager.cc:585
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
g4SimHits_cfi.CustomUIsession
CustomUIsession
Definition: g4SimHits_cfi.py:84
RunManager::m_watchers
std::vector< std::shared_ptr< SimWatcher > > m_watchers
Definition: RunManager.h:137
RunManager::m_producers
std::vector< std::shared_ptr< SimProducer > > m_producers
Definition: RunManager.h:138
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:226
RunManager::resetGenParticleId
void resetGenParticleId(edm::Event &inpevt)
Definition: RunManager.cc:556
DDAxes::z
edm::ESHandle< MagneticField >
TrackingAction::m_endOfTrackSignal
SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal
Definition: TrackingAction.h:29
Generator::setGenEvent
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:24
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
G4SimEvent::nGenParts
unsigned int nGenParts() const
Definition: G4SimEvent.h:22
BeginOfJob
Definition: BeginOfJob.h:8
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
PhysicsList
Definition: PhysicsList.h:7
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
RunManager::m_check
bool m_check
Definition: RunManager.h:119
Point3DBase< float, GlobalTag >
OrderedSet.t
t
Definition: OrderedSet.py:90
RunManager::m_p
edm::ParameterSet m_p
Definition: RunManager.h:130
RunManager::generateEvent
G4Event * generateEvent(edm::Event &inpevt)
Definition: RunManager.cc:421
RunManager::m_G4Commands
std::vector< std::string > m_G4Commands
Definition: RunManager.h:129
g4SimHits_cfi.EventAction
EventAction
Definition: g4SimHits_cfi.py:214
sim_act::Signaler::connect
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:55
g4SimHits_cfi.TrackingAction
TrackingAction
Definition: g4SimHits_cfi.py:255
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RunManager::m_StorePhysicsTables
bool m_StorePhysicsTables
Definition: RunManager.h:115
edm::LogWarning
Definition: MessageLogger.h:141
CMSG4CheckOverlap
Definition: CMSG4CheckOverlap.h:11
edm::ParameterSet
Definition: ParameterSet.h:36
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
DDDWorld::GetWorldVolume
G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:24
SimActivityRegistry::endOfTrackSignal_
EndOfTrackSignal endOfTrackSignal_
Definition: SimActivityRegistry.h:89
RunManager::m_trackManager
std::unique_ptr< SimTrackManager > m_trackManager
Definition: RunManager.h:140
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
GeV
const double GeV
Definition: MathUtil.h:16
RunManager::m_LHCtr
edm::EDGetTokenT< edm::LHCTransportLinkContainer > m_LHCtr
Definition: RunManager.h:93
RunManager::m_pGenerator
edm::ParameterSet m_pGenerator
Definition: RunManager.h:121
RunManager::m_HepMC
edm::EDGetTokenT< edm::HepMCProduct > m_HepMC
Definition: RunManager.h:92
recoMuon::in
Definition: RecoMuonEnumerators.h:6
RunManager::firstRun
bool firstRun
Definition: RunManager.h:104
RunManager::m_runInitialized
bool m_runInitialized
Definition: RunManager.h:101
groupFilesInBlocks.fout
fout
Definition: groupFilesInBlocks.py:162
edm::EventID::event
EventNumber_t event() const
Definition: EventID.h:40
SimActivityRegistry::beginOfEventSignal_
BeginOfEventSignal beginOfEventSignal_
Definition: SimActivityRegistry.h:64
edm::Service
Definition: Service.h:30
createfilelist.int
int
Definition: createfilelist.py:10
edm::LogVerbatim
Definition: MessageLogger.h:297
SimActivityRegistry::endOfRunSignal_
EndOfRunSignal endOfRunSignal_
Definition: SimActivityRegistry.h:79
CastorDigiValidation.SteppingAction
SteppingAction
Definition: CastorDigiValidation.py:147
RunManager::m_pRunAction
edm::ParameterSet m_pRunAction
Definition: RunManager.h:123
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
get
#define get
FSQDQM_cfi.pvs
pvs
Definition: FSQDQM_cfi.py:12
G4SimEvent::collisionPoint
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: G4SimEvent.h:27
SimActivityRegistry::beginOfJobSignal_
BeginOfJobSignal beginOfJobSignal_
Definition: SimActivityRegistry.h:49
RunManager::m_FieldFile
std::string m_FieldFile
Definition: RunManager.h:145
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
RunManager::m_RestorePhysicsTables
bool m_RestorePhysicsTables
Definition: RunManager.h:116
TrackingAction::m_beginOfTrackSignal
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal
Definition: TrackingAction.h:28
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RunManager::terminateRun
void terminateRun()
Definition: RunManager.cc:521
groupFilesInBlocks.nn
nn
Definition: groupFilesInBlocks.py:150
RunAction::m_endOfRunSignal
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:24
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
SteppingAction::m_g4StepSignal
SimActivityRegistry::G4StepSignal m_g4StepSignal
Definition: SteppingAction.h:37
SimActivityRegistry::beginOfTrackSignal_
BeginOfTrackSignal beginOfTrackSignal_
Definition: SimActivityRegistry.h:69
RunManager::m_EvtMgrVerbosity
int m_EvtMgrVerbosity
Definition: RunManager.h:118
PVValHelper::dz
Definition: PVValidationHelpers.h:50
RunManager::m_pTrackingAction
edm::ParameterSet m_pTrackingAction
Definition: RunManager.h:126
RunManager::idealMagRcdWatcher_
edm::ESWatcher< IdealMagneticFieldRecord > idealMagRcdWatcher_
Definition: RunManager.h:143
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
Exception
Definition: hltDiff.cc:246
RunManager::m_kernel
G4RunManagerKernel * m_kernel
Definition: RunManager.h:88
edm::EventBase::id
edm::EventID id() const
Definition: EventBase.h:59
cms::DDCompactView
Definition: DDCompactView.h:29
RunManager::m_nonBeam
bool m_nonBeam
Definition: RunManager.h:95
G4SimEvent::weight
void weight(float w)
Definition: G4SimEvent.h:25
SimActivityRegistry::connect
void connect(Observer< const BeginOfJob * > *iObject)
Definition: SimActivityRegistry.h:51
RunManager::initializeUserActions
void initializeUserActions()
Definition: RunManager.cc:475
RunManager::m_pUseMagneticField
bool m_pUseMagneticField
Definition: RunManager.h:105
RunAction::EndOfRunAction
void EndOfRunAction(const G4Run *aRun) override
Definition: RunAction.cc:26
RunManager::m_pStackingAction
edm::ParameterSet m_pStackingAction
Definition: RunManager.h:125
Generator::HepMC2G4
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:101
CMSMonopolePhysics
Definition: CMSMonopolePhysics.h:18
AttachSD
Definition: AttachSD.h:17
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
RunManager::m_generator
Generator * m_generator
Definition: RunManager.h:90
L1TMuonDQMOffline_cfi.cuts
cuts
Definition: L1TMuonDQMOffline_cfi.py:41
edm::HepMCProduct
Definition: HepMCProduct.h:18
Generator::genEvent
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:30
RunManager::initializeRun
void initializeRun()
Definition: RunManager.cc:508
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
ecalTB2006H4_GenSimDigiReco_cfg.G4cout
G4cout
Definition: ecalTB2006H4_GenSimDigiReco_cfg.py:303
SimActivityRegistry::beginOfRunSignal_
BeginOfRunSignal beginOfRunSignal_
Definition: SimActivityRegistry.h:59
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
point
*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
RunManager::m_hasWatchers
bool m_hasWatchers
Definition: RunManager.h:106
edm::errors::Configuration
Definition: EDMException.h:36
RunManager::m_currentRun
G4Run * m_currentRun
Definition: RunManager.h:108
PDTRecord
Definition: PDTRecord.h:14
RunManager::m_WriteFile
std::string m_WriteFile
Definition: RunManager.h:146
ParticleDataTable
HepPDT::ParticleDataTable ParticleDataTable
Definition: ParticleDataTable.h:8
RunManager::abortRun
void abortRun(bool softAbort=false)
Definition: RunManager.cc:541
edm::InputTag
Definition: InputTag.h:15
IdealGeometryRecord
Definition: IdealGeometryRecord.h:27
g
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
RunManager::abortEvent
void abortEvent()
Definition: RunManager.cc:455
RunAction::BeginOfRunAction
void BeginOfRunAction(const G4Run *aRun) override
Definition: RunAction.cc:17
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
sim::FieldBuilder
Definition: FieldBuilder.h:15
SimRunInterface
Definition: SimRunInterface.h:18