|
RooParticle
Particle scattering simulator with ROOT
|
A particle with a charge, for electromagnetic forces (coulombForce). More...
#include <particle.hpp>
Public Member Functions | |
| 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. | |
| ~EMparticle () | |
Public Member Functions inherited from particle | |
| particle (Double_t m0_=1, TVector3 x0_=TVector3(), TVector3 v0_=TVector3(), Bool_t Invincible_=false, Bool_t Record_=false) | |
| Make a particle. | |
| particle (const particle &p) | |
| Copy constructor: state, step count, time, charge, record flag and period, and a copy of the path. | |
| ~particle () | |
| Destructor; deletes the path (not virtual: delete a particle through its own or its base type only, no member is allocated by subclasses). | |
| void | holdForce (const TVector3 f) |
| Add a force to the pending force of this particle. | |
| void | releaseForce (const Double_t dt) |
| Apply the held force for one step of dt (see applyForce()) and clear it. | |
| void | resetHold () |
| Discard the held force. | |
| void | finishStep (const Double_t dt) |
| Close one integration step whose x, v were already updated by the event (step count, time and path record). Used by the selectable integrators. | |
| TVector3 | calculateCalibrateVelocity (event *ev_, Bool_t ignoreInvincible=kFALSE) |
| Velocity change which makes the given velocity the one far from the other bodies. | |
| TVector3 | calibrateVelocity (event *ev_, Bool_t ignoreInvincible=kFALSE, Bool_t verbose=kFALSE) |
| Apply calculateCalibrateVelocity() to this particle. | |
| void | applyMechanic (const TVector3 x_, const TVector3 v_) |
| Set position and velocity (fm, c). | |
| void | applyX (const TVector3 x_) |
| Set the position (fm). | |
| 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). | |
| void | applyDX (const TVector3 dx) |
| Add dx (fm) to the position. | |
| void | applyDV (const TVector3 dv) |
| Add dv (c) to the velocity. | |
| void | applyDelta (const TVector3 dx, const TVector3 dv) |
| Add dx (fm) to the position and dv (c) to the velocity. | |
| void | SetName (const TString name_) |
| Set a name for printing. | |
| void | AddRecord () |
| Append the present x, v and time to the path now, whatever the record period. | |
| void | SetRecordPeriod (Int_t n) |
| Set the record period of the path. | |
| Int_t | GetRecordPeriod () |
| The record period (see SetRecordPeriod()). | |
| TVector3 | GetX () |
| Position in fm (a copy). | |
| TVector3 | GetV () |
| Velocity in c (a copy). | |
| TVector3 | GetP () |
| Non-relativistic momentum \(m_0 v\) in amu c (same as GetMomentum(kFALSE)). | |
| TVector3 | GetMomentum (Bool_t relativistic=kFALSE) |
| Momentum in amu c. | |
| Long_t | GetECNT () |
| Number of derived steps ("evolved count"), counted also for an invincible particle. | |
| Double_t | GetM0 () |
| Rest mass in amu. | |
| Double_t | GetM (const Bool_t restmass=kTRUE) |
| Mass in amu. | |
| Double_t | GetGamma () |
| Lorentz factor \(1/\sqrt{1 - v^2}\) (v in c); NaN for speed above c. | |
| Double_t | GetKE (const Bool_t SR=kFALSE) |
| Kinetic energy in amu c^2. | |
| Double_t | GetQ () |
| Charge in e. 0 for a plain particle, set by EMparticle. | |
| Double_t | GetTime () |
| Evolved time in fm/c; does not advance for an invincible particle. | |
| path * | GetPath () |
| The recorded path (owned by the particle; a null pointer if not recording). | |
| Bool_t | IsInvincible () |
| Whether the particle is fixed (invincible). | |
| Bool_t | IsRecording () |
| Whether the particle records its path. | |
| TString | Print (Bool_t onlymechanic=kFALSE, Bool_t mute=kFALSE) |
| Describe the particle as text "[ Particle x: [..], v: [..] ]". | |
Additional Inherited Members | |
Protected Attributes inherited from particle | |
| Double_t | q = 0 |
| charge in e | |
A particle with a charge, for electromagnetic forces (coulombForce).
Charge in e, mass in amu. The charge is stored in particle::GetQ(). Every other behavior is that of particle.
Definition at line 249 of file particle.hpp.
|
inline |
Make a charged particle.
| m0_ | rest mass in amu |
| q_ | charge in e (default 1) |
| x0_ | initial position in fm |
| v0_ | initial velocity in c |
| Invincible_ | true for a fixed particle (for example the target nucleus) |
| Record_ | true to keep the path |
Definition at line 260 of file particle.hpp.
|
inline |
Definition at line 269 of file particle.hpp.