5 #include "DD4hep/DetFactoryHelper.h" 14 double rr =
args.value<
double>(
"radius");
15 double dphi =
args.value<
double>(
"deltaPhi");
27 <<
"\tRotation matrix " <<
rotMat;
30 dd4hep::Rotation3D
rot;
31 if (rotstr !=
"NULL") {
34 static const int startpos = 16;
35 static const double fac1 = 0.5;
36 static const double fac2 = 1.5;
38 double driverX(0), driverY(0), driverZ(0);
41 driverY =
sqrt(
rr *
rr - driverX * driverX);
42 }
else if (
jj == startpos) {
43 driverX =
rr *
cos((startpos -
fac1) * dphi);
44 driverY = -
sqrt(
rr *
rr - driverX * driverX);
45 }
else if (
jj == startpos + 1) {
46 driverX =
rr *
cos((startpos -
fac2) * dphi);
47 driverY = -
sqrt(
rr *
rr - driverX * driverX);
48 }
else if (
jj == startpos + 2) {
50 driverY = -
sqrt(
rr *
rr - driverX * driverX);
51 }
else if (
jj == startpos + 3) {
53 driverY = -
sqrt(
rr *
rr - driverX * driverX);
60 <<
" positioned in " <<
parent.name() <<
" at " << tran <<
" with " <<
rotMat Log< level::Info, true > LogVerbatim
const dd4hep::Rotation3D & rotation(const std::string &name) const
constexpr NumType convertRadToDeg(NumType radians)
static long algorithm(dd4hep::Detector &, cms::DDParsingContext &ctxt, xml_h e)
riemannFit::Matrix2d rotMat
#define DECLARE_DDCMS_DETELEMENT(name, func)
Cos< T >::type cos(const T &t)
constexpr NumType convertMmToCm(NumType millimeters)
TString units(TString variable, Char_t axis)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
dd4hep::Volume volume(const std::string &name, bool exc=true) const
std::string prepend(const std::string &) const