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

#include <gparticle.h>

Public Member Functions

const manip_absvol_eidG_laeid () const
 
manip_absvolG_lamvol () const
 
absvolG_lavol () const
 
 stvpoint (void)
 
 stvpoint (const point &fpt, const vec &fdir, vfloat fspeed, manip_absvol_treeid &ftid, vfloat fprange, vfloat ftime, int fsb, int fs_ent, manip_absvol_eid &faeid)
 
 stvpoint (const stvpoint &pstv, const trajestep &ts, vfloat mrange, int fsb, int fs_ent, manip_absvol_eid &faeid)
 
 stvpoint (const stvpoint &pstv, const trajestep &ts, int fsb, int fs_ent, manip_absvol_eid &faeid)
 
 stvpoint (const stvpoint &fp)
 
virtual ~stvpoint ()
 
virtual void print (std::ostream &file, int l) const
 

Public Attributes

point pt
 
vec dir
 
point ptloc
 
vec dirloc
 
vfloat speed
 
manip_absvol_treeid tid
 
int sb
 
int s_ent
 
manip_absvol_eid next_eid
 
vfloat prange
 
vfloat time
 

Detailed Description

Definition at line 30 of file gparticle.h.

Constructor & Destructor Documentation

◆ stvpoint() [1/5]

stvpoint::stvpoint ( void  )
inline

Definition at line 66 of file gparticle.h.

67 : pt(),
68 dir(),
69 ptloc(),
70 dirloc(),
71 speed(0.0),
72 tid(),
73 sb(0),
74 s_ent(0),
75 next_eid(),
76 prange(0.0),
77 time(0) {
78 ;
79 }
int sb
Definition: gparticle.h:46
point pt
Definition: gparticle.h:33
point ptloc
Definition: gparticle.h:37
manip_absvol_eid next_eid
Definition: gparticle.h:52
vec dirloc
Definition: gparticle.h:39
int s_ent
Definition: gparticle.h:49
vfloat prange
Definition: gparticle.h:54
manip_absvol_treeid tid
Definition: gparticle.h:43
vfloat time
Definition: gparticle.h:55
vec dir
Definition: gparticle.h:35
vfloat speed
Definition: gparticle.h:41

◆ stvpoint() [2/5]

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_eid faeid 
)
inline

Definition at line 80 of file gparticle.h.

83 : pt(fpt),
84 dir(unit_vec(fdir)),
85 speed(fspeed),
86 tid(ftid),
87 sb(fsb),
88 s_ent(fs_ent),
89 next_eid(faeid),
90 prange(fprange),
91 time(ftime) {
92 ptloc = pt;
94 dirloc = dir;
96 }
void up_absref(absref *f)
Definition: volume.cpp:37

◆ stvpoint() [3/5]

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

Definition at line 97 of file gparticle.h.

101 : pt(),
102 dir(),
103 ptloc(),
104 dirloc(),
105 speed(pstv.speed),
106 tid(pstv.tid),
107 sb(fsb),
108 s_ent(fs_ent),
109 next_eid(faeid),
110 prange(mrange),
111 time(pstv.time + mrange / pstv.speed) {
112 if (pstv.speed == 0) {
113 time = pstv.time; // just to put anything
114 } else {
115 // If speed is changed, this time is to be corrected in derivative class
116 time = pstv.time + mrange / pstv.speed;
117 }
118 ts.Gnextpoint(mrange, ptloc, dirloc);
119 pt = ptloc;
121 dir = dirloc;
123 }
void down_absref(absref *f)
Definition: volume.cpp:32
void Gnextpoint(vfloat frange, point &fpos, vec &fdir) const
Definition: trajestep.cpp:78

◆ stvpoint() [4/5]

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

Definition at line 125 of file gparticle.h.

127 : pt(),
128 dir(),
129 ptloc(),
130 dirloc(),
131 speed(pstv.speed),
132 tid(pstv.tid),
133 sb(fsb),
134 s_ent(fs_ent),
135 next_eid(faeid),
136 prange(ts.mrange),
137 time(pstv.time + ts.mrange / pstv.speed) {
138 if (pstv.speed == 0) {
139 time = pstv.time; // just to put anything
140 } else {
141 // If speed is changed, this time is to be corrected in derivative class
142 time = pstv.time + ts.mrange / pstv.speed;
143 }
144 ptloc = ts.mpoint;
145 point temp;
146 ts.Gnextpoint(ts.mrange, temp, dirloc);
147 pt = ptloc;
149 dir = dirloc;
151 }
Definition: vec.h:477
vfloat mrange
Definition: trajestep.h:91
point mpoint
Definition: trajestep.h:92

◆ stvpoint() [5/5]

stvpoint::stvpoint ( const stvpoint fp)
inline

Definition at line 152 of file gparticle.h.

153 : pt(fp.pt),
154 dir(fp.dir),
155 ptloc(fp.ptloc),
156 dirloc(fp.dirloc),
157 speed(fp.speed),
158 tid(fp.tid),
159 sb(fp.sb),
160 s_ent(fp.s_ent),
161 next_eid(fp.next_eid),
162 prange(fp.prange),
163 time(fp.time) {
164 ;
165 }

◆ ~stvpoint()

virtual stvpoint::~stvpoint ( )
inlinevirtual

Definition at line 167 of file gparticle.h.

167{}

Member Function Documentation

◆ G_laeid()

const manip_absvol_eid * stvpoint::G_laeid ( ) const
inline

Definition at line 59 of file gparticle.h.

59{ return tid.G_laeid(); }
const manip_absvol_eid * G_laeid() const
Definition: volume.h:54

◆ G_lamvol()

manip_absvol * stvpoint::G_lamvol ( ) const
inline

Definition at line 61 of file gparticle.h.

61{ return tid.G_lamvol(); }
manip_absvol * G_lamvol() const
Definition: volume.h:58

◆ G_lavol()

◆ print()

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

Definition at line 14 of file gparticle.cpp.

14 {
15 if (l >= 0) {
16 Ifile << "stvpoint: sb=" << sb << " s_ent=" << s_ent << " prange=" << prange
17 << " time=" << time << '\n';
18 indn.n += 2;
19 Ifile << "position:\n";
20 file << pt << ptloc;
21 Ifile << "direction of moving:\n";
22 file << dir << dirloc;
23 Ifile << "speed=" << speed << '\n';
24 if (tid.qeid <= 0) {
25 Ifile << "point is outside universe, tid.qeid=" << tid.qeid << '\n';
26 file.flush();
27 indn.n -= 2;
28 return;
29 }
30 tid.print(file, 1);
31 char s[100];
32 //amvol[namvol-1]->chname(s);
33 //Ifile<<"current volume name "<<s<<'\n';
34 if (sb == 2) {
35 next_eid.amvol->m_chname(s);
36 Ifile << "next volume name " << s << '\n';
37 }
38 //if(l>1)
39 //{
40 // Ifile<<"current volume:\n";
41 // amvol[namvol-1]->print(file,l-1);
42 //}
43 indn.n -= 2;
44 file.flush();
45 }
46}
PassivePtr< manip_absvol > amvol
Definition: volume.h:39
void print(std::ostream &file, int l) const
Definition: volume.cpp:70
indentation indn
Definition: prstream.cpp:13
#define Ifile
Definition: prstream.h:207

Referenced by gparticle::print().

Member Data Documentation

◆ dir

◆ dirloc

◆ next_eid

manip_absvol_eid stvpoint::next_eid

Definition at line 52 of file gparticle.h.

Referenced by print().

◆ prange

◆ pt

◆ ptloc

◆ s_ent

int stvpoint::s_ent

◆ sb

int stvpoint::sb

◆ speed

◆ tid

◆ time


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