ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
8
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
20SCT_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{
29}
30
31
32void
34{
35 const SCT_ForwardParameters * parameters = m_geometryManager->forwardParameters();
36
38 for (int i = 0; i < 4; i++){
39 if (parameters->fwdCoolingBlockHiLo(i) == m_hiLo && parameters->fwdCoolingBlockMainOrSecondary(i) == m_mainSec) {
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
59GeoVPhysVol *
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}
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
const std::string & getName() const
SCT_GeometryManager * m_geometryManager
SCT_MaterialManager * m_materials
virtual GeoVPhysVol * build()
SCT_FwdCoolingBlock(const std::string &name, int hiLo, int mainOrSecondary, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
const GeoMaterial * m_material
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)