CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GhostTrackFitter.cc
Go to the documentation of this file.
1 #include <memory>
2 #include <vector>
3 
8 
10 
14 
16 
20 
21 using namespace reco;
22 
24 {
27 }
28 
30 {
31 }
32 
34  const GlobalPoint &priorPosition,
35  const GlobalError &priorError,
36  const GlobalVector &direction,
37  double coneRadius,
38  const std::vector<TransientTrack> &tracks) const
39 {
40  GhostTrackPrediction prior(priorPosition, priorError,
41  direction, coneRadius);
42  return fit(prior, priorPosition, tracks);
43 }
44 
46  const GlobalPoint &priorPosition,
47  const GlobalError &priorError,
48  const GlobalVector &direction,
49  const GlobalError &directionError,
50  const std::vector<TransientTrack> &tracks) const
51 {
52  GhostTrackPrediction prior(priorPosition, priorError,
53  direction, directionError);
54  return fit(prior, priorPosition, tracks);
55 }
56 
59  const GlobalPoint &origin,
60  const std::vector<TransientTrack> &tracks) const
61 {
62  double offset = prior.lambda(origin);
63 
64  std::vector<GhostTrackState> states;
65  for(std::vector<TransientTrack>::const_iterator iter = tracks.begin();
66  iter != tracks.end(); ++iter) {
67  GhostTrackState state(*iter);
68  state.linearize(prior, true, offset);
69  states.push_back(state);
70  }
71 
72  PositiveSideGhostTrackFitter actualFitter(origin, *fitter);
73  return fit(actualFitter, prior, states);
74 }
75 
78  const std::vector<TransientTrack> &tracks) const
79 {
80  std::vector<GhostTrackState> states;
81  for(std::vector<TransientTrack>::const_iterator iter = tracks.begin();
82  iter != tracks.end(); ++iter) {
83  GhostTrackState state(*iter);
84  state.linearize(prior, true);
85  states.push_back(state);
86  }
87 
88  return fit(*fitter, prior, states);
89 }
90 
92  FitterImpl &fitterImpl,
94  const std::vector<GhostTrackState> &states_) const
95 {
96  std::vector<GhostTrackState> states = states_;
97 
98  double ndof, chi2;
100  fitterImpl.fit(*updater, prior, states, ndof, chi2);
101 
102  GhostTrack result(prior, pred, states, ndof, chi2);
103 
104  return result;
105 }
double lambda(const GlobalPoint &point) const
std::auto_ptr< FitterImpl > fitter
virtual GhostTrackPrediction fit(const PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states, double &ndof, double &chi2)=0
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
tuple result
Definition: mps_fire.py:84
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:27
tuple tracks
Definition: testEve_cfg.py:39
bool linearize(const GhostTrackPrediction &pred, bool initial=false, double lambda=0.)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:17
dictionary prior
std::auto_ptr< PredictionUpdater > updater