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

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  }

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

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

◆ setLogVolName()

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

Definition at line 22 of file DetectorElement.h.

22 { logVolName = str; }

Member Data Documentation

◆ excent

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

Definition at line 32 of file SpacerBeam.h.

◆ height

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

Definition at line 30 of file SpacerBeam.h.

◆ largeness

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

Definition at line 31 of file SpacerBeam.h.

◆ length

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

Definition at line 26 of file SpacerBeam.h.

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

◆ longWidth

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

Definition at line 29 of file SpacerBeam.h.

◆ lowerThickness

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

Definition at line 28 of file SpacerBeam.h.

◆ m_component

StandardComponent MuonGM::SpacerBeam::m_component {}
private

Definition at line 35 of file SpacerBeam.h.

◆ m_cross_excent

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

Definition at line 41 of file SpacerBeam.h.

◆ m_cy

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

Definition at line 36 of file SpacerBeam.h.

◆ m_hole_pos1

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

Definition at line 37 of file SpacerBeam.h.

◆ m_hole_pos2

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

Definition at line 38 of file SpacerBeam.h.

◆ m_lb_height

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

Definition at line 39 of file SpacerBeam.h.

◆ m_lb_width

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

Definition at line 40 of file SpacerBeam.h.

◆ name

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

Definition at line 17 of file DetectorElement.h.

◆ thickness

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

Definition at line 27 of file SpacerBeam.h.

◆ width

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

Definition at line 25 of file SpacerBeam.h.


The documentation for this class was generated from the following files:
MuonGM::DetectorElement::name
std::string name
Definition: DetectorElement.h:17
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
MuonGM::SpacerBeam::m_hole_pos1
double m_hole_pos1
Definition: SpacerBeam.h:37
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
MuonGM::SpacerBeam::largeness
double largeness
Definition: SpacerBeam.h:31
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
MuonGM::SpacerBeam::lowerThickness
double lowerThickness
Definition: SpacerBeam.h:28
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonGM::SpacerBeam::height
double height
Definition: SpacerBeam.h:30
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonGM::SpacerBeam::thickness
double thickness
Definition: SpacerBeam.h:27
MuonGM::SpacerBeam::m_hole_pos2
double m_hole_pos2
Definition: SpacerBeam.h:38
MuonGM::SpacerBeam::build
GeoVPhysVol * build(StoredMaterialManager &matManager, bool)
Definition: SpacerBeam.cxx:79
MuonGM::SpacerBeam::m_cy
double m_cy
Definition: SpacerBeam.h:36
MuonGM::SpacerBeam::m_lb_height
double m_lb_height
Definition: SpacerBeam.h:39
MuonGM::SpacerBeam::width
double width
Definition: SpacerBeam.h:25
MuonGM::SpacerBeam::m_cross_excent
double m_cross_excent
Definition: SpacerBeam.h:41
MuonGM::SpacerBeam::excent
double excent
Definition: SpacerBeam.h:32
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
MuonGM::SpacerBeam::m_lb_width
double m_lb_width
Definition: SpacerBeam.h:40
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
MuonGM::SpacerBeam::length
double length
Definition: SpacerBeam.h:26
MuonGM::DetectorElement::logVolName
std::string logVolName
Definition: DetectorElement.h:18
MuonGM::SpacerBeam::longWidth
double longWidth
Definition: SpacerBeam.h:29
MuonGM::DetectorElement::DetectorElement
DetectorElement(const std::string &n)
Definition: DetectorElement.h:20