Go to the source code of this file.
Definition at line 11 of file DDTrackerPhiAltAlgo.cc.
References writedatasetfile::args, cms::DDAlgoArguments::childName(), angle_units::operators::convertRadToDeg(), funct::cos(), cms::DDAlgoArguments::find(), mps_fire::i, LogDebug, cms::makeRotation3D(), cms::DDNamespace::name(), contentValuesFiles::number, cms::DDAlgoArguments::parentName(), idealTransformation::rotation, funct::sin(), theta(), cms::DDAlgoArguments::value(), and cms::DDNamespace::volume().
16 double tilt =
args.value<
double>(
"Tilt");
17 double startAngle =
args.value<
double>(
"StartAngle");
18 double rangeAngle =
args.value<
double>(
"RangeAngle");
19 double radiusIn =
args.value<
double>(
"RadiusIn");
20 double radiusOut =
args.value<
double>(
"RadiusOut");
21 double zpos =
args.value<
double>(
"ZPosition");
23 int startCopyNo =
args.find(
"StartCopyNo") ?
args.value<
int>(
"StartCopyNo") : 1;
24 int incrCopyNo =
args.find(
"IncrCopyNo") ?
args.value<
int>(
"IncrCopyNo") : 1;
26 LogDebug(
"TrackerGeom") <<
"Parent " << mother.name() <<
"\tChild " << child.name() <<
" NameSpace " << ns.name();
27 LogDebug(
"TrackerGeom") <<
"Parameters for positioning-- Tilt " << tilt <<
"\tStartAngle " 29 << radiusIn <<
"\tRout " << radiusOut <<
"\t ZPos " << zpos <<
"\tCopy Numbers " << number
30 <<
" Start/Increment " << startCopyNo <<
", " << incrCopyNo;
33 double theta = 90._deg;
35 if (number == 1 || fabs(rangeAngle - 360.0_deg) < 0.001_deg)
36 dphi = rangeAngle /
number;
38 dphi = rangeAngle / (number - 1);
39 int copyNo = startCopyNo;
42 double phi = startAngle +
i * dphi;
43 double phix = phi - tilt + 90._deg;
44 double phiy = phix + 90._deg;
54 xpos = radiusIn *
cos(phi);
55 ypos = radiusIn *
sin(phi);
57 xpos = radiusOut *
cos(phi);
58 ypos = radiusOut *
sin(phi);
60 Position tran(xpos, ypos, zpos);
61 mother.placeVolume(child, copyNo, Transform3D(rotation, tran));
62 LogDebug(
"TrackerGeom") <<
"" << child.name() <<
" number " << copyNo <<
" positioned in " << mother.name()
63 <<
" at " << tran <<
" with " <<
rotation;
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
dd4hep::Rotation3D makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
Cos< T >::type cos(const T &t)
DD4HEP_OPEN_PLUGIN |
( |
dd4hep |
, |
|
|
ddcms_det_element_DDCMS_track_DDTrackerPhiAltAlgo |
|
|
) |
| |