38 #include "TLorentzVector.h"
66 virtual void endJob();
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)
241 if (!electronSelection(&(*myEle),bspotPosition))
continue;
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
edm::InputTag pfMetCollection_
edm::InputTag electronCollection_
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
float sigmaIetaIeta() const
tuple WZInterestingEventSelector
bool electronSelection(const GsfElectron *eleRef, math::XYZPoint bspotPosition)
float hcalOverEcal() const
float dr03TkSumPt() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
virtual int charge() const GCC11_FINAL
electric charge
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 float pt() const GCC11_FINAL
transverse momentum
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