73 DDRotation flipRot, tiltRot, phiRot, globalRot;
82 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << flipRotstr
87 90.*CLHEP::deg, 180.*CLHEP::deg, 90.*CLHEP::deg, 90.*CLHEP::deg, 180.*CLHEP::deg, 0.);
89 flipMatrix = *flipRot.
matrix();
96 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << tiltRotstr
101 90.*CLHEP::deg, 90.*CLHEP::deg,
tiltAngle, 180.*CLHEP::deg, 90.*CLHEP::deg -
tiltAngle, 0.);
103 tiltMatrix = *tiltRot.
matrix();
104 if (
isFlipped) { tiltMatrix *= flipMatrix; }
110 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << tiltRotstr
117 tiltMatrix = *tiltRot.
matrix();
118 if (
isFlipped) { tiltMatrix *= flipMatrix; }
124 double theta = 90.*CLHEP::deg;
128 for (
int i=0;
i<
n;
i++) {
132 double phiy = phix + 90.*CLHEP::deg;
133 double phideg = phix/CLHEP::deg;
138 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new rotation: " << phiRotstr
139 <<
"\t90., " << phix/CLHEP::deg
140 <<
", 90.," << phiy/CLHEP::deg
144 phiRotMatrix = *phiRot.
matrix();
150 globalRotstr +=
"ZPlus";
151 if (
isFlipped) { globalRotstr +=
"Flip"; }
154 globalRotstr +=
"ZMinus";
155 if (
isFlipped) { globalRotstr +=
"Flip"; }
159 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test: Creating a new "
160 <<
"rotation: " << globalRotstr;
161 globalRotMatrix = phiRotMatrix * tiltMatrix;
167 double ypos =
radius*
sin(phi) + center[1];
168 double zpos = center[2];
173 LogDebug(
"TrackerGeom") <<
"DDTrackerRingAlgo test " <<
child <<
" number "
174 << copy <<
" positioned in " << mother <<
" at "
175 << tran <<
" with " << globalRot;
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.
std::string dbl_to_string(const double &in)
Converts only the integer part of a double to a string.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
DDRotationMatrix * matrix()
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const std::string & name() const
Returns the name.
std::vector< double > center