10 #include "TLorentzVector.h" 23 : electronTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"electronInputTag",
edm::
InputTag(
"gedGsfElectrons"))),
27 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
28 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
29 maxDeltaPhiInEB_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEB", .15)),
30 maxDeltaEtaInEB_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEB", .007)),
31 maxHOEEB_(ps.getUntrackedParameter<double>(
"maxHOEEB", .12)),
32 maxSigmaiEiEEB_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEB", .01)),
33 maxDeltaPhiInEE_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEE", .1)),
34 maxDeltaEtaInEE_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEE", .009)),
35 maxHOEEE_(ps.getUntrackedParameter<double>(
"maxHOEEB_", .10)),
36 maxSigmaiEiEEE_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEE", .03)),
37 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 10)),
38 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
39 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
40 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
41 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
42 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
43 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
44 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 60)),
45 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 120)) {}
55 std::vector<TLorentzVector> list;
56 std::vector<int> chrgeList;
59 for (
auto const& ele : *electronColl) {
60 if (!ele.ecalDriven())
65 if (!(ele.isEB() || ele.isEE()))
68 double hOverE = ele.hadronicOverEm();
69 double sigmaee = ele.sigmaIetaIeta();
70 double deltaPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
71 double deltaEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
78 }
else if (ele.isEE()) {
87 double chi2 = trk->chi2();
88 double ndof = trk->ndof();
93 double trkd0 = trk->d0();
95 trkd0 = -(trk->dxy(
beamSpot->position()));
97 edm::LogError(
"ZtoEEEventSelector") <<
"Error >> Failed to get BeamSpot for label: " <<
bsTag_;
99 if (std::fabs(trkd0) >=
maxD0_)
115 float eiso = absiso / (ele.pt());
120 lv.SetPtEtaPhiE(ele.pt(), ele.eta(), ele.phi(), ele.energy());
122 chrgeList.push_back(ele.charge());
129 if (chrgeList[0] + chrgeList[1] != 0)
134 TLorentzVector
zv = list[0] + list[1];
int numberOfValidPixelHits() const
const edm::InputTag electronTag_
const double maxSigmaiEiEEE_
const double maxDeltaPhiInEB_
const edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
const double minPtHighest_
#define DEFINE_FWK_MODULE(type)
const double maxDeltaPhiInEE_
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
bool isNonnull() const
Checks for non-null.
const double maxDeltaEtaInEE_
Log< level::Error, false > LogError
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
int numberOfValidStripHits() const
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
const double maxDeltaEtaInEB_
bool filter(edm::Event &, edm::EventSetup const &) override
const edm::InputTag bsTag_
ZtoEEEventSelector(const edm::ParameterSet &)
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
const double maxSigmaiEiEEB_
const double maxNormChi2_