CMS 3D CMS Logo

RunManager.cc
Go to the documentation of this file.
18 
20 
28 
31 
37 
39 
48 
51 
54 
55 #include "HepPDT/ParticleDataTable.hh"
57 
58 #include "G4GeometryManager.hh"
59 #include "G4StateManager.hh"
60 #include "G4ApplicationState.hh"
61 #include "G4RunManagerKernel.hh"
62 #include "G4UImanager.hh"
63 
64 #include "G4EventManager.hh"
65 #include "G4Run.hh"
66 #include "G4Event.hh"
67 #include "G4TransportationManager.hh"
68 #include "G4ParticleTable.hh"
69 #include "G4Field.hh"
70 #include "G4FieldManager.hh"
71 
72 #include "G4GDMLParser.hh"
73 #include "G4SystemOfUnits.hh"
74 
75 #include <iostream>
76 #include <sstream>
77 #include <fstream>
78 #include <memory>
79 
81 
82 static
84  SimActivityRegistry& iReg,
85  std::vector<std::shared_ptr<SimWatcher> >& oWatchers,
86  std::vector<std::shared_ptr<SimProducer> >& oProds
87  )
88 {
89  using namespace std;
90  using namespace edm;
91 
92  vector<ParameterSet> watchers = iP.getParameter<vector<ParameterSet> >("Watchers");
93 
94  for(vector<ParameterSet>::iterator itWatcher = watchers.begin();
95  itWatcher != watchers.end();
96  ++itWatcher) {
97  std::shared_ptr<SimWatcherMakerBase> maker(
99  (itWatcher->getParameter<std::string> ("type")) );
100  if(maker.get()==nullptr) {
102  << "Unable to find the requested Watcher";
103  }
104 
105  std::shared_ptr<SimWatcher> watcherTemp;
106  std::shared_ptr<SimProducer> producerTemp;
107  maker->make(*itWatcher,iReg,watcherTemp,producerTemp);
108  oWatchers.push_back(watcherTemp);
109  if(producerTemp) {
110  oProds.push_back(producerTemp);
111  }
112  }
113 }
114 
116  : m_generator(new Generator(p.getParameter<edm::ParameterSet>("Generator"))),
117  m_HepMC(iC.consumes<edm::HepMCProduct>(p.getParameter<edm::ParameterSet>("Generator").getParameter<std::string>("HepMCProductLabel"))),
118  m_LHCtr(iC.consumes<edm::LHCTransportLinkContainer>(p.getParameter<edm::InputTag>("theLHCTlinkTag"))),
119  m_nonBeam(p.getParameter<bool>("NonBeamEvent")),
120  m_primaryTransformer(nullptr),
121  m_managerInitialized(false),
122  m_runInitialized(false), m_runTerminated(false), m_runAborted(false),
123  firstRun(true),
124  m_pUseMagneticField(p.getParameter<bool>("UseMagneticField")),
125  m_currentRun(0), m_currentEvent(0), m_simEvent(0),
126  m_PhysicsTablesDir(p.getParameter<std::string>("PhysicsTablesDirectory")),
127  m_StorePhysicsTables(p.getParameter<bool>("StorePhysicsTables")),
128  m_RestorePhysicsTables(p.getParameter<bool>("RestorePhysicsTables")),
129  m_EvtMgrVerbosity(p.getUntrackedParameter<int>("G4EventManagerVerbosity",0)),
130  m_pField(p.getParameter<edm::ParameterSet>("MagneticField")),
131  m_pGenerator(p.getParameter<edm::ParameterSet>("Generator")),
132  m_pPhysics(p.getParameter<edm::ParameterSet>("Physics")),
133  m_pRunAction(p.getParameter<edm::ParameterSet>("RunAction")),
134  m_pEventAction(p.getParameter<edm::ParameterSet>("EventAction")),
135  m_pStackingAction(p.getParameter<edm::ParameterSet>("StackingAction")),
136  m_pTrackingAction(p.getParameter<edm::ParameterSet>("TrackingAction")),
137  m_pSteppingAction(p.getParameter<edm::ParameterSet>("SteppingAction")),
138  m_g4overlap(p.getParameter<edm::ParameterSet>("G4CheckOverlap")),
139  m_G4Commands(p.getParameter<std::vector<std::string> >("G4Commands")),
140  m_p(p), m_chordFinderSetter(nullptr)
141 {
142  m_UIsession.reset(new CustomUIsession());
143  m_kernel = new G4RunManagerKernel();
144 
145  m_check = p.getUntrackedParameter<bool>("CheckOverlap",false);
146  m_WriteFile = p.getUntrackedParameter<std::string>("FileNameGDML","");
147  m_FieldFile = p.getUntrackedParameter<std::string>("FileNameField","");
148  m_RegionFile = p.getUntrackedParameter<std::string>("FileNameRegions","");
149 
150  m_userRunAction = nullptr;
151  m_runInterface = nullptr;
152 
153  //Look for an outside SimActivityRegistry
154  // this is used by the visualization code
155  edm::Service<SimActivityRegistry> otherRegistry;
156  if(otherRegistry){
157  m_registry.connect(*otherRegistry);
158  }
159  m_sVerbose.reset(nullptr);
160 
161  std::vector<edm::ParameterSet> watchers
162  = p.getParameter<std::vector<edm::ParameterSet> >("Watchers");
163  m_hasWatchers = (watchers.empty()) ? false : true;
164 
165  if(m_hasWatchers) {
167  }
168 }
169 
171 {
172  if (!m_runTerminated) { terminateRun(); }
173  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
174  G4GeometryManager::GetInstance()->OpenGeometry();
175  // if (m_kernel!=0) delete m_kernel;
176  delete m_runInterface;
177  delete m_generator;
178 }
179 
181 {
182  bool geomChanged = idealGeomRcdWatcher_.check(es);
183  if (geomChanged && (!firstRun)) {
184  throw cms::Exception("BadConfig")
185  << "[SimG4Core RunManager]\n"
186  << "The Geometry configuration is changed during the job execution\n"
187  << "this is not allowed, the geometry must stay unchanged\n";
188  }
189  if (m_pUseMagneticField) {
190  bool magChanged = idealMagRcdWatcher_.check(es);
191  if (magChanged && (!firstRun)) {
193  << "[SimG4Core RunManager]\n"
194  << "The MagneticField configuration is changed during the job execution\n"
195  << "this is not allowed, the MagneticField must stay unchanged\n";
196  }
197  }
198 
199  if (m_managerInitialized) return;
200 
201  // DDDWorld: get the DDCV from the ES and use it to build the World
203  es.get<IdealGeometryRecord>().get(pDD);
204 
206  SensitiveDetectorCatalog catalog_;
207  const DDDWorld * world = new DDDWorld(&(*pDD), map_, catalog_, false);
209 
211  {
212  // setup the magnetic field
214  es.get<IdealMagneticFieldRecord>().get(pMF);
215  const GlobalPoint g(0.,0.,0.);
216 
217  sim::FieldBuilder fieldBuilder(pMF.product(), m_pField);
218  CMSFieldManager* fieldManager = new CMSFieldManager();
219  G4TransportationManager * tM =
220  G4TransportationManager::GetTransportationManager();
221  tM->SetFieldManager(fieldManager);
222  fieldBuilder.build( fieldManager, tM->GetPropagatorInField());
223 
224  if("" != m_FieldFile) {
225  DumpMagneticField(tM->GetFieldManager()->GetDetectorField());
226  }
227  }
228 
229  // we need the track manager now
230  m_trackManager = std::unique_ptr<SimTrackManager>(new SimTrackManager);
231 
232  // attach sensitive detector
233  m_attach = new AttachSD;
234 
235  std::pair< std::vector<SensitiveTkDetector*>,
236  std::vector<SensitiveCaloDetector*> > sensDets =
237  m_attach->create(*world,(*pDD),catalog_,m_p,m_trackManager.get(),
238  m_registry);
239 
240  m_sensTkDets.swap(sensDets.first);
241  m_sensCaloDets.swap(sensDets.second);
242 
243  edm::LogInfo("SimG4CoreApplication")
244  << " RunManager: Sensitive Detector "
245  << "building finished; found "
246  << m_sensTkDets.size()
247  << " Tk type Producers, and "
248  << m_sensCaloDets.size()
249  << " Calo type producers ";
250 
252  es.get<PDTRecord>().get(fTable);
253  const HepPDT::ParticleDataTable *fPDGTable = &(*fTable);
254 
256 
257  std::unique_ptr<PhysicsListMakerBase>
258  physicsMaker(PhysicsListFactory::get()->create(
259  m_pPhysics.getParameter<std::string> ("type")));
260  if (physicsMaker.get()==nullptr) {
262  << "Unable to find the Physics list requested";
263  }
264  m_physicsList =
265  physicsMaker->make(map_,fPDGTable,m_chordFinderSetter,m_pPhysics,m_registry);
266 
267  PhysicsList* phys = m_physicsList.get();
268  if (phys==nullptr) {
270  << "Physics list construction failed!";
271  }
272 
273  // adding GFlash, Russian Roulette for eletrons and gamma,
274  // step limiters on top of any Physics Lists
275  phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions",m_pPhysics));
276 
277  m_physicsList->ResetStoredInAscii();
278  std::string tableDir = m_PhysicsTablesDir;
280  m_physicsList->SetPhysicsTableRetrieved(tableDir);
281  }
282  edm::LogInfo("SimG4CoreApplication")
283  << "RunManager: start initialisation of PhysicsList";
284 
285  int verb = std::max(m_pPhysics.getUntrackedParameter<int>("Verbosity",0),
286  m_p.getParameter<int>("SteppingVerbosity"));
287  m_kernel->SetVerboseLevel(verb);
288 
289  m_physicsList->SetDefaultCutValue(m_pPhysics.getParameter<double>("DefaultCutValue")*CLHEP::cm);
290  m_physicsList->SetCutsWithDefault();
291  if(m_pPhysics.getParameter<bool>("CutsPerRegion")) {
292  m_prodCuts.reset(new DDG4ProductionCuts(map_, verb, m_pPhysics));
293  m_prodCuts->update();
294  }
295 
296  m_kernel->SetPhysics(phys);
297  m_kernel->InitializePhysics();
298 
299  if (m_kernel->RunInitialization()) { m_managerInitialized = true; }
300  else {
302  << "G4RunManagerKernel initialization failed!";
303  }
304 
306  {
307  std::ostringstream dir;
308  dir << tableDir << '\0';
309  std::string cmd = std::string("/control/shell mkdir -p ")+tableDir;
310  if (!std::ifstream(dir.str().c_str(), std::ios::in))
311  G4UImanager::GetUIpointer()->ApplyCommand(cmd);
312  m_physicsList->StorePhysicsTable(tableDir);
313  }
314 
315  //tell all interesting parties that we are beginning the job
316  BeginOfJob aBeginOfJob(&es);
317  m_registry.beginOfJobSignal_(&aBeginOfJob);
318 
319  G4int sv = m_p.getParameter<int>("SteppingVerbosity");
320  G4double elim = m_p.getParameter<double>("StepVerboseThreshold")*CLHEP::GeV;
321  std::vector<int> ve = m_p.getParameter<std::vector<int> >("VerboseEvents");
322  std::vector<int> vn = m_p.getParameter<std::vector<int> >("VertexNumber");
323  std::vector<int> vt = m_p.getParameter<std::vector<int> >("VerboseTracks");
324 
325  if(sv > 0) {
326  m_sVerbose.reset(new CMSSteppingVerbose(sv, elim, ve, vn, vt));
327  }
329 
330  if(0 < m_G4Commands.size()) {
331  G4cout << "RunManager: Requested UI commands: " << G4endl;
332  for (unsigned it=0; it<m_G4Commands.size(); ++it) {
333  G4cout << " " << m_G4Commands[it] << G4endl;
334  G4UImanager::GetUIpointer()->ApplyCommand(m_G4Commands[it]);
335  }
336  }
337 
338  if("" != m_WriteFile) {
339  G4GDMLParser gdml;
340  gdml.SetRegionExport(true);
341  gdml.SetEnergyCutsExport(true);
342  gdml.Write(m_WriteFile, world->GetWorldVolume(), true);
343  }
344 
345  if("" != m_RegionFile) {
346  G4RegionReporter rrep;
348  }
349 
351 
352  // If the Geant4 particle table is needed, decomment the lines below
353  //
354  // G4cout << "Output of G4ParticleTable DumpTable:" << G4endl;
355  // G4ParticleTable::GetParticleTable()->DumpTable("ALL");
356 
357  initializeRun();
358  firstRun= false;
359 }
360 
362 {
363  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
364  if (!m_runTerminated) { terminateRun(); }
365 }
366 
368 {
369  m_currentEvent = generateEvent(inpevt);
370  m_simEvent = new G4SimEvent;
373  if (m_generator->genVertex() !=0 ) {
376  m_generator->genVertex()->y()/centimeter,
377  m_generator->genVertex()->z()/centimeter,
378  m_generator->genVertex()->t()/second));
379  }
380  if (m_currentEvent->GetNumberOfPrimaryVertex()==0) {
381  std::stringstream ss;
382  ss << " RunManager::produce(): event " << inpevt.id().event()
383  << " with no G4PrimaryVertices\n" ;
384  throw SimG4Exception(ss.str());
385 
386  abortRun(false);
387  } else {
388  edm::LogInfo("SimG4CoreApplication")
389  << "RunManager::produce: start Event " << inpevt.id().event()
390  << " of weight " << m_simEvent->weight()
391  << " with " << m_simEvent->nTracks() << " tracks and "
392  << m_simEvent->nVertices()
393  << " vertices, generated by " << m_simEvent->nGenParts() << " particles ";
394 
395  m_kernel->GetEventManager()->ProcessOneEvent(m_currentEvent);
396 
397  edm::LogInfo("SimG4CoreApplication")
398  << " RunManager::produce: ended Event " << inpevt.id().event();
399  }
400 }
401 
403 {
404  if (m_currentEvent!=0) { delete m_currentEvent; }
405  m_currentEvent = 0;
406  if (m_simEvent!=0) { delete m_simEvent; }
407  m_simEvent = 0;
408 
409  // 64 bits event ID in CMSSW converted into Geant4 event ID
410  G4int evtid = (G4int)inpevt.id().event();
411  G4Event * evt = new G4Event(evtid);
412 
414 
415  inpevt.getByToken( m_HepMC, HepMCEvt ) ;
416 
417  m_generator->setGenEvent(HepMCEvt->GetEvent());
418 
419  // required to reset the GenParticle Id for particles transported
420  // along the beam pipe
421  // to their original value for SimTrack creation
422  resetGenParticleId( inpevt );
423 
424  if (!m_nonBeam)
425  {
426  m_generator->HepMC2G4(HepMCEvt->GetEvent(),evt);
427  }
428  else
429  {
430  m_generator->nonBeamEvent2G4(HepMCEvt->GetEvent(),evt);
431  }
432 
433  return evt;
434 }
435 
437 {
438  if (m_runTerminated) { return; }
439  G4Track* t =
440  m_kernel->GetEventManager()->GetTrackingManager()->GetTrack();
441  t->SetTrackStatus(fStopAndKill) ;
442 
443  // CMS-specific act
444  //
445  TrackingAction* uta =
446  (TrackingAction*)m_kernel->GetEventManager()->GetUserTrackingAction() ;
447  uta->PostUserTrackingAction(t) ;
448 
449  m_currentEvent->SetEventAborted();
450  m_kernel->GetEventManager()->GetStackManager()->clear() ;
451  m_kernel->GetEventManager()->GetTrackingManager()->EventAborted() ;
452 
453  G4StateManager* stateManager = G4StateManager::GetStateManager();
454  stateManager->SetNewState(G4State_GeomClosed);
455 }
456 
458 {
459  m_runInterface = new SimRunInterface(this, false);
460 
463 
464  G4EventManager * eventManager = m_kernel->GetEventManager();
465  eventManager->SetVerboseLevel(m_EvtMgrVerbosity);
466 
467  if (m_generator!=nullptr) {
468  EventAction * userEventAction =
470  m_sVerbose.get());
471  Connect(userEventAction);
472  eventManager->SetUserAction(userEventAction);
473 
474  TrackingAction* userTrackingAction =
475  new TrackingAction(userEventAction,m_pTrackingAction,m_sVerbose.get());
476  Connect(userTrackingAction);
477  eventManager->SetUserAction(userTrackingAction);
478 
479  SteppingAction* userSteppingAction =
480  new SteppingAction(userEventAction,m_pSteppingAction,m_sVerbose.get(),m_hasWatchers);
481  Connect(userSteppingAction);
482  eventManager->SetUserAction(userSteppingAction);
483 
484  eventManager->SetUserAction(new StackingAction(userTrackingAction,
486 
487  } else {
488  edm::LogWarning("SimG4CoreApplication") << " RunManager: WARNING : "
489  << "No generator; initialized "
490  << "only RunAction!";
491  }
492 }
493 
495 {
496  m_runInitialized = false;
497  if (m_currentRun==nullptr) { m_currentRun = new G4Run(); }
498  G4StateManager::GetStateManager()->SetNewState(G4State_GeomClosed);
500  m_runAborted = false;
501  m_runInitialized = true;
502 }
503 
505 {
506  if(m_runTerminated) { return; }
507  if (m_userRunAction!=nullptr) {
509  delete m_userRunAction;
510  m_userRunAction = nullptr;
511  }
512  delete m_currentEvent;
513  m_currentEvent = nullptr;
514  delete m_simEvent;
515  m_simEvent = nullptr;
516  if(m_kernel != nullptr) { m_kernel->RunTermination(); }
517  m_runInitialized = false;
518  m_runTerminated = true;
519 }
520 
521 void RunManager::abortRun(bool softAbort)
522 {
523  if(m_runAborted) { return; }
524  if (!softAbort) { abortEvent(); }
525  if (m_currentRun!=0) { delete m_currentRun; m_currentRun = 0; }
526  terminateRun();
527  m_runAborted = true;
528 }
529 
531 {
533  inpevt.getByToken( m_LHCtr, theLHCTlink );
534  if ( theLHCTlink.isValid() ) {
535  m_trackManager->setLHCTransportLink( theLHCTlink.product() );
536  }
537 }
538 
540 {
541  return m_trackManager.get();
542 }
543 
545 {
548 }
549 
551 {
554 }
555 
556 void RunManager::Connect(TrackingAction* trackingAction)
557 {
560 }
561 
562 void RunManager::Connect(SteppingAction* steppingAction)
563 {
565 }
566 
567 void RunManager::DumpMagneticField(const G4Field* field) const
568 {
569  std::ofstream fout(m_FieldFile.c_str(), std::ios::out);
570  if(fout.fail()){
571  edm::LogWarning("SimG4CoreApplication")
572  << " RunManager WARNING : "
573  << "error opening file <" << m_FieldFile << "> for magnetic field";
574  } else {
575  double rmax = 9000*mm;
576  double zmax = 16000*mm;
577 
578  double dr = 5*cm;
579  double dz = 20*cm;
580 
581  int nr = (int)(rmax/dr);
582  int nz = 2*(int)(zmax/dz);
583 
584  double r = 0.0;
585  double z0 = -zmax;
586  double z;
587 
588  double phi = 0.0;
589  double cosf = cos(phi);
590  double sinf = sin(phi);
591 
592  double point[4] = {0.0,0.0,0.0,0.0};
593  double bfield[3] = {0.0,0.0,0.0};
594 
595  fout << std::setprecision(6);
596  for(int i=0; i<=nr; ++i) {
597  z = z0;
598  for(int j=0; j<=nz; ++j) {
599  point[0] = r*cosf;
600  point[1] = r*sinf;
601  point[2] = z;
602  field->GetFieldValue(point, bfield);
603  fout << "R(mm)= " << r/mm << " phi(deg)= " << phi/degree
604  << " Z(mm)= " << z/mm << " Bz(tesla)= " << bfield[2]/tesla
605  << " Br(tesla)= " << (bfield[0]*cosf + bfield[1]*sinf)/tesla
606  << " Bphi(tesla)= " << (bfield[0]*sinf - bfield[1]*cosf)/tesla
607  << G4endl;
608  z += dz;
609  }
610  r += dr;
611  }
612 
613  fout.close();
614  }
615 }
T getParameter(std::string const &) const
bool m_check
Definition: RunManager.h:136
EventNumber_t event() const
Definition: EventID.h:41
Map map_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::HepMCProduct > m_HepMC
Definition: RunManager.h:110
virtual const math::XYZTLorentzVector * genVertex() const
Definition: Generator.h:30
SimTrackManager * GetSimTrackManager()
Definition: RunManager.cc:539
edm::ESWatcher< IdealMagneticFieldRecord > idealMagRcdWatcher_
Definition: RunManager.h:165
const double GeV
Definition: MathUtil.h:16
const G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:18
RunManager(edm::ParameterSet const &p, edm::ConsumesCollector &&i)
Definition: RunManager.cc:115
virtual const double eventWeight() const
Definition: Generator.h:31
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
G4Event * m_currentEvent
Definition: RunManager.h:127
void abortRun(bool softAbort=false)
Definition: RunManager.cc:521
def create(alignables, pedeDump, additionalData, outputFile, config)
edm::EDGetTokenT< edm::LHCTransportLinkContainer > m_LHCtr
Definition: RunManager.h:111
SimActivityRegistry m_registry
Definition: RunManager.h:157
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:29
edm::ParameterSet m_p
Definition: RunManager.h:149
SimActivityRegistry::G4StepSignal m_g4StepSignal
HepPDT::ParticleDataTable ParticleDataTable
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
std::vector< std::shared_ptr< SimProducer > > m_producers
Definition: RunManager.h:159
void initializeRun()
Definition: RunManager.cc:494
void connect(Observer< const BeginOfJob * > *iObject)
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:100
EndOfEventSignal endOfEventSignal_
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void initializeUserActions()
Definition: RunManager.cc:457
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:26
Generator * m_generator
Definition: RunManager.h:109
BeginOfRunSignal beginOfRunSignal_
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:54
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:83
bool m_hasWatchers
Definition: RunManager.h:124
bool m_pUseMagneticField
Definition: RunManager.h:123
#define nullptr
edm::ESWatcher< IdealGeometryRecord > idealGeomRcdWatcher_
Definition: RunManager.h:164
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
void abortEvent()
Definition: RunManager.cc:436
std::vector< SensitiveCaloDetector * > m_sensCaloDets
Definition: RunManager.h:153
std::vector< SensitiveTkDetector * > m_sensTkDets
Definition: RunManager.h:152
BeginOfJobSignal beginOfJobSignal_
bool m_nonBeam
Definition: RunManager.h:113
U second(std::pair< T, U > const &p)
void weight(float w)
Definition: G4SimEvent.h:27
int m_EvtMgrVerbosity
Definition: RunManager.h:135
std::string m_WriteFile
Definition: RunManager.h:168
bool firstRun
Definition: RunManager.h:122
SimRunInterface * m_runInterface
Definition: RunManager.h:130
void terminateRun()
Definition: RunManager.cc:504
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
bool m_RestorePhysicsTables
Definition: RunManager.h:134
void hepEvent(const HepMC::GenEvent *r)
Definition: G4SimEvent.h:25
std::vector< std::shared_ptr< SimWatcher > > m_watchers
Definition: RunManager.h:158
std::unique_ptr< CMSSteppingVerbose > m_sVerbose
Definition: RunManager.h:156
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:25
BeginOfEventSignal beginOfEventSignal_
SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal
void EndOfRunAction(const G4Run *aRun)
Definition: RunAction.cc:40
bool isValid() const
Definition: HandleBase.h:74
G4Run * m_currentRun
Definition: RunManager.h:126
void resetGenParticleId(edm::Event &inpevt)
Definition: RunManager.cc:530
EndOfRunSignal endOfRunSignal_
edm::ParameterSet m_pStackingAction
Definition: RunManager.h:144
unsigned int nTracks() const
Definition: G4SimEvent.h:22
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:59
edm::ParameterSet m_pEventAction
Definition: RunManager.h:143
bool m_runTerminated
Definition: RunManager.h:120
unsigned int nVertices() const
Definition: G4SimEvent.h:23
edm::ParameterSet m_pField
Definition: RunManager.h:138
edm::ParameterSet m_pPhysics
Definition: RunManager.h:141
edm::ParameterSet m_pSteppingAction
Definition: RunManager.h:146
edm::ParameterSet m_g4overlap
Definition: RunManager.h:147
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:38
T const * product() const
Definition: Handle.h:81
virtual void PostUserTrackingAction(const G4Track *aTrack)
unsigned int nGenParts() const
Definition: G4SimEvent.h:24
void stopG4()
Definition: RunManager.cc:361
RunAction * m_userRunAction
Definition: RunManager.h:129
void BeginOfRunAction(const G4Run *aRun)
Definition: RunAction.cc:22
DDDWorldSignal dddWorldSignal_
const T & get() const
Definition: EventSetup.h:56
std::pair< std::vector< SensitiveTkDetector * >, std::vector< SensitiveCaloDetector * > > create(const DDDWorld &w, const DDCompactView &cpv, const SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *m, SimActivityRegistry &reg) const
Definition: AttachSD.cc:23
void nonBeamEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:529
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
G4Event * generateEvent(edm::Event &inpevt)
Definition: RunManager.cc:402
void ReportRegions(const std::string &ss)
void DumpMagneticField(const G4Field *) const
Definition: RunManager.cc:567
bool m_runInitialized
Definition: RunManager.h:119
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:25
edm::EventID id() const
Definition: EventBase.h:60
sim::ChordFinderSetter * m_chordFinderSetter
Definition: RunManager.h:162
void Connect(RunAction *)
Definition: RunManager.cc:544
HLT enums.
std::string m_RegionFile
Definition: RunManager.h:169
std::vector< LHCTransportLink > LHCTransportLinkContainer
AttachSD * m_attach
Definition: RunManager.h:151
PrimaryTransformer * m_primaryTransformer
Definition: RunManager.h:116
firstRun
Definition: dataset.py:934
std::string m_PhysicsTablesDir
Definition: RunManager.h:132
bool m_StorePhysicsTables
Definition: RunManager.h:133
std::unique_ptr< CustomUIsession > m_UIsession
Definition: RunManager.h:114
dbl *** dir
Definition: mlp_gen.cc:35
EndOfTrackSignal endOfTrackSignal_
std::unique_ptr< DDG4ProductionCuts > m_prodCuts
Definition: RunManager.h:155
def check(config)
Definition: trackerTree.py:14
edm::ParameterSet m_pRunAction
Definition: RunManager.h:142
std::unique_ptr< SimTrackManager > m_trackManager
Definition: RunManager.h:161
T const * product() const
Definition: ESHandle.h:86
edm::ParameterSet m_pTrackingAction
Definition: RunManager.h:145
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: G4SimEvent.h:29
std::vector< std::string > m_G4Commands
Definition: RunManager.h:148
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:53
std::unique_ptr< PhysicsList > m_physicsList
Definition: RunManager.h:115
std::string m_FieldFile
Definition: RunManager.h:167
G4SimEvent * m_simEvent
Definition: RunManager.h:128
bool m_managerInitialized
Definition: RunManager.h:118
void initG4(const edm::EventSetup &es)
Definition: RunManager.cc:180
T get(const Candidate &c)
Definition: component.h:55
*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
BeginOfTrackSignal beginOfTrackSignal_
G4RunManagerKernel * m_kernel
Definition: RunManager.h:107
bool m_runAborted
Definition: RunManager.h:121
void produce(edm::Event &inpevt, const edm::EventSetup &es)
Definition: RunManager.cc:367
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal