93 Double_t Unet = ev_->
GetPE(
this, kFALSE);
94 Double_t UnetI = ev_->
GetPE(
this, kTRUE);
97 if ((!ignoreInvincible)&&
IsInvincible())
return TVector3();
99 resultmag = TMath::Sqrt(
GetV().Mag2() - ((1/
GetM())*Unet+(1/
GetM())*UnetI) )-
GetV().Mag();
101 result = resultmag*
GetV().Unit();
110 Double_t e1 =
GetKE();
112 Double_t e2 =
GetKE();
113 if(verbose) cout<<
"BEFORE\t"<< e1 <<
"\tAFTER\t" << e2 <<
"\tDIFF\t" <<e2-e1<<std::endl;
123 Double_t m_ =
GetM(!SR);
124 TVector3 a = f * (1/m_);
126 a * (0.5) * pow(dt,2) +
v * dt
142 Double_t v_ =
v.Mag();
143 return ( 1/sqrt( 1-pow(v_,2) )) *
m0;
148 Double_t v_ =
v.Mag();
149 return 1/sqrt( 1-pow(v_,2) );
156 return TVector3(
v *
m0);
160 TString result = TString(
"");
161 result += TString(
"[");
169 result += TString(
"]");
174 TString result = TString(
"");
175 result += TString(
"[ Particle ");
178 result += TString(
"x: ");
180 result += TString(
", ");
181 result += TString(
"v: ");
183 result += TString(
" ]");
One simulated system: particles, pairwise forces, inspectors and the time integration.
Double_t GetPE(Int_t index, Bool_t OnlyInvincibles=kFALSE)
Potential energy of one particle with the other particles (amu c^2).
A point body with mass, position, velocity, step count, time and an optional recorded path.
TVector3 GetV()
Velocity in c (a copy).
Bool_t Invincible
fixed particle
TString name
name for printing
Double_t GetKE(const Bool_t SR=kFALSE)
Kinetic energy in amu c^2.
void releaseForce(const Double_t dt)
Apply the held force for one step of dt (see applyForce()) and clear it.
void holdForce(const TVector3 f)
Add a force to the pending force of this particle.
Bool_t Record
records the path
Int_t recordPeriod
a step is recorded when ecount is a multiple of it
Bool_t IsInvincible()
Whether the particle is fixed (invincible).
void applyDV(const TVector3 dv)
Add dv (c) to the velocity.
Double_t m0
rest mass in amu
void applyForce(const TVector3 f, const Double_t dt=1., Bool_t SR=kFALSE)
Move the particle for one step under a constant force (the original Taylor step).
TVector3 GetMomentum(Bool_t relativistic=kFALSE)
Momentum in amu c.
TVector3 calibrateVelocity(event *ev_, Bool_t ignoreInvincible=kFALSE, Bool_t verbose=kFALSE)
Apply calculateCalibrateVelocity() to this particle.
path * ppath
the path (owned)
Long_t ecount
number of derived steps
Double_t etime
evolved time in fm/c
TString Print(Bool_t onlymechanic=kFALSE, Bool_t mute=kFALSE)
Describe the particle as text "[ Particle x: [..], v: [..] ]".
void finishStep(const Double_t dt)
Close one integration step whose x, v were already updated by the event (step count,...
TVector3 calculateCalibrateVelocity(event *ev_, Bool_t ignoreInvincible=kFALSE)
Velocity change which makes the given velocity the one far from the other bodies.
void resetHold()
Discard the held force.
void applyDX(const TVector3 dx)
Add dx (fm) to the position.
Double_t GetM(const Bool_t restmass=kTRUE)
Mass in amu.
Bool_t hold
a force is held
TVector3 hF
held force in amu c^2/fm
TVector3 GetX()
Position in fm (a copy).
particle(Double_t m0_=1, TVector3 x0_=TVector3(), TVector3 v0_=TVector3(), Bool_t Invincible_=false, Bool_t Record_=false)
Make a particle.
Double_t GetGamma()
Lorentz factor (v in c); NaN for speed above c.
Time-ordered list of (position, velocity, time) samples of one particle.
TString onelineTVectorS(TVector3 vec)