53 #ifndef STSSDBARREL_HH
54 #define STSSDBARREL_HH
56 #include "StSsdUtil/StSsdWafer.hh"
57 #include "StSsdUtil/StSsdLadder.hh"
60 class ssdDimensions_st;
61 class ssdConfiguration_st;
62 class ssdWafersPosition_st;
66 class St_ssdWafersPosition;
67 class St_ssdStripCalib;
70 class St_sdm_calib_db;
71 class St_sdm_condition_db;
74 class St_ssdStripCalib;
78 class St_ssdGainCalibWafer;
81 class St_ssdWaferConfiguration;
90 StSsdBarrel(ssdDimensions_st *dimensions, ssdConfiguration_st *config=0);
96 void initLadders(St_ssdWafersPosition *wafpos);
99 void addNoiseToStrip(slsCtrl_st* ctrl);
100 Int_t readStripFromTable(St_spa_strip *spa_strip);
101 Int_t readStripFromTable(St_sls_strip *sls_strip);
107 Int_t readNoiseDefaultForSimu();
108 Int_t readConditionDbFromTable(St_sdm_condition_db *condition);
109 Int_t writeNoiseToFile(St_spa_strip *spa_strip);
110 Int_t writeNoiseToFile(St_ssdPedStrip *pedStrip,
char myLabel[]);
111 Int_t readClusterFromTable(St_scf_cluster *scf_cluster);
112 Int_t writeClusterToTable(St_scf_cluster *cluster);
113 Int_t writeClusterToTable(St_scf_cluster *scf_cluster,St_spa_strip *spa_strip);
115 Int_t writePointToContainer(St_scm_spt *scm_spt,
StSsdHitCollection* ssdHitColl,St_scf_cluster *scf_cluster);
117 Int_t writeStripToTable(St_spa_strip * spa_strip);
118 Int_t writeStripToTable(St_spa_strip * spa_strip,St_sls_strip *sls_strip);
119 Int_t writeNewNoiseToFile3(St_ssdPedStrip *pedStrip,
char myLabel[]);
120 void doSideClusterisation(Int_t *numberOfCluster);
121 void doSideClusterisation(Int_t *numberOfCluster,Int_t WafStatus[20][16]);
122 Int_t doClusterMatching(Float_t CalibArray[320]);
123 void doDaqSimulation(slsCtrl_st* ctrl);
125 void convertGlobalFrameToOther();
126 void convertUFrameToOther();
127 void convertToStrip(Double_t pairCreationEnergy,
128 Int_t nstripInACluster,
131 Double_t parIndRightP,
132 Double_t parIndRightN,
133 Double_t parIndLeftP,
136 void sortListStrip();
137 void sortListCluster();
138 Int_t getNumberOfLadders() {
return mNLadder;}
139 Int_t getNWaferPerLadder() {
return mNWaferPerLadder;}
140 Int_t getSsdLayer() {
return mSsdLayer;};
141 void Calculation_Ratio(
int idWafer,
int idClusterP,
int idClusterN,std::vector<const StMcSsdHit*> hitCol,
int *ratio,
int *idTruth);
142 static Int_t FindMcHit(
const std::vector<int> &
id,
const std::vector<const StMcSsdHit*> &hitCol);
143 Int_t isSplit(
StSsdCluster *currentCluster,
int iSide,
int lad,
int waf);
144 StSsdLadder *getLadder(Int_t i=0) {
return mLadders[i];}
145 ssdDimensions_st *getDimensions() {
return mDimensions;}
147 Int_t isActiveLadder(Int_t i);
148 void debugUnPeu(Int_t monLadder, Int_t monwafer);
149 void setSsdParameters(ssdDimensions_st *geom_par);
150 void setLorentzShift(ssdDimensions_st *geom_par);
151 void setClusterControl(
StSsdClusterControl *clusterControl) {mClusterControl = clusterControl;}
152 void initWafers(St_ssdWafersPosition *geom_class) {initLadders(geom_class);}
153 void renumHitAfterRemove();
155 Int_t idWaferToWaferNumb(Int_t idWafer);
156 Int_t idWaferToLadderNumb(Int_t idWafer);
157 Int_t waferNumbToIdWafer(Int_t waferNumb);
158 Int_t idWaferToWafer(Int_t idWafer) {
return (idWafer-7000)/100-1;}
161 void SetDebug(Int_t k = 0) {mDebug = k;}
162 Int_t Debug() {
return mDebug;}
167 static StSsdBarrel* Instance() {
return fSsdBarrel;}
171 Int_t mNWaferPerLadder;
172 Int_t mNStripPerSide;
173 Int_t mActiveLadders[20];
174 Float_t mDetectorLargeEdge;
175 Float_t mDetectorSmallEdge;
180 ssdDimensions_st *mDimensions;
StSsdBarrel(ssdDimensions_st *dimensions, ssdConfiguration_st *config=0)
Int_t readNoiseFromTable(St_sdm_calib_db *spa_noise, StSsdDynamicControl *dynamicControl)
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...