17 #include "CLHEP/Units/GlobalSystemOfUnits.h"
55 double mdx = mtrd.
x1();
69 std::string s =
"ERROR - DDDividedTrdX::makeDDTranslation()";
70 s +=
"\n Axis is along ";
73 s +=
"DDDividedTrdX::makeDDTranslation()";
74 s +=
" IllegalConstruct: Only axes along x are allowed !";
93 double pDy1 = mtrd.
y1();
94 double pDy2 = mtrd.
y2();
95 double pDz = mtrd.
halfZ();
104 if (!dsol.isDefined().second)
120 DCOUT_V (
'P',
"DDDividedTrdX::makeDDLogicalPart lp = " << ddlp);
131 double mpDx1 = mtrd.
x1();
132 double mpDx2 = mtrd.
x2();
133 double mpDx3 = mtrd.
x3();
134 double mpDx4 = mtrd.
x4();
135 double mpTheta = mtrd.
theta();
136 double mpPhi = mtrd.
phi();
137 double mpAlpha1 = mtrd.
alpha1();
138 double mpAlpha2 = mtrd.
alpha2();
147 std::string s =
"ERROR - DDDividedTrdX::checkParametersValidity()";
148 s+=
"\n Making a division of a TRD along axis X,";
149 s+=
"\n while the X half lengths are not equal,";
150 s+=
"\n is not (yet) supported. It will result";
151 s+=
"\n in non-equal division solids.";
165 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
167 std::string s =
"ERROR - DDDividedTrdX::checkParametersValidity()";
168 s+=
"\n Making a division of a TRD along axis X,";
169 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
170 s+=
"\n is not (yet) supported. It will result";
171 s+=
"\n in non-equal division solids.";
202 return 2 * mtrd.
y1();
209 double mdy = mtrd.
y1();
222 std::string s =
"ERROR - DDDividedTrdY::makeDDTranslation()";
223 s +=
"\n Axis is along ";
226 s +=
"DDDividedTrdY::makeDDTranslation()";
227 s +=
" IllegalConstruct: Only axes along y are allowed !";
247 double pDx1 = mtrd.
x1();
248 double pDx2 = mtrd.
x2();
249 double pDx3 = mtrd.
x3();
250 double pDx4 = mtrd.
x4();
251 double pDz = mtrd.
halfZ();
258 if (!dsol.isDefined().second)
274 DCOUT_V (
'P',
"DDDividedTrdY::makeDDLogicalPart lp = " << ddlp);
285 double mpDy1 = mtrd.
y1();
286 double mpDy2 = mtrd.
y2();
287 double mpTheta = mtrd.
theta();
288 double mpPhi = mtrd.
phi();
289 double mpAlpha1 = mtrd.
alpha1();
290 double mpAlpha2 = mtrd.
alpha2();
294 std::string s=
"ERROR - DDDividedTrdY::checkParametersValidity()";
295 s +=
"\n Making a division of a TRD along axis Y while";
296 s +=
"\n the Y half lengths are not equal is not (yet)";
297 s +=
"\n supported. It will result in non-equal";
298 s +=
"\n division solids.";
303 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
305 std::string s =
"ERROR - DDDividedTrdY::checkParametersValidity()";
306 s+=
"\n Making a division of a TRD along axis X,";
307 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
308 s+=
"\n is not (yet) supported. It will result";
309 s+=
"\n in non-equal division solids.";
339 return 2 * mtrd.
halfZ();
346 double mdz = mtrd.
halfZ();
359 std::string s =
"ERROR - DDDividedTrdZ::makeDDTranslation()";
360 s +=
"\n Axis is along ";
363 s +=
"DDDividedTrdY::makeDDTranslation()";
364 s +=
" IllegalConstruct: Only axes along z are allowed !";
384 double pDx1 = mtrd.
x1();
386 double DDx = (mtrd.
x2() - mtrd.
x1() );
387 double pDy1 = mtrd.
y1();
389 double DDy = (mtrd.
y2() - mtrd.
y1() );
391 double zLength = 2*mtrd.
halfZ();
417 DCOUT_V (
'P',
"DDDividedTrdZ::makeDDLogicalPart lp = " << ddlp);
428 double mpTheta = mtrd.
theta();
429 double mpPhi = mtrd.
phi();
430 double mpAlpha1 = mtrd.
alpha1();
431 double mpAlpha2 = mtrd.
alpha2();
435 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
437 std::string s =
"ERROR - DDDividedTrdZ::checkParametersValidity()";
438 s+=
"\n Making a division of a TRD along axis X,";
439 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
440 s+=
"\n is not (yet) supported. It will result";
441 s+=
"\n in non-equal division solids.";
double halfZ(void) const
half of the z-Axis
virtual double getMaxParameter() const
DDDividedTrdY(const DDDivision &div, DDCompactView *cpv)
double x1(void) const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
static std::string itostr(int i)
WARNING: abused by other classes in this system: yet another conversion from int to std::string...
DDMaterial is used to define and access material information.
double phi(void) const
Azimuthal angle of the line joining the centres of the faces at -/+pDz.
int calculateNDiv(double motherDim, double width, double offset) const
const std::string & ns() const
Returns the namespace.
virtual DDRotation makeDDRotation(const int copyNo) const
DDName is used to identify DDD entities uniquely.
double calculateWidth(double motherDim, int nDiv, double offset) const
virtual void checkParametersValidity()
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
type of data representation of DDCompactView
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
A DDSolid represents the shape of a part.
virtual void checkParametersValidity(void)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
DDDividedTrdX(const DDDivision &div, DDCompactView *cpv)
static const double tolerance(void)
DDDividedTrdZ(const DDDivision &div, DDCompactView *cpv)
double x4(void) const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
DivisionType divisionType_
virtual DDTranslation makeDDTranslation(const int copyNo) const
Interface to a Trapezoid.
double y1(void) const
Half-length along y of the face at -pDz.
virtual DDRotation makeDDRotation(const int copyNo) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
virtual double getMaxParameter() const
static const std::string name(const DDAxes &s)
virtual void setType(const std::string &type)
static DDSolid trap(const DDName &name, double pDz, double pTheta, double pPhi, double pDy1, double pDx1, double pDx2, double pAlp1, double pDy2, double pDx3, double pDx4, double pAlp2)
#define DCOUT_V(M_v_Y, M_v_S)
virtual DDRotation makeDDRotation(const int copyNo) const
virtual double getMaxParameter() const
double alpha1(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of t...
double alpha2(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy2 to the centre at y=+pDy2 of t...
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
double y2(void) const
Half-length along y of the face at +pDz.
const DDLogicalPart & parent() const
virtual void checkParametersValidity()
virtual DDTranslation makeDDTranslation(const int copyNo) const
virtual DDTranslation makeDDTranslation(const int copyNo) const
double theta(void) const
Polar angle of the line joining the centres of the faces at -/+pDz.
const std::string & name() const
Returns the name.
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
double x3(void) const
Half-length along x of the side at y=-pDy2 of the face at +pDz.
virtual void checkParametersValidity()