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::PositiveSideGhostTrackFitter Class Reference

#include <PositiveSideGhostTrackFitter.h>

Inheritance diagram for reco::PositiveSideGhostTrackFitter:
reco::GhostTrackFitter::FitterImpl

Public Member Functions

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

Private Member Functions

virtual FitterImpl * clone () const
 

Private Attributes

std::auto_ptr
< GhostTrackFitter::FitterImpl
actualFitter_
 
GlobalPoint origin_
 

Detailed Description

Definition at line 16 of file PositiveSideGhostTrackFitter.h.

Constructor & Destructor Documentation

reco::PositiveSideGhostTrackFitter::PositiveSideGhostTrackFitter ( const GlobalPoint origin,
const GhostTrackFitter::FitterImpl actualFitter 
)
inline

Definition at line 18 of file PositiveSideGhostTrackFitter.h.

Referenced by clone().

20  :
21  origin_(origin), actualFitter_(actualFitter.clone()) {}
std::auto_ptr< GhostTrackFitter::FitterImpl > actualFitter_
reco::PositiveSideGhostTrackFitter::~PositiveSideGhostTrackFitter ( )
inline

Definition at line 22 of file PositiveSideGhostTrackFitter.h.

22 {}
reco::PositiveSideGhostTrackFitter::PositiveSideGhostTrackFitter ( const PositiveSideGhostTrackFitter orig)
inline

Definition at line 24 of file PositiveSideGhostTrackFitter.h.

25  :
26  origin_(orig.origin_),
27  actualFitter_(orig.actualFitter_->clone()) {}
std::auto_ptr< GhostTrackFitter::FitterImpl > actualFitter_

Member Function Documentation

virtual FitterImpl* reco::PositiveSideGhostTrackFitter::clone ( void  ) const
inlineprivatevirtual

Implements reco::GhostTrackFitter::FitterImpl.

Definition at line 36 of file PositiveSideGhostTrackFitter.h.

References PositiveSideGhostTrackFitter().

37  { return new PositiveSideGhostTrackFitter(*this); }
PositiveSideGhostTrackFitter(const GlobalPoint &origin, const GhostTrackFitter::FitterImpl &actualFitter)
GhostTrackPrediction PositiveSideGhostTrackFitter::fit ( const GhostTrackFitter::PredictionUpdater updater,
const GhostTrackPrediction prior,
std::vector< GhostTrackState > &  states,
double &  ndof,
double &  chi2 
)
virtual

Implements reco::GhostTrackFitter::FitterImpl.

Definition at line 14 of file PositiveSideGhostTrackFitter.cc.

References actualFitter_, reco::GhostTrackFitter::PredictionUpdater::contribution(), run_regression::done, create_public_lumi_plots::exp, i, reco::GhostTrackState::lambda(), reco::GhostTrackPrediction::lambda(), reco::GhostTrackState::linearize(), min(), origin_, rho, reco::GhostTrackPrediction::rho(), reco::GhostTrackState::setWeight(), histoStyle::weight, and reco::GhostTrackState::weight().

19 {
20  double rho = prior.rho();
21  for(unsigned int i = 0; i < states.size(); i++) {
22  GhostTrackState &state = states[i];
23  state.linearize(prior, true, .5 / rho);
24  }
25 
27  actualFitter_->fit(updater, prior, states, ndof, chi2);
28 
29  double origin = pred.lambda(origin_);
30  bool done = true;
31  for(unsigned int i = 0; i < states.size(); i++) {
32  GhostTrackState &state = states[i];
33  double lambda = state.lambda();
34  if (lambda < origin && (origin - lambda) < 3.5) {
35  GhostTrackState testState = state;
36  testState.linearize(pred, 2. * origin - lambda);
37  double ndof, chi2;
38 
39  updater.contribution(prior, testState, ndof, chi2, true);
40  if (ndof > 0. && chi2 < 10.) {
41  state = testState;
42  if (state.weight() != 1.)
43  state.setWeight(3.);
44  done = false;
45  }
46  }
47  }
48 
49  if (!done) {
50  for(unsigned int i = 0; i < states.size(); i++) {
51  GhostTrackState &state = states[i];
52  double lambda = state.lambda();
53  if (state.weight() != 1. && lambda < origin) {
54  double weight =
55  std::exp(10. * (origin - lambda) - .1);
56  state.setWeight(
57  std::min(state.weight(), weight));
58  }
59  }
60 
61  pred = actualFitter_->fit(updater, prior, states, ndof, chi2);
62  }
63 
64  return pred;
65 }
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< GhostTrackFitter::FitterImpl > actualFitter_
double lambda(const GlobalPoint &point) const
double weight() const
Definition: DDAxes.h:10
void setWeight(double weight)
virtual void contribution(const GhostTrackPrediction &pred, const GhostTrackState &state, double &ndof, double &chi2, bool withPredError=false) const =0
T min(T a, T b)
Definition: MathUtil.h:58
double lambda() const
bool linearize(const GhostTrackPrediction &pred, bool initial=false, double lambda=0.)
int weight
Definition: histoStyle.py:50

Member Data Documentation

std::auto_ptr<GhostTrackFitter::FitterImpl> reco::PositiveSideGhostTrackFitter::actualFitter_
private

Definition at line 40 of file PositiveSideGhostTrackFitter.h.

Referenced by fit().

GlobalPoint reco::PositiveSideGhostTrackFitter::origin_
private

Definition at line 39 of file PositiveSideGhostTrackFitter.h.

Referenced by fit().