#ifndef _fevt_PixelSimData_h_ #define _fevt_PixelSimData_h_ #include #include #include #include #include #include #include namespace fevt { /*! \class PixelSimData \brief Fluorescence Detector Pixel Simulated Data \author Stefano Argiro' \date Jan 29, 2003 \version $Id: PixelSimData.h 16532 2010-05-17 08:04:28Z smueller $ \ingroup fevt */ class PixelSimData { public: /// Simulated Photon Trace /** By default , the trace corresponding to total signal is returned * Use GetPhotonTrace(fevt::FdConstants::LightSource source) * to get other sources , if added with MakePhotonTrace(source) * /example GetPhotonTrace(fevt::FdConstants::eCerenkov)*/ utl::TraceD& GetPhotonTrace(const FdConstants::LightSource source = FdConstants::eTotal) { return fPhotonTrace->GetTrace(source); } const utl::TraceD& GetPhotonTrace(const FdConstants::LightSource source = FdConstants::eTotal) const { return fPhotonTrace->GetTrace(source); } /** Add a trace for source of type fevt::FdConstants::LightSource * /example MakePhotonTrace(fevt::FdConstants::eDirect);*/ void MakePhotonTrace(unsigned int size, double binning, const FdConstants::LightSource source = FdConstants::eTotal); void MakePhotonTrace(const utl::TraceD& t, const FdConstants::LightSource source = FdConstants::eTotal); /// Clear all light components' photon traces void ClearPhotonTraces() { fPhotonTrace->Clear(); } /// Check that trace for source /par source is present bool HasPhotonTrace(const FdConstants::LightSource source) const { return fPhotonTrace->HasLabel(source); } /** An iterator over the available Photon trace sources. * Returns a pair when dereferenced */ typedef utl::MultiTraceD::Iterator PhotonTraceIterator; typedef utl::MultiTraceD::ConstIterator ConstPhotonTraceIterator; /// First std::pair PhotonTraceIterator PhotonTracesBegin() { return fPhotonTrace->Begin(); } ConstPhotonTraceIterator PhotonTracesBegin() const { return fPhotonTrace->Begin(); } /// Last std::pair PhotonTraceIterator PhotonTracesEnd() { return fPhotonTrace->End(); } ConstPhotonTraceIterator PhotonTracesEnd() const { return fPhotonTrace->End(); } /// Trace of the sums of squares of simulated photon weights /** By default , the trace corresponding to total signal is returned * Use GetPhotonWeightSquareTrace(fevt::FdConstants::LightSource source) * to get other sources , if added with MakePhotonWeightSquareTrace(source) * /example GetPhotonWeightSquareTrace(fevt::FdConstants::eCerenkov)*/ utl::TraceD& GetPhotonWeightSquareTrace(const FdConstants::LightSource source = FdConstants::eTotal) { return fPhotonWeightSquareTrace->GetTrace(source); } const utl::TraceD& GetPhotonWeightSquareTrace(const FdConstants::LightSource source = FdConstants::eTotal) const { return fPhotonWeightSquareTrace->GetTrace(source); } /** Add a trace of sums of squares of simulated photon weights for source of Type fevt::FdConstants::LightSource * /example AddSource(Telescope::eDirect);*/ void MakePhotonWeightSquareTrace(unsigned int size, double binning, const FdConstants::LightSource source = FdConstants::eTotal); void MakePhotonWeightSquareTrace(const utl::TraceD& t, const FdConstants::LightSource source = FdConstants::eTotal); /// Check that trace of sums of squares of weights of simulated photons for source /par source is present bool HasPhotonWeightSquareTrace(const FdConstants::LightSource source) const { return fPhotonWeightSquareTrace->HasLabel(source); } /// Clear all light components' photon-weight-square-traces void ClearPhotonWeightSquareTraces() { fPhotonWeightSquareTrace->Clear(); } /** An iterator over the available Photon weight square trace sources. * Returns a pair when dereferenced */ typedef utl::MultiTraceD::Iterator PhotonWeightSquareTraceIterator; typedef utl::MultiTraceD::ConstIterator ConstPhotonWeightSquareTraceIterator; /// First std::pair PhotonWeightSquareTraceIterator PhotonWeightSquareTracesBegin() { return fPhotonWeightSquareTrace->Begin(); } ConstPhotonWeightSquareTraceIterator PhotonWeightSquareTracesBegin() const { return fPhotonWeightSquareTrace->Begin(); } /// Last std::pair PhotonWeightSquareTraceIterator PhotonWeightSquareTracesEnd() { return fPhotonWeightSquareTrace->End(); } ConstPhotonWeightSquareTraceIterator PhotonWeightSquareTracesEnd() const { return fPhotonWeightSquareTrace->End(); } /// Set the no. of samples for running sums void SetNumSamples(const int nSamp) { fNumSamples = nSamp; } /// Get the no. of samples for running sums int GetNumSamples() const { return fNumSamples; } /// Set the ADC baseline void SetMean(const double mean) { fMean = mean; } /// Get the ADC baseline double GetMean() const { return fMean; } /// Set the ADC variance void SetRMS(const double rms) { fRMS = rms; } /// Get the ADC variance double GetRMS() const { return fRMS; } /// Set the simulated trigger threshold of the pixel void SetThreshold(const int thr) { fThreshold = thr; } /// Get the simulated trigger threshold of the pixel int GetThreshold() const { return fThreshold; } /// Set mean bg photon flux void SetMeanBgPhotonFlux(const double mean) { fMeanBgPhotonFlux = mean; } /// Get mean bg photon flux double GetMeanBgPhotonFlux() const { return fMeanBgPhotonFlux; } int GetMaxBoxcarsum() const {return fBoxcarsumMax;} double GetMeanBoxcarsum() const {return fBoxcarsumMean;} double GetRmsBoxcarsum() const {return fBoxcarsumRms;} int GetFltTime() const {return fFltTime;} int GetFltDuration() const {return fFltDuration;} void SetMaxBoxcarsum(int v) {fBoxcarsumMax=v;} void SetMeanBoxcarsum(double v) {fBoxcarsumMean=v;} void SetRmsBoxcarsum(double v) {fBoxcarsumRms=v;} void SetFltTime(int v) {fFltTime=v;} void SetFltDuration(int v) {fFltDuration=v;} private: PixelSimData(); ~PixelSimData(); int fNumSamples; double fMean; double fRMS; int fThreshold; double fMeanBgPhotonFlux; utl::InitializedShadowPtr fPhotonTrace; utl::InitializedShadowPtr fPhotonWeightSquareTrace; // only used if the light components @ pixel are stored int fBoxcarsumMax; double fBoxcarsumMean; double fBoxcarsumRms; int fFltTime; int fFltDuration; friend class Pixel; friend class utl::ShadowPtr; }; } //namespace #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // End: