34 #ifndef STSSTBARREL_HH
35 #define STSSTBARREL_HH
37 #include "StSstUtil/StSstWafer.hh"
38 #include "StSstUtil/StSstLadder.hh"
42 class sstDimensions_st;
43 class sstConfiguration_st;
44 class sstWafersPosition_st;
46 class sstStripCalib_st;
50 class St_ssdWafersPosition;
51 class St_sstWafersPosition;
52 class St_sstStripCalib;
53 class St_ssdStripCalib;
56 class St_sdm_calib_db;
57 class St_sdm_condition_db;
60 class St_ssdStripCalib;
64 class St_ssdGainCalibWafer;
66 class St_ssdWaferConfiguration;
68 class St_sstGainCalibWafer;
70 class St_sstWaferConfiguration;
79 StSstBarrel(sstDimensions_st *dimensions, sstConfiguration_st *config=0);
85 void initLadders(St_sstWafersPosition *wafpos);
88 void addNoiseToStrip(slsCtrl_st* ctrl);
89 Int_t readStripFromTable(St_spa_strip *spa_strip);
90 Int_t readStripFromTable(St_sls_strip *sls_strip);
97 Int_t readNoiseDefaultForSimu();
98 Int_t readConditionDbFromTable(St_sdm_condition_db *condition);
99 Int_t writeNoiseToFile(St_spa_strip *spa_strip);
100 Int_t writeNoiseToFile(St_ssdPedStrip *pedStrip,
char myLabel[]);
101 Int_t readClusterFromTable(St_scf_cluster *scf_cluster);
102 Int_t writeClusterToTable(St_scf_cluster *cluster);
103 Int_t writeClusterToTable(St_scf_cluster *scf_cluster,St_spa_strip *spa_strip);
106 Int_t writeStripToTable(St_spa_strip * spa_strip);
107 Int_t writeStripToTable(St_spa_strip * spa_strip,St_sls_strip *sls_strip);
108 Int_t writeNewNoiseToFile3(St_ssdPedStrip *pedStrip,
char myLabel[]);
109 void doSideClusterisation(Int_t *numberOfCluster);
110 void doSideClusterisation(Int_t *numberOfCluster,Int_t WafStatus[20][16]);
111 Int_t doClusterMatching(Float_t CalibArray[320]);
112 void doDaqSimulation(slsCtrl_st* ctrl);
114 void convertGlobalFrameToOther();
115 void convertUFrameToOther();
116 void convertToStrip(Double_t pairCreationEnergy,
117 Int_t nstripInACluster,
120 Double_t parIndRightP,
121 Double_t parIndRightN,
122 Double_t parIndLeftP,
125 void sortListStrip();
126 void sortListCluster();
127 Int_t getNumberOfLadders() {
return mNLadder;}
128 Int_t getNWaferPerLadder() {
return mNWaferPerLadder;}
129 Int_t getSstLayer() {
return mSstLayer;};
130 void Calculation_Ratio(
int idWafer,
int idClusterP,
int idClusterN,std::vector<const StMcSsdHit*> hitCol,
int *ratio,
int *idTruth);
131 static Int_t FindMcHit(
const std::vector<int> &
id,
const std::vector<const StMcSsdHit*> &hitCol);
132 Int_t isSplit(
StSstCluster *currentCluster,
int iSide,
int lad,
int waf);
133 StSstLadder *getLadder(Int_t i=0) {
return mLadders[i];}
134 sstDimensions_st *getDimensions() {
return mDimensions;}
136 Int_t isActiveLadder(Int_t i);
137 void debugUnPeu(Int_t monLadder, Int_t monwafer);
138 void setSstParameters(sstDimensions_st *geom_par);
139 void setLorentzShift(sstDimensions_st *geom_par);
140 void setClusterControl(
StSstClusterControl *clusterControl) {mClusterControl = clusterControl;}
141 void initWafers(St_sstWafersPosition *geom_class) {initLadders(geom_class);}
142 void renumHitAfterRemove();
144 Int_t idWaferToWaferNumb(Int_t idWafer);
145 Int_t idWaferToLadderNumb(Int_t idWafer);
146 Int_t waferNumbToIdWafer(Int_t waferNumb);
147 Int_t idWaferToWafer(Int_t idWafer) {
return (idWafer-7000)/100-1;}
150 void SetDebug(Int_t k = 0) {mDebug = k;}
151 Int_t Debug() {
return mDebug;}
156 static StSstBarrel* Instance() {
return fSstBarrel;}
160 Int_t mNWaferPerLadder;
161 Int_t mNStripPerSide;
162 Int_t mActiveLadders[20];
163 Float_t mDetectorLargeEdge;
164 Float_t mDetectorSmallEdge;
169 sstDimensions_st *mDimensions;
StSstBarrel(sstDimensions_st *dimensions, sstConfiguration_st *config=0)
Int_t readNoiseFromTable(St_sdm_calib_db *spa_noise, StSstDynamicControl *dynamicControl)
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...