CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunManager.cc
Go to the documentation of this file.
18 
20 
27 
30 
34 
36 
41 
44 
46 
47 #include "HepPDT/ParticleDataTable.hh"
49 
50 #include "G4GeometryManager.hh"
51 #include "G4StateManager.hh"
52 #include "G4ApplicationState.hh"
53 #include "G4RunManagerKernel.hh"
54 #include "G4UImanager.hh"
55 
56 #include "G4EventManager.hh"
57 #include "G4Run.hh"
58 #include "G4Event.hh"
59 #include "G4TransportationManager.hh"
60 #include "G4ParticleTable.hh"
61 #include "G4Field.hh"
62 #include "G4FieldManager.hh"
63 
64 #include "G4GDMLParser.hh"
65 #include "G4SystemOfUnits.hh"
66 
67 #include <iostream>
68 #include <sstream>
69 #include <fstream>
70 #include <memory>
71 
73 
74 static
76  SimActivityRegistry& iReg,
77  std::vector<std::shared_ptr<SimWatcher> >& oWatchers,
78  std::vector<std::shared_ptr<SimProducer> >& oProds
79  )
80 {
81  using namespace std;
82  using namespace edm;
83  vector<ParameterSet> watchers;
84  try {
85  watchers = iP.getParameter<vector<ParameterSet> >("Watchers");
86  } catch( edm::Exception) {
87  }
88 
89  for(vector<ParameterSet>::iterator itWatcher = watchers.begin();
90  itWatcher != watchers.end();
91  ++itWatcher) {
92  std::auto_ptr<SimWatcherMakerBase> maker(
94  (itWatcher->getParameter<std::string> ("type")) );
95  if(maker.get()==0) {
96  throw SimG4Exception("Unable to find the requested Watcher");
97  }
98 
99  std::shared_ptr<SimWatcher> watcherTemp;
100  std::shared_ptr<SimProducer> producerTemp;
101  maker->make(*itWatcher,iReg,watcherTemp,producerTemp);
102  oWatchers.push_back(watcherTemp);
103  if(producerTemp) {
104  oProds.push_back(producerTemp);
105  }
106  }
107 }
108 
110  : m_generator(0), m_nonBeam(p.getParameter<bool>("NonBeamEvent")),
111  m_primaryTransformer(0),
112  m_managerInitialized(false),
113  m_runInitialized(false), m_runTerminated(false), m_runAborted(false),
114  firstRun(true),
115  m_pUseMagneticField(p.getParameter<bool>("UseMagneticField")),
116  m_currentRun(0), m_currentEvent(0), m_simEvent(0),
117  m_PhysicsTablesDir(p.getParameter<std::string>("PhysicsTablesDirectory")),
118  m_StorePhysicsTables(p.getParameter<bool>("StorePhysicsTables")),
119  m_RestorePhysicsTables(p.getParameter<bool>("RestorePhysicsTables")),
120  m_EvtMgrVerbosity(p.getUntrackedParameter<int>("G4EventManagerVerbosity",0)),
121  m_pField(p.getParameter<edm::ParameterSet>("MagneticField")),
122  m_pGenerator(p.getParameter<edm::ParameterSet>("Generator")),
123  m_pPhysics(p.getParameter<edm::ParameterSet>("Physics")),
124  m_pRunAction(p.getParameter<edm::ParameterSet>("RunAction")),
125  m_pEventAction(p.getParameter<edm::ParameterSet>("EventAction")),
126  m_pStackingAction(p.getParameter<edm::ParameterSet>("StackingAction")),
127  m_pTrackingAction(p.getParameter<edm::ParameterSet>("TrackingAction")),
128  m_pSteppingAction(p.getParameter<edm::ParameterSet>("SteppingAction")),
129  m_g4overlap(p.getParameter<edm::ParameterSet>("G4CheckOverlap")),
130  m_G4Commands(p.getParameter<std::vector<std::string> >("G4Commands")),
131  m_p(p), m_fieldBuilder(0), m_chordFinderSetter(nullptr),
132  m_theLHCTlinkTag(p.getParameter<edm::InputTag>("theLHCTlinkTag"))
133 {
134  m_kernel = new G4RunManagerKernel();
135 
136  m_check = p.getUntrackedParameter<bool>("CheckOverlap",false);
137  m_WriteFile = p.getUntrackedParameter<std::string>("FileNameGDML","");
138  m_FieldFile = p.getUntrackedParameter<std::string>("FileNameField","");
139  m_RegionFile = p.getUntrackedParameter<std::string>("FileNameRegions","");
140 
141  m_userRunAction = 0;
142  m_runInterface = 0;
143 
144  //Look for an outside SimActivityRegistry
145  // this is used by the visualization code
146  edm::Service<SimActivityRegistry> otherRegistry;
147  if(otherRegistry){
148  m_registry.connect(*otherRegistry);
149  }
150 
152 
154  m_InTag = m_pGenerator.getParameter<std::string>("HepMCProductLabel") ;
155 
156 }
157 
159 {
160  if (!m_runTerminated) { terminateRun(); }
161  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
162  G4GeometryManager::GetInstance()->OpenGeometry();
163  // if (m_kernel!=0) delete m_kernel;
164  delete m_runInterface;
165 }
166 
168 {
169  bool geomChanged = idealGeomRcdWatcher_.check(es);
170  if (geomChanged && (!firstRun)) {
171  throw cms::Exception("BadConfig")
172  << "[SimG4Core RunManager]\n"
173  << "The Geometry configuration is changed during the job execution\n"
174  << "this is not allowed, the geometry must stay unchanged\n";
175  }
176  if (m_pUseMagneticField) {
177  bool magChanged = idealMagRcdWatcher_.check(es);
178  if (magChanged && (!firstRun)) {
179  throw cms::Exception("BadConfig")
180  << "[SimG4Core RunManager]\n"
181  << "The MagneticField configuration is changed during the job execution\n"
182  << "this is not allowed, the MagneticField must stay unchanged\n";
183  }
184  }
185 
186  if (m_managerInitialized) return;
187 
188  // DDDWorld: get the DDCV from the ES and use it to build the World
190  es.get<IdealGeometryRecord>().get(pDD);
191 
193  SensitiveDetectorCatalog catalog_;
194  const DDDWorld * world = new DDDWorld(&(*pDD), map_, catalog_, false);
196 
198  {
199  // setup the magnetic field
201  es.get<IdealMagneticFieldRecord>().get(pMF);
202  const GlobalPoint g(0.,0.,0.);
203 
205  m_fieldBuilder = new sim::FieldBuilder(&(*pMF), m_pField);
206  G4TransportationManager * tM =
207  G4TransportationManager::GetTransportationManager();
208  m_fieldBuilder->build( tM->GetFieldManager(),
209  tM->GetPropagatorInField(),
211  if("" != m_FieldFile) {
212  DumpMagneticField(tM->GetFieldManager()->GetDetectorField());
213  }
214  }
215 
216  // we need the track manager now
217  m_trackManager = std::auto_ptr<SimTrackManager>(new SimTrackManager);
218 
219  // attach sensitive detector
220  m_attach = new AttachSD;
221 
222  std::pair< std::vector<SensitiveTkDetector*>,
223  std::vector<SensitiveCaloDetector*> > sensDets =
224  m_attach->create(*world,(*pDD),catalog_,m_p,m_trackManager.get(),
225  m_registry);
226 
227  m_sensTkDets.swap(sensDets.first);
228  m_sensCaloDets.swap(sensDets.second);
229 
230  edm::LogInfo("SimG4CoreApplication")
231  << " RunManager: Sensitive Detector "
232  << "building finished; found "
233  << m_sensTkDets.size()
234  << " Tk type Producers, and "
235  << m_sensCaloDets.size()
236  << " Calo type producers ";
237 
239  es.get<PDTRecord>().get(fTable);
240  const HepPDT::ParticleDataTable *fPDGTable = &(*fTable);
241 
243 
244  std::auto_ptr<PhysicsListMakerBase>
245  physicsMaker(PhysicsListFactory::get()->create(
246  m_pPhysics.getParameter<std::string> ("type")));
247  if (physicsMaker.get()==0) {
248  throw SimG4Exception("Unable to find the Physics list requested");
249  }
250  m_physicsList =
251  physicsMaker->make(map_,fPDGTable,m_chordFinderSetter,m_pPhysics,m_registry);
252 
253  PhysicsList* phys = m_physicsList.get();
254  if (phys==0) {
255  throw SimG4Exception("Physics list construction failed!");
256  }
257 
258  // adding GFlash, Russian Roulette for eletrons and gamma,
259  // step limiters on top of any Physics Lists
260  phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions",m_pPhysics));
261 
262  m_physicsList->ResetStoredInAscii();
263  std::string tableDir = m_PhysicsTablesDir;
265  m_physicsList->SetPhysicsTableRetrieved(tableDir);
266  }
267  edm::LogInfo("SimG4CoreApplication")
268  << "RunManager: start initialisation of PhysicsList";
269 
270  int verb = m_pPhysics.getUntrackedParameter<int>("Verbosity",0);
271  m_physicsList->SetDefaultCutValue(m_pPhysics.getParameter<double>("DefaultCutValue")*CLHEP::cm);
272  m_physicsList->SetCutsWithDefault();
273  m_prodCuts.reset(new DDG4ProductionCuts(map_, verb, m_pPhysics));
274  m_prodCuts->update();
275 
276  m_kernel->SetPhysics(phys);
277  m_kernel->InitializePhysics();
278 
279  if (m_kernel->RunInitialization()) { m_managerInitialized = true; }
280  else {
281  throw SimG4Exception("G4RunManagerKernel initialization failed!");
282  }
283 
285  {
286  std::ostringstream dir;
287  dir << tableDir << '\0';
288  std::string cmd = std::string("/control/shell mkdir -p ")+tableDir;
289  if (!std::ifstream(dir.str().c_str(), std::ios::in))
290  G4UImanager::GetUIpointer()->ApplyCommand(cmd);
291  m_physicsList->StorePhysicsTable(tableDir);
292  }
293 
294  //tell all interesting parties that we are beginning the job
295  BeginOfJob aBeginOfJob(&es);
296  m_registry.beginOfJobSignal_(&aBeginOfJob);
297 
299 
300  if(0 < m_G4Commands.size()) {
301  G4cout << "RunManager: Requested UI commands: " << G4endl;
302  for (unsigned it=0; it<m_G4Commands.size(); ++it) {
303  G4cout << " " << m_G4Commands[it] << G4endl;
304  G4UImanager::GetUIpointer()->ApplyCommand(m_G4Commands[it]);
305  }
306  }
307 
308  if("" != m_WriteFile) {
309  G4GDMLParser gdml;
310  gdml.Write(m_WriteFile, world->GetWorldVolume(), true);
311  }
312 
313  if("" != m_RegionFile) {
314  G4RegionReporter rrep;
316  }
317 
319 
320  // If the Geant4 particle table is needed, decomment the lines below
321  //
322  // G4cout << "Output of G4ParticleTable DumpTable:" << G4endl;
323  // G4ParticleTable::GetParticleTable()->DumpTable("ALL");
324 
325  initializeRun();
326  firstRun= false;
327 }
328 
330 {
331  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
332  if (!m_runTerminated) { terminateRun(); }
333 }
334 
336 {
337  m_currentEvent = generateEvent(inpevt);
338  m_simEvent = new G4SimEvent;
341  if (m_generator->genVertex() !=0 ) {
344  m_generator->genVertex()->y()/centimeter,
345  m_generator->genVertex()->z()/centimeter,
346  m_generator->genVertex()->t()/second));
347  }
348  if (m_currentEvent->GetNumberOfPrimaryVertex()==0) {
349  edm::LogError("SimG4CoreApplication")
350  << " RunManager::produce event " << inpevt.id().event()
351  << " with no G4PrimaryVertices \n Aborting Run" ;
352 
353  abortRun(false);
354  } else {
355  m_kernel->GetEventManager()->ProcessOneEvent(m_currentEvent);
356  }
357 
358  edm::LogInfo("SimG4CoreApplication")
359  << " RunManager: saved : Event " << inpevt.id().event()
360  << " of weight " << m_simEvent->weight()
361  << " with " << m_simEvent->nTracks() << " tracks and "
362  << m_simEvent->nVertices()
363  << " vertices, generated by " << m_simEvent->nGenParts() << " particles ";
364 }
365 
367 {
368  if (m_currentEvent!=0) { delete m_currentEvent; }
369  m_currentEvent = 0;
370  if (m_simEvent!=0) { delete m_simEvent; }
371  m_simEvent = 0;
372 
373  // 64 bits event ID in CMSSW converted into Geant4 event ID
374  G4int evtid = (G4int)inpevt.id().event();
375  G4Event * evt = new G4Event(evtid);
376 
378 
379  inpevt.getByLabel( m_InTag, HepMCEvt ) ;
380 
381  m_generator->setGenEvent(HepMCEvt->GetEvent());
382 
383  // required to reset the GenParticle Id for particles transported
384  // along the beam pipe
385  // to their original value for SimTrack creation
386  resetGenParticleId( inpevt );
387 
388  if (!m_nonBeam)
389  {
390  m_generator->HepMC2G4(HepMCEvt->GetEvent(),evt);
391  }
392  else
393  {
394  m_generator->nonBeamEvent2G4(HepMCEvt->GetEvent(),evt);
395  }
396 
397  return evt;
398 }
399 
401 {
402  if (m_runTerminated) { return; }
403  G4Track* t =
404  m_kernel->GetEventManager()->GetTrackingManager()->GetTrack();
405  t->SetTrackStatus(fStopAndKill) ;
406 
407  // CMS-specific act
408  //
409  TrackingAction* uta =
410  (TrackingAction*)m_kernel->GetEventManager()->GetUserTrackingAction() ;
411  uta->PostUserTrackingAction(t) ;
412 
413  m_currentEvent->SetEventAborted();
414 
415  // do NOT call this method for now
416  // because it'll set abortRequested=true (withing G4EventManager)
417  // this will make Geant4, in the event *next* after the aborted one
418  // NOT to get the primary, thus there's NOTHING to trace, and it goes
419  // to the end of G4Event::DoProcessing(G4Event*), where abortRequested
420  // will be reset to true again
421  //
422  //m_kernel->GetEventManager()->AbortCurrentEvent();
423  //
424  // instead, mimic what it does, except (re)setting abortRequested
425  //
426  m_kernel->GetEventManager()->GetStackManager()->clear() ;
427  m_kernel->GetEventManager()->GetTrackingManager()->EventAborted() ;
428 
429  G4StateManager* stateManager = G4StateManager::GetStateManager();
430  stateManager->SetNewState(G4State_GeomClosed);
431 }
432 
434 {
435  m_runInterface = new SimRunInterface(this, false);
436 
439 
440  G4EventManager * eventManager = m_kernel->GetEventManager();
441  eventManager->SetVerboseLevel(m_EvtMgrVerbosity);
442 
443  if (m_generator!=0) {
444  EventAction * userEventAction =
446  Connect(userEventAction);
447  eventManager->SetUserAction(userEventAction);
448 
449  TrackingAction* userTrackingAction =
450  new TrackingAction(userEventAction,m_pTrackingAction);
451  Connect(userTrackingAction);
452  eventManager->SetUserAction(userTrackingAction);
453 
454  SteppingAction* userSteppingAction =
455  new SteppingAction(userEventAction,m_pSteppingAction);
456  Connect(userSteppingAction);
457  eventManager->SetUserAction(userSteppingAction);
458 
459  eventManager->SetUserAction(new StackingAction(userTrackingAction,
461 
462  } else {
463  edm::LogWarning("SimG4CoreApplication") << " RunManager: WARNING : "
464  << "No generator; initialized "
465  << "only RunAction!";
466  }
467 }
468 
470 {
471  m_runInitialized = false;
472  if (m_currentRun==0) { m_currentRun = new G4Run(); }
473  G4StateManager::GetStateManager()->SetNewState(G4State_GeomClosed);
475  m_runAborted = false;
476  m_runInitialized = true;
477 }
478 
480 {
481  if (m_userRunAction!=0) {
483  delete m_userRunAction;
484  m_userRunAction = 0;
485  }
486  if (m_kernel!=0 && !m_runTerminated) {
487  delete m_currentEvent;
488  m_currentEvent = 0;
489  delete m_simEvent;
490  m_simEvent = 0;
491  m_kernel->RunTermination();
492  m_runInitialized = false;
493  m_runTerminated = true;
494  }
495 }
496 
497 void RunManager::abortRun(bool softAbort)
498 {
499  m_runAborted = false;
500  if (!softAbort) { abortEvent(); }
501  if (m_currentRun!=0) { delete m_currentRun; m_currentRun = 0; }
502  m_runInitialized = false;
503  m_runAborted = true;
504  terminateRun();
505 }
506 
508 {
510  inpevt.getByLabel( m_theLHCTlinkTag, theLHCTlink );
511  if ( theLHCTlink.isValid() ) {
512  m_trackManager->setLHCTransportLink( theLHCTlink.product() );
513  }
514 }
515 
517 {
518  return m_trackManager.get();
519 }
520 
522 {
525 }
526 
528 {
531 }
532 
533 void RunManager::Connect(TrackingAction* trackingAction)
534 {
537 }
538 
539 void RunManager::Connect(SteppingAction* steppingAction)
540 {
542 }
543 
544 void RunManager::DumpMagneticField(const G4Field* field) const
545 {
546  std::ofstream fout(m_FieldFile.c_str(), std::ios::out);
547  if(fout.fail()){
548  edm::LogWarning("SimG4CoreApplication")
549  << " RunManager WARNING : "
550  << "error opening file <" << m_FieldFile << "> for magnetic field";
551  } else {
552  double rmax = 9000*mm;
553  double zmax = 16000*mm;
554 
555  double dr = 5*cm;
556  double dz = 20*cm;
557 
558  int nr = (int)(rmax/dr);
559  int nz = 2*(int)(zmax/dz);
560 
561  double r = 0.0;
562  double z0 = -zmax;
563  double z;
564 
565  double phi = 0.0;
566  double cosf = cos(phi);
567  double sinf = sin(phi);
568 
569  double point[4] = {0.0,0.0,0.0,0.0};
570  double bfield[3] = {0.0,0.0,0.0};
571 
572  fout << std::setprecision(6);
573  for(int i=0; i<=nr; ++i) {
574  z = z0;
575  for(int j=0; j<=nz; ++j) {
576  point[0] = r*cosf;
577  point[1] = r*sinf;
578  point[2] = z;
579  field->GetFieldValue(point, bfield);
580  fout << "R(mm)= " << r/mm << " phi(deg)= " << phi/degree
581  << " Z(mm)= " << z/mm << " Bz(tesla)= " << bfield[2]/tesla
582  << " Br(tesla)= " << (bfield[0]*cosf + bfield[1]*sinf)/tesla
583  << " Bphi(tesla)= " << (bfield[0]*sinf - bfield[1]*cosf)/tesla
584  << G4endl;
585  z += dz;
586  }
587  r += dr;
588  }
589 
590  fout.close();
591  }
592 }
T getParameter(std::string const &) const
bool m_check
Definition: RunManager.h:128
EventNumber_t event() const
Definition: EventID.h:41
Map map_
edm::ParameterSet m_pGenerator
Definition: RunManager.h:131
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< SimTrackManager > m_trackManager
Definition: RunManager.h:152
int i
Definition: DBlmapReader.cc:9
virtual const math::XYZTLorentzVector * genVertex() const
Definition: Generator.h:30
SimTrackManager * GetSimTrackManager()
Definition: RunManager.cc:516
edm::ESWatcher< IdealMagneticFieldRecord > idealMagRcdWatcher_
Definition: RunManager.h:157
const G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:18
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:117
void abortRun(bool softAbort=false)
Definition: RunManager.cc:497
SimActivityRegistry m_registry
Definition: RunManager.h:148
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:29
edm::ParameterSet m_p
Definition: RunManager.h:141
SimActivityRegistry::G4StepSignal m_g4StepSignal
HepPDT::ParticleDataTable ParticleDataTable
std::vector< std::shared_ptr< SimProducer > > m_producers
Definition: RunManager.h:150
void initializeRun()
Definition: RunManager.cc:469
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:433
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:24
Generator * m_generator
Definition: RunManager.h:104
BeginOfRunSignal beginOfRunSignal_
string firstRun
Definition: dataset.py:870
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:46
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:75
bool m_pUseMagneticField
Definition: RunManager.h:115
#define nullptr
edm::ESWatcher< IdealGeometryRecord > idealGeomRcdWatcher_
Definition: RunManager.h:156
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:400
std::vector< SensitiveCaloDetector * > m_sensCaloDets
Definition: RunManager.h:145
std::vector< SensitiveTkDetector * > m_sensTkDets
Definition: RunManager.h:144
BeginOfJobSignal beginOfJobSignal_
bool m_nonBeam
Definition: RunManager.h:107
U second(std::pair< T, U > const &p)
void weight(float w)
Definition: G4SimEvent.h:27
int m_EvtMgrVerbosity
Definition: RunManager.h:127
std::auto_ptr< PhysicsList > m_physicsList
Definition: RunManager.h:108
std::string m_WriteFile
Definition: RunManager.h:162
bool firstRun
Definition: RunManager.h:114
void build(G4FieldManager *fM=nullptr, G4PropagatorInField *fP=nullptr, ChordFinderSetter *setter=nullptr)
Definition: FieldBuilder.cc:48
SimRunInterface * m_runInterface
Definition: RunManager.h:120
bool check(const std::string &)
void terminateRun()
Definition: RunManager.cc:479
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
int j
Definition: DBlmapReader.cc:9
bool m_RestorePhysicsTables
Definition: RunManager.h:126
void hepEvent(const HepMC::GenEvent *r)
Definition: G4SimEvent.h:25
std::vector< std::shared_ptr< SimWatcher > > m_watchers
Definition: RunManager.h:149
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:25
BeginOfEventSignal beginOfEventSignal_
SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal
void EndOfRunAction(const G4Run *aRun)
Definition: RunAction.cc:39
bool isValid() const
Definition: HandleBase.h:75
G4Run * m_currentRun
Definition: RunManager.h:116
void resetGenParticleId(edm::Event &inpevt)
Definition: RunManager.cc:507
EndOfRunSignal endOfRunSignal_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:418
edm::ParameterSet m_pStackingAction
Definition: RunManager.h:136
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:135
bool m_runTerminated
Definition: RunManager.h:112
unsigned int nVertices() const
Definition: G4SimEvent.h:23
edm::ParameterSet m_pField
Definition: RunManager.h:130
edm::ParameterSet m_pPhysics
Definition: RunManager.h:133
edm::ParameterSet m_pSteppingAction
Definition: RunManager.h:138
edm::ParameterSet m_g4overlap
Definition: RunManager.h:139
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:329
RunAction * m_userRunAction
Definition: RunManager.h:119
void BeginOfRunAction(const G4Run *aRun)
Definition: RunAction.cc:21
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:500
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
std::string m_InTag
Definition: RunManager.h:105
G4Event * generateEvent(edm::Event &inpevt)
Definition: RunManager.cc:366
void ReportRegions(const std::string &ss)
void DumpMagneticField(const G4Field *) const
Definition: RunManager.cc:544
bool m_runInitialized
Definition: RunManager.h:111
string cmd
self.logger.debug(&quot;Path is now `%s&#39;&quot; % \ path)
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:23
edm::EventID id() const
Definition: EventBase.h:59
sim::ChordFinderSetter * m_chordFinderSetter
Definition: RunManager.h:154
void Connect(RunAction *)
Definition: RunManager.cc:521
std::string m_RegionFile
Definition: RunManager.h:163
AttachSD * m_attach
Definition: RunManager.h:143
PrimaryTransformer * m_primaryTransformer
Definition: RunManager.h:109
sim::FieldBuilder * m_fieldBuilder
Definition: RunManager.h:153
std::string m_PhysicsTablesDir
Definition: RunManager.h:124
bool m_StorePhysicsTables
Definition: RunManager.h:125
dbl *** dir
Definition: mlp_gen.cc:35
volatile std::atomic< bool > shutdown_flag false
EndOfTrackSignal endOfTrackSignal_
std::unique_ptr< DDG4ProductionCuts > m_prodCuts
Definition: RunManager.h:147
edm::ParameterSet m_pRunAction
Definition: RunManager.h:134
RunManager(edm::ParameterSet const &p)
Definition: RunManager.cc:109
edm::ParameterSet m_pTrackingAction
Definition: RunManager.h:137
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: G4SimEvent.h:29
std::vector< std::string > m_G4Commands
Definition: RunManager.h:140
SurfaceDeformation * create(int type, const std::vector< double > &params)
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:45
std::string m_FieldFile
Definition: RunManager.h:161
G4SimEvent * m_simEvent
Definition: RunManager.h:118
bool m_managerInitialized
Definition: RunManager.h:110
void initG4(const edm::EventSetup &es)
Definition: RunManager.cc:167
T get(const Candidate &c)
Definition: component.h:55
edm::InputTag m_theLHCTlinkTag
Definition: RunManager.h:159
*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:102
bool m_runAborted
Definition: RunManager.h:113
void produce(edm::Event &inpevt, const edm::EventSetup &es)
Definition: RunManager.cc:335
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal