/** \file declaration of TelescopeSimData \author Stefano Argiro' \author Luis Prado Jr. \version $Id: TelescopeSimData.h 16532 2010-05-17 08:04:28Z smueller $ \date 30 Jan 2004 */ #ifndef _fevt_TelescopeSimData_h_ #define _fevt_TelescopeSimData_h_ #include #include #include #include #include #include #include #include static const char CVSId_fevt_TelescopeSimData[] = "$Id: TelescopeSimData.h 16532 2010-05-17 08:04:28Z smueller $"; namespace fevt { class Telescope; /** \class TelescopeSimData TelescopeSimData.h "fevt/TelescopeSimData.h" \brief Description of simulated data for one Telescope This class describes the simulated photons at the diaphragm of each telescope. For each of the sources in FdConstants::LightSource, a trace of photons at the diaphragm is provided. \author Stefano Argiro' \author Luis Prado Jr \date 30 Jan 2004 \ingroup fevt */ class TelescopeSimData { public: typedef std::list PhotonList; typedef std::list::iterator PhotonIterator; typedef std::list::const_iterator ConstPhotonIterator; /// Photon trace at diaphragm /** Use GetPhotonTrace(FdConstants::LightSource source, const int wl) * to get wavelength bin corresponding to light source, if added with MakePhotonTrace(source, iwl) * /example GetPhotonTrace(FdConstants::eFluorDirect)*/ utl::TraceD& GetPhotonTrace(const fevt::FdConstants::LightSource source, const int wl); const utl::TraceD& GetPhotonTrace(const fevt::FdConstants::LightSource source, const int wl) const; /** Add a light trace for source of Type FdConstants::LightSource * /example MakePhotonTrace(FdConstants::eFluorDirect);*/ void MakePhotonTrace(const fevt::FdConstants::LightSource source, const int wl, const unsigned int size = 0, const double binSize = 0); /// Check that light trace for source /par source is present for the given wavelength bin bool HasPhotonTrace(const fevt::FdConstants::LightSource source, const int wl) const; /// Check that any light trace for source /par source is present (regardless of the wavelength bin) bool HasPhotonTrace(const fevt::FdConstants::LightSource source) const; /// An iterator over the components of the photon trace typedef utl::MultiTraceD::Iterator PhotonTraceIterator; typedef utl::MultiTraceD::ConstIterator ConstPhotonTraceIterator; PhotonTraceIterator PhotonTracesBegin(fevt::FdConstants::LightSource source); ConstPhotonTraceIterator PhotonTracesBegin(fevt::FdConstants::LightSource source) const; PhotonTraceIterator PhotonTracesEnd(fevt::FdConstants::LightSource source); ConstPhotonTraceIterator PhotonTracesEnd(fevt::FdConstants::LightSource source) const; /// Number of photons that were *actually* ray-traced (per time bin) /** Use GetRayTracedPhotonTrace() * Number of all photons that were ray-traced in the simulation * independent of wavelength and light source */ utl::TraceI& GetRayTracedPhotonTrace() { return *fRayTracedPhotonTrace; } const utl::TraceI& GetRayTracedPhotonTrace() const { return *fRayTracedPhotonTrace; } /// Add a trace for the number of photons that were ray-traced. void MakeRayTracedPhotonTrace(const unsigned int size = 0, const double binSize = 0); /// Check that "ray-traced photon trace" is present bool HasRayTracedPhotonTrace() const { return fRayTracedPhotonTrace; } /// Clear the trace of ray traced photons void ClearRayTracedPhotonTrace() { fRayTracedPhotonTrace->ClearTrace(); } // trace sources typedef std::map > PhotonTraceSourceContainer; typedef PhotonTraceSourceContainer::iterator PhotonTraceSourceIterator; typedef PhotonTraceSourceContainer::const_iterator ConstPhotonTraceSourceIterator; PhotonTraceSourceIterator PhotonTracesSourceBegin() {return fPhotonTraces.begin();} ConstPhotonTraceSourceIterator PhotonTracesSourceBegin() const {return fPhotonTraces.begin();} PhotonTraceSourceIterator PhotonTracesSourceEnd() {return fPhotonTraces.end();} ConstPhotonTraceSourceIterator PhotonTracesSourceEnd() const {return fPhotonTraces.end();} /// Trace for the distance along the shower axis of the light at the diaphragm utl::TraceD& GetDistanceTrace() { return *fDistanceTrace; } const utl::TraceD& GetDistanceTrace() const { return *fDistanceTrace; } /// Make the trace of distance along the shower axis of light at the diaphragm void MakeDistanceTrace(const unsigned int size = 0, const double binSize = 0); /// Check that trace for the distance along the shower axis is present bool HasDistanceTrace() const { return fDistanceTrace; } /// Start Time of the photons trace utl::TimeStamp GetPhotonsStartTime() const { return fTraceStartTime; } void SetPhotonsStartTime(const utl::TimeStamp& ts) { fTraceStartTime = ts; } int GetNumberOfPhotonBins() const {return fNumberOfPhotonBins;} void SetNumberOfPhotonBins(int n) {fNumberOfPhotonBins=n;} // for the FdEventLogger void SetNumberOfFltPixels(int n) {fNFltPixels=n;} void SetNumberOfFltPixelsFromShower(int n) {fNFltPixelsFromShower=n;} void SetNumberOfFltPixelsFromBackground(int n) {fNFltPixelsFromBackground=n;} void SetNumberOfPixelsWithShowerPhotons(int n) {fNPixelWithShowerLight=n;} void SetNumberOfReadOutPixels(int n) {fNReadOutPixels=n;} void SetSltTriggerTime(int n) {fSltTriggerTime=n;} void SetSltTimeShift(int n) {fSltTimeShift=n;} int GetNumberOfFltPixels() const {return fNFltPixels;} int GetNumberOfFltPixelsFromShower() const {return fNFltPixelsFromShower;} int GetNumberOfFltPixelsFromBackground() const {return fNFltPixelsFromBackground;} int GetNumberOfPixelsWithShowerPhotons() const {return fNPixelWithShowerLight;} int GetNumberOfReadOutPixels() const {return fNReadOutPixels;} int GetSltTriggerTime() const {return fSltTriggerTime;} int GetSltTimeShift() const {return fSltTimeShift;} void ClearPhotons() {fPhotons.clear();} void AddPhoton(const utl::Photon& p) {fPhotons.push_back(p);} int GetNPhotons() const {return fPhotons.size();} PhotonIterator PhotonsBegin() {return fPhotons.begin();} ConstPhotonIterator PhotonsBegin() const {return fPhotons.begin();} PhotonIterator PhotonsEnd() {return fPhotons.end();} ConstPhotonIterator PhotonsEnd() const {return fPhotons.end();} void SetConfigSignatureStr(const std::string& configSignatureStr) { fConfigSignatureStr = configSignatureStr; } const std::string& GetConfigSignatureStr() const { return fConfigSignatureStr; } const std::string& GetConfigSignature() const; void ClearConfigSignature(); private: TelescopeSimData(); ~TelescopeSimData() { } utl::TimeStamp fTraceStartTime; int fNumberOfPhotonBins; PhotonTraceSourceContainer fPhotonTraces; utl::ShadowPtr fDistanceTrace; utl::ShadowPtr fRayTracedPhotonTrace; int fNFltPixels; int fNFltPixelsFromShower; int fNFltPixelsFromBackground; int fNPixelWithShowerLight; int fNReadOutPixels; int fSltTriggerTime; int fSltTimeShift; PhotonList fPhotons; std::string fConfigSignatureStr; mutable std::string fConfigSignature; friend class fevt::Telescope; friend class utl::ShadowPtr; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // End: