File indexing completed on 2023-03-17 10:50:20
0001 #ifndef DataFormats_L1Trigger_CaloCluster_h
0002 #define DataFormats_L1Trigger_CaloCluster_h
0003
0004 #include "DataFormats/L1Trigger/interface/L1Candidate.h"
0005 #include "DataFormats/L1Trigger/interface/BXVector.h"
0006
0007 namespace l1t {
0008
0009 class CaloCluster : public L1Candidate {
0010 public:
0011 enum ClusterFlag {
0012 INCLUDE_SEED = 0,
0013 INCLUDE_NW = 1,
0014 INCLUDE_N = 2,
0015 INCLUDE_NE = 3,
0016 INCLUDE_E = 4,
0017 INCLUDE_SE = 5,
0018 INCLUDE_S = 6,
0019 INCLUDE_SW = 7,
0020 INCLUDE_W = 8,
0021 INCLUDE_NN = 9,
0022 INCLUDE_SS = 10,
0023 TRIM_LEFT = 11,
0024 IS_SECONDARY = 12,
0025 MERGE_UPDOWN = 13,
0026 MERGE_LEFTRIGHT = 14
0027 };
0028
0029 public:
0030 CaloCluster() {}
0031 CaloCluster(const LorentzVector p4, int pt = 0, int eta = 0, int phi = 0);
0032
0033 ~CaloCluster() override;
0034
0035 void setClusterFlag(ClusterFlag flag, bool val = true);
0036 void setHwPtEm(int pt);
0037 void setHwPtHad(int pt);
0038 void setHwSeedPt(int pt);
0039 void setFgEta(int fgEta);
0040 void setFgPhi(int fgPhi);
0041 void setHOverE(int hOverE);
0042 void setFgECAL(int fgECAL);
0043
0044 bool checkClusterFlag(ClusterFlag flag) const;
0045 bool isValid() const;
0046 int hwPtEm() const;
0047 int hwPtHad() const;
0048 int hwSeedPt() const;
0049 int fgEta() const;
0050 int fgPhi() const;
0051 int hOverE() const;
0052 int fgECAL() const;
0053 int clusterFlags() const { return m_clusterFlags; }
0054
0055 bool operator<(const CaloCluster& cl) const;
0056 bool operator>(const CaloCluster& cl) const { return cl < *this; };
0057 bool operator<=(const CaloCluster& cl) const { return !(cl > *this); };
0058 bool operator>=(const CaloCluster& cl) const { return !(cl < *this); };
0059
0060 private:
0061
0062 int m_clusterFlags;
0063
0064
0065 int m_hwPtEm;
0066 int m_hwPtHad;
0067 int m_hwSeedPt;
0068
0069
0070 int m_fgEta;
0071 int m_fgPhi;
0072
0073
0074 int m_hOverE;
0075 int m_fgECAL;
0076 };
0077
0078 typedef BXVector<CaloCluster> CaloClusterBxCollection;
0079
0080 }
0081
0082 #endif