Skip to content

Commit e0c38f5

Browse files
committed
Give new geometry creation an FT3Layout enum and change Layer&Module accordingly. Also simplify create_layout_scopingV3 function since the layout_type isn't needed.
1 parent 59ebef3 commit e0c38f5

5 files changed

Lines changed: 19 additions & 14 deletions

File tree

Detectors/Upgrades/ALICE3/FT3/base/include/FT3Base/FT3BaseParam.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ enum eFT3Layout {
2424
kCylindrical = 0,
2525
kTrapezoidal,
2626
kSegmented,
27+
kSegmentedMarch26,
28+
kSegmentedStave,
2729
};
2830
struct FT3BaseParam : public o2::conf::ConfigurableParamHelper<FT3BaseParam> {
2931
// Geometry Builder parameters
30-
eFT3Layout layoutFT3 = kSegmented;
32+
eFT3Layout layoutFT3 = kSegmentedMarch26;
3133
int nTrapezoidalSegments = 32; // for the simple trapezoidal disks
3234

3335
// FT3Geometry::Telescope parameters

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
using PositionType = std::pair<double, unsigned>;
2626
using PositionTypes = std::vector<PositionType>;
2727
using PosNegPositionTypes = std::pair<PositionTypes, PositionTypes>;
28-
namespace Constants = FT3ModuleConstants;
28+
namespace Constants = o2::ft3::ModuleConstants;
2929

3030
class FT3Module
3131
{
@@ -52,8 +52,7 @@ class FT3Module
5252

5353
void createModule_scopingV3(
5454
double mZ, int layerNumber, int direction, double Rin,
55-
double Rout, double overlap,
56-
const std::string& layout_type, TGeoVolume* motherVolume);
55+
double Rout, double overlap, TGeoVolume* motherVolume);
5756

5857
private:
5958
static void create_layout(
@@ -63,8 +62,7 @@ class FT3Module
6362

6463
void create_layout_scopingV3(
6564
double mZ, int layerNumber, int direction, double Rin,
66-
double Rout, double overlap,
67-
const std::string& layout_type, TGeoVolume* motherVolume);
65+
double Rout, double overlap, TGeoVolume* motherVolume);
6866

6967
// Helper functions
7068
void fill_stave(PosNegPositionTypes& y_positions, double Rout,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <map>
2020
#include <TColor.h>
2121

22-
namespace FT3ModuleConstants
22+
namespace o2::ft3::ModuleConstants
2323
{
2424
/* CURRENT STATUS:
2525
* 25x32mm sensors, 2mm inactive on one side

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume)
381381

382382
LOG(info) << "Inserting " << layerVol->GetName() << " inside " << motherVolume->GetName();
383383
motherVolume->AddNode(layerVol, 1, FwdDiskCombiTrans);
384-
} else if (ft3Params.layoutFT3 == kSegmented) {
384+
} else if (ft3Params.layoutFT3 == kSegmented || ft3Params.layoutFT3 == kSegmentedMarch26) {
385385
FT3Module module;
386386

387387
// layer structure
@@ -398,9 +398,15 @@ void FT3Layer::createLayer(TGeoVolume* motherVolume)
398398
createSeparationLayer(layerVol, separationLayerName);
399399

400400
// create disk faces
401-
module.createModule(0, mLayerNumber, mDirection, mInnerRadius, mOuterRadius, 0., "front", "rectangular", layerVol);
402-
module.createModule(0, mLayerNumber, mDirection, mInnerRadius, mOuterRadius, 0., "back", "rectangular", layerVol);
403-
401+
if (ft3Params.layoutFT3 == kSegmented) {
402+
module.createModule(0, mLayerNumber, mDirection, mInnerRadius, mOuterRadius, 0., "front", "rectangular", layerVol);
403+
module.createModule(0, mLayerNumber, mDirection, mInnerRadius, mOuterRadius, 0., "back", "rectangular", layerVol);
404+
} else if (ft3Params.layoutFT3 == kSegmentedMarch26) {
405+
module.createModule_scopingV3(0, mLayerNumber, mDirection, mInnerRadius,
406+
mOuterRadius, 0., layerVol);
407+
module.createModule_scopingV3(0, mLayerNumber, mDirection, mInnerRadius,
408+
mOuterRadius, 0., layerVol);
409+
}
404410
// Finally put everything in the mother volume
405411
auto* FwdDiskRotation = new TGeoRotation("FwdDiskRotation", 0, 0, 180);
406412
auto* FwdDiskCombiTrans = new TGeoCombiTrans(0, 0, mZ, FwdDiskRotation);

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ void FT3Module::addSingleSensorVolume(
308308

309309
void FT3Module::create_layout_scopingV3(double mZ, int layerNumber, int direction,
310310
double Rin, double Rout, double overlap,
311-
const std::string& layout_type, TGeoVolume* motherVolume)
311+
TGeoVolume* motherVolume)
312312
{
313313
LOG(info) << "FT3Module: create_layout_scopingV3 - Layer "
314314
<< layerNumber << ", Direction " << direction;
@@ -1096,10 +1096,9 @@ void FT3Module::createModule(double mZ, int layerNumber, int direction, double R
10961096

10971097
void FT3Module::createModule_scopingV3(double mZ, int layerNumber, int direction,
10981098
double Rin, double Rout, double overlap,
1099-
const std::string& layout_type,
11001099
TGeoVolume* motherVolume) {
11011100
LOG(debug) << "FT3Module: createModule_scopingV3 - Layer " << layerNumber
11021101
<< ", Direction " << direction;
1103-
create_layout_scopingV3(mZ, layerNumber, direction, Rin, Rout, overlap, layout_type, motherVolume);
1102+
create_layout_scopingV3(mZ, layerNumber, direction, Rin, Rout, overlap, motherVolume);
11041103
LOG(debug) << "FT3Module: done createModule_scopingV3";
11051104
}

0 commit comments

Comments
 (0)