RecoTracker
TkTrackingRegions
plugins
TrackingSeedCandidates.cc
Go to the documentation of this file.
1
#include "
TrackingSeedCandidates.h
"
2
3
TrackingSeedCandidates::TrackingSeedCandidates
(
const
edm::ParameterSet
& regPSet,
edm::ConsumesCollector
& iC) {
4
// operation mode
5
//
6
std::string
seedingModeString = regPSet.
getParameter
<
std::string
>(
"seedingMode"
);
7
if
(seedingModeString ==
"Candidate"
)
8
m_seedingMode
=
SeedingMode::CANDIDATE_SEEDED
;
9
else
if
(seedingModeString ==
"Global"
)
10
m_seedingMode
=
SeedingMode::GLOBAL
;
11
else
12
throw
edm::Exception
(
edm::errors::Configuration
) <<
"Unknown seeding mode string: "
<< seedingModeString;
13
14
m_deltaEta_Cand
= regPSet.
getParameter
<
double
>(
"deltaEta_Cand"
);
15
m_deltaPhi_Cand
= regPSet.
getParameter
<
double
>(
"deltaPhi_Cand"
);
16
17
// basic inputs
18
if
(
m_seedingMode
==
SeedingMode::CANDIDATE_SEEDED
) {
19
m_token_input
= iC.
consumes
<
reco::CandidateView
>(regPSet.
getParameter
<
edm::InputTag
>(
"input"
));
20
if
(
m_deltaEta_Cand
< 0 ||
m_deltaPhi_Cand
< 0)
21
throw
edm::Exception
(
edm::errors::Configuration
)
22
<<
"Delta eta and phi parameters must be set for candidates in candidate seeding mode"
;
23
}
24
}
25
26
void
TrackingSeedCandidates::fillDescriptions
(
edm::ParameterSetDescription
&
desc
) {
27
desc
.add<
std::string
>(
"seedingMode"
,
"Global"
);
28
desc
.add<
edm::InputTag
>(
"input"
,
edm::InputTag
());
29
desc
.add<
double
>(
"deltaEta_Cand"
, -1.);
30
desc
.add<
double
>(
"deltaPhi_Cand"
, -1.);
31
}
32
33
TrackingSeedCandidates::Objects
TrackingSeedCandidates::objects
(
const
edm::Event
&
iEvent
)
const
{
34
Objects
result
;
35
std::pair<float, float>
dimensions
= std::make_pair(
m_deltaEta_Cand
,
m_deltaPhi_Cand
);
36
edm::Handle<reco::CandidateView>
objects
;
37
38
if
(
m_seedingMode
==
SeedingMode::CANDIDATE_SEEDED
) {
39
iEvent
.getByToken(
m_token_input
,
objects
);
40
result
= std::make_pair(
objects
.product(),
dimensions
);
41
}
else
42
result
= std::make_pair(
nullptr
,
dimensions
);
43
return
result
;
44
}
TrackingSeedCandidates::SeedingMode::CANDIDATE_SEEDED
TrackingSeedCandidates::m_token_input
edm::EDGetTokenT< reco::CandidateView > m_token_input
Definition:
TrackingSeedCandidates.h:33
TrackingSeedCandidates::TrackingSeedCandidates
TrackingSeedCandidates(const edm::ParameterSet ®PSet, edm::ConsumesCollector &&iC)
Definition:
TrackingSeedCandidates.h:19
TrackingSeedCandidates::m_seedingMode
SeedingMode m_seedingMode
Definition:
TrackingSeedCandidates.h:29
objects
Definition:
__init__.py:1
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::Handle
Definition:
AssociativeIterator.h:50
HistogramManager_cfi.dimensions
dimensions
Definition:
HistogramManager_cfi.py:74
TrackingSeedCandidates::m_deltaPhi_Cand
float m_deltaPhi_Cand
Definition:
TrackingSeedCandidates.h:31
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition:
ConsumesCollector.h:55
edm::View
Definition:
CaloClusterFwd.h:14
TrackingSeedCandidates.h
edm::ParameterSet
Definition:
ParameterSet.h:47
TrackingSeedCandidates::objects
Objects objects(const edm::Event &iEvent) const
Definition:
TrackingSeedCandidates.cc:33
TrackingSeedCandidates::m_deltaEta_Cand
float m_deltaEta_Cand
Definition:
TrackingSeedCandidates.h:30
iEvent
int iEvent
Definition:
GenABIO.cc:224
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
TrackingSeedCandidates::SeedingMode::GLOBAL
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
Exception
Definition:
hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
TrackingSeedCandidates::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition:
TrackingSeedCandidates.cc:26
mps_fire.result
result
Definition:
mps_fire.py:311
TrackingSeedCandidates::Objects
std::pair< const reco::CandidateView *, std::pair< float, float > > Objects
Definition:
TrackingSeedCandidates.h:18
edm::Event
Definition:
Event.h:73
edm::errors::Configuration
Definition:
EDMException.h:36
edm::InputTag
Definition:
InputTag.h:15
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.16