CMS 3D CMS Logo

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