From c0d05cf1be0f762ae9d9401d7d25bb219e28f612 Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Thu, 3 Aug 2023 16:35:20 -0400 Subject: [PATCH 01/10] fix stave staggering --- Core/tests/src/test_deut_stave_positions.cpp | 62 ++++++++- Detector/UT/src/UT_geo.cpp | 101 +++++++------- compact/trunk/UT/parameters.xml | 135 ++++++++++--------- 3 files changed, 175 insertions(+), 123 deletions(-) diff --git a/Core/tests/src/test_deut_stave_positions.cpp b/Core/tests/src/test_deut_stave_positions.cpp index 08c2c5dfe..c969972f8 100644 --- a/Core/tests/src/test_deut_stave_positions.cpp +++ b/Core/tests/src/test_deut_stave_positions.cpp @@ -71,7 +71,7 @@ static long test_ut_stave_positions( dd4hep::Detector& description, int argc, ch bool allChecksOK{true}; std::map<std::string, ROOT::Math::XYZPoint> stave_positions{ - {"UTCsideUTaUStave1", ROOT::Math::XYZPoint{-47.0, 0.0, 2365}}, + {"UTCsideUTaUStave1", ROOT::Math::XYZPoint{-47.0, 4.096, 2365}}, {"UTCsideUTaUStave2", ROOT::Math::XYZPoint{-143.3, 0.0, 2380}}, {"UTCsideUTaUStave3", ROOT::Math::XYZPoint{-237.6, 0.0, 2365}}, {"UTCsideUTaUStave4", ROOT::Math::XYZPoint{-335.2, 0.0, 2380}}, @@ -79,7 +79,7 @@ static long test_ut_stave_positions( dd4hep::Detector& description, int argc, ch {"UTCsideUTaUStave6", ROOT::Math::XYZPoint{-527.1, 0.0, 2380}}, {"UTCsideUTaUStave7", ROOT::Math::XYZPoint{-619.2, 0.0, 2365}}, {"UTCsideUTaUStave8", ROOT::Math::XYZPoint{-719.0, 0.0, 2380}}, - {"UTAsideUTaUStave1", ROOT::Math::XYZPoint{47.0, 0.0, 2380}}, + {"UTAsideUTaUStave1", ROOT::Math::XYZPoint{47.0, -4.096, 2380}}, {"UTAsideUTaUStave2", ROOT::Math::XYZPoint{142.1, 0.0, 2365}}, {"UTAsideUTaUStave3", ROOT::Math::XYZPoint{239, 0.0, 2380}}, {"UTAsideUTaUStave4", ROOT::Math::XYZPoint{332.9, 0.0, 2365}}, @@ -103,7 +103,7 @@ static long test_ut_stave_positions( dd4hep::Detector& description, int argc, ch {"UTAsideUTaXStave6", ROOT::Math::XYZPoint{523.8, 0.0, 2310}}, {"UTAsideUTaXStave7", ROOT::Math::XYZPoint{623.2, 0.0, 2325}}, {"UTAsideUTaXStave8", ROOT::Math::XYZPoint{714.6, 0.0, 2310}}, - {"UTCsideUTbVStave1", ROOT::Math::XYZPoint{-47, 0.0, 2590}}, + {"UTCsideUTbVStave1", ROOT::Math::XYZPoint{-47, -4.096, 2590}}, {"UTCsideUTbVStave2", ROOT::Math::XYZPoint{-143.3, 0.0, 2605}}, {"UTCsideUTbVStave3", ROOT::Math::XYZPoint{-237.9, 0.0, 2590}}, {"UTCsideUTbVStave4", ROOT::Math::XYZPoint{-335.2, 0.0, 2605}}, @@ -112,7 +112,7 @@ static long test_ut_stave_positions( dd4hep::Detector& description, int argc, ch {"UTCsideUTbVStave7", ROOT::Math::XYZPoint{-619.6, 0.0, 2590}}, {"UTCsideUTbVStave8", ROOT::Math::XYZPoint{-719.2, 0.0, 2605}}, {"UTCsideUTbVStave9", ROOT::Math::XYZPoint{-810.5, 0.0, 2590}}, - {"UTAsideUTbVStave1", ROOT::Math::XYZPoint{47, 0.0, 2605}}, + {"UTAsideUTbVStave1", ROOT::Math::XYZPoint{47, 4.096, 2605}}, {"UTAsideUTbVStave2", ROOT::Math::XYZPoint{142.3, 0.0, 2590}}, {"UTAsideUTbVStave3", ROOT::Math::XYZPoint{239, 0.0, 2605}}, {"UTAsideUTbVStave4", ROOT::Math::XYZPoint{333, 0.0, 2590}}, @@ -139,17 +139,55 @@ static long test_ut_stave_positions( dd4hep::Detector& description, int argc, ch {"UTAsideUTbXStave7", ROOT::Math::XYZPoint{623, 0.0, 2660}}, {"UTAsideUTbXStave8", ROOT::Math::XYZPoint{714.9, 0.0, 2645}}, {"UTAsideUTbXStave9", ROOT::Math::XYZPoint{814.9, 0.0, 2660}}}; + + std::map<std::string, std::string> stave_names{ + {"UTCsideUTaXStave1", "UTaXLayerR2Stave2"}, {"UTCsideUTaXStave2", "UTaXLayerR2Stave1"}, + {"UTCsideUTaXStave3", "UTaXLayerR1Stave7"}, {"UTCsideUTaXStave4", "UTaXLayerR1Stave6"}, + {"UTCsideUTaXStave5", "UTaXLayerR1Stave5"}, {"UTCsideUTaXStave6", "UTaXLayerR1Stave4"}, + {"UTCsideUTaXStave7", "UTaXLayerR1Stave3"}, {"UTCsideUTaXStave8", "UTaXLayerR1Stave2"}, + {"UTCsideUTaUStave1", "UTaULayerR2Stave2"}, {"UTCsideUTaUStave2", "UTaULayerR2Stave1"}, + {"UTCsideUTaUStave3", "UTaULayerR1Stave7"}, {"UTCsideUTaUStave4", "UTaULayerR1Stave6"}, + {"UTCsideUTaUStave5", "UTaULayerR1Stave5"}, {"UTCsideUTaUStave6", "UTaULayerR1Stave4"}, + {"UTCsideUTaUStave7", "UTaULayerR1Stave3"}, {"UTCsideUTaUStave8", "UTaULayerR1Stave2"}, + {"UTCsideUTbVStave1", "UTbVLayerR2Stave2"}, {"UTCsideUTbVStave2", "UTbVLayerR2Stave1"}, + {"UTCsideUTbVStave3", "UTbVLayerR1Stave7"}, {"UTCsideUTbVStave4", "UTbVLayerR1Stave6"}, + {"UTCsideUTbVStave5", "UTbVLayerR1Stave5"}, {"UTCsideUTbVStave6", "UTbVLayerR1Stave4"}, + {"UTCsideUTbVStave7", "UTbVLayerR1Stave3"}, {"UTCsideUTbVStave8", "UTbVLayerR1Stave2"}, + {"UTCsideUTbVStave9", "UTbVLayerR1Stave1"}, {"UTCsideUTbXStave1", "UTbXLayerR2Stave2"}, + {"UTCsideUTbXStave2", "UTbXLayerR2Stave1"}, {"UTCsideUTbXStave3", "UTbXLayerR1Stave7"}, + {"UTCsideUTbXStave4", "UTbXLayerR1Stave6"}, {"UTCsideUTbXStave5", "UTbXLayerR1Stave5"}, + {"UTCsideUTbXStave6", "UTbXLayerR1Stave4"}, {"UTCsideUTbXStave7", "UTbXLayerR1Stave3"}, + {"UTCsideUTbXStave8", "UTbXLayerR1Stave2"}, {"UTCsideUTbXStave9", "UTbXLayerR1Stave1"}, + {"UTAsideUTaXStave1", "UTaXLayerR2Stave3"}, {"UTAsideUTaXStave2", "UTaXLayerR2Stave4"}, + {"UTAsideUTaXStave3", "UTaXLayerR3Stave1"}, {"UTAsideUTaXStave4", "UTaXLayerR3Stave2"}, + {"UTAsideUTaXStave5", "UTaXLayerR3Stave3"}, {"UTAsideUTaXStave6", "UTaXLayerR3Stave4"}, + {"UTAsideUTaXStave7", "UTaXLayerR3Stave5"}, {"UTAsideUTaXStave8", "UTaXLayerR3Stave6"}, + {"UTAsideUTaUStave1", "UTaULayerR2Stave3"}, {"UTAsideUTaUStave2", "UTaULayerR2Stave4"}, + {"UTAsideUTaUStave3", "UTaULayerR3Stave1"}, {"UTAsideUTaUStave4", "UTaULayerR3Stave2"}, + {"UTAsideUTaUStave5", "UTaULayerR3Stave3"}, {"UTAsideUTaUStave6", "UTaULayerR3Stave4"}, + {"UTAsideUTaUStave7", "UTaULayerR3Stave5"}, {"UTAsideUTaUStave8", "UTaULayerR3Stave6"}, + {"UTAsideUTbVStave1", "UTbVLayerR2Stave3"}, {"UTAsideUTbVStave2", "UTbVLayerR2Stave4"}, + {"UTAsideUTbVStave3", "UTbVLayerR3Stave1"}, {"UTAsideUTbVStave4", "UTbVLayerR3Stave2"}, + {"UTAsideUTbVStave5", "UTbVLayerR3Stave3"}, {"UTAsideUTbVStave6", "UTbVLayerR3Stave4"}, + {"UTAsideUTbVStave7", "UTbVLayerR3Stave5"}, {"UTAsideUTbVStave8", "UTbVLayerR3Stave6"}, + {"UTAsideUTbVStave9", "UTbVLayerR3Stave7"}, {"UTAsideUTbXStave1", "UTbXLayerR2Stave3"}, + {"UTAsideUTbXStave2", "UTbXLayerR2Stave4"}, {"UTAsideUTbXStave3", "UTbXLayerR3Stave1"}, + {"UTAsideUTbXStave4", "UTbXLayerR3Stave2"}, {"UTAsideUTbXStave5", "UTbXLayerR3Stave3"}, + {"UTAsideUTbXStave6", "UTbXLayerR3Stave4"}, {"UTAsideUTbXStave7", "UTbXLayerR3Stave5"}, + {"UTAsideUTbXStave8", "UTbXLayerR3Stave6"}, {"UTAsideUTbXStave9", "UTbXLayerR3Stave7"}}; + for ( const auto& side : ut.sides() ) for ( const auto& layer : side.layers() ) for ( const auto& stave : layer.staves() ) { ROOT::Math::XYZPoint stavePos = stave.toGlobal( ROOT::Math::XYZPoint{0.0, 0.0, 0.0} ); ROOT::Math::XYZPoint staveTruePos = stave_positions[stave.nickname()]; auto diff = staveTruePos - stavePos; - if ( diff.r() > 1e-5 ) { + if ( diff.r() > 1e-3 ) { + allChecksOK = false; dd4hep::printout( dd4hep::WARNING, "UT", fmt::format( "{stavePath} Pos: {x:>6.1f} {y:>4.1f} {z:>6.1f}, True: {x_true:>6.1f} {y_true:>4.1f} " - "{z_true:>6.1f}, Diff: {x_diff:>6.1f} {y_diff:>4.1f} {z_diff:>6.1f}", + "{z_true:>6.1f}, Diff: {x_diff:>6.4f} {y_diff:>4.4f} {z_diff:>6.4f}", fmt::arg( "stavePath", stave.nickname() ), fmt::arg( "x", stavePos.x() ), fmt::arg( "y", stavePos.y() ), fmt::arg( "z", stavePos.z() ), fmt::arg( "x_true", staveTruePos.x() ), fmt::arg( "y_true", staveTruePos.y() ), @@ -158,6 +196,18 @@ static long test_ut_stave_positions( dd4hep::Detector& description, int argc, ch } } + for ( const auto& side : ut.sides() ) + for ( const auto& layer : side.layers() ) + for ( const auto& stave : layer.staves() ) { + if ( stave.nicknameOld() != stave_names[stave.nickname()] ) { + allChecksOK = false; + dd4hep::printout( dd4hep::WARNING, "UT", + fmt::format( "Stave old nickname {stavePathOld}, expected {stavePathOldTrue}", + fmt::arg( "stavePathOld", stave.nicknameOld() ), + fmt::arg( "stavePathOldTrue", stave_names[stave.nickname()] ) ) ); + } + } + // Finalizing the service and returning dds.finalize(); diff --git a/Detector/UT/src/UT_geo.cpp b/Detector/UT/src/UT_geo.cpp index ff7f87df9..385309fef 100644 --- a/Detector/UT/src/UT_geo.cpp +++ b/Detector/UT/src/UT_geo.cpp @@ -805,38 +805,38 @@ namespace { pv.addPhysVolID( "layer", 0 ); deLayer.setPlacement( pv ); - // Stave 0 + // Stave 1 (UTaX_1C), index starts from 0 pv = lvLayer.placeVolume( volume( "lvStaveC" ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth-1/2*UTStaveStep+UTStaveCCorrect+UTaXR2S2CorrectionX" ), 0, - _toDouble( "UTStaveDz/2" ) ) ); + _toDouble( "-UTStaveDz/2" ) ) ); pv->SetName( "pvCsideUTaXStave0" ); pv.addPhysVolID( "stave", 0 ); deStave = de_stave_c.clone( "Stave0", 0 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 1 + // Stave 2 (UTaX_2C) pv = lvLayer.placeVolume( volume( "lvStaveB" ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth-3/2*UTStaveStep+UTStaveBCorrect+UTaXR2S1CorrectionX" ), 0, - _toDouble( "-UTStaveDz/2" ) ) ); + _toDouble( "UTStaveDz/2" ) ) ); pv->SetName( "pvCsideUTaXStave1" ); pv.addPhysVolID( "stave", 1 ); deStave = de_stave_b.clone( "Stave1", 1 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 2-7 + // Stave 3-8 (UTaX_3C-8C) for ( int i = 2; i < 8; i++ ) { pv = lvLayer.placeVolume( volume( "lvStaveA" ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth" ) - ( 5.0 / 2 + ( i - 2 ) ) * _toDouble( "UTStaveStep" ) + _toDouble( "UTStaveACorrect+UTaXR1S" + std::to_string( 8 - i ) + "CorrectionX" ), - 0, pow( -1, i ) * _toDouble( "UTStaveDz/2" ) ) ); + 0, pow( -1, i + 1 ) * _toDouble( "UTStaveDz/2" ) ) ); pv->SetName( _toString( i, "pvCsideUTaXStave%d" ).c_str() ); pv.addPhysVolID( "stave", i ); deStave = de_stave_a.clone( _toString( i, "Stave%d" ), i ); @@ -854,35 +854,35 @@ namespace { pv.addPhysVolID( "layer", 1 ); deLayer.setPlacement( pv ); - // Stave 0 + // Stave 1 (UTaU_1C), index starts from 0 pv = lvLayer.placeVolume( volume( "lvStaveC" ), Transform3D( RotationZ( _toDouble( "-UTAngle" ) ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth-1/2*UTStaveStep+UTStaveCCorrectUV+UTaUR2S2CorrectionX" ), - _toDouble( "UTStaveCUVPosY" ), _toDouble( "UTStaveDz/2" ) ) ) ); + _toDouble( "UTStaveCUVPosY" ), _toDouble( "-UTStaveDz/2" ) ) ) ); pv->SetName( "pvCsideUTaUStave0" ); pv.addPhysVolID( "stave", 0 ); deStave = de_stave_c.clone( "Stave0", 0 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 1 + // Stave 2 (UTaU_2C) pv = lvLayer.placeVolume( volume( "lvStaveB" ), Transform3D( RotationZ( _toDouble( "-UTAngle" ) ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth-3/2*UTStaveStep+UTStaveBCorrectUV+UTaUR2S1CorrectionX" ), - 0, _toDouble( "-UTStaveDz/2" ) ) ) ); + 0, _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( "pvCsideUTaUStave1" ); pv.addPhysVolID( "stave", 1 ); deStave = de_stave_b.clone( "Stave1", 1 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 2-7 + // Stave 3-8 (UTaU_3C-8C) for ( int i = 2; i < 8; i++ ) { pv = lvLayer.placeVolume( volume( "lvStaveA" ), Transform3D( RotationZ( _toDouble( "-UTAngle" ) ), @@ -890,7 +890,7 @@ namespace { ( 5.0 / 2 + ( i - 2 ) ) * _toDouble( "UTStaveStep" ) + _toDouble( "UTStaveACorrectUV+UTaUR1S" + std::to_string( 8 - i ) + "CorrectionX" ), - 0, pow( -1, i ) * _toDouble( "UTStaveDz/2" ) ) ) ); + 0, pow( -1, i + 1 ) * _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( _toString( i, "pvCsideUTaUStave%d" ).c_str() ); pv.addPhysVolID( "stave", i ); deStave = de_stave_a.clone( _toString( i, "Stave%d" ), i ); @@ -907,35 +907,35 @@ namespace { pv.addPhysVolID( "layer", 2 ); deLayer.setPlacement( pv ); - // Stave 0 + // Stave 1 (UTbV_1C), index starts from 0 pv = lvLayer.placeVolume( volume( "lvStaveC" ), Transform3D( RotationZ( _toDouble( "UTAngle" ) ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth-1/2*UTStaveStep+UTStaveCCorrectUV+UTbVR2S2CorrectionX" ), - _toDouble( "-UTStaveCUVPosY" ), _toDouble( "UTStaveDz/2" ) ) ) ); + _toDouble( "-UTStaveCUVPosY" ), _toDouble( "-UTStaveDz/2" ) ) ) ); pv->SetName( "pvCsideUTbVStave0" ); pv.addPhysVolID( "stave", 0 ); deStave = de_stave_c.clone( "Stave0", 0 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 1 + // Stave 2 (UTbV_2C) pv = lvLayer.placeVolume( volume( "lvStaveB" ), Transform3D( RotationZ( _toDouble( "UTAngle" ) ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth-3/2*UTStaveStep+UTStaveBCorrectUV+UTbVR2S1CorrectionX" ), - 0, _toDouble( "-UTStaveDz/2" ) ) ) ); + 0, _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( "pvCsideUTbVStave1" ); pv.addPhysVolID( "stave", 1 ); deStave = de_stave_b.clone( "Stave1", 1 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 2-8 + // Stave 3-9 (UTbV_3C-9C) for ( int i = 2; i < 9; i++ ) { pv = lvLayer.placeVolume( volume( "lvStaveA" ), Transform3D( RotationZ( _toDouble( "UTAngle" ) ), @@ -943,7 +943,7 @@ namespace { ( 5.0 / 2 + ( i - 2 ) ) * _toDouble( "UTStaveStep" ) + _toDouble( "UTStaveACorrectUV+UTbVR1S" + std::to_string( 9 - i ) + "CorrectionX" ), - 0, pow( -1, i ) * _toDouble( "UTStaveDz/2" ) ) ) ); + 0, pow( -1, i + 1 ) * _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( _toString( i, "pvCsideUTbVStave%d" ).c_str() ); pv.addPhysVolID( "stave", i ); deStave = de_stave_a.clone( _toString( i, "Stave%d" ), i ); @@ -960,38 +960,38 @@ namespace { pv.addPhysVolID( "layer", 3 ); deLayer.setPlacement( pv ); - // Stave 0 + // Stave 1 (UTbX_1C), index starts from 0 pv = lvLayer.placeVolume( volume( "lvStaveC" ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth-1/2*UTStaveStep+UTStaveCCorrect+UTbXR2S2CorrectionX" ), 0, - _toDouble( "UTStaveDz/2" ) ) ); + _toDouble( "-UTStaveDz/2" ) ) ); pv->SetName( "pvCsideUTbXStave0" ); pv.addPhysVolID( "stave", 0 ); deStave = de_stave_c.clone( "Stave0", 0 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 1 + // Stave 2 (UTbX_2C) pv = lvLayer.placeVolume( volume( "lvStaveB" ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth-3/2*UTStaveStep+UTStaveBCorrect+UTbXR2S1CorrectionX" ), 0, - _toDouble( "-UTStaveDz/2" ) ) ); + _toDouble( "UTStaveDz/2" ) ) ); pv->SetName( "pvCsideUTbXStave1" ); pv.addPhysVolID( "stave", 1 ); deStave = de_stave_b.clone( "Stave1", 1 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 2-8 + // Stave 3-9 (UTbX_3C-9C) for ( int i = 2; i < 9; i++ ) { pv = lvLayer.placeVolume( volume( "lvStaveA" ), Position( _toDouble( "1/2*UTLayerSideCorrectedWidth" ) - ( 5.0 / 2 + ( i - 2 ) ) * _toDouble( "UTStaveStep" ) + _toDouble( "UTStaveACorrect+UTbXR1S" + std::to_string( 9 - i ) + "CorrectionX" ), - 0, pow( -1, i ) * _toDouble( "UTStaveDz/2" ) ) ); + 0, pow( -1, i + 1 ) * _toDouble( "UTStaveDz/2" ) ) ); pv->SetName( _toString( i, "pvCsideUTbXStave%d" ).c_str() ); pv.addPhysVolID( "stave", i ); deStave = de_stave_a.clone( _toString( i, "Stave%d" ), i ); @@ -1010,35 +1010,35 @@ namespace { pv.addPhysVolID( "layer", 0 ); deLayer.setPlacement( pv ); - // Stave 0 + // Stave 1 (UTaX_1A), index starts from 0 pv = lvLayer.placeVolume( volume( "lvStaveC" ), Transform3D( RotationY( M_PI ), Position( _toDouble( "-1/2*UTLayerSideCorrectedWidth+1/2*UTStaveStep-UTStaveCCorrect+UTaXR2S3CorrectionX" ), - 0, _toDouble( "-UTStaveDz/2" ) ) ) ); + 0, _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( "pvAsideUTaXStave0" ); pv.addPhysVolID( "stave", 0 ); deStave = de_stave_c.clone( "Stave0", 0 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 1 + // Stave 2 (UTaX_2A) pv = lvLayer.placeVolume( volume( "lvStaveB" ), Transform3D( RotationY( M_PI ), Position( _toDouble( "-1/2*UTLayerSideCorrectedWidth+3/2*UTStaveStep-UTStaveBCorrect+UTaXR2S4CorrectionX" ), - 0, _toDouble( "UTStaveDz/2" ) ) ) ); + 0, _toDouble( "-UTStaveDz/2" ) ) ) ); pv->SetName( "pvAsideUTaXStave1" ); pv.addPhysVolID( "stave", 1 ); deStave = de_stave_b.clone( "Stave1", 1 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 2-7 + // Stave 3-8 (UTaX_3A-8A) for ( int i = 2; i < 8; i++ ) { pv = lvLayer.placeVolume( volume( "lvStaveA" ), @@ -1046,7 +1046,7 @@ namespace { ( 5.0 / 2 + ( i - 2 ) ) * _toDouble( "UTStaveStep" ) + _toDouble( "-UTStaveACorrect+UTaXR3S" + std::to_string( i - 1 ) + "CorrectionX" ), - 0, pow( -1, i + 1 ) * _toDouble( "UTStaveDz/2" ) ) ) ); + 0, pow( -1, i ) * _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( _toString( i, "pvAsideUTaXStave%d" ).c_str() ); pv.addPhysVolID( "stave", i ); deStave = de_stave_a.clone( _toString( i, "Stave%d" ), i ); @@ -1062,7 +1062,7 @@ namespace { pv.addPhysVolID( "layer", 1 ); deLayer.setPlacement( pv ); - // Stave 0 + // Stave 1 (UTaU_1A), index starts from 0 pv = lvLayer.placeVolume( volume( "lvStaveC" ), Transform3D( @@ -1070,14 +1070,14 @@ namespace { Position( _toDouble( "-1/2*UTLayerSideCorrectedWidth+1/2*UTStaveStep-UTStaveCCorrectUV+UTaUR2S3CorrectionX" ), - _toDouble( "-UTStaveCUVPosY" ), _toDouble( "-UTStaveDz/2" ) ) ) ); + _toDouble( "-UTStaveCUVPosY" ), _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( "pvAsideUTaUStave0" ); pv.addPhysVolID( "stave", 0 ); deStave = de_stave_c.clone( "Stave0", 0 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 1 + // Stave 2 (UTaU_2A) pv = lvLayer.placeVolume( volume( "lvStaveB" ), Transform3D( @@ -1085,14 +1085,14 @@ namespace { Position( _toDouble( "-1/2*UTLayerSideCorrectedWidth+3/2*UTStaveStep-UTStaveBCorrectUV+UTaUR2S4CorrectionX" ), - 0, _toDouble( "UTStaveDz/2" ) ) ) ); + 0, _toDouble( "-UTStaveDz/2" ) ) ) ); pv->SetName( "pvAsideUTaUStave1" ); pv.addPhysVolID( "stave", 1 ); deStave = de_stave_b.clone( "Stave1", 1 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 2-7 + // Stave 3-8 (UTaU_3A-8A) for ( int i = 2; i < 8; i++ ) { pv = lvLayer.placeVolume( volume( "lvStaveA" ), Transform3D( RotationZYX( _toDouble( "UTAngle" ), M_PI, 0 ), @@ -1100,7 +1100,7 @@ namespace { ( 5.0 / 2 + ( i - 2 ) ) * _toDouble( "UTStaveStep" ) + _toDouble( "-UTStaveACorrectUV+UTaUR3S" + std::to_string( i - 1 ) + "CorrectionX" ), - 0, pow( -1, i + 1 ) * _toDouble( "UTStaveDz/2" ) ) ) ); + 0, pow( -1, i ) * _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( _toString( i, "pvAsideUTaUStave%d" ).c_str() ); pv.addPhysVolID( "stave", i ); deStave = de_stave_a.clone( _toString( i, "Stave%d" ), i ); @@ -1116,7 +1116,7 @@ namespace { pv.addPhysVolID( "layer", 2 ); deLayer.setPlacement( pv ); - // Stave 0 + // Stave 1 (UTbV_1A), index starts from 0 pv = lvLayer.placeVolume( volume( "lvStaveC" ), Transform3D( @@ -1124,14 +1124,14 @@ namespace { Position( _toDouble( "-1/2*UTLayerSideCorrectedWidth+1/2*UTStaveStep-UTStaveCCorrectUV+UTbVR2S3CorrectionX" ), - _toDouble( "UTStaveCUVPosY" ), _toDouble( "-UTStaveDz/2" ) ) ) ); + _toDouble( "UTStaveCUVPosY" ), _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( "pvAsideUTbVStave0" ); pv.addPhysVolID( "stave", 0 ); deStave = de_stave_c.clone( "Stave0", 0 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 1 + // Stave 2 (UTbV_2A) pv = lvLayer.placeVolume( volume( "lvStaveB" ), Transform3D( @@ -1139,14 +1139,14 @@ namespace { Position( _toDouble( "-1/2*UTLayerSideCorrectedWidth+3/2*UTStaveStep-UTStaveBCorrectUV+UTbVR2S4CorrectionX" ), - 0, _toDouble( "UTStaveDz/2" ) ) ) ); + 0, _toDouble( "-UTStaveDz/2" ) ) ) ); pv->SetName( "pvAsideUTbVStave1" ); pv.addPhysVolID( "stave", 1 ); deStave = de_stave_b.clone( "Stave1", 1 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 2-8 + // Stave 3-9 (UTbV_3A-9A) for ( int i = 2; i < 9; i++ ) { pv = lvLayer.placeVolume( volume( "lvStaveA" ), Transform3D( RotationZYX( _toDouble( "-UTAngle" ), M_PI, 0 ), @@ -1154,7 +1154,7 @@ namespace { ( 5.0 / 2 + ( i - 2 ) ) * _toDouble( "UTStaveStep" ) + _toDouble( "-UTStaveACorrectUV+UTbVR3S" + std::to_string( i - 1 ) + "CorrectionX" ), - 0, pow( -1, i + 1 ) * _toDouble( "UTStaveDz/2" ) ) ) ); + 0, pow( -1, i ) * _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( _toString( i, "pvAsideUTbVStave%d" ).c_str() ); pv.addPhysVolID( "stave", i ); deStave = de_stave_a.clone( _toString( i, "Stave%d" ), i ); @@ -1170,35 +1170,35 @@ namespace { pv.addPhysVolID( "layer", 3 ); deLayer.setPlacement( pv ); - // Stave 0 + // Stave 1 (UTbX_1A), index starts from 0 pv = lvLayer.placeVolume( volume( "lvStaveC" ), Transform3D( RotationY( M_PI ), Position( _toDouble( "-1/2*UTLayerSideCorrectedWidth+1/2*UTStaveStep-UTStaveCCorrect+UTbXR2S3CorrectionX" ), - 0, _toDouble( "-UTStaveDz/2" ) ) ) ); + 0, _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( "pvAsideUTbXStave0" ); pv.addPhysVolID( "stave", 0 ); deStave = de_stave_c.clone( "Stave0", 0 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 1 + // Stave 2 (UTbX_2A) pv = lvLayer.placeVolume( volume( "lvStaveB" ), Transform3D( RotationY( M_PI ), Position( _toDouble( "-1/2*UTLayerSideCorrectedWidth+3/2*UTStaveStep-UTStaveBCorrect+UTbXR2S4CorrectionX" ), - 0, _toDouble( "UTStaveDz/2" ) ) ) ); + 0, _toDouble( "-UTStaveDz/2" ) ) ) ); pv->SetName( "pvAsideUTbXStave1" ); pv.addPhysVolID( "stave", 1 ); deStave = de_stave_b.clone( "Stave1", 1 ); deStave.setPlacement( pv ); deLayer.add( deStave ); - // Stave 2-8 + // Stave 3-9 (UTbX_3A-9A) for ( int i = 2; i < 9; i++ ) { pv = lvLayer.placeVolume( volume( "lvStaveA" ), @@ -1206,7 +1206,7 @@ namespace { ( 5.0 / 2 + ( i - 2 ) ) * _toDouble( "UTStaveStep" ) + _toDouble( "-UTStaveACorrect+UTbXR3S" + std::to_string( i - 1 ) + "CorrectionX" ), - 0, pow( -1, i + 1 ) * _toDouble( "UTStaveDz/2" ) ) ) ); + 0, pow( -1, i ) * _toDouble( "UTStaveDz/2" ) ) ) ); pv->SetName( _toString( i, "pvAsideUTbXStave%d" ).c_str() ); pv.addPhysVolID( "stave", i ); deStave = de_stave_a.clone( _toString( i, "Stave%d" ), i ); @@ -1218,8 +1218,7 @@ namespace { } // lvUT - Box ut_shape( ( "UTVirtualBoxWide/2" ), "UTVirtualBoxLong/2", "UTBoxOuterThick/2" ); - Volume lvUT( "lvUT", ut_shape, description.air() ); + Volume lvUT = volume( "lvUT" ); if ( m_build_frame ) { pv = lvUT.placeVolume( volume( "lvUTFrame" ) ); } if ( m_build_box ) { pv = lvUT.placeVolume( volume( "lvUTBox" ) ); } if ( m_build_boxplug ) { pv = lvUT.placeVolume( volume( "lvUTBoxPlug" ) ); } @@ -1242,7 +1241,7 @@ namespace { Position( 0, 0, _toDouble( "UX851Rich1TTSplitZposIP-UTSystemZ" ) ) ); } if ( m_build_pipeheater ) { pv = lvUT.placeVolume( volume( "lvUTPipeHeater" ) ); } - registerVolume( lvUT.name(), lvUT ); + // registerVolume( lvUT.name(), lvUT ); } // build_detector void UTBuild::build_groups() { diff --git a/compact/trunk/UT/parameters.xml b/compact/trunk/UT/parameters.xml index 5c1aab409..0c94dc010 100644 --- a/compact/trunk/UT/parameters.xml +++ b/compact/trunk/UT/parameters.xml @@ -319,74 +319,77 @@ <constant name="UTStaveBCorrectUV" value="UTStaveBCorrect-UTUVGlobalCorrectX" /> <constant name="UTStaveACorrectUV" value="UTStaveACorrect-UTUVGlobalCorrectX" /> <constant name="UTStaveCUVPosY" value="UTSinAngle*(UTStaveWide-UTStaveCOverlap)/2" /> - <constant name="UTaXR1S1CorrectionX" value="2.5*mm" /> - <constant name="UTaXR1S2CorrectionX" value="-2.00*mm" /> - <constant name="UTaXR1S3CorrectionX" value="1.5*mm" /> - <constant name="UTaXR1S4CorrectionX" value="-1.7*mm" /> - <constant name="UTaXR1S5CorrectionX" value="0.6*mm" /> - <constant name="UTaXR1S6CorrectionX" value="-1.5*mm" /> - <constant name="UTaXR2S1CorrectionX" value="0.2*mm" /> + <constant name="UTaXR1S1CorrectionX" value="-1.9*mm" /> + <constant name="UTaXR1S2CorrectionX" value="2.1*mm" /> + <constant name="UTaXR1S3CorrectionX" value="-1.8*mm" /> + <constant name="UTaXR1S4CorrectionX" value="1.0*mm" /> + <constant name="UTaXR1S5CorrectionX" value="-1.7*mm" /> + <constant name="UTaXR1S6CorrectionX" value="0.0*mm" /> + <constant name="UTaXR2S1CorrectionX" value="-1.0*mm" /> <constant name="UTaXR2S2CorrectionX" value="0.*mm" /> <constant name="UTaXR2S3CorrectionX" value="0.*mm" /> - <constant name="UTaXR2S4CorrectionX" value="1.0*mm" /> - <constant name="UTaXR3S1CorrectionX" value="0.1*mm" /> - <constant name="UTaXR3S2CorrectionX" value="1.7*mm" /> - <constant name="UTaXR3S3CorrectionX" value="-1.0*mm" /> - <constant name="UTaXR3S4CorrectionX" value="1.8*mm" /> - <constant name="UTaXR3S5CorrectionX" value="-2.1*mm" /> - <constant name="UTaXR3S6CorrectionX" value="1.9*mm" /> - <constant name="UTaUR1S1CorrectionX" value="2.5*mm" /> - <constant name="UTaUR1S2CorrectionX" value="-1.9*mm" /> - <constant name="UTaUR1S3CorrectionX" value="1.6*mm" /> - <constant name="UTaUR1S4CorrectionX" value="-1.7*mm" /> - <constant name="UTaUR1S5CorrectionX" value="0.6*mm" /> - <constant name="UTaUR1S6CorrectionX" value="-1.4*mm" /> - <constant name="UTaUR2S1CorrectionX" value="0.2*mm" /> - <constant name="UTaUR2S2CorrectionX" value="0.*mm" /> - <constant name="UTaUR2S3CorrectionX" value="0.*mm" /> - <constant name="UTaUR2S4CorrectionX" value="1.0*mm" /> - <constant name="UTaUR3S1CorrectionX" value="0.1*mm" /> - <constant name="UTaUR3S2CorrectionX" value="1.7*mm" /> - <constant name="UTaUR3S3CorrectionX" value="-1.0*mm" /> - <constant name="UTaUR3S4CorrectionX" value="1.8*mm" /> - <constant name="UTaUR3S5CorrectionX" value="-2.0*mm" /> - <constant name="UTaUR3S6CorrectionX" value="1.9*mm" /> - <constant name="UTbVR1S1CorrectionX" value="-1.9*mm" /> - <constant name="UTbVR1S2CorrectionX" value="2.3*mm" /> - <constant name="UTbVR1S3CorrectionX" value="-1.7*mm" /> - <constant name="UTbVR1S4CorrectionX" value="1.4*mm" /> - <constant name="UTbVR1S5CorrectionX" value="-1.6*mm" /> - <constant name="UTbVR1S6CorrectionX" value="0.5*mm" /> - <constant name="UTbVR1S7CorrectionX" value="-1.4*mm" /> - <constant name="UTbVR2S1CorrectionX" value="0.1*mm" /> - <constant name="UTbVR2S2CorrectionX" value="0.*mm" /> - <constant name="UTbVR2S3CorrectionX" value="0.*mm" /> - <constant name="UTbVR2S4CorrectionX" value="1.0*mm" /> - <constant name="UTbVR3S1CorrectionX" value="0.3*mm" /> - <constant name="UTbVR3S2CorrectionX" value="1.7*mm" /> - <constant name="UTbVR3S3CorrectionX" value="-0.7*mm" /> - <constant name="UTbVR3S4CorrectionX" value="1.9*mm" /> - <constant name="UTbVR3S5CorrectionX" value="-1.6*mm" /> - <constant name="UTbVR3S6CorrectionX" value="2.1*mm" /> - <constant name="UTbVR3S7CorrectionX" value="-2.5*mm" /> - <constant name="UTbXR1S1CorrectionX" value="-1.9*mm" /> - <constant name="UTbXR1S2CorrectionX" value="2.2*mm" /> - <constant name="UTbXR1S3CorrectionX" value="-1.8*mm" /> - <constant name="UTbXR1S4CorrectionX" value="1.3*mm" /> - <constant name="UTbXR1S5CorrectionX" value="-1.6*mm" /> - <constant name="UTbXR1S6CorrectionX" value="0.4*mm" /> - <constant name="UTbXR1S7CorrectionX" value="-1.4*mm" /> - <constant name="UTbXR2S1CorrectionX" value="0.1*mm" /> - <constant name="UTbXR2S2CorrectionX" value="0.*mm" /> - <constant name="UTbXR2S3CorrectionX" value="0.*mm" /> - <constant name="UTbXR2S4CorrectionX" value="1.0*mm" /> - <constant name="UTbXR3S1CorrectionX" value="0.3*mm" /> - <constant name="UTbXR3S2CorrectionX" value="1.7*mm" /> - <constant name="UTbXR3S3CorrectionX" value="-0.6*mm" /> - <constant name="UTbXR3S4CorrectionX" value="1.9*mm" /> - <constant name="UTbXR3S5CorrectionX" value="-1.5*mm" /> - <constant name="UTbXR3S6CorrectionX" value="2.1*mm" /> - <constant name="UTbXR3S7CorrectionX" value="-2.4*mm" /> + <constant name="UTaXR2S4CorrectionX" value="-0.2*mm" /> + <constant name="UTaXR3S1CorrectionX" value="1.5*mm" /> + <constant name="UTaXR3S2CorrectionX" value="-0.6*mm" /> + <constant name="UTaXR3S3CorrectionX" value="1.7*mm" /> + <constant name="UTaXR3S4CorrectionX" value="-1.5*mm" /> + <constant name="UTaXR3S5CorrectionX" value="2.00*mm" /> + <constant name="UTaXR3S6CorrectionX" value="-2.5*mm" /> + + <constant name="UTaUR1S1CorrectionX" value="-1.720*mm" /> + <constant name="UTaUR1S2CorrectionX" value="2.180*mm" /> + <constant name="UTaUR1S3CorrectionX" value="-1.620*mm" /> + <constant name="UTaUR1S4CorrectionX" value="1.180*mm" /> + <constant name="UTaUR1S5CorrectionX" value="-1.520*mm" /> + <constant name="UTaUR1S6CorrectionX" value="0.180*mm" /> + <constant name="UTaUR2S1CorrectionX" value="-0.820*mm" /> + <constant name="UTaUR2S2CorrectionX" value="-0.552*mm" /> + <constant name="UTaUR2S3CorrectionX" value="0.552*mm" /> + <constant name="UTaUR2S4CorrectionX" value="-0.380*mm" /> + <constant name="UTaUR3S1CorrectionX" value="1.220*mm" /> + <constant name="UTaUR3S2CorrectionX" value="-0.780*mm" /> + <constant name="UTaUR3S3CorrectionX" value="1.520*mm" /> + <constant name="UTaUR3S4CorrectionX" value="-1.780*mm" /> + <constant name="UTaUR3S5CorrectionX" value="1.720*mm" /> + <constant name="UTaUR3S6CorrectionX" value="-2.680*mm" /> + + <constant name="UTbVR1S1CorrectionX" value="2.680*mm" /> + <constant name="UTbVR1S2CorrectionX" value="-1.92*mm" /> + <constant name="UTbVR1S3CorrectionX" value="1.780*mm" /> + <constant name="UTbVR1S4CorrectionX" value="-1.720*mm" /> + <constant name="UTbVR1S5CorrectionX" value="0.880*mm" /> + <constant name="UTbVR1S6CorrectionX" value="-1.520*mm" /> + <constant name="UTbVR1S7CorrectionX" value="-0.120*mm" /> + <constant name="UTbVR2S1CorrectionX" value="-0.820*mm" /> + <constant name="UTbVR2S2CorrectionX" value="-0.552*mm" /> + <constant name="UTbVR2S3CorrectionX" value="0.552*mm" /> + <constant name="UTbVR2S4CorrectionX" value="-0.18*mm" /> + <constant name="UTbVR3S1CorrectionX" value="1.22*mm" /> + <constant name="UTbVR3S2CorrectionX" value="-0.68*mm" /> + <constant name="UTbVR3S3CorrectionX" value="1.42*mm" /> + <constant name="UTbVR3S4CorrectionX" value="-1.58*mm" /> + <constant name="UTbVR3S5CorrectionX" value="1.52*mm" /> + <constant name="UTbVR3S6CorrectionX" value="-2.48*mm" /> + <constant name="UTbVR3S7CorrectionX" value="1.72*mm" /> + + <constant name="UTbXR1S1CorrectionX" value="2.4*mm" /> + <constant name="UTbXR1S2CorrectionX" value="-2.1*mm" /> + <constant name="UTbXR1S3CorrectionX" value="1.5*mm" /> + <constant name="UTbXR1S4CorrectionX" value="-1.9*mm" /> + <constant name="UTbXR1S5CorrectionX" value="0.6*mm" /> + <constant name="UTbXR1S6CorrectionX" value="-1.7*mm" /> + <constant name="UTbXR1S7CorrectionX" value="-0.3*mm" /> + <constant name="UTbXR2S1CorrectionX" value="-1.0*mm" /> + <constant name="UTbXR2S2CorrectionX" value="0.0*mm" /> + <constant name="UTbXR2S3CorrectionX" value="0.0*mm" /> + <constant name="UTbXR2S4CorrectionX" value="0.0*mm" /> + <constant name="UTbXR3S1CorrectionX" value="1.4*mm" /> + <constant name="UTbXR3S2CorrectionX" value="-0.4*mm" /> + <constant name="UTbXR3S3CorrectionX" value="1.6*mm" /> + <constant name="UTbXR3S4CorrectionX" value="-1.3*mm" /> + <constant name="UTbXR3S5CorrectionX" value="1.8*mm" /> + <constant name="UTbXR3S6CorrectionX" value="-2.2*mm" /> + <constant name="UTbXR3S7CorrectionX" value="1.9*mm" /> <!-- A/C side cuts --> <constant name="UTStaveGap" value="UTStaveDz-UTStaveThick" /> <constant name="UTSideCutGap" value="10*mm" /> -- GitLab From a18564f52562766605392da7033414ff82f64a61 Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Mon, 9 Oct 2023 14:07:15 -0400 Subject: [PATCH 02/10] fix overlaps, remove Air, correct parameters # Conflicts: # compact/before-rich1-geom-update-26052022/checksums # compact/trunk/checksums # Conflicts: # compact/trunk/checksums --- .../checksums | 31 +- compact/trunk/Pipe/Magnet-UX851.xml | 12 + compact/trunk/UT/Module.xml | 34 +- compact/trunk/UT/Sensor.xml | 34 +- compact/trunk/UT/Stave.xml | 306 ++---------------- compact/trunk/UT/UTBox.xml | 47 +-- compact/trunk/UT/UTHalf.xml | 118 +------ compact/trunk/UT/UTaULayer.xml | 120 +------ compact/trunk/UT/UTaXLayer.xml | 102 +----- compact/trunk/UT/UTbVLayer.xml | 128 +------- compact/trunk/UT/UTbXLayer.xml | 110 +------ compact/trunk/UT/detector.xml | 4 +- compact/trunk/UT/parameters.xml | 44 +-- compact/trunk/checksums | 35 +- 14 files changed, 161 insertions(+), 964 deletions(-) diff --git a/compact/before-rich1-geom-update-26052022/checksums b/compact/before-rich1-geom-update-26052022/checksums index 421196003..518057e59 100644 --- a/compact/before-rich1-geom-update-26052022/checksums +++ b/compact/before-rich1-geom-update-26052022/checksums @@ -1,4 +1,4 @@ -/world_volume: 2466390942 +/world_volume: 4072983520 /world_volume/lvAfterMagnetRegion_3: 1374469345 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1: 187033957 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1/pvRich2EntryWinTubeLock: 1979723490 @@ -48,7 +48,7 @@ /world_volume/lvAfterMagnetRegion_3/lvUX85BakeoutAfterMagnet_2: 2588750996 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4: 2302184141 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4/pvUX853AfterMagnetCollar: 2052547805 -/world_volume/lvBeforeMagnetRegion_1: 3440741171 +/world_volume/lvBeforeMagnetRegion_1: 913815390 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0: 2472087751 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBcmUp_3: 2661979061 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBlockWallBefMag_0: 2623562443 @@ -64,14 +64,15 @@ /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1SubMaster: 1822149947 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1AfterSubM: 1874884759 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1BeforeSubM: 3776943454 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3: 950047461 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTA_4: 3283219478 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBoxPlug_2: 2982282835 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBox_1: 2557552759 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTC_3: 1920000441 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3: 3237620207 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTA_4: 1269607549 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBoxPlug_2: 276155515 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBox_1: 2145795645 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTC_3: 1223200118 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTFrame_0: 1312950758 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTJacket_5: 2839967123 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUX851InUT_6: 2312201870 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTJacket_5: 2124550184 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTPipeHeater_6: 456665699 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUX851InUT_7: 2312201870 /world_volume/lvBeforeMagnetRegion_1/lvVP_2: 3903272872 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/lvVeloDownStreamPipe_6: 4275213241 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/lvVeloUpStreamPipe_5: 2678709159 @@ -80,17 +81,17 @@ /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVPMotionLeft: 2198385948 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVPMotionRight: 1630601369 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVacTank: 4180183569 -/world_volume/lvDownstreamRegion_4: 2929067602 +/world_volume/lvDownstreamRegion_4: 1579601068 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0: 957808461 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvBcmDown_0: 3159929950 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvMBXWDown_1: 3528288914 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvPipeAfterMuon_2: 620416237 -/world_volume/lvDownstreamRegion_4/lvEcal_3: 4033940412 +/world_volume/lvDownstreamRegion_4/lvEcal_3: 105418779 /world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalLeft: 729640271 -/world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalRight: 1531423908 -/world_volume/lvDownstreamRegion_4/lvHcal_4: 4069978026 -/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalLeft: 2025368290 -/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalright: 152567050 +/world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalRight: 3753082314 +/world_volume/lvDownstreamRegion_4/lvHcal_4: 1966937768 +/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalLeft: 4095643253 +/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalright: 4217369814 /world_volume/lvDownstreamRegion_4/lvMuon_2: 4152624774 /world_volume/lvDownstreamRegion_4/lvMuon_2/lvM2ASideBeamPlug_4: 753303553 /world_volume/lvDownstreamRegion_4/lvMuon_2/lvM2CSideBeamPlug_5: 1869197234 diff --git a/compact/trunk/Pipe/Magnet-UX851.xml b/compact/trunk/Pipe/Magnet-UX851.xml index 0401c5be9..3c81dd22b 100644 --- a/compact/trunk/Pipe/Magnet-UX851.xml +++ b/compact/trunk/Pipe/Magnet-UX851.xml @@ -33,6 +33,14 @@ <!-- UX85-1 Cone 10 mrad of Beryllium 1mm thick --> <!-- Start at end of BeforeMagnet Region --> + <!-- <volume vis="UT:PipeHeater" material="UT:PipeHeater" name="lvUTPipeHeaterDownstreamInMagnet"> + <shape name="utPipeHeaterInUT" operation="subtraction" type="BooleanShape"> + <shape dz="UTPipeHeaterDownstreamLength/2" name="UTPipeHeaterDownstream" rmax2="UTPipeHeaterDownstreamRadiusZmax+UTPipeHeaterDownstreamThick" rmax1="UTPipeHeaterDownstreamRadiusZmin+UTPipeHeaterDownstreamThick" rmin2="UTPipeHeaterDownstreamRadiusZmax" rmin1="UTPipeHeaterDownstreamRadiusZmin" type="ConeSegment" /> + <shape rmax="UTPipeHeaterDownstreamRadiusZmax+UTPipeHeaterDownstreamThick+UTEpsilon" dz="UTPipeHeaterDownstreamLengthInUT/2+UTEpsilon" name="UTPipeHeaterDownstreamInUTSubMagnet" type="Tube" /> + <position z="UTPipeHeaterDownstreamZmin+UTPipeHeaterDownstreamLengthInUT/2-UTPipeHeaterDownstreamPos-UTSystemZ-UTEpsilon" /> + </shape> + </volume> --> + <volume name="lvUX851Cone08B" material="Pipe:BeTV56" vis="Pipe:Magnet"> <shape type="ConeSegment" name="UX85-1-Cone10mrad-08B" dz="0.5*UX851Cone08BLenght" @@ -81,6 +89,10 @@ </volume> <volume name="lvUX851InMagnet" vis="Pipe:Magnet"> + <!-- <physvol name="pvUTPipeHeaterDownstreamInMagnet" volume="lvUTPipeHeaterDownstreamInMagnet"> + <position z="UTPipeHeaterDownstreamLengthInMagnet-UTPipeHeaterDownstreamLength/2"/> + </physvol> --> + <physvol name="pvUX851Cone08B" volume="lvUX851Cone08B"> <position z="UX851Cone08BZpos"/> </physvol> diff --git a/compact/trunk/UT/Module.xml b/compact/trunk/UT/Module.xml index cf564334d..e970a9115 100644 --- a/compact/trunk/UT/Module.xml +++ b/compact/trunk/UT/Module.xml @@ -53,16 +53,6 @@ <position x="7/16*UTSensorSiWide"/> </physvol> </volume> - - <!-- - Computed in C++ - <volume material="UT:UTAsic" name="lvAsic4" vis="UT:Asic"> - <shape type="Box" name="utAsic4" dx="0.5*UTSensorWidth" dy="0.5*UTAsicHeight" dz="0.5*UTAsicThicknessAve*4"/> - </volume> - <volume material="UT:UTAsic" name="lvAsic8" vis="UT:Asic"> - <shape type="Box" name="utAsic8" dx="0.5*UTSensorWidth" dy="0.5*UTAsicHeight" dz="0.5*UTAsicThicknessAve*8"/> - </volume> - --> <!--====== HybridFlex ======--> <!-- Porting from UTv4r1-materials branch instead of UTV4r2 --> <volume material="UT:HybridFlex4" name="lvModuleFlex4" vis="UT:HybridFlex"> @@ -247,11 +237,7 @@ </shape> </volume> <!--====== Hybrid - SensorGroup + ASIC + HybridFlex + Hysol + Stiffener + Tim (Computed in C++) ======--> - <volume material="Air" name="lvModuleA" vis="UT:Envelope"> - <shape name="utHybridA" type="Box" dx="(UTHybridWide)/2" dy="(UTHybridLongA)/2" dz="(UTHybrid4Thick)/2"/> - <!-- <physvol volume="lvGroupA" name="pvGroupA"> - <position y="UTSensorYA" z="UTSensorZ"/> - </physvol> --> + <volume name="lvModuleA" vis="UT:Envelope"> <physvol volume="lvAsic4" name="pvAsicA"> <position y="UTAsicYA" z="UTAsic4Z"/> </physvol> @@ -269,11 +255,7 @@ </physvol> </volume> - <volume material="Air" name="lvModuleB" vis="UT:Envelope"> - <shape name="utHybridB" type="Box" dx="(UTHybridWide)/2" dy="(UTHybridLongB)/2" dz="(UTHybrid8Thick)/2"/> - <!-- <physvol volume="lvGroupB" name="pvGroupB"> - <position y="UTSensorYB" z="UTSensorZ"/> - </physvol> --> + <volume name="lvModuleB" vis="UT:Envelope"> <physvol volume="lvAsic8" name="pvAsicB"> <position y="UTAsicYB" z="UTAsic8Z"/> </physvol> @@ -291,11 +273,7 @@ </physvol> </volume> - <volume material="Air" name="lvModuleC" vis="UT:Envelope"> - <shape name="utHybridC" type="Box" dx="(UTHybridWide)/2" dy="(UTHybridLongC)/2" dz="(UTHybrid8Thick)/2"/> - <!-- <physvol volume="lvGroupC" name="pvGroupC"> - <position y="UTSensorYC" z="UTSensorZ"/> - </physvol> --> + <volume name="lvModuleC" vis="UT:Envelope"> <physvol volume="lvAsic8" name="pvAsicC"> <position y="UTAsicYC" z="UTAsic8Z"/> </physvol> @@ -313,11 +291,7 @@ </physvol> </volume> - <volume material="Air" name="lvModuleD" vis="UT:Envelope"> - <shape name="utHybridD" type="Box" dx="(UTHybridWide)/2" dy="(UTHybridLongD)/2" dz="(UTHybrid8Thick)/2"/> - <!-- <physvol volume="lvGroupD" name="pvGroupD"> - <position y="UTSensorYD" z="UTSensorZ"/> - </physvol> --> + <volume name="lvModuleD" vis="UT:Envelope"> <physvol volume="lvAsic8" name="pvAsicD"> <position y="UTAsicYD" z="UTAsic8Z"/> </physvol> diff --git a/compact/trunk/UT/Sensor.xml b/compact/trunk/UT/Sensor.xml index 3b656ad81..8e6cdbdd7 100644 --- a/compact/trunk/UT/Sensor.xml +++ b/compact/trunk/UT/Sensor.xml @@ -86,21 +86,11 @@ </volume> <!--======Sector (norm, dual, quad, hold)======--> - <volume material="Air" name="lvSectorNorm" vis="UT:Envelope"> - <shape name="utSectorNorm" type="Box" dx="(UTSensorSiWide)/2" dy="(UTSensorSiLongA)/2" dz="(UTSensorSiThickA)/2"/> - <!-- <physvol volume="lvSensorNorm" name="pvSensorNorm"/> --> - </volume> - <volume material="Air" name="lvSectorDual" vis="UT:Envelope"> - <shape name="utSectorDual" type="Box" dx="(UTSensorSiWide/2)/2" dy="(UTSensorSiLongB)/2" dz="(UTSensorSiThickB)/2"/> - <!-- <physvol volume="lvSensorDual" name="pvSensorDual"/> --> - </volume> - <volume material="Air" name="lvSectorQuad" vis="UT:Envelope"> - <shape name="utSectorQuad" type="Box" dx="(UTSensorSiWide/2)/2" dy="(UTSensorSiLongC)/2" dz="(UTSensorSiThickC)/2"/> - <!-- <physvol volume="lvSensorQuad" name="pvSensorQuad"/> --> - </volume> + <volume name="lvSectorNorm" vis="UT:Envelope"/> + <volume name="lvSectorDual" vis="UT:Envelope"/> + <volume name="lvSectorQuad" vis="UT:Envelope"/> <volume material="Air" name="lvSectorHole" vis="UT:Envelope"> <shape name="utSectorHole" type="Box" dx="(UTSensorSiWide/2)/2" dy="(UTSensorSiLongD)/2" dz="(UTSensorSiThickD)/2"/> - <!-- <physvol volume="lvSensorHole" name="pvSensorHole"/> --> </volume> <!--======Sensor Groups======--> <volume name="lvGroupA" vis="UT:Envelope"> @@ -110,9 +100,6 @@ <physvol volume="lvGuardRingA" name="pvGuardRingA"> <position z="UTSensorSiZ"/> </physvol> - <!-- <physvol volume="lvSectorNorm" name="pvSectorA1"> - <position y="UTSensorSiOffsetY" z="UTSensorSiZ" /> - </physvol> --> </volume> <volume name="lvGroupB" vis="UT:Envelope"> <physvol volume="lvMetalLayerB" name="pvMetalLayerB"> @@ -121,9 +108,6 @@ <physvol volume="lvGuardRingB" name="pvGuardRingB"> <position z="UTSensorSiZ"/> </physvol> - <!-- <physvol volume="lvSectorDual" name="pvSectorB1"> - <position x="-UTSensorSiWide/4" y="UTSensorSiOffsetY" z="UTSensorSiZ"/> - </physvol> --> </volume> <volume name="lvGroupC" vis="UT:Envelope"> <physvol volume="lvMetalLayerC" name="pvMetalLayerC"> @@ -132,12 +116,6 @@ <physvol volume="lvGuardRingC" name="pvGuardRingC"> <position z="UTSensorSiZ"/> </physvol> - <!-- <physvol volume="lvSectorQuad" name="pvSectorC1"> - <position x="-UTSensorSiWide/4" y="UTSensorSiOffsetY" z="UTSensorSiZ"/> - </physvol> - <physvol volume="lvSectorQuad" name="pvSectorC2"> - <position x="UTSensorSiWide/4" y="UTSensorSiOffsetY" z="UTSensorSiZ"/> - </physvol> --> </volume> <volume name="lvGroupD" vis="UT:Envelope"> <physvol volume="lvMetalLayerD" name="pvMetalLayerD"> @@ -146,11 +124,5 @@ <physvol volume="lvGuardRingD" name="pvGuardRingD"> <position z="UTSensorSiZ"/> </physvol> - <!-- <physvol volume="lvSectorQuad" name="pvSectorD1"> - <position x="-UTSensorSiWide/4" y="UTSensorSiOffsetY" z="UTSensorSiZ"/> - </physvol> - <physvol volume="lvSectorHole" name="pvSectorD2"> - <position x="UTSensorSiWide/4" y="UTSensorSiOffsetY" z="UTSensorSiZ"/> - </physvol> --> </volume> </ut> \ No newline at end of file diff --git a/compact/trunk/UT/Stave.xml b/compact/trunk/UT/Stave.xml index ceb062925..7bf12c786 100644 --- a/compact/trunk/UT/Stave.xml +++ b/compact/trunk/UT/Stave.xml @@ -1,35 +1,35 @@ <ut> <!-- (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration - + This software is distributed under the terms of the GNU General Public Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". - + In applying this licence, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. --> <!-- ========== Stave Geometry ========== --> <!-- ========== MegArray connector ========== --> - <volume material="Silicon" name="lvMegArray"> + <volume material="Silicon" name="lvMegArray" vis="UT:Connector"> <shape dx="UTMegArrayWide/2" dy="UTMegArrayLong/2" dz="UTMegArrayThick/2" name="utMegArray" type="Box" /> </volume> <!-- ========== HV connector ========== --> - <volume material="Silicon" name="lvHVConnector"> + <volume material="Silicon" name="lvHVConnector" vis="UT:Connector"> <shape dx="UTHVConnectorWide/2" dy="UTHVConnectorLong/2" dz="UTHVConnectorThick/2" name="utHVConnector" type="Box" /> </volume> <!-- ========== Flex Cable Kapton========== --> - <volume material="UT:FlexCable" name="lvCableKaptonL"> + <volume material="UT:FlexCable" name="lvCableKaptonL" vis="UT:KaptonCable"> <shape dx="UTCableWide/2" dy="UTCableLongL/2" dz="UTCableKaptonThick/2" name="utCableKaptonL" type="Box" /> </volume> - <volume material="UT:FlexCable" name="lvCableKaptonM"> + <volume material="UT:FlexCable" name="lvCableKaptonM" vis="UT:KaptonCable"> <shape dx="UTCableWide/2" dy="UTCableLongM/2" dz="UTCableKaptonThick/2" name="utCableKaptonM" type="Box" /> </volume> - <volume material="UT:FlexCable" name="lvCableKaptonS"> + <volume material="UT:FlexCable" name="lvCableKaptonS" vis="UT:KaptonCable"> <shape dx="UTCableWide/2" dy="UTCableLongS/2" dz="UTCableKaptonThick/2" name="utCableKaptonS" type="Box" /> </volume> <!-- ========== Flex Cable Copper========== --> - <volume material="Copper" name="lvCableCuL"> + <volume material="Copper" name="lvCableCuL" vis="UT:KaptonCable"> <shape name="utCableCuL" operation="subtraction" type="BooleanShape"> <shape dx="UTCableWide/2" dy="UTCableLongL/2" dz="UTCableCuThickL0/2" name="utCableCuBoxL0" type="Box" /> <shape dx="UTCableWide" dy="UTCableLongL1" dz="UTCableCuThickL0-UTCableCuThickL1" name="utCableCuBoxL1" type="Box" /> @@ -40,8 +40,8 @@ <position y="-UTCableLongL/2+UTCableLongL0+UTCableLongL1+UTCableLongL2+UTCableLongL3" z="-UTCableCuThickL0/2" /> </shape> </volume> - <volume material="Copper" name="lvCableCuM"> - <shape name="utCableCML" operation="subtraction" type="BooleanShape"> + <volume material="Copper" name="lvCableCuM" vis="UT:KaptonCable"> + <shape name="utCableCuM" operation="subtraction" type="BooleanShape"> <shape dx="UTCableWide/2" dy="UTCableLongM/2" dz="UTCableCuThickM0/2" name="utCableCuBoxM0" type="Box" /> <shape dx="UTCableWide" dy="UTCableLongM1" dz="UTCableCuThickM0-UTCableCuThickM1" name="utCableCuBoxM1" type="Box" /> <position y="-UTCableLongM/2+UTCableLongM0+UTCableLongM1" z="-UTCableCuThickM0/2" /> @@ -51,7 +51,7 @@ <position y="-UTCableLongM/2+UTCableLongM0+UTCableLongM1+UTCableLongM2+UTCableLongM3" z="-UTCableCuThickM0/2" /> </shape> </volume> - <volume material="Copper" name="lvCableCuS"> + <volume material="Copper" name="lvCableCuS" vis="UT:KaptonCable"> <shape name="utCableCuS" operation="subtraction" type="BooleanShape"> <shape dx="UTCableWide/2" dy="UTCableLongS/2" dz="UTCableCuThickS0/2" name="utCableCuBoxS0" type="Box" /> <shape dx="UTCableWide" dy="UTCableLongS1" dz="UTCableCuThickS0-UTCableCuThickS1" name="utCableCuBoxS1" type="Box" /> @@ -61,7 +61,7 @@ </shape> </volume> <!-- ========== Kapton Cable ========== --> - <volume name="lvCableL" vis="UT:KaptonCable"> + <volume name="lvCableL"> <physvol name="pvCableCuL" volume="lvCableCuL"> <position z="UTCableKaptonThick/2" /> </physvol> @@ -69,13 +69,14 @@ <position z="-UTCableCuThickL0/2" /> </physvol> <physvol name="pvMegArrayL" volume="lvMegArray"> - <position y="-UTCableLongL/2+UTMegArrayY" z="-UTCableCuThickL0/2-UTMegArrayThick/2" /> + <position y="-UTCableLongL/2+UTMegArrayY" z="-1/2*(UTCableCuThickL0+UTMegArrayThick+UTCableKaptonThick)" /> </physvol> <physvol name="pvConnectorL" volume="lvHVConnector"> - <position x="UTHVConnectorLX" y="-UTCableLongL/2+UTHVConnectorLong/2" z="-UTCableCuThickL0/2-UTMegArrayThick/2" /> + <!-- <position x="UTHVConnectorLX" y="-UTCableLongL/2+UTHVConnectorLong/2" z="-1/2*(UTCableCuThickL0+UTHVConnectorThick+UTCableKaptonThick)" /> --> + <position y="-UTCableLongL/2+UTHVConnectorLong/2" z="-1/2*(UTCableCuThickL0+UTHVConnectorThick+UTCableKaptonThick)" /> </physvol> </volume> - <volume name="lvCableM" vis="UT:KaptonCable"> + <volume name="lvCableM"> <physvol name="pvCableCuM" volume="lvCableCuM"> <position z="UTCableKaptonThick/2" /> </physvol> @@ -83,13 +84,14 @@ <position z="-UTCableCuThickM0/2" /> </physvol> <physvol name="pvMegArrayM" volume="lvMegArray"> - <position y="-UTCableLongM/2+UTMegArrayY" z="-UTCableCuThickM0/2-UTMegArrayThick/2" /> + <position y="-UTCableLongM/2+UTMegArrayY" z="-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)" /> </physvol> <physvol name="pvConnectorM" volume="lvHVConnector"> - <position x="UTHVConnectorMX" y="-UTCableLongM/2+UTHVConnectorLong/2" z="-UTCableCuThickM0/2-UTMegArrayThick/2" /> + <position y="-UTCableLongM/2+UTHVConnectorLong/2" z="-1/2*(UTCableCuThickM0+UTHVConnectorThick+UTCableKaptonThick)" /> + <!-- <position x="UTHVConnectorMX" y="-UTCableLongM/2+UTHVConnectorLong/2" z="-1/2*(UTCableCuThickM0+UTHVConnectorThick+UTCableKaptonThick)" /> --> </physvol> </volume> - <volume name="lvCableS" vis="UT:KaptonCable"> + <volume name="lvCableS"> <physvol name="pvCableCuS" volume="lvCableCuS"> <position z="UTCableKaptonThick/2" /> </physvol> @@ -97,10 +99,11 @@ <position z="-UTCableCuThickS0/2" /> </physvol> <physvol name="pvMegArrayS" volume="lvMegArray"> - <position y="-UTCableLongS/2+UTMegArrayY" z="-UTCableCuThickS0/2-UTMegArrayThick/2" /> + <position y="-UTCableLongS/2+UTMegArrayY" z="-1/2*(UTCableCuThickS0+UTMegArrayThick+UTCableKaptonThick)" /> </physvol> <physvol name="pvConnectorS" volume="lvHVConnector"> - <position x="UTHVConnectorSX" y="-UTCableLongS/2+UTHVConnectorLong/2" z="-UTCableCuThickS0/2-UTMegArrayThick/2" /> + <position y="-UTCableLongS/2+UTHVConnectorLong/2" z="-1/2*(UTCableCuThickS0+UTHVConnectorThick+UTCableKaptonThick)" /> + <!-- <position x="UTHVConnectorSX" y="-UTCableLongS/2+UTHVConnectorLong/2" z="-1/2*(UTCableCuThickS0+UTHVConnectorThick+UTCableKaptonThick)" /> --> </physvol> </volume> <!-- ========== Bare Stave ========== --> @@ -120,14 +123,7 @@ <!-- ====== Stave A/B/C (Computed in C++) ====== --> <!-- ========== Stave Type A ========== --> <!-- ========== Stave Type A core ========== --> - <volume material="Air" name="lvStaveACore" vis="UT:Envelope"> - <shape name="utStaveACore" operation="union" type="BooleanShape"> - <shape dx="UTStaveWide/2" dy="UTStaveLong/2" dz="(UTBareStaveThick+UTCableThick*2)/2" name="utStaveACoreBox" type="Box" /> - <shape dx="UTStaveWide/2" dy="(UTMegArrayY+UTMegArrayLong/2)/2" dz="UTStaveThick/2" name="utStaveACoreTop" type="Box" /> - <position y="UTStaveLong/2-UTMegArrayY/2-UTMegArrayLong/4" /> - <shape dx="UTStaveWide/2" dy="(UTMegArrayY+UTMegArrayLong/2)/2" dz="UTStaveThick/2" name="utStaveACoreBottom" type="Box" /> - <position y="-UTStaveLong/2+UTMegArrayY/2+UTMegArrayLong/4" /> - </shape> + <volume name="lvStaveACore" vis="UT:Envelope"> <physvol name="pvBareStaveA" volume="lvBareStaveA" /> <physvol name="pvCableA1" volume="lvCableS"> <position y="-UTStaveLong/2+UTCableLongS/2" z="-UTStaveCableZ" /> @@ -146,94 +142,16 @@ </physvol> </volume> <!-- ========== Stave Type A Front ========== --> - <volume material="Air" name="lvStaveAFront" vis="UT:Envelope"> - <shape dx="UTHybridWide/2" dy="(13*UTStaveHybridAStepY+2*UTStaveAHybridY0+UTHybridLongA)/2" dz="(UTHybrid4Thick+2*UTEpsilon)/2" name="utHybridAFront" type="Box" /> - <!-- - <physvol name="pvHybridA1" volume="lvHybridA"> - <position y="-13/2*UTStaveHybridAStepY-UTStaveAHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridA3" volume="lvHybridA"> - <position y="-9/2*UTStaveHybridAStepY-UTStaveAHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridA5" volume="lvHybridA"> - <position y="-5/2*UTStaveHybridAStepY-UTStaveAHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridA7" volume="lvHybridA"> - <position y="-1/2*UTStaveHybridAStepY-UTStaveAHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridA9" volume="lvHybridA"> - <position y="3/2*UTStaveHybridAStepY+UTStaveAHybridY0" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - <physvol name="pvHybridA11" volume="lvHybridA"> - <position y="7/2*UTStaveHybridAStepY+UTStaveAHybridY0" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - <physvol name="pvHybridA13" volume="lvHybridA"> - <position y="11/2*UTStaveHybridAStepY+UTStaveAHybridY0" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - --> - </volume> + <volume name="lvStaveAFront" vis="UT:Envelope"/> <!-- ========== Stave Type A Back ========== --> - <volume material="Air" name="lvStaveABack" vis="UT:Envelope"> - <shape dx="UTHybridWide/2" dy="(13*UTStaveHybridAStepY+2*UTStaveAHybridY0+UTHybridLongA)/2" dz="(UTHybrid4Thick+2*UTEpsilon)/2" name="utHybridABack" type="Box" /> - <!-- - <physvol name="pvHybridA2" volume="lvHybridA"> - <position y="-11/2*UTStaveHybridAStepY-UTStaveAHybridY0" /> - </physvol> - <physvol name="pvHybridA4" volume="lvHybridA"> - <position y="-7/2*UTStaveHybridAStepY-UTStaveAHybridY0" /> - </physvol> - <physvol name="pvHybridA6" volume="lvHybridA"> - <position y="-3/2*UTStaveHybridAStepY-UTStaveAHybridY0" /> - </physvol> - <physvol name="pvHybridA8" volume="lvHybridA"> - <position y="1/2*UTStaveHybridAStepY+UTStaveAHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridA10" volume="lvHybridA"> - <position y="5/2*UTStaveHybridAStepY+UTStaveAHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridA12" volume="lvHybridA"> - <position y="9/2*UTStaveHybridAStepY+UTStaveAHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridA14" volume="lvHybridA"> - <position y="13/2*UTStaveHybridAStepY+UTStaveAHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - --> - </volume> - <volume material="Air" name="lvStaveA" vis="UT:Envelope"> - <shape dx="UTStaveWide/2" dy="UTStaveLong/2" dz="UTStaveThick/2" name="utStaveA" type="Box" /> + <volume name="lvStaveABack" vis="UT:Envelope"/> + <volume name="lvStaveA" vis="UT:Envelope"> <physvol name="pvStaveACore" volume="lvStaveACore"> </physvol> - <!-- - <physvol name="pvStaveAFront" volume="lvStaveAFront"> - <position z="UTStaveHybridZ" /> - </physvol> - <physvol name="pvStaveABack" volume="lvStaveABack"> - <position z="-UTStaveHybridZ" /> - </physvol> - --> </volume> <!-- ========== Stave Type B ========== --> <!-- ========== Stave Type B core ========== --> - <volume material="Air" name="lvStaveBCore" vis="UT:Envelope"> - > - <shape name="utStaveBCore" operation="union" type="BooleanShape"> - <shape dx="UTStaveWide/2" dy="UTStaveLong/2" dz="(UTBareStaveThick+UTCableThick*2)/2" name="utStaveBCoreBox" type="Box" /> - <shape dx="UTStaveWide/2" dy="(UTMegArrayY+UTMegArrayLong/2)/2" dz="UTStaveThick/2" name="utStaveBCoreTop" type="Box" /> - <position y="UTStaveLong/2-UTMegArrayY/2-UTMegArrayLong/4" /> - <shape dx="UTStaveWide/2" dy="(UTMegArrayY+UTMegArrayLong/2)/2" dz="UTStaveThick/2" name="utStaveBCoreBottom" type="Box" /> - <position y="-UTStaveLong/2+UTMegArrayY/2+UTMegArrayLong/4" /> - </shape> + <volume name="lvStaveBCore" vis="UT:Envelope"> <physvol name="pvBareStaveB" volume="lvBareStaveB" /> <physvol name="pvCableB1" volume="lvCableS"> <position y="-UTStaveLong/2+UTCableLongS/2" z="-UTStaveCableZ" /> @@ -252,93 +170,16 @@ </physvol> </volume> <!-- ========== Stave Type B Front ========== --> - <volume material="Air" name="lvStaveBFront" vis="UT:Envelope"> - <shape dx="UTHybridWide/2" dy="(13*UTStaveHybridAStepY+2*UTStaveBHybridY0+UTHybridLongA)/2" dz="(UTHybrid4Thick+2*UTEpsilon)/2" name="utHybridBFront" type="Box" /> - <!-- - <physvol name="pvHybridB1" volume="lvHybridA"> - <position y="-13/2*UTStaveHybridAStepY-UTStaveBHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridB3" volume="lvHybridA"> - <position y="-9/2*UTStaveHybridAStepY-UTStaveBHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridB5" volume="lvHybridA"> - <position y="-5/2*UTStaveHybridAStepY-UTStaveBHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridB7" volume="lvHybridB"> - <position y="-1/2*UTStaveHybridAStepY-UTStaveBHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridB9" volume="lvHybridB"> - <position y="3/2*UTStaveHybridAStepY+UTStaveBHybridY0" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - <physvol name="pvHybridB11" volume="lvHybridA"> - <position y="7/2*UTStaveHybridAStepY+UTStaveBHybridY0" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - <physvol name="pvHybridB13" volume="lvHybridA"> - <position y="11/2*UTStaveHybridAStepY+UTStaveBHybridY0" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - --> - </volume> + <volume name="lvStaveBFront" vis="UT:Envelope"/> <!-- ========== Stave Type B Back ========== --> - <volume material="Air" name="lvStaveBBack" vis="UT:Envelope"> - <shape dx="UTHybridWide/2" dy="(13*UTStaveHybridAStepY+2*UTStaveBHybridY0+UTHybridLongA)/2" dz="(UTHybrid4Thick+2*UTEpsilon)/2" name="utHybridBBack" type="Box" /> - <!-- - <physvol name="pvHybridB2" volume="lvHybridA"> - <position y="-11/2*UTStaveHybridAStepY-UTStaveBHybridY0" /> - </physvol> - <physvol name="pvHybridB4" volume="lvHybridA"> - <position y="-7/2*UTStaveHybridAStepY-UTStaveBHybridY0" /> - </physvol> - <physvol name="pvHybridB6" volume="lvHybridB"> - <position y="-3/2*UTStaveHybridAStepY-UTStaveBHybridY0" /> - </physvol> - <physvol name="pvHybridB8" volume="lvHybridB"> - <position y="1/2*UTStaveHybridAStepY+UTStaveBHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridB10" volume="lvHybridA"> - <position y="5/2*UTStaveHybridAStepY+UTStaveBHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridB12" volume="lvHybridA"> - <position y="9/2*UTStaveHybridAStepY+UTStaveBHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridB14" volume="lvHybridA"> - <position y="13/2*UTStaveHybridAStepY+UTStaveBHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - --> - </volume> - <volume material="Air" name="lvStaveB" vis="UT:Envelope"> - <shape dx="UTStaveWide/2" dy="UTStaveLong/2" dz="UTStaveThick/2" name="utStaveB" type="Box" /> + <volume name="lvStaveBBack" vis="UT:Envelope"/> + <volume name="lvStaveB" vis="UT:Envelope"> <physvol name="pvStaveBCore" volume="lvStaveBCore"> </physvol> - <!-- - <physvol name="pvStaveBFront" volume="lvStaveBFront"> - <position z="UTStaveHybridZ" /> - </physvol> - <physvol name="pvStaveBBack" volume="lvStaveBBack"> - <position z="-UTStaveHybridZ" /> - </physvol> - --> </volume> <!-- ========== Stave Type C ========== --> <!-- ========== Stave Type C core ========== --> - <volume material="Air" name="lvStaveCCore" vis="UT:Envelope"> - <shape name="utStaveCCore" operation="union" type="BooleanShape"> - <shape dx="UTStaveWide/2" dy="UTStaveLong/2" dz="(UTBareStaveThick+UTCableThick*2)/2" name="utStaveCCoreBox" type="Box" /> - <shape dx="UTStaveWide/2" dy="(UTMegArrayY+UTMegArrayLong/2)/2" dz="UTStaveThick/2" name="utStaveCCoreTop" type="Box" /> - <position y="UTStaveLong/2-UTMegArrayY/2-UTMegArrayLong/4" /> - <shape dx="UTStaveWide/2" dy="(UTMegArrayY+UTMegArrayLong/2)/2" dz="UTStaveThick/2" name="utStaveCCoreBottom" type="Box" /> - <position y="-UTStaveLong/2+UTMegArrayY/2+UTMegArrayLong/4" /> - </shape> + <volume name="lvStaveCCore" vis="UT:Envelope"> <physvol name="pvBareStaveC" volume="lvBareStaveC" /> <physvol name="pvCableC1" volume="lvCableL"> <position y="-UTStaveLong/2+UTCableLongL/2" z="-UTStaveCableZ" /> @@ -357,88 +198,11 @@ </physvol> </volume> <!-- ========== Stave Type C Front ========== --> - <volume material="Air" name="lvStaveCFront" vis="UT:Envelope"> - <shape dx="UTHybridWide/2" dy="(11*UTStaveHybridAStepY+2*UTStaveCHybridY0+4*UTStaveHybridCStepY+UTHybridLongA)/2" dz="(UTHybrid4Thick+2*UTEpsilon)/2" name="utHybridCFront" type="Box" /> - <!-- - <physvol name="pvHybridC1" volume="lvHybridA"> - <position y="-11/2*UTStaveHybridAStepY-UTStaveCHybridY0-2*UTStaveHybridCStepY" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridC3" volume="lvHybridA"> - <position y="-7/2*UTStaveHybridAStepY-UTStaveCHybridY0-2*UTStaveHybridCStepY" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridC5" volume="lvHybridA"> - <position y="-3/2*UTStaveHybridAStepY-UTStaveCHybridY0-2*UTStaveHybridCStepY" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridC7" volume="lvHybridC"> - <position y="-3/2*UTStaveHybridCStepY-UTStaveCHybridY0" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvHybridC9" volume="lvHybridD"> - <position y="1/2*UTStaveHybridCStepY+UTStaveCHybridY0" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - <physvol name="pvHybridC11" volume="lvHybridB"> - <position y="1/2*UTStaveHybridAStepY+UTStaveCHybridY0+2*UTStaveHybridCStepY" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - <physvol name="pvHybridC13" volume="lvHybridA"> - <position y="5/2*UTStaveHybridAStepY+UTStaveCHybridY0+2*UTStaveHybridCStepY" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - <physvol name="pvHybridC15" volume="lvHybridA"> - <position y="9/2*UTStaveHybridAStepY+UTStaveCHybridY0+2*UTStaveHybridCStepY" /> - <rotation y="pi*rad" z="pi*rad" /> - </physvol> - --> - </volume> + <volume name="lvStaveCFront" vis="UT:Envelope"/> <!-- ========== Stave Type C Back ========== --> - <volume material="Air" name="lvStaveCBack" vis="UT:Envelope"> - <shape dx="UTHybridWide/2" dy="(11*UTStaveHybridAStepY+2*UTStaveCHybridY0+4*UTStaveHybridCStepY+UTHybridLongA)/2" dz="(UTHybrid4Thick+2*UTEpsilon)/2" name="utHybridCBack" type="Box" /> - <!-- - <physvol name="pvHybridC2" volume="lvHybridA"> - <position y="-9/2*UTStaveHybridAStepY-UTStaveCHybridY0-2*UTStaveHybridCStepY" /> - </physvol> - <physvol name="pvHybridC4" volume="lvHybridA"> - <position y="-5/2*UTStaveHybridAStepY-UTStaveCHybridY0-2*UTStaveHybridCStepY" /> - </physvol> - <physvol name="pvHybridC6" volume="lvHybridB"> - <position y="-1/2*UTStaveHybridAStepY-UTStaveCHybridY0-2*UTStaveHybridCStepY" /> - </physvol> - <physvol name="pvHybridC8" volume="lvHybridD"> - <position y="-1/2*UTStaveHybridCStepY-UTStaveCHybridY0" /> - </physvol> - <physvol name="pvHybridC10" volume="lvHybridC"> - <position y="3/2*UTStaveHybridCStepY+UTStaveCHybridY0" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridC12" volume="lvHybridA"> - <position y="3/2*UTStaveHybridAStepY+UTStaveCHybridY0+2*UTStaveHybridCStepY" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridC14" volume="lvHybridA"> - <position y="7/2*UTStaveHybridAStepY+UTStaveCHybridY0+2*UTStaveHybridCStepY" /> - <rotation z="pi*rad" /> - </physvol> - <physvol name="pvHybridC16" volume="lvHybridA"> - <position y="11/2*UTStaveHybridAStepY+UTStaveCHybridY0+2*UTStaveHybridCStepY" /> - <rotation z="pi*rad" /> - </physvol> - --> - </volume> - <volume material="Air" name="lvStaveC" vis="UT:Envelope"> - <shape dx="UTStaveWide/2" dy="UTStaveLong/2" dz="UTStaveThick/2" name="utStaveC" type="Box" /> + <volume name="lvStaveCBack" vis="UT:Envelope"/> + <volume name="lvStaveC" vis="UT:Envelope"> <physvol name="pvStaveCCore" volume="lvStaveCCore"> </physvol> - <!-- - <physvol name="pvStaveCFront" volume="lvStaveCFront"> - <position z="UTStaveHybridZ" /> - </physvol> - <physvol name="pvStaveCBack" volume="lvStaveCBack"> - <position z="-UTStaveHybridZ" /> - </physvol> - --> </volume> </ut> diff --git a/compact/trunk/UT/UTBox.xml b/compact/trunk/UT/UTBox.xml index 18993d1a7..99a981b81 100644 --- a/compact/trunk/UT/UTBox.xml +++ b/compact/trunk/UT/UTBox.xml @@ -10,6 +10,7 @@ or submit itself to any jurisdiction. --> <!-- UT frame --> + <volume name="lvUT" vis="UT:Envelope"/> <volume material="UT:Aluminium" name="lvUTFrame" vis="UT:Frame"> <shape name="utFrame" operation="subtraction" type="BooleanShape"> <shape dx="UTFrameOuterWide/2" dy="UTFrameOuterLong/2" dz="UTFrameThick/2" name="utFrameBoxOuter" type="Box" /> @@ -25,13 +26,13 @@ </shape> </volume> <!-- UT box plug --> - <volume material="UT:Airex" name="lvUTBoxPipeAirexRingInner"> + <volume vis="UT:Airex" material="UT:Airex" name="lvUTBoxPipeAirexRingInner"> <shape dz="UTBoxPipeAirexRingInnerThick/2" name="utBoxPipeAirexRingInner" rmax="UTBoxPipeAirexRingInnerOR" rmin="UTBoxPipeAirexRingIR" type="Tube" /> </volume> - <volume material="UT:Airex" name="lvUTBoxPipeAirexRingMiddle"> + <volume vis="UT:Airex" material="UT:Airex" name="lvUTBoxPipeAirexRingMiddle"> <shape dz="UTBoxPipeAirexRingMiddleThick/2" name="utBoxPipeAirexRingMiddle" rmax="UTBoxPipeAirexRingMiddleOR" rmin="UTBoxPipeAirexRingIR" type="Tube" /> </volume> - <volume material="UT:Airex" name="lvUTBoxPipeAirexRingOuter"> + <volume vis="UT:Airex" material="UT:Airex" name="lvUTBoxPipeAirexRingOuter"> <shape dz="UTBoxPipeAirexRingOuterThick/2" name="utBoxPipeAirexRingOuter" rmax="UTBoxPipeAirexRingOuterOR" rmin="UTBoxPipeAirexRingIR" type="Tube" /> </volume> <volume name="lvUTBoxPipeAirexRing"> @@ -43,18 +44,22 @@ <position z="-0.5*(UTBoxPipeAirexRingOuterThick+UTBoxPipeAirexRingMiddleThick)" /> </physvol> </volume> - <volume material="UT:EPDM" name="lvUTBoxWallSeal"> - <shape dz="UTBoxWallSealThick/2" name="utBoxWallSeal" rmax="UTBoxWallSealOR" rmin="UTBoxWallSealIR" type="Tube" /> + <volume vis="UT:EPDM" material="UT:EPDM" name="lvUTBoxWallSeal"> + <shape dz="UTBoxWallSealThick/2" name="utBoxWallSeal" rmax="UTBoxWallSealOR-UTEpsilon" rmin="UTBoxWallSealIR" type="Tube" /> </volume> - <volume material="UT:Airex" name="lvUTBoxInternalAirexRing"> - <shape dz="UTInternalRingThick/2" name="utBoxInternalAirexRing" rmax="UTInternalRingOR" rmin="UTInternalRingIR" type="Tube" /> + <volume vis="UT:HalfMoon" material="UT:Airex" name="lvUTBoxInternalAirexRing"> + <shape dz="UTInternalRingThick/2-UTEpsilon" name="utBoxInternalAirexRing" rmax="UTInternalRingOR" rmin="UTInternalRingIR" type="Tube" /> </volume> - <volume material="UT:EPDM" name="lvUTBoxInternalSeal"> + <volume vis="UT:EPDM" material="UT:EPDM" name="lvUTBoxInternalSeal"> <shape dz="UTInternalSealThick/2" name="utBoxInternalSeal" rmax="UTInternalSealOR" rmin="UTInternalSealIR" type="Tube" /> </volume> <volume name="lvUTBoxPlugPiece"> - <physvol name="pvUTBoxPipeAirexRing" volume="lvUTBoxPipeAirexRing" /> - <physvol name="pvUTBoxWallSeal" volume="lvUTBoxWallSeal" /> + <physvol name="pvUTBoxPipeAirexRing" volume="lvUTBoxPipeAirexRing"> + <position z="3*mm"/> + </physvol> + <physvol name="pvUTBoxWallSeal" volume="lvUTBoxWallSeal"> + <position z="3*mm"/> + </physvol> <physvol name="pvUTBoxInternalAirexRing" volume="lvUTBoxInternalAirexRing"> <position z="0.5*(UTBoxWallDownstreamThick+UTInternalRingThick)" /> </physvol> @@ -73,16 +78,16 @@ </volume> <!-- End of Stave (EOS) volumes --> <volume material="UT:Steel" name="lvUTaEOS" vis="UT:EOS"> - <shape dx="(UTEOSWideUTa/2)/2" dy="UTEOSLong/2" dz="UTEOSThick/2" name="utUTaEOS" type="Box" /> + <shape dx="(UTEOSWideUTa/2)/2-UTEpsilon" dy="UTEOSLong/2-UTEpsilon" dz="UTEOSThick/2-UTEpsilon" name="utUTaEOS" type="Box" /> </volume> <volume material="UT:EOSPigtail" name="lvUTaEOSPigtail" vis="UT:EOS"> - <shape dx="(UTEOSWideUTa/2)/2" dy="UTEOSPigtailLong/2" dz="UTEOSPigtailThick/2" name="utUTaEOSPigtail" type="Box" /> + <shape dx="(UTEOSWideUTa/2)/2-UTEpsilon" dy="UTEOSPigtailLong/2-UTEpsilon" dz="UTEOSPigtailThick/2-UTEpsilon" name="utUTaEOSPigtail" type="Box" /> </volume> <volume material="UT:Steel" name="lvUTbEOS" vis="UT:EOS"> - <shape dx="(UTEOSWideUTb/2)/2" dy="UTEOSLong/2" dz="UTEOSThick/2" name="utUTbEOS" type="Box" /> + <shape dx="(UTEOSWideUTb/2)/2-UTEpsilon" dy="UTEOSLong/2-UTEpsilon" dz="UTEOSThick/2-UTEpsilon" name="utUTbEOS" type="Box" /> </volume> <volume material="UT:EOSPigtail" name="lvUTbEOSPigtail" vis="UT:EOS"> - <shape dx="(UTEOSWideUTb/2)/2" dy="UTEOSPigtailLong/2" dz="UTEOSPigtailThick/2" name="utUTbEOSPigtail" type="Box" /> + <shape dx="(UTEOSWideUTb/2)/2-UTEpsilon" dy="UTEOSPigtailLong/2-UTEpsilon" dz="UTEOSPigtailThick/2-UTEpsilon" name="utUTbEOSPigtail" type="Box" /> </volume> <!-- UT Kapton jacket for electronic insulation --> <volume material="UT:BeamPipeJacket" name="lvUTCylJacket"> @@ -92,7 +97,7 @@ <shape dz="UTConeJacketUpstreamLength/2" name="UTConeJacketUpstream" rmax1="UTConeJacketCutOutRadiusZmin+UTConeJacketThick" rmax2="UTConeJacketRadiusZmin+UTConeJacketThick" rmin1="UTConeJacketCutOutRadiusZmin" rmin2="UTConeJacketRadiusZmin" type="ConeSegment" /> </volume> <volume material="UT:BeamPipeJacket" name="lvUTConeJacketDownstream"> - <shape dz="UTConeJacketDownstreamLength/2" name="UTConeJacketDownstream" rmax1="UTConeJacketRadiusZmax+UTConeJacketThick" rmax2="UTConeJacketCutOutRadiusZmax+UTConeJacketThick" rmin1="UTConeJacketRadiusZmax" rmin2="UTConeJacketCutOutRadiusZmax" type="ConeSegment" /> + <shape dz="UTConeJacketDownstreamLength/2" name="UTConeJacketDownstream" rmax2="UTConeJacketRadiusZmax+UTConeJacketThick" rmax1="UTConeJacketCutOutRadiusZmax+UTConeJacketThick" rmin2="UTConeJacketRadiusZmax" rmin1="UTConeJacketCutOutRadiusZmax" type="ConeSegment" /> </volume> <volume name="lvUTJacket"> <physvol name="pvUTCylJacket" volume="lvUTCylJacket"> @@ -105,17 +110,21 @@ <position z="UTConeJacketZposDownstream" /> </physvol> </volume> - <volume material="UT:PipeHeater" name="lvUTPipeHeaterUpstream"> + <volume vis="UT:PipeHeater" material="UT:PipeHeater" name="lvUTPipeHeaterUpstream"> <shape dz="UTPipeHeaterUpstreamLength/2" name="UTPipeHeaterUpstream" rmax="UTPipeHeaterUpstreamRadius+UTPipeHeaterUpstreamThick" rmin="UTPipeHeaterUpstreamRadius" type="Tube" /> </volume> - <volume material="UT:PipeHeater" name="lvUTPipeHeaterDownstream"> - <shape dz="UTPipeHeaterDownstreamLength/2" name="UTPipeHeaterDownstream" rmax1="UTPipeHeaterDownstreamRadiusZmax+UTPipeHeaterDownstreamThick" rmax2="UTPipeHeaterDownstreamRadiusZmin+UTPipeHeaterDownstreamThick" rmin1="UTPipeHeaterDownstreamRadiusZmax" rmin2="UTPipeHeaterDownstreamRadiusZmin" type="ConeSegment" /> + <volume vis="UT:PipeHeater" material="UT:PipeHeater" name="lvUTPipeHeaterDownstreamInUT"> + <shape name="utPipeHeaterInUT" operation="subtraction" type="BooleanShape"> + <shape dz="UTPipeHeaterDownstreamLength/2" name="UTPipeHeaterDownstream" rmax2="UTPipeHeaterDownstreamRadiusZmax+UTPipeHeaterDownstreamThick" rmax1="UTPipeHeaterDownstreamRadiusZmin+UTPipeHeaterDownstreamThick" rmin2="UTPipeHeaterDownstreamRadiusZmax" rmin1="UTPipeHeaterDownstreamRadiusZmin" type="ConeSegment" /> + <shape rmax="UTPipeHeaterDownstreamRadiusZmax+UTPipeHeaterDownstreamThick+UTEpsilon" dz="(UTPipeHeaterDownstreamLengthInMagnet)/2+UTEpsilon" name="UTPipeHeaterDownstreamInUTSubMagnet" type="Tube" /> + <position z="UTPipeHeaterDownstreamZmax-(UTPipeHeaterDownstreamLengthInMagnet)/2+UTEpsilon-UTPipeHeaterDownstreamPos-UTSystemZ" /> + </shape> </volume> <volume name="lvUTPipeHeater"> <physvol name="pvUTPipeHeaterUpstream" volume="lvUTPipeHeaterUpstream"> <position z="UTPipeHeaterUpstreamPos" /> </physvol> - <physvol name="pvUTPipeHeaterDownstream" volume="lvUTPipeHeaterDownstream"> + <physvol name="pvUTPipeHeaterDownstream" volume="lvUTPipeHeaterDownstreamInUT"> <position z="UTPipeHeaterDownstreamPos" /> </physvol> </volume> diff --git a/compact/trunk/UT/UTHalf.xml b/compact/trunk/UT/UTHalf.xml index 4fc21cd2e..d80f4678a 100644 --- a/compact/trunk/UT/UTHalf.xml +++ b/compact/trunk/UT/UTHalf.xml @@ -9,120 +9,6 @@ granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. --> - <volume material="Air" name="lvUTC" vis="UT:Envelope"> - <shape name="UTCBox" operation="subtraction" type="BooleanShape"> - <shape name="UTCBareBox" operation="union" type="BooleanShape"> - <!-- UTaX --> - <shape name="UTaXCsideBox" type="Trd2" x1="UTaXLayerSideShortWidth/2" x2="UTaXLayerSideLongWidth/2" y1="UTBoxInnerLong/2" y2="UTBoxInnerLong/2" z="UTBareLayerThick/2" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaXCsideEOSMountingBox1" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaXCsideEOSMountingBox2" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - <!-- UTaU --> - <shape name="UTaUCsideBox" operation="intersection" type="BooleanShape"> - <shape dx="UTVirtualBoxWide/2" dy="UTBoxInnerLong/2" dz="UTBareLayerThick/2" name="UTaUCvbox" type="Box" /> - <shape name="UTaUCsideBox0" type="Trd2" x1="UTaULayerSideShortWidth/2" x2="UTaULayerSideLongWidth/2" y1="UTBoxInnerLong" y2="UTBoxInnerLong" z="UTBareLayerThick/2" /> - <position x="UTLayerSideCorrectedX" y="UTLayerSideCorrectedY" /> - <rotation z="-UTAngle" /> - </shape> - <position z="UTLayerDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaUCsideEOSMountingBox1" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz+UTLayerDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaUCsideEOSMountingBox2" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz+UTLayerDz" /> - <!-- UTbV --> - <shape name="UTbVCsideBox" operation="intersection" type="BooleanShape"> - <shape dx="UTVirtualBoxWide/2" dy="UTBoxInnerLong/2" dz="UTBareLayerThick/2" name="UTbVCvbox" type="Box" /> - <shape name="UTbVCsideBox0" type="Trd2" x1="UTbVLayerSideShortWidth/2" x2="UTbVLayerSideLongWidth/2" y1="UTBoxInnerLong" y2="UTBoxInnerLong" z="UTBareLayerThick/2" /> - <position x="UTLayerSideCorrectedX" y="-UTLayerSideCorrectedY" /> - <rotation z="UTAngle" /> - </shape> - <position z="UTStationDz" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbVCsideEOSMountingBox1" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz+UTStationDz" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbVCsideEOSMountingBox2" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz+UTStationDz" /> - <!-- UTbX --> - <shape name="UTbXCsideBox" type="Trd2" x1="UTbXLayerSideShortWidth/2" x2="UTbXLayerSideLongWidth/2" y1="UTBoxInnerLong/2" y2="UTBoxInnerLong/2" z="UTBareLayerThick/2" /> - <position z="UTLayerDz+UTStationDz" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbXCsideEOSMountingBox1" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz+UTStationDz+UTLayerDz" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbXCsideEOSMountingBox2" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz+UTStationDz+UTLayerDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTCBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="1/2*UTLayerSideCorrectedWidth" z="1/2*UTLayerDz+1/2*UTStationDz" /> - </shape> - <!-- - <physvol name="pvUTaXCsideLayer" volume="lvUTaXCsideLayer"> - </physvol> - <physvol name="pvUTaUCsideLayer" volume="lvUTaUCsideLayer"> - <position z="UTLayerDz" /> - </physvol> - <physvol name="pvUTbVCsideLayer" volume="lvUTbVCsideLayer"> - <position z="UTStationDz" /> - </physvol> - <physvol name="pvUTbXCsideLayer" volume="lvUTbXCsideLayer"> - <position z="UTStationDz+UTLayerDz" /> - </physvol> - --> - </volume> - <volume material="Air" name="lvUTA" vis="UT:Envelope"> - <shape name="UTABox" operation="subtraction" type="BooleanShape"> - <shape name="UTABareBox" operation="union" type="BooleanShape"> - <!-- UTaX --> - <shape name="UTaXAsideBox" type="Trd2" x1="UTaXLayerSideLongWidth/2" x2="UTaXLayerSideShortWidth/2" y1="UTBoxInnerLong/2" y2="UTBoxInnerLong/2" z="UTBareLayerThick/2" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaXAsideEOSMountingBox1" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaXAsideEOSMountingBox2" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - <!-- UTaU --> - <shape name="UTaUAsideBox" operation="intersection" type="BooleanShape"> - <shape dx="UTVirtualBoxWide/2" dy="UTBoxInnerLong/2" dz="UTBareLayerThick/2" name="UTaUAvbox" type="Box" /> - <shape name="UTaUAsideBox0" type="Trd2" x1="UTaULayerSideLongWidth/2" x2="UTaULayerSideShortWidth/2" y1="UTBoxInnerLong" y2="UTBoxInnerLong" z="UTBareLayerThick/2" /> - <position x="-UTLayerSideCorrectedX" y="-UTLayerSideCorrectedY" /> - <rotation z="-UTAngle" /> - </shape> - <position z="UTLayerDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaUAsideEOSMountingBox1" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz+UTLayerDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaUAsideEOSMountingBox2" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz+UTLayerDz" /> - <!-- UTbV --> - <shape name="UTbVAsideBox" operation="intersection" type="BooleanShape"> - <shape dx="UTVirtualBoxWide/2" dy="UTBoxInnerLong/2" dz="UTBareLayerThick/2" name="UTbVAvbox" type="Box" /> - <shape name="UTbVAsideBox0" type="Trd2" x1="UTbVLayerSideLongWidth/2" x2="UTbVLayerSideShortWidth/2" y1="UTBoxInnerLong" y2="UTBoxInnerLong" z="UTBareLayerThick/2" /> - <position x="-UTLayerSideCorrectedX" y="UTLayerSideCorrectedY" /> - <rotation z="UTAngle" /> - </shape> - <position z="UTStationDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbVAsideEOSMountingBox1" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz+UTStationDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbVAsideEOSMountingBox2" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz+UTStationDz" /> - <!-- UTbX --> - <shape name="UTbXAsideBox" type="Trd2" x1="UTbXLayerSideLongWidth/2" x2="UTbXLayerSideShortWidth/2" y1="UTBoxInnerLong/2" y2="UTBoxInnerLong/2" z="UTBareLayerThick/2" /> - <position z="UTLayerDz+UTStationDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbXAsideEOSMountingBox1" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz+UTStationDz+UTLayerDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbXAsideEOSMountingBox2" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz+UTStationDz+UTLayerDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTABeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="-1/2*UTLayerSideCorrectedWidth" z="1/2*UTLayerDz+1/2*UTStationDz" /> - </shape> - <!-- - <physvol name="pvUTaXAsideLayer" volume="lvUTaXAsideLayer"> - </physvol> - <physvol name="pvUTaUAsideLayer" volume="lvUTaUAsideLayer"> - <position z="UTLayerDz" /> - </physvol> - <physvol name="pvUTbVAsideLayer" volume="lvUTbVAsideLayer"> - <position z="UTStationDz" /> - </physvol> - <physvol name="pvUTbXAsideLayer" volume="lvUTbXAsideLayer"> - <position z="UTStationDz+UTLayerDz" /> - </physvol> - --> - </volume> + <volume name="lvUTC" vis="UT:Envelope"/> + <volume name="lvUTA" vis="UT:Envelope"/> </ut> diff --git a/compact/trunk/UT/UTaULayer.xml b/compact/trunk/UT/UTaULayer.xml index e361fd96f..7ab08a95c 100644 --- a/compact/trunk/UT/UTaULayer.xml +++ b/compact/trunk/UT/UTaULayer.xml @@ -9,61 +9,7 @@ granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. --> - <volume material="Air" name="lvUTaUCsideLayer" vis="UT:Envelope"> - <shape name="UTaUCLayerBoxSub" operation="subtraction" type="BooleanShape"> - <shape name="UTaUCLayerBareBox" operation="union" type="BooleanShape"> - <shape name="UTaUCsideLayerBox" operation="intersection" type="BooleanShape"> - <shape dx="UTVirtualBoxWide/2" dy="UTBoxInnerLong/2" dz="UTBareLayerThick/2" name="UTaUCLayervbox" type="Box" /> - <shape name="UTaUCsideLayerBox0" type="Trd2" x1="UTaULayerSideShortWidth/2" x2="UTaULayerSideLongWidth/2" y1="UTBoxInnerLong" y2="UTBoxInnerLong" z="UTBareLayerThick/2" /> - <position x="UTLayerSideCorrectedX" y="UTLayerSideCorrectedY" /> - <rotation z="-UTAngle" /> - </shape> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaUCsideLayerEOSMountingBox1" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaUCsideLayerEOSMountingBox2" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTaUCsideBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="1/2*UTLayerSideCorrectedWidth" /> - </shape> - <!-- Region 2 in the middle --> - <!-- - <physvol name="pvUTaULayerR2Stave2" volume="lvStaveC"> - <position x="1/2*UTLayerSideCorrectedWidth-1/2*UTStaveStep+UTStaveCCorrectUV+UTaUR2S2CorrectionX" y="UTStaveCUVPosY" z="UTStaveDz/2" /> - <rotation z="-UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR2Stave1" volume="lvStaveB"> - <position x="1/2*UTLayerSideCorrectedWidth-3/2*UTStaveStep+UTStaveBCorrectUV+UTaUR2S1CorrectionX" z="-UTStaveDz/2" /> - <rotation z="-UTAngle" /> - </physvol> - --> - <!-- Region 1 at -X --> - <!-- - <physvol name="pvUTaULayerR1Stave6" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-5/2*UTStaveStep+UTStaveACorrectUV+UTaUR1S6CorrectionX" z="UTStaveDz/2" /> - <rotation z="-UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR1Stave5" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-7/2*UTStaveStep+UTStaveACorrectUV+UTaUR1S5CorrectionX" z="-UTStaveDz/2" /> - <rotation z="-UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR1Stave4" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-9/2*UTStaveStep+UTStaveACorrectUV+UTaUR1S4CorrectionX" z="UTStaveDz/2" /> - <rotation z="-UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR1Stave3" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-11/2*UTStaveStep+UTStaveACorrectUV+UTaUR1S3CorrectionX" z="-UTStaveDz/2" /> - <rotation z="-UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR1Stave2" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-13/2*UTStaveStep+UTStaveACorrectUV+UTaUR1S2CorrectionX" z="UTStaveDz/2" /> - <rotation z="-UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR1Stave1" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-15/2*UTStaveStep+UTStaveACorrectUV+UTaUR1S1CorrectionX" z="-UTStaveDz/2" /> - <rotation z="-UTAngle" /> - </physvol> - --> + <volume name="lvUTaUCsideLayer" vis="UT:Envelope"> <physvol name="pvUTaCEOSU1" volume="lvUTaEOS"> <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong/2" z="UTStaveDz" /> </physvol> @@ -71,68 +17,14 @@ <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong/2)" z="UTStaveDz" /> </physvol> <physvol name="pvUTaCEOSPigtailU1" volume="lvUTaEOSPigtail"> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz" /> + <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> <physvol name="pvUTaCEOSPigtailU2" volume="lvUTaEOSPigtail"> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz" /> + <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> </volume> <!-- ================================================================= --> - <volume material="Air" name="lvUTaUAsideLayer" vis="UT:Envelope"> - <shape name="UTaUALayerBoxSub" operation="subtraction" type="BooleanShape"> - <shape name="UTaUALayerBareBox" operation="union" type="BooleanShape"> - <shape name="UTaUAsideLayerBox" operation="intersection" type="BooleanShape"> - <shape dx="UTVirtualBoxWide/2" dy="UTBoxInnerLong/2" dz="UTBareLayerThick/2" name="UTaUALayervbox" type="Box" /> - <shape name="UTaUAsideLayerBox0" type="Trd2" x1="UTaULayerSideLongWidth/2" x2="UTaULayerSideShortWidth/2" y1="UTBoxInnerLong" y2="UTBoxInnerLong" z="UTBareLayerThick/2" /> - <position x="-UTLayerSideCorrectedX" y="-UTLayerSideCorrectedY" /> - <rotation z="-UTAngle" /> - </shape> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaUAsideLayerEOSMountingBox1" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaUAsideLayerEOSMountingBox2" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTaUAsideBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="-1/2*UTLayerSideCorrectedWidth" /> - </shape> - <!-- Region 2 in the middle --> - <!-- - <physvol name="pvUTaULayerR2Stave3" volume="lvStaveC"> - <position x="-1/2*UTLayerSideCorrectedWidth+1/2*UTStaveStep-UTStaveCCorrectUV+UTaUR2S3CorrectionX" y="-UTStaveCUVPosY" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR2Stave4" volume="lvStaveB"> - <position x="-1/2*UTLayerSideCorrectedWidth+3/2*UTStaveStep-UTStaveBCorrectUV+UTaUR2S4CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" z="UTAngle" /> - </physvol> - --> - <!-- Region 3 at +X --> - <!-- - <physvol name="pvUTaULayerR3Stave1" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+5/2*UTStaveStep-UTStaveACorrectUV+UTaUR3S1CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR3Stave2" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+7/2*UTStaveStep-UTStaveACorrectUV+UTaUR3S2CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" z="UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR3Stave3" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+9/2*UTStaveStep-UTStaveACorrectUV+UTaUR3S3CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR3Stave4" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+11/2*UTStaveStep-UTStaveACorrectUV+UTaUR3S4CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" z="UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR3Stave5" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+13/2*UTStaveStep-UTStaveACorrectUV+UTaUR3S5CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="UTAngle" /> - </physvol> - <physvol name="pvUTaULayerR3Stave6" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+15/2*UTStaveStep-UTStaveACorrectUV+UTaUR3S6CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" z="UTAngle" /> - </physvol> - --> + <volume name="lvUTaUAsideLayer" vis="UT:Envelope"> <physvol name="pvUTaAEOSU1" volume="lvUTaEOS"> <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong/2" z="UTStaveDz" /> </physvol> @@ -140,10 +32,10 @@ <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong/2)" z="UTStaveDz" /> </physvol> <physvol name="pvUTaAEOSPigtailU1" volume="lvUTaEOSPigtail"> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz" /> + <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> <physvol name="pvUTaAEOSPigtailU2" volume="lvUTaEOSPigtail"> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz" /> + <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> </volume> </ut> diff --git a/compact/trunk/UT/UTaXLayer.xml b/compact/trunk/UT/UTaXLayer.xml index 31bb9d350..27523bed2 100644 --- a/compact/trunk/UT/UTaXLayer.xml +++ b/compact/trunk/UT/UTaXLayer.xml @@ -9,48 +9,7 @@ granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. --> - <volume material="Air" name="lvUTaXCsideLayer" vis="UT:Envelope"> - <shape name="UTaXCLayerBoxSub" operation="subtraction" type="BooleanShape"> - <shape name="UTaXCLayerBareBox" operation="union" type="BooleanShape"> - <shape name="UTaXCsideLayerBox" type="Trd2" x1="UTaXLayerSideShortWidth/2" x2="UTaXLayerSideLongWidth/2" y1="UTBoxInnerLong/2" y2="UTBoxInnerLong/2" z="UTBareLayerThick/2" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaXCsideLayerEOSMountingBox1" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaXCsideLayerEOSMountingBox2" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTaXCsideBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="1/2*UTLayerSideCorrectedWidth" /> - </shape> - <!-- Region 2 in the middle --> - <!-- - <physvol name="pvUTaXLayerR2Stave2" volume="lvStaveC"> - <position x="1/2*UTLayerSideCorrectedWidth-1/2*UTStaveStep+UTStaveCCorrect+UTaXR2S2CorrectionX" z="UTStaveDz/2" /> - </physvol> - <physvol name="pvUTaXLayerR2Stave1" volume="lvStaveB"> - <position x="1/2*UTLayerSideCorrectedWidth-3/2*UTStaveStep+UTStaveBCorrect+UTaXR2S1CorrectionX" z="-UTStaveDz/2" /> - </physvol> - --> - <!-- Region 1 at -X --> - <!-- - <physvol name="pvUTaXLayerR1Stave6" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-5/2*UTStaveStep+UTStaveACorrect+UTaXR1S6CorrectionX" z="UTStaveDz/2" /> - </physvol> - <physvol name="pvUTaXLayerR1Stave5" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-7/2*UTStaveStep+UTStaveACorrect+UTaXR1S5CorrectionX" z="-UTStaveDz/2" /> - </physvol> - <physvol name="pvUTaXLayerR1Stave4" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-9/2*UTStaveStep+UTStaveACorrect+UTaXR1S4CorrectionX" z="UTStaveDz/2" /> - </physvol> - <physvol name="pvUTaXLayerR1Stave3" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-11/2*UTStaveStep+UTStaveACorrect+UTaXR1S3CorrectionX" z="-UTStaveDz/2" /> - </physvol> - <physvol name="pvUTaXLayerR1Stave2" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-13/2*UTStaveStep+UTStaveACorrect+UTaXR1S2CorrectionX" z="UTStaveDz/2" /> - </physvol> - <physvol name="pvUTaXLayerR1Stave1" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-15/2*UTStaveStep+UTStaveACorrect+UTaXR1S1CorrectionX" z="-UTStaveDz/2" /> - </physvol> - --> + <volume name="lvUTaXCsideLayer" vis="UT:Envelope"> <physvol name="pvUTaCEOSX1" volume="lvUTaEOS"> <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong/2" z="UTStaveDz" /> </physvol> @@ -58,63 +17,14 @@ <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong/2)" z="UTStaveDz" /> </physvol> <physvol name="pvUTaCEOSPigtailX1" volume="lvUTaEOSPigtail"> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz" /> + <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> <physvol name="pvUTaCEOSPigtailX2" volume="lvUTaEOSPigtail"> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz" /> + <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> </volume> <!-- ================================================================= --> - <volume material="Air" name="lvUTaXAsideLayer" vis="UT:Envelope"> - <shape name="UTaXALayerBoxSub" operation="subtraction" type="BooleanShape"> - <shape name="UTaXALayerBareBox" operation="union" type="BooleanShape"> - <shape name="UTaXAsideLayerBox" type="Trd2" x1="UTaXLayerSideLongWidth/2" x2="UTaXLayerSideShortWidth/2" y1="UTBoxInnerLong/2" y2="UTBoxInnerLong/2" z="UTBareLayerThick/2" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaXAsideLayerEOSMountingBox1" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTa/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTaXAsideLayerEOSMountingBox2" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTaXAsideBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="-1/2*UTLayerSideCorrectedWidth" /> - </shape> - <!-- Region 2 in the middle --> - <!-- - <physvol name="pvUTaXLayerR2Stave3" volume="lvStaveC"> - <position x="-1/2*UTLayerSideCorrectedWidth+1/2*UTStaveStep-UTStaveCCorrect+UTaXR2S3CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTaXLayerR2Stave4" volume="lvStaveB"> - <position x="-1/2*UTLayerSideCorrectedWidth+3/2*UTStaveStep-UTStaveBCorrect+UTaXR2S4CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - --> - <!-- Region 3 at +X --> - <!-- - <physvol name="pvUTaXLayerR3Stave1" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+5/2*UTStaveStep-UTStaveACorrect+UTaXR3S1CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTaXLayerR3Stave2" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+7/2*UTStaveStep-UTStaveACorrect+UTaXR3S2CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTaXLayerR3Stave3" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+9/2*UTStaveStep-UTStaveACorrect+UTaXR3S3CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTaXLayerR3Stave4" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+11/2*UTStaveStep-UTStaveACorrect+UTaXR3S4CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTaXLayerR3Stave5" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+13/2*UTStaveStep-UTStaveACorrect+UTaXR3S5CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTaXLayerR3Stave6" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+15/2*UTStaveStep-UTStaveACorrect+UTaXR3S6CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - --> + <volume name="lvUTaXAsideLayer" vis="UT:Envelope"> <physvol name="pvUTaAEOSX1" volume="lvUTaEOS"> <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong/2" z="UTStaveDz" /> </physvol> @@ -122,10 +32,10 @@ <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong/2)" z="UTStaveDz" /> </physvol> <physvol name="pvUTaAEOSPigtailX1" volume="lvUTaEOSPigtail"> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz" /> + <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> <physvol name="pvUTaAEOSPigtailX2" volume="lvUTaEOSPigtail"> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz" /> + <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTa/4)" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> </volume> </ut> diff --git a/compact/trunk/UT/UTbVLayer.xml b/compact/trunk/UT/UTbVLayer.xml index acced9b80..302b73816 100644 --- a/compact/trunk/UT/UTbVLayer.xml +++ b/compact/trunk/UT/UTbVLayer.xml @@ -9,65 +9,7 @@ granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. --> - <volume material="Air" name="lvUTbVCsideLayer" vis="UT:Envelope"> - <shape name="UTbVCLayerBoxSub" operation="subtraction" type="BooleanShape"> - <shape name="UTbVCLayerBareBox" operation="union" type="BooleanShape"> - <shape name="UTbVCsideLayerBox" operation="intersection" type="BooleanShape"> - <shape dx="UTVirtualBoxWide/2" dy="UTBoxInnerLong/2" dz="UTBareLayerThick/2" name="UTbVCLayervbox" type="Box" /> - <shape name="UTbVCsideLayerBox0" type="Trd2" x1="UTbVLayerSideShortWidth/2" x2="UTbVLayerSideLongWidth/2" y1="UTBoxInnerLong" y2="UTBoxInnerLong" z="UTBareLayerThick/2" /> - <position x="UTLayerSideCorrectedX" y="-UTLayerSideCorrectedY" /> - <rotation z="UTAngle" /> - </shape> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbVCsideLayerEOSMountingBox1" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbVCsideLayerEOSMountingBox2" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTbVCsideBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="1/2*UTLayerSideCorrectedWidth" /> - </shape> - <!-- Region 2 in the middle --> - <!-- - <physvol name="pvUTbVLayerR2Stave2" volume="lvStaveC"> - <position x="1/2*UTLayerSideCorrectedWidth-1/2*UTStaveStep+UTStaveCCorrectUV+UTbVR2S2CorrectionX" y="-UTStaveCUVPosY" z="UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR2Stave1" volume="lvStaveB"> - <position x="1/2*UTLayerSideCorrectedWidth-3/2*UTStaveStep+UTStaveBCorrectUV+UTbVR2S1CorrectionX" z="-UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - --> - <!-- Region 1 at -X --> - <!-- - <physvol name="pvUTbVLayerR1Stave7" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-5/2*UTStaveStep+UTStaveACorrectUV+UTbVR1S7CorrectionX" z="UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR1Stave6" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-7/2*UTStaveStep+UTStaveACorrectUV+UTbVR1S6CorrectionX" z="-UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR1Stave5" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-9/2*UTStaveStep+UTStaveACorrectUV+UTbVR1S5CorrectionX" z="UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR1Stave4" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-11/2*UTStaveStep+UTStaveACorrectUV+UTbVR1S4CorrectionX" z="-UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR1Stave3" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-13/2*UTStaveStep+UTStaveACorrectUV+UTbVR1S3CorrectionX" z="UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR1Stave2" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-15/2*UTStaveStep+UTStaveACorrectUV+UTbVR1S2CorrectionX" z="-UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR1Stave1" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-17/2*UTStaveStep+UTStaveACorrectUV+UTbVR1S1CorrectionX" z="UTStaveDz/2" /> - <rotation z="UTAngle" /> - </physvol> - --> + <volume name="lvUTbVCsideLayer" vis="UT:Envelope"> <physvol name="pvUTbCEOSV1" volume="lvUTbEOS"> <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong/2" z="UTStaveDz" /> </physvol> @@ -75,72 +17,14 @@ <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong/2)" z="UTStaveDz" /> </physvol> <physvol name="pvUTbCEOSPigtailV1" volume="lvUTbEOSPigtail"> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz" /> + <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> <physvol name="pvUTbCEOSPigtailV2" volume="lvUTbEOSPigtail"> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz" /> + <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> </volume> <!-- ================================================================= --> - <volume material="Air" name="lvUTbVAsideLayer" vis="UT:Envelope"> - <shape name="UTbVALayerBoxSub" operation="subtraction" type="BooleanShape"> - <shape name="UTbVALayerBareBox" operation="union" type="BooleanShape"> - <shape name="UTbVAsideLayerBox" operation="intersection" type="BooleanShape"> - <shape dx="UTVirtualBoxWide/2" dy="UTBoxInnerLong/2" dz="UTBareLayerThick/2" name="UTbVALayervbox" type="Box" /> - <shape name="UTbVAsideLayerBox0" type="Trd2" x1="UTbVLayerSideLongWidth/2" x2="UTbVLayerSideShortWidth/2" y1="UTBoxInnerLong" y2="UTBoxInnerLong" z="UTBareLayerThick/2" /> - <position x="-UTLayerSideCorrectedX" y="UTLayerSideCorrectedY" /> - <rotation z="UTAngle" /> - </shape> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbVAsideLayerEOSMountingBox1" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbVAsideLayerEOSMountingBox2" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTbVAsideBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="-1/2*UTLayerSideCorrectedWidth" /> - </shape> - <!-- Region 2 in the middle --> - <!-- - <physvol name="pvUTbVLayerR2Stave3" volume="lvStaveC"> - <position x="-1/2*UTLayerSideCorrectedWidth+1/2*UTStaveStep-UTStaveCCorrectUV+UTbVR2S3CorrectionX" y="UTStaveCUVPosY" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR2Stave4" volume="lvStaveB"> - <position x="-1/2*UTLayerSideCorrectedWidth+3/2*UTStaveStep-UTStaveBCorrectUV+UTbVR2S4CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - --> - <!-- Region 3 at +X --> - <!-- - <physvol name="pvUTbVLayerR3Stave1" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+5/2*UTStaveStep-UTStaveACorrectUV+UTbVR3S1CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR3Stave2" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+7/2*UTStaveStep-UTStaveACorrectUV+UTbVR3S2CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR3Stave3" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+9/2*UTStaveStep-UTStaveACorrectUV+UTbVR3S3CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR3Stave4" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+11/2*UTStaveStep-UTStaveACorrectUV+UTbVR3S4CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR3Stave5" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+13/2*UTStaveStep-UTStaveACorrectUV+UTbVR3S5CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR3Stave6" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+15/2*UTStaveStep-UTStaveACorrectUV+UTbVR3S6CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - <physvol name="pvUTbVLayerR3Stave7" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+17/2*UTStaveStep-UTStaveACorrectUV+UTbVR3S7CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" z="-UTAngle" /> - </physvol> - --> + <volume name="lvUTbVAsideLayer" vis="UT:Envelope"> <physvol name="pvUTbAEOSV1" volume="lvUTbEOS"> <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="UTBareStaveLong/2+UTEOSLong/2" z="UTStaveDz" /> </physvol> @@ -148,10 +32,10 @@ <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="-(UTBareStaveLong/2+UTEOSLong/2)" z="UTStaveDz" /> </physvol> <physvol name="pvUTbAEOSPigtailV1" volume="lvUTbEOSPigtail"> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz" /> + <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> <physvol name="pvUTbAEOSPigtailV2" volume="lvUTbEOSPigtail"> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz" /> + <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> </volume> </ut> diff --git a/compact/trunk/UT/UTbXLayer.xml b/compact/trunk/UT/UTbXLayer.xml index c4e65f7ba..0e205e655 100644 --- a/compact/trunk/UT/UTbXLayer.xml +++ b/compact/trunk/UT/UTbXLayer.xml @@ -9,51 +9,7 @@ granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. --> - <volume material="Air" name="lvUTbXCsideLayer" vis="UT:Envelope"> - <shape name="UTbXCLayerBoxSub" operation="subtraction" type="BooleanShape"> - <shape name="UTbXCLayerBareBox" operation="union" type="BooleanShape"> - <shape name="UTbXCsideLayerBox" type="Trd2" x1="UTbXLayerSideShortWidth/2" x2="UTbXLayerSideLongWidth/2" y1="UTBoxInnerLong/2" y2="UTBoxInnerLong/2" z="UTBareLayerThick/2" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbXCsideLayerEOSMountingBox1" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbXCsideLayerEOSMountingBox2" type="Box" /> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTbXCsideBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="1/2*UTLayerSideCorrectedWidth" /> - </shape> - <!-- Region 2 in the middle --> - <!-- - <physvol name="pvUTbXLayerR2Stave2" volume="lvStaveC"> - <position x="1/2*UTLayerSideCorrectedWidth-1/2*UTStaveStep+UTStaveCCorrect+UTbXR2S2CorrectionX" z="UTStaveDz/2" /> - </physvol> - <physvol name="pvUTbXLayerR2Stave1" volume="lvStaveB"> - <position x="1/2*UTLayerSideCorrectedWidth-3/2*UTStaveStep+UTStaveBCorrect+UTbXR2S1CorrectionX" z="-UTStaveDz/2" /> - </physvol> - --> - <!-- Region 1 at -X --> - <!-- - <physvol name="pvUTbXLayerR1Stave7" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-5/2*UTStaveStep+UTStaveACorrect+UTbXR1S7CorrectionX" z="UTStaveDz/2" /> - </physvol> - <physvol name="pvUTbXLayerR1Stave6" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-7/2*UTStaveStep+UTStaveACorrect+UTbXR1S6CorrectionX" z="-UTStaveDz/2" /> - </physvol> - <physvol name="pvUTbXLayerR1Stave5" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-9/2*UTStaveStep+UTStaveACorrect+UTbXR1S5CorrectionX" z="UTStaveDz/2" /> - </physvol> - <physvol name="pvUTbXLayerR1Stave4" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-11/2*UTStaveStep+UTStaveACorrect+UTbXR1S4CorrectionX" z="-UTStaveDz/2" /> - </physvol> - <physvol name="pvUTbXLayerR1Stave3" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-13/2*UTStaveStep+UTStaveACorrect+UTbXR1S3CorrectionX" z="UTStaveDz/2" /> - </physvol> - <physvol name="pvUTbXLayerR1Stave2" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-15/2*UTStaveStep+UTStaveACorrect+UTbXR1S2CorrectionX" z="-UTStaveDz/2" /> - </physvol> - <physvol name="pvUTbXLayerR1Stave1" volume="lvStaveA"> - <position x="1/2*UTLayerSideCorrectedWidth-17/2*UTStaveStep+UTStaveACorrect+UTbXR1S1CorrectionX" z="UTStaveDz/2" /> - </physvol> - --> + <volume name="lvUTbXCsideLayer" vis="UT:Envelope"> <physvol name="pvUTbCEOSX1" volume="lvUTbEOS"> <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong/2" z="UTStaveDz" /> </physvol> @@ -61,67 +17,15 @@ <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong/2)" z="UTStaveDz" /> </physvol> <physvol name="pvUTbCEOSPigtailX1" volume="lvUTbEOSPigtail"> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz" /> + <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> <physvol name="pvUTbCEOSPigtailX2" volume="lvUTbEOSPigtail"> - <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz" /> + <position x="1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> </volume> <!-- ================================================================= --> - <volume material="Air" name="lvUTbXAsideLayer" vis="UT:Envelope"> - <shape name="UTbXALayerBoxSub" operation="subtraction" type="BooleanShape"> - <shape name="UTbXALayerBareBox" operation="union" type="BooleanShape"> - <shape name="UTbXAsideLayerBox" type="Trd2" x1="UTbXLayerSideLongWidth/2" x2="UTbXLayerSideShortWidth/2" y1="UTBoxInnerLong/2" y2="UTBoxInnerLong/2" z="UTBareLayerThick/2" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbXAsideLayerEOSMountingBox1" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2" z="UTStaveDz" /> - <shape dx="(UTEOSWideUTb/2)/2" dy="(UTEOSLong+UTEOSPigtailLong)/2" dz="UTEOSPigtailThick/2" name="UTbXAsideLayerEOSMountingBox2" type="Box" /> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="-(UTBareStaveLong/2+UTEOSLong/2+UTEOSPigtailLong/2)" z="UTStaveDz" /> - </shape> - <shape dz="UTBoxOuterThick/2" name="UTbXAsideBeamPipe" rmax="UTVirtualHoleRadius" type="Tube" /> - <position x="-1/2*UTLayerSideCorrectedWidth" /> - </shape> - <!-- Region 2 in the middle --> - <!-- - <physvol name="pvUTbXLayerR2Stave3" volume="lvStaveC"> - <position x="-1/2*UTLayerSideCorrectedWidth+1/2*UTStaveStep-UTStaveCCorrect+UTbXR2S3CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTbXLayerR2Stave4" volume="lvStaveB"> - <position x="-1/2*UTLayerSideCorrectedWidth+3/2*UTStaveStep-UTStaveBCorrect+UTbXR2S4CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - --> - <!-- Region 3 at +X --> - <!-- - <physvol name="pvUTbXLayerR3Stave1" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+5/2*UTStaveStep-UTStaveACorrect+UTbXR3S1CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTbXLayerR3Stave2" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+7/2*UTStaveStep-UTStaveACorrect+UTbXR3S2CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTbXLayerR3Stave3" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+9/2*UTStaveStep-UTStaveACorrect+UTbXR3S3CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTbXLayerR3Stave4" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+11/2*UTStaveStep-UTStaveACorrect+UTbXR3S4CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTbXLayerR3Stave5" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+13/2*UTStaveStep-UTStaveACorrect+UTbXR3S5CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTbXLayerR3Stave6" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+15/2*UTStaveStep-UTStaveACorrect+UTbXR3S6CorrectionX" z="UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - <physvol name="pvUTbXLayerR3Stave7" volume="lvStaveA"> - <position x="-1/2*UTLayerSideCorrectedWidth+17/2*UTStaveStep-UTStaveACorrect+UTbXR3S7CorrectionX" z="-UTStaveDz/2" /> - <rotation y="pi*rad" /> - </physvol> - --> + <volume name="lvUTbXAsideLayer" vis="UT:Envelope"> + <physvol name="pvUTbAEOSX1" volume="lvUTbEOS"> <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="UTBareStaveLong/2+UTEOSLong/2" z="UTStaveDz" /> </physvol> @@ -129,10 +33,10 @@ <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="-(UTBareStaveLong/2+UTEOSLong/2)" z="UTStaveDz" /> </physvol> <physvol name="pvUTbAEOSPigtailX1" volume="lvUTbEOSPigtail"> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz" /> + <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> <physvol name="pvUTbAEOSPigtailX2" volume="lvUTbEOSPigtail"> - <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz" /> + <position x="-(1/2*UTLayerSideCorrectedWidth-UTEOSWideUTb/4)" y="-(UTBareStaveLong/2+UTEOSLong+UTEOSPigtailLong/2)" z="UTStaveDz+UTEOSPigtailThick-(UTStaveDz/2-UTStaveCableZ-1/2*(UTCableCuThickM0+UTMegArrayThick+UTCableKaptonThick)-1/2*UTMegArrayThick)+UTEpsilon" /> </physvol> </volume> </ut> diff --git a/compact/trunk/UT/detector.xml b/compact/trunk/UT/detector.xml index 68adfd4aa..9a4cd056a 100644 --- a/compact/trunk/UT/detector.xml +++ b/compact/trunk/UT/detector.xml @@ -44,7 +44,7 @@ <item name="Build_Cside_UTbX" value="1"/> <item name="Build_Frame" value="1"/> <item name="Build_Jacket" value="1"/> - <item name="Build_PipeHeater" value="0"/> + <item name="Build_PipeHeater" value="1"/> <item name="Build_Box" value="1"/> <item name="Build_BoxPlug" value="1"/> <item name="select_volume" value="lvUT"/> @@ -56,7 +56,7 @@ </detectors> <readouts> <readout name="UTHits"> - <id>system:8,sensor:1,sector:1,module:3,face:1,stave:4,layer:2,side:1</id> + <id>system:8,sensor:1,sector:1,module:3,face:1,stave:4,layer:2,side:1</id> </readout> </readouts> </lccdd> diff --git a/compact/trunk/UT/parameters.xml b/compact/trunk/UT/parameters.xml index 0c94dc010..3c30e6ccb 100644 --- a/compact/trunk/UT/parameters.xml +++ b/compact/trunk/UT/parameters.xml @@ -210,10 +210,10 @@ <constant name="UTBoxOuterLong" value="1960*mm" /> <constant name="UTFrameInnerLong" value="UTBoxOuterLong" /> <!-- UT light tight box --> - <constant name="UTBoxOuterThick" value="432.0*mm" /> - <constant name="UTBoxWallDownstreamThick" value="21.0*mm" /> + <constant name="UTBoxOuterThick" value="430.0*mm" /> + <constant name="UTBoxWallDownstreamThick" value="20.0*mm" /> <constant name="UTBoxInnerThick" value="UTBoxOuterThick-2*UTBoxWallDownstreamThick" /> - <constant name="UTBoxWallSideThick" value="26.0*mm" /> + <constant name="UTBoxWallSideThick" value="25.0*mm" /> <constant name="UTBoxInnerWide" value="UTBoxOuterWide-2*UTBoxWallSideThick" /> <constant name="UTBoxInnerLong" value="UTBoxOuterLong-2*UTBoxWallSideThick" /> <!-- UTBoxWallUpstreamThick is thickness of plates on front and back (in Z) in the UT --> @@ -273,11 +273,13 @@ <constant name="UTConeJacketZposUpstream" value="UTCylJacketLength+UTConeJacketUpstreamLength*0.5" /> <constant name="UTConeJacketZposDownstream" value="UTConeJacketCutOutPos+UTConeJacketCutOutLength+0.5*UTConeJacketDownstreamLength" /> <!-- beam pipe heaters --> - <constant name="UTPipeHeaterUpstreamLength" value="42.0*mm" /> + <constant name="UTPipeHeaterUpstreamLength" value="200.0*mm" /> <!-- 25+1+0.01 --> <constant name="UTPipeHeaterUpstreamPos" value="UX851Rich1TTSplitZposIP-UTSystemZ-17.0*mm+0.5*UTPipeHeaterUpstreamLength" /> <constant name="UTPipeHeaterDownstreamLength" value="67.0*mm" /> <constant name="UTPipeHeaterDownstreamZmin" value="UX851TTMagnetSplitZposIP-UTBoxWallDownstreamThick-5*mm" /> + <constant name="UTPipeHeaterDownstreamLengthInUT" value="UX851TTMagnetSplitZposIP-UTPipeHeaterDownstreamZmin" /> + <constant name="UTPipeHeaterDownstreamLengthInMagnet" value="UTPipeHeaterDownstreamLength-UTPipeHeaterDownstreamLengthInUT" /> <constant name="UTPipeHeaterDownstreamZmax" value="UTPipeHeaterDownstreamZmin+UTPipeHeaterDownstreamLength" /> <constant name="UTPipeHeaterDownstreamRadiusZmin" value="UTPipeHeaterDownstreamZmin*tan(UX851to4Angle)+UX851Cyl07Thick+0.01*mm" /> <constant name="UTPipeHeaterDownstreamRadiusZmax" value="UTPipeHeaterDownstreamZmax*tan(UX851to4Angle)+UX851Cyl07Thick+0.01*mm" /> @@ -433,7 +435,7 @@ <fraction n="0.7" ref="Iron" /> <fraction n="0.1" ref="Carbon" /> <fraction n="0.2" ref="Copper" /> - </material> + </material> <material name="UT:Airex"> <D type="density" value="0.06" unit="g/cm3" /> <composite n="37" ref="Carbon" /> @@ -583,7 +585,6 @@ <fraction n="0.7692" ref="UT:Epoxy" /> <fraction n="0.2308" ref="UT:BoronNitride" /> </material> - <!-- material density="0.5844*g/cm3" ref="BareStave" --> <material name="UT:BareStave"> <D type="density" value="0.3823" unit="g/cm3" /> <fraction n="0.0383" ref="UT:RohacellFoam" /> @@ -594,7 +595,6 @@ <fraction n="0.0453" ref="UT:CoolingFluid" /> <fraction n="0.3099" ref="UT:HysolBN" /> </material> - <!-- material density="0.301*g/cm3" ref="BeamPipeJacket" --> <material name="UT:BeamPipeJacket"> <D type="density" value="0.209" unit="g/cm3" /> <fraction n="0.1601" ref="UT:Kapton" /> @@ -642,8 +642,6 @@ </material> <material name="UT:Dcdc"> <D type="density" value="7.4825" unit="g/cm3" /> - <!-- material density="1.4965*g/cm3" ref="Dcdc" --> - <!-- material density="2.8577*g/cm3" ref="Dcdc" --> <fraction n="0.0026" ref="Silicon" /> <fraction n="0.5186" ref="Gold" /> <fraction n="0.2672" ref="UT:Polyethylene" /> @@ -656,14 +654,6 @@ <fraction n="0.2681" ref="Copper" /> <fraction n="0.1568" ref="UT:HysolBN" /> </material> - <!-- - <material density="1.7988*g/cm3" ref="FlexCable"> - <fraction n="0.5758" ref="UT:Kapton" /> - <fraction n="0.2631" ref="Copper" /> - <fraction n="0.1611" ref="UT:Epoxy" /> - </material> - --> - <!-- fraction n="0.1398" ref="UT:HysolBN" --> <material name="UT:HybridFilm"> <D type="density" value="3.912" unit="g/cm3" /> <fraction n="0.5731" ref="UT:Glass" /> @@ -706,26 +696,24 @@ <fraction n="0.7062" ref="UT:Asic" /> <fraction n="0.2938" ref="UT:SilverEpoxy" /> </material> - <!-- Old --> - <!-- Old --> - <!-- Old --> - <!-- Old --> - <!-- Old --> - <!-- Old --> - <!-- Old --> - <!-- Old --> - <!-- Old --> - <!-- Old --> </materials> <display> + <vis name="DEBUG:RED" alpha="0.5" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="true" /> + <vis name="DEBUG:GREEN" alpha="0.5" r="0.0" g="1.0" b="0.0" showDaughters="true" visible="true" /> + <vis name="DEBUG:BLUE" alpha="0.5" r="0.0" g="0.0" b="1.0" showDaughters="true" visible="true" /> <vis name="UT:Envelope" alpha="0.0" r="0.5" g="0.5" b="0.5" showDaughters="true" visible="false" /> <vis name="UT:Invisible" alpha="0.0" r="1.0" g="1.0" b="1.0" showDaughters="false" visiable="false" /> <vis name="UT:Box" alpha="0.1" r="0.95" g="0.95" b="0.95" showDaughters="true" visible="true" /> + <vis name="UT:Airex" alpha="1.0" r="0.11" g="0.28" b="0.41" showDaughters="false" visible="true" /> + <vis name="UT:Connector" alpha="1.0" r="0.93" g="0.91" b="0.91" showDaughters="false" visible="true" /> + <vis name="UT:EPDM" alpha="1.0" r="0.75" g="0.75" b="0.90" showDaughters="false" visible="true" /> + <vis name="UT:HalfMoon" alpha="1.0" r="0.45" g="0.56" b="0.69" showDaughters="false" visible="true" /> + <vis name="UT:PipeHeater" alpha="1.0" r="0.36" g="0.79" b="0.79" showDaughters="false" visible="true" /> <!-- Silver --> <vis name="UT:Frame" alpha="1.0" r="0.33" g="0.18" b="0.25" showDaughters="true" visible="true" /> <vis name="UT:EOS" alpha="1.0" r="0.33" g="0.18" b="0.25" showDaughters="false" visible="true" /> <vis name="UT:Jacket" alpha="1.0" r="0.5" g="0.5" b="0.5" showDaughters="true" visible="true" /> - <vis name="UT:KaptonCable" alpha="0.5" r="0.15" g="0.15" b="0.15" showDaughters="false" visible="false" /> + <vis name="UT:KaptonCable" alpha="1.0" r="0.16" g="0.39" b="0.61" showDaughters="false" visible="true" /> <vis name="UT:BareStave" alpha="1.0" r="0.04" g="0.24" b="0.43" showDaughters="false" visible="true" /> <vis name="UT:HybridFlex" alpha="1.0" r="0.63" g="0.38" b="0.47" showDaughters="true" visible="true" /> <vis name="UT:Asic" alpha="1.0" r="0.71" g="0.74" b="0.76" showDaughters="false" visible="true" /> diff --git a/compact/trunk/checksums b/compact/trunk/checksums index 7e06b7dbc..ef10aff27 100644 --- a/compact/trunk/checksums +++ b/compact/trunk/checksums @@ -1,4 +1,4 @@ -/world_volume: 2966518170 +/world_volume: 3305144238 /world_volume/lvAfterMagnetRegion_3: 1374469345 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1: 187033957 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1/pvRich2EntryWinTubeLock: 1979723490 @@ -48,7 +48,7 @@ /world_volume/lvAfterMagnetRegion_3/lvUX85BakeoutAfterMagnet_2: 2588750996 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4: 2302184141 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4/pvUX853AfterMagnetCollar: 2052547805 -/world_volume/lvBeforeMagnetRegion_1: 1865264852 +/world_volume/lvBeforeMagnetRegion_1: 1293983131 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0: 2472087751 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBcmUp_3: 2661979061 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBlockWallBefMag_0: 2623562443 @@ -58,20 +58,21 @@ /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvUX84BeforeVelo_4: 3588858010 /world_volume/lvBeforeMagnetRegion_1/lvPipeBeforeVelo_4: 1907476790 /world_volume/lvBeforeMagnetRegion_1/lvPipeBeforeVelo_4/pvPipeJunctionBeforeVelo: 3658647410 -/world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1: 3587866953 +/world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1: 667640988 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1MgsDnstrUTH0: 1547102793 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1MgsDnstrUTH1: 4030116150 -/world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1SubMaster: 941236678 +/world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1SubMaster: 657361690 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1AfterSubM: 1874884759 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1BeforeSubM: 3776943454 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3: 950047461 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTA_4: 3283219478 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBoxPlug_2: 2982282835 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBox_1: 2557552759 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTC_3: 1920000441 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3: 3237620207 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTA_4: 1269607549 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBoxPlug_2: 276155515 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBox_1: 2145795645 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTC_3: 1223200118 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTFrame_0: 1312950758 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTJacket_5: 2839967123 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUX851InUT_6: 2312201870 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTJacket_5: 2124550184 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTPipeHeater_6: 456665699 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUX851InUT_7: 2312201870 /world_volume/lvBeforeMagnetRegion_1/lvVP_2: 3903272872 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/lvVeloDownStreamPipe_6: 4275213241 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/lvVeloUpStreamPipe_5: 2678709159 @@ -80,17 +81,17 @@ /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVPMotionLeft: 2198385948 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVPMotionRight: 1630601369 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVacTank: 4180183569 -/world_volume/lvDownstreamRegion_4: 2929067602 +/world_volume/lvDownstreamRegion_4: 1579601068 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0: 957808461 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvBcmDown_0: 3159929950 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvMBXWDown_1: 3528288914 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvPipeAfterMuon_2: 620416237 -/world_volume/lvDownstreamRegion_4/lvEcal_3: 4033940412 +/world_volume/lvDownstreamRegion_4/lvEcal_3: 105418779 /world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalLeft: 729640271 -/world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalRight: 1531423908 -/world_volume/lvDownstreamRegion_4/lvHcal_4: 4069978026 -/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalLeft: 2025368290 -/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalright: 152567050 +/world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalRight: 3753082314 +/world_volume/lvDownstreamRegion_4/lvHcal_4: 1966937768 +/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalLeft: 4095643253 +/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalright: 4217369814 /world_volume/lvDownstreamRegion_4/lvMuon_2: 4152624774 /world_volume/lvDownstreamRegion_4/lvMuon_2/lvM2ASideBeamPlug_4: 753303553 /world_volume/lvDownstreamRegion_4/lvMuon_2/lvM2CSideBeamPlug_5: 1869197234 -- GitLab From f02d75362d03150bbbdfa05b952cfb6458b2d919 Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Thu, 3 Aug 2023 16:42:13 -0400 Subject: [PATCH 03/10] fix tracking issue --- Detector/UT/include/Detector/UT/DeUT.h | 60 +++++----- Detector/UT/include/Detector/UT/DeUTLayer.h | 6 +- Detector/UT/include/Detector/UT/DeUTSector.h | 8 +- Detector/UT/include/Detector/UT/DeUTSensor.h | 32 ++--- Detector/UT/include/Detector/UT/DeUTStave.h | 13 +++ Detector/UT/src/DeUT.cpp | 116 +++++++++++++++++-- 6 files changed, 171 insertions(+), 64 deletions(-) diff --git a/Detector/UT/include/Detector/UT/DeUT.h b/Detector/UT/include/Detector/UT/DeUT.h index 69f4308d3..99ba1a526 100644 --- a/Detector/UT/include/Detector/UT/DeUT.h +++ b/Detector/UT/include/Detector/UT/DeUT.h @@ -201,9 +201,6 @@ namespace LHCb::Detector::UT { return ( ( aChannel.side() >= firstSide() ) && ( aChannel.side() < lastSide() ) ); }; - /// Workaround to prevent hidden base class function - // FIXME: need to find anything like ValidDataObject::isValid() in DD4HEP - bool isValid() const { return true; } // what is Gaudi::Time in dd4hep // TODO: looks no one use isValid (Time) ?? need to check!! // bool isValid( const Gaudi::Time& t ) const override { return ValidDataObject::isValid( t ); } @@ -240,41 +237,36 @@ namespace LHCb::Detector::UT { const LayerGeom getLayerGeom( unsigned int layerid ) const { LayerGeom layergeom; - auto SectorsInLayer = sectors( LayerID_t{layerid} ); - auto tStation = layerid / 2; - unsigned int keysectorID = ( tStation == 0 ) ? 31 : 11; - layergeom.z = SectorsInLayer[keysectorID].globalCentre().z(); - - float YFirstRow = std::numeric_limits<float>::max(); - float YLastRow = std::numeric_limits<float>::lowest(); - float smallestXLastCol = std::numeric_limits<float>::max(); - float smallestXFirstcol = std::numeric_limits<float>::max(); - float biggestXFirstCol = std::numeric_limits<float>::lowest(); + auto SectorsInLayer = sectors( LayerID_t{layerid} ); + auto tStation = layerid / 2; + unsigned int keysectorID = ( tStation == 0 ) ? 31 : 11; + layergeom.z = SectorsInLayer[keysectorID].globalCentre().z(); + float YFirstRow = 0; + float YLastRow = 0; + float smallestXLastCol = 0; + float smallestXFirstcol = 0; + float biggestXFirstCol = 0; unsigned int biggestColumn = ( tStation == 0 ) ? 16u : 18u; unsigned int smallestColumn = 1u; - unsigned int topMostRow = 14u; + unsigned int topMostRow = 14u; // corner sectors expected on StaveA unsigned int bottomMostRow = 1u; - // Second pass - // find x and y values in the corners to deduce the geometry of the layer - auto checkSector = [&]( DeUTSector const& utSector ) { - // deal with x,y coordinates. Remember the corner coordinates - auto column = utSector.column(); - auto row = utSector.row(); - auto center = utSector.toGlobal( ROOT::Math::XYZPoint{0, 0, 0} ); - if ( column == smallestColumn ) { - if ( row == bottomMostRow ) { - smallestXFirstcol = center.x(); - YFirstRow = center.y(); - } else if ( row == topMostRow ) { - biggestXFirstCol = center.x(); - YLastRow = center.y(); - } - } - if ( column == biggestColumn && row == bottomMostRow ) { smallestXLastCol = center.x(); } - }; - this->access()->m_sides[0].applyToAllSectors( checkSector ); - this->access()->m_sides[1].applyToAllSectors( checkSector ); + // loop over sectors within this layer to get x, y of corner sectors + std::for_each( SectorsInLayer.begin(), SectorsInLayer.end(), [&]( DeUTSector const& utSector ) { + if ( utSector.channelID().stave() < 1 ) return; // skip Stave0 due to its Y shift + auto pos = utSector.toGlobal( ROOT::Math::XYZPoint{0, 0, 0} ); + auto pos_x = pos.x(); + auto pos_y = pos.y(); + if ( pos_x < smallestXFirstcol ) smallestXFirstcol = pos_x; + if ( pos_x > smallestXLastCol ) smallestXLastCol = pos_x; + if ( pos_y < YFirstRow ) YFirstRow = pos_y; + if ( pos_y > YLastRow ) YLastRow = pos_y; + } ); + + dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "smallestXFirstcol = %.3f", smallestXFirstcol ); + dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "smallestXLastCol = %.3f", smallestXLastCol ); + dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "YFirstRow = %.3f", YFirstRow ); + dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "YLastRow = %.3f", YLastRow ); // gather all information into the corresponding LayerInfo object auto ncols = biggestColumn - smallestColumn + 1; diff --git a/Detector/UT/include/Detector/UT/DeUTLayer.h b/Detector/UT/include/Detector/UT/DeUTLayer.h index 064c7efe6..64409a61a 100644 --- a/Detector/UT/include/Detector/UT/DeUTLayer.h +++ b/Detector/UT/include/Detector/UT/DeUTLayer.h @@ -32,9 +32,9 @@ namespace LHCb::Detector::UT { std::array<DeUTStaveObject, 9> m_staves; ChannelID m_channelID; ROOT::Math::Plane3D m_plane; - double m_angle; - double m_sinAngle; - double m_cosAngle; + double m_angle = 0; + double m_sinAngle = 0; + double m_cosAngle = 0; void applyToAllChildren( const std::function<void( LHCb::Detector::DeIOV )>& func ) const override { for ( unsigned int i = 0; i < m_nStaves; i++ ) { func( &m_staves[i] ); }; diff --git a/Detector/UT/include/Detector/UT/DeUTSector.h b/Detector/UT/include/Detector/UT/DeUTSector.h index 50992a9f8..6c85a2d72 100644 --- a/Detector/UT/include/Detector/UT/DeUTSector.h +++ b/Detector/UT/include/Detector/UT/DeUTSector.h @@ -80,10 +80,9 @@ namespace LHCb::Detector::UT { float m_thickness; double m_stripLength; - unsigned int m_prodID = 0u; - double m_dxdy = 0.0; - double m_dzdy = 0.0; - double m_dy = 0.0; + double m_dxdy = 0.0; + double m_dzdy = 0.0; + double m_dy = 0.0; ROOT::Math::XYZVector m_dp0di; ROOT::Math::XYZPoint m_p0; double m_angle = 0.0; @@ -163,7 +162,6 @@ namespace LHCb::Detector::UT { // column and row are old channel id fields and should never be used in DD4HEP unsigned int column() const { return this->access()->m_column; } unsigned int row() const { return this->access()->m_row; } - unsigned int prodID() const { return this->access()->m_prodID; } unsigned int nBeetle() const { return nStrip() / nStripsInSector; } LineTraj<double> createTraj( unsigned int strip, double offset ) const { diff --git a/Detector/UT/include/Detector/UT/DeUTSensor.h b/Detector/UT/include/Detector/UT/DeUTSensor.h index f6fe1105c..3cece986b 100644 --- a/Detector/UT/include/Detector/UT/DeUTSensor.h +++ b/Detector/UT/include/Detector/UT/DeUTSensor.h @@ -25,7 +25,7 @@ namespace LHCb::Detector::UT { struct DeUTSensorObject : LHCb::Detector::detail::DeIOVObject { DeUTSensorObject( const dd4hep::DetElement& de, dd4hep::cond::ConditionUpdateContext& ctxt ); - unsigned int m_id; + unsigned int m_id = 0u; float m_pitch = 0.0; unsigned int m_nStrip = 512; @@ -34,15 +34,16 @@ namespace LHCb::Detector::UT { unsigned int m_firstStrip = 0u; unsigned int m_version = 2; ChannelID m_channelID; + char m_sensorType; - float m_uMaxLocal; - float m_uMinLocal; - float m_vMaxLocal; - float m_vMinLocal; - float m_stripLength; - float m_thickness; - bool m_xInverted; - bool m_yInverted; + float m_uMaxLocal = 0.0; + float m_uMinLocal = 0.0; + float m_vMaxLocal = 0.0; + float m_vMinLocal = 0.0; + float m_stripLength = 0.0; + float m_thickness = 0.0; + bool m_xInverted = false; + bool m_yInverted = false; ROOT::Math::Plane3D m_plane; ROOT::Math::Plane3D m_entryPlane; @@ -70,6 +71,7 @@ namespace LHCb::Detector::UT { unsigned int id() const { return this->access()->m_id; }; void setID( const unsigned int id ) { this->access()->m_id = id; } float pitch() const { return this->access()->m_pitch; } + char sensorType() const { return this->access()->m_sensorType; } unsigned int nStrip() const { return this->access()->m_nStrip; } float uMaxLocal() const { return this->access()->m_uMaxLocal; } float uMinLocal() const { return this->access()->m_uMinLocal; } @@ -91,7 +93,9 @@ namespace LHCb::Detector::UT { bool contains( const ChannelID aChannel ) const { return ( aChannel == channelID() ); } - bool isStrip( const unsigned int strip ) const { return strip < nStrip(); } + bool isStrip( const unsigned int strip ) const { + return ( strip >= firstStrip() ) && strip < nStrip() + firstStrip(); + } LineTraj<double> trajectory( unsigned int strip, double offset ) const { const double arclen = ( ( xInverted() && getStripflip() ) ? ( nStrip() - offset - strip - ( firstStrip() + 1 ) % 2 ) @@ -110,7 +114,7 @@ namespace LHCb::Detector::UT { } double localU( const unsigned int strip, const double offset = 0.0 ) const { // strip to local - double tStrip = strip + offset; + double tStrip = strip + offset + ( firstStrip() + 1 ) % 2; if ( !getStripflip() && xInverted() ) { return uMaxLocal() + pitch() * ( 0.5 - tStrip ); } else { @@ -120,8 +124,10 @@ namespace LHCb::Detector::UT { unsigned int localUToStrip( const double u ) const { // convert local u to a strip unsigned int strip = ( ( !getStripflip() && xInverted() ) - ? static_cast<unsigned int>( floor( ( ( uMaxLocal() - u ) / pitch() ) + 0.5 ) ) - : static_cast<unsigned int>( floor( ( ( u - uMinLocal() ) / pitch() ) + 0.5 ) ) ); + ? static_cast<unsigned int>( floor( ( ( uMaxLocal() - u ) / pitch() ) + 0.5 ) ) - + ( firstStrip() + 1 ) % 2 + : static_cast<unsigned int>( floor( ( ( u - uMinLocal() ) / pitch() ) + 0.5 ) ) ) - + ( firstStrip() + 1 ) % 2; return isStrip( strip ) ? strip : 0u; } bool localInBondGap( float v, float tol ) const { diff --git a/Detector/UT/include/Detector/UT/DeUTStave.h b/Detector/UT/include/Detector/UT/DeUTStave.h index dfe95c601..b7090db74 100644 --- a/Detector/UT/include/Detector/UT/DeUTStave.h +++ b/Detector/UT/include/Detector/UT/DeUTStave.h @@ -28,8 +28,12 @@ namespace LHCb::Detector::UT { const unsigned int m_id; std::string m_type; std::string m_nickname; + std::string m_nicknameOld; std::array<DeUTFaceObject, 2> m_faces; ChannelID m_channelID; + unsigned int m_version; + unsigned int m_column; + unsigned int m_detRegion; std::string getStaveName( const ChannelID& aChan ) const { static constexpr const char* sides[2] = {"C", "A"}; @@ -38,6 +42,12 @@ namespace LHCb::Detector::UT { fmt::arg( "layer", layers[aChan.layer()] ), fmt::arg( "stave", aChan.stave() + 1 ) ); } + std::string getStaveNameOld( const ChannelID& aChan ) const { + static constexpr const char* layers[4] = {"aX", "aU", "bV", "bX"}; + return fmt::format( "UT{layer}LayerR{region}Stave{column}", fmt::arg( "layer", layers[aChan.layer()] ), + fmt::arg( "region", m_detRegion ), fmt::arg( "column", m_column ) ); + } + void applyToAllChildren( const std::function<void( LHCb::Detector::DeIOV )>& func ) const override { for ( auto& face : m_faces ) { func( &face ); }; } @@ -89,7 +99,10 @@ namespace LHCb::Detector::UT { unsigned int layer() const { return channelID().layer(); } unsigned int side() const { return channelID().side(); } unsigned int stave() const { return channelID().stave(); } + unsigned int column() const { return this->access()->m_column; } + unsigned int detRegion() const { return this->access()->m_detRegion; } const std::string& nickname() const { return this->access()->m_nickname; } + const std::string& nicknameOld() const { return this->access()->m_nicknameOld; } const std::string& type() const { return this->access()->m_type; } diff --git a/Detector/UT/src/DeUT.cpp b/Detector/UT/src/DeUT.cpp index 60bf42dc6..a43c7ca1c 100644 --- a/Detector/UT/src/DeUT.cpp +++ b/Detector/UT/src/DeUT.cpp @@ -90,12 +90,17 @@ LHCb::Detector::UT::detail::DeUTLayerObject::DeUTLayerObject( const dd4hep::DetE 0, 0, 0} { - ROOT::Math::XYZPoint p1 = toGlobal( ROOT::Math::XYZPoint( 0, 1, 0 ) ); - ROOT::Math::XYZPoint p2( 0, 1, 0 ); - m_angle = ROOT::Math::VectorUtil::Angle( p1, p2 ); - m_sinAngle = sin( m_angle ); - m_cosAngle = cos( m_angle ); - { + { // using first stave stereo angle as layer stereo angle + const DeUTStave thisStave = DeUTStave{&m_staves[0]}; + ROOT::Math::XYZVector v1 = ROOT::Math::XYZVector( thisStave->toGlobal( ROOT::Math::XYZPoint( 0, 10, 0 ) ) - + thisStave->toGlobal( ROOT::Math::XYZPoint( 0, 0, 0 ) ) ); + ROOT::Math::XYZVector v2 = + ROOT::Math::XYZVector( ROOT::Math::XYZPoint( 0, 10, 0 ) - ROOT::Math::XYZPoint( 0, 0, 0 ) ); + m_angle = ROOT::Math::VectorUtil::Angle( v1, v2 ); + m_sinAngle = sin( m_angle ); + m_cosAngle = cos( m_angle ); + } + { // initialize m_plane ROOT::Math::XYZPoint p1 = toGlobal( ROOT::Math::XYZPoint( 0, 0, 0 ) ); ROOT::Math::XYZPoint p2 = toGlobal( ROOT::Math::XYZPoint( 3 * dd4hep::meter, 0, 0 ) ); ROOT::Math::XYZPoint p3 = toGlobal( ROOT::Math::XYZPoint( 0, 3 * dd4hep::meter, 0 ) ); @@ -117,7 +122,49 @@ LHCb::Detector::UT::detail::DeUTStaveObject::DeUTStaveObject( const dd4hep::DetE 0, 0, 0} { - m_nickname = getStaveName( m_channelID ); + // Backward compatibility: column and detRegion from old UTChannelID + const unsigned int sideID = m_channelID.side(); + const unsigned int layerID = m_channelID.layer(); + const unsigned int staveID = m_channelID.stave(); + if ( layerID < 2 ) { // aStation, aX, aU + if ( sideID == 0 ) { // C-side + if ( staveID >= 2 ) { // Region 1 (-x, C-side) + m_detRegion = 1; + m_column = 9 - staveID; + } else { // Region 2 (C-side) + m_detRegion = 2; + m_column = 2 - staveID; + } + } else if ( sideID == 1 ) { // A-side + if ( staveID < 2 ) { // Region 2 (A-side) + m_detRegion = 2; + m_column = staveID + 3; + } else { // Region 3 (+x, A-side) + m_detRegion = 3; + m_column = staveID - 1; + } + } + } else if ( layerID >= 2 ) { // bStation, bV, bX + if ( sideID == 0 ) { // C-side + if ( staveID >= 2 ) { // Region 1 (-x, C-side) + m_detRegion = 1; + m_column = 9 - staveID; + } else { // Region 2 (C-side) + m_detRegion = 2; + m_column = 2 - staveID; + } + } else if ( sideID == 1 ) { // A-side + if ( staveID < 2 ) { // Region 2 (A-side) + m_detRegion = 2; + m_column = staveID + 3; + } else { // Region 3 (+x, A-side) + m_detRegion = 3; + m_column = staveID - 1; + } + } + } + m_nickname = getStaveName( m_channelID ); + m_nicknameOld = getStaveNameOld( m_channelID ); } LHCb::Detector::UT::detail::DeUTFaceObject::DeUTFaceObject( const dd4hep::DetElement& de, @@ -184,6 +231,54 @@ LHCb::Detector::UT::detail::DeUTSectorObject::DeUTSectorObject( const dd4hep::De m_pitch = dd4hep::_toDouble( "UTSensorBCDPitch" ); } + { // cacheInfo + auto thisSector = DeUTSector{this}; + auto firstTraj = thisSector.createTraj( thisSector.firstStrip(), 0 ); + // if ( m_stripflip && xInverted() ) firstTraj = createTraj( m_nStrip, 0 ); + if ( thisSector.stripflip() && thisSector.xInverted() ) + firstTraj = thisSector.createTraj( thisSector.nStrip() + thisSector.firstStrip(), 0 ); + + // get the start and end point. for piecewise trajectories, we + // effectively make an approximation by a straight line. + const ROOT::Math::XYZPoint g1 = firstTraj.beginPoint(); + const ROOT::Math::XYZPoint g2 = firstTraj.endPoint(); + + const double activeWidth = DeUTSensor{&m_sensor}.activeWidth(); + + // direction + ROOT::Math::XYZVector direction = g2 - g1; + m_stripLength = std::sqrt( direction.Mag2() ); + direction = direction.Unit(); + + // cross with normal along z + ROOT::Math::XYZVector zVec( 0, 0, 1 ); + ROOT::Math::XYZVector norm = direction.Cross( zVec ); + + // trajectory of middle + const ROOT::Math::XYZPoint g3 = g1 + 0.5 * ( g2 - g1 ); + const ROOT::Math::XYZPoint g4 = g3 + activeWidth * norm; + + // creating the 'fast' trajectories + const ROOT::Math::XYZVector vectorlayer = ( g4 - g3 ).unit() * m_pitch; + const ROOT::Math::XYZPoint p0 = g3 - 0.5 * m_stripLength * direction; + m_dxdy = direction.x() / direction.y(); + m_dzdy = direction.z() / direction.y(); + m_dy = m_stripLength * direction.y(); + m_dp0di.SetX( vectorlayer.x() - vectorlayer.y() * m_dxdy ); + m_dp0di.SetY( vectorlayer.y() ); + m_dp0di.SetZ( vectorlayer.z() - vectorlayer.y() * m_dzdy ); + m_p0.SetX( p0.x() - p0.y() * m_dxdy ); + m_p0.SetY( p0.y() ); + m_p0.SetZ( p0.z() - p0.y() * m_dzdy ); + + // Update the stereo angle. We correct by 'pi' if necessary. + ROOT::Math::XYZVector dir = direction; + if ( dir.y() < 0 ) dir *= -1; + m_angle = atan2( -dir.x(), dir.y() ); + m_cosAngle = cos( m_angle ); + m_sinAngle = sin( m_angle ); + } + // get status & noise condition auto deUT = de.parent().parent().parent().parent().parent().parent().parent(); m_statusCondition = ctxt.condition( dd4hep::ConditionKey::KeyMaker( deUT, "ReadoutSectors" ).hash ); @@ -234,11 +329,14 @@ LHCb::Detector::UT::detail::DeUTSensorObject::DeUTSensorObject( const dd4hep::De // get pitch size auto nameString = de.placement().volume().name(); std::string m_type( nameString + 8, nameString + std::strlen( nameString ) ); - if ( m_type == "Norm" ) { - m_pitch = dd4hep::_toDouble( "UTSensorAPitch" ); + m_pitch = dd4hep::_toDouble( "UTSensorAPitch" ); + m_sensorType = 'A'; } else { m_pitch = dd4hep::_toDouble( "UTSensorBCDPitch" ); + if ( m_type == "Dual" ) m_sensorType = 'B'; + if ( m_type == "Quad" ) m_sensorType = 'C'; + if ( m_type == "Hole" ) m_sensorType = 'D'; } m_uMaxLocal = 0.5f * ( m_pitch * m_nStrip ); -- GitLab From 3775df4f17f9291c44b5383079b112fbf5f391a0 Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Thu, 28 Sep 2023 12:44:49 -0400 Subject: [PATCH 04/10] update checksums # Conflicts: # compact/before-rich1-geom-update-26052022/checksums # compact/trunk/checksums --- .../before-rich1-geom-update-26052022/checksums | 14 +++++++------- compact/trunk/checksums | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/compact/before-rich1-geom-update-26052022/checksums b/compact/before-rich1-geom-update-26052022/checksums index 518057e59..fdf5ff4b8 100644 --- a/compact/before-rich1-geom-update-26052022/checksums +++ b/compact/before-rich1-geom-update-26052022/checksums @@ -1,4 +1,4 @@ -/world_volume: 4072983520 +/world_volume: 715055676 /world_volume/lvAfterMagnetRegion_3: 1374469345 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1: 187033957 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1/pvRich2EntryWinTubeLock: 1979723490 @@ -81,17 +81,17 @@ /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVPMotionLeft: 2198385948 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVPMotionRight: 1630601369 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVacTank: 4180183569 -/world_volume/lvDownstreamRegion_4: 1579601068 +/world_volume/lvDownstreamRegion_4: 2929067602 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0: 957808461 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvBcmDown_0: 3159929950 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvMBXWDown_1: 3528288914 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvPipeAfterMuon_2: 620416237 -/world_volume/lvDownstreamRegion_4/lvEcal_3: 105418779 +/world_volume/lvDownstreamRegion_4/lvEcal_3: 4033940412 /world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalLeft: 729640271 -/world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalRight: 3753082314 -/world_volume/lvDownstreamRegion_4/lvHcal_4: 1966937768 -/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalLeft: 4095643253 -/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalright: 4217369814 +/world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalRight: 1531423908 +/world_volume/lvDownstreamRegion_4/lvHcal_4: 4069978026 +/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalLeft: 2025368290 +/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalright: 152567050 /world_volume/lvDownstreamRegion_4/lvMuon_2: 4152624774 /world_volume/lvDownstreamRegion_4/lvMuon_2/lvM2ASideBeamPlug_4: 753303553 /world_volume/lvDownstreamRegion_4/lvMuon_2/lvM2CSideBeamPlug_5: 1869197234 diff --git a/compact/trunk/checksums b/compact/trunk/checksums index ef10aff27..9f3094a3f 100644 --- a/compact/trunk/checksums +++ b/compact/trunk/checksums @@ -1,4 +1,4 @@ -/world_volume: 3305144238 +/world_volume: 492459634 /world_volume/lvAfterMagnetRegion_3: 1374469345 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1: 187033957 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1/pvRich2EntryWinTubeLock: 1979723490 @@ -81,17 +81,17 @@ /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVPMotionLeft: 2198385948 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVPMotionRight: 1630601369 /world_volume/lvBeforeMagnetRegion_1/lvVP_2/pvVacTank: 4180183569 -/world_volume/lvDownstreamRegion_4: 1579601068 +/world_volume/lvDownstreamRegion_4: 2929067602 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0: 957808461 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvBcmDown_0: 3159929950 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvMBXWDown_1: 3528288914 /world_volume/lvDownstreamRegion_4/lvAfterMuon_0/lvPipeAfterMuon_2: 620416237 -/world_volume/lvDownstreamRegion_4/lvEcal_3: 105418779 +/world_volume/lvDownstreamRegion_4/lvEcal_3: 4033940412 /world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalLeft: 729640271 -/world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalRight: 3753082314 -/world_volume/lvDownstreamRegion_4/lvHcal_4: 1966937768 -/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalLeft: 4095643253 -/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalright: 4217369814 +/world_volume/lvDownstreamRegion_4/lvEcal_3/pvEcalRight: 1531423908 +/world_volume/lvDownstreamRegion_4/lvHcal_4: 4069978026 +/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalLeft: 2025368290 +/world_volume/lvDownstreamRegion_4/lvHcal_4/pvHcalright: 152567050 /world_volume/lvDownstreamRegion_4/lvMuon_2: 4152624774 /world_volume/lvDownstreamRegion_4/lvMuon_2/lvM2ASideBeamPlug_4: 753303553 /world_volume/lvDownstreamRegion_4/lvMuon_2/lvM2CSideBeamPlug_5: 1869197234 -- GitLab From 6c1e0794e41a2565fec48990b69a03ea8d688b03 Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Tue, 12 Sep 2023 08:48:02 -0400 Subject: [PATCH 05/10] minor volume fix for consistency with DetDesc --- compact/trunk/UT/UTBox.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compact/trunk/UT/UTBox.xml b/compact/trunk/UT/UTBox.xml index 99a981b81..7d8d95a96 100644 --- a/compact/trunk/UT/UTBox.xml +++ b/compact/trunk/UT/UTBox.xml @@ -94,7 +94,7 @@ <shape dz="UTCylJacketLength/2" name="UTCylJacket" rmax="UTCylJacketRadius+UTCylJacketThick" rmin="UTCylJacketRadius" type="Tube" /> </volume> <volume material="UT:BeamPipeJacket" name="lvUTConeJacketUpstream"> - <shape dz="UTConeJacketUpstreamLength/2" name="UTConeJacketUpstream" rmax1="UTConeJacketCutOutRadiusZmin+UTConeJacketThick" rmax2="UTConeJacketRadiusZmin+UTConeJacketThick" rmin1="UTConeJacketCutOutRadiusZmin" rmin2="UTConeJacketRadiusZmin" type="ConeSegment" /> + <shape dz="UTConeJacketUpstreamLength/2" name="UTConeJacketUpstream" rmax2="UTConeJacketCutOutRadiusZmin+UTConeJacketThick" rmax1="UTConeJacketRadiusZmin+UTConeJacketThick" rmin2="UTConeJacketCutOutRadiusZmin" rmin1="UTConeJacketRadiusZmin" type="ConeSegment" /> </volume> <volume material="UT:BeamPipeJacket" name="lvUTConeJacketDownstream"> <shape dz="UTConeJacketDownstreamLength/2" name="UTConeJacketDownstream" rmax2="UTConeJacketRadiusZmax+UTConeJacketThick" rmax1="UTConeJacketCutOutRadiusZmax+UTConeJacketThick" rmin2="UTConeJacketRadiusZmax" rmin1="UTConeJacketCutOutRadiusZmax" type="ConeSegment" /> -- GitLab From 4f5d1b5ecd84cb5627218fb86401a0275ac37ca2 Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Tue, 12 Sep 2023 09:11:19 -0400 Subject: [PATCH 06/10] update checksums --- compact/before-rich1-geom-update-26052022/checksums | 8 ++++---- compact/trunk/checksums | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compact/before-rich1-geom-update-26052022/checksums b/compact/before-rich1-geom-update-26052022/checksums index fdf5ff4b8..db938c86b 100644 --- a/compact/before-rich1-geom-update-26052022/checksums +++ b/compact/before-rich1-geom-update-26052022/checksums @@ -1,4 +1,4 @@ -/world_volume: 715055676 +/world_volume: 748404671 /world_volume/lvAfterMagnetRegion_3: 1374469345 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1: 187033957 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1/pvRich2EntryWinTubeLock: 1979723490 @@ -48,7 +48,7 @@ /world_volume/lvAfterMagnetRegion_3/lvUX85BakeoutAfterMagnet_2: 2588750996 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4: 2302184141 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4/pvUX853AfterMagnetCollar: 2052547805 -/world_volume/lvBeforeMagnetRegion_1: 913815390 +/world_volume/lvBeforeMagnetRegion_1: 2032076517 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0: 2472087751 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBcmUp_3: 2661979061 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBlockWallBefMag_0: 2623562443 @@ -64,13 +64,13 @@ /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1SubMaster: 1822149947 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1AfterSubM: 1874884759 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1BeforeSubM: 3776943454 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3: 3237620207 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3: 2855886064 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTA_4: 1269607549 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBoxPlug_2: 276155515 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBox_1: 2145795645 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTC_3: 1223200118 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTFrame_0: 1312950758 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTJacket_5: 2124550184 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTJacket_5: 814797345 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTPipeHeater_6: 456665699 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUX851InUT_7: 2312201870 /world_volume/lvBeforeMagnetRegion_1/lvVP_2: 3903272872 diff --git a/compact/trunk/checksums b/compact/trunk/checksums index 9f3094a3f..30a312486 100644 --- a/compact/trunk/checksums +++ b/compact/trunk/checksums @@ -1,4 +1,4 @@ -/world_volume: 492459634 +/world_volume: 459213809 /world_volume/lvAfterMagnetRegion_3: 1374469345 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1: 187033957 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1/pvRich2EntryWinTubeLock: 1979723490 @@ -48,7 +48,7 @@ /world_volume/lvAfterMagnetRegion_3/lvUX85BakeoutAfterMagnet_2: 2588750996 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4: 2302184141 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4/pvUX853AfterMagnetCollar: 2052547805 -/world_volume/lvBeforeMagnetRegion_1: 1293983131 +/world_volume/lvBeforeMagnetRegion_1: 38284320 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0: 2472087751 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBcmUp_3: 2661979061 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBlockWallBefMag_0: 2623562443 @@ -64,13 +64,13 @@ /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1SubMaster: 657361690 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1AfterSubM: 1874884759 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1BeforeSubM: 3776943454 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3: 3237620207 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3: 2855886064 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTA_4: 1269607549 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBoxPlug_2: 276155515 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTBox_1: 2145795645 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTC_3: 1223200118 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTFrame_0: 1312950758 -/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTJacket_5: 2124550184 +/world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTJacket_5: 814797345 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUTPipeHeater_6: 456665699 /world_volume/lvBeforeMagnetRegion_1/lvUT_3/lvUX851InUT_7: 2312201870 /world_volume/lvBeforeMagnetRegion_1/lvVP_2: 3903272872 -- GitLab From acd9d31f3bf461c4162ae1db8bb7d2c437ea2887 Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Fri, 22 Sep 2023 20:32:33 -0400 Subject: [PATCH 07/10] fix bug in tracking fixed getLayGeom set SwappedSectors to always return false --- Detector/UT/include/Detector/UT/DeUT.h | 73 +++++++++++++++----------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/Detector/UT/include/Detector/UT/DeUT.h b/Detector/UT/include/Detector/UT/DeUT.h index 99ba1a526..cd56d8ae0 100644 --- a/Detector/UT/include/Detector/UT/DeUT.h +++ b/Detector/UT/include/Detector/UT/DeUT.h @@ -229,7 +229,11 @@ namespace LHCb::Detector::UT { applyToAllSectors( func ); } - bool SectorsSwapped() const { return true; } + bool SectorsSwapped() const { + // UT in DD4hep supports only GeoVersion::v1 which + // does not have swapped sectors + return false; + } bool layerSizeOK() const { return static_cast<unsigned int>( version() ) != static_cast<unsigned int>( GeoVersion::v0 ); @@ -238,44 +242,53 @@ namespace LHCb::Detector::UT { const LayerGeom getLayerGeom( unsigned int layerid ) const { LayerGeom layergeom; auto SectorsInLayer = sectors( LayerID_t{layerid} ); - auto tStation = layerid / 2; - unsigned int keysectorID = ( tStation == 0 ) ? 31 : 11; + auto stationID = layerid / 2; + unsigned int keysectorID = ( stationID == 0 ) ? 31 : 11; layergeom.z = SectorsInLayer[keysectorID].globalCentre().z(); - float YFirstRow = 0; - float YLastRow = 0; - float smallestXLastCol = 0; - float smallestXFirstcol = 0; - float biggestXFirstCol = 0; - unsigned int biggestColumn = ( tStation == 0 ) ? 16u : 18u; - unsigned int smallestColumn = 1u; - unsigned int topMostRow = 14u; // corner sectors expected on StaveA - unsigned int bottomMostRow = 1u; - + float yFirstRow = 0; // y of bottommost sector of outmost stave + float yLastRow = 0; // y of topmost sector of outmost stave + float xFirstColFirstRow = 0; // x of bottommost sector of Cside outmost stave + float xLastColFirstRow = 0; // x of bottommost sector of Cside outmost stave + float xFirstColLastRow = 0; // x of topmost sector of Cside outmost stave + unsigned int lastColumn = + ( stationID == 0 ) ? 16u : 18u; // number of staves, UTaX/U -> stationID 0, UTbX/V -> stationID 1 + unsigned int maxStaveID = ( stationID == 0 ) ? 7u : 8u; + unsigned int firstColumn = 1u; // count from 1 + unsigned int lastRow = 14u; // top most sector + unsigned int firstRow = 1u; // bottom most sector + std::map<std::string, ChannelID> cornerSectorChanIDs{ + {// Cside, LayerID, maxStaveID, Face1, Module0 + {"FirstColFirstRow", ChannelID( ChannelID::detType::typeUT, 0, layerid, maxStaveID, 1, 0, 0, 0 )}, + // Cside, LayerID, maxStaveID, Face0, Module7 + {"FirstColLastRow", ChannelID( ChannelID::detType::typeUT, 0, layerid, maxStaveID, 0, 7, 0, 0 )}, + // Aside, LayerID, maxStaveID, Face1, Module0 + {"LastColFirstRow", ChannelID( ChannelID::detType::typeUT, 1, layerid, maxStaveID, 1, 0, 0, 0 )}}}; // loop over sectors within this layer to get x, y of corner sectors std::for_each( SectorsInLayer.begin(), SectorsInLayer.end(), [&]( DeUTSector const& utSector ) { - if ( utSector.channelID().stave() < 1 ) return; // skip Stave0 due to its Y shift - auto pos = utSector.toGlobal( ROOT::Math::XYZPoint{0, 0, 0} ); - auto pos_x = pos.x(); - auto pos_y = pos.y(); - if ( pos_x < smallestXFirstcol ) smallestXFirstcol = pos_x; - if ( pos_x > smallestXLastCol ) smallestXLastCol = pos_x; - if ( pos_y < YFirstRow ) YFirstRow = pos_y; - if ( pos_y > YLastRow ) YLastRow = pos_y; + if ( utSector.channelID() == cornerSectorChanIDs["FirstColFirstRow"] ) { + yFirstRow = utSector.globalCentre().y(); + xFirstColFirstRow = utSector.globalCentre().x(); + } else if ( utSector.channelID() == cornerSectorChanIDs["FirstColLastRow"] ) { + yLastRow = utSector.globalCentre().y(); + xFirstColLastRow = utSector.globalCentre().x(); + } else if ( utSector.channelID() == cornerSectorChanIDs["LastColFirstRow"] ) { + xLastColFirstRow = utSector.globalCentre().x(); + } } ); - dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "smallestXFirstcol = %.3f", smallestXFirstcol ); - dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "smallestXLastCol = %.3f", smallestXLastCol ); - dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "YFirstRow = %.3f", YFirstRow ); - dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "YLastRow = %.3f", YLastRow ); + dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "xFirstColFirstRow = %.3f", xFirstColFirstRow ); + dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "xFirstColLastRow = %.3f", xFirstColLastRow ); + dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "xLastColFirstRow = %.3f", xLastColFirstRow ); + dd4hep::printout( dd4hep::DEBUG, "DeUT::getLayerGeom", "yFirstRow = %.3f", yFirstRow ); // gather all information into the corresponding LayerInfo object - auto ncols = biggestColumn - smallestColumn + 1; - auto nrows = topMostRow - bottomMostRow + 1; + auto ncols = lastColumn - firstColumn + 1; + auto nrows = lastRow - firstRow + 1; layergeom.nColsPerSide = ncols / 2; layergeom.nRowsPerSide = nrows / 2; - layergeom.invHalfSectorYSize = 2 * ( nrows - 1 ) / ( YLastRow - YFirstRow ); - layergeom.invHalfSectorXSize = 2 * ( ncols - 1 ) / ( smallestXLastCol - smallestXFirstcol ); - layergeom.dxDy = ( biggestXFirstCol - smallestXFirstcol ) / ( YLastRow - YFirstRow ); + layergeom.invHalfSectorYSize = 2 * ( nrows - 1 ) / ( yLastRow - yFirstRow ); + layergeom.invHalfSectorXSize = 2 * ( ncols - 1 ) / ( xLastColFirstRow - xFirstColFirstRow ); + layergeom.dxDy = ( xFirstColLastRow - xFirstColFirstRow ) / ( yLastRow - yFirstRow ); return layergeom; } -- GitLab From 1c62972b62f49aaa78744f5b0cbaa9f2df7c1f04 Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Mon, 25 Sep 2023 21:11:09 -0400 Subject: [PATCH 08/10] improve docs --- Detector/UT/include/Detector/UT/DeUT.h | 34 ++++++++++++++------------ 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/Detector/UT/include/Detector/UT/DeUT.h b/Detector/UT/include/Detector/UT/DeUT.h index cd56d8ae0..87ada6ed6 100644 --- a/Detector/UT/include/Detector/UT/DeUT.h +++ b/Detector/UT/include/Detector/UT/DeUT.h @@ -241,21 +241,25 @@ namespace LHCb::Detector::UT { const LayerGeom getLayerGeom( unsigned int layerid ) const { LayerGeom layergeom; - auto SectorsInLayer = sectors( LayerID_t{layerid} ); - auto stationID = layerid / 2; - unsigned int keysectorID = ( stationID == 0 ) ? 31 : 11; - layergeom.z = SectorsInLayer[keysectorID].globalCentre().z(); - float yFirstRow = 0; // y of bottommost sector of outmost stave - float yLastRow = 0; // y of topmost sector of outmost stave - float xFirstColFirstRow = 0; // x of bottommost sector of Cside outmost stave - float xLastColFirstRow = 0; // x of bottommost sector of Cside outmost stave - float xFirstColLastRow = 0; // x of topmost sector of Cside outmost stave - unsigned int lastColumn = - ( stationID == 0 ) ? 16u : 18u; // number of staves, UTaX/U -> stationID 0, UTbX/V -> stationID 1 - unsigned int maxStaveID = ( stationID == 0 ) ? 7u : 8u; - unsigned int firstColumn = 1u; // count from 1 - unsigned int lastRow = 14u; // top most sector - unsigned int firstRow = 1u; // bottom most sector + auto SectorsInLayer = sectors( LayerID_t{layerid} ); + auto stationID = layerid / 2; + unsigned int keysectorID = ( stationID == 0 ) ? 31 : 11; + layergeom.z = SectorsInLayer[keysectorID].globalCentre().z(); + + // columns = staves, counting from -x to +x + // -> From 1 to 16 for UTaX/U layers (stationID = 0) + // -> From 1 to 18 for UTbX/V layers (stationID = 1) + // rows = typeA/B 10cmx10cm sectors, rows = 2 x typeC/D sectors + unsigned int lastColumn = ( stationID == 0 ) ? 16u : 18u; + float yFirstRow = 0; // y of bottommost sector of outmost stave + float yLastRow = 0; // y of topmost sector of outmost stave + float xFirstColFirstRow = 0; // x of bottommost sector of Cside outmost stave + float xFirstColLastRow = 0; // x of topmost sector of Cside outmost stave + float xLastColFirstRow = 0; // x of bottommost sector of Aside outmost stave + unsigned int maxStaveID = ( stationID == 0 ) ? 7u : 8u; + unsigned int firstColumn = 1u; // count from 1 + unsigned int lastRow = 14u; // top most sector + unsigned int firstRow = 1u; // bottom most sector std::map<std::string, ChannelID> cornerSectorChanIDs{ {// Cside, LayerID, maxStaveID, Face1, Module0 {"FirstColFirstRow", ChannelID( ChannelID::detType::typeUT, 0, layerid, maxStaveID, 1, 0, 0, 0 )}, -- GitLab From 42c3abd5dd632d663d057269470f45962c29a09d Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Tue, 26 Sep 2023 09:12:41 -0400 Subject: [PATCH 09/10] add test for getLayerGeom --- Core/tests/src/test_deut_detailed.cpp | 57 ++++++++++++++++++--------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/Core/tests/src/test_deut_detailed.cpp b/Core/tests/src/test_deut_detailed.cpp index 341f81981..3df4a4d07 100644 --- a/Core/tests/src/test_deut_detailed.cpp +++ b/Core/tests/src/test_deut_detailed.cpp @@ -126,7 +126,9 @@ static long test_load_deut( dd4hep::Detector& description, int argc, char** argv } dd4hep::printout( dd4hep::INFO, "UT", "Checked global position of A-side" ); - // check ChannelID vs VolumeID + ///////////////////////////////// + /* check ChannelID vs VolumeID */ + ///////////////////////////////// for ( const auto& side : ut.sides() ) for ( const auto& layer : side.layers() ) for ( const auto& stave : layer.staves() ) @@ -158,15 +160,45 @@ static long test_load_deut( dd4hep::Detector& description, int argc, char** argv dd4hep::printout( dd4hep::DEBUG, "UTCondition", "values[%d]: %.0f", i, values[i].get<double>() ); } } - // for ( const std::string& layer_name : layer_names ) { - // const auto& values = readoutMapCond[layer_name + "Map"]; // implement for all layers - // for ( std::size_t i = 0; i < values.size(); i++ ) { - // dd4hep::printout( dd4hep::DEBUG, layer_name + "ReadoutMap", "values[%d]: %.0f", i, values[i].get<double>() ); - // } - // } } catch ( const char* msg ) { allChecksOK = false; } dd4hep::printout( dd4hep::INFO, "UTCondition", "Successfully accessed ReadoutMap condition" ); + //////////////////////// + /* check getLayerGeom */ + //////////////////////// + std::array<float, 4> z_values{{2328.15, 2383.15, 2593.15, 2648.15}}; + std::array<float, 4> invHalfSectorYSize_values{{0.0209205, 0.0210004, 0.0210004, 0.0209205}}; + std::array<float, 4> invHalfSectorXSize_values{{0.0209263, 0.0209166, 0.0209166, 0.0209263}}; + std::array<float, 4> dxDy_values{{0, 0.0874886, -0.0874886, 0}}; + for ( unsigned int i = 0; i < 4; i++ ) { + auto layerGeom = ut.getLayerGeom( i ); + if ( layerGeom.z - z_values[i] > 0.01 ) { + std::cerr << "layer " << layer_names[i] << " has z=" << layerGeom.z << ", expected z=" << z_values[i] + << ", diff=" << layerGeom.z - z_values[i] << std::endl; + allChecksOK = false; + } + if ( layerGeom.invHalfSectorYSize - invHalfSectorYSize_values[i] > 1e-5 ) { + std::cerr << "layer " << layer_names[i] << " has invHalfSectorYSize=" << layerGeom.invHalfSectorYSize + << ", expected invHalfSectorYSize=" << invHalfSectorYSize_values[i] + << ", diff=" << layerGeom.invHalfSectorYSize - invHalfSectorYSize_values[i] << std::endl; + allChecksOK = false; + } + if ( layerGeom.invHalfSectorXSize - invHalfSectorXSize_values[i] > 1e-5 ) { + std::cerr << "layer " << layer_names[i] << " has invHalfSectorXSize=" << layerGeom.invHalfSectorXSize + << ", expected invHalfSectorXSize=" << invHalfSectorXSize_values[i] + << ", diff=" << layerGeom.invHalfSectorXSize - invHalfSectorXSize_values[i] << std::endl; + allChecksOK = false; + } + if ( layerGeom.dxDy - dxDy_values[i] > 1e-5 ) { + std::cerr << "layer " << layer_names[i] << "has dxDy=" << layerGeom.dxDy << ", expected dxDy=" << dxDy_values[i] + << ", diff=" << layerGeom.dxDy - dxDy_values[i] << std::endl; + allChecksOK = false; + } + } + + //////////////////////////////////////////////// + /* sector and stave names based on GeoVersion */ + //////////////////////////////////////////////// std::vector<std::string> sector_names; std::vector<std::string> stave_names; if ( ut.version() == LHCb::Detector::UT::DeUT::GeoVersion::v1 ) { @@ -1080,17 +1112,6 @@ static long test_load_deut( dd4hep::Detector& description, int argc, char** argv "UTbXLayerR3Module7Sector9"}; } - // // FIXME: testing accessibility of production map from Condition DB - // dd4hep::printout( dd4hep::INFO, "UT", "Accessing ProductionMap.yml" ); - // try { - // const auto& prodMapCond = slice->get( utdet, LHCb::Detector::item_key( "ProductionMap" ) ).get<nlohmann::json>(); - // for ( const std::string& stave_name : stave_names ) { - // dd4hep::printout( dd4hep::INFO, "UT", "Accessing " + stave_name ); - // dd4hep::printout( dd4hep::DEBUG, stave_name, +"ProdID: %.0f", prodMapCond[stave_name]["ProdID"].get<double>() - // ); - // } - // } catch ( const char* msg ) { allChecksOK = false; } - // testing accessibility of noise values try { const auto& noiseValueCond = slice->get( utdet, LHCb::Detector::item_key( "NoiseValues" ) ).get<nlohmann::json>(); -- GitLab From 72e55bbff93d6b25b50b4e273f62737f3fb8ec0b Mon Sep 17 00:00:00 2001 From: Hangyi Wu <hangyi.wu@cern.ch> Date: Mon, 9 Oct 2023 14:11:01 -0400 Subject: [PATCH 10/10] rebase to fix checksums conflicts --- compact/trunk/checksums | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compact/trunk/checksums b/compact/trunk/checksums index 30a312486..f9ef5961d 100644 --- a/compact/trunk/checksums +++ b/compact/trunk/checksums @@ -1,4 +1,4 @@ -/world_volume: 459213809 +/world_volume: 256435643 /world_volume/lvAfterMagnetRegion_3: 1374469345 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1: 187033957 /world_volume/lvAfterMagnetRegion_3/lvRich2Master_1/pvRich2EntryWinTubeLock: 1979723490 @@ -48,7 +48,7 @@ /world_volume/lvAfterMagnetRegion_3/lvUX85BakeoutAfterMagnet_2: 2588750996 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4: 2302184141 /world_volume/lvAfterMagnetRegion_3/lvUX85SupportsAfterMagnet_4/pvUX853AfterMagnetCollar: 2052547805 -/world_volume/lvBeforeMagnetRegion_1: 38284320 +/world_volume/lvBeforeMagnetRegion_1: 3676775170 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0: 2472087751 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBcmUp_3: 2661979061 /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvBlockWallBefMag_0: 2623562443 @@ -58,10 +58,10 @@ /world_volume/lvBeforeMagnetRegion_1/lvBeforeVelo_0/lvUX84BeforeVelo_4: 3588858010 /world_volume/lvBeforeMagnetRegion_1/lvPipeBeforeVelo_4: 1907476790 /world_volume/lvBeforeMagnetRegion_1/lvPipeBeforeVelo_4/pvPipeJunctionBeforeVelo: 3658647410 -/world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1: 667640988 +/world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1: 3587866953 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1MgsDnstrUTH0: 1547102793 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1MgsDnstrUTH1: 4030116150 -/world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1SubMaster: 657361690 +/world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvRich1SubMaster: 941236678 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1AfterSubM: 1874884759 /world_volume/lvBeforeMagnetRegion_1/lvRich1Master_1/pvUX851InRich1BeforeSubM: 3776943454 /world_volume/lvBeforeMagnetRegion_1/lvUT_3: 2855886064 -- GitLab