CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloCluster.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1Trigger_CaloCluster_h
2 #define DataFormats_L1Trigger_CaloCluster_h
3 
6 
7 namespace l1t {
8 
9  class CaloCluster : public L1Candidate {
10  public:
14  INCLUDE_N = 2,
16  INCLUDE_E = 4,
18  INCLUDE_S = 6,
20  INCLUDE_W = 8,
22  INCLUDE_SS = 10,
23  TRIM_LEFT = 11,
25  MERGE_UPDOWN = 13, // 0=up, 1=down
26  MERGE_LEFTRIGHT = 14 // 0=left, 1=right
27  };
28 
29  public:
32  int pt=0,
33  int eta=0,
34  int phi=0
35  );
36 
37  ~CaloCluster();
38 
39 
40 
41 
42  void setClusterFlag(ClusterFlag flag, bool val=true);
43  void setHwPtEm( int pt );
44  void setHwPtHad( int pt );
45  void setHwSeedPt(int pt);
46  void setFgEta(int fgEta);
47  void setFgPhi(int fgPhi);
48  void setHOverE(int hOverE);
49  void setFgECAL(int fgECAL);
50 
51  bool checkClusterFlag(ClusterFlag flag) const;
52  bool isValid() const;
53  int hwPtEm() const;
54  int hwPtHad() const;
55  int hwSeedPt() const;
56  int fgEta() const;
57  int fgPhi() const;
58  int hOverE() const;
59  int fgECAL() const;
60  int clusterFlags() const{return m_clusterFlags;}
61 
62  bool operator<(const CaloCluster& cl) const;
63  bool operator>(const CaloCluster& cl) const {return cl<*this;};
64  bool operator<=(const CaloCluster& cl) const {return !(cl>*this);};
65  bool operator>=(const CaloCluster& cl) const {return !(cl<*this);};
66 
67  private:
68  // Summary of clustering outcomes
69  int m_clusterFlags; // see ClusterFlag bits (15 bits, will evolve)
70 
71  // Energies
72  int m_hwPtEm;
73  int m_hwPtHad;
75 
76  // fine grained position
77  int m_fgEta; // 2 bits (to be defined in agreement with GT inputs)
78  int m_fgPhi; // 2 bits (to be defined in agreement with GT inputs)
79 
80  // identification variables
81  int m_hOverE; // 8 bits (between 0 and 1 -> resolution=1/256=0.39%). Number of bits is not definitive
82  int m_fgECAL; // FG bit of the seed tower
83  };
84 
86 
87 
88 }
89 
90 
91 
92 #endif
int hwPtEm() const
Definition: CaloCluster.cc:76
int fgECAL() const
Definition: CaloCluster.cc:106
BXVector< CaloCluster > CaloClusterBxCollection
Definition: CaloCluster.h:85
int fgPhi() const
Definition: CaloCluster.cc:96
bool operator>=(const CaloCluster &cl) const
Definition: CaloCluster.h:65
math::XYZTLorentzVector LorentzVector
bool isValid() const
Definition: CaloCluster.cc:71
bool operator<=(const CaloCluster &cl) const
Definition: CaloCluster.h:64
virtual double eta() const
momentum pseudorapidity
virtual double pt() const
transverse momentum
void setHwSeedPt(int pt)
Definition: CaloCluster.cc:41
bool operator<(const CaloCluster &cl) const
Definition: CaloCluster.cc:111
void setFgECAL(int fgECAL)
Definition: CaloCluster.cc:61
void setHwPtHad(int pt)
Definition: CaloCluster.cc:36
bool checkClusterFlag(ClusterFlag flag) const
Definition: CaloCluster.cc:66
bool operator>(const CaloCluster &cl) const
Definition: CaloCluster.h:63
int hOverE() const
Definition: CaloCluster.cc:101
int hwSeedPt() const
Definition: CaloCluster.cc:86
void setHOverE(int hOverE)
Definition: CaloCluster.cc:56
void setHwPtEm(int pt)
Definition: CaloCluster.cc:31
int hwPtHad() const
Definition: CaloCluster.cc:81
void setFgPhi(int fgPhi)
Definition: CaloCluster.cc:51
int clusterFlags() const
Definition: CaloCluster.h:60
void setFgEta(int fgEta)
Definition: CaloCluster.cc:46
virtual double phi() const
momentum azimuthal angle
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
void setClusterFlag(ClusterFlag flag, bool val=true)
Definition: CaloCluster.cc:19
int fgEta() const
Definition: CaloCluster.cc:91