CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PFJetToCaloProducer.cc
Go to the documentation of this file.
4 #include "Math/GenVector/VectorUtil.h"
5 //
6 // class decleration
7 //
8 
10  tauSrc_ = consumes<reco::PFJetCollection>(iConfig.getParameter<edm::InputTag>("Source"));
11  produces<reco::CaloJetCollection>();
12 }
13 
15 
17  using namespace reco;
18  using namespace edm;
19  using namespace std;
20 
21  std::unique_ptr<reco::CaloJetCollection> selectedTaus(new CaloJetCollection);
22 
24  iEvent.getByToken(tauSrc_, tauJets);
25 
27  for (PFJetCollection::const_iterator i = tauJets->begin(); i != tauJets->end(); ++i) {
28  CaloJet jet(i->p4(), i->vertex(), specific);
29  jet.setPdgId(15);
30  selectedTaus->push_back(jet);
31  }
32 
33  iEvent.put(std::move(selectedTaus));
34 }
dictionary specific
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
Jets made from CaloTowers.
Definition: CaloJet.h:27
void produce(edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
PFJetToCaloProducer(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:224
def move
Definition: eostools.py:511
edm::EDGetTokenT< reco::PFJetCollection > tauSrc_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects