ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
MuonGM::Spacer Class Reference

#include <Spacer.h>

Inheritance diagram for MuonGM::Spacer:
Collaboration diagram for MuonGM::Spacer:

Public Member Functions

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

Public Attributes

double width {0.}
 
double length {0.}
 
double thickness {0.}
 
double longWidth {0.}
 
std::string name {}
 
std::string logVolName {}
 

Private Attributes

SpaComponent m_component {}
 

Detailed Description

Definition at line 16 of file MuonSpectrometer/MuonDetDescr/MuonGeoModel/MuonGeoModel/Spacer.h.

Constructor & Destructor Documentation

◆ Spacer()

MuonGM::Spacer::Spacer ( const MYSQL mysql,
Component s 
)

Definition at line 34 of file MuonSpectrometer/MuonDetDescr/MuonGeoModel/src/Spacer.cxx.

34  : DetectorElement(ss->name) {
35  SpaComponent *s = dynamic_cast<SpaComponent *>(ss);
36  width = s->dx1;
37  longWidth = s->dx2;
38  thickness = mysql.GetTechnology(s->name)->thickness;
39  length = s->dy;
40  m_component = *s;
41  }

Member Function Documentation

◆ build() [1/2]

GeoVPhysVol * MuonGM::Spacer::build ( StoredMaterialManager matManager)

Definition at line 43 of file MuonSpectrometer/MuonDetDescr/MuonGeoModel/src/Spacer.cxx.

43  {
44  int cutoutson = 0;
45  return build(matManager, cutoutson);
46  }

◆ build() [2/2]

GeoVPhysVol * MuonGM::Spacer::build ( StoredMaterialManager matManager,
int  cutoutson 
)

Definition at line 48 of file MuonSpectrometer/MuonDetDescr/MuonGeoModel/src/Spacer.cxx.

48  {
49  if (name == "SPA06" || name == "SPA01") {
50  double excent = m_component.excent;
51  double maxwLength = m_component.maxwdy;
52 
53  const GeoShape *strd = new GeoTrd(thickness / 2., thickness / 2., width / 2., longWidth / 2., maxwLength / 2.);
54  double upWidth = 0.;
55  if (excent > length)
56  upWidth = longWidth * (excent - length) / (excent - maxwLength);
57 
58  if (excent > length && (length - maxwLength) > 0) {
59  // std::cout<<" Here is an exagonal SPA ***** named "<<name<<" excent = "
60  // <<excent<<" length = "<<length<<std::endl;
61  GeoTrd *upTrd = new GeoTrd(thickness / 2., thickness / 2., longWidth / 2., upWidth / 2., (length - maxwLength) / 2.);
62  strd = &((strd->add((*upTrd) << GeoTrf::TranslateZ3D(length / 2.))) << GeoTrf::TranslateZ3D((maxwLength - length) / 2.));
63  }
64 
65  const GeoMaterial *mtrd = matManager.getMaterial("std::Aluminium");
66  const GeoLogVol *lspa = new GeoLogVol("CSCspacer", strd, mtrd);
67  GeoPhysVol *pspa = new GeoPhysVol(lspa);
68  return pspa;
69 
70  } else {
71  const GeoShape *strd = new GeoTrd(thickness / 2, thickness / 2, width / 2, longWidth / 2, length / 2);
72  const GeoMaterial *mtrd = matManager.getMaterial("std::Air");
73  GeoLogVol *ltrd = new GeoLogVol("Spacer", strd, mtrd);
74  GeoPhysVol *ptrd = new GeoPhysVol(ltrd);
75 
76  double tckibeam = thickness / 5.;
77  double dx = tckibeam;
78  double dy = 3. * tckibeam;
79 
80  GeoVPhysVol *ptrdtemp = nullptr;
81 
82  GeoTrd *strd1 = new GeoTrd(dx / 2, dx / 2, dy / 2, dy / 2, length / 2);
83  const GeoMaterial *mtrd1 = matManager.getMaterial("std::Aluminium");
84  GeoLogVol *ltrd1 = new GeoLogVol("ibeam1", strd1, mtrd1);
85  GeoPhysVol *ptrd1 = new GeoPhysVol(ltrd1);
86 
87  GeoTrd *strd2 = new GeoTrd(dy / 2, dy / 2, dx / 2, dx / 2, length / 2);
88  const GeoMaterial *mtrd2 = matManager.getMaterial("std::Aluminium");
89  GeoLogVol *ltrd2 = new GeoLogVol("ibeam2", strd2, mtrd2);
90  GeoPhysVol *ptrd2 = new GeoPhysVol(ltrd2);
91 
92  GeoSerialDenominator *sd = new GeoSerialDenominator(name + " ibeam");
93  if (!skip_spacer) {
94  ptrd->add(sd);
95  ptrd->add(new GeoSerialIdentifier(0));
96  }
97 
98  double newpos = -thickness / 2.;
99  double wherepos = newpos;
100  double wherewidth = -width / 2.;
101  for (int j = 0; j < 3; j++) {
102  for (int i = 0; i < 3; i++) {
103  ptrdtemp = ptrd1;
104  if (i == 1) {
105  ptrdtemp = ptrd2;
106  tckibeam = dy;
107  }
108  GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(wherepos + tckibeam / 2, wherewidth + dy / 2, 0));
109  if (!skip_spacer) {
110  ptrd->add(xf);
111  ptrd->add(ptrdtemp);
112  }
113  wherepos += tckibeam;
114  tckibeam = dx;
115  }
116  wherepos -= thickness;
117  wherewidth += (width / 2. - dy / 2.);
118  }
119 
120  double vtubl = (width - 5 * tckibeam) / 2.;
121 
122  GeoSerialDenominator *ntube = new GeoSerialDenominator(name + " vbeam");
123  if (!skip_spacer) {
124  ptrd->add(ntube);
125  ptrd->add(new GeoSerialIdentifier(0));
126  }
127 
128  for (int k1 = 0; k1 < 2; k1++) {
129  for (int k = 0; k < 2; k++) {
130  GeoTransform *ttube = new GeoTransform(GeoTrf::RotateX3D(-90 * Gaudi::Units::deg) *
131  GeoTrf::Translate3D(0., -(vtubl + tckibeam) / 2. - (k - 1) * (vtubl + tckibeam), -length / 4. - (k1 - 1) * length / 2));
132  if (!skip_spacer)
133  ptrd->add(ttube);
134  }
135  }
136 
137  return ptrd;
138  }
139  }

◆ print()

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

Implements MuonGM::DetectorElement.

Definition at line 141 of file MuonSpectrometer/MuonDetDescr/MuonGeoModel/src/Spacer.cxx.

141  {
142  MsgStream log(Athena::getMessageSvc(), "MuGM:MuonChamber:Spacer");
143  log << MSG::INFO << "Spacer " << name << " :" << endmsg;
144  }

◆ setLogVolName()

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

Definition at line 22 of file DetectorElement.h.

22 { logVolName = str; }

Member Data Documentation

◆ length

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

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

◆ longWidth

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

◆ m_component

SpaComponent MuonGM::Spacer::m_component {}
private

◆ name

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

Definition at line 17 of file DetectorElement.h.

◆ thickness

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

◆ width

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

The documentation for this class was generated from the following files:
MuonGM::DetectorElement::name
std::string name
Definition: DetectorElement.h:17
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
MuonGM::Spacer::width
double width
Definition: MuonSpectrometer/MuonDetDescr/MuonGeoModel/MuonGeoModel/Spacer.h:19
MuonGM::SpaComponent::maxwdy
double maxwdy
Definition: SpaComponent.h:14
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonGM::Spacer::longWidth
double longWidth
Definition: MuonSpectrometer/MuonDetDescr/MuonGeoModel/MuonGeoModel/Spacer.h:22
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
python.selector.AtlRunQuerySelectorLhcOlc.sd
sd
Definition: AtlRunQuerySelectorLhcOlc.py:612
skip_spacer
#define skip_spacer
Definition: MuonSpectrometer/MuonDetDescr/MuonGeoModel/src/Spacer.cxx:30
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonGM::Spacer::build
GeoVPhysVol * build(StoredMaterialManager &matManager)
Definition: MuonSpectrometer/MuonDetDescr/MuonGeoModel/src/Spacer.cxx:43
MuonGM::StandardComponent::excent
double excent
Definition: StandardComponent.h:25
MuonGM::Spacer::m_component
SpaComponent m_component
Definition: MuonSpectrometer/MuonDetDescr/MuonGeoModel/MuonGeoModel/Spacer.h:30
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
MuonGM::DetectorElement::logVolName
std::string logVolName
Definition: DetectorElement.h:18
MuonGM::Spacer::length
double length
Definition: MuonSpectrometer/MuonDetDescr/MuonGeoModel/MuonGeoModel/Spacer.h:20
MuonGM::Spacer::thickness
double thickness
Definition: MuonSpectrometer/MuonDetDescr/MuonGeoModel/MuonGeoModel/Spacer.h:21
MuonGM::DetectorElement::DetectorElement
DetectorElement(const std::string &n)
Definition: DetectorElement.h:20
fitman.k
k
Definition: fitman.py:528