9 AcceptJet::AcceptJet(
const double& etaMin_,
const double& etaMax_,
const double& ptMin_,
const double& ptMax_,
10 const double& pMin_,
const double& pMax_,
const double& ratioMin_,
const double& ratioMax_) :
11 etaMin(etaMin_),
etaMax(etaMax_), ptRecJetMin(ptMin_), ptRecJetMax(ptMax_), pRecJetMin(pMin_),
12 pRecJetMax(pMax_), ratioMin(ratioMin_), ratioMax(ratioMax_) {}
37 edm::LogWarning(
"infos not valid") <<
"A valid SoftLeptonTagInfoCollection was not found!"
38 <<
" Skipping ratio check.";
41 double pToEratio =
ratio( jet, infos );
51 double jetRatio = 0.0;
52 reco::SoftLeptonTagInfoCollection::const_iterator infoiter = infos->begin();
53 for( ; infoiter != infos->end(); ++infoiter)
55 if(
reco::deltaR(jet.
eta(), jet.
phi(), infoiter->jet()->eta(), infoiter->jet()->phi()) > 1
e-4 )
58 if( infoiter->leptons() == 0 )
61 for(
unsigned int k = 0;
k != infoiter->leptons(); ++
k )
63 double tempRatio = infoiter->properties(
k).ratio;
64 if( tempRatio > jetRatio )
virtual double p() const
magnitude of momentum vector
Base class for all types of Jets.
virtual double eta() const
momentum pseudorapidity
double deltaR(double eta1, double phi1, double eta2, double phi2)
AcceptJet(const double &etaMin_, const double &etaMax_, const double &ptMin_, const double &ptMax_, const double &pMin_, const double &pMax_, const double &ratioMin_, const double &ratioMax_)
double ratio(const reco::Jet &jet, const edm::Handle< reco::SoftLeptonTagInfoCollection > &infos) const
Finds the ratio of the momentum of any leptons in the jet to jet energy.
virtual double pt() const
transverse momentum
virtual double phi() const
momentum azimuthal angle
bool operator()(const reco::Jet &jet, const int &jetFlavour, const edm::Handle< reco::SoftLeptonTagInfoCollection > &infos) const
Returns true if jet and associated parton satisfy kinematic cuts.