#include <G4ErrorPropagationNavigator.hh>
Inheritance diagram for G4ErrorPropagationNavigator:
Public Member Functions | |
G4ErrorPropagationNavigator () | |
~G4ErrorPropagationNavigator () | |
G4double | ComputeStep (const G4ThreeVector &pGlobalPoint, const G4ThreeVector &pDirection, const G4double pCurrentProposedStepLength, G4double &pNewSafety) |
G4double | ComputeSafety (const G4ThreeVector &globalpoint, const G4double pProposedMaxLength=DBL_MAX, const G4bool keepState=true) |
Definition at line 50 of file G4ErrorPropagationNavigator.hh.
G4ErrorPropagationNavigator::G4ErrorPropagationNavigator | ( | ) |
G4ErrorPropagationNavigator::~G4ErrorPropagationNavigator | ( | ) |
G4double G4ErrorPropagationNavigator::ComputeSafety | ( | const G4ThreeVector & | globalpoint, | |
const G4double | pProposedMaxLength = DBL_MAX , |
|||
const G4bool | keepState = true | |||
) | [virtual] |
Reimplemented from G4Navigator.
Definition at line 126 of file G4ErrorPropagationNavigator.cc.
References G4Navigator::ComputeSafety(), G4ErrorTarget::GetDistanceFromPoint(), G4ErrorPropagatorData::GetErrorPropagatorData(), and G4ErrorPropagatorData::GetTarget().
Referenced by ComputeStep().
00129 { 00130 G4double newSafety = G4Navigator::ComputeSafety(pGlobalpoint, 00131 pMaxLength, keepState); 00132 00133 G4ErrorPropagatorData *g4edata 00134 = G4ErrorPropagatorData::GetErrorPropagatorData(); 00135 00136 if (g4edata !=0) 00137 { 00138 const G4ErrorTarget* target = g4edata->GetTarget(); 00139 if( target != 0 ) 00140 { 00141 G4double distance = target->GetDistanceFromPoint(pGlobalpoint); 00142 00143 if(distance<newSafety) 00144 { 00145 newSafety = distance; 00146 } 00147 } 00148 } 00149 return newSafety; 00150 }
G4double G4ErrorPropagationNavigator::ComputeStep | ( | const G4ThreeVector & | pGlobalPoint, | |
const G4ThreeVector & | pDirection, | |||
const G4double | pCurrentProposedStepLength, | |||
G4double & | pNewSafety | |||
) | [virtual] |
Reimplemented from G4Navigator.
Definition at line 57 of file G4ErrorPropagationNavigator.cc.
References ComputeSafety(), G4Navigator::ComputeStep(), DBL_MAX, G4ErrorTarget::Dump(), G4cout, G4endl, G4ErrorState_Propagating, G4ErrorState_TargetCloserThanBoundary, G4ErrorTarget::GetDistanceFromPoint(), G4ErrorPropagatorData::GetErrorPropagatorData(), G4ErrorPropagatorData::GetTarget(), G4ErrorPropagatorData::SetState(), and G4ErrorPropagatorData::verbose().
00061 { 00062 G4double Step = G4Navigator::ComputeStep(pGlobalPoint, pDirection, 00063 pCurrentProposedStepLength, 00064 pNewSafety); 00065 00066 G4ErrorPropagatorData * g4edata 00067 = G4ErrorPropagatorData::GetErrorPropagatorData(); 00068 00069 if (g4edata !=0) 00070 { 00071 const G4ErrorTarget* target = g4edata->GetTarget(); 00072 if( target != 0 ) 00073 { 00074 G4double StepPlane= target->GetDistanceFromPoint(pGlobalPoint,pDirection); 00075 00076 if( StepPlane < 0. ) // Negative means target is crossed, will not be found 00077 { 00078 StepPlane = DBL_MAX; 00079 } 00080 #ifdef G4VERBOSE 00081 if( G4ErrorPropagatorData::verbose() >= 4 ) 00082 { 00083 G4cout << "G4ErrorPropagationNavigator::ComputeStep()" << G4endl 00084 << " Target step: " << StepPlane 00085 << ", Transportation step: " << Step << G4endl; 00086 target->Dump( "G4ErrorPropagationNavigator::ComputeStep Target " ); 00087 } 00088 #endif 00089 00090 if(StepPlane<Step) 00091 { 00092 #ifdef G4VERBOSE 00093 if( G4ErrorPropagatorData::verbose() >= 2 ) 00094 { 00095 G4cout << "G4ErrorPropagationNavigator::ComputeStep()" << G4endl 00096 << " TargetCloserThanBoundary: " << StepPlane << " < " 00097 << Step << G4endl; 00098 } 00099 #endif 00100 Step = StepPlane; 00101 g4edata->SetState(G4ErrorState_TargetCloserThanBoundary); 00102 } 00103 else 00104 { 00105 g4edata->SetState(G4ErrorState_Propagating); 00106 } 00107 } 00108 } 00109 pNewSafety = ComputeSafety(pGlobalPoint, pCurrentProposedStepLength); 00110 00111 #ifdef G4VERBOSE 00112 if( G4ErrorPropagatorData::verbose() >= 3 ) 00113 { 00114 G4cout << "G4ErrorPropagationNavigator::ComputeStep()" << G4endl 00115 << " Step: " << Step << ", ComputeSafety: " << pNewSafety 00116 << G4endl; 00117 } 00118 #endif 00119 00120 return Step; 00121 }