test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
- Public Member Functions inherited from reco::SequentialGhostTrackFitter
GhostTrackPrediction fit (const GhostTrackFitter::PredictionUpdater &updater, const GhostTrackPrediction &prior, std::vector< GhostTrackState > &states, double &ndof, double &chi2)
 
 SequentialGhostTrackFitter ()
 
 ~SequentialGhostTrackFitter ()
 
- Public Member Functions inherited from reco::GhostTrackFitter::FitterImpl
virtual ~FitterImpl ()
 

Private Member Functions

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

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 ( )
inline

Definition at line 23 of file AnnealingGhostTrackFitter.h.

23 {}

Member Function Documentation

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

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 17 of file AnnealingGhostTrackFitter.cc.

References annealing, beam_dqm_sourceclient-live_cfg::chi2, reco::GhostTrackFitter::PredictionUpdater::contribution(), firstStep, and ndof.

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

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 36 of file AnnealingGhostTrackFitter.h.

References annealing, and firstStep.

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

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().