10 #include "TLorentzVector.h" 24 electronTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"electronInputTag",
edm::
InputTag(
"gedGsfElectrons"))),
28 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
29 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
30 maxDeltaPhiInEB_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEB", .15)),
31 maxDeltaEtaInEB_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEB", .007)),
32 maxHOEEB_(ps.getUntrackedParameter<double>(
"maxHOEEB", .12)),
33 maxSigmaiEiEEB_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEB", .01)),
34 maxDeltaPhiInEE_(ps.getUntrackedParameter<double>(
"maxDeltaPhiInEE", .1)),
35 maxDeltaEtaInEE_(ps.getUntrackedParameter<double>(
"maxDeltaEtaInEE", .009)),
36 maxHOEEE_(ps.getUntrackedParameter<double>(
"maxHOEEB_", .10)),
37 maxSigmaiEiEEE_(ps.getUntrackedParameter<double>(
"maxSigmaiEiEEE", .03)),
38 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 10)),
39 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
40 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
41 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
42 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
43 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
44 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
45 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 60)),
46 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 120))
58 std::vector<TLorentzVector>
list;
59 std::vector<int> chrgeList;
62 for (
auto const& ele: *electronColl) {
63 if (!ele.ecalDriven())
continue;
64 if (ele.pt() <
minPt_)
continue;
66 if (!(ele.isEB() || ele.isEE()))
continue;
68 double hOverE = ele.hadronicOverEm();
69 double sigmaee = ele.sigmaIetaIeta();
70 double deltaPhiIn = ele.deltaPhiSuperClusterTrackAtVtx();
71 double deltaEtaIn = ele.deltaEtaSuperClusterTrackAtVtx();
80 else if (ele.isEE()) {
89 double chi2 = trk->chi2();
90 double ndof = trk->ndof();
91 double chbyndof = (ndof > 0) ? chi2/ndof : 0;
94 double trkd0 = trk->d0();
96 trkd0 = -(trk->dxy(beamSpot->
position()));
99 edm::LogError(
"ZtoEEEventSelector") <<
"Error >> Failed to get BeamSpot for label: " 102 if (std::fabs(trkd0) >=
maxD0_)
continue;
114 float eiso = absiso/(ele.pt());
118 lv.SetPtEtaPhiE(ele.pt(), ele.eta(), ele.phi(), ele.energy());
120 chrgeList.push_back(ele.charge());
124 edm::LogError(
"ZtoEEEventSelector") <<
"Error >> Failed to get ElectronCollection for label: " 127 if (list.size() < 2)
return false;
128 if (chrgeList[0] + chrgeList[1] != 0)
return false;
131 TLorentzVector zv = list[0] + list[1];
bool isNonnull() const
Checks for non-null.
const edm::InputTag electronTag_
const double maxSigmaiEiEEE_
const double maxDeltaPhiInEB_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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)
int numberOfValidStripHits() const
const double maxDeltaEtaInEE_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
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 &)
int numberOfValidPixelHits() const
const Point & position() const
position
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
const double maxSigmaiEiEEB_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
const double maxNormChi2_