2 #include "CLHEP/Units/GlobalSystemOfUnits.h" 3 #include "CLHEP/Units/SystemOfUnits.h" 49 double mdx = mtrd.
x1();
61 std::string s =
"ERROR - DDDividedTrdX::makeDDTranslation()";
62 s +=
"\n Axis is along ";
65 s +=
"DDDividedTrdX::makeDDTranslation()";
66 s +=
" IllegalConstruct: Only axes along x are allowed !";
85 double pDy1 = mtrd.
y1();
86 double pDy2 = mtrd.
y2();
87 double pDz = mtrd.
halfZ();
96 if (!dsol.isDefined().second)
122 double mpDx1 = mtrd.
x1();
123 double mpDx2 = mtrd.
x2();
124 double mpDx3 = mtrd.
x3();
125 double mpDx4 = mtrd.
x4();
126 double mpTheta = mtrd.
theta();
127 double mpPhi = mtrd.
phi();
128 double mpAlpha1 = mtrd.
alpha1();
129 double mpAlpha2 = mtrd.
alpha2();
138 std::string s =
"ERROR - DDDividedTrdX::checkParametersValidity()";
139 s+=
"\n Making a division of a TRD along axis X,";
140 s+=
"\n while the X half lengths are not equal,";
141 s+=
"\n is not (yet) supported. It will result";
142 s+=
"\n in non-equal division solids.";
156 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
158 std::string s =
"ERROR - DDDividedTrdX::checkParametersValidity()";
159 s+=
"\n Making a division of a TRD along axis X,";
160 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
161 s+=
"\n is not (yet) supported. It will result";
162 s+=
"\n in non-equal division solids.";
188 return 2 * mtrd.
y1();
195 double mdy = mtrd.
y1();
206 std::string s =
"ERROR - DDDividedTrdY::makeDDTranslation()";
207 s +=
"\n Axis is along ";
210 s +=
"DDDividedTrdY::makeDDTranslation()";
211 s +=
" IllegalConstruct: Only axes along y are allowed !";
231 double pDx1 = mtrd.
x1();
232 double pDx2 = mtrd.
x2();
233 double pDx3 = mtrd.
x3();
234 double pDx4 = mtrd.
x4();
235 double pDz = mtrd.
halfZ();
242 if (!dsol.isDefined().second)
268 double mpDy1 = mtrd.
y1();
269 double mpDy2 = mtrd.
y2();
270 double mpTheta = mtrd.
theta();
271 double mpPhi = mtrd.
phi();
272 double mpAlpha1 = mtrd.
alpha1();
273 double mpAlpha2 = mtrd.
alpha2();
277 std::string s=
"ERROR - DDDividedTrdY::checkParametersValidity()";
278 s +=
"\n Making a division of a TRD along axis Y while";
279 s +=
"\n the Y half lengths are not equal is not (yet)";
280 s +=
"\n supported. It will result in non-equal";
281 s +=
"\n division solids.";
286 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
288 std::string s =
"ERROR - DDDividedTrdY::checkParametersValidity()";
289 s+=
"\n Making a division of a TRD along axis X,";
290 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
291 s+=
"\n is not (yet) supported. It will result";
292 s+=
"\n in non-equal division solids.";
318 return 2 * mtrd.
halfZ();
325 double mdz = mtrd.
halfZ();
336 std::string s =
"ERROR - DDDividedTrdZ::makeDDTranslation()";
337 s +=
"\n Axis is along ";
340 s +=
"DDDividedTrdY::makeDDTranslation()";
341 s +=
" IllegalConstruct: Only axes along z are allowed !";
361 double pDx1 = mtrd.
x1();
363 double DDx = (mtrd.
x2() - mtrd.
x1() );
364 double pDy1 = mtrd.
y1();
366 double DDy = (mtrd.
y2() - mtrd.
y1() );
368 double zLength = 2*mtrd.
halfZ();
376 + std::to_string(copyNo),
404 double mpTheta = mtrd.
theta();
405 double mpPhi = mtrd.
phi();
406 double mpAlpha1 = mtrd.
alpha1();
407 double mpAlpha2 = mtrd.
alpha2();
411 if (mpAlpha1 != 0.*deg || mpAlpha2 != 0.*deg || mpTheta != 0.*deg || mpPhi != 0.*deg)
413 std::string s =
"ERROR - DDDividedTrdZ::checkParametersValidity()";
414 s+=
"\n Making a division of a TRD along axis X,";
415 s+=
"\n while the theta, phi and aplhpa2 are not zero,";
416 s+=
"\n is not (yet) supported. It will result";
417 s+=
"\n in non-equal division solids.";
double halfZ(void) const
half of the z-Axis
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.
DDRotation makeDDRotation(int copyNo) const override
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.
double getMaxParameter() const override
DDLogicalPart makeDDLogicalPart(int copyNo) const override
int calculateNDiv(double motherDim, double width, double offset) const
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
DDTranslation makeDDTranslation(int copyNo) const override
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
type of data representation of DDCompactView
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.
void checkParametersValidity() override
DivisionType divisionType_
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)
double getMaxParameter() const override
DDTranslation makeDDTranslation(int copyNo) const override
DDRotation makeDDRotation(int copyNo) const override
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...
DDLogicalPart makeDDLogicalPart(int copyNo) const override
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...
void checkParametersValidity() override
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
void checkParametersValidity() override
double y2(void) const
Half-length along y of the face at +pDz.
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.
DDTranslation makeDDTranslation(int copyNo) const override
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.
DDRotation makeDDRotation(int copyNo) const override
double x3(void) const
Half-length along x of the side at y=-pDy2 of the face at +pDz.
DDLogicalPart makeDDLogicalPart(int copyNo) const override