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::unique_ptr< AnnealingScheduleannealing
 
bool firstStep
 

Additional Inherited Members

Detailed Description

Definition at line 17 of file AnnealingGhostTrackFitter.h.

Constructor & Destructor Documentation

◆ AnnealingGhostTrackFitter() [1/2]

AnnealingGhostTrackFitter::AnnealingGhostTrackFitter ( )

Definition at line 12 of file AnnealingGhostTrackFitter.cc.

12  : firstStep(true) {
13  annealing.reset(new GeometricAnnealing(3.0, 64.0, 0.25));
14 }

References annealing.

Referenced by clone().

◆ AnnealingGhostTrackFitter() [2/2]

reco::AnnealingGhostTrackFitter::AnnealingGhostTrackFitter ( const AnnealingGhostTrackFitter orig)
inline

Definition at line 20 of file AnnealingGhostTrackFitter.h.

21  : annealing(orig.annealing->clone()), firstStep(orig.firstStep) {}

◆ ~AnnealingGhostTrackFitter()

reco::AnnealingGhostTrackFitter::~AnnealingGhostTrackFitter ( )
inlineoverride

Definition at line 22 of file AnnealingGhostTrackFitter.h.

22 {}

Member Function Documentation

◆ clone()

FitterImpl* reco::AnnealingGhostTrackFitter::clone ( void  ) const
inlineoverrideprivatevirtual

Implements reco::GhostTrackFitter::FitterImpl.

Definition at line 25 of file AnnealingGhostTrackFitter.h.

25 { return new AnnealingGhostTrackFitter(*this); }

References AnnealingGhostTrackFitter().

◆ postFit()

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

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 16 of file AnnealingGhostTrackFitter.cc.

18  {
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 }

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

◆ reset()

void reco::AnnealingGhostTrackFitter::reset ( void  )
inlineoverrideprivatevirtual

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 31 of file AnnealingGhostTrackFitter.h.

31  {
32  annealing->resetAnnealing();
33  firstStep = true;
34  }

References annealing, and firstStep.

◆ stable()

bool reco::AnnealingGhostTrackFitter::stable ( const GhostTrackPrediction before,
const GhostTrackPrediction after 
) const
inlineoverrideprivatevirtual

Reimplemented from reco::SequentialGhostTrackFitter.

Definition at line 27 of file AnnealingGhostTrackFitter.h.

27  {
28  return SequentialGhostTrackFitter::stable(before, after) && annealing->isAnnealed();
29  }

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

Member Data Documentation

◆ annealing

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

Definition at line 39 of file AnnealingGhostTrackFitter.h.

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

◆ firstStep

bool reco::AnnealingGhostTrackFitter::firstStep
private

Definition at line 40 of file AnnealingGhostTrackFitter.h.

Referenced by postFit(), and reset().

reco::GhostTrackFitter::PredictionUpdater::contribution
virtual void contribution(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2, bool withPredError=false) const =0
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
reco::AnnealingGhostTrackFitter::AnnealingGhostTrackFitter
AnnealingGhostTrackFitter()
Definition: AnnealingGhostTrackFitter.cc:12
ndof
Definition: HIMultiTrackSelector.h:49
reco::AnnealingGhostTrackFitter::annealing
std::unique_ptr< AnnealingSchedule > annealing
Definition: AnnealingGhostTrackFitter.h:39
reco::AnnealingGhostTrackFitter::firstStep
bool firstStep
Definition: AnnealingGhostTrackFitter.h:40
GeometricAnnealing
Definition: GeometricAnnealing.h:7
reco::SequentialGhostTrackFitter::stable
virtual bool stable(const GhostTrackPrediction &before, const GhostTrackPrediction &after) const
Definition: SequentialGhostTrackFitter.cc:17