36 #include "tables/St_sstWafersPosition_Table.h"
37 #include "tables/St_sstConfiguration_Table.h"
38 #include "tables/St_sstDimensions_Table.h"
39 #include "tables/St_sdm_condition_db_Table.h"
40 #include "StSstStripList.hh"
41 #include "StSstStrip.hh"
42 #include "StSpaNoise.hh"
43 #include "StSpaListNoise.hh"
44 #include "StSstUtil/StSstClusterList.hh"
45 #include "StSstUtil/StSstCluster.hh"
46 #include "StSstUtil/StSstPackageList.hh"
47 #include "StSstUtil/StSstPackage.hh"
48 #include "StSstUtil/StSstPointList.hh"
49 #include "StSstUtil/StSstPoint.hh"
50 #include "StSstUtil/StSstClusterControl.h"
51 #include "StSstDynamicControl.h"
52 #include "TGeoMatrix.h"
62 void init(Int_t rId, Double_t *rD, Double_t *rN, Double_t *rT, Double_t *rX);
64 void setID(Int_t i){mId = i;}
65 void setDriftDirection(Double_t x1, Double_t x2, Double_t x3)
66 {Double_t *r = GetRotationMatrix(); r[0] = x1; r[3] = x2; r[6] = x3;}
67 void setNormalDirection(Double_t x1, Double_t x2, Double_t x3)
68 {Double_t *r = GetRotationMatrix(); r[1] = x1; r[4] = x2; r[7] = x3;}
69 void setTransverseDirection(Double_t x1, Double_t x2, Double_t x3)
70 {Double_t *r = GetRotationMatrix(); r[2] = x1; r[5] = x2; r[8] = x3;}
71 void setCenterPosition(Double_t x1, Double_t x2, Double_t x3) {Double_t *t = GetTranslation(); t[0] = x1; t[1] = x2; t[2] = x3;}
74 StSstPointList* getDeadHits(Float_t ActiveLargeEdge, Float_t ActiveSmallEdge,Float_t Test);
75 StSstPointList* getNonActivePointBorder(Float_t ActiveLargeEdge, Float_t ActiveSmallEdge);
81 Int_t getIdWafer() {
return mId; }
82 Int_t getId() {
return getIdWafer();}
83 Double_t d(Int_t i){Double_t *r = GetRotationMatrix();
return r[3*i]; }
84 Double_t n(Int_t i){Double_t *r = GetRotationMatrix();
return r[3*i+1];}
85 Double_t t(Int_t i){Double_t *r = GetRotationMatrix();
return r[3*i+2];}
86 Double_t x(Int_t i){Double_t *t = GetTranslation();
return t[i]; }
89 void addHit(Int_t rNId , Int_t rMcHit, Int_t rMcTrack, Float_t *rXg , Float_t rDe, Float_t *p);
90 void addNoiseToStripSignal(
StSpaNoise *ptr, Int_t iSide);
91 void addNoiseToStripSignal(
long nElectronInAMip,
long adcDynamic);
98 static Double_t myErf(Double_t x);
99 void setIsActive(Int_t rIsActive, Int_t iSide, Int_t rNStrip);
101 void setPedestalSigmaStrip(Int_t iStrip, Int_t iSide, Int_t iPedestal, Int_t iSigma,
StSstDynamicControl *dynamicControl);
113 Int_t doSolvePackage(sstDimensions_st *dimensions,
StSstClusterControl *clusterControl,Float_t CalibArray);
114 Int_t doSolvePerfect(sstDimensions_st *dimensions,
StSstClusterControl *clusterControl,Float_t CalibArray);
116 void doLorentzShift(sstDimensions_st *dimensions,Float_t mShift_hole,Float_t mShift_elec);
117 void doLorentzShiftSide(Float_t shift, Float_t pitch,
StSstClusterList *currentList);
118 void convertAnalogToDigit(Double_t pairCreationEnergy);
119 void convertAnalogToDigit(Long_t nElectronInAMip,Long_t adcDynamic,Long_t nbitEncoding, Float_t daqCutValue);
120 Int_t convertDigitToAnalog(Double_t pairCreationEnergy);
121 Int_t convertUFrameToLocal(sstDimensions_st *dimensions);
122 Int_t convertLocalToGlobal();
123 Int_t convertGlobalToLocal();
124 Int_t convertLocalToUFrame(Float_t ActiveLargeEdge, Float_t ActiveSmallEdge, Float_t Theta);
125 void convertHitToStrip(Float_t Pitch,
127 Int_t nstripInACluster,
130 Double_t parIndRightP,
131 Double_t parIndRightN,
132 Double_t parIndLeftP,
133 Double_t parIndLeftN,
137 void convertToStrip(Float_t Pitch,
139 Double_t pairCreationEnergy,
140 Int_t nstripInACluster,
143 Double_t parIndRightP,
144 Double_t parIndRightN,
145 Double_t parIndLeftP,
146 Double_t parIndLeftN,
151 void debugClusters();
152 Float_t* findAngle(Float_t *p, Float_t *alpha);
153 void pedestalSubstraction();
155 void updateStripList();
156 void zeroSubstraction();
157 void UndoLorentzShift(
StSstPoint *ptr, Int_t iSide,Float_t mShift_hole,Float_t mShift_elec,Float_t pitch);
159 void SetDebug(Int_t k = 0) {mDebug = k;}
160 Int_t Debug() {
return mDebug;}
165 Float_t mPerfectMean;
166 Float_t mPerfectSigma;
void doLorentzShift(sstDimensions_st *dimensions, Float_t mShift_hole, Float_t mShift_elec)
StSstClusterList * getClusterP()
Returns the P-side cluster list attached to this wafer.
void addPoint(StSstPoint *ptr)
Attaches the ptr point on that wafer.
StSstStripList * getStripP()
Returns the P-side strip list attached to this wafer.
Int_t doFindPackage(sstDimensions_st *dimensions, StSstClusterControl *clusterControl)
Int_t geoMatched(sstDimensions_st *dimensions, StSstCluster *ptr1, StSstCluster *ptr2)
Determines if two clusters are geometricaly compatible.
void addCluster(StSstCluster *ptr, Int_t iSide)
Attaches the ptr cluster on the iSide of the wafer.
StSstPointList * getPoint()
Returns the point list attached to this wafer.
void addStrip(StSstStrip *ptr, Int_t iSide)
StSstClusterList * getClusterN()
Returns the N-side cluster list attached to this wafer.
Int_t doClusterSplitting(StSstClusterControl *clusterControl, Int_t iSide)
Int_t doFindCluster(StSstClusterControl *clusterControl, Int_t iSide)
Does the cluster finding.
StSstPackageList * getPackage()
Returns the package list attached to this wafer.
void addPackage(StSstPackage *ptr)
Attaches the ptr package on that wafer.
void setMatcheds(sstDimensions_st *dimensions, StSstPoint *Point, StSstCluster *pMatched, StSstCluster *nMatched)
StSstStripList * getStripN()
Returns the N-side strip list attached to this wafer.
void doClusterisation(Int_t *numberOfCluster, StSstClusterControl *clusterControl)