CMS 3D CMS Logo

List of all members | Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
PFClusterValidation Class Reference
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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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 >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 39 of file PFClusterValidation.cc.

Constructor & Destructor Documentation

◆ PFClusterValidation()

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

Definition at line 102 of file PFClusterValidation.cc.

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

102  {
103  hepMCTok_ = consumes<edm::HepMCProduct>(edm::InputTag("generatorSmeared"));
104 
106  consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterECAL"));
108  consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHCAL"));
109  pfClusterHOTok_ = consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHO"));
110  pfClusterHFTok_ = consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHF"));
111 }
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHCALTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHOTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHFTok_
edm::EDGetTokenT< edm::HepMCProduct > hepMCTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterECALTok_

◆ ~PFClusterValidation()

PFClusterValidation::~PFClusterValidation ( )
override

Definition at line 113 of file PFClusterValidation.cc.

113 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 217 of file PFClusterValidation.cc.

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_, L1TPhase2Offline_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().

217  {
218  double eta_MC = 0.;
219  double phi_MC = 0.;
220  double energy_MC = 0.;
221 
223  event.getByToken(hepMCTok_, hepMC);
224  if (not hepMC.isValid()) {
225  edm::LogWarning("PFClusterValidation") << "HepMCProduct not found";
226  return;
227  }
228 
229  // MC particle with highest pt is taken as a direction reference
230  double maxPt = -99999.;
231  const HepMC::GenEvent* myGenEvent = hepMC->GetEvent();
232  for (auto p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p) {
233  double phip = (*p)->momentum().phi();
234  double etap = (*p)->momentum().eta();
235  double pt = (*p)->momentum().perp();
236  double energy = (*p)->momentum().e();
237  if (pt > maxPt) {
238  maxPt = pt;
239  energy_MC = energy;
240  phi_MC = phip;
241  eta_MC = etap;
242  }
243  }
244 
245  egen_MC_->Fill(energy_MC);
246 
248  event.getByToken(pfClusterECALTok_, pfClusterECAL);
249 
251  event.getByToken(pfClusterHCALTok_, pfClusterHCAL);
252 
254  event.getByToken(pfClusterHOTok_, pfClusterHO);
255 
257  event.getByToken(pfClusterHFTok_, pfClusterHF);
258 
259  // sum the energy in a dR cone for each subsystem
260  const double Econe = sumEnergy(pfClusterECAL, eta_MC, phi_MC);
261  const double Hcone = sumEnergy(pfClusterHCAL, eta_MC, phi_MC);
262  const double HOcone = sumEnergy(pfClusterHO, eta_MC, phi_MC);
263  const double HFcone = sumEnergy(pfClusterHF, eta_MC, phi_MC);
264 
265  if (energy_MC > 0.) {
266  if (std::abs(eta_MC) < 0.5) {
267  ratio_Esummed_ECAL_0_->Fill(Econe / energy_MC);
268  ratio_Esummed_HCAL_0_->Fill(Hcone / energy_MC);
269  ratio_Esummed_HO_0_->Fill(HOcone / energy_MC);
270  ratio_Esummed_ECAL_HCAL_0_->Fill((Econe + Hcone) / energy_MC);
271  ratio_Esummed_ECAL_HCAL_HO_0_->Fill((Econe + Hcone + HOcone) / energy_MC);
272  } else if (std::abs(eta_MC) < 1.3 && std::abs(eta_MC) > 0.5) {
273  ratio_Esummed_ECAL_1_->Fill(Econe / energy_MC);
274  ratio_Esummed_HCAL_1_->Fill(Hcone / energy_MC);
275  ratio_Esummed_HO_1_->Fill(HOcone / energy_MC);
276  ratio_Esummed_ECAL_HCAL_1_->Fill((Econe + Hcone) / energy_MC);
277  ratio_Esummed_ECAL_HCAL_HO_1_->Fill((Econe + Hcone + HOcone) / energy_MC);
278  } else if (std::abs(eta_MC) < 2.1 && std::abs(eta_MC) > 1.3) {
279  ratio_Esummed_ECAL_2_->Fill(Econe / energy_MC);
280  ratio_Esummed_HCAL_2_->Fill(Hcone / energy_MC);
281  ratio_Esummed_HO_2_->Fill(HOcone / energy_MC);
282  ratio_Esummed_ECAL_HCAL_2_->Fill((Econe + Hcone) / energy_MC);
283  ratio_Esummed_ECAL_HCAL_HO_2_->Fill((Econe + Hcone + HOcone) / energy_MC);
284  } else if (std::abs(eta_MC) < 2.5 && std::abs(eta_MC) > 2.1) {
285  ratio_Esummed_ECAL_3_->Fill(Econe / energy_MC);
286  ratio_Esummed_HCAL_3_->Fill(Hcone / energy_MC);
287  ratio_Esummed_HO_3_->Fill(HOcone / energy_MC);
288  ratio_Esummed_ECAL_HCAL_3_->Fill((Econe + Hcone) / energy_MC);
289  ratio_Esummed_ECAL_HCAL_HO_3_->Fill((Econe + Hcone + HOcone) / energy_MC);
290  } else if (2.5 < std::abs(eta_MC) && std::abs(eta_MC) < 3.0) {
291  ratio_Esummed_ECAL_4_->Fill(Econe / energy_MC);
292  ratio_Esummed_HCAL_4_->Fill(Hcone / energy_MC);
293  ratio_Esummed_HO_4_->Fill(HOcone / energy_MC);
294  ratio_Esummed_ECAL_HCAL_4_->Fill((Econe + Hcone) / energy_MC);
295  ratio_Esummed_ECAL_HCAL_HO_4_->Fill((Econe + Hcone + HOcone) / energy_MC);
296  } else if (3.0 < std::abs(eta_MC) && std::abs(eta_MC) < 4.0) {
297  ratio_Esummed_HF_5_->Fill(HFcone / energy_MC);
298  } else if (4.0 < std::abs(eta_MC) && std::abs(eta_MC) < 5.0) {
299  ratio_Esummed_HF_6_->Fill(HFcone / energy_MC);
300  }
301  }
302 
303  emean_vs_eta_E_->Fill(eta_MC, Econe);
304  emean_vs_eta_H_->Fill(eta_MC, Hcone);
305  emean_vs_eta_EH_->Fill(eta_MC, Econe + Hcone);
306  emean_vs_eta_HF_->Fill(eta_MC, HFcone);
307  emean_vs_eta_HO_->Fill(eta_MC, HOcone);
308  emean_vs_eta_EHF_->Fill(eta_MC, Econe + Hcone + HFcone);
309  emean_vs_eta_EHFO_->Fill(eta_MC, Econe + Hcone + HFcone + HOcone);
310 }
MonitorElement * ratio_Esummed_HCAL_4_
MonitorElement * ratio_Esummed_ECAL_4_
MonitorElement * emean_vs_eta_EHFO_
MonitorElement * emean_vs_eta_E_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHCALTok_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHOTok_
MonitorElement * ratio_Esummed_HO_3_
MonitorElement * ratio_Esummed_HCAL_0_
MonitorElement * ratio_Esummed_ECAL_0_
MonitorElement * ratio_Esummed_HO_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_1_
void Fill(long long x)
MonitorElement * emean_vs_eta_EH_
MonitorElement * ratio_Esummed_HF_5_
MonitorElement * ratio_Esummed_HCAL_3_
MonitorElement * ratio_Esummed_ECAL_1_
MonitorElement * ratio_Esummed_HF_6_
MonitorElement * emean_vs_eta_EHF_
MonitorElement * emean_vs_eta_H_
MonitorElement * ratio_Esummed_ECAL_HCAL_0_
MonitorElement * ratio_Esummed_HCAL_2_
MonitorElement * ratio_Esummed_ECAL_3_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
MonitorElement * ratio_Esummed_HO_4_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterHFTok_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_0_
MonitorElement * egen_MC_
edm::EDGetTokenT< edm::HepMCProduct > hepMCTok_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_4_
static double sumEnergy(edm::Handle< reco::PFClusterCollection > const &pfClusters, double eta, double phi)
MonitorElement * ratio_Esummed_HCAL_1_
MonitorElement * ratio_Esummed_ECAL_HCAL_3_
MonitorElement * ratio_Esummed_ECAL_HCAL_4_
MonitorElement * ratio_Esummed_HO_0_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_3_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_1_
Log< level::Warning, false > LogWarning
MonitorElement * ratio_Esummed_HO_1_
MonitorElement * emean_vs_eta_HF_
MonitorElement * emean_vs_eta_HO_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterECALTok_
MonitorElement * ratio_Esummed_ECAL_2_

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 115 of file PFClusterValidation.cc.

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_2022v11_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.

117  {
118  constexpr auto size = 100;
119  char histo[size];
120 
121  constexpr double etaBinsOffset[] = {
122  -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,
123  -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,
124  -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,
125  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,
126  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,
127  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};
128  constexpr int etaBins = std::size(etaBinsOffset) - 1;
129 
130  ibooker.setCurrentFolder("ParticleFlow/PFClusterV");
131 
132  // These are the single pion scan histos
133 
134  strncpy(histo, "emean_vs_eta_E", size);
135  emean_vs_eta_E_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
136  strncpy(histo, "emean_vs_eta_H", size);
137  emean_vs_eta_H_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
138  strncpy(histo, "emean_vs_eta_EH", size);
139  emean_vs_eta_EH_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
140 
141  strncpy(histo, "emean_vs_eta_HF", size);
142  emean_vs_eta_HF_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
143  strncpy(histo, "emean_vs_eta_HO", size);
144  emean_vs_eta_HO_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
145 
146  strncpy(histo, "emean_vs_eta_EHF", size);
147  emean_vs_eta_EHF_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
148  strncpy(histo, "emean_vs_eta_EHFO", size);
149  emean_vs_eta_EHFO_ = ibooker.bookProfile(histo, histo, etaBins, etaBinsOffset, -100., 2000., " ");
150 
151  // 1D histos
152 
153  strncpy(histo, "Ratio_Esummed_ECAL_0", size);
154  ratio_Esummed_ECAL_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
155  strncpy(histo, "Ratio_Esummed_HCAL_0", size);
156  ratio_Esummed_HCAL_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
157  strncpy(histo, "Ratio_Esummed_HO_0", size);
158  ratio_Esummed_HO_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
159  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_0", size);
160  ratio_Esummed_ECAL_HCAL_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
161  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_0", size);
162  ratio_Esummed_ECAL_HCAL_HO_0_ = ibooker.book1D(histo, histo, 50, 0., 5.);
163 
164  strncpy(histo, "Ratio_Esummed_ECAL_1", size);
165  ratio_Esummed_ECAL_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
166  strncpy(histo, "Ratio_Esummed_HCAL_1", size);
167  ratio_Esummed_HCAL_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
168  strncpy(histo, "Ratio_Esummed_HO_1", size);
169  ratio_Esummed_HO_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
170  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_1", size);
171  ratio_Esummed_ECAL_HCAL_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
172  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_1", size);
173  ratio_Esummed_ECAL_HCAL_HO_1_ = ibooker.book1D(histo, histo, 50, 0., 5.);
174 
175  strncpy(histo, "Ratio_Esummed_ECAL_2", size);
176  ratio_Esummed_ECAL_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
177  strncpy(histo, "Ratio_Esummed_HCAL_2", size);
178  ratio_Esummed_HCAL_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
179  strncpy(histo, "Ratio_Esummed_HO_2", size);
180  ratio_Esummed_HO_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
181  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_2", size);
182  ratio_Esummed_ECAL_HCAL_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
183  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_2", size);
184  ratio_Esummed_ECAL_HCAL_HO_2_ = ibooker.book1D(histo, histo, 50, 0., 5.);
185 
186  strncpy(histo, "Ratio_Esummed_ECAL_3", size);
187  ratio_Esummed_ECAL_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
188  strncpy(histo, "Ratio_Esummed_HCAL_3", size);
189  ratio_Esummed_HCAL_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
190  strncpy(histo, "Ratio_Esummed_HO_3", size);
191  ratio_Esummed_HO_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
192  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_3", size);
193  ratio_Esummed_ECAL_HCAL_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
194  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_3", size);
195  ratio_Esummed_ECAL_HCAL_HO_3_ = ibooker.book1D(histo, histo, 50, 0., 5.);
196 
197  strncpy(histo, "Ratio_Esummed_ECAL_4", size);
198  ratio_Esummed_ECAL_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
199  strncpy(histo, "Ratio_Esummed_HCAL_4", size);
200  ratio_Esummed_HCAL_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
201  strncpy(histo, "Ratio_Esummed_HO_4", size);
202  ratio_Esummed_HO_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
203  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_4", size);
204  ratio_Esummed_ECAL_HCAL_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
205  strncpy(histo, "Ratio_Esummed_ECAL_HCAL_HO_4", size);
206  ratio_Esummed_ECAL_HCAL_HO_4_ = ibooker.book1D(histo, histo, 50, 0., 5.);
207 
208  strncpy(histo, "Ratio_Esummed_HF_5", size);
209  ratio_Esummed_HF_5_ = ibooker.book1D(histo, histo, 50, 0., 5.);
210  strncpy(histo, "Ratio_Esummed_HF_6", size);
211  ratio_Esummed_HF_6_ = ibooker.book1D(histo, histo, 50, 0., 5.);
212 
213  strncpy(histo, "Egen_MC", size);
214  egen_MC_ = ibooker.book1D(histo, histo, 50, 0, 50);
215 }
size
Write out results.
MonitorElement * ratio_Esummed_HCAL_4_
MonitorElement * ratio_Esummed_ECAL_4_
MonitorElement * emean_vs_eta_EHFO_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * emean_vs_eta_E_
MonitorElement * ratio_Esummed_HO_3_
MonitorElement * ratio_Esummed_HCAL_0_
MonitorElement * ratio_Esummed_ECAL_0_
MonitorElement * ratio_Esummed_HO_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_1_
MonitorElement * emean_vs_eta_EH_
MonitorElement * ratio_Esummed_HF_5_
MonitorElement * ratio_Esummed_HCAL_3_
MonitorElement * ratio_Esummed_ECAL_1_
MonitorElement * ratio_Esummed_HF_6_
MonitorElement * emean_vs_eta_EHF_
MonitorElement * emean_vs_eta_H_
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:399
MonitorElement * ratio_Esummed_ECAL_HCAL_0_
MonitorElement * ratio_Esummed_HCAL_2_
MonitorElement * ratio_Esummed_ECAL_3_
MonitorElement * ratio_Esummed_HO_4_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_0_
MonitorElement * egen_MC_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_4_
MonitorElement * ratio_Esummed_HCAL_1_
MonitorElement * ratio_Esummed_ECAL_HCAL_3_
MonitorElement * ratio_Esummed_ECAL_HCAL_4_
MonitorElement * ratio_Esummed_HO_0_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_3_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_2_
MonitorElement * ratio_Esummed_ECAL_HCAL_HO_1_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * ratio_Esummed_HO_1_
MonitorElement * emean_vs_eta_HF_
MonitorElement * emean_vs_eta_HO_
MonitorElement * ratio_Esummed_ECAL_2_

◆ sumEnergy()

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

Definition at line 312 of file PFClusterValidation.cc.

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

Referenced by analyze().

314  {
315  if (not pfClusters.isValid())
316  return 0.;
317 
318  double sum = 0.;
319  for (auto pf = pfClusters->begin(); pf != pfClusters->end(); ++pf) {
320  if (reco::deltaR2(eta, phi, pf->eta(), pf->phi()) < partR2) {
321  sum += pf->energy();
322  }
323  }
324 
325  return sum;
326 }
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:16
bool isValid() const
Definition: HandleBase.h:70
static constexpr double partR2

Member Data Documentation

◆ egen_MC_

MonitorElement* PFClusterValidation::egen_MC_
private

Definition at line 99 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_E_

MonitorElement* PFClusterValidation::emean_vs_eta_E_
private

Definition at line 56 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EH_

MonitorElement* PFClusterValidation::emean_vs_eta_EH_
private

Definition at line 58 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EHF_

MonitorElement* PFClusterValidation::emean_vs_eta_EHF_
private

Definition at line 62 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EHFO_

MonitorElement* PFClusterValidation::emean_vs_eta_EHFO_
private

Definition at line 63 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_H_

MonitorElement* PFClusterValidation::emean_vs_eta_H_
private

Definition at line 57 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_HF_

MonitorElement* PFClusterValidation::emean_vs_eta_HF_
private

Definition at line 60 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_HO_

MonitorElement* PFClusterValidation::emean_vs_eta_HO_
private

Definition at line 61 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ hepMCTok_

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

Definition at line 50 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

◆ partR2

constexpr double PFClusterValidation::partR2 = 0.3 * 0.3
staticprivate

Definition at line 47 of file PFClusterValidation.cc.

Referenced by sumEnergy().

◆ pfClusterECALTok_

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

Definition at line 51 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

◆ pfClusterHCALTok_

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

Definition at line 52 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

◆ pfClusterHFTok_

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

Definition at line 54 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

◆ pfClusterHOTok_

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

Definition at line 53 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

◆ ratio_Esummed_ECAL_0_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_0_
private

Definition at line 65 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_1_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_1_
private

Definition at line 69 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_2_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_2_
private

Definition at line 73 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_3_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_3_
private

Definition at line 77 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_4_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_4_
private

Definition at line 81 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_0_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_0_
private

Definition at line 88 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_1_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_1_
private

Definition at line 90 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_2_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_2_
private

Definition at line 92 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_3_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_3_
private

Definition at line 94 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_4_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_4_
private

Definition at line 96 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_0_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_0_
private

Definition at line 89 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_1_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_1_
private

Definition at line 91 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_2_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_2_
private

Definition at line 93 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_3_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_3_
private

Definition at line 95 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_ECAL_HCAL_HO_4_

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_4_
private

Definition at line 97 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_0_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_0_
private

Definition at line 66 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_1_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_1_
private

Definition at line 70 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_2_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_2_
private

Definition at line 74 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_3_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_3_
private

Definition at line 78 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HCAL_4_

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_4_
private

Definition at line 82 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HF_5_

MonitorElement* PFClusterValidation::ratio_Esummed_HF_5_
private

Definition at line 85 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HF_6_

MonitorElement* PFClusterValidation::ratio_Esummed_HF_6_
private

Definition at line 86 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_0_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_0_
private

Definition at line 67 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_1_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_1_
private

Definition at line 71 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_2_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_2_
private

Definition at line 75 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_3_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_3_
private

Definition at line 79 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

◆ ratio_Esummed_HO_4_

MonitorElement* PFClusterValidation::ratio_Esummed_HO_4_
private

Definition at line 83 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().