61 #include "tables/St_ssdWafersPosition_Table.h"
62 #include "tables/St_ssdConfiguration_Table.h"
63 #include "tables/St_ssdDimensions_Table.h"
64 #include "tables/St_sdm_condition_db_Table.h"
65 #include "StSsdStripList.hh"
66 #include "StSsdStrip.hh"
67 #include "StSpaNoise.hh"
68 #include "StSpaListNoise.hh"
69 #include "StSsdUtil/StSsdClusterList.hh"
70 #include "StSsdUtil/StSsdCluster.hh"
71 #include "StSsdUtil/StSsdPackageList.hh"
72 #include "StSsdUtil/StSsdPackage.hh"
73 #include "StSsdUtil/StSsdPointList.hh"
74 #include "StSsdUtil/StSsdPoint.hh"
75 #include "StSsdUtil/StSsdClusterControl.h"
76 #include "StSsdDynamicControl.h"
77 #include "TGeoMatrix.h"
78 class St_ssdGainCalib;
88 void init(Int_t rId, Double_t *rD, Double_t *rT, Double_t *rN, Double_t *rX);
90 void setID(Int_t i){mId = i;}
91 void setDriftDirection(Double_t x1, Double_t x2, Double_t x3)
92 {Double_t *r = GetRotationMatrix(); r[0] = x1; r[3] = x2; r[6] = x3;}
93 void setTransverseDirection(Double_t x1, Double_t x2, Double_t x3)
94 {Double_t *r = GetRotationMatrix(); r[1] = x1; r[4] = x2; r[7] = x3;}
95 void setNormalDirection(Double_t x1, Double_t x2, Double_t x3)
96 {Double_t *r = GetRotationMatrix(); r[2] = x1; r[5] = x2; r[8] = x3;}
97 void setCenterPosition(Double_t x1, Double_t x2, Double_t x3) {Double_t *t = GetTranslation(); t[0] = x1; t[1] = x2; t[2] = x3;}
100 StSsdPointList* getDeadHits(Float_t ActiveLargeEdge, Float_t ActiveSmallEdge,Float_t Test);
101 StSsdPointList* getNonActivePointBorder(Float_t ActiveLargeEdge, Float_t ActiveSmallEdge);
107 Int_t getIdWafer() {
return mId; }
108 Int_t getId() {
return getIdWafer();}
109 Double_t d(Int_t i){Double_t *r = GetRotationMatrix();
return r[3*i]; }
110 Double_t t(Int_t i){Double_t *r = GetRotationMatrix();
return r[3*i+1];}
111 Double_t n(Int_t i){Double_t *r = GetRotationMatrix();
return r[3*i+2];}
112 Double_t x(Int_t i){Double_t *t = GetTranslation();
return t[i]; }
115 void addHit(Int_t rNId , Int_t rMcHit, Int_t rMcTrack, Float_t *rXg , Float_t rDe, Float_t *p);
116 void addNoiseToStripSignal(
StSpaNoise *ptr, Int_t iSide);
117 void addNoiseToStripSignal(
long nElectronInAMip,
long adcDynamic);
124 static Double_t myErf(Double_t x);
125 void setIsActive(Int_t rIsActive, Int_t iSide, Int_t rNStrip);
127 void setPedestalSigmaStrip(Int_t iStrip, Int_t iSide, Int_t iPedestal, Int_t iSigma,
StSsdDynamicControl *dynamicControl);
139 Int_t doSolvePackage(ssdDimensions_st *dimensions,
StSsdClusterControl *clusterControl,Float_t CalibArray);
140 Int_t doSolvePerfect(ssdDimensions_st *dimensions,
StSsdClusterControl *clusterControl,Float_t CalibArray);
142 void doLorentzShift(ssdDimensions_st *dimensions,Float_t mShift_hole,Float_t mShift_elec);
143 Int_t doLorentzShiftSide(Int_t side,Float_t shift,ssdDimensions_st *dimensions);
144 void convertAnalogToDigit(Double_t pairCreationEnergy);
145 void convertAnalogToDigit(Long_t nElectronInAMip,Long_t adcDynamic,Long_t nbitEncoding, Float_t daqCutValue);
146 Int_t convertDigitToAnalog(Double_t pairCreationEnergy);
147 Int_t convertUFrameToLocal(ssdDimensions_st *dimensions);
148 Int_t convertLocalToGlobal();
149 Int_t convertGlobalToLocal();
150 Int_t convertLocalToUFrame(Float_t ActiveLargeEdge, Float_t ActiveSmallEdge, Float_t Theta);
151 void convertHitToStrip(Float_t Pitch,
153 Int_t nstripInACluster,
156 Double_t parIndRightP,
157 Double_t parIndRightN,
158 Double_t parIndLeftP,
159 Double_t parIndLeftN,
163 void convertToStrip(Float_t Pitch,
165 Double_t pairCreationEnergy,
166 Int_t nstripInACluster,
169 Double_t parIndRightP,
170 Double_t parIndRightN,
171 Double_t parIndLeftP,
172 Double_t parIndLeftN,
177 void debugClusters();
178 Float_t* findAngle(Float_t *p, Float_t *alpha);
179 void pedestalSubstraction();
181 void updateStripList();
182 void zeroSubstraction();
183 void UndoLorentzShift(
StSsdPoint *ptr, Int_t iSide,Float_t mShift_hole,Float_t mShift_elec,Float_t pitch);
185 void SetDebug(Int_t k = 0) {mDebug = k;}
186 Int_t Debug() {
return mDebug;}
191 Float_t mPerfectMean;
192 Float_t mPerfectSigma;
StSsdPointList * getPoint()
Returns the point list attached to this wafer.
void addCluster(StSsdCluster *ptr, Int_t iSide)
Attaches the ptr cluster on the iSide of the wafer.
StSsdStripList * getStripP()
Returns the P-side strip list attached to this wafer.
void doLorentzShift(ssdDimensions_st *dimensions, Float_t mShift_hole, Float_t mShift_elec)
StSsdStripList * getStripN()
Returns the N-side strip list attached to this wafer.
void addPoint(StSsdPoint *ptr)
Attaches the ptr point on that wafer.
Int_t setMatcheds(ssdDimensions_st *dimensions, StSsdPoint *Point, StSsdCluster *pMatched, StSsdCluster *nMatched)
void addPackage(StSsdPackage *ptr)
Attaches the ptr package on that wafer.
Int_t doClusterSplitting(StSsdClusterControl *clusterControl, Int_t iSide)
Int_t doFindPackage(ssdDimensions_st *dimensions, StSsdClusterControl *clusterControl)
void addStrip(StSsdStrip *ptr, Int_t iSide)
void init(Int_t rId, Double_t *rD, Double_t *rT, Double_t *rN, Double_t *rX)
void doClusterisation(Int_t *numberOfCluster, StSsdClusterControl *clusterControl)
StSsdPackageList * getPackage()
Returns the package list attached to this wafer.
Int_t geoMatched(ssdDimensions_st *dimensions, StSsdCluster *ptr1, StSsdCluster *ptr2)
Determines if two clusters are geometricaly compatible.
StSsdClusterList * getClusterN()
Returns the N-side cluster list attached to this wafer.
StSsdClusterList * getClusterP()
Returns the P-side cluster list attached to this wafer.
Int_t doFindCluster(StSsdClusterControl *clusterControl, Int_t iSide)
Does the cluster finding.