6 #include "CLHEP/Units/GlobalPhysicalConstants.h" 147 h1_recEleNum =
bookH1(iBooker,
"recEleNum",
"# rec electrons",11, -0.5,10.5,
"N_{ele}");
180 h1_ele_dEtaSc_propVtx_mAOD_barrel =
bookH1withSumw2(iBooker,
"dEtaSc_propVtx_mAOD_barrel",
"ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
detamatch_nbin,
detamatch_min,
detamatch_max,
"#eta_{sc} - #eta_{tr}",
"Events",
"ELE_LOGY E1 P");
181 h1_ele_dEtaSc_propVtx_mAOD_endcaps =
bookH1withSumw2(iBooker,
"dEtaSc_propVtx_mAOD_endcaps",
"ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
detamatch_nbin,
detamatch_min,
detamatch_max,
"#eta_{sc} - #eta_{tr}",
"Events",
"ELE_LOGY E1 P");
183 h1_ele_dPhiCl_propOut_mAOD_barrel =
bookH1withSumw2(iBooker,
"dPhiCl_propOut_mAOD_barrel",
"ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
dphimatch_nbin,
dphimatch_min,
dphimatch_max,
"#phi_{seedcl} - #phi_{tr} (rad)",
"Events",
"ELE_LOGY E1 P");
184 h1_ele_dPhiCl_propOut_mAOD_endcaps =
bookH1withSumw2(iBooker,
"dPhiCl_propOut_mAOD_endcaps",
"ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
dphimatch_nbin,
dphimatch_min,
dphimatch_max,
"#phi_{seedcl} - #phi_{tr} (rad)",
"Events",
"ELE_LOGY E1 P");
228 edm::LogInfo(
"ElectronMcSignalValidatorMiniAOD::analyze") <<
"Treating event " << iEvent.
id() <<
" with " << electrons.
product()->size() <<
" electrons" ;
237 pat::ElectronCollection::const_iterator el1 ;
238 pat::ElectronCollection::const_iterator el2 ;
239 for(el1=electrons->begin(); el1!=electrons->end(); el1++) {
240 for (el2=el1+1 ; el2!=electrons->end() ; el2++ )
243 float mee2 = p12.Dot(p12);
245 if ( el1->charge() * el2->charge() < 0. )
256 int mcNum=0, gamNum=0, eleNum=0 ;
258 bool matchingMotherID ;
264 for(
size_t i=0;
i<genParticles->size();
i++) {
276 if ( (*genParticles)[
i].pdgId() == 22 )
282 matchingMotherID =
false ;
297 matchingMotherID =
true ;
301 matchingMotherID =
true ;
314 if (!matchingMotherID) {continue ;}
322 bool okGsfFound =
false ;
323 bool passMiniAODSelection =
true ;
324 double gsfOkRatio = 999999. ;
327 double dphi = el.
phi()-(*genParticles)[
i].phi() ;
329 { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi ; }
330 double deltaR2 = (el.eta()-(*genParticles)[
i].eta()) * (el.eta()-(*genParticles)[
i].eta()) + dphi * dphi;
333 if ( ( ((*genParticles)[
i].
pdgId() == 11) && (el.charge() < 0.) ) ||
334 ( ((*genParticles)[
i].pdgId() == -11) && (el.charge() > 0.) ) )
336 double tmpGsfRatio = el.p()/(*genParticles)[
i].p() ;
339 gsfOkRatio = tmpGsfRatio;
362 if (! okGsfFound) continue ;
367 passMiniAODSelection = bestGsfElectron.
pt() >= 5.;
376 if ( passMiniAODSelection ) {
381 if ( passMiniAODSelection ) {
385 if (bestGsfElectron.
isEB()) {
390 if (bestGsfElectron.
isEE()) {
400 if (passMiniAODSelection) {
405 if (passMiniAODSelection) {
414 if (passMiniAODSelection) {
420 double one_over_pt = 1. / bestGsfElectron.
pt();
426 if (bestGsfElectron.
isEB()) {
432 if (bestGsfElectron.
isEE()) {
const PflowIsolationVariables & pfIsolationVariables() const
T getParameter(std::string const &) const
MonitorElement * h1_ele_dEtaSc_propVtx_mAOD
double eta() const final
momentum pseudorapidity
MonitorElement * h2_ele_PoPtrueVsEta
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")
const LorentzVector & p4(P4Kind kind) const
MonitorElement * h1_scl_SigIEtaIEta_mAOD_endcaps
edm::EDGetTokenT< edm::ValueMap< float > > pfSumPhotonEtTmp_
MonitorElement * h1_ele_fbrem_mAOD_endcaps
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * h1_ele_HoE_mAOD
MonitorElement * h1_ele_fbrem_mAOD_barrel
std::vector< int > matchingMotherIDs_
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")
MonitorElement * h1_ele_mee_os
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD
double pt() const final
transverse momentum
std::vector< int > matchingIDs_
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
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 * h2_ele_sigmaIetaIetaVsPt
edm::EDGetTokenT< edm::ValueMap< float > > pfSumNeutralHadronEtTmp_
MonitorElement * h1_scl_SigIEtaIEta_mAOD
ElectronMcSignalValidatorMiniAOD(const edm::ParameterSet &)
MonitorElement * h1_ele_vertexPt
float sumChargedHadronPt_recomp
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_
float deltaEtaSuperClusterTrackAtVtx() const
MonitorElement * h1_ele_vertexPt_nocut
float deltaPhiSeedClusterTrackAtCalo() const
virtual int pdgId() const =0
PDG identifier.
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_barrel
MonitorElement * h1_recEleNum
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
MonitorElement * h1_ele_photonRelativeIso_mAOD_recomp
float hcalOverEcal() const
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 scSigmaIEtaIEta() const
void setBookEfficiencyFlag(const bool &)
std::string outputInternalPath_
double p() const final
magnitude of momentum vector
edm::Ptr< pat::Electron > PatElectronPtr
void setCurrentFolder(const std::string &fullpath)
MonitorElement * h1_ele_dPhiCl_propOut_mAOD_barrel
T const * product() const
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_barrel
MonitorElement * h1_ele_chargedHadronRelativeIso_mAOD_recomp
MonitorElement * h1_ele_photonRelativeIso_mAOD_endcaps
float relisoNeutralHadronPt_recomp
Analysis-level electron class.
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * h2_ele_foundHitsVsEta
MonitorElement * h2_ele_foundHitsVsEta_mAOD
MonitorElement * h1_ele_HoE_mAOD_barrel
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_endcaps
float relisoChargedHadronPt_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")
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
MonitorElement * h1_ele_HoE_mAOD_endcaps
virtual ~ElectronMcSignalValidatorMiniAOD()
MonitorElement * h1_ele_dPhiCl_propOut_mAOD
float sumNeutralHadronPt_recomp
edm::EDGetTokenT< pat::ElectronCollection > electronToken_
virtual size_type numberOfDaughters() const =0
number of daughters
MonitorElement * h1_ele_neutralHadronRelativeIso_mAOD_recomp
void setBookStatOverflowFlag(const bool &)
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
double phi() const final
momentum azimuthal angle
float relisoPhotonPt_recomp
edm::EDGetTokenT< edm::ValueMap< float > > pfSumChargedHadronPtTmp_
MonitorElement * h1_ele_dPhiCl_propOut_mAOD_endcaps