00001
00011 #ifndef LATGRBALERT_H
00012 #define LATGRBALERT_H
00013
00014 #include <vector>
00015 #include <deque>
00016 #include <functional>
00017
00018 class PhotonInfo;
00019
00020
00021
00022 class LatGRBAlert
00023 {
00024 public:
00027 LatGRBAlert(const std::vector<PhotonInfo> &photonData, const long nbckoff,
00028 const long nGrb, const long nBck);
00029
00030
00031
00032
00033 bool falseTrig() const { return m_falseTrig; }
00034 long nbckoff() const { return m_nbckoff; }
00035 double firstTriggerTime() const { return m_firstTriggerTime; }
00036 double highbck() const { return m_highbck; }
00037 double maxResult() const { return m_maxResult; }
00038 const std::vector<PhotonInfo> &photonData() const { return m_photonData; }
00039 const std::vector<double> &jointLike() const { return m_jointLike; }
00040 const std::deque<bool> &grbTruth() const { return m_grbTruth; }
00041 const std::deque<bool> &grb1phot() const { return m_grb1phot; }
00042
00043
00044 private:
00048 double firstTriggerTime(const long region, const std::vector<PhotonInfo> &photonData);
00049
00050
00051
00052
00053
00054
00055
00056 bool m_falseTrig;
00057 long m_nbckoff;
00058 double m_firstTriggerTime;
00059 double m_highbck;
00060 double m_maxResult;
00061 std::vector<PhotonInfo> m_photonData;
00062 std::vector<double> m_jointLike;
00063 std::deque<bool> m_grbTruth;
00064 std::deque<bool> m_grb1phot;
00065
00066
00067
00071 struct isSignalSet : public std::unary_function<PhotonInfo, PhotonInfo>
00072 {
00073 isSignalSet() {}
00074 bool operator() (const PhotonInfo &x);
00075 };
00076 };
00077
00078
00079 #endif