ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonGeoModel
src
Ded.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonGeoModel/Ded.h
"
6
7
#include "GeoModelKernel/GeoCutVolAction.h"
8
#include "GeoModelKernel/GeoDefinitions.h"
9
#include "GeoModelKernel/GeoLogVol.h"
10
#include "GeoModelKernel/GeoMaterial.h"
11
#include "GeoModelKernel/GeoPhysVol.h"
12
#include "GeoModelKernel/GeoShapeIntersection.h"
13
#include "GeoModelKernel/GeoShapeSubtraction.h"
14
#include "GeoModelKernel/GeoTrd.h"
15
#include "GeoModelKernel/GeoVPhysVol.h"
16
#include "
MuonGeoModel/Cutout.h
"
17
#include "
MuonGeoModel/DED_Technology.h
"
18
#include "
MuonGeoModel/MYSQL.h
"
19
#include "
AthenaKernel/getMessageSvc.h
"
20
21
#define skip_ded false
22
23
namespace
MuonGM
{
24
25
Ded::Ded
(
const
MYSQL
& mysql,
Component
*
ss
) :
DetectorElement
(
ss
->
name
) {
26
double
tol = 1.e-4;
27
DedComponent
*s =
static_cast<
DedComponent
*
>
(
ss
);
28
width
= s->dx1;
29
longWidth
= s->dx2;
30
thickness
= s->GetThickness(mysql) - tol;
31
length
= s->dy - tol;
32
m_component
= s;
33
}
34
35
PVLink
Ded::build
(
StoredMaterialManager
& matManager,
36
const
MYSQL
& mysql) {
37
std::vector<Cutout *> vcutdef;
38
int
cutoutson = 0;
39
return
build
(matManager, mysql, cutoutson, vcutdef);
40
}
41
42
PVLink
Ded::build
(
StoredMaterialManager
& matManager,
const
MYSQL
& mysql,
43
int
cutoutson,
const
std::vector<Cutout *>& vcutdef) {
44
const
DED
*
r
=
dynamic_cast<
const
DED
*
>
(mysql.
GetTechnology
(
name
));
45
46
double
tckaluminum =
r
->AlThickness;
47
double
honthickness =
r
->HoneyCombThickness;
48
const
GeoShape *sded =
new
GeoTrd(
thickness
/ 2,
thickness
/ 2,
width
/ 2,
longWidth
/ 2,
length
/ 2);
49
const
GeoShape *shon =
new
GeoTrd(honthickness / 2, honthickness / 2,
width
/ 2. - tckaluminum,
longWidth
/ 2. - tckaluminum,
length
/ 2. - tckaluminum);
50
51
const
GeoMaterial *mded = matManager.
getMaterial
(
"std::Aluminium"
);
52
GeoLogVol *lded =
new
GeoLogVol(
"DedModuleSkin"
, sded, mded);
53
PVLink pded =
new
GeoPhysVol(lded);
54
55
// Place honeycomb inside aluminum to make aluminum skin
56
const
GeoMaterial *mhon = matManager.
getMaterial
(
"muo::RpcPapHonC"
);
57
GeoLogVol *lhon =
new
GeoLogVol(
"DedModulehoneycomb"
, shon, mhon);
58
PVLink phon =
new
GeoPhysVol(lhon);
59
if
(!
skip_ded
)
60
pded->add(phon);
61
62
// Apply cutouts
63
if
(cutoutson && !vcutdef.empty()) {
64
GeoIntrusivePtr<GeoPhysVol> tempPhys{};
65
Cutout
*cut =
nullptr
;
66
GeoShape *cutoutShape =
nullptr
;
67
GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()};
68
for
(
unsigned
i = 0; i < vcutdef.size(); i++) {
69
cut = vcutdef[i];
70
cutoutShape =
new
GeoTrd(
thickness
/ 2. + 1.,
thickness
/ 2. + 1., cut->widthXs / 2., cut->widthXl / 2., cut->lengthY / 2.);
71
cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -
length
/ 2 + cut->dy + cut->lengthY / 2.);
72
73
GeoIntrusivePtr<GeoVPhysVol> toCut{pded};
74
GeoCutVolAction cutAction(*cutoutShape, cutTrans);
75
toCut->apply(&cutAction);
76
tempPhys = cutAction.getPV();
77
pded = tempPhys;
78
}
79
}
80
81
return
pded;
82
}
83
84
void
Ded::print
()
const
{
85
MsgStream log(
Athena::getMessageSvc
(),
"MuonGM::Ded"
);
86
log << MSG::INFO <<
"Ded "
<<
name
.c_str() <<
" :"
<<
endmsg
;
87
}
88
89
}
// namespace MuonGM
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
Cutout.h
DED_Technology.h
skip_ded
#define skip_ded
Definition
Ded.cxx:21
Ded.h
ss
static Double_t ss
Definition
LArPhysWaveHECTool.cxx:37
MYSQL.h
MuonGM::Component
Definition
Component.h:11
MuonGM::Cutout
Definition
Cutout.h:14
MuonGM::DED
Definition
DED_Technology.h:16
MuonGM::Ded::print
virtual void print() const override
Definition
Ded.cxx:84
MuonGM::Ded::build
PVLink build(StoredMaterialManager &matManager, const MYSQL &mysql)
Definition
Ded.cxx:35
MuonGM::Ded::thickness
double thickness
Definition
Ded.h:23
MuonGM::Ded::longWidth
double longWidth
Definition
Ded.h:24
MuonGM::Ded::m_component
DedComponent * m_component
Definition
Ded.h:34
MuonGM::Ded::length
double length
Definition
Ded.h:22
MuonGM::Ded::width
double width
Definition
Ded.h:21
MuonGM::Ded::Ded
Ded(const MYSQL &mysql, Component *s)
Definition
Ded.cxx:25
MuonGM::DetectorElement::name
std::string name
Definition
DetectorElement.h:17
MuonGM::DetectorElement::DetectorElement
DetectorElement(const std::string &n)
Definition
DetectorElement.h:20
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
r
int r
Definition
globals.cxx:22
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition
GeoMuonHits.h:27
MuonGM::DedComponent
StandardComponent DedComponent
Definition
DedComponent.h:10
Generated on
for ATLAS Offline Software by
1.17.0