18 #include "CLHEP/Units/GlobalSystemOfUnits.h"
56 double mdx = mtrd.
x1();
70 std::string
s =
"ERROR - DDDividedTrdX::makeDDTranslation()";
71 s +=
"\n Axis is along ";
74 s +=
"DDDividedTrdX::makeDDTranslation()";
75 s +=
" IllegalConstruct: Only axes along x are allowed !";
94 double pDy1 = mtrd.
y1();
95 double pDy2 = mtrd.
y2();
96 double pDz = mtrd.
halfZ();
105 if (!dsol.isDefined().second)
121 DCOUT_V (
'P',
"DDDividedTrdX::makeDDLogicalPart lp = " << ddlp);
132 double mpDx1 = mtrd.
x1();
133 double mpDx2 = mtrd.
x2();
134 double mpDx3 = mtrd.
x3();
135 double mpDx4 = mtrd.
x4();
136 double mpTheta = mtrd.
theta();
137 double mpPhi = mtrd.
phi();
138 double mpAlpha1 = mtrd.
alpha1();
139 double mpAlpha2 = mtrd.
alpha2();
148 std::string
s =
"ERROR - DDDividedTrdX::checkParametersValidity()";
149 s+=
"\n Making a division of a TRD along axis X,";
150 s+=
"\n while the X half lengths are not equal,";
151 s+=
"\n is not (yet) supported. It will result";
152 s+=
"\n in non-equal division solids.";
166 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
168 std::string
s =
"ERROR - DDDividedTrdX::checkParametersValidity()";
169 s+=
"\n Making a division of a TRD along axis X,";
170 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
171 s+=
"\n is not (yet) supported. It will result";
172 s+=
"\n in non-equal division solids.";
203 return 2 * mtrd.
y1();
210 double mdy = mtrd.
y1();
223 std::string
s =
"ERROR - DDDividedTrdY::makeDDTranslation()";
224 s +=
"\n Axis is along ";
227 s +=
"DDDividedTrdY::makeDDTranslation()";
228 s +=
" IllegalConstruct: Only axes along y are allowed !";
248 double pDx1 = mtrd.
x1();
249 double pDx2 = mtrd.
x2();
250 double pDx3 = mtrd.
x3();
251 double pDx4 = mtrd.
x4();
252 double pDz = mtrd.
halfZ();
259 if (!dsol.isDefined().second)
275 DCOUT_V (
'P',
"DDDividedTrdY::makeDDLogicalPart lp = " << ddlp);
286 double mpDy1 = mtrd.
y1();
287 double mpDy2 = mtrd.
y2();
288 double mpTheta = mtrd.
theta();
289 double mpPhi = mtrd.
phi();
290 double mpAlpha1 = mtrd.
alpha1();
291 double mpAlpha2 = mtrd.
alpha2();
295 std::string
s=
"ERROR - DDDividedTrdY::checkParametersValidity()";
296 s +=
"\n Making a division of a TRD along axis Y while";
297 s +=
"\n the Y half lengths are not equal is not (yet)";
298 s +=
"\n supported. It will result in non-equal";
299 s +=
"\n division solids.";
304 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
306 std::string
s =
"ERROR - DDDividedTrdY::checkParametersValidity()";
307 s+=
"\n Making a division of a TRD along axis X,";
308 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
309 s+=
"\n is not (yet) supported. It will result";
310 s+=
"\n in non-equal division solids.";
340 return 2 * mtrd.
halfZ();
347 double mdz = mtrd.
halfZ();
360 std::string
s =
"ERROR - DDDividedTrdZ::makeDDTranslation()";
361 s +=
"\n Axis is along ";
364 s +=
"DDDividedTrdY::makeDDTranslation()";
365 s +=
" IllegalConstruct: Only axes along z are allowed !";
385 double pDx1 = mtrd.
x1();
387 double DDx = (mtrd.
x2() - mtrd.
x1() );
388 double pDy1 = mtrd.
y1();
390 double DDy = (mtrd.
y2() - mtrd.
y1() );
392 double zLength = 2*mtrd.
halfZ();
418 DCOUT_V (
'P',
"DDDividedTrdZ::makeDDLogicalPart lp = " << ddlp);
429 double mpTheta = mtrd.
theta();
430 double mpPhi = mtrd.
phi();
431 double mpAlpha1 = mtrd.
alpha1();
432 double mpAlpha2 = mtrd.
alpha2();
436 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
438 std::string
s =
"ERROR - DDDividedTrdZ::checkParametersValidity()";
439 s+=
"\n Making a division of a TRD along axis X,";
440 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
441 s+=
"\n is not (yet) supported. It will result";
442 s+=
"\n in non-equal division solids.";
double halfZ() const
half of the z-Axis
double y2() const
Half-length along y of the face at +pDz.
virtual double getMaxParameter() const
const DDAxes axis() const
DDDividedTrdY(const DDDivision &div, DDCompactView *cpv)
const int nReplicas() const
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
double alpha1() 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 x2() const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
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.
int calculateNDiv(double motherDim, double width, double offset) const
An exception for DDD errors.
const std::string & ns() const
Returns the namespace.
virtual DDRotation makeDDRotation(const int copyNo) const
DDName is used to identify DDD entities uniquely.
double alpha2() 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 calculateWidth(double motherDim, int nDiv, double offset) const
virtual void checkParametersValidity()
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const
type of data representation of DDCompactView
const DDMaterial & material() const
Returns a reference object of the material this LogicalPart is made of.
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)
double phi() const
Azimuthal angle of the line joining the centres of the faces at -/+pDz.
DDDividedTrdZ(const DDDivision &div, DDCompactView *cpv)
DivisionType divisionType_
virtual DDTranslation makeDDTranslation(const int copyNo) const
double theta() const
Polar angle of the line joining the centres of the faces at -/+pDz.
Interface to a Trapezoid.
virtual DDRotation makeDDRotation(const int copyNo) const
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
virtual double getMaxParameter() const
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)
double y1() const
Half-length along y of the face at -pDz.
#define DCOUT_V(M_v_Y, M_v_S)
double x4() const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
const double width() const
virtual DDRotation makeDDRotation(const int copyNo) const
virtual double getMaxParameter() const
double x3() const
Half-length along x of the side at y=-pDy2 of the face at +pDz.
const DDSolid & solid() const
Returns a reference object of the solid being the shape of this LogicalPart.
const double offset() const
const DDLogicalPart & parent() const
virtual void checkParametersValidity()
virtual DDTranslation makeDDTranslation(const int copyNo) const
static const std::string name(const DDAxes &s)
virtual DDTranslation makeDDTranslation(const int copyNo) const
const std::string & name() const
Returns the name.
double x1() const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
virtual void checkParametersValidity()