#include <StiKalmanTrackNode.h>

Public Member Functions | |
| StiKalmanTrackNode (const StiKalmanTrackNode &node) | |
| const StiKalmanTrackNode & | operator= (const StiKalmanTrackNode &node) |
| void | reset () |
| Resets the node to a "null" un-used state. | |
| void | unset () |
| void | resetError (double fak=0) |
| Resets errors for refit. | |
| void | initialize (StiHit *h) |
| Initialize this node with the given hit information. | |
| void | initialize (StiDetector *d) |
| void | setState (const StiKalmanTrackNode *node) |
| Sets the Kalman state of this node equal to that of the given node. | |
| void | get (double &alpha, double &xRef, double x[kNPars], double cc[kNErrs], double &chi2) |
| Extract state information from this node. | |
| void | getGlobalRadial (double x[6], double e[15]) |
| Extract state information from this node in Radial representation. | |
| void | getGlobalTpt (float x[6], float e[15]) |
| Extract state information from this node in TPT representation. | |
| int | getCharge () const |
| Get the charge (sign) of the track at this node. | |
| StThreeVectorF | getMomentumF () const |
| Convenience Method that returns the track momentum at this node. | |
| StThreeVectorF | getGlobalMomentumF () const |
| StThreeVector< double > | getMomentum () const |
| StThreeVector< double > | getGlobalMomentum () const |
| void | getMomentum (double p[3], double e[6]=0) const |
| double | getCurvature () const |
| Calculates and returns the tangent of the track pitch angle at this node. | |
| void | setCurvature (double curvature) |
| double | getDipAngle () const |
| double | getTanL () const |
| double | getPt () const |
| Calculates and returns the transverse momentum of the track at this node. | |
| double | getP () const |
| Calculates and returns the momentum of the track at this node. | |
| double | getHz () const |
| double | getField () const |
| double | x_g () const |
| double | y_g () const |
| double | z_g () const |
| void | getXYZ_g (double *xyz) const |
| double | getX () const |
| double | getY () const |
| double | getZ () const |
| double | x () const |
| double | y () const |
| double | z () const |
| double | getRxy () const |
| double | getEta () const |
| double | getSin () const |
| double | getCos () const |
| double | getAlpha () const |
| const double * | hitErrs () const |
| double | getEyy () const |
| double | getEzz () const |
| double | getCyy () const |
| double | getCzz () const |
| double const * | getPars () const |
| double | getDiag (int idx) const |
| int | getHitCount () const |
| int | getNullCount () const |
| int | getContigHitCount () const |
| int | getContigNullCount () const |
| int | incHitCount () |
| int | incNullCount () |
| int | incContigHitCount () |
| int | incContigNullCount () |
| void | setHitCount (char c=0) |
| void | setNullCount (char c=0) |
| void | setContigHitCount (char c=0) |
| void | setContigNullCount (char c=0) |
| double | getTime () const |
| void | setHitCand (int nhits) |
| void | setIHitCand (int ihit) |
| int | getHitCand () const |
| int | getIHitCand () const |
| StThreeVector< double > | getPoint () const |
| StThreeVector< double > | getGlobalPoint () const |
| void | getGlobalMomentum (double p[3], double e[6]=0) const |
| Calculates and returns the momentum and error of the track at this node in global coordinates. | |
| int | isEnded () const |
| int | isDca () const |
| int | propagate (StiKalmanTrackNode *p, const StiDetector *tDet, int dir) |
| Propagates a track encapsulated by the given node "p" to the given detector "tDet". | |
| bool | propagate (const StiKalmanTrackNode *p, StiHit *vertex, int dir) |
| Propagates a track encapsulated by the given node "p" to the given vertex. | |
| bool | propagateToBeam (const StiKalmanTrackNode *p, int dir) |
| int | propagateToRadius (StiKalmanTrackNode *pNode, double radius, int dir) |
| double | evaluateDedx () |
| int | locate () |
| int | propagate (double x, int option, int dir) |
| void | propagateMtx () |
| void | propagateError () |
| void | saveInfo (int kase=1) |
| const StiNodeInf * | getInfo () const |
| int | testError (double *emx, int begend) |
| void | numeDeriv (double val, int kind, int shape=0, int dir=0) |
| int | testDeriv (double *der) |
| void | propagateMCS (StiKalmanTrackNode *previousNode, const StiDetector *tDet) |
| StThreeVector< double > | getPointAt (double xk) const |
| int | nudge (StiHit *hit=0) |
| double | evaluateChi2 (const StiHit *hit) |
| int | updateNode () |
| int | rotate (double alpha) |
| int | getHelicity () const |
| double | getPhase () const |
| double | getPsi () const |
| double | getWindowY () |
| double | getWindowZ () |
| double | pitchAngle () const |
| double | crossAngle () const |
| double | sinCrossAngle () const |
| double | pathlength () const |
| double | pathLToNode (const StiKalmanTrackNode *const oNode) |
| StThreeVectorD * | getLengths (StiKalmanTrackNode *nextNode) |
| double | length (const StThreeVector< double > &delta, double curv) |
| double | getDedx () const |
| StThreeVector< double > | getHelixCenter () const |
| Return center of helix circle in global coordinates. | |
| void | setHitErrors (const StiHit *hit=0) |
| StiHitErrs | getGlobalHitErrs (const StiHit *hit) const |
| double | getX0 () const |
| double | getGasX0 () const |
| double | getDensity () const |
| double | getGasDensity () const |
| void | extend () |
| void | reduce () |
| void | PrintpT (const Char_t *opt="") const |
| int | getFlipFlop () const |
| int | print (const char *opt) const |
| rotation angle of local coordinates wrt global coordinates | |
| const StiNodePars & | fitPars () const |
| StiNodePars & | fitPars () |
| const StiNodeErrs & | fitErrs () const |
| StiNodeErrs & | fitErrs () |
| const StiNodePars & | mPP () const |
| StiNodePars & | mPP () |
| const StiNodeErrs & | mPE () const |
| StiNodeErrs & | mPE () |
| const StiNodeMtx & | mMtx () const |
| StiNodeMtx & | mMtx () |
| const StiNode2Pars & | unTouched () const |
| void | setUntouched () |
Static Public Member Functions | |
| static double | mcs2 (double relRadThickness, double beta2, double p2) |
| static void | Break (int kase) |
| static void | PrintStep () |
| static double | nice (double angle) |
| static Int_t | debug () |
| static void | setDebug (Int_t m) |
| static void | SetLaser (Int_t m) |
| static Int_t | IsLaser () |
| static void | ResetComment (const Char_t *m="") |
| static const Char_t * | Comment () |
Public Attributes | |
| int | mId |
Protected Attributes | |
| char | _beg [1] |
| double | _alpha |
| double | mHz |
| Z mag field in units PGev = Hz*Rcm. | |
| StiNodePars | mFP |
| StiNodeErrs | mFE |
| covariance matrix of the track parameters | |
| StiNode2Pars | mUnTouch |
| StiHitErrs | mHrr |
| char | hitCount |
| char | nullCount |
| char | contiguousHitCount |
| char | contiguousNullCount |
| char | mFlipFlop |
| char | mHitCand |
| char | mIHitCand |
| char | _end [1] |
| StiNodeExt * | _ext |
| StiNodeInf * | _inf |
Static Protected Attributes | |
| static StiNodeStat | mgP |
| static bool | useCalculatedHitError = true |
| static int | fDerivTestOn = -10 |
| static double | fDerivTest [kNPars][kNPars] |
| static int | _debug = 0 |
| static TString | comment |
| static TString | commentdEdx |
| static int | _laser = 0 |
Friends | |
| class | StiTrackNodeHelper |
| ostream & | operator<< (ostream &os, const StiKalmanTrackNode &n) |
Definition at line 76 of file StiKalmanTrackNode.h.
| double StiKalmanTrackNode::evaluateChi2 | ( | const StiHit * | hit | ) |
Calculate the increment of chi2 caused by the addition of this node to the track.
Uses the track extrapolation to "_x", and hit position to evaluate and return the increment to the track chi2. The chi2 is not stored internally in this node.
Definition at line 1274 of file StiKalmanTrackNode.cxx.
References mFE, and StiHit::x().
Referenced by StiKalmanTrack::extendToVertex(), and StiKalmanTrackFitter::fit().
| double StiKalmanTrackNode::evaluateDedx | ( | ) |
Evaluates, stores and returns the dedx associated with this node. Possible returned values are: > 0 : value of dedx -1 : pathlength was invalid or less than "0" -2 : no hit is associated with the node. -3 : invalid eloss data for this node.
| void StiKalmanTrackNode::get | ( | double & | alpha, | |
| double & | xRef, | |||
| double | x[kNPars], | |||
| double | e[kNErrs], | |||
| double & | chi2 | |||
| ) |
Extract state information from this node.
returns the node information double& alpha : angle of the local reference frame double& xRef : refence position of this node in the local frame double x[6], : state, for a definition, see the top of this file double cc[21] : error matrix of the state "x" double& chi2) : chi2 of the track at this node
Definition at line 552 of file StiKalmanTrackNode.cxx.
References mFE.
| double StiKalmanTrackNode::getGasX0 | ( | ) | const [inline] |
Return the radiation length (in cm) of the gas surrounding the detector volume at this node.
Definition at line 391 of file StiKalmanTrackNode.h.
Referenced by StiKalmanTrack::getTrackRadLength(), and propagateMCS().
| void StiKalmanTrackNode::getGlobalMomentum | ( | double | p[3], | |
| double | e[6] = 0 | |||
| ) | const |
Calculates and returns the momentum and error of the track at this node in global coordinates.
returns momentum and its error matrix in cartesian coordinates in the _global_ ref frame of the experiment p[0] = px p[1] = py p[2] = pz Use lower triangular matrix e[0] = px-px e[1] = px-py e[2] = py-py e[3] = px-pz e[4] = py-pz e[5] = pz-pz
Definition at line 807 of file StiKalmanTrackNode.cxx.
| StThreeVectorF StiKalmanTrackNode::getGlobalMomentumF | ( | ) | const [inline] |
Convenience Method that returns the track momentum at this node in global coordinates.
Definition at line 345 of file StiKalmanTrackNode.h.
References getMomentumF().
| void StiKalmanTrackNode::getGlobalRadial | ( | double | x[6], | |
| double | e[15] | |||
| ) |
Extract state information from this node in Radial representation.
returns the node information double x[6], : state, for a definition, in radial implementation rad - radius at start (cm). See also comments phi - azimuthal angle (in rad) z - z-coord. (cm) psi - azimuthal angle of pT vector (in rads) tanl - tan(dip) =pz/pt curv - Track curvature (1/cm) double cc[15] : error matrix of the state "x" rad is fixed code definition adopted here, where: PhiPhi; ZPhi ,ZZ; TanlPhi ,TanlZ ,TanlTanl, PsiPhi ,PsiZ ,PsiTanl , PsiPsi , CurvPhi ,CurvZ ,CurvTanl, CurvPsi, CurvCurv
Definition at line 686 of file StiKalmanTrackNode.cxx.
References mFE.
Referenced by getGlobalTpt().
| void StiKalmanTrackNode::getGlobalTpt | ( | float | x[6], | |
| float | e[15] | |||
| ) |
Extract state information from this node in TPT representation.
returns the node information in TPT representation double x[6], : state, for a definition, in radial implementation rad - radius at start (cm). See also comments phi - azimuthal angle (in rad) z - z-coord. (cm) psi - azimuthal angle of pT vector (in rads) tanl - tan(dip) =pz/pt q/pt - double cc[15] : error matrix of the state "x" rad is fixed code definition adopted here, where:
Units ______|________________|____________ phi*R | 0 1 2 3 4 | deg*cm z0 | 1 5 6 7 8 | cm tanl | 2 6 9 10 11 | 1 covar(i) psi | 3 7 10 12 13 | deg q/pt | 4 8 11 13 14 | e*1/(GeV/c) -----------------------------------
and where phi = atan2(y0,x0)*(180 deg/pi) R = sqrt(x0*x0 + y0*y0) q/pt = icharge*invpt; (This is what the radius of curvature actually determines) PhiPhi PhiZ PhiTan PhiPsi PhiPt ZZ ZTan ZPsi ZPt TanTan TanPsi TanPt PsiPsi PsiPt PtPt
Definition at line 755 of file StiKalmanTrackNode.cxx.
References getCharge(), getGlobalRadial(), and getPt().
| double StiKalmanTrackNode::getHz | ( | ) | const |
Calculates and returns the Z mag field in the current point. units: PGeV = Hz*Radcurv_in_CM
Calculate/return the z component of mag field
Calculate/return the z component of mag field
Field is calcualated via StarMagField class and cashed.
Definition at line 592 of file StiKalmanTrackNode.cxx.
References mHz.
Referenced by initialize(), propagate(), propagateMCS(), propagateMtx(), and updateNode().
| void StiKalmanTrackNode::getMomentum | ( | double | p[3], | |
| double | e[6] = 0 | |||
| ) | const |
Calculates and returns the momentum and error of the track at this node. The momentum is in the local reference frame of this node.
Calculate/return track 3-momentum and error.
Calculate the 3-momentum of the track in the local reference frame.
| p[0] | px | outward |
| p[1] | py | along detector plane |
| p[2] | pz | along beam direction |
Definition at line 635 of file StiKalmanTrackNode.cxx.
| double StiKalmanTrackNode::getPhase | ( | ) | const |
This function translates between ITTF helix parameters and StHelixModel phi. It is only used to fill StTrackGeometry. For a StPhysicalHelix, phi must be transformed by -h*pi/2.
Definition at line 777 of file StiKalmanTrackNode.cxx.
Referenced by StiKalmanTrack::getDca(), and StiKalmanTrack::getNearBeam().
| StThreeVector<double> StiKalmanTrackNode::getPointAt | ( | double | xk | ) | const |
Extrapolate the track parameters to radial position "x" and return a point global coordinates along the track at that point.
| double StiKalmanTrackNode::getPt | ( | ) | const |
Calculates and returns the transverse momentum of the track at this node.
Calculate/return the track transverse momentum
Calculate the track transverse momentum in GeV/c based on this node's track parameters.
The momentum is calculated based on the track curvature held by this node. A minimum curvature of 1e-12 is allowed.
Definition at line 574 of file StiKalmanTrackNode.cxx.
Referenced by getGlobalTpt(), getMomentum(), getMomentumF(), getP(), StiKalmanTrack::getPt(), and propagateMCS().
| double StiKalmanTrackNode::getX0 | ( | ) | const [inline] |
Return the radiation length (in cm) of the the detector volume at this node.
Definition at line 381 of file StiKalmanTrackNode.h.
Referenced by StiKalmanTrack::getTrackRadLength(), and propagateMCS().
| double StiKalmanTrackNode::pathlength | ( | ) | const [inline] |
Calculate and returns pathlength within detector volume associated with this node. Returns 0 if no detector is associated.
Definition at line 371 of file StiKalmanTrackNode.h.
Referenced by StiKalmanTrack::getTrackRadLength(), and propagateMCS().
| double StiKalmanTrackNode::pathLToNode | ( | const StiKalmanTrackNode *const | oNode | ) |
Calculate the effect of MCS on the track error matrix.
The track is assumed to propagate from (x0,y0,z0) to (mgP.x1,y1,z1). The calculation is performed for the given mass hypothesis which given a momentum determines the speed "beta" of the particle. The calculation of the average scattering angle is delegated to the function "mcs2". The calculation of energy loss is done by the function eloss.
Calulates length between center of this node and provided node, which is assumed to be on the same helix. Have to use global coords, since nodes may not be in the same detector volume.
Definition at line 1239 of file StiKalmanTrackNode.cxx.
References getCurvature().
Referenced by StiKalmanTrack::getTrackRadLength(), and propagateMCS().
| int StiKalmanTrackNode::propagate | ( | double | xk, | |
| int | option, | |||
| int | dir | |||
| ) |
Work method used to perform the tranport of "this" node from its current "_x" position to the given position "xk". Returns -1 if the propagation cannot be carried out, i.e. if the track curvature is such it cannot reach the desired location. option == 0 Planar option == 1 Cylinder
Definition at line 988 of file StiKalmanTrackNode.cxx.
References getHz().
| bool StiKalmanTrackNode::propagate | ( | const StiKalmanTrackNode * | parentNode, | |
| StiHit * | vertex, | |||
| int | dir | |||
| ) |
Propagates a track encapsulated by the given node "p" to the given vertex.
Propagate the track encapsulated by pNode to the given vertex. Use this node to represent the track parameters at the vertex.
This method propagates the track from the given parent node "pNode" to the given vertex effectively calculating the location (x,y,z) of the track near the given vertex. It use "this" node to represent/hold the track parameters at the vertex. return true when the propagation is successfull and false otherwise.
Definition at line 921 of file StiKalmanTrackNode.cxx.
References propagate(), propagateError(), rotate(), StiHit::rotate(), setState(), and StiHit::x().
| int StiKalmanTrackNode::propagate | ( | StiKalmanTrackNode * | pNode, | |
| const StiDetector * | tDet, | |||
| int | dir | |||
| ) |
Propagates a track encapsulated by the given node "p" to the given detector "tDet".
Steering routine that propagates the track encapsulated by the given node "pNode" to the given detector "tDet".
The propagation involves the following steps.
Currently, propagate can handle kPlanar and kCylindrical geometries only. An exception is thrown if other geometry shape are used.
Definition at line 855 of file StiKalmanTrackNode.cxx.
References getHz(), Named::getName(), propagateError(), propagateMCS(), rotate(), and setState().
Referenced by StiKalmanTrack::extendToVertex(), StiKalmanTrackFitter::fit(), StiKalmanTrack::getMomentumAtOrigin(), propagate(), propagateToBeam(), and propagateToRadius().
| void StiKalmanTrackNode::propagateError | ( | ) |
Propagate the track error matrix
Definition at line 1166 of file StiKalmanTrackNode.cxx.
References mFE, and propagateMtx().
Referenced by propagate(), propagateToBeam(), and propagateToRadius().
| void StiKalmanTrackNode::propagateMCS | ( | StiKalmanTrackNode * | previousNode, | |
| const StiDetector * | tDet | |||
| ) |
Calculate the effect of MCS on the track error matrix.
The track is assumed to propagate from (x0,y0,z0) to (x1,y1,z1). The calculation is performed for the given mass hypothesis which given a momentum determines the speed "beta" of the particle. The calculation of the average scattering angle is delegated to the function "mcs2". The calculation of energy loss is done by the function eloss.
Definition at line 1346 of file StiKalmanTrackNode.cxx.
References getGasX0(), getHz(), getPt(), getX0(), mFE, pathlength(), and pathLToNode().
Referenced by propagate().
| void StiKalmanTrackNode::propagateMtx | ( | ) |
Make propagation matrix
Definition at line 1120 of file StiKalmanTrackNode.cxx.
References getHz().
Referenced by propagateError().
| bool StiKalmanTrackNode::propagateToBeam | ( | const StiKalmanTrackNode * | parentNode, | |
| int | dir | |||
| ) |
Propagate track from the given node to the beam line with x==0. Set the hit and detector pointers to null to manifest this is an extrapolation
Definition at line 945 of file StiKalmanTrackNode.cxx.
References propagate(), propagateError(), and setState().
Referenced by StiKalmanTrack::extrapolateToBeam().
| int StiKalmanTrackNode::propagateToRadius | ( | StiKalmanTrackNode * | pNode, | |
| double | radius, | |||
| int | dir | |||
| ) |
Extrapolate the track defined by the given node to the given radius. Return a negative value if the operation is impossible.
Definition at line 964 of file StiKalmanTrackNode.cxx.
References propagate(), propagateError(), and setState().
| int StiKalmanTrackNode::rotate | ( | double | alpha | ) |
Rotate this node track representation azymuthally by given angle.
This method rotates by an angle alpha the track representation held by this node.
Definition at line 1660 of file StiKalmanTrackNode.cxx.
References mFE.
Referenced by StKFVertexMaker::Make(), and propagate().
| void StiKalmanTrackNode::setState | ( | const StiKalmanTrackNode * | n | ) |
Sets the Kalman state of this node equal to that of the given node.
Set the Kalman state of this node to be identical to that of the given node. This method is useful to initial the state of a node while propagating a track.
Definition at line 530 of file StiKalmanTrackNode.cxx.
References mFE.
Referenced by propagate(), propagateToBeam(), and propagateToRadius().
| int StiKalmanTrackNode::updateNode | ( | ) |
Update the track parameters using this node.
This method uses the hit contained by node to update the track parameters contained by this node and thus complete the propagation of this track to the location x=_x.
Definition at line 1486 of file StiKalmanTrackNode.cxx.
Referenced by StiKalmanTrack::extendToVertex().
| ostream& operator<< | ( | ostream & | os, | |
| const StiKalmanTrackNode & | n | |||
| ) | [friend] |
print to the ostream "os" the parameters of this node and all its children recursively
Definition at line 1709 of file StiKalmanTrackNode.cxx.
1.5.9