CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
reco::GhostTrack Class Reference

#include <GhostTrack.h>

Public Member Functions

double chi2 () const
 
 GhostTrack (const GhostTrackPrediction &prior, const GhostTrackPrediction &prediction, const std::vector< GhostTrackState > &states, double ndof, double chi2)
 
 GhostTrack (const GhostTrackPrediction &prior, const GhostTrackPrediction &prediction, const std::vector< TransientTrack > &tracks, double ndof, double chi2, const std::vector< float > &weights=std::vector< float >(), const GlobalPoint &origin=GlobalPoint(), bool withOrigin=false)
 
 GhostTrack (const Track &ghostTrack, const std::vector< TransientTrack > &tracks, const std::vector< float > &weights=std::vector< float >(), const GhostTrackPrediction &prior=GhostTrackPrediction(), const GlobalPoint &origin=GlobalPoint(), bool withOrigin=false)
 
double ndof () const
 
 operator Track () const
 
const GhostTrackPredictionprediction () const
 
const GhostTrackPredictionprior () const
 
const std::vector< GhostTrackState > & states () const
 

Private Member Functions

void initStates (const std::vector< TransientTrack > &tracks, const std::vector< float > &weights, double offset)
 

Private Attributes

double chi2_
 
double ndof_
 
GhostTrackPrediction prediction_
 
GhostTrackPrediction prior_
 
std::vector< GhostTrackStatestates_
 

Detailed Description

Definition at line 16 of file GhostTrack.h.

Constructor & Destructor Documentation

◆ GhostTrack() [1/3]

reco::GhostTrack::GhostTrack ( const GhostTrackPrediction prior,
const GhostTrackPrediction prediction,
const std::vector< GhostTrackState > &  states,
double  ndof,
double  chi2 
)
inline

Definition at line 18 of file GhostTrack.h.

◆ GhostTrack() [2/3]

GhostTrack::GhostTrack ( const GhostTrackPrediction prior,
const GhostTrackPrediction prediction,
const std::vector< TransientTrack > &  tracks,
double  ndof,
double  chi2,
const std::vector< float > &  weights = std::vector<float>(),
const GlobalPoint origin = GlobalPoint(),
bool  withOrigin = false 
)

◆ GhostTrack() [3/3]

GhostTrack::GhostTrack ( const Track ghostTrack,
const std::vector< TransientTrack > &  tracks,
const std::vector< float > &  weights = std::vector<float>(),
const GhostTrackPrediction prior = GhostTrackPrediction(),
const GlobalPoint origin = GlobalPoint(),
bool  withOrigin = false 
)

Definition at line 40 of file GhostTrack.cc.

46  : prediction_(ghostTrack), prior_(prior), ndof_(ghostTrack.ndof()), chi2_(ghostTrack.chi2()) {
47  initStates(tracks, weights, withOrigin ? prediction_.lambda(origin) : 0.);
48 }

References initStates(), reco::GhostTrackPrediction::lambda(), prediction_, PDWG_EXOHSCP_cff::tracks, and HLT_2018_cff::weights.

Member Function Documentation

◆ chi2()

double reco::GhostTrack::chi2 ( void  ) const
inline

Definition at line 46 of file GhostTrack.h.

46 { return chi2_; }

References chi2_.

◆ initStates()

void GhostTrack::initStates ( const std::vector< TransientTrack > &  tracks,
const std::vector< float > &  weights,
double  offset 
)
private

Definition at line 14 of file GhostTrack.cc.

16  {
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 }

References reco::GhostTrackState::linearize(), hltrates_dqm_sourceclient-live_cfg::offset, prediction_, reco::GhostTrackState::setWeight(), states_, PDWG_EXOHSCP_cff::tracks, and HLT_2018_cff::weights.

Referenced by GhostTrack().

◆ ndof()

double reco::GhostTrack::ndof ( void  ) const
inline

Definition at line 45 of file GhostTrack.h.

45 { return ndof_; }

References ndof_.

◆ operator Track()

reco::GhostTrack::operator Track ( ) const
inline

Definition at line 48 of file GhostTrack.h.

48 { return prediction_.track(ndof_, chi2_); }

References chi2_, ndof_, prediction_, and reco::GhostTrackPrediction::track().

◆ prediction()

const GhostTrackPrediction& reco::GhostTrack::prediction ( ) const
inline

Definition at line 41 of file GhostTrack.h.

41 { return prediction_; }

References prediction_.

Referenced by reco::GhostTrackVertexFinder::vertices().

◆ prior()

const GhostTrackPrediction& reco::GhostTrack::prior ( ) const
inline

Definition at line 42 of file GhostTrack.h.

42 { return prior_; }

References prior_.

◆ states()

const std::vector<GhostTrackState>& reco::GhostTrack::states ( ) const
inline

Definition at line 44 of file GhostTrack.h.

44 { return states_; }

References states_.

Member Data Documentation

◆ chi2_

double reco::GhostTrack::chi2_
private

Definition at line 57 of file GhostTrack.h.

Referenced by chi2(), and operator Track().

◆ ndof_

double reco::GhostTrack::ndof_
private

Definition at line 56 of file GhostTrack.h.

Referenced by ndof(), and operator Track().

◆ prediction_

GhostTrackPrediction reco::GhostTrack::prediction_
private

Definition at line 53 of file GhostTrack.h.

Referenced by GhostTrack(), initStates(), operator Track(), and prediction().

◆ prior_

GhostTrackPrediction reco::GhostTrack::prior_
private

Definition at line 54 of file GhostTrack.h.

Referenced by prior().

◆ states_

std::vector<GhostTrackState> reco::GhostTrack::states_
private

Definition at line 55 of file GhostTrack.h.

Referenced by initStates(), and states().

reco::GhostTrack::prior_
GhostTrackPrediction prior_
Definition: GhostTrack.h:54
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::GhostTrack::states
const std::vector< GhostTrackState > & states() const
Definition: GhostTrack.h:44
reco::GhostTrack::ndof
double ndof() const
Definition: GhostTrack.h:45
reco::TrackBase::ndof
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:575
reco::GhostTrackPrediction::track
Track track(double ndof=0., double chi2=0.) const
Definition: GhostTrackPrediction.cc:189
reco::GhostTrack::chi2_
double chi2_
Definition: GhostTrack.h:57
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
reco::GhostTrack::prediction
const GhostTrackPrediction & prediction() const
Definition: GhostTrack.h:41
reco::GhostTrack::chi2
double chi2() const
Definition: GhostTrack.h:46
reco::GhostTrack::ndof_
double ndof_
Definition: GhostTrack.h:56
reco::TrackBase::chi2
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:572
reco::GhostTrack::prior
const GhostTrackPrediction & prior() const
Definition: GhostTrack.h:42
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
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