Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoVertex
GhostTrackFitter
src
AnnealingGhostTrackFitter.cc
Go to the documentation of this file.
1
#include <vector>
2
3
#include "
RecoVertex/VertexTools/interface/GeometricAnnealing.h
"
4
5
#include "
RecoVertex/GhostTrackFitter/interface/GhostTrackState.h
"
6
#include "
RecoVertex/GhostTrackFitter/interface/GhostTrackPrediction.h
"
7
8
#include "
RecoVertex/GhostTrackFitter/interface/AnnealingGhostTrackFitter.h
"
9
10
using namespace
reco
;
11
12
namespace
{
13
static
inline
double
sqr
(
double
arg
) {
return
arg *
arg
; }
14
}
15
16
AnnealingGhostTrackFitter::AnnealingGhostTrackFitter
()
17
{
18
annealing
.reset(
new
GeometricAnnealing
(3.0, 64.0, 0.25));
19
}
20
21
void
AnnealingGhostTrackFitter::postFit
(
22
const
GhostTrackFitter::PredictionUpdater
&updater,
23
const
GhostTrackPrediction
&pred,
24
std::vector<GhostTrackState> &states)
25
{
26
for
(std::vector<GhostTrackState>::iterator
state
=
27
states.begin();
state
!= states.end(); ++
state
) {
28
29
if
(!
state
->isValid())
30
continue
;
31
32
double
ndof, chi2;
33
updater.
contribution
(pred, *
state
, ndof, chi2);
34
if
(ndof == 0. ||
firstStep
)
35
continue
;
36
37
state
->setWeight(
annealing
->weight(chi2));
38
}
39
40
if
(
firstStep
)
41
firstStep
=
false
;
42
else
43
annealing
->anneal();
44
}
reco::GhostTrackPrediction
Definition:
GhostTrackPrediction.h:21
reco::AnnealingGhostTrackFitter::postFit
virtual void postFit(const GhostTrackFitter::PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states)
Definition:
AnnealingGhostTrackFitter.cc:21
reco::AnnealingGhostTrackFitter::firstStep
bool firstStep
Definition:
AnnealingGhostTrackFitter.h:43
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:105
funct::arg
A arg
Definition:
Factorize.h:36
reco::GhostTrackFitter::PredictionUpdater::contribution
virtual void contribution(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2, bool withPredError=false) const =0
reco::GhostTrackFitter::PredictionUpdater
Definition:
GhostTrackFitter.h:43
GeometricAnnealing.h
reco::AnnealingGhostTrackFitter::AnnealingGhostTrackFitter
AnnealingGhostTrackFitter()
Definition:
AnnealingGhostTrackFitter.cc:16
GhostTrackState.h
reco::AnnealingGhostTrackFitter::annealing
std::auto_ptr< AnnealingSchedule > annealing
Definition:
AnnealingGhostTrackFitter.h:42
GhostTrackPrediction.h
GeometricAnnealing
Definition:
GeometricAnnealing.h:7
evf::utils::state
char state
Definition:
procUtils.cc:75
funct::sqr
Square< F >::type sqr(const F &f)
Definition:
Square.h:13
AnnealingGhostTrackFitter.h
Generated for CMSSW Reference Manual by
1.8.5