39 std::cout <<
"ChargeDrifterFP420: call constructor" << std::endl;
40 std::cout <<
"ldriftcurrX= " << ldriftcurrX <<
"ldriftcurrY= " << ldriftcurrY << std::endl;
41 std::cout <<
"modulePath= " << modulePath <<
"constTe= " << constTe << std::endl;
42 std::cout <<
"ChargeDrifterFP420:----------------------" << std::endl;
52 std::cout <<
"ChargeDrifterFP420: collection_type call drift" << std::endl;
57 _temp.resize(ion.size());
59 for (
unsigned int i=0;
i<ion.size();
i++){
60 _temp[
i] =
drift(ion[
i], driftDir, xytype);
73 double sliX = (edu).
x();
74 double sliY = (edu).
y();
75 double sliZ = (edu).
z();
81 double pathFraction=0., pathValue=0.;
82 double tanShiftAngleX=0.,tanShiftAngleY=0.,tanShiftAngleZ=0.;
83 double xDriftDueToField=0.,yDriftDueToField=0.,zDriftDueToField=0.;
85 std::cout <<
"=================================================================== " << std::endl;
86 std::cout <<
"ChargeDrifterFP420: xytype= " << xytype << std::endl;
87 std::cout <<
"constTe= " << constTe <<
"ldriftcurrX= " << ldriftcurrX <<
"ldriftcurrY= " << ldriftcurrY << std::endl;
88 std::cout <<
"1currX = " << currX <<
" 1currY = " << currY <<
" 1currZ = " << currZ << std::endl;
89 std::cout <<
"drift.x() = " << drift.x() <<
" drift.y() = " << drift.y() <<
" drift.z() = " << drift.z() << std::endl;
98 tanShiftAngleY = drift.y()/drift.x();
99 tanShiftAngleZ = drift.z()/drift.x();
102 pathValue = fabs(sliX)-int(fabs(sliX/(2*ldriftcurrX))+0.5)*(2*ldriftcurrX);
103 pathValue = fabs(pathValue);
104 pathFraction = pathValue/ldriftcurrX;
106 std::cout <<
"==================================" << std::endl;
107 std::cout <<
"fabs(sliX)= " << fabs(sliX) <<
"ldriftcurrX= " << ldriftcurrX << std::endl;
108 std::cout <<
"fabs(sliX/(2*ldriftcurrX))+0.5= " << fabs(sliX/(2*ldriftcurrX))+0.5 << std::endl;
109 std::cout <<
"int(fabs(sliX/(2*ldriftcurrX))+0.5)*(2*ldriftcurrX)= " << int(fabs(sliX/(2*ldriftcurrX))+0.5)*(2*ldriftcurrX) << std::endl;
110 std::cout <<
"pathValue= " << pathValue << std::endl;
111 std::cout <<
"pathFraction= " << pathFraction << std::endl;
112 std::cout <<
"==================================" << std::endl;
115 pathFraction = pathFraction>0. ? pathFraction : 0. ;
116 pathFraction = pathFraction<1. ? pathFraction : 1. ;
119 = pathValue*tanShiftAngleY;
121 = pathValue*tanShiftAngleZ;
123 currY = sliY + yDriftDueToField;
124 currZ = sliZ + zDriftDueToField;
129 else if(xytype == 1) {
130 tanShiftAngleX = drift.x()/drift.y();
131 tanShiftAngleZ = drift.z()/drift.y();
134 pathValue = fabs(sliY)-int(fabs(sliY/(2*ldriftcurrY))+0.5)*(2*ldriftcurrY);
135 pathValue = fabs(pathValue);
136 pathFraction = pathValue/ldriftcurrY;
141 std::cout <<
"==================================" << std::endl;
142 std::cout <<
"fabs(sliY)= " << fabs(sliY) <<
"ldriftcurrY= " << ldriftcurrY << std::endl;
143 std::cout <<
"fabs(sliY/(2*ldriftcurrY))+0.5= " << fabs(sliY/(2*ldriftcurrY))+0.5 << std::endl;
144 std::cout <<
"int(fabs(sliY/(2*ldriftcurrY))+0.5)*(2*ldriftcurrY)= " << 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.)
std::cout <<
"ChargeDrifterFP420: ERROR:pathFraction=" << pathFraction << std::endl;
151 pathFraction = pathFraction>0. ? pathFraction : 0. ;
152 pathFraction = pathFraction<1. ? pathFraction : 1. ;
154 = pathValue*tanShiftAngleX;
157 = pathValue*tanShiftAngleZ;
159 currX = sliX + xDriftDueToField;
160 currZ = sliZ + zDriftDueToField;
178 double bbb = 1.-2*depV*pathFraction/(depV+appV);
179 if(bbb<0.)
std::cout <<
"ChargeDrifterFP420:ERROR: check your Voltage for log(bbb) bbb=" << bbb << std::endl;
180 double driftTime = -constTe*
log(bbb) + startT0;
183 double sigma =
sqrt(2.*constDe*driftTime*100.);
187 std::cout <<
"ChargeDrifterFP420: drift: xytype=" << xytype <<
"pathFraction=" << pathFraction << std::endl;
188 std::cout <<
" constTe= " << constTe <<
" driftTime = " << driftTime <<
" startT0 = " << startT0 << std::endl;
189 std::cout <<
" log = " <<
log(1.-2*depV*pathFraction/(depV+appV)) << std::endl;
190 std::cout <<
" negativ inside log = " << -2*depV*pathFraction/(depV+appV) << std::endl;
191 std::cout <<
" constDe = " << constDe <<
" sigma = " << sigma << std::endl;
193 std::cout <<
"ChargeDrifterFP420: drift: xytype=" << xytype <<
"pathValue=" << pathValue << std::endl;
194 std::cout <<
" tanShiftAngleX = " << tanShiftAngleX <<
" tanShiftAngleY = " << tanShiftAngleY <<
" tanShiftAngleZ = " << tanShiftAngleZ << std::endl;
195 std::cout <<
"sliX = " << sliX <<
" sliY = " << sliY <<
" sliZ = " << sliZ << std::endl;
196 std::cout <<
"pathFraction = " << pathFraction <<
" driftTime = " << driftTime << std::endl;
197 std::cout <<
"sigma = " << sigma << std::endl;
198 std::cout <<
"xDriftDueToField = " << xDriftDueToField <<
" yDriftDueToField = " << yDriftDueToField <<
" zDriftDueToField = " << zDriftDueToField << std::endl;
199 std::cout <<
"2currX = " << currX <<
" 2currY = " << currY <<
" 2currZ = " << currZ << std::endl;
200 std::cout <<
"ChargeDrifterFP420: drift; finally, rETURN AmplitudeSlimentFP420" << std::endl;
201 std::cout <<
"===================================================================" << std::endl;
static std::vector< std::string > checklist log
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
CDrifterFP420::collection_type drift(const CDrifterFP420::ionization_type &, const G4ThreeVector &, const int &)
ChargeDrifterFP420(double, double, double, double, double, double, double, double, double, int)
std::vector< AmplitudeSegmentFP420 > collection_type
std::vector< EnergySegmentFP420 > ionization_type