StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
StiKalmanTrack Class Reference

Definition of Kalman Track. More...

#include <StiKalmanTrack.h>

Inheritance diagram for StiKalmanTrack:
StiTrack

Public Types

enum  { kAppGud =1, kAppRR =2, kAppUpd = 4, kAppUPD = 8 }
 Modes for calculating approximate track parameters.
 
enum  TRefitStatus {
  kNoErrors = 0, kRefitFail, kNotEnoughUsed, kInNodeNotValid,
  kBadQA, kVertexNodeInvalid, kNodeNotValid, kTooManyDroppedNodes
}
 
- Public Types inherited from StiTrack
enum  StiTrackProperty {
  kCharge =0, kMass, kChi2, kDca2,
  kDca3, kFlag, kPrimaryDca, kPointCount,
  kFitPointCount, kGapCount, kTrackLength, kMaxPointCount,
  kisPrimary, kTpcDedx, kSvtDedx, kCurvature,
  kP, kPt, kRapidity, kPseudoRapidity,
  kPhi, kTanL
}
 

Public Member Functions

 StiKalmanTrack ()
 
virtual ~StiKalmanTrack ()
 
void reset ()
 
void unset ()
 
void getMomentum (double p[3], double e[6]) const
 Calculates and returns the momentum and error of the track. More...
 
double getP () const
 Calculates and returns the momentum of the track at the inner most node. More...
 
double getPt () const
 Calculates and returns the transverse momentum of the track at the inner most node. More...
 
double getCurvature () const
 Return the curvature of the track at its inner most point. More...
 
double getRapidity () const
 Return the rapidity of the track if the mass is known. More...
 
double getPseudoRapidity () const
 Return the pseudorapidity of the track. More...
 
double getPhi () const
 Return azimuthal angle at inner most point of the track. More...
 
double getTanL () const
 Returns the tangent of the dip angle of the track determined at the inner most point of the track. More...
 
double getDca () const
 
virtual double getDca (const StiHit *vertex) const
 Return global dca of the track relative to given vertex or point.
 
void setDca (double dca)
 
double getDca (StiTrack *t) const
 
int combUsed () const
 
void setCombUsed (int comb)
 
int getPointCount (int detectorId=0) const
 Return the number of hits associated with this track. More...
 
int getFitPointCount (int detectorId=0) const
 Returns the number of hits associated and used in the fit of this track. More...
 
void getAllPointCount (int count[1][3], int maxDetId) const
 Returns all the PointCount far all detectors and types of nodes.
 
int getGapCount () const
 Return the number of gaps on this track. More...
 
double getTrackLength () const
 
double getNearBeam (StThreeVectorD *pnt=0, StThreeVectorD *dir=0) const
 
int getMaxPointCount (int detectorId=0) const
 
UShort_t getSeedHitCount () const
 number of hits used to seed the track
 
void setSeedHitCount (UShort_t c)
 
int isPrimary () const
 
void setPrimary (int vertex)
 
double getTrackRadLength () const
 
StiKTNBidirectionalIterator begin () const
 
const StiKTNBidirectionalIteratorend () const
 
StiKTNBidirectionalIterator rbegin () const
 
const StiKTNBidirectionalIteratorrend () const
 
void removeLastNode ()
 
StiKalmanTrackNodegetInnOutMostNode (int inot, int qua) const
 Same for getNNodes(qua) More...
 
StiKalmanTrackNodegetOuterMostNode (int qua=0) const
 Accessor method returns the outer most node associated with the track. More...
 
StiKalmanTrackNodegetInnerMostNode (int qua=0) const
 Accessor method returns the inner most node associated with the track. More...
 
StiKalmanTrackNodegetOuterMostHitNode (int qua=0) const
 Accessor method returns the outer most hit node associated with the track.
 
StiKalmanTrackNodegetInnerMostHitNode (int qua=0) const
 Accessor method returns the inner most hit node associated with the track. More...
 
StiKalmanTrackNodegetInnerMostDetHitNode (int detectorId) const
 
int getNNodes (int qua=0) const
 
int releaseHits (double rMin=0, double rMax=50)
 
StiKalmanTrackNodegetFirstNode () const
 Accessor method returns the first node associated with the track.
 
StiKalmanTrackNodegetLastNode () const
 Accessor method returns the last node associated with the track.
 
void setLastNode (StiKalmanTrackNode *n)
 
void setFirstNode (StiKalmanTrackNode *n)
 
void setFirstLastNode (StiKalmanTrackNode *n)
 
void removeNode (StiKalmanTrackNode *n)
 
virtual void add (StiTrackNode *node, int direction, StiTrackNode *near=0)
 
virtual int initialize (const vector< StiHit * > &)
 Convenience method to initialize a track based on seed information. More...
 
virtual int initialize0 (const std::vector< StiHit * > &hits, StiNodePars *firstPars=0, StiNodePars *lastPars=0, StiNodeErrs *firstErrs=0, StiNodeErrs *lastErrs=0)
 
virtual vector< StiHit * > getHits ()
 
virtual vector< const
StMeasuredPoint * > 
stHits () const
 return hits;
 
virtual vector
< StiKalmanTrackNode * > 
getNodes (int detectorGroupId) const
 return vector of nodes with hits
 
double getMass () const
 
int getCharge () const
 
double getChi2 () const
 
double getChi2Max () const
 Return the maximal node chi2.
 
double getXi2 () const
 
double getDca2 (StiTrack *t) const
 
double getDca3 (StiTrack *t) const
 
int refit ()
 
int refitL ()
 
void reserveHits (int yes=1)
 
StiTrackNodeextendToVertex (StiHit *vertex)
 
void setFlag (int v)
 
int getFlag () const
 
StiKalmanTrackNodeextrapolateToBeam ()
 
StiKalmanTrackNodeextrapolateToRadius (double radius)
 
int approx (int mode=(kAppRR|kAppUPD))
 
void reduce ()
 
void print (const char *opt="") const
 
StiKalmanTrackoperator= (const StiKalmanTrack &tk)
 
int rejectByHitSet () const
 
int idTruth (int *qu=0) const
 
void test (const char *txt="") const
 
- Public Member Functions inherited from StiTrack
virtual int fit (int direction=kOutsideIn)
 
virtual bool find (int direction=kOutsideIn)
 
virtual double getValue (int key) const
 
int getId () const
 
void setId (int id)
 
StiTrackoperator= (const StiTrack &tk)
 

Static Public Member Functions

static void setKalmanTrackNodeFactory (Factory< StiKalmanTrackNode > *)
 Set the factory used for the creation of kalman track nodes. More...
 
static void setMaxRefiter (int maxRefiter)
 
static void setDebug (int d=0)
 
static int debug ()
 
- Static Public Member Functions inherited from StiTrack
static void setTrackFinder (StiTrackFinder *finder)
 
static void setTrackFitter (StiTrackFitter *fitter)
 
static StiTrackFindergetTrackFinder ()
 
static StiTrackFittergetTrackFitter ()
 

Public Attributes

double _vChi2
 

Static Public Attributes

static int _debug = 0
 

Static Protected Member Functions

static double diff (const StiNodePars &p1, const StiNodeErrs &e1, const StiNodePars &p2, const StiNodeErrs &e2, int &igor)
 

Protected Attributes

StiKalmanTrackNodefirstNode
 
StiKalmanTrackNodelastNode
 
UShort_t mSeedHitCount
 
char mCombUsed
 
int mVertex
 
int mFlag
 
double mMass
 
double mXi2
 
double _dca
 
- Protected Attributes inherited from StiTrack
int mId
 
int mIdDb
 

Static Protected Attributes

static StiTrackNodeHelper sTNH
 
static int mgMaxRefiter = 100
 
static Factory
< StiKalmanTrackNode > * 
trackNodeFactory = 0
 
- Static Protected Attributes inherited from StiTrack
static StiTrackFindertrackFinder = 0
 
static StiTrackFittertrackFitter = 0
 

Friends

ostream & operator<< (ostream &os, const StiKalmanTrack &track)
 

Detailed Description

Definition of Kalman Track.

A concrete subclass of StiTrack defining a Kalman track to be used by the Kalman Track Finder.

The track reconstruction is driven by an instance of class StiKalmanTrackFinder while the Kalman state of the track at any given location is held by instances of the StiKalmanTrackNode class. The use of nodes allows, in principle, to have, during the track search, and reconstruction, tracks that behave as trees rather than simple linear or sequential structures.

Users should not invoke the ctor of this class directly but should instead call the "getObject" method of the StiKalmantrackFactory class to get instances of this class. The StiKalmanTrackFactory holds (and owns, i.e. has responsibility for memory management) of a large array of re-usable track objects. Instances of this class should only be obtained from the factory as this eliminates (or at the very least minimizes the risk) of memory leaks.

This class holds a static pointer to a track node factory. The factory is invoked whenever instances of StiTrackNode are needed. The class holds pointers to the fisrt and last node associated with a track. Given that the reconstruction proceeds primarily outside-in, the first node is the outer most point associated with this track. The last node is the inner most point associated with the track.

This class includes a host of convenience methods to calculate track properties such as the number of hits on the track (getPointCount), the track length (getTrackLength), etc. Many of those properties are not stored internally but rather calculated on the fly from the appropriate nodes on the tracks. This offers the advantage that it is not necessary to recalculate these various properties systematically each time a fit or re-fit is performed but once when the information is actually needed.

See Also
StiKalmanTrackNode
StiKalmanTrackFinder
Author
Claude A Pruneau (Wayne State University)

Definition at line 82 of file StiKalmanTrack.h.

Constructor & Destructor Documentation

StiKalmanTrack::StiKalmanTrack ( )
inline

Constructor Delegates the initialization of the object to the reset method. Note that users should not call this ctor directly but should instead invoke to the "getInstance" method of the Factory<StiKalmanTrack> class to get instances of this class. The StiKalmanTrackFactory holds (and owns, i.e. has responsibility for memory management) of a large array of re-usable track objects. Instances of this class should only be obtained from the factory as this eliminates (or at the very least minimizes the risk) of memory leaks.

Definition at line 97 of file StiKalmanTrack.h.

virtual StiKalmanTrack::~StiKalmanTrack ( )
inlinevirtual

Destructor Nothing to be done as instances of this class do not "own" the objects (i.e. nodes) its members point to.

Definition at line 110 of file StiKalmanTrack.h.

Member Function Documentation

void StiKalmanTrack::add ( StiTrackNode node,
int  direction,
StiTrackNode near = 0 
)
virtual

Add a kalman track node to this track as a child to the last node of the track Return the added node

Definition at line 1518 of file StiKalmanTrack.cxx.

Referenced by initialize(), and StKFVertexMaker::Make().

StiKTNBidirectionalIterator StiKalmanTrack::begin ( ) const
inline

Convenience method used to return a track node iterator initialized to the track first node.

Returns
Bidirectional Itertator of KalmanTrackNodes
Exceptions
runtime_error

Definition at line 540 of file StiKalmanTrack.h.

Referenced by StiKalmanTrackFitter::fit(), getAllPointCount(), getChi2(), getChi2Max(), getFitPointCount(), getGapCount(), getInnOutMostNode(), getMaxPointCount(), getNodes(), getPointCount(), getTrackLength(), getTrackRadLength(), refit(), and stHits().

int StiKalmanTrack::combUsed ( ) const
inline

Returns the combinatoric style used in track construction . and set this value.

Definition at line 164 of file StiKalmanTrack.h.

const StiKTNBidirectionalIterator & StiKalmanTrack::end ( ) const
inline

Convenience method used to return a track node iterator initialized to the track last node.

Returns
Bidirectional Itertator of KalmanTrackNodes
Exceptions
runtime_error

Definition at line 555 of file StiKalmanTrack.h.

References StiKTNIterator::end().

Referenced by StiKalmanTrackFitter::fit(), getAllPointCount(), getChi2(), getChi2Max(), getFitPointCount(), getGapCount(), getHits(), getMaxPointCount(), getNodes(), getPointCount(), getTrackRadLength(), and stHits().

StiTrackNode * StiKalmanTrack::extendToVertex ( StiHit vertex)
virtual

Extend track to the given vertex.

Attempt an extension of the track the given vertex.

  1. Get node from node factory.
  2. Reset node.
  3. Propagate the node from given parent node "sNode", to the given vertex using a call to "propagate".
  4. Evaluate the chi2 of the extrapolated if the vertex is added to the track. Done using a call to "evaluateChi2".
  5. If chi2 is less than max allowed "maxChi2ForSelection", update track parameters using the vertex as a measurement and add the vertex to the track as the last node.

Notes

  • Throws logic_error if no node can be obtained from the node factory.
  • The methods "propagate", "evaluateChi2", and "updateNode" may throw runtime_error exceptions which are NOT caught here...

Implements StiTrack.

Definition at line 1352 of file StiKalmanTrack.cxx.

References StiKalmanTrackNode::evaluateChi2(), Factory< Abstract >::free(), getInnerMostHitNode(), getInnerMostNode(), Factory< Abstract >::getInstance(), StiHit::isDca(), StiKalmanTrackNode::propagate(), StiHit::rotate(), and StiKalmanTrackNode::updateNode().

Referenced by StKFVertexMaker::Make().

StiKalmanTrackNode * StiKalmanTrack::extrapolateToBeam ( )

Extrapolate this track to the beam axis (x==0) to provide an estimate of the track location at the beam axis. Returns a null pointer is the operation cannot be completed i.e. the track does not reach the beam axis plane.

Definition at line 1494 of file StiKalmanTrack.cxx.

References Factory< Abstract >::free(), getInnerMostNode(), Factory< Abstract >::getInstance(), and StiKalmanTrackNode::propagateToBeam().

int StiKalmanTrack::getCharge ( ) const
virtual

Return the track sign

Notes

  1. Use the last node and the field.

Implements StiTrack.

Definition at line 807 of file StiKalmanTrack.cxx.

References StiKalmanTrackNode::getCharge(), and getInnerMostNode().

double StiKalmanTrack::getChi2 ( ) const
virtual

Return the track chi2 per dof

The track chi2 is calculated from the incremental chi2 of all nodes carrying a hit that contributed to the fit of the track. Note that a hit is not counted as contributing to the fit if its chi2 exceeds "StiKalmanTrackFitterParameters::instance()->getMaxChi2()" Note that this function returns "-1" if the number of fit points is smaller than 6

Implements StiTrack.

Definition at line 820 of file StiKalmanTrack.cxx.

References begin(), and end().

Referenced by StiKalmanTrackFinder::extendSeeds().

double StiKalmanTrack::getCurvature ( ) const
inlinevirtual

Return the curvature of the track at its inner most point.

Calculates and returns the track curvature at the inner most node held by this track.

Obtains the curvature from the inner most hit node associated with this track.

Implements StiTrack.

Definition at line 411 of file StiKalmanTrack.h.

References StiKalmanTrackNode::getCurvature(), and getInnerMostHitNode().

double StiKalmanTrack::getDca ( ) const
inlinevirtual

Returns the distance of closest approach of this track to the given hit.

See Also
StiHit
Returns
dca in cm.

Calculate and return the distance of closest approach to given hit

Notes

  1. No implementation.
  2. Returns 0

Implements StiTrack.

Definition at line 488 of file StiKalmanTrack.h.

double StiKalmanTrack::getDca ( StiTrack t) const
inline

Returns the distance of closest approach of this track to the give track.

Returns
dca in cm.

Calculate and return the distance of closest approach to given track

Notes

  1. No implementation.
  2. Returns 0

Definition at line 506 of file StiKalmanTrack.h.

double StiKalmanTrack::getDca2 ( StiTrack t) const
inlinevirtual

Calculate and return the distance of closest approach to given track - 2D calc

Notes

  1. No implementation.
  2. Returns 0

Implements StiTrack.

Definition at line 518 of file StiKalmanTrack.h.

double StiKalmanTrack::getDca3 ( StiTrack t) const
inlinevirtual

Calculate and return the distance of closest approach to given track - 3D calc

Notes

  1. No implementation.
  2. Returns 0

Implements StiTrack.

Definition at line 530 of file StiKalmanTrack.h.

int StiKalmanTrack::getFitPointCount ( int  detectorId = 0) const
virtual

Returns the number of hits associated and used in the fit of this track.

Get number of fit points in given detector.

Return the number of hits (points) used in the fit of this track.

Notes

  1. Currently no difference is made between points on the track and fit points on the track.
  2. Call "getPointCount()" to get the count.
Returns
number of hits on this track.

Implements StiTrack.

Definition at line 970 of file StiKalmanTrack.cxx.

References begin(), StiHit::detector(), and end().

Referenced by StiKalmanTrackFinder::extendSeeds().

int StiKalmanTrack::getGapCount ( ) const
virtual

Return the number of gaps on this track.

Return the number of gaps (active layers with no hits) along this track.

Notes

  1. A gap consists of one or multiple contiguous active layers through which this track passes.
  2. There can be gaps on the inside or the outside of the track if no hits are found there.
Returns
number of gaps.

Implements StiTrack.

Definition at line 927 of file StiKalmanTrack.cxx.

References begin(), and end().

Referenced by StiKalmanTrackFinder::find().

vector< StiHit * > StiKalmanTrack::getHits ( )
virtual

Return all the hits associated with this track, including those with a large incremental chi2 that may not contribute to the fit.

Implements StiTrack.

Definition at line 1425 of file StiKalmanTrack.cxx.

References end(), and getLastNode().

StiKalmanTrackNode * StiKalmanTrack::getInnerMostHitNode ( int  qua = 0) const

Accessor method returns the inner most hit node associated with the track.

Return the inner most hit associated with this track.

Notes

  1. Throws logic_error exception if firstNode or lastNode are not defined, or if track has no hit.
  2. Loop through all nodes from begin() to end() (or vice versa if tracking direction is outside-in) and search for node with hit. Return first hit found.
Returns
outer most hit node on this track

Definition at line 1229 of file StiKalmanTrack.cxx.

References getInnOutMostNode().

Referenced by extendToVertex(), getCurvature(), getDca(), getMomentum(), getP(), getPhi(), getPseudoRapidity(), getPt(), getRapidity(), getTanL(), and StKFVertexMaker::Make().

StiKalmanTrackNode * StiKalmanTrack::getInnerMostNode ( int  qua = 0) const
inline

Accessor method returns the inner most node associated with the track.

Accessor method returns the inner most node associated with the track.

Notes

  1. Node returned depends on the direction of tracking.
  2. Return firstNode if tracking was done inside-out, lastNode otherwise.
  3. No check done to determine whether returned value is non null.
Returns
outer most node on this track

Definition at line 594 of file StiKalmanTrack.h.

References getInnOutMostNode().

Referenced by extendToVertex(), extrapolateToBeam(), getCharge(), StKFVertexMaker::Make(), and refit().

StiKalmanTrackNode * StiKalmanTrack::getInnOutMostNode ( int  inot,
int  qua 
) const

Same for getNNodes(qua)

Accessor method returns the inner/outer most node associated with the track. inot: 0=inner, 1=outer; qua : 0=nocheck, 1=with hit inside, 2=chi2 non infinit

Return the inner most hit associated with this track.

Notes

  1. Throws logic_error exception if firstNode or lastNode are not defined, or if track has no hit.
  2. Loop through all nodes from end() to begin() (or vice versa if tracking direction is outside-in) and search for node with hit. Return first hit found.
Returns
inner most hit node on this track
Exceptions
logic_error

Definition at line 1195 of file StiKalmanTrack.cxx.

References begin().

Referenced by StiKalmanTrackFinder::find(), getInnerMostHitNode(), getInnerMostNode(), getOuterMostHitNode(), and getOuterMostNode().

double StiKalmanTrack::getMass ( ) const
inlinevirtual

Return the mass hypothesis used in the resconstruction of this track.

Implements StiTrack.

Definition at line 349 of file StiKalmanTrack.h.

Referenced by getRapidity().

int StiKalmanTrack::getMaxPointCount ( int  detectorId = 0) const
virtual

Returns the maximum number of points that can possibly be on the track given its track parameters, i.e. its position in the detector. The calculation accounts for sublayers that are not active, and nominally active volumes that were turned off or had no data for some reason.

Calculate and return the maximum possible number of hits on this track.

Notes

  1. Iterate through all nodes of this track.
  2. Count active layers.
  3. Use the (y,z) position of the node to determine whether point is on active region of the detector i.e. RDO were functional.
Returns
maximum number of points

Implements StiTrack.

Definition at line 898 of file StiKalmanTrack.cxx.

References begin(), and end().

void StiKalmanTrack::getMomentum ( double  p[3],
double  e[6] 
) const
inlinevirtual

Calculates and returns the momentum and error of the track.

Calculates and returns the momentum and error of the track

This method calculates and returns in the two arrays provided as arguments the 3-momentum and error of the track in Star global coordinates. The 3-momentum is calculated at the inner most point associated with the track. The inner-most point may or may not be the main vertex of the event. Care should thus be exercised while using this method.

The error is calculated (and returned) only if a non null array is passed as a second argument. It is thus possible to get the momentum without a lengthy calculation of the error matrix. The error error matrix corresponds to a full covariance matrix. The definition of the error matrix is described in the introduction of this class definition. Note that the actual calculation of the momentum and associated error is delegated to the track node class and uses the inner most node of the track.

Implements StiTrack.

Definition at line 380 of file StiKalmanTrack.h.

References getInnerMostHitNode().

double StiKalmanTrack::getNearBeam ( StThreeVectorD pnt = 0,
StThreeVectorD dir = 0 
) const

Returns the track length (in centimeters) from the first point to beam line (x=y=0). pnt is the nearest point to beam and dir direction of tracl in this point The main vertex is included in the calculation if associated with the track.

Definition at line 1151 of file StiKalmanTrack.cxx.

References StiKalmanTrackNode::getCurvature(), StiKalmanTrackNode::getPhase(), StHelix::h(), StHelix::moveOrigin(), StHelix::pathLength(), StHelix::period(), and StHelix::phase().

StiKalmanTrackNode * StiKalmanTrack::getOuterMostNode ( int  qua = 0) const
inline

Accessor method returns the outer most node associated with the track.

Accessor method to get the dca.

Note

  1. Not implemented

Accessor method returns the outer most node associated with the track.

Notes

  1. Node returned depends on the direction of tracking.
  2. Return firstNode if tracking was done outside-in, lastNode otherwise.
  3. No check done to determine whether returned value is non null.
Returns
outer most node on this track

Definition at line 580 of file StiKalmanTrack.h.

References getInnOutMostNode().

Referenced by StiKalmanTrackFinder::extendTrack().

double StiKalmanTrack::getP ( ) const
inlinevirtual

Calculates and returns the momentum of the track at the inner most node.

Calculates and returns the momentum of the track at the inner most node held by this track which may or (or not) be the primary vertex.

Implements StiTrack.

Definition at line 392 of file StiKalmanTrack.h.

References getInnerMostHitNode(), and StiKalmanTrackNode::getP().

double StiKalmanTrack::getPhi ( ) const
inlinevirtual

Return azimuthal angle at inner most point of the track.

Returns the azimuthal angle of the track determined at the inner most point of the track hich may or may not be a vertex.

Returns
phi in radian

Implements StiTrack.

Definition at line 464 of file StiKalmanTrack.h.

References getInnerMostHitNode().

int StiKalmanTrack::getPointCount ( int  detectorId = 0) const
virtual

Return the number of hits associated with this track.

Returns the distance of closest approach of this track to the primary vertex

Returns
dca
 Calculate and return the number of hits on this track. 

Notes

  1. Iterate through all nodes of this track.
  2. Count number of hits.
Returns
number of hits.

Implements StiTrack.

Definition at line 868 of file StiKalmanTrack.cxx.

References begin(), and end().

Referenced by StiStEventFiller::fillEvent(), StiKalmanTrackFinder::find(), and StiHftHits::hftHist().

double StiKalmanTrack::getPseudoRapidity ( ) const
inlinevirtual

Return the pseudorapidity of the track.

Returns the pseudo-rapidity of the track.

  1. Obtains the helix pitch angle from the inner most hit node associated with the track.
  2. Calculate/return the pseudo-rapidity using the pitch angle.
Returns
pseudo-rapidity

Implements StiTrack.

Definition at line 450 of file StiKalmanTrack.h.

References getInnerMostHitNode().

double StiKalmanTrack::getPt ( ) const
inlinevirtual

Calculates and returns the transverse momentum of the track at the inner most node.

Calculates and returns the transverse momentum of the track at the inner most node held by this track which may or (or not) be the primary vertex.

Implements StiTrack.

Definition at line 401 of file StiKalmanTrack.h.

References getInnerMostHitNode(), and StiKalmanTrackNode::getPt().

double StiKalmanTrack::getRapidity ( ) const
inlinevirtual

Return the rapidity of the track if the mass is known.

Returns the rapidity of the track if the mass is known.

  1. Obtains the momentum from the inner most hit node associated with the track.
  2. Obtains the mass of this track using the getMass() method. If the mass returned is negative, throws a runtime_error exception.
Exceptions
runtime_error
Returns
rapidity

Implements StiTrack.

Definition at line 427 of file StiKalmanTrack.h.

References getInnerMostHitNode(), and getMass().

double StiKalmanTrack::getTanL ( ) const
inlinevirtual

Returns the tangent of the dip angle of the track determined at the inner most point of the track.

Return tan(lambda) of the particle at the inner most node held by this track which may (or not) be the primary vertex.

Returns
tan(lambda)

Implements StiTrack.

Definition at line 476 of file StiKalmanTrack.h.

References getInnerMostHitNode().

double StiKalmanTrack::getTrackLength ( ) const
virtual

Returns the track length (in centimeters) from the first to the last point on track. The main vertex is included in the calculation if associated with the track.

Calculate and return the track length.

Notes

  1. Using helix track model in global reference frame.
  2. Using only inner most and outer most hits associated with this track.
Returns
tracklength
Exceptions
runtime_error

Implements StiTrack.

Definition at line 1054 of file StiKalmanTrack.cxx.

References begin(), and StiKalmanTrackNode::getCurvature().

Referenced by StiKalmanTrackFinder::find().

double StiKalmanTrack::getTrackRadLength ( ) const

Calculates the radiation length of material crossed by the track.

Definition at line 1093 of file StiKalmanTrack.cxx.

References begin(), end(), StiKalmanTrackNode::getGasX0(), Named::getName(), StiKalmanTrackNode::getX0(), and StiKalmanTrackNode::pathLToNode().

int StiKalmanTrack::initialize ( const vector< StiHit * > &  hits)
virtual

Convenience method to initialize a track based on seed information.

Initialization of this kalman track from external parameters.

This track object is initialized on the basis of parameters determined externally. The parameters consist of the track curvature, the tangent of pitch angle, the origin of the helix, and a vector of hits already associated with the track.

Arguments:

curvature 1/radius of the tack.
tanl tan(pitch angle)
origin origin of the track in global coordinates.
v vector of hits associated with this track.

Algorithm:

  1. Verify that a valid node factory exists.
  2. Use local arrays state and error to add and set all nodes of this track.
  3. Use the same curvature, and tanl for all nodes as supplied in argument list.
  4. Use Unit matrix for error matrix.
  5. Loop over all hits of the input hit vector and create a track node for each.
  6. Paramters of the track node are set according to the y,z of the hits added.
  7. Hits given are transformed in the local coordinates of their detector.

Notes:

  1. Throws a logic_error exception if no track node factory is available.
  2. Throws a logic_error exception if the factory is not a castable to a factory of StiKalmanTrackNode.
  3. Throws a logic error exception if hits do not have a valid pointer to a detector object.

Implements StiTrack.

Definition at line 749 of file StiKalmanTrack.cxx.

References add(), StiHit::detector(), BFactory::Free(), Factory< Abstract >::getInstance(), StiKalmanTrackNode::initialize(), and reset().

int StiKalmanTrack::isPrimary ( ) const
inline

Identifies the track as a primary or secondary track. The track is defined as primary if it contains a primary vertex i.e. if the vertex was included as a point to the track because it had low enough a incremental chi2.

Definition at line 215 of file StiKalmanTrack.h.

int StiKalmanTrack::refit ( )
virtual

Public interface to protected method capable of returning two return values used in this and derived StiCAKalmanTrack classes.

Implements StiTrack.

Definition at line 1555 of file StiKalmanTrack.cxx.

References begin(), getInnerMostNode(), and mgMaxRefiter.

Referenced by StiKalmanTrackFinder::extendTrack(), and StKFVertexMaker::Make().

void StiKalmanTrack::reserveHits ( int  yes = 1)

Declare hits associated with given track as used.

Declare hits on the track ending at "node" as used. This method starts with the last node and seeks the parent of each node recursively. The hit associated with each node (when there is a hit) is set to "used".

Definition at line 1317 of file StiKalmanTrack.cxx.

Referenced by StiKalmanTrackFinder::extendSeeds().

void StiKalmanTrack::reset ( void  )
virtual

Reset the class members to their default state. This method is called by the ctor of the class to initialize the members of the class to an "empty" or null track state. The method must also be called everytime an instance of this class is retrieved from its factory in order to set the first and last nodes to "null" thus guaranteeing that the track object is empty i.e. does not represent any track and is thus ready for a new search and reconstruction.

Implements StiTrack.

Definition at line 687 of file StiKalmanTrack.cxx.

Referenced by initialize().

void StiKalmanTrack::setKalmanTrackNodeFactory ( Factory< StiKalmanTrackNode > *  val)
static

Set the factory used for the creation of kalman track nodes.

Set the factory used for the creation of kalman track nodes.

See Also
StiKalmanTrackNodeFactory

Definition at line 709 of file StiKalmanTrack.cxx.

Member Data Documentation

int StiKalmanTrack::mgMaxRefiter = 100
staticprotected

Two return values can be obtained by calling this protected version of refit(). By default the original value is used in the publicly available refit() of this class while the other is used in derived class StiCAKalmanTrack.

Definition at line 327 of file StiKalmanTrack.h.

Referenced by refit().


The documentation for this class was generated from the following files: