StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSstPoint.hh
1 //$Id: StSstPoint.hh,v 1.1 2015/06/23 16:26:19 jeromel Exp $
2 //
3 //$Log: StSstPoint.hh,v $
4 //Revision 1.1 2015/06/23 16:26:19 jeromel
5 //First version created from the SSD code and reshaped
6 //
7 //Revision 1.1 2015/04/19 17:30:32 bouchet
8 //initial commit ; SST codes
9 //
10 
11 //fork from the SSD code, move along - see history therein
12 #ifndef STSSTPOINT_HH
13 #define STSSTPOINT_HH
14 #include "Rtypes.h"
16 {
17  public:
18  StSstPoint(Int_t rNPoint, Int_t rNWafer, Int_t rNumPackage, Int_t rKindPackage);
19  StSstPoint(Int_t rNId , Int_t rMcHit , Int_t rMcTrack , Float_t *rXg , Float_t rDe, Float_t *rAngle);
20  StSstPoint(const StSstPoint & originalPoint);
21  ~StSstPoint() {}
22 
23  StSstPoint& operator=(const StSstPoint originalPoint);
24 
25  void setAngle(Float_t rAngle, Int_t iR) { mAngle[iR] = rAngle; }
26  void setDe(Float_t rEnergyLoss, Int_t iR) { mDe[iR] = rEnergyLoss; }
27  void setEnergyLoss(Float_t adcP, Float_t adcN) {setDe((adcP + adcN)/2.,0); setDe((adcP - adcN)/2.,1); }
28  void setEnergyLossCorrected(Float_t adcP,Float_t adcN, Float_t gain);
29  void setFlag(Int_t rFlag) { mFlag = rFlag; }
30  void setIdClusterP(Int_t iIdClusterP) { mIdClusterP = iIdClusterP; }
31  void setIdClusterN(Int_t iIdClusterN) { mIdClusterN = iIdClusterN; }
32  void setMcHit(Int_t rMcHit, Int_t i = 0) {setNMchit(rMcHit,i);}
33  void setMcTrack(Int_t rMcTrack) { mMcTrack = rMcTrack; }
34  void setNextPoint(StSstPoint *rNextPoint) { mNextPoint = rNextPoint; }
35  void setNId(Int_t rNId) { mNId = rNId; }
36  void setNPoint(Int_t rNPoint) { mNPoint = rNPoint; }
37  void setNCluster(Int_t rNCluster) { mNCluster = rNCluster; }
38  void setNMatched(Int_t rNMatched) { mNMatched = rNMatched; }
39  void setNMchit(Int_t rNMchit, Int_t iR=0) { mMcHit[iR] = rNMchit; }
40  void setNWafer(Int_t rNWafer) { mNWafer = rNWafer; }
41  void setPrevPoint(StSstPoint *rPrevPoint) { mPrevPoint = rPrevPoint; }
42  void setPositionU(Float_t rPositionU, Int_t iR) { mPositionU[iR] = rPositionU; }
43  void setUpos(Float_t rUpos, Int_t iR) {setPositionU(rUpos,iR);}
44  void setXg(Float_t rXg, Int_t iR) { mXg[iR] = rXg; }
45  void setXl(Float_t rXl, Int_t iR) { mXl[iR] = rXl; }
46  //void setXg(float rXg,int iR);
47 
48  Float_t getDe(Int_t iR=0) { return mDe[iR]; }
49  Int_t getIdClusterP() { return mIdClusterP; }
50  Int_t getIdClusterN() { return mIdClusterN; }
51  Int_t getFlag() { return mFlag; }
52  Int_t getMcHit(Int_t i=0) { return getNMchit(i); }
53  Int_t getMcTrack() { return mMcTrack; }
54  Int_t getNId() { return mNId; }
55  Int_t getNPoint() { return mNPoint; }
56  Int_t getNCluster() { return mNCluster; }
57  Int_t getNMatched() { return mNMatched; }
58  Int_t getNMchit(Int_t iR) { return mMcHit[iR]; }
59  Int_t getNWafer() { return mNWafer; }
60  Float_t getPositionU(Int_t iR) { return mPositionU[iR]; }
61  Float_t getXg(Int_t iR) { return mXg[iR]; }
62  //float getXg(int iR);
63  Float_t getXl(Int_t iR) { return mXl[iR]; }
64 
65  StSstPoint* getPrevPoint() { return mPrevPoint; }
66  StSstPoint* getNextPoint() { return mNextPoint; }
67 
68  StSstPoint* giveCopy();
69 
70  private:
71  Char_t first[1];
72  Int_t mNId;
73  Int_t mMcHit[5]; // mcHit
74  Int_t mMcTrack;
75  Int_t mFlag;
76  Int_t mNPoint;
77  Int_t mNCluster;
78  Int_t mNMatched;
79  Int_t mIdClusterP;
80  Int_t mIdClusterN;
81  Int_t mNWafer;
82  Float_t mDe[2];
83  Float_t mPositionU[2]; // *mUpos;
84  Float_t mAngle[2];
85  Float_t mXg[3];
86  //float *mXg;
87  Float_t mXl[3];
88 
89  StSstPoint *mPrevPoint;
90  StSstPoint *mNextPoint;
91  Char_t last[1];
92 };
93 
94 #endif