6 #include "CLHEP/Units/GlobalSystemOfUnits.h"
13 m_rangeAngle( 360*deg ),
17 LogDebug(
"DDAlgorithm" ) <<
"DDAngular: Creating an instance.";
30 m_n = int(nArgs[
"N"]);
41 if( fabs(
m_rangeAngle - 360.0 * CLHEP::deg ) < 0.001 * CLHEP::deg )
57 LogDebug(
"DDAlgorithm" ) <<
"DDAngular: Parameters for position"
58 <<
"ing:: n " <<
m_n <<
" Start, Range, Delta "
69 LogDebug(
"DDAlgorithm" ) <<
"\trotateSolid must occur 3*n times (defining n subsequent rotations)\n"
70 <<
"\t currently it appears " << sz <<
" times!\n";
72 for( sz_type
i = 0;
i < sz;
i += 3 )
76 LogDebug(
"DDAlgorithm" ) <<
"\trotateSolid \'theta\' must be in range [0,180*deg]\n"
78 <<
"*deg in rotateSolid[" << double(
i) <<
"]!\n";
82 LogDebug(
"DDAlgorithm" ) <<
" rotsolid[" << i <<
"] axis=" << temp.Axis() <<
" rot.angle=" << temp.Angle()/deg;
93 LogDebug(
"DDAlgorithm" ) <<
"DDAngular: Parent " << parentName
94 <<
"\tChild " <<
m_childNmNs.first <<
"\tNameSpace "
103 double theta = 90.*CLHEP::deg;
107 for(
int i = 0;
i <
m_n; ++
i )
110 double phiy = phix + 90. * CLHEP::deg;
111 double phideg = phix / CLHEP::deg;
117 LogDebug(
"DDAlgorithm" ) <<
"DDAngular: Creating a new "
118 <<
"rotation: " << rotstr <<
"\t90., "
119 << phix / CLHEP::deg <<
", 90.,"
120 << phiy / CLHEP::deg <<
", 0, 0";
128 double zpos = m_center[2];
131 cpv.
position( ddname, mother, copy, tran, rotation );
133 << copy <<
" positioned in " << mother <<
" at "
134 << tran <<
" with " << rotation <<
"\n";
144 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)
const reco::GenParticle * mother(const reco::GenParticle &p, unsigned int imoth=0)
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.
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.