11 double mt,
double tn,
double dc,
double tm,
double cdr,
double dv,
double av,
double ptx,
double pty,
int verbosity) {
30 std::cout <<
"ChargeDrifterFP420: call constructor" << std::endl;
31 std::cout <<
"ldriftcurrX= " << ldriftcurrX <<
"ldriftcurrY= " << ldriftcurrY << std::endl;
33 std::cout <<
"ChargeDrifterFP420:----------------------" << std::endl;
38 const G4ThreeVector &driftDir,
43 std::cout <<
"ChargeDrifterFP420: collection_type call drift" << std::endl;
48 _temp.resize(ion.size());
50 for (
unsigned int i = 0;
i < ion.size();
i++) {
51 _temp[
i] =
drift(ion[
i], driftDir, xytype);
57 const G4ThreeVector &
drift,
66 double sliX = (edu).
x();
67 double sliY = (edu).y();
68 double sliZ = (edu).z();
74 double pathFraction = 0., pathValue = 0.;
75 double tanShiftAngleX = 0., tanShiftAngleY = 0., tanShiftAngleZ = 0.;
76 double xDriftDueToField = 0., yDriftDueToField = 0., zDriftDueToField = 0.;
78 std::cout <<
"=============================================================" 81 std::cout <<
"ChargeDrifterFP420: xytype= " << xytype << std::endl;
82 std::cout <<
"constTe= " << constTe <<
"ldriftcurrX= " << ldriftcurrX <<
"ldriftcurrY= " << ldriftcurrY
84 std::cout <<
"1currX = " << currX <<
" 1currY = " << currY <<
" 1currZ = " << currZ << std::endl;
100 pathValue = fabs(sliX) -
int(fabs(sliX / (2 * ldriftcurrX)) + 0.5) * (2 * ldriftcurrX);
101 pathValue = fabs(pathValue);
102 pathFraction = pathValue / ldriftcurrX;
104 std::cout <<
"==================================" << std::endl;
105 std::cout <<
"fabs(sliX)= " << fabs(sliX) <<
"ldriftcurrX= " << ldriftcurrX << std::endl;
106 std::cout <<
"fabs(sliX/(2*ldriftcurrX))+0.5= " << fabs(sliX / (2 * ldriftcurrX)) + 0.5 << std::endl;
107 std::cout <<
"int(fabs(sliX/(2*ldriftcurrX))+0.5)*(2*ldriftcurrX)= " 108 <<
int(fabs(sliX / (2 * ldriftcurrX)) + 0.5) * (2 * ldriftcurrX) << std::endl;
109 std::cout <<
"pathValue= " << pathValue << std::endl;
110 std::cout <<
"pathFraction= " << pathFraction << std::endl;
111 std::cout <<
"==================================" << std::endl;
114 pathFraction = pathFraction > 0. ? pathFraction : 0.;
115 pathFraction = pathFraction < 1. ? pathFraction : 1.;
118 = pathValue * tanShiftAngleY;
120 = pathValue * tanShiftAngleZ;
122 currY = sliY + yDriftDueToField;
123 currZ = sliZ + zDriftDueToField;
128 else if (xytype == 1) {
133 pathValue = fabs(sliY) -
int(fabs(sliY / (2 * ldriftcurrY)) + 0.5) * (2 * ldriftcurrY);
134 pathValue = fabs(pathValue);
135 pathFraction = pathValue / ldriftcurrY;
140 std::cout <<
"==================================" << std::endl;
141 std::cout <<
"fabs(sliY)= " << fabs(sliY) <<
"ldriftcurrY= " << ldriftcurrY << std::endl;
142 std::cout <<
"fabs(sliY/(2*ldriftcurrY))+0.5= " << fabs(sliY / (2 * ldriftcurrY)) + 0.5 << std::endl;
143 std::cout <<
"int(fabs(sliY/(2*ldriftcurrY))+0.5)*(2*ldriftcurrY)= " 144 <<
int(fabs(sliY / (2 * ldriftcurrY)) + 0.5) * (2 * ldriftcurrY) << std::endl;
145 std::cout <<
"pathValue= " << pathValue << std::endl;
146 std::cout <<
"pathFraction= " << pathFraction << std::endl;
147 std::cout <<
"==================================" << std::endl;
150 if (pathFraction < 0. || pathFraction > 1.)
151 std::cout <<
"ChargeDrifterFP420: ERROR:pathFraction=" << pathFraction << std::endl;
152 pathFraction = pathFraction > 0. ? pathFraction : 0.;
153 pathFraction = pathFraction < 1. ? pathFraction : 1.;
155 = pathValue * tanShiftAngleX;
158 = pathValue * tanShiftAngleZ;
160 currX = sliX + xDriftDueToField;
161 currZ = sliZ + zDriftDueToField;
183 double bbb = 1. - 2 * depV * pathFraction / (depV + appV);
185 std::cout <<
"ChargeDrifterFP420:ERROR: check your Voltage for log(bbb) bbb=" << bbb << std::endl;
186 double driftTime = -constTe *
log(bbb) + startT0;
190 double sigma =
sqrt(2. * constDe * driftTime * 100.);
196 std::cout <<
"ChargeDrifterFP420: drift: xytype=" << xytype <<
"pathFraction=" << pathFraction << std::endl;
197 std::cout <<
" constTe= " << constTe <<
" driftTime = " << driftTime <<
" startT0 = " << startT0 << std::endl;
198 std::cout <<
" log = " <<
log(1. - 2 * depV * pathFraction / (depV + appV)) << std::endl;
199 std::cout <<
" negativ inside log = " << -2 * depV * pathFraction / (depV + appV) << std::endl;
200 std::cout <<
" constDe = " << constDe <<
" sigma = " << sigma << std::endl;
202 std::cout <<
"ChargeDrifterFP420: drift: xytype=" << xytype <<
"pathValue=" << pathValue << std::endl;
203 std::cout <<
" tanShiftAngleX = " << tanShiftAngleX <<
" tanShiftAngleY = " << tanShiftAngleY
204 <<
" tanShiftAngleZ = " << tanShiftAngleZ << std::endl;
205 std::cout <<
"sliX = " << sliX <<
" sliY = " << sliY <<
" sliZ = " << sliZ << std::endl;
206 std::cout <<
"pathFraction = " << pathFraction <<
" driftTime = " << driftTime << std::endl;
207 std::cout <<
"sigma = " << sigma << std::endl;
208 std::cout <<
"xDriftDueToField = " << xDriftDueToField <<
" yDriftDueToField = " << yDriftDueToField
209 <<
" zDriftDueToField = " << zDriftDueToField << std::endl;
210 std::cout <<
"2currX = " << currX <<
" 2currY = " << currY <<
" 2currZ = " << currZ << std::endl;
211 std::cout <<
"ChargeDrifterFP420: drift; finally, rETURN AmplitudeSlimentFP420" << std::endl;
212 std::cout <<
"===================================================================" << std::endl;
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
ChargeDrifterFP420(double, double, double, double, double, double, double, double, double, int)
std::vector< AmplitudeSegmentFP420 > collection_type
std::vector< EnergySegmentFP420 > ionization_type
CDrifterFP420::collection_type drift(const CDrifterFP420::ionization_type &, const G4ThreeVector &, const int &) override