Main Page
Namespaces
Classes
Package Documentation
src
CommonTools
ParticleFlow
interface
PtMinPFCandidateSelectorDefinition.h
Go to the documentation of this file.
1
#ifndef CommonTools_ParticleFlow_PtMinPFCandidateSelectorDefinition
2
#define CommonTools_ParticleFlow_PtMinPFCandidateSelectorDefinition
3
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h
"
8
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
9
#include "
CommonTools/ParticleFlow/interface/PFCandidateSelectorDefinition.h
"
10
11
namespace
pf2pat
{
12
13
class
PtMinPFCandidateSelectorDefinition
:
public
PFCandidateSelectorDefinition
{
14
15
public
:
16
PtMinPFCandidateSelectorDefinition
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&& iC ) :
17
ptMin_
( cfg.getParameter< double >(
"ptMin"
) ) { }
18
19
20
void
select
(
const
HandleToCollection
&
hc
,
21
const
edm::EventBase
&
e
,
22
const
edm::EventSetup
&
s
23
) {
24
selected_
.clear();
25
26
assert( hc.
isValid
() );
27
28
29
unsigned
key
=0;
30
for
( collection::const_iterator pfc = hc->begin();
31
pfc != hc->end(); ++pfc, ++
key
) {
32
33
if
( pfc->pt() >
ptMin_
) {
34
selected_
.push_back(
reco::PFCandidate
(*pfc) );
35
reco::PFCandidatePtr
ptrToMother( hc, key );
36
selected_
.back().setSourceCandidatePtr( ptrToMother );
37
38
}
39
}
40
}
41
42
/* const container& selected() const {return selected_;} */
43
44
private
:
45
double
ptMin_
;
46
};
47
48
}
49
50
#endif
pf2pat::PtMinPFCandidateSelectorDefinition::select
void select(const HandleToCollection &hc, const edm::EventBase &e, const edm::EventSetup &s)
Definition:
PtMinPFCandidateSelectorDefinition.h:20
Event.h
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
edm::Handle
Definition:
AssociativeIterator.h:47
pf2pat::PtMinPFCandidateSelectorDefinition::ptMin_
double ptMin_
Definition:
PtMinPFCandidateSelectorDefinition.h:45
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
crabWrapper.key
key
Definition:
crabWrapper.py:19
ParameterSet.h
PFCandidateSelectorDefinition.h
PFCandidate.h
edm::EventSetup
Definition:
EventSetup.h:57
edm::Ptr< PFCandidate >
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:74
looper.cfg
cfg
Definition:
looper.py:297
edm::EventBase
Definition:
EventBase.h:46
pf2pat
Definition:
ElectronIDPFCandidateSelectorDefinition.h:22
pf2pat::PFCandidateSelectorDefinition::selected_
container selected_
Definition:
PFCandidateSelectorDefinition.h:34
pf2pat::PtMinPFCandidateSelectorDefinition::PtMinPFCandidateSelectorDefinition
PtMinPFCandidateSelectorDefinition(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition:
PtMinPFCandidateSelectorDefinition.h:16
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:10
edm::ParameterSet
Definition:
ParameterSet.h:36
pf2pat::PtMinPFCandidateSelectorDefinition
Definition:
PtMinPFCandidateSelectorDefinition.h:13
PFCandidateFwd.h
ConsumesCollector.h
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Generated for CMSSW Reference Manual by
1.8.11