8 #include "CLHEP/Units/GlobalSystemOfUnits.h" 9 #include "CLHEP/Units/SystemOfUnits.h" 50 double mdx = mtrd.
x1();
62 std::string s =
"ERROR - DDDividedTrdX::makeDDTranslation()";
63 s +=
"\n Axis is along ";
66 s +=
"DDDividedTrdX::makeDDTranslation()";
67 s +=
" IllegalConstruct: Only axes along x are allowed !";
86 double pDy1 = mtrd.
y1();
87 double pDy2 = mtrd.
y2();
88 double pDz = mtrd.
halfZ();
97 if (!dsol.isDefined().second)
123 double mpDx1 = mtrd.
x1();
124 double mpDx2 = mtrd.
x2();
125 double mpDx3 = mtrd.
x3();
126 double mpDx4 = mtrd.
x4();
127 double mpTheta = mtrd.
theta();
128 double mpPhi = mtrd.
phi();
129 double mpAlpha1 = mtrd.
alpha1();
130 double mpAlpha2 = mtrd.
alpha2();
139 std::string s =
"ERROR - DDDividedTrdX::checkParametersValidity()";
140 s+=
"\n Making a division of a TRD along axis X,";
141 s+=
"\n while the X half lengths are not equal,";
142 s+=
"\n is not (yet) supported. It will result";
143 s+=
"\n in non-equal division solids.";
157 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
159 std::string s =
"ERROR - DDDividedTrdX::checkParametersValidity()";
160 s+=
"\n Making a division of a TRD along axis X,";
161 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
162 s+=
"\n is not (yet) supported. It will result";
163 s+=
"\n in non-equal division solids.";
189 return 2 * mtrd.
y1();
196 double mdy = mtrd.
y1();
207 std::string s =
"ERROR - DDDividedTrdY::makeDDTranslation()";
208 s +=
"\n Axis is along ";
211 s +=
"DDDividedTrdY::makeDDTranslation()";
212 s +=
" IllegalConstruct: Only axes along y are allowed !";
232 double pDx1 = mtrd.
x1();
233 double pDx2 = mtrd.
x2();
234 double pDx3 = mtrd.
x3();
235 double pDx4 = mtrd.
x4();
236 double pDz = mtrd.
halfZ();
243 if (!dsol.isDefined().second)
269 double mpDy1 = mtrd.
y1();
270 double mpDy2 = mtrd.
y2();
271 double mpTheta = mtrd.
theta();
272 double mpPhi = mtrd.
phi();
273 double mpAlpha1 = mtrd.
alpha1();
274 double mpAlpha2 = mtrd.
alpha2();
278 std::string s=
"ERROR - DDDividedTrdY::checkParametersValidity()";
279 s +=
"\n Making a division of a TRD along axis Y while";
280 s +=
"\n the Y half lengths are not equal is not (yet)";
281 s +=
"\n supported. It will result in non-equal";
282 s +=
"\n division solids.";
287 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
289 std::string s =
"ERROR - DDDividedTrdY::checkParametersValidity()";
290 s+=
"\n Making a division of a TRD along axis X,";
291 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
292 s+=
"\n is not (yet) supported. It will result";
293 s+=
"\n in non-equal division solids.";
319 return 2 * mtrd.
halfZ();
326 double mdz = mtrd.
halfZ();
337 std::string s =
"ERROR - DDDividedTrdZ::makeDDTranslation()";
338 s +=
"\n Axis is along ";
341 s +=
"DDDividedTrdY::makeDDTranslation()";
342 s +=
" IllegalConstruct: Only axes along z are allowed !";
362 double pDx1 = mtrd.
x1();
364 double DDx = (mtrd.
x2() - mtrd.
x1() );
365 double pDy1 = mtrd.
y1();
367 double DDy = (mtrd.
y2() - mtrd.
y1() );
369 double zLength = 2*mtrd.
halfZ();
377 + std::to_string(copyNo),
405 double mpTheta = mtrd.
theta();
406 double mpPhi = mtrd.
phi();
407 double mpAlpha1 = mtrd.
alpha1();
408 double mpAlpha2 = mtrd.
alpha2();
412 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
414 std::string s =
"ERROR - DDDividedTrdZ::checkParametersValidity()";
415 s+=
"\n Making a division of a TRD along axis X,";
416 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
417 s+=
"\n is not (yet) supported. It will result";
418 s+=
"\n in non-equal division solids.";
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const override
virtual DDTranslation makeDDTranslation(const int copyNo) const override
virtual DDRotation makeDDRotation(const int copyNo) const override
double halfZ(void) const
half of the z-Axis
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const override
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.
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.
virtual double getMaxParameter() const override
int calculateNDiv(double motherDim, double width, double offset) const
virtual DDRotation makeDDRotation(const int copyNo) const override
const std::string & ns() const
Returns the namespace.
DDName is used to identify DDD entities uniquely.
double calculateWidth(double motherDim, int nDiv, double offset) 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 DDTranslation makeDDTranslation(const int copyNo) const override
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.
virtual void checkParametersValidity() override
DivisionType divisionType_
virtual DDRotation makeDDRotation(const int copyNo) const override
Interface to a Trapezoid.
double y1(void) const
Half-length along y of the face at -pDz.
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
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)
virtual DDLogicalPart makeDDLogicalPart(const int copyNo) const override
virtual double getMaxParameter() const override
virtual double getMaxParameter() const override
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...
virtual void checkParametersValidity() override
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
virtual void checkParametersValidity() override
double y2(void) const
Half-length along y of the face at +pDz.
virtual DDTranslation makeDDTranslation(const int copyNo) const override
const DDLogicalPart & parent() const
static const std::string name(const DDAxes &s)
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.