CMS 3D CMS Logo

List of all members | Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
PFClusterValidation Class Reference

#include <PFClusterValidation.h>

Inheritance diagram for PFClusterValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &c) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 PFClusterValidation (edm::ParameterSet const &conf)
 
 ~PFClusterValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Private Member Functions

static double sumEnergy (edm::Handle< reco::PFClusterCollection > const &pfClusters, double eta, double phi)
 

Private Attributes

MonitorElementegen_MC_
 
MonitorElementemean_vs_eta_E_
 
MonitorElementemean_vs_eta_EH_
 
MonitorElementemean_vs_eta_EHF_
 
MonitorElementemean_vs_eta_EHFO_
 
MonitorElementemean_vs_eta_H_
 
MonitorElementemean_vs_eta_HF_
 
MonitorElementemean_vs_eta_HO_
 
edm::EDGetTokenT< edm::HepMCProducthepMCTok_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfClusterECALTok_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfClusterHCALTok_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfClusterHFTok_
 
edm::EDGetTokenT< reco::PFClusterCollectionpfClusterHOTok_
 
MonitorElementratio_Esummed_ECAL_0_
 
MonitorElementratio_Esummed_ECAL_1_
 
MonitorElementratio_Esummed_ECAL_2_
 
MonitorElementratio_Esummed_ECAL_3_
 
MonitorElementratio_Esummed_ECAL_4_
 
MonitorElementratio_Esummed_ECAL_HCAL_0_
 
MonitorElementratio_Esummed_ECAL_HCAL_1_
 
MonitorElementratio_Esummed_ECAL_HCAL_2_
 
MonitorElementratio_Esummed_ECAL_HCAL_3_
 
MonitorElementratio_Esummed_ECAL_HCAL_4_
 
MonitorElementratio_Esummed_ECAL_HCAL_HO_0_
 
MonitorElementratio_Esummed_ECAL_HCAL_HO_1_
 
MonitorElementratio_Esummed_ECAL_HCAL_HO_2_
 
MonitorElementratio_Esummed_ECAL_HCAL_HO_3_
 
MonitorElementratio_Esummed_ECAL_HCAL_HO_4_
 
MonitorElementratio_Esummed_HCAL_0_
 
MonitorElementratio_Esummed_HCAL_1_
 
MonitorElementratio_Esummed_HCAL_2_
 
MonitorElementratio_Esummed_HCAL_3_
 
MonitorElementratio_Esummed_HCAL_4_
 
MonitorElementratio_Esummed_HF_5_
 
MonitorElementratio_Esummed_HF_6_
 
MonitorElementratio_Esummed_HO_0_
 
MonitorElementratio_Esummed_HO_1_
 
MonitorElementratio_Esummed_HO_2_
 
MonitorElementratio_Esummed_HO_3_
 
MonitorElementratio_Esummed_HO_4_
 

Static Private Attributes

static constexpr double partR2 = 0.3 * 0.3
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 41 of file PFClusterValidation.h.

Constructor & Destructor Documentation

◆ PFClusterValidation()

PFClusterValidation::PFClusterValidation ( edm::ParameterSet const &  conf)

Definition at line 9 of file PFClusterValidation.cc.

9  {
10  hepMCTok_ = consumes<edm::HepMCProduct>(edm::InputTag("generatorSmeared"));
11 
13  consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterECAL"));
15  consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHCAL"));
16  pfClusterHOTok_ = consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHO"));
17  pfClusterHFTok_ = consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHF"));
18 }

References edm::ParameterSet::getUntrackedParameter(), hepMCTok_, pfClusterECALTok_, pfClusterHCALTok_, pfClusterHFTok_, and pfClusterHOTok_.

◆ ~PFClusterValidation()

PFClusterValidation::~PFClusterValidation ( )
override

Definition at line 20 of file PFClusterValidation.cc.

20 {}

Member Function Documentation

◆ analyze()

void PFClusterValidation::analyze ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 124 of file PFClusterValidation.cc.

