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

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  }

◆ 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();
62 
63  MM_Technology *t = (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 
77  logVolName = name;
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  }

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

◆ 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::Micromegas::index {0}

Definition at line 27 of file Micromegas.h.

◆ length

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

Definition at line 24 of file Micromegas.h.

◆ logVolName

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

Definition at line 18 of file DetectorElement.h.

◆ longWidth

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

Definition at line 26 of file Micromegas.h.

◆ m_component

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

Definition at line 38 of file Micromegas.h.

◆ name

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

Definition at line 17 of file DetectorElement.h.

◆ thickness

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

Definition at line 25 of file Micromegas.h.

◆ width

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

Definition at line 23 of file Micromegas.h.


The documentation for this class was generated from the following files:
MuonGM::DetectorElement::name
std::string name
Definition: DetectorElement.h:17
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
CxxUtils::LockedPointer
A pointer together with a movable lock.
Definition: LockedPointer.h:35
index
Definition: index.py:1
JetTiledMap::W
@ W
Definition: TiledEtaPhiMap.h:44
MuonGM::Micromegas::m_component
MicromegasComponent * m_component
Definition: Micromegas.h:38
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
read_hist_ntuple.f2
f2
Definition: read_hist_ntuple.py:20
xAOD::EgammaParameters::f3
@ f3
fraction of energy reconstructed in 3rd sampling
Definition: EgammaEnums.h:54
MMDetectorHelper::Get_Controller
IAGDDtoGeoSvc::LockedController Get_Controller()
Definition: MMDetectorHelper.cxx:126
MMDetectorDescription
Definition: MMDetectorDescription.h:45
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonGM::Micromegas::build
GeoFullPhysVol * build(StoredMaterialManager &matManager, int minimalgeo)
Definition: Micromegas.cxx:47
MuonGM::Micromegas::width
double width
Definition: Micromegas.h:23
MMDetectorDescription::ysFrame
void ysFrame(double y)
Definition: MMDetectorDescription.h:59
MuonGM::MicromegasComponent::subType
std::string subType
Definition: MicromegasComponent.h:21
AGDDDetectorStore
Definition: AGDDDetectorStore.h:18
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
MuonGM::Micromegas::longWidth
double longWidth
Definition: Micromegas.h:26
MuonGM::DetectorElement::logVolName
std::string logVolName
Definition: DetectorElement.h:18
MMDetectorHelper::Get_MMDetectorSubType
MMDetectorDescription * Get_MMDetectorSubType(const std::string &type)
Definition: MMDetectorHelper.cxx:119
MMDetectorHelper
Definition: MMDetectorHelper.h:24
MMDetectorDescription::ylFrame
void ylFrame(double y)
Definition: MMDetectorDescription.h:62
MuonGM::Micromegas::length
double length
Definition: Micromegas.h:24
MuonGM::Micromegas::thickness
double thickness
Definition: Micromegas.h:25
python.compressB64.c
def c
Definition: compressB64.py:93
MMDetectorDescription::xFrame
void xFrame(double y)
Definition: MMDetectorDescription.h:56
MuonGM::DetectorElement::DetectorElement
DetectorElement(const std::string &n)
Definition: DetectorElement.h:20
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4