ATLAS Offline Software
Public Member Functions | Public Attributes | Friends | List of all members
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  }

◆ setThickness()

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

Definition at line 19 of file Cutout.cxx.

19 { thickness = compThickness; }

Friends And Related Function Documentation

◆ 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.

◆ dx

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

Definition at line 23 of file Cutout.h.

◆ dy

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

Definition at line 24 of file Cutout.h.

◆ excent

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

Definition at line 28 of file Cutout.h.

◆ icut

int MuonGM::Cutout::icut {0}

Definition at line 22 of file Cutout.h.

◆ ijob

int MuonGM::Cutout::ijob {0}

Definition at line 20 of file Cutout.h.

◆ lengthY

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

Definition at line 27 of file Cutout.h.

◆ subtype

int MuonGM::Cutout::subtype {0}

Definition at line 21 of file Cutout.h.

◆ thickness

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

Definition at line 30 of file Cutout.h.

◆ widthXl

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

Definition at line 26 of file Cutout.h.

◆ widthXs

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

Definition at line 25 of file Cutout.h.


The documentation for this class was generated from the following files:
MuonGM::Cutout::widthXl
double widthXl
Definition: Cutout.h:26
MuonGM::Cutout::dx
double dx
Definition: Cutout.h:23
MuonGM::Cutout::excent
double excent
Definition: Cutout.h:28
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGM::Cutout::dy
double dy
Definition: Cutout.h:24
jobOption.theta
theta
Definition: jobOption.ParticleGun_fwd_sequence.py:13
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
MuonGM::Cutout::widthXs
double widthXs
Definition: Cutout.h:25
MuonGM::Cutout::dead1
double dead1
Definition: Cutout.h:29
MuonGM::Cutout::lengthY
double lengthY
Definition: Cutout.h:27
MuonGM::Cutout::thickness
double thickness
Definition: Cutout.h:30
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106