CMS 3D CMS Logo

AnnealingGhostTrackFitter.cc
Go to the documentation of this file.
1 #include <memory>
2 
3 #include <vector>
4 
6 
9 
11 
12 using namespace reco;
13 
15  annealing = std::make_unique<GeometricAnnealing>(3.0, 64.0, 0.25);
16 }
17 
19  const GhostTrackPrediction &pred,
20  std::vector<GhostTrackState> &states) {
21  for (std::vector<GhostTrackState>::iterator state = states.begin(); state != states.end(); ++state) {
22  if (!state->isValid())
23  continue;
24 
25  double ndof, chi2;
26  updater.contribution(pred, *state, ndof, chi2);
27  if (ndof == 0. || firstStep)
28  continue;
29 
30  state->setWeight(annealing->weight(chi2));
31  }
32 
33  if (firstStep)
34  firstStep = false;
35  else
36  annealing->anneal();
37 }
std::unique_ptr< AnnealingSchedule > annealing
virtual void contribution(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2, bool withPredError=false) const =0
void postFit(const GhostTrackFitter::PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states) override
fixed size matrix