38 #include "TLorentzVector.h"
66 virtual void endJob()
override;
110 eb_trIsoCut_ = iConfig.
getParameter<
double>(
"eb_trIsoCut");
111 eb_ecalIsoCut_ = iConfig.
getParameter<
double>(
"eb_ecalIsoCut");
112 eb_hcalIsoCut_ = iConfig.
getParameter<
double>(
"eb_hcalIsoCut");
116 ee_trIsoCut_ = iConfig.
getParameter<
double>(
"ee_trIsoCut");
117 ee_ecalIsoCut_ = iConfig.
getParameter<
double>(
"ee_ecalIsoCut");
118 ee_hcalIsoCut_ = iConfig.
getParameter<
double>(
"ee_hcalIsoCut");
123 invMassCut_ = iConfig.
getParameter<
double>(
"invMassCut");
192 if (eleRef->
pt()<ptCut_)
return false;
196 if (eleRef->
dr03TkSumPt()/eleRef->
pt()>eb_trIsoCut_)
return false;
202 else if (eleRef->
isEE())
204 if (eleRef->
dr03TkSumPt()/eleRef->
pt()>ee_trIsoCut_)
return false;
211 if (eleRef->
gsfTrack()->trackerExpectedHitsInner().numberOfHits()>missHitCut_)
return false;
221 iEvent.
getByLabel(electronCollection_,gsfElectrons);
230 iEvent.
getByLabel(offlineBSCollection_, pBeamSpot);
238 for(reco::GsfElectronCollection::const_iterator myEle=gsfElectrons->begin();myEle!=gsfElectrons->end();++myEle)
242 goodElectrons.push_back(&(*myEle));
243 if (myEle->pt() > ptMax )
246 ptMaxEle = &(*myEle);
253 v1.SetPtEtaPhiM(ptMaxEle->
pt(),ptMaxEle->
eta(),ptMaxEle->
phi(),0);
254 if (goodElectrons.size()>1)
256 for (
unsigned int iEle=0; iEle<goodElectrons.size(); ++iEle)
257 if (goodElectrons[iEle]!=ptMaxEle && (goodElectrons[iEle]->
charge() * ptMaxEle->
charge() == -1) )
260 v2.SetPtEtaPhiM(goodElectrons[iEle]->
pt(),goodElectrons[iEle]->
eta(),goodElectrons[iEle]->
phi(),0.);
261 if ( (v1+v2).M() > maxInv )
262 maxInv = (v1+v2).M();
267 if (goodElectrons.size()>1 && maxInv > invMassCut_)
274 if (goodElectrons.size()>=1 && (pfMET->begin()->et()>metCut_))
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual float pt() const
transverse momentum
#define DEFINE_FWK_MODULE(type)
virtual float phi() const
momentum azimuthal angle
virtual void endJob() override
edm::InputTag pfMetCollection_
cuts_t electronSelection(HWW &, const unsigned int index, bool applyAlignmentCorrection=false, bool removedEtaCutInEndcap=false, bool useGsfTrack=true)
edm::InputTag electronCollection_
float sigmaIetaIeta() const
virtual float eta() const
momentum pseudorapidity
tuple WZInterestingEventSelector
virtual int charge() const
electric charge
float hcalOverEcal() const
float dr03TkSumPt() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool electronSelection(const GsfElectron *eleRef, const math::XYZPoint &bspotPosition)
XYZPointD XYZPoint
point in space with cartesian internal representation
T const * product() const
float dr03EcalRecHitSumEt() const
~WZInterestingEventSelector()
float dr03HcalTowerSumEt() const
const Point & position() const
position
virtual bool filter(edm::Event &, const edm::EventSetup &) override
edm::InputTag offlineBSCollection_
tuple goodElectrons
/ ___|___ / _| ____| | ___ ___| |_ _ __ ___ _ __ | | _/ __| |_| _| | |/ _ \/ __| __| '__/ _ | '_ \ |...
WZInterestingEventSelector(const edm::ParameterSet &)
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack