Skip to content

Commit

Permalink
Merge branch 'main' into TFG24c.Export.Mini
Browse files Browse the repository at this point in the history
  • Loading branch information
fisyak authored Aug 24, 2024
2 parents 15106c7 + b06b780 commit 1d9e062
Show file tree
Hide file tree
Showing 13 changed files with 76 additions and 27 deletions.
7 changes: 6 additions & 1 deletion StRoot/StEvent/StFttCluster.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ mSumAdc(0.0),
mX(0.0),
mSigma(0.0),
mRawHits(0),
mNeighbors(0)
mNeighbors(0),
mPoints(0),
mIdTruth(0),
mQaTruth(0)
{

}
Expand Down Expand Up @@ -58,6 +61,8 @@ operator<<( std::ostream &os, const StFttCluster& rh )
os << "\tsumAdc = " << rh.sumAdc() << endl;
os << "\tx = " << rh.x() << endl;
os << "\tsigma = " << rh.sigma() << endl;
os << "\tidTruth = " << rh.idTruth() << endl;
os << "\tqaTruth = " << rh.qaTruth() << endl;
os << ")" << endl;
return os;
}
5 changes: 4 additions & 1 deletion StRoot/StEvent/StFttCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class StFttCluster : public StObject {
float x() const; // Mean x ("center of gravity") in local grid coordinate (1st moment).
float sigma() const; // Maximum 2nd moment (along major axis).
UShort_t idTruth() const { return mIdTruth; } // Get the truth ID
UShort_t qaTruth() const { return mQaTruth; } // Get the truth quality

void setId(int cluid);
void setPlane(UChar_t plane);
Expand All @@ -39,6 +40,7 @@ class StFttCluster : public StObject {
void setX(float x0);
void setSigma(float sigma);
void setIdTruth(UShort_t id) { mIdTruth = id; }
void setQaTruth(UShort_t qa) { mQaTruth = qa; }

StPtrVecFttRawHit& rawHits();
const StPtrVecFttRawHit& rawHits() const;
Expand All @@ -65,8 +67,9 @@ class StFttCluster : public StObject {
StPtrVecFttCluster mNeighbors; // Neighbor clusters
StPtrVecFttPoint mPoints; // Fitted points (photons) in the cluster
UShort_t mIdTruth=0; // Truth ID
UShort_t mQaTruth=0; // Truth Quality

ClassDef(StFttCluster, 3)
ClassDef(StFttCluster, 4)
};

std::ostream& operator << ( std::ostream&, const StFttCluster& clu ); // Printing operator
Expand Down
4 changes: 2 additions & 2 deletions StRoot/StEvent/StFttPoint.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ void StFttPoint::print(int opt) {
}


int StFttPoint::nClusters() const {
int n = 0;
size_t StFttPoint::nClusters() const {
size_t n = 0;
for ( size_t i = 0; i < 4; i++ ){
if ( mClusters[i] != nullptr )
n++;
Expand Down
7 changes: 5 additions & 2 deletions StRoot/StEvent/StFttPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ class StFttPoint : public StObject {
UChar_t quadrant() const; // detector quadrant.
float x() const; // x position in cell unit at which point intersects the sub-detector in local coordinate
float y() const; // y position in cell unit at which point intersects the sub-detector in local coordinate
int nClusters() const; // Number of points in the parent cluster.
size_t nClusters() const; // Number of points in the parent cluster.
StFttCluster* cluster( size_t i); // Parent cluster of the photon.
const StThreeVectorD& xyz() const; // XYZ position in global STAR coordinate
UShort_t idTruth() const { return mIdTruth; } // Get the truth ID
UShort_t qaTruth() const { return mQaTruth; } // Get the truth quality

void setPlane(UChar_t plane);
void setQuadrant(UChar_t quad);
Expand All @@ -40,6 +41,7 @@ class StFttPoint : public StObject {
void addCluster(StFttCluster* cluster, UChar_t dir);
void setXYZ(const StThreeVectorD& p3);
void setIdTruth(UShort_t id) { mIdTruth = id; }
void setQaTruth(UShort_t qa) { mQaTruth = qa; }

void print(int option=0);

Expand All @@ -51,8 +53,9 @@ class StFttPoint : public StObject {
StFttCluster *mClusters[4];
StThreeVectorD mXYZ; // Photon position in STAR coordinate
UShort_t mIdTruth=0; // Truth ID
UShort_t mQaTruth=0; // Truth quality

ClassDef(StFttPoint, 2)
ClassDef(StFttPoint, 3)
};

inline UChar_t StFttPoint::plane() const { return mPlane; }
Expand Down
9 changes: 7 additions & 2 deletions StRoot/StEvent/StFttRawHit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ mPlane(255),
mQuadrant(kFttUnknownQuadrant),
mRow(255),
mStrip(255),
mOrientation(kFttUnknownOrientation)
mOrientation(kFttUnknownOrientation),
mIdTruth(0),
mQaTruth(0)
{ /*noop*/ }

StFttRawHit::StFttRawHit( UChar_t mSector, UChar_t mRDO, UChar_t mFEB,
Expand Down Expand Up @@ -79,7 +81,10 @@ operator<<( ostream &os, const StFttRawHit& rh )
os << "\tmQuadrant = " << (int)rh.quadrant() << endl;
os << "\tmRow = " << (int)rh.row() << endl;
os << "\tmStrip = " << (int)rh.strip() << endl;
os << "\tmOrientation = " << (int)rh.orientation() << " ) " << endl;
os << "\tmOrientation = " << (int)rh.orientation() << endl;
os << "\tidTruth = " << (int)rh.idTruth() << endl;
os << "\tqaTruth = " << (int)rh.qaTruth() << endl;
os << " ) " << endl;


return os;
Expand Down
12 changes: 8 additions & 4 deletions StRoot/StEvent/StFttRawHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ class StFttRawHit : public StObject {
void setMapping( UChar_t mPlane, UChar_t mQuadrant, UChar_t mRow, UChar_t mStrip, UChar_t mOrientation );

void setTime( Short_t mTime ) { this->mTime = mTime; }
// consant getters
void setIdTruth( UShort_t id ) { mIdTruth = id; }
void setQaTruth( UShort_t qa ) { mQaTruth = qa; }

// consant getters
UChar_t sector() const;
UChar_t rdo() const;
UChar_t feb() const;
Expand All @@ -54,6 +56,8 @@ class StFttRawHit : public StObject {
UChar_t row() const;
UChar_t strip() const;
UChar_t orientation() const;
UShort_t idTruth() const { return mIdTruth; }
UShort_t qaTruth() const { return mQaTruth; }

protected:
UChar_t mSector;
Expand All @@ -74,10 +78,10 @@ class StFttRawHit : public StObject {
UChar_t mStrip;
UChar_t mOrientation;

// StFttCluster *mCluster;
// StFttPoint *mPoint;
UShort_t mIdTruth=0; // Truth ID
UShort_t mQaTruth=0; // Truth Quality

ClassDef( StFttRawHit, 3 );
ClassDef( StFttRawHit, 4 );
};

ostream& operator << ( ostream&, const StFttRawHit& digi ); // Printing operator
Expand Down
7 changes: 6 additions & 1 deletion StRoot/StMuDSTMaker/COMMON/StMuFttCluster.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ mSumAdc(0.0),
mX(0.0),
mSigma(0.0),
mRawHits(0),
mNeighbors(0)
mNeighbors(0),
mPoints(0),
mIdTruth(0),
mQaTruth(0)
{

}
Expand Down Expand Up @@ -53,4 +56,6 @@ void StMuFttCluster::set( StFttCluster * clu ){
mSumAdc = clu->sumAdc();
mX = clu->x();
mSigma = clu->sigma();
mIdTruth = clu->idTruth();
mQaTruth = clu->qaTruth();
}
8 changes: 7 additions & 1 deletion StRoot/StMuDSTMaker/COMMON/StMuFttCluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class StMuFttCluster : public TObject {
float sumAdc() const;
float x() const; // Mean x ("center of gravity") in local grid coordinate (1st moment).
float sigma() const; // Maximum 2nd moment (along major axis).
UShort_t idTruth() const { return mIdTruth; } // Get the truth ID
UShort_t qaTruth() const { return 0; } // Get the truth quality

void setId(int cluid);
void setPlane(UChar_t plane);
Expand All @@ -34,6 +36,8 @@ class StMuFttCluster : public TObject {
void setSumAdc(int theSumAdc);
void setX(float x0);
void setSigma(float sigma);
void setIdTruth(UShort_t id) { mIdTruth = id; }
void setQaTruth(UShort_t qa) { mQaTruth = qa; }

TRefArray* rawHits();
const TRefArray* rawHits() const;
Expand All @@ -60,8 +64,10 @@ class StMuFttCluster : public TObject {
TRefArray mRawHits; // Tower hits of the current cluster
TRefArray mNeighbors; // Neighbor clusters
TRefArray mPoints; // Fitted points (photons) in the cluster
UShort_t mIdTruth=0; // Truth ID
UShort_t mQaTruth=0; // Truth quality

ClassDef(StMuFttCluster, 1)
ClassDef(StMuFttCluster, 3)
};


Expand Down
2 changes: 2 additions & 0 deletions StRoot/StMuDSTMaker/COMMON/StMuFttPoint.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ void StMuFttPoint::set( StFttPoint *point ){
mX = point->x();
mY = point->y();
mXYZ = TVector3( point->xyz().x(), point->xyz().y(), point->xyz().z() );
mIdTruth = point->idTruth();
mQaTruth = point->qaTruth();
} // set from StEvent
8 changes: 7 additions & 1 deletion StRoot/StMuDSTMaker/COMMON/StMuFttPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ class StMuFttPoint : public TObject {
int nParentClusters() const; // Number of points in the parent cluster.
// StMuFttCluster* cluster( size_t i); // Parent cluster of the photon.
const TVector3& xyz() const; // XYZ position in global STAR coordinate
UShort_t idTruth() const { return mIdTruth; } // Get the truth ID
UShort_t qaTruth() const { return mQaTruth; } // Get the truth quality

void setPlane(UChar_t plane);
void setQuadrant(UChar_t quad);
void setX(float x);
void setY(float y);
// void addCluster(StMuFttCluster* cluster);
void setXYZ(const TVector3& p3);
void setIdTruth(UShort_t id) { mIdTruth = id; }
void setQaTruth(UShort_t qa) { mQaTruth = qa; }


void print(int option=0);
Expand All @@ -52,8 +56,10 @@ class StMuFttPoint : public TObject {
Float_t mY=0.0; // y-position in local coordinate
TRefArray mClusters=0; // parent clusters (could be up to 3?)
TVector3 mXYZ; // Photon position in STAR coordinate
UShort_t mIdTruth=0; // Truth ID
UShort_t mQaTruth=0; // Truth quality

ClassDef(StMuFttPoint, 1)
ClassDef(StMuFttPoint, 3)
};

inline UChar_t StMuFttPoint::plane() const { return mPlane; }
Expand Down
11 changes: 9 additions & 2 deletions StRoot/StMuDSTMaker/COMMON/StMuFttRawHit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ mPlane(255),
mQuadrant(kFttUnknownQuadrant),
mRow(255),
mStrip(255),
mOrientation(kFttUnknownOrientation)
mOrientation(kFttUnknownOrientation),
mIdTruth(0),
mQaTruth(0)
{ /*noop*/ }

StMuFttRawHit::StMuFttRawHit( StFttRawHit * stHit ){
Expand Down Expand Up @@ -66,6 +68,8 @@ void StMuFttRawHit::setMapping( UChar_t mPlane, UChar_t mQuadrant,
void StMuFttRawHit::set( StFttRawHit * stHit ){
setRaw( stHit->sector(), stHit->rdo(), stHit->feb(), stHit->vmm(), stHit->channel(), stHit->adc(), stHit->bcid(), stHit->tb(), stHit->dbcid());
setMapping( stHit->plane(), stHit->quadrant(), stHit->row(), stHit->strip(), stHit->orientation() );
setIdTruth( stHit->idTruth() );
setQaTruth( stHit->qaTruth() );
} // set from StEvent object


Expand All @@ -88,6 +92,9 @@ operator<<( ostream &os, const StMuFttRawHit& rh )
os << "\tmQuadrant = " << (int)rh.quadrant() << endl;
os << "\tmRow = " << (int)rh.row() << endl;
os << "\tmStrip = " << (int)rh.strip() << endl;
os << "\tmOrientation = " << (int)rh.orientation() << " ) " << endl;
os << "\tmOrientation = " << (int)rh.orientation() << endl;
os << "\tidTruth = " << (int)rh.idTruth() << endl;
os << "\tqaTruth = " << (int)rh.qaTruth() << endl;
os << " ) " << endl;
return os;
} // operator<< ostream
11 changes: 7 additions & 4 deletions StRoot/StMuDSTMaker/COMMON/StMuFttRawHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ class StMuFttRawHit : public TObject {

void setMapping( UChar_t mPlane, UChar_t mQuadrant, UChar_t mRow, UChar_t mStrip, UChar_t mOrientation );
void set( StFttRawHit * stHit );
void setIdTruth( UShort_t id ) { mIdTruth = id; }
void setQaTruth( UShort_t qa ) { mQaTruth = qa; }

// consant getters

UChar_t sector() const;
UChar_t rdo() const;
UChar_t feb() const;
Expand All @@ -55,6 +56,8 @@ class StMuFttRawHit : public TObject {
UChar_t row() const;
UChar_t strip() const;
UChar_t orientation() const;
UShort_t idTruth() const { return mIdTruth; }
UShort_t qaTruth() const { return mQaTruth; }

protected:
UChar_t mSector;
Expand All @@ -74,10 +77,10 @@ class StMuFttRawHit : public TObject {
UChar_t mStrip;
UChar_t mOrientation;

// StFttCluster *mCluster;
// StFttPoint *mPoint;
UShort_t mIdTruth;
UShort_t mQaTruth;

ClassDef( StMuFttRawHit, 2 );
ClassDef( StMuFttRawHit, 3 );
};

std::ostream& operator << ( std::ostream&, const StMuFttRawHit& hit ); // Printing operator
Expand Down
12 changes: 6 additions & 6 deletions StarVMC/Geometry/StgmGeo/StgmGeo1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,20 +215,20 @@
<!-- Create and place the STGC Mother volume in the CAVE -->

<Create block="STGM" />
<Placement block="STGM" in="CAVE" konly="ONLY" x="0" y="5.9" z="307.65" >
<Placement block="STGM" in="CAVE" konly="ONLY" x="0" y="5.9" z="338.8385" >
<Misalign table="Geometry/stgc/stgcOnTpc" row="0"/>
</Placement>

<Volume name="STGM" comment="STGC Mother volume" assembly="true" >
<Material name="Air" />
<!-- STGM placement and params taken from old geometry -->
<Shape type="tube" rmin="0" rmax="95.0" dz="52.0" />
<Shape type="tube" rmin="0" rmax="95.0" dz="30.0" />


<Create block="STFM" />
<!-- First z-plane station -->
<!-- z relative to Mother zcenter -->
zplane = -26.75;
zplane = -26.4965;
<Placement in="STGM" y="0" x="0" z="zplane" block="STFM" konly="MANY" >
<Misalign table="Geometry/stgc/pentOnStation" row="0" />
<Misalign table="Geometry/stgc/stationOnStgc" row="0" />
Expand All @@ -255,7 +255,7 @@
<Info format="Positioning sTGC {2I}">station</Info>


zplane = -3.95;
zplane = -8.8855;
<Placement in="STGM" y="0" x="0" z="zplane" block="STFM" konly="MANY" >
<Misalign table="Geometry/stgc/pentOnStation" row="4" />
<Misalign table="Geometry/stgc/stationOnStgc" row="1" />
Expand All @@ -281,7 +281,7 @@
station = 2;
<Info format="Positioning sTGC {2I}">station</Info>

zplane = +18.95;
zplane = +8.7985;
<Placement in="STGM" y="0" x="0" z="zplane" block="STFM" konly="MANY" >
<Misalign table="Geometry/stgc/pentOnStation" row="8" />
<Misalign table="Geometry/stgc/stationOnStgc" row="2" />
Expand All @@ -307,7 +307,7 @@
station = 3;
<Info format="Positioning sTGC {2I}">station</Info>

zplane = +41.75;
zplane = +26.5835;
<Placement in="STGM" y="0" x="0" z="zplane" block="STFM" konly="MANY" >
<Misalign table="Geometry/stgc/pentOnStation" row="12" />
<Misalign table="Geometry/stgc/stationOnStgc" row="3" />
Expand Down

0 comments on commit 1d9e062

Please sign in to comment.