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 117 of file RunManager.cc.

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

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 179 of file RunManager.cc.

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

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

Member Function Documentation

◆ abortEvent()

void RunManager::abortEvent ( )

Definition at line 457 of file RunManager.cc.

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

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

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

◆ abortRun()

void RunManager::abortRun ( bool  softAbort = false)

Definition at line 543 of file RunManager.cc.

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

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 587 of file RunManager.cc.

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

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 423 of file RunManager.cc.

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

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::nonCentralEvent2G4(), 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 566 of file RunManager.cc.

566 { return m_trackManager.get(); }

References m_trackManager.

Referenced by SimRunInterface::SimRunInterface().

◆ initG4()

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

Definition at line 190 of file RunManager.cc.

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

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 510 of file RunManager.cc.

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

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

Referenced by initG4().

◆ initializeUserActions()

void RunManager::initializeUserActions ( )

Definition at line 477 of file RunManager.cc.

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

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 394 of file RunManager.cc.

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

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 558 of file RunManager.cc.

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

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 387 of file RunManager.cc.

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

References m_runTerminated, and terminateRun().

◆ terminateRun()

void RunManager::terminateRun ( )

Definition at line 523 of file RunManager.cc.

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

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
ParametrisedEMPhysics
Definition: ParametrisedEMPhysics.h:16
g4SimHits_cfi.Generator
Generator
Definition: g4SimHits_cfi.py:198
mps_fire.i
i
Definition: mps_fire.py:428
edm::LHCTransportLinkContainer
std::vector< LHCTransportLink > LHCTransportLinkContainer
Definition: LHCTransportLinkContainer.h:8
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
CMSFieldManager
Definition: CMSFieldManager.h:24
Generator::nonCentralEvent2G4
void nonCentralEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:542
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
RunManager::m_managerInitialized
bool m_managerInitialized
Definition: RunManager.h:100
SimActivityRegistry::dddWorldSignal_
DDDWorldSignal dddWorldSignal_
Definition: SimActivityRegistry.h:54
SteppingAction
Definition: SteppingAction.h:31
RunManager::m_runAborted
bool m_runAborted
Definition: RunManager.h:103
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
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
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:91
RunAction::m_beginOfRunSignal
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:23
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
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:222
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:568
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:80
RunManager::DumpMagneticField
void DumpMagneticField(const G4Field *) const
Definition: RunManager.cc:587
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
g4SimHits_cfi.CustomUIsession
CustomUIsession
Definition: g4SimHits_cfi.py:87
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:81
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
RunManager::resetGenParticleId
void resetGenParticleId(edm::Event &inpevt)
Definition: RunManager.cc:558
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:531
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 >
RunManager::m_p
edm::ParameterSet m_p
Definition: RunManager.h:130
RunManager::generateEvent
G4Event * generateEvent(edm::Event &inpevt)
Definition: RunManager.cc:423
RunManager::m_G4Commands
std::vector< std::string > m_G4Commands
Definition: RunManager.h:129
g4SimHits_cfi.EventAction
EventAction
Definition: g4SimHits_cfi.py:225
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:266
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RunManager::m_StorePhysicsTables
bool m_StorePhysicsTables
Definition: RunManager.h:115
CMSG4CheckOverlap
Definition: CMSG4CheckOverlap.h:11
edm::ParameterSet
Definition: ParameterSet.h:47
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
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:523
groupFilesInBlocks.nn
nn
Definition: groupFilesInBlocks.py:150
RunAction::m_endOfRunSignal
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:24
DDAxes::phi
SteppingAction::m_g4StepSignal
SimActivityRegistry::G4StepSignal m_g4StepSignal
Definition: SteppingAction.h:38
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
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
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:31
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:477
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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:112
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:510
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
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
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:543
edm::InputTag
Definition: InputTag.h:15
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
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:457
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