00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 #include "G4ITTransportation.hh"
00059 #include "G4SystemOfUnits.hh"
00060 #include "G4TransportationManager.hh"
00061 #include "G4ITTransportationManager.hh"
00062 #include "G4ProductionCutsTable.hh"
00063 #include "G4ParticleTable.hh"
00064 #include "G4ITNavigator.hh"
00065 #include "G4PropagatorInField.hh"
00066 #include "G4FieldManager.hh"
00067 #include "G4ChordFinder.hh"
00068 #include "G4SafetyHelper.hh"
00069 #include "G4FieldManagerStore.hh"
00070
00071 #include "G4UnitsTable.hh"
00072
00073 class G4VSensitiveDetector;
00074
00075 #ifndef State
00076 #define State(theXInfo) (fTransportationState->theXInfo)
00077 #endif
00078
00079
00080
00081 G4ITTransportation::G4ITTransportation(const G4String& aName, int verbose) :
00082 G4VITProcess(aName, fTransportation),
00083 InitProcessState(fTransportationState, fpState),
00084 fThreshold_Warning_Energy( 100 * MeV ),
00085 fThreshold_Important_Energy( 250 * MeV ),
00086 fThresholdTrials( 10 ),
00087 fUnimportant_Energy( 1 * MeV ),
00088 fSumEnergyKilled( 0.0 ), fMaxEnergyKilled( 0.0 ),
00089 fShortStepOptimisation(false),
00090 fVerboseLevel( verbose )
00091 {
00092 pParticleChange = &fParticleChange;
00093 G4TransportationManager* transportMgr ;
00094 transportMgr = G4TransportationManager::GetTransportationManager() ;
00095 G4ITTransportationManager* ITtransportMgr ;
00096 ITtransportMgr = G4ITTransportationManager::GetTransportationManager() ;
00097 fLinearNavigator = ITtransportMgr->GetNavigatorForTracking() ;
00098 fFieldPropagator = transportMgr->GetPropagatorInField() ;
00099 fpSafetyHelper = 0;
00100
00101
00102
00103
00104
00105
00106 enableAtRestDoIt = false;
00107 enableAlongStepDoIt = true;
00108 enablePostStepDoIt = true;
00109 SetProcessSubType(60);
00110 SetInstantiateProcessState(true);
00111 G4VITProcess::SetInstantiateProcessState(false);
00112 fInstantiateProcessState = true;
00113 }
00114
00115
00116 G4ITTransportation::G4ITTransportation(const G4ITTransportation& right) :
00117 G4VITProcess(right),
00118 InitProcessState(fTransportationState, fpState)
00119 {
00120
00121 fVerboseLevel = right.fVerboseLevel ;
00122 fThreshold_Warning_Energy = right.fThreshold_Warning_Energy;
00123 fThreshold_Important_Energy = right.fThreshold_Important_Energy;
00124 fThresholdTrials = right.fThresholdTrials;
00125 fUnimportant_Energy = right.fUnimportant_Energy;
00126 fSumEnergyKilled = right.fSumEnergyKilled;
00127 fMaxEnergyKilled = right.fMaxEnergyKilled;
00128 fShortStepOptimisation = right.fShortStepOptimisation;
00129
00130
00131 G4TransportationManager* transportMgr ;
00132 transportMgr = G4TransportationManager::GetTransportationManager() ;
00133 G4ITTransportationManager* ITtransportMgr ;
00134 ITtransportMgr = G4ITTransportationManager::GetTransportationManager() ;
00135 fLinearNavigator = ITtransportMgr->GetNavigatorForTracking() ;
00136 fFieldPropagator = transportMgr->GetPropagatorInField() ;
00137 fpSafetyHelper = 0;
00138
00139
00140
00141
00142
00143
00144 enableAtRestDoIt = false;
00145 enableAlongStepDoIt = true;
00146 enablePostStepDoIt = true;
00147
00148 pParticleChange = &fParticleChange;
00149 SetInstantiateProcessState(true);
00150 G4VITProcess::SetInstantiateProcessState(false);
00151 fInstantiateProcessState = right.fInstantiateProcessState;
00152 }
00153
00154 G4ITTransportation& G4ITTransportation::operator=(const G4ITTransportation& right)
00155 {
00156 if(this == &right) return *this;
00157 return *this;
00158 }
00159
00163 G4ITTransportation::G4ITTransportationState::G4ITTransportationState() : G4ProcessState(),
00164 fCurrentTouchableHandle(0)
00165 {
00166 fTransportEndPosition = G4ThreeVector(0,0,0);
00167 fTransportEndMomentumDir = G4ThreeVector(0,0,0);
00168 fTransportEndKineticEnergy = -1;
00169 fTransportEndSpin = G4ThreeVector(0,0,0);
00170 fMomentumChanged = false;
00171 fEnergyChanged = false;
00172 fEndGlobalTimeComputed = false;
00173 fCandidateEndGlobalTime = -1;
00174 fParticleIsLooping = false;
00175 static G4TouchableHandle nullTouchableHandle;
00176 fCurrentTouchableHandle = nullTouchableHandle;
00177 fGeometryLimitedStep = false;
00178 fPreviousSftOrigin = G4ThreeVector(0,0,0);
00179 fPreviousSafety = 0.0;
00180 fNoLooperTrials = false;
00181 endpointDistance= -1;
00182 }
00183
00184 G4ITTransportation::G4ITTransportationState::~G4ITTransportationState()
00185 {
00186 ;
00187 }
00188
00189 G4ITTransportation::~G4ITTransportation()
00190 {
00191 #ifdef G4VERBOSE
00192 if( (fVerboseLevel > 0) && (fSumEnergyKilled > 0.0 ) )
00193 {
00194 G4cout << " G4ITTransportation: Statistics for looping particles " << G4endl;
00195 G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled << G4endl;
00196 G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled << G4endl;
00197 }
00198 #endif
00199 }
00200
00201 G4bool G4ITTransportation::DoesGlobalFieldExist()
00202 {
00203 G4TransportationManager* transportMgr;
00204 transportMgr= G4TransportationManager::GetTransportationManager();
00205
00206
00207
00208 return transportMgr->GetFieldManager()->DoesFieldExist();
00209 }
00210
00211
00213
00214
00215
00216
00217
00218 G4double G4ITTransportation::AlongStepGetPhysicalInteractionLength(
00219 const G4Track& track,
00220 G4double ,
00221 G4double currentMinimumStep,
00222 G4double& currentSafety,
00223 G4GPILSelection* selection)
00224 {
00225 G4double geometryStepLength(-1.0), newSafety(-1.0) ;
00226
00227 State(fParticleIsLooping) = false ;
00228 State(fEndGlobalTimeComputed) = false ;
00229 State(fGeometryLimitedStep) = false ;
00230
00231
00232
00233
00234
00235 State(fCurrentTouchableHandle) = track.GetTouchableHandle();
00236
00237
00238
00239
00240 *selection = CandidateForSelection ;
00241
00242
00243
00244 const G4DynamicParticle* pParticle = track.GetDynamicParticle() ;
00245
00246 G4ThreeVector startMomentumDir = pParticle->GetMomentumDirection() ;
00247 G4ThreeVector startPosition = track.GetPosition() ;
00248
00249
00250
00251
00252
00253
00254
00255 G4ThreeVector OriginShift = startPosition - State(fPreviousSftOrigin) ;
00256 G4double MagSqShift = OriginShift.mag2() ;
00257 if( MagSqShift >= sqr(State(fPreviousSafety)) )
00258 {
00259 currentSafety = 0.0 ;
00260 }
00261 else
00262 {
00263 currentSafety = State(fPreviousSafety) - std::sqrt(MagSqShift) ;
00264 }
00265
00266
00267
00268 G4double particleCharge = pParticle->GetCharge() ;
00269
00270
00271
00272
00273
00274
00275
00276
00277 G4FieldManager* fieldMgr=0;
00278 G4bool fieldExertsForce = false ;
00279 if( (particleCharge != 0.0) )
00280 {
00281 fieldMgr= fFieldPropagator->FindAndSetFieldManager( track.GetVolume() );
00282 if (fieldMgr != 0)
00283 {
00284
00285 fieldMgr->ConfigureForTrack( &track );
00286
00287
00288
00289
00290
00291 fieldExertsForce = (fieldMgr->GetDetectorField() != 0);
00292 }
00293 }
00294
00295
00296
00297
00298
00299
00300 if( !fieldExertsForce )
00301 {
00302 G4double linearStepLength ;
00303 if( fShortStepOptimisation && (currentMinimumStep <= currentSafety) )
00304 {
00305
00306
00307 geometryStepLength = currentMinimumStep ;
00308 State(fGeometryLimitedStep) = false ;
00309 }
00310 else
00311 {
00312
00313
00314 linearStepLength = fLinearNavigator->ComputeStep( startPosition,
00315 startMomentumDir,
00316 currentMinimumStep,
00317 newSafety) ;
00318
00319
00320 State(fPreviousSftOrigin) = startPosition ;
00321 State(fPreviousSafety) = newSafety ;
00322
00323
00324
00325
00326 currentSafety = newSafety ;
00327
00328 State(fGeometryLimitedStep)= (linearStepLength <= currentMinimumStep);
00329 if( State(fGeometryLimitedStep) )
00330 {
00331
00332 geometryStepLength = linearStepLength ;
00333 }
00334 else
00335 {
00336
00337 geometryStepLength = currentMinimumStep ;
00338 }
00339 }
00340 State(endpointDistance) = geometryStepLength ;
00341
00342
00343
00344 State(fTransportEndPosition) = startPosition+geometryStepLength*startMomentumDir ;
00345
00346
00347
00348 State(fTransportEndMomentumDir) = startMomentumDir ;
00349 State(fTransportEndKineticEnergy) = track.GetKineticEnergy() ;
00350 State(fTransportEndSpin) = track.GetPolarization();
00351 State(fParticleIsLooping) = false ;
00352 State(fMomentumChanged) = false ;
00353 State(fEndGlobalTimeComputed) = true ;
00354 State(theInteractionTimeLeft) = State(endpointDistance)/track.GetVelocity();
00355 State(fCandidateEndGlobalTime) = State(theInteractionTimeLeft)+track.GetGlobalTime();
00356
00357
00358
00359
00360
00361
00362 }
00363 else
00364 {
00365
00366 G4ExceptionDescription exceptionDescription;
00367 exceptionDescription << "ITTransportation does not support external fields.";
00368 exceptionDescription << " If you are dealing with a tradiational MC simulation, ";
00369 exceptionDescription << "please use G4Transportation.";
00370
00371 G4Exception("G4ITTransportation::AlongStepGetPhysicalInteractionLength","NoExternalFieldSupport",
00372 FatalException,exceptionDescription);
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515 }
00516
00517
00518
00519
00520 if( currentMinimumStep == 0.0 )
00521 {
00522 if( currentSafety == 0.0 )
00523 {
00524 State(fGeometryLimitedStep) = true ;
00525
00526
00527 }
00528 }
00529
00530
00531
00532
00533 if( currentSafety < State(endpointDistance) )
00534 {
00535
00536
00537
00538 if( particleCharge != 0.0 )
00539 {
00540
00541 G4double endSafety =
00542 fLinearNavigator->ComputeSafety( State(fTransportEndPosition)) ;
00543 currentSafety = endSafety ;
00544 State(fPreviousSftOrigin) = State(fTransportEndPosition) ;
00545 State(fPreviousSafety) = currentSafety ;
00546 fpSafetyHelper->SetCurrentSafety( currentSafety, State(fTransportEndPosition));
00547
00548
00549
00550
00551 currentSafety += State(endpointDistance) ;
00552
00553 #ifdef G4DEBUG_TRANSPORT
00554 G4cout.precision(12) ;
00555 G4cout << "***G4Transportation::AlongStepGPIL ** " << G4endl ;
00556 G4cout << " Called Navigator->ComputeSafety at " << State(fTransportEndPosition)
00557 << " and it returned safety= " << endSafety << G4endl ;
00558 G4cout << " Adding endpoint distance " << State(endpointDistance)
00559 << " to obtain pseudo-safety= " << currentSafety << G4endl ;
00560 #endif
00561 }
00562 }
00563
00564
00565
00566 return geometryStepLength ;
00567 }
00568
00569
00570 void G4ITTransportation::ComputeStep(const G4Track& track,
00571 const G4Step& ,
00572 const double timeStep,
00573 double& oPhysicalStep)
00574 {
00575 const G4DynamicParticle* pParticle = track.GetDynamicParticle() ;
00576 G4ThreeVector startMomentumDir = pParticle->GetMomentumDirection() ;
00577 G4ThreeVector startPosition = track.GetPosition() ;
00578
00579 track.CalculateVelocity();
00580 G4double initialVelocity = track.GetVelocity() ;
00581
00582 State(fGeometryLimitedStep) = false;
00583
00585
00587 State(fCandidateEndGlobalTime) = timeStep + track.GetGlobalTime();
00588 State(fEndGlobalTimeComputed) = true ;
00589
00590
00591
00592 if( !State(fMomentumChanged) )
00593 {
00594
00595 fParticleChange.ProposeVelocity(initialVelocity);
00596 oPhysicalStep = initialVelocity*timeStep ;
00597
00598
00599
00600 State(fTransportEndPosition) = startPosition + oPhysicalStep*startMomentumDir ;
00601 }
00602 }
00603
00604
00606
00607
00608
00609 #include "G4ParticleTable.hh"
00610 G4VParticleChange* G4ITTransportation::AlongStepDoIt( const G4Track& track,
00611 const G4Step& stepData )
00612 {
00613
00614
00615
00616 static G4ParticleDefinition* pdefOpticalPhoton =
00617 G4ParticleTable::GetParticleTable()->FindParticle("opticalphoton");
00618
00619 static G4int noCalls=0;
00620 noCalls++;
00621
00622 fParticleChange.Initialize(track) ;
00623
00624
00625
00626 fParticleChange.ProposePosition(State(fTransportEndPosition)) ;
00627 fParticleChange.ProposeMomentumDirection(State(fTransportEndMomentumDir)) ;
00628 fParticleChange.ProposeEnergy(State(fTransportEndKineticEnergy)) ;
00629 fParticleChange.SetMomentumChanged(State(fMomentumChanged)) ;
00630
00631 fParticleChange.ProposePolarization(State(fTransportEndSpin));
00632
00633 G4double deltaTime = 0.0 ;
00634
00635
00636
00637
00638
00639 G4double startTime = track.GetGlobalTime() ;
00643 if (State(fEndGlobalTimeComputed) == false)
00644 {
00645
00646
00647 G4double initialVelocity = stepData.GetPreStepPoint()->GetVelocity() ;
00648 G4double stepLength = track.GetStepLength() ;
00649
00650 deltaTime= 0.0;
00651 if (track.GetParticleDefinition() == pdefOpticalPhoton)
00652 {
00653
00654 double finalVelocity = track.CalculateVelocityForOpticalPhoton();
00655 fParticleChange.ProposeVelocity(finalVelocity);
00656 deltaTime = stepLength/finalVelocity ;
00657 }
00658 else if( initialVelocity > 0.0 )
00659 {
00660 deltaTime = stepLength/initialVelocity ;
00661 }
00662
00663 State(fCandidateEndGlobalTime) = startTime + deltaTime ;
00664 }
00665 else
00666 {
00667 deltaTime = State(fCandidateEndGlobalTime) - startTime ;
00668 }
00669
00670 fParticleChange.ProposeGlobalTime( State(fCandidateEndGlobalTime) ) ;
00671 fParticleChange.ProposeLocalTime( track.GetLocalTime() + deltaTime) ;
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681 fParticleChange. ProposeTrueStepLength( track.GetStepLength() ) ;
00682
00685
00686
00687
00688
00689
00690 if ( State(fParticleIsLooping) )
00691 {
00692 G4double endEnergy= State(fTransportEndKineticEnergy);
00693
00694 if( (endEnergy < fThreshold_Important_Energy)
00695 || (State(fNoLooperTrials) >= fThresholdTrials ) )
00696 {
00697
00698
00699
00700 fParticleChange.ProposeTrackStatus( fStopAndKill ) ;
00701
00702
00703 fSumEnergyKilled += endEnergy;
00704 if( endEnergy > fMaxEnergyKilled)
00705 {
00706 fMaxEnergyKilled= endEnergy;
00707 }
00708
00709 #ifdef G4VERBOSE
00710 if( (fVerboseLevel > 1) ||
00711 ( endEnergy > fThreshold_Warning_Energy ) )
00712 {
00713 G4cout << " G4ITTransportation is killing track that is looping or stuck "
00714 << G4endl
00715 << " This track has " << track.GetKineticEnergy() / MeV
00716 << " MeV energy." << G4endl;
00717 G4cout << " Number of trials = " << State(fNoLooperTrials)
00718 << " No of calls to AlongStepDoIt = " << noCalls
00719 << G4endl;
00720 }
00721 #endif
00722 State(fNoLooperTrials)=0;
00723 }
00724 else
00725 {
00726 State(fNoLooperTrials) ++;
00727 #ifdef G4VERBOSE
00728 if( (fVerboseLevel > 2) )
00729 {
00730 G4cout << " G4ITTransportation::AlongStepDoIt(): Particle looping - "
00731 << " Number of trials = " << State(fNoLooperTrials)
00732 << " No of calls to = " << noCalls
00733 << G4endl;
00734 }
00735 #endif
00736 }
00737 }
00738 else
00739 {
00740 State(fNoLooperTrials)=0;
00741 }
00742
00743
00744
00745
00746
00747
00748 fParticleChange.SetPointerToVectorOfAuxiliaryPoints
00749 (fFieldPropagator->GimmeTrajectoryVectorAndForgetIt() );
00750
00751 return &fParticleChange ;
00752 }
00753
00755
00756
00757
00758
00759
00760 G4double G4ITTransportation::
00761 PostStepGetPhysicalInteractionLength(
00762 const G4Track& ,
00763 G4double ,
00764 G4ForceCondition* pForceCond
00765 )
00766 {
00767 *pForceCond = Forced ;
00768 return DBL_MAX ;
00769 }
00770
00772
00773
00774 G4VParticleChange* G4ITTransportation::PostStepDoIt( const G4Track& track,
00775 const G4Step& )
00776 {
00777
00778 G4TouchableHandle retCurrentTouchable ;
00779 G4bool isLastStep= false;
00780
00781
00782
00783 fParticleChange.Initialize(track) ;
00784
00785 fParticleChange.ProposeTrackStatus(track.GetTrackStatus()) ;
00786
00787
00788
00789
00790 if(State(fGeometryLimitedStep))
00791 {
00792
00793
00794
00795
00796
00797
00798
00799 if( State(fCurrentTouchableHandle)->GetVolume() == 0 )
00800 {
00801 G4ExceptionDescription exceptionDescription ;
00802 exceptionDescription << "No current touchable found " ;
00803 G4Exception(" G4ITTransportation::PostStepDoIt","G4ITTransportation001",
00804 FatalErrorInArgument,exceptionDescription);
00805 }
00806
00807 fLinearNavigator->SetGeometricallyLimitedStep() ;
00808 fLinearNavigator->
00809 LocateGlobalPointAndUpdateTouchableHandle( track.GetPosition(),
00810 track.GetMomentumDirection(),
00811 State(fCurrentTouchableHandle),
00812 true ) ;
00813
00814
00815
00816 if( State(fCurrentTouchableHandle)->GetVolume() == 0 )
00817 {
00818 #ifdef G4VERBOSE
00819 if(fVerboseLevel > 0)
00820 {
00821 G4cout << "Track position : " << track.GetPosition() / nanometer << " [nm]"
00822 << " Track ID : " << track.GetTrackID()<< G4endl;
00823 G4cout << "G4ITTransportation will killed the track because State(fCurrentTouchableHandle)->GetVolume() == 0"<< G4endl;
00824 }
00825 #endif
00826 fParticleChange.ProposeTrackStatus( fStopAndKill ) ;
00827 }
00828
00829 retCurrentTouchable = State(fCurrentTouchableHandle) ;
00830
00831
00832
00833
00834
00835
00836
00837
00838 fParticleChange.SetTouchableHandle( State(fCurrentTouchableHandle) ) ;
00839
00840
00841 isLastStep = fLinearNavigator->ExitedMotherVolume()
00842 | fLinearNavigator->EnteredDaughterVolume() ;
00843
00844 #ifdef G4DEBUG_TRANSPORT
00845
00846 G4bool exiting = fLinearNavigator->ExitedMotherVolume();
00847 G4bool entering = fLinearNavigator->EnteredDaughterVolume();
00848
00849 if( ! (exiting || entering) )
00850 {
00851 G4cout << " Transport> : Proposed isLastStep= " << isLastStep
00852 << " Exiting " << fLinearNavigator->ExitedMotherVolume()
00853 << " Entering " << fLinearNavigator->EnteredDaughterVolume()
00854 << " Track position : " << track.GetPosition() /nanometer << " [nm]"
00855 << G4endl;
00856 G4cout << " Track position : " << track.GetPosition() /nanometer << G4endl;
00857 }
00858 #endif
00859 }
00860 else
00861 {
00862
00863
00864 fLinearNavigator->LocateGlobalPointWithinVolume( track.GetPosition() ) ;
00865
00866
00867
00868
00869
00870
00871 fParticleChange.SetTouchableHandle( track.GetTouchableHandle() ) ;
00872 retCurrentTouchable = track.GetTouchableHandle() ;
00873
00874 isLastStep= false;
00875 #ifdef G4DEBUG_TRANSPORT
00876
00877 G4cout << " Transport> Proposed isLastStep= " << isLastStep
00878 << " Geometry did not limit step. Position : "
00879 << track.GetPosition()/ nanometer << G4endl;
00880 #endif
00881 }
00882
00883 fParticleChange.ProposeLastStepInVolume(isLastStep);
00884
00885 const G4VPhysicalVolume* pNewVol = retCurrentTouchable->GetVolume() ;
00886 const G4Material* pNewMaterial = 0 ;
00887 const G4VSensitiveDetector* pNewSensitiveDetector = 0 ;
00888
00889 if( pNewVol != 0 )
00890 {
00891 pNewMaterial= pNewVol->GetLogicalVolume()->GetMaterial();
00892 pNewSensitiveDetector= pNewVol->GetLogicalVolume()->GetSensitiveDetector();
00893 }
00894
00895
00896
00897
00898 fParticleChange.SetMaterialInTouchable( (G4Material *) pNewMaterial ) ;
00899 fParticleChange.SetSensitiveDetectorInTouchable( (G4VSensitiveDetector *) pNewSensitiveDetector ) ;
00900
00901 const G4MaterialCutsCouple* pNewMaterialCutsCouple = 0;
00902 if( pNewVol != 0 )
00903 {
00904 pNewMaterialCutsCouple=pNewVol->GetLogicalVolume()->GetMaterialCutsCouple();
00905 }
00906
00907 if( pNewVol!=0 && pNewMaterialCutsCouple!=0 && pNewMaterialCutsCouple->GetMaterial()!=pNewMaterial )
00908 {
00909
00910
00911 pNewMaterialCutsCouple =
00912 G4ProductionCutsTable::GetProductionCutsTable()
00913 ->GetMaterialCutsCouple(pNewMaterial,
00914 pNewMaterialCutsCouple->GetProductionCuts());
00915 }
00916 fParticleChange.SetMaterialCutsCoupleInTouchable( pNewMaterialCutsCouple );
00917
00918
00919
00920
00921
00922
00923
00924 fParticleChange.SetTouchableHandle(retCurrentTouchable) ;
00925
00926 return &fParticleChange ;
00927 }
00928
00929
00930
00931
00932 void
00933 G4ITTransportation::StartTracking(G4Track* track)
00934 {
00935 G4VProcess::StartTracking(track);
00936 if(fInstantiateProcessState)
00937 G4VITProcess::fpState = new G4ITTransportationState();
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956 if( DoesGlobalFieldExist() )
00957 {
00958 fFieldPropagator->ClearPropagatorState();
00959
00960
00961
00962
00963
00964 }
00965
00966
00967 static G4FieldManagerStore* fieldMgrStore= G4FieldManagerStore::GetInstance();
00968 fieldMgrStore->ClearAllChordFindersState();
00969
00970
00971
00972 State(fCurrentTouchableHandle) = track->GetTouchableHandle();
00973
00974 G4VITProcess::StartTracking(track);
00975 }
00976
00977 #undef State