115 produces<std::vector<reco::CaloJet> >();
116 produces<std::vector<reco::CaloJet> >(
"PUjets");
117 produces<reco::JetTagCollection>();
127 desc.add<
double>(
"MinGoodJetTrackPtRatio", 0.045);
128 desc.add<
double>(
"MinGoodJetTrackPt", 1.8);
129 desc.add<
double>(
"MaxTrackDistanceToJet", 0.04);
130 desc.add<
double>(
"MinTrackPt", 0.6);
131 desc.add<
double>(
"MaxTrackChi2", 20.);
132 desc.add<
bool>(
"UseForwardJetsAsNoPU",
true);
133 desc.add<
double>(
"MinEtaForwardJets", 2.4);
134 desc.add<
double>(
"MinEtForwardJets", 40.);
135 descriptions.
add(
"pixelJetPuId",
desc);
145 std::unique_ptr<std::vector<reco::CaloJet> > pOut(
new std::vector<reco::CaloJet>);
146 std::unique_ptr<std::vector<reco::CaloJet> > pOut_PUjets(
new std::vector<reco::CaloJet>);
152 unsigned int tsize =
tracks->size();
153 float teta[tsize], tphi[tsize];
155 for (
auto const& tr : *
tracks) {
176 if (!generaljets.
product()->empty()) {
187 GlobalVector direction(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
193 pOut->push_back(*itJet);
196 auto itTrack =
tracks->begin();
197 for (
unsigned int i = 0;
i < tsize; ++
i) {
206 trMomentum += itTrack->momentum();
213 pOut->push_back(*itJet);
216 pOut_PUjets->push_back(*itJet);
220 (*pOut_jetTagCollection)[jRef] = trMomentum.rho();