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
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef G4CoupledTransportation_hh
00048 #define G4CoupledTransportation_hh 1
00049
00050 #include "G4VProcess.hh"
00051
00052 #include "G4FieldManager.hh"
00053
00054 #include "G4Navigator.hh"
00055 #include "G4TransportationManager.hh"
00056 #include "G4PropagatorInField.hh"
00057 #include "G4PathFinder.hh"
00058
00059 #include "G4Track.hh"
00060 #include "G4Step.hh"
00061 #include "G4ParticleChangeForTransport.hh"
00062 class G4SafetyHelper;
00063
00064 class G4CoupledTransportation : public G4VProcess
00065 {
00066
00067
00068 public:
00069
00070 G4CoupledTransportation( G4int verbosityLevel= 0);
00071 ~G4CoupledTransportation();
00072
00073 G4double AlongStepGetPhysicalInteractionLength(
00074 const G4Track& track,
00075 G4double previousStepSize,
00076 G4double currentMinimumStep,
00077 G4double& currentSafety,
00078 G4GPILSelection* selection
00079 );
00080
00081 G4VParticleChange* AlongStepDoIt(
00082 const G4Track& track,
00083 const G4Step& stepData
00084 );
00085
00086 G4VParticleChange* PostStepDoIt(
00087 const G4Track& track,
00088 const G4Step& stepData
00089 );
00090
00091
00092 G4double PostStepGetPhysicalInteractionLength(
00093 const G4Track& ,
00094 G4double previousStepSize,
00095 G4ForceCondition* pForceCond
00096 );
00097
00098
00099
00100 G4PropagatorInField* GetPropagatorInField();
00101 void SetPropagatorInField( G4PropagatorInField* pFieldPropagator);
00102
00103
00104 inline void SetVerboseLevel( G4int verboseLevel );
00105 inline G4int GetVerboseLevel() const;
00106
00107
00108
00109 inline G4double GetThresholdWarningEnergy() const;
00110 inline G4double GetThresholdImportantEnergy() const;
00111 inline G4int GetThresholdTrials() const;
00112
00113 inline void SetThresholdWarningEnergy( G4double newEnWarn );
00114 inline void SetThresholdImportantEnergy( G4double newEnImp );
00115 inline void SetThresholdTrials(G4int newMaxTrials );
00116
00117
00118
00119
00120
00121
00122 inline G4double GetMaxEnergyKilled() const;
00123 inline G4double GetSumEnergyKilled() const;
00124 inline void ResetKilledStatistics( G4int report = 1);
00125
00126
00127 inline G4bool EnableUseMagneticMoment(G4bool useMoment=true);
00128
00129
00130 public:
00131
00132 void StartTracking(G4Track* aTrack);
00133 void EndTracking();
00134
00135 G4double AtRestGetPhysicalInteractionLength(
00136 const G4Track& ,
00137 G4ForceCondition*
00138 ) { return -1.0; };
00139
00140
00141 G4VParticleChange* AtRestDoIt(
00142 const G4Track& ,
00143 const G4Step&
00144 ) {return 0;};
00145
00146
00147 protected:
00148
00149 G4bool DoesGlobalFieldExist();
00150
00151
00152 void ReportInexactEnergy(G4double startEnergy, G4double endEnergy);
00153
00154
00155 void ReportMove( G4ThreeVector OldVector, G4ThreeVector NewVector,
00156 const G4String& Quantity );
00157
00158 private:
00159
00160 G4Navigator* fMassNavigator;
00161
00162 G4PathFinder* fPathFinder;
00163 G4int fNavigatorId;
00164
00165
00166 G4PropagatorInField* fFieldPropagator;
00167
00168
00169 G4bool fGlobalFieldExists;
00170
00171
00172
00173 G4ThreeVector fTransportEndPosition;
00174 G4ThreeVector fTransportEndMomentumDir;
00175 G4double fTransportEndKineticEnergy;
00176 G4ThreeVector fTransportEndSpin;
00177 G4bool fMomentumChanged;
00178
00179
00180 G4bool fEndGlobalTimeComputed;
00181 G4double fCandidateEndGlobalTime;
00182
00183 G4bool fParticleIsLooping;
00184
00185 G4ThreeVector fPreviousSftOrigin;
00186 G4double fPreviousMassSafety;
00187 G4double fPreviousFullSafety;
00188
00189 G4TouchableHandle fCurrentTouchableHandle;
00190
00191
00192
00193
00194
00195
00196 G4bool fMassGeometryLimitedStep;
00197
00198 G4bool fAnyGeometryLimitedStep;
00199
00200
00201 G4ParticleChangeForTransport fParticleChange;
00202
00203
00204 G4double endpointDistance;
00205
00206
00207
00208
00209 G4double fThreshold_Warning_Energy;
00210 G4double fThreshold_Important_Energy;
00211 G4int fThresholdTrials;
00212
00213
00214
00215
00216
00217 G4int fNoLooperTrials;
00218
00219 G4double fSumEnergyKilled;
00220 G4double fMaxEnergyKilled;
00221
00222 G4SafetyHelper* fpSafetyHelper;
00223
00224
00225 G4bool fUseMagneticMoment;
00226
00227
00228 G4int fVerboseLevel;
00229
00230
00231 };
00232
00233 #include "G4CoupledTransportation.icc"
00234
00235 #endif