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 ()
 
void initializeG4 (RunManagerMT *runManagerMaster, const edm::EventSetup &es)
 
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 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
 
edm::EDGetTokenT< edm::HepMCProductm_LHCToken
 
bool m_LHCTransport
 
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 147 of file RunManagerMTWorker.cc.

148  : m_generator(iConfig.getParameter<edm::ParameterSet>("Generator")),
149  m_InToken(iC.consumes<edm::HepMCProduct>(
150  iConfig.getParameter<edm::ParameterSet>("Generator").getParameter<edm::InputTag>("HepMCProductLabel"))),
152  iC.consumes<edm::LHCTransportLinkContainer>(iConfig.getParameter<edm::InputTag>("theLHCTlinkTag"))),
153  m_nonBeam(iConfig.getParameter<bool>("NonBeamEvent")),
154  m_pUseMagneticField(iConfig.getParameter<bool>("UseMagneticField")),
155  m_LHCTransport(iConfig.getParameter<bool>("LHCTransport")),
156  m_EvtMgrVerbosity(iConfig.getUntrackedParameter<int>("G4EventManagerVerbosity", 0)),
157  m_pField(iConfig.getParameter<edm::ParameterSet>("MagneticField")),
158  m_pRunAction(iConfig.getParameter<edm::ParameterSet>("RunAction")),
159  m_pEventAction(iConfig.getParameter<edm::ParameterSet>("EventAction")),
160  m_pStackingAction(iConfig.getParameter<edm::ParameterSet>("StackingAction")),
161  m_pTrackingAction(iConfig.getParameter<edm::ParameterSet>("TrackingAction")),
162  m_pSteppingAction(iConfig.getParameter<edm::ParameterSet>("SteppingAction")),
163  m_pCustomUIsession(iConfig.getUntrackedParameter<edm::ParameterSet>("CustomUIsession")),
164  m_p(iConfig),
165  m_simEvent(nullptr),
166  m_sVerbose(nullptr) {
167  std::vector<edm::ParameterSet> watchers = iConfig.getParameter<std::vector<edm::ParameterSet> >("Watchers");
168  m_hasWatchers = !watchers.empty();
169  initializeTLS();
170  int thisID = getThreadIndex();
171  if (m_LHCTransport) {
172  m_LHCToken = iC.consumes<edm::HepMCProduct>(edm::InputTag("LHCTransport"));
173  }
174  edm::LogVerbatim("SimG4CoreApplication") << "RunManagerMTWorker is constructed for the thread " << thisID;
175 }

References edm::ParameterSet::getParameter(), initializeTLS(), HLT_FULL_cff::InputTag, m_hasWatchers, m_LHCToken, and m_LHCTransport.

◆ ~RunManagerMTWorker()

RunManagerMTWorker::~RunManagerMTWorker ( )

Definition at line 177 of file RunManagerMTWorker.cc.

177  {
178  ++n_tls_shutdown_task;
179  resetTLS();
180 
181  {
182  //make sure all tasks are done before continuing
183  timespec s;
184  s.tv_sec = 0;
185  s.tv_nsec = 10000;
186  while (n_tls_shutdown_task != 0) {
187  nanosleep(&s, nullptr);
188  }
189  }
190 }

References resetTLS(), and alignCSCRings::s.

Member Function Documentation

◆ abortEvent()

void RunManagerMTWorker::abortEvent ( )

Definition at line 543 of file RunManagerMTWorker.cc.

543  {
544  if (m_tls->runTerminated) {
545  return;
546  }
547  G4Track* t = m_tls->kernel->GetEventManager()->GetTrackingManager()->GetTrack();
548  t->SetTrackStatus(fStopAndKill);
549 
550  // CMS-specific act
551  //
552  TrackingAction* uta = static_cast<TrackingAction*>(m_tls->kernel->GetEventManager()->GetUserTrackingAction());
554 
555  m_tls->currentEvent->SetEventAborted();
556  m_tls->kernel->GetEventManager()->GetStackManager()->clear();
557  m_tls->kernel->GetEventManager()->GetTrackingManager()->EventAborted();
558 }

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

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

◆ abortRun()

