From 75fdcfcca76b8fdf903eafd43fe41922693499d4 Mon Sep 17 00:00:00 2001 From: Markus FRANK <Markus.Frank@cern.ch> Date: Mon, 4 Jan 2021 19:56:23 +0100 Subject: [PATCH] Prepare for using DD4hep with Geant4 units (mm,ns,MeV) --- CMakeLists.txt | 25 +- DDAlign/src/GlobalAlignmentWriter.cpp | 12 +- DDAlign/src/plugins/GlobalAlignmentParser.cpp | 16 +- .../plugins/ConditionsRepositoryWriter.cpp | 18 +- DDCore/src/DetectorImp.cpp | 5 +- DDCore/src/MatrixHelpers.cpp | 2 +- DDCore/src/ShapeUtilities.cpp | 18 +- DDCore/src/Shapes.cpp | 12 +- DDCore/src/Volumes.cpp | 24 +- DDCore/src/plugins/ShapePlugins.cpp | 21 +- DDEve/src/HitActors.cpp | 2 +- DDEve/src/ParticleActors.cpp | 2 +- DDG4/src/Geant4SensDetAction.cpp | 2 +- DDParsers/include/Evaluator/DD4hepUnits.h | 10 +- cmake/DD4hepBuild.cmake | 5 + cmake/DD4hepConfig.cmake.in | 13 +- examples/AlignDet/CMakeLists.txt | 3 +- .../src/AlignmentExample_align_telescope.cpp | 6 +- examples/ClientTests/CMakeLists.txt | 2 +- .../ClientTests/compact/Check_Shape_Box.xml | 4 +- .../Check_Shape_Box_Reflect_DetElement.xml | 22 +- .../ClientTests/compact/Check_Shape_Cone.xml | 4 +- .../compact/Check_Shape_ConeSegment.xml | 4 +- .../compact/Check_Shape_CutTube.xml | 4 +- .../compact/Check_Shape_EightPointSolid.xml | 4 +- ...ck_Shape_Eightpoint_Reflect_DetElement.xml | 4 +- .../Check_Shape_Eightpoint_Reflect_Volume.xml | 8 +- .../Check_Shape_Eightpoint_Reflect_Z.xml | 4 +- .../compact/Check_Shape_ElTube.xml | 4 +- .../compact/Check_Shape_Hyperboloid.xml | 4 +- .../compact/Check_Shape_Paraboloid.xml | 2 +- .../compact/Check_Shape_Polycone.xml | 4 +- .../compact/Check_Shape_Polyhedra.xml | 2 +- .../compact/Check_Shape_PseudoTrap.xml | 7 +- .../compact/Check_Shape_PseudoTrap1.xml | 34 ++ .../compact/Check_Shape_PseudoTrap2.xml | 22 +- .../compact/Check_Shape_PseudoTrap3.xml | 18 +- .../compact/Check_Shape_Scaled_Cone.xml | 8 +- .../compact/Check_Shape_Sphere.xml | 6 +- .../compact/Check_Shape_Tessellated.xml | 364 +++++++++--------- .../ClientTests/compact/Check_Shape_Torus.xml | 4 +- .../ClientTests/compact/Check_Shape_Trap.xml | 4 +- .../compact/Check_Shape_Trapezoid.xml | 4 +- .../ClientTests/compact/Check_Shape_Trd1.xml | 8 +- .../ClientTests/compact/Check_Shape_Trd2.xml | 4 +- .../ClientTests/compact/Check_Shape_Tube.xml | 8 +- .../compact/Check_Shape_TubeDivision.xml | 12 +- .../compact/Check_Shape_TwistedTube.xml | 4 +- .../compact/NamespaceConstants.xml | 2 +- examples/ClientTests/ref/Ref_PseudoTrap1.txt | 9 + examples/ClientTests/ref/Ref_PseudoTrap2.txt | 15 +- 51 files changed, 429 insertions(+), 376 deletions(-) create mode 100644 examples/ClientTests/compact/Check_Shape_PseudoTrap1.xml create mode 100644 examples/ClientTests/ref/Ref_PseudoTrap1.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 45f93b421..7c24a9f08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,18 +67,19 @@ ENDIF() cmake_host_system_information(RESULT HOST_RAM_MB QUERY TOTAL_PHYSICAL_MEMORY) math(EXPR DD4HEP_HIGH_MEM_POOL_DEPTH "${HOST_RAM_MB} / 2000" OUTPUT_FORMAT DECIMAL) -option(DD4HEP_USE_XERCESC "Enable 'Detector Builders' based on XercesC" OFF) -option(DD4HEP_USE_GEANT4 "Enable the simulation part based on Geant4" OFF) -option(DD4HEP_IGNORE_GEANT4_TLS "Ignore the tls flag Geant4 was compiled with" OFF) -option(DD4HEP_USE_GEAR "Build gear wrapper for backward compatibility" OFF) -option(DD4HEP_USE_LCIO "Build lcio extensions" OFF) -option(DD4HEP_USE_EDM4HEP "Build edm4hep extensions" OFF) -option(DD4HEP_USE_HEPMC3 "Build hepmc3 extensions" OFF) -option(DD4HEP_USE_TBB "Build features that require TBB" OFF) -option(DD4HEP_LOAD_ASSIMP "Download and build ASSIMP from github" OFF) -option(BUILD_TESTING "Enable and build tests" ON) -option(BUILD_SHARED_LIBS "If OFF build STATIC Libraries" ON) -option(DD4HEP_SET_RPATH "Link libraries with built-in RPATH (run-time search path)" ON) +option(DD4HEP_USE_XERCESC "Enable 'Detector Builders' based on XercesC" OFF) +option(DD4HEP_USE_GEANT4 "Enable the simulation part based on Geant4" OFF) +option(DD4HEP_IGNORE_GEANT4_TLS "Ignore the tls flag Geant4 was compiled with" OFF) +option(DD4HEP_USE_GEAR "Build gear wrapper for backward compatibility" OFF) +option(DD4HEP_USE_LCIO "Build lcio extensions" OFF) +option(DD4HEP_USE_GEANT4_UNITS "Build using Geant4 units throughout" OFF) +option(DD4HEP_USE_EDM4HEP "Build edm4hep extensions" OFF) +option(DD4HEP_USE_HEPMC3 "Build hepmc3 extensions" OFF) +option(DD4HEP_USE_TBB "Build features that require TBB" OFF) +option(DD4HEP_LOAD_ASSIMP "Download and build ASSIMP from github" OFF) +option(BUILD_TESTING "Enable and build tests" ON) +option(BUILD_SHARED_LIBS "If OFF build STATIC Libraries" ON) +option(DD4HEP_SET_RPATH "Link libraries with built-in RPATH (run-time search path)" ON) SET(DD4HEP_BUILD_PACKAGES "DDRec DDDetectors DDCond DDAlign DDCAD DDDigi DDG4 DDEve UtilityApps" CACHE STRING "List of DD4hep packages to build") diff --git a/DDAlign/src/GlobalAlignmentWriter.cpp b/DDAlign/src/GlobalAlignmentWriter.cpp index c949affef..5c6b63133 100644 --- a/DDAlign/src/GlobalAlignmentWriter.cpp +++ b/DDAlign/src/GlobalAlignmentWriter.cpp @@ -81,9 +81,9 @@ void GlobalAlignmentWriter::addNode(xml::Element elt, GlobalAlignment a) const fabs(t[1]) > numeric_limits<double>::epsilon() || fabs(t[2]) > numeric_limits<double>::epsilon() ) { xml::Element e = xml::Element(elt.document(),_U(position)); - e.setAttr(_U(x),t[0]); - e.setAttr(_U(y),t[1]); - e.setAttr(_U(z),t[2]); + e.setAttr(_U(x),_toString(t[0]/dd4hep::mm,"%f*mm")); + e.setAttr(_U(y),_toString(t[1]/dd4hep::mm,"%f*mm")); + e.setAttr(_U(z),_toString(t[2]/dd4hep::mm,"%f*mm")); elt.append(e); } if ( mat.IsRotation() ) { @@ -95,9 +95,9 @@ void GlobalAlignmentWriter::addNode(xml::Element elt, GlobalAlignment a) const xml::Element e = xml::Element(elt.document(),_U(rotation)); // Don't know why the angles have the wrong sign.... rot *= -1; - e.setAttr(_U(x),rot.X()); - e.setAttr(_U(y),rot.Y()); - e.setAttr(_U(z),rot.Z()); + e.setAttr(_U(x),_toString(rot.X()/dd4hep::rad,"%f*rad")); + e.setAttr(_U(y),_toString(rot.Y()/dd4hep::rad,"%f*rad")); + e.setAttr(_U(z),_toString(rot.Z()/dd4hep::rad,"%f*rad")); elt.append(e); } } diff --git a/DDAlign/src/plugins/GlobalAlignmentParser.cpp b/DDAlign/src/plugins/GlobalAlignmentParser.cpp index 69455fbe4..7422399a6 100644 --- a/DDAlign/src/plugins/GlobalAlignmentParser.cpp +++ b/DDAlign/src/plugins/GlobalAlignmentParser.cpp @@ -76,9 +76,9 @@ typedef GlobalAlignmentStack::StackEntry StackEntry; /** Convert volume objects * * <volume subpath="layer4_0"> - * <position x="0" y="0" z="0"/> - * <rotation x="0.5" y="0.1" z="0.2"/> - * <pivot x="0" y="0" z="100"/> + * <position x="0*mm" y="0*mm" z="0*mm"/> + * <rotation x="0.5" y="0.1" z="0.2"/> + * <pivot x="0*mm" y="0*mm" z="100*mm"/> * <volume> * ... * <volume> @@ -126,9 +126,9 @@ template <> void Converter<volume>::operator()(xml_h e) const { * realigned. * * <detelement path="/world/TPC/TPC_SideA/TPC_SideA_sector02"> - * <position x="0" y="0" z="0"/> - * <rotation x="0.5" y="0" z="0"/> - * <pivot x="0" y="0" z="100"/> + * <position x="0*mm" y="0*mm" z="0*mm"/> + * <rotation x="0.5" y="0.1" z="0.2"/> + * <pivot x="0*mm" y="0*mm" z="100*mm"/> * </detelement> * * @author M.Frank @@ -184,8 +184,8 @@ template <> void Converter<detelement>::operator()(xml_h e) const { /** Convert detelement_include objects * * <detelement path="/world/TPC/TPC_SideA/TPC_SideA_sector02"> - * <position x="0" y="0" z="0"/> - * <rotation x="0.5" y="0" z="0"/> + * <position x="0*mm" y="0*mm" z="0*mm"/> + * <rotation x="0.5" y="0.1" z="0.2"/> * </detelement> * * @author M.Frank diff --git a/DDCond/src/plugins/ConditionsRepositoryWriter.cpp b/DDCond/src/plugins/ConditionsRepositoryWriter.cpp index 4e63ff095..91e74498b 100644 --- a/DDCond/src/plugins/ConditionsRepositoryWriter.cpp +++ b/DDCond/src/plugins/ConditionsRepositoryWriter.cpp @@ -159,25 +159,25 @@ namespace { xml::Element _convert(xml::Element par, const Translation3D& tr) { xml::Element e = xml::Element(par.document(),_U(pivot)); const Translation3D::Vector& v = tr.Vect(); - e.setAttr(_U(x),v.X()); - e.setAttr(_U(y),v.Y()); - e.setAttr(_U(z),v.Z()); + e.setAttr(_U(x),_toString(v.X()/dd4hep::mm,"%f*mm")); + e.setAttr(_U(y),_toString(v.Y()/dd4hep::mm,"%f*mm")); + e.setAttr(_U(z),_toString(v.Z()/dd4hep::mm,"%f*mm")); return e; } xml::Element _convert(xml::Element par, const Position& pos) { xml::Element e = xml::Element(par.document(),_U(position)); - e.setAttr(_U(x),pos.X()); - e.setAttr(_U(y),pos.Y()); - e.setAttr(_U(z),pos.Z()); + e.setAttr(_U(x),_toString(pos.X()/dd4hep::mm,"%f*mm")); + e.setAttr(_U(y),_toString(pos.Y()/dd4hep::mm,"%f*mm")); + e.setAttr(_U(z),_toString(pos.Z()/dd4hep::mm,"%f*mm")); return e; } xml::Element _convert(xml::Element par, const RotationZYX& rot) { xml::Element e = xml::Element(par.document(),_U(rotation)); double z, y, x; rot.GetComponents(z,y,x); - e.setAttr(_U(x),x); - e.setAttr(_U(y),y); - e.setAttr(_U(z),z); + e.setAttr(_U(x),_toString(x/dd4hep::rad,"%f*rad")); + e.setAttr(_U(y),_toString(y/dd4hep::rad,"%f*rad")); + e.setAttr(_U(z),_toString(z/dd4hep::rad,"%f*rad")); return e; } template <> xml::Element _convert<value>(xml::Element par, Condition c) { diff --git a/DDCore/src/DetectorImp.cpp b/DDCore/src/DetectorImp.cpp index ca89daac9..406b5bc8f 100644 --- a/DDCore/src/DetectorImp.cpp +++ b/DDCore/src/DetectorImp.cpp @@ -164,8 +164,9 @@ DetectorImp::DetectorImp() DetectorImp::DetectorImp(const string& name) : TNamed(), DetectorData(), DetectorLoad(this), m_buildType(BUILD_NONE) { -#if ROOT_VERSION_CODE >= ROOT_VERSION(6,20,0) - //TGeoUnit::setUnitType(TGeoUnit::kTGeant4Units); +#if defined(DD4HEP_USE_GEANT4_UNITS) && ROOT_VERSION_CODE >= ROOT_VERSION(6,20,0) + printout(WARNING,"DD4hep","++ Using globally Geant4 unit system (mm,ns,MeV)"); + TGeoUnit::setUnitType(TGeoUnit::kTGeant4Units); #endif SetName(name.c_str()); SetTitle("DD4hep detector description object"); diff --git a/DDCore/src/MatrixHelpers.cpp b/DDCore/src/MatrixHelpers.cpp index 549a6ea90..96c448390 100644 --- a/DDCore/src/MatrixHelpers.cpp +++ b/DDCore/src/MatrixHelpers.cpp @@ -15,7 +15,7 @@ #include "DD4hep/MatrixHelpers.h" #include "DD4hep/DD4hepUnits.h" -#ifdef HAVE_GEANT4_UNITS +#ifdef DD4HEP_USE_GEANT4_UNITS #define MM_2_CM 1.0 #else #define MM_2_CM 0.1 diff --git a/DDCore/src/ShapeUtilities.cpp b/DDCore/src/ShapeUtilities.cpp index 74551857f..f455af8be 100644 --- a/DDCore/src/ShapeUtilities.cpp +++ b/DDCore/src/ShapeUtilities.cpp @@ -1253,21 +1253,21 @@ namespace dd4hep { for(Int_t i=0; i<nvert; ++i) { Double_t* p = points + 3*i; os << setw(16) << left << sol->IsA()->GetName() << " " << setw(3) << left << i - << " Local (" << setw(7) << setprecision(prec) << fixed << right << p[0] - << ", " << setw(7) << setprecision(prec) << fixed << right << p[1] - << ", " << setw(7) << setprecision(prec) << fixed << right << p[2] + << " Local (" << setw(7) << setprecision(prec) << fixed << right << p[0]/dd4hep::cm + << ", " << setw(7) << setprecision(prec) << fixed << right << p[1]/dd4hep::cm + << ", " << setw(7) << setprecision(prec) << fixed << right << p[2]/dd4hep::cm << ")" << endl; } Box box = sol; const Double_t* org = box->GetOrigin(); os << setw(16) << left << sol->IsA()->GetName() << " Bounding box: " - << " dx=" << setw(7) << setprecision(prec) << fixed << right << box->GetDX() - << " dy=" << setw(7) << setprecision(prec) << fixed << right << box->GetDY() - << " dz=" << setw(7) << setprecision(prec) << fixed << right << box->GetDZ() - << " Origin: x=" << setw(7) << setprecision(prec) << fixed << right << org[0] - << " y=" << setw(7) << setprecision(prec) << fixed << right << org[1] - << " z=" << setw(7) << setprecision(prec) << fixed << right << org[2] + << " dx=" << setw(7) << setprecision(prec) << fixed << right << box->GetDX()/dd4hep::cm + << " dy=" << setw(7) << setprecision(prec) << fixed << right << box->GetDY()/dd4hep::cm + << " dz=" << setw(7) << setprecision(prec) << fixed << right << box->GetDZ()/dd4hep::cm + << " Origin: x=" << setw(7) << setprecision(prec) << fixed << right << org[0]/dd4hep::cm + << " y=" << setw(7) << setprecision(prec) << fixed << right << org[1]/dd4hep::cm + << " z=" << setw(7) << setprecision(prec) << fixed << right << org[2]/dd4hep::cm << endl; /// -------------------- DONE -------------------- diff --git a/DDCore/src/Shapes.cpp b/DDCore/src/Shapes.cpp index 14d4eb664..f59c2340b 100644 --- a/DDCore/src/Shapes.cpp +++ b/DDCore/src/Shapes.cpp @@ -701,20 +701,26 @@ void PseudoTrap::make(const string& nam, double x1, double x2, double y1, double else { except(PSEUDOTRAP_TAG,"Check parameters of the PseudoTrap!"); } + printout(WARNING,"PseudoTrap","++ Trd2(%s): x1=%.3g x2=%.3g y1=%.3g y2=%.3g halfZ=%.3g", + (nam+"Trd2").c_str(), x1, x2, y1, y2, halfZ); + printout(WARNING,"PseudoTrap","++ Tubs(%s): r=%.3g h=%.3g startPhi=%.3g endPhi=%.3g", + (nam+"Tubs").c_str(), std::abs(r),h,startPhi,startPhi + halfOpeningAngle*2.); Solid trap(new TGeoTrd2((nam+"Trd2").c_str(), x1, x2, y1, y2, halfZ)); Solid tubs(new TGeoTubeSeg((nam+"Tubs").c_str(), 0.,std::abs(r),h,startPhi,startPhi + halfOpeningAngle*2.)); + stringstream params; + params << x1 << " " << x2 << " " << y1 << " " << y2 << " " << z << " " + << r << " " << char(atMinusZ ? '1' : '0') << " "; TGeoCompositeShape* solid = 0; if( intersec ) { + printout(WARNING,"PseudoTrap","++ Intersection displacement=%.3g", displacement); solid = SubtractionSolid(nam, trap, tubs, Transform3D(RotationX(M_PI/2.), Position(0.,0.,displacement))).ptr(); } else { + printout(WARNING,"PseudoTrap","++ Union displacement=%.3g sqrt(r*r-x*x)=%.3g", displacement, std::sqrt(r*r-x*x)); SubtractionSolid sub((nam+"Subs").c_str(), tubs, Box(1.1*x, 1.1*h, std::sqrt(r*r-x*x)), Transform3D(RotationX(M_PI/2.))); solid = UnionSolid(nam, trap, sub, Transform3D(RotationX(M_PI/2.), Position(0,0,displacement))).ptr(); } - stringstream params; - params << x1 << " " << x2 << " " << y1 << " " << y2 << " " << z << " " - << r << " " << char(atMinusZ ? '1' : '0') << " "; solid->GetBoolNode()->GetRightMatrix()->SetTitle(params.str().c_str()); _assign(solid,"",PSEUDOTRAP_TAG, true); } diff --git a/DDCore/src/Volumes.cpp b/DDCore/src/Volumes.cpp index 9fbeaf6e3..357be98ff 100644 --- a/DDCore/src/Volumes.cpp +++ b/DDCore/src/Volumes.cpp @@ -1032,24 +1032,24 @@ std::string dd4hep::toStringMesh(PlacedVolume place, int prec) { Double_t global[3], local[3] = {p[0], p[1], p[2]}; mat->LocalToMaster(local, global); os << setw(16) << left << sol->IsA()->GetName() << " " << setw(3) << left << i - << " Local (" << setw(7) << setprecision(prec) << fixed << right << local[0] - << ", " << setw(7) << setprecision(prec) << fixed << right << local[1] - << ", " << setw(7) << setprecision(prec) << fixed << right << local[2] - << ") Global (" << setw(7) << setprecision(prec) << fixed << right << global[0] - << ", " << setw(7) << setprecision(prec) << fixed << right << global[1] - << ", " << setw(7) << setprecision(prec) << fixed << right << global[2] + << " Local (" << setw(7) << setprecision(prec) << fixed << right << local[0]/dd4hep::cm + << ", " << setw(7) << setprecision(prec) << fixed << right << local[1]/dd4hep::cm + << ", " << setw(7) << setprecision(prec) << fixed << right << local[2]/dd4hep::cm + << ") Global (" << setw(7) << setprecision(prec) << fixed << right << global[0]/dd4hep::cm + << ", " << setw(7) << setprecision(prec) << fixed << right << global[1]/dd4hep::cm + << ", " << setw(7) << setprecision(prec) << fixed << right << global[2]/dd4hep::cm << ")" << endl; } Box box = sol; const Double_t* org = box->GetOrigin(); os << setw(16) << left << sol->IsA()->GetName() << " Bounding box: " - << " dx=" << setw(7) << setprecision(prec) << fixed << right << box->GetDX() - << " dy=" << setw(7) << setprecision(prec) << fixed << right << box->GetDY() - << " dz=" << setw(7) << setprecision(prec) << fixed << right << box->GetDZ() - << " Origin: x=" << setw(7) << setprecision(prec) << fixed << right << org[0] - << " y=" << setw(7) << setprecision(prec) << fixed << right << org[1] - << " z=" << setw(7) << setprecision(prec) << fixed << right << org[2] + << " dx=" << setw(7) << setprecision(prec) << fixed << right << box->GetDX()/dd4hep::cm + << " dy=" << setw(7) << setprecision(prec) << fixed << right << box->GetDY()/dd4hep::cm + << " dz=" << setw(7) << setprecision(prec) << fixed << right << box->GetDZ()/dd4hep::cm + << " Origin: x=" << setw(7) << setprecision(prec) << fixed << right << org[0]/dd4hep::cm + << " y=" << setw(7) << setprecision(prec) << fixed << right << org[1]/dd4hep::cm + << " z=" << setw(7) << setprecision(prec) << fixed << right << org[2]/dd4hep::cm << endl; /// -------------------- DONE -------------------- diff --git a/DDCore/src/plugins/ShapePlugins.cpp b/DDCore/src/plugins/ShapePlugins.cpp index b66cdedbb..b5b390a27 100644 --- a/DDCore/src/plugins/ShapePlugins.cpp +++ b/DDCore/src/plugins/ShapePlugins.cpp @@ -719,9 +719,10 @@ static Ref_t create_shape(Detector& description, xml_h e, SensitiveDetector sens pv.addPhysVolID("check",x_check.id()); printout(INFO,"TestShape","+++ Volume id is %d", x_check.id()); } - - printout(INFO,"TestShape","Created successfull shape of type: %s", - shape_type.c_str()); + const char* nam = solid->GetName(); + printout(INFO,"TestShape","Created successfull shape of type: %s %c%s%c", + shape_type.c_str(), nam ? '[' : ' ', nam ? nam : "" ,nam ? ']' : ' '); + bool instance_test = false; if ( 0 == strcasecmp(solid->GetTitle(),BOX_TAG) ) instance_test = isInstance<Box>(solid); @@ -832,8 +833,8 @@ static Ref_t create_shape(Detector& description, xml_h e, SensitiveDetector sens instance_test ? "OK" : "FAILED"); } else { - printout(INFO,"TestShape","Correct shape type: %s <-> %s Instance test: %s", - shape_type.c_str(), solid->GetTitle(), "OK"); + printout(INFO,"TestShape","Correct shape type: %s %s <-> %s Instance test: %s", + solid->GetName(), shape_type.c_str(), solid->GetTitle(), "OK"); } } if ( x_reflect ) { @@ -913,8 +914,14 @@ void* shape_mesh_verifier(Detector& description, int argc, char** argv) { Volume v = pv.volume(); for (Int_t ipv=0, npv=v->GetNdaughters(); ipv < npv; ipv++) { PlacedVolume place = v->GetNode(ipv); + auto vol = place.volume(); + auto solid = vol.solid(); os << "ShapeCheck[" << ipv << "] "; os << toStringMesh(place, 2); + printout(INFO,"Mesh_Verifier","+++ Checking mesh of %s %s [%s] vol:%s.", + solid->IsA()->GetName(), + solid->GetName(), solid->GetTitle(), + vol->GetName()); } gSystem->ExpandPathName(ref); if ( ref_cr ) { @@ -950,8 +957,8 @@ void* shape_mesh_verifier(Detector& description, int argc, char** argv) { solid.setDimensions(params); } else if ( isInstance<PseudoTrap>(solid) ) { - auto params = solid.dimensions(); - solid.setDimensions(params); + //auto params = solid.dimensions(); + //solid.setDimensions(params); } else if ( solid->IsA() != TGeoCompositeShape::Class() ) { auto params = solid.dimensions(); diff --git a/DDEve/src/HitActors.cpp b/DDEve/src/HitActors.cpp index dde055102..182aa090c 100644 --- a/DDEve/src/HitActors.cpp +++ b/DDEve/src/HitActors.cpp @@ -26,7 +26,7 @@ using namespace std; using namespace dd4hep; -#ifdef HAVE_GEANT4_UNITS +#ifdef DD4HEP_USE_GEANT4_UNITS #define MM_2_CM 1.0 #define MEV_TO_GEV 1000.0 #else diff --git a/DDEve/src/ParticleActors.cpp b/DDEve/src/ParticleActors.cpp index 6bc62890a..b4b1ed5e3 100644 --- a/DDEve/src/ParticleActors.cpp +++ b/DDEve/src/ParticleActors.cpp @@ -30,7 +30,7 @@ using namespace std; using namespace dd4hep; -#ifdef HAVE_GEANT4_UNITS +#ifdef DD4HEP_USE_GEANT4_UNITS #define CM_2_MM 1.0 #define MM_2_CM 1.0 #define MEV_TO_GEV 1000.0 diff --git a/DDG4/src/Geant4SensDetAction.cpp b/DDG4/src/Geant4SensDetAction.cpp index e392269bb..088d0f32b 100644 --- a/DDG4/src/Geant4SensDetAction.cpp +++ b/DDG4/src/Geant4SensDetAction.cpp @@ -30,7 +30,7 @@ // C/C++ include files #include <stdexcept> -#ifdef HAVE_GEANT4_UNITS +#ifdef DD4HEP_USE_GEANT4_UNITS #define MM_2_CM 1.0 #else #define MM_2_CM 0.1 diff --git a/DDParsers/include/Evaluator/DD4hepUnits.h b/DDParsers/include/Evaluator/DD4hepUnits.h index 95a79622a..c9e085375 100644 --- a/DDParsers/include/Evaluator/DD4hepUnits.h +++ b/DDParsers/include/Evaluator/DD4hepUnits.h @@ -29,10 +29,6 @@ #include "RVersion.h" -#ifndef HAVE_GEANT4_UNITS -// #define HAVE_GEANT4_UNITS -#endif - // We use the ROOT system units if they are avalible (FAILS SOME TESTS FOR NOW) #if 0 /// ROOT_VERSION_CODE >= ROOT_VERSION(6,12,0) @@ -50,7 +46,7 @@ namespace dd4hep { // // Length [L] // -#ifdef HAVE_GEANT4_UNITS +#ifdef DD4HEP_USE_GEANT4_UNITS static constexpr double millimeter = 1.0; #else static constexpr double millimeter = 0.1; @@ -129,7 +125,7 @@ namespace dd4hep { // // Time [T] // -#ifdef HAVE_GEANT4_UNITS +#ifdef DD4HEP_USE_GEANT4_UNITS static constexpr double nanosecond = 1.0; #else static constexpr double nanosecond = 1.e-9; @@ -158,7 +154,7 @@ namespace dd4hep { // // Energy [E] // -#ifdef HAVE_GEANT4_UNITS +#ifdef DD4HEP_USE_GEANT4_UNITS static constexpr double megaelectronvolt = 1.0; #else static constexpr double megaelectronvolt = 1.e-3; diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake index a5a259b21..8e2ef8e2d 100644 --- a/cmake/DD4hepBuild.cmake +++ b/cmake/DD4hepBuild.cmake @@ -43,6 +43,11 @@ macro(dd4hep_set_compiler_flags) set ( COMPILER_FLAGS ${COMPILER_FLAGS} -Winconsistent-missing-override -Wno-c++1z-extensions -Wheader-hygiene ) endif() + IF( DD4HEP_USE_GEANT4_UNITS ) + MESSAGE(STATUS "+++ Building DD4hep with Geant4 units......") + add_compile_definitions(DD4HEP_USE_GEANT4_UNITS=1) + ENDIF() + FOREACH( FLAG ${COMPILER_FLAGS} ) ## meed to replace the minus or plus signs from the variables, because it is passed ## as a macro to g++ which causes a warning about no whitespace after macro diff --git a/cmake/DD4hepConfig.cmake.in b/cmake/DD4hepConfig.cmake.in index 1c2d2cbe7..d678e2584 100644 --- a/cmake/DD4hepConfig.cmake.in +++ b/cmake/DD4hepConfig.cmake.in @@ -25,12 +25,13 @@ set ( @CMAKE_PROJECT_NAME@_DIR "${_thisdir}" ) set ( @CMAKE_PROJECT_NAME@_ROOT "${_thisdir}" ) set ( @CMAKE_PROJECT_NAME@_VERSION "@DD4hep_VERSION@" ) set ( @CMAKE_PROJECT_NAME@_SOVERSION "@DD4hep_SOVERSION@" ) -set ( DD4HEP_USE_GEANT4 @DD4HEP_USE_GEANT4@ ) -set ( DD4HEP_USE_CLHEP @DD4HEP_USE_CLHEP@ ) -set ( DD4HEP_USE_LCIO @DD4HEP_USE_LCIO@ ) -set ( DD4HEP_USE_XERCESC @DD4HEP_USE_XERCESC@ ) -set ( DD4HEP_USE_TBB @DD4HEP_USE_TBB@ ) -set ( @CMAKE_PROJECT_NAME@_BUILD_CXX_STANDARD @CMAKE_CXX_STANDARD@ ) +set ( DD4HEP_USE_GEANT4 @DD4HEP_USE_GEANT4@ ) +set ( DD4HEP_USE_CLHEP @DD4HEP_USE_CLHEP@ ) +set ( DD4HEP_USE_LCIO @DD4HEP_USE_LCIO@ ) +set ( DD4HEP_USE_XERCESC @DD4HEP_USE_XERCESC@ ) +set ( DD4HEP_USE_TBB @DD4HEP_USE_TBB@ ) +set ( DD4HEP_USE_GEANT4_UNITS @DD4HEP_USE_GEANT4_UNITS@ ) +set ( @CMAKE_PROJECT_NAME@_BUILD_CXX_STANDARD @CMAKE_CXX_STANDARD@ ) include ( ${@CMAKE_PROJECT_NAME@_DIR}/cmake/DD4hep.cmake ) diff --git a/examples/AlignDet/CMakeLists.txt b/examples/AlignDet/CMakeLists.txt index ac2314e50..67bba477c 100644 --- a/examples/AlignDet/CMakeLists.txt +++ b/examples/AlignDet/CMakeLists.txt @@ -73,7 +73,8 @@ dd4hep_add_test_reg( AlignDet_Telescope_dump_xml #---Testing: Write out alignment file from the alignment data using a detelement scan dd4hep_add_test_reg( AlignDet_Telescope_write_xml COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" - EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml + EXEC_ARGS geoPluginRun -volmgr -destroy + -plugin DD4hep_AlignmentExample_read_xml -input file:${AlignDet_INSTALL}/compact/Telescope.xml -delta file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml -plugin DD4hep_ConditionsXMLRepositoryWriter -iov_type run -iov_value 1500 -manager -output new_cond.xml diff --git a/examples/AlignDet/src/AlignmentExample_align_telescope.cpp b/examples/AlignDet/src/AlignmentExample_align_telescope.cpp index 349f72358..8b593fce0 100644 --- a/examples/AlignDet/src/AlignmentExample_align_telescope.cpp +++ b/examples/AlignDet/src/AlignmentExample_align_telescope.cpp @@ -46,7 +46,7 @@ static void print_world_trafo(AlignmentsCalib& calib, const std::string& path) if ( a.isValid() ) { const double* tr = a.worldTransformation().GetTranslation(); printout(INFO,"Example","++ World transformation of: %-32s Tr:(%8.2g,%8.2g,%8.2g [cm])", - path.c_str(), tr[0],tr[1],tr[2]); + path.c_str(), tr[0]/dd4hep::cm, tr[1]/dd4hep::cm, tr[2]/dd4hep::cm); a.worldTransformation().Print(); return; } @@ -150,8 +150,8 @@ static int AlignmentExample_align_telescope (Detector& description, int argc, ch } /// Let's change something: - Delta delta(Position(333.0,0,0)); - calib.set(calib.detector("/world/Telescope"),Delta(Position(55.0,0,0))); + Delta delta(Position(333.0/dd4hep::cm,0,0)); + calib.set(calib.detector("/world/Telescope"),Delta(Position(55.0/dd4hep::cm,0,0))); calib.set(calib.detector("/world/Telescope/module_1"),delta); calib.set("/world/Telescope/module_3",delta); /// Commit transaction and push deltas to the alignment conditions diff --git a/examples/ClientTests/CMakeLists.txt b/examples/ClientTests/CMakeLists.txt index 837267134..27cc4870b 100644 --- a/examples/ClientTests/CMakeLists.txt +++ b/examples/ClientTests/CMakeLists.txt @@ -193,7 +193,7 @@ dd4hep_add_test_reg( ClientTests_Save_ROOT_MiniTel_LONGTEST set(ClientTests_ShapeTests) list(APPEND ClientTests_ShapeTests Box Cone ConeSegment Tube ElTube CutTube Hyperboloid Paraboloid) list(APPEND ClientTests_ShapeTests EightPointSolid Eightpoint_Reflect_Volume Eightpoint_Reflect_DetElement) -list(APPEND ClientTests_ShapeTests Polycone Polyhedra PseudoTrap PseudoTrap2 Sphere Torus Trap Trd1 Trd2) +list(APPEND ClientTests_ShapeTests Polycone Polyhedra PseudoTrap PseudoTrap1 PseudoTrap2 Sphere Torus Trap Trd1 Trd2) list(APPEND ClientTests_ShapeTests TruncatedTube ExtrudedPolygon) # # diff --git a/examples/ClientTests/compact/Check_Shape_Box.xml b/examples/ClientTests/compact/Check_Shape_Box.xml index b1bef04f2..60e49babb 100644 --- a/examples/ClientTests/compact/Check_Shape_Box.xml +++ b/examples/ClientTests/compact/Check_Shape_Box.xml @@ -20,8 +20,8 @@ <detector id="1" name="Shape_Box" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="Box" dx="30*cm" dy="20*cm" dz="10*cm"/> - <position x="30" y="30" z="30"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="30*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Box.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Box_Reflect_DetElement.xml b/examples/ClientTests/compact/Check_Shape_Box_Reflect_DetElement.xml index 93072f411..e30f8aa3e 100644 --- a/examples/ClientTests/compact/Check_Shape_Box_Reflect_DetElement.xml +++ b/examples/ClientTests/compact/Check_Shape_Box_Reflect_DetElement.xml @@ -19,39 +19,39 @@ <detectors> <detector id="1" name="AssemblyDetector" parent="/world" type="DD4hep_VolumeAssembly" vis="ShapeGray_vis_50"> <envelope material="Air"> - <shape name="BiggerBox" type="Box" dx="100" dy="100" dz="100"/> + <shape name="BiggerBox" type="Box" dx="100*cm" dy="100*cm" dz="100*cm"/> </envelope> - <position x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="0*cm"/> <volume name="lvSmallerBox1" material="Air" vis="Shape1_vis"> - <shape type="Box" dx="5" dy="5" dz="5"/> + <shape type="Box" dx="5*cm" dy="5*cm" dz="5*cm"/> </volume> <volume name="lvSmallerBox2" material="Air" vis="Shape2_vis"> - <shape type="Box" dx="10" dy="10" dz="10"/> + <shape type="Box" dx="10*cm" dy="10*cm" dz="10*cm"/> </volume> <volume name="lvSmallerBox3" material="Air" vis="Shape3_vis"> - <shape type="Box" dx="20" dy="20" dz="20"/> + <shape type="Box" dx="20*cm" dy="20*cm" dz="20*cm"/> </volume> <physvol element="Smaller1" volume="lvSmallerBox1"> - <position x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="0*cm"/> </physvol> <physvol element="Smaller2" volume="lvSmallerBox2"> - <position x="-90" y="-90" z="-90"/> + <position x="-90*cm" y="-90*cm" z="-90*cm"/> </physvol> <physvol element="Smaller3" volume="lvSmallerBox3"> - <position x="80" y="80" z="80"/> + <position x="80*cm" y="80*cm" z="80*cm"/> </physvol> </detector> <detector id="2" name="AssemblyReflected_Z" type="DD4hep_ReflectedDetector" sdref="AssemblyDetector"> <reflect type="Z"/> - <position x="0" y="0" z="-200"/> + <position x="0*cm" y="0*cm" z="-200*cm"/> </detector> <detector id="3" name="AssemblyReflected_Y" type="DD4hep_ReflectedDetector" sdref="AssemblyDetector"> <reflect type="Y"/> - <position x="0" y="200" z="0"/> + <position x="0*cm" y="200*cm" z="0*cm"/> </detector> <detector id="4" name="AssemblyReflected_X" type="DD4hep_ReflectedDetector" sdref="AssemblyDetector"> <reflect type="X"/> - <position x="200" y="0" z="0"/> + <position x="200*cm" y="0*cm" z="0*cm"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Cone.xml b/examples/ClientTests/compact/Check_Shape_Cone.xml index da1f3d014..b03804507 100644 --- a/examples/ClientTests/compact/Check_Shape_Cone.xml +++ b/examples/ClientTests/compact/Check_Shape_Cone.xml @@ -20,8 +20,8 @@ <detector id="1" name="Shape_Cone" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="Cone" rmin1="10*cm" rmax1="30*cm" rmin2="50*cm" rmax2="60*cm" z="40*cm"/> - <position x="30" y="30" z="30"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="30*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Cone.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_ConeSegment.xml b/examples/ClientTests/compact/Check_Shape_ConeSegment.xml index 7f9061673..73f6397e0 100644 --- a/examples/ClientTests/compact/Check_Shape_ConeSegment.xml +++ b/examples/ClientTests/compact/Check_Shape_ConeSegment.xml @@ -21,12 +21,12 @@ <check vis="Shape1_vis"> <shape type="ConeSegment" rmin1="10*cm" rmax1="30*cm" rmin2="15*cm" rmax2="60*cm" dz="40*cm" phi1="0*rad" phi2="7./8.*pi*rad"/> <position x="30*cm" y="30*cm" z="30*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <check vis="Shape2_vis"> <shape type="ConeSegment" rmin1="10*cm" rmax1="30*cm" rmin2="15*cm" rmax2="60*cm" dz="40*cm" phi1="pi/5.*rad" phi2="1./8.*pi*rad"/> <position x="30*cm" y="30*cm" z="-80*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_ConeSegment.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_CutTube.xml b/examples/ClientTests/compact/Check_Shape_CutTube.xml index b6abfc959..9076b42df 100644 --- a/examples/ClientTests/compact/Check_Shape_CutTube.xml +++ b/examples/ClientTests/compact/Check_Shape_CutTube.xml @@ -23,8 +23,8 @@ lx="5*cm" ly="5*cm" lz="5*cm" tx="8*cm" ty="15*cm" tz="6*cm" phi1="0" phi2="pi"/> - <position x="30" y="30" z="50"/> - <rotation x="0" y="pi/4" z="0"/> + <position x="30*cm" y="30*cm" z="50*cm"/> + <rotation x="0*rad" y="pi/4*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_CutTube.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_EightPointSolid.xml b/examples/ClientTests/compact/Check_Shape_EightPointSolid.xml index 3416f93df..b36098371 100644 --- a/examples/ClientTests/compact/Check_Shape_EightPointSolid.xml +++ b/examples/ClientTests/compact/Check_Shape_EightPointSolid.xml @@ -29,8 +29,8 @@ <vertex x="-23*cm" y=" 27*cm"/> <vertex x=" 13*cm" y="-27*cm"/> </shape> - <position x="0" y="0" z="0"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="0*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_EightPointSolid.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_DetElement.xml b/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_DetElement.xml index 09d4b94cb..3d54f6ae0 100644 --- a/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_DetElement.xml +++ b/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_DetElement.xml @@ -29,8 +29,8 @@ <vertex x="-23*cm" y=" 27*cm"/> <vertex x=" 13*cm" y="-27*cm"/> </shape> - <position x="0" y="0" z="100"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="100*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <reflect vis="Shape2_vis"/> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Eightpoint_Reflect_DetElement.txt" create="CheckShape_create"/> diff --git a/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Volume.xml b/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Volume.xml index f7b7c9351..ffd60593c 100644 --- a/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Volume.xml +++ b/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Volume.xml @@ -29,8 +29,8 @@ <vertex x="-23*cm" y=" 27*cm"/> <vertex x=" 13*cm" y="-27*cm"/> </shape> - <position x="0" y="0" z="100"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="100*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <check vis="Shape2_vis"> <shape type="EightPointSolid" dz="30*cm"> @@ -43,8 +43,8 @@ <vertex x="-23*cm" y=" 27*cm"/> <vertex x=" 13*cm" y="-27*cm"/> </shape> - <position x="0" y="0" z="-100"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="-100*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> <reflect/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Eightpoint_Reflect_Volume.txt" create="CheckShape_create"/> diff --git a/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Z.xml b/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Z.xml index ca519744b..8a9079580 100644 --- a/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Z.xml +++ b/examples/ClientTests/compact/Check_Shape_Eightpoint_Reflect_Z.xml @@ -45,8 +45,8 @@ <vertex x="-23*cm" y=" 27*cm"/> <vertex x=" 13*cm" y="-27*cm"/> </shape> - <position x="0" y="0" z="-100"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="-100*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> <reflect_z/> </check> <testnot type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Eightpoint_Reflect_Z.txt" create="1" a="CheckShape_create"/> diff --git a/examples/ClientTests/compact/Check_Shape_ElTube.xml b/examples/ClientTests/compact/Check_Shape_ElTube.xml index 8e9cc3c42..abebcd53d 100644 --- a/examples/ClientTests/compact/Check_Shape_ElTube.xml +++ b/examples/ClientTests/compact/Check_Shape_ElTube.xml @@ -20,8 +20,8 @@ <detector id="1" name="Shape_ElTube" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="EllipticalTube" a="10*cm" b="30*cm" dz="50*cm"/> - <position x="30" y="30" z="50"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="50*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_ElTube.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Hyperboloid.xml b/examples/ClientTests/compact/Check_Shape_Hyperboloid.xml index 8882b0e86..acf03b8d7 100644 --- a/examples/ClientTests/compact/Check_Shape_Hyperboloid.xml +++ b/examples/ClientTests/compact/Check_Shape_Hyperboloid.xml @@ -19,9 +19,9 @@ <detectors> <detector id="1" name="Shape_Hyperboloid" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> - <shape type="Hyperboloid" rmin="10*cm" rmax="30*cm" dz="50*cm" inner_stereo="pi/5" outer_stereo="pi/4"/> + <shape type="Hyperboloid" rmin="10*cm" rmax="30*cm" dz="50*cm" inner_stereo="pi/5*rad" outer_stereo="pi/4*rad"/> <position x="30*cm" y="30*cm" z="30*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Hyperboloid.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Paraboloid.xml b/examples/ClientTests/compact/Check_Shape_Paraboloid.xml index 930e89ef3..3ed0f8007 100644 --- a/examples/ClientTests/compact/Check_Shape_Paraboloid.xml +++ b/examples/ClientTests/compact/Check_Shape_Paraboloid.xml @@ -21,7 +21,7 @@ <check vis="Shape1_vis"> <shape type="Paraboloid" rmin="10*cm" rmax="30*cm" dz="50*cm"/> <position x="30*cm" y="30*cm" z="30*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Paraboloid.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Polycone.xml b/examples/ClientTests/compact/Check_Shape_Polycone.xml index d1306f7e0..0012ded65 100644 --- a/examples/ClientTests/compact/Check_Shape_Polycone.xml +++ b/examples/ClientTests/compact/Check_Shape_Polycone.xml @@ -31,8 +31,8 @@ <zplane z="80*cm" rmin="40*cm" rmax="80*cm"/> <zplane z="90*cm" rmin="10*cm" rmax="50*cm"/> </shape> - <position x="30" y="30" z="30"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="30*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Polycone.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Polyhedra.xml b/examples/ClientTests/compact/Check_Shape_Polyhedra.xml index d8ff0ffc0..7a6987218 100644 --- a/examples/ClientTests/compact/Check_Shape_Polyhedra.xml +++ b/examples/ClientTests/compact/Check_Shape_Polyhedra.xml @@ -25,7 +25,7 @@ <plane rmin="1851.5*mm" rmax="1851.5*mm" z="3215.42*mm"/> </shape> <position x="30*cm" y="30*cm" z="50*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Polyhedra.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_PseudoTrap.xml b/examples/ClientTests/compact/Check_Shape_PseudoTrap.xml index 2efbd1105..62a9b70a8 100644 --- a/examples/ClientTests/compact/Check_Shape_PseudoTrap.xml +++ b/examples/ClientTests/compact/Check_Shape_PseudoTrap.xml @@ -23,14 +23,14 @@ <shape type="PseudoTrap" z="30*cm" radius="-40*cm" x1="33*cm" x2="3*cm" y1="30*cm" y2="10*cm" minusZ="true"/> <position x="30*cm" y="30*cm" z="50*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <!-- Intersection pseudo-trap --> <check vis="Shape2_vis"> <shape type="PseudoTrap" z="30*cm" radius="30*cm" x1="3*cm" x2="30*cm" y1="30*cm" y2="10*cm" minusZ="false"/> <position x="30*cm" y="30*cm" z="-50*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <!-- Creates a different mesh on different platforms. @@ -38,10 +38,9 @@ <shape type="PseudoTrap" z="30*cm" radius="5*cm" x1="3*cm" x2="10*cm" y1="30*cm" y2="10*cm" minusZ="true"/> <position x="30*cm" y="30*cm" z="-50*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> --> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_PseudoTrap.txt" create="CheckShape_create"/> </detector> </detectors> diff --git a/examples/ClientTests/compact/Check_Shape_PseudoTrap1.xml b/examples/ClientTests/compact/Check_Shape_PseudoTrap1.xml new file mode 100644 index 000000000..b3eba9b8a --- /dev/null +++ b/examples/ClientTests/compact/Check_Shape_PseudoTrap1.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<lccdd> +<!-- #========================================================================== + # AIDA Detector description implementation + #========================================================================== + # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) + # All rights reserved. + # + # For the licensing terms see $DD4hepINSTALL/LICENSE. + # For the list of contributors see $DD4hepINSTALL/doc/CREDITS. + # + #========================================================================== +--> + + <includes> + <gdmlFile ref="CheckShape.xml"/> + </includes> + + <detectors> + <detector id="1" name="Shape_PseudoTrap" type="DD4hep_TestShape_Creator"> + <!-- Union pseudo-trap: --> + <check vis="Shape1_vis"> + <shape type="PseudoTrap" name="YE1_b" + x1="0.5*m" x2="1.86356*m" + y1="0.3000*m" y2="0.3000*m" + z="0.92934*m" radius="-0.91350*m" minusZ="true"/> + <position x="0*cm" y="0*cm" z="0*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> + </check> + <testn type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_PseudoTrap1.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_PseudoTrap1.txt" create="1"/> + </detector> + </detectors> +</lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_PseudoTrap2.xml b/examples/ClientTests/compact/Check_Shape_PseudoTrap2.xml index 9d742586f..bf798dcdf 100644 --- a/examples/ClientTests/compact/Check_Shape_PseudoTrap2.xml +++ b/examples/ClientTests/compact/Check_Shape_PseudoTrap2.xml @@ -18,38 +18,40 @@ <detectors> <detector id="1" name="Shape_PseudoTrap" type="DD4hep_TestShape_Creator"> - <!-- Union pseudo-trap: --> + <!-- Union pseudo-trap: <check vis="Shape1_vis"> <shape type="PseudoTrap" name="YE1_b" - x1="0.5*m" x2="1.86356*m" + x1="0.5*m" x2="1.86356*m" y1="0.3000*m" y2="0.3000*m" z="0.92934*m" radius="-0.91350*m" minusZ="true"/> - <position x="0*cm" y="0*cm" z="0*cm"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="0*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> + --> <check vis="Shape2_vis"> <shape type="PseudoTrap" name="YE1_c" x1="0.293734*m" x2="0.86356*m" y1="0.3000*m" y2="0.9000*m" z="0.92934*m" radius="-1.1350*m" minusZ="false"/> - <position x="400*cm" y="180*cm" z="0*cm"/> - <rotation x="pi/2" y="0" z="0"/> + <position x="400*cm" y="180*cm" z="0*cm"/> + <rotation x="pi/2*rad" y="0*rad" z="0*rad"/> </check> <check vis="Shape3_vis"> <shape type="PseudoTrap" name="YE1_d" x1="0.293734*m" x2="0.86356*m" y1="0.3000*m" y2="0.9000*m" z="0.92934*m" radius="1.1350*m" minusZ="false"/> - <position x="-300*cm" y="-180*cm" z="0*cm"/> - <rotation x="0" y="pi/2" z="pi"/> + <position x="-300*cm" y="-180*cm" z="0*cm"/> + <rotation x="0*rad" y="pi/2*rad" z="pi*rad"/> </check> <check vis="Shape4_vis"> <shape type="PseudoTrap" name="YE1_CMS" x1="0.293734*m" x2="1.86356*m" y1="0.3000*m" y2="0.3000*m" z="2.92934*m" radius="-1.1350*m" minusZ="true"/> - <position x="0*cm" y="330*cm" z="0*cm"/> - <rotation x="pi" y="0" z="0"/> + <position x="0*cm" y="330*cm" z="0*cm"/> + <rotation x="pi*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_PseudoTrap2.txt" create="CheckShape_create"/> + <testn type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_PseudoTrap2.txt" create="1"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_PseudoTrap3.xml b/examples/ClientTests/compact/Check_Shape_PseudoTrap3.xml index c29386325..5a9defc33 100644 --- a/examples/ClientTests/compact/Check_Shape_PseudoTrap3.xml +++ b/examples/ClientTests/compact/Check_Shape_PseudoTrap3.xml @@ -36,7 +36,7 @@ y1="30*cm" y2="10*cm" z="30*cm" radius="3*cm" minusZ="false"/> <position x="-40*cm" y="-10*cm" z="0*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <!-- <PseudoTrap name="ptrap2" dx1="10*cm" dx2="3*cm" dy1="30*cm" dy2="10*cm" dz="30*cm" radius="10*cm" atMinusZ="true"/> --> <check vis="Shape2_vis"> @@ -45,7 +45,7 @@ y1="30*cm" y2="10*cm" z="30*cm" radius="10*cm" minusZ="true"/> <position x="-10*cm" y="-10*cm" z="0*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <!-- <PseudoTrap name="ptrap3" dx1="10*cm" dx2="3*cm" dy1="30*cm" dy2="10*cm" dz="30*cm" radius="-10*cm" atMinusZ="false"/> --> @@ -54,8 +54,8 @@ x1="10*cm" x2="3*cm" y1="30*cm" y2="10*cm" z="30*cm" radius="-3*cm" minusZ="false"/> - <position x="20*cm" y="-10*cm" z="0*cm"/> - <rotation x="0" y="0" z="0"/> + <position x="20*cm" y="-10*cm" z="0*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <!-- <PseudoTrap name="ptrap4" dx1="10*cm" dx2="3*cm" dy1="30*cm" dy2="10*cm" dz="30*cm" radius="-10*cm" atMinusZ="true"/> --> <check vis="Shape4_vis"> @@ -64,20 +64,20 @@ y1="30*cm" y2="10*cm" z="30*cm" radius="-10*cm" minusZ="true"/> <position x="50*cm" y="-10*cm" z="0*cm"/> - <rotation x="0" y="0" z="0"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <check vis="Shape4_vis"> <shape type="PseudoTrap" name="ptrap4" x1="10*cm" x2="3*cm" y1="30*cm" y2="10*cm" z="30*cm" radius="-30*cm" minusZ="true"/> - <position x="80*cm" y="-10*cm" z="0*cm"/> - <rotation x="0" y="0" z="0"/> + <position x="80*cm" y="-10*cm" z="0*cm"/> + <rotation x="0" y="0" z="0*rad"/> </check> <check vis="Shape1_grey"> <shape type="Box" name="plane" dx="80*cm" dy="50*cm" dz="0.0001*cm"/> - <position x="20*cm" y="0*cm" z="-30*cm"/> - <rotation x="0" y="0" z="0"/> + <position x="20*cm" y="0*cm" z="-30*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_PseudoTrap3.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Scaled_Cone.xml b/examples/ClientTests/compact/Check_Shape_Scaled_Cone.xml index 3aacbbc8d..2a5185815 100644 --- a/examples/ClientTests/compact/Check_Shape_Scaled_Cone.xml +++ b/examples/ClientTests/compact/Check_Shape_Scaled_Cone.xml @@ -24,15 +24,15 @@ <shape type="Scale" x="1.0" y="0.3" z="1.0"> <shape type="Cone" rmin1="5*cm" rmax1="30*cm" rmin2="20*cm" rmax2="90*cm" z="40*cm"/> </shape> - <position x="0" y="0*cm" z="50*cm"/> - <rotation x="-0.1" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="50*cm"/> + <rotation x="-0.1*rad" y="0*rad" z="0*rad"/> </check> <check id="2" vis="Shape2_vis"> <shape type="Scale" x="0.6" y="0.4" z="1.0"> <shape type="Cone" rmin1="5*cm" rmax1="30*cm" rmin2="20*cm" rmax2="90*cm" z="40*cm"/> </shape> - <position x="0*cm" y="-50*cm" z="0*cm"/> - <rotation x="1" y="0" z="0"/> + <position x="0*cm" y="-50*cm" z="0*cm"/> + <rotation x="1*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Scaled_Cone.txt" create="CheckShape_create"/> <testn type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Scaled_Cone.txt" create="1"/> diff --git a/examples/ClientTests/compact/Check_Shape_Sphere.xml b/examples/ClientTests/compact/Check_Shape_Sphere.xml index 59eed9848..50785732a 100644 --- a/examples/ClientTests/compact/Check_Shape_Sphere.xml +++ b/examples/ClientTests/compact/Check_Shape_Sphere.xml @@ -19,9 +19,9 @@ <detectors> <detector id="1" name="Shape_Sphere" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> - <shape type="Sphere" rmin="10*cm" rmax="30*cm" theta="0.1" deltatheta="pi*rad-0.2" phi="0" deltaphi="3/4*pi"/> - <position x="30" y="30" z="30"/> - <rotation x="0" y="0" z="0"/> + <shape type="Sphere" rmin="10*cm" rmax="30*cm" theta="0.1" deltatheta="pi*rad-0.2" phi="0*rad" deltaphi="3/4*pi*rad"/> + <position x="30*cm" y="30*cm" z="30*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Sphere.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Tessellated.xml b/examples/ClientTests/compact/Check_Shape_Tessellated.xml index d219e6f63..498759a98 100644 --- a/examples/ClientTests/compact/Check_Shape_Tessellated.xml +++ b/examples/ClientTests/compact/Check_Shape_Tessellated.xml @@ -23,190 +23,190 @@ <detector id="1" name="Shape_Tessellated" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="TessellatedSolid"> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="-1"/> - <vertex x="0" y="0.5 * (-1 + sqrt5)" z="0.5 * (-1 - sqrt5)"/> - <vertex x="-1" y="0" z="0.5 * (-1 - sqrt5)"/> - <vertex x="-1" y="1" z="-1"/> - - <vertex x="1" y="1" z="-1"/> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="-1"/> - <vertex x="0" y="0.5 * (-1 + sqrt5)" z="0.5 * (-1 - sqrt5)"/> - <vertex x="1" y="0" z="0.5 * (-1 - sqrt5)"/> - - <vertex x="1" y="1" z="-1"/> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="-1"/> - <vertex x="0.5 * (-1 + sqrt5)" y="0.5 * (1 + sqrt5)" z="0"/> - <vertex x="0.5 * (1 + sqrt5)" y="1" z="0"/> - - <vertex x="0.5 * (1 - sqrt5)" y="0.5 * (1 + sqrt5)" z="0"/> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="-1"/> - <vertex x="0.5 * (-1 + sqrt5)" y="0.5 * (1 + sqrt5)" z="0"/> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="1"/> - - <vertex x="0.5 * (1 - sqrt5)" y="0.5 * (1 + sqrt5)" z="0"/> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="-1"/> - <vertex x="-1" y="1" z="-1"/> - <vertex x="0.5 * (-1 - sqrt5)" y="1" z="0"/> - - <vertex x="1" y="1" z="-1"/> - <vertex x="0.5 * (1 + sqrt5)" y="1" z="0"/> - <vertex x="0.5 * (1 + sqrt5)" y="0" z="0.5 * (1 - sqrt5)"/> - <vertex x="1" y="0" z="0.5 * (-1 - sqrt5)"/> - - <vertex x="0.5 * (1 + sqrt5)" y="0" z="0.5 * (1 - sqrt5)"/> - <vertex x="0.5 * (1 + sqrt5)" y="-1" z="0"/> - <vertex x="1" y="-1" z="-1"/> - <vertex x="1" y="0" z="0.5 * (-1 - sqrt5)"/> - - <vertex x="1" y="-1" z="-1"/> - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="-1"/> - <vertex x="0" y="0.5 * (1 - sqrt5)" z="0.5 * (-1 - sqrt5)"/> - <vertex x="1" y="0" z="0.5 * (-1 - sqrt5)"/> - - <vertex x="1" y="0" z="0.5 * (-1 - sqrt5)"/> - <vertex x="0" y="0.5 * (-1 + sqrt5)" z="0.5 * (-1 - sqrt5)"/> - <vertex x="-1" y="0" z="0.5 * (-1 - sqrt5)"/> - <vertex x="0" y="0.5 * (1 - sqrt5)" z="0.5 * (-1 - sqrt5)"/> - - <vertex x="0.5 * (-1 + sqrt5)" y="0.5 * (1 + sqrt5)" z="0"/> - <vertex x="0.5 * (1 + sqrt5)" y="1" z="0"/> - <vertex x="1" y="1" z="1"/> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="1"/> - - <vertex x="0.5 * (1 + sqrt5)" y="1" z="0"/> - <vertex x="1" y="1" z="1"/> - <vertex x="1" y="0" z="0.5 * (1 + sqrt5)"/> - <vertex x="0.5 * (1 + sqrt5)" y="0" z="0.5 * (-1 + sqrt5)"/> - - <vertex x="0.5 * (1 + sqrt5)" y="0" z="0.5 * (1 - sqrt5)"/> - <vertex x="0.5 * (1 + sqrt5)" y="1" z="0"/> - <vertex x="0.5 * (1 + sqrt5)" y="0" z="0.5 * (-1 + sqrt5)"/> - <vertex x="0.5 * (1 + sqrt5)" y="-1" z="0"/> - - <vertex x="0.5 * (1 - sqrt5)" y="0.5 * (1 + sqrt5)" z="0"/> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="1"/> - <vertex x="-1" y="1" z="1"/> - <vertex x="0.5 * (-1 - sqrt5)" y="1" z="0"/> - - <vertex x="0" y="0.5 * (1 + sqrt5)" z="1"/> - <vertex x="0" y="0.5 * (-1 + sqrt5)" z="0.5 * (1 + sqrt5)"/> - <vertex x="-1" y="0" z="0.5 * (1 + sqrt5)"/> - <vertex x="-1" y="1" z="1"/> - - <vertex x="1" y="1" z="1"/> - <vertex x="0" y="0.5 * (1 + sqrt5)" z="1"/> - <vertex x="0" y="0.5 * (-1 + sqrt5)" z="0.5 * (1 + sqrt5)"/> - <vertex x="1" y="0" z="0.5 * (1 + sqrt5)"/> - - <vertex x="0" y="0.5 * (1 - sqrt5)" z="0.5 * (1 + sqrt5)"/> - <vertex x="-1" y="0" z="0.5 * (1 + sqrt5)"/> - <vertex x="0" y="0.5 * (-1 + sqrt5)" z="0.5 * (1 + sqrt5)"/> - <vertex x="1" y="0" z="0.5 * (1 + sqrt5)"/> - - <vertex x="0" y="0.5 * (1 - sqrt5)" z="0.5 * (1 + sqrt5)"/> - <vertex x="1" y="0" z="0.5 * (1 + sqrt5)"/> - <vertex x="1" y="-1" z="1"/> - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="1"/> - - <vertex x="0.5 * (1 + sqrt5)" y="0" z="0.5 * (-1 + sqrt5)"/> - <vertex x="0.5 * (1 + sqrt5)" y="-1" z="0"/> - <vertex x="1" y="-1" z="1"/> - <vertex x="1" y="0" z="0.5 * (1 + sqrt5)"/> - - <vertex x="-1" y="0" z="0.5 * (1 + sqrt5)"/> - <vertex x="-1" y="1" z="1"/> - <vertex x="0.5 * (-1 - sqrt5)" y="1" z="0"/> - <vertex x="0.5 * (-1 - sqrt5)" y="0" z="0.5 * (-1 + sqrt5)"/> - - <vertex x="-1" y="-1" z="1"/> - <vertex x="-1" y="0" z="0.5 * (1 + sqrt5)"/> - <vertex x="0.5 * (-1 - sqrt5)" y="0" z="0.5 * (-1 + sqrt5)"/> - <vertex x="0.5 * (-1 - sqrt5)" y="-1" z="0"/> - - <vertex x="0" y="0.5 * (1 - sqrt5)" z="0.5 * (1 + sqrt5)"/> - <vertex x="-1" y="0" z="0.5 * (1 + sqrt5)"/> - <vertex x="-1" y="-1" z="1"/> - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="1"/> - - <vertex x="0.5 * (-1 - sqrt5)" y="-1" z="0"/> - <vertex x="0.5 * (-1 - sqrt5)" y="0" z="0.5 * (1 - sqrt5)"/> - <vertex x="0.5 * (-1 - sqrt5)" y="1" z="0"/> - <vertex x="0.5 * (-1 - sqrt5)" y="0" z="0.5 * (-1 + sqrt5)"/> - - <vertex x="0.5 * (-1 - sqrt5)" y="-1" z="0"/> - <vertex x="0.5 * (-1 - sqrt5)" y="0" z="0.5 * (1 - sqrt5)"/> - <vertex x="-1" y="0" z="0.5 * (-1 - sqrt5)"/> - <vertex x="-1" y="-1" z="-1"/> - - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="-1"/> - <vertex x="0.5 * (1 - sqrt5)" y="0.5 * (-1 - sqrt5)" z="0"/> - <vertex x="0.5 * (-1 - sqrt5)" y="-1" z="0"/> - <vertex x="-1" y="-1" z="-1"/> - - <vertex x="0.5 * (1 - sqrt5)" y="0.5 * (-1 - sqrt5)" z="0"/> - <vertex x="0.5 * (-1 - sqrt5)" y="-1" z="0"/> - <vertex x="-1" y="-1" z="1"/> - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="1"/> - - <vertex x="-1" y="1" z="-1"/> - <vertex x="-1" y="0" z="0.5 * (-1 - sqrt5)"/> - <vertex x="0.5 * (-1 - sqrt5)" y="0" z="0.5 * (1 - sqrt5)"/> - <vertex x="0.5 * (-1 - sqrt5)" y="1" z="0"/> - - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="-1"/> - <vertex x="0" y="0.5 * (1 - sqrt5)" z="0.5 * (-1 - sqrt5)"/> - <vertex x="-1" y="0" z="0.5 * (-1 - sqrt5)"/> - <vertex x="-1" y="-1" z="-1"/> - - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="-1"/> - <vertex x="0.5 * (1 - sqrt5)" y="0.5 * (-1 - sqrt5)" z="0"/> - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="1"/> - <vertex x="0.5 * (-1 + sqrt5)" y="0.5 * (-1 - sqrt5)" z="0"/> - - <vertex x="1" y="-1" z="-1"/> - <vertex x="0.5 * (1 + sqrt5)" y="-1" z="0"/> - <vertex x="0.5 * (-1 + sqrt5)" y="0.5 * (-1 - sqrt5)" z="0"/> - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="-1"/> - - <vertex x="0.5 * (1 + sqrt5)" y="-1" z="0"/> - <vertex x="1" y="-1" z="1"/> - <vertex x="0" y="0.5 * (-1 - sqrt5)" z="1"/> - <vertex x="0.5 * (-1 + sqrt5)" y="0.5 * (-1 - sqrt5)" z="0"/> - - <facet v0="0" v1="1" v2="2" v3="3"/> - <facet v0="4" v1="7" v2="6" v3="5"/> - <facet v0="8" v1="9" v2="10" v3="11"/> - <facet v0="12" v1="15" v2="14" v3="13"/> - <facet v0="16" v1="17" v2="18" v3="19"/> - <facet v0="20" v1="21" v2="22" v3="23"/> - <facet v0="24" v1="25" v2="26" v3="27"/> - <facet v0="28" v1="29" v2="30" v3="31"/> - <facet v0="32" v1="35" v2="34" v3="33"/> - <facet v0="36" v1="39" v2="38" v3="37"/> - <facet v0="40" v1="41" v2="42" v3="43"/> - <facet v0="44" v1="45" v2="46" v3="47"/> - <facet v0="48" v1="51" v2="50" v3="49"/> - <facet v0="52" v1="55" v2="54" v3="53"/> - <facet v0="56" v1="57" v2="58" v3="59"/> - <facet v0="60" v1="63" v2="62" v3="61"/> - <facet v0="64" v1="67" v2="66" v3="65"/> - <facet v0="68" v1="71" v2="70" v3="69"/> - <facet v0="72" v1="73" v2="74" v3="75"/> - <facet v0="76" v1="77" v2="78" v3="79"/> - <facet v0="80" v1="81" v2="82" v3="83"/> - <facet v0="84" v1="87" v2="86" v3="85"/> - <facet v0="88" v1="89" v2="90" v3="91"/> - <facet v0="92" v1="93" v2="94" v3="95"/> - <facet v0="96" v1="99" v2="98" v3="97"/> - <facet v0="100" v1="101" v2="102" v3="103"/> - <facet v0="104" v1="107" v2="106" v3="105"/> - <facet v0="108" v1="111" v2="110" v3="109"/> - <facet v0="112" v1="113" v2="114" v3="115"/> - <facet v0="116" v1="117" v2="118" v3="119"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="-1*cm"/> + <vertex x="0 * cm" y="0.5 * (-1 + sqrt5)" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="-1 * cm" y="1 * cm" z="-1 * cm"/> + + <vertex x="1 * cm" y="1 * cm" z="-1 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="-1 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 + sqrt5) * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + + <vertex x="1 * cm" y="1 * cm" z="-1 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="-1 * cm"/> + <vertex x="0.5 * (-1 + sqrt5) * cm" y="0.5 * (1 + sqrt5) * cm" z="0 * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="1 * cm" z="0 * cm"/> + + <vertex x="0.5 * (1 - sqrt5) * cm" y="0.5 * (1 + sqrt5) * cm" z="0 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="-1 * cm"/> + <vertex x="0.5 * (-1 + sqrt5) * cm" y="0.5 * (1 + sqrt5) * cm" z="0 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="1 * cm"/> + + <vertex x="0.5 * (1 - sqrt5) * cm" y="0.5 * (1 + sqrt5) * cm" z="0 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="-1 * cm"/> + <vertex x="-1 * cm" y="1 * cm" z="-1 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="1 * cm" z="0 * cm"/> + + <vertex x="1 * cm" y="1 * cm" z="-1 * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="1 * cm" z="0 * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="0 * cm" z="0.5 * (1 - sqrt5) * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + + <vertex x="0.5 * (1 + sqrt5) * cm" y="0 * cm" z="0.5 * (1 - sqrt5) * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + <vertex x="1 * cm" y="-1 * cm" z="-1 * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + + <vertex x="1 * cm" y="-1 * cm" z="-1 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="-1 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 - sqrt5) * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + + <vertex x="1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 + sqrt5) * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="0 * cm" y="0.5 * (1 - sqrt5) * cm" z="0.5 * (-1 - sqrt5) * cm"/> + + <vertex x="0.5 * (-1 + sqrt5) * cm" y="0.5 * (1 + sqrt5) * cm" z="0 * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="1 * cm" z="0 * cm"/> + <vertex x="1 * cm" y="1 * cm" z="1 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="1 * cm"/> + + <vertex x="0.5 * (1 + sqrt5) * cm" y="1 * cm" z="0 * cm"/> + <vertex x="1 * cm" y="1 * cm" z="1 * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="0 * cm" z="0.5 * (-1 + sqrt5) * cm"/> + + <vertex x="0.5 * (1 + sqrt5) * cm" y="0 * cm" z="0.5 * (1 - sqrt5) * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="1 * cm" z="0 * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="0 * cm" z="0.5 * (-1 + sqrt5) * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + + <vertex x="0.5 * (1 - sqrt5) * cm" y="0.5 * (1 + sqrt5) * cm" z="0 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="1 * cm"/> + <vertex x="-1 * cm" y="1 * cm" z="1 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="1 * cm" z="0 * cm"/> + + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="1 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 + sqrt5) * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="-1 * cm" y="1 * cm" z="1 * cm"/> + + <vertex x="1 * cm" y="1 * cm" z="1 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 + sqrt5) * cm" z="1 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 + sqrt5) * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + + <vertex x="0 * cm" y="0.5 * (1 - sqrt5) * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 + sqrt5) * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + + <vertex x="0 * cm" y="0.5 * (1 - sqrt5) * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="1 * cm" y="-1 * cm" z="1 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="1 * cm"/> + + <vertex x="0.5 * (1 + sqrt5) * cm" y="0 * cm" z="0.5 * (-1 + sqrt5) * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + <vertex x="1 * cm" y="-1 * cm" z="1 * cm"/> + <vertex x="1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="-1 * cm" y="1 * cm" z="1 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="1 * cm" z="0 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="0 * cm" z="0.5 * (-1 + sqrt5) * cm"/> + + <vertex x="-1 * cm" y="-1 * cm" z="1 * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="0 * cm" z="0.5 * (-1 + sqrt5) * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + + <vertex x="0 * cm" y="0.5 * (1 - sqrt5) * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (1 + sqrt5) * cm"/> + <vertex x="-1 * cm" y="-1 * cm" z="1 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="1 * cm"/> + + <vertex x="0.5 * (-1 - sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="0 * cm" z="0.5 * (1 - sqrt5) * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="1 * cm" z="0 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="0 * cm" z="0.5 * (-1 + sqrt5) * cm"/> + + <vertex x="0.5 * (-1 - sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="0 * cm" z="0.5 * (1 - sqrt5) * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="-1 * cm" y="-1 * cm" z="-1 * cm"/> + + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="-1 * cm"/> + <vertex x="0.5 * (1 - sqrt5) * cm" y="0.5 * (-1 - sqrt5) * cm" z="0 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + <vertex x="-1 * cm" y="-1 * cm" z="-1 * cm"/> + + <vertex x="0.5 * (1 - sqrt5) * cm" y="0.5 * (-1 - sqrt5) * cm" z="0 * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + <vertex x="-1 * cm" y="-1 * cm" z="1 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="1 * cm"/> + + <vertex x="-1 * cm" y="1 * cm" z="-1 * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="0 * cm" z="0.5 * (1 - sqrt5) * cm"/> + <vertex x="0.5 * (-1 - sqrt5) * cm" y="1 * cm" z="0 * cm"/> + + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="-1 * cm"/> + <vertex x="0 * cm" y="0.5 * (1 - sqrt5) * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="-1 * cm" y="0 * cm" z="0.5 * (-1 - sqrt5) * cm"/> + <vertex x="-1 * cm" y="-1 * cm" z="-1 * cm"/> + + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="-1 * cm"/> + <vertex x="0.5 * (1 - sqrt5) * cm" y="0.5 * (-1 - sqrt5) * cm" z="0 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="1 * cm"/> + <vertex x="0.5 * (-1 + sqrt5) * cm" y="0.5 * (-1 - sqrt5) * cm" z="0 * cm"/> + + <vertex x="1 * cm" y="-1 * cm" z="-1 * cm"/> + <vertex x="0.5 * (1 + sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + <vertex x="0.5 * (-1 + sqrt5) * cm" y="0.5 * (-1 - sqrt5) * cm" z="0 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="-1 * cm"/> + + <vertex x="0.5 * (1 + sqrt5) * cm" y="-1 * cm" z="0 * cm"/> + <vertex x="1 * cm" y="-1 * cm" z="1 * cm"/> + <vertex x="0 * cm" y="0.5 * (-1 - sqrt5) * cm" z="1 * cm"/> + <vertex x="0.5 * (-1 + sqrt5) * cm" y="0.5 * (-1 - sqrt5) * cm" z="0 * cm"/> + + <facet v0="0 * cm" v1="1 * cm" v2="2 * cm" v3="3 * cm"/> + <facet v0="4 * cm" v1="7 * cm" v2="6 * cm" v3="5 * cm"/> + <facet v0="8 * cm" v1="9 * cm" v2="10 * cm" v3="11 * cm"/> + <facet v0="12 * cm" v1="15 * cm" v2="14 * cm" v3="13 * cm"/> + <facet v0="16 * cm" v1="17 * cm" v2="18 * cm" v3="19 * cm"/> + <facet v0="20 * cm" v1="21 * cm" v2="22 * cm" v3="23 * cm"/> + <facet v0="24 * cm" v1="25 * cm" v2="26 * cm" v3="27 * cm"/> + <facet v0="28 * cm" v1="29 * cm" v2="30 * cm" v3="31 * cm"/> + <facet v0="32 * cm" v1="35 * cm" v2="34 * cm" v3="33 * cm"/> + <facet v0="36 * cm" v1="39 * cm" v2="38 * cm" v3="37 * cm"/> + <facet v0="40 * cm" v1="41 * cm" v2="42 * cm" v3="43 * cm"/> + <facet v0="44 * cm" v1="45 * cm" v2="46 * cm" v3="47 * cm"/> + <facet v0="48 * cm" v1="51 * cm" v2="50 * cm" v3="49 * cm"/> + <facet v0="52 * cm" v1="55 * cm" v2="54 * cm" v3="53 * cm"/> + <facet v0="56 * cm" v1="57 * cm" v2="58 * cm" v3="59 * cm"/> + <facet v0="60 * cm" v1="63 * cm" v2="62 * cm" v3="61 * cm"/> + <facet v0="64 * cm" v1="67 * cm" v2="66 * cm" v3="65 * cm"/> + <facet v0="68 * cm" v1="71 * cm" v2="70 * cm" v3="69 * cm"/> + <facet v0="72 * cm" v1="73 * cm" v2="74 * cm" v3="75 * cm"/> + <facet v0="76 * cm" v1="77 * cm" v2="78 * cm" v3="79 * cm"/> + <facet v0="80 * cm" v1="81 * cm" v2="82 * cm" v3="83 * cm"/> + <facet v0="84 * cm" v1="87 * cm" v2="86 * cm" v3="85 * cm"/> + <facet v0="88 * cm" v1="89 * cm" v2="90 * cm" v3="91 * cm"/> + <facet v0="92 * cm" v1="93 * cm" v2="94 * cm" v3="95 * cm"/> + <facet v0="96 * cm" v1="99 * cm" v2="98 * cm" v3="97 * cm"/> + <facet v0="100 * cm" v1="101 * cm" v2="102 * cm" v3="103 * cm"/> + <facet v0="104 * cm" v1="107 * cm" v2="106 * cm" v3="105 * cm"/> + <facet v0="108 * cm" v1="111 * cm" v2="110 * cm" v3="109 * cm"/> + <facet v0="112 * cm" v1="113 * cm" v2="114 * cm" v3="115 * cm"/> + <facet v0="116 * cm" v1="117 * cm" v2="118 * cm" v3="119 * cm"/> </shape> - <position x="0" y="0" z="0"/> - <rotation x="0" y="0" z="0"/> + <position x="0 * cm" y="0 * cm" z="0 * cm"/> + <rotation x="0 * rad" y="0 * rad" z="0 * rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Tessellated.txt" create="CheckShape_create"/> <test_writing_reference type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Tessellated.txt" create="1"/> diff --git a/examples/ClientTests/compact/Check_Shape_Torus.xml b/examples/ClientTests/compact/Check_Shape_Torus.xml index dd2ee12f9..d9ee394ca 100644 --- a/examples/ClientTests/compact/Check_Shape_Torus.xml +++ b/examples/ClientTests/compact/Check_Shape_Torus.xml @@ -20,8 +20,8 @@ <detector id="1" name="Shape_Torus" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="Torus" r="50*cm" rmin="10*cm" rmax="30*cm" z="40*cm"/> - <position x="30" y="30" z="30"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="30*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Torus.txt" create="CheckShape_create"/> <!-- Entry to create reference file --> diff --git a/examples/ClientTests/compact/Check_Shape_Trap.xml b/examples/ClientTests/compact/Check_Shape_Trap.xml index 90d70e5a4..973dfb3e9 100644 --- a/examples/ClientTests/compact/Check_Shape_Trap.xml +++ b/examples/ClientTests/compact/Check_Shape_Trap.xml @@ -22,8 +22,8 @@ <shape type="Trap" z="30*cm" theta="pi/4*rad" phi="pi*rad" x1="30*cm" x2="50*cm" y1="15*cm" alpha1="0.1*rad" x3="30*cm" x4="50*cm" y2="90*cm" alpha2="pi*rad"/> - <position x="30*cm" y="30*cm" z="50*cm"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="50*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Trap.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Trapezoid.xml b/examples/ClientTests/compact/Check_Shape_Trapezoid.xml index 06e19dfd5..df6519ae5 100644 --- a/examples/ClientTests/compact/Check_Shape_Trapezoid.xml +++ b/examples/ClientTests/compact/Check_Shape_Trapezoid.xml @@ -20,8 +20,8 @@ <detector id="1" name="Shape_Trapezoid" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="Trapezoid" z="30*cm" x1="30*cm" x2="50*cm" y1="15*cm" y2="30*cm"/> - <position x="30*cm" y="30*cm" z="50*cm"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="50*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Trapezoid.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Trd1.xml b/examples/ClientTests/compact/Check_Shape_Trd1.xml index 06b126fce..8e84afc7a 100644 --- a/examples/ClientTests/compact/Check_Shape_Trd1.xml +++ b/examples/ClientTests/compact/Check_Shape_Trd1.xml @@ -20,13 +20,13 @@ <detector id="1" name="Shape_Trd1" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="Trd1" z="80*cm" x1="25*cm" x2="50*cm" y="20*cm"/> - <position x="30" y="30" z="50"/> - <rotation x="-pi/4" y="pi/4" z="pi/8"/> + <position x="30*cm" y="30*cm" z="50*cm"/> + <rotation x="-pi/4*rad" y="pi/4*rad" z="pi/8*rad"/> </check> <check vis="Shape2_vis"> <shape type="Trd1" z="120*cm" x1="44*cm" x2="10*cm" y="5*cm"/> - <position x="-30" y="30" z="-100"/> - <rotation x="pi/2" y="0" z="pi/8"/> + <position x="-30*cm" y="30*cm" z="-100*cm"/> + <rotation x="pi/2*rad" y="0*rad" z="pi/8*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Trd1.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Trd2.xml b/examples/ClientTests/compact/Check_Shape_Trd2.xml index fb939718d..88dbe1293 100644 --- a/examples/ClientTests/compact/Check_Shape_Trd2.xml +++ b/examples/ClientTests/compact/Check_Shape_Trd2.xml @@ -20,8 +20,8 @@ <detector id="1" name="Shape_Trd2" type="DD4hep_TestShape_Creator"> <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="50"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="50*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Trd2.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_Tube.xml b/examples/ClientTests/compact/Check_Shape_Tube.xml index bd2c882c3..4f551f2ec 100644 --- a/examples/ClientTests/compact/Check_Shape_Tube.xml +++ b/examples/ClientTests/compact/Check_Shape_Tube.xml @@ -20,14 +20,14 @@ <detector id="1" name="Shape_Tube" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="Tube" rmin="10*cm" rmax="30*cm" dz="50*cm"/> - <position x="30" y="30" z="50"/> - <rotation x="0" y="pi/4" z="0"/> + <position x="30*cm" y="30*cm" z="50*cm"/> + <rotation x="0*rad" y="pi/4*rad" z="0*rad"/> </check> <check vis="Shape2_vis"> <shape type="Tube" rmin="10*cm" rmax="30*cm" dz="50*cm" deltaphi="pi/2"/> - <position x="30" y="30" z="-50"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="-50*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Tube.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/Check_Shape_TubeDivision.xml b/examples/ClientTests/compact/Check_Shape_TubeDivision.xml index 448c636a1..2c026fc5f 100644 --- a/examples/ClientTests/compact/Check_Shape_TubeDivision.xml +++ b/examples/ClientTests/compact/Check_Shape_TubeDivision.xml @@ -20,20 +20,20 @@ <detector id="1" name="Shape_TubeDivision" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis_20"> <shape type="Tube" rmin="4.69*m" rmax="4.95*m" dz="31.9*cm" startphi="346.25*deg" deltaphi="360*deg"> - <position x="0" y="0" z="50"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="50*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </shape> </check> <check vis="Shape2_vis"> <shape type="Tube" rmin="4.694*m" rmax="4.955*m" dz="32*cm" startphi="346.25*deg" deltaphi="3.099999*deg"> - <position x="0" y="30" z="50"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="30*cm" z="50*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </shape> </check> <check vis="Shape3_vis"> <shape type="Tube" rmin="4.694*m" rmax="4.955*m" dz="32*cm" startphi="10.75*deg" deltaphi="3.099999*deg"> - <position x="0" y="0" z="0"/> - <rotation x="0" y="0" z="0"/> + <position x="0*cm" y="0*cm" z="0*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </shape> </check> diff --git a/examples/ClientTests/compact/Check_Shape_TwistedTube.xml b/examples/ClientTests/compact/Check_Shape_TwistedTube.xml index 8deb3b27c..be65f4cf7 100644 --- a/examples/ClientTests/compact/Check_Shape_TwistedTube.xml +++ b/examples/ClientTests/compact/Check_Shape_TwistedTube.xml @@ -20,8 +20,8 @@ <detector id="1" name="Shape_Test" type="DD4hep_TestShape_Creator"> <check vis="Shape1_vis"> <shape type="TwistedTube" twist="20*degree" rmin="10*cm" rmax="30*cm" dz="40*cm" deltaphi="45*degree" /> - <position x="30" y="30" z="30"/> - <rotation x="0" y="0" z="0"/> + <position x="30*cm" y="30*cm" z="30*cm"/> + <rotation x="0*rad" y="0*rad" z="0*rad"/> </check> <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_TwistedTube.txt" create="CheckShape_create"/> </detector> diff --git a/examples/ClientTests/compact/NamespaceConstants.xml b/examples/ClientTests/compact/NamespaceConstants.xml index 086f5ae83..e85eab529 100644 --- a/examples/ClientTests/compact/NamespaceConstants.xml +++ b/examples/ClientTests/compact/NamespaceConstants.xml @@ -13,7 +13,7 @@ --> <define> - <constant name="world_side" value="2*m"/> + <constant name="world_side" value="2*m/cm"/> <constant name="world:X" value="world_side/2"/> <constant name="world:Y" value="world:X"/> <constant name="world:Z" value="world:Y"/> diff --git a/examples/ClientTests/ref/Ref_PseudoTrap1.txt b/examples/ClientTests/ref/Ref_PseudoTrap1.txt new file mode 100644 index 000000000..ae6060019 --- /dev/null +++ b/examples/ClientTests/ref/Ref_PseudoTrap1.txt @@ -0,0 +1,9 @@ +ShapeCheck[0] TGeoCompositeShape 6 Mesh-points: +TGeoCompositeShape PseudoTrap N(mesh)=6 N(vert)=6 N(seg)=0 N(pols)=0 +TGeoCompositeShape 0 Local ( 50.00, 30.00, -92.93) Global ( 50.00, 30.00, -92.93) +TGeoCompositeShape 1 Local ( 50.00, -30.00, -92.93) Global ( 50.00, -30.00, -92.93) +TGeoCompositeShape 2 Local (-186.36, -30.00, 92.93) Global (-186.36, -30.00, 92.93) +TGeoCompositeShape 3 Local (-186.36, 30.00, 92.93) Global (-186.36, 30.00, 92.93) +TGeoCompositeShape 4 Local ( 186.36, 30.00, 92.93) Global ( 186.36, 30.00, 92.93) +TGeoCompositeShape 5 Local ( 186.36, -30.00, 92.93) Global ( 186.36, -30.00, 92.93) +TGeoCompositeShape Bounding box: dx= 186.36 dy= 30.00 dz= 92.93 Origin: x= 0.00 y= 0.00 z= 0.00 diff --git a/examples/ClientTests/ref/Ref_PseudoTrap2.txt b/examples/ClientTests/ref/Ref_PseudoTrap2.txt index 894e5acb6..fa5d712c3 100644 --- a/examples/ClientTests/ref/Ref_PseudoTrap2.txt +++ b/examples/ClientTests/ref/Ref_PseudoTrap2.txt @@ -1,20 +1,11 @@ -ShapeCheck[0] TGeoCompositeShape 6 Mesh-points: -TGeoCompositeShape PseudoTrap N(mesh)=6 N(vert)=6 N(seg)=0 N(pols)=0 -TGeoCompositeShape 0 Local ( 50.00, 30.00, -92.93) Global ( 50.00, 30.00, -92.93) -TGeoCompositeShape 1 Local ( 50.00, -30.00, -92.93) Global ( 50.00, -30.00, -92.93) -TGeoCompositeShape 2 Local (-186.36, -30.00, 92.93) Global (-186.36, -30.00, 92.93) -TGeoCompositeShape 3 Local (-186.36, 30.00, 92.93) Global (-186.36, 30.00, 92.93) -TGeoCompositeShape 4 Local ( 186.36, 30.00, 92.93) Global ( 186.36, 30.00, 92.93) -TGeoCompositeShape 5 Local ( 186.36, -30.00, 92.93) Global ( 186.36, -30.00, 92.93) -TGeoCompositeShape Bounding box: dx= 186.36 dy= 30.00 dz= 92.93 Origin: x= 0.00 y= 0.00 z= 0.00 -ShapeCheck[1] TGeoCompositeShape 4 Mesh-points: +ShapeCheck[0] TGeoCompositeShape 4 Mesh-points: TGeoCompositeShape PseudoTrap N(mesh)=4 N(vert)=4 N(seg)=0 N(pols)=0 TGeoCompositeShape 0 Local ( -29.37, -30.00, -92.93) Global ( 370.63, 272.93, -30.00) TGeoCompositeShape 1 Local ( -29.37, 30.00, -92.93) Global ( 370.63, 272.93, 30.00) TGeoCompositeShape 2 Local ( 29.37, 30.00, -92.93) Global ( 429.37, 272.93, 30.00) TGeoCompositeShape 3 Local ( 29.37, -30.00, -92.93) Global ( 429.37, 272.93, -30.00) TGeoCompositeShape Bounding box: dx= 86.36 dy= 90.00 dz= 92.93 Origin: x= 0.00 y= 0.00 z= 0.00 -ShapeCheck[2] TGeoCompositeShape 46 Mesh-points: +ShapeCheck[1] TGeoCompositeShape 46 Mesh-points: TGeoCompositeShape PseudoTrap N(mesh)=46 N(vert)=46 N(seg)=0 N(pols)=0 TGeoCompositeShape 0 Local ( -29.37, -30.00, -92.93) Global (-392.93, -150.00, -29.37) TGeoCompositeShape 1 Local ( -29.37, 30.00, -92.93) Global (-392.93, -210.00, -29.37) @@ -63,7 +54,7 @@ TGeoCompositeShape 43 Local ( -64.58, -90.00, 112.62) Global (-187.38, -90. TGeoCompositeShape 44 Local ( -72.40, -90.00, 106.69) Global (-193.31, -90.00, -72.40) TGeoCompositeShape 45 Local ( -79.67, -90.00, 100.12) Global (-199.88, -90.00, -79.67) TGeoCompositeShape Bounding box: dx= 86.36 dy= 90.00 dz= 112.86 Origin: x= 0.00 y= 0.00 z= 19.92 -ShapeCheck[3] TGeoCompositeShape 6 Mesh-points: +ShapeCheck[2] TGeoCompositeShape 6 Mesh-points: TGeoCompositeShape PseudoTrap N(mesh)=6 N(vert)=6 N(seg)=0 N(pols)=0 TGeoCompositeShape 0 Local ( -29.37, -30.00, -292.93) Global ( -29.37, 360.00, 292.93) TGeoCompositeShape 1 Local ( -29.37, 30.00, -292.93) Global ( -29.37, 300.00, 292.93) -- GitLab