CMS 3D CMS Logo

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