Go to the documentation of this file.
4 #include "DD4hep/DetFactoryHelper.h"
13 int n =
args.value<
int>(
"n");
14 int startCopyNo =
args.value<
int>(
"startCopyNo");
15 int incrCopyNo =
args.value<
int>(
"incrCopyNo");
16 double rangeAngle =
args.value<
double>(
"rangeAngle");
17 double startAngle =
args.value<
double>(
"startAngle");
18 double shiftX =
args.value<
double>(
"shiftX");
19 double shiftY =
args.value<
double>(
"shiftY");
20 double zoffset =
args.value<
double>(
"zoffset");
23 childName = ns.
prepend(childName);
27 double dphi = rangeAngle /
n;
29 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalAngular: Parameters for positioning::"
30 <<
" n " <<
n <<
" Start, Range, Delta " <<
convertRadToDeg(startAngle) <<
" "
33 <<
"\tChild " <<
child.name() <<
" NameSpace " << ns.
name();
35 int copy = startCopyNo;
36 double phix = startAngle;
37 for (
int ii = 0;
ii <
n; ++
ii) {
52 double xpos = shiftX *
cos(phix) - shiftY *
sin(phix);
53 double ypos = shiftX *
sin(phix) + shiftY *
cos(phix);
#define DECLARE_DDCMS_DETELEMENT(name, func)
static long algorithm(dd4hep::Detector &, cms::DDParsingContext &ctxt, xml_h e)
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
std::string prepend(const std::string &) const
constexpr NumType convertCmToMm(NumType centimeters)
Log< level::Info, true > LogVerbatim
Abs< T >::type abs(const T &t)
std::string_view name() const
dd4hep::Volume volume(const std::string &name, bool exc=true) const