CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AnyJetToCaloJetProducer.cc
Go to the documentation of this file.
5 
7 {
8  jetSrc_ = iConfig.getParameter<edm::InputTag>("Source");
9  produces<reco::CaloJetCollection>();
10 }
11 
13 
15 {
16  std::auto_ptr<reco::CaloJetCollection> newjets(new reco::CaloJetCollection());
17 
19  if (iEvent.getByLabel( jetSrc_, jets )) {
20  for(edm::View<reco::Jet>::const_iterator i = jets->begin(); i != jets->end(); i++ ) {
21  reco::CaloJet jet(i->p4(), i->vertex(), reco::CaloJet::Specific());
22  newjets->push_back(jet);
23  }
24  }
25 
26  iEvent.put(newjets);
27 }
28 
29 
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
Jets made from CaloTowers.
Definition: CaloJet.h:30
int iEvent
Definition: GenABIO.cc:243
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
vector< PseudoJet > jets
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
AnyJetToCaloJetProducer(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects