3 #include "StChargedPionTrack.h"
4 #include "StPionPlus.hh"
11 mId(0),mFlag(0),mVertexIndex(0),mVertex(0.,0.,0.),mNHits(0),mNHitsPoss(0),mNHitsDedx(0),mNHitsFit(0),
12 mNSigmaElectron(0),mNSigmaPion(0),mNSigmaKaon(0),mNSigmaProton(0),mdEdx(0),mChi2(0),mChi2Prob(0),
13 mCharge(0),mB(0.),mGlobalLastPoint(0.,0.,0.),
14 mGlobalHelix(
StThreeVectorF(0.,0.,0.),StThreeVectorF(0.,0.,0.),0.,0.)
17 StChargedPionTrack::~StChargedPionTrack() { }
19 StChargedPionTrack::StChargedPionTrack(
const StChargedPionTrack& t) : TLorentzVector(t)
22 this->mFlag = t.mFlag;
24 this->mVertexIndex = t.mVertexIndex;
25 this->mVertex = t.mVertex;
27 this->mNHits = t.mNHits;
28 this->mNHitsPoss = t.mNHitsPoss;
29 this->mNHitsDedx = t.mNHitsDedx;
30 this->mNHitsFit = t.mNHitsFit;
32 this->mNSigmaElectron = t.mNSigmaElectron;
33 this->mNSigmaPion = t.mNSigmaPion;
34 this->mNSigmaKaon = t.mNSigmaKaon;
35 this->mNSigmaProton = t.mNSigmaProton;
36 this->mdEdx = t.mdEdx;
38 this->mChi2 = t.mChi2;
39 this->mChi2Prob = t.mChi2Prob;
41 this->mCharge = t.mCharge;
44 this->mGlobalLastPoint = t.mGlobalLastPoint;
45 this->mGlobalHelix = t.mGlobalHelix;
48 void StChargedPionTrack::setPtEtaPhi(
float aPt,
float aEta,
float aPhi) {
49 this->SetPtEtaPhiM(aPt,aEta,aPhi,StPionPlus::instance()->mass());
52 void StChargedPionTrack::setPt(
float aPt) {
56 void StChargedPionTrack::setPhi(
float aPhi) {
60 void StChargedPionTrack::setEta(
float aEta) {
61 this->SetTheta(2*TMath::ATan(TMath::Exp(-1*aEta)));
64 double StChargedPionTrack::globalPt()
const {
65 return this->globalPt(mGlobalHelix.
origin());
68 double StChargedPionTrack::globalPt(
StThreeVectorF position)
const {
69 double pathLength = mGlobalHelix.
pathLength(position,
false);
74 double StChargedPionTrack::globalPhi()
const {
75 return this->globalPhi(mGlobalHelix.
origin());
78 double StChargedPionTrack::globalPhi(
StThreeVectorF position)
const {
79 double pathLength = mGlobalHelix.
pathLength(position,
false);
84 double StChargedPionTrack::globalEta()
const {
85 return this->globalEta(mGlobalHelix.
origin());
88 double StChargedPionTrack::globalEta(
StThreeVectorF position)
const {
89 double pathLength = mGlobalHelix.
pathLength(position,
false);
91 return gP.pseudoRapidity();
94 TLorentzVector StChargedPionTrack::globalP()
const {
95 return this->globalP(mGlobalHelix.
origin());
98 TLorentzVector StChargedPionTrack::globalP(
StThreeVectorF position)
const {
99 double pathLength = mGlobalHelix.
pathLength(position,
false);
102 vec.SetPtEtaPhiM(gP.perp(),gP.pseudoRapidity(),gP.phi(),StPionPlus::instance()->mass());
111 double pathlength = mGlobalHelix.
pathLength(position,
false);
112 return (mGlobalHelix.at(pathlength) - position);
119 return fabs(end - begin);
double lengthMeasured() const
Returns length of track (cm) from first to last measured point.
double length() const
Returns length of track (cm) from primary vertex to last measured point.
pair< double, double > pathLength(double r) const
path length at given r (cylindrical r)
const StThreeVector< double > & origin() const
-sign(q*B);
StThreeVectorF globalDca() const
Returns 3D distance of closest approach to primary vertex.