#include <SwimG4Stepper.h>
Inheritance diagram for SwimG4Stepper:

Public Member Functions | |
| SwimG4Stepper () | |
| SwimG4Stepper (BField *) | |
| SwimG4Stepper (BField *, double, double) | |
| virtual | ~SwimG4Stepper () |
| virtual bool | StepOnce (SwimParticle &particle, SwimStepData *stepData) |
|
|
Definition at line 25 of file SwimG4Stepper.h. 00025 {;}
|
|
|
Definition at line 32 of file SwimG4Stepper.h. 00032 {;}
|
|
||||||||||||||||
|
Definition at line 33 of file SwimG4Stepper.h. 00033 {;}
|
|
|
Definition at line 35 of file SwimG4Stepper.h. 00035 {;}
|
|
||||||||||||
|
Reimplemented from SwimStepper. Definition at line 37 of file SwimG4Stepper.h. References SwimParticle::GetCharge(), SwimParticle::GetDirection(), SwimParticle::GetMass(), SwimParticle::GetMomentumModulus(), SwimParticle::GetPosition(), SwimStepData::GetStepSize(), SwimParticle::SetMomentum(), and SwimParticle::SetPosition(). 00038 {
00039 #ifdef SITE_HAS_GEANT4
00040 bool aok;
00041 double xStart[3];
00042 double xNext[3];
00043 double vDir[3];
00044 double xDirNext[3];
00045
00046 // Setup step
00047 xStart[0] = particle.GetPosition().X();
00048 xStart[1] = particle.GetPosition().Y();
00049 xStart[2] = particle.GetPosition().Z();
00050 vDir[0] = particle.GetDirection().X();
00051 vDir[1] = particle.GetDirection().Y();
00052 vDir[2] = particle.GetDirection().Z();
00053 double momentum = particle.GetMomentumModulus();
00054 double mass = particle.GetMass();
00055 double charge = particle.GetCharge();
00056 double stepSize = stepData->GetStepSize();
00057
00058 aok = fStepper.StepOnce(xStart,vDir,momentum,mass,charge,stepSize,
00059 xNext,vDirNext,pNext);
00060
00061 // Shuffle to output
00062 TVector3 position;
00063 TVector3 momentum;
00064 position.SetXYZ(vNext[0],vNext[1],vNext[2]);
00065 particle.SetPosition(position);
00066 momentum.SetXYZ(&pNext*vDirNext[0],&pNext*vDirNext[1],&pNext*vDirNext[2]);
00067 particle.SetMomentum(momentum);
00068 return aok;
00069 #else
00070 assert("SwimG4Stepper.h: Program build without GEANT4 support.\n"==0);
00071 assert(particle.GetMass() >= 0.0); // simply to avoid unused param warning
00072 assert(stepData->GetStepSize() >= 0.0); // "
00073 return false;
00074 #endif
00075 }
|
1.3.9.1