void RunManagerMTWorker::abortRun ( bool  softAbort = false)

Definition at line 560 of file RunManagerMTWorker.cc.

560  {
561  if (!softAbort) {
562  abortEvent();
563  }
564  m_tls->currentRun = nullptr;
565  terminateRun();
566 }

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

Referenced by SimRunInterface::abortRun().

◆ Connect() [1/4]

void RunManagerMTWorker::Connect ( EventAction eventAction)

Definition at line 403 of file RunManagerMTWorker.cc.

403  {
404  eventAction->m_beginOfEventSignal.connect(m_tls->registry->beginOfEventSignal_);
405  eventAction->m_endOfEventSignal.connect(m_tls->registry->endOfEventSignal_);
406 }

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 413 of file RunManagerMTWorker.cc.

413  {
414  steppingAction->m_g4StepSignal.connect(m_tls->registry->g4StepSignal_);
415 }

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 408 of file RunManagerMTWorker.cc.

408  {
409  trackingAction->m_beginOfTrackSignal.connect(m_tls->registry->beginOfTrackSignal_);
410  trackingAction->m_endOfTrackSignal.connect(m_tls->registry->endOfTrackSignal_);
411 }

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 608 of file RunManagerMTWorker.cc.

608  {
609  std::ofstream fout(file.c_str(), std::ios::out);
610  if (fout.fail()) {
611  edm::LogWarning("SimG4CoreApplication")
612  << " RunManager WARNING : error opening file <" << file << "> for magnetic field";
613  } else {
614  // CMS magnetic field volume
615  double rmax = 9000 * mm;
616  double zmax = 24000 * mm;
617 
618  double dr = 1 * cm;
619  double dz = 5 * cm;
620 
621  int nr = (int)(rmax / dr);
622  int nz = 2 * (int)(zmax / dz);
623 
624  double r = 0.0;
625  double z0 = -zmax;
626  double z;
627 
628  double phi = 0.0;
629  double cosf = cos(phi);
630  double sinf = sin(phi);
631 
632  double point[4] = {0.0, 0.0, 0.0, 0.0};
633  double bfield[3] = {0.0, 0.0, 0.0};
634 
635  fout << std::setprecision(6);
636  for (int i = 0; i <= nr; ++i) {
637  z = z0;
638  for (int j = 0; j <= nz; ++j) {
639  point[0] = r * cosf;
640  point[1] = r * sinf;
641  point[2] = z;
642  field->GetFieldValue(point, bfield);
643  fout << "R(mm)= " << r / mm << " phi(deg)= " << phi / degree << " Z(mm)= " << z / mm
644  << " Bz(tesla)= " << bfield[2] / tesla << " Br(tesla)= " << (bfield[0] * cosf + bfield[1] * sinf) / tesla
645  << " Bphi(tesla)= " << (bfield[0] * sinf - bfield[1] * cosf) / tesla << G4endl;
646  z += dz;
647  }
648  r += dr;
649  }
650 
651  fout.close();
652  }
653 }

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

◆ endRun()

void RunManagerMTWorker::endRun ( )

Definition at line 217 of file RunManagerMTWorker.cc.

217  {
218  int thisID = getThreadIndex();
219  edm::LogVerbatim("SimG4CoreApplication") << "RunManagerMTWorker::endRun for the thread " << thisID;
220  terminateRun();
221 }

References terminateRun().

◆ generateEvent()

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

Definition at line 568 of file RunManagerMTWorker.cc.

568  {
569  m_tls->currentEvent.reset();
570  m_simEvent = nullptr;
571 
572  // 64 bits event ID in CMSSW converted into Geant4 event ID
573  G4int evtid = (G4int)inpevt.id().event();
574  G4Event* evt = new G4Event(evtid);
575 
577  inpevt.getByToken(m_InToken, HepMCEvt);
578 
579  m_generator.setGenEvent(HepMCEvt->GetEvent());
580 
581  // required to reset the GenParticle Id for particles transported
582  // along the beam pipe
583  // to their original value for SimTrack creation
584  resetGenParticleId(inpevt);
585 
586  if (!m_nonBeam) {
587  m_generator.HepMC2G4(HepMCEvt->GetEvent(), evt);
588  if (m_LHCTransport) {
590  inpevt.getByToken(m_LHCToken, LHCMCEvt);
591  m_generator.nonCentralEvent2G4(LHCMCEvt->GetEvent(), evt);
592  }
593  } else {
594  m_generator.nonCentralEvent2G4(HepMCEvt->GetEvent(), evt);
595  }
596 
597  return evt;
598 }

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_LHCToken, m_LHCTransport, m_nonBeam, m_simEvent, m_tls, Generator::nonCentralEvent2G4(), resetGenParticleId(), and Generator::setGenEvent().

