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

#include <SpacerBeam.h>

Inheritance diagram for MuonGM::SpacerBeam:
Collaboration diagram for MuonGM::SpacerBeam:

Public Member Functions

 SpacerBeam (const MYSQL &mysql, Component *s)
GeoVPhysVol * build (StoredMaterialManager &matManager, bool)
GeoVPhysVol * build (StoredMaterialManager &matManager, int cutoutson, bool)
virtual void print () const override
void setLogVolName (const std::string &str)

Public Attributes

double width {0.}
double length {0.}
double thickness {0.}
double lowerThickness {0.}
double longWidth {0.}
double height {0.}
double largeness {0.}
double excent {0.}
std::string name {}
std::string logVolName {}

Private Attributes

StandardComponent m_component {}
double m_cy {0.}
double m_hole_pos1 {0.}
double m_hole_pos2 {0.}
double m_lb_height {0.}
double m_lb_width {0.}
double m_cross_excent {0.}

Detailed Description

Definition at line 16 of file SpacerBeam.h.

Constructor & Destructor Documentation

◆ SpacerBeam()

MuonGM::SpacerBeam::SpacerBeam ( const MYSQL & mysql,
Component * s )

Definition at line 28 of file SpacerBeam.cxx.

29 : DetectorElement(ss->name) {
30 StandardComponent *s = static_cast<StandardComponent *>(ss);
31 std::string_view componentType = std::string_view(s->name).substr(0, 3);
32
33 double tol = 1.e-4;
34
35 width = s->dx1;
36 longWidth = s->dx2;
37 length = s->dy - tol;
38 excent = s->excent;
39
40 m_cy = s->posy;
41 if (componentType == "CRO" || componentType == "CMI" || componentType == "CHV") {
42 CbmComponent *ccbm = static_cast<CbmComponent *>(s);
43 m_hole_pos1 = ccbm->hole_pos1 - length / 2. - m_cy - tol / 2.;
44 m_hole_pos2 = ccbm->hole_pos2 - length / 2. - m_cy - tol / 2.;
45 m_lb_height = ccbm->lb_height;
46 m_lb_width = ccbm->lb_width;
47 }
48
49 lowerThickness = 0.;
50
51 if (componentType == "CHV") {
52 const CHV *ch = dynamic_cast<const CHV*>(mysql.GetTechnology(s->name));
53 thickness = ch->thickness;
54 largeness = ch->largeness;
55 height = ch->height - tol;
56
57 } else if (componentType == "CRO") {
58 const CRO *cr = dynamic_cast<const CRO*>(mysql.GetTechnology(s->name));
59 thickness = cr->thickness;
60 largeness = cr->largeness;
61 height = cr->height - tol;
62
63 } else if (componentType == "CMI") {
64 const CMI *cn = dynamic_cast<const CMI*>(mysql.GetTechnology(s->name));
65 thickness = cn->thickness;
66 largeness = cn->largeness;
67 height = cn->height - tol;
68
69 } else if (componentType.substr(0, 2) == "LB") {
70 const LBI *lb = dynamic_cast<const LBI*>(mysql.GetTechnology(s->name));
71 thickness = lb->thickness;
72 lowerThickness = lb->lowerThickness;
74 height = lb->height;
75 m_cross_excent = 0; // Place holder
76 }
77 }
Technology * GetTechnology(const std::string &name)
Definition MYSQL.cxx:105
DetectorElement(const std::string &n)
int lb
Definition globals.cxx:23

Member Function Documentation

◆ build() [1/2]

GeoVPhysVol * MuonGM::SpacerBeam::build ( StoredMaterialManager & matManager,
bool is_barrel )

Definition at line 79 of file SpacerBeam.cxx.

80 {
81 int cutoutson = 0;
82 return build(matManager, cutoutson, is_barrel);
83 }
GeoVPhysVol * build(StoredMaterialManager &matManager, bool)

◆ build() [2/2]

GeoVPhysVol * MuonGM::SpacerBeam::build ( StoredMaterialManager & matManager,
int cutoutson,
bool is_barrel )

Definition at line 85 of file SpacerBeam.cxx.

