CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | 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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Types

typedef math::RhoEtaPhiVector Vector
 

Private Member Functions

double dR (double eta1, double phi1, double eta2, double phi2)
 
double sumEnergy (edm::Handle< reco::PFClusterCollection > pfCluster1)
 

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
 
double energy_MC = 9999.
 
double eta_MC
 
int imc
 
bool mc_
 
std::string outputFile_
 
const double partR = 0.3
 
edm::EDGetTokenT< reco::PFClusterCollectionPFClusterECALTok_
 
edm::EDGetTokenT< reco::PFClusterCollectionPFClusterHCALTok_
 
edm::EDGetTokenT< reco::PFClusterCollectionPFClusterHFTok_
 
edm::EDGetTokenT< reco::PFClusterCollectionPFClusterHOTok_
 
double phi_MC
 
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
 
edm::EDGetTokenT< edm::HepMCProducttok_evt_
 

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 50 of file PFClusterValidation.h.

Member Typedef Documentation

◆ Vector

Definition at line 64 of file PFClusterValidation.h.

Constructor & Destructor Documentation

◆ PFClusterValidation()

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

Definition at line 9 of file PFClusterValidation.cc.

9  {
10  tok_evt_ = 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>(
18  conf.getUntrackedParameter<edm::InputTag>("pflowClusterHF")); // cms.InputTag("particleFlowClusterECAL");
19 
20  outputFile_ = conf.getUntrackedParameter<std::string>("outputFile", "myfile.root");
21  mc_ = conf.getUntrackedParameter<bool>("mc", true);
22 
23  imc = 1;
24  if (!mc_)
25  imc = 0;
26 
27  if (!outputFile_.empty()) {
28  edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will be saved to '" << outputFile_.c_str() << "'";
29  } else {
30  edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will NOT be saved";
31  }
32 }

References edm::ParameterSet::getUntrackedParameter(), imc, mc_, outputFile_, PFClusterECALTok_, PFClusterHCALTok_, PFClusterHFTok_, PFClusterHOTok_, AlCaHLTBitMon_QueryRunRegistry::string, and tok_evt_.

◆ ~PFClusterValidation()

PFClusterValidation::~PFClusterValidation ( )
override

Definition at line 34 of file PFClusterValidation.cc.

34 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 137 of file PFClusterValidation.cc.

