|
|
Go to the documentation of this file.
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;
101 string rotstr =
DDSplit(childName).first + to_string(phideg * 10.);
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;
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
DDName is used to identify DDD entities uniquely.
U second(std::pair< T, U > const &p)
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.
Geom::Theta< T > theta() const
#define DEFINE_EDM_PLUGIN(factory, type, name)
static std::string & ns()
void execute(DDCompactView &cpv) override
Represents a uniquely identifyable rotation matrix.
static AlgebraicMatrix initialize()
~DDTrackerAngular() override
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)