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
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()
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.
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
std::string m_idNameSpace
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
std::pair< std::string, std::string > m_childNmNs
void execute(DDCompactView &cpv)
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.