CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
PhotonValidatorMiniAOD Class Reference

#include <PhotonValidatorMiniAOD.h>

Inheritance diagram for PhotonValidatorMiniAOD:
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

Classes

class  sortPhotons
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &r, edm::EventSetup const &theEventSetup) override
 
void dqmEndRun (edm::Run const &r, edm::EventSetup const &es) override
 
 PhotonValidatorMiniAOD (const edm::ParameterSet &)
 
 ~PhotonValidatorMiniAOD () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
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 &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock 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 Attributes

std::string fName_
 
edm::EDGetTokenT< reco::GenParticleCollectiongenpartToken_
 
MonitorElementh_chHadIso_ [3]
 
MonitorElementh_ecalRecHitSumEtConeDR04_ [3][3]
 
MonitorElementh_full5x5_r9_ [3][3]
 
MonitorElementh_full5x5_sigmaIetaIeta_ [3][3]
 
MonitorElementh_hcalTowerBcSumEtConeDR04_ [3][3]
 
MonitorElementh_hcalTowerSumEtConeDR04_ [3][3]
 
MonitorElementh_hOverE_ [3][3]
 
MonitorElementh_isoTrkSolidConeDR04_ [3][3]
 
MonitorElementh_newhOverE_ [3][3]
 
MonitorElementh_nHadIso_ [3]
 
MonitorElementh_nTrkSolidConeDR04_ [3][3]
 
MonitorElementh_phoE_ [2][3]
 
MonitorElementh_phoERes_ [3][3]
 
MonitorElementh_phoEt_ [2][3]
 
MonitorElementh_phoIso_ [3]
 
MonitorElementh_phoSigmaEoE_ [3][3]
 
MonitorElementh_r1_ [3][3]
 
MonitorElementh_r2_ [3][3]
 
MonitorElementh_r9_ [3][3]
 
MonitorElementh_scEta_ [2]
 
MonitorElementh_scPhi_ [2]
 
MonitorElementh_sigmaIetaIeta_ [3][3]
 
std::string outputFileName_
 
edm::ParameterSet parameters_
 
edm::EDGetTokenT< edm::View< pat::Photon > > photonToken_
 
int verbosity_
 

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

$Id: PhotonValidatorMiniAOD

Author
Nancy Marinelli, U. of Notre Dame, US

Definition at line 46 of file PhotonValidatorMiniAOD.h.

Constructor & Destructor Documentation

PhotonValidatorMiniAOD::PhotonValidatorMiniAOD ( const edm::ParameterSet iConfig)
explicit

Definition at line 33 of file PhotonValidatorMiniAOD.cc.

References parameters_.

