SwimParticle Class Reference

#include <SwimParticle.h>

List of all members.

Public Member Functions

 SwimParticle ()
virtual ~SwimParticle ()
 SwimParticle (const TVector3 position, const TVector3 momentum, double mass=0.105658357 *Munits::GeV, double charge=-1.0)
const TVector3 GetInitPosition () const
const TVector3 GetPosition () const
const TVector3 GetMomentum () const
TVector3 GetDirection () const
double GetMomentumModulus () const
double GetEnergy () const
double GetMass () const
double GetCharge () const
double GetS () const
double GetRange () const
double GetVxB () const
void SetPosition (const TVector3 position)
void SetMomentum (const TVector3 momentum)
void SetMass (double mass)
void SetCharge (double charge)
void AddS (double s)
void AddRange (double range)
void AddVxB (double VxB)

Private Attributes

TVector3 fInitPosition
TVector3 fPosition
TVector3 fMomentum
double fMass
double fCharge
double fS
double fRange
double fVxB

Detailed Description

Definition at line 20 of file SwimParticle.h.


Constructor & Destructor Documentation

SwimParticle::SwimParticle (  )  [inline]

Definition at line 26 of file SwimParticle.h.

00026 {;}

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

Definition at line 27 of file SwimParticle.h.

00027 {;}

SwimParticle::SwimParticle ( const TVector3  position,
const TVector3  momentum,
double  mass = 0.105658357*Munits::GeV,
double  charge = -1.0 
)

Definition at line 14 of file SwimParticle.cxx.

00017                                                   :
00018   fInitPosition(position),
00019   fPosition(position),
00020   fMomentum(momentum),
00021   fMass(mass),
00022   fCharge(charge),
00023   fS(0),
00024   fRange(0),
00025   fVxB(0)
00026 {}


Member Function Documentation

void SwimParticle::AddRange ( double  range  ) 

Definition at line 152 of file SwimParticle.cxx.

References fRange.

Referenced by SwimStepOnceAction::Perform(), SwimDefStepper::StepOnce(), GeoSwimmer::SwimBackward(), and GeoSwimmer::SwimForward().

00153 {
00154   fRange += range;
00155 }

void SwimParticle::AddS ( double  s  ) 

Definition at line 145 of file SwimParticle.cxx.

References fS.

Referenced by SwimStepOnceAction::Perform(), SwimDefStepper::StepOnce(), GeoSwimmer::SwimBackward(), and GeoSwimmer::SwimForward().

00146 {
00147   fS += s;
00148 }

void SwimParticle::AddVxB ( double  VxB  ) 

Definition at line 157 of file SwimParticle.cxx.

References fVxB.

Referenced by SwimDefStepper::StepOnce().

00158 {
00159   fVxB += VxB;
00160 }

double SwimParticle::GetCharge (  )  const
TVector3 SwimParticle::GetDirection (  )  const

Definition at line 51 of file SwimParticle.cxx.

References fMomentum, and GetMomentumModulus().

Referenced by SwimStepOnceAction::Perform(), SwimG4Stepper::StepOnce(), SwimZCondition::StepSize(), AlgFitTrackCam::Swim(), SwimSwimmer::Swim(), AlgFitTrackSR::Swim(), and DataFT::SwimAsSwimmer().

00052 {
00053   double modulus = SwimParticle::GetMomentumModulus();  
00054   if (modulus!=0.0)
00055     return TVector3(fMomentum.X()/modulus,
00056                     fMomentum.Y()/modulus,
00057                     fMomentum.Z()/modulus);
00058   else return TVector3(0.0,0.0,0.0);
00059 }

double SwimParticle::GetEnergy (  )  const

Definition at line 72 of file SwimParticle.cxx.

References fMass, and fMomentum.

Referenced by TestSwimmer::Ana(), SwimdEdxAction::Perform(), and SwimPrintStepAction::Perform().

00073 {
00074   double momentumSqr = fMomentum.X()*fMomentum.X()
00075                      + fMomentum.Y()*fMomentum.Y()
00076                      + fMomentum.Z()*fMomentum.Z();
00077   return TMath::Sqrt(fMass*fMass+momentumSqr);
00078 }

const TVector3 SwimParticle::GetInitPosition (  )  const

Definition at line 30 of file SwimParticle.cxx.

References fInitPosition.

Referenced by SwimZCondition::Satisfied().

00031 {
00032   return fInitPosition;
00033 } 

double SwimParticle::GetMass (  )  const

Definition at line 82 of file SwimParticle.cxx.

References fMass.

Referenced by SwimG4Stepper::StepOnce().

00083 { 
00084   return fMass; 
00085 } 

const TVector3 SwimParticle::GetMomentum (  )  const
double SwimParticle::GetMomentumModulus (  )  const
const TVector3 SwimParticle::GetPosition (  )  const
double SwimParticle::GetRange ( void   )  const

Definition at line 103 of file SwimParticle.cxx.

References fRange.

Referenced by AlgFitTrackCam::Swim(), and DataFT::SwimAsSwimmer().

00104 { 
00105   return fRange; 
00106 } 

double SwimParticle::GetS (  )  const

Definition at line 96 of file SwimParticle.cxx.

References fS.

Referenced by AlgFitTrackCam::Swim(), and DataFT::SwimAsSwimmer().

00097 { 
00098   return fS; 
00099 } 

double SwimParticle::GetVxB (  )  const

Definition at line 110 of file SwimParticle.cxx.

References fVxB.

00111 {
00112   return fVxB;
00113 }

void SwimParticle::SetCharge ( double  charge  ) 

Definition at line 138 of file SwimParticle.cxx.

References fCharge.

Referenced by AlgFitTrackCam::Swim(), AlgFitTrackSR::Swim(), and DataFT::SwimAsSwimmer().

00139 {
00140   fCharge = charge;
00141 }

void SwimParticle::SetMass ( double  mass  ) 

Definition at line 131 of file SwimParticle.cxx.

References fMass.

00132 {
00133   fMass = mass;
00134 }

void SwimParticle::SetMomentum ( const TVector3  momentum  ) 
void SwimParticle::SetPosition ( const TVector3  position  ) 

Member Data Documentation

double SwimParticle::fCharge [private]

Definition at line 57 of file SwimParticle.h.

Referenced by GetCharge(), and SetCharge().

TVector3 SwimParticle::fInitPosition [private]

Definition at line 53 of file SwimParticle.h.

Referenced by GetInitPosition().

double SwimParticle::fMass [private]

Definition at line 56 of file SwimParticle.h.

Referenced by GetEnergy(), GetMass(), and SetMass().

TVector3 SwimParticle::fMomentum [private]

Definition at line 55 of file SwimParticle.h.

Referenced by GetDirection(), GetEnergy(), GetMomentum(), GetMomentumModulus(), and SetMomentum().

TVector3 SwimParticle::fPosition [private]

Definition at line 54 of file SwimParticle.h.

Referenced by GetPosition(), and SetPosition().

double SwimParticle::fRange [private]

Definition at line 59 of file SwimParticle.h.

Referenced by AddRange(), and GetRange().

double SwimParticle::fS [private]

Definition at line 58 of file SwimParticle.h.

Referenced by AddS(), and GetS().

double SwimParticle::fVxB [private]

Definition at line 60 of file SwimParticle.h.

Referenced by AddVxB(), and GetVxB().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1