#ifndef _io_ArtificialShowerFileParticleIterator_h_ #define _io_ArtificialShowerFileParticleIterator_h_ #include #include #include #include #include #include #include #include #include #include using CLHEP::RandFlat; using CLHEP::RandPoisson; using namespace fwk; using namespace utl; using namespace std; namespace utl { class Particle; } namespace io { /** \class ArtificialShowerFileParticleIterator \brief \author Jeff Allen \date 20 Mar 2012 \ingroup artificialevent */ class ArtificialShowerFileParticleIterator : public utl::VShowerFileParticleIterator { public: ArtificialShowerFileParticleIterator(); ArtificialShowerFileParticleIterator(double maxRadius, double muonEnergy, double photonEnergy, double electronEnergy, double muonDensity, double photonDensity, double electronDensity, double particleZenith, double particleAzimuth, double particleTime, double particleWeight, bool randomAzimuth); virtual ~ArtificialShowerFileParticleIterator(); virtual utl::Particle* GetOneParticle(); virtual void Rewind(); void SetShowerZenith(const double showerZenith); void SetShowerAzimuth(const double showerAzimuth); protected: virtual utl::CoordinateSystemPtr ComputeExternalShowerCoordinateSystem(const utl::CoordinateSystemPtr& cs); private: utl::Particle fCurrentParticle; void GenerateParticle(); void ReadXMLParameters(); utl::CoordinateSystemPtr fArtificialCoordinateSystem; double fShowerZenith; double fShowerAzimuth; double fMaxRadius; double fMuonEnergy; double fPhotonEnergy; double fElectronEnergy; double fMuonDensity; double fPhotonDensity; double fElectronDensity; double fParticleZenith; double fParticleAzimuth; double fParticleTime; double fParticleWeight; bool fRandomAzimuth; utl::RandomEngine::RandomEngineType* fRandomEngine; unsigned int fGeneratedParticles; unsigned int fTotalParticles; }; } #endif