Belle II Software development
GeoVXDComponents.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <vxd/geometry/GeoVXDComponents.h>
10#include <framework/logging/Logger.h>
11#include <boost/algorithm/string.hpp>
12
13namespace Belle2 {
18 VXDGeoPlacement::VXDGeoPlacement(const std::string& name, double u, double v, std::string w, double woffset): m_name(name), m_u(u),
19 m_v(v), m_woffset(woffset)
20 {
21 boost::to_lower(w);
22 if (w == "below") m_w = c_below;
23 else if (w == "bottom") m_w = c_bottom;
24 else if (w == "center") m_w = c_center;
25 else if (w == "top") m_w = c_top;
26 else if (w == "above") m_w = c_above;
27 else B2FATAL("Unknown z-placement for VXD Component " << name << ": " << w << ", check xml file");
28
29 if (m_w != c_center && m_woffset < 0) {
30 B2FATAL("VXD Component " << name << ": Offset has to be positive except for centered placement");
31 }
32 }
34} // namespace Belle2
@ c_bottom
Place the component at the bottom of the mother.
@ c_above
Place the component above the mother.
@ c_center
Place the component at the center of the mother.
@ c_top
Place the component at the top of the mother.
@ c_below
Place the component below the mother.
double m_woffset
Offset to the w placement of the component.
EPosW m_w
w coordinate where to place the component
VXDGeoPlacement(const std::string &name="", double u=0, double v=0, std::string w="bottom", double woffset=0)
Constructor.
Abstract base class for different kinds of events.