CMS 3D CMS Logo

BasicToPFJet.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: BasicToPFJet
4 // Class: BasicToPFJet
5 //
14 //
15 // Original Author: clint richardson
16 // Created: Thu, 6 Mar 2014 12:00:00 GMT
17 //
18 //
19 // system include files
20 #include <memory>
21 #include <vector>
22 #include <sstream>
23 
24 // user include files
30 
31 //include header file
33 
35  : src_(PSet.getParameter<edm::InputTag>("src")), inputToken_(consumes<reco::BasicJetCollection>(src_)) {
36  produces<reco::PFJetCollection>();
37 }
38 
40 
43  desc.add<edm::InputTag>("src", edm::InputTag(""));
44  descriptions.add("BasicToPFJet", desc);
45 }
46 
48  //first get the basic jet collection
50  Event.getByToken(inputToken_, BasicJetColl);
51 
52  //now make the new pf jet collection
53  auto PFJetColl = std::make_unique<reco::PFJetCollection>();
54  //reco::PFJetCollection* PFJetColl = new reco::PFJetCollection;
55  //make the 'specific'
57 
58  //now get iterator
59  reco::BasicJetCollection::const_iterator i = BasicJetColl->begin();
60 
61  //loop over basic jets and convert them to pfjets
62  for (; i != BasicJetColl->end(); i++) {
63  reco::PFJet pfjet(i->p4(), i->vertex(), specific);
64  PFJetColl->push_back(pfjet);
65  }
66 
67  //std::unique_ptr<reco::PFJetCollection> selectedPFJets(PFJetColl);
68  Event.put(std::move(PFJetColl));
69 }
70 
71 //define as plug-in for the framework
mps_fire.i
i
Definition: mps_fire.py:428
CATopJetTagInfo.h
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
PFJetCollection.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle< reco::BasicJetCollection >
MakerMacros.h
BasicToPFJet::~BasicToPFJet
~BasicToPFJet() override
Definition: BasicToPFJet.cc:39
BasicToPFJet::BasicToPFJet
BasicToPFJet(const edm::ParameterSet &PSet)
Definition: BasicToPFJet.cc:34
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
BasicToPFJet.h
timingPdfMaker.specific
specific
Definition: timingPdfMaker.py:78
Event
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
ModuleDef.h
edm::EventSetup
Definition: EventSetup.h:57
BasicToPFJet::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: BasicToPFJet.cc:41
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
reco::PFJet
Jets made from PFObjects.
Definition: PFJet.h:20
reco::PFJet::Specific
Definition: PFJet.h:25
EventSetup
BasicToPFJet::inputToken_
const edm::EDGetTokenT< reco::BasicJetCollection > inputToken_
Definition: BasicToPFJet.h:20
edm::Event
Definition: Event.h:73
reco::BasicJetCollection
std::vector< BasicJet > BasicJetCollection
collection of BasicJet objects
Definition: BasicJetCollection.h:13
edm::InputTag
Definition: InputTag.h:15
BasicToPFJet::produce
void produce(edm::Event &event, const edm::EventSetup &EventSetup) override
Definition: BasicToPFJet.cc:47
BasicToPFJet
Definition: BasicToPFJet.h:11