17 #include "StSstUtil/StSstPoint.hh"
20 #include "StMessMgr.h"
22 StSstPoint::StSstPoint(Int_t rNPoint, Int_t rNWafer, Int_t rNumPackage, Int_t rKindPackage)
24 memset (first, 0, last - first);
26 mNCluster = rNumPackage;
27 mNMatched = rKindPackage;
37 StSstPoint::StSstPoint(Int_t rNId , Int_t rMcHit , Int_t rMcTrack , Float_t *rXg , Float_t rDe, Float_t *rAngle)
39 memset (first, 0, last - first);
43 for(Int_t k = 0; k < 3; k++) mXg[k] = rXg[k];
44 for(Int_t i = 0; i < 2; i++) mAngle[i] = rAngle[i];
57 StSstPoint::StSstPoint(
const StSstPoint & originalPoint)
59 memset (first, 0, last - first);
60 mNId = originalPoint.mNId;
61 mFlag = originalPoint.mFlag;
62 mNPoint = originalPoint.mNPoint;
63 mNCluster = originalPoint.mNCluster;
64 mNMatched = originalPoint.mNMatched;
65 mIdClusterP = originalPoint.mIdClusterP;
66 mIdClusterN = originalPoint.mIdClusterN;
67 mNWafer = originalPoint.mNWafer;
68 mPrevPoint = originalPoint.mPrevPoint;
69 mNextPoint = originalPoint.mNextPoint;
70 mMcTrack = originalPoint.mMcTrack;
72 for (i = 0; i < 5; i++)
73 mMcHit[i] = originalPoint.mMcHit[i];
75 for (i = 0; i < 3; i++)
77 mXg[i] = originalPoint.mXg[i];
78 mXl[i] = originalPoint.mXl[i];
81 for (i = 0; i < 2; i++)
83 mPositionU[i] = originalPoint.mPositionU[i];
84 mDe[i] = originalPoint.mDe[i];
90 memset (first, 0, last - first);
91 mNId = originalPoint.mNId;
92 mFlag = originalPoint.mFlag;
93 mNPoint = originalPoint.mNPoint;
94 mNCluster = originalPoint.mNCluster;
95 mNMatched = originalPoint.mNMatched;
96 mIdClusterP = originalPoint.mIdClusterP;
97 mIdClusterN = originalPoint.mIdClusterN;
98 mNWafer = originalPoint.mNWafer;
101 for (i = 0; i < 5; i++)
102 mMcHit[i] = originalPoint.mMcHit[i];
104 for (i = 0; i < 3; i++)
106 mXg[i] = originalPoint.mXg[i];
107 mXl[i] = originalPoint.mXl[i];
110 for (i = 0; i < 2; i++)
112 mPositionU[i] = originalPoint.mPositionU[i];
113 mDe[i] = originalPoint.mDe[i];
123 ptrClone->mNId = mNId;
124 ptrClone->mFlag = mFlag;
125 ptrClone->mIdClusterP = mIdClusterP;
126 ptrClone->mIdClusterN = mIdClusterN;
127 for (i = 0; i < 5; i++)
128 ptrClone->mMcHit[i] = mMcHit[i];
130 for (i = 0; i < 3; i++)
131 { ptrClone->mXg[i] = mXg[i];
132 ptrClone->mXl[i] = mXl[i];
134 for (i = 0; i < 2; i++)
135 { ptrClone->mPositionU[i] = mPositionU[i];
136 ptrClone->mDe[i] = mDe[i];
141 void StSstPoint::setEnergyLossCorrected(Float_t adcP, Float_t adcN, Float_t gain)
143 if (gain==0) gain = 1;
144 setDe((adcP*gain + adcN)/2.,0);
145 setDe((adcP*gain - adcN)/2.,1);