ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonGeoModel
src
MMSpacer.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonGeoModel/MMSpacer.h
"
6
7
#include "
AthenaKernel/getMessageSvc.h
"
8
#include "
GeoModelInterfaces/StoredMaterialManager.h
"
9
#include "GeoModelKernel/GeoDefinitions.h"
10
#include "GeoModelKernel/GeoLogVol.h"
11
#include "GeoModelKernel/GeoPhysVol.h"
12
#include "GeoModelKernel/GeoShapeShift.h"
13
#include "GeoModelKernel/GeoShapeSubtraction.h"
14
#include "GeoModelKernel/GeoTrd.h"
15
#include "
MuonGeoModel/Component.h
"
16
#include "
MuonGeoModel/Technology.h
"
17
#include "
MuonGeoModel/MMSpacerComponent.h
"
18
#include "
MuonGeoModel/MMSpacer_Technology.h
"
19
#include "
MuonGeoModel/MYSQL.h
"
20
21
#include <GaudiKernel/IMessageSvc.h>
22
#include <GaudiKernel/MsgStream.h>
23
#include <GeoModelKernel/GeoShape.h>
24
#include <string>
25
26
class
GeoMaterial;
27
28
namespace
MuonGM
{
29
30
MMSpacer::MMSpacer
(
const
MYSQL
& mysql,
Component
*
ss
) :
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
}
40
41
GeoPhysVol *
MMSpacer::build
(
StoredMaterialManager
& matManager,
42
const
MYSQL
& mysql,
43
int
minimalgeo) {
44
std::vector<Cutout *> vcutdef;
45
int
cutoutson = 0;
46
return
build
(matManager, mysql, minimalgeo, cutoutson, vcutdef);
47
}
48
49
GeoPhysVol *
MMSpacer::build
(
StoredMaterialManager
& matManager,
50
const
MYSQL
& mysql,
51
int
minimalgeo,
int
,
52
const
std::vector<Cutout *>&) {
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
}
90
91
void
MMSpacer::print
()
const
{
92
MsgStream log(
Athena::getMessageSvc
(),
"MuonGM::MMSpacer"
);
93
log << MSG::INFO <<
" MMSpacer "
<<
name
<<
" :"
<<
endmsg
;
94
}
95
96
}
// namespace MuonGM
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
Component.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
MMSpacerComponent.h
MMSpacer.h
MMSpacer_Technology.h
MYSQL.h
StoredMaterialManager.h
Technology.h
MuonGM::Component
Definition
Component.h:11
MuonGM::DetectorElement::name
std::string name
Definition
DetectorElement.h:17
MuonGM::DetectorElement::DetectorElement
DetectorElement(const std::string &n)
Definition
DetectorElement.h:20
MuonGM::DetectorElement::logVolName
std::string logVolName
Definition
DetectorElement.h:18
MuonGM::MMSpacerComponent
Definition
MMSpacerComponent.h:14
MuonGM::MMSpacer_Technology
Definition
MMSpacer_Technology.h:15
MuonGM::MMSpacer::build
GeoPhysVol * build(StoredMaterialManager &matManager, const MYSQL &mysql, int minimalgeo)
Definition
MMSpacer.cxx:41
MuonGM::MMSpacer::MMSpacer
MMSpacer(const MYSQL &mysql, Component *s)
Definition
MMSpacer.cxx:30
MuonGM::MMSpacer::thickness
double thickness
Definition
MMSpacer.h:26
MuonGM::MMSpacer::width
double width
Definition
MMSpacer.h:24
MuonGM::MMSpacer::m_component
MMSpacerComponent * m_component
Definition
MMSpacer.h:41
MuonGM::MMSpacer::longWidth
double longWidth
Definition
MMSpacer.h:27
MuonGM::MMSpacer::print
virtual void print() const override
Definition
MMSpacer.cxx:91
MuonGM::MMSpacer::length
double length
Definition
MMSpacer.h:25
MuonGM::MYSQL
Definition
MYSQL.h:43
MuonGM::MYSQL::GetTechnology
Technology * GetTechnology(const std::string &name)
Definition
MYSQL.cxx:105
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition
StoredMaterialManager.h:30
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(std::string_view name)=0
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition
GeoMuonHits.h:27
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0