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>
11 
12 namespace l1tp2 {
13 
15  public:
17  : l1t::L1Candidate(),
18  calibratedPt_(0.),
19  hovere_(0.),
20  iso_(0.),
21  puCorrPt_(0.),
22  bremStrength_(0.),
23  e2x2_(0.),
24  e2x5_(0.),
25  e3x5_(0.),
26  e5x5_(0.),
27  standaloneWP_(0.),
28  electronWP98_(0.),
29  photonWP80_(0.),
30  electronWP90_(0.),
32  stage2effMatch_(0.){};
33 
35  float calibratedPt,
36  float hovere,
37  float iso,
39  float puCorrPt = 0.,
40  float bremStrength = 0.,
41  float e2x2 = 0.,
42  float e2x5 = 0.,
43  float e3x5 = 0.,
44  float e5x5 = 0.,
45  bool standaloneWP = false,
46  bool electronWP98 = false,
47  bool photonWP80 = false,
48  bool electronWP90 = false,
49  bool looseL1TkMatchWP = false,
50  bool stage2effMatch = false)
51  : l1t::L1Candidate(p4),
53  hovere_(hovere),
54  iso_(iso),
58  e2x2_(e2x2),
59  e2x5_(e2x5),
60  e3x5_(e3x5),
61  e5x5_(e5x5),
68 
69  virtual ~CaloCrystalCluster(){};
70  inline float calibratedPt() const { return calibratedPt_; };
71  inline float hovere() const { return hovere_; };
72  inline float isolation() const { return iso_; };
73  inline float puCorrPt() const { return puCorrPt_; };
74  inline float bremStrength() const { return bremStrength_; };
75  inline DetId seedCrystal() const { return seedCrystal_; };
76  void setCrystalPtInfo(std::vector<float> info) {
77  std::sort(info.begin(), info.end());
78  std::reverse(info.begin(), info.end());
80  };
81  void setExperimentalParams(const std::map<std::string, float> &params) { experimentalParams_ = params; };
82  const std::map<std::string, float> &getExperimentalParams() const { return experimentalParams_; };
83  inline float experimentalParam(std::string name) const {
84  auto iter = experimentalParams_.find(name);
85  if (iter != experimentalParams_.end()) {
86  return iter->second;
87  } else {
88  edm::LogWarning("CaloCrystalCluster") << "Error: no mapping for ExperimentalParam: " << name << std::endl;
89  return -99.;
90  }
91  };
92 
93  inline float e2x2() const { return e2x2_; };
94  inline float e2x5() const { return e2x5_; };
95  inline float e3x5() const { return e3x5_; };
96  inline float e5x5() const { return e5x5_; };
97  inline float standaloneWP() const { return standaloneWP_; };
98  inline float electronWP98() const { return electronWP98_; };
99  inline float photonWP80() const { return photonWP80_; };
100  inline float electronWP90() const { return electronWP90_; };
101  inline float looseL1TkMatchWP() const { return looseL1TkMatchWP_; };
102  inline float stage2effMatch() const { return stage2effMatch_; };
103 
104  // The index range depends on the algorithm eta,phi window, currently 3x5
105  // The pt should always be ordered.
106  inline float crystalPt(unsigned int index) const { return (index < crystalPt_.size()) ? crystalPt_[index] : 0.; };
107 
108  private:
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()
112  float 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:95
l1tp2::CaloCrystalClusterCollection
std::vector< l1tp2::CaloCrystalCluster > CaloCrystalClusterCollection
Definition: CaloCrystalCluster.h:150
l1tp2::CaloCrystalCluster::looseL1TkMatchWP_
bool looseL1TkMatchWP_
Definition: CaloCrystalCluster.h:140
MessageLogger.h
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:81
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:96
l1tp2::CaloCrystalCluster::setCrystalPtInfo
void setCrystalPtInfo(std::vector< float > info)
Definition: CaloCrystalCluster.h:76
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
l1tp2::CaloCrystalCluster::stage2effMatch
float stage2effMatch() const
Definition: CaloCrystalCluster.h:102
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:100
DetId
Definition: DetId.h:17
l1t::L1Candidate
Definition: L1Candidate.h:15
l1tp2::CaloCrystalCluster
Definition: CaloCrystalCluster.h:14
l1tp2::CaloCrystalCluster::experimentalParam
float experimentalParam(std::string name) const
Definition: CaloCrystalCluster.h:83
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:70
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:34
l1tp2::CaloCrystalCluster::bremStrength
float bremStrength() const
Definition: CaloCrystalCluster.h:74
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1tp2::CaloCrystalCluster::looseL1TkMatchWP
float looseL1TkMatchWP() const
Definition: CaloCrystalCluster.h:101
edm::LogWarning
Definition: MessageLogger.h:141
l1tp2::CaloCrystalCluster::hovere_
float hovere_
Definition: CaloCrystalCluster.h:114
l1tp2::CaloCrystalCluster::e2x5
float e2x5() const
Definition: CaloCrystalCluster.h:94
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:75
l1tp2::CaloCrystalCluster::puCorrPt
float puCorrPt() const
Definition: CaloCrystalCluster.h:73
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
l1tp2::CaloCrystalCluster::calibratedPt_
float calibratedPt_
Definition: CaloCrystalCluster.h:106
l1tp2::CaloCrystalCluster::electronWP98_
bool electronWP98_
Definition: CaloCrystalCluster.h:134
L1Candidate.h
l1tp2::CaloCrystalCluster::~CaloCrystalCluster
virtual ~CaloCrystalCluster()
Definition: CaloCrystalCluster.h:69
eostools.move
def move(src, dest)
Definition: eostools.py:511
l1tp2::CaloCrystalCluster::e2x2
float e2x2() const
Definition: CaloCrystalCluster.h:93
DetId.h
l1tp2::CaloCrystalCluster::hovere
float hovere() const
Definition: CaloCrystalCluster.h:71
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:106
l1tp2::CaloCrystalCluster::photonWP80
float photonWP80() const
Definition: CaloCrystalCluster.h:99
l1tp2::CaloCrystalCluster::iso_
float iso_
Definition: CaloCrystalCluster.h:116
l1tp2::CaloCrystalCluster::CaloCrystalCluster
CaloCrystalCluster()
Definition: CaloCrystalCluster.h:16
l1tp2::CaloCrystalCluster::photonWP80_
bool photonWP80_
Definition: CaloCrystalCluster.h:136
l1tp2::CaloCrystalCluster::crystalPt_
std::vector< float > crystalPt_
Definition: CaloCrystalCluster.h:144
l1tp2
Definition: CaloCrystalCluster.h:12
l1tp2::CaloCrystalCluster::electronWP90_
bool electronWP90_
Definition: CaloCrystalCluster.h:138
l1tp2::CaloCrystalCluster::isolation
float isolation() const
Definition: CaloCrystalCluster.h:72
l1tp2::CaloCrystalCluster::standaloneWP
float standaloneWP() const
Definition: CaloCrystalCluster.h:97
l1tp2::CaloCrystalCluster::getExperimentalParams
const std::map< std::string, float > & getExperimentalParams() const
Definition: CaloCrystalCluster.h:82
l1tp2::CaloCrystalCluster::electronWP98
float electronWP98() const
Definition: CaloCrystalCluster.h:98