Referenced by produce().

◆ GetSimTrackManager()

SimTrackManager * RunManagerMTWorker::GetSimTrackManager ( )

Definition at line 417 of file RunManagerMTWorker.cc.

417  {
418  initializeTLS();
419  return m_tls->trackManager.get();
420 }

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

Referenced by SimRunInterface::SimRunInterface().

◆ initializeG4()

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

Definition at line 248 of file RunManagerMTWorker.cc.

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

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::threadInitialized, RunManagerMTWorker::TLSData::trackManager, and RunManagerMT::world().

Referenced by produce().

◆ initializeRun()

void RunManagerMTWorker::initializeRun ( )
private

Definition at line 434 of file RunManagerMTWorker.cc.

434  {
435  int thisID = getThreadIndex();
436  edm::LogVerbatim("SimG4CoreApplication") << "RunManagerMTWorker::initializeRun " << thisID << " is started";
437  m_tls->currentRun = new G4Run();
438  G4StateManager::GetStateManager()->SetNewState(G4State_GeomClosed);
439  if (m_tls->userRunAction) {
440  m_tls->userRunAction->BeginOfRunAction(m_tls->currentRun);
441  }
442 }

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

Referenced by produce().

◆ initializeTLS()

void RunManagerMTWorker::initializeTLS ( )
private

Definition at line 223 of file RunManagerMTWorker.cc.

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

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(), initializeG4(), producers(), RunManagerMTWorker(), sensCaloDetectors(), and sensTkDetectors().

◆ initializeUserActions()

void RunManagerMTWorker::initializeUserActions ( )
private

Definition at line 372 of file RunManagerMTWorker.cc.

372  {
373  m_tls->runInterface = std::make_unique<SimRunInterface>(this, false);
374  m_tls->userRunAction = std::make_unique<RunAction>(m_pRunAction, m_tls->runInterface.get(), false);
375  m_tls->userRunAction->SetMaster(false);
376  Connect(m_tls->userRunAction.get());
377 
378  G4EventManager* eventManager = m_tls->kernel->GetEventManager();
379  eventManager->SetVerboseLevel(m_EvtMgrVerbosity);
380 
381  EventAction* userEventAction =
383  Connect(userEventAction);
384  eventManager->SetUserAction(userEventAction);
385 
386  TrackingAction* userTrackingAction = new TrackingAction(userEventAction, m_pTrackingAction, m_sVerbose.get());
387  Connect(userTrackingAction);
388  eventManager->SetUserAction(userTrackingAction);
389 
390  SteppingAction* userSteppingAction =
391  new SteppingAction(userEventAction, m_pSteppingAction, m_sVerbose.get(), m_hasWatchers);
392  Connect(userSteppingAction);
393  eventManager->SetUserAction(userSteppingAction);
394 
395  eventManager->SetUserAction(new StackingAction(userTrackingAction, m_pStackingAction, m_sVerbose.get()));
396 }

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, RunManagerMTWorker::TLSData::runInterface, CastorDigiValidation::StackingAction, CastorDigiValidation::SteppingAction, g4SimHits_cfi::TrackingAction, RunManagerMTWorker::TLSData::trackManager, and RunManagerMTWorker::TLSData::userRunAction.

Referenced by initializeG4().

◆ produce()

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

Definition at line 465 of file RunManagerMTWorker.cc.

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

