1 #include "DD4hep/DetFactoryHelper.h" 15 double eta =
args.value<
double>(
"Eta");
17 double shiftY =
args.value<
double>(
"ShiftX");
18 double shiftX =
args.value<
double>(
"ShiftY");
19 double zoffset =
args.value<
double>(
"Zoffset");
20 double dist =
args.value<
double>(
"Distance");
21 double tilt =
args.value<
double>(
"TiltAngle");
22 int copyNumber =
args.value<
int>(
"Number");
25 childName = idNameSpace + childName;
27 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBZposAlgo: Parameters for positioning-- Eta " <<
eta <<
"\tTheta " 32 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBZposAlgo: Parent " <<
args.parentName() <<
"\tChild " << childName
33 <<
" NameSpace " << idNameSpace;
40 double thetax = 90._deg -
theta;
41 double z = zoffset + dist *
tan(thetax);
42 double x = shiftX - shiftY *
sin(tilt);
43 double y = shiftY *
cos(tilt);
45 dd4hep::Rotation3D
rot;
51 rot = dd4hep::RotationZ(tilt);
53 mother.placeVolume(
child, copyNumber, dd4hep::Transform3D(
rot, tran));
55 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTBZposAlgo: " <<
child.name() <<
" number " << copyNumber <<
" positioned in " Log< level::Info, true > LogVerbatim
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
Sin< T >::type sin(const T &t)
#define DECLARE_DDCMS_DETELEMENT(name, func)
static constexpr long s_executed
std::string_view name() const
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
Geom::Theta< T > theta() const
static long algorithm(dd4hep::Detector &, cms::DDParsingContext &ctxt, xml_h e)
dd4hep::Volume volume(const std::string &name, bool exc=true) const