ATLAS Offline Software
Loading...
Searching...
No Matches
MuonGM::Cutout Class Reference

#include <Cutout.h>

Collaboration diagram for MuonGM::Cutout:

Public Member Functions

 Cutout ()=default
void setThickness (double compThickness)
const GeoShape * build ()

Public Attributes

int ijob {0}
int subtype {0}
int icut {0}
double dx {0.}
double dy {0.}
double widthXs {0.}
double widthXl {0.}
double lengthY {0.}
double excent {0.}
double dead1 {0.}
double thickness {0.}

Friends

std::ostream & operator<< (std::ostream &os, const Cutout &p)

Detailed Description

Definition at line 14 of file Cutout.h.

Constructor & Destructor Documentation

◆ Cutout()

MuonGM::Cutout::Cutout ( )
default

Member Function Documentation

◆ build()

const GeoShape * MuonGM::Cutout::build ( )

Definition at line 21 of file Cutout.cxx.

21 {
22 // position it with its intrinsic position info:
23 double zpos = dy + lengthY / 2.;
24
25 GeoTrf::Transform3D xfTemp = GeoTrf::Translate3D(0., dx, zpos);
26 const GeoShape *sCutout;
27 /*
28 // This is just to make sure we are putting stuff in the right place:
29 GeoBox *cutoutbox = new GeoBox(thickness/2.,widthXl/2.,lengthY/2.);
30 sCutout = & ( (*cutoutbox) <<xfTemp);
31 */
32 // This is the proper way to do it, but not sure if complicated working...
33 if (widthXl == widthXs && dead1 == 0.) {
34 GeoIntrusivePtr<GeoBox> cutoutbox{new GeoBox(thickness / 2., widthXs / 2., lengthY / 2.)};
35 sCutout = &((*cutoutbox) << xfTemp);
36 } else if (dead1 == 0.) {
37 GeoTrd *cutouttrd = new GeoTrd(thickness / 2., thickness / 2., widthXs / 2., widthXl / 2., lengthY / 2.);
38 sCutout = &((*cutouttrd) << xfTemp);
39 } else if (widthXl == widthXs) {
40 // angle between length-axis and HV/RO ends of chamber:
41 double alpha = atan(2. * excent / lengthY);
42 // polar and azimuthal angles of vector describing offset of
43 // cutout planes:
44 double theta = -dead1 * Gaudi::Units::degree;
45 double phi = -90. * Gaudi::Units::degree;
46 // GeoPara requires the +/- z faces be parallel to the x-y plane,
47 // so choose x = width, y=length, z=thickness:
48 GeoIntrusivePtr<GeoPara> cutoutpara{new GeoPara(widthXs / 2., lengthY / 2., thickness / 2., alpha, theta, phi)};
49 // now rotate it so thickness is x-axis, width is y-axis, length z-axis:
50 GeoTrf::Transform3D xRot = GeoTrf::RotateX3D(-90. * Gaudi::Units::degree) * GeoTrf::RotateY3D(-90. * Gaudi::Units::degree);
51 xfTemp = xfTemp * xRot;
52 sCutout = &((*cutoutpara) << xfTemp);
53 } else {
54 GeoIntrusivePtr<GeoTrap> cutouttrap{
55 new GeoTrap(thickness / 2., dead1 * Gaudi::Units::degree, 90. * Gaudi::Units::degree, excent, widthXs / 2., widthXl / 2.,
56 atan((2. * excent + (widthXl - widthXs) / 2.) / lengthY), excent, widthXs / 2., widthXl / 2., atan((2. * excent + (widthXl - widthXs) / 2.) / lengthY))};
57
58 // now rotate it so thickness is x-axis, width is y-axis, length z-axis:
59 GeoTrf::Transform3D xRot = GeoTrf::RotateX3D(-90. * Gaudi::Units::degree) * GeoTrf::RotateY3D(-90. * Gaudi::Units::degree);
60 xfTemp = xfTemp * xRot;
61 sCutout = &((*cutouttrap) << xfTemp);
62 }
63
64 return sCutout;
65 }
Scalar phi() const
phi method
Scalar theta() const
theta method
double thickness
Definition Cutout.h:30
double widthXl
Definition Cutout.h:26
double dy
Definition Cutout.h:24
double dead1
Definition Cutout.h:29
double widthXs
Definition Cutout.h:25
double lengthY
Definition Cutout.h:27
double excent
Definition Cutout.h:28
double dx
Definition Cutout.h:23

◆ setThickness()

void MuonGM::Cutout::setThickness ( double compThickness)

Definition at line 19 of file Cutout.cxx.

19{ thickness = compThickness; }

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Cutout & p )
friend

Definition at line 67 of file Cutout.cxx.

67 {
68 os << " Cutout: "
69 << " x/y/width_s/width_l/length/excent/dead1: " << p.dx << " " << p.dy << " " << p.widthXs << " " << p.widthXl << " " << p.lengthY << " " << p.excent << " " << p.dead1
70 << " component index=" << p.ijob;
71
72 return os;
73 }

Member Data Documentation

◆ dead1

double MuonGM::Cutout::dead1 {0.}

Definition at line 29 of file Cutout.h.

29{0.};

◆ dx

double MuonGM::Cutout::dx {0.}

Definition at line 23 of file Cutout.h.

23{0.};

◆ dy

double MuonGM::Cutout::dy {0.}

Definition at line 24 of file Cutout.h.

24{0.};

◆ excent

double MuonGM::Cutout::excent {0.}

Definition at line 28 of file Cutout.h.

28{0.};

◆ icut

int MuonGM::Cutout::icut {0}

Definition at line 22 of file Cutout.h.

22{0};

◆ ijob

int MuonGM::Cutout::ijob {0}

Definition at line 20 of file Cutout.h.

20{0};

◆ lengthY

double MuonGM::Cutout::lengthY {0.}

Definition at line 27 of file Cutout.h.

27{0.};

◆ subtype

int MuonGM::Cutout::subtype {0}

Definition at line 21 of file Cutout.h.

21{0};

◆ thickness

double MuonGM::Cutout::thickness {0.}

Definition at line 30 of file Cutout.h.

30{0.};

◆ widthXl

double MuonGM::Cutout::widthXl {0.}

Definition at line 26 of file Cutout.h.

26{0.};

◆ widthXs

double MuonGM::Cutout::widthXs {0.}

Definition at line 25 of file Cutout.h.

25{0.};

The documentation for this class was generated from the following files: