26 std::vector<double> bladeZShift;
36 startCopyNo =
args.find(
"StartCopyNo") ?
args.value<
int>(
"StartCopyNo") : 0;
37 nBlades =
args.value<
int>(
"NumberOfBlades");
38 bladeAngle =
args.value<
double>(
"BladeAngle");
39 bladeTilt =
args.value<
double>(
"BladeTilt");
40 zPlane =
args.value<
double>(
"BladeCommonZ");
41 anchorR =
args.value<
double>(
"AnchorRadius");
43 bladeZShift =
args.value<std::vector<double> >(
"BladeZShift");
50 childName = ns.prepend(childName);
54 edm::LogVerbatim(
"PixelGeom") <<
"DDPixFwdDiskAlgo debug: Parent " << mother.name() <<
"\tChild " <<
child.name()
55 <<
" NameSpace " << ns.name() <<
"\tRot Name " <<
rotName <<
"\tCopyNo (Start/Total) " 56 << startCopyNo <<
", " << nBlades <<
"\tAngles " <<
convertRadToDeg(bladeAngle) <<
", " 57 <<
convertRadToDeg(bladeTilt) <<
"\tZshifts " << zPlane <<
"\tAnchor Radius " 60 for (
int iBlade = 0; iBlade < nBlades; ++iBlade) {
61 edm::LogVerbatim(
"PixelGeom") <<
"DDPixFwdDiskAlgo: Blade " << iBlade <<
" flag " << flagString[iBlade]
62 <<
" zshift " << bladeZShift[iBlade];
65 double deltaPhi = 360.0_deg / (double)nBlades;
66 int copyNo = startCopyNo;
69 for (
int iBlade = 0; iBlade < nBlades; ++iBlade) {
70 if (flagString[iBlade] == flagSelector[0]) {
74 double thetx = acos(-
sin(bladeAngle));
78 double thety = acos(
cos(bladeAngle) *
sin(bladeTilt));
82 double thetz = acos(
cos(bladeAngle) *
cos(bladeTilt));
84 auto rot = dd4hep::Rotation3D();
86 auto irot = ctxt.
rotations.find(ns.prepend(rotstr));
101 <<
", " <<
sin(
phi) *
cos(bladeAngle) <<
", " 105 <<
", " << -
sin(bladeAngle) <<
", " <<
cos(bladeAngle) *
sin(bladeTilt) <<
", " 106 <<
cos(bladeAngle) *
cos(bladeTilt);
111 double zpos = anchorR * (
cos(bladeAngle) *
sin(bladeTilt)) + zPlane + bladeZShift[iBlade];
114 pv = mother.placeVolume(
child, copyNo, dd4hep::Transform3D(
rot, tran));
115 edm::LogVerbatim(
"PixelGeom") <<
"DDPixFwdDiskAlgo test: " <<
pv.name() <<
": " << childName <<
" number " 116 << copyNo <<
" positioned in " << mother.name() <<
" at " << tran <<
" with " Log< level::Info, true > LogVerbatim
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
std::unordered_map< std::string, dd4hep::Rotation3D > rotations
std::string to_string(const V &value)
DDRotationMatrix makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
static const std::string & rotName(const T &rot, const cms::DDParsingContext &context)
static constexpr long s_executed
dd4hep::PlacedVolume PlacedVolume
Cos< T >::type cos(const T &t)