86 {
87 GeoPhysVol *pvol = nullptr;
88 GeoLogVol *lvol = nullptr;
89 const GeoMaterial *mat = matManager.getMaterial("std::Aluminium");
90 if (name.compare(0, 3, "CHV") == 0 || name.compare(0, 3, "CRO") == 0 || name.compare(0, 3, "CMI") == 0) {
91 double sinexc = 0.;
92 double cosexc = 1.;
93 double volumelargeness = largeness;
94 if ((name.compare(0, 3, "CHV") == 0 || name.compare(0, 3, "CRO") == 0) && !is_barrel) {
95 double ltemp = std::sqrt(length * length + excent * excent);
96 sinexc = std::abs(excent) / ltemp;
97 cosexc = length / ltemp;
98 length = ltemp - largeness * std::abs(excent) / length;
99 }
100
101 if (thickness > 0.) {
102 // I-beam shape
103 volumelargeness = largeness;
104 const GeoShape *IBeamShape = new GeoBox(height / 2, volumelargeness / 2, length / 2);
105 GeoBox *sideBox = new GeoBox(height / 2. - thickness, volumelargeness / 4., length / 2 + 1.);
106 double yshift = volumelargeness / 4. + thickness / 2.;
107 IBeamShape = &(IBeamShape->subtract((*sideBox) << GeoTrf::TranslateY3D(yshift)));
108 IBeamShape = &(IBeamShape->subtract((*sideBox) << GeoTrf::TranslateY3D(-yshift)));
109
110 // Cut holes for LB
111 GeoBox *holeBox = new GeoBox(m_lb_height / 2. + 1., thickness / 2. + 1., m_lb_width / cosexc / 2. + thickness * sinexc / cosexc + 6.);
112 IBeamShape = &(IBeamShape->subtract((*holeBox) << GeoTrf::TranslateZ3D(m_hole_pos1 / cosexc)));
113 IBeamShape = &(IBeamShape->subtract((*holeBox) << GeoTrf::TranslateZ3D(m_hole_pos2 / cosexc)));
114 lvol = new GeoLogVol(name, IBeamShape, mat);
115 pvol = new GeoPhysVol(lvol);
116
117 } else {
118 // Box shape
119
120 volumelargeness = width;
121 const GeoBox *Cbox = new GeoBox(height / 2, volumelargeness / 2, length / 2);
122 lvol = new GeoLogVol(name, Cbox, mat);
123 pvol = new GeoPhysVol(lvol);
124 }
125 return pvol;
126
127 } else if (name.compare(0, 2, "LB") == 0) {
128 const GeoShape *LBbox = new GeoBox(height / 2., (width - length / 4.) / 2., length / 2.);
129 // (width - length/4) is temporary until excent parameter is put into LbiComponent
130 GeoBox *innerBox = new GeoBox(height / 2. - thickness, width / 2. + 1., length / 2. - lowerThickness);
131 LBbox = &(LBbox->subtract((*innerBox)));
132 lvol = new GeoLogVol(name, LBbox, mat);
133 pvol = new GeoPhysVol(lvol);
134 return pvol;
135
136 } else {
137 return nullptr;
138 }
139 }
virtual const GeoMaterial * getMaterial(const std::string &name)=0

◆ print()

void MuonGM::SpacerBeam::print ( ) const
overridevirtual

Implements MuonGM::DetectorElement.

Definition at line 141 of file SpacerBeam.cxx.

141 {
142 MsgStream log(Athena::getMessageSvc(), "MuGM::SpacerBeam");
143 log << MSG::INFO << " SpacerBeam " << name << " :" << endmsg;
144 }
#define endmsg
IMessageSvc * getMessageSvc(bool quiet=false)

◆ setLogVolName()

void MuonGM::DetectorElement::setLogVolName ( const std::string & str)
inlineinherited

Member Data Documentation

◆ excent

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

Definition at line 32 of file SpacerBeam.h.

32{0.}; // angle of beams in trapezoidal chambers

◆ height

double MuonGM::SpacerBeam::height {0.}

Definition at line 30 of file SpacerBeam.h.

30{0.}; // web of I-beam (or height of box)

◆ largeness

double MuonGM::SpacerBeam::largeness {0.}

Definition at line 31 of file SpacerBeam.h.

31{0.}; // flange width of I-beam (CHV, CRO, CMI)

◆ length

double MuonGM::SpacerBeam::length {0.}

Definition at line 26 of file SpacerBeam.h.

26{0.};

◆ logVolName

std::string MuonGM::DetectorElement::logVolName {}
inherited

Definition at line 18 of file DetectorElement.h.

18{};

◆ longWidth

double MuonGM::SpacerBeam::longWidth {0.}

Definition at line 29 of file SpacerBeam.h.

29{0.}; // for trapezoidal layers

◆ lowerThickness

double MuonGM::SpacerBeam::lowerThickness {0.}

Definition at line 28 of file SpacerBeam.h.

28{0.};

◆ m_component

StandardComponent MuonGM::SpacerBeam::m_component {}
private

Definition at line 35 of file SpacerBeam.h.

35{};

◆ m_cross_excent

double MuonGM::SpacerBeam::m_cross_excent {0.}
private

Definition at line 41 of file SpacerBeam.h.

41{0.}; // angle of cross beams needed by LB

◆ m_cy

double MuonGM::SpacerBeam::m_cy {0.}
private

Definition at line 36 of file SpacerBeam.h.

36{0.}; // y coordinate (parallel to tube length) of component

◆ m_hole_pos1

double MuonGM::SpacerBeam::m_hole_pos1 {0.}
private

Definition at line 37 of file SpacerBeam.h.

37{0.}; // Location of 1st LB hole in cross beam

◆ m_hole_pos2

double MuonGM::SpacerBeam::m_hole_pos2 {0.}
private

Definition at line 38 of file SpacerBeam.h.

38{0.}; // Location of 2nd LB hole in cross beam

◆ m_lb_height

double MuonGM::SpacerBeam::m_lb_height {0.}
private

Definition at line 39 of file SpacerBeam.h.

39{0.}; // Height of LB hole

◆ m_lb_width

double MuonGM::SpacerBeam::m_lb_width {0.}
private

Definition at line 40 of file SpacerBeam.h.

40{0.}; // Width of LB hole

◆ name

std::string MuonGM::DetectorElement::name {}
inherited

Definition at line 17 of file DetectorElement.h.

17{};

◆ thickness

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

Definition at line 27 of file SpacerBeam.h.

27{0.};

◆ width

double MuonGM::SpacerBeam::width {0.}

Definition at line 25 of file SpacerBeam.h.

25{0.};

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