126 DDRotation flipRot, tiltRot, phiOwnAxisRot, phiRot, globalRot;
127 DDRotationMatrix flipMatrix, tiltMatrix, phiOwnAxisRotMatrix, phiRotMatrix, globalRotMatrix;
128 string rotstr =
"RTrackerRingAlgo";
132 string flipRotstr = rotstr +
"Flip";
135 LogDebug(
"TrackerGeom") <<
"DDTrackerIrregularRingAlgo test: Creating a new rotation: " << flipRotstr
141 flipMatrix = flipRot.
matrix();
148 LogDebug(
"TrackerGeom") <<
"DDTrackerIrregularRingAlgo test: Creating a new rotation: " << tiltRotstr
153 tiltMatrix = tiltRot.
matrix();
155 tiltMatrix *= flipMatrix;
161 LogDebug(
"TrackerGeom") <<
"DDTrackerIrregularRingAlgo test: Creating a new rotation: " << tiltRotstr
166 tiltMatrix = tiltRot.
matrix();
168 tiltMatrix *= flipMatrix;
175 double theta = 90._deg;
179 for (
int i = 0;
i <
n;
i++) {
186 double phiy = phix + 90._deg;
187 double phiy_ownaxis = phix_ownaxis + 90._deg;
190 if (phideg_ownaxis != 0) {
191 string phiOwnAxisRotstr = rotstr +
"PhiOwnAxis" +
to_string(phideg_ownaxis * 10.);
193 if (!phiOwnAxisRot) {
194 LogDebug(
"TrackerGeom") <<
"DDTrackerIrregularRingAlgo test: Creating a new rotation: " << phiOwnAxisRotstr
199 phiOwnAxisRotMatrix = phiOwnAxisRot.
matrix();
202 string phiRotstr = rotstr +
"Phi" +
to_string(phideg * 10.);
205 LogDebug(
"TrackerGeom") <<
"DDTrackerIrregularRingAlgo test: Creating a new rotation: " << phiRotstr
210 phiRotMatrix = phiRot.
matrix();
216 globalRotstr +=
"ZPlus";
218 globalRotstr +=
"Flip";
221 globalRotstr +=
"ZMinus";
223 globalRotstr +=
"Flip";
228 LogDebug(
"TrackerGeom") <<
"DDTrackerIrregularRingAlgo test: Creating a new " 229 <<
"rotation: " << globalRotstr;
230 globalRotMatrix = phiOwnAxisRotMatrix * phiRotMatrix * tiltMatrix;
242 LogDebug(
"TrackerGeom") <<
"DDTrackerIrregularRingAlgo test " <<
child <<
" number " <<
copy <<
" positioned in " 243 << mother <<
" at " << tran <<
" with " << globalRot;
constexpr double convertDegToRad(NumType degrees)
vector< double > yawAngles
void position(const DDLogicalPart &self, const DDLogicalPart &parent, const std::string ©no, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=nullptr)
constexpr NumType convertRadToDeg(NumType radians)
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
static std::string to_string(const XMLCh *ch)
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
vector< double > phiAngles
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
Cos< T >::type cos(const T &t)
vector< double > radiusValues
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
Geom::Theta< T > theta() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
DDRotationMatrix & matrix()