14 #include "CLHEP/Units/GlobalPhysicalConstants.h" 15 #include "CLHEP/Units/GlobalSystemOfUnits.h" 61 iccName = sArgs[
"ICCName"];
63 LogDebug(
"TIDGeom") <<
"DDTIDRingAlgo debug: Parent " << parentName <<
"\tModule " <<
moduleName[0] <<
", " 64 <<
moduleName[1] <<
"\tICC " << iccName <<
"\tNameSpace " << idNameSpace;
67 startAngle = nArgs[
"StartAngle"];
68 rModule = nArgs[
"ModuleR"];
69 zModule = vArgs[
"ModuleZ"];
71 sICC = nArgs[
"ICCShift"];
74 LogDebug(
"TIDGeom") <<
"DDTIDRingAlgo debug: Parameters for positioning--" 75 <<
" StartAngle " << startAngle / CLHEP::deg <<
" Copy Numbers " <<
number <<
" Modules at R " 76 << rModule <<
" Z " << zModule[0] <<
", " << zModule[1] <<
" ICCs at R " << rICC <<
" Z " 77 << zICC[0] <<
", " << zICC[1];
81 double theta = 90. * CLHEP::deg;
82 double phiy = 0. * CLHEP::deg;
83 double dphi = CLHEP::twopi /
number;
92 double phiz = startAngle +
i * dphi;
93 double xpos = rModule *
cos(phiz);
94 double ypos = rModule *
sin(phiz);
95 double zpos, thetay, phix;
97 phix = phiz + 90. * CLHEP::deg;
98 thetay = 0 * CLHEP::deg;
102 phix = phiz - 90. * CLHEP::deg;
103 thetay = 180 * CLHEP::deg;
109 phix = phix - 180. * CLHEP::deg;
110 thetay = thetay + 180. * CLHEP::deg;
114 double phideg = phiz / CLHEP::deg;
119 LogDebug(
"TIDGeom") <<
"DDTIDRingAlgo test: Creating a new rotation " << rotstr <<
"\t" <<
theta / CLHEP::deg
120 <<
", " << phix / CLHEP::deg <<
", " << thetay / CLHEP::deg <<
", " << phiy / CLHEP::deg
121 <<
", " <<
theta / CLHEP::deg <<
", " << phiz / CLHEP::deg;
126 LogDebug(
"TIDGeom") <<
"DDTIDRingAlgo test: " <<
module <<
" number " <<
i + 1 <<
" positioned in " << mother
127 <<
" at " << trmod <<
" with " <<
rotation;
132 xpos = rICC *
cos(phiz) + sICC *
sin(phiz);
133 ypos = rICC *
sin(phiz) - sICC *
cos(phiz);
136 xpos = rICC *
cos(phiz) - sICC *
sin(phiz);
137 ypos = rICC *
sin(phiz) + sICC *
cos(phiz);
141 LogDebug(
"TIDGeom") <<
"DDTIDRingAlgo test: " << icc <<
" number " <<
i + 1 <<
" positioned in " << mother <<
" at " 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)
void execute(DDCompactView &cpv) override
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
static std::string to_string(const XMLCh *ch)
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
const std::string & name() const
Returns the name.
~DDTIDRingAlgo() override
Cos< T >::type cos(const T &t)
vector< string > moduleName
#define DEFINE_EDM_PLUGIN(factory, type, name)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
Geom::Theta< T > theta() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation