CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes

reco::GsfTrack Class Reference

#include <GsfTrack.h>

Inheritance diagram for reco::GsfTrack:
reco::Track reco::TrackBase reco::GsfTransientTrack

List of all members.

Public Types

enum  { dimensionMode = 3 }
 

parameter dimension mode

More...
enum  { covarianceSizeMode = dimensionMode * ( dimensionMode + 1 ) / 2 }
 

error matrix size mode

More...
typedef math::Error
< dimensionMode >::type 
CovarianceMatrixMode
 3 parameter covariance matrix (momentum part) from mode
typedef math::Vector
< dimensionMode >::type 
ParameterVectorMode
 parameter vector (momentum part) from mode

Public Member Functions

int chargeMode () const
 track electric charge from mode
CovarianceMatrixMode covarianceMode () const
 return track covariance matrix from mode
double covarianceMode (int i, int j) const
 (i,j)-th element of covarianve matrix ( i, j = 0, ... 2 ) from mode
double errorMode (int i) const
 error on specified element from mode
double etaMode () const
 pseudorapidity of momentum vector from mode
double etaModeError () const
 error on eta from mode
const GsfTrackExtraRefgsfExtra () const
 reference to "extra" object
 GsfTrack (double chi2, double ndof, const Point &, const Vector &, int charge, const CovarianceMatrix &)
 GsfTrack ()
 default constructor
double lambdaMode () const
 Lambda angle from mode.
double lambdaModeError () const
 error on lambda from mode
const VectormomentumMode () const
 track momentum vector from mode
double parameterMode (int i) const
 i-th parameter ( i = 0, ... 2 ) from mode
ParameterVectorMode parametersMode () const
 Track parameters with one-to-one correspondence to the covariance matrix from mode.
double phiMode () const
 azimuthal angle of momentum vector from mode
double phiModeError () const
 error on phi from mode
double pMode () const
 momentum vector magnitude from mode
double ptMode () const
 track transverse momentum from mode
double ptModeError () const
 error on Pt (set to 1000 TeV if charge==0 for safety) from mode
double pxMode () const
 x coordinate of momentum vector from mode
double pyMode () const
 y coordinate of momentum vector from mode
double pzMode () const
 z coordinate of momentum vector from mode
double qoverpMode () const
 q/p from mode
double qoverpModeError () const
 error on signed transverse curvature from mode
void setGsfExtra (const GsfTrackExtraRef &ref)
 set reference to GSF "extra" object
void setMode (int chargeMode, const Vector &momentumMode, const CovarianceMatrixMode &covarianceMode)
 set mode parameters
double thetaMode () const
 polar angle from mode
double thetaModeError () const
 error on theta from mode

Private Member Functions

CovarianceMatrixModefill (CovarianceMatrixMode &v) const
 fill 3x3 SMatrix

Private Attributes

char chargeMode_
 electric charge from mode
float covarianceMode_ [covarianceSizeMode]
 3x3 momentum part of covariance (in q/p, lambda, phi)
GsfTrackExtraRef gsfExtra_
 reference to GSF "extra" extension
Vector momentumMode_
 momentum vector from mode

Detailed Description

Definition at line 11 of file GsfTrack.h.


Member Typedef Documentation

3 parameter covariance matrix (momentum part) from mode

Definition at line 20 of file GsfTrack.h.

parameter vector (momentum part) from mode

Definition at line 18 of file GsfTrack.h.


Member Enumeration Documentation

anonymous enum

parameter dimension mode

Enumerator:
dimensionMode 

Definition at line 14 of file GsfTrack.h.

{ dimensionMode = 3 };
anonymous enum

error matrix size mode

Enumerator:
covarianceSizeMode 

Definition at line 16 of file GsfTrack.h.


Constructor & Destructor Documentation

GsfTrack::GsfTrack ( )

default constructor

Definition at line 4 of file GsfTrack.cc.

References chargeMode_, covarianceMode_, dimensionMode, i, UserOptions_cff::idx, j, and momentumMode_.

{
  chargeMode_ = 0;
  momentumMode_ = Vector(0.,0.,0.);
  typedef unsigned int index;
  index idx = 0;
  for( index i = 0; i < dimensionMode; ++ i )
    for( index j = 0; j <= i; ++ j )
      covarianceMode_[ idx ++ ] = 0.;  
}
GsfTrack::GsfTrack ( double  chi2,
double  ndof,
const Point vertex,
const Vector momentum,
int  charge,
const CovarianceMatrix cov 
)

constructor from fit parameters and error matrix notice that the reference point must be the point of closest approch to the beamline.

Definition at line 15 of file GsfTrack.cc.

References covarianceMode_, dimensionMode, i, UserOptions_cff::idx, and j.

                                                   :
  Track( chi2, ndof, vertex, momentum, charge, cov ),
  chargeMode_(charge), momentumMode_(momentum) {
  typedef unsigned int index;
  index idx = 0;
  for( index i = 0; i < dimensionMode; ++ i )
    for( index j = 0; j <= i; ++ j )
      covarianceMode_[ idx ++ ] = cov(i,j);
}

Member Function Documentation

int reco::GsfTrack::chargeMode ( ) const [inline]

track electric charge from mode

Definition at line 38 of file GsfTrack.h.

References chargeMode_.

Referenced by ptModeError(), qoverpMode(), and setMode().

{ return chargeMode_; }
CovarianceMatrixMode reco::GsfTrack::covarianceMode ( ) const [inline]

return track covariance matrix from mode

Definition at line 68 of file GsfTrack.h.

References fill(), and m.

Referenced by ptModeError(), and setMode().

{ CovarianceMatrixMode m; fill( m ); return m; }
double reco::GsfTrack::covarianceMode ( int  i,
int  j 
) const [inline]

(i,j)-th element of covarianve matrix ( i, j = 0, ... 2 ) from mode

Definition at line 73 of file GsfTrack.h.

References covarianceMode_, and reco::TrackBase::covIndex().

{ return covarianceMode_[ covIndex( i, j ) ]; }
double reco::GsfTrack::errorMode ( int  i) const [inline]

error on specified element from mode

Definition at line 75 of file GsfTrack.h.

References covarianceMode_, reco::TrackBase::covIndex(), and mathSSE::sqrt().

Referenced by etaModeError(), lambdaModeError(), phiModeError(), qoverpModeError(), and thetaModeError().

{ return sqrt( covarianceMode_[ covIndex( i, i ) ] ); }
double reco::GsfTrack::etaMode ( ) const [inline]

pseudorapidity of momentum vector from mode

Definition at line 58 of file GsfTrack.h.

References momentumMode_.

Referenced by PFElecTkProducer::applySelection().

{ return momentumMode_.Eta(); }
double reco::GsfTrack::etaModeError ( ) const [inline]

error on eta from mode

Definition at line 91 of file GsfTrack.h.

References errorMode(), reco::TrackBase::i_lambda, pMode(), and ptMode().

{ return errorMode( i_lambda ) * pMode()/ptMode(); }
GsfTrack::CovarianceMatrixMode & GsfTrack::fill ( CovarianceMatrixMode v) const [private]

fill 3x3 SMatrix

Reimplemented from reco::TrackBase.

Definition at line 40 of file GsfTrack.cc.

References covarianceMode_, dimensionMode, i, UserOptions_cff::idx, j, and v.

Referenced by covarianceMode().

{
  typedef unsigned int index;
  index idx = 0;
  for( index i = 0; i < dimensionMode; ++ i ) 
    for( index j = 0; j <= i; ++ j )
      v( i, j ) = covarianceMode_[ idx ++ ];
  return v;
}
const GsfTrackExtraRef& reco::GsfTrack::gsfExtra ( ) const [inline]
double reco::GsfTrack::lambdaMode ( ) const [inline]

Lambda angle from mode.

Definition at line 44 of file GsfTrack.h.

References M_PI, and momentumMode_.

Referenced by MuonTrackValidator::getRecoMomentum(), MTVHistoProducerAlgoForTracker::getRecoMomentum(), and parametersMode().

{ return M_PI/2 - momentumMode_.theta(); }
double reco::GsfTrack::lambdaModeError ( ) const [inline]

error on lambda from mode

Definition at line 89 of file GsfTrack.h.

References errorMode(), and reco::TrackBase::i_lambda.

Referenced by MuonTrackValidator::getRecoMomentum(), and MTVHistoProducerAlgoForTracker::getRecoMomentum().

{ return errorMode( i_lambda ); }
const Vector& reco::GsfTrack::momentumMode ( ) const [inline]

track momentum vector from mode

Definition at line 61 of file GsfTrack.h.

References momentumMode_.

Referenced by setMode().

{ return momentumMode_; }
double reco::GsfTrack::parameterMode ( int  i) const [inline]

i-th parameter ( i = 0, ... 2 ) from mode

Definition at line 71 of file GsfTrack.h.

References i, and parametersMode().

{ return parametersMode()[i]; }
ParameterVectorMode reco::GsfTrack::parametersMode ( ) const [inline]

Track parameters with one-to-one correspondence to the covariance matrix from mode.

Definition at line 64 of file GsfTrack.h.

References lambdaMode(), phiMode(), and qoverpMode().

Referenced by parameterMode().

double reco::GsfTrack::phiMode ( ) const [inline]

azimuthal angle of momentum vector from mode

Definition at line 56 of file GsfTrack.h.

References momentumMode_.

Referenced by PFElecTkProducer::applySelection(), MuonTrackValidator::getRecoMomentum(), MTVHistoProducerAlgoForTracker::getRecoMomentum(), and parametersMode().

{ return momentumMode_.Phi(); }
double reco::GsfTrack::phiModeError ( ) const [inline]

error on phi from mode

Definition at line 93 of file GsfTrack.h.

References errorMode(), and reco::TrackBase::i_phi.

Referenced by MuonTrackValidator::getRecoMomentum(), and MTVHistoProducerAlgoForTracker::getRecoMomentum().

{ return errorMode( i_phi ); }
double reco::GsfTrack::pMode ( ) const [inline]

momentum vector magnitude from mode

Definition at line 46 of file GsfTrack.h.

References momentumMode_.

Referenced by PFTrackTransformer::addPointsAndBrems(), etaModeError(), ptModeError(), and qoverpMode().

{ return momentumMode_.R(); }
double reco::GsfTrack::ptMode ( ) const [inline]
double reco::GsfTrack::ptModeError ( ) const [inline]
double reco::GsfTrack::pxMode ( ) const [inline]

x coordinate of momentum vector from mode

Definition at line 50 of file GsfTrack.h.

References momentumMode_.

Referenced by PFTrackTransformer::addPointsAndBrems().

{ return momentumMode_.x(); }
double reco::GsfTrack::pyMode ( ) const [inline]

y coordinate of momentum vector from mode

Definition at line 52 of file GsfTrack.h.

References momentumMode_.

Referenced by PFTrackTransformer::addPointsAndBrems().

{ return momentumMode_.y(); }
double reco::GsfTrack::pzMode ( ) const [inline]

z coordinate of momentum vector from mode

Definition at line 54 of file GsfTrack.h.

References momentumMode_.

Referenced by PFTrackTransformer::addPointsAndBrems(), and ptModeError().

{ return momentumMode_.z(); }
double reco::GsfTrack::qoverpMode ( ) const [inline]

q/p from mode

Definition at line 40 of file GsfTrack.h.

References chargeMode(), and pMode().

Referenced by MuonTrackValidator::getRecoMomentum(), MTVHistoProducerAlgoForTracker::getRecoMomentum(), and parametersMode().

{ return chargeMode() / pMode(); }
double reco::GsfTrack::qoverpModeError ( ) const [inline]

error on signed transverse curvature from mode

Definition at line 78 of file GsfTrack.h.

References errorMode(), and reco::TrackBase::i_qoverp.

Referenced by MuonTrackValidator::getRecoMomentum(), and MTVHistoProducerAlgoForTracker::getRecoMomentum().

{ return errorMode( i_qoverp ); }
void reco::GsfTrack::setGsfExtra ( const GsfTrackExtraRef ref) [inline]

set reference to GSF "extra" object

Definition at line 29 of file GsfTrack.h.

References gsfExtra_.

Referenced by helper::GsfElectronCollectionStoreManager::cloneAndStore(), and GsfTrackProducerBase::putInEvt().

{ gsfExtra_ = ref; }
void GsfTrack::setMode ( int  chargeMode,
const Vector momentumMode,
const CovarianceMatrixMode covarianceMode 
)

set mode parameters

Definition at line 27 of file GsfTrack.cc.

References chargeMode(), chargeMode_, covarianceMode(), covarianceMode_, dimensionMode, i, UserOptions_cff::idx, j, momentumMode(), and momentumMode_.

Referenced by GsfTrackProducerBase::fillMode().

{
  chargeMode_ = chargeMode;
  momentumMode_ = momentumMode;
  typedef unsigned int index;
  index idx = 0;
  for( index i = 0; i < dimensionMode; ++ i )
    for( index j = 0; j <= i; ++ j )
      covarianceMode_[ idx ++ ] = covarianceMode(i,j);
}
double reco::GsfTrack::thetaMode ( ) const [inline]

polar angle from mode

Definition at line 42 of file GsfTrack.h.

References momentumMode_.

{ return momentumMode_.theta(); }
double reco::GsfTrack::thetaModeError ( ) const [inline]

error on theta from mode

Definition at line 87 of file GsfTrack.h.

References errorMode(), and reco::TrackBase::i_lambda.

{ return errorMode( i_lambda ); }

Member Data Documentation

electric charge from mode

Definition at line 104 of file GsfTrack.h.

Referenced by chargeMode(), GsfTrack(), and setMode().

float reco::GsfTrack::covarianceMode_[covarianceSizeMode] [private]

3x3 momentum part of covariance (in q/p, lambda, phi)

Definition at line 108 of file GsfTrack.h.

Referenced by covarianceMode(), errorMode(), fill(), GsfTrack(), and setMode().

reference to GSF "extra" extension

Definition at line 102 of file GsfTrack.h.

Referenced by gsfExtra(), and setGsfExtra().

momentum vector from mode

Definition at line 106 of file GsfTrack.h.

Referenced by etaMode(), GsfTrack(), lambdaMode(), momentumMode(), phiMode(), pMode(), ptMode(), pxMode(), pyMode(), pzMode(), setMode(), and thetaMode().