CMS 3D CMS Logo

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 
26 }
27 
29 
31  const GlobalError &priorError,
32  const GlobalVector &direction,
33  double coneRadius,
34  const std::vector<TransientTrack> &tracks) const {
35  GhostTrackPrediction prior(priorPosition, priorError, direction, coneRadius);
36  return fit(prior, priorPosition, tracks);
37 }
38 
40  const GlobalError &priorError,
41  const GlobalVector &direction,
42  const GlobalError &directionError,
43  const std::vector<TransientTrack> &tracks) const {
44  GhostTrackPrediction prior(priorPosition, priorError, direction, directionError);
45  return fit(prior, priorPosition, tracks);
46 }
47 
49  const GlobalPoint &origin,
50  const std::vector<TransientTrack> &tracks) const {
51  double offset = prior.lambda(origin);
52 
53  std::vector<GhostTrackState> states;
54  for (std::vector<TransientTrack>::const_iterator iter = tracks.begin(); iter != tracks.end(); ++iter) {
55  GhostTrackState state(*iter);
56  state.linearize(prior, true, offset);
57  states.push_back(state);
58  }
59 
60  PositiveSideGhostTrackFitter actualFitter(origin, *fitter);
61  return fit(actualFitter, prior, states);
62 }
63 
64 GhostTrack GhostTrackFitter::fit(const GhostTrackPrediction &prior, const std::vector<TransientTrack> &tracks) const {
65  std::vector<GhostTrackState> states;
66  for (std::vector<TransientTrack>::const_iterator iter = tracks.begin(); iter != tracks.end(); ++iter) {
67  GhostTrackState state(*iter);
68  state.linearize(prior, true);
69  states.push_back(state);
70  }
71 
72  return fit(*fitter, prior, states);
73 }
74 
77  const std::vector<GhostTrackState> &states_) const {
78  std::vector<GhostTrackState> states = states_;
79 
80  double ndof, chi2;
81  GhostTrackPrediction pred = fitterImpl.fit(*updater, prior, states, ndof, chi2);
82 
83  GhostTrack result(prior, pred, states, ndof, chi2);
84 
85  return result;
86 }
GhostTrackPrediction.h
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
reco::GhostTrackFitter::fitter
std::unique_ptr< FitterImpl > fitter
Definition: GhostTrackFitter.h:81
VectorUtil.h
GhostTrackFitter.h
reco::KalmanGhostTrackUpdater
Definition: KalmanGhostTrackUpdater.h:11
reco::PositiveSideGhostTrackFitter
Definition: PositiveSideGhostTrackFitter.h:16
KalmanGhostTrackUpdater.h
GhostTrackState.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
TransientTrack.h
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
reco::GhostTrackState
Definition: GhostTrackState.h:21
ndof
Definition: HIMultiTrackSelector.h:49
reco::GhostTrackFitter::updater
std::unique_ptr< PredictionUpdater > updater
Definition: GhostTrackFitter.h:82
reco::GhostTrackFitter::~GhostTrackFitter
virtual ~GhostTrackFitter()
Definition: GhostTrackFitter.cc:28
reco::GhostTrackFitter::FitterImpl
Definition: GhostTrackFitter.h:60
reco::GhostTrackFitter::fit
GhostTrack fit(const GlobalPoint &priorPosition, const GlobalError &priorError, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
Definition: GhostTrackFitter.cc:30
reco::AnnealingGhostTrackFitter
Definition: AnnealingGhostTrackFitter.h:17
reco::GhostTrackFitter::FitterImpl::fit
virtual GhostTrackPrediction fit(const PredictionUpdater &updater, const GhostTrackPrediction &pred, std::vector< GhostTrackState > &states, double &ndof, double &chi2)=0
math::GlobalVector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:28
reco::GhostTrack
Definition: GhostTrack.h:16
GlobalError.h
GlobalErrorBase< double, ErrorMatrixTag >
reco::GhostTrackState::linearize
bool linearize(const GhostTrackPrediction &pred, bool initial=false, double lambda=0.)
Definition: GhostTrackState.h:47
reco::GhostTrackFitter::GhostTrackFitter
GhostTrackFitter()
Definition: GhostTrackFitter.cc:23
GlobalVector.h
AnnealingGhostTrackFitter.h
bookConverter.prior
prior
Definition: bookConverter.py:146
PositiveSideGhostTrackFitter.h
math::GlobalPoint
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
GhostTrack.h
reco::GhostTrackPrediction
Definition: GhostTrackPrediction.h:21
mps_fire.result
result
Definition: mps_fire.py:303
UEAnalysisJets_cfi.coneRadius
coneRadius
Definition: UEAnalysisJets_cfi.py:7
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
GlobalPoint.h