1 #include "StMuFwdTrack.h"
4 #include "StEvent/StFwdTrack.h"
6 StMuFwdTrack::StMuFwdTrack() {
10 void StMuFwdTrack::set(
StFwdTrack * evTrack) {
11 mDidFitConverge = evTrack->didFitConverge();
12 mDidFitConvergeFully = evTrack->didFitConvergeFully();
13 mNumberOfFailedPoints = evTrack->numberOfFailedPoints();
14 mNumberOfSeedPoints = evTrack->numberOfSeedPoints();
15 mNumberOfFitPoints = evTrack->numberOfFitPoints();
16 mChi2 = evTrack->chi2();
17 mNDF = evTrack->ndf();
18 mPval = evTrack->pval();
19 mCharge = evTrack->charge();
20 mPrimaryMomentum = TVector3( evTrack->momentum().x(), evTrack->momentum().y(), evTrack->momentum().z() );
23 for (
auto proj : evTrack->mProjections ){
24 mProjections.push_back(
25 StMuFwdTrackProjection( proj.mDetId, TVector3( proj.mXYZ.x(), proj.mXYZ.y(), proj.mXYZ.z() ), TVector3( proj.mMom.x(), proj.mMom.y(), proj.mMom.z() ), proj.mCov )
30 for (
auto sp : evTrack->mFTTPoints ){
32 StMuFwdTrackSeedPoint( TVector3( sp.mXYZ.x(), sp.mXYZ.y(), sp.mXYZ.z() ), sp.mSector, sp.mTrackId, sp.mCov )
37 for (
auto sp : evTrack->mFSTPoints ){
39 StMuFwdTrackSeedPoint( TVector3( sp.mXYZ.x(), sp.mXYZ.y(), sp.mXYZ.z() ), sp.mSector, sp.mTrackId, sp.mCov )
46 int n=mEcalClusters.GetSize();
47 for(
int i=0; i<n; i++)
if(mEcalClusters[i]==clu)
return;
48 mEcalClusters.Add(clu);
51 int n=mHcalClusters.GetSize();
52 for(
int i=0; i<n; i++)
if(mHcalClusters[i]==clu)
return;
53 mHcalClusters.Add(clu);
59 TVector3 StMuFwdTrack::momentum()
const{
60 return mPrimaryMomentum;
66 TVector3 StMuFwdTrack::momentumAt(
size_t _id)
const{
67 if ( _id >= mProjections.size() )
68 return TVector3( 0, 0, 0 );
70 return mProjections[_id].mMom;
73 char StMuFwdTrack::charge()
const{
77 bool StMuFwdTrack::didFitConverge()
const {
78 return mDidFitConverge;
81 bool StMuFwdTrack::didFitConvergeFully()
const {
82 return mDidFitConvergeFully;
85 short StMuFwdTrack::numberOfFailedPoints()
const {
86 return mNumberOfFailedPoints;
89 double StMuFwdTrack::chi2()
const {
93 double StMuFwdTrack::ndf()
const {
97 double StMuFwdTrack::pval()
const {
101 short StMuFwdTrack::numberOfFitPoints()
const {
102 return mNumberOfFitPoints;
105 short StMuFwdTrack::numberOfSeedPoints()
const {
106 return mNumberOfSeedPoints;
128 bool StMuFwdTrack::getProjectionFor(
int detectorId,
132 for (
auto proj : mProjections ){
133 if (proj.mDetId == detectorId){
135 if ( count == index )