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 #include "G4VAdjointReverseReaction.hh"
00029 #include "G4SystemOfUnits.hh"
00030 #include "G4AdjointCSManager.hh"
00031 #include "G4AdjointCSMatrix.hh"
00032 #include "G4AdjointInterpolator.hh"
00033 #include "G4AdjointCSMatrix.hh"
00034 #include "G4VEmAdjointModel.hh"
00035 #include "G4ElementTable.hh"
00036 #include "G4Element.hh"
00037 #include "G4Material.hh"
00038 #include "G4MaterialCutsCouple.hh"
00039 #include "G4AdjointCSManager.hh"
00040 #include "G4ParticleChange.hh"
00041 #include "G4AdjointElectron.hh"
00042
00043
00044 G4VAdjointReverseReaction::
00045 G4VAdjointReverseReaction(G4String process_name, G4bool whichScatCase):
00046 G4VDiscreteProcess(process_name)
00047 {theAdjointCSManager = G4AdjointCSManager::GetAdjointCSManager();
00048 IsScatProjToProjCase=whichScatCase;
00049 fParticleChange=new G4ParticleChange();
00050 IsFwdCSUsed=false;
00051 IsIntegralModeUsed=false;
00052 lastCS=0.;
00053 }
00055
00056 G4VAdjointReverseReaction::
00057 ~G4VAdjointReverseReaction()
00058 { if (fParticleChange) delete fParticleChange;
00059 }
00061
00062 void G4VAdjointReverseReaction::PreparePhysicsTable(const G4ParticleDefinition&)
00063 {;
00064 }
00066
00067 void G4VAdjointReverseReaction::BuildPhysicsTable(const G4ParticleDefinition&)
00068 {
00069
00070 theAdjointCSManager->BuildCrossSectionMatrices();
00071 theAdjointCSManager->BuildTotalSigmaTables();
00072
00073 }
00075
00076 G4VParticleChange* G4VAdjointReverseReaction::PostStepDoIt(const G4Track& track, const G4Step& )
00077 {
00078
00079
00080
00081 fParticleChange->Initialize(track);
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095 theAdjointEMModel->SampleSecondaries(track,
00096 IsScatProjToProjCase,
00097 fParticleChange);
00098
00099 ClearNumberOfInteractionLengthLeft();
00100 return fParticleChange;
00101
00102
00103
00104 }
00106
00107 G4double G4VAdjointReverseReaction::GetMeanFreePath(const G4Track& track,
00108 G4double ,
00109 G4ForceCondition* condition)
00110 { *condition = NotForced;
00111 G4double preStepKinEnergy = track.GetKineticEnergy();
00112
00113
00114
00115
00116 G4double Sigma =
00117 theAdjointEMModel->GetAdjointCrossSection(track.GetMaterialCutsCouple(),preStepKinEnergy,IsScatProjToProjCase);
00118 G4double fwd_TotCS;
00119 Sigma *= theAdjointCSManager->GetCrossSectionCorrection(track.GetDefinition(),preStepKinEnergy,track.GetMaterialCutsCouple(),IsFwdCSUsed, fwd_TotCS);
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131 G4double mean_free_path = 1.e60 *mm;
00132 if (Sigma>0) mean_free_path = 1./Sigma;
00133 lastCS=Sigma;
00134
00135
00136
00137
00138
00139
00140 return mean_free_path;
00141 }