#ifndef _sevt_StationSimData_h_ #define _sevt_StationSimData_h_ #include #include #include #include #include #include static const char CvsId_sevt_StationSimData[] = "$Id: StationSimData.h 18121 2010-11-26 08:47:39Z darko $"; namespace utl { class Particle; } namespace sevt { class StationGPSData; class StationTriggerData; /*! \class StationSimData StationSimData.h "sevt/StationSimData.h" \brief %Station Level Simulated Data \author Stefano Argiro' \date 28 january 2003 \version $Id: StationSimData.h 18121 2010-11-26 08:47:39Z darko $ \ingroup sevt */ class StationSimData { private: typedef utl::ShadowPtr ParticlePtr; typedef std::vector InternalParticleVector; typedef InternalParticleVector::iterator InternalParticleIterator; typedef InternalParticleVector::const_iterator InternalConstParticleIterator; public: typedef boost::indirect_iterator ParticleIterator; typedef boost::indirect_iterator ConstParticleIterator; /// Beginning of simulated particles entering the station ParticleIterator ParticlesBegin() { return fParticles.begin(); } ConstParticleIterator ParticlesBegin() const { return fParticles.begin(); } /// End of simulated particles entering the station ParticleIterator ParticlesEnd() { return fParticles.end(); } ConstParticleIterator ParticlesEnd() const { return fParticles.end(); } /// Add a simulated particle to the station void AddParticle(const utl::Particle& particle); /// Clear the station's particle list void ClearParticleList(); /// Get the number of muons that entered the station unsigned int GetNumberOfMuons() const { return fNumberOfMuons; } /// Set the number of muons that entered the station void SetNumberOfMuons(const unsigned int number) { fNumberOfMuons = number; } /// Get Shower front plane arrival time const utl::TimeStamp& GetPlaneFrontTime() const { return fTime; } /// Set shower front plane arrival time void SetPlaneFrontTime(const utl::TimeStamp& time) { fTime = time; } /// Set name of the tank simulator module used to simulate this station /*! The Simulator signature must be set by the tank simulator. If it is not, the SdSimCalibrationFiller will fail */ void SetSimulatorSignature(const std::string& name) { fSimulatorSignature = name; } /// Get name of the tank simulator module used to simulate this station const std::string& GetSimulatorSignature() const; /// Check whether the station is in the shower hole. /*! For some air shower simulations there is a cut on the minimum distance from the core for which shower particles are simulated. This flag indicates if a station falls in this region. See also evt::ShowerSimData::GetMinRadiusCut() */ bool IsInsideMinRadius() const { return fHoleStation; } /// Set flag indicating whether station is in the shower hole /*! see also IsInsideMinRadius() */ void SetIsInsideMinRadius(const bool isIn = true) { fHoleStation = isIn; } typedef std::vector TriggerTimeVector; typedef TriggerTimeVector::iterator TriggerTimeIterator; typedef TriggerTimeVector::const_iterator ConstTriggerTimeIterator; /// Beginning of simulated local trigger times list TriggerTimeIterator TriggerTimesBegin() { return fTriggerTimes.begin(); } ConstTriggerTimeIterator TriggerTimesBegin() const { return fTriggerTimes.begin(); } /// End of simulated local trigger times list TriggerTimeIterator TriggerTimesEnd() { return fTriggerTimes.end(); } ConstTriggerTimeIterator TriggerTimesEnd() const { return fTriggerTimes.end(); } /// Check whether there is trigger data at the given time bool HasTriggerData(const utl::TimeStamp& lsTime) const; /// Check whether there is a GPS data at the given time bool HasGPSData(const utl::TimeStamp& lsTime) const; /// Get simulated GPSData StationGPSData& GetGPSData(const utl::TimeStamp& lsTime); const StationGPSData& GetGPSData(const utl::TimeStamp& lsTime) const; /// Creates the trigger data at the given time and also the GPS data to guarantee they are both created void MakeTriggerAndGPSData(const utl::TimeStamp& lsTime); /// Get simulated TriggerData StationTriggerData& GetTriggerData(const utl::TimeStamp& lsTime); const StationTriggerData& GetTriggerData(const utl::TimeStamp& lsTime) const; private: StationSimData(); ~StationSimData(); typedef std::pair, utl::ShadowPtr > TriggerGPSPair; typedef std::map TriggerGPSMap; typedef TriggerGPSMap::iterator TriggerGPSMapIterator; typedef TriggerGPSMap::const_iterator ConstTriggerGPSMapIterator; utl::TimeStamp fTime; bool fHoleStation; std::string fSimulatorSignature; InternalParticleVector fParticles; TriggerTimeVector fTriggerTimes; TriggerGPSMap fTriggerAndGPSData; unsigned int fNumberOfMuons; friend class Station; friend class utl::ShadowPtr; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // compile-command: "make -C .. -k" // End: