StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSsdPoint.hh
1 // $Id: StSsdPoint.hh,v 1.2 2007/03/27 23:11:48 bouchet Exp $
2 //
3 // $Log: StSsdPoint.hh,v $
4 // Revision 1.2 2007/03/27 23:11:48 bouchet
5 // Add a method to use the gain calibration for the Charge Matching between pulse of p and n sides
6 //
7 // Revision 1.1 2006/10/16 16:43:29 bouchet
8 // StSsdUtil regroups now methods for the classes StSsdStrip, StSsdCluster and StSsdPoint
9 //
10 // Revision 1.3 2005/03/18 16:29:08 lmartin
11 // new members mIdClusterP and mIdClusterN and associated methods
12 //
13 // Revision 1.2 2005/03/18 14:19:44 lmartin
14 // missing CVS header added
15 //
16 
17 #ifndef STSSDPOINT_HH
18 #define STSSDPOINT_HH
19 #include "Rtypes.h"
21 {
22  public:
23  StSsdPoint(Int_t rNPoint, Int_t rNWafer, Int_t rNumPackage, Int_t rKindPackage);
24  StSsdPoint(Int_t rNId , Int_t rMcHit , Int_t rMcTrack , Float_t *rXg , Float_t rDe, Float_t *rAngle);
25  StSsdPoint(const StSsdPoint & originalPoint);
26  ~StSsdPoint() {}
27 
28  StSsdPoint& operator=(const StSsdPoint originalPoint);
29 
30  void setAngle(Float_t rAngle, Int_t iR) { mAngle[iR] = rAngle; }
31  void setDe(Float_t rEnergyLoss, Int_t iR) { mDe[iR] = rEnergyLoss; }
32  void setEnergyLoss(Float_t adcP, Float_t adcN) {setDe((adcP + adcN)/2.,0); setDe((adcP - adcN)/2.,1); }
33  void setEnergyLossCorrected(Float_t adcP,Float_t adcN, Float_t gain);
34  void setFlag(Int_t rFlag) { mFlag = rFlag; }
35  void setIdClusterP(Int_t iIdClusterP) { mIdClusterP = iIdClusterP; }
36  void setIdClusterN(Int_t iIdClusterN) { mIdClusterN = iIdClusterN; }
37  void setMcHit(Int_t rMcHit, Int_t i = 0) {setNMchit(rMcHit,i);}
38  void setMcTrack(Int_t rMcTrack) { mMcTrack = rMcTrack; }
39  void setNextPoint(StSsdPoint *rNextPoint) { mNextPoint = rNextPoint; }
40  void setNId(Int_t rNId) { mNId = rNId; }
41  void setNPoint(Int_t rNPoint) { mNPoint = rNPoint; }
42  void setNCluster(Int_t rNCluster) { mNCluster = rNCluster; }
43  void setNMatched(Int_t rNMatched) { mNMatched = rNMatched; }
44  void setNMchit(Int_t rNMchit, Int_t iR=0) { mMcHit[iR] = rNMchit; }
45  void setNWafer(Int_t rNWafer) { mNWafer = rNWafer; }
46  void setPrevPoint(StSsdPoint *rPrevPoint) { mPrevPoint = rPrevPoint; }
47  void setPositionU(Float_t rPositionU, Int_t iR) { mPositionU[iR] = rPositionU; }
48  void setUpos(Float_t rUpos, Int_t iR) {setPositionU(rUpos,iR);}
49  void setXg(Float_t rXg, Int_t iR) { mXg[iR] = rXg; }
50  void setXl(Float_t rXl, Int_t iR) { mXl[iR] = rXl; }
51  //void setXg(float rXg,int iR);
52 
53  Float_t getDe(Int_t iR=0) { return mDe[iR]; }
54  Int_t getIdClusterP() { return mIdClusterP; }
55  Int_t getIdClusterN() { return mIdClusterN; }
56  Int_t getFlag() { return mFlag; }
57  Int_t getMcHit(Int_t i=0) { return getNMchit(i); }
58  Int_t getMcTrack() { return mMcTrack; }
59  Int_t getNId() { return mNId; }
60  Int_t getNPoint() { return mNPoint; }
61  Int_t getNCluster() { return mNCluster; }
62  Int_t getNMatched() { return mNMatched; }
63  Int_t getNMchit(Int_t iR) { return mMcHit[iR]; }
64  Int_t getNWafer() { return mNWafer; }
65  Float_t getPositionU(Int_t iR) { return mPositionU[iR]; }
66  Float_t getXg(Int_t iR) { return mXg[iR]; }
67  //float getXg(int iR);
68  Float_t getXl(Int_t iR) { return mXl[iR]; }
69 
70  StSsdPoint* getPrevPoint() { return mPrevPoint; }
71  StSsdPoint* getNextPoint() { return mNextPoint; }
72 
73  StSsdPoint* giveCopy();
74 
75  private:
76  Char_t first[1];
77  Int_t mNId;
78  Int_t mMcHit[5]; // mcHit
79  Int_t mMcTrack;
80  Int_t mFlag;
81  Int_t mNPoint;
82  Int_t mNCluster;
83  Int_t mNMatched;
84  Int_t mIdClusterP;
85  Int_t mIdClusterN;
86  Int_t mNWafer;
87  Float_t mDe[2];
88  Float_t mPositionU[2]; // *mUpos;
89  Float_t mAngle[2];
90  Float_t mXg[3];
91  //float *mXg;
92  Float_t mXl[3];
93 
94  StSsdPoint *mPrevPoint;
95  StSsdPoint *mNextPoint;
96  Char_t last[1];
97 };
98 
99 #endif