Skip to content

Commit d1e27f6

Browse files
authored
add DCA, mc info and vtx index info to StMuFwdTrack (#733)
to mirror what is in StEvent structure (StFwdTrack)
1 parent 6965cf0 commit d1e27f6

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

StRoot/StMuDSTMaker/COMMON/StMuFwdTrack.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ void StMuFwdTrack::set( StFwdTrack * evTrack) {
3939
StMuFwdTrackSeedPoint( TVector3( sp.mXYZ.x(), sp.mXYZ.y(), sp.mXYZ.z() ), sp.mSector, sp.mTrackId, sp.mCov )
4040
);
4141
}
42+
43+
setDCA(evTrack->dca().x(), evTrack->dca().y(), evTrack->dca().z());
44+
mIdTruth = evTrack->idTruth();
45+
mQATruth = evTrack->qaTruth();
46+
mVtxIndex = evTrack->vertexIndex();
47+
4248
}
4349

4450

StRoot/StMuDSTMaker/COMMON/StMuFwdTrack.h

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "TRefArray.h"
1616

1717
#include "StMuFcsCluster.h"
18+
#include <climits>
1819

1920

2021
class StFwdTrack;
@@ -152,6 +153,18 @@ class StMuFwdTrack : public TObject {
152153

153154
TRefArray mEcalClusters;
154155
TRefArray mHcalClusters;
156+
157+
void setMc( UShort_t idt, UShort_t qual ) { mIdTruth = idt; mQATruth = qual; }
158+
void setDCA( TVector3 dca ) { mDCA[0] = dca.X(); mDCA[1] = dca.Y(); mDCA[2] = dca.Z(); }
159+
void setDCA( float dcaX, float dcaY, float dcaZ ) { mDCA[0] = dcaX; mDCA[1] = dcaY; mDCA[2] = dcaZ; }
160+
void setVtxIndex( UChar_t vtxIndex ) { mVtxIndex = vtxIndex; }
161+
162+
163+
UShort_t idTruth() const { return mIdTruth; }
164+
UShort_t qaTruth() const { return mQATruth; }
165+
TVector3 dca() const { return TVector3( mDCA[0], mDCA[1], mDCA[2] ); }
166+
UChar_t vertexIndex() const { return mVtxIndex; }
167+
bool isPrimary() const { return mVtxIndex != UCHAR_MAX; }
155168

156169
protected:
157170

@@ -166,12 +179,14 @@ class StMuFwdTrack : public TObject {
166179
float mPval;
167180
short mCharge;
168181
TVector3 mPrimaryMomentum;
169-
170182

171-
// StPtrVecFcsCluster mEcalClusters;
172-
// StPtrVecFcsCluster mHcalClusters;
183+
UShort_t mIdTruth; // MC track id
184+
UShort_t mQATruth; // MC track quality (percentage of hits coming from corresponding MC track)
185+
186+
float mDCA[3]; // DCA to the primary vertex
187+
UChar_t mVtxIndex;
173188

174-
ClassDef(StMuFwdTrack,2)
189+
ClassDef(StMuFwdTrack,3)
175190

176191
};
177192

0 commit comments

Comments
 (0)