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:355
MessageLogger.h
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
validateGeometry_cfg.valid
valid
Definition:
validateGeometry_cfg.py:21
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:36
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
OrderedSet.t
t
Definition:
OrderedSet.py:90
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:36
edm::LogError
Definition:
MessageLogger.h:183
VertexReconstructor::vertices
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &) const =0
ConfigurableVertexReconstructor.h
HLT_2018_cff.finder
finder
Definition:
HLT_2018_cff.py:50398
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
ConfigurableVertexReconstructor::~ConfigurableVertexReconstructor
~ConfigurableVertexReconstructor() override
Definition:
ConfigurableVertexReconstructor.cc:31
ConfigurableVertexReconstructor::ConfigurableVertexReconstructor
ConfigurableVertexReconstructor(const edm::ParameterSet &)
Definition:
ConfigurableVertexReconstructor.cc:20
ConfigurableVertexReconstructor
Definition:
ConfigurableVertexReconstructor.h:13
Generated for CMSSW Reference Manual by
1.8.16