|
|
Go to the documentation of this file.
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;
116 string rotstr = mother.
name() + to_string(phideg * 10.);
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 "
DDName is used to identify DDD entities uniquely.
U second(std::pair< T, U > const &p)
Sin< T >::type sin(const T &t)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
Cos< T >::type cos(const T &t)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Compact representation of the geometrical detector hierarchy.
Geom::Theta< T > theta() const
#define DEFINE_EDM_PLUGIN(factory, type, name)
~DDTIDRingAlgo() override
const std::string & name() const
Returns the name.
static std::string & ns()
Represents a uniquely identifyable rotation matrix.
void execute(DDCompactView &cpv) override
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)
vector< string > moduleName