Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
eparticle.cpp
Go to the documentation of this file.
3/*
41998 - 2004, I. Smirnov
5*/
6
7namespace Heed {
8
9void field_map(const point& pt, vec& Efield, vec& Hfield, vfloat& mrange);
10// defined anywhere outside
11
12eparticle::eparticle(manip_absvol* primvol, const point& pt, const vec& vel,
13 vfloat time, particle_def* fpardef)
14 : mparticle(), particle_type(fpardef) {
15 gparticle gp(primvol, pt, vel, time);
16 statcast(mparticle&, *this) = mparticle(gp, fpardef->mass);
17}
18
19eparticle::eparticle(manip_absvol* primvol, const point& pt, const vec& vel,
20 vfloat time, particle_def* fpardef, double gamma_1)
21 : mparticle(primvol, pt, vel, time, fpardef->mass, gamma_1),
22 particle_type(fpardef) {}
23
24int eparticle::force(const point& pt, vec& f, vec& f_perp, vfloat& mrange) {
25 vec efield;
26 vec hfield;
27 field_map(pt, efield, hfield, mrange);
28 f = pardef->charge * efield;
29 f_perp = pardef->charge * hfield;
30 return 1;
31}
32
33void eparticle::print(std::ostream& file, int l) const {
34 if (l >= 0) {
35 Ifile << "eparticle: particle is ";
36 print_notation(file);
37 file << '\n';
38 mparticle::print(file, l);
39 }
40}
41
42}
eparticle(void)
Constructors.
Definition: eparticle.h:19
virtual void print(std::ostream &file, int l) const
Definition: eparticle.cpp:33
virtual int force(const point &pt, vec &f, vec &f_perp, vfloat &mrange)
Definition: eparticle.cpp:24
virtual void print(std::ostream &file, int l) const
Definition: mparticle.cpp:308
mparticle(void)
Definition: mparticle.h:79
void print_notation(std::ostream &file) const
PassivePtr< particle_def > pardef
Definition: particle_def.h:150
Definition: vec.h:477
Definition: vec.h:248
#define statcast(type, name)
Definition: BGMesh.cpp:3
void field_map(const point &pt, vec &Efield, vec &Hfield, vfloat &mrange)
Definition: TrackHeed.cc:44
#define Ifile
Definition: prstream.h:207
double vfloat
Definition: vfloat.h:15