10 AcceptJet::AcceptJet(
const double& etaMin_,
const double& etaMax_,
const double& ptMin_,
const double& ptMax_,
11 const double& pMin_,
const double& pMax_,
const double& ratioMin_,
const double& ratioMax_,
const bool& doJetID_) :
12 etaMin(etaMin_),
etaMax(etaMax_), ptRecJetMin(ptMin_), ptRecJetMax(ptMax_), pRecJetMin(pMin_),
13 pRecJetMax(pMax_), ratioMin(ratioMin_), ratioMax(ratioMax_), doJetID(doJetID_) {}
38 LogDebug(
"infos not valid") <<
"A valid SoftLeptonTagInfoCollection was not found!"
39 <<
" Skipping ratio check.";
42 double pToEratio =
ratio( jet, infos );
44 pToEratio/jec >
ratioMax )
return false;
56 if(!(neutralHadronEnergyFraction < 0.99
57 && neutralEmEnergyFraction < 0.99
59 && chargedHadronEnergyFraction > 0.0
60 && chargedMultiplicity > 0.0
61 && chargedEmEnergyFraction < 0.99))
73 double jetRatio = 0.0;
74 reco::SoftLeptonTagInfoCollection::const_iterator infoiter = infos->begin();
75 for( ; infoiter != infos->end(); ++infoiter)
77 if(
reco::deltaR(jet.
eta(), jet.
phi(), infoiter->jet()->eta(), infoiter->jet()->phi()) > 1
e-4 )
80 if( infoiter->leptons() == 0 )
83 for(
unsigned int k = 0;
k != infoiter->leptons(); ++
k )
85 double tempRatio = infoiter->properties(
k).ratio;
86 if( tempRatio > jetRatio )
virtual double p() const
magnitude of momentum vector
float chargedEmEnergy() const
chargedEmEnergy
Base class for all types of Jets.
double deltaR(const T1 &t1, const T2 &t2)
int chargedMultiplicity() const
chargedMultiplicity
Jets made from PFObjects.
virtual double eta() const
momentum pseudorapidity
virtual double pt() const
transverse momentum
float neutralEmEnergy() const
neutralEmEnergy
virtual double energy() const
energy
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_, const bool &doJetID_)
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 std::vector< reco::PFCandidatePtr > getPFConstituents() const
get all constituents
float neutralHadronEnergy() const
neutralHadronEnergy
bool operator()(const reco::Jet &jet, const int &jetFlavour, const edm::Handle< reco::SoftLeptonTagInfoCollection > &infos, const double jec) const
Returns true if jet and associated parton satisfy kinematic cuts.
virtual double phi() const
momentum azimuthal angle
float chargedHadronEnergy() const
chargedHadronEnergy