3 #include "CLHEP/Units/GlobalPhysicalConstants.h" 149 iBooker,
"vertexPt_EB",
"ele transverse momentum barrel",
pt_nbin, 0.,
pt_max,
"p_{T vertex} (GeV/c)");
151 iBooker,
"vertexPt_EE",
"ele transverse momentum endcaps",
pt_nbin, 0.,
pt_max,
"p_{T vertex} (GeV/c)");
154 bookH1withSumw2(iBooker,
"vertexPt_nocut",
"pT of prunned electrons",
pt_nbin, 0., 20.,
"p_{T vertex} (GeV/c)");
157 "ele momentum / gen momentum vs eta",
165 bookH2(iBooker,
"sigmaIetaIetaVsPt",
"SigmaIetaIeta vs pt", 100, 0.,
pt_max, 100, 0., 0.05);
171 "ele pairs invariant mass, all reco electrons",
175 "m_{ee} (GeV/c^{2})",
180 "ele pairs invariant mass, opp. sign",
184 "m_{e^{+}e^{-}} (GeV/c^{2})",
192 "ele supercluster sigma ieta ieta",
196 "#sigma_{i#eta i#eta}",
200 "SigIEtaIEta_mAOD_barrel",
201 "ele supercluster sigma ieta ieta, barrel",
205 "#sigma_{i#eta i#eta}",
209 "SigIEtaIEta_mAOD_endcaps",
210 "ele supercluster sigma ieta ieta, endcaps",
214 "#sigma_{i#eta i#eta}",
222 "ele track # found hits vs eta",
230 "foundHitsVsEta_mAOD",
231 "ele track # found hits vs eta",
243 "ele hadronic energy / em energy",
252 "ele hadronic energy / em energy, barrel",
261 "ele hadronic energy / em energy, endcaps",
269 "dEtaSc_propVtx_mAOD",
270 "ele #eta_{sc} - #eta_{tr}, prop from vertex",
274 "#eta_{sc} - #eta_{tr}",
278 "dEtaSc_propVtx_mAOD_barrel",
279 "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
283 "#eta_{sc} - #eta_{tr}",
287 "dEtaSc_propVtx_mAOD_endcaps",
288 "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
292 "#eta_{sc} - #eta_{tr}",
296 "dPhiCl_propOut_mAOD",
297 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
301 "#phi_{seedcl} - #phi_{tr} (rad)",
305 "dPhiCl_propOut_mAOD_barrel",
306 "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
310 "#phi_{seedcl} - #phi_{tr} (rad)",
314 "dPhiCl_propOut_mAOD_endcaps",
315 "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
319 "#phi_{seedcl} - #phi_{tr} (rad)",
325 iBooker,
"fbrem_mAOD",
"ele brem fraction, mode of GSF components", 100, 0., 1.,
"P_{in} - P_{out} / P_{in}");
328 "ele brem fraction for barrel, mode of GSF components",
332 "P_{in} - P_{out} / P_{in}");
334 "fbrem_mAOD_endcaps",
335 "ele brem franction for endcaps, mode of GSF components",
339 "P_{in} - P_{out} / P_{in}");
343 "chargedHadronRelativeIso_mAOD",
344 "chargedHadronRelativeIso",
348 "chargedHadronRelativeIso",
352 "chargedHadronRelativeIso_mAOD_barrel",
353 "chargedHadronRelativeIso for barrel",
357 "chargedHadronRelativeIso_barrel",
361 "chargedHadronRelativeIso_mAOD_endcaps",
362 "chargedHadronRelativeIso for endcaps",
366 "chargedHadronRelativeIso_endcaps",
370 "neutralHadronRelativeIso_mAOD",
371 "neutralHadronRelativeIso",
375 "neutralHadronRelativeIso",
379 "neutralHadronRelativeIso_mAOD_barrel",
380 "neutralHadronRelativeIso for barrel",
384 "neutralHadronRelativeIso_barrel",
388 "neutralHadronRelativeIso_mAOD_endcaps",
389 "neutralHadronRelativeIso for endcaps",
393 "neutralHadronRelativeIso_endcaps",
397 "photonRelativeIso_mAOD",
406 "photonRelativeIso_mAOD_barrel",
407 "photonRelativeIso for barrel",
411 "photonRelativeIso_barrel",
415 "photonRelativeIso_mAOD_endcaps",
416 "photonRelativeIso for endcaps",
420 "photonRelativeIso_endcaps",
433 edm::LogInfo(
"ElectronMcSignalValidatorMiniAOD::analyze")
434 <<
"Treating event " <<
iEvent.id() <<
" with " <<
electrons.product()->size() <<
" electrons";
435 edm::LogInfo(
"ElectronMcSignalValidatorMiniAOD::analyze")
437 <<
" multi slimmed electrons";
446 pat::ElectronCollection::const_iterator el1;
447 std::vector<pat::Electron>::const_iterator el3;
448 std::vector<pat::Electron>::const_iterator el4;
453 std::vector<pat::Electron> localCollection;
454 std::vector<pat::Electron> localCollection_EB;
455 std::vector<pat::Electron> localCollection_EE;
460 localCollection.push_back(*el1);
461 localCollection_EB.push_back(*el1);
468 localCollection.push_back(*el1);
469 localCollection_EE.push_back(*el1);
474 for (el3 = localCollection.begin(); el3 != localCollection.end(); el3++) {
475 for (el4 = el3 + 1; el4 != localCollection.end(); el4++) {
477 float mee2 = p12.Dot(p12);
479 if (el3->charge() * el4->charge() < 0.) {
489 bool matchingMotherID;
499 matchingMotherID =
false;
501 if (mother ==
nullptr) {
502 matchingMotherID =
true;
505 matchingMotherID =
true;
510 if (!matchingMotherID) {
520 bool okGsfFound =
false;
521 bool passMiniAODSelection =
true;
522 double gsfOkRatio = 999999.;
523 bool isEBflag =
false;
524 bool isEEflag =
false;
527 for (el3 = localCollection.begin(); el3 != localCollection.end(); el3++) {
528 double dphi = el3->
phi() - (*genParticles)[
i].phi();
530 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
532 double deltaR2 = (el3->eta() - (*genParticles)[
i].eta()) * (el3->eta() - (*genParticles)[
i].eta()) + dphi * dphi;
535 (((*
genParticles)[
i].pdgId() == -11) && (el3->charge() > 0.))) {
536 double tmpGsfRatio = el3->p() / (*genParticles)[
i].p();
538 gsfOkRatio = tmpGsfRatio;
539 bestGsfElectron = *el3;
550 passMiniAODSelection = bestGsfElectron.
pt() >= 5.;
551 double one_over_pt = 1. / bestGsfElectron.
pt();
552 isEBflag = bestGsfElectron.
isEB();
553 isEEflag = bestGsfElectron.
isEE();
559 }
else if (isEEflag) {
571 if (passMiniAODSelection) {
T getParameter(std::string const &) const
float scSigmaIEtaIEta() const
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD
MonitorElement * h2_ele_PoPtrueVsEta
MonitorElement * h1_ele_vertexPt_EB
MonitorElement * h1_ele_vertexPt_EE
double pt() const final
transverse momentum
float deltaPhiSeedClusterTrackAtCalo() const
MonitorElement * h1_scl_SigIEtaIEta_mAOD_endcaps
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * h1_ele_fbrem_mAOD_endcaps
MonitorElement * h1_ele_HoE_mAOD
MonitorElement * h1_ele_fbrem_mAOD_barrel
std::vector< int > matchingMotherIDs_
MonitorElement * h1_ele_mee_os
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD
std::vector< int > matchingIDs_
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
MonitorElement * h2_ele_sigmaIetaIetaVsPt
MonitorElement * h1_scl_SigIEtaIEta_mAOD
ElectronMcSignalValidatorMiniAOD(const edm::ParameterSet &)
MonitorElement * h1_ele_vertexPt
MonitorElement * h1_scl_SigIEtaIEta_mAOD_barrel
MonitorElement * h1_ele_vertexEta
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_barrel
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD
bool set_StatOverflowFlag
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_endcaps
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::EDGetTokenT< edm::View< reco::GenParticle > > mcTruthCollection_
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")
virtual size_type numberOfDaughters() const =0
number of daughters
const PflowIsolationVariables & pfIsolationVariables() const
MonitorElement * h1_ele_vertexPt_nocut
double p() const final
magnitude of momentum vector
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_barrel
MonitorElement * h1_recEleNum
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Abs< T >::type abs(const T &t)
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD_endcaps
MonitorElement * h1_ele_photonRelativeIso_mAOD
void setBookPrefix(const std::string &)
MonitorElement * h1_ele_mee_all
MonitorElement * h1_ele_photonRelativeIso_mAOD_barrel
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
MonitorElement * h1_ele_fbrem_mAOD
float hcalOverEcal(const ShowerShape &ss, int depth) const
edm::EDGetTokenT< pat::ElectronCollection > electronTokenEndcaps_
void setBookEfficiencyFlag(const bool &)
std::string outputInternalPath_
virtual int pdgId() const =0
PDG identifier.
Log< level::Info, false > LogInfo
float deltaEtaSuperClusterTrackAtVtx() const
MonitorElement * h1_ele_dPhiCl_propOut_mAOD_barrel
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_barrel
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_endcaps
Analysis-level electron class.
void analyze(const edm::Event &, const edm::EventSetup &) override
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")
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")
~ElectronMcSignalValidatorMiniAOD() override
MonitorElement * h2_ele_foundHitsVsEta
MonitorElement * h2_ele_foundHitsVsEta_mAOD
MonitorElement * h1_ele_HoE_mAOD_barrel
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_endcaps
MonitorElement * h1_ele_HoE_mAOD_endcaps
MonitorElement * h1_ele_dPhiCl_propOut_mAOD
edm::EDGetTokenT< pat::ElectronCollection > electronToken_
double phi() const final
momentum azimuthal angle
void setBookStatOverflowFlag(const bool &)
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
MonitorElement * h1_ele_dPhiCl_propOut_mAOD_endcaps
double eta() const final
momentum pseudorapidity