ATLAS Offline Software
DetectorDescription
GeoModel
GeoModelExamples
src
SimplestToyDetectorFactory.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
GeoModelExamples/SimplestToyDetectorFactory.h
"
6
#include "
CentralScrutinizer.h
"
7
#include "GeoModelKernel/GeoMaterial.h"
8
#include "GeoModelKernel/GeoBox.h"
9
#include "GeoModelKernel/GeoTube.h"
10
#include "GeoModelKernel/GeoLogVol.h"
11
#include "GeoModelKernel/GeoNameTag.h"
12
#include "GeoModelKernel/GeoPhysVol.h"
13
#include "GeoModelKernel/GeoFullPhysVol.h"
14
#include "GeoModelKernel/GeoTransform.h"
15
#include "GeoModelKernel/GeoSerialDenominator.h"
16
#include "GeoModelKernel/GeoAlignableTransform.h"
17
#include "GeoModelKernel/GeoSerialTransformer.h"
18
#include "GeoModelKernel/Units.h"
19
20
#include "GeoGenericFunctions/AbsFunction.h"
21
#include "GeoGenericFunctions/Variable.h"
22
#include "GeoGenericFunctions/Sin.h"
23
#include "GeoGenericFunctions/Cos.h"
24
25
using namespace
GeoGenfun
;
26
using namespace
GeoXF;
27
28
29
SimplestToyDetectorFactory::SimplestToyDetectorFactory
(
StoreGateSvc
*
detStore
)
// TODO: remove StoreGate reference
30
:m_detectorManager(NULL), m_detectorStore(
detStore
) {}
31
32
33
SimplestToyDetectorFactory::~SimplestToyDetectorFactory
() {}
34
35
36
37
//## Other Operations (implementation)
38
void
SimplestToyDetectorFactory::create
(GeoPhysVol *world)
39
{
40
m_detectorManager
=
new
ToyDetectorManager
();
41
42
//-----------------------------------------------------------------------------------//
43
// Get the materials that we shall use. //
44
// ----------------------------------------------------------------------------------//
45
46
// Bogus densities. Later: read from database.
47
double
densityOfAir=0.1, densityOfPolystyrene=0.2;
48
const
GeoMaterial *air =
new
GeoMaterial(
"Air Two"
,densityOfAir);
49
const
GeoMaterial *
poly
=
new
GeoMaterial(
"std::Polystyrene"
,densityOfPolystyrene);
50
51
52
//-----------------------------------------------------------------------------------//
53
// Next make the box that describes the shape of the toy volume: //
54
const
GeoBox *toyBox =
new
GeoBox(800*
GeoModelKernelUnits::cm
, 800*
GeoModelKernelUnits::cm
, 1000*
GeoModelKernelUnits::cm
);
//
55
// Bundle this with a material into a logical volume: //
56
const
GeoLogVol *toyLog =
new
GeoLogVol(
"ToyLog"
, toyBox, air);
//
57
// ..And create a physical volume: //
58
GeoPhysVol *toyPhys =
new
GeoPhysVol(toyLog);
//
59
// Add this to the list of top level physical volumes: //
60
m_detectorManager
->
addTreeTop
(toyPhys);
//
61
62
63
64
GeoBox *sPass =
new
GeoBox(5.0*
GeoModelKernelUnits::cm
, 30*
GeoModelKernelUnits::cm
, 30*
GeoModelKernelUnits::cm
);
65
GeoLogVol *lPass =
new
GeoLogVol(
"Passive"
, sPass,
poly
);
66
GeoPhysVol *pPass =
new
GeoPhysVol(lPass);
67
68
GeoBox *sIPass =
new
GeoBox(4*
GeoModelKernelUnits::cm
, 25*
GeoModelKernelUnits::cm
, 25*
GeoModelKernelUnits::cm
);
69
GeoLogVol *lIPass =
new
GeoLogVol(
"InnerPassive"
, sIPass, air);
70
GeoPhysVol *pIPass =
new
GeoPhysVol(lIPass);
71
72
pPass->add(pIPass);
73
toyPhys->add(pPass);
74
75
76
77
//------------------------------------------------------------------------------------//
78
// Now insert all of this into the world... //
79
GeoNameTag *
tag
=
new
GeoNameTag(
"Toy"
);
//
80
world->add(
tag
);
//
81
world->add(toyPhys);
//
82
//------------------------------------------------------------------------------------//
83
}
84
85
const
ToyDetectorManager
*
SimplestToyDetectorFactory::getDetectorManager
()
const
86
{
87
return
m_detectorManager
;
88
}
SimplestToyDetectorFactory::getDetectorManager
virtual const ToyDetectorManager * getDetectorManager() const
Definition:
SimplestToyDetectorFactory.cxx:85
SimplestToyDetectorFactory::create
virtual void create(GeoPhysVol *world)
Definition:
SimplestToyDetectorFactory.cxx:38
SimplestToyDetectorFactory::SimplestToyDetectorFactory
SimplestToyDetectorFactory(StoreGateSvc *pDetStore)
Definition:
SimplestToyDetectorFactory.cxx:29
cm
const double cm
Definition:
Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
MuonCalib::Legendre::poly
constexpr double poly(const double x)
Definition:
LegendrePoly.h:116
SimplestToyDetectorFactory::~SimplestToyDetectorFactory
~SimplestToyDetectorFactory()
Definition:
SimplestToyDetectorFactory.cxx:33
SimplestToyDetectorFactory.h
SimplestToyDetectorFactory::m_detectorManager
ToyDetectorManager * m_detectorManager
Definition:
SimplestToyDetectorFactory.h:33
CentralScrutinizer.h
python.PyKernel.detStore
detStore
Definition:
PyKernel.py:41
hydjet.StoreGateSvc
StoreGateSvc
Definition:
hydjet.minbias.pbpb5520.r12345.job.py:40
GeoGenfun
Definition:
ArrayFunction.cxx:7
ToyDetectorManager
Definition:
ToyDetectorManager.h:13
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition:
CaloCondBlobAlgs_fillNoiseFromASCII.py:24
ToyDetectorManager::addTreeTop
void addTreeTop(PVLink)
Definition:
ToyDetectorManager.cxx:53
Generated on Sun Dec 22 2024 21:18:13 for ATLAS Offline Software by
1.8.18