CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::HepMCProduct
hepMCTok_
 
edm::EDGetTokenT
< reco::PFClusterCollection
pfClusterECALTok_
 
edm::EDGetTokenT
< reco::PFClusterCollection
pfClusterHCALTok_
 
edm::EDGetTokenT
< reco::PFClusterCollection
pfClusterHFTok_
 
edm::EDGetTokenT
< reco::PFClusterCollection
pfClusterHOTok_
 
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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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 42 of file PFClusterValidation.cc.

Constructor & Destructor Documentation

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

Definition at line 105 of file PFClusterValidation.cc.

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

105  {
106  hepMCTok_ = consumes<edm::HepMCProduct>(edm::InputTag("generatorSmeared"));
107 
109  consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterECAL"));
111  consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHCAL"));
112  pfClusterHOTok_ = consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHO"));
113  pfClusterHFTok_ = consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<edm::InputTag>("pflowClusterHF"));
114 }
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 ( )
override

Definition at line 116 of file PFClusterValidation.cc.

116 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 220 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_, relval_parameters_module::energy, dqm::impl::MonitorElement::Fill(), hepMCTok_, edm::HandleBase::isValid(), 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().

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

Implements DQMEDAnalyzer.

Definition at line 118 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_, 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.

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

Definition at line 315 of file PFClusterValidation.cc.

References reco::deltaR2(), edm::HandleBase::isValid(), and partR2.

Referenced by analyze().

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

Member Data Documentation

MonitorElement* PFClusterValidation::egen_MC_
private

Definition at line 102 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_E_
private

Definition at line 59 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_EH_
private

Definition at line 61 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_EHF_
private

Definition at line 65 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_EHFO_
private

Definition at line 66 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_H_
private

Definition at line 60 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_HF_
private

Definition at line 63 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_HO_
private

Definition at line 64 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 53 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

constexpr double PFClusterValidation::partR2 = 0.3 * 0.3
staticprivate

Definition at line 50 of file PFClusterValidation.cc.

Referenced by sumEnergy().

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

Definition at line 54 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

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

Definition at line 55 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

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

Definition at line 57 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

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

Definition at line 56 of file PFClusterValidation.cc.

Referenced by analyze(), and PFClusterValidation().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_0_
private

Definition at line 68 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_1_
private

Definition at line 72 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_2_
private

Definition at line 76 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_3_
private

Definition at line 80 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_4_
private

Definition at line 84 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_0_
private

Definition at line 91 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_1_
private

Definition at line 93 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_2_
private

Definition at line 95 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_3_
private

Definition at line 97 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_4_
private

Definition at line 99 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_0_
private

Definition at line 92 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_1_
private

Definition at line 94 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_2_
private

Definition at line 96 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_3_
private

Definition at line 98 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_ECAL_HCAL_HO_4_
private

Definition at line 100 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_0_
private

Definition at line 69 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_1_
private

Definition at line 73 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_2_
private

Definition at line 77 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_3_
private

Definition at line 81 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HCAL_4_
private

Definition at line 85 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HF_5_
private

Definition at line 88 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HF_6_
private

Definition at line 89 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HO_0_
private

Definition at line 70 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HO_1_
private

Definition at line 74 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HO_2_
private

Definition at line 78 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HO_3_
private

Definition at line 82 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::ratio_Esummed_HO_4_
private

Definition at line 86 of file PFClusterValidation.cc.

Referenced by analyze(), and bookHistograms().