CMS 3D CMS Logo

CaloCrystalCluster.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TCalorimeterPhase2_CaloCrystalsCluster_h
2 #define DataFormats_L1TCalorimeterPhase2_CaloCrystalsCluster_h
3 
4 #include <vector>
5 #include <map>
6 #include <string>
7 #include <algorithm>
10 
11 namespace l1tp2 {
12 
14  public:
16  : l1t::L1Candidate(),
17  calibratedPt_(0.),
18  hovere_(0.),
19  iso_(0.),
20  puCorrPt_(0.),
21  bremStrength_(0.),
22  e2x2_(0.),
23  e2x5_(0.),
24  e3x5_(0.),
25  e5x5_(0.),
26  standaloneWP_(0.),
27  electronWP98_(0.),
28  photonWP80_(0.),
29  electronWP90_(0.),
31  stage2effMatch_(0.){};
32 
34  float calibratedPt,
35  float hovere,
36  float iso,
38  float puCorrPt = 0.,
39  float bremStrength = 0.,
40  float e2x2 = 0.,
41  float e2x5 = 0.,
42  float e3x5 = 0.,
43  float e5x5 = 0.,
44  bool standaloneWP = false,
45  bool electronWP98 = false,
46  bool photonWP80 = false,
47  bool electronWP90 = false,
48  bool looseL1TkMatchWP = false,
49  bool stage2effMatch = false)
50  : l1t::L1Candidate(p4),
52  hovere_(hovere),
53  iso_(iso),
57  e2x2_(e2x2),
58  e2x5_(e2x5),
59  e3x5_(e3x5),
60  e5x5_(e5x5),
67 
68  ~CaloCrystalCluster() override{};
69  inline float calibratedPt() const { return calibratedPt_; };
70  inline float hovere() const { return hovere_; };
71  inline float isolation() const { return iso_; };
72  inline float puCorrPt() const { return puCorrPt_; };
73  inline float bremStrength() const { return bremStrength_; };
74  inline DetId seedCrystal() const { return seedCrystal_; };
75  void setCrystalPtInfo(std::vector<float> info) {
76  std::sort(info.begin(), info.end());
77  std::reverse(info.begin(), info.end());
79  };
80  void setExperimentalParams(const std::map<std::string, float> &params) { experimentalParams_ = params; };
81  const std::map<std::string, float> &getExperimentalParams() const { return experimentalParams_; };
82  inline float experimentalParam(const std::string &name) const {
83  auto iter = experimentalParams_.find(name);
84  if (iter != experimentalParams_.end()) {
85  return iter->second;
86  } else {
88  return -99.;
89  }
90  };
91 
92  inline float e2x2() const { return e2x2_; };
93  inline float e2x5() const { return e2x5_; };
94  inline float e3x5() const { return e3x5_; };
95  inline float e5x5() const { return e5x5_; };
96  inline float standaloneWP() const { return standaloneWP_; };
97  inline float electronWP98() const { return electronWP98_; };
98  inline float photonWP80() const { return photonWP80_; };
99  inline float electronWP90() const { return electronWP90_; };
100  inline float looseL1TkMatchWP() const { return looseL1TkMatchWP_; };
101  inline float stage2effMatch() const { return stage2effMatch_; };
102 
103  // The index range depends on the algorithm eta,phi window, currently 3x5
104  // The pt should always be ordered.
105  inline float crystalPt(unsigned int index) const { return (index < crystalPt_.size()) ? crystalPt_[index] : 0.; };
106 
107  private:
108  static void warningNoMapping(const std::string &name);
109  // pT calibrated to Stage-2 (Phase-I) L1EG Objects. NOTE
110  // all working points are defined with respect to cluster.pt(),
111  // not cluster.calibratedPt()
113  // HCal energy in region behind cluster (for size, look in producer) / ECal energy in cluster
114  float hovere_;
115  // ECal isolation (for outer window size, again look in producer)
116  float iso_;
117  // DetId of seed crystal used to make cluster (could be EBDetId or EEDetId)
119  // Pileup-corrected energy deposit, not studied carefully yet, don't use
120  float puCorrPt_;
121  // Bremstrahlung strength, should be proportional to the likelihood of a brem.
123  // Shower shape variable - max 2x2 energy containing seed crystal
124  float e2x2_;
125  // Shower shape variable - max 2x5 energy containing seed crystal, phi centered
126  float e2x5_;
127  // Shower shape variable - 3x5 energy containing seed crystal, phi centered
128  float e3x5_;
129  // Shower shape variable - 5x5 energy containing centered on seed crystal
130  float e5x5_;
131  // Standalone L1EG WP
133  // 98% efficient electron WP, for electrons above 35 GeV
135  // 80% efficient photon WP, for photons above 35 GeV
137  // 90% efficient electron based WP, early rise to efficiency plateau
139  // loose isolation and shower shape requirements to be used in conjunction with L1Trk matching
141  // Stage-2 L1EG efficiency matched WP, for rate comparisons
143  // Crystal pt (in order of strength) for all crystals in the cluster
144  std::vector<float> crystalPt_;
145  // For investigating novel algorithm parameters
146  std::map<std::string, float> experimentalParams_;
147  };
148 
149  // Concrete collection of output objects (with extra tuning information)
150  typedef std::vector<l1tp2::CaloCrystalCluster> CaloCrystalClusterCollection;
151 } // namespace l1tp2
152 #endif
static const TGPicture * info(bool iBackgroundIsBlack)
std::map< std::string, float > experimentalParams_
delete x;
Definition: CaloConfig.h:22
const LorentzVector & p4() const final
four-momentum Lorentz vector
std::vector< float > crystalPt_
CaloCrystalCluster(const PolarLorentzVector &p4, float calibratedPt, float hovere, float iso, DetId seedCrystal, float puCorrPt=0., float bremStrength=0., float e2x2=0., float e2x5=0., float e3x5=0., float e5x5=0., bool standaloneWP=false, bool electronWP98=false, bool photonWP80=false, bool electronWP90=false, bool looseL1TkMatchWP=false, bool stage2effMatch=false)
float crystalPt(unsigned int index) const
const std::map< std::string, float > & getExperimentalParams() const
Definition: DetId.h:17
unsigned int index
index type
Definition: Candidate.h:50
std::vector< l1tp2::CaloCrystalCluster > CaloCrystalClusterCollection
float experimentalParam(const std::string &name) const
void setExperimentalParams(const std::map< std::string, float > &params)
static void warningNoMapping(const std::string &name)
def move(src, dest)
Definition: eostools.py:511
void setCrystalPtInfo(std::vector< float > info)
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38