Skip to content

Commit 419e6e0

Browse files
alibuilddanielbattistini
authored andcommitted
Please consider the following formatting changes
1 parent f44c5e5 commit 419e6e0

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/TRKBaseParam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ enum eLayout {
2929
struct TRKBaseParam : public o2::conf::ConfigurableParamHelper<TRKBaseParam> {
3030
std::string configFile = "";
3131
float serviceTubeX0 = 0.02f; // X0 Al2O3
32-
eLayout layoutML = kCylinder; // Type of segmentation for the middle layers
33-
eLayout layoutOL = kCylinder; // Type of segmentation for the outer layers
32+
eLayout layoutML = kCylinder; // Type of segmentation for the middle layers
33+
eLayout layoutOL = kCylinder; // Type of segmentation for the outer layers
3434

3535
O2ParamDef(TRKBaseParam, "TRKBase");
3636
};

Detectors/Upgrades/ALICE3/TRK/simulation/include/TRKSimulation/TRKLayer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ class TRKLayer
3939
auto getNumber() const { return mLayerNumber; }
4040
auto getName() const { return mLayerName; }
4141

42-
TGeoVolume* createSensor(std::string type, double width=-1);
43-
TGeoVolume* createChip(std::string type, double width=-1);
44-
TGeoVolume* createStave(std::string type, double width=-1);
42+
TGeoVolume* createSensor(std::string type, double width = -1);
43+
TGeoVolume* createChip(std::string type, double width = -1);
44+
TGeoVolume* createStave(std::string type, double width = -1);
4545
void createLayer(TGeoVolume* motherVolume);
4646

4747
private:

Detectors/Upgrades/ALICE3/TRK/simulation/src/TRKLayer.cxx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ TGeoVolume* TRKLayer::createSensor(std::string type, double width)
5151
if (type == "cylinder") {
5252
sensor = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, mZ / 2);
5353
} else if (type == "flat") {
54-
if (width < 0) LOGP(fatal, "Attempting to create sensor with invalid width");
54+
if (width < 0)
55+
LOGP(fatal, "Attempting to create sensor with invalid width");
5556
sensor = new TGeoBBox(width / 2, mChipThickness / 2, mZ / 2);
5657
} else {
5758
LOGP(fatal, "Sensor of type '{}' is not implemented", type);
@@ -75,7 +76,8 @@ TGeoVolume* TRKLayer::createChip(std::string type, double width)
7576
chip = new TGeoTube(mInnerRadius, mInnerRadius + mChipThickness, mZ / 2);
7677
sensVol = createSensor("cylinder");
7778
} else if (type == "flat") {
78-
if (width < 0) LOGP(fatal, "Attempting to create chip with invalid width");
79+
if (width < 0)
80+
LOGP(fatal, "Attempting to create chip with invalid width");
7981
chip = new TGeoBBox(width / 2, mChipThickness / 2, mZ / 2);
8082
sensVol = createSensor("flat", width);
8183
} else {
@@ -94,7 +96,7 @@ TGeoVolume* TRKLayer::createStave(std::string type, double width)
9496
{
9597
TGeoMedium* medAir = gGeoManager->GetMedium("TRK_AIR$");
9698
std::string staveName = o2::trk::GeometryTGeo::getTRKStavePattern() + std::to_string(mLayerNumber);
97-
99+
98100
TGeoShape* stave;
99101
TGeoVolume* staveVol;
100102
TGeoVolume* chipVol;
@@ -106,7 +108,8 @@ TGeoVolume* TRKLayer::createStave(std::string type, double width)
106108
LOGP(info, "Inserting {} in {} ", chipVol->GetName(), staveVol->GetName());
107109
staveVol->AddNode(chipVol, 1, nullptr);
108110
} else if (type == "flat") {
109-
if (width < 0) LOGP(fatal, "Attempting to create stave with invalid width");
111+
if (width < 0)
112+
LOGP(fatal, "Attempting to create stave with invalid width");
110113
stave = new TGeoBBox(width / 2, mChipThickness / 2, mZ / 2);
111114
chipVol = createChip("flat", width);
112115
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
@@ -115,17 +118,17 @@ TGeoVolume* TRKLayer::createStave(std::string type, double width)
115118
} else if (type == "staggered") {
116119
double width = mModuleWidth * 2; // Each stave has two modules (based on the LOI design)
117120
stave = new TGeoBBox(width / 2, mChipThickness / 2, mZ / 2);
118-
TGeoVolume *chipVolLeft = createChip("flat", mModuleWidth);
119-
TGeoVolume *chipVolRight = createChip("flat", mModuleWidth);
121+
TGeoVolume* chipVolLeft = createChip("flat", mModuleWidth);
122+
TGeoVolume* chipVolRight = createChip("flat", mModuleWidth);
120123
staveVol = new TGeoVolume(staveName.c_str(), stave, medAir);
121124

122125
TGeoCombiTrans* transLeft = new TGeoCombiTrans();
123-
transLeft->SetTranslation(-mModuleWidth/2 + 0.05, 0, 0); // 1mm overlap between the modules
126+
transLeft->SetTranslation(-mModuleWidth / 2 + 0.05, 0, 0); // 1mm overlap between the modules
124127
LOGP(info, "Inserting {} in {} ", chipVolLeft->GetName(), staveVol->GetName());
125128
staveVol->AddNode(chipVolLeft, 0, transLeft);
126129

127130
TGeoCombiTrans* transRight = new TGeoCombiTrans();
128-
transRight->SetTranslation(mModuleWidth/2 - 0.05, 0.2, 0);
131+
transRight->SetTranslation(mModuleWidth / 2 - 0.05, 0.2, 0);
129132
LOGP(info, "Inserting {} in {} ", chipVolRight->GetName(), staveVol->GetName());
130133
staveVol->AddNode(chipVolRight, 1, transRight);
131134
} else {
@@ -158,7 +161,8 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
158161
} else if (mLayout == eLayout::kTurboStaves) {
159162
// Compute the number of staves
160163
double width = mModuleWidth; // Each stave has two modules (based on the LOI design)
161-
if (mInnerRadius > 25) width *= 2; // Outer layers have two modules per stave
164+
if (mInnerRadius > 25)
165+
width *= 2; // Outer layers have two modules per stave
162166

163167
int nStaves = (int)std::ceil(mInnerRadius * 2 * TMath::Pi() / width);
164168
nStaves += nStaves % 2; // Require an even number of staves

0 commit comments

Comments
 (0)