ATLAS Offline Software
SCT_FwdCoolingPipe.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 "GaudiKernel/PhysicalConstants.h"
16 
17 #include <cmath>
18 
19 inline double sqr(double x) {return x * x;}
20 
22  int numPipes,
23  double innerRadius,
24  double startPos,
25  double endPos,
26  InDetDD::SCT_DetectorManager* detectorManager,
27  SCT_GeometryManager* geometryManager,
28  SCT_MaterialManager* materials)
29  : SCT_SharedComponentFactory(name, detectorManager, geometryManager, materials),
30  m_numPipes(numPipes), m_innerRadius(innerRadius)
31 {
32  m_length = std::abs(endPos - startPos);
33  m_zPosition = 0.5 * (startPos + endPos);
34 
35  getParameters();
37 }
38 
39 
40 void
42 {
44  m_material = m_materials->getMaterial(parameters->fwdCoolingPipeMaterial());
45  m_pipeRadius = parameters->fwdCoolingPipeRadius();
46 }
47 
48 GeoVPhysVol *
50 {
51  // Calculate the dimensions.
52  // area = Gaudi::Units::pi*(pipeRadius)^2 * numPipes
53  // also area = 2*Gaudi::Units::pi*r_ave*delta_r approx= 2 * Gaudi::Units::pi * rMin * delta_r
54  // solve for delta_r
55  // m_thickness = delta_r
56 
60 
61 
62  // Make the support disk. A simple tube.
63  const GeoTube * pipeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_length);
64  const GeoLogVol * pipeLog = new GeoLogVol(getName(), pipeShape, m_material);
65 
66  GeoPhysVol * pipe = new GeoPhysVol(pipeLog);
67 
68  return pipe;
69 }
SCT_ComponentFactory::m_geometryManager
SCT_GeometryManager * m_geometryManager
Definition: SCT_ComponentFactory.h:42
SCT_MaterialManager
Definition: SCT_MaterialManager.h:21
SCT_FwdCoolingPipe::m_pipeRadius
double m_pipeRadius
Definition: SCT_FwdCoolingPipe.h:42
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
SCT_MaterialManager.h
SCT_GeometryManager::forwardParameters
const SCT_ForwardParameters * forwardParameters() const
Definition: SCT_GeometryManager.cxx:98
x
#define x
SCT_FwdCoolingPipe::m_numPipes
int m_numPipes
Definition: SCT_FwdCoolingPipe.h:41
pi
#define pi
Definition: TileMuonFitter.cxx:65
SCT_FwdCoolingPipe::m_length
double m_length
Definition: SCT_FwdCoolingPipe.h:46
SCT_FwdCoolingPipe::m_outerRadius
double m_outerRadius
Definition: SCT_FwdCoolingPipe.h:44
SCT_FwdCoolingPipe::SCT_FwdCoolingPipe
SCT_FwdCoolingPipe(const std::string &name, int numPipes, double innerRadius, double startPos, double endPos, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
Definition: SCT_FwdCoolingPipe.cxx:21
SCT_FwdCoolingPipe.h
SCT_FwdCoolingPipe::m_thickness
double m_thickness
Definition: SCT_FwdCoolingPipe.h:45
SCT_FwdCoolingPipe::m_zPosition
double m_zPosition
Definition: SCT_FwdCoolingPipe.h:47
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_FwdCoolingPipe::m_innerRadius
double m_innerRadius
Definition: SCT_FwdCoolingPipe.h:43
SCT_MaterialManager::getMaterial
const GeoMaterial * getMaterial(const std::string &materialName)
Definition: SCT_MaterialManager.cxx:51
SCT_FwdCoolingPipe::build
virtual GeoVPhysVol * build()
Definition: SCT_FwdCoolingPipe.cxx:49
SCT_FwdCoolingPipe::getParameters
void getParameters()
Definition: SCT_FwdCoolingPipe.cxx:41
SCT_SharedComponentFactory
Definition: SCT_ComponentFactory.h:56
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
SCT_ForwardParameters.h
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
sqr
double sqr(double x)
Definition: SCT_FwdCoolingPipe.cxx:19
SCT_ComponentFactory::getName
const std::string & getName() const
Definition: SCT_ComponentFactory.h:35
SCT_GeometryManager.h
SCT_GeometryManager
Definition: SCT_GeometryManager.h:25
SCT_FwdCoolingPipe::m_material
const GeoMaterial * m_material
Definition: SCT_FwdCoolingPipe.h:40
SCT_ForwardParameters
Definition: SCT_ForwardParameters.h:16