89 const M1x7& stateOrig,
93 const double delta(1.E-2);
94 const double epsilon(1.E-1);
98 M1x7 state7, oldState7;
99 memcpy(oldState7, stateOrig,
sizeof(state7));
101 int stepSign(sMax < 0 ? -1 : 1);
105 const unsigned maxIt = 300;
109 gGeoManager->FindNextBoundary(fabs(sMax) - s);
110 double safety = gGeoManager->GetSafeDistance();
111 double slDist = gGeoManager->GetStep();
112 double step = slDist;
116 Exception exc(
"TGeoMaterialInterface::findNextBoundary ==> maximum number of iterations exceeded",__LINE__,__FILE__);
122 if (s + safety > fabs(sMax)) {
124 std::cout <<
" next boundary is further away than sMax \n";
125 return stepSign*(s + safety);
129 if (slDist < delta) {
131 std::cout <<
" very close to the boundary -> return"
132 <<
" stepSign*(s + slDist) = "
133 << stepSign <<
"*(" << s + slDist <<
")\n";
134 return stepSign*(s + slDist);
142 memcpy(state7, stateOrig,
sizeof(state7));
143 rep->
RKPropagate(state7, NULL, SA, stepSign*(s + step), varField);
147 double dist2 = (pow(state7[0] - oldState7[0], 2)
148 + pow(state7[1] - oldState7[1], 2)
149 + pow(state7[2] - oldState7[2], 2));
151 double maxDeviation2 = 0.25*(step*step - dist2);
154 && maxDeviation2 > epsilon*epsilon) {
163 step = std::max(step / 2, safety);
165 gGeoManager->PushPoint();
166 bool volChanged =
initTrack(state7[0], state7[1], state7[2],
167 stepSign*state7[3], stepSign*state7[4],
172 gGeoManager->PopPoint();
179 return stepSign*(s + step);
183 step = std::max(step / 2, safety);
188 memcpy(oldState7, state7,
sizeof(state7));
189 gGeoManager->PopDummy();
191 gGeoManager->FindNextBoundary(fabs(sMax) - s);
192 safety = gGeoManager->GetSafeDistance();
193 step = slDist = gGeoManager->GetStep();
219const double MeanExcEnergy_vals[] = {1.e15, 19.2, 41.8, 40.0, 63.7, 76.0, 78., 82.0, 95.0, 115.0, 137.0, 149.0, 156.0, 166.0, 173.0, 173.0, 180.0, 174.0, 188.0, 190.0, 191.0, 216.0, 233.0, 245.0, 257.0, 272.0, 286.0, 297.0, 311.0, 322.0, 330.0, 334.0, 350.0, 347.0, 348.0, 343.0, 352.0, 363.0, 366.0, 379.0, 393.0, 417.0, 424.0, 428.0, 441.0, 449.0, 470.0, 470.0, 469.0, 488.0, 488.0, 487.0, 485.0, 491.0, 482.0, 488.0, 491.0, 501.0, 523.0, 535.0, 546.0, 560.0, 574.0, 580.0, 591.0, 614.0, 628.0, 650.0, 658.0, 674.0, 684.0, 694.0, 705.0, 718.0, 727.0, 736.0, 746.0, 757.0, 790.0, 790.0, 800.0, 810.0, 823.0, 823.0, 830.0, 825.0, 794.0, 827.0, 826.0, 841.0, 847.0, 878.0, 890.0};