22 #include "TLorentzVector.h" 65 desc.addUntracked<
double>(
"maxEta", 2.4);
66 desc.addUntracked<
double>(
"minPt", 5);
67 desc.addUntracked<
double>(
"maxDeltaPhiInEB", .15);
68 desc.addUntracked<
double>(
"maxDeltaEtaInEB", .007);
69 desc.addUntracked<
double>(
"maxHOEEB", .12);
70 desc.addUntracked<
double>(
"maxSigmaiEiEEB", .01);
71 desc.addUntracked<
double>(
"maxDeltaPhiInEE", .1);
72 desc.addUntracked<
double>(
"maxDeltaEtaInEE", .009);
73 desc.addUntracked<
double>(
"maxHOEEB_", .10);
74 desc.addUntracked<
double>(
"maxSigmaiEiEEE", .03);
75 desc.addUntracked<
double>(
"maxNormChi2", 1000);
76 desc.addUntracked<
double>(
"maxD0", 0.02);
77 desc.addUntracked<
double>(
"maxDz", 20.);
78 desc.addUntracked<uint32_t>(
"minPixelHits", 1);
79 desc.addUntracked<uint32_t>(
"minStripHits", 8);
80 desc.addUntracked<
double>(
"maxIso", 0.3);
81 desc.addUntracked<
double>(
"minPtHighest", 24);
82 desc.addUntracked<
double>(
"minInvMass", 75);
83 desc.addUntracked<
double>(
"maxInvMass", 105);
88 : electronTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"electronInputTag",
edm::
InputTag(
"gedGsfElectrons"))),
92 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
93 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
94 maxDeltaPhiInEB_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEB", .15)),
95 maxDeltaEtaInEB_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEB", .007)),
96 maxHOEEB_(ps.getUntrackedParameter<double>(
"maxHOEEB", .12)),
97 maxSigmaiEiEEB_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEB", .01)),
98 maxDeltaPhiInEE_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEE", .1)),
99 maxDeltaEtaInEE_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEE", .009)),
100 maxHOEEE_(ps.getUntrackedParameter<double>(
"maxHOEEB_", .10)),
101 maxSigmaiEiEEE_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEE", .03)),
102 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 1000)),
103 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
104 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
105 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
106 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
107 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
108 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
109 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 75)),
110 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 105)) {}
120 std::vector<TLorentzVector> list;
121 std::vector<int> chrgeList;
124 for (
auto const& ele : *electronColl) {
125 if (!ele.ecalDriven())
130 if (!(ele.isEB() || ele.isEE()))
133 double hOverE = ele.hadronicOverEm();
134 double sigmaee = ele.sigmaIetaIeta();
135 double deltaPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
136 double deltaEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
143 }
else if (ele.isEE()) {
152 double chi2 = trk->chi2();
153 double ndof = trk->ndof();
158 double trkd0 = trk->d0();
160 trkd0 = -(trk->dxy(
beamSpot->position()));
162 edm::LogError(
"ZtoEEEventSelector") <<
"Error >> Failed to get BeamSpot for label: " <<
bsTag_;
164 if (std::fabs(trkd0) >=
maxD0_)
180 float eiso = absiso / (ele.pt());
185 lv.SetPtEtaPhiE(ele.pt(), ele.eta(), ele.phi(), ele.energy());
187 chrgeList.push_back(ele.charge());
194 if (chrgeList[0] + chrgeList[1] != 0)
199 TLorentzVector
zv = list[0] + list[1];
int numberOfValidPixelHits() const
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
const edm::InputTag electronTag_
const double maxSigmaiEiEEE_
const double maxDeltaPhiInEB_
const edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
const double minPtHighest_
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 ;
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
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_