19 #ifndef StiKalmanTrack_H
20 #define StiKalmanTrack_H 1
26 #include "Sti/Base/Factory.h"
27 #include "Sti/StiKTNIterator.h"
28 #include "Sti/StiTrack.h"
29 #include "Sti/StiTrackNodeHelper.h"
31 #include "StThreeVectorD.hh"
32 #include "StMCTruth.h"
79 enum nodeQA {kKeepHit=1,kGoodHit=2};
87 enum { kAppGud =1, kAppRR=2, kAppUpd = 4, kAppUPD = 8 };
115 static void setMaxRefiter(
int maxRefiter);
127 double getPt()
const;
152 void setDca(
double dca);
165 void setCombUsed(
int comb) {mCombUsed = comb&7;}
207 void setSeedHitCount(UShort_t c) {mSeedHitCount=c;}
216 void setPrimary(
int vertex) {mVertex=vertex;}
224 void removeLastNode();
241 int getNNodes(
int qua=0)
const;
242 int releaseHits(
double rMin=0,
double rMax=50);
259 virtual int initialize (
const vector<StiHit*> &);
262 virtual vector<StiHit*>
getHits();
263 virtual vector<const StMeasuredPoint*>
stHits()
const;
264 virtual vector<StiKalmanTrackNode*>
getNodes(
int detectorGroupId)
const;
271 double getXi2 ()
const {
return mXi2;}
284 int approx(
int mode = (kAppRR | kAppUPD));
288 void print(
const char *opt=
"")
const;
289 static void setDebug(
int d = 0) {_debug = d;}
290 static int debug() {
return _debug;}
292 int rejectByHitSet()
const;
293 int idTruth(
int *qu=0)
const;
295 void test(
const char *txt=
"")
const;
333 UShort_t mSeedHitCount;
354 inline void StiKalmanTrack::setFlag(
int v)
359 inline int StiKalmanTrack::getFlag()
const
433 inner->getMomentum(p,0);
436 double e = ::sqrt(mass*mass+p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);
438 return 0.5*::log(e+p[2]/e-p[2]);
456 return -::log(tanTheta);
468 return atan2(p[1],p[0]);
493 inline void StiKalmanTrack::setDca(
double dca)
543 return StiKTNBidirectionalIterator::begin(firstNode);
548 return StiKTNBidirectionalIterator::rbegin(lastNode);
561 return StiKTNBidirectionalIterator::rend();
StiKalmanTrackNode * getInnOutMostNode(int inot, int qua) const
Same for getNNodes(qua)
static const StiKTNIterator & end()
We demarcate the end of the traversal via a singular iterator.
StiKalmanTrackNode * getFirstNode() const
Accessor method returns the first node associated with the track.
StiKalmanTrackNode * getInnerMostHitNode(int qua=0) const
Accessor method returns the inner most hit node associated with the track.
Definition of Kalman Track.
double getP() const
Calculates and returns the momentum of the track at this node.
double getNearBeam(StThreeVectorD *pnt=0, StThreeVectorD *dir=0) const
double getTrackRadLength() const
double getDca2(StiTrack *t) const
StiKalmanTrackNode * getOuterMostHitNode(int qua=0) const
Accessor method returns the outer most hit node associated with the track.
int getMaxPointCount(int detectorId=0) const
Abstract definition of a Track.
StiTrackNode * extendToVertex(StiHit *vertex)
int getGapCount() const
Return the number of gaps on this track.
StiKalmanTrackNode * getLastNode() const
Accessor method returns the last node associated with the track.
void getAllPointCount(int count[1][3], int maxDetId) const
Returns all the PointCount far all detectors and types of nodes.
StiKalmanTrackNode * getOuterMostNode(int qua=0) const
Accessor method returns the outer most node associated with the track.
virtual vector< StiHit * > getHits()
void reserveHits(int yes=1)
virtual ~StiKalmanTrack()
virtual vector< StiKalmanTrackNode * > getNodes(int detectorGroupId) const
return vector of nodes with hits
double getTanL() const
Returns the tangent of the dip angle of the track determined at the inner most point of the track...
double getP() const
Calculates and returns the momentum of the track at the inner most node.
int getFitPointCount(int detectorId=0) const
Returns the number of hits associated and used in the fit of this track.
double getPt() const
Calculates and returns the transverse momentum of the track at this node.
StiKalmanTrackNode * getInnerMostNode(int qua=0) const
Accessor method returns the inner most node associated with the track.
double getChi2Max() const
Return the maximal node chi2.
int getPointCount(int detectorId=0) const
Return the number of hits associated with this track.
double getCurvature() const
Return the curvature of the track at its inner most point.
double getPseudoRapidity() const
Return the pseudorapidity of the track.
virtual int initialize(const vector< StiHit * > &)
Convenience method to initialize a track based on seed information.
StiKalmanTrackNode * extrapolateToBeam()
UShort_t getSeedHitCount() const
number of hits used to seed the track
double getPhi() const
Return azimuthal angle at inner most point of the track.
const StiKTNBidirectionalIterator & end() const
virtual vector< const StMeasuredPoint * > stHits() const
return hits;
double getTrackLength() const
double getRapidity() const
Return the rapidity of the track if the mass is known.
double getCurvature() const
Calculates and returns the tangent of the track pitch angle at this node.
void getMomentum(double p[3], double e[6]) const
Calculates and returns the momentum and error of the track.
virtual void add(StiTrackNode *node, int direction, StiTrackNode *near=0)
StiKTNBidirectionalIterator begin() const
static void setKalmanTrackNodeFactory(Factory< StiKalmanTrackNode > *)
Set the factory used for the creation of kalman track nodes.
void remove(int childIndex)
double getPt() const
Calculates and returns the transverse momentum of the track at the inner most node.
double getDca3(StiTrack *t) const