9 #define MAX_DOUBLE DBL_MAX
12 #include "CLHEP/Units/GlobalSystemOfUnits.h"
13 #include <Math/RotationZ.h>
22 rotate_(0), center_(3), rotateSolid_(0),
23 alignSolid_(
true), n_(1), startCopyNo_(1), incrCopyNo_(1),
24 startAngle_(0), rangeAngle_(360.*deg)
26 DCOUT(
'A',
"Creating angular label=" << label);
69 " n=" <<
n_ <<
" delta=" <<
delta_/deg);
73 sz_type sz =
ParE_[
"rotateSolid"].size();
77 err_ +=
"\trotateSolid must occur 3*n times (defining n subsequent rotations)\n";
78 err_ +=
"\t currently it appears " +
d2s(sz) +
" times!\n";
81 for (sz_type
i=0;
i<sz; ++
i) {
84 for (sz_type
i=0;
i<sz;
i += 3 ) {
86 err_ +=
"\trotateSolid \'theta\' must be in range [0,180*deg]\n";
88 +
"*deg in rotateSolid[" +
d2s(
double(
i)) +
"]!\n";
93 DCOUT(
'a',
" rotsolid[" << i <<
"] axis=" << temp.Axis() <<
" rot.angle=" << temp.Angle()/deg);
100 sz =
ParE_[
"rotate"].size();
104 err_ +=
"\trotate must occur 3*n times (defining n subsequent rotations)\n";
105 err_ +=
"\t currently it appears " +
d2s(sz) +
" times!\n";
108 for (sz_type
i=0;
i<sz; ++
i) {
111 for (sz_type
i=0;
i<sz;
i += 3 ) {
113 err_ +=
"\trotate \'theta\' must be in range [0,180*deg]\n";
115 +
"*deg in rotate[" +
d2s(
double(
i)) +
"]!\n";
120 DCOUT(
'a',
" rotsolid[" << i <<
"] axis=" << temp.Axis() <<
" rot.angle=" << temp.Angle()/deg);
129 if (
ParS_[
"alignSolid"][0] !=
"T") {
130 DCOUT(
'a',
" alignSolid = false");
154 DCOUT(
'A',
" angle=" << angle/deg <<
" translation=" << v <<
" count_=" <<
count_);
166 ROOT::Math::RotationZ r2(angle);
200 os <<
"global_angular_0::stream(): not implemented.";
void checkTermination()
for algorithms with incr_==0 the algorithm must check whether to terminate
DDRotationMatrix planeRot_
class for algorithmic positioning, represents an algorithm
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
std::vector< double > rotateSolid_
constraints as defined for algorithm-parameters in the XML schema Algorithm.xsd, strings ...
constraints as defined for algorithm-parameters in the XML schema Algorithm.xsd, expressions ...
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
virtual int copyno() const
copy-number calculation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
DDTranslation translation()
subclass must calculate a translation std::vector
Cos< T >::type cos(const T &t)
implementation of an algorithm, non generated checking code.
int copyno() const
copy-number calculation
constraintsS_type constraintsS_
format: "ParameterName" -> ConstraintS
DD3Vector fUnitVector(double theta, double phi)
static std::string d2s(double x)
ahh, converts a double into a std::string ... yet another one of this kind!
std::vector< double > rotate_
constraintsE_type constraintsE_
format: "ParameterName" -> ConstraintE
std::vector< double > center_
global_angular_0(AlgoPos *, std::string label)
void stream(std::ostream &) const
DDRotationMatrix rotation()
subclass must calculate a rotation matrix
DDRotationMatrix solidRot_
ROOT::Math::AxisAngle DDAxisAngle
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
#define DCOUT(M_v_Y, M_v_S)
bool checkParameters()
subclass must check the supplied parameters ParE_, ParS_
void terminate()
stop the current iteration of the algorithm (for incr_==0 types of algorithms)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)