14 #include "CLHEP/Units/GlobalPhysicalConstants.h"
15 #include "CLHEP/Units/GlobalSystemOfUnits.h"
19 LogDebug(
"TrackerGeom") <<
"DDTrackerAngularV1 info: Creating an instance";
38 if (fabs(
rangeAngle-360.0*CLHEP::deg)<0.001*CLHEP::deg) {
48 LogDebug(
"TrackerGeom") <<
"DDTrackerAngularV1 debug: Parameters for position"
49 <<
"ing:: n " <<
n <<
" Start, Range, Delta "
59 LogDebug(
"TrackerGeom") <<
"DDTrackerAngularV1 debug: Parent " << parentName
60 <<
"\tChild " <<
childName <<
" NameSpace "
68 double theta = 90.*CLHEP::deg;
71 for (
int i=0;
i<
n;
i++) {
72 double phix = phi + 90.*CLHEP::deg;
73 double phiy = phix + 90.*CLHEP::deg;
74 double phideg = phix/CLHEP::deg;
81 LogDebug(
"TrackerGeom") <<
"DDTrackerAngularV1 test: Creating a new "
82 <<
"rotation: " << rotstr <<
"\t90., "
83 << phix/CLHEP::deg <<
", 90.,"
84 << phiy/CLHEP::deg <<
", 0, 0";
91 double ypos =
radius*
sin(phi) + center[1];
92 double zpos = center[2];
95 cpv.
position(child, mother, copy, tran, rotation);
96 LogDebug(
"TrackerGeom") <<
"DDTrackerAngularV1 test " << child <<
" number "
97 << copy <<
" positioned in " << mother <<
" at "
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
DDName is used to identify DDD entities uniquely.
static std::string & ns()
std::string dbl_to_string(const double &in)
Converts only the integer part of a double to a string.
type of data representation of DDCompactView
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
void execute(DDCompactView &cpv)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
std::vector< double > center
virtual ~DDTrackerAngularV1()
const std::string & name() const
Returns the name.