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;
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;
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)
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
std::string to_string(const V &value)
static std::string & ns()
Compact representation of the geometrical detector hierarchy.
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
void execute(DDCompactView &cpv) override
Cos< T >::type cos(const T &t)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
~DDTrackerPhiAltAlgo() 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