@@ -26,17 +26,15 @@ namespace o2
2626namespace trk
2727{
2828TRKLayer::TRKLayer (int layerNumber, std::string layerName, float rInn, float rOut, int numberOfModules, float layerX2X0)
29- : mLayerNumber (layerNumber), mLayout ( kCylinder ), mLayerName (layerName), mInnerRadius (rInn), mOuterRadius (rOut), mNumberOfModules (numberOfModules), mX2X0 (layerX2X0), mChipWidth (constants::moduleMLOT::chip::width), mChipLength (constants::moduleMLOT::chip::length), mDeadzoneWidth (constants::moduleMLOT::chip::passiveEdgeReadOut), mSensorThickness (constants::moduleMLOT::silicon::thickness), mHalfNumberOfChips ( 4 )
29+ : mLayerNumber (layerNumber), mLayerName (layerName), mInnerRadius (rInn), mOuterRadius (rOut), mNumberOfModules (numberOfModules), mX2X0 (layerX2X0)
3030{
31- float Si_X0 = 9 .5f ;
3231 mChipThickness = mX2X0 * Si_X0;
3332 LOGP (info, " Creating layer: id: {} rInner: {} rOuter: {} zLength: {} x2X0: {}" , mLayerNumber , mInnerRadius , mOuterRadius , getZ (), mX2X0 );
3433}
3534
3635TRKLayer::TRKLayer (int layerNumber, std::string layerName, float rInn, int numberOfModules, float thick)
37- : mLayerNumber (layerNumber), mLayout ( kCylinder ), mLayerName (layerName), mInnerRadius (rInn), mNumberOfModules (numberOfModules), mChipThickness (thick), mChipWidth (constants::moduleMLOT::chip::width), mChipLength (constants::moduleMLOT::chip::length), mDeadzoneWidth (constants::moduleMLOT::chip::passiveEdgeReadOut), mSensorThickness (constants::moduleMLOT::silicon::thickness), mHalfNumberOfChips ( 4 )
36+ : mLayerNumber (layerNumber), mLayerName (layerName), mInnerRadius (rInn), mNumberOfModules (numberOfModules), mChipThickness (thick)
3837{
39- float Si_X0 = 9 .5f ;
4038 mOuterRadius = rInn + thick;
4139 mX2X0 = mChipThickness / Si_X0;
4240 LOGP (info, " Creating layer: id: {} rInner: {} rOuter: {} zLength: {} x2X0: {}" , mLayerNumber , mInnerRadius , mOuterRadius , getZ (), mX2X0 );
@@ -300,12 +298,9 @@ TGeoVolume* TRKLayer::createStave(std::string type)
300298 } else if (type == " staggered" ) {
301299 double overlap = constants::moduleMLOT::gaps::outerEdgeLongSide + constants::moduleMLOT::chip::passiveEdgeReadOut + 0.1 ; // 1.5mm outer-edge + 1mm deadzone + 1mm (true)overlap
302300 double shift = overlap / 2 ;
303-
304301 double halfstaveWidth = constants::OT::halfstave::width;
305- double staveWidth = constants::OT::width - overlap;
306302
307- stave = new TGeoBBox (staveWidth / 2 , mLogicalVolumeThickness / 2 , staveLength / 2 );
308- staveVol = new TGeoVolume (staveName.c_str (), stave, medAir);
303+ staveVol = new TGeoVolumeAssembly (staveName.c_str ());
309304
310305 // Put the half staves in the correct position
311306 TGeoVolume* halfStaveVolLeft = createHalfStave (" flat" );
@@ -379,7 +374,7 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
379374 // Put the staves in the correct position and orientation
380375 TGeoCombiTrans* trans = new TGeoCombiTrans ();
381376 double theta = 360 . * iStave / nStaves;
382- TGeoRotation* rot = new TGeoRotation (" rot" , theta - 90 + 3 , 0 , 0 );
377+ TGeoRotation* rot = new TGeoRotation (" rot" , theta - 90 + 4 , 0 , 0 );
383378 trans->SetRotation (rot);
384379 trans->SetTranslation (mInnerRadius * std::cos (2 . * TMath::Pi () * iStave / nStaves), mInnerRadius * std::sin (2 * TMath::Pi () * iStave / nStaves), 0 );
385380
@@ -413,7 +408,7 @@ void TRKLayer::createLayer(TGeoVolume* motherVolume)
413408 // Put the staves in the correct position and orientation
414409 TGeoCombiTrans* trans = new TGeoCombiTrans ();
415410 double theta = 360 . * iStave / nStaves;
416- TGeoRotation* rot = new TGeoRotation (" rot" , theta - 90 + 3 , 0 , 0 );
411+ TGeoRotation* rot = new TGeoRotation (" rot" , theta - 90 , 0 , 0 );
417412 trans->SetRotation (rot);
418413 trans->SetTranslation (mInnerRadius * std::cos (2 . * TMath::Pi () * iStave / nStaves), mInnerRadius * std::sin (2 * TMath::Pi () * iStave / nStaves), 0 );
419414
0 commit comments