#ifndef __RecStation_H #define __RecStation_H #include // for the enums #include #include #include #include // // Shower data definition // class RecStation : public TObject { public: RecStation(); virtual ~RecStation() { } void SetId(const UInt_t id) { fId = id; } ///< set id of station UInt_t GetId() const { return fId; } ///< get id of station /// set the trigger status of the station void SetToT() { fTrigger = eTOT; } bool IsToT() const { return fTrigger == eTOT; } void SetToTd() { fTrigger = eTOTd; } bool IsToTd() const { return fTrigger == eTOTd; } void SetT1Threshold() { fTrigger = eT1Threshold; } bool IsT1Threshold() const { return fTrigger == eT1Threshold; } void SetT2Threshold() { fTrigger = eT2Threshold; } bool IsT2Threshold() const { return fTrigger == eT2Threshold; } bool IsThreshold() const { return fTrigger == eT2Threshold; } // deprecated, kept for backward compatibility void SetRandom() { fTrigger = eRandom; } bool IsRandom() const { return fTrigger == eRandom; } void SetSilent() { fStatus = eSilent; } ///< Set silent station flag bool IsSilent() const { return fStatus == eSilent;} ///< ask for silent station void SetAccidental() { fStatus = eAccidental; } ///< Set accidental station flag (offline rejected station) bool IsAccidental() const { return fStatus == eAccidental; } ///< ask for accidental station (offline rejected station) void SetCandidate() { fStatus = eCandidate; } ///< Set candidate station flag bool IsCandidate() const { return fStatus == eCandidate; } ///< ask for candidate station void SetUnknown() { fStatus = eUnknown; } ///< Set not reconstructed station flag bool IsUnknown() const { return fStatus == eUnknown; } ///< ask for knowledge EStationStatus GetStatus() const { return fStatus; } void SetHybrid() { fIsHybrid = true; } ///< Set hybrid station flag bool IsHybrid() const { return fIsHybrid; } ///< ask for used hybrid station std::string GetStationTriggerName(const int version = 20) const; EStationTrigger GetTriggerType() const { return fTrigger; } void SetRejectStatus(const int stat); ///< set the rejection status from the calibration or reconstruction ERejectionStatus GetRejectionStatus() const { return fRejectionStatus; } ///< get the rejection flag bool IsDoublet() const; ///< Is the station one of the pair stations? bool IsTriplet() const; ///< Is the station one of the triad stations? void SetTotalSignal(const Double_t c, const Double_t e) { fTotalSignal = c; fTotalSignalError = e; } Double_t GetTotalSignal() const { return fTotalSignal; } ///< get signal Double_t GetTotalSignalError() const { return fTotalSignalError; } std::string GetRemovalReason() const; void SetCalibrationVersion(const unsigned int version) { fCalibVersion = version; } UInt_t GetCalibrationVersion() const { return fCalibVersion; } void SetPLDVersion(const std::string& version) { fPLDVersion = version; } std::string GetPLDVersion() const { return fPLDVersion; } int GetPLDVersionAsInt() const {return atoi(fPLDVersion.c_str());} void SetPLDTimeOffset(const int offset) { fPLDTimeOffset = offset; } int GetPLDTimeOffset() const { return fPLDTimeOffset; } // BEGIN: Deprecated interfaces bool IsTOT() const { return fTrigger == eTOT; } // deprecated, kept for backward compatibility bool IsTOTd() const { return fTrigger == eTOTd; } // deprecated, kept for backward compatibility // END: Deprecated interfaces private: EStationStatus fStatus; EStationTrigger fTrigger; ERejectionStatus fRejectionStatus; UInt_t fId; Bool_t fIsHybrid; Double_t fTotalSignal; Double_t fTotalSignalError; UInt_t fCalibVersion; std::string fPLDVersion; Int_t fPLDTimeOffset; ClassDef(RecStation, 8); }; #endif