|
|
Go to the documentation of this file.
12 #include "CLHEP/Units/GlobalPhysicalConstants.h"
13 #include "CLHEP/Units/GlobalSystemOfUnits.h"
50 LogDebug(
"TrackerGeom") <<
"DDTrackerPhiAltAlgo info: Creating an instance";
61 startAngle = nArgs[
"StartAngle"];
62 rangeAngle = nArgs[
"RangeAngle"];
63 radiusIn = nArgs[
"RadiusIn"];
64 radiusOut = nArgs[
"RadiusOut"];
65 zpos = nArgs[
"ZPosition"];
67 startCopyNo =
int(nArgs[
"StartCopyNo"]);
68 incrCopyNo =
int(nArgs[
"IncrCopyNo"]);
70 LogDebug(
"TrackerGeom") <<
"DDTrackerPhiAltAlgo debug: Parameters for "
72 <<
" Tilt " << tilt <<
"\tStartAngle " << startAngle / CLHEP::deg <<
"\tRangeAngle "
73 << rangeAngle / CLHEP::deg <<
"\tRin " << radiusIn <<
"\tRout " << radiusOut <<
"\t ZPos "
74 << zpos <<
"\tCopy Numbers " <<
number <<
" Start/Increment " << startCopyNo <<
", "
78 childName = sArgs[
"ChildName"];
80 LogDebug(
"TrackerGeom") <<
"DDTrackerPhiAltAlgo debug: Parent " << parentName <<
"\tChild " << childName
81 <<
" NameSpace " << idNameSpace;
86 double theta = 90. * CLHEP::deg;
88 if (
number == 1 || fabs(rangeAngle - 360.0 * CLHEP::deg) < 0.001 * CLHEP::deg)
89 dphi = rangeAngle /
number;
91 dphi = rangeAngle / (
number - 1);
92 int copyNo = startCopyNo;
97 double phi = startAngle +
i * dphi;
98 double phix = phi - tilt + 90. * CLHEP::deg;
99 double phiy = phix + 90. * CLHEP::deg;
100 double phideg = phix / CLHEP::deg;
104 string rotstr =
DDSplit(childName).first + to_string(phideg * 10.);
107 LogDebug(
"TrackerGeom") <<
"DDTrackerPhiAltAlgo test: Creating a new"
108 <<
" rotation " << rotstr <<
"\t"
109 <<
"90., " << phix / CLHEP::deg <<
", 90.," << phiy / CLHEP::deg <<
", 0, 0";
116 xpos = radiusIn *
cos(phi);
117 ypos = radiusIn *
sin(phi);
119 xpos = radiusOut *
cos(phi);
120 ypos = radiusOut *
sin(phi);
125 LogDebug(
"TrackerGeom") <<
"DDTrackerPhiAltAlgo test: " <<
child <<
" number " << copyNo <<
" positioned in "
126 << mother <<
" at " << tran <<
" with " <<
rotation;
127 copyNo += incrCopyNo;
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)
~DDTrackerPhiAltAlgo() override
void execute(DDCompactView &cpv) override
static std::string & ns()
Represents a uniquely identifyable rotation matrix.
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)
ROOT::Math::Rotation3D DDRotation