RecoJets
JetProducers
plugins
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
25
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
26
#include "
FWCore/Framework/interface/MakerMacros.h
"
27
#include "
FWCore/Framework/interface/Event.h
"
28
#include "
DataFormats/BTauReco/interface/CATopJetTagInfo.h
"
29
#include "
DataFormats/JetReco/interface/PFJetCollection.h
"
30
31
//include header file
32
#include "
RecoJets/JetProducers/plugins/BasicToPFJet.h
"
33
34
BasicToPFJet::BasicToPFJet
(
const
edm::ParameterSet
& PSet)
35
: src_(PSet.getParameter<
edm
::
InputTag
>(
"src"
)), inputToken_(consumes<
reco
::
BasicJetCollection
>(src_)) {
36
produces<reco::PFJetCollection>();
37
}
38
39
BasicToPFJet::~BasicToPFJet
() {}
40
41
void
BasicToPFJet::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
42
edm::ParameterSetDescription
desc
;
43
desc
.add<
edm::InputTag
>(
"src"
,
edm::InputTag
(
""
));
44
descriptions.
add
(
"BasicToPFJet"
,
desc
);
45
}
46
47
void
BasicToPFJet::produce
(
edm::Event
&
Event
,
const
edm::EventSetup
&
EventSetup
) {
48
//first get the basic jet collection
49
edm::Handle<reco::BasicJetCollection>
BasicJetColl;
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'
56
reco::PFJet::Specific
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
72
DEFINE_FWK_MODULE
(
BasicToPFJet
);
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:89287
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
Generated for CMSSW Reference Manual by
1.8.16