124  {
125  double eta_MC = 0.;
126  double phi_MC = 0.;
127  double energy_MC = 0.;
128 
130  event.getByToken(hepMCTok_, hepMC);
131  if (not hepMC.isValid()) {
132  edm::LogWarning("PFClusterValidation") << "HepMCProduct not found";
133  return;
134  }
135 
136  // MC particle with highest pt is taken as a direction reference
137  double maxPt = -99999.;
138  const HepMC::GenEvent* myGenEvent = hepMC->GetEvent();
139  for (auto p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p) {
140  double phip = (*p)->momentum().phi();
141  double etap = (*p)->momentum().eta();
142  double pt = (*p)->momentum().perp();
143  double energy = (*p)->momentum().e();
144  if (pt > maxPt) {
145  maxPt = pt;
146  energy_MC = energy;
147  phi_MC = phip;
148  eta_MC = etap;
149  }
150  }
151 
152  egen_MC_->Fill(energy_MC);
153 
155  event.getByToken(pfClusterECALTok_, pfClusterECAL);
156 
158  event.getByToken(pfClusterHCALTok_, pfClusterHCAL);
159 
161  event.getByToken(pfClusterHOTok_, pfClusterHO);
162 
164  event.getByToken(pfClusterHFTok_, pfClusterHF);
165 
166  // sum the energy in a dR cone for each subsystem
167  const double Econe = sumEnergy(pfClusterECAL, eta_MC, phi_MC);
168  const double Hcone = sumEnergy(pfClusterHCAL, eta_MC, phi_MC);
169  const double HOcone = sumEnergy(pfClusterHO, eta_MC, phi_MC);
170  const double HFcone = sumEnergy(pfClusterHF, eta_MC, phi_MC);
171 
172  if (energy_MC > 0.) {
173  if (std::abs(eta_MC) < 0.5) {
174  ratio_Esummed_ECAL_0_->Fill(Econe / energy_MC);
175  ratio_Esummed_HCAL_0_->Fill(Hcone / energy_MC);
176  ratio_Esummed_HO_0_->Fill(HOcone / energy_MC);
177  ratio_Esummed_ECAL_HCAL_0_->Fill((Econe + Hcone) / energy_MC);
178  ratio_Esummed_ECAL_HCAL_HO_0_->Fill((Econe + Hcone + HOcone) / energy_MC);
179  } else if (std::abs(eta_MC) < 1.3 && std::abs(eta_MC) > 0.5) {
180  ratio_Esummed_ECAL_1_->Fill(Econe / energy_MC);
181  ratio_Esummed_HCAL_1_->Fill(Hcone / energy_MC);
182  ratio_Esummed_HO_1_->Fill(HOcone / energy_MC);
183  ratio_Esummed_ECAL_HCAL_1_->Fill((Econe + Hcone) / energy_MC);
184  ratio_Esummed_ECAL_HCAL_HO_1_->Fill((Econe + Hcone + HOcone) / energy_MC);
185  } else if (std::abs(eta_MC) < 2.1 && std::abs(eta_MC) > 1.3) {
186  ratio_Esummed_ECAL_2_->Fill(Econe / energy_MC);
187  ratio_Esummed_HCAL_2_->Fill(Hcone / energy_MC);
188  ratio_Esummed_HO_2_->Fill(HOcone / energy_MC);
189  ratio_Esummed_ECAL_HCAL_2_->Fill((Econe + Hcone) / energy_MC);
190  ratio_Esummed_ECAL_HCAL_HO_2_->Fill((Econe + Hcone + HOcone) / energy_MC);
191  } else if (std::abs(eta_MC) < 2.5 && std::abs(eta_MC) > 2.1) {
192  ratio_Esummed_ECAL_3_->Fill(Econe / energy_MC);
193  ratio_Esummed_HCAL_3_->Fill(Hcone / energy_MC);
194  ratio_Esummed_HO_3_->Fill(HOcone / energy_MC);
195  ratio_Esummed_ECAL_HCAL_3_->Fill((Econe + Hcone) / energy_MC);
196  ratio_Esummed_ECAL_HCAL_HO_3_->Fill((Econe + Hcone + HOcone) / energy_MC);
197  } else if (2.5 < std::abs(eta_MC) && std::abs(eta_MC) < 3.0) {
198  ratio_Esummed_ECAL_4_->Fill(Econe / energy_MC);
199  ratio_Esummed_HCAL_4_->Fill(Hcone / energy_MC);
200  ratio_Esummed_HO_4_->Fill(HOcone / energy_MC);
201  ratio_Esummed_ECAL_HCAL_4_->Fill((Econe + Hcone) / energy_MC);
202  ratio_Esummed_ECAL_HCAL_HO_4_->Fill((Econe + Hcone + HOcone) / energy_MC);
203  } else if (3.0 < std::abs(eta_MC) && std::abs(eta_MC) < 4.0) {
204  ratio_Esummed_HF_5_->Fill(HFcone / energy_MC);
205  } else if (4.0 < std::abs(eta_MC) && std::abs(eta_MC) < 5.0) {
206  ratio_Esummed_HF_6_->Fill(HFcone / energy_MC);
207  }
208  }
209 
210  emean_vs_eta_E_->Fill(eta_MC, Econe);
211  emean_vs_eta_H_->Fill(eta_MC, Hcone);
212  emean_vs_eta_EH_->Fill(eta_MC, Econe + Hcone);
213  emean_vs_eta_HF_->Fill(eta_MC, HFcone);
214  emean_vs_eta_HO_->Fill(eta_MC, HOcone);
215  emean_vs_eta_EHF_->Fill(eta_MC, Econe + Hcone + HFcone);
216  emean_vs_eta_EHFO_->Fill(eta_MC, Econe + Hcone + HFcone + HOcone);
217 }

References funct::abs(), egen_MC_, emean_vs_eta_E_, emean_vs_eta_EH_, emean_vs_eta_EHF_, emean_vs_eta_EHFO_, emean_vs_eta_H_, emean_vs_eta_HF_, emean_vs_eta_HO_, HCALHighEnergyHPDFilter_cfi::energy, dqm::impl::MonitorElement::Fill(), MuonClassifier_cff::hepMC, hepMCTok_, MuonErrorMatrixAnalyzer_cfi::maxPt, AlCaHLTBitMon_ParallelJobs::p, pfClusterECALTok_, pfClusterHCALTok_, pfClusterHFTok_, pfClusterHOTok_, DiDispStaMuonMonitor_cfi::pt, ratio_Esummed_ECAL_0_, ratio_Esummed_ECAL_1_, ratio_Esummed_ECAL_2_, ratio_Esummed_ECAL_3_, ratio_Esummed_ECAL_4_, ratio_Esummed_ECAL_HCAL_0_, ratio_Esummed_ECAL_HCAL_1_, ratio_Esummed_ECAL_HCAL_2_, ratio_Esummed_ECAL_HCAL_3_, ratio_Esummed_ECAL_HCAL_4_, ratio_Esummed_ECAL_HCAL_HO_0_, ratio_Esummed_ECAL_HCAL_HO_1_, ratio_Esummed_ECAL_HCAL_HO_2_, ratio_Esummed_ECAL_HCAL_HO_3_, ratio_Esummed_ECAL_HCAL_HO_4_, ratio_Esummed_HCAL_0_, ratio_Esummed_HCAL_1_, ratio_Esummed_HCAL_2_, ratio_Esummed_HCAL_3_, ratio_Esummed_HCAL_4_, ratio_Esummed_HF_5_, ratio_Esummed_HF_6_, ratio_Esummed_HO_0_, ratio_Esummed_HO_1_, ratio_Esummed_HO_2_, ratio_Esummed_HO_3_, ratio_Esummed_HO_4_, and sumEnergy().

◆ bookHistograms()

void PFClusterValidation::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  irun,
edm::EventSetup const &  isetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 22 of file PFClusterValidation.cc.

24  {
25  constexpr auto size = 100;
26  char histo[size];
27 
28  constexpr double etaBinsOffset[] = {
29  -5.191, -4.889, -4.716, -4.538, -4.363, -4.191, -4.013, -3.839, -3.664, -3.489, -3.314, -3.139, -2.964, -2.853,
30  -2.65, -2.5, -2.322, -2.172, -2.043, -1.93, -1.83, -1.74, -1.653, -1.566, -1.479, -1.392, -1.305, -1.218,
31  -1.131, -1.044, -0.957, -0.879, -0.783, -0.696, -0.609, -0.522, -0.435, -0.348, -0.261, -0.174, -0.087, 0,
32  0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696, 0.783, 0.879, 0.957, 1.044, 1.131, 1.218,
33  1.305, 1.392, 1.479, 1.566, 1.653, 1.74, 1.83, 1.93, 2.043, 2.172, 2.322, 2.5, 2.65, 2.853,
34  2.964, 3.139, 3.314, 3.489, 3.664, 3.839, 4.013, 4.191, 4.363, 4.538, 4.716, 4.889, 5.191};
35  constexpr int etaBins = std::size(etaBinsOffset) - 1;
36 
37  ibooker.setCurrentFolder("ParticleFlow/PFClusterV");
38 
39  // These are the single pion scan histos
40 
41  strncpy(histo, "emean_vs_eta_E", size);
42  emean_vs_eta_E_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
43  strncpy(histo, "emean_vs_eta_H", size);
44  emean_vs_eta_H_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
45  strncpy(histo, "emean_vs_eta_EH", size);
46  emean_vs_eta_EH_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
47 
48  strncpy(histo, "emean_vs_eta_HF", size);
49  emean_vs_eta_HF_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
50  strncpy(histo, "emean_vs_eta_HO", size);
51  emean_vs_eta_HO_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
52 
53  strncpy(histo, "emean_vs_eta_EHF", size);
54  emean_vs_eta_EHF_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
55  strncpy(histo, "emean_vs_eta_EHFO", size);
56  emean_vs_eta_EHFO_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
57 
58  // 1D histos
59 
60  strncpy(histo, "Ratio_Esummed_ECAL_0", size);
61  ratio_Esummed_ECAL_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
62  strncpy(histo, "Ratio_Esummed_HCAL_0", size);
63  ratio_Esummed_HCAL_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
64  strncpy(histo, "Ratio_Esummed_HO_0", size);
65  ratio_Esummed_HO_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
66  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_0", size);
67  ratio_Esummed_ECAL_HCAL_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
68  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_0", size);
69  ratio_Esummed_ECAL_HCAL_HO_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
70 
71  strncpy(histo, "Ratio_Esummed_ECAL_1", size);
72  ratio_Esummed_ECAL_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
73  strncpy(histo, "Ratio_Esummed_HCAL_1", size);
74  ratio_Esummed_HCAL_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
75  strncpy(histo, "Ratio_Esummed_HO_1", size);
76  ratio_Esummed_HO_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
77  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_1", size);
78  ratio_Esummed_ECAL_HCAL_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
79  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_1", size);
80  ratio_Esummed_ECAL_HCAL_HO_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
81 
82  strncpy(histo, "Ratio_Esummed_ECAL_2", size);
83  ratio_Esummed_ECAL_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
84  strncpy(histo, "Ratio_Esummed_HCAL_2", size);
85  ratio_Esummed_HCAL_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
86  strncpy(histo, "Ratio_Esummed_HO_2", size);
87  ratio_Esummed_HO_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
88  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_2", size);
89  ratio_Esummed_ECAL_HCAL_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
90  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_2", size);
91  ratio_Esummed_ECAL_HCAL_HO_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
92 
93  strncpy(histo, "Ratio_Esummed_ECAL_3", size);
94  ratio_Esummed_ECAL_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
95  strncpy(histo, "Ratio_Esummed_HCAL_3", size);
96  ratio_Esummed_HCAL_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
97  strncpy(histo, "Ratio_Esummed_HO_3", size);
98  ratio_Esummed_HO_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
99  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_3", size);
100  ratio_Esummed_ECAL_HCAL_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
101  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_3", size);
102  ratio_Esummed_ECAL_HCAL_HO_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
103 
104  strncpy(histo, "Ratio_Esummed_ECAL_4", size);
105  ratio_Esummed_ECAL_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
106  strncpy(histo, "Ratio_Esummed_HCAL_4", size);
107  ratio_Esummed_HCAL_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
108  strncpy(histo, "Ratio_Esummed_HO_4", size);
109  ratio_Esummed_HO_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
110  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_4", size);
111  ratio_Esummed_ECAL_HCAL_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
112  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_4", size);
113  ratio_Esummed_ECAL_HCAL_HO_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
114 
115  strncpy(histo, "Ratio_Esummed_HF_5", size);
116  ratio_Esummed_HF_5_ = ibooker.book1D(histo, histo, 50, 0., 5.);
117  strncpy(histo, "Ratio_Esummed_HF_6", size);
118  ratio_Esummed_HF_6_ = ibooker.book1D(histo, histo, 50, 0., 5.);
119 
120  strncpy(histo, "Egen_MC", size);
121  egen_MC_ = ibooker.book1D(histo, histo, 50, 0, 50);
122 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::bookProfile(), egen_MC_, emean_vs_eta_E_, emean_vs_eta_EH_, emean_vs_eta_EHF_, emean_vs_eta_EHFO_, emean_vs_eta_H_, emean_vs_eta_HF_, emean_vs_eta_HO_, HLT_FULL_cff::etaBins, defaults_cfi::etaBinsOffset, timingPdfMaker::histo, ratio_Esummed_ECAL_0_, ratio_Esummed_ECAL_1_, ratio_Esummed_ECAL_2_, ratio_Esummed_ECAL_3_, ratio_Esummed_ECAL_4_, ratio_Esummed_ECAL_HCAL_0_, ratio_Esummed_ECAL_HCAL_1_, ratio_Esummed_ECAL_HCAL_2_, ratio_Esummed_ECAL_HCAL_3_, ratio_Esummed_ECAL_HCAL_4_, ratio_Esummed_ECAL_HCAL_HO_0_, ratio_Esummed_ECAL_HCAL_HO_1_, ratio_Esummed_ECAL_HCAL_HO_2_, ratio_Esummed_ECAL_HCAL_HO_3_, ratio_Esummed_ECAL_HCAL_HO_4_, ratio_Esummed_HCAL_0_, ratio_Esummed_HCAL_1_, ratio_Esummed_HCAL_2_, ratio_Esummed_HCAL_3_, ratio_Esummed_HCAL_4_, ratio_Esummed_HF_5_, ratio_Esummed_HF_6_, ratio_Esummed_HO_0_, ratio_Esummed_HO_1_, ratio_Esummed_HO_2_, ratio_Esummed_HO_3_, ratio_Esummed_HO_4_, dqm::implementation::NavigatorBase::setCurrentFolder(), and findQualityFiles::size.

◆ sumEnergy()

double PFClusterValidation::sumEnergy ( edm::Handle< reco::PFClusterCollection > const &  pfClusters,
double  eta,
double  phi 
)
staticprivate

Definition at line 219 of file PFClusterValidation.cc.

221  {
222  if (not pfClusters.isValid())
223  return 0.;
224 
225  double sum = 0.;
226  for (auto pf = pfClusters->begin(); pf != pfClusters->end(); ++pf) {
227  if (reco::deltaR2(eta, phi, pf->eta(), pf->phi()) < partR2) {
228  sum += pf->energy();
229  }
230  }
231 
232  return sum;
233 }

References reco::deltaR2(), PVValHelper::eta, edm::HandleBase::isValid(), partR2, packedPFCandidateRefMixer_cfi::pf, and phi.

Referenced by analyze().

Member Data Documentation

◆ egen_MC_

MonitorElement* PFClusterValidation::egen_MC_
private

Definition at line 101 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_E_

MonitorElement* PFClusterValidation::emean_vs_eta_E_
private

Definition at line 58 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EH_

MonitorElement* PFClusterValidation::emean_vs_eta_EH_
private

Definition at line 60 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EHF_

MonitorElement* PFClusterValidation::emean_vs_eta_EHF_
private

Definition at line 64 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EHFO_

MonitorElement* PFClusterValidation::emean_vs_eta_EHFO_
private

Definition at line 65 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_H_

MonitorElement* PFClusterValidation::emean_vs_eta_H_
private

Definition at line 59 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_HF_

MonitorElement* PFClusterValidation::emean_vs_eta_HF_
private

Definition at line 62 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_HO_

MonitorElement* PFClusterValidation::emean_vs_eta_HO_
private

Definition at line 63 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ hepMCTok_

edm::EDGetTokenT<edm::HepMCProduct> PFClusterValidation::hepMCTok_
private

Definition at line 52 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ partR2

constexpr double PFClusterValidation::partR2 = 0.3 * 0.3
staticconstexprprivate

Definition at line 49 of file PFClusterValidation.h.

Referenced by sumEnergy().

◆ pfClusterECALTok_

edm::EDGetTokenT<reco::PFClusterCollection> PFClusterValidation::pfClusterECALTok_
private

Definition at line 53 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ pfClusterHCALTok_

edm::EDGetTokenT<reco::PFClusterCollection> PFClusterValidation::pfClusterHCALTok_
private

Definition at line 54 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ pfClusterHFTok_

edm::EDGetTokenT<reco::PFClusterCollection> PFClusterValidation::pfClusterHFTok_
private

Definition at line 56 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ pfClusterHOTok_

edm::EDGetTokenT<reco::PFClusterCollection> PFClusterValidation::pfClusterHOTok_
private

Definition at line 55 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ ratio_Esummed_ECAL_0_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_0_
private

Definition at line 67 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_1_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_1_
private

Definition at line 71 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_2_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_2_
private

Definition at line 75 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_3_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_3_
private

Definition at line 79 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_4_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_4_
private

Definition at line 83 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_0_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_0_
private

Definition at line 90 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_1_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_1_
private

Definition at line 92 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_2_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_2_
private

Definition at line 94 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_3_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_3_
private

Definition at line 96 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_4_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_4_
private

Definition at line 98 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_0_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_0_
private

Definition at line 91 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_1_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_1_
private

Definition at line 93 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_2_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_2_
private

Definition at line 95 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_3_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_3_
private

Definition at line 97 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_4_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_4_
private

Definition at line 99 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_0_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_0_
private

Definition at line 68 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_1_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_1_
private

Definition at line 72 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_2_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_2_
private

Definition at line 76 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_3_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_3_
private

Definition at line 80 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_4_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_4_
private

Definition at line 84 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HF_5_

MonitorElement* PFClusterValidation::ratio_Esummed_HF_5_
private

Definition at line 87 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HF_6_

MonitorElement* PFClusterValidation::ratio_Esummed_HF_6_
private

Definition at line 88 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_0_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_0_
private

Definition at line 69 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_1_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_1_
private

Definition at line 73 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_2_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_2_
private

Definition at line 77 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_3_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_3_
private

Definition at line 81 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_4_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_4_
private

Definition at line 85 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

PFClusterValidation::ratio_Esummed_HCAL_1_
MonitorElement * ratio_Esummed_HCAL_1_
Definition: PFClusterValidation.h:72
PFClusterValidation::partR2
static constexpr double partR2
Definition: PFClusterValidation.h:49
PFClusterValidation::hepMCTok_
edm::EDGetTokenT< edm::HepMCProduct > hepMCTok_
Definition: PFClusterValidation.h:52
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
PFClusterValidation::ratio_Esummed_HCAL_4_
MonitorElement * ratio_Esummed_HCAL_4_
Definition: PFClusterValidation.h:84
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PFClusterValidation::ratio_Esummed_HO_2_
MonitorElement * ratio_Esummed_HO_2_
Definition: PFClusterValidation.h:77
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
HLT_FULL_cff.etaBins
etaBins
Definition: HLT_FULL_cff.py:15267
PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_1_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_1_
Definition: PFClusterValidation.h:93
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
PFClusterValidation::ratio_Esummed_ECAL_HCAL_1_
MonitorElement * ratio_Esummed_ECAL_HCAL_1_
Definition: PFClusterValidation.h:92
PFClusterValidation::emean_vs_eta_HF_
MonitorElement * emean_vs_eta_HF_
Definition: PFClusterValidation.h:62
PFClusterValidation::ratio_Esummed_HO_1_
MonitorElement * ratio_Esummed_HO_1_
Definition: PFClusterValidation.h:73
PFClusterValidation::ratio_Esummed_HCAL_3_
MonitorElement * ratio_Esummed_HCAL_3_
Definition: PFClusterValidation.h:80
edm::Handle< edm::HepMCProduct >
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
PFClusterValidation::ratio_Esummed_ECAL_HCAL_4_
MonitorElement * ratio_Esummed_ECAL_HCAL_4_
Definition: PFClusterValidation.h:98
defaults_cfi.etaBinsOffset
etaBinsOffset
Definition: defaults_cfi.py:23
MuonErrorMatrixAnalyzer_cfi.maxPt
maxPt
Definition: MuonErrorMatrixAnalyzer_cfi.py:19
PFClusterValidation::ratio_Esummed_ECAL_HCAL_0_
MonitorElement * ratio_Esummed_ECAL_HCAL_0_
Definition: PFClusterValidation.h:90
PFClusterValidation::emean_vs_eta_EHFO_
MonitorElement * emean_vs_eta_EHFO_
Definition: PFClusterValidation.h:65
PFClusterValidation::ratio_Esummed_HCAL_0_
MonitorElement * ratio_Esummed_HCAL_0_
Definition: PFClusterValidation.h:68
PFClusterValidation::ratio_Esummed_ECAL_HCAL_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_2_
Definition: PFClusterValidation.h:94
PVValHelper::eta
Definition: PVValidationHelpers.h:70
PFClusterValidation::ratio_Esummed_ECAL_4_
MonitorElement * ratio_Esummed_ECAL_4_
Definition: PFClusterValidation.h:83
PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_2_
Definition: PFClusterValidation.h:95
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
PFClusterValidation::pfClusterHFTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHFTok_
Definition: PFClusterValidation.h:56
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
PFClusterValidation::emean_vs_eta_E_
MonitorElement * emean_vs_eta_E_
Definition: PFClusterValidation.h:58
PFClusterValidation::egen_MC_
MonitorElement * egen_MC_
Definition: PFClusterValidation.h:101
PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_0_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_0_
Definition: PFClusterValidation.h:91
PFClusterValidation::ratio_Esummed_HF_6_
MonitorElement * ratio_Esummed_HF_6_
Definition: PFClusterValidation.h:88
reco::deltaR2
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
PFClusterValidation::ratio_Esummed_HCAL_2_
MonitorElement * ratio_Esummed_HCAL_2_
Definition: PFClusterValidation.h:76
PFClusterValidation::ratio_Esummed_ECAL_HCAL_3_
MonitorElement * ratio_Esummed_ECAL_HCAL_3_
Definition: PFClusterValidation.h:96
PFClusterValidation::pfClusterHOTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHOTok_
Definition: PFClusterValidation.h:55
PFClusterValidation::ratio_Esummed_HF_5_
MonitorElement * ratio_Esummed_HF_5_
Definition: PFClusterValidation.h:87
PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_4_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_4_
Definition: PFClusterValidation.h:99
PFClusterValidation::pfClusterECALTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterECALTok_
Definition: PFClusterValidation.h:53
PFClusterValidation::pfClusterHCALTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHCALTok_
Definition: PFClusterValidation.h:54
PFClusterValidation::emean_vs_eta_EHF_
MonitorElement * emean_vs_eta_EHF_
Definition: PFClusterValidation.h:64
PFClusterValidation::emean_vs_eta_HO_
MonitorElement * emean_vs_eta_HO_
Definition: PFClusterValidation.h:63
DDAxes::phi
PFClusterValidation::ratio_Esummed_ECAL_1_
MonitorElement * ratio_Esummed_ECAL_1_
Definition: PFClusterValidation.h:71
PFClusterValidation::emean_vs_eta_H_
MonitorElement * emean_vs_eta_H_
Definition: PFClusterValidation.h:59
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
PFClusterValidation::ratio_Esummed_ECAL_3_
MonitorElement * ratio_Esummed_ECAL_3_
Definition: PFClusterValidation.h:79
PFClusterValidation::ratio_Esummed_HO_4_
MonitorElement * ratio_Esummed_HO_4_
Definition: PFClusterValidation.h:85
PFClusterValidation::ratio_Esummed_HO_3_
MonitorElement * ratio_Esummed_HO_3_
Definition: PFClusterValidation.h:81
PFClusterValidation::ratio_Esummed_HO_0_
MonitorElement * ratio_Esummed_HO_0_
Definition: PFClusterValidation.h:69
PFClusterValidation::emean_vs_eta_EH_
MonitorElement * emean_vs_eta_EH_
Definition: PFClusterValidation.h:60
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PFClusterValidation::ratio_Esummed_ECAL_2_
MonitorElement * ratio_Esummed_ECAL_2_
Definition: PFClusterValidation.h:75
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
PFClusterValidation::sumEnergy
static double sumEnergy(edm::Handle< reco::PFClusterCollection > const &pfClusters, double eta, double phi)
Definition: PFClusterValidation.cc:219
edm::InputTag
Definition: InputTag.h:15
MuonClassifier_cff.hepMC
hepMC
Definition: MuonClassifier_cff.py:13
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
PFClusterValidation::ratio_Esummed_ECAL_0_
MonitorElement * ratio_Esummed_ECAL_0_
Definition: PFClusterValidation.h:67
PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_3_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_3_
Definition: PFClusterValidation.h:97
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443