|
|
Go to the documentation of this file.
6 #include "CLHEP/Units/GlobalPhysicalConstants.h"
141 h1_recEleNum =
bookH1(iBooker,
"recEleNum",
"# rec electrons", 11, -0.5, 10.5,
"N_{ele}");
149 bookH1withSumw2(iBooker,
"vertexPt_nocut",
"pT of prunned electrons",
pt_nbin, 0., 20.,
"p_{T vertex} (GeV/c)");
152 "ele momentum / gen momentum vs eta",
161 bookH2(iBooker,
"sigmaIetaIetaVsPt",
"SigmaIetaIeta vs pt", 100, 0.,
pt_max, 100, 0., 0.05);
167 "ele pairs invariant mass, all reco electrons",
171 "m_{ee} (GeV/c^{2})",
176 "ele pairs invariant mass, opp. sign",
180 "m_{e^{+}e^{-}} (GeV/c^{2})",
188 "ele supercluster sigma ieta ieta",
192 "#sigma_{i#eta i#eta}",
196 "SigIEtaIEta_mAOD_barrel",
197 "ele supercluster sigma ieta ieta, barrel",
201 "#sigma_{i#eta i#eta}",
205 "SigIEtaIEta_mAOD_endcaps",
206 "ele supercluster sigma ieta ieta, endcaps",
210 "#sigma_{i#eta i#eta}",
218 "ele track # found hits vs eta",
226 "foundHitsVsEta_mAOD",
227 "ele track # found hits vs eta",
239 "ele hadronic energy / em energy",
248 "ele hadronic energy / em energy, barrel",
257 "ele hadronic energy / em energy, endcaps",
265 "dEtaSc_propVtx_mAOD",
266 "ele #eta_{sc} - #eta_{tr}, prop from vertex",
270 "#eta_{sc} - #eta_{tr}",
274 "dEtaSc_propVtx_mAOD_barrel",
275 "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
279 "#eta_{sc} - #eta_{tr}",
283 "dEtaSc_propVtx_mAOD_endcaps",
284 "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
288 "#eta_{sc} - #eta_{tr}",
292 "dPhiCl_propOut_mAOD",
293 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
297 "#phi_{seedcl} - #phi_{tr} (rad)",
301 "dPhiCl_propOut_mAOD_barrel",
302 "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
306 "#phi_{seedcl} - #phi_{tr} (rad)",
310 "dPhiCl_propOut_mAOD_endcaps",
311 "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
315 "#phi_{seedcl} - #phi_{tr} (rad)",
321 iBooker,
"fbrem_mAOD",
"ele brem fraction, mode of GSF components", 100, 0., 1.,
"P_{in} - P_{out} / P_{in}");
324 "ele brem fraction for barrel, mode of GSF components",
328 "P_{in} - P_{out} / P_{in}");
330 "fbrem_mAOD_endcaps",
331 "ele brem franction for endcaps, mode of GSF components",
335 "P_{in} - P_{out} / P_{in}");
339 "chargedHadronRelativeIso_mAOD",
340 "chargedHadronRelativeIso",
344 "chargedHadronRelativeIso",
348 "chargedHadronRelativeIso_mAOD_barrel",
349 "chargedHadronRelativeIso for barrel",
353 "chargedHadronRelativeIso_barrel",
357 "chargedHadronRelativeIso_mAOD_endcaps",
358 "chargedHadronRelativeIso for endcaps",
362 "chargedHadronRelativeIso_endcaps",
366 "neutralHadronRelativeIso_mAOD",
367 "neutralHadronRelativeIso",
371 "neutralHadronRelativeIso",
375 "neutralHadronRelativeIso_mAOD_barrel",
376 "neutralHadronRelativeIso for barrel",
380 "neutralHadronRelativeIso_barrel",
384 "neutralHadronRelativeIso_mAOD_endcaps",
385 "neutralHadronRelativeIso for endcaps",
389 "neutralHadronRelativeIso_endcaps",
393 "photonRelativeIso_mAOD",
402 "photonRelativeIso_mAOD_barrel",
403 "photonRelativeIso for barrel",
407 "photonRelativeIso_barrel",
411 "photonRelativeIso_mAOD_endcaps",
412 "photonRelativeIso for endcaps",
416 "photonRelativeIso_endcaps",
429 edm::LogInfo(
"ElectronMcSignalValidatorMiniAOD::analyze")
430 <<
"Treating event " <<
iEvent.id() <<
" with " <<
electrons.product()->size() <<
" electrons";
431 edm::LogInfo(
"ElectronMcSignalValidatorMiniAOD::analyze")
433 <<
" multi slimmed electrons";
442 pat::ElectronCollection::const_iterator el1;
443 pat::ElectronCollection::const_iterator el2;
445 for (el2 = el1 + 1; el2 !=
electrons->end(); el2++) {
447 float mee2 = p12.Dot(p12);
449 if (el1->charge() * el2->charge() < 0.) {
459 int mcNum = 0, gamNum = 0, eleNum = 0;
461 bool matchingMotherID;
486 matchingMotherID =
false;
499 if (mother ==
nullptr) {
500 matchingMotherID =
true;
503 matchingMotherID =
true;
516 if (!matchingMotherID) {
527 bool okGsfFound =
false;
528 bool passMiniAODSelection =
true;
529 double gsfOkRatio = 999999.;
532 for (
unsigned i_elec = 0; i_elec < 2; ++i_elec) {
536 if (i_elec == 0 && !el.isEB())
538 double dphi = el.phi() - (*genParticles)[
i].phi();
540 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
542 double deltaR2 = (el.eta() - (*genParticles)[
i].eta()) * (el.eta() - (*genParticles)[
i].eta()) + dphi * dphi;
545 (((*
genParticles)[
i].pdgId() == -11) && (el.charge() > 0.))) {
546 double tmpGsfRatio = el.p() / (*genParticles)[
i].p();
548 gsfOkRatio = tmpGsfRatio;
549 bestGsfElectron = el;
564 passMiniAODSelection = bestGsfElectron.
pt() >= 5.;
565 double one_over_pt = 1. / bestGsfElectron.
pt();
578 if (passMiniAODSelection) {
603 if (bestGsfElectron.
isEB()) {
621 if (bestGsfElectron.
isEE()) {
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
edm::EDGetTokenT< pat::ElectronCollection > electronTokenEndcaps_
std::vector< int > matchingMotherIDs_
MonitorElement * h1_ele_dPhiCl_propOut_mAOD
MonitorElement * h1_recEleNum
MonitorElement * h1_ele_vertexPt
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
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
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
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")
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 * 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 ;
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_endcaps
MonitorElement * h1_ele_fbrem_mAOD
MonitorElement * h1_scl_SigIEtaIEta_mAOD_endcaps
MonitorElement * h1_ele_HoE_mAOD_barrel
MonitorElement * h1_ele_HoE_mAOD_endcaps
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
void analyze(const edm::Event &, const edm::EventSetup &) override
double p() const final
magnitude of momentum vector
MonitorElement * h1_ele_fbrem_mAOD_barrel
T getParameter(std::string const &) const
MonitorElement * h1_scl_SigIEtaIEta_mAOD_barrel
float hcalOverEcal(const ShowerShape &ss, int depth) const
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