#ifndef _evt_RadioSimulation_h_ #define _evt_RadioSimulation_h_ #include #include #include #include #include #include #include namespace evt { // forward declaration for friendship class ShowerSimData; } namespace evt { /** \class RadioSimulation RadioSimulation.h "evt/RadioSimulation.h" \brief Data structure for a radio simulation (including several SimRadioPulses) \author Tim Huege \date 11 Aug 2008 \version $Id$ \todo a lot \ingroup shower */ class RadioSimulation { public: /// Get the number of radio pulses contained in the RadioSimulation long GetNumPulses() const { return fSimRadioPulseVector.size(); } bool HasCorePosition() const { return fCorePosition.IsValid(); } /// get local coordinate system anchored at the core position utl::CoordinateSystemPtr GetLocalCoordinateSystem() const { return fwk::LocalCoordinateSystem::Create(GetCorePosition()); } //#warning this interface is implicitly assuming x,y,z is in detector cs /// Set the core position coordinates of the RadioSimulation void SetCoreCoordinates(const double x, const double y, const double z); /// Set the core position of the RadioSimulation using an utl::Point void SetCorePosition(const utl::Point& core) { fCorePosition = core; } /// Get the core position of the RadioSimulation as a utl::Point utl::Point GetCorePosition() const; /// Get the run number of the RadioSimulation int GetRunNumber() const { return fRunNumber; } /// Set the run number of the RadioSimulation void SetRunNumber(const int runnum) { fRunNumber = runnum; } /// Get the event number of the RadioSimulation int GetEventNumber() const { return fEventNumber; } /// Set the event number of the RadioSimulation void SetEventNumber(const int eventnum) { fEventNumber = eventnum; } /// Get the event time of the RadioSimulation const utl::TimeStamp& GetEventTime() const { return fEventTime; } /// Set the event time of the RadioSimulation void SetEventTime(const utl::TimeStamp& t) { fEventTime = t; } /// Add a radio pulse to the RadioSimulation void AddSimRadioPulse(const SimRadioPulse& rp) { fSimRadioPulseVector.push_back(rp); } /// Erase all radio pulses from the RadioSimulation void ClearSimRadioPulses() { fSimRadioPulseVector.clear(); } /// Jump to the first SimRadioPulse, returns false if the vector is empty bool GoToFirstSimRadioPulse(); /// Return the next SimRadioPulse. ok will be false if there are no more /// SimRadioPulses. //#warning Need a proper begin/end interator, not this non-conformant interface const SimRadioPulse& GetNextSimRadioPulse(bool& ok); private: RadioSimulation() : fRunNumber(-1), fEventNumber(-1) { } ~RadioSimulation() { } utl::Validated fCorePosition; int fRunNumber; int fEventNumber; utl::TimeStamp fEventTime; /// stl-vector holding the radio pulses contained in the RadioSimulation std::vector fSimRadioPulseVector; utl::Validated::const_iterator> fPulseIter; friend class evt::ShowerSimData; friend class utl::LameShadowPtr; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // End: