116 produces<std::vector<reco::CaloJet> >();
117 produces<std::vector<reco::CaloJet> >(
"PUjets");
118 produces<reco::JetTagCollection>();
128 desc.add<
double>(
"MinGoodJetTrackPtRatio", 0.045);
129 desc.add<
double>(
"MinGoodJetTrackPt", 1.8);
130 desc.add<
double>(
"MaxTrackDistanceToJet", 0.04);
131 desc.add<
double>(
"MinTrackPt", 0.6);
132 desc.add<
double>(
"MaxTrackChi2", 20.);
133 desc.add<
bool>(
"UseForwardJetsAsNoPU",
true);
134 desc.add<
double>(
"MinEtaForwardJets", 2.4);
135 desc.add<
double>(
"MinEtForwardJets", 40.);
136 descriptions.
add(
"pixelJetPuId",
desc);
146 std::unique_ptr<std::vector<reco::CaloJet> > pOut(
new std::vector<reco::CaloJet>);
147 std::unique_ptr<std::vector<reco::CaloJet> > pOut_PUjets(
new std::vector<reco::CaloJet>);
154 float teta[asize], tphi[asize];
156 for (
auto const& tr : *
tracks) {
157 teta[tsize] = tr.eta();
158 tphi[tsize] = tr.phi();
177 if (!generaljets.
product()->empty()) {
188 GlobalVector direction(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
194 pOut->push_back(*itJet);
197 auto itTrack =
tracks->begin();
198 for (
unsigned int i = 0;
i < tsize; ++
i) {
207 trMomentum += itTrack->momentum();
214 pOut->push_back(*itJet);
217 pOut_PUjets->push_back(*itJet);
221 (*pOut_jetTagCollection)[jRef] = trMomentum.rho();
T getParameter(std::string const &) const
double m_MinGoodJetTrackPt
void produce(edm::StreamID sid, edm::Event &, const edm::EventSetup &) const override
T const * product() const
edm::EDGetTokenT< edm::View< reco::Jet > > generaljetsToken
edm::EDGetTokenT< edm::View< reco::CaloJet > > jetsToken
U second(std::pair< T, U > const &p)
edm::InputTag m_primaryVertex
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::VertexCollection > primaryVertexToken
double m_MaxTrackDistanceToJet
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
PixelJetPuId(const edm::ParameterSet &)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
edm::EDGetTokenT< std::vector< reco::Track > > tracksToken
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void add(std::string const &label, ParameterSetDescription const &psetDescription)
RefToBaseProd< T > makeRefToBaseProdFrom(RefToBase< T > const &iRef, Event const &iEvent)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
double m_MinGoodJetTrackPtRatio
primaryVertex
hltOfflineBeamSpot for HLTMON
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > const transientTrackRecordToken_