CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunManagerMT.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 //RunManagerMT::RunManagerMT(edm::ParameterSet const & p, edm::ConsumesCollector && iC)
111  : RunManager(p),
112  m_generator(0), m_nonBeam(p.getParameter<bool>("NonBeamEvent")),
113  m_primaryTransformer(0),
114  m_managerInitialized(false),
115  m_runInitialized(false), m_runTerminated(false), m_runAborted(false),
116  firstRun(true),
117  m_pUseMagneticField(p.getParameter<bool>("UseMagneticField")),
118  m_currentRun(0), m_currentEvent(0), m_simEvent(0),
119  m_PhysicsTablesDir(p.getParameter<std::string>("PhysicsTablesDirectory")),
120  m_StorePhysicsTables(p.getParameter<bool>("StorePhysicsTables")),
121  m_RestorePhysicsTables(p.getParameter<bool>("RestorePhysicsTables")),
122  m_EvtMgrVerbosity(p.getUntrackedParameter<int>("G4EventManagerVerbosity",0)),
123  m_pField(p.getParameter<edm::ParameterSet>("MagneticField")),
124  m_pGenerator(p.getParameter<edm::ParameterSet>("Generator")),
125  m_pPhysics(p.getParameter<edm::ParameterSet>("Physics")),
126  m_pRunAction(p.getParameter<edm::ParameterSet>("RunAction")),
127  m_pEventAction(p.getParameter<edm::ParameterSet>("EventAction")),
128  m_pStackingAction(p.getParameter<edm::ParameterSet>("StackingAction")),
129  m_pTrackingAction(p.getParameter<edm::ParameterSet>("TrackingAction")),
130  m_pSteppingAction(p.getParameter<edm::ParameterSet>("SteppingAction")),
131  m_G4Commands(p.getParameter<std::vector<std::string> >("G4Commands")),
132  m_p(p), m_fieldBuilder(0),
133  m_theLHCTlinkTag(p.getParameter<edm::InputTag>("theLHCTlinkTag"))
134 {
135  //m_HepMC = iC.consumes<edm::HepMCProduct>(p.getParameter<edm::InputTag>("HepMCProduct"));
136 
137  m_kernel = G4RunManagerKernel::GetRunManagerKernel();
138  if (m_kernel==0) m_kernel = new G4RunManagerKernel();
139 
141 
142  m_check = p.getUntrackedParameter<bool>("CheckOverlap",false);
143  m_WriteFile = p.getUntrackedParameter<std::string>("FileNameGDML","");
144  m_FieldFile = p.getUntrackedParameter<std::string>("FileNameField","");
145  if("" != m_FieldFile) { m_FieldFile += ".txt"; }
146 
147  m_userRunAction = 0;
148  m_runInterface = 0;
149 
150  //Look for an outside SimActivityRegistry
151  // this is used by the visualization code
152  edm::Service<SimActivityRegistry> otherRegistry;
153  if(otherRegistry){
154  m_registry.connect(*otherRegistry);
155  }
156 
158 
160  m_InTag = m_pGenerator.getParameter<std::string>("HepMCProductLabel") ;
161 
162 }
163 
165 {
166  if (!m_runTerminated) { terminateRun(); }
167  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
168  G4GeometryManager::GetInstance()->OpenGeometry();
169  // if (m_kernel!=0) delete m_kernel;
170  delete m_runInterface;
171 }
172 
174 {
175  bool geomChanged = idealGeomRcdWatcher_.check(es);
176  if (geomChanged && (!firstRun)) {
177  throw cms::Exception("BadConfig")
178  << "[SimG4Core RunManagerMT]\n"
179  << "The Geometry configuration is changed during the job execution\n"
180  << "this is not allowed, the geometry must stay unchanged\n";
181  }
182  if (m_pUseMagneticField) {
183  bool magChanged = idealMagRcdWatcher_.check(es);
184  if (magChanged && (!firstRun)) {
185  throw cms::Exception("BadConfig")
186  << "[SimG4Core RunManagerMT]\n"
187  << "The MagneticField configuration is changed during the job execution\n"
188  << "this is not allowed, the MagneticField must stay unchanged\n";
189  }
190  }
191 
192  if (m_managerInitialized) return;
193 
194  // DDDWorld: get the DDCV from the ES and use it to build the World
196  es.get<IdealGeometryRecord>().get(pDD);
197 
199  SensitiveDetectorCatalog catalog_;
200  const DDDWorld * world = new DDDWorld(&(*pDD), map_, catalog_, m_check);
202 
203  if("" != m_WriteFile) {
204  G4GDMLParser gdml;
205  gdml.Write(m_WriteFile, world->GetWorldVolume());
206  }
207 
209  {
210  // setup the magnetic field
212  es.get<IdealMagneticFieldRecord>().get(pMF);
213  const GlobalPoint g(0.,0.,0.);
214 
215  m_fieldBuilder = new sim::FieldBuilder(&(*pMF), m_pField);
216  G4TransportationManager * tM =
217  G4TransportationManager::GetTransportationManager();
218  m_fieldBuilder->build( tM->GetFieldManager(),
219  tM->GetPropagatorInField());
220  if("" != m_FieldFile) {
221  DumpMagneticField(tM->GetFieldManager()->GetDetectorField());
222  }
223  }
224 
225  // we need the track manager now
226  m_trackManager = std::auto_ptr<SimTrackManager>(new SimTrackManager);
227 
228  // attach sensitive detector
229  m_attach = new AttachSD;
230 
231  std::pair< std::vector<SensitiveTkDetector*>,
232  std::vector<SensitiveCaloDetector*> > sensDets =
233  m_attach->create(*world,(*pDD),catalog_,m_p,m_trackManager.get(),
234  m_registry);
235 
236  m_sensTkDets.swap(sensDets.first);
237  m_sensCaloDets.swap(sensDets.second);
238 
239  edm::LogInfo("SimG4CoreApplication")
240  << " RunManagerMT: Sensitive Detector "
241  << "building finished; found "
242  << m_sensTkDets.size()
243  << " Tk type Producers, and "
244  << m_sensCaloDets.size()
245  << " Calo type producers ";
246 
248  es.get<PDTRecord>().get(fTable);
249  const HepPDT::ParticleDataTable *fPDGTable = &(*fTable);
250 
252 
253  std::auto_ptr<PhysicsListMakerBase>
254  physicsMaker(PhysicsListFactory::get()->create(
255  m_pPhysics.getParameter<std::string> ("type")));
256  if (physicsMaker.get()==0) {
257  throw SimG4Exception("Unable to find the Physics list requested");
258  }
259  m_physicsList =
260  physicsMaker->make(map_,fPDGTable,m_fieldBuilder,m_pPhysics,m_registry);
261 
262  PhysicsList* phys = m_physicsList.get();
263  if (phys==0) {
264  throw SimG4Exception("Physics list construction failed!");
265  }
266 
267  // adding GFlash, Russian Roulette for eletrons and gamma,
268  // step limiters on top of any Physics Lists
269  phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions",m_pPhysics));
270 
271  m_kernel->SetPhysics(phys);
272  m_kernel->InitializePhysics();
273 
274  m_physicsList->ResetStoredInAscii();
275  std::string tableDir = m_PhysicsTablesDir;
277  m_physicsList->SetPhysicsTableRetrieved(tableDir);
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  for (unsigned it=0; it<m_G4Commands.size(); it++) {
301  edm::LogInfo("SimG4CoreApplication") << "RunManagerMT:: Requests UI: "
302  << m_G4Commands[it];
303  G4UImanager::GetUIpointer()->ApplyCommand(m_G4Commands[it]);
304  }
305 
306  // If the Geant4 particle table is needed, decomment the lines below
307  //
308  // G4cout << "Output of G4ParticleTable DumpTable:" << G4endl;
309  // G4ParticleTable::GetParticleTable()->DumpTable("ALL");
310 
311  initializeRun();
312  firstRun= false;
313 }
314 
316 {
317  //std::cout << "RunManagerMT::stopG4" << std::endl;
318  G4StateManager::GetStateManager()->SetNewState(G4State_Quit);
319  if (!m_runTerminated) { terminateRun(); }
320 }
321 
323 {
324  m_currentEvent = generateEvent(inpevt);
325  m_simEvent = new G4SimEvent;
328  if (m_generator->genVertex() !=0 ) {
331  m_generator->genVertex()->y()/centimeter,
332  m_generator->genVertex()->z()/centimeter,
333  m_generator->genVertex()->t()/second));
334  }
335  if (m_currentEvent->GetNumberOfPrimaryVertex()==0) {
336  edm::LogError("SimG4CoreApplication")
337  << " RunManagerMT::produce event " << inpevt.id().event()
338  << " with no G4PrimaryVertices \n Aborting Run" ;
339 
340  abortRun(false);
341  } else {
342  m_kernel->GetEventManager()->ProcessOneEvent(m_currentEvent);
343  }
344 
345  edm::LogInfo("SimG4CoreApplication")
346  << " RunManagerMT: saved : Event " << inpevt.id().event()
347  << " of weight " << m_simEvent->weight()
348  << " with " << m_simEvent->nTracks() << " tracks and "
349  << m_simEvent->nVertices()
350  << " vertices, generated by " << m_simEvent->nGenParts() << " particles ";
351 }
352 
354 {
355  if (m_currentEvent!=0) { delete m_currentEvent; }
356  m_currentEvent = 0;
357  if (m_simEvent!=0) { delete m_simEvent; }
358  m_simEvent = 0;
359  G4Event * evt = new G4Event(inpevt.id().event());
360 
362 
363  inpevt.getByLabel( m_InTag, HepMCEvt ) ;
364 
365  m_generator->setGenEvent(HepMCEvt->GetEvent());
366 
367  // required to reset the GenParticle Id for particles transported
368  // along the beam pipe
369  // to their original value for SimTrack creation
370  resetGenParticleId( inpevt );
371 
372  if (!m_nonBeam)
373  {
374  m_generator->HepMC2G4(HepMCEvt->GetEvent(),evt);
375  }
376  else
377  {
378  m_generator->nonBeamEvent2G4(HepMCEvt->GetEvent(),evt);
379  }
380 
381  return evt;
382 }
383 
385 {
386  if (m_runTerminated) { return; }
387  G4Track* t =
388  m_kernel->GetEventManager()->GetTrackingManager()->GetTrack();
389  t->SetTrackStatus(fStopAndKill) ;
390 
391  // CMS-specific act
392  //
393  TrackingAction* uta =
394  (TrackingAction*)m_kernel->GetEventManager()->GetUserTrackingAction() ;
395  uta->PostUserTrackingAction(t) ;
396 
397  m_currentEvent->SetEventAborted();
398 
399  // do NOT call this method for now
400  // because it'll set abortRequested=true (withing G4EventManager)
401  // this will make Geant4, in the event *next* after the aborted one
402  // NOT to get the primamry, thus there's NOTHING to trace, and it goes
403  // to the end of G4Event::DoProcessing(G4Event*), where abortRequested
404  // will be reset to true again
405  //
406  //m_kernel->GetEventManager()->AbortCurrentEvent();
407  //
408  // instead, mimic what it does, except (re)setting abortRequested
409  //
410  m_kernel->GetEventManager()->GetStackManager()->clear() ;
411  m_kernel->GetEventManager()->GetTrackingManager()->EventAborted() ;
412 
413  G4StateManager* stateManager = G4StateManager::GetStateManager();
414  stateManager->SetNewState(G4State_GeomClosed);
415 }
416 
418 {
419  m_runInterface = new SimRunInterface(this, false);
420 
423 
424  G4EventManager * eventManager = m_kernel->GetEventManager();
425  eventManager->SetVerboseLevel(m_EvtMgrVerbosity);
426 
427  if (m_generator!=0) {
428  EventAction * userEventAction =
430  Connect(userEventAction);
431  eventManager->SetUserAction(userEventAction);
432 
433  TrackingAction* userTrackingAction =
434  new TrackingAction(userEventAction,m_pTrackingAction);
435  Connect(userTrackingAction);
436  eventManager->SetUserAction(userTrackingAction);
437 
438  SteppingAction* userSteppingAction =
439  new SteppingAction(userEventAction,m_pSteppingAction);
440  Connect(userSteppingAction);
441  eventManager->SetUserAction(userSteppingAction);
442 
443  eventManager->SetUserAction(new StackingAction(m_pStackingAction));
444 
445  } else {
446  edm::LogWarning("SimG4CoreApplication") << " RunManagerMT: WARNING : "
447  << "No generator; initialized "
448  << "only RunAction!";
449  }
450 }
451 
453 {
454  m_runInitialized = false;
455  if (m_currentRun==0) { m_currentRun = new G4Run(); }
456  G4StateManager::GetStateManager()->SetNewState(G4State_GeomClosed);
458  m_runAborted = false;
459  m_runInitialized = true;
460 }
461 
463 {
464  if (m_userRunAction!=0) {
466  delete m_userRunAction;
467  m_userRunAction = 0;
468  }
469  /*
470  if (m_currentRun!=0) {
471  delete m_currentRun;
472  m_currentRun = 0;
473  }
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 RunManagerMT::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 
523 {
526 }
527 
529 {
531 }
532 
533 void RunManagerMT::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  << " RunManagerMT 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 }
void Connect(RunAction *)
bool m_managerInitialized
Definition: RunManagerMT.h:114
AttachSD * m_attach
Definition: RunManagerMT.h:147
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:44
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
edm::ParameterSet m_pStackingAction
Definition: RunManagerMT.h:140
G4SimEvent * m_simEvent
Definition: RunManagerMT.h:122
SimTrackManager * GetSimTrackManager()
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:30
const G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:17
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
edm::ParameterSet m_pRunAction
Definition: RunManagerMT.h:138
edm::ESWatcher< IdealMagneticFieldRecord > idealMagRcdWatcher_
Definition: RunManagerMT.h:159
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:29
void initG4(const edm::EventSetup &es)
void abortEvent()
SimActivityRegistry::G4StepSignal m_g4StepSignal
std::vector< SensitiveCaloDetector * > m_sensCaloDets
Definition: RunManagerMT.h:149
edm::ParameterSet m_pGenerator
Definition: RunManagerMT.h:135
HepPDT::ParticleDataTable ParticleDataTable
void connect(Observer< const BeginOfJob * > *iObject)
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:102
EndOfEventSignal endOfEventSignal_
void terminateRun()
std::auto_ptr< SimTrackManager > m_trackManager
Definition: RunManagerMT.h:155
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void abortRun(bool softAbort=false)
PrimaryTransformer * m_primaryTransformer
Definition: RunManagerMT.h:113
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:23
ExceptionHandler * m_CustomExceptionHandler
Definition: RunManagerMT.h:145
bool m_runTerminated
Definition: RunManagerMT.h:116
sim::FieldBuilder * m_fieldBuilder
Definition: RunManagerMT.h:156
void build(G4FieldManager *fM=0, G4PropagatorInField *fP=0)
Definition: FieldBuilder.cc:47
BeginOfRunSignal beginOfRunSignal_
string firstRun
Definition: dataset.py:402
bool m_runInitialized
Definition: RunManagerMT.h:115
std::vector< std::string > m_G4Commands
Definition: RunManagerMT.h:143
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:46
G4Run * m_currentRun
Definition: RunManagerMT.h:120
void initializeUserActions()
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
int m_EvtMgrVerbosity
Definition: RunManagerMT.h:131
std::string m_WriteFile
Definition: RunManagerMT.h:164
RunManagerMT(edm::ParameterSet const &p)
BeginOfJobSignal beginOfJobSignal_
U second(std::pair< T, U > const &p)
std::vector< SensitiveTkDetector * > m_sensTkDets
Definition: RunManagerMT.h:148
void weight(float w)
Definition: G4SimEvent.h:27
Generator * m_generator
Definition: RunManagerMT.h:108
void initializeRun()
G4Event * m_currentEvent
Definition: RunManagerMT.h:121
static void createWatchers(const edm::ParameterSet &iP, SimActivityRegistry &iReg, std::vector< boost::shared_ptr< SimWatcher > > &oWatchers, std::vector< boost::shared_ptr< SimProducer > > &oProds)
Definition: RunManagerMT.cc:75
edm::ParameterSet m_pTrackingAction
Definition: RunManagerMT.h:141
G4RunManagerKernel * m_kernel
Definition: RunManagerMT.h:106
std::vector< boost::shared_ptr< SimProducer > > m_producers
Definition: RunManagerMT.h:153
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_pUseMagneticField
Definition: RunManagerMT.h:119
edm::ParameterSet m_p
Definition: RunManagerMT.h:144
void hepEvent(const HepMC::GenEvent *r)
Definition: G4SimEvent.h:25
edm::InputTag m_theLHCTlinkTag
Definition: RunManagerMT.h:161
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:25
BeginOfEventSignal beginOfEventSignal_
SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal
void EndOfRunAction(const G4Run *aRun)
Definition: RunAction.cc:28
bool isValid() const
Definition: HandleBase.h:76
EndOfRunSignal endOfRunSignal_
edm::ParameterSet m_pSteppingAction
Definition: RunManagerMT.h:142
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
unsigned int nTracks() const
Definition: G4SimEvent.h:22
std::vector< boost::shared_ptr< SimWatcher > > m_watchers
Definition: RunManagerMT.h:152
void DumpMagneticField(const G4Field *) const
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:59
unsigned int nVertices() const
Definition: G4SimEvent.h:23
tuple out
Definition: dbtoconf.py:99
bool m_StorePhysicsTables
Definition: RunManagerMT.h:129
std::auto_ptr< PhysicsList > m_physicsList
Definition: RunManagerMT.h:112
std::string m_FieldFile
Definition: RunManagerMT.h:163
edm::ParameterSet m_pField
Definition: RunManagerMT.h:134
virtual void PostUserTrackingAction(const G4Track *aTrack)
unsigned int nGenParts() const
Definition: G4SimEvent.h:24
edm::ParameterSet m_pPhysics
Definition: RunManagerMT.h:137
void BeginOfRunAction(const G4Run *aRun)
Definition: RunAction.cc:16
DDDWorldSignal dddWorldSignal_
std::string m_InTag
Definition: RunManagerMT.h:109
const T & get() const
Definition: EventSetup.h:55
bool m_RestorePhysicsTables
Definition: RunManagerMT.h:130
T const * product() const
Definition: Handle.h:81
void nonBeamEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:545
edm::ParameterSet m_pEventAction
Definition: RunManagerMT.h:139
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:58
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:22
edm::EventID id() const
Definition: EventBase.h:56
G4Event * generateEvent(edm::Event &inpevt)
std::string m_PhysicsTablesDir
Definition: RunManagerMT.h:128
edm::ESWatcher< IdealGeometryRecord > idealGeomRcdWatcher_
Definition: RunManagerMT.h:158
dbl *** dir
Definition: mlp_gen.cc:35
volatile std::atomic< bool > shutdown_flag false
EndOfTrackSignal endOfTrackSignal_
RunAction * m_userRunAction
Definition: RunManagerMT.h:123
void produce(edm::Event &inpevt, const edm::EventSetup &es)
void resetGenParticleId(edm::Event &inpevt)
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: G4SimEvent.h:29
SurfaceDeformation * create(int type, const std::vector< double > &params)
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:45
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
SimRunInterface * m_runInterface
Definition: RunManagerMT.h:124
BeginOfTrackSignal beginOfTrackSignal_
SimActivityRegistry m_registry
Definition: RunManagerMT.h:151
Definition: DDAxes.h:10
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal