CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFTauToJetProducer.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;
26 
27  CaloJetCollection * jetCollectionTmp = new CaloJetCollection;
29  iEvent.getByLabel( tauSrc_, tauJets );
30  PFTauCollection::const_iterator i = tauJets->begin();
31  for(;i !=tauJets->end(); i++ ) {
32  // cout <<"Tau Tracks " << i->signalPFChargedHadrCands().size()<<std::endl;
33  CaloJet jet(i->p4(),i->vertex(),specific);
34  jet.setPdgId(15);
35  jetCollectionTmp->push_back(jet);
36 
37  }
38 
39 
40 
41  auto_ptr<reco::CaloJetCollection> selectedTaus(jetCollectionTmp);
42  iEvent.put(selectedTaus);
43 
44 
45 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
dictionary specific
Jets made from CaloTowers.
Definition: CaloJet.h:30
PFTauToJetProducer(const edm::ParameterSet &)
int iEvent
Definition: GenABIO.cc:243
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects