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 getUntrackedParameter(std::string const &, T const &) const
double pt() const final
transverse momentum
~WZInterestingEventSelector() override
#define DEFINE_FWK_MODULE(type)
float dr03HcalTowerSumEt(int depth=0) const
edm::InputTag pfMetCollection_
edm::InputTag electronCollection_
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
float sigmaIetaIeta() const
tuple WZInterestingEventSelector
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
T getParameter(std::string const &) const
float dr03EcalRecHitSumEt() const
float hcalOverEcal(const ShowerShape &ss, int depth) const
const Point & position() const
position
double phi() const final
momentum azimuthal angle
bool filter(edm::Event &, const edm::EventSetup &) override
edm::InputTag offlineBSCollection_
tuple goodElectrons
/ ___|___ / _| ____| | ___ ___| |_ _ __ ___ _ __ | | _/ __| |_| _| | |/ _ \/ __| __| '__/ _ | '_ \ |...
int charge() const final
electric charge
WZInterestingEventSelector(const edm::ParameterSet &)
double eta() const final
momentum pseudorapidity