8 #include <io/AiresShowerFileParticleIterator.h>
10 #include <io/AiresShowerFile.h>
11 #include <io/AiresUtilities.h>
12 #include <io/AiresWrapper.h>
15 #include <evt/ShowerSimData.h>
18 #include <utl/AugerUnits.h>
19 #include <utl/AugerException.h>
20 #include <utl/CoordinateSystem.h>
21 #include <utl/ErrorLogger.h>
22 #include <utl/MathConstants.h>
23 #include <utl/Point.h>
24 #include <utl/Vector.h>
27 #include <boost/tuple/tuple.hpp>
28 #include <boost/tuple/tuple_io.hpp>
41 utl::
Point(0.0, 0.0, 0.0,
47 fChannel(theFile.fChannel),
48 fVerbosity(theFile.fVerbosity),
50 fHeadOfList(-1), fEndOfList(-1),
51 fAltType(theFile.fAltType),
52 fGroundParticleCodeIndex(theFile.fGroundParticleCodeIndex),
53 fLogRIndex(theFile.fLogRIndex),
54 fLogEIndex(theFile.fLogEIndex),
55 fThetaIndex(theFile.fThetaIndex),
56 fUxIndex(theFile.fUxIndex),
57 fUyIndex(theFile.fUyIndex),
58 fTimeIndex(theFile.fTimeIndex),
59 fWeightIndex(theFile.fWeightIndex),
60 fCurrentRecordNumber(-1),
61 fIteratorValid(false) {
66 for (
unsigned int i = 0; i < 99; ++i) {
94 ERROR(
"Error attempting to retrieve record from AIRES file.");
109 const double z = 0.0;
113 const double pZ2 = 1.0 - pX*pX - pY*pY;
114 const double pZ = pZ2 > 0 ? -
sqrt(pZ2) : 0.0;
119 Point(r*cos(theta), r*sin(theta), z, cs),
153 return CoordinateSystem::RotationZ(angle, theCoordinateSystem);
int AiresToPDG(int theAiresCode)
Convert AIRES particle code to PDG.
static int crorecnumber(int *channel, int *vrb, int *irc)
Describes a particle for Simulation.
int fGroundParticleCodeIndex
double fGeomagneticFieldDeclination
utl::Particle fCurrentParticle
DataLocationsType::iterator fCurrentShowerLocation
virtual void Rewind()
Rewind the particle list in the shower file to the beginning.
double pow(const double x, const unsigned int i)
Base class to report exceptions in IO.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
virtual ~AiresShowerFileParticleIterator()
double AiresAzimuthToAuger(const double airesAzimuth)
Returns the azimuth rotated from AIRES's system to Auger standard.
static bool crogotorec(int *channel, int *recnumber, int *vrb, int *irc)
AiresShowerFileParticleIterator(AiresShowerFile &)
virtual utl::Particle * GetOneParticle(const utl::CoordinateSystemPtr &cs)
Member function to fetch the next particle.
A TimeInterval is used to represent time elapsed between two events.
static double kMagneticFieldDeclination
Utility to open an Aires generated shower file on disc.
#define ERROR(message)
Macro for logging error messages.
virtual utl::CoordinateSystemPtr ComputeExternalShowerCoordinateSystem(const utl::CoordinateSystemPtr &ptr)
Compute the coordinate system for the ground particle file.
static bool getcrorecord(int *channel, int *intfields, double *realfields, bool *altrec, int *vrb, int *irc)