StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFttPoint.h
1 /**************************************************************************
2  *
3  * StMuFttPoint.h
4  *
5  * Author: jdb 2021
6  **************************************************************************
7  *
8  * Description: Declaration of StMuFttPoint, the StEvent FTT point structure
9  * Represents a "point" (cluster centroid etc) via cluster finding.
10  *
11  **************************************************************************/
12 #ifndef StMuFttPoint_h
13 #define StMuFttPoint_h
14 
15 #include <TVector3.h>
16 #include <TObject.h>
17 #include <TRefArray.h>
18 #include "StEnumerations.h"
19 
20 class StMuFttCluster;
21 class StFttPoint;
22 
23 class StMuFttPoint : public TObject {
24 public:
25  StMuFttPoint();
26  ~StMuFttPoint();
27 
28  UChar_t plane() const; // Detector plane.
29  UChar_t quadrant() const; // detector quadrant.
30  float x() const; // x position in cell unit at which point intersects the sub-detector in local coordinate
31  float y() const; // y position in cell unit at which point intersects the sub-detector in local coordinate
32  int nParentClusters() const; // Number of points in the parent cluster.
33  // StMuFttCluster* cluster( size_t i); // Parent cluster of the photon.
34  const TVector3& xyz() const; // XYZ position in global STAR coordinate
35  UShort_t idTruth() const { return mIdTruth; } // Get the truth ID
36  UShort_t qaTruth() const { return mQaTruth; } // Get the truth quality
37 
38  void setPlane(UChar_t plane);
39  void setQuadrant(UChar_t quad);
40  void setX(float x);
41  void setY(float y);
42  // void addCluster(StMuFttCluster* cluster);
43  void setXYZ(const TVector3& p3);
44  void setIdTruth(UShort_t id) { mIdTruth = id; }
45  void setQaTruth(UShort_t qa) { mQaTruth = qa; }
46 
47 
48  void print(int option=0);
49 
50  void set( StFttPoint * point );
51 
52 private:
53  UChar_t mPlane;
54  UChar_t mQuadrant;
55  Float_t mX=0.0; // x-position in local coordinate
56  Float_t mY=0.0; // y-position in local coordinate
57  TRefArray mClusters=0; // parent clusters (could be up to 3?)
58  TVector3 mXYZ; // Photon position in STAR coordinate
59  UShort_t mIdTruth=0; // Truth ID
60  UShort_t mQaTruth=0; // Truth quality
61 
62  ClassDef(StMuFttPoint, 3)
63 };
64 
65 inline UChar_t StMuFttPoint::plane() const { return mPlane; }
66 inline UChar_t StMuFttPoint::quadrant() const { return mQuadrant; }
67 inline float StMuFttPoint::x() const { return mX; } // x position (cm) in local coords.
68 inline float StMuFttPoint::y() const { return mY; } // y position (cm) in local coords.
69 inline int StMuFttPoint::nParentClusters() const { return mClusters.GetSize(); } // Number of points in parent cluster
70 // inline StMuFttCluster* StMuFttPoint::cluster( size_t i ) { return mClusters.At(i); } // Parent cluster of the photon.
71 inline const TVector3& StMuFttPoint::xyz() const { return mXYZ; }
72 inline void StMuFttPoint::setPlane(UChar_t plane) { mPlane = plane; }
73 inline void StMuFttPoint::setQuadrant(UChar_t quadrant) { mQuadrant = quadrant; }
74 inline void StMuFttPoint::setX(float xpos) { mX = xpos; }
75 inline void StMuFttPoint::setY(float ypos) { mY = ypos; }
76 // inline void StMuFttPoint::addCluster(StMuFttCluster* cluster) { mClusters.Add( cluster ); }
77 inline void StMuFttPoint::setXYZ(const TVector3& p3) { mXYZ = p3; }
78 
79 #endif // StMuFttPoint_h
80