56 #include "DetectorConstruction.hh"
69 fParticleIsLooping(
false ),
72 fThreshold_Warning_Energy( 100 *
MeV ),
73 fThreshold_Important_Energy( 250 *
MeV ),
74 fThresholdTrials( 10 ),
77 fSumEnergyKilled( 0.0 ), fMaxEnergyKilled( 0.0 ),
78 fShortStepOptimisation(
false),
126 G4cout <<
" G4MonopoleTransportation: Statistics for looping particles "
128 G4cout <<
" Sum of energy of loopers killed: "
130 G4cout <<
" Max energy of loopers killed: "
152 G4double geometryStepLength, newSafety ;
182 currentSafety = 0.0 ;
206 if( (particleMagneticCharge != 0.0) )
226 if( !fieldExertsForce )
233 geometryStepLength = currentMinimumStep ;
246 fPreviousSftOrigin = startPosition ;
252 currentSafety = newSafety ;
258 geometryStepLength = linearStepLength ;
263 geometryStepLength = currentMinimumStep ;
292 particleMagneticCharge );
295 GetChordFinder()->GetIntegrationDriver()->GetEquationOfMotion();
297 equationOfMotion->SetChargeMomentumMass( chargeState,
313 if( currentMinimumStep > 0 )
323 geometryStepLength = lengthAlongCurve ;
325 geometryStepLength = currentMinimumStep ;
330 geometryStepLength = lengthAlongCurve= 0.0 ;
336 fPreviousSftOrigin = startPosition ;
362 if( currentMinimumStep == 0.0 )
375 if( particleMagneticCharge != 0.0 ) {
379 currentSafety = endSafety ;
389 #ifdef G4DEBUG_TRANSPORT
391 G4cout <<
"***G4MonopoleTransportation::AlongStepGPIL ** " <<
G4endl;
392 G4cout <<
" Called Navigator->ComputeSafety at "
394 <<
" and it returned safety= " << endSafety <<
G4endl;
396 <<
" to obtain pseudo-safety= " << currentSafety <<
G4endl;
406 return geometryStepLength ;
445 if (finalVelocity > 0.0)
449 meanInverseVelocity = 0.5
450 * ( 1.0 / initialVelocity + 1.0 / finalVelocity );
451 deltaTime = stepLength * meanInverseVelocity ;
453 else if( initialVelocity > 0.0 )
455 deltaTime = stepLength/initialVelocity ;
494 G4cout <<
" G4MonopoleTransportation is killing track "
495 <<
"that is looping or stuck " <<
G4endl
497 <<
" MeV energy." <<
G4endl;
499 <<
" No of calls to AlongStepDoIt = " <<
noCalls
509 G4cout <<
" G4MonopoleTransportation::AlongStepDoIt(): "
510 <<
"Particle looping - "
512 <<
" No of calls to = " <<
noCalls
571 LocateGlobalPointAndUpdateTouchableHandle( track.
GetPosition(),
623 if( pNewVol!=0 && pNewMaterialCutsCouple!=0 &&
624 pNewMaterialCutsCouple->
GetMaterial()!=pNewMaterial )
628 pNewMaterialCutsCouple =