ATLAS Offline Software
MuonSpectrometer
MuonDetDescr
MuonAGDDBase
src
AGDDMuonStation.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
MuonAGDDBase/AGDDMuonStation.h
"
7
8
#include "GeoModelKernel/GeoTrd.h"
9
#include "GeoModelKernel/GeoShape.h"
10
#include "GeoModelKernel/GeoLogVol.h"
11
#include "GeoModelKernel/GeoPhysVol.h"
12
#include "GeoModelKernel/GeoMaterial.h"
13
14
#include "
StoreGate/StoreGateSvc.h
"
15
#include "GaudiKernel/ISvcLocator.h"
16
#include "GaudiKernel/Bootstrap.h"
17
#include "
GeoModelInterfaces/StoredMaterialManager.h
"
18
19
void
AGDDMuonStation::CreateSolid
(
const
AGDDBuilder
&
/*builder*/
)
20
{
21
std::cout<<
"this is AGDDMuonStation::CreateSolid()"
<<std::endl;
22
void
*
p
=
GetSolid
();
23
if
(!
p
) {
24
std::cout<<
" creating solid with dimensions "
<<
25
m_small_x
<<
" "
<<
m_large_x
<<
" "
<<
m_y
<<
" "
<<
m_z
<<std::endl;
26
GeoShape* solid=
new
GeoTrd(
m_small_x
/2.,
m_large_x
/2.,
m_y
/2.,
m_y
/2.,
m_z
/2.);
27
SetSolid
(solid);
28
}
29
}
30
31
void
AGDDMuonStation::CreateVolume
(
AGDDBuilder
&
builder
)
32
{
33
std::cout<<
"this is AGDDMuonStation::CreateVolume()"
<<std::endl;
34
static
const
GeoMaterial*
const
air =
GetMMMaterial
(
"std::Air"
);
35
if
(!air) std::cout<<
" Air not found!"
<<std::endl;
36
37
CreateSolid
(
builder
);
38
39
if
(!
GetVolume
()) {
40
std::cout<<
"trying to create logical volume"
<<std::endl;
41
const
GeoShape* shape=(GeoShape *)
GetSolid
();
42
if
(!shape) std::cout<<
" something wrong, shape is 0"
<<std::endl;
43
GeoLogVol *
a
=
new
GeoLogVol(
GetName
(),shape,air);
44
GeoPhysVol *a_phys=
new
GeoPhysVol(
a
);
45
SetVolume
(a_phys);
46
std::cout<<
"done creating volume "
<<std::endl;
47
}
48
}
49
50
const
GeoMaterial*
AGDDMuonStation::GetMMMaterial
(
const
std::string&
name
)
51
{
52
SmartIF<StoreGateSvc> pDetStore{Gaudi::svcLocator()->service(
"DetectorStore"
)};
53
if
(pDetStore.isValid()) {
54
StoredMaterialManager
* theMaterialManager =
nullptr
;
55
if
(pDetStore->retrieve(theMaterialManager,
"MATERIALS"
).isSuccess()) {
56
return
theMaterialManager->
getMaterial
(
name
);
57
}
58
}
59
return
nullptr
;
60
}
AGDDMuonStation::GetMMMaterial
static const GeoMaterial * GetMMMaterial(const std::string &)
Definition:
AGDDMuonStation.cxx:50
AGDDVolume::GetSolid
void * GetSolid()
Definition:
AGDDVolume.h:33
AGDDVolume::GetVolume
void * GetVolume()
Definition:
AGDDVolume.h:32
AGDDMuonStation::m_small_x
double m_small_x
Definition:
AGDDMuonStation.h:41
AGDDMuonStation.h
AGDDVolume::SetSolid
void SetSolid(void *p)
Definition:
AGDDVolume.h:34
AGDDMuonStation::m_z
double m_z
Definition:
AGDDMuonStation.h:44
AGDDBuilder
Definition:
AGDDBuilder.h:31
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
createSimpleDistributions.builder
builder
Definition:
createSimpleDistributions.py:52
AGDDMuonStation::m_large_x
double m_large_x
Definition:
AGDDMuonStation.h:42
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
StoredMaterialManager.h
a
TList * a
Definition:
liststreamerinfos.cxx:10
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(const std::string &name)=0
AGDDVolume::GetName
const std::string & GetName() const
Definition:
AGDDVolume.h:23
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition:
StoredMaterialManager.h:28
AGDDMuonStation::CreateSolid
virtual void CreateSolid(const AGDDBuilder &builder) override
Definition:
AGDDMuonStation.cxx:19
AGDDMuonStation::m_y
double m_y
Definition:
AGDDMuonStation.h:43
AGDDMuonStation::CreateVolume
virtual void CreateVolume(AGDDBuilder &builder) override
Definition:
AGDDMuonStation.cxx:31
StoreGateSvc.h
AGDDVolume::SetVolume
void SetVolume(void *p)
Definition:
AGDDVolume.h:35
Generated on Sun Dec 22 2024 21:06:45 for ATLAS Offline Software by
1.8.18