Skip to content

Commit bd2f90c

Browse files
Merge pull request #4 from alibuild/alibot-cleanup-15409
Please consider the following formatting changes to #15409
2 parents e1229ee + 8ba055d commit bd2f90c

3 files changed

Lines changed: 16 additions & 35 deletions

File tree

Detectors/Upgrades/ALICE3/FT3/simulation/include/FT3Simulation/FT3ModuleConstants.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const std::vector<double> x_midpoints = {
153153
38.25, 42.75, 47.25, 51.75, 56.25, 60.75, 65.25 // R
154154
};
155155
const double x_midpoint_spacing = 4.5; // assume constant for now
156-
const double maxToleranceInner = 0.; // default not allowed inwards
156+
const double maxToleranceInner = 0.; // default not allowed inwards
157157
const double maxToleranceOuter = 3.4; // leave 1mm for layer air encapsulation
158158
const std::vector<bool> staveOnFront =
159159
{
@@ -180,8 +180,8 @@ const std::vector<double> x_midpoints = {
180180
2.25, 6.75, 11.25, 15.75, 20.25, 24.75, 29.25, 33.75 // R
181181
};
182182
const double x_midpoint_spacing = 4.5;
183-
const double maxToleranceInner = 0.; // default not allowed inwards
184-
const double maxToleranceOuter = 3.4; // leave 1mm for layer air encapsulation
183+
const double maxToleranceInner = 0.; // default not allowed inwards
184+
const double maxToleranceOuter = 3.4; // leave 1mm for layer air encapsulation
185185
const std::vector<bool> staveOnFront =
186186
{
187187
1, 0, 1, 0, 1, 0, 1, 0, // L

Detectors/Upgrades/ALICE3/FT3/simulation/src/FT3Layer.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume)
459459

460460
// shift stave volumes into layer volume, since nominal z_{stave face} = 0
461461
double z_local_offset = z_layer_thickness / 2.0;
462-
// ensure staves fully encapsulated in the layer volume,
463-
// but don't cross out of max nominal radii of 38.5cm & 71.5cm respectively (3.5cm tolerance)
462+
// ensure staves fully encapsulated in the layer volume,
463+
// but don't cross out of max nominal radii of 38.5cm & 71.5cm respectively (3.5cm tolerance)
464464
TGeoTube* layer = new TGeoTube(mInnerRadius - 0.2, mOuterRadius + 3.49, z_layer_thickness / 2);
465465
layerVol = new TGeoVolume(mLayerName.c_str(), layer, medAir);
466466

Detectors/Upgrades/ALICE3/FT3/simulation/src/FT3Module.cxx

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,7 @@ void FT3Module::add2x1GlueVolume(
395395
unsigned volume_count, double x_mid, double y_mid, double z_mid,
396396
std::string element_glued_to)
397397
{
398-
std::string glue_name = "FT3glue_" + element_glued_to + "_"
399-
+ std::to_string(direction) + "_" + std::to_string(layerNumber) + "_"
400-
+ std::to_string(stave_idx) + "_" + std::to_string(volume_count);
398+
std::string glue_name = "FT3glue_" + element_glued_to + "_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
401399
addDetectorVolume(
402400
motherVolume, glue_name, Constants::glueColor, volume_count,
403401
x_mid, y_mid, z_mid,
@@ -412,9 +410,7 @@ void FT3Module::add2x1CopperVolume(
412410
TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
413411
unsigned volume_count, double x_mid, double y_mid, double z_mid)
414412
{
415-
std::string copper_name = "FT3Copper_" + std::to_string(direction) + "_"
416-
+ std::to_string(layerNumber) + "_" + std::to_string(stave_idx)
417-
+ "_" + std::to_string(volume_count);
413+
std::string copper_name = "FT3Copper_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
418414
addDetectorVolume(
419415
motherVolume, copper_name, Constants::CuColor, volume_count,
420416
x_mid, y_mid, z_mid,
@@ -429,9 +425,7 @@ void FT3Module::add2x1KaptonVolume(
429425
TGeoVolume* motherVolume, int layerNumber, int direction, unsigned stave_idx,
430426
unsigned volume_count, double x_mid, double y_mid, double z_mid)
431427
{
432-
std::string kapton_name = "FT3Kapton_" + std::to_string(direction) + "_"
433-
+ std::to_string(layerNumber) + "_" + std::to_string(stave_idx)
434-
+ "_" + std::to_string(volume_count);
428+
std::string kapton_name = "FT3Kapton_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
435429
addDetectorVolume(
436430
motherVolume, kapton_name, Constants::kaptonColor, volume_count,
437431
x_mid, y_mid, z_mid,
@@ -464,9 +458,7 @@ void FT3Module::addSingleSensorVolume(
464458
TGeoVolume* sensor;
465459
TGeoManager* geoManager = gGeoManager;
466460
// ACTIVE AREA
467-
std::string sensor_name = "FT3Sensor_" + std::to_string(direction) + "_"
468-
+ std::to_string(layerNumber) + "_" + std::to_string(stave_idx)
469-
+ "_" + std::to_string(volume_count);
461+
std::string sensor_name = "FT3Sensor_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
470462
sensor = geoManager->MakeBox(sensor_name.c_str(), siliconMed, Constants::active_width / 2,
471463
Constants::single_sensor_height / 2, Constants::siliconThickness / 2);
472464
sensor->SetLineColor(Constants::SiColor);
@@ -483,9 +475,7 @@ void FT3Module::addSingleSensorVolume(
483475
// INACTIVE STRIP ON LEFT OR RIGHT
484476
double inactive_x_mid = isLeft ? (active_x_mid - Constants::active_width / 2 - Constants::inactive_width / 2)
485477
: (active_x_mid + Constants::active_width / 2 + Constants::inactive_width / 2);
486-
std::string sensor_inactive_name = "FT3Sensor_Inactive_" + std::to_string(direction) + "_"
487-
+ std::to_string(layerNumber) + "_" + std::to_string(stave_idx)
488-
+ "_" + std::to_string(volume_count);
478+
std::string sensor_inactive_name = "FT3Sensor_Inactive_" + std::to_string(direction) + "_" + std::to_string(layerNumber) + "_" + std::to_string(stave_idx) + "_" + std::to_string(volume_count);
489479
sensor = geoManager->MakeBox(sensor_inactive_name.c_str(), siliconMed, Constants::inactive_width / 2,
490480
Constants::single_sensor_height / 2, Constants::siliconThickness / 2);
491481
sensor->SetLineColor(Constants::SiInactiveColor);
@@ -560,8 +550,7 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction
560550
// each entry is a vector, where each entry is the number of modules of that stack height
561551
std::vector<std::vector<unsigned>> nSensorStackCountPerStave(
562552
staveConfig.x_midpoints.size(),
563-
std::vector<unsigned>(Constants::kSensorsPerStack.size(), 0)
564-
);
553+
std::vector<unsigned>(Constants::kSensorsPerStack.size(), 0));
565554
std::vector<unsigned> nSensorStackTotal(Constants::kSensorsPerStack.size(), 0);
566555
unsigned staveVolumeCount = 0;
567556
for (unsigned i_stave = 0; i_stave < staveConfig.x_midpoints.size(); i_stave++) {
@@ -677,33 +666,25 @@ void FT3Module::create_layout_staveGeo(double mZ, int layerNumber, int direction
677666

678667
// now add the sensor positions on the stave
679668
for (unsigned i_kSens = 0; i_kSens < Constants::kSensorsPerStack.size(); i_kSens++) {
680-
unsigned nModulesCurr = y_positionsPosNeg.back().first.size()
681-
+ y_positionsPosNeg.back().second.size();
669+
unsigned nModulesCurr = y_positionsPosNeg.back().first.size() + y_positionsPosNeg.back().second.size();
682670
fill_stave(y_positionsPosNeg.back(), Rin, Rout, x_left,
683671
Constants::kSensorsPerStack[i_kSens], y_ranges,
684672
absAllowedYRange);
685-
unsigned nModulesAdded = y_positionsPosNeg.back().first.size()
686-
+ y_positionsPosNeg.back().second.size()
687-
- nModulesCurr;
673+
unsigned nModulesAdded = y_positionsPosNeg.back().first.size() + y_positionsPosNeg.back().second.size() - nModulesCurr;
688674
nSensorStackCountPerStave[i_stave][i_kSens] = nModulesAdded;
689675
nSensorStackTotal[i_kSens] += nModulesAdded;
690676
}
691-
std::string moduleDebugStr = "Module size counts for layer " + std::to_string(layerNumber)
692-
+ " in direction " + std::to_string(direction) + ":\n";
677+
std::string moduleDebugStr = "Module size counts for layer " + std::to_string(layerNumber) + " in direction " + std::to_string(direction) + ":\n";
693678
for (unsigned i_kSens = 0; i_kSens < Constants::kSensorsPerStack.size(); i_kSens++) {
694-
moduleDebugStr += "\t" + std::to_string(nSensorStackCountPerStave[i_stave][i_kSens])
695-
+ " modules with " + std::to_string(Constants::kSensorsPerStack[i_kSens])
696-
+ " sensors stacked\n";
679+
moduleDebugStr += "\t" + std::to_string(nSensorStackCountPerStave[i_stave][i_kSens]) + " modules with " + std::to_string(Constants::kSensorsPerStack[i_kSens]) + " sensors stacked\n";
697680
}
698681
LOG(debug) << moduleDebugStr;
699682
}
700683
std::string totalModuleInfoStr =
701684
"Total module size counts for layer " + std::to_string(layerNumber) +
702685
" in direction " + std::to_string(direction) + ":\n";
703686
for (unsigned i_kSens = 0; i_kSens < Constants::kSensorsPerStack.size(); i_kSens++) {
704-
totalModuleInfoStr += "\t" + std::to_string(nSensorStackTotal[i_kSens])
705-
+ " modules with " + std::to_string(Constants::kSensorsPerStack[i_kSens])
706-
+ " sensors stacked\n";
687+
totalModuleInfoStr += "\t" + std::to_string(nSensorStackTotal[i_kSens]) + " modules with " + std::to_string(Constants::kSensorsPerStack[i_kSens]) + " sensors stacked\n";
707688
}
708689
LOG(info) << totalModuleInfoStr;
709690

0 commit comments

Comments
 (0)