1 #include "DD4hep/DetFactoryHelper.h"
8 using namespace angle_units::operators;
15 double eta = args.
value<
double>(
"Eta");
16 double theta = 2.0 * atan(
exp(-eta));
17 double shiftY = args.
value<
double>(
"ShiftX");
18 double shiftX = args.
value<
double>(
"ShiftY");
19 double zoffset = args.
value<
double>(
"Zoffset");
20 double dist = args.
value<
double>(
"Distance");
21 double tilt = args.
value<
double>(
"TiltAngle");
22 int copyNumber = args.
value<
int>(
"Number");
25 childName = idNameSpace + childName;
27 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBZposAlgo: Parameters for positioning-- Eta " << eta <<
"\tTheta "
33 <<
" NameSpace " << idNameSpace;
40 double thetax = 90._deg -
theta;
41 double z = zoffset + dist *
tan(thetax);
42 double x = shiftX - shiftY *
sin(tilt);
43 double y = shiftY *
cos(tilt);
45 dd4hep::Rotation3D
rot;
51 rot = dd4hep::RotationZ(tilt);
53 mother.placeVolume(child, copyNumber, dd4hep::Transform3D(rot, tran));
55 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBZposAlgo: " << child.name() <<
" number " << copyNumber <<
" positioned in "
Log< level::Info, true > LogVerbatim
dd4hep::Volume volume(const std::string &name, bool exc=true) const
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
Sin< T >::type sin(const T &t)
T value(const std::string &name) const
Geom::Theta< T > theta() const
Exp< T >::type exp(const T &t)
std::string_view name() const
#define DECLARE_DDCMS_DETELEMENT(name, func)
static constexpr long s_executed
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
std::string parentName() const
Access value of rParent child node.