61 m_n =
int(nArgs[
"N"]);
62 m_startCopyNo =
int(nArgs[
"StartCopyNo"]);
63 m_incrCopyNo =
int(nArgs[
"IncrCopyNo"]);
64 m_theta = nArgs[
"Theta"];
66 m_delta = nArgs[
"Delta"];
67 m_base = vArgs[
"Base"];
69 LogDebug(
"DDAlgorithm" ) <<
"DDLinear: Parameters for position" 70 <<
"ing:: n " << m_n <<
" Direction Theta, Phi, Offset, Delta " 74 <<
" Base " << m_base[0]
75 <<
", " << m_base[1] <<
", " << m_base[2];
77 m_childNmNs =
DDSplit( sArgs[
"ChildName"] );
78 if( m_childNmNs.second.empty())
82 LogDebug(
"DDAlgorithm" ) <<
"DDLinear: Parent " << parentName
83 <<
"\tChild " << m_childNmNs.first <<
" NameSpace " 84 << m_childNmNs.second;
91 DDName ddname( m_childNmNs.first, m_childNmNs.second );
92 int copy = m_startCopyNo;
95 sin( m_theta ) *
sin( m_phi ),
105 LogDebug(
"DDAlgorithm" ) <<
"DDLinear: Creating a new " 106 <<
"rotation: IdentityRotation for " << ddname;
108 rotation =
DDrot(
"IdentityRotation", std::make_unique< DDRotationMatrix >());
111 for(
int i = 0;
i < m_n; ++
i )
113 DDTranslation tran = basetr + ( double( copy ) * m_delta ) * direction;
114 cpv.
position( ddname, mother, copy, tran, rotation );
115 LogDebug(
"DDAlgorithm" ) <<
"DDLinear: " << m_childNmNs.second <<
":" << m_childNmNs.first <<
" number " 116 << copy <<
" positioned in " << mother <<
" at " 118 copy += m_incrCopyNo;
static AlgebraicMatrix initialize()
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
constexpr NumType convertRadToDeg(NumType radians)
static std::string & ns()
void execute(DDCompactView &cpv) override
Compact representation of the geometrical detector hierarchy.
std::pair< std::string, std::string > m_childNmNs
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
Cos< T >::type cos(const T &t)
std::vector< double > m_base
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'