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::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

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::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 50 of file PFClusterValidation.h.

Member Typedef Documentation

Definition at line 64 of file PFClusterValidation.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file PFClusterValidation.cc.

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

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 }
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHOTok_
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHCALTok_
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHFTok_
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterECALTok_
PFClusterValidation::~PFClusterValidation ( )
override

Definition at line 34 of file PFClusterValidation.cc.

34 {}

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 137 of file PFClusterValidation.cc.

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

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
MonitorElement * Ratio_Esummed_HO_0
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_2
MonitorElement * Ratio_Esummed_ECAL_HCAL_1
MonitorElement * Ratio_Esummed_ECAL_2
MonitorElement * Ratio_Esummed_HCAL_1
double npart
Definition: HydjetWrapper.h:46
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_4
MonitorElement * Ratio_Esummed_ECAL_HCAL_4
MonitorElement * emean_vs_eta_EHFO
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_0
MonitorElement * Ratio_Esummed_HCAL_0
MonitorElement * Ratio_Esummed_HF_6
MonitorElement * Ratio_Esummed_ECAL_4
MonitorElement * Ratio_Esummed_ECAL_HCAL_0
MonitorElement * emean_vs_eta_HO
MonitorElement * emean_vs_eta_HF
void Fill(long long x)
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHOTok_
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHCALTok_
MonitorElement * Ratio_Esummed_HF_5
MonitorElement * Ratio_Esummed_HCAL_2
MonitorElement * Ratio_Esummed_HO_1
MonitorElement * Ratio_Esummed_ECAL_HCAL_2
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
MonitorElement * Ratio_Esummed_HO_2
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_3
MonitorElement * Ratio_Esummed_ECAL_1
MonitorElement * emean_vs_eta_EH
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterHFTok_
MonitorElement * Ratio_Esummed_HCAL_4
edm::EDGetTokenT< reco::PFClusterCollection > PFClusterECALTok_
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
MonitorElement * Ratio_Esummed_HO_3
MonitorElement * Ratio_Esummed_HCAL_3
MonitorElement * Ratio_Esummed_HO_4
double sumEnergy(edm::Handle< reco::PFClusterCollection > pfCluster1)
MonitorElement * emean_vs_eta_H
MonitorElement * Ratio_Esummed_ECAL_HCAL_3
MonitorElement * Egen_MC
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_1
MonitorElement * emean_vs_eta_E
MonitorElement * emean_vs_eta_EHF
MonitorElement * Ratio_Esummed_ECAL_0
MonitorElement * Ratio_Esummed_ECAL_3
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.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::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::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

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
MonitorElement * Ratio_Esummed_HO_0
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_2
MonitorElement * Ratio_Esummed_ECAL_HCAL_1
MonitorElement * Ratio_Esummed_ECAL_2
MonitorElement * Ratio_Esummed_HCAL_1
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_4
MonitorElement * Ratio_Esummed_ECAL_HCAL_4
MonitorElement * emean_vs_eta_EHFO
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_0
MonitorElement * Ratio_Esummed_HCAL_0
MonitorElement * Ratio_Esummed_HF_6
MonitorElement * Ratio_Esummed_ECAL_4
MonitorElement * Ratio_Esummed_ECAL_HCAL_0
MonitorElement * emean_vs_eta_HO
MonitorElement * emean_vs_eta_HF
MonitorElement * Ratio_Esummed_HF_5
MonitorElement * Ratio_Esummed_HCAL_2
MonitorElement * Ratio_Esummed_HO_1
MonitorElement * Ratio_Esummed_ECAL_HCAL_2
MonitorElement * Ratio_Esummed_HO_2
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_3
MonitorElement * Ratio_Esummed_ECAL_1
MonitorElement * emean_vs_eta_EH
MonitorElement * Ratio_Esummed_HCAL_4
MonitorElement * Ratio_Esummed_HO_3
MonitorElement * Ratio_Esummed_HCAL_3
MonitorElement * Ratio_Esummed_HO_4
MonitorElement * emean_vs_eta_H
MonitorElement * Ratio_Esummed_ECAL_HCAL_3
MonitorElement * Egen_MC
MonitorElement * Ratio_Esummed_ECAL_HCAL_HO_1
MonitorElement * emean_vs_eta_E
MonitorElement * emean_vs_eta_EHF
MonitorElement * Ratio_Esummed_ECAL_0
MonitorElement * Ratio_Esummed_ECAL_3
double PFClusterValidation::dR ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)
private

Definition at line 240 of file PFClusterValidation.cc.

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

Referenced by sumEnergy().

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 }
T sqrt(T t)
Definition: SSEVec.h:19
#define PI
Definition: QcdUeDQM.h:37
tmp
align.sh
Definition: createJobs.py:716
double PFClusterValidation::sumEnergy ( edm::Handle< reco::PFClusterCollection pfCluster1)
private

Definition at line 254 of file PFClusterValidation.cc.

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

Referenced by analyze().

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 }
double dR(double eta1, double phi1, double eta2, double phi2)

Member Data Documentation

MonitorElement* PFClusterValidation::Egen_MC
private

Definition at line 124 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_E
private

Definition at line 81 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_EH
private

Definition at line 83 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_EHF
private

Definition at line 87 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_EHFO
private

Definition at line 88 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_H
private

Definition at line 82 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_HF
private

Definition at line 85 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::emean_vs_eta_HO
private

Definition at line 86 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

double PFClusterValidation::energy_MC = 9999.
private

Definition at line 77 of file PFClusterValidation.h.

Referenced by analyze().

double PFClusterValidation::eta_MC
private

Definition at line 77 of file PFClusterValidation.h.

Referenced by analyze(), and sumEnergy().

int PFClusterValidation::imc
private

Definition at line 72 of file PFClusterValidation.h.

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

bool PFClusterValidation::mc_
private

Definition at line 62 of file PFClusterValidation.h.

Referenced by PFClusterValidation().

std::string PFClusterValidation::outputFile_
private

Definition at line 60 of file PFClusterValidation.h.

Referenced by PFClusterValidation().

const double PFClusterValidation::partR = 0.3
private

Definition at line 76 of file PFClusterValidation.h.

Referenced by sumEnergy().

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

Definition at line 67 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

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

Definition at line 68 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

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

Definition at line 70 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

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

Definition at line 69 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().

double PFClusterValidation::phi_MC
private

Definition at line 77 of file PFClusterValidation.h.

Referenced by analyze(), and sumEnergy().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_0
private

Definition at line 90 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_1
private

Definition at line 94 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_2
private

Definition at line 98 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_3
private

Definition at line 102 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_4
private

Definition at line 106 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_0
private

Definition at line 113 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_1
private

Definition at line 115 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_2
private

Definition at line 117 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_3
private

Definition at line 119 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_4
private

Definition at line 121 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_0
private

Definition at line 114 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_1
private

Definition at line 116 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_2
private

Definition at line 118 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_3
private

Definition at line 120 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_ECAL_HCAL_HO_4
private

Definition at line 122 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_0
private

Definition at line 91 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_1
private

Definition at line 95 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_2
private

Definition at line 99 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_3
private

Definition at line 103 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HCAL_4
private

Definition at line 107 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HF_5
private

Definition at line 110 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HF_6
private

Definition at line 111 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_0
private

Definition at line 92 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_1
private

Definition at line 96 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_2
private

Definition at line 100 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_3
private

Definition at line 104 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PFClusterValidation::Ratio_Esummed_HO_4
private

Definition at line 108 of file PFClusterValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 66 of file PFClusterValidation.h.

Referenced by analyze(), and PFClusterValidation().