SwimG4Stepper Class Reference

#include <SwimG4Stepper.h>

Inheritance diagram for SwimG4Stepper:
SwimStepper

List of all members.

Public Member Functions

 SwimG4Stepper ()
 SwimG4Stepper (BField *)
 SwimG4Stepper (BField *, double, double)
virtual ~SwimG4Stepper ()
virtual bool StepOnce (SwimParticle &particle, SwimStepData *stepData)

Detailed Description

Definition at line 22 of file SwimG4Stepper.h.


Constructor & Destructor Documentation

SwimG4Stepper::SwimG4Stepper (  )  [inline]

Definition at line 25 of file SwimG4Stepper.h.

00025 {;}

SwimG4Stepper::SwimG4Stepper ( BField  )  [inline]

Definition at line 32 of file SwimG4Stepper.h.

00032 {;}

SwimG4Stepper::SwimG4Stepper ( BField ,
double  ,
double   
) [inline]

Definition at line 33 of file SwimG4Stepper.h.

00033 {;}

virtual SwimG4Stepper::~SwimG4Stepper (  )  [inline, virtual]

Definition at line 35 of file SwimG4Stepper.h.

00035 {;}


Member Function Documentation

virtual bool SwimG4Stepper::StepOnce ( SwimParticle particle,
SwimStepData stepData 
) [inline, virtual]

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     }


The documentation for this class was generated from the following file:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1