CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFJetToCaloProducer.cc
Go to the documentation of this file.
4 #include "Math/GenVector/VectorUtil.h"
5 //
6 // class decleration
7 //
8 
9 
11 {
12 
13  tauSrc_ = iConfig.getParameter<edm::InputTag>("Source");
14  produces<reco::CaloJetCollection>();
15 }
16 
18 
20 {
21  using namespace reco;
22  using namespace edm;
23  using namespace std;
24 
25  std::auto_ptr<reco::CaloJetCollection> selectedTaus(new CaloJetCollection);
26 
28  iEvent.getByLabel( tauSrc_, tauJets );
29 
31  for (PFJetCollection::const_iterator i = tauJets->begin(); i != tauJets->end(); ++i ) {
32  CaloJet jet(i->p4(), i->vertex(), specific);
33  jet.setPdgId(15);
34  selectedTaus->push_back(jet);
35  }
36 
37  iEvent.put(selectedTaus);
38 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
dictionary specific
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual void produce(edm::Event &, const edm::EventSetup &) override
PFJetToCaloProducer(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:243
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects