Definition at line 23 of file DDAngular.cc.
27 int n =
args.value<
int>(
"N");
28 int startCopyNo =
args.find(
"StartCopyNo") ?
args.value<
int>(
"StartCopyNo") : 1;
29 int incrCopyNo =
args.find(
"IncrCopyNo") ?
args.value<
int>(
"IncrCopyNo") : 1;
30 double rangeAngle =
args.value<
double>(
"RangeAngle");
31 double startAngle =
args.value<
double>(
"StartAngle");
33 vector<double> center =
args.value<vector<double> >(
"Center");
34 vector<double> rotateSolid =
args.value<vector<double> >(
"RotateSolid");
36 string childName =
args.value<
string>(
"ChildName");
37 childName = ns.prepend(childName);
42 if (fabs(rangeAngle - 360.0_deg) < 0.001_deg) {
43 delta = rangeAngle / double(
n);
45 delta = rangeAngle / double(
n - 1);
48 LogDebug(
"DDAlgorithm") <<
"debug: Parameters for positioning:: n " <<
n <<
" Start, Range, Delta "
51 << center[1] <<
", " << center[2] <<
", Rotate solid " << rotateSolid[0] <<
", "
52 << rotateSolid[1] <<
", " << rotateSolid[2];
53 LogDebug(
"DDAlgorithm") <<
"debug: Parent " << mother.name() <<
"\tChild " <<
child.name() <<
" NameSpace "
56 Rotation3D solidRot = Rotation3D();
57 auto sz = rotateSolid.size();
59 LogDebug(
"DDAlgorithm") <<
"\trotateSolid must occur 3*n times (defining n subsequent rotations)\n"
60 <<
"\t currently it appears " << sz <<
" times!\n";
62 for (
unsigned int i = 0;
i < sz;
i += 3) {
63 const double thetaValue = rotateSolid[
i];
64 if ((thetaValue > 180._deg) || (thetaValue < 0._deg)) {
65 LogDebug(
"DDAlgorithm") <<
"\trotateSolid \'theta\' must be in range [0,180*deg]\n"
66 <<
"\t currently it is " <<
convertRadToDeg(thetaValue) <<
"*deg in rotateSolid["
67 << double(
i) <<
"]!\n";
70 LogDebug(
"DDAlgorithm") <<
" rotsolid[" <<
i <<
"] axis=" <<
temp.Axis()
72 solidRot =
temp * solidRot;
75 double theta = 90._deg;
76 int copy = startCopyNo;
77 double phi = startAngle;
78 for (
int i = 0;
i <
n; ++
i) {
80 double phiy = phix + 90._deg;
84 string rotstr = ns.nsName(
child.name()) + std::to_string(phideg * 10.);
85 auto irot = ctxt.
rotations.find(ns.prepend(rotstr));
87 rotation = ns.rotation(ns.prepend(rotstr));
92 double zpos = center[2];
95 LogDebug(
"DDAlgorithm") <<
"test " <<
child.name() <<
" number " <<
copy <<
" positioned in " << mother.name()
96 <<
" at " << tran <<
" with " << rotstr <<
": " <<
rotation;
References writedatasetfile::args, angle_units::operators::convertRadToDeg(), filterCSVwithJSON::copy, funct::cos(), dumpMFGeometry_cfg::delta, MillePedeFileConverter_cfg::e, mps_fire::i, LogDebug, cms::makeRotation3D(), dqmiodumpmetadata::n, cms::DDNamespace::name(), cms::DDNamespace::nsName(), PixelTestBeamValidation_cfi::Position, cms::DDNamespace::prepend(), CosmicsPD_Skims::radius, idealTransformation::rotation, cms::DDNamespace::rotation(), cms::DDParsingContext::rotations, funct::sin(), groupFilesInBlocks::temp, theta(), and cms::DDNamespace::volume().