References G4SimEvent::collisionPoint(), RunManagerMTWorker::TLSData::currentEvent, RunManagerMTWorker::TLSData::currentRunNumber, edm::EventID::event(), Generator::eventWeight(), generateEvent(), Generator::genEvent(), Generator::genVertex(), G4SimEvent::hepEvent(), edm::EventBase::id(), initializeG4(), initializeRun(), RunManagerMTWorker::TLSData::kernel, m_generator, m_simEvent, m_tls, G4SimEvent::nGenParts(), 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 429 of file RunManagerMTWorker.cc.

429  {
430  initializeTLS();
431  return m_tls->producers;
432 }

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

◆ resetGenParticleId()

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

Definition at line 600 of file RunManagerMTWorker.cc.

600  {
602  inpevt.getByToken(m_theLHCTlinkToken, theLHCTlink);
603  if (theLHCTlink.isValid()) {
604  m_tls->trackManager->setLHCTransportLink(theLHCTlink.product());
605  }
606 }

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 192 of file RunManagerMTWorker.cc.

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

References submitPVResolutionJobs::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 425 of file RunManagerMTWorker.cc.

425  {
426  initializeTLS();
427  return m_tls->sensCaloDets;
428 }

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

◆ sensTkDetectors()

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

Definition at line 421 of file RunManagerMTWorker.cc.

421  {
422  initializeTLS();
423  return m_tls->sensTkDets;
424 }

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 444 of file RunManagerMTWorker.cc.

444  {
445  edm::LogVerbatim("SimG4CoreApplication") << "RunManagerMTWorker::terminateRun ";
446  if (!m_tls || m_tls->runTerminated) {
447  return;
448  }
449  int thisID = getThreadIndex();
450  edm::LogVerbatim("SimG4CoreApplication") << "RunManagerMTWorker::terminateRun " << thisID << " is started";
451  if (m_tls->userRunAction) {
452  m_tls->userRunAction->EndOfRunAction(m_tls->currentRun);
453  m_tls->userRunAction.reset();
454  }
455  m_tls->currentEvent.reset();
456  m_simEvent = nullptr;
457 
458  if (m_tls->kernel) {
459  m_tls->kernel->RunTermination();
460  }
461 
462  m_tls->runTerminated = true;
463 }

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

Member Data Documentation

◆ dumpMF

thread_local bool RunManagerMTWorker::dumpMF = false
staticprivate

Definition at line 105 of file RunManagerMTWorker.h.

Referenced by initializeG4().

◆ m_EvtMgrVerbosity

int RunManagerMTWorker::m_EvtMgrVerbosity
private

Definition at line 92 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_generator

Generator RunManagerMTWorker::m_generator
private

Definition at line 83 of file RunManagerMTWorker.h.

Referenced by generateEvent(), and produce().

◆ m_hasWatchers

bool RunManagerMTWorker::m_hasWatchers
private

Definition at line 90 of file RunManagerMTWorker.h.

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

◆ m_InToken

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

Definition at line 84 of file RunManagerMTWorker.h.

Referenced by generateEvent().

◆ m_LHCToken

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

Definition at line 85 of file RunManagerMTWorker.h.

Referenced by generateEvent(), and RunManagerMTWorker().

◆ m_LHCTransport

bool RunManagerMTWorker::m_LHCTransport
private

Definition at line 91 of file RunManagerMTWorker.h.

Referenced by generateEvent(), and RunManagerMTWorker().

◆ m_nonBeam

bool RunManagerMTWorker::m_nonBeam
private

Definition at line 88 of file RunManagerMTWorker.h.

Referenced by generateEvent().

◆ m_p

edm::ParameterSet RunManagerMTWorker::m_p
private

Definition at line 101 of file RunManagerMTWorker.h.

Referenced by initializeG4(), and initializeTLS().

◆ m_pCustomUIsession

edm::ParameterSet RunManagerMTWorker::m_pCustomUIsession
private

Definition at line 100 of file RunManagerMTWorker.h.

Referenced by initializeG4().

◆ m_pEventAction

edm::ParameterSet RunManagerMTWorker::m_pEventAction
private

Definition at line 96 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pField

edm::ParameterSet RunManagerMTWorker::m_pField
private

Definition at line 94 of file RunManagerMTWorker.h.

Referenced by initializeG4().

◆ m_pRunAction

edm::ParameterSet RunManagerMTWorker::m_pRunAction
private

