ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetDetDescr
SCT_GeoModel
src
SCT_FwdCoolingBlock.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 "
SCT_FwdCoolingBlock.h
"
6
7
#include "
SCT_MaterialManager.h
"
8
9
#include "
SCT_GeometryManager.h
"
10
#include "
SCT_ForwardParameters.h
"
11
12
#include "GeoModelKernel/GeoBox.h"
13
#include "GeoModelKernel/GeoLogVol.h"
14
#include "GeoModelKernel/GeoPhysVol.h"
15
#include "GeoModelKernel/GeoMaterial.h"
16
#include "GeoModelKernel/Units.h"
17
18
#include <iostream>
19
20
SCT_FwdCoolingBlock::SCT_FwdCoolingBlock
(
const
std::string & name,
int
hiLo,
int
mainOrSecondary,
21
InDetDD::SCT_DetectorManager
* detectorManager,
22
SCT_GeometryManager
* geometryManager,
23
SCT_MaterialManager
* materials)
24
:
SCT_SharedComponentFactory
(name, detectorManager, geometryManager, materials),
25
m_hiLo
(hiLo),
m_mainSec
(mainOrSecondary)
26
{
27
getParameters
();
28
m_physVolume
=
SCT_FwdCoolingBlock::build
();
29
}
30
31
32
void
33
SCT_FwdCoolingBlock::getParameters
()
34
{
35
const
SCT_ForwardParameters
* parameters =
m_geometryManager
->forwardParameters();
36
37
m_coolingBlockIndex
= -1;
38
for
(
int
i = 0; i < 4; i++){
39
if
(parameters->fwdCoolingBlockHiLo(i) ==
m_hiLo
&& parameters->fwdCoolingBlockMainOrSecondary(i) ==
m_mainSec
) {
40
m_coolingBlockIndex
= i;
41
}
42
}
43
44
if
(
m_coolingBlockIndex
< 0){
45
std::cout <<
"SCT_FwdCoolingBlock: ERROR. Cooling block type is missing. HiLo = "
<<
m_hiLo
46
<<
", MainSecondary = "
<<
m_mainSec
<< std::endl;
47
// Will crash or give unpredictable results
48
}
49
50
m_materialName
= parameters->fwdCoolingBlockMaterial(
m_coolingBlockIndex
);
51
m_thickness
= parameters->fwdCoolingBlockThickness(
m_coolingBlockIndex
);
52
m_deltaR
= parameters->fwdCoolingBlockDeltaR(
m_coolingBlockIndex
);
53
m_rphi
= parameters->fwdCoolingBlockRPhi(
m_coolingBlockIndex
);
54
m_offset
= parameters->fwdCoolingBlockOffsetFromDisc(
m_coolingBlockIndex
);
55
56
57
}
58
59
GeoVPhysVol *
60
SCT_FwdCoolingBlock::build
()
61
{
62
63
// Build the CoolingBlock. Just a simple box.
64
const
GeoBox * coolingBlockShape =
new
GeoBox(0.5*
m_deltaR
, 0.5*
m_rphi
, 0.5*
m_thickness
);
65
m_material
=
m_materials
->getMaterialForVolume(
m_materialName
, coolingBlockShape->volume());
66
const
GeoLogVol *coolingBlockLog =
67
new
GeoLogVol(
getName
(), coolingBlockShape,
m_material
);
68
GeoPhysVol * coolingBlock =
new
GeoPhysVol(coolingBlockLog);
69
70
return
coolingBlock;
71
}
SCT_ForwardParameters.h
SCT_FwdCoolingBlock.h
SCT_GeometryManager.h
SCT_MaterialManager.h
InDetDD::SCT_DetectorManager
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
Definition
SCT_DetectorManager.h:50
SCT_ComponentFactory::getName
const std::string & getName() const
Definition
SCT_ComponentFactory.h:35
SCT_ComponentFactory::m_geometryManager
SCT_GeometryManager * m_geometryManager
Definition
SCT_ComponentFactory.h:39
SCT_ComponentFactory::m_materials
SCT_MaterialManager * m_materials
Definition
SCT_ComponentFactory.h:40
SCT_ForwardParameters
Definition
SCT_ForwardParameters.h:16
SCT_FwdCoolingBlock::m_deltaR
double m_deltaR
Definition
SCT_FwdCoolingBlock.h:47
SCT_FwdCoolingBlock::m_materialName
std::string m_materialName
Definition
SCT_FwdCoolingBlock.h:45
SCT_FwdCoolingBlock::m_mainSec
int m_mainSec
Definition
SCT_FwdCoolingBlock.h:51
SCT_FwdCoolingBlock::build
virtual GeoVPhysVol * build()
Definition
SCT_FwdCoolingBlock.cxx:60
SCT_FwdCoolingBlock::SCT_FwdCoolingBlock
SCT_FwdCoolingBlock(const std::string &name, int hiLo, int mainOrSecondary, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
Definition
SCT_FwdCoolingBlock.cxx:20
SCT_FwdCoolingBlock::m_rphi
double m_rphi
Definition
SCT_FwdCoolingBlock.h:48
SCT_FwdCoolingBlock::m_thickness
double m_thickness
Definition
SCT_FwdCoolingBlock.h:46
SCT_FwdCoolingBlock::m_hiLo
int m_hiLo
Definition
SCT_FwdCoolingBlock.h:50
SCT_FwdCoolingBlock::m_material
const GeoMaterial * m_material
Definition
SCT_FwdCoolingBlock.h:44
SCT_FwdCoolingBlock::m_offset
double m_offset
Definition
SCT_FwdCoolingBlock.h:49
SCT_FwdCoolingBlock::m_coolingBlockIndex
int m_coolingBlockIndex
Definition
SCT_FwdCoolingBlock.h:52
SCT_FwdCoolingBlock::getParameters
void getParameters()
Definition
SCT_FwdCoolingBlock.cxx:33
SCT_GeometryManager
Definition
SCT_GeometryManager.h:25
SCT_MaterialManager
Definition
SCT_MaterialManager.h:21
SCT_SharedComponentFactory::m_physVolume
GeoVPhysVol * m_physVolume
Definition
SCT_ComponentFactory.h:66
SCT_SharedComponentFactory::SCT_SharedComponentFactory
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)
Definition
SCT_ComponentFactory.h:56
Generated on
for ATLAS Offline Software by
1.17.0