20 mcerr <<
"one should not call this function, since this object cannot be "
27 : m_dx(0), m_dy(0), m_dz(0), m_dxh(0), m_dyh(0), m_dzh(0), m_name(
"none") {
34 pvecerror(
"box(vfloat fdx, vfloat fdy, vfloat fdz, const string &fname)");
47 const std::string& fname) {
48 pvecerror(
"box(vfloat fdx, vfloat fdy, vfloat fdz, vfloat fprec, const string &fname)");
93 std::vector<std::shared_ptr<surface> > fsurf(6);
94 fsurf[0] = std::make_shared<splane>(
96 fsurf[1] = std::make_shared<splane>(
98 fsurf[2] = std::make_shared<splane>(
100 fsurf[3] = std::make_shared<splane>(
102 fsurf[4] = std::make_shared<splane>(
104 fsurf[5] = std::make_shared<splane>(
110 mfunname(
"virtual int check_point_inside(const point& fpt, const vec& dir)");
111#ifdef TRACE_find_embed_vol
112 mcout <<
"box::check_point_inside: \n";
114 mcout <<
"fpt=" << fpt <<
"dir=" << dir;
125#ifdef TRACE_find_embed_vol
126 mcout <<
"cond 1, returning 1\n";
132#ifdef TRACE_find_embed_vol
136 mcout <<
"cond 2, returning 0\n";
141#ifdef IMPROVED_BOUNDARY
145 if (dir.
x == 0.0)
return 0;
146 if ((fpt.
v.
x > 0 && dir.
x > 0) || (fpt.
v.
x < 0 && dir.
x < 0)) {
147#ifdef TRACE_find_embed_vol
148 mcout <<
"cond 3, returning 0\n";
154 if (dir.
y == 0.0)
return 0;
155 if ((fpt.
v.
y > 0 && dir.
y > 0) || (fpt.
v.
y < 0 && dir.
y < 0)) {
156#ifdef TRACE_find_embed_vol
157 mcout <<
"cond 4, returning 0\n";
163 if (dir.
z == 0.0)
return 0;
164 if ((fpt.
v.
z > 0 && dir.
z > 0) || (fpt.
v.
z < 0 && dir.
z < 0)) {
165#ifdef TRACE_find_embed_vol
166 mcout <<
"cond 5, returning 0\n";
171#ifdef TRACE_find_embed_vol
172 mcout <<
"finish, returning 1\n";
199 ((fpt.
v.
x > 0 && dir.
x > 0) || (fpt.
v.
x < 0 && dir.
x < 0))) {
200#ifdef TRACE_find_embed_vol
201 mcout <<
"cond 3, returning 0\n";
206 ((fpt.
v.
y > 0 && dir.
y > 0) || (fpt.
v.
y < 0 && dir.
y < 0))) {
207#ifdef TRACE_find_embed_vol
208 mcout <<
"cond 4, returning 0\n";
213 ((fpt.
v.
z > 0 && dir.
z > 0) || (fpt.
v.
z < 0 && dir.
z < 0))) {
214#ifdef TRACE_find_embed_vol
215 mcout <<
"cond 5, returning 0\n";
219#ifdef TRACE_find_embed_vol
220 mcout <<
"finish, returning 1\n";
231 Ifile <<
"box::print(l=" << l <<
"): " << s <<
'\n';
234 <<
" prec=" <<
prec <<
'\n';
247 mfunname(
"virtual int box::range_ext(trajestep& fts, int s_ext) const");
267 strcat(nm,
m_name.c_str());
275 strcpy(nm,
"manip_box: ");
276 strcat(nm,
m_name.c_str());
283 Ifile <<
"manip_box::print(l=" << l <<
"): " << s <<
'\n';
306 strcpy(nm,
"sh_manip_box: ");
307 strcat(nm,
m_name.c_str());
314 Ifile <<
"sh_manip_box::print(l=" << l <<
"): " << s <<
'\n';
#define mfunnamep(string)
virtual void print(std::ostream &file, int l) const
int range_ext(trajestep &fts, int s_ext) const override
Range till exit from given volume or to entry only.
box * copy() const override
absref_transmit get_components() override
void income(gparticle *gp) override
void print(std::ostream &file, int l) const override
vfloat m_dz
Lengths of sides.
vfloat m_dzh
Half-lengths of sides.
int check_point_inside(const point &fpt, const vec &dir) const override
void chname(char *nm) const override
box()
Default constructor.
void print(std::ostream &file, int l) const override
manip_box * copy() const override
void chname(char *nm) const override
absvol * Gavol() const override
Get the volume.
void print(std::ostream &file, int l) const override
Plane, defined by defined by a point and a vector normal to the plane.
virtual absref_transmit get_components() override
absref_transmit get_components() override
sh_manip_box()
Constructor.
void print(std::ostream &file, int l) const override
void chname(char *nm) const override
absvol * Gavol() const override
Get the volume.
sh_manip_box * copy() const override
point currpos
Current position.
vfloat mrange
Maximal possible range.
void print(std::ostream &file, int l) const override
int range_ext(trajestep &fts, int s_ext) const override
void ulsvolume_init(const std::vector< std::shared_ptr< surface > > &fsurf, const std::string &fname, vfloat fprec)
DoubleAc fabs(const DoubleAc &f)
#define pvecerror(string)