|
RooParticle
Particle scattering simulator with ROOT
|
Base class of the pairwise forces. More...
#include <force.hpp>
Public Member Functions | |
| virtual | ~force () |
| Virtual : a force deleted through force* must run the subclass destructor. | |
| virtual TVector3 | Evaluate (particle *p1_, particle *p2_) |
| Force on the first particle by the second. | |
| virtual Double_t | Potential (particle *p1_, particle *p2_) |
| Potential energy of the pair (amu c^2). | |
Protected Member Functions | |
| force () | |
| Only subclasses can be made. | |
Base class of the pairwise forces.
Evaluate(p1, p2) is the force on p1 by p2 in amu c^2/fm and Potential(p1, p2) the potential energy of the pair in amu c^2. Every subclass keeps \(\vec F_1 = -\nabla_{x_1} U\), so that the energy monitors (event::GetPE(), the "EDG" inspector, ...) are consistent with the dynamics.
A force added to an event with event::AddForce() acts on every pair of particles of the event, whatever their number: with N bodies the force on a particle is the sum of the force by each of the other N-1 bodies, and of every force added. The force does not know which pair it is asked about, so it must depend only on the two particles (position, mass, charge). The event may call Evaluate(p1, p2) once per pair (in the order of addition) and give the opposite to p2 (event::SetPairSymmetric()), so a force which is not antisymmetric must turn that off. Forces are not owned by the event.
To make a new force, inherit it and define both functions.
|
inlinevirtual |
|
inlineprotected |
Force on the first particle by the second.
| p1_ | particle which feels the force |
| p2_ | particle which exerts the force |
Reimplemented in coulombForce, universalForce, yukawaForce, and woodsSaxonForce.
Potential energy of the pair (amu c^2).
| p1_ | first particle |
| p2_ | second particle |
Reimplemented in coulombForce, universalForce, yukawaForce, and woodsSaxonForce.