CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AnnealingGhostTrackFitter.cc
Go to the documentation of this file.
1 #include <vector>
2 
4 
7 
9 
10 using namespace reco;
11 
13 {
14  annealing.reset(new GeometricAnnealing(3.0, 64.0, 0.25));
15 }
16 
19  const GhostTrackPrediction &pred,
20  std::vector<GhostTrackState> &states)
21 {
22  for(std::vector<GhostTrackState>::iterator state =
23  states.begin(); state != states.end(); ++state) {
24 
25  if (!state->isValid())
26  continue;
27 
28  double ndof, chi2;
29  updater.contribution(pred, *state, ndof, chi2);
30  if (ndof == 0. || firstStep)
31  continue;
32 
33  state->setWeight(annealing->weight(chi2));
34  }
35 
36  if (firstStep)
37  firstStep = false;
38  else
39  annealing->anneal();
40 }
virtual void postFit(const GhostTrackFitter::PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states)
virtual void contribution(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2, bool withPredError=false) const =0
std::auto_ptr< AnnealingSchedule > annealing