00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef PLEXSEIDALTLITEM_H
00013 #define PLEXSEIDALTLITEM_H
00014
00015 #include "Plex/PlexStripEndId.h"
00016 #include "Plex/PlexPixelSpotId.h"
00017 #include "LeakChecker/Lea.h"
00018
00019 #include <iosfwd>
00020
00021
00022 class PlexSEIdAltLItem;
00023 std::ostream& operator<<(std::ostream& os, const PlexSEIdAltLItem& item);
00024
00025 class PlexSEIdAltLItem {
00026
00027
00028 friend std::ostream& operator<<(std::ostream& os, const PlexSEIdAltLItem& item);
00029
00030 public:
00031
00032 PlexSEIdAltLItem() :
00033 fStripEndId(),
00034 fPixelSpotId(),
00035 fWeight(0), fPE(0), fSigLin(0), fSigCorr(0), fTime(-1) { LEA_CTOR; };
00036
00037 PlexSEIdAltLItem(const PlexStripEndId& seid,
00038 const PlexPixelSpotId& spotid,
00039 Float_t wgt=0,
00040 Float_t pe=0, Float_t siglin=0, Float_t sigcorr=0,
00041 Double_t time=0) :
00042 fStripEndId(seid),
00043 fPixelSpotId(spotid),
00044 fWeight(wgt), fPE(pe),
00045 fSigLin(siglin), fSigCorr(sigcorr),
00046 fTime(time) { LEA_CTOR; };
00047
00048 PlexSEIdAltLItem(const PlexSEIdAltLItem& that)
00049 { LEA_CTOR; *this = that; }
00050
00051 virtual ~PlexSEIdAltLItem() { LEA_DTOR; }
00052
00053 PlexStripEndId GetSEId() const { return fStripEndId; }
00054 PlexPixelSpotId GetPixelSpotId() const { return fPixelSpotId; }
00055 Float_t GetWeight() const { return fWeight; }
00056 Bool_t IsZeroWeight() const { return fWeight == 0; }
00057 Float_t GetPE() const { return fPE; }
00058 Float_t GetSigLin() const { return fSigLin; }
00059 Float_t GetSigCorr() const { return fSigCorr; }
00060 Double_t GetTime() const { return fTime; }
00061
00062 void SetWeight(Float_t wgt) { fWeight = wgt; }
00063 void AddToWeight(Float_t wgtadd) { fWeight += wgtadd; }
00064
00065 void SetPE(Float_t pe) { fPE = pe; }
00066 void SetSigLin(Float_t siglin) { fSigLin = siglin; }
00067 void SetSigCorr(Float_t sigcorr) { fSigCorr = sigcorr; }
00068 void SetTime(Double_t time) { fTime = time; }
00069
00070 void AddToTime(Double_t tadd) { fTime += tadd; }
00071
00072 friend Bool_t operator==(const PlexSEIdAltLItem &lhs,
00073 const PlexSEIdAltLItem &rhs);
00074
00075
00076 friend Bool_t operator<(const PlexSEIdAltLItem &lhs,
00077 const PlexSEIdAltLItem &rhs);
00078
00079 virtual void Print(Option_t *option="") const;
00080
00081 protected:
00082
00083 PlexStripEndId fStripEndId;
00084 PlexPixelSpotId fPixelSpotId;
00085 Float_t fWeight;
00086 Float_t fPE;
00087 Float_t fSigLin;
00088 Float_t fSigCorr;
00089 Double_t fTime;
00090
00091 private:
00092
00093 ClassDef(PlexSEIdAltLItem,3)
00094 };
00095
00096 #ifndef __CINT__
00097 inline Bool_t operator==(const PlexSEIdAltLItem& lhs,
00098 const PlexSEIdAltLItem& rhs)
00099 {
00100 return lhs.fStripEndId == rhs.fStripEndId;
00101 }
00102
00103 inline Bool_t operator<(const PlexSEIdAltLItem& lhs,
00104 const PlexSEIdAltLItem& rhs)
00105 {
00106 return lhs.fWeight < rhs.fWeight;
00107 }
00108
00109 #endif
00110 #endif // PLEXSEIDALTLITEM_H