4 #include <det/Detector.h>
6 #include <sevt/StationSimData.h>
8 #include <sdet/Station.h>
10 #include <utl/CoordinateSystem.h>
11 #include <utl/CoordinateSystemPtr.h>
12 #include <utl/Point.h>
13 #include <utl/Particle.h>
14 #include <utl/ReferenceEllipsoid.h>
15 #include <utl/AugerCoordinateSystem.h>
22 #include <G4ParticleGun.hh>
23 #include <G4ParticleDefinition.hh>
24 #include <G4ParticleTable.hh>
26 #include <utl/AugerUnits.h>
28 using namespace G4TankSimulatorOG;
43 fParticleGun(new G4ParticleGun(1)),
44 fParticleTable(G4ParticleTable::GetParticleTable())
74 det::Detector::GetInstance().GetSiteCoordinateSystem();
81 AugerCoordinateSystem::Create(stationPos, e, siteCS);
84 theCurrentParticleIt->GetDirection().GetCoordinateSystem();
88 G4ParticleDefinition* particleDef =
92 std::ostringstream msg;
93 msg <<
"Undefined particle type: "
94 << theCurrentParticleIt->GetName();
100 boost::tie(x, y, z) =
101 (theCurrentParticleIt->GetPosition() - stationPos).GetCoordinates(localCS);
106 G4ThreeVector direction(theCurrentParticleIt->GetDirection().GetX(csDir),
107 theCurrentParticleIt->GetDirection().GetY(csDir),
108 theCurrentParticleIt->GetDirection().GetZ(csDir));
116 fParticleGun->SetParticleTime(theCurrentParticleIt->GetTime().GetInterval());
AugerCoordinateSystemConstructor< DerivedCSPolicy > AugerCoordinateSystem
The normal coordinate system type.
void GeneratePrimaries(G4Event *TheEvent)
Detector description interface for Station-related data.
Describes a particle for Simulation.
static sevt::StationSimData::ParticleIterator GetCurrentParticleIt()
TransformerConstructor< DerivedCSPolicy > CoordinateSystem
The normal coordinate system type.
utl::Point GetPosition() const
Tank position.
ParticleVector::iterator ParticleIterator
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
Reference ellipsoids for UTM transformations.
#define WARNING(message)
Macro for logging warning messages.
~G4TankPrimaryGenerator()
static const sdet::Station * GetCurrentDetectorStation()
G4ParticleGun * fParticleGun
G4ParticleTable * fParticleTable