CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
RunManagerMTWorker Class Reference

#include <RunManagerMTWorker.h>

Classes

struct  TLSData
 

Public Member Functions

void abortEvent ()
 
void abortRun (bool softAbort=false)
 
void Connect (EventAction *)
 
void Connect (RunAction *)
 
void Connect (SteppingAction *)
 
void Connect (TrackingAction *)
 
void endRun ()
 
SimTrackManagerGetSimTrackManager ()
 
std::unique_ptr< G4SimEventproduce (const edm::Event &inpevt, const edm::EventSetup &es, RunManagerMT &runManagerMaster)
 
std::vector< std::shared_ptr< SimProducer > > & producers ()
 
 RunManagerMTWorker (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&i)
 
std::vector< SensitiveCaloDetector * > & sensCaloDetectors ()
 
std::vector< SensitiveTkDetector * > & sensTkDetectors ()
 
G4SimEventsimEvent ()
 
 ~RunManagerMTWorker ()
 

Private Member Functions

void DumpMagneticField (const G4Field *, const std::string &) const
 
G4Event * generateEvent (const edm::Event &inpevt)
 
void initializeRun ()
 
void initializeThread (RunManagerMT &runManagerMaster, const edm::EventSetup &es)
 
void initializeTLS ()
 
void initializeUserActions ()
 
void resetGenParticleId (const edm::Event &inpevt)
 
void terminateRun ()
 

Static Private Member Functions

static void resetTLS ()
 

Private Attributes

int m_EvtMgrVerbosity
 
Generator m_generator
 
bool m_hasWatchers
 
edm::EDGetTokenT< edm::HepMCProductm_InToken
 
bool m_nonBeam
 
edm::ParameterSet m_p
 
edm::ParameterSet m_pCustomUIsession
 
edm::ParameterSet m_pEventAction
 
edm::ParameterSet m_pField
 
edm::ParameterSet m_pRunAction
 
edm::ParameterSet m_pStackingAction
 
edm::ParameterSet m_pSteppingAction
 
edm::ParameterSet m_pTrackingAction
 
bool m_pUseMagneticField
 
G4SimEventm_simEvent
 
std::unique_ptr< CMSSteppingVerbosem_sVerbose
 
edm::EDGetTokenT< edm::LHCTransportLinkContainerm_theLHCTlinkToken
 

Static Private Attributes

static thread_local bool dumpMF = false
 
static thread_local TLSDatam_tls {nullptr}
 

Detailed Description

Definition at line 41 of file RunManagerMTWorker.h.

Constructor & Destructor Documentation

◆ RunManagerMTWorker()

RunManagerMTWorker::RunManagerMTWorker ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  i 
)
explicit

Definition at line 145 of file RunManagerMTWorker.cc.

146  : m_generator(iConfig.getParameter<edm::ParameterSet>("Generator")),
147  m_InToken(iC.consumes<edm::HepMCProduct>(
148  iConfig.getParameter<edm::ParameterSet>("Generator").getParameter<edm::InputTag>("HepMCProductLabel"))),
150  iC.consumes<edm::LHCTransportLinkContainer>(iConfig.getParameter<edm::InputTag>("theLHCTlinkTag"))),
151  m_nonBeam(iConfig.getParameter<bool>("NonBeamEvent")),
152  m_pUseMagneticField(iConfig.getParameter<bool>("UseMagneticField")),
153  m_EvtMgrVerbosity(iConfig.getUntrackedParameter<int>("G4EventManagerVerbosity", 0)),
154  m_pField(iConfig.getParameter<edm::ParameterSet>("MagneticField")),
155  m_pRunAction(iConfig.getParameter<edm::ParameterSet>("RunAction")),
156  m_pEventAction(iConfig.getParameter<edm::ParameterSet>("EventAction")),
157  m_pStackingAction(iConfig.getParameter<edm::ParameterSet>("StackingAction")),
158  m_pTrackingAction(iConfig.getParameter<edm::ParameterSet>("TrackingAction")),
159  m_pSteppingAction(iConfig.getParameter<edm::ParameterSet>("SteppingAction")),
160  m_pCustomUIsession(iConfig.getUntrackedParameter<edm::ParameterSet>("CustomUIsession")),
161  m_p(iConfig),
162  m_simEvent(nullptr),
163  m_sVerbose(nullptr) {
164  std::vector<edm::ParameterSet> watchers = iConfig.getParameter<std::vector<edm::ParameterSet> >("Watchers");
165  m_hasWatchers = (watchers.empty()) ? false : true;
166  initializeTLS();
167 }

References edm::ParameterSet::getParameter(), initializeTLS(), and m_hasWatchers.

◆ ~RunManagerMTWorker()

RunManagerMTWorker::~RunManagerMTWorker ( )

Definition at line 169 of file RunManagerMTWorker.cc.

169  {
170  if (m_tls && !m_tls->runTerminated) {
171  terminateRun();
172  }
173 
174  ++n_tls_shutdown_task;
175  resetTLS();
176 
177  {
178  //make sure all tasks are done before continuing
179  timespec s;
180  s.tv_sec = 0;
181  s.tv_nsec = 10000;
182  while (n_tls_shutdown_task != 0) {
183  nanosleep(&s, nullptr);
184  }
185  }
186 }

References m_tls, resetTLS(), RunManagerMTWorker::TLSData::runTerminated, alignCSCRings::s, and terminateRun().

Member Function Documentation

◆ abortEvent()

void RunManagerMTWorker::abortEvent ( )

Definition at line 529 of file RunManagerMTWorker.cc.

