Main Page
Namespaces
Classes
Package Documentation
GIT Directory
WorkBook
Offline Guide
Release schedule
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoParticleFlow
PFProducer
plugins
PFEGFootprintGSFixLinker.h
Go to the documentation of this file.
1
#ifndef RecoParticleFlow_PFProducer_PFEGFootprintGSFixLinker_h
2
#define RecoParticleFlow_PFProducer_PFEGFootprintGSFixLinker_h
3
9
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
10
#include "
FWCore/Framework/interface/Event.h
"
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
#include "
FWCore/Utilities/interface/Exception.h
"
13
14
#include "
DataFormats/Common/interface/Handle.h
"
15
#include "
DataFormats/Common/interface/ValueMap.h
"
16
#include "
DataFormats/EgammaCandidates/interface/GsfElectronFwd.h
"
17
#include "
DataFormats/EgammaCandidates/interface/PhotonFwd.h
"
18
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
19
20
#include <string>
21
22
class
PFEGFootprintGSFixLinker
:
public
edm::stream::EDProducer
<> {
23
public
:
24
explicit
PFEGFootprintGSFixLinker
(
const
edm::ParameterSet
&);
25
~PFEGFootprintGSFixLinker
();
26
27
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
28
29
template
<
typename
T>
30
void
31
getToken
(
edm::EDGetTokenT<T>
&
token
,
edm::ParameterSet
const
&
pset
,
std::string
const
&
label
)
32
{
33
token = consumes<T>(pset.
getParameter
<
edm::InputTag
>(
label
));
34
}
35
template
<
typename
T>
36
edm::Handle<T>
37
getHandle
(
edm::Event
const
& _event,
edm::EDGetTokenT<T>
const
&
token
,
std::string
const
&
name
)
38
{
39
edm::Handle<T>
handle
;
40
if
(!_event.
getByToken
(token, handle))
41
throw
cms::Exception
(
"ProductNotFound"
) <<
name
;
42
43
return
handle
;
44
}
45
46
private
:
47
typedef
edm::ValueMap<reco::GsfElectronRef>
ElectronRefMap
;
48
typedef
edm::ValueMap<reco::PhotonRef>
PhotonRefMap
;
49
typedef
std::vector<reco::PFCandidateRef>
Footprint
;
50
typedef
edm::ValueMap<Footprint>
FootprintMap
;
51
52
edm::EDGetTokenT<reco::PFCandidateCollection>
newCandidatesToken_
;
53
edm::EDGetTokenT<reco::GsfElectronCollection>
newElectronsToken_
;
54
edm::EDGetTokenT<reco::PhotonCollection>
newPhotonsToken_
;
55
// new -> old map
56
edm::EDGetTokenT<ElectronRefMap>
electronMapToken_
;
57
edm::EDGetTokenT<PhotonRefMap>
photonMapToken_
;
58
// e/g -> footprint map
59
edm::EDGetTokenT<FootprintMap>
electronFootprintMapToken_
;
60
edm::EDGetTokenT<FootprintMap>
photonFootprintMapToken_
;
61
62
std::string
electronsMapName_
;
63
std::string
photonsMapName_
;
64
};
65
66
#endif
PFEGFootprintGSFixLinker::newPhotonsToken_
edm::EDGetTokenT< reco::PhotonCollection > newPhotonsToken_
Definition:
PFEGFootprintGSFixLinker.h:54
diffTwoXMLs.label
list label
Definition:
diffTwoXMLs.py:42
PFEGFootprintGSFixLinker::getHandle
edm::Handle< T > getHandle(edm::Event const &_event, edm::EDGetTokenT< T > const &token, std::string const &name)
Definition:
PFEGFootprintGSFixLinker.h:37
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PFEGFootprintGSFixLinker::ElectronRefMap
edm::ValueMap< reco::GsfElectronRef > ElectronRefMap
Definition:
PFEGFootprintGSFixLinker.h:47
PFEGFootprintGSFixLinker::photonsMapName_
std::string photonsMapName_
Definition:
PFEGFootprintGSFixLinker.h:63
PFEGFootprintGSFixLinker::photonFootprintMapToken_
edm::EDGetTokenT< FootprintMap > photonFootprintMapToken_
Definition:
PFEGFootprintGSFixLinker.h:60
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition:
Event.h:462
PFEGFootprintGSFixLinker::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
PFEGFootprintGSFixLinker.cc:40
Event.h
PFEGFootprintGSFixLinker::electronMapToken_
edm::EDGetTokenT< ElectronRefMap > electronMapToken_
Definition:
PFEGFootprintGSFixLinker.h:56
edm::Handle
Definition:
AssociativeIterator.h:47
TrackValidation_cff.pset
tuple pset
Definition:
TrackValidation_cff.py:374
PFEGFootprintGSFixLinker::~PFEGFootprintGSFixLinker
~PFEGFootprintGSFixLinker()
Definition:
PFEGFootprintGSFixLinker.cc:35
Handle.h
ValueMap.h
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:77
edm::EDGetTokenT
Definition:
EDGetToken.h:32
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
ParameterSet.h
EDProducer.h
PFEGFootprintGSFixLinker::photonMapToken_
edm::EDGetTokenT< PhotonRefMap > photonMapToken_
Definition:
PFEGFootprintGSFixLinker.h:57
PFEGFootprintGSFixLinker::newElectronsToken_
edm::EDGetTokenT< reco::GsfElectronCollection > newElectronsToken_
Definition:
PFEGFootprintGSFixLinker.h:53
PFEGFootprintGSFixLinker::electronFootprintMapToken_
edm::EDGetTokenT< FootprintMap > electronFootprintMapToken_
Definition:
PFEGFootprintGSFixLinker.h:59
patZpeak.handle
tuple handle
Definition:
patZpeak.py:22
edm::EventSetup
Definition:
EventSetup.h:45
PFEGFootprintGSFixLinker::getToken
void getToken(edm::EDGetTokenT< T > &token, edm::ParameterSet const &pset, std::string const &label)
Definition:
PFEGFootprintGSFixLinker.h:31
edm::ValueMap< reco::GsfElectronRef >
Exception.h
GsfElectronFwd.h
PFEGFootprintGSFixLinker
Definition:
PFEGFootprintGSFixLinker.h:22
PFEGFootprintGSFixLinker::PhotonRefMap
edm::ValueMap< reco::PhotonRef > PhotonRefMap
Definition:
PFEGFootprintGSFixLinker.h:48
edm::stream::EDProducer
Definition:
EDProducer.h:33
cms::Exception
Definition:
Exception.h:68
unpackBuffers-CaloStage2.token
tuple token
Definition:
unpackBuffers-CaloStage2.py:249
edm::InputTag
Definition:
InputTag.h:15
PFEGFootprintGSFixLinker::Footprint
std::vector< reco::PFCandidateRef > Footprint
Definition:
PFEGFootprintGSFixLinker.h:49
PFEGFootprintGSFixLinker::newCandidatesToken_
edm::EDGetTokenT< reco::PFCandidateCollection > newCandidatesToken_
Definition:
PFEGFootprintGSFixLinker.h:52
PFEGFootprintGSFixLinker::electronsMapName_
std::string electronsMapName_
Definition:
PFEGFootprintGSFixLinker.h:62
edm::ParameterSet
Definition:
ParameterSet.h:36
PFEGFootprintGSFixLinker::FootprintMap
edm::ValueMap< Footprint > FootprintMap
Definition:
PFEGFootprintGSFixLinker.h:50
PFEGFootprintGSFixLinker::PFEGFootprintGSFixLinker
PFEGFootprintGSFixLinker(const edm::ParameterSet &)
Definition:
PFEGFootprintGSFixLinker.cc:18
edm::Event
Definition:
Event.h:65
PhotonFwd.h
PFCandidateFwd.h
Generated for CMSSW Reference Manual by
1.8.5