CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 () 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::unique_ptr
< AnnealingSchedule
annealing
 
bool firstStep
 

Additional Inherited Members

Detailed Description

Definition at line 17 of file AnnealingGhostTrackFitter.h.

Constructor & Destructor Documentation

AnnealingGhostTrackFitter::AnnealingGhostTrackFitter ( )

Definition at line 14 of file AnnealingGhostTrackFitter.cc.

References annealing.

Referenced by clone().

14  : firstStep(true) {
15  annealing = std::make_unique<GeometricAnnealing>(3.0, 64.0, 0.25);
16 }
std::unique_ptr< AnnealingSchedule > annealing
reco::AnnealingGhostTrackFitter::AnnealingGhostTrackFitter ( const AnnealingGhostTrackFitter orig)
inline

Definition at line 20 of file AnnealingGhostTrackFitter.h.

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

Definition at line 22 of file AnnealingGhostTrackFitter.h.

22 {}

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 18 of file AnnealingGhostTrackFitter.cc.

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

20  {
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 reco::AnnealingGhostTrackFitter::reset ( void  )
inlineoverrideprivatevirtual

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 31 of file AnnealingGhostTrackFitter.h.

References annealing, and firstStep.

31  {
32  annealing->resetAnnealing();
33  firstStep = true;
34  }
std::unique_ptr< AnnealingSchedule > annealing
bool reco::AnnealingGhostTrackFitter::stable ( const GhostTrackPrediction before,
const GhostTrackPrediction after 
) const
inlineoverrideprivatevirtual

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 27 of file AnnealingGhostTrackFitter.h.

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

27  {
28  return SequentialGhostTrackFitter::stable(before, after) && annealing->isAnnealed();
29  }
std::unique_ptr< AnnealingSchedule > annealing
virtual bool stable(const GhostTrackPrediction &before, const GhostTrackPrediction &after) const

Member Data Documentation

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

Definition at line 39 of file AnnealingGhostTrackFitter.h.

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

bool reco::AnnealingGhostTrackFitter::firstStep
private

Definition at line 40 of file AnnealingGhostTrackFitter.h.

Referenced by postFit(), and reset().