22 using namespace angle_units::operators;
68 angwidth = nArgs[
"AngWidth"];
69 iaxis = int(nArgs[
"Axis"]);
70 names = vsArgs[
"Names"];
73 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalXtalAlgo::Parameters for positioning:"
74 <<
" Axis " << iaxis <<
"\tRadius " <<
radius <<
"\tOffset " <<
offset <<
"\tDx " <<
dx
77 for (
unsigned int i = 0;
i <
names.size();
i++)
81 idName = sArgs[
"ChildName"];
89 double theta[3], phi[3], pos[3];
92 theta[1 - iaxis] = 90._deg;
97 theta[iaxis] = 90._deg +
angle;
100 phi[2] = iaxis * 90._deg;
103 phi[2] = (2 - 3 * iaxis) * 90._deg;
113 static const double tol = 0.01_deg;
116 edm::LogVerbatim(
"HCalGeom") <<
"DDHCalXtalAlgo: Creating a rotation " << rotstr <<
"\t"
121 rotation =
DDrot(
DDName(rotstr, idNameSpace), theta[0], phi[0], theta[1], phi[1], theta[2], phi[2]);
126 <<
" positioned in " << parentName <<
" at " << tran <<
" with " <<
rotation;
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)
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
DDName is used to identify DDD entities uniquely.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
static std::string & ns()
std::vector< std::string > names
Compact representation of the geometrical detector hierarchy.
const std::string names[nVars_]
Represents a uniquely identifyable rotation matrix.
Abs< T >::type abs(const T &t)
~DDHCalXtalAlgo() override
#define DEFINE_EDM_PLUGIN(factory, type, name)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
void execute(DDCompactView &cpv) override
T angle(T x1, T y1, T z1, T x2, T y2, T z2)