RecoVertex
GhostTrackFitter
src
GhostTrack.cc
Go to the documentation of this file.
1
#include <vector>
2
3
#include "
DataFormats/GeometryVector/interface/GlobalPoint.h
"
4
#include "
DataFormats/TrackReco/interface/Track.h
"
5
6
#include "
TrackingTools/TransientTrack/interface/TransientTrack.h
"
7
8
#include "
RecoVertex/GhostTrackFitter/interface/GhostTrackPrediction.h
"
9
#include "
RecoVertex/GhostTrackFitter/interface/GhostTrackState.h
"
10
#include "
RecoVertex/GhostTrackFitter/interface/GhostTrack.h
"
11
12
using namespace
reco
;
13
14
void
GhostTrack::initStates
(
const
std::vector<TransientTrack> &
tracks
,
15
const
std::vector<float> &
weights
,
16
double
offset
) {
17
std::vector<float>::const_iterator
weight
=
weights
.begin();
18
for
(std::vector<TransientTrack>::const_iterator iter =
tracks
.begin(); iter !=
tracks
.end(); ++iter) {
19
GhostTrackState
state(*iter);
20
state.
linearize
(
prediction_
,
true
,
offset
);
21
if
(
weight
!=
weights
.end())
22
state.
setWeight
(*
weight
++);
23
24
states_
.push_back(state);
25
}
26
}
27
28
GhostTrack::GhostTrack
(
const
GhostTrackPrediction
&
prior
,
29
const
GhostTrackPrediction
&prediction,
30
const
std::vector<TransientTrack> &
tracks
,
31
double
ndof
,
32
double
chi2
,
33
const
std::vector<float> &
weights
,
34
const
GlobalPoint
&origin,
35
bool
withOrigin)
36
: prediction_(prediction), prior_(
prior
), ndof_(
ndof
), chi2_(
chi2
) {
37
initStates
(
tracks
,
weights
, withOrigin ?
prediction_
.
lambda
(origin) : 0.);
38
}
39
40
GhostTrack::GhostTrack
(
const
Track
&ghostTrack,
41
const
std::vector<TransientTrack> &
tracks
,
42
const
std::vector<float> &
weights
,
43
const
GhostTrackPrediction
&
prior
,
44
const
GlobalPoint
&origin,
45
bool
withOrigin)
46
: prediction_(ghostTrack), prior_(
prior
), ndof_(ghostTrack.
ndof
()), chi2_(ghostTrack.
chi2
()) {
47
initStates
(
tracks
,
weights
, withOrigin ?
prediction_
.
lambda
(origin) : 0.);
48
}
GhostTrackPrediction.h
reco::GhostTrack::states_
std::vector< GhostTrackState > states_
Definition:
GhostTrack.h:55
PDWG_EXOHSCP_cff.tracks
tracks
Definition:
PDWG_EXOHSCP_cff.py:28
HLT_2018_cff.weights
weights
Definition:
HLT_2018_cff.py:87167
reco::GhostTrackState::setWeight
void setWeight(double weight)
Definition:
GhostTrackState.h:64
GhostTrackState.h
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
TransientTrack.h
hltPixelTracks_cff.chi2
chi2
Definition:
hltPixelTracks_cff.py:25
reco::GhostTrack::initStates
void initStates(const std::vector< TransientTrack > &tracks, const std::vector< float > &weights, double offset)
Definition:
GhostTrack.cc:14
reco::GhostTrackState
Definition:
GhostTrackState.h:21
ndof
Definition:
HIMultiTrackSelector.h:49
Track.h
reco::Track
Definition:
Track.h:27
reco::GhostTrackState::linearize
bool linearize(const GhostTrackPrediction &pred, bool initial=false, double lambda=0.)
Definition:
GhostTrackState.h:47
reco::GhostTrack::GhostTrack
GhostTrack(const GhostTrackPrediction &prior, const GhostTrackPrediction &prediction, const std::vector< GhostTrackState > &states, double ndof, double chi2)
Definition:
GhostTrack.h:18
bookConverter.prior
prior
Definition:
bookConverter.py:146
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
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition:
hltrates_dqm_sourceclient-live_cfg.py:78
GlobalPoint.h
weight
Definition:
weight.py:1
reco::GhostTrack::prediction_
GhostTrackPrediction prediction_
Definition:
GhostTrack.h:53
reco::GhostTrackPrediction::lambda
double lambda(const GlobalPoint &point) const
Definition:
GhostTrackPrediction.h:65
Generated for CMSSW Reference Manual by
1.8.16