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

#include <volume.h>

+ Inheritance diagram for absvol:

Public Member Functions

virtual ~absvol ()
 
virtual int check_point_inside (const point &fpt, const vec &dir) const =0
 
virtual int find_embed_vol (const point &fpt, const vec &dir, manip_absvol_treeid *atid) const
 
virtual int range (trajestep &fts, int s_ext, int &sb, manip_absvol_eid *faeid) const
 
virtual int range_ext (trajestep &fts, int s_ext) const =0
 
 macro_copy_header (absvol)
 
virtual void income (gparticle *)
 
virtual void chname (char *nm) const
 
virtual void print (std::ostream &file, int l) const
 
virtual DynLinArr< manip_absvol * > Gamanip_embed (void) const
 
- Public Member Functions inherited from absref
virtual ~absref ()
 
virtual void down (const abssyscoor *fasc)
 
virtual void up (const abssyscoor *fasc)
 
virtual void turn (const vec &dir, vfloat angle)
 
virtual void shift (const vec &dir)
 

Public Attributes

vfloat prec
 

Detailed Description

Definition at line 91 of file volume.h.

Constructor & Destructor Documentation

◆ ~absvol()

virtual absvol::~absvol ( )
inlinevirtual

Definition at line 97 of file volume.h.

97{}

Member Function Documentation

◆ check_point_inside()

virtual int absvol::check_point_inside ( const point fpt,
const vec dir 
) const
pure virtual

Implemented in Heed::box, and Heed::ulsvolume.

Referenced by find_embed_vol(), and macro_copy_body_not_defined().

◆ chname()

virtual void absvol::chname ( char *  nm) const
inlinevirtual

Reimplemented in Heed::box, Heed::manip_box, Heed::sh_manip_box, Heed::ulsvolume, and Heed::manip_ulsvolume.

Definition at line 143 of file volume.h.

143{ strcpy(nm, "absvol"); }

Referenced by sh_manip_absvol::m_chname(), and print().

◆ find_embed_vol()

int absvol::find_embed_vol ( const point fpt,
const vec dir,
manip_absvol_treeid atid 
) const
virtual

Definition at line 92 of file volume.cpp.

93 {
94 if (check_point_inside(fpt, dir) == 0) return 0;
95 const int s = atid->qeid;
97 if (aman.get_qel() > 0 && atid->qeid >= pqamvol) {
98 mcerr << "absvol::find_embed_vol:\n"
99 << " aman->get_qel() > 0 && atid->qeid == pqamvol\n"
100 << " atid->qeid=" << atid->qeid << '\n';
101 mcerr << " Increase pqamvol\n";
102 exit(1);
103 }
104
105 for (int n = 0; n < aman.get_qel(); ++n) {
106 atid->eid[atid->qeid].nembed = n; // for next
107 const int i = aman[n]->m_find_embed_vol(fpt, dir, atid);
108 if (i == 1) {
109 if (s < atid->qeid) break;
110 Imcout << "absvol::find_embed_vol:\n";
111 Imcout << " Warning: contradiction between "
112 << " i==1 and s == fnamvol\n";
113 }
114 }
115 return 1;
116}
long get_qel(void) const
Definition: AbsArr.h:420
virtual int check_point_inside(const point &fpt, const vec &dir) const =0
virtual DynLinArr< manip_absvol * > Gamanip_embed(void) const
Definition: volume.cpp:88
manip_absvol_eid eid[pqamvol]
Definition: volume.h:52
#define mcerr
Definition: prstream.h:135
#define Imcout
Definition: prstream.h:208
#define pqamvol
Definition: volume.h:27

◆ Gamanip_embed()

DynLinArr< manip_absvol * > absvol::Gamanip_embed ( void  ) const
virtual

Definition at line 88 of file volume.cpp.

88 {
90}

Referenced by find_embed_vol(), print(), and range().

◆ income()

virtual void absvol::income ( gparticle )
inlinevirtual

Reimplemented in Heed::ulsvolume, and Heed::box.

Definition at line 142 of file volume.h.

142{}

Referenced by gparticle::change_vol().

◆ macro_copy_header()

absvol::macro_copy_header ( absvol  )

◆ print()

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

Reimplemented in Heed::box, Heed::manip_box, Heed::sh_manip_box, Heed::ulsvolume, and Heed::manip_ulsvolume.

Definition at line 144 of file volume.cpp.

144 {
145 if (l <= 0) return;
146 char s[1000];
147 chname(s);
148 Ifile << "absvol::print(l=" << l << "): name=" << s << '\n';
149 --l;
150 if (l > 0) {
152 indn.n += 2;
153 if (embed.get_qel() > 0) {
154 Ifile << "The following volumes are embraced, q=" << embed.get_qel()
155 << '\n';
156 indn.n += 2;
157 for (int n = 0; n < embed.get_qel(); ++n) {
158 Ifile << "n=" << n << '\n';
159 indn.n += 2;
160 embed[n]->m_print(file, l);
161 indn.n -= 2;
162 }
163 indn.n -= 2;
164 } else {
165 Ifile << "None of embraced volumes\n";
166 }
167 indn.n -= 2;
168 }
169 file.flush();
170}
virtual void chname(char *nm) const
Definition: volume.h:143
indentation indn
Definition: prstream.cpp:13
#define Ifile
Definition: prstream.h:207

Referenced by Heed::macro_copy_body(), Heed::HeedParticle_BGM::physics(), Heed::HeedCluster::print(), and Heed::box::print().

◆ range()

int absvol::range ( trajestep fts,
int  s_ext,
int &  sb,
manip_absvol_eid faeid 
) const
virtual

Definition at line 118 of file volume.cpp.

119 {
120 faeid->amvol.put(NULL);
121 faeid->nembed = -1;
122 if (s_ext == 0) {
123 sb = 1;
124 return range_ext(fts, 0);
125 }
126 int s = range_ext(fts, 1);
127 if (s == 1) {
128 sb = 1;
129 } else {
130 sb = 0;
131 }
133 for (int n = 0; n < aman.get_qel(); ++n) {
134 if (aman[n]->m_range_ext(fts, 0) == 1) {
135 sb = 2;
136 faeid->amvol.put(aman[n]);
137 faeid->nembed = n;
138 }
139 }
140 if (sb == 1 || sb == 2) return 1;
141 return 0;
142}
virtual int range_ext(trajestep &fts, int s_ext) const =0
PassivePtr< manip_absvol > amvol
Definition: volume.h:39

Referenced by gparticle::calc_step_to_bord().

◆ range_ext()

virtual int absvol::range_ext ( trajestep fts,
int  s_ext 
) const
pure virtual

Implemented in Heed::box, and Heed::ulsvolume.

Referenced by range().

Member Data Documentation

◆ prec


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