diff --git a/DDCore/src/DetectorInterna.cpp b/DDCore/src/DetectorInterna.cpp index 8b1fdc36cbbf23bc251f6364e0092e92b44917aa..915a52e07d168e9824c3cb836065c7ea42ba87b5 100644 --- a/DDCore/src/DetectorInterna.cpp +++ b/DDCore/src/DetectorInterna.cpp @@ -143,8 +143,8 @@ pair<DetElement,Volume> DetElementObject::reflect(const std::string& new_name, i except("DetElement","reflect: Something went wrong when reflecting the source volume!"); } de.setPlacement((*i).second); - const auto& children = de.children(); - for(const auto& c : children) + const auto& childrens = de.children(); + for( const auto& c : childrens ) match(c.second); } void map(TGeoNode* n1, TGeoNode* n2) { diff --git a/examples/ClientTests/CMakeLists.txt b/examples/ClientTests/CMakeLists.txt index f0f9ee9018e941ec03ed07403d2192edc57aec96..bd6c6b7f1d79cd363ef02985fbb41dfe49baef41 100644 --- a/examples/ClientTests/CMakeLists.txt +++ b/examples/ClientTests/CMakeLists.txt @@ -52,7 +52,7 @@ dd4hep_add_test_reg( ClientTests_volume_scanner COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun -input ${ClientTestsEx_INSTALL}/compact/MiniTel.xml -destroy -plugin DD4hep_PlacedVolumeScannerTest -detector /world - REGEX_PASS "Visited a total of 11 placed volumes" + REGEX_PASS "Visited a total of 31 placed volumes" REGEX_FAIL "Exception" REGEX_FAIL "FAILED" ) diff --git a/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Volume.xml b/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Volume.xml index 9f02ddb5378a7e26af4041a6874b7b196f31fb73..0d881b6ea198518dab58a2acba226cf5f543e7de 100644 --- a/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Volume.xml +++ b/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Volume.xml @@ -5,20 +5,6 @@ <detectors> <detector id="1" name="Shape_Trapezoid" type="DD4hep_TestShape_Creator"> -<a> - <check vis="Shape1_vis"> - <shape type="Trd2" z="30*cm" x1="30*cm" x2="50*cm" y1="15*cm" y2="30*cm"/> - <position x="30" y="30" z="100*cm"/> - <rotation x="0." y="0" z="0"/> - </check> - <check vis="Shape2_vis"> - <shape type="Trd2" z="30*cm" x1="30*cm" x2="50*cm" y1="15*cm" y2="30*cm"/> - <position x="30" y="30" z="-100*cm"/> - <rotation x="0." y="0" z="0"/> - <reflect/> - </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Trapezoid_Reflect_Volume.txt" create="1"/> -</a> <check vis="Shape1_vis"> <shape type="EightPointSolid" dz="30*cm"> <vertex x="-30*cm" y="-25*cm"/> @@ -48,7 +34,7 @@ <rotation x="0" y="0" z="0"/> <reflect/> </check> - + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Eightpoint_Reflect_Volume.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/ref/Ref_Eightpoint_Reflect_Volume.txt b/examples/ClientTests/ref/Ref_Eightpoint_Reflect_Volume.txt index 0df15d900185d3d7f71ee120c502511e177eb9cc..00bfd6d71843938b64cb0ef7a60cbe6016614ee4 100644 --- a/examples/ClientTests/ref/Ref_Eightpoint_Reflect_Volume.txt +++ b/examples/ClientTests/ref/Ref_Eightpoint_Reflect_Volume.txt @@ -1,22 +1,22 @@ -ShapeCheck[0] TGeoTrd2 8 Mesh-points: -TGeoTrd2 Trd2 N(mesh)=8 N(vert)=8 N(seg)=12 N(pols)=6 -TGeoTrd2 0 Local ( -30.00, -15.00, -30.00) Global ( 0.00, 15.00, 70.00) -TGeoTrd2 1 Local ( -30.00, 15.00, -30.00) Global ( 0.00, 45.00, 70.00) -TGeoTrd2 2 Local ( 30.00, 15.00, -30.00) Global ( 60.00, 45.00, 70.00) -TGeoTrd2 3 Local ( 30.00, -15.00, -30.00) Global ( 60.00, 15.00, 70.00) -TGeoTrd2 4 Local ( -50.00, -30.00, 30.00) Global ( -20.00, 0.00, 130.00) -TGeoTrd2 5 Local ( -50.00, 30.00, 30.00) Global ( -20.00, 60.00, 130.00) -TGeoTrd2 6 Local ( 50.00, 30.00, 30.00) Global ( 80.00, 60.00, 130.00) -TGeoTrd2 7 Local ( 50.00, -30.00, 30.00) Global ( 80.00, 0.00, 130.00) -TGeoTrd2 Bounding box: dx= 50.00 dy= 30.00 dz= 30.00 Origin: x= 0.00 y= 0.00 z= 0.00 -ShapeCheck[1] TGeoTrd2 8 Mesh-points: -TGeoTrd2 Trd2 N(mesh)=8 N(vert)=8 N(seg)=12 N(pols)=6 -TGeoTrd2 0 Local ( -30.00, -15.00, -30.00) Global ( 0.00, 45.00, -130.00) -TGeoTrd2 1 Local ( -30.00, 15.00, -30.00) Global ( 0.00, 15.00, -130.00) -TGeoTrd2 2 Local ( 30.00, 15.00, -30.00) Global ( 60.00, 15.00, -130.00) -TGeoTrd2 3 Local ( 30.00, -15.00, -30.00) Global ( 60.00, 45.00, -130.00) -TGeoTrd2 4 Local ( -50.00, -30.00, 30.00) Global ( -20.00, 60.00, -70.00) -TGeoTrd2 5 Local ( -50.00, 30.00, 30.00) Global ( -20.00, 0.00, -70.00) -TGeoTrd2 6 Local ( 50.00, 30.00, 30.00) Global ( 80.00, 0.00, -70.00) -TGeoTrd2 7 Local ( 50.00, -30.00, 30.00) Global ( 80.00, 60.00, -70.00) -TGeoTrd2 Bounding box: dx= 50.00 dy= 30.00 dz= 30.00 Origin: x= 0.00 y= 0.00 z= 0.00 +ShapeCheck[0] TGeoArb8 8 Mesh-points: +TGeoArb8 EightPointSolid N(mesh)=8 N(vert)=8 N(seg)=12 N(pols)=6 +TGeoArb8 0 Local ( -30.00, -25.00, -30.00) Global ( -30.00, -25.00, 70.00) +TGeoArb8 1 Local ( -25.00, 25.00, -30.00) Global ( -25.00, 25.00, 70.00) +TGeoArb8 2 Local ( 5.00, 25.00, -30.00) Global ( 5.00, 25.00, 70.00) +TGeoArb8 3 Local ( 25.00, -25.00, -30.00) Global ( 25.00, -25.00, 70.00) +TGeoArb8 4 Local ( -28.00, -23.00, 30.00) Global ( -28.00, -23.00, 130.00) +TGeoArb8 5 Local ( -23.00, 27.00, 30.00) Global ( -23.00, 27.00, 130.00) +TGeoArb8 6 Local ( -23.00, 27.00, 30.00) Global ( -23.00, 27.00, 130.00) +TGeoArb8 7 Local ( 13.00, -27.00, 30.00) Global ( 13.00, -27.00, 130.00) +TGeoArb8 Bounding box: dx= 27.50 dy= 27.00 dz= 30.00 Origin: x= -2.50 y= 0.00 z= 0.00 +ShapeCheck[1] TGeoScaledShape 8 Mesh-points: +TGeoScaledShape TGeoScaledShape N(mesh)=8 N(vert)=8 N(seg)=12 N(pols)=6 +TGeoScaledShape 0 Local ( -30.00, -25.00, 30.00) Global ( -30.00, -25.00, -70.00) +TGeoScaledShape 1 Local ( -25.00, 25.00, 30.00) Global ( -25.00, 25.00, -70.00) +TGeoScaledShape 2 Local ( 5.00, 25.00, 30.00) Global ( 5.00, 25.00, -70.00) +TGeoScaledShape 3 Local ( 25.00, -25.00, 30.00) Global ( 25.00, -25.00, -70.00) +TGeoScaledShape 4 Local ( -28.00, -23.00, -30.00) Global ( -28.00, -23.00, -130.00) +TGeoScaledShape 5 Local ( -23.00, 27.00, -30.00) Global ( -23.00, 27.00, -130.00) +TGeoScaledShape 6 Local ( -23.00, 27.00, -30.00) Global ( -23.00, 27.00, -130.00) +TGeoScaledShape 7 Local ( 13.00, -27.00, -30.00) Global ( 13.00, -27.00, -130.00) +TGeoScaledShape Bounding box: dx= 27.50 dy= 27.00 dz= 30.00 Origin: x= -2.50 y= 0.00 z= -0.00 diff --git a/examples/ClientTests/ref/Ref_PseudoTrap2.txt b/examples/ClientTests/ref/Ref_PseudoTrap2.txt index 6f7b78d63ecad0f1b66cbea8de55a135197a9dac..894e5acb685c19409a1630f440dca6bc70258f20 100644 --- a/examples/ClientTests/ref/Ref_PseudoTrap2.txt +++ b/examples/ClientTests/ref/Ref_PseudoTrap2.txt @@ -52,7 +52,7 @@ TGeoCompositeShape 32 Local ( 38.48, -90.00, 126.06) Global (-173.94, -90. TGeoCompositeShape 33 Local ( 29.11, -90.00, 128.98) Global (-171.02, -90.00, 29.11) TGeoCompositeShape 34 Local ( 19.53, -90.00, 131.09) Global (-168.91, -90.00, 19.53) TGeoCompositeShape 35 Local ( 9.80, -90.00, 132.36) Global (-167.64, -90.00, 9.80) -TGeoCompositeShape 36 Local ( 0.00, -90.00, 132.78) Global (-167.22, -90.00, -0.00) +TGeoCompositeShape 36 Local ( 0.00, -90.00, 132.78) Global (-167.22, -90.00, 0.00) TGeoCompositeShape 37 Local ( -9.80, -90.00, 132.36) Global (-167.64, -90.00, -9.80) TGeoCompositeShape 38 Local ( -19.53, -90.00, 131.09) Global (-168.91, -90.00, -19.53) TGeoCompositeShape 39 Local ( -29.11, -90.00, 128.98) Global (-171.02, -90.00, -29.11) diff --git a/examples/ClientTests/ref/Ref_Trapezoid.txt b/examples/ClientTests/ref/Ref_Trapezoid.txt new file mode 100644 index 0000000000000000000000000000000000000000..6f76c76764bc4b6161c61590e5805cdd59f4dfa1 --- /dev/null +++ b/examples/ClientTests/ref/Ref_Trapezoid.txt @@ -0,0 +1,11 @@ +ShapeCheck[0] TGeoTrd2 8 Mesh-points: +TGeoTrd2 Trapezoid N(mesh)=8 N(vert)=8 N(seg)=12 N(pols)=6 +TGeoTrd2 0 Local ( -30.00, -15.00, -30.00) Global ( 0.00, 15.00, 20.00) +TGeoTrd2 1 Local ( -30.00, 15.00, -30.00) Global ( 0.00, 45.00, 20.00) +TGeoTrd2 2 Local ( 30.00, 15.00, -30.00) Global ( 60.00, 45.00, 20.00) +TGeoTrd2 3 Local ( 30.00, -15.00, -30.00) Global ( 60.00, 15.00, 20.00) +TGeoTrd2 4 Local ( -50.00, -30.00, 30.00) Global ( -20.00, 0.00, 80.00) +TGeoTrd2 5 Local ( -50.00, 30.00, 30.00) Global ( -20.00, 60.00, 80.00) +TGeoTrd2 6 Local ( 50.00, 30.00, 30.00) Global ( 80.00, 60.00, 80.00) +TGeoTrd2 7 Local ( 50.00, -30.00, 30.00) Global ( 80.00, 0.00, 80.00) +TGeoTrd2 Bounding box: dx= 50.00 dy= 30.00 dz= 30.00 Origin: x= 0.00 y= 0.00 z= 0.00