Garfield++ v2r0
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 ()
 
 stvpoint (const point &fpt, const vec &fdir, vfloat fspeed, manip_absvol_treeid &ftid, vfloat fprange, vfloat ftime, int fsb, int fs_ent, PassivePtr< manip_absvol > &faeid)
 
 stvpoint (const stvpoint &pstv, const trajestep &ts, vfloat mrange, int fsb, int fs_ent, PassivePtr< manip_absvol > &faeid)
 
 stvpoint (const stvpoint &pstv, const trajestep &ts, int fsb, int fs_ent, PassivePtr< manip_absvol > &faeid)
 
 stvpoint (const stvpoint &fp)
 
void print (std::ostream &file, int l) const
 

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
 Longitudinal velocity.
 
manip_absvol_treeid tid
 
int sb
 
int s_ent
 
PassivePtr< manip_absvolnext_eid
 
vfloat prange
 Range from previous point.
 
vfloat time
 

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 ( )
inline

Definition at line 50 of file gparticle.h.

51 : pt(),
52 dir(),
53 ptloc(),
54 dirloc(),
55 speed(0.0),
56 tid(),
57 sb(0),
58 s_ent(0),
59 next_eid(),
60 prange(0.0),
61 time(0) {}
vfloat time
Definition: gparticle.h:47
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
PassivePtr< manip_absvol > next_eid
Definition: gparticle.h:44
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() [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,
PassivePtr< manip_absvol > &  faeid 
)
inline

Definition at line 62 of file gparticle.h.

65 : pt(fpt),
66 dir(unit_vec(fdir)),
67 speed(fspeed),
68 tid(ftid),
69 sb(fsb),
70 s_ent(fs_ent),
71 next_eid(faeid),
72 prange(fprange),
73 time(ftime) {
74 ptloc = pt;
76 dirloc = dir;
78 }
void up_absref(absref *f)
Definition: volume.cpp:26

◆ stvpoint() [3/5]

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

Definition at line 79 of file gparticle.h.

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

◆ stvpoint() [4/5]

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

Definition at line 106 of file gparticle.h.

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

◆ stvpoint() [5/5]

Heed::stvpoint::stvpoint ( const stvpoint fp)
inline

Definition at line 133 of file gparticle.h.

134 : pt(fp.pt),
135 dir(fp.dir),
136 ptloc(fp.ptloc),
137 dirloc(fp.dirloc),
138 speed(fp.speed),
139 tid(fp.tid),
140 sb(fp.sb),
141 s_ent(fp.s_ent),
142 next_eid(fp.next_eid),
143 prange(fp.prange),
144 time(fp.time) {}

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 of moving:\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) {
33 // next_eid.amvol->m_chname(s);
34 next_eid->m_chname(s);
35 Ifile << "next volume name " << s << '\n';
36 }
37 indn.n -= 2;
38 file.flush();
39}
void print(std::ostream &file, int l) const
Definition: volume.cpp:56
std::vector< PassivePtr< manip_absvol > > eid
List of volumes.
Definition: volume.h:37
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:196

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

Member Data Documentation

◆ dir

◆ dirloc

vec Heed::stvpoint::dirloc

◆ next_eid

PassivePtr<manip_absvol> Heed::stvpoint::next_eid

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

"Entering flag". 1 - entering new volume, 0 otherwise. i 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

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: