112 produces<std::vector<reco::CaloJet> >();
113 produces<std::vector<reco::CaloJet> >(
"PUjets");
126 desc.
add<
double>(
"MinGoodJetTrackPtRatio",0.045);
127 desc.
add<
double>(
"MinGoodJetTrackPt",1.8);
128 desc.
add<
double>(
"MaxTrackDistanceToJet",0.04);
129 desc.
add<
double>(
"MinTrackPt",0.6);
130 desc.
add<
double>(
"MaxTrackChi2",20.);
131 desc.
add<
bool>(
"UseForwardJetsAsNoPU",
true);
132 desc.
add<
double>(
"MinEtaForwardJets",2.4);
133 desc.
add<
double>(
"MinEtForwardJets",40.);
134 descriptions.
add(
"pixelJetPuId",desc);
145 std::auto_ptr<std::vector<reco::CaloJet> > pOut(
new std::vector<reco::CaloJet> );
146 std::auto_ptr<std::vector<reco::CaloJet> > pOut_PUjets(
new std::vector<reco::CaloJet> );
151 unsigned int tsize =
tracks->size();
152 float teta[tsize], tphi[tsize];
154 for (
auto const & tr : *
tracks) { teta[
i]=tr.eta(); tphi[
i]=tr.phi();++
i;}
176 GlobalVector direction(jetMomentum.x(), jetMomentum.y(), jetMomentum.z());
184 pOut->push_back(*itJet);
188 std::vector<reco::Track>::const_iterator itTrack = tracks->begin();
189 for (
unsigned int i=0;
i<tsize; ++
i) {
198 trMomentum += itTrack->momentum();
206 pOut->push_back(*itJet);
210 pOut_PUjets->push_back(*itJet);
216 iEvent.
put(pOut_PUjets,
"PUjets");
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
virtual void produce(edm::Event &, const edm::EventSetup &)
double m_MinGoodJetTrackPt
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::View< reco::CaloJet > > jetsToken
U second(std::pair< T, U > const &p)
edm::InputTag m_primaryVertex
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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
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)
double m_MinGoodJetTrackPtRatio