137  {
138  if (imc != 0) {
140  event.getByToken(tok_evt_, evtMC); // generator in late 310_preX
141  if (!evtMC.isValid()) {
142  edm::LogWarning("Module named pfclusterAnalyzer") << "no HepMCProduct found";
143  }
144 
145  // MC particle with highest pt is taken as a direction reference
146  double maxPt = -99999.;
147  int npart = 0;
148  const HepMC::GenEvent* myGenEvent = evtMC->GetEvent();
149  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
150  ++p) {
151  double phip = (*p)->momentum().phi();
152  double etap = (*p)->momentum().eta();
153  double pt = (*p)->momentum().perp();
154  double energy = (*p)->momentum().e();
155  if (pt > maxPt) {
156  npart++;
157  maxPt = pt;
158  energy_MC = energy;
159  phi_MC = phip;
160  eta_MC = etap;
161  }
162  }
163  }
165 
167  event.getByToken(PFClusterECALTok_, pfClusterECAL);
168  // reco::PFClusterCollection::const_iterator pf;
169 
171  event.getByToken(PFClusterHCALTok_, pfClusterHCAL);
172 
174  event.getByToken(PFClusterHOTok_, pfClusterHO);
175 
177  event.getByToken(PFClusterHFTok_, pfClusterHF);
178 
179  double Econe = 0.;
180  double Hcone = 0.;
181  double HFcone = 0.;
182  double HOcone = 0.;
183 
184  // sum the energy in a dr cone for each subsystem
185  Econe = sumEnergy(pfClusterECAL);
186  Hcone = sumEnergy(pfClusterHCAL);
187  HOcone = sumEnergy(pfClusterHO);
188  HFcone = sumEnergy(pfClusterHF);
189 
190  if (energy_MC > 0.) {
191  if (fabs(eta_MC) < 0.5) {
194  Ratio_Esummed_HO_0->Fill(HOcone / energy_MC);
195  Ratio_Esummed_ECAL_HCAL_0->Fill((Econe + Hcone) / energy_MC);
196  Ratio_Esummed_ECAL_HCAL_HO_0->Fill((Econe + Hcone + HOcone) / energy_MC);
197  } else if (fabs(eta_MC) < 1.3 && fabs(eta_MC) > 0.5) {
200  Ratio_Esummed_HO_1->Fill(HOcone / energy_MC);
201  Ratio_Esummed_ECAL_HCAL_1->Fill((Econe + Hcone) / energy_MC);
202  Ratio_Esummed_ECAL_HCAL_HO_1->Fill((Econe + Hcone + HOcone) / energy_MC);
203  } else if (fabs(eta_MC) < 2.1 && fabs(eta_MC) > 1.3) {
206  Ratio_Esummed_HO_2->Fill(HOcone / energy_MC);
207  Ratio_Esummed_ECAL_HCAL_2->Fill((Econe + Hcone) / energy_MC);
208  Ratio_Esummed_ECAL_HCAL_HO_2->Fill((Econe + Hcone + HOcone) / energy_MC);
209  } else if (fabs(eta_MC) < 2.5 && fabs(eta_MC) > 2.1) {
212  Ratio_Esummed_HO_3->Fill(HOcone / energy_MC);
213  Ratio_Esummed_ECAL_HCAL_3->Fill((Econe + Hcone) / energy_MC);
214  Ratio_Esummed_ECAL_HCAL_HO_3->Fill((Econe + Hcone + HOcone) / energy_MC);
215  } else if (2.5 < fabs(eta_MC) && fabs(eta_MC) < 3.0) {
218  Ratio_Esummed_HO_4->Fill(HOcone / energy_MC);
219  Ratio_Esummed_ECAL_HCAL_4->Fill((Econe + Hcone) / energy_MC);
220  Ratio_Esummed_ECAL_HCAL_HO_4->Fill((Econe + Hcone + HOcone) / energy_MC);
221  } else if (3.0 < fabs(eta_MC) && fabs(eta_MC) < 4.0) {
222  Ratio_Esummed_HF_5->Fill(HFcone / energy_MC);
223  } else if (4.0 < fabs(eta_MC) && fabs(eta_MC) < 5.0) {
224  Ratio_Esummed_HF_6->Fill(HFcone / energy_MC);
225  }
226  }
227 
228  //These are the six single pion histos
229  emean_vs_eta_E->Fill(double(eta_MC), Econe);
230  emean_vs_eta_H->Fill(double(eta_MC), Hcone);
231  emean_vs_eta_EH->Fill(double(eta_MC), Econe + Hcone);
232 
233  emean_vs_eta_HF->Fill(double(eta_MC), HFcone);
234  emean_vs_eta_HO->Fill(double(eta_MC), HOcone);
235  emean_vs_eta_EHF->Fill(double(eta_MC), Econe + Hcone + HFcone);
236  emean_vs_eta_EHFO->Fill(double(eta_MC), Econe + Hcone + HFcone + HOcone);
237 
238 } //end for analyze

References 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, energy_MC, eta_MC, dqm::impl::MonitorElement::Fill(), edm::HepMCProduct::GetEvent(), imc, edm::HandleBase::isValid(), MuonErrorMatrixAnalyzer_cfi::maxPt, npart, AlCaHLTBitMon_ParallelJobs::p, PFClusterECALTok_, PFClusterHCALTok_, PFClusterHFTok_, PFClusterHOTok_, phi_MC, 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, sumEnergy(), and tok_evt_.

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 36 of file PFClusterValidation.cc.

38  {
39  Char_t histo[100];
40  ibooker.setCurrentFolder("ParticleFlow/PFClusterV");
41  Double_t etaBinsOffset[83] = {
42  -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,
43  -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,
44  -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,
45  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,
46  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,
47  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};
48 
49  //These the single pion scan histos
50  //-------------------------------------------------------------------------------------------
51  sprintf(histo, "emean_vs_eta_E");
52  emean_vs_eta_E = ibooker.bookProfile(histo, histo, 82, etaBinsOffset, -100., 2000., " ");
53  sprintf(histo, "emean_vs_eta_H");
54  emean_vs_eta_H = ibooker.bookProfile(histo, histo, 82, etaBinsOffset, -100., 2000., " ");
55  sprintf(histo, "emean_vs_eta_EH");
56  emean_vs_eta_EH = ibooker.bookProfile(histo, histo, 82, etaBinsOffset, -100., 2000., " ");
57 
58  sprintf(histo, "emean_vs_eta_HF");
59  emean_vs_eta_HF = ibooker.bookProfile(histo, histo, 82, etaBinsOffset, -100., 2000., " ");
60  sprintf(histo, "emean_vs_eta_HO");
61  emean_vs_eta_HO = ibooker.bookProfile(histo, histo, 82, etaBinsOffset, -100., 2000., " ");
62 
63  sprintf(histo, "emean_vs_eta_EHF");
64  emean_vs_eta_EHF = ibooker.bookProfile(histo, histo, 82, etaBinsOffset, -100., 2000., " ");
65  sprintf(histo, "emean_vs_eta_EHFO");
66  emean_vs_eta_EHFO = ibooker.bookProfile(histo, histo, 82, etaBinsOffset, -100., 2000., " ");
67 
68  //1D histos
69 
70  sprintf(histo, "Ratio_Esummed_ECAL_0");
71  Ratio_Esummed_ECAL_0 = ibooker.book1D(histo, histo, 50, 0., 5.);
72  sprintf(histo, "Ratio_Esummed_HCAL_0");
73  Ratio_Esummed_HCAL_0 = ibooker.book1D(histo, histo, 50, 0., 5.);
74  sprintf(histo, "Ratio_Esummed_HO_0");
75  Ratio_Esummed_HO_0 = ibooker.book1D(histo, histo, 50, 0., 5.);
76  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_0");
77  Ratio_Esummed_ECAL_HCAL_0 = ibooker.book1D(histo, histo, 50, 0., 5.);
78  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_HO_0");
79  Ratio_Esummed_ECAL_HCAL_HO_0 = ibooker.book1D(histo, histo, 50, 0., 5.);
80 
81  sprintf(histo, "Ratio_Esummed_ECAL_1");
82  Ratio_Esummed_ECAL_1 = ibooker.book1D(histo, histo, 50, 0., 5.);
83  sprintf(histo, "Ratio_Esummed_HCAL_1");
84  Ratio_Esummed_HCAL_1 = ibooker.book1D(histo, histo, 50, 0., 5.);
85  sprintf(histo, "Ratio_Esummed_HO_1");
86  Ratio_Esummed_HO_1 = ibooker.book1D(histo, histo, 50, 0., 5.);
87  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_1");
88  Ratio_Esummed_ECAL_HCAL_1 = ibooker.book1D(histo, histo, 50, 0., 5.);
89  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_HO_1");
90  Ratio_Esummed_ECAL_HCAL_HO_1 = ibooker.book1D(histo, histo, 50, 0., 5.);
91 
92  sprintf(histo, "Ratio_Esummed_ECAL_2");
93  Ratio_Esummed_ECAL_2 = ibooker.book1D(histo, histo, 50, 0., 5.);
94  sprintf(histo, "Ratio_Esummed_HCAL_2");
95  Ratio_Esummed_HCAL_2 = ibooker.book1D(histo, histo, 50, 0., 5.);
96  sprintf(histo, "Ratio_Esummed_HO_2");
97  Ratio_Esummed_HO_2 = ibooker.book1D(histo, histo, 50, 0., 5.);
98  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_2");
99  Ratio_Esummed_ECAL_HCAL_2 = ibooker.book1D(histo, histo, 50, 0., 5.);
100  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_HO_2");
101  Ratio_Esummed_ECAL_HCAL_HO_2 = ibooker.book1D(histo, histo, 50, 0., 5.);
102 
103  sprintf(histo, "Ratio_Esummed_ECAL_3");
104  Ratio_Esummed_ECAL_3 = ibooker.book1D(histo, histo, 50, 0., 5.);
105  sprintf(histo, "Ratio_Esummed_HCAL_3");
106  Ratio_Esummed_HCAL_3 = ibooker.book1D(histo, histo, 50, 0., 5.);
107  sprintf(histo, "Ratio_Esummed_HO_3");
108  Ratio_Esummed_HO_3 = ibooker.book1D(histo, histo, 50, 0., 5.);
109  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_3");
110  Ratio_Esummed_ECAL_HCAL_3 = ibooker.book1D(histo, histo, 50, 0., 5.);
111  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_HO_3");
112  Ratio_Esummed_ECAL_HCAL_HO_3 = ibooker.book1D(histo, histo, 50, 0., 5.);
113 
114  sprintf(histo, "Ratio_Esummed_ECAL_4");
115  Ratio_Esummed_ECAL_4 = ibooker.book1D(histo, histo, 50, 0., 5.);
116  sprintf(histo, "Ratio_Esummed_HCAL_4");
117  Ratio_Esummed_HCAL_4 = ibooker.book1D(histo, histo, 50, 0., 5.);
118  sprintf(histo, "Ratio_Esummed_HO_4");
119  Ratio_Esummed_HO_4 = ibooker.book1D(histo, histo, 50, 0., 5.);
120  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_4");
121  Ratio_Esummed_ECAL_HCAL_4 = ibooker.book1D(histo, histo, 50, 0., 5.);
122  sprintf(histo, "Ratio_Esummed_ECAL_HCAL_HO_4");
123  Ratio_Esummed_ECAL_HCAL_HO_4 = ibooker.book1D(histo, histo, 50, 0., 5.);
124 
125  sprintf(histo, "Ratio_Esummed_HF_5");
126  Ratio_Esummed_HF_5 = ibooker.book1D(histo, histo, 50, 0., 5.);
127  sprintf(histo, "Ratio_Esummed_HF_6");
128  Ratio_Esummed_HF_6 = ibooker.book1D(histo, histo, 50, 0., 5.);
129 
130  sprintf(histo, "Egen_MC");
131  Egen_MC = ibooker.book1D(histo, histo, 50, 0, 50);
132 
133  //-------------------------------------------------------------------------------------------
134 
135 } // BOOKING HISTOS

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, and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ dR()

double PFClusterValidation::dR ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 240 of file PFClusterValidation.cc.

240  {
241  const double PI = 3.1415926535898;
242  double deltaphi = phi1 - phi2;
243  if (phi2 > phi1) {
244  deltaphi = phi2 - phi1;
245  }
246  if (deltaphi > PI) {
247  deltaphi = 2. * PI - deltaphi;
248  }
249  double deltaeta = eta2 - eta1;
250  double tmp = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
251  return tmp;
252 }

References HLT_2018_cff::eta1, HLT_2018_cff::eta2, mathSSE::sqrt(), and createJobs::tmp.

Referenced by sumEnergy().

◆ sumEnergy()

double PFClusterValidation::sumEnergy ( edm::Handle< reco::PFClusterCollection pfCluster1)
private

Definition at line 254 of file PFClusterValidation.cc.

254  {
255  reco::PFClusterCollection::const_iterator pf;
256  double sumenergy = 0.;
257  for (pf = pfCluster1->begin(); pf != pfCluster1->end(); ++pf) {
258  double eta = pf->eta();
259  double phi = pf->phi();
260  double en = pf->energy();
261  if (imc != 0) {
262  double r = dR(eta_MC, phi_MC, eta, phi);
263  if (r < partR) {
264  sumenergy += en;
265  }
266  }
267  }
268  return sumenergy;
269 }

References dR(), PVValHelper::eta, eta_MC, imc, partR, packedPFCandidateRefMixer_cfi::pf, phi, phi_MC, and alignCSCRings::r.

Referenced by analyze().

Member Data Documentation

◆ Egen_MC

MonitorElement* PFClusterValidation::Egen_MC
private

Definition at line 124 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_E

MonitorElement* PFClusterValidation::emean_vs_eta_E
private

Definition at line 81 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EH

MonitorElement* PFClusterValidation::emean_vs_eta_EH
private

Definition at line 83 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EHF

MonitorElement* PFClusterValidation::emean_vs_eta_EHF
private

Definition at line 87 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_EHFO

MonitorElement* PFClusterValidation::emean_vs_eta_EHFO
private

Definition at line 88 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_H

MonitorElement* PFClusterValidation::emean_vs_eta_H
private

Definition at line 82 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_HF

MonitorElement* PFClusterValidation::emean_vs_eta_HF
private

Definition at line 85 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ emean_vs_eta_HO

MonitorElement* PFClusterValidation::emean_vs_eta_HO
private

Definition at line 86 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ energy_MC

double PFClusterValidation::energy_MC = 9999.
private

Definition at line 77 of file PFClusterValidation.h.

Referenced by analyze().

◆ eta_MC

double PFClusterValidation::eta_MC
private

Definition at line 77 of file PFClusterValidation.h.

Referenced by analyze(), and sumEnergy().

◆ imc

int PFClusterValidation::imc
private

Definition at line 72 of file PFClusterValidation.h.

Referenced by analyze(), PFClusterValidation(), and sumEnergy().

◆ mc_

bool PFClusterValidation::mc_
private

Definition at line 62 of file PFClusterValidation.h.

Referenced by PFClusterValidation().

◆ outputFile_

std::string PFClusterValidation::outputFile_
private

Definition at line 60 of file PFClusterValidation.h.

Referenced by PFClusterValidation().

◆ partR

