4 #include <det/Detector.h>
5 #include <mevt/CounterSimData.h>
7 #include <mdet/Counter.h>
9 #include <utl/CoordinateSystem.h>
10 #include <utl/CoordinateSystemPtr.h>
11 #include <utl/Point.h>
12 #include <utl/Particle.h>
13 #include <utl/ReferenceEllipsoid.h>
14 #include <utl/AugerCoordinateSystem.h>
21 #include <G4ParticleGun.hh>
22 #include <G4ParticleDefinition.hh>
23 #include <G4ParticleTable.hh>
25 #include <utl/AugerUnits.h>
27 using namespace GroundPropagatorAG;
42 fParticleGun(new G4ParticleGun(1)),
43 fParticleTable(G4ParticleTable::GetParticleTable())
52 fParticleGun(new G4ParticleGun(1)),
53 fParticleTable(G4ParticleTable::GetParticleTable())
56 fStatFile.open(statf.c_str(), std::ios_base::app);
57 fStatFile <<
"#Id PartName X Y Z(km,SiteCoordSys) x y z(m,CounterCoordSys) Time(ns) Parent\n";
84 double xc(0), yc(0), areaTot(0);
89 for( ModuleIt mIt = theCurrentDetectorCounter->
ModulesBegin(); mIt != theCurrentDetectorCounter->
ModulesEnd(); ++mIt ) {
90 Point mpos = mIt->GetPosition();
92 double area = mIt->GetArea();
113 G4ParticleDefinition* particleDef =
fParticleTable->FindParticle(theCurrentParticleIt->GetName());
116 std::ostringstream msg;
117 msg <<
"Undefined particle type: "
118 << theCurrentParticleIt->GetName();
123 double x(0), y(0), z(0);
124 boost::tie(x, y, z) = (theCurrentParticleIt->GetPosition() - counterPos).GetCoordinates(localCS);
130 double xp(0), yp(0), zp(0);
131 boost::tie(xp, yp, zp) = (theCurrentParticleIt->GetPosition()).GetCoordinates(siteCS);
138 << theCurrentParticleIt->GetName()
145 <<
" " << theCurrentParticleIt->GetTime().GetInterval()/
utl::ns
146 <<
" " << theCurrentParticleIt->GetParent().GetType()
153 G4ThreeVector direction(theCurrentParticleIt->GetDirection().GetX(csDir),
154 theCurrentParticleIt->GetDirection().GetY(csDir),
155 theCurrentParticleIt->GetDirection().GetZ(csDir));
boost::indirect_iterator< InternalGrdParticleIterator, utl::Particle & > GrdParticleIterator
void GeneratePrimaries(G4Event *const event)
AugerCoordinateSystemConstructor< DerivedCSPolicy > AugerCoordinateSystem
The normal coordinate system type.
Describes a particle for Simulation.
utl::CoordinateSystemPtr GetLocalCoordinateSystem() const
Local system based on position and configured rotations.
utl::Point GetPosition() const
G4ParticleTable * fParticleTable
ModuleConstIterator ModulesEnd() const
Begin iterator for the Modules contained in the Counter.
TransformerConstructor< DerivedCSPolicy > CoordinateSystem
The normal coordinate system type.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Reference ellipsoids for UTM transformations.
double GetX(const CoordinateSystemPtr &coordinateSystem) const
#define WARNING(message)
Macro for logging warning messages.
Root detector of the muon detector hierarchy.
double GetY(const CoordinateSystemPtr &coordinateSystem) const
static mevt::CounterSimData::GrdParticleIterator GetCurrentParticleIt()
static const mdet::Counter * GetCurrentDetectorCounter()
ModuleConstIterator ModulesBegin() const
Begin iterator for the Modules contained in the Counter.
ModuleGroup::ConstIterator ModuleConstIterator
Convenience typedef for const iterator over the contained Module instances.
G4ParticleGun * fParticleGun