@@ -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