1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#ifndef DataFormats_L1Trigger_CaloCluster_h
#define DataFormats_L1Trigger_CaloCluster_h
#include "DataFormats/L1Trigger/interface/L1Candidate.h"
#include "DataFormats/L1Trigger/interface/BXVector.h"
namespace l1t {
class CaloCluster : public L1Candidate {
public:
enum ClusterFlag {
INCLUDE_SEED = 0,
INCLUDE_NW = 1,
INCLUDE_N = 2,
INCLUDE_NE = 3,
INCLUDE_E = 4,
INCLUDE_SE = 5,
INCLUDE_S = 6,
INCLUDE_SW = 7,
INCLUDE_W = 8,
INCLUDE_NN = 9,
INCLUDE_SS = 10,
TRIM_LEFT = 11,
IS_SECONDARY = 12,
MERGE_UPDOWN = 13, // 0=up, 1=down
MERGE_LEFTRIGHT = 14 // 0=left, 1=right
};
public:
CaloCluster() {}
CaloCluster(const LorentzVector p4, int pt = 0, int eta = 0, int phi = 0);
~CaloCluster() override;
void setClusterFlag(ClusterFlag flag, bool val = true);
void setHwPtEm(int pt);
void setHwPtHad(int pt);
void setHwSeedPt(int pt);
void setFgEta(int fgEta);
void setFgPhi(int fgPhi);
void setHOverE(int hOverE);
void setFgECAL(int fgECAL);
bool checkClusterFlag(ClusterFlag flag) const;
bool isValid() const;
int hwPtEm() const;
int hwPtHad() const;
int hwSeedPt() const;
int fgEta() const;
int fgPhi() const;
int hOverE() const;
int fgECAL() const;
int clusterFlags() const { return m_clusterFlags; }
bool operator<(const CaloCluster& cl) const;
bool operator>(const CaloCluster& cl) const { return cl < *this; };
bool operator<=(const CaloCluster& cl) const { return !(cl > *this); };
bool operator>=(const CaloCluster& cl) const { return !(cl < *this); };
private:
// Summary of clustering outcomes
int m_clusterFlags; // see ClusterFlag bits (15 bits, will evolve)
// Energies
int m_hwPtEm;
int m_hwPtHad;
int m_hwSeedPt;
// fine grained position
int m_fgEta; // 2 bits (to be defined in agreement with GT inputs)
int m_fgPhi; // 2 bits (to be defined in agreement with GT inputs)
// identification variables
int m_hOverE; // 8 bits (between 0 and 1 -> resolution=1/256=0.39%). Number of bits is not definitive
int m_fgECAL; // FG bit of the seed tower
};
typedef BXVector<CaloCluster> CaloClusterBxCollection;
} // namespace l1t
#endif
|