/** \file Artificial shower reader: Generates particles with uniform density and direction \author Jeff Allen \date 20 Mar 2012 */ #ifndef _io_ArtificialShowerFile_h_ #define _io_ArtificialShowerFile_h_ #include #include #include "ArtificialShowerFileParticleIterator.h" #include using namespace utl; #include using namespace std; namespace evt { class Event; class ShowerSimData; } namespace io { class ArtificialShowerFileParticleIterator; /** \class ArtificialShowerFile ArtificialShowerFile.h "io/ArtificialShowerFile.h" \brief Artificial shower generator: uniform particle density, direction \author Jeff Allen \date 20 Mar 2012 \ingroup artificialevent */ class ArtificialShowerFile : public VEventFile { public: ArtificialShowerFile(); ArtificialShowerFile(const std::string& theFileName, const Mode theMode = eRead); virtual ~ArtificialShowerFile(); virtual void Open(const std::string& theFileName, const Mode theMode = eRead); // theFileName unused (so far) virtual void Close(); virtual Status Read(evt::Event& theEvent); virtual void Write(const evt::Event& theEvent); virtual Status FindEvent(unsigned int eventId); virtual Status GotoPosition(unsigned int position); virtual int GetNEvents(); private: void ReadXMLParameters(); Status CreateArtificialShowerFileParticleIterator(); ArtificialShowerFileParticleIterator fArtificialShowerFileParticleIterator; double fPrimaryEnergy; double fZenith; double fAzimuth; double fMaxRadius; double fMuonEnergy; double fPhotonEnergy; double fElectronEnergy; double fMuonDensity; double fPhotonDensity; double fElectronDensity; double fParticleZenith; double fParticleAzimuth; double fParticleTime; double fParticleWeight; bool fRandomAzimuth; bool fIsOpen; int fReadEvents; }; } #endif