StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFttPoint.h
1 /**************************************************************************
2  *
3  * StFttPoint.h
4  *
5  * Author: jdb 2021
6  **************************************************************************
7  *
8  * Description: Declaration of StFttPoint, the StEvent FTT point structure
9  * Represents a "point" (cluster centroid etc) via cluster finding.
10  *
11  **************************************************************************/
12 #ifndef StFttPoint_h
13 #define StFttPoint_h
14 
15 #include "StThreeVectorD.hh"
16 #include "StObject.h"
17 #include "StEnumerations.h"
18 #include "StContainers.h"
19 
20 class StFttCluster;
21 
22 class StFttPoint : public StObject {
23 public:
24  StFttPoint();
25  ~StFttPoint();
26 
27  UChar_t plane() const; // Detector plane.
28  UChar_t quadrant() const; // detector quadrant.
29  float x() const; // x position in cell unit at which point intersects the sub-detector in local coordinate
30  float y() const; // y position in cell unit at which point intersects the sub-detector in local coordinate
31  int nClusters() const; // Number of points in the parent cluster.
32  StFttCluster* cluster( size_t i); // Parent cluster of the photon.
33  const StThreeVectorD& xyz() const; // XYZ position in global STAR coordinate
34 
35  void setPlane(UChar_t plane);
36  void setQuadrant(UChar_t quad);
37  void setX(float x);
38  void setY(float y);
39  void addCluster(StFttCluster* cluster, UChar_t dir);
40  void setXYZ(const StThreeVectorD& p3);
41 
42 
43  void print(int option=0);
44 
45 private:
46  UChar_t mPlane;
47  UChar_t mQuadrant;
48  Float_t mX=0.0; // x-position in local coordinate
49  Float_t mY=0.0; // y-position in local coordinate
50  StFttCluster *mClusters[4];
51  StThreeVectorD mXYZ; // Photon position in STAR coordinate
52 
53  ClassDef(StFttPoint, 1)
54 };
55 
56 inline UChar_t StFttPoint::plane() const { return mPlane; }
57 inline UChar_t StFttPoint::quadrant() const { return mQuadrant; }
58 inline float StFttPoint::x() const { return mX; } // x position (cm) in local coords.
59 inline float StFttPoint::y() const { return mY; } // y position (cm) in local coords.
60 inline StFttCluster* StFttPoint::cluster( size_t i ) { if ( i < 4 ) return mClusters[i]; return nullptr; } // Parent cluster of the photon.
61 inline const StThreeVectorD& StFttPoint::xyz() const { return mXYZ; }
62 inline void StFttPoint::setPlane(UChar_t plane) { mPlane = plane; }
63 inline void StFttPoint::setQuadrant(UChar_t quadrant) { mQuadrant = quadrant; }
64 inline void StFttPoint::setX(float xpos) { mX = xpos; }
65 inline void StFttPoint::setY(float ypos) { mY = ypos; }
66 inline void StFttPoint::addCluster(StFttCluster* cluster, UChar_t dir) { mClusters[dir] = (cluster); }
67 inline void StFttPoint::setXYZ(const StThreeVectorD& p3) { mXYZ = p3; }
68 
69 #endif // StFttPoint_h
70