const double PFClusterValidation::partR = 0.3
private

Definition at line 76 of file PFClusterValidation.h.

Referenced by sumEnergy().

◆ PFClusterECALTok_

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

Definition at line 67 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ PFClusterHCALTok_

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

Definition at line 68 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ PFClusterHFTok_

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

Definition at line 70 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ PFClusterHOTok_

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

Definition at line 69 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

◆ phi_MC

double PFClusterValidation::phi_MC
private

Definition at line 77 of file PFClusterValidation.h.

Referenced by analyze(), and sumEnergy().

◆ Ratio_Esummed_ECAL_0

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_0
private

Definition at line 90 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_ECAL_1

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_1
private

Definition at line 94 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_ECAL_2

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_2
private

Definition at line 98 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_ECAL_3

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_3
private

Definition at line 102 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_ECAL_4

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_4
private

Definition at line 106 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 113 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 115 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 117 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 119 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 121 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 114 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 116 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 118 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 120 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 122 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HCAL_0

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_0
private

Definition at line 91 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HCAL_1

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_1
private

Definition at line 95 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HCAL_2

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_2
private

Definition at line 99 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HCAL_3

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_3
private

Definition at line 103 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HCAL_4

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_4
private

Definition at line 107 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HF_5

MonitorElement* PFClusterValidation::Ratio_Esummed_HF_5
private

Definition at line 110 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HF_6

MonitorElement* PFClusterValidation::Ratio_Esummed_HF_6
private

Definition at line 111 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HO_0

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_0
private

Definition at line 92 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HO_1

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_1
private

Definition at line 96 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HO_2

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_2
private

Definition at line 100 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HO_3

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_3
private

Definition at line 104 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ Ratio_Esummed_HO_4

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_4
private

Definition at line 108 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

◆ tok_evt_

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

Definition at line 66 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

