5 #include "CLHEP/Units/GlobalSystemOfUnits.h" 6 #include "CLHEP/Units/SystemOfUnits.h" 15 #include "Math/GenVector/AxisAngle.h" 16 #include "Math/GenVector/DisplacementVector3D.h" 17 #include "Math/GenVector/Rotation3D.h" 24 m_rangeAngle( 360*deg ),
28 LogDebug(
"DDAlgorithm" ) <<
"DDAngular: Creating an instance.";
52 if( fabs(
m_rangeAngle - 360.0 * CLHEP::deg ) < 0.001 * CLHEP::deg )
68 LogDebug(
"DDAlgorithm" ) <<
"DDAngular: Parameters for position" 69 <<
"ing:: n " <<
m_n <<
" Start, Range, Delta " 80 LogDebug(
"DDAlgorithm" ) <<
"\trotateSolid must occur 3*n times (defining n subsequent rotations)\n" 81 <<
"\t currently it appears " << sz <<
" times!\n";
83 for( sz_type
i = 0;
i < sz;
i += 3 )
87 LogDebug(
"DDAlgorithm" ) <<
"\trotateSolid \'theta\' must be in range [0,180*deg]\n" 89 <<
"*deg in rotateSolid[" << double(
i) <<
"]!\n";
93 LogDebug(
"DDAlgorithm" ) <<
" rotsolid[" << i <<
"] axis=" << temp.Axis() <<
" rot.angle=" << temp.Angle()/deg;
103 LogDebug(
"DDAlgorithm" ) <<
"DDAngular: Parent " << parentName
104 <<
"\tChild " <<
m_childNmNs.first <<
"\tNameSpace " 113 double theta = 90.*CLHEP::deg;
117 for(
int i = 0;
i <
m_n; ++
i )
120 double phiy = phix + 90. * CLHEP::deg;
121 double phideg = phix / CLHEP::deg;
127 LogDebug(
"DDAlgorithm" ) <<
"DDAngular: Creating a new " 128 <<
"rotation: " << rotstr <<
"\t90., " 129 << phix / CLHEP::deg <<
", 90.," 130 << phiy / CLHEP::deg <<
", 0, 0";
138 double zpos = m_center[2];
141 cpv.
position( ddname, mother, copy, tran, rotation );
143 << copy <<
" positioned in " << mother <<
" at " 144 << tran <<
" with " << rotation <<
"\n";
154 sin( phi ) *
sin( theta ),
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
DDName is used to identify DDD entities uniquely.
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs) override
static std::string & ns()
DD3Vector fUnitVector(double theta, double phi)
type of data representation of DDCompactView
DDRotationMatrix m_solidRot
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
void execute(DDCompactView &cpv) override
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Cos< T >::type cos(const T &t)
std::vector< double > m_rotateSolid
std::vector< double > m_center
~DDAngular(void) override
std::string m_idNameSpace
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=0)
std::pair< std::string, std::string > m_childNmNs
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
ROOT::Math::AxisAngle DDAxisAngle
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.