37 #include "TLorentzVector.h" 64 void endJob()
override;
106 eb_trIsoCut_ = iConfig.
getParameter<
double>(
"eb_trIsoCut");
107 eb_ecalIsoCut_ = iConfig.
getParameter<
double>(
"eb_ecalIsoCut");
108 eb_hcalIsoCut_ = iConfig.
getParameter<
double>(
"eb_hcalIsoCut");
112 ee_trIsoCut_ = iConfig.
getParameter<
double>(
"ee_trIsoCut");
113 ee_ecalIsoCut_ = iConfig.
getParameter<
double>(
"ee_ecalIsoCut");
114 ee_hcalIsoCut_ = iConfig.
getParameter<
double>(
"ee_hcalIsoCut");
119 invMassCut_ = iConfig.
getParameter<
double>(
"invMassCut");
121 electronCollection_ =
124 offlineBSCollection_ =
179 if (eleRef->
pt() < ptCut_)
182 if (eleRef->
isEB()) {
193 }
else if (eleRef->
isEE()) {
215 iEvent.
getByLabel(electronCollection_, gsfElectrons);
224 iEvent.
getByLabel(offlineBSCollection_, pBeamSpot);
232 for (reco::GsfElectronCollection::const_iterator myEle = gsfElectrons->begin(); myEle != gsfElectrons->end();
235 if (!electronSelection(&(*myEle), bspotPosition))
237 goodElectrons.push_back(&(*myEle));
238 if (myEle->pt() >
ptMax) {
240 ptMaxEle = &(*myEle);
244 float maxInv = -999.;
247 v1.SetPtEtaPhiM(ptMaxEle->
pt(), ptMaxEle->
eta(), ptMaxEle->
phi(), 0);
248 if (goodElectrons.size() > 1) {
249 for (
unsigned int iEle = 0; iEle < goodElectrons.size(); ++iEle)
250 if (goodElectrons[iEle] != ptMaxEle && (goodElectrons[iEle]->
charge() * ptMaxEle->
charge() == -1)) {
252 v2.SetPtEtaPhiM(goodElectrons[iEle]->
pt(), goodElectrons[iEle]->
eta(), goodElectrons[iEle]->phi(), 0.);
253 if ((v1 + v2).M() > maxInv)
254 maxInv = (v1 + v2).M();
259 if (goodElectrons.size() > 1 && maxInv > invMassCut_) {
265 if (!goodElectrons.empty() && (pfMET->begin()->et() > metCut_)) {
T getParameter(std::string const &) const
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
T getUntrackedParameter(std::string const &, T const &) const
double eta() const final
momentum pseudorapidity
~WZInterestingEventSelector() override
goodElectrons
/ ___|___ / _| ____| | ___ ___| |_ _ __ ___ _ __ | | _/ __| |_| _| | |/ _ \/ __| __| '__/ _ | '_ \ |...
edm::InputTag pfMetCollection_
double pt() const final
transverse momentum
int charge() const final
electric charge
edm::InputTag electronCollection_
#define DEFINE_FWK_MODULE(type)
float sigmaIetaIeta() const
float hcalOverEcal() const
float dr03TkSumPt() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
bool electronSelection(const GsfElectron *eleRef, const math::XYZPoint &bspotPosition)
XYZPointD XYZPoint
point in space with cartesian internal representation
float dr03EcalRecHitSumEt() const
float dr03HcalTowerSumEt() const
const Point & position() const
position
WZInterestingEventSelector
double phi() const final
momentum azimuthal angle
bool filter(edm::Event &, const edm::EventSetup &) override
edm::InputTag offlineBSCollection_
WZInterestingEventSelector(const edm::ParameterSet &)