|
|
Go to the documentation of this file.
6 #include "CLHEP/Units/GlobalPhysicalConstants.h"
28 consumes<edm::ValueMap<float> >(isolationSet.getParameter<
edm::InputTag>(
"pfSumChargedHadronPtTmp"));
30 consumes<edm::ValueMap<float> >(isolationSet.getParameter<
edm::InputTag>(
"pfSumNeutralHadronEtTmp"));
32 consumes<edm::ValueMap<float> >(isolationSet.getParameter<
edm::InputTag>(
"pfSumPhotonEtTmp"));
151 h1_recEleNum =
bookH1(iBooker,
"recEleNum",
"# rec electrons", 11, -0.5, 10.5,
"N_{ele}");
159 bookH1withSumw2(iBooker,
"vertexPt_nocut",
"pT of prunned electrons",
pt_nbin, 0., 20.,
"p_{T vertex} (GeV/c)");
162 "ele momentum / gen momentum vs eta",
171 bookH2(iBooker,
"sigmaIetaIetaVsPt",
"SigmaIetaIeta vs pt", 100, 0.,
pt_max, 100, 0., 0.05);
177 "ele pairs invariant mass, all reco electrons",
181 "m_{ee} (GeV/c^{2})",
186 "ele pairs invariant mass, opp. sign",
190 "m_{e^{+}e^{-}} (GeV/c^{2})",
198 "ele supercluster sigma ieta ieta",
202 "#sigma_{i#eta i#eta}",
206 "SigIEtaIEta_mAOD_barrel",
207 "ele supercluster sigma ieta ieta, barrel",
211 "#sigma_{i#eta i#eta}",
215 "SigIEtaIEta_mAOD_endcaps",
216 "ele supercluster sigma ieta ieta, endcaps",
220 "#sigma_{i#eta i#eta}",
228 "ele track # found hits vs eta",
236 "foundHitsVsEta_mAOD",
237 "ele track # found hits vs eta",
249 "ele hadronic energy / em energy",
258 "ele hadronic energy / em energy, barrel",
267 "ele hadronic energy / em energy, endcaps",
275 "dEtaSc_propVtx_mAOD",
276 "ele #eta_{sc} - #eta_{tr}, prop from vertex",
280 "#eta_{sc} - #eta_{tr}",
284 "dEtaSc_propVtx_mAOD_barrel",
285 "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
289 "#eta_{sc} - #eta_{tr}",
293 "dEtaSc_propVtx_mAOD_endcaps",
294 "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
298 "#eta_{sc} - #eta_{tr}",
302 "dPhiCl_propOut_mAOD",
303 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
307 "#phi_{seedcl} - #phi_{tr} (rad)",
311 "dPhiCl_propOut_mAOD_barrel",
312 "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
316 "#phi_{seedcl} - #phi_{tr} (rad)",
320 "dPhiCl_propOut_mAOD_endcaps",
321 "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
325 "#phi_{seedcl} - #phi_{tr} (rad)",
331 iBooker,
"fbrem_mAOD",
"ele brem fraction, mode of GSF components", 100, 0., 1.,
"P_{in} - P_{out} / P_{in}");
334 "ele brem fraction for barrel, mode of GSF components",
338 "P_{in} - P_{out} / P_{in}");
340 "fbrem_mAOD_endcaps",
341 "ele brem franction for endcaps, mode of GSF components",
345 "P_{in} - P_{out} / P_{in}");
349 "chargedHadronRelativeIso_mAOD",
350 "chargedHadronRelativeIso",
354 "chargedHadronRelativeIso",
358 "chargedHadronRelativeIso_mAOD_barrel",
359 "chargedHadronRelativeIso for barrel",
363 "chargedHadronRelativeIso_barrel",
367 "chargedHadronRelativeIso_mAOD_endcaps",
368 "chargedHadronRelativeIso for endcaps",
372 "chargedHadronRelativeIso_endcaps",
376 "neutralHadronRelativeIso_mAOD",
377 "neutralHadronRelativeIso",
381 "neutralHadronRelativeIso",
385 "neutralHadronRelativeIso_mAOD_barrel",
386 "neutralHadronRelativeIso for barrel",
390 "neutralHadronRelativeIso_barrel",
394 "neutralHadronRelativeIso_mAOD_endcaps",
395 "neutralHadronRelativeIso for endcaps",
399 "neutralHadronRelativeIso_endcaps",
403 "photonRelativeIso_mAOD",
412 "photonRelativeIso_mAOD_barrel",
413 "photonRelativeIso for barrel",
417 "photonRelativeIso_barrel",
421 "photonRelativeIso_mAOD_endcaps",
422 "photonRelativeIso for endcaps",
426 "photonRelativeIso_endcaps",
432 "chargedHadronRelativeIso_mAOD_recomp",
433 "recomputed chargedHadronRelativeIso",
437 "chargedHadronRelativeIso",
441 "neutralHadronRelativeIso_mAOD_recomp",
442 "recomputed neutralHadronRelativeIso",
446 "neutralHadronRelativeIso",
450 "photonRelativeIso_mAOD_recomp",
451 "recomputed photonRelativeIso",
478 edm::LogInfo(
"ElectronMcSignalValidatorMiniAOD::analyze")
479 <<
"Treating event " <<
iEvent.id() <<
" with " <<
electrons.product()->size() <<
" electrons";
488 pat::ElectronCollection::const_iterator el1;
489 pat::ElectronCollection::const_iterator el2;
491 for (el2 = el1 + 1; el2 !=
electrons->end(); el2++) {
493 float mee2 = p12.Dot(p12);
495 if (el1->charge() * el2->charge() < 0.) {
505 int mcNum = 0, gamNum = 0, eleNum = 0;
507 bool matchingMotherID;
532 matchingMotherID =
false;
545 if (mother ==
nullptr) {
546 matchingMotherID =
true;
549 matchingMotherID =
true;
562 if (!matchingMotherID) {
573 bool okGsfFound =
false;
574 bool passMiniAODSelection =
true;
575 double gsfOkRatio = 999999.;
578 double dphi = el.
phi() - (*genParticles)[
i].phi();
580 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
582 double deltaR2 = (el.eta() - (*genParticles)[
i].eta()) * (el.eta() - (*genParticles)[
i].eta()) + dphi * dphi;
585 (((*
genParticles)[
i].pdgId() == -11) && (el.charge() > 0.))) {
586 double tmpGsfRatio = el.p() / (*genParticles)[
i].p();
588 gsfOkRatio = tmpGsfRatio;
589 bestGsfElectron = el;
617 passMiniAODSelection = bestGsfElectron.
pt() >= 5.;
627 if (passMiniAODSelection) {
632 if (passMiniAODSelection) {
636 if (bestGsfElectron.
isEB()) {
641 if (bestGsfElectron.
isEE()) {
650 if (passMiniAODSelection) {
655 if (passMiniAODSelection) {
657 if (bestGsfElectron.
isEB())
659 if (bestGsfElectron.
isEE())
666 if (passMiniAODSelection) {
668 if (bestGsfElectron.
isEB())
670 if (bestGsfElectron.
isEE())
674 double one_over_pt = 1. / bestGsfElectron.
pt();
682 if (bestGsfElectron.
isEB()) {
690 if (bestGsfElectron.
isEE()) {
edm::EDGetTokenT< edm::ValueMap< float > > pfSumNeutralHadronEtTmp_
std::string outputInternalPath_
void setBookEfficiencyFlag(const bool &)
MonitorElement * h1_ele_photonRelativeIso_mAOD_endcaps
MonitorElement * bookH2withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
MonitorElement * h1_ele_photonRelativeIso_mAOD
float relisoPhotonPt_recomp
MonitorElement * h1_ele_photonRelativeIso_mAOD_recomp
std::vector< int > matchingMotherIDs_
MonitorElement * h1_ele_dPhiCl_propOut_mAOD
MonitorElement * h1_recEleNum
MonitorElement * h1_ele_vertexPt
float sumNeutralHadronPt_recomp
ElectronMcSignalValidatorMiniAOD(const edm::ParameterSet &)
edm::Ptr< pat::Electron > PatElectronPtr
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * h1_ele_fbrem_mAOD_endcaps
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD
MonitorElement * h1_scl_SigIEtaIEta_mAOD
MonitorElement * h1_ele_HoE_mAOD
bool set_StatOverflowFlag
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_recomp
float deltaPhiSeedClusterTrackAtCalo() const
MonitorElement * bookH1withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
double pt() const final
transverse momentum
MonitorElement * h1_ele_mee_all
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edm::ValueMap< float > > pfSumChargedHadronPtTmp_
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
float sumChargedHadronPt_recomp
edm::EDGetTokenT< pat::ElectronCollection > electronToken_
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_barrel
MonitorElement * h1_ele_dPhiCl_propOut_mAOD_endcaps
MonitorElement * h1_ele_dPhiCl_propOut_mAOD_barrel
MonitorElement * bookH2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
float relisoChargedHadronPt_recomp
virtual size_type numberOfDaughters() const =0
number of daughters
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD
~ElectronMcSignalValidatorMiniAOD() override
MonitorElement * h2_ele_PoPtrueVsEta
MonitorElement * h1_ele_mee_os
float deltaEtaSuperClusterTrackAtVtx() const
double eta() const final
momentum pseudorapidity
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_endcaps
MonitorElement * h2_ele_foundHitsVsEta_mAOD
MonitorElement * h2_ele_foundHitsVsEta
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_barrel
MonitorElement * h1_ele_vertexEta
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_recomp
MonitorElement * bookH1(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_endcaps
void setBookStatOverflowFlag(const bool &)
edm::EDGetTokenT< edm::View< reco::GenParticle > > mcTruthCollection_
MonitorElement * h1_ele_photonRelativeIso_mAOD_barrel
virtual int pdgId() const =0
PDG identifier.
const LorentzVector & p4(P4Kind kind) const
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
float hcalOverEcal() const
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_endcaps
MonitorElement * h1_ele_fbrem_mAOD
MonitorElement * h1_scl_SigIEtaIEta_mAOD_endcaps
double phi() const final
momentum azimuthal angle
MonitorElement * h1_ele_HoE_mAOD_barrel
MonitorElement * h1_ele_HoE_mAOD_endcaps
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
float relisoNeutralHadronPt_recomp
void analyze(const edm::Event &, const edm::EventSetup &) override
double p() const final
magnitude of momentum vector
MonitorElement * h1_ele_fbrem_mAOD_barrel
edm::EDGetTokenT< edm::ValueMap< float > > pfSumPhotonEtTmp_
T getParameter(std::string const &) const
MonitorElement * h1_scl_SigIEtaIEta_mAOD_barrel
Analysis-level electron class.
Abs< T >::type abs(const T &t)
const PflowIsolationVariables & pfIsolationVariables() const
void setBookPrefix(const std::string &)
float scSigmaIEtaIEta() const
std::vector< int > matchingIDs_
MonitorElement * h1_ele_vertexPt_nocut
MonitorElement * h2_ele_sigmaIetaIetaVsPt
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_barrel