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 
36  void setPlane(UChar_t plane);
37  void setQuadrant(UChar_t quad);
38  void setX(float x);
39  void setY(float y);
40  // void addCluster(StMuFttCluster* cluster);
41  void setXYZ(const TVector3& p3);
42 
43 
44  void print(int option=0);
45 
46  void set( StFttPoint * point );
47 
48 private:
49  UChar_t mPlane;
50  UChar_t mQuadrant;
51  Float_t mX=0.0; // x-position in local coordinate
52  Float_t mY=0.0; // y-position in local coordinate
53  TRefArray mClusters=0; // parent clusters (could be up to 3?)
54  TVector3 mXYZ; // Photon position in STAR coordinate
55 
56  ClassDef(StMuFttPoint, 1)
57 };
58 
59 inline UChar_t StMuFttPoint::plane() const { return mPlane; }
60 inline UChar_t StMuFttPoint::quadrant() const { return mQuadrant; }
61 inline float StMuFttPoint::x() const { return mX; } // x position (cm) in local coords.
62 inline float StMuFttPoint::y() const { return mY; } // y position (cm) in local coords.
63 inline int StMuFttPoint::nParentClusters() const { return mClusters.GetSize(); } // Number of points in parent cluster
64 // inline StMuFttCluster* StMuFttPoint::cluster( size_t i ) { return mClusters.At(i); } // Parent cluster of the photon.
65 inline const TVector3& StMuFttPoint::xyz() const { return mXYZ; }
66 inline void StMuFttPoint::setPlane(UChar_t plane) { mPlane = plane; }
67 inline void StMuFttPoint::setQuadrant(UChar_t quadrant) { mQuadrant = quadrant; }
68 inline void StMuFttPoint::setX(float xpos) { mX = xpos; }
69 inline void StMuFttPoint::setY(float ypos) { mY = ypos; }
70 // inline void StMuFttPoint::addCluster(StMuFttCluster* cluster) { mClusters.Add( cluster ); }
71 inline void StMuFttPoint::setXYZ(const TVector3& p3) { mXYZ = p3; }
72 
73 #endif // StMuFttPoint_h
74