Main Page
Namespaces
Classes
Package Documentation
CommonTools
ParticleFlow
interface
PdgIdPFCandidateSelectorDefinition.h
Go to the documentation of this file.
1
#ifndef CommonTools_ParticleFlow_PdgIdPFCandidateSelectorDefinition
2
#define CommonTools_ParticleFlow_PdgIdPFCandidateSelectorDefinition
3
4
#include "
FWCore/Common/interface/EventBase.h
"
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
7
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
8
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
9
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
10
#include "
CommonTools/ParticleFlow/interface/PFCandidateSelectorDefinition.h
"
11
12
namespace
pf2pat
{
13
14
class
PdgIdPFCandidateSelectorDefinition
:
public
PFCandidateSelectorDefinition
{
15
16
public
:
17
PdgIdPFCandidateSelectorDefinition
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&& iC ) :
18
pdgIds_
( cfg.getParameter<
std
::vector<
int
> >(
"pdgId"
) ) { }
19
20
void
select
(
const
HandleToCollection
&
hc
,
21
const
edm::EventBase
&
e
,
22
const
edm::EventSetup
&
s
) {
23
selected_
.clear();
24
25
unsigned
key
=0;
26
for
( collection::const_iterator pfc = hc->begin();
27
pfc != hc->end(); ++pfc, ++
key
) {
28
29
for
(
unsigned
iId=0; iId<
pdgIds_
.size(); iId++) {
30
if
( pfc->pdgId() ==
pdgIds_
[iId] ) {
31
selected_
.push_back(
reco::PFCandidate
(*pfc) );
32
reco::PFCandidatePtr
ptrToMother( hc, key );
33
selected_
.back().setSourceCandidatePtr( ptrToMother );
34
break
;
35
}
36
}
37
}
38
}
39
40
private
:
41
std::vector<int>
pdgIds_
;
42
};
43
44
}
45
46
#endif
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
edm::Handle
Definition:
AssociativeIterator.h:48
EventSetup.h
std
Definition:
JetResolutionObject.h:80
pf2pat::PdgIdPFCandidateSelectorDefinition::select
void select(const HandleToCollection &hc, const edm::EventBase &e, const edm::EventSetup &s)
Definition:
PdgIdPFCandidateSelectorDefinition.h:20
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
crabWrapper.key
key
Definition:
crabWrapper.py:18
EventBase.h
ParameterSet.h
PFCandidateSelectorDefinition.h
PFCandidate.h
createfilelist.int
int
Definition:
createfilelist.py:10
pf2pat::PdgIdPFCandidateSelectorDefinition::pdgIds_
std::vector< int > pdgIds_
Definition:
PdgIdPFCandidateSelectorDefinition.h:41
pf2pat::PdgIdPFCandidateSelectorDefinition::PdgIdPFCandidateSelectorDefinition
PdgIdPFCandidateSelectorDefinition(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition:
PdgIdPFCandidateSelectorDefinition.h:17
edm::EventSetup
Definition:
EventSetup.h:54
edm::Ptr< PFCandidate >
pf2pat::PdgIdPFCandidateSelectorDefinition
Definition:
PdgIdPFCandidateSelectorDefinition.h:14
looper.cfg
cfg
Definition:
looper.py:295
edm::EventBase
Definition:
EventBase.h:46
pf2pat
Definition:
ElectronIDPFCandidateSelectorDefinition.h:22
pf2pat::PFCandidateSelectorDefinition::selected_
container selected_
Definition:
PFCandidateSelectorDefinition.h:35
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition:
PFCandidate.h:40
AnalysisDataFormats_SUSYBSMObjects::hc
susybsm::HSCParticleCollection hc
Definition:
classes.h:25
pf2pat::PFCandidateSelectorDefinition
Definition:
PFCandidateSelectorDefinition.h:11
edm::ParameterSet
Definition:
ParameterSet.h:36
PFCandidateFwd.h
ConsumesCollector.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Generated for CMSSW Reference Manual by
1.8.11