SwimZCondition Class Reference

#include <SwimZCondition.h>

Inheritance diagram for SwimZCondition:
SwimCondition

List of all members.

Public Member Functions

 SwimZCondition ()
 SwimZCondition (double zFinal)
virtual ~SwimZCondition ()
virtual bool Satisfied (const SwimParticle &particle)
virtual double StepSize (const SwimParticle &particle)
void SetZFinal (double zFinal)

Private Attributes

double fZFinal

Detailed Description

Definition at line 18 of file SwimZCondition.h.


Constructor & Destructor Documentation

SwimZCondition::SwimZCondition (  ) 

Definition at line 14 of file SwimZCondition.cxx.

00014                                :
00015   fZFinal(0.0)
00016 {}

SwimZCondition::SwimZCondition ( double  zFinal  ) 

Definition at line 20 of file SwimZCondition.cxx.

00020                                             :
00021   fZFinal(zFinal)
00022 {}

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

Definition at line 23 of file SwimZCondition.h.

00023 {;}


Member Function Documentation

bool SwimZCondition::Satisfied ( const SwimParticle particle  )  [virtual]

Implements SwimCondition.

Definition at line 26 of file SwimZCondition.cxx.

References fZFinal, SwimParticle::GetInitPosition(), and SwimParticle::GetPosition().

00027 {
00028   if ((particle.GetInitPosition().Z() < fZFinal 
00029        && particle.GetPosition().Z() >= fZFinal)
00030       || (particle.GetInitPosition().Z() > fZFinal 
00031           && particle.GetPosition().Z() <= fZFinal))
00032     return true;
00033 
00034   return false;
00035 }

void SwimZCondition::SetZFinal ( double  zFinal  ) 

Definition at line 48 of file SwimZCondition.cxx.

References fZFinal.

00049 {
00050   fZFinal = zFinal;
00051 }

double SwimZCondition::StepSize ( const SwimParticle particle  )  [virtual]

Reimplemented from SwimCondition.

Definition at line 39 of file SwimZCondition.cxx.

References fZFinal, SwimParticle::GetDirection(), and SwimParticle::GetPosition().

00040 {
00041   double d1 = TMath::Abs((particle.GetPosition().Z()-fZFinal)/particle.GetDirection().Z());
00042 
00043   return d1;
00044 }


Member Data Documentation

double SwimZCondition::fZFinal [private]

Definition at line 30 of file SwimZCondition.h.

Referenced by Satisfied(), SetZFinal(), and StepSize().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1