34  : outputFileName_(iConfig.getParameter<std::string>("outputFileName")),
36  iConfig.getUntrackedParameter<edm::InputTag>("PhotonTag", edm::InputTag("slimmedPhotons")))),
37  genpartToken_(consumes<reco::GenParticleCollection>(
38  iConfig.getUntrackedParameter<edm::InputTag>("genpartTag", edm::InputTag("prunedGenParticles"))))
39 
40 {
41  parameters_ = iConfig;
42 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::GenParticleCollection > genpartToken_
T getUntrackedParameter(std::string const &, T const &) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::View< pat::Photon > > photonToken_
PhotonValidatorMiniAOD::~PhotonValidatorMiniAOD ( )
override

Definition at line 44 of file PhotonValidatorMiniAOD.cc.

44 {}

Member Function Documentation

void PhotonValidatorMiniAOD::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 198 of file PhotonValidatorMiniAOD.cc.

References pat::Photon::chargedHadronIso(), HGC3DClusterGenMatchSelector_cfi::dR, reco::Photon::ecalRecHitSumEtConeDR04(), reco::LeafCandidate::energy(), reco::LeafCandidate::eta(), dqm::impl::MonitorElement::Fill(), reco::Photon::full5x5_r9(), reco::Photon::full5x5_sigmaIetaIeta(), genParticles2HepMC_cfi::genParticles, genpartToken_, edm::Event::getByToken(), reco::Photon::getCandidateP4type(), reco::Photon::getCorrectedEnergyError(), h_chHadIso_, h_ecalRecHitSumEtConeDR04_, h_full5x5_r9_, h_full5x5_sigmaIetaIeta_, h_hcalTowerBcSumEtConeDR04_, h_hcalTowerSumEtConeDR04_, h_hOverE_, h_isoTrkSolidConeDR04_, h_newhOverE_, h_nHadIso_, h_nTrkSolidConeDR04_, h_phoE_, h_phoERes_, h_phoEt_, h_phoIso_, h_phoSigmaEoE_, h_r1_, h_r2_, h_r9_, h_scEta_, h_scPhi_, h_sigmaIetaIeta_, reco::Photon::hadronicOverEm(), reco::Photon::hadTowOverEm(), reco::Photon::hcalTowerSumEtBcConeDR04(), reco::Photon::hcalTowerSumEtConeDR04(), EgHLTOffHistBins_cfi::hOverE, muonTagProbeFilters_cff::matched, pat::Photon::neutralHadronIso(), reco::Photon::nTrkSolidConeDR04(), reco::LeafCandidate::phi(), gedPhotonSequence_cff::photonIso, pat::Photon::photonIso(), BPHMonitor_cfi::photons, photonToken_, pi, funct::pow(), diffTwoXMLs::r1, reco::Photon::r1x5(), diffTwoXMLs::r2, reco::Photon::r2x5(), reco::Photon::r9(), electrons_cff::r9, electrons_cff::sieie, reco::Photon::sigmaIetaIeta(), mathSSE::sqrt(), pat::Photon::superCluster(), ZMuMuCategoriesSequences_cff::trkIso, and reco::Photon::trkSumPtSolidConeDR04().

198  {
199  // ********************************************************************************
200  using namespace edm;
201 
202  // access edm objects
203  Handle<View<pat::Photon> > photonsHandle;
204  iEvent.getByToken(photonToken_, photonsHandle);
205  const auto &photons = *photonsHandle;
206  //
208  iEvent.getByToken(genpartToken_, genParticles);
209 
210  for (reco::GenParticleCollection::const_iterator mcIter = genParticles->begin(); mcIter != genParticles->end();
211  mcIter++) {
212  if (!(mcIter->pdgId() == 22))
213  continue;
214  if (mcIter->mother() != nullptr && !(mcIter->mother()->pdgId() == 25))
215  continue;
216  if (fabs(mcIter->eta()) > 2.5)
217  continue;
218  // if ( mcIter->pt() < 5) continue;
219  // if ( fabs(mcIter->eta()) > 1.4442 && fabs(mcIter->eta()) < 1.566) continue;
220 
221  float mcPhi = mcIter->phi();
222  float mcEta = mcIter->eta();
223  //mcEta = etaTransformation(mcEta, (*mcPho).primaryVertex().z() );
224  float mcEnergy = mcIter->energy();
225 
226  double dR = 9999999.;
227  float minDr = 10000.;
228  int iMatch = -1;
229  bool matched = false;
230  for (size_t ipho = 0; ipho < photons.size(); ipho++) {
231  Ptr<pat::Photon> pho = photons.ptrAt(ipho);
232 
233  double dphi = pho->phi() - mcPhi;
234  if (std::fabs(dphi) > CLHEP::pi) {
235  dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
236  }
237  double deta = pho->superCluster()->position().eta() - mcEta;
238 
239  dR = sqrt(pow((deta), 2) + pow(dphi, 2));
240  if (dR < 0.1 && dR < minDr) {
241  minDr = dR;
242  iMatch = ipho;
243  }
244  }
245 
246  if (iMatch > -1)
247  matched = true;
248  if (!matched)
249  continue;
250 
251  Ptr<pat::Photon> matchingPho = photons.ptrAt(iMatch);
252 
253  bool phoIsInBarrel = false;
254  bool phoIsInEndcap = false;
255 
256  float phoEta = matchingPho->superCluster()->position().eta();
257  if (fabs(phoEta) < 1.479) {
258  phoIsInBarrel = true;
259  } else {
260  phoIsInEndcap = true;
261  }
262 
263  float photonE = matchingPho->energy();
264  float sigmaEoE = matchingPho->getCorrectedEnergyError(matchingPho->getCandidateP4type()) / matchingPho->energy();
265  float photonEt = matchingPho->energy() / cosh(matchingPho->eta());
266  // float photonERegr1 = matchingPho->getCorrectedEnergy(reco::Photon::regression1);
267  //float photonERegr2 = matchingPho->getCorrectedEnergy(reco::Photon::regression2);
268  float r9 = matchingPho->r9();
269  float full5x5_r9 = matchingPho->full5x5_r9();
270  float r1 = matchingPho->r1x5();
271  float r2 = matchingPho->r2x5();
272  float sieie = matchingPho->sigmaIetaIeta();
273  float full5x5_sieie = matchingPho->full5x5_sigmaIetaIeta();
274  float hOverE = matchingPho->hadronicOverEm();
275  float newhOverE = matchingPho->hadTowOverEm();
276  float ecalIso = matchingPho->ecalRecHitSumEtConeDR04();
277  float hcalIso = matchingPho->hcalTowerSumEtConeDR04();
278  float newhcalIso = matchingPho->hcalTowerSumEtBcConeDR04();
279  float trkIso = matchingPho->trkSumPtSolidConeDR04();
280  float nIsoTrk = matchingPho->nTrkSolidConeDR04();
281  // PF related quantities
282  float chargedHadIso = matchingPho->chargedHadronIso();
283  float neutralHadIso = matchingPho->neutralHadronIso();
284  float photonIso = matchingPho->photonIso();
285  // float etOutsideMustache = matchingPho->etOutsideMustache();
286  // int nClusterOutsideMustache = matchingPho->nClusterOutsideMustache();
287  //float pfMVA = matchingPho->pfMVA();
288 
289  h_scEta_[0]->Fill(matchingPho->superCluster()->eta());
290  h_scPhi_[0]->Fill(matchingPho->superCluster()->phi());
291 
292  h_phoE_[0][0]->Fill(photonE);
293  h_phoEt_[0][0]->Fill(photonEt);
294 
295  h_phoERes_[0][0]->Fill(photonE / mcEnergy);
296  h_phoSigmaEoE_[0][0]->Fill(sigmaEoE);
297 
298  h_r9_[0][0]->Fill(r9);
299  h_full5x5_r9_[0][0]->Fill(full5x5_r9);
300  h_r1_[0][0]->Fill(r1);
301  h_r2_[0][0]->Fill(r2);
302 
303  h_sigmaIetaIeta_[0][0]->Fill(sieie);
304  h_full5x5_sigmaIetaIeta_[0][0]->Fill(full5x5_sieie);
305  h_hOverE_[0][0]->Fill(hOverE);
306  h_newhOverE_[0][0]->Fill(newhOverE);
307 
308  h_ecalRecHitSumEtConeDR04_[0][0]->Fill(ecalIso);
309  h_hcalTowerSumEtConeDR04_[0][0]->Fill(hcalIso);
310  h_hcalTowerBcSumEtConeDR04_[0][0]->Fill(newhcalIso);
311  h_isoTrkSolidConeDR04_[0][0]->Fill(trkIso);
312  h_nTrkSolidConeDR04_[0][0]->Fill(nIsoTrk);
313 
314  //
315  h_chHadIso_[0]->Fill(chargedHadIso);
316  h_nHadIso_[0]->Fill(neutralHadIso);
317  h_phoIso_[0]->Fill(photonIso);
318 
319  //
320  if (phoIsInBarrel) {
321  h_phoE_[0][1]->Fill(photonE);
322  h_phoEt_[0][1]->Fill(photonEt);
323  h_phoERes_[0][1]->Fill(photonE / mcEnergy);
324  h_phoSigmaEoE_[0][1]->Fill(sigmaEoE);
325 
326  h_r9_[0][1]->Fill(r9);
327  h_full5x5_r9_[0][1]->Fill(full5x5_r9);
328  h_r1_[0][1]->Fill(r1);
329  h_r2_[0][1]->Fill(r2);
330  h_sigmaIetaIeta_[0][1]->Fill(sieie);
331  h_full5x5_sigmaIetaIeta_[0][1]->Fill(full5x5_sieie);
332  h_hOverE_[0][1]->Fill(hOverE);
333  h_newhOverE_[0][1]->Fill(newhOverE);
334  h_ecalRecHitSumEtConeDR04_[0][1]->Fill(ecalIso);
335  h_hcalTowerSumEtConeDR04_[0][1]->Fill(hcalIso);
336  h_hcalTowerBcSumEtConeDR04_[0][1]->Fill(newhcalIso);
337  h_isoTrkSolidConeDR04_[0][1]->Fill(trkIso);
338  h_nTrkSolidConeDR04_[0][1]->Fill(nIsoTrk);
339  h_chHadIso_[1]->Fill(chargedHadIso);
340  h_nHadIso_[1]->Fill(neutralHadIso);
341  h_phoIso_[1]->Fill(photonIso);
342  }
343  if (phoIsInEndcap) {
344  h_phoE_[0][2]->Fill(photonE);
345  h_phoEt_[0][2]->Fill(photonEt);
346 
347  h_phoERes_[0][2]->Fill(photonE / mcEnergy);
348  h_phoSigmaEoE_[0][2]->Fill(sigmaEoE);
349  h_r9_[0][2]->Fill(r9);
350  h_full5x5_r9_[0][2]->Fill(full5x5_r9);
351  h_r1_[0][2]->Fill(r1);
352  h_r2_[0][2]->Fill(r2);
353  h_sigmaIetaIeta_[0][2]->Fill(sieie);
354  h_full5x5_sigmaIetaIeta_[0][2]->Fill(full5x5_sieie);
355  h_hOverE_[0][2]->Fill(hOverE);
356  h_newhOverE_[0][2]->Fill(newhOverE);
357  h_ecalRecHitSumEtConeDR04_[0][2]->Fill(ecalIso);
358  h_hcalTowerSumEtConeDR04_[0][2]->Fill(hcalIso);
359  h_hcalTowerBcSumEtConeDR04_[0][2]->Fill(newhcalIso);
360  h_isoTrkSolidConeDR04_[0][2]->Fill(trkIso);
361  h_nTrkSolidConeDR04_[0][2]->Fill(nIsoTrk);
362  h_chHadIso_[2]->Fill(chargedHadIso);
363  h_nHadIso_[2]->Fill(neutralHadIso);
364  h_phoIso_[2]->Fill(photonIso);
365  }
366 
367  } // end loop over gen photons
368 }
edm::EDGetTokenT< reco::GenParticleCollection > genpartToken_
float hcalTowerSumEtConeDR04() const
Hcal isolation sum.
Definition: Photon.h:412
double eta() const final
momentum pseudorapidity
float neutralHadronIso() const
Definition: Photon.h:130
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
MonitorElement * h_full5x5_sigmaIetaIeta_[3][3]
float trkSumPtSolidConeDR04() const
Definition: Photon.h:424
MonitorElement * h_r1_[3][3]
MonitorElement * h_full5x5_r9_[3][3]
float ecalRecHitSumEtConeDR04() const
Definition: Photon.h:410
MonitorElement * h_phoSigmaEoE_[3][3]
reco::SuperClusterRef superCluster() const override
override the superCluster method from CaloJet, to access the internal storage of the supercluster ...
MonitorElement * h_nHadIso_[3]
MonitorElement * h_ecalRecHitSumEtConeDR04_[3][3]
const Double_t pi
void Fill(long long x)
float full5x5_r9() const
Definition: Photon.h:252
MonitorElement * h_sigmaIetaIeta_[3][3]
float chargedHadronIso() const
Definition: Photon.h:127
float full5x5_sigmaIetaIeta() const
Definition: Photon.h:249
MonitorElement * h_chHadIso_[3]
MonitorElement * h_hcalTowerBcSumEtConeDR04_[3][3]
MonitorElement * h_newhOverE_[3][3]
float hcalTowerSumEtBcConeDR04() const
Hcal isolation sum subtracting the hadronic energy in towers behind the BCs in the SC...
Definition: Photon.h:418
MonitorElement * h_isoTrkSolidConeDR04_[3][3]
T sqrt(T t)
Definition: SSEVec.h:19
MonitorElement * h_phoIso_[3]
float sigmaIetaIeta() const
Definition: Photon.h:237
double energy() const final
energy
MonitorElement * h_nTrkSolidConeDR04_[3][3]
float hadTowOverEm() const
the ration of hadronic energy in towers behind the BCs in the SC and the SC energy ...
Definition: Photon.h:217
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
Definition: Photon.h:208
float r1x5() const
Definition: Photon.h:238
float getCorrectedEnergyError(P4type type) const
MonitorElement * h_hOverE_[3][3]
MonitorElement * h_scPhi_[2]
P4type getCandidateP4type() const
Definition: Photon.h:316
MonitorElement * h_phoERes_[3][3]
MonitorElement * h_phoE_[2][3]
MonitorElement * h_r9_[3][3]
int nTrkSolidConeDR04() const
Definition: Photon.h:428
edm::EDGetTokenT< edm::View< pat::Photon > > photonToken_
float r2x5() const
Definition: Photon.h:239
float photonIso() const
Definition: Photon.h:133
MonitorElement * h_phoEt_[2][3]
HLT enums.
float r9() const
Definition: Photon.h:240
MonitorElement * h_hcalTowerSumEtConeDR04_[3][3]
MonitorElement * h_r2_[3][3]
double phi() const final
momentum azimuthal angle
MonitorElement * h_scEta_[2]
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
void PhotonValidatorMiniAOD::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 46 of file PhotonValidatorMiniAOD.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), photonAnalyzer_cfi::eBin, cosmicPhotonAnalyzer_cfi::eMax, photonAnalyzer_cfi::eMin, muonRecoAnalyzer_cfi::etaBin, ALCARECOTkAlBeamHalo_cff::etaMax, ALCARECOTkAlBeamHalo_cff::etaMin, photonAnalyzer_cfi::etBin, cosmicPhotonAnalyzer_cfi::etMax, photonAnalyzer_cfi::etMin, edm::ParameterSet::getParameter(), h_chHadIso_, h_ecalRecHitSumEtConeDR04_, h_full5x5_r9_, h_full5x5_sigmaIetaIeta_, h_hcalTowerBcSumEtConeDR04_, h_hcalTowerSumEtConeDR04_, h_hOverE_, h_isoTrkSolidConeDR04_, h_newhOverE_, h_nHadIso_, h_nTrkSolidConeDR04_, h_phoE_, h_phoERes_, h_phoEt_, h_phoIso_, h_phoSigmaEoE_, h_r1_, h_r2_, h_r9_, h_scEta_, h_scPhi_, h_sigmaIetaIeta_, parameters_, BeamMonitor_cff::phiBin, AlignmentTrackSelector_cfi::phiMax, AlignmentTrackSelector_cfi::phiMin, photonAnalyzer_cfi::r9Bin, cosmicPhotonAnalyzer_cfi::r9Max, photonAnalyzer_cfi::r9Min, photonValidator_cfi::resBin, photonValidator_cfi::resMax, photonValidator_cfi::resMin, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

