G4XTankSimulator.cc
Go to the documentation of this file.
1 #include "G4XTankSimulator.h"
3 #include "G4XTankPhysicsList.h"
4 #include "G4XTankConstruction.h"
9 #include "G4XTankEventAction.h"
10 #include "G4XTankRunAction.h"
11 #include "G4XTankVisManager.h"
12 #include "G4XTankFastCerenkov.h"
13 #include "G4XTankPMT.h"
14 #include "G4XOutputHandler.h"
15 
16 
17 #include <G4RunManager.hh>
18 #include <G4UImanager.hh>
19 #include <G4VisManager.hh>
20 
21 #include <fwk/CentralConfig.h>
22 #include <fwk/RandomEngineRegistry.h>
23 
24 #include <det/Detector.h>
25 
26 #include <evt/Event.h>
27 #include <evt/ShowerSimData.h>
28 
29 #include <sdet/SDetector.h>
30 #include <sdet/Station.h>
31 
32 #include <sevt/PMT.h>
33 #include <sevt/PMTSimData.h>
34 #include <sevt/SEvent.h>
35 #include <sevt/Station.h>
36 #include <sevt/StationSimData.h>
37 
38 #include <mevt/MEvent.h>
39 #include <mevt/CounterSimData.h>
40 #include <mdet/MDetector.h>
41 #include <mdet/Counter.h>
42 
43 #include <utl/ErrorLogger.h>
44 #include <utl/Reader.h>
45 #include <utl/Particle.h>
46 #include <utl/ShowerParticleIterator.h>
47 #include <utl/TimeDistribution.h>
48 #include <utl/TimeDistributionAlgorithm.h>
49 #include <utl/ParticleCases.h>
50 
51 #include <cstddef>
52 #include <iostream>
53 #include <sstream>
54 
55 #include <CLHEP/Random/Random.h>
56 
57 #include <tls/Geant4Manager.h>
58 
59 using namespace utl;
60 using namespace fwk;
61 using namespace std;
62 using namespace sevt;
63 using namespace sdet;
64 using namespace mevt;
65 using namespace mdet;
66 using namespace evt;
67 using namespace det;
68 using namespace G4XTankSimulatorAG;
69 
70 
71 G4XTankPMT* G4XTankSimulator::fgPMTAction = nullptr;
72 const sdet::Station* G4XTankSimulator::fCurrentDetectorStation = nullptr;
73 SEvent::StationIterator G4XTankSimulator::fCurrentEventStationIt;
74 StationSimData::ParticleIterator G4XTankSimulator::fCurrentParticleIt;
75 
76 bool G4XTankSimulator::fgMuCapture = false;
77 
78 
80 G4XTankSimulator::GetComponentId(const StationSimData::ConstParticleIterator curParticle)
81 {
82  switch (curParticle->GetType()) {
83  case OFFLINE_ELECTRONS:
85  case OFFLINE_PHOTON:
87  case OFFLINE_MUONS:
89  case OFFLINE_HADRONS:
91  default:
93  }
94 }
95 
96 
99 {
100  Branch topB = CentralConfig::GetInstance()->GetTopBranch("G4XTankSimulator");
101 
102  AttributeMap useAtt;
103  useAtt["use"] = "yes";
104 
105  Branch OnGrdB = topB.GetChild("storeOnGrdParticles", useAtt);
106  if (OnGrdB) {
107  fStoreOnGrdPart = true;
108  cout << "Particles on ground will be stored in Counter particle list structure X-XX\n";
109  }
110 
111  Branch visB = topB.GetChild("visualization");
112 
113  visB.GetChild("geometry").GetData(fGeoVisOn);
114  visB.GetChild("trajectories").GetData(fTrajVisOn);
115 
116  Branch fastModeB = topB.GetChild("fastMode");
117  fastModeB.GetData(fFastMode);
118 
119  Branch muCaptureB = topB.GetChild("muCapture");
120  muCaptureB.GetData(fgMuCapture);
121 
122  Branch globalPhysicsListB = topB.GetChild("globalPhysicsList");
123  if (globalPhysicsListB)
124  globalPhysicsListB.GetData(fUseGlobalPhysicsList);
125 
126  if ((fGeoVisOn || fTrajVisOn) && !fVisManager)
127  fVisManager = new G4XTankVisManager;
128 
129  if (!fRunManager) {
130  if (fUseGlobalPhysicsList)
131  fRunManager = tls::Geant4Manager::GetInstance().GetRunManager();
132  else
133  fRunManager = new G4RunManager;
134  }
135 
136  fUImanager = G4UImanager::GetUIpointer();
137 
138  G4XOutputHandler* const logger = new G4XOutputHandler();
139  fUImanager->SetCoutDestination(logger);
140 
141  //Setting up counters' depth
142  const SDetector& sDetector = Detector::GetInstance().GetSDetector();
143  SDetector::StationIterator sIt = sDetector.StationsBegin();
144  ostringstream ss;
145 
146  while (sIt != sDetector.StationsEnd()) {
147 
148  if (sIt->ExistsAssociatedCounter()) {
149  fCurrentDetectorStation = &(*sIt);
150  ss.str("");
151  ss << "Station " << fCurrentDetectorStation->GetId() << " has associated counter";
152  INFO(ss);
153  break;
154  }
155 
156  ++sIt;
157  }
158 
159  if (!fCurrentDetectorStation) {
160  ERROR("Could not find any station with an associated muon counter");
161  return eFailure;
162  }
163 
164  const MDetector& mDetector = det::Detector::GetInstance().GetMDetector();
165  const mdet::Counter& currentCounter = mDetector.GetCounter(fCurrentDetectorStation->GetAssociatedCounterId());
166  const mdet::Module& module = *(currentCounter.ModulesBegin());
167 
168  const CoordinateSystemPtr dStationCS = fCurrentDetectorStation->GetLocalCoordinateSystem();
169  double CtrDepth = -1 * currentCounter.GetPosition().GetZ(dStationCS) / utl::m*CLHEP::m;
170  double ModDepth = -1 * module.GetPosition().GetZ(dStationCS) / utl::m*CLHEP::m;
171 
172  ss.str("");
173  ss << "\n"
174  "Counter depth: " << CtrDepth/CLHEP::m << " m\n"
175  "Module depth: " << ModDepth/CLHEP::m << " m\n"
176  "-> Using " << (CtrDepth>ModDepth ? "Counter" : "Module") << " depth";
177  INFO(ss);
178 
179  fDepth = CtrDepth > ModDepth ? CtrDepth : ModDepth;
180 
181  if (fUseGlobalPhysicsList) {
182  INFO("using global PhysicsList from Geant4Manager");
183  tls::Geant4Manager::GetInstance().AddVisManager(fVisManager);
184 
185  fUImanager->ApplyCommand("/run/verbose 0");
186  fUImanager->ApplyCommand("/event/verbose 0");
187  fUImanager->ApplyCommand("/tracking/verbose 0");
188  fUImanager->ApplyCommand("/stepping/verbose 0");
189 
190  G4XTankPhysicsListCustomization* const physicsListCustomization = new G4XTankPhysicsListCustomization(fFastMode);
191 
192  INFO("Constructing G4XTank");
193 
194  fgTankConstruction = new G4XTankConstruction( fDepth ); //reads fCurrentDetectorStation
195 
196  tls::Geant4Customization custom("G4XTankSimulator", fgTankConstruction, physicsListCustomization);
198  fStackingAction = new G4XTankStackingAction();
199  custom.SetStackingAction(fStackingAction);
201  fSteppingAction = new G4XTankSteppingAction();
202  custom.SetSteppingAction(fSteppingAction);
204  custom.SetRunAction(new G4XTankRunAction);
205 
206  tls::Geant4Manager::GetInstance().AddCustomization(custom);
207 
208  } else {
209 
210  INFO("using PhysicsList from G4XTankPhysicsList");
211  fRunManager->SetUserInitialization(new G4XTankPhysicsList(fFastMode));
212 
213  fRunManager->SetUserAction(new G4XTankPrimaryGenerator);
214 
215  fStackingAction = new G4XTankStackingAction();
216  fRunManager->SetUserAction(fStackingAction);
217  fRunManager->SetUserAction(new G4XTankTrackingAction);
218  fSteppingAction = new G4XTankSteppingAction();
219  fRunManager->SetUserAction(fSteppingAction);
220  fRunManager->SetUserAction(new G4XTankEventAction);
221  fRunManager->SetUserAction(new G4XTankRunAction);
222 
223  fUImanager->ApplyCommand("/run/verbose 0");
224  fUImanager->ApplyCommand("/event/verbose 0");
225  fUImanager->ApplyCommand("/tracking/verbose 0");
226  fUImanager->ApplyCommand("/stepping/verbose 0");
227  }
228 
229  fDetectorConstructed = false;
230 
231  return eSuccess;
232 }
233 
234 
236 G4XTankSimulator::Run(Event& event)
237 {
238  if (!event.HasSEvent()) {
239  ERROR("SEvent does not exist.");
240  return eFailure;
241  }
242 
243  CLHEP::HepRandom::setTheEngine(&RandomEngineRegistry::GetInstance().
244  Get(RandomEngineRegistry::eDetector).
245  GetEngine());
246 
247  SEvent& sEvent = event.GetSEvent();
248 
249  if (!fDetectorConstructed && sEvent.GetNumberOfStations() > 0) {
250 
251  if (!fUseGlobalPhysicsList) {
252  INFO("Constructing G4XTank");
253 
254  const SEvent::ConstStationIterator sIt = sEvent.StationsBegin();
255  if (sIt == sEvent.StationsEnd()) {
256  ERROR("No stations!");
257  return eFailure;
258  }
259 
260  fgTankConstruction = new G4XTankConstruction(fDepth); // reads fCurrentDetectorStation
261 
262  // Construct detector geometry and register w/ RunManager
263  fRunManager->SetUserInitialization(fgTankConstruction); // reads fCurrentDetectorStation
264 
265  fRunManager->Initialize();
266  }
267 
268  fDetectorConstructed = true;
269 
270  if (fGeoVisOn || fTrajVisOn) {
271  fVisManager->Initialize();
272  fUImanager->ApplyCommand("/vis/open VRML2FILE");
273  fUImanager->ApplyCommand("/vis/scene/create");
274  fUImanager->ApplyCommand("/vis/sceneHandler/attach");
275  fUImanager->ApplyCommand("/vis/scene/add/volume");
276  fUImanager->ApplyCommand("/vis/viewero/set/style/wireframe");
277  fUImanager->ApplyCommand("/vis/drawVolume");
278  fUImanager->ApplyCommand("/vis/scene/notifyHandlers");
279  fUImanager->ApplyCommand("/vis/viewer/update");
280  }
281  if (fTrajVisOn) {
282  fUImanager->ApplyCommand("/tracking/storeTrajectory 1");
283  fUImanager->ApplyCommand("/vis/scene/add/trajectories");
284  }
285 
286  }
287 
288  if (fUseGlobalPhysicsList)
289  tls::Geant4Manager::GetInstance().Customize("G4XTankSimulator");
290 
291  return fFastMode ? RunFast(event) : RunFull(event);
292 }
293 
294 
296 G4XTankSimulator::RunFull(Event& event)
297 {
298  // Get the SEvent
299  SEvent& sEvent = event.GetSEvent();
300 
301  // Get the SDetector
302  const SDetector& sDetector = Detector::GetInstance().GetSDetector();
303 
304  // Get MEvent
305  if (!event.HasMEvent())
306  event.MakeMEvent();
307 
308  MEvent& mEvent = event.GetMEvent();
309 
310  for (SEvent::StationIterator sIt = sEvent.StationsBegin();
311  sIt != sEvent.StationsEnd(); ++sIt) {
312 
313  if (!fDetectorConstructed) {
314  ERROR("The detector hasn't been initialized when looping over stations");
315  return eFailure;
316  }
317 
318  if (sIt->HasSimData()) {
319 
320  StationSimData& simData = sIt->GetSimData();
321 
322  // full-blown tank sim (no optimization of photon tracking)
323  simData.SetSimulatorSignature("G4TankSimulatorFullOG");
324 
325  const int stationId = sIt->GetId();
326 
327  const unsigned long numParticles = simData.ParticlesEnd() - simData.ParticlesBegin();
328 
329  if (numParticles)
330  G4cerr << "On ground -> StatId " << stationId << ':' << numParticles << " particle(s)" << flush;
331  else
332  continue;
333 
334  fCurrentEventStationIt = sIt;
335  fCurrentDetectorStation = &sDetector.GetStation(stationId);
336  fStackingAction->SetStation(fCurrentDetectorStation);
337 
338  ConstructTraces(*sIt);
339 
340  //Check what happened in the associated muon counter
341  if (!fCurrentDetectorStation->ExistsAssociatedCounter())
342  continue;
343 
344  // Get the associated muon counter ID
345  const int mId = fCurrentDetectorStation->GetAssociatedCounterId();
346 
347  // Get the counter
348  if (!mEvent.HasCounter(mId))
349  mEvent.MakeCounter(mId);
350 
351  mevt::Counter& eCounter = mEvent.GetCounter(mId);
352 
353  // Get the counterSimData
354  if (!eCounter.HasSimData())
355  eCounter.MakeSimData();
356 
357  CounterSimData& cSim = eCounter.GetSimData();
358 
359  // Get the muon counter depth
360  fSteppingAction->fCounterDepth = -fDepth;
361 
362  // Run the particle propagation
364  pIt != simData.ParticlesEnd(); ++pIt) {
365 
366  fCurrentParticleIt = pIt;
367  smartPointer parent(new Particle(*fCurrentParticleIt));
368  fSteppingAction->SetImpingingParticle(parent);
369 
370  if (fStoreOnGrdPart) {
371  Particle part = *fCurrentParticleIt;
372  cSim.AddGrdParticle(part);
373  }
374 
375  fRunManager->BeamOn(1);
376 
377  }
378 
379  cout << fSteppingAction->fPartColl.size() << " particles underground at the counter's depth "
380  << fSteppingAction->fCounterDepth/CLHEP::m << " m"
381  " on station number " << sIt->GetId() << " ";
382 
383  const CoordinateSystemPtr CounterCS = fCurrentDetectorStation->GetLocalCoordinateSystem();
385 
386  unsigned int muons_ugrd = 0;
387  //Fill the CounterSimData with the particles which reached the counters depth
388  for (pCollIt = fSteppingAction->fPartColl.begin(); pCollIt != fSteppingAction->fPartColl.end(); ++pCollIt) {
389  PartData pData = (*pCollIt);
390  /*
391  cout << "pData.Pname " << pData.Pname << " - " << pData.KinE/CLHEP::MeV << " (MeV)" << endl;
392  cout << "pData.PDGCode " << pData.PDGCode << " - " << pData.Time/CLHEP::ns << " (ns)" << endl;
393  cout << "pData.PParent->GetType() " << pData.PParent->GetType() << " - " << (pData.PParent->GetType()==utl::Particle::eMuon||pData.PParent->GetType()==utl::Particle::eAntiMuon?"SHOWER MUON!!!!":"OTHER PARTICLE")<< endl;
394  cout << "pData.TrackID " << pData.TrackID << endl;
395 
396  cout << "pData.x " << pData.x/CLHEP::m << endl;
397  cout << "pData.y " << pData.y/CLHEP::m << endl;
398  cout << "pData.z " << pData.z/CLHEP::m << endl;
399 
400  cout << "pData.px " << pData.px << endl;
401  cout << "pData.py " << pData.py << endl;
402  cout << "pData.pz " << pData.pz << endl;
403  */
404  if (pData.PParent->GetType() == utl::Particle::eMuon ||
405  pData.PParent->GetType() == utl::Particle::eAntiMuon)
406  ++muons_ugrd;
407 
408  Point pPos(pData.x / CLHEP::m * utl::m, pData.y / CLHEP::m * utl::m, pData.z / CLHEP::m * utl::m, CounterCS);
409  Vector pDir(pData.px, pData.py, pData.pz, CounterCS);
410  //Creates new particle
411  Particle part(pData.PDGCode, utl::Particle::eShower, pPos, pDir, pData.Time / CLHEP::ns * utl::ns,
412  1, pData.KinE/CLHEP::MeV * utl::MeV );
413  part.SetParent(*pData.PParent);
414  cSim.AddUGrdParticle(part);
415  }
416  cout << "out of which " << muons_ugrd << " are muons\n";
417  fSteppingAction->fPartColl.clear();
418 
419  }
420  }
421 
422  return eSuccess;
423 }
424 
425 
427 G4XTankSimulator::RunFast(Event& event)
428 {
429  SEvent& sEvent = event.GetSEvent();
430  const SDetector& sDetector = Detector::GetInstance().GetSDetector();
431 
432  // Get the MEvent
433  if (!event.HasMEvent())
434  event.MakeMEvent();
435  MEvent& mEvent = event.GetMEvent();
436 
437  // find first station with SimData
438  for (fCurrentEventStationIt = sEvent.StationsBegin();
439  fCurrentEventStationIt != sEvent.StationsEnd() &&
440  !fCurrentEventStationIt->HasSimData(); ++fCurrentEventStationIt)
441  void(0); // <-- no-op
442 
443  if (fCurrentEventStationIt == sEvent.StationsEnd()) {
444  INFO("No stations with SimData found.");
445  return eContinueLoop;
446  }
447 
448  const int id = fCurrentEventStationIt->GetId();
449  fCurrentDetectorStation = &sDetector.GetStation(id);
450 
451  if (!fDetectorConstructed) {
452 
453  fgTankConstruction = new G4XTankConstruction(fDepth); // reads fCurrentDetectorStation
454 
455  // Construct detector geometry and register w/ RunManager
456  fRunManager->SetUserInitialization(fgTankConstruction); // reads fCurrentDetectorStation
457 
458  fRunManager->Initialize();
459  fDetectorConstructed = true;
460  }
461  fgPMTAction = new G4XTankPMT();
462 
463  for (SEvent::StationIterator sIt = sEvent.StationsBegin();
464  sIt != sEvent.StationsEnd(); ++sIt) {
465 
466  if (!sIt->HasSimData())
467  continue;
468 
469  StationSimData& simData = sIt->GetSimData();
470 
471  simData.SetSimulatorSignature("G4TankSimulatorOG");
472 
473  const unsigned long numParticles =
474  simData.ParticlesEnd() - simData.ParticlesBegin();
475 
476  const int stationId = sIt->GetId();
477 
478  if (numParticles)
479  G4cerr << "On ground -> StatId " << stationId << ':' << numParticles << " particle(s)" << flush;
480  else
481  continue;
482 
483  fCurrentEventStationIt = sIt;
484  fCurrentDetectorStation = &sDetector.GetStation(stationId);
485 
486  ConstructTraces(*sIt);
487 
488  // Check what happened in the associated muon counter
489  if (!fCurrentDetectorStation->ExistsAssociatedCounter())
490  continue;
491 
492  // Get the associated muon counter ID
493  const int mId = fCurrentDetectorStation->GetAssociatedCounterId();
494 
495  // Get the counter
496  if (!mEvent.HasCounter(mId))
497  mEvent.MakeCounter(mId);
498 
499  mevt::Counter& eCounter = mEvent.GetCounter(mId);
500 
501  // Get the counterSimData
502  if (!eCounter.HasSimData())
503  eCounter.MakeSimData();
504 
505  CounterSimData& cSim = eCounter.GetSimData();
506 
507  const CoordinateSystemPtr dStationCS =
508  sDetector.GetStation(stationId).GetLocalCoordinateSystem();
509 
510  // Get the muon counter depth
511  fSteppingAction->fCounterDepth = -fDepth;
512 
513  // prod the Cerenkov process update it's tank description data
514  G4XTankFastCerenkov::GetDataFromConstruction();
515 
517  pIt != simData.ParticlesEnd(); ++pIt) {
518 
519  fCurrentParticleIt = pIt;
520  smartPointer parent(new Particle(*fCurrentParticleIt));
521  fSteppingAction->SetImpingingParticle(parent);
522 
523  fgPMTAction->SetCurrentTank(fCurrentEventStationIt);
524  fgPMTAction->SetParticle(*fCurrentParticleIt);
525 
526  if (fStoreOnGrdPart) {
527  Particle part = *fCurrentParticleIt;
528  cSim.AddGrdParticle(part);
529  }
530 
531  fRunManager->BeamOn(1);
532 
533  } // particles
534 
535  cout << fSteppingAction->fPartColl.size() << " particles underground at the counter's depth "
536  << fSteppingAction->fCounterDepth/CLHEP::m << " m"
537  " on station number " << sIt->GetId() << " ";
538 
539  const CoordinateSystemPtr CounterCS = fCurrentDetectorStation->GetLocalCoordinateSystem();
541 
542  unsigned int muons_ugrd = 0;
543  // Fill the CounterSimData with the particles which reached the counters depth
544  for (pCollIt = fSteppingAction->fPartColl.begin(); pCollIt != fSteppingAction->fPartColl.end(); ++pCollIt) {
545  PartData pData = (*pCollIt);
546  /*
547  cout << "pData.Pname " << pData.Pname << " - " << pData.KinE/CLHEP::MeV << " (MeV)" << endl;
548  cout << "pData.PDGCode " << pData.PDGCode << " - " << pData.Time/CLHEP::ns << " (ns)" << endl;
549  cout << "pData.PParent->GetType() " << pData.PParent->GetType() << " - " << (pData.PParent->GetType()==utl::Particle::eMuon||pData.PParent->GetType()==utl::Particle::eAntiMuon?"SHOWER MUON!!!!":"OTHER PARTICLE")<< endl;
550  cout << "pData.TrackID " << pData.TrackID << endl;
551 
552  cout << "pData.x " << pData.x/CLHEP::m << endl;
553  cout << "pData.y " << pData.y/CLHEP::m << endl;
554  cout << "pData.z " << pData.z/CLHEP::m << endl;
555 
556  cout << "pData.px " << pData.px << endl;
557  cout << "pData.py " << pData.py << endl;
558  cout << "pData.pz " << pData.pz << endl;
559  */
560  if (pData.PParent->GetType() == utl::Particle::eMuon ||
561  pData.PParent->GetType() == utl::Particle::eAntiMuon)
562  ++muons_ugrd;
563 
564  const Point pPos(pData.x / CLHEP::m * utl::m, pData.y / CLHEP::m * utl::m, pData.z / CLHEP::m * utl::m, CounterCS);
565  Vector pDir(pData.px, pData.py, pData.pz, CounterCS);
566  // Creates new particle
567  Particle part(pData.PDGCode, utl::Particle::eShower, pPos, pDir, pData.Time / CLHEP::ns * utl::ns,
568  1, pData.KinE/CLHEP::MeV * utl::MeV );
569  part.SetParent(*pData.PParent);
570  cSim.AddUGrdParticle(part);
571  }
572 
573  cout << "out of which " << muons_ugrd << " are muons\n";
574  fSteppingAction->fPartColl.clear();
575 
576  } // stations
577 
578  G4cerr << endl;
579 
580  delete fgPMTAction;
581  fgPMTAction = nullptr;
582 
583  return eSuccess;
584 }
585 
586 
588 G4XTankSimulator::Finish()
589 {
590  if (fUseGlobalPhysicsList)
591  tls::Geant4Manager::GetInstance().NotifyDelete();
592  else {
593  if (fRunManager) {
594  delete fRunManager;
595  fRunManager = nullptr;
596  }
597  }
598  return eSuccess;
599 }
600 
601 
602 void
603 G4XTankSimulator::ConstructTraces(sevt::Station& station)
604  const
605 {
606  const StationSimData& sSim = station.GetSimData();
607 
608  // Add pmt sim data only if the station contains particles
609  if (sSim.ParticlesEnd() == sSim.ParticlesBegin())
610  return;
611 
612  for (sevt::Station::PMTIterator pmtIt = station.PMTsBegin();
613  pmtIt != station.PMTsEnd(); ++pmtIt)
614  if (!pmtIt->HasSimData()) {
615  pmtIt->MakeSimData();
616  }
617 }
void SetRunAction(G4UserRunAction *const action)
Branch GetTopBranch() const
Definition: Branch.cc:63
Geant4 Stacking user action class.
Geant4 Tracking user action class.
Station Level Simulated Data
StationIterator StationsEnd()
End of all stations.
Definition: SEvent.h:59
Point object.
Definition: Point.h:32
void AddUGrdParticle(const utl::Particle &particle)
void SetPrimaryGenerator(G4VUserPrimaryGeneratorAction *const action)
bool HasMEvent() const
Detector description interface for Station-related data.
total (shower and background)
int GetNumberOfStations() const
Get total number of stations in the event.
Definition: SEvent.h:124
Counter level event data.
Interface class to access to the SD part of an event.
Definition: SEvent.h:39
Describes a particle for Simulation.
Definition: Particle.h:26
PMTIterator PMTsBegin(const sdet::PMTConstants::PMTType type=sdet::PMTConstants::eWaterCherenkovLarge)
begin PMT iterator for read/write
vector< PartData >::iterator PartCollectionIt
std::map< std::string, std::string > AttributeMap
Definition: Branch.h:24
utl::CoordinateSystemPtr GetLocalCoordinateSystem() const
Local system based on position and configured rotations.
boost::shared_ptr< utl::Particle > smartPointer
void SetStackingAction(G4UserStackingAction *const action)
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
utl::Point GetPosition() const
void Init()
Initialise the registry.
bool HasCounter(const int cId) const
Definition: MEvent.h:43
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Definition: Branch.cc:211
boost::filter_iterator< PMTFilter, InternalPMTIterator > PMTIterator
Iterator over station for read/write.
implementation of G4 visualization manager
Detector associated to muon detector hierarchy.
Definition: MDetector.h:32
void SetSimulatorSignature(const std::string &name)
Set name of the tank simulator module used to simulate this station.
ParticleVector::iterator ParticleIterator
constexpr double MeV
Definition: AugerUnits.h:184
electrons and positrons from shower
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Class representing a document branch.
Definition: Branch.h:107
class to hold data at Station level
const double ns
void SetEventAction(G4UserEventAction *const action)
Geant4 Stepping user action class.
ParticleVector::const_iterator ConstParticleIterator
Array of Scintillator.
StationIterator StationsEnd() const
End of the collection of pointers to commissioned stations.
Definition: SDetector.h:102
utl::CoordinateSystemPtr GetLocalCoordinateSystem() const
Get the Auger reference system centered on the tank.
PMTIterator PMTsEnd(const sdet::PMTConstants::PMTType type=sdet::PMTConstants::eWaterCherenkovLarge)
end PMT iterator for read/write
Geant4 Run user action class.
StationIterator StationsBegin() const
Beginning of the collection of pointers to commissioned stations.
Definition: SDetector.h:97
bool ExistsAssociatedCounter() const
if this Station has an associated muon Counter.
Data structure to hold the different Geant4 global objects required to run a single module...
void GetData(bool &b) const
Overloads of the GetData member template function.
Definition: Branch.cc:644
Root detector of the muon detector hierarchy.
ParticleIterator ParticlesBegin()
Beginning of simulated particles entering the station.
Counter level simulation data.
void SetTrackingAction(G4UserTrackingAction *const action)
void AddGrdParticle(const utl::Particle &particle)
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
Geant4 Event user action class.
StationIterator StationsBegin()
Beginning of all stations.
Definition: SEvent.h:57
Vector object.
Definition: Vector.h:30
ModuleConstIterator ModulesBegin() const
Begin iterator for the Modules contained in the Counter.
Detector description interface for SDetector-related data.
Definition: SDetector.h:42
bool HasSimData() const
class that declares and registers the Geant4 physics classes
boost::indirect_iterator< InternalStationIterator, Station & > StationIterator
Iterator over all stations.
Definition: SEvent.h:52
void MakeCounter(const int cId)
Definition: MEvent.h:40
sevt::StationSimData & GetSimData()
Get simulated data at station level.
constexpr double ns
Definition: AugerUnits.h:162
utl::CoordinateSystemPtr Get(const std::string &id)
Get a well-known Coordinate System.
Counter & GetCounter(const int cId)
Definition: MEvent.h:34
void SetParent(Particle &parent)
Definition: Particle.h:150
double GetZ(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:212
const Station & GetStation(const int stationId) const
Get station by Station Id.
Definition: SDetector.cc:192
const Counter & GetCounter(int id) const
Retrieve Counter by id.
Definition: MDetector.h:68
CounterSimData & GetSimData()
int GetId() const
Station ID.
boost::indirect_iterator< InternalConstStationIterator, const Station & > ConstStationIterator
Definition: SEvent.h:54
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165
ParticleIterator ParticlesEnd()
End of simulated particles entering the station.
constexpr double m
Definition: AugerUnits.h:121
Root of the Muon event hierarchy.
Definition: MEvent.h:25
mu+ and mu- (including signal from mu decay electrons) from shower
bool HasSEvent() const
void SetSteppingAction(G4UserSteppingAction *const action)
allow customization of the standard global PhysicsList that are handled by the Geant4Manager ...

, generated on Tue Sep 26 2023.