51 TVector3 x0_ = TVector3(),
52 TVector3 v0_ = TVector3(),
53 Bool_t Invincible_ =
false,
54 Bool_t Record_ =
false);
129 void applyForce(
const TVector3 f,
const Double_t dt=1., Bool_t SR=kFALSE);
138 void applyDelta(
const TVector3 dx,
const TVector3 dv){
x += dx;
v += dv;}
161 TVector3
GetX(){
return TVector3(
x);}
164 TVector3
GetV(){
return TVector3(
v);}
183 Double_t
GetM(
const Bool_t restmass=kTRUE);
193 Double_t
GetKE(
const Bool_t SR=kFALSE){
return 0.5*
GetM(!SR)*(
v.Mag2());}
217 TString
Print(Bool_t onlymechanic=kFALSE, Bool_t mute=kFALSE);
226 TVector3
x = TVector3();
227 TVector3
v = TVector3();
232 TVector3
hF = TVector3();
262 TVector3 x0_ = TVector3(),
263 TVector3 v0_ = TVector3(),
264 Bool_t Invincible_ =
false,
265 Bool_t Record_ =
false):
266 particle(m0_, x0_, v0_, Invincible_, Record_){
A particle with a charge, for electromagnetic forces (coulombForce).
EMparticle(Double_t m0_=1, Double_t q_=1, TVector3 x0_=TVector3(), TVector3 v0_=TVector3(), Bool_t Invincible_=false, Bool_t Record_=false)
Make a charged particle.
One simulated system: particles, pairwise forces, inspectors and the time integration.
Inspector on a pair of particles.
Inspector : one terminating condition of event::DeriveInspect().
A point body with mass, position, velocity, step count, time and an optional recorded path.
Int_t GetRecordPeriod()
The record period (see SetRecordPeriod()).
TVector3 GetV()
Velocity in c (a copy).
void SetName(const TString name_)
Set a name for printing.
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.
TVector3 GetP()
Non-relativistic momentum in amu c (same as GetMomentum(kFALSE)).
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
~particle()
Destructor; deletes the path (not virtual: delete a particle through its own or its base type only,...
void applyV(const TVector3 v_)
Set the velocity (c).
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).
Long_t GetECNT()
Number of derived steps ("evolved count"), counted also for an invincible particle.
void applyDelta(const TVector3 dx, const TVector3 dv)
Add dx (fm) to the position and dv (c) to the velocity.
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.
void AddRecord()
Append the present x, v and time to the path now, whatever the record period.
path * ppath
the path (owned)
Long_t ecount
number of derived steps
Double_t GetTime()
Evolved time in fm/c; does not advance for an invincible particle.
Double_t etime
evolved time in fm/c
Double_t GetM0()
Rest mass in amu.
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.
path * GetPath()
The recorded path (owned by the particle; a null pointer if not recording).
Double_t GetM(const Bool_t restmass=kTRUE)
Mass in amu.
Bool_t hold
a force is held
void SetRecordPeriod(Int_t n)
Set the record period of the path.
TVector3 hF
held force in amu c^2/fm
Double_t GetQ()
Charge in e. 0 for a plain particle, set by EMparticle.
TVector3 GetX()
Position in fm (a copy).
void applyMechanic(const TVector3 x_, const TVector3 v_)
Set position and velocity (fm, c).
void applyX(const TVector3 x_)
Set the position (fm).
Double_t GetGamma()
Lorentz factor (v in c); NaN for speed above c.
Bool_t IsRecording()
Whether the particle records its path.
Time-ordered list of (position, velocity, time) samples of one particle.
void AddRecord(TVector3 x_, TVector3 v_, Double_t time_)
Append one record at the end.
Recorded trajectory of one particle (path) and distance-of-closest-approach helpers.