Definition at line 95 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pStackingAction

edm::ParameterSet RunManagerMTWorker::m_pStackingAction
private

Definition at line 97 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pSteppingAction

edm::ParameterSet RunManagerMTWorker::m_pSteppingAction
private

Definition at line 99 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pTrackingAction

edm::ParameterSet RunManagerMTWorker::m_pTrackingAction
private

Definition at line 98 of file RunManagerMTWorker.h.

Referenced by initializeUserActions().

◆ m_pUseMagneticField

bool RunManagerMTWorker::m_pUseMagneticField
private

Definition at line 89 of file RunManagerMTWorker.h.

Referenced by initializeG4().

◆ m_simEvent

G4SimEvent* RunManagerMTWorker::m_simEvent
private

Definition at line 107 of file RunManagerMTWorker.h.

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

◆ m_sVerbose

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

Definition at line 108 of file RunManagerMTWorker.h.

Referenced by initializeG4(), and initializeUserActions().

◆ m_theLHCTlinkToken

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

Definition at line 86 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:86
RunManagerMTWorker::m_tls
static thread_local TLSData * m_tls
Definition: RunManagerMTWorker.h:103
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
RunManagerMTWorker::initializeG4
void initializeG4(RunManagerMT *runManagerMaster, const edm::EventSetup &es)
Definition: RunManagerMTWorker.cc:248
RunManagerMTWorker::TLSData::trackManager
std::unique_ptr< SimTrackManager > trackManager
Definition: RunManagerMTWorker.cc:121
mps_fire.i
i
Definition: mps_fire.py:428
edm::LHCTransportLinkContainer
std::vector< LHCTransportLink > LHCTransportLinkContainer
Definition: LHCTransportLinkContainer.h:8
EventAction
Definition: EventAction.h:23
RunManagerMTWorker::m_simEvent
G4SimEvent * m_simEvent
Definition: RunManagerMTWorker.h:107
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:125
ExceptionHandler
Definition: ExceptionHandler.h:19
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:124
RunManagerMTWorker::resetTLS
static void resetTLS()
Definition: RunManagerMTWorker.cc:192
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
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
CMSFieldManager
Definition: CMSFieldManager.h:24
Generator::nonCentralEvent2G4
void nonCentralEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:542
RunManagerMTWorker::m_generator
Generator m_generator
Definition: RunManagerMTWorker.h:83
edm::make_functor_task
FunctorTask< F > * make_functor_task(ALLOC &&iAlloc, F f)
Definition: FunctorTask.h:47
RunManagerMTWorker::abortEvent
void abortEvent()
Definition: RunManagerMTWorker.cc:543
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
RunManagerMTWorker::m_LHCTransport
bool m_LHCTransport
Definition: RunManagerMTWorker.h:91
SteppingAction
Definition: SteppingAction.h:31
RunManagerMTWorker::simEvent
G4SimEvent * simEvent()
Definition: RunManagerMTWorker.h:55
RunManagerMTWorker::m_pEventAction
edm::ParameterSet m_pEventAction
Definition: RunManagerMTWorker.h:96
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
RunManagerMTWorker::Connect
void Connect(RunAction *)
Definition: RunManagerMTWorker.cc:398
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:92
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:100
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
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
RunManagerMTWorker::TLSData::sensCaloDets
std::vector< SensitiveCaloDetector * > sensCaloDets
Definition: RunManagerMTWorker.cc:123
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:101
alignCSCRings.s
s
Definition: alignCSCRings.py:92
RunManagerMTWorker::initializeUserActions
void initializeUserActions()
Definition: RunManagerMTWorker.cc:372
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
RunManagerMTWorker::m_hasWatchers
bool m_hasWatchers
Definition: RunManagerMTWorker.h:90
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
RunManagerMTWorker::TLSData::currentRun
G4Run * currentRun
Definition: RunManagerMTWorker.cc:129
SiStripMonitorCluster_cfi.zmax
zmax
Definition: SiStripMonitorCluster_cfi.py:201
g4SimHits_cfi.CustomUIsession
CustomUIsession
Definition: g4SimHits_cfi.py:87
RunManagerMTWorker::TLSData::currentEvent
std::unique_ptr< G4Event > currentEvent
Definition: RunManagerMTWorker.cc:130
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
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
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
RunManagerMTWorker::DumpMagneticField
void DumpMagneticField(const G4Field *, const std::string &) const
Definition: RunManagerMTWorker.cc:608
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:97
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
Point3DBase< float, GlobalTag >
edm::EventID::run
RunNumber_t run() const
Definition: EventID.h:38
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
RunManagerMTWorker::initializeRun
void initializeRun()
Definition: RunManagerMTWorker.cc:434
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
RunManagerMTWorker::m_LHCToken
edm::EDGetTokenT< edm::HepMCProduct > m_LHCToken
Definition: RunManagerMTWorker.h:85
RunManagerMTWorker::generateEvent
G4Event * generateEvent(const edm::Event &inpevt)
Definition: RunManagerMTWorker.cc:568
RunManagerMTWorker::m_pSteppingAction
edm::ParameterSet m_pSteppingAction
Definition: RunManagerMTWorker.h:99
RunManagerMTWorker::terminateRun
void terminateRun()
Definition: RunManagerMTWorker.cc:444
RunManagerMTWorker::TLSData::kernel
std::unique_ptr< G4RunManagerKernel > kernel
Definition: RunManagerMTWorker.cc:117
edm::ParameterSet
Definition: ParameterSet.h:47
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
RunManagerMTWorker::m_pField
edm::ParameterSet m_pField
Definition: RunManagerMTWorker.h:94
DDDWorld::GetWorldVolume
G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:24
RunManagerMTWorker::TLSData::runTerminated
bool runTerminated
Definition: RunManagerMTWorker.cc:133
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:119
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:88
RunManagerMTWorker::TLSData::threadInitialized
bool threadInitialized
Definition: RunManagerMTWorker.cc:132
RunManagerMTWorker::m_sVerbose
std::unique_ptr< CMSSteppingVerbose > m_sVerbose
Definition: RunManagerMTWorker.h:108
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:600
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::Event::streamID
StreamID streamID() const
Definition: Event.h:98
SteppingAction::m_g4StepSignal
SimActivityRegistry::G4StepSignal m_g4StepSignal
Definition: SteppingAction.h:38
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:84
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
RunManagerMTWorker::TLSData::registry
std::unique_ptr< SimActivityRegistry > registry
Definition: RunManagerMTWorker.cc:120
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
Exception
Definition: hltDiff.cc:246
applyOnce
static std::once_flag applyOnce
Definition: RunManagerMTWorker.cc:71
edm::EventBase::id
edm::EventID id() const
Definition: EventBase.h:59
G4SimEvent::weight
void weight(float w)
Definition: G4SimEvent.h:25
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
sd
double sd
Definition: CascadeWrapper.h:113
Generator::HepMC2G4
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:112
RunManagerMTWorker::TLSData::userRunAction
std::unique_ptr< RunAction > userRunAction
Definition: RunManagerMTWorker.cc:118
AttachSD
Definition: AttachSD.h:17
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
RunManagerMTWorker::TLSData::sensTkDets
std::vector< SensitiveTkDetector * > sensTkDets
Definition: RunManagerMTWorker.cc:122
RunManagerMTWorker::initializeTLS
void initializeTLS()
Definition: RunManagerMTWorker.cc:223
edm::HepMCProduct
Definition: HepMCProduct.h:18
RunManagerMTWorker::m_pTrackingAction
edm::ParameterSet m_pTrackingAction
Definition: RunManagerMTWorker.h:98
Generator::genEvent
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:30
RunManagerMTWorker::dumpMF
static thread_local bool dumpMF
Definition: RunManagerMTWorker.h:105
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
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::errors::Configuration
Definition: EDMException.h:36
RunManagerMTWorker::m_pUseMagneticField
bool m_pUseMagneticField
Definition: RunManagerMTWorker.h:89
edm::InputTag
Definition: InputTag.h:15
RunManagerMTWorker::TLSData::currentRunNumber
edm::RunNumber_t currentRunNumber
Definition: RunManagerMTWorker.cc:131
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:95
sim::FieldBuilder
Definition: FieldBuilder.h:15