Go to the source code of this file.
static long algorithm |
( |
dd4hep::Detector & |
, |
|
|
cms::DDParsingContext & |
ctxt, |
|
|
xml_h |
e, |
|
|
dd4hep::SensitiveDetector & |
|
|
) |
| |
|
static |
Definition at line 9 of file DDHCalAngular.cc.
References funct::abs(), writedatasetfile::args, geant_units::operators::convertCmToMm(), angle_units::operators::convertRadToDeg(), filterCSVwithJSON::copy, funct::cos(), cuy::ii, dqmiodumpmetadata::n, cms::DDNamespace::name(), NAMESPACE_SEP, cms::DDAlgoArguments::parentName(), idealTransformation::rotation, funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, cms::DDAlgoArguments::value(), and cms::DDNamespace::volume().
16 int n =
args.value<
int>(
"n");
17 int startCopyNo =
args.value<
int>(
"startCopyNo");
18 int incrCopyNo =
args.value<
int>(
"incrCopyNo");
19 double rangeAngle =
args.value<
double>(
"rangeAngle");
20 double startAngle =
args.value<
double>(
"startAngle");
21 double shiftX =
args.value<
double>(
"shiftX");
22 double shiftY =
args.value<
double>(
"shiftY");
23 double zoffset =
args.value<
double>(
"zoffset");
27 childName = ns.name() + childName;
31 double dphi = rangeAngle /
n;
33 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalAngular: Parameters for positioning::" 34 <<
" n " << n <<
" Start, Range, Delta " <<
convertRadToDeg(startAngle) <<
" " 37 <<
"\tChild " << child.name() <<
" NameSpace " << ns.name();
39 int copy = startCopyNo;
40 double phix = startAngle;
41 for (
int ii = 0;
ii <
n; ++
ii) {
53 rotation = dd4hep::RotationZ(phix);
56 double xpos = shiftX *
cos(phix) - shiftY *
sin(phix);
57 double ypos = shiftX *
sin(phix) + shiftY *
cos(phix);
58 dd4hep::Position tran(xpos, ypos, zoffset);
59 mother.placeVolume(child, copy, dd4hep::Transform3D(rotation, tran));
61 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalAngular:: " << child.name() <<
" number " << copy <<
" positioned in "
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
constexpr NumType convertCmToMm(NumType centimeters)
DD4HEP_OPEN_PLUGIN |
( |
dd4hep |
, |
|
|
ddcms_det_element_DDCMS_hcal_DDHCalAngular |
|
|
) |
| |