12 #include "CLHEP/Units/GlobalPhysicalConstants.h" 13 #include "CLHEP/Units/GlobalSystemOfUnits.h" 58 startCopyNo =
int(nArgs[
"StartCopyNo"]);
59 incrCopyNo =
int(nArgs[
"IncrCopyNo"]);
60 rangeAngle = nArgs[
"RangeAngle"];
61 startAngle = nArgs[
"StartAngle"];
63 center = vArgs[
"Center"];
65 if (fabs(rangeAngle - 360.0 * CLHEP::deg) < 0.001 * CLHEP::deg) {
66 delta = rangeAngle / double(
n);
69 delta = rangeAngle / double(
n - 1);
75 LogDebug(
"TrackerGeom") <<
"DDTrackerAngular debug: Parameters for position" 76 <<
"ing:: n " <<
n <<
" Start, Range, Delta " << startAngle / CLHEP::deg <<
" " 77 << rangeAngle / CLHEP::deg <<
" " <<
delta / CLHEP::deg <<
" Radius " <<
radius <<
" Centre " 78 << center[0] <<
", " << center[1] <<
", " << center[2];
81 childName = sArgs[
"ChildName"];
84 LogDebug(
"TrackerGeom") <<
"DDTrackerAngular debug: Parent " << parentName <<
"\tChild " << childName <<
" NameSpace " 91 double theta = 90. * CLHEP::deg;
92 int copy = startCopyNo;
93 double phi = startAngle;
94 for (
int i = 0;
i <
n;
i++) {
96 double phiy = phix + 90. * CLHEP::deg;
97 double phideg = phix / CLHEP::deg;
104 LogDebug(
"TrackerGeom") <<
"DDTrackerAngular test: Creating a new " 105 <<
"rotation: " << rotstr <<
"\t90., " << phix / CLHEP::deg <<
", 90.," 106 << phiy / CLHEP::deg <<
", 0, 0";
111 double xpos =
radius *
cos(phi) + center[0];
112 double ypos =
radius *
sin(phi) + center[1];
113 double zpos = center[2];
117 LogDebug(
"TrackerGeom") <<
"DDTrackerAngular test " <<
child <<
" number " <<
copy <<
" positioned in " << mother
118 <<
" at " << tran <<
" with " <<
rotation;
static AlgebraicMatrix initialize()
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
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)
Cos< T >::type cos(const T &t)
~DDTrackerAngular() override
#define DEFINE_EDM_PLUGIN(factory, type, name)
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
void execute(DDCompactView &cpv) override