529  {
530  if (m_tls->runTerminated) {
531  return;
532  }
533  G4Track* t = m_tls->kernel->GetEventManager()->GetTrackingManager()->GetTrack();
534  t->SetTrackStatus(fStopAndKill);
535 
536  // CMS-specific act
537  //
538  TrackingAction* uta = static_cast<TrackingAction*>(m_tls->kernel->GetEventManager()->GetUserTrackingAction());
540 
541  m_tls->currentEvent->SetEventAborted();
542  m_tls->kernel->GetEventManager()->GetStackManager()->clear();
543  m_tls->kernel->GetEventManager()->GetTrackingManager()->EventAborted();
544 }

References RunManagerMTWorker::TLSData::currentEvent, RunManagerMTWorker::TLSData::kernel, m_tls, TrackingAction::PostUserTrackingAction(), RunManagerMTWorker::TLSData::runTerminated, and OrderedSet::t.

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

◆ abortRun()

void RunManagerMTWorker::abortRun ( bool  softAbort = false)

Definition at line 546 of file RunManagerMTWorker.cc.

546  {
547  if (!softAbort) {
548  abortEvent();
549  }
550  m_tls->currentRun = nullptr;
551  terminateRun();
552 }

References abortEvent(), RunManagerMTWorker::TLSData::currentRun, m_tls, and terminateRun().

Referenced by SimRunInterface::abortRun().

◆ Connect() [1/4]

void RunManagerMTWorker::Connect ( EventAction eventAction)

Definition at line 394 of file RunManagerMTWorker.cc.

394  {
395  eventAction->m_beginOfEventSignal.connect(m_tls->registry->beginOfEventSignal_);
396  eventAction->m_endOfEventSignal.connect(m_tls->registry->endOfEventSignal_);
397 }

References sim_act::Signaler< T >::connect(), EventAction::m_beginOfEventSignal, EventAction::m_endOfEventSignal, m_tls, and RunManagerMTWorker::TLSData::registry.

◆ Connect() [2/4]

void RunManagerMTWorker::Connect ( RunAction runAction)

◆ Connect() [3/4]

void RunManagerMTWorker::Connect ( SteppingAction steppingAction)

Definition at line 404 of file RunManagerMTWorker.cc.

404  {
405  steppingAction->m_g4StepSignal.connect(m_tls->registry->g4StepSignal_);
406 }

References sim_act::Signaler< T >::connect(), SteppingAction::m_g4StepSignal, m_tls, and RunManagerMTWorker::TLSData::registry.

◆ Connect() [4/4]

void RunManagerMTWorker::Connect ( TrackingAction trackingAction)

Definition at line 399 of file RunManagerMTWorker.cc.

399  {
400  trackingAction->m_beginOfTrackSignal.connect(m_tls->registry->beginOfTrackSignal_);
401  trackingAction->m_endOfTrackSignal.connect(m_tls->registry->endOfTrackSignal_);
402 }

References sim_act::Signaler< T >::connect(), TrackingAction::m_beginOfTrackSignal, TrackingAction::m_endOfTrackSignal, m_tls, and RunManagerMTWorker::TLSData::registry.

◆ DumpMagneticField()

void RunManagerMTWorker::DumpMagneticField ( const G4Field *  field,
const std::string &  file 
) const
private

Definition at line 590 of file RunManagerMTWorker.cc.

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

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

Referenced by initializeThread().

◆ endRun()

void RunManagerMTWorker::endRun ( )

Definition at line 214 of file RunManagerMTWorker.cc.

214 { terminateRun(); }

References terminateRun().

◆ generateEvent()

G4Event * RunManagerMTWorker::generateEvent ( const edm::Event inpevt)
private

Definition at line 554 of file RunManagerMTWorker.cc.

554  {
555  m_tls->currentEvent.reset();
556  m_simEvent = nullptr;
557 
558  // 64 bits event ID in CMSSW converted into Geant4 event ID
559  G4int evtid = (G4int)inpevt.id().event();
560  G4Event* evt = new G4Event(evtid);
561 
563 
564  inpevt.getByToken(m_InToken, HepMCEvt);
565 
566  m_generator.setGenEvent(HepMCEvt->GetEvent());
567 
568  // required to reset the GenParticle Id for particles transported
569  // along the beam pipe
570  // to their original value for SimTrack creation
571  resetGenParticleId(inpevt);
572 
573  if (!m_nonBeam) {
574  m_generator.HepMC2G4(HepMCEvt->GetEvent(), evt);
575  } else {
576  m_generator.nonBeamEvent2G4(HepMCEvt->GetEvent(), evt);
577  }
578 
579  return evt;
580 }

References RunManagerMTWorker::TLSData::currentEvent, edm::EventID::event(), runTauDisplay::evtid, edm::Event::getByToken(), edm::HepMCProduct::GetEvent(), Generator::HepMC2G4(), edm::EventBase::id(), m_generator, m_InToken, m_nonBeam, m_simEvent, m_tls, Generator::nonBeamEvent2G4(), resetGenParticleId(), and Generator::setGenEvent().

Referenced by produce().

◆ GetSimTrackManager()

SimTrackManager * RunManagerMTWorker::GetSimTrackManager ( )

Definition at line 408 of file RunManagerMTWorker.cc.

408  {
409  initializeTLS();
410  return m_tls->trackManager.get();
411 }

References initializeTLS(), m_tls, and RunManagerMTWorker::TLSData::trackManager.

Referenced by SimRunInterface::SimRunInterface().

◆ initializeRun()

void RunManagerMTWorker::initializeRun ( )
private

Definition at line 425 of file RunManagerMTWorker.cc.

425  {
426  m_tls->currentRun = new G4Run();
427  G4StateManager::GetStateManager()->SetNewState(G4State_GeomClosed);
428  if (m_tls->userRunAction) {
429  m_tls->userRunAction->BeginOfRunAction(m_tls->currentRun);
430  }
431 }

References RunManagerMTWorker::TLSData::currentRun, m_tls, and RunManagerMTWorker::TLSData::userRunAction.

Referenced by produce().

◆ initializeThread()

void RunManagerMTWorker::initializeThread ( RunManagerMT runManagerMaster,
const edm::EventSetup es 
)
private

Definition at line 241 of file RunManagerMTWorker.cc.

241  {
242  // I guess everything initialized here should be in thread_local storage
243  initializeTLS();
244 
245  int thisID = getThreadIndex();
246 
247  edm::LogVerbatim("SimG4CoreApplication") << "RunManagerMTWorker::initializeThread " << thisID;
248 
249  // Initialize per-thread output
250  G4Threading::G4SetThreadId(thisID);
251  G4UImanager::GetUIpointer()->SetUpForAThread(thisID);
252  const std::string& uitype = m_pCustomUIsession.getUntrackedParameter<std::string>("Type", "MessageLogger");
253  if (uitype == "MessageLogger") {
254  new CustomUIsession();
255  } else if (uitype == "MessageLoggerThreadPrefix") {
257  } else if (uitype == "FilePerThread") {
259  } else {
261  << "Invalid value of CustomUIsession.Type '" << uitype
262  << "', valid are MessageLogger, MessageLoggerThreadPrefix, FilePerThread";
263  }
264 
265  // Initialize worker part of shared resources (geometry, physics)
266  G4WorkerThread::BuildGeometryAndPhysicsVector();
267 
268  // Create worker run manager
269  m_tls->kernel.reset(G4WorkerRunManagerKernel::GetRunManagerKernel());
270  if (!m_tls->kernel) {
271  m_tls->kernel.reset(new G4WorkerRunManagerKernel());
272  }
273 
274  // Define G4 exception handler
275  G4StateManager::GetStateManager()->SetExceptionHandler(new ExceptionHandler());
276 
277  // Set the geometry for the worker, share from master
278  auto worldPV = runManagerMaster.world().GetWorldVolume();
279  m_tls->kernel->WorkerDefineWorldVolume(worldPV);
280  G4TransportationManager* tM = G4TransportationManager::GetTransportationManager();
281  tM->SetWorldForTracking(worldPV);
282 
283  // we need the track manager now
284  m_tls->trackManager.reset(new SimTrackManager());
285 
286  // setup the magnetic field
287  if (m_pUseMagneticField) {
288  const GlobalPoint g(0., 0., 0.);
289 
291  es.get<IdealMagneticFieldRecord>().get(pMF);
292 
293  sim::FieldBuilder fieldBuilder(pMF.product(), m_pField);
294  CMSFieldManager* fieldManager = new CMSFieldManager();
295  tM->SetFieldManager(fieldManager);
296  fieldBuilder.build(fieldManager, tM->GetPropagatorInField());
297 
298  std::string fieldFile = m_p.getUntrackedParameter<std::string>("FileNameField", "");
299  if (!fieldFile.empty()) {
300  std::call_once(applyOnce, []() { dumpMF = true; });
301  if (dumpMF) {
302  edm::LogVerbatim("SimG4CoreApplication") << " RunManagerMTWorker: Dump magnetic field to file " << fieldFile;
303  DumpMagneticField(tM->GetFieldManager()->GetDetectorField(), fieldFile);
304  }
305  }
306  }
307 
308  // attach sensitive detector
309  AttachSD attach;
310  auto sensDets =
311  attach.create(es, runManagerMaster.catalog(), m_p, m_tls->trackManager.get(), *(m_tls->registry.get()));
312 
313  m_tls->sensTkDets.swap(sensDets.first);
314  m_tls->sensCaloDets.swap(sensDets.second);
315 
316  edm::LogVerbatim("SimG4CoreApplication")
317  << " RunManagerMTWorker: Sensitive Detector building finished; found " << m_tls->sensTkDets.size()
318  << " Tk type Producers, and " << m_tls->sensCaloDets.size() << " Calo type producers ";
319 
320  // Set the physics list for the worker, share from master
321  PhysicsList* physicsList = runManagerMaster.physicsListForWorker();
322 
323  edm::LogVerbatim("SimG4CoreApplication") << "RunManagerMTWorker: start initialisation of PhysicsList for the thread";
324 
325  // Geant4 UI commands in PreInit state
326  if (!runManagerMaster.G4Commands().empty()) {
327  G4cout << "RunManagerMTWorker: Requested UI commands: " << G4endl;
328  for (const std::string& command : runManagerMaster.G4Commands()) {
329  G4cout << " " << command << G4endl;
330  G4UImanager::GetUIpointer()->ApplyCommand(command);
331  }
332  }
333  G4StateManager::GetStateManager()->SetNewState(G4State_Init);
334 
335  physicsList->InitializeWorker();
336  m_tls->kernel->SetPhysics(physicsList);
337  m_tls->kernel->InitializePhysics();
338 
339  const bool kernelInit = m_tls->kernel->RunInitialization();
340  if (!kernelInit) {
341  throw edm::Exception(edm::errors::Configuration) << "RunManagerMTWorker: Geant4 kernel initialization failed";
342  }
343  //tell all interesting parties that we are beginning the job
344  BeginOfJob aBeginOfJob(&es);
345  m_tls->registry->beginOfJobSignal_(&aBeginOfJob);
346 
347  G4int sv = m_p.getUntrackedParameter<int>("SteppingVerbosity", 0);
348  G4double elim = m_p.getUntrackedParameter<double>("StepVerboseThreshold", 0.1) * CLHEP::GeV;
349  std::vector<int> ve = m_p.getUntrackedParameter<std::vector<int> >("VerboseEvents");
350  std::vector<int> vn = m_p.getUntrackedParameter<std::vector<int> >("VertexNumber");
351  std::vector<int> vt = m_p.getUntrackedParameter<std::vector<int> >("VerboseTracks");
352 
353  if (sv > 0) {
354  m_sVerbose.reset(new CMSSteppingVerbose(sv, elim, ve, vn, vt));
355  }
357 
358  edm::LogVerbatim("SimG4CoreApplication") << "RunManagerMTWorker::initializeThread done for the thread " << thisID;
359 
360  G4StateManager::GetStateManager()->SetNewState(G4State_Idle);
361 }

References applyOnce, RunManagerMT::catalog(), mps_check::command, edm::errors::Configuration, AttachSD::create(), g4SimHits_cfi::CustomUIsession, DumpMagneticField(), dumpMF, Exception, g, RunManagerMT::G4Commands(), ecalTB2006H4_GenSimDigiReco_cfg::G4cout, edm::EventSetup::get(), get, edm::ParameterSet::getUntrackedParameter(), DDDWorld::GetWorldVolume(), GeV, initializeTLS(), initializeUserActions(), RunManagerMTWorker::TLSData::kernel, m_p, m_pCustomUIsession, m_pField, m_pUseMagneticField, m_sVerbose, m_tls, RunManagerMT::physicsListForWorker(), edm::ESHandle< T >::product(), RunManagerMTWorker::TLSData::registry, RunManagerMTWorker::TLSData::sensCaloDets, RunManagerMTWorker::TLSData::sensTkDets, AlCaHLTBitMon_QueryRunRegistry::string, pfDeepBoostedJetPreprocessParams_cfi::sv, RunManagerMTWorker::TLSData::trackManager, and RunManagerMT::world().

Referenced by produce().

◆ initializeTLS()

void RunManagerMTWorker::initializeTLS ( )
private

Definition at line 216 of file RunManagerMTWorker.cc.

216  {
217  if (m_tls) {
218  return;
219  }
220 
221  m_tls = new TLSData();
222  m_tls->registry.reset(new SimActivityRegistry());
223 
224  edm::Service<SimActivityRegistry> otherRegistry;
225  //Look for an outside SimActivityRegistry
226  // this is used by the visualization code
227  int thisID = getThreadIndex();
228  if (otherRegistry) {
229  m_tls->registry->connect(*otherRegistry);
230  if (thisID > 0) {
232  << "SimActivityRegistry service (i.e. visualization) is not supported for more than 1 thread. "
233  << " \n If this use case is needed, RunManagerMTWorker has to be updated.";
234  }
235  }
236  if (m_hasWatchers) {
238  }
239 }

References edm::errors::Configuration, createWatchers(), Exception, m_hasWatchers, m_p, m_tls, RunManagerMTWorker::TLSData::producers, RunManagerMTWorker::TLSData::registry, and RunManagerMTWorker::TLSData::watchers.

Referenced by GetSimTrackManager(), initializeThread(), producers(), RunManagerMTWorker(), sensCaloDetectors(), and sensTkDetectors().

◆ initializeUserActions()

void RunManagerMTWorker::initializeUserActions ( )
private

Definition at line 363 of file RunManagerMTWorker.cc.

363  {
364  m_tls->runInterface.reset(new SimRunInterface(this, false));
365  m_tls->userRunAction.reset(new RunAction(m_pRunAction, m_tls->runInterface.get(), false));
366  m_tls->userRunAction->SetMaster(false);
367  Connect(m_tls->userRunAction.get());
368 
369  G4EventManager* eventManager = m_tls->kernel->GetEventManager();
370  eventManager->SetVerboseLevel(m_EvtMgrVerbosity);
371 
372  EventAction* userEventAction =
374  Connect(userEventAction);
375  eventManager->SetUserAction(userEventAction);
376 
377  TrackingAction* userTrackingAction = new TrackingAction(userEventAction, m_pTrackingAction, m_sVerbose.get());
378  Connect(userTrackingAction);
379  eventManager->SetUserAction(userTrackingAction);
380 
381  SteppingAction* userSteppingAction =
382  new SteppingAction(userEventAction, m_pSteppingAction, m_sVerbose.get(), m_hasWatchers);
383  Connect(userSteppingAction);
384  eventManager->SetUserAction(userSteppingAction);
385 
386  eventManager->SetUserAction(new StackingAction(userTrackingAction, m_pStackingAction, m_sVerbose.get()));
387 }

References Connect(), g4SimHits_cfi::EventAction, RunManagerMTWorker::TLSData::kernel, m_EvtMgrVerbosity, m_hasWatchers, m_pEventAction, m_pRunAction, m_pStackingAction, m_pSteppingAction, m_pTrackingAction, m_sVerbose, m_tls, g4SimHits_cfi::RunAction, RunManagerMTWorker::TLSData::runInterface, CastorDigiValidation::StackingAction, CastorDigiValidation::SteppingAction, g4SimHits_cfi::TrackingAction, RunManagerMTWorker::TLSData::trackManager, and RunManagerMTWorker::TLSData::userRunAction.

Referenced by initializeThread().

◆ produce()

std::unique_ptr< G4SimEvent > RunManagerMTWorker::produce ( const edm::Event inpevt,
const edm::EventSetup es,
RunManagerMT runManagerMaster 
)

Definition at line 451 of file RunManagerMTWorker.cc.

453  {
454  // The initialization and begin/end run is a bit convoluted due to
455  // - Geant4 deals per-thread
456  // - OscarMTProducer deals per-stream
457  // and framework/TBB is free to schedule work in streams to the
458  // threads as it likes.
459  //
460  // We have to do the per-thread initialization, and per-thread
461  // per-run initialization here by ourselves.
462 
463  if (!(m_tls && m_tls->threadInitialized)) {
464  LogDebug("SimG4CoreApplication") << "RunManagerMTWorker::produce(): stream " << inpevt.streamID() << " thread "
465  << getThreadIndex() << " initializing";
466  initializeThread(runManagerMaster, es);
467  m_tls->threadInitialized = true;
468  }
469  // Initialize run
470  if (inpevt.id().run() != m_tls->currentRunNumber) {
471  if (m_tls->currentRunNumber != 0 && !m_tls->runTerminated) {
472  // If previous run in this thread was not terminated via endRun() call, terminate it now
473  terminateRun();
474  }
475  initializeRun();
476  m_tls->currentRunNumber = inpevt.id().run();
477  }
478  m_tls->runInterface->setRunManagerMTWorker(this); // For UserActions
479 
480  m_tls->currentEvent.reset(generateEvent(inpevt));
481 
482  auto simEvent = std::make_unique<G4SimEvent>();
483  m_simEvent = simEvent.get();
486  if (m_generator.genVertex() != nullptr) {
487  auto genVertex = m_generator.genVertex();
488  m_simEvent->collisionPoint(math::XYZTLorentzVectorD(genVertex->x() / CLHEP::cm,
489  genVertex->y() / CLHEP::cm,
490  genVertex->z() / CLHEP::cm,
491  genVertex->t() / CLHEP::second));
492  }
493  if (m_tls->currentEvent->GetNumberOfPrimaryVertex() == 0) {
494  std::stringstream ss;
495  ss << "RunManagerMTWorker::produce(): event " << inpevt.id().event() << " with no G4PrimaryVertices \n";
496  throw SimG4Exception(ss.str());
497 
498  } else {
499  if (!m_tls->kernel) {
500  std::stringstream ss;
501  ss << " RunManagerMT::produce(): "
502  << " no G4WorkerRunManagerKernel yet for thread index" << getThreadIndex() << ", id " << std::hex
503  << std::this_thread::get_id() << " \n";
504  throw SimG4Exception(ss.str());
505  }
506 
507  edm::LogVerbatim("SimG4CoreApplication")
508  << " RunManagerMTWorker::produce: start Event " << inpevt.id().event() << " stream id " << inpevt.streamID()
509  << " thread index " << getThreadIndex() << " of weight " << m_simEvent->weight() << " with "
510  << m_simEvent->nTracks() << " tracks and " << m_simEvent->nVertices() << " vertices, generated by "
511  << m_simEvent->nGenParts() << " particles ";
512 
513  m_tls->kernel->GetEventManager()->ProcessOneEvent(m_tls->currentEvent.get());
514 
515  edm::LogVerbatim("SimG4CoreApplication") << " RunManagerMTWorker::produce: ended Event " << inpevt.id().event();
516  }
517 
518  //remove memory only needed during event processing
519  m_tls->currentEvent.reset();
520 
521  for (auto& sd : m_tls->sensCaloDets) {
522  sd->reset();
523  }
524 
525  m_simEvent = nullptr;
526  return simEvent;
527 }

References G4SimEvent::collisionPoint(), RunManagerMTWorker::TLSData::currentEvent, RunManagerMTWorker::TLSData::currentRunNumber, edm::EventID::event(), Generator::eventWeight(), generateEvent(), Generator::genEvent(), Generator::genVertex(), G4SimEvent::hepEvent(), edm::EventBase::id(), initializeRun(), initializeThread(), RunManagerMTWorker::TLSData::kernel, LogDebug, m_generator, m_simEvent, m_tls, G4SimEvent::nGenParts(), G4SimEvent::nTracks(), G4SimEvent::nVertices(), edm::EventID::run(), RunManagerMTWorker::TLSData::runInterface, RunManagerMTWorker::TLSData::runTerminated, sd, edm::second(), RunManagerMTWorker::TLSData::sensCaloDets, simEvent(), contentValuesCheck::ss, edm::Event::streamID(), terminateRun(), RunManagerMTWorker::TLSData::threadInitialized, and G4SimEvent::weight().

◆ producers()

std::vector< std::shared_ptr< SimProducer > > & RunManagerMTWorker::producers ( )

Definition at line 420 of file RunManagerMTWorker.cc.

420  {
421  initializeTLS();
422  return m_tls->producers;
423 }

References initializeTLS(), m_tls, and RunManagerMTWorker::TLSData::producers.

◆ resetGenParticleId()

void RunManagerMTWorker::resetGenParticleId ( const edm::Event inpevt)
private

Definition at line 582 of file RunManagerMTWorker.cc.

582  {
584  inpevt.getByToken(m_theLHCTlinkToken, theLHCTlink);
585  if (theLHCTlink.isValid()) {
586  m_tls->trackManager->setLHCTransportLink(theLHCTlink.product());
587  }
588 }

References edm::Event::getByToken(), edm::HandleBase::isValid(), m_theLHCTlinkToken, m_tls, edm::Handle< T >::product(), and RunManagerMTWorker::TLSData::trackManager.

Referenced by generateEvent().

◆ resetTLS()

void RunManagerMTWorker::resetTLS ( )
staticprivate

Definition at line 188 of file RunManagerMTWorker.cc.

188  {
189  //delete m_tls;
190  m_tls = nullptr;
191 
192  if (active_tlsdata != 0 and not tls_shutdown_timeout) {
193  ++n_tls_shutdown_task;
194  //need to run tasks on each thread which has set the tls
195  auto task = edm::make_functor_task(tbb::task::allocate_root(), []() { resetTLS(); });
196  tbb::task::enqueue(*task);
197  timespec s;
198  s.tv_sec = 0;
199  s.tv_nsec = 10000;
200  //we do not want this thread to be used for a new task since it
201  // has already cleared its structures. In order to fill all TBB
202  // threads we wait for all TLSes to clear
203  int count = 0;
204  while (active_tlsdata.load() != 0 and ++count < 1000) {
205  nanosleep(&s, nullptr);
206  }
207  if (count >= 1000) {
208  tls_shutdown_timeout = true;
209  }
210  }
211  --n_tls_shutdown_task;
212 }

References KineDebug3::count(), m_tls, edm::make_functor_task(), alignCSCRings::s, and TrackValidation_cff::task.

Referenced by ~RunManagerMTWorker().

◆ sensCaloDetectors()

std::vector< SensitiveCaloDetector * > & RunManagerMTWorker::sensCaloDetectors ( )

Definition at line 416 of file RunManagerMTWorker.cc.

416  {
417  initializeTLS();
418  return m_tls->sensCaloDets;
419 }

References initializeTLS(), m_tls, and RunManagerMTWorker::TLSData::sensCaloDets.

◆ sensTkDetectors()

std::vector< SensitiveTkDetector * > & RunManagerMTWorker::sensTkDetectors ( )

Definition at line 412 of file RunManagerMTWorker.cc.

412  {
413  initializeTLS();
414  return m_tls->sensTkDets;
415 }

References initializeTLS(), m_tls, and RunManagerMTWorker::TLSData::sensTkDets.

◆ simEvent()

G4SimEvent* RunManagerMTWorker::simEvent ( )
inline

Definition at line 55 of file RunManagerMTWorker.h.

55 { return m_simEvent; }

References m_simEvent.

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

◆ terminateRun()

void RunManagerMTWorker::terminateRun ( )
private

Definition at line 433 of file RunManagerMTWorker.cc.

433  {
434  if (!m_tls || m_tls->runTerminated) {
435  return;
436  }
437  if (m_tls->userRunAction) {
438  m_tls->userRunAction->EndOfRunAction(m_tls->currentRun);
439  m_tls->userRunAction.reset();
440  }
441  m_tls->currentEvent.reset();
442  m_simEvent = nullptr;
443 
444  if (m_tls->kernel) {
445  m_tls->kernel->RunTermination();
446  }
447 
448  m_tls->runTerminated = true;
449 }

References RunManagerMTWorker::TLSData::currentEvent, RunManagerMTWorker::TLSData::currentRun, RunManagerMTWorker::TLSData::kernel, m_simEvent, m_tls, RunManagerMTWorker::TLSData::runTerminated, and RunManagerMTWorker::TLSData::userRunAction.

Referenced by abortRun(), endRun(), produce(), and ~RunManagerMTWorker().

Member Data Documentation

◆ dumpMF

thread_local bool RunManagerMTWorker::dumpMF = false
staticprivate

Definition at line 102 of file RunManagerMTWorker.h.

Referenced by initializeThread().

◆ m_EvtMgrVerbosity

int RunManagerMTWorker::m_EvtMgrVerbosity
private

Definition at line 89 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_generator

Generator RunManagerMTWorker::m_generator
private

Definition at line 82 of file RunManagerMTWorker.h.

Referenced by generateEvent(), and produce().

◆ m_hasWatchers

bool RunManagerMTWorker::m_hasWatchers
private

Definition at line 88 of file RunManagerMTWorker.h.

Referenced by initializeTLS(), initializeUserActions(), and RunManagerMTWorker().

◆ m_InToken

edm::EDGetTokenT<edm::HepMCProduct> RunManagerMTWorker::m_InToken
private

Definition at line 83 of file RunManagerMTWorker.h.

Referenced by generateEvent().

◆ m_nonBeam

bool RunManagerMTWorker::m_nonBeam
private

Definition at line 86 of file RunManagerMTWorker.h.

Referenced by generateEvent().

◆ m_p

edm::ParameterSet RunManagerMTWorker::m_p
private

Definition at line 98 of file RunManagerMTWorker.h.

Referenced by initializeThread(), and initializeTLS().

◆ m_pCustomUIsession

edm::ParameterSet RunManagerMTWorker::m_pCustomUIsession
private

Definition at line 97 of file RunManagerMTWorker.h.

Referenced by initializeThread().

◆ m_pEventAction

edm::ParameterSet RunManagerMTWorker::m_pEventAction
private

Definition at line 93 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pField

edm::ParameterSet RunManagerMTWorker::m_pField
private

Definition at line 91 of file RunManagerMTWorker.h.

Referenced by initializeThread().

◆ m_pRunAction

edm::ParameterSet RunManagerMTWorker::m_pRunAction
private

Definition at line 92 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pStackingAction

edm::ParameterSet RunManagerMTWorker::m_pStackingAction
private

Definition at line 94 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pSteppingAction

edm::ParameterSet RunManagerMTWorker::m_pSteppingAction
private

Definition at line 96 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pTrackingAction

edm::ParameterSet RunManagerMTWorker::m_pTrackingAction
private

Definition at line 95 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pUseMagneticField

bool RunManagerMTWorker::m_pUseMagneticField
private

Definition at line 87 of file RunManagerMTWorker.h.

Referenced by initializeThread().

◆ m_simEvent

G4SimEvent* RunManagerMTWorker::m_simEvent
private

Definition at line 104 of file RunManagerMTWorker.h.

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

◆ m_sVerbose

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

Definition at line 105 of file RunManagerMTWorker.h.

Referenced by initializeThread(), and initializeUserActions().

◆ m_theLHCTlinkToken

edm::EDGetTokenT<edm::LHCTransportLinkContainer> RunManagerMTWorker::m_theLHCTlinkToken
private

Definition at line 84 of file RunManagerMTWorker.h.

Referenced by resetGenParticleId().

◆ m_tls

