ATLAS Offline Software
SCT_FwdRingCooling.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
11 
12 #include "GeoModelKernel/GeoTube.h"
13 #include "GeoModelKernel/GeoLogVol.h"
14 #include "GeoModelKernel/GeoPhysVol.h"
15 #include "GeoModelKernel/Units.h"
16 
17 #include <cmath>
18 
19 inline double sqr(double x) {return x*x;}
20 
21 SCT_FwdRingCooling::SCT_FwdRingCooling(const std::string & name, int ringType,
22  InDetDD::SCT_DetectorManager* detectorManager,
23  SCT_GeometryManager* geometryManager,
24  SCT_MaterialManager* materials)
25  : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
26  m_ringType(ringType)
27 {
28  getParameters();
30 }
31 
32 
33 void
35 {
37 
38  m_materialName= parameters->fwdRingCoolingMaterial(m_ringType);
39  m_innerRadius = parameters->fwdRingCoolingInnerRadius(m_ringType);
40  m_outerRadius = parameters->fwdRingCoolingOuterRadius(m_ringType);
41  m_thickness = parameters->fwdRingCoolingThickness(m_ringType);
42  m_numModules = parameters->fwdRingNumModules(m_ringType);
43 }
44 
45 GeoVPhysVol *
47 {
48  const GeoTube * ringCoolingShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness);
49  m_material = m_materials->getMaterialForVolume(m_materialName, ringCoolingShape->volume());
50  const GeoLogVol * ringCoolingLog = new GeoLogVol(getName(), ringCoolingShape, m_material);
51 
52  GeoPhysVol * ringCooling = new GeoPhysVol(ringCoolingLog);
53 
54  return ringCooling;
55 }
SCT_ComponentFactory::m_geometryManager
SCT_GeometryManager * m_geometryManager
Definition: SCT_ComponentFactory.h:42
SCT_MaterialManager
Definition: SCT_MaterialManager.h:21
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
SCT_MaterialManager.h
SCT_GeometryManager::forwardParameters
const SCT_ForwardParameters * forwardParameters() const
Definition: SCT_GeometryManager.cxx:98
SCT_FwdRingCooling::SCT_FwdRingCooling
SCT_FwdRingCooling(const std::string &name, int ringType, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
Definition: SCT_FwdRingCooling.cxx:21
SCT_FwdRingCooling::m_numModules
int m_numModules
Definition: SCT_FwdRingCooling.h:42
x
#define x
SCT_FwdRingCooling.h
SCT_FwdRingCooling::m_innerRadius
double m_innerRadius
Definition: SCT_FwdRingCooling.h:36
SCT_FwdRingCooling::m_materialName
std::string m_materialName
Definition: SCT_FwdRingCooling.h:40
SCT_FwdRingCooling::m_ringType
int m_ringType
Definition: SCT_FwdRingCooling.h:34
SCT_FwdRingCooling::getParameters
void getParameters()
Definition: SCT_FwdRingCooling.cxx:34
sqr
double sqr(double x)
Definition: SCT_FwdRingCooling.cxx:19
SCT_MaterialManager::getMaterialForVolume
const GeoMaterial * getMaterialForVolume(const std::string &materialName, double volume)
Definition: SCT_MaterialManager.cxx:72
SCT_ComponentFactory::m_materials
SCT_MaterialManager * m_materials
Definition: SCT_ComponentFactory.h:43
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCT_SharedComponentFactory::m_physVolume
GeoVPhysVol * m_physVolume
Definition: SCT_ComponentFactory.h:70
SCT_FwdRingCooling::build
virtual GeoVPhysVol * build()
Definition: SCT_FwdRingCooling.cxx:46
SCT_FwdRingCooling::m_material
const GeoMaterial * m_material
Definition: SCT_FwdRingCooling.h:39
SCT_FwdRingCooling::m_thickness
double m_thickness
Definition: SCT_FwdRingCooling.h:38
SCT_SharedComponentFactory
Definition: SCT_ComponentFactory.h:56
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
SCT_FwdRingCooling::m_outerRadius
double m_outerRadius
Definition: SCT_FwdRingCooling.h:37
SCT_ForwardParameters.h
SCT_ComponentFactory::getName
const std::string & getName() const
Definition: SCT_ComponentFactory.h:35
SCT_GeometryManager.h
SCT_GeometryManager
Definition: SCT_GeometryManager.h:25
SCT_ForwardParameters
Definition: SCT_ForwardParameters.h:16