StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFmsCluster.h
1 /*************************************************************************
2  *
3  * $Id: StMuFmsCluster.h,v 1.2 2015/09/02 22:09:58 jdb Exp $
4  *
5  * Author: Thomas Burton, 2014
6  *************************************************************************
7  *
8  * Description: Declaration of StMuFmsCluster, the MuDST FMS cluster class
9  *
10  *************************************************************************
11  *
12  * $Log: StMuFmsCluster.h,v $
13  * Revision 1.2 2015/09/02 22:09:58 jdb
14  * Added Akios changes to Fms
15  *
16  *
17  *************************************************************************/
18 #ifndef STROOT_STMUDSTMAKER_COMMON_STMUFMSCLUSTER_H_
19 #define STROOT_STMUDSTMAKER_COMMON_STMUFMSCLUSTER_H_
20 
21 #include <TObject.h>
22 #include <TRefArray.h>
23 
24 class StFmsCluster; // Equivalent class in StEvent
25 
35 class StMuFmsCluster : public TObject {
36  public:
37  StMuFmsCluster(int detectorId = 0, int category = -1, float energy = 0.f,
38  float x = 0.f, float y = 0.f, float smin=0.f, float smax=0.f,
39  float chi1=0.f, float chi2=0.f, int id=0);
40  explicit StMuFmsCluster(const StFmsCluster&);
41  virtual ~StMuFmsCluster();
42  virtual void Clear(Option_t* option = "");
43 
44  unsigned short detectorId() const;
45  unsigned short category() const;
46  float energy() const;
47  float x() const; // x "center of gravity" of the cluster.
48  float y() const; // y "center of gravity" of the cluster.
49  float sigmaMin() const; // Maximum 2nd moment (along major axis).
50  float sigmaMax() const; // Minimum 2nd moment.
51  float chi2Ndf1Photon() const; // chi^2/ndf for 1-photon fit to the cluster.
52  float chi2Ndf2Photon() const; // chi^2/ndf for 2-photon fit to the cluster.
53  int id() const; // Cluster ID
54  TRefArray* hits();
55  const TRefArray* hits() const;
56  TRefArray* photons();
57  const TRefArray* photons() const;
58  void setDetectorId(unsigned short detector);
59  void setCategory(unsigned short category);
60  void setEnergy(float energy);
61  void setX(float x);
62  void setY(float y);
63  void setSigmaMin(float sigmaMin);
64  void setSigmaMax(float sigmaMax);
65  void setChi2Ndf1Photon(float chi2ndfph1);
66  void setChi2Ndf2Photon(float chi2ndfph2);
67  void setId(float cluid);
68 
69  protected:
70  UShort_t mDetectorId;
71  UShort_t mCategory;
72  Float_t mEnergy;
73  Float_t mX;
74  Float_t mY;
75  Float_t mSigmaMin; // Minimum 2nd moment
76  Float_t mSigmaMax; // Maximum 2nd moment (along major axis)
77  Float_t mChi2Ndf1Photon; // &chi;<sup>2</sup> / ndf for 1-photon fit
78  Float_t mChi2Ndf2Photon; // &chi;<sup>2</sup> / ndf for 2-photon fit
79  Int_t mId; // Eventwise cluster ID
80  TRefArray mHits;
81  TRefArray mPhotons;
82 
83  private:
95  StMuFmsCluster& operator=(const StMuFmsCluster&);
96  ClassDef(StMuFmsCluster, 1)
97 };
98 
99  inline unsigned short StMuFmsCluster::detectorId() const { return mDetectorId; }
100  inline unsigned short StMuFmsCluster::category() const { return mCategory; }
101  inline float StMuFmsCluster::energy() const { return mEnergy; }
102  inline float StMuFmsCluster::x() const { return mX; } // x "center of gravity" of the cluster.
103  inline float StMuFmsCluster::y() const { return mY; } // y "center of gravity" of the cluster.
104  inline float StMuFmsCluster::sigmaMin() const { return mSigmaMin; } // Maximum 2nd moment (along major axis).
105  inline float StMuFmsCluster::sigmaMax() const { return mSigmaMax; } // Minimum 2nd moment.
106  inline float StMuFmsCluster::chi2Ndf1Photon() const { return mChi2Ndf1Photon; } // chi^2/ndf for 1-photon fit to the cluster.
107  inline float StMuFmsCluster::chi2Ndf2Photon() const { return mChi2Ndf2Photon; } // chi^2/ndf for 2-photon fit to the cluster.
108  inline int StMuFmsCluster::id() const { return mId; } // Cluster ID
109 
110  inline TRefArray* StMuFmsCluster::hits() { return &mHits; }
111  inline const TRefArray* StMuFmsCluster::hits() const { return &mHits; }
112  inline TRefArray* StMuFmsCluster::photons() { return &mPhotons; }
113  inline const TRefArray* StMuFmsCluster::photons() const { return &mPhotons; }
114  inline void StMuFmsCluster::setDetectorId(unsigned short detector) { mDetectorId = detector; }
115  inline void StMuFmsCluster::setCategory(unsigned short category) { mCategory = category; }
116  inline void StMuFmsCluster::setEnergy(float energy) { mEnergy = energy; }
117  inline void StMuFmsCluster::setX(float x) { mX = x; }
118  inline void StMuFmsCluster::setY(float y) { mY = y; }
119  inline void StMuFmsCluster::setSigmaMin(float sigmaMin) { mSigmaMin = sigmaMin; }
120  inline void StMuFmsCluster::setSigmaMax(float sigmaMax) { mSigmaMax = sigmaMax; }
121  inline void StMuFmsCluster::setChi2Ndf1Photon(float chi2ndfph1) { mChi2Ndf1Photon = chi2ndfph1; }
122  inline void StMuFmsCluster::setChi2Ndf2Photon(float chi2ndfph2) { mChi2Ndf2Photon = chi2ndfph2; }
123  inline void StMuFmsCluster::setId(float cluid) { mId = cluid; }
124 
125 #endif // STROOT_STMUDSTMAKER_COMMON_STMUFMSCLUSTER_H_
Float_t mEnergy
Total energy contained in the cluster.
Float_t mX
Mean x (&quot;center of gravity&quot;)
TRefArray mHits
StMuFmsHits in the current cluster.
UShort_t mDetectorId
Detector ID as defined in database.
Float_t mY
Mean y (&quot;center of gravity&quot;)
UShort_t mCategory
Category of cluster (see EFmsClusterCategory)
TRefArray mPhotons
StMuFmsPoints in the cluster.