23 using namespace geant_units::operators;
56 units = int(nArgs[
"number"]);
58 dphi = nArgs[
"deltaPhi"];
64 rotMat = sArgs[
"Rotation"];
65 childName = sArgs[
"ChildName"];
67 edm::LogVerbatim(
"ForwardGeom") <<
"DDBHMAngular debug: Parent " <<
parent().name() <<
"\tChild " << childName
68 <<
"\tRotation matrix " << rotMat;
77 if (rotstr !=
"NULL") {
82 static const double fac1 = 0.5;
83 static const double fac2 = 1.5;
84 static const double fac3 = 14.5;
85 static const double fac4 = 15.5;
87 double driverX(0), driverY(0), driverZ(0);
89 driverX =
rr *
cos((
jj + fac1) * dphi);
90 driverY =
sqrt(
rr *
rr - driverX * driverX);
91 }
else if (
jj == 16) {
92 driverX =
rr *
cos(fac4 * dphi);
93 driverY = -
sqrt(
rr *
rr - driverX * driverX);
94 }
else if (
jj == 17) {
95 driverX =
rr *
cos(fac3 * dphi);
96 driverY = -
sqrt(
rr *
rr - driverX * driverX);
97 }
else if (
jj == 18) {
98 driverX =
rr *
cos(fac1 * dphi);
99 driverY = -
sqrt(
rr *
rr - driverX * driverX);
100 }
else if (
jj == 19) {
101 driverX =
rr *
cos(fac2 * dphi);
102 driverY = -
sqrt(
rr *
rr - driverX * driverX);
106 cpv.
position(child, parentName,
jj + 1, tran, rot);
108 edm::LogVerbatim(
"ForwardGeom") <<
"DDBHMAngular test: " << child <<
" number " <<
jj + 1 <<
" positioned in "
109 << parentName <<
" at " << tran <<
" with " <<
rot;
Log< level::Info, true > LogVerbatim
static AlgebraicMatrix initialize()
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
constexpr NumType convertRadToDeg(NumType radians)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
DDName is used to identify DDD entities uniquely.
Compact representation of the geometrical detector hierarchy.
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
TString units(TString variable, Char_t axis)
constexpr NumType convertMmToCm(NumType millimeters)
void execute(DDCompactView &cpv) override
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation