ATLAS Offline Software
Loading...
Searching...
No Matches
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 }
static Double_t ss
DetectorElement(const std::string &n)
double thickness
Definition MMSpacer.h:26
MMSpacerComponent * m_component
Definition MMSpacer.h:41
double longWidth
Definition MMSpacer.h:27

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 }
GeoPhysVol * build(StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo)
Definition MMSpacer.cxx:41

◆ 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 }
Technology * GetTechnology(const std::string &name)
Definition MYSQL.cxx:105
virtual const GeoMaterial * getMaterial(const std::string &name)=0

◆ 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 }
#define endmsg
IMessageSvc * getMessageSvc(bool quiet=false)

◆ setLogVolName()

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

Member Data Documentation

◆ index

int MuonGM::MMSpacer::index {0}

Definition at line 28 of file MMSpacer.h.

28{0};

◆ length

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

Definition at line 25 of file MMSpacer.h.

25{0.};

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

18{};

◆ longWidth

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

Definition at line 27 of file MMSpacer.h.

27{0.}; // for trapezoidal layers

◆ m_component

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

Definition at line 41 of file MMSpacer.h.

41{nullptr};

◆ name

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

Definition at line 17 of file DetectorElement.h.

17{};

◆ thickness

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

Definition at line 26 of file MMSpacer.h.

26{0.};

◆ width

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

Definition at line 24 of file MMSpacer.h.

24{0.};

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