11 int nModulesPerStave,
int nChipsPerModule,
16 <<
" with " << nModulesPerStave <<
" modulesPerStave and "
17 << nChipsPerModule <<
" chipsPerModule" <<
endmsg;
22 const int HV_grouping = 4;
23 const int nDCS_Pixel = 10;
24 const int nDCS_Strip = 10;
25 const int max_SP_group_size = 8;
28 int nHV = nModulesPerStave / HV_grouping;
29 if (nModulesPerStave % HV_grouping != 0) ++nHV;
41 int Data_grouping = 10;
42 if (layerNumber > 2) Data_grouping = 20;
43 int nChips = nModulesPerStave * nChipsPerModule;
44 int nData = nChips/Data_grouping;
45 if (nChips % Data_grouping != 0) ++nData;
48 double chipCurrent = 0.5;
49 double chipVoltage = 2.4;
50 double poweringLoss = 0.2;
51 double lossInCable = 0.1;
52 double cableLen = 3.0;
54 double moduleCurrent = chipCurrent * nChipsPerModule;
55 double moduleVoltage = chipVoltage;
60 if (nModulesPerStave > max_SP_group_size) {
61 nGroups = nModulesPerStave / max_SP_group_size;
62 if (nModulesPerStave % max_SP_group_size != 0) nGroups++;
64 msg <<
MSG::DEBUG <<
"Using " << nGroups <<
" powering groups with " << max_SP_group_size <<
" modules each" << endl;
67 int lvGauge = computeLVGaugeSerial(
type,
part, layerNumber,
68 nModules, moduleCurrent, moduleVoltage,
69 poweringLoss, lossInCable, cableLen,
72 std::vector<int> lvg( nGroups, lvGauge);
93 int nModules,
double moduleCurrent,
double moduleVoltage,
94 double poweringLoss,
double lossInCable,
double cableLen,
107 double cableCurrent = moduleCurrent;
108 double staveVoltage = moduleVoltage *
nModules / (1.-poweringLoss);
109 double stavePower = cableCurrent*staveVoltage;
110 double cablePowerDissipation = stavePower * lossInCable;
111 if (cablePowerDissipation < 2.) cablePowerDissipation = 2.;
113 double cableResistivity = cablePowerDissipation / (cableCurrent*cableCurrent);
114 double resistivityPerMeter = cableResistivity / (2*cableLen);
119 <<
" SP loop power " << stavePower <<
" [W], current " << moduleCurrent
121 <<
" [W], desired resistivity " << resistivityPerMeter
122 <<
" [Ohm/m], closest gauge " << gauge << endl;