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

#include <MMSpacer.h>

Inheritance diagram for MuonGM::MMSpacer:
Collaboration diagram for MuonGM::MMSpacer:

Public Member Functions

 MMSpacer (const MYSQL &mysql, Component *s)
 
GeoPhysVol * build (StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo)
 
GeoPhysVol * build (StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo, int cutoutson, const std::vector< Cutout * > &)
 
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.}
 
int index {0}
 
std::string name {}
 
std::string logVolName {}
 

Private Attributes

MMSpacerComponentm_component {nullptr}
 

Detailed Description

Definition at line 21 of file MMSpacer.h.

Constructor & Destructor Documentation

◆ MMSpacer()

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

Definition at line 30 of file MMSpacer.cxx.

30  : DetectorElement(ss->name) {
31  MMSpacerComponent *s = dynamic_cast<MMSpacerComponent*>(ss);
32  m_component = s;
33  width = s->dx1;
34  longWidth = s->dx2;
35  length = s->dy;
36  name = s->name;
37  thickness = s->GetThickness(mysql);
38  index = s->index;
39  }

Member Function Documentation

◆ build() [1/2]

GeoPhysVol * MuonGM::MMSpacer::build ( StoredMaterialManager matManager,
const MYSQL mysql,
int  minimalgeo 
)

Definition at line 41 of file MMSpacer.cxx.

43  {
44  std::vector<Cutout *> vcutdef;
45  int cutoutson = 0;
46  return build(matManager, mysql, minimalgeo, cutoutson, vcutdef);
47  }

◆ build() [2/2]

GeoPhysVol * MuonGM::MMSpacer::build ( StoredMaterialManager matManager,
const MYSQL mysql,
int  minimalgeo,
int  cutoutson,
const std::vector< Cutout * > &   
)

Definition at line 49 of file MMSpacer.cxx.

52  {
53 
54  const MMSpacer_Technology *t = dynamic_cast<const MMSpacer_Technology*>(mysql.GetTechnology(name));
55  thickness = t->Thickness();
56 
57  // Build Micromegas mother volume out of G10
58  // std::cout<<"creating spacer "<<thickness<<" "<<width<<" "<<longWidth<<" "<<length<<std::endl;
59  const GeoShape *strd = new GeoTrd(thickness / 2, thickness / 2, width / 2, longWidth / 2, length / 2);
60 
61  if (t->lowZCutOuts) {
62  double dy = t->lowZCutOutWidth;
63  double dz = t->lowZCutOutDZ;
64  const GeoShape *sbox = new GeoTrd(thickness, thickness, dy, dy, dz);
65  GeoTrf::Translate3D cut1(0.0, -width / 2., -length / 2.);
66  GeoTrf::Translate3D cut2(0.0, width / 2., -length / 2.);
67  strd = &(strd->subtract((*sbox) << cut1));
68  strd = &(strd->subtract((*sbox) << cut2));
69  }
70 
71  if (t->highZCutOuts) {
72  double dy = t->highZCutOutWidth;
73  double dz = t->highZCutOutDZ;
74  const GeoShape *sbox = new GeoTrd(thickness, thickness, dy, dy, dz);
75  GeoTrf::Translate3D cut1(0.0, -longWidth / 2., length / 2.);
76  GeoTrf::Translate3D cut2(0.0, longWidth / 2., length / 2.);
77  strd = &(strd->subtract((*sbox) << cut1));
78  strd = &(strd->subtract((*sbox) << cut2));
79  }
80 
81  const GeoMaterial *mtrd = matManager.getMaterial("muo::Honeycomb");
82  GeoLogVol *ltrd = new GeoLogVol(logVolName, strd, mtrd);
83  GeoPhysVol *ptrd = new GeoPhysVol(ltrd);
84 
85  if (minimalgeo == 1)
86  return ptrd;
87 
88  return ptrd;
89  }

◆ print()

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

Implements MuonGM::DetectorElement.

Definition at line 91 of file MMSpacer.cxx.

91  {
92  MsgStream log(Athena::getMessageSvc(), "MuonGM::MMSpacer");
93  log << MSG::INFO << " MMSpacer " << name << " :" << endmsg;
94  }

◆ setLogVolName()

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

Definition at line 22 of file DetectorElement.h.

22 { logVolName = str; }

Member Data Documentation

◆ index

int MuonGM::MMSpacer::index {0}

Definition at line 28 of file MMSpacer.h.

◆ length

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

Definition at line 25 of file MMSpacer.h.

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

◆ longWidth

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

Definition at line 27 of file MMSpacer.h.

◆ m_component

MMSpacerComponent* MuonGM::MMSpacer::m_component {nullptr}
private

Definition at line 41 of file MMSpacer.h.

◆ name

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

Definition at line 17 of file DetectorElement.h.

◆ thickness

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

Definition at line 26 of file MMSpacer.h.

◆ width

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

Definition at line 24 of file MMSpacer.h.


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
index
Definition: index.py:1
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonGM::MMSpacer::thickness
double thickness
Definition: MMSpacer.h:26
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonGM::MMSpacer::m_component
MMSpacerComponent * m_component
Definition: MMSpacer.h:41
MuonGM::MMSpacer::width
double width
Definition: MMSpacer.h:24
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
PlotCalibFromCool.cut1
cut1
Definition: PlotCalibFromCool.py:709
MuonGM::MMSpacer::build
GeoPhysVol * build(StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo)
Definition: MMSpacer.cxx:41
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::MMSpacer::longWidth
double longWidth
Definition: MMSpacer.h:27
MuonGM::MMSpacer::length
double length
Definition: MMSpacer.h:25
MuonGM::DetectorElement::DetectorElement
DetectorElement(const std::string &n)
Definition: DetectorElement.h:20