12 #include "StFgtSlowSimuMaker.h"
15 #include "StFgtDbMaker/StFgtDbMaker.h"
23 StFgtSlowSimuMaker::responseMipModel(TVector3 Rloc, TVector3 Dloc){
36 Double_t zLocEnd=Rloc.z()+Dloc.z();
37 Double_t pathLength=Dloc.Mag();
38 TVector3 rv=Dloc; rv=rv.Unit();
41 Double_t totalEnergy_eV = 0;
46 Double_t sum1=0,sum2=0;
49 Double_t stepLength = - TMath::Log(mRnd->Uniform()) / par_pairsPerCm;
51 if (path > pathLength)
break;
54 Int_t rndBin = ((int) (10000.0 * mRnd->Uniform()));
56 if(rndBin > par_cutoffOfBichel) rndBin = par_cutoffOfBichel;
58 Double_t eL_eV=fgtDb->getEloss(rndBin);
60 Int_t nAnyPair = 1 + ((int) ((eL_eV-15.4)/26.));
61 if (nAnyPair < 0)
continue;
62 totalEnergy_eV += eL_eV;
64 TVector3 r=Rloc+ path*rv;
69 if(par_transDiffusionPerPath>0.001) {
70 Double_t zDrift=zLocEnd-r.z();
79 if(zDrift < 0) zDrift *= -1.0;
81 Double_t perpDiffRms=par_transDiffusionPerPath*sqrt(zDrift);
82 Double_t phi=mRnd->Uniform(TMath::TwoPi());
83 Double_t perp=mRnd->Gaus(0,perpDiffRms);
84 TVector3 dR; dR.SetPtThetaPhi(perp,0.,phi);
87 #ifdef __FGT_QA_HISTO__
88 hA[27]->Fill(zDrift*10);
89 hA[28]->Fill( dR.x()*1e4, dR.y()*1e4);
95 #ifdef __FGT_QA_HISTO__
102 #ifdef __FGT_QA_HISTO__
103 hA[21]->Fill(nPrimPair );
104 hA[22]->Fill(totalEnergy_eV/ 1000.);
105 hA[23]->Fill(nTotPair );
106 hA[24]->Fill(path*10 );
107 Double_t meanPath=sum2/sum1;
108 Double_t rvT=rv.Perp();
110 Double_t meanTpath=meanPath*rvT;
112 hA[25]->Fill(meanPath*10);
113 hA[26]->Fill(meanTpath*10);
124 StFgtSlowSimuMaker::addHit(TVector3 rLoc, Double_t ampl) {
128 Float_t xH=fabs(rLoc.x());
129 Float_t yH=fabs(rLoc.y());
134 TAxis *axX=quadDigitizationXY->GetXaxis();
135 Int_t ixH=axX->FindFixBin(xH);
136 Int_t mxX=axX->GetNbins();
137 Int_t ix1=ixH-par_binStep,ix2=ixH+par_binStep;
141 TAxis *axY=quadDigitizationXY->GetYaxis();
142 Int_t iyH=axY->FindFixBin(yH);
143 Int_t mxY=axY->GetNbins();
144 Int_t iy1=iyH-par_binStep,iy2=iyH+par_binStep;
151 for(ix=ix1;ix<=ix2;ix++) {
152 Float_t x=axX->GetBinCenter(ix);
153 Float_t val_x=amplFunc(x-xH);
155 for(iy=iy1;iy<=iy2;iy++) {
156 Float_t y=axY->GetBinCenter(iy);
157 Float_t val_y=amplFunc(y-yH);
158 Float_t val2D=ampl*val_x*val_y;
160 quadDigitizationXY->Fill(x,y,val2D);
161 #ifdef __FGT_QA_HISTO__
162 digXYAll->Fill(x,y,val2D);
164 if(valMax<val2D) valMax=val2D;