18 if(iJet->
energy()== 0)
return false;
43 if(!validToken)
return;
49 if(!validToken)
return;
54 std::vector<reco::PFJet> lCJets;
55 for(reco::PFJetCollection::const_iterator
jet=lUCJets.begin();
jet!=lUCJets.end(); ++
jet){
58 tempJet.
scaleEnergy(corrector ? corrector->correction(*
jet, iEvent, iSetup) : 1.);
59 lCJets.push_back(tempJet);
67 for(
int ivtx = 0; ivtx < (int)lVertices.size(); ivtx++) {
69 const Vertex *vtx = &(lVertices.at(ivtx));
70 if( vtx->
isFake() )
continue;
71 if( vtx->
ndof()<=4 )
continue;
72 if( vtx->
position().Rho()>2.0 )
continue;
73 if( fabs(vtx->
position().Z())>24.0 )
continue;
74 lGoodVertices.push_back(*vtx);
78 for(
int i0 = 0; i0 < (int) lUCJets.size(); i0++) {
79 const PFJet *pUCJet = &(lUCJets.at(i0));
80 for(
int i1 = 0; i1 < (int) lCJets.size(); i1++) {
81 const PFJet *pCJet = &(lCJets.at(i1));
83 if( fabs(pUCJet->
eta() - pCJet->
eta()) > 0.001 )
continue;
84 if( pUCJet->
pt() < 0.0 )
continue;
85 double lJec = pCJet ->
pt()/pUCJet->
pt();
89 if( lGoodVertices.size()>0 ) {
99 << iEvent.
id() <<
" : "
100 << lPUJetId.nvtx() <<
" "
101 << pCJet->
pt() <<
" "
102 << lPUJetId.jetEta() <<
" "
103 << lPUJetId.jetPhi() <<
" "
104 << lPUJetId.d0() <<
" "
105 << lPUJetId.dZ() <<
" "
106 << lPUJetId.beta() <<
" "
107 << lPUJetId.betaStar() <<
" "
108 << lPUJetId.nCharged() <<
" "
109 << lPUJetId.nNeutrals() <<
" "
110 << lPUJetId.dRMean() <<
" "
111 << lPUJetId.frac01() <<
" "
112 << lPUJetId.frac02() <<
" "
113 << lPUJetId.frac03() <<
" "
114 << lPUJetId.frac04() <<
" "
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< reco::PFJetCollection > PFJetCollection_
virtual double energy() const GCC11_FINAL
energy
T getParameter(std::string const &) const
float chargedEmEnergy() const
chargedEmEnergy
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PileupJetIdAlgo * fPUJetIdAlgo
std::string jetCorrector_
edm::EDGetTokenT< reco::VertexCollection > thePVCollection_
std::vector< Vertex > VertexCollection
collection of Vertex objects
virtual void scaleEnergy(double fScale)
scale energy of the jet
void Load_pfjets_mvavalue()
void Load_pfjets_corr_p4()
int chargedMultiplicity() const
chargedMultiplicity
const Point & position() const
position
Jets made from PFObjects.
float neutralEmEnergy() const
neutralEmEnergy
PileupJetIdentifier computeIdVariables(const reco::Jet *jet, float jec, const reco::Vertex *, const reco::VertexCollection &, bool calculateMva=false)
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< float > & pfjets_mvavalue()
void SetVars(HWW &, const edm::Event &, const edm::EventSetup &)
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
std::vector< PFJet > PFJetCollection
collection of PFJet objects
virtual float jetArea() const
get jet area
virtual int nConstituents() const
of constituents
std::vector< float > & pfjets_JEC()
float neutralHadronEnergy() const
neutralHadronEnergy
MVAJetIdMaker(const edm::ParameterSet &, edm::ConsumesCollector)
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > XYZTLorentzVectorF
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual float pt() const GCC11_FINAL
transverse momentum
bool passPFLooseId(const reco::PFJet *iJet)
float chargedHadronEnergy() const
chargedHadronEnergy
math::PtEtaPhiELorentzVectorF LorentzVector