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

#include <Micromegas.h>

Inheritance diagram for MuonGM::Micromegas:
Collaboration diagram for MuonGM::Micromegas:

Public Member Functions

 Micromegas (Component *s)
GeoFullPhysVol * build (StoredMaterialManager &matManager, int minimalgeo)
GeoFullPhysVol * build (StoredMaterialManager &matManager, 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

MicromegasComponentm_component {nullptr}

Detailed Description

Definition at line 20 of file Micromegas.h.

Constructor & Destructor Documentation

◆ Micromegas()

MuonGM::Micromegas::Micromegas ( Component * s)

Definition at line 37 of file Micromegas.cxx.

37 : DetectorElement(ss->name) {
38 MicromegasComponent *s = static_cast<MicromegasComponent *>(ss);
39 m_component = s;
40 width = s->dx1;
41 longWidth = s->dx2;
42 length = s->dy;
43 name = s->name;
44 index = s->index;
45 }
static Double_t ss
DetectorElement(const std::string &n)
MicromegasComponent * m_component
Definition Micromegas.h:38

Member Function Documentation

◆ build() [1/2]

GeoFullPhysVol * MuonGM::Micromegas::build ( StoredMaterialManager & matManager,
int minimalgeo )

Definition at line 47 of file Micromegas.cxx.

48 {
49 std::vector<Cutout *> vcutdef;
50 int cutoutson = 0;
51 return build(matManager, minimalgeo, cutoutson, vcutdef);
52 }
GeoFullPhysVol * build(StoredMaterialManager &matManager, int minimalgeo)

◆ build() [2/2]

GeoFullPhysVol * MuonGM::Micromegas::build ( StoredMaterialManager & matManager,
int minimalgeo,
int cutoutson,
const std::vector< Cutout * > &  )

Definition at line 54 of file Micromegas.cxx.

57 {
58 MMDetectorHelper mmHelper;
60 AGDDDetectorStore& ds = c->GetDetectorStore();
61 MMDetectorDescription *mm_descr = mmHelper.Get_MMDetectorSubType(m_component->subType);
62
63 MM_Technology *t = static_cast<MM_Technology *>(ds.GetTechnology(name));
64 thickness = t->Thickness();
65 double gasTck = t->gasThickness;
66 double pcbTck = t->pcbThickness;
67 double roTck = t->roThickness;
68 double f1 = mm_descr->ylFrame();
69 double f2 = mm_descr->ysFrame();
70 double f3 = mm_descr->xFrame();
71
72 minimalgeo = t->geoLevel;
73
74 // Build Micromegas mother volume out of G10
75 const GeoShape *strd = new GeoTrd(thickness / 2, thickness / 2, width / 2, longWidth / 2, length / 2);
76
78 if (!(m_component->subType).empty())
79 logVolName += ("-" + m_component->subType);
80 // std::FR4 is not always available. Fallback to sct::PCB
81 const GeoMaterial *mtrd = matManager.getMaterial("std::FR4") != nullptr ?
82 matManager.getMaterial("std::FR4") : matManager.getMaterial("sct::PCB");
83 GeoLogVol *ltrd = new GeoLogVol(logVolName, strd, mtrd);
84 GeoFullPhysVol *ptrd = new GeoFullPhysVol(ltrd);
85
86 if (!minimalgeo)
87 return ptrd;
88
89 double newpos = -thickness / 2.;
90 ptrd->add(new GeoSerialIdentifier(0));
91
92 int igl = 0;
93
94 // Loop over Micromegas layers
95 for (int i = 0; i < t->nlayers; i++) {
96 // std::cout<<"loop over layers"<<std::endl;
97 double widthActive;
98 double longWidthActive;
99 double lengthActive;
100
101 // sensitive volume
102 igl++;
103 ptrd->add(new GeoIdentifierTag(igl));
104
105 widthActive = width;
106 longWidthActive = longWidth;
107 lengthActive = length;
108
109 if (i == 0)
110 newpos += gasTck / 2.;
111 else
112 newpos += gasTck;
113 if ((i + 1) % 2)
114 newpos += pcbTck;
115 else
116 newpos += roTck;
117 double newXPos = newpos;
118
119 const GeoShape *sGasVolume = new GeoTrd(gasTck / 2, gasTck / 2, widthActive / 2, longWidthActive / 2, lengthActive / 2);
120
121 GeoLogVol *ltrdtmp = new GeoLogVol("MM_Sensitive", sGasVolume, matManager.getMaterial("muo::ArCO2"));
122 GeoPhysVol *ptrdtmp = new GeoPhysVol(ltrdtmp);
123 GeoNameTag *ntrdtmp = new GeoNameTag(name + "muo::ArCO2");
124 GeoTransform *ttrdtmp = new GeoTransform(GeoTrf::TranslateX3D(newXPos));
125
126 // Place gas volume inside G10 mother volume so that
127 // subtractions from gas volume now become G10
128
129 ptrd->add(ntrdtmp);
130 ptrd->add(ttrdtmp);
131 ptrd->add(ptrdtmp);
132
133 double lW = longWidth / 2. - ((longWidth - width) / 2.) * f1 / length;
134 double W = width / 2. + ((longWidth - width) / 2.) * f2 / length;
135 const GeoShape *trd1 = new GeoTrd(gasTck / 2, gasTck / 2, width / 2, longWidth / 2, length / 2);
136 const GeoShape *trd2 = new GeoTrd(gasTck, gasTck, W - f3, lW - f3, length / 2 - (f1 + f2) / 2.);
137 GeoTrf::Translate3D c(0, 0, (f2 - f1) / 2.);
138 trd1 = &(trd1->subtract((*trd2) << c));
139 GeoLogVol *ltrdframe = new GeoLogVol("MM_Frame", trd1, matManager.getMaterial("std::Aluminium"));
140 GeoPhysVol *ptrdframe = new GeoPhysVol(ltrdframe);
141
142 ptrdtmp->add(ptrdframe);
143
144 } // Loop over tgc layers
145
146 return ptrd;
147 }
CxxUtils::LockedPointer< AGDDController > LockedController
MMDetectorDescription * Get_MMDetectorSubType(const std::string &type)
IAGDDtoGeoSvc::LockedController Get_Controller()
virtual const GeoMaterial * getMaterial(const std::string &name)=0
@ f3
fraction of energy reconstructed in 3rd sampling
Definition EgammaEnums.h:55

◆ print()

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

Implements MuonGM::DetectorElement.

Definition at line 149 of file Micromegas.cxx.

149 {
150 MsgStream log(Athena::getMessageSvc(), "MuonGM::Micromegas");
151 log << MSG::INFO << " Micromegas " << name << " :" << endmsg;
152 }
#define endmsg
IMessageSvc * getMessageSvc(bool quiet=false)

◆ setLogVolName()

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

Member Data Documentation

◆ index

int MuonGM::Micromegas::index {0}

Definition at line 27 of file Micromegas.h.

27{0};

◆ length

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

Definition at line 24 of file Micromegas.h.

24{0.};

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

18{};

◆ longWidth

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

Definition at line 26 of file Micromegas.h.

26{0.}; // for trapezoidal layers

◆ m_component

MicromegasComponent* MuonGM::Micromegas::m_component {nullptr}
private

Definition at line 38 of file Micromegas.h.

38{nullptr};

◆ name

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

Definition at line 17 of file DetectorElement.h.

17{};

◆ thickness

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

Definition at line 25 of file Micromegas.h.

25{0.};

◆ width

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

Definition at line 23 of file Micromegas.h.

23{0.};

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