ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
42inline double area (double R) {return M_PI*R*R;}
43
44inline 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
85std::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}
90std::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}
95std::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
101std::string ConvertStaveServices::getLvConductorName( DetType::Type /*type*/, DetType::Part /*part*/, int /*layer*/) const
102{
103 // FIXME: should come from DB?
104 return "CCAW";
105}
106std::string ConvertStaveServices::getLvInsulatorName( DetType::Type /*type*/, DetType::Part /*part*/, int /*layer*/) const
107{
108 // FIXME: should come from DB?
109 return "Polyetherimide";
110}
#define M_PI
double area(double R)
double pipeWeight(double R, double thick)
std::string getHvCableName(DetType::Type type, DetType::Part part, int layer) const
ServiceMaterial convertStaveServices(const StaveServices &stServ) const
void addCooling(DetType::Type type, DetType::Part part, int layerNumber, int nStaves, ServiceMaterial &mat)
std::string getDataCableName(DetType::Type type, DetType::Part part, int layer) const
std::string getLvConductorName(DetType::Type type, DetType::Part part, int layer) const
std::string getLvInsulatorName(DetType::Type type, DetType::Part part, int layer) const
std::string constructName(DetType::Type type, DetType::Part part, int layer) const
std::string getDcsCableName(DetType::Type type, DetType::Part part, int layer) const
Class storing all the services of a stave (or a petal, etc...) classifying them by function and by nu...
int lvGauge(int lvType) const
int numHV() const
int numData() const
int numDCS() const
DetType::Part part() const
int numLvTypes() const
int layer() const
DetType::Type type() const
@ Pixel
Definition DetType.h:13
@ Barrel
Definition DetType.h:14
std::string name(Type t)
Definition DetType.h:16
double conductorWeight(int gauge)
Weight per unit of length for the CCAW conductor, in kg/meter.
Definition CcawUtils.h:28
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