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