Skip to content

Commit

Permalink
assign missing data on FwdTracks, make cluster<->track association
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbrice committed Feb 1, 2025
1 parent fc6ab8d commit 70080dc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions StRoot/StPicoDstMaker/StPicoDstMaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ class StPicoDstMaker : public StMaker {
/// Pointer to the array of BEMC tower hits
StEmcRawHit* mEmcIndex[4800];

/// Map of StPicoFcsCluster detId + Id to index in the array for track matching
std::map<std::pair<int, int>, int> mMapFcsIdPairIndex;

/// Magnetic field of the current event
Float_t mBField;

Expand Down
5 changes: 4 additions & 1 deletion StRoot/StPicoEvent/StPicoFcsCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class StPicoFcsCluster : public TObject {
virtual ~StPicoFcsCluster();

virtual void Print(const Char_t *option = "") const;
UShort_t index() const { return mIndex; }
/// Return unique Id of the track
Int_t id() const { return mId; }
UShort_t id() const { return mId; }
unsigned short detectorId() const { return mDetectorId; }
int category() const { return mCategory; }
int nTowers() const { return mNTowers; }
Expand All @@ -41,6 +42,7 @@ class StPicoFcsCluster : public TObject {
float chi2Ndf2Photon() const { return mChi2Ndf2Photon; } // chi^2/ndf for 2-photon fit to the cluster.
const TLorentzVector fourMomentum() const { return TLorentzVector( mFourMomentumX, mFourMomentumY, mFourMomentumZ, mFourMomentumT ); } // Cluster four-momentum (px, py, pz, E)

void setIndex(int index) { mIndex = (UShort_t)index; }
void setId(int cluid) { mId = (UShort_t)cluid; }
void setDetectorId(unsigned short detector) { mDetectorId=(UShort_t)detector; }
void setCategory(int catag) { mCategory = catag; }
Expand All @@ -57,6 +59,7 @@ class StPicoFcsCluster : public TObject {
void setFourMomentum(TLorentzVector p4) { mFourMomentumX = p4.X(); mFourMomentumY = p4.Y(); mFourMomentumZ = p4.Z(); mFourMomentumT = p4.T(); }

protected:
UShort_t mIndex=0; // Eventwise cluster Index (unique across all detectors)
UShort_t mId=0; // Eventwise cluster ID
UShort_t mDetectorId=0; // Detector starts from 1
Int_t mCategory=0; // Category of cluster (see StMuFcsClusterCategory)
Expand Down
1 change: 0 additions & 1 deletion StRoot/StPicoEvent/StPicoFcsHit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ StPicoFcsHit::StPicoFcsHit() : TObject() {
}

StPicoFcsHit::StPicoFcsHit(const StPicoFcsHit &hit){
mIndex=hit.mIndex;
mDetectorId=hit.mDetectorId;
mId=hit.mId;
mFourMomentumX=hit.mFourMomentumX;
Expand Down
6 changes: 5 additions & 1 deletion StRoot/StPicoEvent/StPicoFwdTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ class StPicoFwdTrack : public TObject {
void addHcalCluster( UChar_t index ) { mHcalMatchIndex.push_back(index); }
/// Set index of the corresonding MC track
void setMcTruth(Int_t index, Int_t qa) { mIdTruth = (UShort_t)index; mQATruth = (UShort_t)qa; }

void setDca( Float_t dcaX, Float_t dcaY, Float_t dcaZ ) { mDCAXY =sqrt(dcaX*dcaX + dcaY*dcaY); mDCAZ = dcaZ; }
void setVtxIndex( UChar_t vtxIndex ) { mVtxIndex = vtxIndex; }
void setGlobalTrackIndex( UShort_t index ) { mGlobalTrackIndex = index; }


protected:

// Track quality and convergence
Expand Down

0 comments on commit 70080dc

Please sign in to comment.