PI
Definition: PayloadInspector.h:19
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_0
MonitorElement * Ratio_Esummed_ECAL_HCAL_0
Definition: PFClusterValidation.h:113
PFClusterValidation::tok_evt_
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
Definition: PFClusterValidation.h:66
PFClusterValidation::emean_vs_eta_HF
MonitorElement * emean_vs_eta_HF
Definition: PFClusterValidation.h:85
PFClusterValidation::emean_vs_eta_EHF
MonitorElement * emean_vs_eta_EHF
Definition: PFClusterValidation.h:87
PFClusterValidation::PFClusterHCALTok_
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHCALTok_
Definition: PFClusterValidation.h:68
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_1
MonitorElement * Ratio_Esummed_ECAL_HCAL_1
Definition: PFClusterValidation.h:115
PFClusterValidation::Ratio_Esummed_ECAL_3
MonitorElement * Ratio_Esummed_ECAL_3
Definition: PFClusterValidation.h:102
PFClusterValidation::Ratio_Esummed_HF_5
MonitorElement * Ratio_Esummed_HF_5
Definition: PFClusterValidation.h:110
PFClusterValidation::emean_vs_eta_EH
MonitorElement * emean_vs_eta_EH
Definition: PFClusterValidation.h:83
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
PFClusterValidation::Ratio_Esummed_HCAL_4
MonitorElement * Ratio_Esummed_HCAL_4
Definition: PFClusterValidation.h:107
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HLT_2018_cff.eta1
eta1
Definition: HLT_2018_cff.py:8220
edm::LogInfo
Definition: MessageLogger.h:254
PFClusterValidation::Ratio_Esummed_HO_3
MonitorElement * Ratio_Esummed_HO_3
Definition: PFClusterValidation.h:104
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
PFClusterValidation::Ratio_Esummed_ECAL_4
MonitorElement * Ratio_Esummed_ECAL_4
Definition: PFClusterValidation.h:106
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_2
MonitorElement * Ratio_Esummed_ECAL_HCAL_2
Definition: PFClusterValidation.h:117
PFClusterValidation::Ratio_Esummed_HF_6
MonitorElement * Ratio_Esummed_HF_6
Definition: PFClusterValidation.h:111
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_1
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_1
Definition: PFClusterValidation.h:116
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_3
MonitorElement * Ratio_Esummed_ECAL_HCAL_3
Definition: PFClusterValidation.h:119
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::Handle< edm::HepMCProduct >
PFClusterValidation::emean_vs_eta_HO
MonitorElement * emean_vs_eta_HO
Definition: PFClusterValidation.h:86
PFClusterValidation::eta_MC
double eta_MC
Definition: PFClusterValidation.h:77
PFClusterValidation::PFClusterHOTok_
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHOTok_
Definition: PFClusterValidation.h:69
npart
double npart
Definition: HydjetWrapper.h:46
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
defaults_cfi.etaBinsOffset
etaBinsOffset
Definition: defaults_cfi.py:23
MuonErrorMatrixAnalyzer_cfi.maxPt
maxPt
Definition: MuonErrorMatrixAnalyzer_cfi.py:19
PFClusterValidation::mc_
bool mc_
Definition: PFClusterValidation.h:62
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
PFClusterValidation::outputFile_
std::string outputFile_
Definition: PFClusterValidation.h:60
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
PFClusterValidation::Ratio_Esummed_HCAL_1
MonitorElement * Ratio_Esummed_HCAL_1
Definition: PFClusterValidation.h:95
HLT_2018_cff.eta2
eta2
Definition: HLT_2018_cff.py:8221
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
PFClusterValidation::dR
double dR(double eta1, double phi1, double eta2, double phi2)
Definition: PFClusterValidation.cc:240
PFClusterValidation::PFClusterHFTok_
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHFTok_
Definition: PFClusterValidation.h:70
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_4
MonitorElement * Ratio_Esummed_ECAL_HCAL_4
Definition: PFClusterValidation.h:121
PFClusterValidation::PFClusterECALTok_
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterECALTok_
Definition: PFClusterValidation.h:67
PFClusterValidation::Ratio_Esummed_HCAL_2
MonitorElement * Ratio_Esummed_HCAL_2
Definition: PFClusterValidation.h:99
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_4
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_4
Definition: PFClusterValidation.h:122
PFClusterValidation::Ratio_Esummed_HCAL_0
MonitorElement * Ratio_Esummed_HCAL_0
Definition: PFClusterValidation.h:91
PFClusterValidation::phi_MC
double phi_MC
Definition: PFClusterValidation.h:77
PFClusterValidation::Ratio_Esummed_HO_2
MonitorElement * Ratio_Esummed_HO_2
Definition: PFClusterValidation.h:100
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
PFClusterValidation::Ratio_Esummed_HO_0
MonitorElement * Ratio_Esummed_HO_0
Definition: PFClusterValidation.h:92
PFClusterValidation::partR
const double partR
Definition: PFClusterValidation.h:76
PFClusterValidation::imc
int imc
Definition: PFClusterValidation.h:72
PFClusterValidation::emean_vs_eta_E
MonitorElement * emean_vs_eta_E
Definition: PFClusterValidation.h:81
PFClusterValidation::Ratio_Esummed_ECAL_2
MonitorElement * Ratio_Esummed_ECAL_2
Definition: PFClusterValidation.h:98
PFClusterValidation::Ratio_Esummed_ECAL_1
MonitorElement * Ratio_Esummed_ECAL_1
Definition: PFClusterValidation.h:94
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DDAxes::phi
PFClusterValidation::sumEnergy
double sumEnergy(edm::Handle< reco::PFClusterCollection > pfCluster1)
Definition: PFClusterValidation.cc:254
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
PFClusterValidation::emean_vs_eta_H
MonitorElement * emean_vs_eta_H
Definition: PFClusterValidation.h:82
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_0
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_0
Definition: PFClusterValidation.h:114
PFClusterValidation::Egen_MC
MonitorElement * Egen_MC
Definition: PFClusterValidation.h:124
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_3
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_3
Definition: PFClusterValidation.h:120
PFClusterValidation::energy_MC
double energy_MC
Definition: PFClusterValidation.h:77
PFClusterValidation::Ratio_Esummed_ECAL_0
MonitorElement * Ratio_Esummed_ECAL_0
Definition: PFClusterValidation.h:90
PFClusterValidation::Ratio_Esummed_HCAL_3
MonitorElement * Ratio_Esummed_HCAL_3
Definition: PFClusterValidation.h:103
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
PFClusterValidation::Ratio_Esummed_HO_4
MonitorElement * Ratio_Esummed_HO_4
Definition: PFClusterValidation.h:108
edm::InputTag
Definition: InputTag.h:15
PFClusterValidation::Ratio_Esummed_HO_1
MonitorElement * Ratio_Esummed_HO_1
Definition: PFClusterValidation.h:96
PFClusterValidation::emean_vs_eta_EHFO
MonitorElement * emean_vs_eta_EHFO
Definition: PFClusterValidation.h:88
PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_2
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_2
Definition: PFClusterValidation.h:118