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::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

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.

21  :
23  ndof_(ndof), chi2_(chi2)
24  {}
const GhostTrackPrediction & prior() const
Definition: GhostTrack.h:42
GhostTrackPrediction prior_
Definition: GhostTrack.h:55
const std::vector< GhostTrackState > & states() const
Definition: GhostTrack.h:44
double chi2() const
Definition: GhostTrack.h:46
std::vector< GhostTrackState > states_
Definition: GhostTrack.h:56
GhostTrackPrediction prediction_
Definition: GhostTrack.h:54
const GhostTrackPrediction & prediction() const
Definition: GhostTrack.h:41
double ndof() const
Definition: GhostTrack.h:45
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 
)

Definition at line 29 of file GhostTrack.cc.

References initStates(), reco::GhostTrackPrediction::lambda(), and prediction_.

35  :
36  prediction_(prediction), prior_(prior),
37  ndof_(ndof), chi2_(chi2)
38 {
40  withOrigin ? prediction_.lambda(origin) : 0.);
41 }
double lambda(const GlobalPoint &point) const
GhostTrackPrediction prior_
Definition: GhostTrack.h:55
void initStates(const std::vector< TransientTrack > &tracks, const std::vector< float > &weights, double offset)
Definition: GhostTrack.cc:14
double chi2() const
Definition: GhostTrack.h:46
GhostTrackPrediction prediction_
Definition: GhostTrack.h:54
tuple tracks
Definition: testEve_cfg.py:39
double ndof() const
Definition: GhostTrack.h:45
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 43 of file GhostTrack.cc.

References initStates(), reco::GhostTrackPrediction::lambda(), and prediction_.

48  :
49  prediction_(ghostTrack), prior_(prior),
50  ndof_(ghostTrack.ndof()), chi2_(ghostTrack.chi2())
51 {
53  withOrigin ? prediction_.lambda(origin) : 0.);
54 }
double lambda(const GlobalPoint &point) const
GhostTrackPrediction prior_
Definition: GhostTrack.h:55
void initStates(const std::vector< TransientTrack > &tracks, const std::vector< float > &weights, double offset)
Definition: GhostTrack.cc:14
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:502
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:508
GhostTrackPrediction prediction_
Definition: GhostTrack.h:54
tuple tracks
Definition: testEve_cfg.py:39

Member Function Documentation

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

Definition at line 46 of file GhostTrack.h.

References chi2_.

46 { return chi2_; }
void GhostTrack::initStates ( const std::vector< TransientTrack > &  tracks,
const std::vector< float > &  weights,
double  offset 
)
private

Definition at line 14 of file GhostTrack.cc.

References getDQMSummary::iter, reco::GhostTrackState::linearize(), prediction_, reco::GhostTrackState::setWeight(), states_, and histoStyle::weight.

Referenced by GhostTrack().

16 {
17  std::vector<float>::const_iterator weight = weights.begin();
18  for(std::vector<TransientTrack>::const_iterator iter = tracks.begin();
19  iter != tracks.end(); ++iter) {
20  GhostTrackState state(*iter);
21  state.linearize(prediction_, true, offset);
22  if (weight != weights.end())
23  state.setWeight(*weight++);
24 
25  states_.push_back(state);
26  }
27 }
std::vector< GhostTrackState > states_
Definition: GhostTrack.h:56
GhostTrackPrediction prediction_
Definition: GhostTrack.h:54
tuple tracks
Definition: testEve_cfg.py:39
int weight
Definition: histoStyle.py:50
double reco::GhostTrack::ndof ( ) const
inline

Definition at line 45 of file GhostTrack.h.

References ndof_.

45 { return ndof_; }
reco::GhostTrack::operator Track ( ) const
inline

Definition at line 48 of file GhostTrack.h.

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

48 { return prediction_.track(ndof_, chi2_); }
GhostTrackPrediction prediction_
Definition: GhostTrack.h:54
Track track(double ndof=0., double chi2=0.) const
const GhostTrackPrediction& reco::GhostTrack::prediction ( ) const
inline

Definition at line 41 of file GhostTrack.h.

References prediction_.

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

41 { return prediction_; }
GhostTrackPrediction prediction_
Definition: GhostTrack.h:54
const GhostTrackPrediction& reco::GhostTrack::prior ( ) const
inline

Definition at line 42 of file GhostTrack.h.

References prior_.

42 { return prior_; }
GhostTrackPrediction prior_
Definition: GhostTrack.h:55
const std::vector<GhostTrackState>& reco::GhostTrack::states ( ) const
inline

Definition at line 44 of file GhostTrack.h.

References states_.

44 { return states_; }
std::vector< GhostTrackState > states_
Definition: GhostTrack.h:56

Member Data Documentation

double reco::GhostTrack::chi2_
private

Definition at line 58 of file GhostTrack.h.

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

double reco::GhostTrack::ndof_
private

Definition at line 57 of file GhostTrack.h.

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

GhostTrackPrediction reco::GhostTrack::prediction_
private

Definition at line 54 of file GhostTrack.h.

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

GhostTrackPrediction reco::GhostTrack::prior_
private

Definition at line 55 of file GhostTrack.h.

Referenced by prior().

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

Definition at line 56 of file GhostTrack.h.

Referenced by initStates(), and states().