@@ -197,7 +197,7 @@ TGeoVolume* TRKLayer::createStave(std::string type)
197197 LOGP (info, " Inserting {} in {} " , moduleVol->GetName (), staveVol->GetName ());
198198 staveVol->AddNode (moduleVol, 1 , nullptr );
199199 } else if (type == " flat" ) {
200- double moduleLength = constants::ML ::length;
200+ double moduleLength = constants::moduleMLOT ::length;
201201 double staveWidth = constants::ML::width;
202202 double staveLength = constants::ML::length;
203203
@@ -208,7 +208,7 @@ TGeoVolume* TRKLayer::createStave(std::string type)
208208 TGeoVolume* moduleVol = createModule (" flat" );
209209
210210 // Put the modules in the correct position
211- double zPos = -0.5 * ( mNumberOfModules - 1 ) * moduleLength + iModule * moduleLength;
211+ double zPos = -0.5 * mNumberOfModules * moduleLength + ( iModule + 0.5 ) * moduleLength;
212212
213213 TGeoCombiTrans* trans = new TGeoCombiTrans ();
214214 trans->SetTranslation (0 , 0 , zPos); // TO BE CHECKED !!!
@@ -232,7 +232,7 @@ TGeoVolume* TRKLayer::createStave(std::string type)
232232 // Put the modules in the correct position
233233 double xLeft = -moduleWidth / 2 + 0.05 ;
234234 double xRight = moduleWidth / 2 - 0.05 ;
235- double zPos = -0.5 * ( mNumberOfModules - 1 ) * moduleLength + iModule * moduleLength;
235+ double zPos = -0.5 * mNumberOfModules * moduleLength + ( iModule + 0.5 ) * moduleLength;
236236
237237 TGeoCombiTrans* transLeft = new TGeoCombiTrans ();
238238 transLeft->SetTranslation (xLeft, 0 , zPos); // TO BE CHECKED !!! 1mm overlap between the modules
@@ -277,7 +277,6 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
277277 double staveWidth = constants::ML::width; // Each stave has two modules (based on the LOI design)
278278
279279 if (mInnerRadius > 25 ) {
280- layerLength = constants::OT::length;
281280 staveWidth = constants::OT::width; // Outer layers have two modules per stave
282281 }
283282
0 commit comments