Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Massive particle. A force can be applied. More...
#include <mparticle.h>
Public Member Functions | |
void | check_consistency () const |
Check consistency of kin_energy, gamma_1, speed, speed_of_light and mass. | |
virtual void | step (std::vector< gparticle * > &secondaries) |
virtual void | curvature (int &fs_cf, vec &frelcen, vfloat &fmrange, vfloat prec) |
virtual int | force (const point &pt, vec &f, vec &f_perp, vfloat &mrange) |
void | new_speed () |
Set new speed, direction and time for currpos. | |
mparticle () | |
Default constructor. | |
mparticle (manip_absvol *primvol, const point &pt, const vec &vel, vfloat time, double fmass) | |
Constructor, calculated from the from velocity vector. | |
virtual void | print (std::ostream &file, int l) const |
virtual mparticle * | copy () const |
virtual | ~mparticle () |
Destructor. | |
Public Member Functions inherited from Heed::gparticle | |
gparticle () | |
Default constructor. | |
gparticle (manip_absvol *primvol, const point &pt, const vec &vel, vfloat time) | |
Constructor. | |
virtual | ~gparticle () |
Destructor. | |
virtual void | step (std::vector< gparticle * > &secondaries) |
virtual void | change_vol (void) |
virtual void | curvature (int &fs_cf, vec &frelcen, vfloat &fmrange, vfloat prec) |
virtual void | physics_after_new_speed (std::vector< gparticle * > &) |
virtual void | physics (std::vector< gparticle * > &) |
virtual void | physics_mrange (double &fmrange) |
virtual stvpoint | calc_step_to_bord () |
Produces nextpos. | |
stvpoint | switch_new_vol () |
virtual void | fly (std::vector< gparticle * > &secondaries) |
Transport the particle. | |
virtual void | print (std::ostream &file, int l) const |
virtual gparticle * | copy () const |
Public Member Functions inherited from Heed::RegPassivePtr | |
RegPassivePtr (void) | |
RegPassivePtr (char fs_ban_del, char fs_ban_sub, char fs_ban_cop=0) | |
RegPassivePtr (const RegPassivePtr &f) | |
RegPassivePtr & | operator= (const RegPassivePtr &f) |
CountPP_ns::CountPassivePtr * | book (void) const |
void | clear_pointers (void) const |
virtual RegPassivePtr * | copy () const |
virtual | ~RegPassivePtr () |
virtual void | print (std::ostream &file, int l=1) const |
void | set_s_ban_del (char fs_ban_del) |
char | get_s_ban_del (void) const |
void | set_s_ban_sub (char fs_ban_sub) |
char | get_s_ban_sub (void) const |
void | set_s_ban_cop (char fs_ban_cop) |
char | get_s_ban_cop (void) const |
void | set_s_allow_del_at_zero_count (char fs_allow_del_at_zero_count) |
char | get_s_allow_del_at_zero_count (void) const |
long | get_total_number_of_references (void) const |
Public Attributes | |
double | mass |
Mass (not mass * speed_of_light^2) | |
double | orig_kin_energy |
double | orig_gamma_1 |
double | prev_kin_energy |
double | prev_gamma_1 |
double | curr_kin_energy |
double | curr_gamma_1 |
Public Attributes inherited from Heed::gparticle | |
bool | s_life |
long | nstep |
Step number. | |
double | total_range_from_origin |
Range from origin to currpos. | |
long | n_zero_step |
Number of previous steps with zero range (including this step). | |
stvpoint | origin |
stvpoint | prevpos |
stvpoint | currpos |
stvpoint | nextpos |
vec | curr_relcen |
Additional Inherited Members | |
Static Public Member Functions inherited from Heed::RegPassivePtr | |
static void | set_s_ban_del_ignore (char fs_ban_del_ignore) |
static char | get_s_ban_del_ignore (void) |
static void | set_s_print_adr_cpp (char fs_print_adr_cpp) |
static char | get_s_print_adr_cpp (void) |
Static Public Attributes inherited from Heed::gparticle | |
static long | max_q_zero_step = 100 |
Massive particle. A force can be applied.
Definition at line 23 of file mparticle.h.
|
inline |
Heed::mparticle::mparticle | ( | manip_absvol * | primvol, |
const point & | pt, | ||
const vec & | vel, | ||
vfloat | time, | ||
double | fmass | ||
) |
Constructor, calculated from the from velocity vector.
Definition at line 20 of file mparticle.cpp.
|
inlinevirtual |
void Heed::mparticle::check_consistency | ( | ) | const |
Check consistency of kin_energy, gamma_1, speed, speed_of_light and mass.
Definition at line 36 of file mparticle.cpp.
Referenced by mparticle(), and new_speed().
|
inlinevirtual |
Reimplemented from Heed::gparticle.
Reimplemented in Heed::HeedDeltaElectron, Heed::HeedParticle, Heed::HeedParticle_BGM, and Heed::eparticle.
Definition at line 75 of file mparticle.h.
|
virtual |
Set curvature. Calls force(). If force is zero, returns fs_cf=0; frelcen=dv0; If force is zero, and currpos.dir==dv0, makes, in addition, fmrange=0; If currpos.dir==dv0, makes currpos.dir=unit_vec(f); If force is parallel or anti-parallel to dir, makes fs_cf=0; frelcen=dv0; If force is anti-parallel to dir, restricts range till exceeding kinetic energy.
Reimplemented from Heed::gparticle.
Definition at line 96 of file mparticle.cpp.
The force is considered to be split in two components. One component, namely f, can be in any direction and is capable of doing work. The other one is always normal to dir and cannot do work. The latter can represent the magnetic component of the Lorentz force. This splitting improve precision of calculation of kinetic energy. But the latter component is not the true force. To derive the force one should do vector multiplication of speed by f_perp, f_perp2 = currpos.speed * (currpos.dir || f_perp_fl2); Return 0 if there is no force, f is initialised to zero anyway. mrange is the distance at which the force should not change much. The dimension of f is [weight] * [lenght] / [time]^2 The dimension of f_perp is [weight] / [time];
Reimplemented in Heed::eparticle.
Definition at line 138 of file mparticle.cpp.
Referenced by curvature(), and new_speed().
void Heed::mparticle::new_speed | ( | ) |
Set new speed, direction and time for currpos.
Definition at line 145 of file mparticle.cpp.
Referenced by step().
|
virtual |
Reimplemented from Heed::gparticle.
Reimplemented in Heed::HeedDeltaElectron, Heed::HeedParticle, Heed::HeedParticle_BGM, and Heed::eparticle.
Definition at line 242 of file mparticle.cpp.
Referenced by Heed::HeedDeltaElectron::print(), Heed::HeedParticle::print(), Heed::HeedParticle_BGM::print(), Heed::eparticle::print(), and step().
|
virtual |
Assign prevpos = currpos and currpos = nextpos, calls change_vol if necessary and update nextpos =calc_step_to_bord().
Reimplemented from Heed::gparticle.
Definition at line 68 of file mparticle.cpp.
double Heed::mparticle::curr_gamma_1 |
Definition at line 33 of file mparticle.h.
Referenced by check_consistency(), curvature(), mparticle(), new_speed(), Heed::HeedParticle_BGM::physics(), Heed::HeedDeltaElectron::physics_after_new_speed(), print(), and step().
double Heed::mparticle::curr_kin_energy |
Definition at line 32 of file mparticle.h.
Referenced by check_consistency(), curvature(), Garfield::TrackHeed::GetCluster(), mparticle(), new_speed(), Heed::HeedParticle::physics(), Heed::HeedParticle_BGM::physics(), Heed::HeedDeltaElectron::physics_after_new_speed(), Heed::HeedDeltaElectron::physics_mrange(), print(), step(), and Garfield::TrackHeed::TransportPhoton().
double Heed::mparticle::mass |
Mass (not mass * speed_of_light^2)
Definition at line 26 of file mparticle.h.
Referenced by check_consistency(), curvature(), mparticle(), new_speed(), Heed::HeedParticle::physics(), Heed::HeedParticle_BGM::physics(), Heed::HeedDeltaElectron::physics_after_new_speed(), and print().
double Heed::mparticle::orig_gamma_1 |
Definition at line 29 of file mparticle.h.
Referenced by check_consistency(), mparticle(), and print().
double Heed::mparticle::orig_kin_energy |
Definition at line 28 of file mparticle.h.
Referenced by check_consistency(), mparticle(), and print().
double Heed::mparticle::prev_gamma_1 |
Definition at line 31 of file mparticle.h.
Referenced by check_consistency(), mparticle(), new_speed(), print(), and step().
double Heed::mparticle::prev_kin_energy |
Definition at line 30 of file mparticle.h.
Referenced by check_consistency(), mparticle(), new_speed(), Heed::HeedDeltaElectron::physics_after_new_speed(), print(), and step().