|
|
Go to the documentation of this file.
6 #include "CLHEP/Units/GlobalPhysicalConstants.h"
27 consumes<edm::ValueMap<float> >(isolationSet.getParameter<
edm::InputTag>(
"pfSumChargedHadronPtTmp"));
29 consumes<edm::ValueMap<float> >(isolationSet.getParameter<
edm::InputTag>(
"pfSumNeutralHadronEtTmp"));
31 consumes<edm::ValueMap<float> >(isolationSet.getParameter<
edm::InputTag>(
"pfSumPhotonEtTmp"));
150 h1_recEleNum =
bookH1(iBooker,
"recEleNum",
"# rec electrons", 11, -0.5, 10.5,
"N_{ele}");
158 bookH1withSumw2(iBooker,
"vertexPt_nocut",
"pT of prunned electrons",
pt_nbin, 0., 20.,
"p_{T vertex} (GeV/c)");
161 "ele momentum / gen momentum vs eta",
170 bookH2(iBooker,
"sigmaIetaIetaVsPt",
"SigmaIetaIeta vs pt", 100, 0.,
pt_max, 100, 0., 0.05);
176 "ele pairs invariant mass, all reco electrons",
180 "m_{ee} (GeV/c^{2})",
185 "ele pairs invariant mass, opp. sign",
189 "m_{e^{+}e^{-}} (GeV/c^{2})",
197 "ele supercluster sigma ieta ieta",
201 "#sigma_{i#eta i#eta}",
205 "SigIEtaIEta_mAOD_barrel",
206 "ele supercluster sigma ieta ieta, barrel",
210 "#sigma_{i#eta i#eta}",
214 "SigIEtaIEta_mAOD_endcaps",
215 "ele supercluster sigma ieta ieta, endcaps",
219 "#sigma_{i#eta i#eta}",
227 "ele track # found hits vs eta",
235 "foundHitsVsEta_mAOD",
236 "ele track # found hits vs eta",
248 "ele hadronic energy / em energy",
257 "ele hadronic energy / em energy, barrel",
266 "ele hadronic energy / em energy, endcaps",
274 "dEtaSc_propVtx_mAOD",
275 "ele #eta_{sc} - #eta_{tr}, prop from vertex",
279 "#eta_{sc} - #eta_{tr}",
283 "dEtaSc_propVtx_mAOD_barrel",
284 "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
288 "#eta_{sc} - #eta_{tr}",
292 "dEtaSc_propVtx_mAOD_endcaps",
293 "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
297 "#eta_{sc} - #eta_{tr}",
301 "dPhiCl_propOut_mAOD",
302 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
306 "#phi_{seedcl} - #phi_{tr} (rad)",
310 "dPhiCl_propOut_mAOD_barrel",
311 "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
315 "#phi_{seedcl} - #phi_{tr} (rad)",
319 "dPhiCl_propOut_mAOD_endcaps",
320 "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
324 "#phi_{seedcl} - #phi_{tr} (rad)",
330 iBooker,
"fbrem_mAOD",
"ele brem fraction, mode of GSF components", 100, 0., 1.,
"P_{in} - P_{out} / P_{in}");
333 "ele brem fraction for barrel, mode of GSF components",
337 "P_{in} - P_{out} / P_{in}");
339 "fbrem_mAOD_endcaps",
340 "ele brem franction for endcaps, mode of GSF components",
344 "P_{in} - P_{out} / P_{in}");
348 "chargedHadronRelativeIso_mAOD",
349 "chargedHadronRelativeIso",
353 "chargedHadronRelativeIso",
357 "chargedHadronRelativeIso_mAOD_barrel",
358 "chargedHadronRelativeIso for barrel",
362 "chargedHadronRelativeIso_barrel",
366 "chargedHadronRelativeIso_mAOD_endcaps",
367 "chargedHadronRelativeIso for endcaps",
371 "chargedHadronRelativeIso_endcaps",
375 "neutralHadronRelativeIso_mAOD",
376 "neutralHadronRelativeIso",
380 "neutralHadronRelativeIso",
384 "neutralHadronRelativeIso_mAOD_barrel",
385 "neutralHadronRelativeIso for barrel",
389 "neutralHadronRelativeIso_barrel",
393 "neutralHadronRelativeIso_mAOD_endcaps",
394 "neutralHadronRelativeIso for endcaps",
398 "neutralHadronRelativeIso_endcaps",
402 "photonRelativeIso_mAOD",
411 "photonRelativeIso_mAOD_barrel",
412 "photonRelativeIso for barrel",
416 "photonRelativeIso_barrel",
420 "photonRelativeIso_mAOD_endcaps",
421 "photonRelativeIso for endcaps",
425 "photonRelativeIso_endcaps",
431 "chargedHadronRelativeIso_mAOD_recomp",
432 "recomputed chargedHadronRelativeIso",
436 "chargedHadronRelativeIso",
440 "neutralHadronRelativeIso_mAOD_recomp",
441 "recomputed neutralHadronRelativeIso",
445 "neutralHadronRelativeIso",
449 "photonRelativeIso_mAOD_recomp",
450 "recomputed photonRelativeIso",
477 edm::LogInfo(
"ElectronMcSignalValidatorMiniAOD::analyze")
478 <<
"Treating event " <<
iEvent.id() <<
" with " <<
electrons.product()->size() <<
" electrons";
487 pat::ElectronCollection::const_iterator el1;
488 pat::ElectronCollection::const_iterator el2;
490 for (el2 = el1 + 1; el2 !=
electrons->end(); el2++) {
492 float mee2 = p12.Dot(p12);
494 if (el1->charge() * el2->charge() < 0.) {
504 int mcNum = 0, gamNum = 0, eleNum = 0;
506 bool matchingMotherID;
531 matchingMotherID =
false;
544 if (mother ==
nullptr) {
545 matchingMotherID =
true;
548 matchingMotherID =
true;
561 if (!matchingMotherID) {
572 bool okGsfFound =
false;
573 bool passMiniAODSelection =
true;
574 double gsfOkRatio = 999999.;
577 double dphi = el.
phi() - (*genParticles)[
i].phi();
579 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
581 double deltaR2 = (el.eta() - (*genParticles)[
i].eta()) * (el.eta() - (*genParticles)[
i].eta()) + dphi * dphi;
584 (((*
genParticles)[
i].pdgId() == -11) && (el.charge() > 0.))) {
585 double tmpGsfRatio = el.p() / (*genParticles)[
i].p();
587 gsfOkRatio = tmpGsfRatio;
588 bestGsfElectron = el;
616 passMiniAODSelection = bestGsfElectron.
pt() >= 5.;
626 if (passMiniAODSelection) {
631 if (passMiniAODSelection) {
635 if (bestGsfElectron.
isEB()) {
640 if (bestGsfElectron.
isEE()) {
649 if (passMiniAODSelection) {
654 if (passMiniAODSelection) {
656 if (bestGsfElectron.
isEB())
658 if (bestGsfElectron.
isEE())
665 if (passMiniAODSelection) {
667 if (bestGsfElectron.
isEB())
669 if (bestGsfElectron.
isEE())
673 double one_over_pt = 1. / bestGsfElectron.
pt();
681 if (bestGsfElectron.
isEB()) {
689 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