|
|
Go to the documentation of this file.
25 : m_n(1), m_startCopyNo(1), m_incrCopyNo(1), m_theta(0.), m_phi(0.), m_delta(0.), m_phi_obj(0.), m_theta_obj(0.) {}
55 m_n =
int(nArgs[
"N"]);
56 m_startCopyNo =
int(nArgs[
"StartCopyNo"]);
57 m_incrCopyNo =
int(nArgs[
"IncrCopyNo"]);
58 m_theta = nArgs[
"Theta"];
60 m_delta = nArgs[
"Delta"];
61 m_base = vArgs[
"Base"];
62 m_phi_obj = nArgs[
"Phi_obj"];
63 m_theta_obj = nArgs[
"Theta_obj"];
65 LogDebug(
"DDAlgorithm") <<
"DDMTDLinear: Parameters for position"
66 <<
"ing:: n " << m_n <<
" Direction Theta, Phi, Offset, Delta " <<
convertRadToDeg(m_theta)
68 <<
" " <<
convertRadToDeg(m_delta) <<
" Base " << m_base[0] <<
", " << m_base[1] <<
", "
69 << m_base[2] <<
"Objects placement Phi_obj, Theta_obj " <<
convertRadToDeg(m_phi_obj) <<
" "
72 m_childNmNs =
DDSplit(sArgs[
"ChildName"]);
73 if (m_childNmNs.second.empty())
77 LogDebug(
"DDAlgorithm") <<
"DDMTDLinear: Parent " << parentName <<
"\tChild " << m_childNmNs.first <<
" NameSpace "
78 << m_childNmNs.second;
83 DDName ddname(m_childNmNs.first, m_childNmNs.second);
84 int copy = m_startCopyNo;
91 double thetaZ = m_theta_obj - 0.5_pi;
92 double phiZ = m_phi_obj;
93 double thetaX = m_theta_obj;
94 double thetaY = m_theta_obj;
95 double phiX = m_phi_obj;
96 double phiY = m_phi_obj + 0.5_pi;
101 LogDebug(
"DDAlgorithm") <<
"DDMTDLinear: Creating a new "
102 <<
"rotation for " << ddname;
107 for (
int i = 0;
i < m_n; ++
i) {
110 LogDebug(
"DDAlgorithm") <<
"DDMTDLinear: " << m_childNmNs.second <<
":" << m_childNmNs.first <<
" number " <<
copy
111 <<
" positioned in " << mother <<
" at " << tran <<
" with " <<
rotation;
112 copy += m_incrCopyNo;
DDName is used to identify DDD entities uniquely.
constexpr NumType convertRadToDeg(NumType radians)
void execute(DDCompactView &cpv) override
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Compact representation of the geometrical detector hierarchy.
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::pair< std::string, std::string > m_childNmNs
std::vector< double > m_base
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
static std::string & ns()
Represents a uniquely identifyable rotation matrix.
static AlgebraicMatrix initialize()
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)