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