Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::eparticle Class Reference

#include <eparticle.h>

+ Inheritance diagram for Heed::eparticle:

Public Member Functions

 eparticle ()
 Default constructor.
 
 eparticle (manip_absvol *primvol, const point &pt, const vec &vel, vfloat time, particle_def *fpardef, HeedFieldMap *fieldmap)
 Constructor using velocity vector.
 
virtual ~eparticle ()
 Destructor.
 
virtual eparticlecopy () const
 
virtual void print (std::ostream &file, int l) const
 
virtual int force (const point &pt, vec &f, vec &f_perp, vfloat &mrange)
 Calculate force components.
 
- Public Member Functions inherited from Heed::mparticle
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, $\gamma - 1$ calculated from the from velocity vector.
 
virtual void print (std::ostream &file, int l) const
 
virtual mparticlecopy () 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 gparticlecopy () 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)
 
RegPassivePtroperator= (const RegPassivePtr &f)
 
CountPP_ns::CountPassivePtrbook (void) const
 
void clear_pointers (void) const
 
virtual RegPassivePtrcopy () 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 Member Functions inherited from Heed::particle_type
 particle_type ()
 
 particle_type (particle_def *f)
 
 particle_type (const char *name, int s=0)
 
int operator== (const particle_type &f)
 
int operator!= (const particle_type &f)
 
void print_notation (std::ostream &file) const
 

Protected Attributes

HeedFieldMapm_fieldMap
 

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)
 
- Public Attributes inherited from Heed::mparticle
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
 
- Public Attributes inherited from Heed::particle_type
PassivePtr< particle_defpardef
 
- Static Public Attributes inherited from Heed::gparticle
static long max_q_zero_step = 100
 

Detailed Description

Charged particle. Combination of features of massive geometrical particle and specification of concrete particle as one of types known by science.

Definition at line 15 of file eparticle.h.

Constructor & Destructor Documentation

◆ eparticle() [1/2]

Heed::eparticle::eparticle ( )
inline

Default constructor.

Definition at line 18 of file eparticle.h.

18: mparticle(), particle_type(), m_fieldMap(NULL) {}
HeedFieldMap * m_fieldMap
Definition: eparticle.h:33
mparticle()
Default constructor.
Definition: mparticle.h:69

Referenced by copy().

◆ eparticle() [2/2]

Heed::eparticle::eparticle ( manip_absvol primvol,
const point pt,
const vec vel,
vfloat  time,
particle_def fpardef,
HeedFieldMap fieldmap 
)

Constructor using velocity vector.

Definition at line 7 of file eparticle.cpp.

9 : mparticle(primvol, pt, vel, time, fpardef->mass),
10 particle_type(fpardef), m_fieldMap(fieldmap) {
11}

◆ ~eparticle()

virtual Heed::eparticle::~eparticle ( )
inlinevirtual

Destructor.

Definition at line 23 of file eparticle.h.

23{}

Member Function Documentation

◆ copy()

virtual eparticle * Heed::eparticle::copy ( ) const
inlinevirtual

Reimplemented from Heed::mparticle.

Reimplemented in Heed::HeedDeltaElectron, Heed::HeedParticle, and Heed::HeedParticle_BGM.

Definition at line 25 of file eparticle.h.

25{ return new eparticle(*this); }
eparticle()
Default constructor.
Definition: eparticle.h:18

◆ force()

int Heed::eparticle::force ( const point pt,
vec f,
vec f_perp,
vfloat mrange 
)
virtual

Calculate force components.

Reimplemented from Heed::mparticle.

Definition at line 13 of file eparticle.cpp.

13 {
14 vec efield(0., 0., 0.);
15 vec hfield(0., 0., 0.);
16 if (!m_fieldMap) {
17 std::cerr << "Field map not defined.\n";
18 return 1;
19 }
20 m_fieldMap->field_map(pt, efield, hfield, mrange);
21 f = pardef->charge * efield;
22 f_perp = pardef->charge * hfield;
23 return 1;
24}
void field_map(const point &pt, vec &efield, vec &bfield, vfloat &mrange) const
PassivePtr< particle_def > pardef
Definition: particle_def.h:148

◆ print()

void Heed::eparticle::print ( std::ostream &  file,
int  l 
) const
virtual

Reimplemented from Heed::mparticle.

Reimplemented in Heed::HeedDeltaElectron, Heed::HeedParticle, and Heed::HeedParticle_BGM.

Definition at line 26 of file eparticle.cpp.

26 {
27 if (l < 0) return;
28 Ifile << "eparticle: particle is ";
29 print_notation(file);
30 file << '\n';
31 mparticle::print(file, l);
32}
virtual void print(std::ostream &file, int l) const
Definition: mparticle.cpp:242
void print_notation(std::ostream &file) const
#define Ifile
Definition: prstream.h:196

Member Data Documentation

◆ m_fieldMap

HeedFieldMap* Heed::eparticle::m_fieldMap
protected

The documentation for this class was generated from the following files: