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