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
l1tp2::CaloCrystalCluster::standaloneWP_
bool standaloneWP_
Definition: CaloCrystalCluster.h:132
l1tp2::CaloCrystalCluster::e3x5
float e3x5() const
Definition: CaloCrystalCluster.h:94
l1tp2::CaloCrystalClusterCollection
std::vector< l1tp2::CaloCrystalCluster > CaloCrystalClusterCollection
Definition: CaloCrystalCluster.h:150
l1tp2::CaloCrystalCluster::looseL1TkMatchWP_
bool looseL1TkMatchWP_
Definition: CaloCrystalCluster.h:140
l1tp2::CaloCrystalCluster::e2x5_
float e2x5_
Definition: CaloCrystalCluster.h:126
l1tp2::CaloCrystalCluster::stage2effMatch_
bool stage2effMatch_
Definition: CaloCrystalCluster.h:142
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
l1tp2::CaloCrystalCluster::setExperimentalParams
void setExperimentalParams(const std::map< std::string, float > &params)
Definition: CaloCrystalCluster.h:80
l1tp2::CaloCrystalCluster::experimentalParams_
std::map< std::string, float > experimentalParams_
Definition: CaloCrystalCluster.h:146
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
l1tp2::CaloCrystalCluster::e5x5
float e5x5() const
Definition: CaloCrystalCluster.h:95
l1tp2::CaloCrystalCluster::setCrystalPtInfo
void setCrystalPtInfo(std::vector< float > info)
Definition: CaloCrystalCluster.h:75
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
l1tp2::CaloCrystalCluster::stage2effMatch
float stage2effMatch() const
Definition: CaloCrystalCluster.h:101
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
l1tp2::CaloCrystalCluster::e5x5_
float e5x5_
Definition: CaloCrystalCluster.h:130
l1tp2::CaloCrystalCluster::seedCrystal_
DetId seedCrystal_
Definition: CaloCrystalCluster.h:118
l1tp2::CaloCrystalCluster::electronWP90
float electronWP90() const
Definition: CaloCrystalCluster.h:99
DetId
Definition: DetId.h:17
l1t::L1Candidate
Definition: L1Candidate.h:15
l1tp2::CaloCrystalCluster::experimentalParam
float experimentalParam(const std::string &name) const
Definition: CaloCrystalCluster.h:82
l1tp2::CaloCrystalCluster
Definition: CaloCrystalCluster.h:13
l1tp2::CaloCrystalCluster::bremStrength_
float bremStrength_
Definition: CaloCrystalCluster.h:122
l1tp2::CaloCrystalCluster::e3x5_
float e3x5_
Definition: CaloCrystalCluster.h:128
l1tp2::CaloCrystalCluster::calibratedPt
float calibratedPt() const
Definition: CaloCrystalCluster.h:69
l1tp2::CaloCrystalCluster::CaloCrystalCluster
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)
Definition: CaloCrystalCluster.h:33
l1tp2::CaloCrystalCluster::bremStrength
float bremStrength() const
Definition: CaloCrystalCluster.h:73
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1tp2::CaloCrystalCluster::looseL1TkMatchWP
float looseL1TkMatchWP() const
Definition: CaloCrystalCluster.h:100
l1tp2::CaloCrystalCluster::hovere_
float hovere_
Definition: CaloCrystalCluster.h:114
l1tp2::CaloCrystalCluster::e2x5
float e2x5() const
Definition: CaloCrystalCluster.h:93
l1t::L1Candidate::L1Candidate
L1Candidate()
Definition: L1Candidate.cc:4
l1tp2::CaloCrystalCluster::e2x2_
float e2x2_
Definition: CaloCrystalCluster.h:124
l1t
delete x;
Definition: CaloConfig.h:22
l1tp2::CaloCrystalCluster::seedCrystal
DetId seedCrystal() const
Definition: CaloCrystalCluster.h:74
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
l1tp2::CaloCrystalCluster::puCorrPt
float puCorrPt() const
Definition: CaloCrystalCluster.h:72
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
l1tp2::CaloCrystalCluster::warningNoMapping
static void warningNoMapping(const std::string &name)
Definition: CaloCrystalCluster.cc:4
l1tp2::CaloCrystalCluster::calibratedPt_
float calibratedPt_
Definition: CaloCrystalCluster.h:112
l1tp2::CaloCrystalCluster::electronWP98_
bool electronWP98_
Definition: CaloCrystalCluster.h:134
L1Candidate.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
l1tp2::CaloCrystalCluster::e2x2
float e2x2() const
Definition: CaloCrystalCluster.h:92
DetId.h
l1tp2::CaloCrystalCluster::hovere
float hovere() const
Definition: CaloCrystalCluster.h:70
reco::Candidate::index
unsigned int index
index type
Definition: Candidate.h:50
l1tp2::CaloCrystalCluster::puCorrPt_
float puCorrPt_
Definition: CaloCrystalCluster.h:120
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
l1tp2::CaloCrystalCluster::crystalPt
float crystalPt(unsigned int index) const
Definition: CaloCrystalCluster.h:105
l1tp2::CaloCrystalCluster::photonWP80
float photonWP80() const
Definition: CaloCrystalCluster.h:98
l1tp2::CaloCrystalCluster::iso_
float iso_
Definition: CaloCrystalCluster.h:116
l1tp2::CaloCrystalCluster::CaloCrystalCluster
CaloCrystalCluster()
Definition: CaloCrystalCluster.h:15
l1tp2::CaloCrystalCluster::photonWP80_
bool photonWP80_
Definition: CaloCrystalCluster.h:136
l1tp2::CaloCrystalCluster::crystalPt_
std::vector< float > crystalPt_
Definition: CaloCrystalCluster.h:144
l1tp2
Definition: CaloCrystalCluster.h:11
l1tp2::CaloCrystalCluster::~CaloCrystalCluster
~CaloCrystalCluster() override
Definition: CaloCrystalCluster.h:68
l1tp2::CaloCrystalCluster::electronWP90_
bool electronWP90_
Definition: CaloCrystalCluster.h:138
l1tp2::CaloCrystalCluster::isolation
float isolation() const
Definition: CaloCrystalCluster.h:71
l1tp2::CaloCrystalCluster::standaloneWP
float standaloneWP() const
Definition: CaloCrystalCluster.h:96
l1tp2::CaloCrystalCluster::getExperimentalParams
const std::map< std::string, float > & getExperimentalParams() const
Definition: CaloCrystalCluster.h:81
l1tp2::CaloCrystalCluster::electronWP98
float electronWP98() const
Definition: CaloCrystalCluster.h:97