115 produces<std::vector<reco::CaloJet> >();
116 produces<std::vector<reco::CaloJet> >(
"PUjets");
117 produces<reco::JetTagCollection>();
130 desc.
add<
double>(
"MinGoodJetTrackPtRatio",0.045);
131 desc.
add<
double>(
"MinGoodJetTrackPt",1.8);
132 desc.
add<
double>(
"MaxTrackDistanceToJet",0.04);
133 desc.
add<
double>(
"MinTrackPt",0.6);
134 desc.
add<
double>(
"MaxTrackChi2",20.);
135 desc.
add<
bool>(
"UseForwardJetsAsNoPU",
true);
136 desc.
add<
double>(
"MinEtaForwardJets",2.4);
137 desc.
add<
double>(
"MinEtForwardJets",40.);
138 descriptions.
add(
"pixelJetPuId",desc);
149 std::unique_ptr<std::vector<reco::CaloJet> > pOut(
new std::vector<reco::CaloJet> );
150 std::unique_ptr<std::vector<reco::CaloJet> > pOut_PUjets(
new std::vector<reco::CaloJet> );
156 unsigned int tsize = tracks->size();
157 float teta[tsize], tphi[tsize];
159 for (
auto const & tr : *tracks) { teta[
i]=tr.eta(); tphi[
i]=tr.phi();++
i;}
177 if(!generaljets.
product()->empty())
184 if(!primaryVertex->empty())
191 GlobalVector direction(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
198 pOut->push_back(*itJet);
203 auto itTrack = tracks->begin();
204 for (
unsigned int i=0; i<tsize; ++
i) {
213 trMomentum += itTrack->momentum();
221 pOut->push_back(*itJet);
225 pOut_PUjets->push_back(*itJet);
229 (*pOut_jetTagCollection)[jRef] = trMomentum.rho();
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double m_MinGoodJetTrackPt
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
reco::TransientTrack build(const reco::Track *p) 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
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::VertexCollection > primaryVertexToken
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double m_MaxTrackDistanceToJet
PixelJetPuId(const edm::ParameterSet &)
edm::EDGetTokenT< std::vector< reco::Track > > tracksToken
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void add(std::string const &label, ParameterSetDescription const &psetDescription)
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
RefToBaseProd< T > makeRefToBaseProdFrom(RefToBase< T > const &iRef, Event const &iEvent)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
double m_MinGoodJetTrackPtRatio
void produce(edm::StreamID sid, edm::Event &, const edm::EventSetup &) const override