thread_local RunManagerMTWorker::TLSData * RunManagerMTWorker::m_tls {nullptr}
staticprivate
Generator::eventWeight
virtual const double eventWeight() const
Definition: Generator.h:32
G4SimEvent::hepEvent
void hepEvent(const HepMC::GenEvent *r)
Definition: G4SimEvent.h:23
RunManagerMTWorker::m_theLHCTlinkToken
edm::EDGetTokenT< edm::LHCTransportLinkContainer > m_theLHCTlinkToken
Definition: RunManagerMTWorker.h:84
RunManagerMTWorker::m_tls
static thread_local TLSData * m_tls
Definition: RunManagerMTWorker.h:100
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SimTrackManager
Definition: SimTrackManager.h:35
RunManagerMTWorker::TLSData::trackManager
std::unique_ptr< SimTrackManager > trackManager
Definition: RunManagerMTWorker.cc:119
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
RunManagerMTWorker::m_simEvent
G4SimEvent * m_simEvent
Definition: RunManagerMTWorker.h:104
CustomUIsessionThreadPrefix
Definition: CustomUIsessionThreadPrefix.h:13
edm::Handle::product
T const * product() const
Definition: Handle.h:70
RunManagerMTWorker::TLSData::producers
std::vector< std::shared_ptr< SimProducer > > producers
Definition: RunManagerMTWorker.cc:123
ExceptionHandler
Definition: ExceptionHandler.h:19
G4SimEvent::nVertices
unsigned int nVertices() const
Definition: G4SimEvent.h:21
EventAction::m_beginOfEventSignal
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:43
EventAction::m_endOfEventSignal
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:44
runTauDisplay.evtid
evtid
Definition: runTauDisplay.py:293
RunManagerMTWorker::TLSData::watchers
std::vector< std::shared_ptr< SimWatcher > > watchers
Definition: RunManagerMTWorker.cc:122
RunManagerMTWorker::resetTLS
static void resetTLS()
Definition: RunManagerMTWorker.cc:188
TrackingAction::PostUserTrackingAction
void PostUserTrackingAction(const G4Track *aTrack) override
Definition: TrackingAction.cc:43
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
CMSFieldManager
Definition: CMSFieldManager.h:24
RunManagerMTWorker::m_generator
Generator m_generator
Definition: RunManagerMTWorker.h:82
edm::make_functor_task
FunctorTask< F > * make_functor_task(ALLOC &&iAlloc, F f)
Definition: FunctorTask.h:47
RunManagerMTWorker::abortEvent
void abortEvent()
Definition: RunManagerMTWorker.cc:529
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
SteppingAction
Definition: SteppingAction.h:30
RunManagerMTWorker::simEvent
G4SimEvent * simEvent()
Definition: RunManagerMTWorker.h:55
CMSSteppingVerbose
Definition: CMSSteppingVerbose.h:25
RunManagerMTWorker::m_pEventAction
edm::ParameterSet m_pEventAction
Definition: RunManagerMTWorker.h:93
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
RunManagerMTWorker::Connect
void Connect(RunAction *)
Definition: RunManagerMTWorker.cc:389
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
RunManagerMTWorker::m_EvtMgrVerbosity
int m_EvtMgrVerbosity
Definition: RunManagerMTWorker.h:89
CastorDigiValidation.StackingAction
StackingAction
Definition: CastorDigiValidation.py:136
mps_check.command
list command
Definition: mps_check.py:25
RunManagerMTWorker::m_pCustomUIsession
edm::ParameterSet m_pCustomUIsession
Definition: RunManagerMTWorker.h:97
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
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
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
RunManagerMTWorker::TLSData::sensCaloDets
std::vector< SensitiveCaloDetector * > sensCaloDets
Definition: RunManagerMTWorker.cc:121
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
RunManagerMT::catalog
const SensitiveDetectorCatalog & catalog() const
Definition: RunManagerMT.h:77
TrackingAction
Definition: TrackingAction.h:16
RunManagerMTWorker::m_p
edm::ParameterSet m_p
Definition: RunManagerMTWorker.h:98
RunManagerMTWorker::initializeThread
void initializeThread(RunManagerMT &runManagerMaster, const edm::EventSetup &es)
Definition: RunManagerMTWorker.cc:241
alignCSCRings.s
s
Definition: alignCSCRings.py:92
RunManagerMTWorker::initializeUserActions
void initializeUserActions()
Definition: RunManagerMTWorker.cc:363
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
RunManagerMTWorker::m_hasWatchers
bool m_hasWatchers
Definition: RunManagerMTWorker.h:88
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
RunManagerMTWorker::TLSData::currentRun
G4Run * currentRun
Definition: RunManagerMTWorker.cc:127
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
g4SimHits_cfi.CustomUIsession
CustomUIsession
Definition: g4SimHits_cfi.py:84
RunManagerMTWorker::TLSData::currentEvent
std::unique_ptr< G4Event > currentEvent
Definition: RunManagerMTWorker.cc:128
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:226
DDAxes::z
RunManagerMT::world
const DDDWorld & world() const
Definition: RunManagerMT.h:75
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
CustomUIsessionToFile
Definition: CustomUIsessionToFile.h:19
RunManagerMTWorker::DumpMagneticField
void DumpMagneticField(const G4Field *, const std::string &) const
Definition: RunManagerMTWorker.cc:590
G4SimEvent::nGenParts
unsigned int nGenParts() const
Definition: G4SimEvent.h:22
BeginOfJob
Definition: BeginOfJob.h:8
RunManagerMTWorker::m_pStackingAction
edm::ParameterSet m_pStackingAction
Definition: RunManagerMTWorker.h:94
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
Point3DBase< float, GlobalTag >
OrderedSet.t
t
Definition: OrderedSet.py:90
edm::EventID::run
RunNumber_t run() const
Definition: EventID.h:38
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
RunManagerMTWorker::initializeRun
void initializeRun()
Definition: RunManagerMTWorker.cc:425
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
RunManagerMTWorker::generateEvent
G4Event * generateEvent(const edm::Event &inpevt)
Definition: RunManagerMTWorker.cc:554
RunManagerMTWorker::m_pSteppingAction
edm::ParameterSet m_pSteppingAction
Definition: RunManagerMTWorker.h:96
RunManagerMTWorker::terminateRun
void terminateRun()
Definition: RunManagerMTWorker.cc:433
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
RunManagerMTWorker::TLSData::kernel
std::unique_ptr< G4RunManagerKernel > kernel
Definition: RunManagerMTWorker.cc:115
edm::ParameterSet
Definition: ParameterSet.h:36
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
RunManagerMTWorker::m_pField
edm::ParameterSet m_pField
Definition: RunManagerMTWorker.h:91
DDDWorld::GetWorldVolume
G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:24
RunManagerMTWorker::TLSData::runTerminated
bool runTerminated
Definition: RunManagerMTWorker.cc:131
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
GeV
const double GeV
Definition: MathUtil.h:16
groupFilesInBlocks.fout
fout
Definition: groupFilesInBlocks.py:162
RunManagerMTWorker::TLSData::runInterface
std::unique_ptr< SimRunInterface > runInterface
Definition: RunManagerMTWorker.cc:117
edm::EventID::event
EventNumber_t event() const
Definition: EventID.h:40
edm::Service
Definition: Service.h:30
createfilelist.int
int
Definition: createfilelist.py:10
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
RunManagerMT::G4Commands
const std::vector< std::string > & G4Commands() const
Definition: RunManagerMT.h:79
RunManagerMTWorker::m_nonBeam
bool m_nonBeam
Definition: RunManagerMTWorker.h:86
edm::LogVerbatim
Definition: MessageLogger.h:297
RunManagerMTWorker::TLSData::threadInitialized
bool threadInitialized
Definition: RunManagerMTWorker.cc:130
RunManagerMTWorker::m_sVerbose
std::unique_ptr< CMSSteppingVerbose > m_sVerbose
Definition: RunManagerMTWorker.h:105
CastorDigiValidation.SteppingAction
SteppingAction
Definition: CastorDigiValidation.py:147
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
get
#define get
RunManagerMTWorker::resetGenParticleId
void resetGenParticleId(const edm::Event &inpevt)
Definition: RunManagerMTWorker.cc:582
G4SimEvent::collisionPoint
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: G4SimEvent.h:27
TrackingAction::m_beginOfTrackSignal
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal
Definition: TrackingAction.h:28
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RunAction::m_endOfRunSignal
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:24
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edm::Event::streamID
StreamID streamID() const
Definition: Event.h:97
SteppingAction::m_g4StepSignal
SimActivityRegistry::G4StepSignal m_g4StepSignal
Definition: SteppingAction.h:37
SimActivityRegistry
Definition: SimActivityRegistry.h:43
RunManagerMT::physicsListForWorker
PhysicsList * physicsListForWorker() const
Definition: RunManagerMT.h:84
PVValHelper::dz
Definition: PVValidationHelpers.h:50
RunManagerMTWorker::m_InToken
edm::EDGetTokenT< edm::HepMCProduct > m_InToken
Definition: RunManagerMTWorker.h:83
RunManagerMTWorker::TLSData::registry
std::unique_ptr< SimActivityRegistry > registry
Definition: RunManagerMTWorker.cc:118
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
Exception
Definition: hltDiff.cc:246
applyOnce
static std::once_flag applyOnce
Definition: RunManagerMTWorker.cc:69
edm::EventBase::id
edm::EventID id() const
Definition: EventBase.h:59
G4SimEvent::weight
void weight(float w)
Definition: G4SimEvent.h:25
sd
double sd
Definition: CascadeWrapper.h:113
Generator::HepMC2G4
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:101
RunManagerMTWorker::TLSData::userRunAction
std::unique_ptr< RunAction > userRunAction
Definition: RunManagerMTWorker.cc:116
AttachSD
Definition: AttachSD.h:17
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
RunManagerMTWorker::TLSData::sensTkDets
std::vector< SensitiveTkDetector * > sensTkDets
Definition: RunManagerMTWorker.cc:120
RunManagerMTWorker::initializeTLS
void initializeTLS()
Definition: RunManagerMTWorker.cc:216
edm::HepMCProduct
Definition: HepMCProduct.h:18
RunManagerMTWorker::m_pTrackingAction
edm::ParameterSet m_pTrackingAction
Definition: RunManagerMTWorker.h:95
Generator::genEvent
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:30
RunManagerMTWorker::dumpMF
static thread_local bool dumpMF
Definition: RunManagerMTWorker.h:102
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
ecalTB2006H4_GenSimDigiReco_cfg.G4cout
G4cout
Definition: ecalTB2006H4_GenSimDigiReco_cfg.py:303
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
edm::errors::Configuration
Definition: EDMException.h:36
RunManagerMTWorker::m_pUseMagneticField
bool m_pUseMagneticField
Definition: RunManagerMTWorker.h:87
edm::InputTag
Definition: InputTag.h:15
RunManagerMTWorker::TLSData::currentRunNumber
edm::RunNumber_t currentRunNumber
Definition: RunManagerMTWorker.cc:129
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
RunManagerMTWorker::m_pRunAction
edm::ParameterSet m_pRunAction
Definition: RunManagerMTWorker.h:92
sim::FieldBuilder
Definition: FieldBuilder.h:15
SimRunInterface
Definition: SimRunInterface.h:18