Skip to content

Commit

Permalink
incorporate updates from dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbrice committed Jan 13, 2025
1 parent 5c4fc21 commit cb2cf06
Show file tree
Hide file tree
Showing 19 changed files with 2,942 additions and 2,683 deletions.
4 changes: 3 additions & 1 deletion StRoot/StEvent/StEnumerations.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ enum StVertexId {kUndefinedVtxId = kUndefinedVertexIdentifier,
kFtpcEastCalVtxId = kFtpcEastCalibrationVertexIdentifier,
kFtpcWestCalVtxId = kFtpcWestCalibrationVertexIdentifier,
kBEAMConstrVtxId,
kRejectedVtxId};
kRejectedVtxId,
kFwdVtxId
};

/*!
* \enum StRichPidFlag
Expand Down
4 changes: 2 additions & 2 deletions StRoot/StEvent/StFstConsts.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ const float kFstrStart[kFstNumRStripsPerWedge]= {5.000, 7.875, 10.750, 13.625, 1
const float kFstrStop[kFstNumRStripsPerWedge] = {7.875, 10.750, 136.25, 16.500, 19.375, 22.250, 25.125, 28.000}; // in cm

//general APV chip constants
const unsigned char kFstNumTimeBins = 9; // 9 time bins for ADC sampling (maximum time bin number, 3 or 9)
const unsigned char kFstDefaultTimeBin = 2; // the default time bin number (2nd time bin) for FST raw hits
const unsigned char kFstNumTimeBins = 3; // 9 time bins for ADC sampling (maximum time bin number, 3 or 9)
const unsigned char kFstDefaultTimeBin = 1; // the default time bin number (2nd time bin) for FST raw hits
const int kFstMaxAdc = 4096; // ADC value should be less than 4096 (12 bits ADC)

#endif
5 changes: 5 additions & 0 deletions StRoot/StEvent/StFwdTrack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ StFwdTrack::StFwdTrack() {

}

StFwdTrack::~StFwdTrack() {
mEcalClusters.clear();
mHcalClusters.clear();
}


/* momentum
* get the track momentum at the first point (PV if included)
Expand Down
25 changes: 20 additions & 5 deletions StRoot/StEvent/StFwdTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <vector>
#include "StThreeVectorD.hh"
#include "StContainers.h"
#include <climits>

class StFcsCluster;

Expand Down Expand Up @@ -77,18 +78,21 @@ struct StFwdTrackProjection : public StObject {
struct StFwdTrackSeedPoint : public StObject {
StFwdTrackSeedPoint() {}
StFwdTrackSeedPoint( StThreeVectorD xyz,
short sec,
short detsec,
unsigned short trackId,
float cov[9] ){
mXYZ = xyz;
mSector = sec;
mSector = detsec;
mTrackId = trackId;
memcpy( mCov, cov, sizeof( mCov ));
}

short detectorId() const { return mSector / 10; }
short sector() const { return mSector % 10; }

StThreeVectorD mXYZ;
unsigned short mTrackId;
short mSector;
short mSector; // = detId * 10 + sector
float mCov[9];

ClassDef(StFwdTrackSeedPoint, 1)
Expand All @@ -98,6 +102,8 @@ class StFwdTrack : public StObject {

public:
StFwdTrack( );
// dtor needed for releasing associations
~StFwdTrack( );

vector<StFwdTrackProjection> mProjections;
vector<StFwdTrackSeedPoint> mFTTPoints;
Expand Down Expand Up @@ -130,7 +136,9 @@ class StFwdTrack : public StObject {
short numberOfSeedPoints() const;
UShort_t idTruth() const { return mIdTruth; }
UShort_t qaTruth() const { return mQATruth; }

StThreeVectorD dca() const { return StThreeVectorD( mDCA[0], mDCA[1], mDCA[2] ); }
UChar_t vertexIndex() const { return mVtxIndex; }
bool isPrimary() const { return mVtxIndex != UCHAR_MAX; }

void setPrimaryMomentum( StThreeVectorD mom ) { mPrimaryMomentum = mom; }
void setDidFitConverge( bool lDidFitConverge ) { mDidFitConverge = lDidFitConverge; }
Expand All @@ -143,6 +151,9 @@ class StFwdTrack : public StObject {
void setPval( float lPval ) { mPval = lPval;}
void setCharge( short lCharge ) { mCharge = lCharge;}
void setMc( UShort_t idt, UShort_t qual ) { mIdTruth = idt; mQATruth = qual; }
void setDCA( StThreeVectorD dca ) { mDCA[0] = dca.x(); mDCA[1] = dca.y(); mDCA[2] = dca.z(); }
void setDCA( float dcaX, float dcaY, float dcaZ ) { mDCA[0] = dcaX; mDCA[1] = dcaY; mDCA[2] = dcaZ; }
void setVtxIndex( UChar_t vtxIndex ) { mVtxIndex = vtxIndex; }

// ECAL clusters
StPtrVecFcsCluster& ecalClusters();
Expand Down Expand Up @@ -177,8 +188,12 @@ class StFwdTrack : public StObject {
UShort_t mIdTruth;
/// MC track quality (percentage of hits coming from corresponding MC track)
UShort_t mQATruth;

float mDCA[3]; // DCA to the primary vertex
UChar_t mVtxIndex;

ClassDef(StFwdTrack,3)

ClassDef(StFwdTrack,4)

};

Expand Down
7 changes: 7 additions & 0 deletions StRoot/StEvent/StFwdTrackCollection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@

ClassImp(StFwdTrackCollection)

StFwdTrackCollection::~StFwdTrackCollection(){
for (unsigned int i=0; i<mTracks.size(); i++) {
delete mTracks[i];
mTracks[i] = 0;
}
}

void StFwdTrackCollection::addTrack( StFwdTrack *track ) {
mTracks.push_back( track );
}
Expand Down
2 changes: 1 addition & 1 deletion StRoot/StEvent/StFwdTrackCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class StFwdTrack;
class StFwdTrackCollection : public StObject {
public:
// StFwdTrackCollection();
// ~StFwdTrackCollection();
~StFwdTrackCollection();

void addTrack(StFwdTrack*); // Add a track
StSPtrVecFwdTrack& tracks(); // Return the track list
Expand Down
2 changes: 2 additions & 0 deletions StRoot/StEvent/StVertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,15 @@ class StVertex : public StMeasuredPoint {
virtual void setKinkVertex() {SETBIT(mFlag,kKinkVtxId);}
virtual void setBeamConstrained() {SETBIT(mFlag,kBEAMConstrVtxId);}
virtual void setRejected() {SETBIT(mFlag,kRejectedVtxId);}
virtual void setFwdVertex() {SETBIT(mFlag,kFwdVtxId);}

bool isPrimaryVtx() const {return TESTBIT(mFlag,kPrimaryVtxId);}
bool isV0Vtx() const {return TESTBIT(mFlag,kV0VtxId);}
bool isXiVtx() const {return TESTBIT(mFlag,kXiVtxId);}
bool isKinkVertex() const {return TESTBIT(mFlag,kKinkVtxId);}
bool isBeamConstrained() const {return TESTBIT(mFlag,kBEAMConstrVtxId);}
bool isRejected() const {return TESTBIT(mFlag,kRejectedVtxId);}
bool isFwdVtx() const {return TESTBIT(mFlag,kFwdVtxId);}
void Print(Option_t *option="") const {cout << option << *this << endl; }
static void SetNoFitPointCutForGoodTrack(UInt_t val) {fgNoFitPointCutForGoodTrack = val;}
static UInt_t NoFitPointCutForGoodTrack() {return fgNoFitPointCutForGoodTrack;}
Expand Down
Loading

0 comments on commit cb2cf06

Please sign in to comment.