StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFcsPoint.h
1 /**************************************************************************
2  *
3  * $Id: StFcsPoint.h,v 2.1 2021/01/11 20:25:37 ullrich Exp $
4  *
5  * Author: Akio Ogawa 2018
6  **************************************************************************
7  *
8  * Description: Declaration of StFcsPoint, the StEvent FCS photon structure
9  * Represents a "point" (photon etc) fitted to a cluster of FCS towers.
10  *
11  **************************************************************************
12  *
13  * $Log: StFcsPoint.h,v $
14  * Revision 2.1 2021/01/11 20:25:37 ullrich
15  * Initial Revision
16  *
17  **************************************************************************/
18 #ifndef StFcsPoint_h
19 #define StFcsPoint_h
20 
21 #include "StLorentzVectorD.hh"
22 #include "StThreeVectorD.hh"
23 #include "StObject.h"
24 #include "StFcsCluster.h"
25 #include "StEnumerations.h"
26 
27 class StFcsPoint : public StObject {
28 public:
29  StFcsPoint();
30  ~StFcsPoint();
31 
32  unsigned short detectorId() const;
33  float energy() const;
34  float x() const; // x position in cell unit at which point intersects the sub-detector in local coordinate
35  float y() const; // y position in cell unit at which point intersects the sub-detector in local coordinate
36  unsigned int parentClusterId() const; //parent cluster Id
37  StFcsCluster* cluster(); // Parent cluster of the photon.
38  int nParentClusterPhotons() const; // Number of points in the parent cluster.
39  const StThreeVectorD& xyz() const; // XYZ position in global STAR coordinate
40  const StLorentzVectorD& fourMomentum() const;
41 
42  void setDetectorId(unsigned short detectorId);
43  void setEnergy(float energy);
44  void setX(float x);
45  void setY(float y);
46  void setCluster(StFcsCluster* cluster);
47  void setNParentClusterPhotons(int nclph);
48  void setXYZ(const StThreeVectorD& p3);
49  void setFourMomentum(const StLorentzVectorD& p4);
50 
51  void print(int option=0);
52 
53 private:
54  UShort_t mDetectorId=0;
55  Float_t mEnergy=0;
56  Float_t mX=0.0;
57  Float_t mY=0.0;
58  Int_t mNParentClusterPhotons=0;
59  StFcsCluster* mCluster=0;
60  StLorentzVectorD mFourMomentum;
61  StThreeVectorD mXYZ; //Photon position in STAR coordinate
62 
63  ClassDef(StFcsPoint, 1)
64 };
65 
66 inline unsigned short StFcsPoint::detectorId() const { return mDetectorId; }
67 inline float StFcsPoint::energy() const { return mEnergy; }
68 inline float StFcsPoint::x() const { return mX; } // x position in cm at which point intersects the sub-detector.
69 inline float StFcsPoint::y() const { return mY; } // y position in cm at which point intersects the sub-detector.
70 inline unsigned int StFcsPoint::parentClusterId() const { return mCluster->id(); } //parent cluster Id
71 inline StFcsCluster* StFcsPoint::cluster() { return mCluster; } // Parent cluster of the photon.
72 inline int StFcsPoint::nParentClusterPhotons() const { return mNParentClusterPhotons; } // Number of points in parent cluster
73 inline const StThreeVectorD& StFcsPoint::xyz() const { return mXYZ; }
74 inline const StLorentzVectorD& StFcsPoint::fourMomentum() const { return mFourMomentum; }
75 inline void StFcsPoint::setDetectorId(unsigned short det) { mDetectorId = det; }
76 inline void StFcsPoint::setEnergy(float energy) { mEnergy = energy; }
77 inline void StFcsPoint::setX(float xpos) { mX = xpos; }
78 inline void StFcsPoint::setY(float ypos) { mY = ypos; }
79 inline void StFcsPoint::setCluster(StFcsCluster* cluster) { mCluster = cluster; }
80 inline void StFcsPoint::setNParentClusterPhotons(int nclph) { mNParentClusterPhotons = nclph; }
81 inline void StFcsPoint::setXYZ(const StThreeVectorD& p3) { mXYZ = p3; }
82 inline void StFcsPoint::setFourMomentum(const StLorentzVectorD& p4) { mFourMomentum = p4; }
83 
84 #endif // StFcsPoint_h
85