21 mcerr <<
"one should not call this function, since this object cannot be "
28 : m_dx(0), m_dy(0), m_dz(0), m_dxh(0), m_dyh(0), m_dzh(0), m_name(
"none") {
35 pvecerror(
"box(vfloat fdx, vfloat fdy, vfloat fdz, const string &fname)");
48 const std::string& fname) {
49 pvecerror(
"box(vfloat fdx, vfloat fdy, vfloat fdz, vfloat fprec, const string &fname)");
94 std::vector<std::shared_ptr<surface> > fsurf(6);
95 fsurf[0] = std::make_shared<splane>(
97 fsurf[1] = std::make_shared<splane>(
99 fsurf[2] = std::make_shared<splane>(
101 fsurf[3] = std::make_shared<splane>(
103 fsurf[4] = std::make_shared<splane>(
105 fsurf[5] = std::make_shared<splane>(
111 mfunname(
"int check_point_inside(const point& fpt, const vec& dir)");
112#ifdef TRACE_find_embed_vol
113 mcout <<
"box::check_point_inside: \n";
115 mcout <<
"fpt=" << fpt <<
"dir=" << dir;
126#ifdef TRACE_find_embed_vol
127 mcout <<
"cond 1, returning 1\n";
133#ifdef TRACE_find_embed_vol
137 mcout <<
"cond 2, returning 0\n";
145#ifdef IMPROVED_BOUNDARY
146 if (dir.
x == 0.0)
return 0;
148 if ((fpt.
v.
x > 0 && dir.
x > 0) || (fpt.
v.
x < 0 && dir.
x < 0)) {
149#ifdef TRACE_find_embed_vol
150 mcout <<
"cond 3, returning 0\n";
156#ifdef IMPROVED_BOUNDARY
157 if (dir.
y == 0.0)
return 0;
159 if ((fpt.
v.
y > 0 && dir.
y > 0) || (fpt.
v.
y < 0 && dir.
y < 0)) {
160#ifdef TRACE_find_embed_vol
161 mcout <<
"cond 4, returning 0\n";
167#ifdef IMPROVED_BOUNDARY
168 if (dir.
z == 0.0)
return 0;
170 if ((fpt.
v.
z > 0 && dir.
z > 0) || (fpt.
v.
z < 0 && dir.
z < 0)) {
171#ifdef TRACE_find_embed_vol
172 mcout <<
"cond 5, returning 0\n";
177#ifdef TRACE_find_embed_vol
178 mcout <<
"finish, returning 1\n";
187 Ifile <<
"box::print(l=" << l <<
"): " << s <<
'\n';
190 <<
" prec=" <<
prec <<
'\n';
203 mfunname(
"virtual int box::range_ext(trajestep& fts, int s_ext) const");
223 strcat(nm,
m_name.c_str());
231 strcpy(nm,
"manip_box: ");
232 strcat(nm,
m_name.c_str());
239 Ifile <<
"manip_box::print(l=" << l <<
"): " << s <<
'\n';
262 strcpy(nm,
"sh_manip_box: ");
263 strcat(nm,
m_name.c_str());
270 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)