RecoVertex
ConfigurableVertexReco
src
ConfigurableVertexReconstructor.cc
Go to the documentation of this file.
1
#include "
RecoVertex/ConfigurableVertexReco/interface/ConfigurableVertexReconstructor.h
"
2
#include "
RecoVertex/ConfigurableVertexReco/interface/VertexRecoManager.h
"
3
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
4
5
using namespace
std
;
6
7
namespace
{
8
void
errorNoReconstructor(
const
string
&
finder
) {
9
edm::LogError
(
"ConfigurableVertexReconstructor"
) <<
"got no reconstructor for \""
<<
finder
<<
"\""
;
10
vector<string>
valid
=
VertexRecoManager::Instance
().
getNames
();
11
cout
<<
" Valid reconstructors are:"
;
12
for
(
const
auto
&
i
:
valid
) {
13
cout
<<
" "
<<
i
;
14
}
15
cout
<< endl;
16
throw
std::string
(
finder
+
" not available!"
);
17
}
18
}
// namespace
19
20
ConfigurableVertexReconstructor::ConfigurableVertexReconstructor
(
const
edm::ParameterSet
&
p
) : theRector(nullptr) {
21
string
finder
=
p
.getParameter<
string
>(
"finder"
);
22
theRector
=
VertexRecoManager::Instance
().
get
(
finder
).release();
23
if
(!
theRector
) {
24
errorNoReconstructor(
finder
);
25
}
26
theRector
->
configure
(
p
);
27
// theRector = theRector->clone();
28
// theRector = new ReconstructorFromFitter ( KalmanVertexFitter() );
29
}
30
31
ConfigurableVertexReconstructor::~ConfigurableVertexReconstructor
() {
delete
theRector
; }
32
33
ConfigurableVertexReconstructor::ConfigurableVertexReconstructor
(
const
ConfigurableVertexReconstructor
&
o
)
34
: theRector(
o
.theRector->
clone
()) {}
35
36
ConfigurableVertexReconstructor
*
ConfigurableVertexReconstructor::clone
()
const
{
37
return
new
ConfigurableVertexReconstructor
(*
this
);
38
}
39
40
vector<TransientVertex>
ConfigurableVertexReconstructor::vertices
(
const
std::vector<reco::TransientTrack>& prims,
41
const
std::vector<reco::TransientTrack>& secs,
42
const
reco::BeamSpot
&
s
)
const
{
43
return
theRector
->
vertices
(prims, secs,
s
);
44
}
45
46
vector<TransientVertex>
ConfigurableVertexReconstructor::vertices
(
const
std::vector<reco::TransientTrack>&
t
,
47
const
reco::BeamSpot
&
s
)
const
{
48
return
theRector
->
vertices
(
t
,
s
);
49
}
50
51
vector<TransientVertex>
ConfigurableVertexReconstructor::vertices
(
const
std::vector<reco::TransientTrack>&
t
)
const
{
52
return
theRector
->
vertices
(
t
);
53
}
ConfigurableVertexReconstructor::vertices
std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const override
Definition:
ConfigurableVertexReconstructor.cc:51
mps_fire.i
i
Definition:
mps_fire.py:428
MessageLogger.h
HLT_FULL_cff.finder
finder
Definition:
HLT_FULL_cff.py:51935
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
VertexRecoManager::get
std::unique_ptr< AbstractConfReconstructor > get(const std::string &) const
Definition:
VertexRecoManager.cc:46
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:42
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
VertexRecoManager::Instance
static VertexRecoManager & Instance()
Definition:
VertexRecoManager.cc:39
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition:
eve_macros.cc:135
reco::BeamSpot
Definition:
BeamSpot.h:21
VertexRecoManager.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
VertexRecoManager::getNames
std::vector< std::string > getNames() const
Definition:
VertexRecoManager.cc:54
edm::ParameterSet
Definition:
ParameterSet.h:47
VertexReconstructor::vertices
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const =0
ConfigurableVertexReconstructor.h
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:123
std
Definition:
JetResolutionObject.h:76
ConfigurableVertexReconstructor::clone
ConfigurableVertexReconstructor * clone() const override
Definition:
ConfigurableVertexReconstructor.cc:36
AbstractConfReconstructor::configure
virtual void configure(const edm::ParameterSet &)=0
ConfigurableVertexReconstructor::theRector
AbstractConfReconstructor * theRector
Definition:
ConfigurableVertexReconstructor.h:29
RunInfoPI::valid
Definition:
RunInfoPayloadInspectoHelper.h:16
ConfigurableVertexReconstructor::~ConfigurableVertexReconstructor
~ConfigurableVertexReconstructor() override
Definition:
ConfigurableVertexReconstructor.cc:31
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
ConfigurableVertexReconstructor::ConfigurableVertexReconstructor
ConfigurableVertexReconstructor(const edm::ParameterSet &)
Definition:
ConfigurableVertexReconstructor.cc:20
ConfigurableVertexReconstructor
Definition:
ConfigurableVertexReconstructor.h:13
Generated for CMSSW Reference Manual by
1.8.16