CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
reco::AnnealingGhostTrackFitter Class Reference

#include <AnnealingGhostTrackFitter.h>

Inheritance diagram for reco::AnnealingGhostTrackFitter:
reco::SequentialGhostTrackFitter reco::GhostTrackFitter::FitterImpl

Public Member Functions

 AnnealingGhostTrackFitter ()
 
 AnnealingGhostTrackFitter (const AnnealingGhostTrackFitter &orig)
 
 ~AnnealingGhostTrackFitter () override
 
- Public Member Functions inherited from reco::SequentialGhostTrackFitter
GhostTrackPrediction fit (const GhostTrackFitter::PredictionUpdater &updater, const GhostTrackPrediction &prior, std::vector< GhostTrackState > &states, double &ndof, double &chi2) override
 
 SequentialGhostTrackFitter ()
 
 ~SequentialGhostTrackFitter () override
 
- Public Member Functions inherited from reco::GhostTrackFitter::FitterImpl
virtual ~FitterImpl ()
 

Private Member Functions

FitterImpl * clone () const override
 
void postFit (const GhostTrackFitter::PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states) override
 
void reset () override
 
bool stable (const GhostTrackPrediction &before, const GhostTrackPrediction &after) const override
 

Private Attributes

std::auto_ptr< AnnealingScheduleannealing
 
bool firstStep
 

Additional Inherited Members

Detailed Description

Definition at line 17 of file AnnealingGhostTrackFitter.h.

Constructor & Destructor Documentation

AnnealingGhostTrackFitter::AnnealingGhostTrackFitter ( )

Definition at line 12 of file AnnealingGhostTrackFitter.cc.

References annealing.

Referenced by clone().

12  : firstStep(true)
13 {
14  annealing.reset(new GeometricAnnealing(3.0, 64.0, 0.25));
15 }
std::auto_ptr< AnnealingSchedule > annealing
reco::AnnealingGhostTrackFitter::AnnealingGhostTrackFitter ( const AnnealingGhostTrackFitter orig)
inline

Definition at line 20 of file AnnealingGhostTrackFitter.h.

20  :
21  annealing(orig.annealing->clone()),
22  firstStep(orig.firstStep) {}
std::auto_ptr< AnnealingSchedule > annealing
reco::AnnealingGhostTrackFitter::~AnnealingGhostTrackFitter ( )
inlineoverride

Definition at line 23 of file AnnealingGhostTrackFitter.h.

23 {}

Member Function Documentation

FitterImpl* reco::AnnealingGhostTrackFitter::clone ( void  ) const
inlineoverrideprivatevirtual
void AnnealingGhostTrackFitter::postFit ( const GhostTrackFitter::PredictionUpdater updater,
const GhostTrackPrediction pred,
std::vector< GhostTrackState > &  states 
)
overrideprivatevirtual

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 17 of file AnnealingGhostTrackFitter.cc.

References annealing, vertices_cff::chi2, reco::GhostTrackFitter::PredictionUpdater::contribution(), firstStep, and ndof.

Referenced by reset().

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 }
std::auto_ptr< AnnealingSchedule > annealing
virtual void contribution(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2, bool withPredError=false) const =0
void reco::AnnealingGhostTrackFitter::reset ( void  )
inlineoverrideprivatevirtual

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 36 of file AnnealingGhostTrackFitter.h.

References annealing, firstStep, and postFit().

36 { annealing->resetAnnealing(); firstStep = true; }
std::auto_ptr< AnnealingSchedule > annealing
bool reco::AnnealingGhostTrackFitter::stable ( const GhostTrackPrediction before,
const GhostTrackPrediction after 
) const
inlineoverrideprivatevirtual

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 29 of file AnnealingGhostTrackFitter.h.

References annealing, and reco::SequentialGhostTrackFitter::stable().

31  {
32  return SequentialGhostTrackFitter::stable(before, after) &&
33  annealing->isAnnealed();
34  }
virtual bool stable(const GhostTrackPrediction &before, const GhostTrackPrediction &after) const
std::auto_ptr< AnnealingSchedule > annealing

Member Data Documentation

std::auto_ptr<AnnealingSchedule> reco::AnnealingGhostTrackFitter::annealing
private

Definition at line 42 of file AnnealingGhostTrackFitter.h.

Referenced by AnnealingGhostTrackFitter(), postFit(), reset(), and stable().

bool reco::AnnealingGhostTrackFitter::firstStep
private

Definition at line 43 of file AnnealingGhostTrackFitter.h.

Referenced by postFit(), and reset().