ATLAS Offline Software
ConvertStaveServices.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "ConvertStaveServices.h"
6 #include "StaveServices.h"
7 #include "CcawUtils.h"
8 #include <sstream>
9 
12 {
13  std::string name = constructName( stServ.type(), stServ.part(), stServ.layer());
15 
16  std::string hvCableName = getHvCableName( stServ.type(), stServ.part(), stServ.layer());
17  result.addEntry( hvCableName, stServ.numHV(), true);
18 
19  for (int i=0; i< stServ.numLvTypes(); i++) {
20  int gauge = stServ.lvGauge(i);
21  std::string lvConductorName = getLvConductorName( stServ.type(), stServ.part(), stServ.layer());
22  std::string lvInsulatorName = getLvInsulatorName( stServ.type(), stServ.part(), stServ.layer());
23  // two cables of each type assumed; if a thicker cable should be split in several thinner ones for engineering reasons
24  // this should not change the amount of material significantly.
25  result.addEntry( lvConductorName, 2, true, ccaw::conductorWeight(gauge));
26  result.addEntry( lvInsulatorName, 2, true, ccaw::insulatorWeight(gauge));
27  }
28 
29  std::string dcsCableName = getDcsCableName( stServ.type(), stServ.part(), stServ.layer());
30  result.addEntry( dcsCableName, stServ.numDCS(), true);
31 
32  std::string dataCableName = getDataCableName( stServ.type(), stServ.part(), stServ.layer());
33  result.addEntry( dataCableName, stServ.numData(), true);
34 
35  // Add shielding and sleeving for thw whole bundle, for bundle diameter 6 mm
36  result.addEntry( "ShieldingSleeve", 1, true);
37  result.addEntry( "ProtectionSleeve", 1, true);
38 
39  return result;
40 }
41 
42 inline double area (double R) {return M_PI*R*R;}
43 
44 inline double pipeWeight( double R, double thick) {
45  double Ti_dens = 4.54e3; // kg/m3
46  return (area(R+thick)-area(R))*Ti_dens;
47 }
48 
49 
51  int nStaves, ServiceMaterial& mat)
52 {
53  int manifoldFactor = 1;
54 
55  double pipesPerStave;
56  if (layerNumber < 2 && type == DetType::Pixel && part == DetType::Barrel) pipesPerStave = 1;
57  else pipesPerStave = 2;
58 
59  double dInlets = nStaves * pipesPerStave / 2. / manifoldFactor;
60  int nInlets = int(dInlets);
61  if (dInlets - int(dInlets) > 0.001) nInlets++; // smallest int larger than dInlets
62 
63  // Fixme: Hard-wired numbers, only valid if no manifolding
64  double inletR = 1.e-3;
65  double outletR = 1.e-3;
66  if ( type != DetType::Pixel) outletR = 1.5e-3;
67 
68  mat.addEntry( "std::Titanium", nInlets, true, pipeWeight( inletR, 1.e-4) + pipeWeight( outletR, 1.e-4));
69 
70  double collantDensity = 0.6e3; // kg/m3, approx for 60% liquid fraction at -40, ignore liquid fraction diff between inlet and outlet
71  mat.addEntry( "pix::CO2_Liquid", nInlets, true, (area(inletR)+area(outletR)) * collantDensity);
72 }
73 
74 
75 
77 {
78  std::string name = DetType::name(type, part) + "Services_L";
79  std::ostringstream os;
80  os << layer;
81  return name + os.str();
82 }
83 
84 
85 std::string ConvertStaveServices::getHvCableName( DetType::Type /*type*/, DetType::Part /*part*/, int /*layer*/) const
86 {
87  // FIXME: should come from DB?
88  return "TwistedPair_awg36"; // for all strip and pixel
89 }
90 std::string ConvertStaveServices::getDcsCableName( DetType::Type /*type*/, DetType::Part /*part*/, int /*layer*/) const
91 {
92  // FIXME: should come from DB?
93  return "ScreenedTwistP_36"; // for all strip and pixel
94 }
95 std::string ConvertStaveServices::getDataCableName( DetType::Type /*type*/, DetType::Part /*part*/, int /*layer*/) const
96 {
97  // FIXME: should come from DB?
98  return "Twinax"; // for all strip and pixel
99 }
100 
101 std::string ConvertStaveServices::getLvConductorName( DetType::Type /*type*/, DetType::Part /*part*/, int /*layer*/) const
102 {
103  // FIXME: should come from DB?
104  return "CCAW";
105 }
106 std::string ConvertStaveServices::getLvInsulatorName( DetType::Type /*type*/, DetType::Part /*part*/, int /*layer*/) const
107 {
108  // FIXME: should come from DB?
109  return "Polyetherimide";
110 }
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
ConvertStaveServices::getHvCableName
std::string getHvCableName(DetType::Type type, DetType::Part part, int layer) const
Definition: ConvertStaveServices.cxx:85
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
CcawUtils.h
ConvertStaveServices::addCooling
void addCooling(DetType::Type type, DetType::Part part, int layerNumber, int nStaves, ServiceMaterial &mat)
Definition: ConvertStaveServices.cxx:50
get_generator_info.result
result
Definition: get_generator_info.py:21
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
StaveServices
Class storing all the services of a stave (or a petal, etc...) classifying them by function and by nu...
Definition: StaveServices.h:15
M_PI
#define M_PI
Definition: ActiveFraction.h:11
StaveServices::lvGauge
int lvGauge(int lvType) const
Definition: StaveServices.h:36
StaveServices.h
DetType::Barrel
@ Barrel
Definition: DetType.h:14
ConvertStaveServices::getDcsCableName
std::string getDcsCableName(DetType::Type type, DetType::Part part, int layer) const
Definition: ConvertStaveServices.cxx:90
ConvertStaveServices::constructName
std::string constructName(DetType::Type type, DetType::Part part, int layer) const
Definition: ConvertStaveServices.cxx:76
ConvertStaveServices::convertStaveServices
ServiceMaterial convertStaveServices(const StaveServices &stServ) const
Definition: ConvertStaveServices.cxx:11
DetType::Pixel
@ Pixel
Definition: DetType.h:13
lumiFormat.i
int i
Definition: lumiFormat.py:85
DetType::name
std::string name(Type t)
Definition: DetType.h:16
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
ConvertStaveServices.h
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
StaveServices::numLvTypes
int numLvTypes() const
Definition: StaveServices.h:35
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
DetType::Type
Type
Definition: DetType.h:13
ServiceMaterial
Definition: ServiceMaterial.h:12
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
StaveServices::layer
int layer() const
Definition: StaveServices.h:30
StaveServices::part
DetType::Part part() const
Definition: StaveServices.h:29
ccaw::insulatorWeight
double insulatorWeight(int gauge, double thick=90.e-6, double dens=1.27e3)
Weight per unit of length for the insulator.
Definition: CcawUtils.h:33
StaveServices::numData
int numData() const
Definition: StaveServices.h:34
StaveServices::numDCS
int numDCS() const
Definition: StaveServices.h:33
ConvertStaveServices::getLvInsulatorName
std::string getLvInsulatorName(DetType::Type type, DetType::Part part, int layer) const
Definition: ConvertStaveServices.cxx:106
ccaw::conductorWeight
double conductorWeight(int gauge)
Weight per unit of length for the CCAW conductor, in kg/meter.
Definition: CcawUtils.h:28
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DetType::Part
Part
Definition: DetType.h:14
ConvertStaveServices::getDataCableName
std::string getDataCableName(DetType::Type type, DetType::Part part, int layer) const
Definition: ConvertStaveServices.cxx:95
ConvertStaveServices::getLvConductorName
std::string getLvConductorName(DetType::Type type, DetType::Part part, int layer) const
Definition: ConvertStaveServices.cxx:101
StaveServices::numHV
int numHV() const
Definition: StaveServices.h:32
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
pipeWeight
double pipeWeight(double R, double thick)
Definition: ConvertStaveServices.cxx:44
StaveServices::type
DetType::Type type() const
Definition: StaveServices.h:28