#include <G4AdjointProcessEquivalentToDirectProcess.hh>
Inheritance diagram for G4AdjointProcessEquivalentToDirectProcess:
Definition at line 55 of file G4AdjointProcessEquivalentToDirectProcess.hh.
G4AdjointProcessEquivalentToDirectProcess::G4AdjointProcessEquivalentToDirectProcess | ( | const G4String & | aName, | |
G4VProcess * | aProcess, | |||
G4ParticleDefinition * | fwd_particle_def | |||
) |
Definition at line 43 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::GetProcessType(), and G4VProcess::theProcessType.
00046 :G4VProcess(aName) 00047 { 00048 theDirectProcess =aProcess; 00049 theProcessType = theDirectProcess->GetProcessType(); 00050 theFwdParticleDef = fwd_particle_def; 00051 }
G4AdjointProcessEquivalentToDirectProcess::~G4AdjointProcessEquivalentToDirectProcess | ( | ) | [virtual] |
G4VParticleChange * G4AdjointProcessEquivalentToDirectProcess::AlongStepDoIt | ( | const G4Track & | track, | |
const G4Step & | stepData | |||
) | [virtual] |
Implements G4VProcess.
Definition at line 208 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::AlongStepDoIt(), G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetPreAssignedDecayProducts(), G4DynamicParticle::SetDefinition(), and G4DynamicParticle::SetPreAssignedDecayProducts().
00210 { 00211 //Change the particle definition to the direct one 00212 //------------------------------------------------ 00213 G4DynamicParticle* theDynPart = const_cast<G4DynamicParticle*> (track.GetDynamicParticle()); 00214 G4ParticleDefinition* adjPartDef = theDynPart->GetDefinition(); 00215 00216 G4DecayProducts* decayProducts = const_cast<G4DecayProducts*> (theDynPart->GetPreAssignedDecayProducts()); 00217 00218 theDynPart->SetPreAssignedDecayProducts((G4DecayProducts*)(0)); 00219 theDynPart->SetDefinition(theFwdParticleDef); 00220 00221 00222 //Call the direct process 00223 //---------------------- 00224 G4VParticleChange* partChange =theDirectProcess->AlongStepDoIt( track, stepData ); 00225 00226 //Restore the adjoint particle definition to the direct one 00227 //------------------------------------------------ 00228 theDynPart->SetDefinition(adjPartDef); 00229 theDynPart->SetPreAssignedDecayProducts(decayProducts); 00230 00231 return partChange; 00232 }
G4double G4AdjointProcessEquivalentToDirectProcess::AlongStepGetPhysicalInteractionLength | ( | const G4Track & | track, | |
G4double | previousStepSize, | |||
G4double | currentMinimumStep, | |||
G4double & | proposedSafety, | |||
G4GPILSelection * | selection | |||
) | [virtual] |
Implements G4VProcess.
Definition at line 65 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetPreAssignedDecayProducts(), G4DynamicParticle::SetDefinition(), and G4DynamicParticle::SetPreAssignedDecayProducts().
00070 { 00071 00072 00073 //Change the particle definition to the direct one 00074 //------------------------------------------------ 00075 G4DynamicParticle* theDynPart = const_cast<G4DynamicParticle*> (track.GetDynamicParticle()); 00076 G4ParticleDefinition* adjPartDef = theDynPart->GetDefinition(); 00077 00078 G4DecayProducts* decayProducts = const_cast<G4DecayProducts*> (theDynPart->GetPreAssignedDecayProducts()); 00079 theDynPart->SetPreAssignedDecayProducts((G4DecayProducts*)(0)); 00080 theDynPart->SetDefinition(theFwdParticleDef); 00081 00082 00083 //Call the direct process 00084 //---------------------- 00085 G4double GPIL = theDirectProcess-> 00086 AlongStepGetPhysicalInteractionLength( track, 00087 previousStepSize, 00088 currentMinimumStep, 00089 proposedSafety, 00090 selection ); 00091 00092 00093 //Restore the adjoint particle definition to the direct one 00094 //------------------------------------------------ 00095 theDynPart->SetDefinition(adjPartDef); 00096 theDynPart->SetPreAssignedDecayProducts(decayProducts); 00097 00098 00099 return GPIL; 00100 00101 }
G4VParticleChange * G4AdjointProcessEquivalentToDirectProcess::AtRestDoIt | ( | const G4Track & | track, | |
const G4Step & | stepData | |||
) | [virtual] |
Implements G4VProcess.
Definition at line 234 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::AtRestDoIt(), G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetPreAssignedDecayProducts(), G4DynamicParticle::SetDefinition(), and G4DynamicParticle::SetPreAssignedDecayProducts().
00236 { 00237 //Change the particle definition to the direct one 00238 //------------------------------------------------ 00239 G4DynamicParticle* theDynPart = const_cast<G4DynamicParticle*> (track.GetDynamicParticle()); 00240 G4ParticleDefinition* adjPartDef = theDynPart->GetDefinition(); 00241 00242 G4DecayProducts* decayProducts = const_cast<G4DecayProducts*> (theDynPart->GetPreAssignedDecayProducts()); 00243 00244 theDynPart->SetPreAssignedDecayProducts((G4DecayProducts*)(0)); 00245 theDynPart->SetDefinition(theFwdParticleDef); 00246 00247 00248 //Call the direct process 00249 //---------------------- 00250 G4VParticleChange* partChange =theDirectProcess->AtRestDoIt( track, stepData ); 00251 00252 //Restore the adjoint particle definition to the direct one 00253 //------------------------------------------------ 00254 theDynPart->SetDefinition(adjPartDef); 00255 theDynPart->SetPreAssignedDecayProducts(decayProducts); 00256 00257 return partChange; 00258 00259 00260 }
G4double G4AdjointProcessEquivalentToDirectProcess::AtRestGetPhysicalInteractionLength | ( | const G4Track & | track, | |
G4ForceCondition * | condition | |||
) | [virtual] |
Implements G4VProcess.
Definition at line 104 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::AtRestGetPhysicalInteractionLength(), G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetPreAssignedDecayProducts(), G4DynamicParticle::SetDefinition(), and G4DynamicParticle::SetPreAssignedDecayProducts().
00106 { //Change the particle definition to the direct one 00107 //------------------------------------------------ 00108 G4DynamicParticle* theDynPart = const_cast<G4DynamicParticle*> (track.GetDynamicParticle()); 00109 G4ParticleDefinition* adjPartDef = theDynPart->GetDefinition(); 00110 00111 G4DecayProducts* decayProducts = const_cast<G4DecayProducts*> (theDynPart->GetPreAssignedDecayProducts()); 00112 theDynPart->SetPreAssignedDecayProducts((G4DecayProducts*)(0)); 00113 theDynPart->SetDefinition(theFwdParticleDef); 00114 00115 00116 //Call the direct process 00117 //---------------------- 00118 00119 00120 G4double GPIL = theDirectProcess->AtRestGetPhysicalInteractionLength( track, condition ); 00121 00122 //Restore the adjoint particle definition to the direct one 00123 //------------------------------------------------ 00124 theDynPart->SetDefinition(adjPartDef); 00125 theDynPart->SetPreAssignedDecayProducts(decayProducts); 00126 00127 return GPIL; 00128 00129 00130 }
void G4AdjointProcessEquivalentToDirectProcess::BuildPhysicsTable | ( | const G4ParticleDefinition & | ) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 267 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::BuildPhysicsTable().
00268 { 00269 return theDirectProcess->BuildPhysicsTable(*theFwdParticleDef); 00270 }
void G4AdjointProcessEquivalentToDirectProcess::EndTracking | ( | ) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 316 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::EndTracking().
00317 { 00318 theDirectProcess->EndTracking(); 00319 }
G4bool G4AdjointProcessEquivalentToDirectProcess::IsApplicable | ( | const G4ParticleDefinition & | ) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 262 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::IsApplicable().
00263 { 00264 return theDirectProcess->IsApplicable(*theFwdParticleDef); 00265 }
G4VParticleChange * G4AdjointProcessEquivalentToDirectProcess::PostStepDoIt | ( | const G4Track & | track, | |
const G4Step & | stepData | |||
) | [virtual] |
Implements G4VProcess.
Definition at line 177 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetPreAssignedDecayProducts(), G4VProcess::PostStepDoIt(), G4DynamicParticle::SetDefinition(), and G4DynamicParticle::SetPreAssignedDecayProducts().
00179 { 00180 //Change the particle definition to the direct one 00181 //------------------------------------------------ 00182 G4DynamicParticle* theDynPart = const_cast<G4DynamicParticle*> (track.GetDynamicParticle()); 00183 G4ParticleDefinition* adjPartDef = theDynPart->GetDefinition(); 00184 00185 G4DecayProducts* decayProducts = const_cast<G4DecayProducts*> (theDynPart->GetPreAssignedDecayProducts()); 00186 00187 theDynPart->SetPreAssignedDecayProducts((G4DecayProducts*)(0)); 00188 theDynPart->SetDefinition(theFwdParticleDef); 00189 00190 00191 //Call the direct process 00192 //---------------------- 00193 00194 G4VParticleChange* partChange = theDirectProcess->PostStepDoIt( track, stepData ); 00195 00196 00197 //Restore the adjoint particle definition to the direct one 00198 //------------------------------------------------ 00199 theDynPart->SetDefinition(adjPartDef); 00200 theDynPart->SetPreAssignedDecayProducts(decayProducts); 00201 00202 return partChange; 00203 00204 00205 00206 }
G4double G4AdjointProcessEquivalentToDirectProcess::PostStepGetPhysicalInteractionLength | ( | const G4Track & | track, | |
G4double | previousStepSize, | |||
G4ForceCondition * | condition | |||
) | [virtual] |
Implements G4VProcess.
Definition at line 133 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetPreAssignedDecayProducts(), G4VProcess::PostStepGetPhysicalInteractionLength(), G4DynamicParticle::SetDefinition(), and G4DynamicParticle::SetPreAssignedDecayProducts().
00136 { 00137 //Change the particle definition to the direct one 00138 //------------------------------------------------ 00139 G4DynamicParticle* theDynPart = const_cast<G4DynamicParticle*> (track.GetDynamicParticle()); 00140 G4ParticleDefinition* adjPartDef = theDynPart->GetDefinition(); 00141 00142 G4DecayProducts* decayProducts = const_cast<G4DecayProducts*> (theDynPart->GetPreAssignedDecayProducts()); 00143 00144 theDynPart->SetPreAssignedDecayProducts((G4DecayProducts*)(0)); 00145 theDynPart->SetDefinition(theFwdParticleDef); 00146 00147 00148 //Call the direct process 00149 //---------------------- 00150 00151 00152 G4double GPIL = theDirectProcess->PostStepGetPhysicalInteractionLength( track, 00153 previousStepSize, 00154 condition ); 00155 00156 //Restore the adjoint particle definition to the direct one 00157 //------------------------------------------------ 00158 theDynPart->SetDefinition(adjPartDef); 00159 theDynPart->SetPreAssignedDecayProducts(decayProducts); 00160 00161 return GPIL; 00162 00163 00164 }
void G4AdjointProcessEquivalentToDirectProcess::PreparePhysicsTable | ( | const G4ParticleDefinition & | ) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 272 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::PreparePhysicsTable().
00273 { 00274 return theDirectProcess->PreparePhysicsTable(*theFwdParticleDef); 00275 }
void G4AdjointProcessEquivalentToDirectProcess::ResetNumberOfInteractionLengthLeft | ( | ) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 59 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::ResetNumberOfInteractionLengthLeft().
00060 { 00061 theDirectProcess->ResetNumberOfInteractionLengthLeft(); 00062 }
G4bool G4AdjointProcessEquivalentToDirectProcess::RetrievePhysicsTable | ( | const G4ParticleDefinition * | , | |
const G4String & | directory, | |||
G4bool | ascii = false | |||
) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 286 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::RetrievePhysicsTable().
00289 { 00290 return theDirectProcess->RetrievePhysicsTable(theFwdParticleDef, directory, ascii); 00291 }
void G4AdjointProcessEquivalentToDirectProcess::StartTracking | ( | G4Track * | ) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 293 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4DynamicParticle::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetPreAssignedDecayProducts(), G4DynamicParticle::SetDefinition(), G4DynamicParticle::SetPreAssignedDecayProducts(), and G4VProcess::StartTracking().
00294 { 00295 //Change the particle definition to the direct one 00296 //------------------------------------------------ 00297 G4DynamicParticle* theDynPart = const_cast<G4DynamicParticle*> (track->GetDynamicParticle()); 00298 G4ParticleDefinition* adjPartDef = theDynPart->GetDefinition(); 00299 00300 G4DecayProducts* decayProducts = const_cast<G4DecayProducts*> (theDynPart->GetPreAssignedDecayProducts()); 00301 theDynPart->SetPreAssignedDecayProducts((G4DecayProducts*)(0)); 00302 theDynPart->SetDefinition(theFwdParticleDef); 00303 00304 theDirectProcess->StartTracking(track); 00305 00306 //Restore the adjoint particle definition to the direct one 00307 //------------------------------------------------ 00308 theDynPart->SetDefinition(adjPartDef); 00309 theDynPart->SetPreAssignedDecayProducts(decayProducts); 00310 00311 00312 return; 00313 00314 }
G4bool G4AdjointProcessEquivalentToDirectProcess::StorePhysicsTable | ( | const G4ParticleDefinition * | , | |
const G4String & | directory, | |||
G4bool | ascii = false | |||
) | [virtual] |
Reimplemented from G4VProcess.
Definition at line 278 of file G4AdjointProcessEquivalentToDirectProcess.cc.
References G4VProcess::StorePhysicsTable().
00281 { 00282 return theDirectProcess->StorePhysicsTable(theFwdParticleDef, directory, ascii); 00283 }