48  {
49  double eMin = parameters_.getParameter<double>("eMin");
50  double eMax = parameters_.getParameter<double>("eMax");
51  int eBin = parameters_.getParameter<int>("eBin");
52 
53  double etMin = parameters_.getParameter<double>("etMin");
54  double etMax = parameters_.getParameter<double>("etMax");
55  int etBin = parameters_.getParameter<int>("etBin");
56 
57  double resMin = parameters_.getParameter<double>("resMin");
58  double resMax = parameters_.getParameter<double>("resMax");
59  int resBin = parameters_.getParameter<int>("resBin");
60 
61  double etaMin = parameters_.getParameter<double>("etaMin");
62  double etaMax = parameters_.getParameter<double>("etaMax");
63  int etaBin = parameters_.getParameter<int>("etaBin");
64 
65  double phiMin = parameters_.getParameter<double>("phiMin");
66  double phiMax = parameters_.getParameter<double>("phiMax");
67  int phiBin = parameters_.getParameter<int>("phiBin");
68 
69  double r9Min = parameters_.getParameter<double>("r9Min");
70  double r9Max = parameters_.getParameter<double>("r9Max");
71  int r9Bin = parameters_.getParameter<int>("r9Bin");
72 
73  iBooker.setCurrentFolder("EgammaV/PhotonValidatorMiniAOD/Photons");
74 
75  h_scEta_[0] = iBooker.book1D("scEta_miniAOD", " SC Eta ", etaBin, etaMin, etaMax);
76  h_scPhi_[0] = iBooker.book1D("scPhi_miniAOD", " SC Phi ", phiBin, phiMin, phiMax);
77 
78  std::string histname = " ";
79 
80  histname = "phoE";
81  h_phoE_[0][0] = iBooker.book1D(histname + "All_miniAOD", " Photon Energy: All ecal ", eBin, eMin, eMax);
82  h_phoE_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", " Photon Energy: barrel ", eBin, eMin, eMax);
83  h_phoE_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", " Photon Energy: Endcap ", eBin, eMin, eMax);
84 
85  histname = "phoEt";
86  h_phoEt_[0][0] =
87  iBooker.book1D(histname + "All_miniAOD", " Photon Transverse Energy: All ecal ", etBin, etMin, etMax);
88  h_phoEt_[0][1] =
89  iBooker.book1D(histname + "Barrel_miniAOD", " Photon Transverse Energy: Barrel ", etBin, etMin, etMax);
90  h_phoEt_[0][2] =
91  iBooker.book1D(histname + "Endcap_miniAOD", " Photon Transverse Energy: Endcap ", etBin, etMin, etMax);
92 
93  histname = "eRes";
94  h_phoERes_[0][0] = iBooker.book1D(
95  histname + "All_miniAOD", " Photon E/E_{true}: All ecal; E/E_{true} (GeV)", resBin, resMin, resMax);
96  h_phoERes_[0][1] = iBooker.book1D(
97  histname + "Barrel_miniAOD", "Photon E/E_{true}: Barrel; E/E_{true} (GeV)", resBin, resMin, resMax);
98  h_phoERes_[0][2] = iBooker.book1D(
99  histname + "Endcap_miniAOD", " Photon E/E_{true}: Endcap; E/E_{true} (GeV)", resBin, resMin, resMax);
100 
101  histname = "sigmaEoE";
102  h_phoSigmaEoE_[0][0] =
103  iBooker.book1D(histname + "All_miniAOD", "#sigma_{E}/E: All ecal; #sigma_{E}/E", 100, 0., 0.08);
104  h_phoSigmaEoE_[0][1] =
105  iBooker.book1D(histname + "Barrel_miniAOD", "#sigma_{E}/E: Barrel; #sigma_{E}/E", 100, 0., 0.08);
106  h_phoSigmaEoE_[0][2] =
107  iBooker.book1D(histname + "Endcap_miniAOD", "#sigma_{E}/E: Endcap, #sigma_{E}/E", 100, 0., 0.08);
108 
109  histname = "r9";
110  h_r9_[0][0] = iBooker.book1D(histname + "All_miniAOD", " r9: All Ecal", r9Bin, r9Min, r9Max);
111  h_r9_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", " r9: Barrel ", r9Bin, r9Min, r9Max);
112  h_r9_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", " r9: Endcap ", r9Bin, r9Min, r9Max);
113  histname = "full5x5_r9";
114  h_full5x5_r9_[0][0] = iBooker.book1D(histname + "All_miniAOD", " r9: All Ecal", r9Bin, r9Min, r9Max);
115  h_full5x5_r9_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", " r9: Barrel ", r9Bin, r9Min, r9Max);
116  h_full5x5_r9_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", " r9: Endcap ", r9Bin, r9Min, r9Max);
117  histname = "r1";
118  h_r1_[0][0] = iBooker.book1D(histname + "All_miniAOD", " e1x5/e5x5: All Ecal", r9Bin, r9Min, r9Max);
119  h_r1_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", " e1x5/e5x5: Barrel ", r9Bin, r9Min, r9Max);
120  h_r1_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", " e1x5/e5x5: Endcap ", r9Bin, r9Min, r9Max);
121  histname = "r2";
122  h_r2_[0][0] = iBooker.book1D(histname + "All_miniAOD", " e2x5/e5x5: All Ecal", r9Bin, r9Min, r9Max);
123  h_r2_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", " e2x5/e5x5: Barrel ", r9Bin, r9Min, r9Max);
124  h_r2_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", " e2x5/e5x5: Endcap ", r9Bin, r9Min, r9Max);
125  histname = "hOverE";
126  h_hOverE_[0][0] = iBooker.book1D(histname + "All_miniAOD", "H/E: All Ecal", 100, 0., 0.2);
127  h_hOverE_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", "H/E: Barrel ", 100, 0., 0.2);
128  h_hOverE_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", "H/E: Endcap ", 100, 0., 0.2);
129  //
130  histname = "newhOverE";
131  h_newhOverE_[0][0] = iBooker.book1D(histname + "All_miniAOD", "new H/E: All Ecal", 100, 0., 0.2);
132  h_newhOverE_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", "new H/E: Barrel ", 100, 0., 0.2);
133  h_newhOverE_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", "new H/E: Endcap ", 100, 0., 0.2);
134  //
135  histname = "sigmaIetaIeta";
136  h_sigmaIetaIeta_[0][0] = iBooker.book1D(histname + "All_miniAOD", "sigmaIetaIeta: All Ecal", 100, 0., 0.1);
137  h_sigmaIetaIeta_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", "sigmaIetaIeta: Barrel ", 100, 0., 0.05);
138  h_sigmaIetaIeta_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", "sigmaIetaIeta: Endcap ", 100, 0., 0.1);
139  histname = "full5x5_sigmaIetaIeta";
141  iBooker.book1D(histname + "All_miniAOD", "Full5x5 sigmaIetaIeta: All Ecal", 100, 0., 0.1);
143  iBooker.book1D(histname + "Barrel_miniAOD", "Full5x5 sigmaIetaIeta: Barrel ", 100, 0., 0.05);
145  iBooker.book1D(histname + "Endcap_miniAOD", "Full5x5 sigmaIetaIeta: Endcap ", 100, 0., 0.1);
146  //
147  histname = "ecalRecHitSumEtConeDR04";
149  iBooker.book1D(histname + "All_miniAOD", "ecalRecHitSumEtDR04: All Ecal", etBin, etMin, 20.);
151  iBooker.book1D(histname + "Barrel_miniAOD", "ecalRecHitSumEtDR04: Barrel ", etBin, etMin, 20.);
153  iBooker.book1D(histname + "Endcap_miniAOD", "ecalRecHitSumEtDR04: Endcap ", etBin, etMin, 20.);
154  histname = "hcalTowerSumEtConeDR04";
156  iBooker.book1D(histname + "All_miniAOD", "hcalTowerSumEtConeDR04: All Ecal", etBin, etMin, 20.);
158  iBooker.book1D(histname + "Barrel_miniAOD", "hcalTowerSumEtConeDR04: Barrel ", etBin, etMin, 20.);
160  iBooker.book1D(histname + "Endcap_miniAOD", "hcalTowerSumEtConeDR04: Endcap ", etBin, etMin, 20.);
161  //
162  histname = "hcalTowerBcSumEtConeDR04";
164  iBooker.book1D(histname + "All_miniAOD", "hcalTowerBcSumEtConeDR04: All Ecal", etBin, etMin, 20.);
166  iBooker.book1D(histname + "Barrel_miniAOD", "hcalTowerBcSumEtConeDR04: Barrel ", etBin, etMin, 20.);
168  iBooker.book1D(histname + "Endcap_miniAOD", "hcalTowerBcSumEtConeDR04: Endcap ", etBin, etMin, 20.);
169  histname = "isoTrkSolidConeDR04";
170  h_isoTrkSolidConeDR04_[0][0] =
171  iBooker.book1D(histname + "All_miniAOD", "isoTrkSolidConeDR04: All Ecal", etBin, etMin, etMax * 0.1);
172  h_isoTrkSolidConeDR04_[0][1] =
173  iBooker.book1D(histname + "Barrel_miniAOD", "isoTrkSolidConeDR04: Barrel ", etBin, etMin, etMax * 0.1);
174  h_isoTrkSolidConeDR04_[0][2] =
175  iBooker.book1D(histname + "Endcap_miniAOD", "isoTrkSolidConeDR04: Endcap ", etBin, etMin, etMax * 0.1);
176  histname = "nTrkSolidConeDR04";
177  h_nTrkSolidConeDR04_[0][0] = iBooker.book1D(histname + "All_miniAOD", "nTrkSolidConeDR04: All Ecal", 20, 0., 20);
178  h_nTrkSolidConeDR04_[0][1] = iBooker.book1D(histname + "Barrel_miniAOD", "nTrkSolidConeDR04: Barrel ", 20, 0., 20);
179  h_nTrkSolidConeDR04_[0][2] = iBooker.book1D(histname + "Endcap_miniAOD", "nTrkSolidConeDR04: Endcap ", 20, 0., 20);
180 
181  // Infos from Particle Flow - isolation and ID
182  histname = "chargedHadIso";
183  h_chHadIso_[0] = iBooker.book1D(histname + "All_miniAOD", "PF chargedHadIso: All Ecal", etBin, etMin, 20.);
184  h_chHadIso_[1] = iBooker.book1D(histname + "Barrel_miniAOD", "PF chargedHadIso: Barrel", etBin, etMin, 20.);
185  h_chHadIso_[2] = iBooker.book1D(histname + "Endcap_miniAOD", "PF chargedHadIso: Endcap", etBin, etMin, 20.);
186  histname = "neutralHadIso";
187  h_nHadIso_[0] = iBooker.book1D(histname + "All_miniAOD", "PF neutralHadIso: All Ecal", etBin, etMin, 20.);
188  h_nHadIso_[1] = iBooker.book1D(histname + "Barrel_miniAOD", "PF neutralHadIso: Barrel", etBin, etMin, 20.);
189  h_nHadIso_[2] = iBooker.book1D(histname + "Endcap_miniAOD", "PF neutralHadIso: Endcap", etBin, etMin, 20.);
190  histname = "photonIso";
191  h_phoIso_[0] = iBooker.book1D(histname + "All_miniAOD", "PF photonIso: All Ecal", etBin, etMin, 20.);
192  h_phoIso_[1] = iBooker.book1D(histname + "Barrel_miniAOD", "PF photonIso: Barrel", etBin, etMin, 20.);
193  h_phoIso_[2] = iBooker.book1D(histname + "Endcap_miniAOD", "PF photonIso: Endcap", etBin, etMin, 20.);
194 }
T getParameter(std::string const &) const
MonitorElement * h_full5x5_sigmaIetaIeta_[3][3]
MonitorElement * h_r1_[3][3]
MonitorElement * h_full5x5_r9_[3][3]
MonitorElement * h_phoSigmaEoE_[3][3]
MonitorElement * h_nHadIso_[3]
MonitorElement * h_ecalRecHitSumEtConeDR04_[3][3]
eBin
CAREFULL for the time being only Loos exists 1 => Tight Photon = GoodCandidate.
MonitorElement * h_sigmaIetaIeta_[3][3]
MonitorElement * h_chHadIso_[3]
MonitorElement * h_hcalTowerBcSumEtConeDR04_[3][3]
MonitorElement * h_newhOverE_[3][3]
MonitorElement * h_isoTrkSolidConeDR04_[3][3]
MonitorElement * h_phoIso_[3]
MonitorElement * h_nTrkSolidConeDR04_[3][3]
MonitorElement * h_hOverE_[3][3]
MonitorElement * h_scPhi_[2]
MonitorElement * h_phoERes_[3][3]
MonitorElement * h_phoE_[2][3]
MonitorElement * h_r9_[3][3]
MonitorElement * h_phoEt_[2][3]
MonitorElement * h_hcalTowerSumEtConeDR04_[3][3]
MonitorElement * h_r2_[3][3]
MonitorElement * h_scEta_[2]
void PhotonValidatorMiniAOD::dqmBeginRun ( edm::Run const &  r,
edm::EventSetup const &  theEventSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 370 of file PhotonValidatorMiniAOD.cc.

370 {}
void PhotonValidatorMiniAOD::dqmEndRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 196 of file PhotonValidatorMiniAOD.cc.

196 {}

Member Data Documentation

std::string PhotonValidatorMiniAOD::fName_
private

Definition at line 63 of file PhotonValidatorMiniAOD.h.

edm::EDGetTokenT<reco::GenParticleCollection> PhotonValidatorMiniAOD::genpartToken_
private

Definition at line 61 of file PhotonValidatorMiniAOD.h.

Referenced by analyze().

MonitorElement* PhotonValidatorMiniAOD::h_chHadIso_[3]
private

Definition at line 93 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_ecalRecHitSumEtConeDR04_[3][3]
private

Definition at line 80 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_full5x5_r9_[3][3]
private

Definition at line 73 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_full5x5_sigmaIetaIeta_[3][3]
private

Definition at line 75 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_hcalTowerBcSumEtConeDR04_[3][3]
private

Definition at line 82 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_hcalTowerSumEtConeDR04_[3][3]
private

Definition at line 81 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_hOverE_[3][3]
private

Definition at line 78 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_isoTrkSolidConeDR04_[3][3]
private

Definition at line 83 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_newhOverE_[3][3]
private

Definition at line 79 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_nHadIso_[3]
private

Definition at line 94 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_nTrkSolidConeDR04_[3][3]
private

Definition at line 84 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_phoE_[2][3]
private

Definition at line 86 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_phoERes_[3][3]
private

Definition at line 88 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_phoEt_[2][3]
private

Definition at line 87 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_phoIso_[3]
private

Definition at line 95 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_phoSigmaEoE_[3][3]
private

Definition at line 89 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_r1_[3][3]
private

Definition at line 76 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_r2_[3][3]
private

Definition at line 77 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_r9_[3][3]
private

Definition at line 72 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_scEta_[2]
private

Definition at line 69 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_scPhi_[2]
private

Definition at line 70 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* PhotonValidatorMiniAOD::h_sigmaIetaIeta_[3][3]
private

Definition at line 74 of file PhotonValidatorMiniAOD.h.

Referenced by analyze(), and bookHistograms().

std::string PhotonValidatorMiniAOD::outputFileName_
private

Definition at line 59 of file PhotonValidatorMiniAOD.h.

edm::ParameterSet PhotonValidatorMiniAOD::parameters_
private
edm::EDGetTokenT<edm::View<pat::Photon> > PhotonValidatorMiniAOD::photonToken_
private

Definition at line 60 of file PhotonValidatorMiniAOD.h.

Referenced by analyze().

int PhotonValidatorMiniAOD::verbosity_
private

Definition at line 67 of file PhotonValidatorMiniAOD.h.