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

14  : firstStep(true) {
15  annealing = std::make_unique<GeometricAnnealing>(3.0, 64.0, 0.25);
16 }

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

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 }

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:14
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
reco::SequentialGhostTrackFitter::stable
virtual bool stable(const GhostTrackPrediction &before, const GhostTrackPrediction &after) const
Definition: SequentialGhostTrackFitter.cc:17
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16