StRoot  1
StFmsPointPair.h
1 /**************************************************************************
2  *
3  * \$Id: StFmsPointPair.h,v 2.4 2017/02/20 16:32:58 ullrich Exp \$
4  *
5  * Author: Akio Ogawa, Sep 2015
6  **************************************************************************
7  *
8  * Description: Declaration of StFmsPointPair, the StEvent FMS pi0/EMJet
9  *
10  **************************************************************************
11  *
12  * \$Log: StFmsPointPair.h,v \$
13  * Revision 2.4 2017/02/20 16:32:58 ullrich
14  * Changing F to D for StLorentzVector
15  *
16  * Revision 2.3 2016/06/07 15:51:34 akio
17  * Making code better based on Coverity reports
18  *
19  * Revision 2.2 2015/10/21 14:52:54 ullrich
20  * Added methods x() and y()
21  *
22  * Revision 2.1 2015/09/14 16:15:50 ullrich
23  * Initial Revision.
24  *
25  **************************************************************************/
26 #ifndef StFmsPointPair_h
27 #define StFmsPointPair_h
28
29 #include "StLorentzVectorD.hh"
30 #include "StThreeVectorD.hh"
31 #include "StObject.h"
32 #include "StEnumerations.h"
33 #include "StFmsPoint.h"
34
35 class StFmsPointPair : public StObject {
36 public:
40  ~StFmsPointPair();
41
42  int nPoints() const;
44  vector<StFmsPoint*>& points();
45  StFmsPoint* point(int v);
46
47  const StLorentzVectorD& fourMomentum() const;
48  float energy() const;
49  float pT() const;
50  float eta() const;
51  float phi() const;
52  float mass() const;
53  float dgg() const; //only make sense if nPoint=2
54  float zgg() const; //only make sense if nPoint=2
55  float x() const;
56  float y() const;;
58  //for pair(npoint=2), 11=gg, 22=hh, 33=ee, 13=ge,etc
59  //for nPoint>2, LSD is first point and MSD is last
60
61  enum StFmsPointPairConsts {kFmsPointMaxCone=3};
63  float coneEnergy(int cone) const;
64  float coneEnergyFraction(int cone) const;
65  void setConeEnergy(int cone, float energy);
66
67  void print(int option=0);
68
69 private:
70  vector<StFmsPoint*> mPoints;
71  StLorentzVectorD mFourMomentum;
72  UInt_t mFpsPid;
74  Float_t mConeEnergy[kFmsPointMaxCone];
75
76  ClassDef(StFmsPointPair, 1)
77 };
78
79 inline int StFmsPointPair::nPoints() const {return mPoints.size();}
80 inline vector<StFmsPoint*>& StFmsPointPair::points() {return mPoints;}
81 inline const StLorentzVectorD& StFmsPointPair::fourMomentum() const { return mFourMomentum; }
82 inline float StFmsPointPair::energy() const { return (float)mFourMomentum.e(); }
83 inline float StFmsPointPair::pT() const { return (float)mFourMomentum.perp(); }
84 inline float StFmsPointPair::eta() const { return (float)mFourMomentum.pseudoRapidity(); }
85 inline float StFmsPointPair::phi() const { return (float)mFourMomentum.phi(); }
86 inline float StFmsPointPair::mass() const { return (float)mFourMomentum.m(); }
87 inline unsigned int StFmsPointPair::fpsPid() const { return mFpsPid; }
88
89 #endif // StFmsPointPair_h
90