#ifndef _fevt_PixelRecData_h_ #define _fevt_PixelRecData_h_ #include #include #include #include namespace utl { class Photon; } namespace fevt { /*! \class PixelRecData \brief Fluorescence Detector Pixel Reconstructed Data \author Stefano Argiro' \date Jan 29, 2003 \version $Id$ \ingroup fevt */ class PixelRecData { public: /** Reconstructed 370nm equiv Photon Trace for different sources * By default , the trace corresponding to total signal is returned * Use GetPhotonTrace (Telescope::LightSource source) * to get other sources , if added with MakePhotonTrace(source) * /example GetPhotonTrace(Telescope::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 Telescope::LightSource * /example AddSource(Telescope::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); /// Check that trace for source /par source is present bool HasPhotonTrace(const FdConstants::LightSource source = FdConstants::eTotal) 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(); } /// returns the first triggerd time bin of trace (T1) int GetFirstTriggeredTimeBin() const { return fFirstTriggeredTimeBin; } /// integrated pulse charge double GetTotalCharge() const { return fCharge; } /// pulse start (to be defined) int GetPulseStart() const { return fPulseStart; } /// pulse stop (to be defined) int GetPulseStop() const { return fPulseStop; } /// double GetBaseline() const { return fBaseline; } /// Get the baseline RMS of the trace double GetRMS() const { return fRMS; } double GetCentroid() const { return fCentroid; } double GetCentroidError() const { return fCentroidError; } void SetCentroid(const double centroid, const double err) { fCentroid = centroid; fCentroidError = err; } /// bool PulseIsFound() const { return fPulseIsFound; } enum Flag { eValid = 0, eTimeRejected = 1, eSpaceRejected = 2, eTimeFitRejected = 3, eSpaceFitRejected = 4 }; Flag GetFlag() const { return fFlagValidPixels; } void SetFlag(const Flag flagvalidpixels) { fFlagValidPixels = flagvalidpixels; } /// returns the first triggerd time bin of trace (T1) void SetFirstTriggeredTimeBin(const int bin) { fFirstTriggeredTimeBin = bin; } void SetTotalCharge(const double charge) { fCharge = charge; } void SetPulseStart(const int start) { fPulseStart = start; } void SetPulseStop(const int stop) { fPulseStop = stop; } void SetBaseline(const double bl) { fBaseline = bl; } void SetRMS(const double rms) { fRMS = rms; } void SetPulseFound(bool flag=true) { fPulseIsFound = flag; } enum eCode { eUndefined = 999999 }; void SetChi_i(const double chi_i) { fChi_i=chi_i; } /** angle that the projection of the pixel direction onto the SDP forms with the horizontal . Returns eUndefined if not filled*/ double GetChi_i() const { return fChi_i; } void SetT_i(const double t_i, const double error) { fT_i = t_i; fT_iError = error; } /** Time at which the pixel sees light, relative to FdConstants::GetTriggerTime(). The correction for different telescopes is applied*/ utl::TimeInterval GetT_i() const { return fT_i; } utl::TimeInterval GetT_iError() const { return fT_iError; } private: PixelRecData(); ~PixelRecData() { } //void Clear(); double fCharge; int fPulseStart; int fPulseStop; double fBaseline; double fRMS; double fCentroid; double fCentroidError; double fChi_i; utl::TimeInterval fT_i; utl::TimeInterval fT_iError; bool fPulseIsFound; utl::InitializedShadowPtr fPhotonTrace; int fFirstTriggeredTimeBin; Flag fFlagValidPixels; friend class Pixel; friend class utl::ShadowPtr; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // compile-command: "make -C .. FEvent/PixelRecData.o -k" // End: