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

Point in space, time and velocity. More...

#include <gparticle.h>

Public Member Functions

 stvpoint ()=default
 Default constructor.
 
 stvpoint (const point &fpt, const vec &fdir, vfloat fspeed, manip_absvol_treeid &ftid, vfloat fprange, vfloat ftime, int fsb, int fs_ent, manip_absvol *faeid)
 Constructor.
 
 stvpoint (const stvpoint &pstv, const trajestep &ts, vfloat mrange, int fsb, int fs_ent, manip_absvol *faeid)
 
 stvpoint (const stvpoint &pstv, const trajestep &ts, int fsb, int fs_ent, manip_absvol *faeid)
 
 stvpoint (const stvpoint &fp)=default
 Copy constructor.
 
void print (std::ostream &file, int l) const
 
absvolvolume ()
 

Public Attributes

point pt
 Coordinates in the first system in the tree.
 
vec dir
 Unit vector, in the first system in the tree.
 
point ptloc
 Coordinates in the local system (last system in the tree).
 
vec dirloc
 Unit vector, in the local system (last system in the tree).
 
vfloat speed = 0.
 Longitudinal velocity.
 
manip_absvol_treeid tid
 
int sb = 0
 
int s_ent = 0
 
manip_absvolnext_eid = nullptr
 
vfloat prange = 0.
 Range from previous point.
 
vfloat time = 0.
 

Detailed Description

Point in space, time and velocity.

Definition at line 20 of file gparticle.h.

Constructor & Destructor Documentation

◆ stvpoint() [1/5]

Heed::stvpoint::stvpoint ( )
default

Default constructor.

◆ stvpoint() [2/5]

Heed::stvpoint::stvpoint ( const point fpt,
const vec fdir,
vfloat  fspeed,
manip_absvol_treeid ftid,
vfloat  fprange,
vfloat  ftime,
int  fsb,
int  fs_ent,
manip_absvol faeid 
)
inline

Constructor.

Definition at line 52 of file gparticle.h.

55 : pt(fpt),
56 dir(unit_vec(fdir)),
57 speed(fspeed),
58 tid(ftid),
59 sb(fsb),
60 s_ent(fs_ent),
61 next_eid(faeid),
62 prange(fprange),
63 time(ftime) {
64 ptloc = pt;
66 dirloc = dir;
68 }
void up_absref(absref *f)
Definition: volume.cpp:27
vfloat time
Definition: gparticle.h:47
manip_absvol * next_eid
Definition: gparticle.h:44
vec dirloc
Unit vector, in the local system (last system in the tree).
Definition: gparticle.h:29
vec dir
Unit vector, in the first system in the tree.
Definition: gparticle.h:25
vfloat prange
Range from previous point.
Definition: gparticle.h:46
vfloat speed
Longitudinal velocity.
Definition: gparticle.h:31
point pt
Coordinates in the first system in the tree.
Definition: gparticle.h:23
manip_absvol_treeid tid
Definition: gparticle.h:32
point ptloc
Coordinates in the local system (last system in the tree).
Definition: gparticle.h:27

◆ stvpoint() [3/5]

Heed::stvpoint::stvpoint ( const stvpoint pstv,
const trajestep ts,
vfloat  mrange,
int  fsb,
int  fs_ent,
manip_absvol faeid 
)
inline

Constructor.

Parameters
pstvprevious point
tstrajectory step (in the local system)
mrangestep length (may be less than the one in ts)
fsbposition flag
fs_ent"entering" flag
faeidnext volume

Definition at line 77 of file gparticle.h.

79 : pt(),
80 dir(),
81 ptloc(),
82 dirloc(),
83 speed(pstv.speed),
84 tid(pstv.tid),
85 sb(fsb),
86 s_ent(fs_ent),
87 next_eid(faeid),
88 prange(mrange) {
89 if (pstv.speed == 0) {
90 time = pstv.time; // just to put anything
91 } else {
92 // If speed is changed, this time is to be corrected in derivative class
93 time = pstv.time + mrange / pstv.speed;
94 }
95 ts.Gnextpoint(mrange, ptloc, dirloc);
96 pt = ptloc;
98 dir = dirloc;
100 }
void down_absref(absref *f)
Definition: volume.cpp:22

◆ stvpoint() [4/5]

Heed::stvpoint::stvpoint ( const stvpoint pstv,
const trajestep ts,
int  fsb,
int  fs_ent,
manip_absvol faeid 
)
inline

Constructor.

Parameters
pstvprevious point
tstrajectory step (in the local system)
fsbposition flag
fs_ent"entering" flag
faeidnext volume

Definition at line 108 of file gparticle.h.

110 : pt(),
111 dir(),
112 ptloc(),
113 dirloc(),
114 speed(pstv.speed),
115 tid(pstv.tid),
116 sb(fsb),
117 s_ent(fs_ent),
118 next_eid(faeid),
119 prange(ts.mrange) {
120 if (pstv.speed == 0) {
121 time = pstv.time; // just to put anything
122 } else {
123 // If speed is changed, this time is to be corrected in derivative class
124 time = pstv.time + ts.mrange / pstv.speed;
125 }
126 ptloc = ts.mpoint;
127 point temp;
128 ts.Gnextpoint(ts.mrange, temp, dirloc);
129 pt = ptloc;
131 dir = dirloc;
133 }

◆ stvpoint() [5/5]

Heed::stvpoint::stvpoint ( const stvpoint fp)
default

Copy constructor.

Member Function Documentation

◆ print()

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

Definition at line 16 of file gparticle.cpp.

16 {
17 if (l < 0) return;
18 Ifile << "stvpoint: sb=" << sb << " s_ent=" << s_ent << " prange=" << prange
19 << " time=" << time << '\n';
20 indn.n += 2;
21 Ifile << "position:\n" << pt << ptloc;
22 Ifile << "direction:\n" << dir << dirloc;
23 Ifile << "speed=" << speed << '\n';
24 if (tid.eid.empty()) {
25 Ifile << "point is outside universe\n";
26 file.flush();
27 indn.n -= 2;
28 return;
29 }
30 tid.print(file, 1);
31 char s[100];
32 if (sb == 2) {
34 Ifile << "next volume name " << s << '\n';
35 }
36 indn.n -= 2;
37 file.flush();
38}
void print(std::ostream &file, int l) const
Definition: volume.cpp:55
std::vector< manip_absvol * > eid
List of volumes.
Definition: volume.h:37
void m_chname(char *nm) const
Definition: volume.cpp:222
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:195

Referenced by Heed::gparticle::print().

◆ volume()

Member Data Documentation

◆ dir

◆ dirloc

vec Heed::stvpoint::dirloc

Unit vector, in the local system (last system in the tree).

Definition at line 29 of file gparticle.h.

Referenced by Heed::gparticle::calc_step_to_bord(), Heed::mparticle::curvature(), Heed::gparticle::gparticle(), Heed::HeedDeltaElectron::physics_after_new_speed(), print(), and stvpoint().

◆ next_eid

manip_absvol* Heed::stvpoint::next_eid = nullptr

Definition at line 44 of file gparticle.h.

Referenced by print().

◆ prange

◆ pt

◆ ptloc

point Heed::stvpoint::ptloc

Coordinates in the local system (last system in the tree).

Definition at line 27 of file gparticle.h.

Referenced by Heed::gparticle::calc_step_to_bord(), Heed::gparticle::gparticle(), Heed::HeedPhoton::physics(), Heed::HeedDeltaElectron::physics_after_new_speed(), print(), and stvpoint().

◆ s_ent

int Heed::stvpoint::s_ent = 0

"Entering flag". 1 - entering new volume, 0 otherwise. Embraced volume is also considered new.

Definition at line 42 of file gparticle.h.

Referenced by Heed::gparticle::calc_step_to_bord(), Heed::gparticle::gparticle(), and print().

◆ sb

int Heed::stvpoint::sb = 0

Position flag 0 - inside volume, or unknown 1 - on the border of the volume 2 - on the border of an embraced volume

Definition at line 38 of file gparticle.h.

Referenced by Heed::gparticle::calc_step_to_bord(), Heed::gparticle::gparticle(), and print().

◆ speed

◆ tid

◆ time


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