Definition at line 10 of file DDHCalTestBeamAlgo.cc.
References funct::abs(), writedatasetfile::args, cms::convert2mm(), angle_units::operators::convertRadToDeg(), funct::cos(), HLT_FULL_cff::distance, PVValHelper::dz, PVValHelper::eta, funct::exp(), cms::makeRotation3D(), cms::DDNamespace::name(), SpecificationBuilder_cfi::parent(), cms::DDAlgoArguments::parentName(), PixelTestBeamValidation_cfi::Position, cms::DDNamespace::prepend(), alignCSCRings::r, idealTransformation::rotation, cms::s_executed, funct::sin(), AlCaHLTBitMon_QueryRunRegistry::string, theta(), cms::DDAlgoArguments::value(), and cms::DDNamespace::volume().
14 double eta =
args.value<
double>(
"Eta");
15 double phi =
args.value<
double>(
"Phi");
16 double theta = 2.0 * atan(
exp(-eta));
18 double distanceZ =
args.value<
double>(
"DistZ");
19 double dist = (distance + distanceZ /
sin(theta));
20 int copyNumber =
args.value<
int>(
"Number");
22 double dz =
args.value<
double>(
"Dz");
24 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTestBeamAlgo: Parameters for positioning-- Eta " << eta <<
"\tPhi "
29 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTestBeamAlgo:Parent " <<
args.parentName() <<
"\tChild " << childName
30 <<
" NameSpace " << ns.name();
35 double thetax = 90._deg +
theta;
36 double sthx =
sin(thetax);
41 double phix = atan2(sthx *
cos(theta) *
sin(phi), sthx *
cos(theta) *
cos(phi));
42 double thetay = 90._deg;
43 double phiy = 90._deg +
phi;
44 double thetaz =
theta;
55 double r = dist *
sin(theta);
56 double xpos = r *
cos(phi);
57 double ypos = r *
sin(phi);
58 double zpos = dist *
cos(theta);
61 childName = ns.prepend(childName);
63 parent.placeVolume(child, copyNumber, dd4hep::Transform3D(rotation, tran));
65 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalTestBeamAlgo: " << child.name() <<
" number " << copyNumber
66 <<
" positioned in " << parent.name() <<
" at (" <<
cms::convert2mm(xpos) <<
", "
70 xpos = (dist -
dz) *
sin(theta) *
cos(phi);
71 ypos = (dist -
dz) *
sin(theta) *
sin(phi);
72 zpos = (dist -
dz) *
cos(theta);
Log< level::Info, true > LogVerbatim
constexpr NumType convertRadToDeg(NumType radians)
constexpr NumType convert2mm(NumType length)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
Exp< T >::type exp(const T &t)
DDRotationMatrix makeRotation3D(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
static constexpr long s_executed
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
Log< level::Info, false > LogInfo