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 
22  using namespace reco;
23  using namespace edm;
24  using namespace std;
25 
26  CaloJet::Specific specific;
27 
28  CaloJetCollection * jetCollectionTmp = new CaloJetCollection;
30  iEvent.getByLabel( tauSrc_, tauJets );
31  PFJetCollection::const_iterator i = tauJets->begin();
32  for(;i !=tauJets->end(); i++ ) {
33 
34  // cout <<"Jet Tracks"<<i->chargedHadronMultiplicity()<<std::endl;
35  CaloJet jet(i->p4(),i->vertex(),specific);
36  jet.setPdgId(15);
37  jetCollectionTmp->push_back(jet);
38  }
39 
40 
41 
42  auto_ptr<reco::CaloJetCollection> selectedTaus(jetCollectionTmp);
43 
44  iEvent.put(selectedTaus);
45 
46 
47 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
Jets made from CaloTowers.
Definition: CaloJet.h:30
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:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects