21 #include "StSsdUtil/StSsdPoint.hh"
24 #include "StMessMgr.h"
26 StSsdPoint::StSsdPoint(Int_t rNPoint, Int_t rNWafer, Int_t rNumPackage, Int_t rKindPackage)
28 memset (first, 0, last - first);
30 mNCluster = rNumPackage;
31 mNMatched = rKindPackage;
35 StSsdPoint::StSsdPoint(Int_t rNId , Int_t rMcHit , Int_t rMcTrack , Float_t *rXg , Float_t rDe, Float_t *rAngle)
37 memset (first, 0, last - first);
41 for(Int_t k = 0; k < 3; k++) mXg[k] = rXg[k];
42 for(Int_t i = 0; i < 2; i++) mAngle[i] = rAngle[i];
46 StSsdPoint::StSsdPoint(
const StSsdPoint & originalPoint)
48 memset (first, 0, last - first);
49 mNId = originalPoint.mNId;
50 mFlag = originalPoint.mFlag;
51 mNPoint = originalPoint.mNPoint;
52 mNCluster = originalPoint.mNCluster;
53 mNMatched = originalPoint.mNMatched;
54 mIdClusterP = originalPoint.mIdClusterP;
55 mIdClusterN = originalPoint.mIdClusterN;
56 mNWafer = originalPoint.mNWafer;
59 for (i = 0; i < 5; i++)
60 mMcHit[i] = originalPoint.mMcHit[i];
62 for (i = 0; i < 3; i++)
64 mXg[i] = originalPoint.mXg[i];
65 mXl[i] = originalPoint.mXl[i];
68 for (i = 0; i < 2; i++)
70 mPositionU[i] = originalPoint.mPositionU[i];
71 mDe[i] = originalPoint.mDe[i];
77 memset (first, 0, last - first);
78 mNId = originalPoint.mNId;
79 mFlag = originalPoint.mFlag;
80 mNPoint = originalPoint.mNPoint;
81 mNCluster = originalPoint.mNCluster;
82 mNMatched = originalPoint.mNMatched;
83 mIdClusterP = originalPoint.mIdClusterP;
84 mIdClusterN = originalPoint.mIdClusterN;
85 mNWafer = originalPoint.mNWafer;
88 for (i = 0; i < 5; i++)
89 mMcHit[i] = originalPoint.mMcHit[i];
91 for (i = 0; i < 3; i++)
93 mXg[i] = originalPoint.mXg[i];
94 mXl[i] = originalPoint.mXl[i];
97 for (i = 0; i < 2; i++)
99 mPositionU[i] = originalPoint.mPositionU[i];
100 mDe[i] = originalPoint.mDe[i];
110 ptrClone->mNId = mNId;
111 ptrClone->mFlag = mFlag;
112 ptrClone->mIdClusterP = mIdClusterP;
113 ptrClone->mIdClusterN = mIdClusterN;
114 for (i = 0; i < 5; i++)
115 ptrClone->mMcHit[i] = mMcHit[i];
117 for (i = 0; i < 3; i++)
118 { ptrClone->mXg[i] = mXg[i];
119 ptrClone->mXl[i] = mXl[i];
121 for (i = 0; i < 2; i++)
122 { ptrClone->mPositionU[i] = mPositionU[i];
123 ptrClone->mDe[i] = mDe[i];
128 void StSsdPoint::setEnergyLossCorrected(Float_t adcP, Float_t adcN, Float_t gain)
135 if (gain==0) gain = 1;
153 setDe((adcP*gain + adcN)/2.,0);
154 setDe((adcP*gain - adcN)/2.,1);