#ifndef _fevt_TelescopeRecData_h_ #define _fevt_TelescopeRecData_h_ #include #include #include #include #include #include #include #include #include namespace fevt { /*! \class TelescopeRecData \brief Telescope-specific shower reconstruction data \author Stefano Argiro' \author Steffen Mueller \version $Id: TelescopeRecData.h 18993 2011-04-11 14:42:44Z kruppke $ \ingroup fevt */ class Pixel; class TelescopeRecData { public: double GetZeta() const { return fZeta; } const utl::AxialVector& GetSDP() const { return fSDP; } double GetSDPThetaError() const { return fSDPThetaError; } double GetSDPPhiError() const { return fSDPPhiError; } double GetSDPCorrThetaPhi() const { return fSDPThetaPhiCorrelation; } double GetSDPFitChiSquare() const { return fSDPFitChiSquare; } unsigned int GetSDPFitNDof() const { return fSDPFitNDof; } double GetTZero() const { return fTZero; } double GetTZeroError() const { return fTZeroError; } double GetChiZero() const { return fChiZero; } double GetChiZeroError() const { return fChiZeroError; } double GetRp() const { return fRp; } double GetChi0TZeroCorrelation() const { return fChi0TZeroCorrelation; } double GetRpChi0Correlation() const { return fRpChi0Correlation; } double GetRpTZeroCorrelation() const { return fRpTZeroCorrelation; } double GetRpError() const { return fRpError; } double GetTimeFitChiSquare() const { return fTimeFitChiSquare; } unsigned int GetTimeFitNDof() const { return fTimeFitNDof; } /** The correlations between northing, easting, theta, phi and TCore * as coming from the axis/core fit. * theta/phi are in the core coordinate system */ double GetNorthEastCorrelation() const { return fNorthEastCorrelation; } double GetNorthThetaCorrelation() const { return fNorthThetaCorrelation; } double GetNorthPhiCorrelation() const { return fNorthPhiCorrelation; } double GetNorthTCoreCorrelation() const { return fNorthTCoreCorrelation; } double GetEastThetaCorrelation() const { return fEastThetaCorrelation; } double GetEastPhiCorrelation() const { return fEastPhiCorrelation; } double GetEastTCoreCorrelation() const { return fEastTCoreCorrelation; } double GetThetaPhiCorrelation() const { return fThetaPhiCorrelation; } double GetThetaTCoreCorrelation() const { return fThetaTCoreCorrelation; } double GetPhiTCoreCorrelation() const { return fPhiTCoreCorrelation; } double GetAxisFitChiSquare() const { return fAxisFitChiSquare; } unsigned int GetAxisFitNDof() const { return fAxisFitNDof; } unsigned int GetEyeId() const { return fEyeId; } unsigned int GetTelescopeId() const { return fTelescopeId; } void SetEyeId(const unsigned int id) { fEyeId = id; } void SetTelescopeId(const unsigned int id) { fTelescopeId = id; } void SetZeta(const double zeta) { fZeta = zeta; } void SetSDP(const utl::AxialVector& vec) { fSDP = vec; } void SetSDPThetaError(const double sdpThetaError) { fSDPThetaError = sdpThetaError; } void SetSDPPhiError(const double sdpPhiError) { fSDPPhiError = sdpPhiError; } void SetSDPCorrThetaPhi (double sdpCorrThetaPhi) { fSDPThetaPhiCorrelation=sdpCorrThetaPhi; } void SetSDPFitChiSquare(const double sdpChi2, const unsigned int ndof) { fSDPFitChiSquare = sdpChi2; fSDPFitNDof = ndof; } void SetTimeFitChiSquare(const double tfitChi2, const unsigned int ndof) { fTimeFitChiSquare = tfitChi2; fTimeFitNDof = ndof; } void SetTZero(const double tzero, const double error) { fTZero = tzero; fTZeroError = error; } void SetChiZero(const double chiZero, const double error) { fChiZero = chiZero; fChiZeroError = error; } void SetRp(const double rp, const double error) { fRp = rp; fRpError = error; } void SetTimeFitCorrelations(double rRpT0, double rRpChi0, double rChi0T0); /** Set the correlations for nothing, easting, theta, phi and TCore * coming from the axis/core fit. * Theta/Phi are in the core coordinate system */ void SetAxisFitCorrelations(double northEast, double northTheta, double northPhi, double northTCore, double eastTheta, double eastPhi, double eastTCore, double thetaPhi, double thetaTCore, double phiTCore) { fNorthEastCorrelation = northEast; fNorthThetaCorrelation = northTheta; fNorthPhiCorrelation = northPhi; fNorthTCoreCorrelation = northTCore; fEastThetaCorrelation = eastTheta; fEastPhiCorrelation = eastPhi; fEastTCoreCorrelation = eastTCore; fThetaPhiCorrelation = thetaPhi; fThetaTCoreCorrelation = thetaTCore; fPhiTCoreCorrelation = phiTCore; } void SetAxisFitChiSquare(const double globalChi2, const unsigned int ndof) { fAxisFitChiSquare = globalChi2; fAxisFitNDof = ndof; } /// Light flux at diaphragm, photons/m^2 versus time in ns /** By default , the light profile corresponding to * total signal is returned * Use GetLightFlux (FdConstants::LightSource source) * to get other sources, if added with MakeLightFlux(source) * /example GetLightFlux(FdConstants::eCerenkov)*/ utl::TabulatedFunctionErrors& GetLightFlux(const FdConstants::LightSource source = fevt::FdConstants::eTotal) { return fLightProfile->GetTabulatedFunctionErrors(source); } const utl::TabulatedFunctionErrors& GetLightFlux(const FdConstants::LightSource source = fevt::FdConstants::eTotal) const { return fLightProfile->GetTabulatedFunctionErrors(source); } /** Add a Light Profile for source of Type FdConstants::LightSource * /example MakeLightFlux(Telescope::eDirect); */ void MakeLightFlux(const FdConstants::LightSource source = FdConstants::eTotal) { fLightProfile->AddTabulatedFunctionErrors(source); } /// Check that light profile for source /par source is present bool HasLightFlux(const FdConstants::LightSource source = FdConstants::eTotal) const { return fLightProfile->HasLabel(source); } /// An iterator over the components of the Light Flux typedef utl::MultiTabulatedFunctionErrors::Iterator MultiLightFluxIterator; typedef utl::MultiTabulatedFunctionErrors::ConstIterator ConstMultiLightFluxIterator; /// Begin of the Light flux, returns a LabeledTabulatedFunctionErrors MultiLightFluxIterator LightFluxesBegin() { return fLightProfile->TabulatedFunctionsErrorsBegin(); } ConstMultiLightFluxIterator LightFluxesBegin() const { return fLightProfile->TabulatedFunctionsErrorsBegin(); } /// End of the Light flux, returns a LabeledTabulatedFunctionErrors MultiLightFluxIterator LightFluxesEnd() { return fLightProfile->TabulatedFunctionsErrorsEnd(); } ConstMultiLightFluxIterator LightFluxesEnd() const { return fLightProfile->TabulatedFunctionsErrorsEnd(); } /// Start Time of the photons trace utl::TimeStamp GetPhotonsStartTime() const { return fTraceStartTime; } void SetPhotonsStartTime(const utl::TimeStamp& ts) { fTraceStartTime = ts; } /// Returns the time-vector of vectors of pixel ids which are within zeta at the given time. /** The time corresponds to the aperture light time (cf. the light flux profiles in this class). * Example: * * const vector >& zetaPixels = telRecData.GetPixelsInZetaOverTime(); * const vector& pixels = zetaPixels[timeBinNo]; * for (unsigned int iPix = 0; iPix < pixels.size(); ++iPix) { * // iterate over the ids of the pixels which were inside the * // light collection angle at the given time * const unsigned int pixelId = pixels[iPix]; * // ... * } */ const std::vector >& GetPixelsInZetaOverTime() const { return fPixelsInZeta; } std::vector >& GetPixelsInZetaOverTime() { return fPixelsInZeta; } /// Get the light-collection-efficiency multi tabulated function (for various LightSources) utl::MultiTabulatedFunctionErrors& GetLightCollectionEfficiency() { return *fLightCollectionEfficiency; } /// Get the light-collection-efficiency multi tabulated function (for various LightSources) const utl::MultiTabulatedFunctionErrors& GetLightCollectionEfficiency() const { return *fLightCollectionEfficiency; } /// Add a light-collection-efficiency multi tabulated function (for various LightSources) void MakeLightCollectionEfficiency(); /// Check that a light-collection-efficiency multi tabulated function exists (for various LightSources) bool HasLightCollectionEfficiency() const { return fLightCollectionEfficiency; } /** Returns whether the given time (relative to the eye trigger time) * is within a time range when the spot was far from the event border and can be used * for profile reconstruction without light collection efficiency correction. */ bool IsSpotFarFromBorder(const double timeRelToEyeTriggerTime) const; void SetSpotFarFromBorderTimeRanges(const std::list >& timeRanges) { fSpotFarFromBorderTimes = timeRanges; } const std::list >& GetSpotFarFromBorderTimeRanges() const { return fSpotFarFromBorderTimes; } std::list >& GetSpotFarFromBorderTimeRanges() { return fSpotFarFromBorderTimes; } private: TelescopeRecData(const unsigned int eyeId, const unsigned int telId); ~TelescopeRecData(); unsigned int fEyeId; unsigned int fTelescopeId; double fZeta; utl::AxialVector fSDP; double fSDPThetaError; double fSDPPhiError; double fSDPThetaPhiCorrelation; double fSDPFitChiSquare; unsigned int fSDPFitNDof; double fTZero; double fTZeroError; double fChiZero; double fChiZeroError; double fRp; double fRpError; double fRpTZeroCorrelation; double fRpChi0Correlation; double fChi0TZeroCorrelation; double fTimeFitChiSquare; unsigned int fTimeFitNDof; double fNorthEastCorrelation; double fNorthThetaCorrelation; double fNorthPhiCorrelation; double fNorthTCoreCorrelation; double fEastThetaCorrelation; double fEastPhiCorrelation; double fEastTCoreCorrelation; double fThetaPhiCorrelation; double fThetaTCoreCorrelation; double fPhiTCoreCorrelation; double fAxisFitChiSquare; unsigned int fAxisFitNDof; utl::InitializedShadowPtr fLightProfile; /** Time ranges during which the spot is known to be far from border, * i.e. good times for profile reconstruction without having a light collection * efficiency. */ std::list > fSpotFarFromBorderTimes; utl::TimeStamp fTraceStartTime; std::vector > fPixelsInZeta; utl::ShadowPtr fLightCollectionEfficiency; friend class Telescope; friend class utl::ShadowPtr; }; } #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // compile-command: "make -C .. FEvent/TelescopeRecData.o -k" // End: