diff --git a/CMakeLists.txt b/CMakeLists.txt index 45f93b421f5ed4aeea6c3d6f8eafcfd9a08b6a71..7c24a9f08b60b0757b460f61dd27ba6562983204 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 c949affef089f195a093093604db40688702b5fa..5c6b63133ac7d0106b7189441899de9b06f3b09a 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 69455fbe44207bba9273a5be15c919dddcfb4bbf..7422399a6ba2d03fa47183e192976535d4947b6c 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 4e63ff095ffde45a74b3f1bfd3bf5c26f7761cd0..91e74498be93681fc147987cab9061f28c527afa 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 ca89daac9bf19089c2060e32cf721483a24ce43a..406b5bc8f82d1bcfa407e15e4e62b78e0e7a11d7 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 549a6ea90a05a4f025d04105d8c78b8e54160b5a..96c44839015be69d8ae2058a2797453c283b0cad 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 74551857fbf9aa65516052e74a89dd82357d680d..f455af8bec3b5bba6230190510807aed61a33d0a 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 14d4eb66462ede89798dc1d3898c464e8f30252b..f59c2340b5b2607b95e527d0ad195f71c5e7fe5e 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 9fbeaf6e3421de2bd2b433687430d5545e8e319d..357be98ffa78a03480da425449d07e4eff9cc9e6 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 b66cdedbb751cf8e3e4c37f21233ed00db0f2630..b5b390a2722b2c6afb7b7e25b22b16b7ccfcf281 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 dde055102cdf53e957c7dda612beeba647a58939..182aa090c90d149a2380116d758b7f3b27426ce1 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 6bc62890a3fd9a9dd1d2a8d59b10c9f8b34952eb..b4b1ed5e3364f3087c2c81fcf44e252231422d81 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 e392269bbdf265d2be890dfd35e55eaac20094e7..088d0f32b85bb5624a3467b04ff43e97d74a96c9 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 95a79622a832074edbad3baec4a873f0e7869367..c9e08537589627d92d5564321f07af4e96847b4a 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 a5a259b21f33b81cddb94d68eb831567b18edf95..8e2ef8e2daecd11b38a7251f77a38a843f3d9154 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 1c2d2cbe74d3fdd403c118b51907bd9027464822..d678e25846f4892882b8bd31b262953008e58a3c 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 ac2314e50bee061085aceb1bf1add76e7f5ec7e1..67bba477c51f72fc31612364c19585c94cf990c0 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 349f723585f70ff1b0fa8c0a2c0ba8dc15851cd6..8b593fce05ba5e4a82614905d4f7e582782623dc 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 8372671344e70e01dcc2bf0c5739c06530335d6d..27cc4870b05322ff70cc2b4fc3df9fded30b84a7 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 b1bef04f23041464b3a2f15333e450e7519b7521..60e49babb1bde8692c7b31c18523b22ea4572f7a 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 93072f41158e579e27a66059ec0ce7ff78be7151..e30f8aa3ef65674c91cd3830a1ea3397f6bac7ab 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 da1f3d01421f69a0b74396cb6078392f1d3b17be..b0380450733288829bb7fdd78aa1e8fd2013a940 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 7f9061673e2116cfe1f6bdddf2a60101f5b2f9fe..73f6397e01fbb3f3ba313637c151d5dbd92b637b 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 b6abfc959d8b8d5fe88ddc3a4b6f128fc4d21c22..9076b42df1294a621d010863d2e20ca95450e1ef 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 3416f93df23706d294777458808c490bf39488b1..b3609837187289366a5c7af8f821c478217761fc 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 09d4b94cb7f54e1def686c37c255c1d7ff7f74e5..3d54f6ae05d1876f0f88b57aa6d0e6b7214161ff 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 f7b7c9351382c76e751ea6888fc1d520c45142c7..ffd60593ce22027b2c67d30a26da39c33b99dfcc 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 ca519744bebbef775fceec80515ee87e46ce629f..8a9079580579fcafee51dc71a269f1470d8caa93 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 8e9cc3c4226933ab26c48e5ff0ba34ff1237b6f5..abebcd53d5b387ec76391fde4278669c979dd126 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 8882b0e86ea206b3a2630fea1482c260d78c7205..acf03b8d7ea7e753d26ebe0608d53e2b2be80a5e 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 930e89ef39c54eb90f560b50e6c7368c569e38dd..3ed0f80072495683bc23c3acc79c9de3715a77cd 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 d1306f7e0e77cca440c7d965521b0aa2fc8e6b18..0012ded655ddc4b0c0b733310d5a970efa56ac60 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 d8ff0ffc0e7c86ca417f9c69dea6294311001c94..7a69872185a04d2848c5b9049985be94e3534fb9 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 2efbd110517c703e07a3c4dcba25f440d8644b10..62a9b70a803b696b54f568ecfbe998487b79b7d7 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 0000000000000000000000000000000000000000..b3eba9b8ae41d26648f888a04479dc0341932b33 --- /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 9d742586f645a755d8e657022de2347da36ce0ff..bf798dcdf54880c7b0c6c6106dec168a5d576a4c 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 c29386325f20b4ad98790eb6effea5f4a09c1914..5a9defc33c0e118a021dd8c8a493d8489aabdbed 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 3aacbbc8d3cc7c67251fd2bf5973dd8c60bf0fb6..2a51858158d21f093386fcd3beb4938542a4ce0d 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 59eed9848452b4e1717475836f30c67d6e7b1d8e..50785732a124987bccc7079c3fc02b7c08693d8c 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 d219e6f6363166d57f45010879cfef7c8c034683..498759a9842f66f5b1ddc8f5285e4ea79b930bee 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 dd2ee12f99b0a17cabaffdb49a2917212a15d533..d9ee394caffd76e7d154dc0c143efbe2115965ce 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 90d70e5a44fc69f005073794a516fb76016500c3..973dfb3e9577424a17fe06917132d71c74a5062a 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 06e19dfd5dcf6bfb1e7322fe6849ba4a516697eb..df6519ae59142f095b497326b4474edd57f44eaa 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 06b126fce2f6c80fb2fa57e12a928b69ef86af15..8e84afc7a280aff45f8edbc391790ffc37ddc643 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 fb939718d7833c8702efa4df56334dd10d8b9927..88dbe1293f92eff6f8311eb2b03de7798051bf70 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 bd2c882c3903089e155f84ec57329f12beb879dc..4f551f2ec1a4da0d449e561ecc9bbca98e80e461 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 448c636a12fa176f7e885c4d2206d19890ffca1a..2c026fc5fcdca07a4df5fa3a68e54348128cca82 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 8deb3b27ca9c8da18246ebac64a0f099acab7bd3..be65f4cf771c7030d7ce6063da8b8a8d4570d912 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 086f5ae8359ba4fe3be45d7c1aa957266bfe94e9..e85eab529e25e90740edf7d3acd68189a2ddb32f 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 0000000000000000000000000000000000000000..ae6060019f51a6986a7dcfc216cabf58c6b30de2 --- /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 894e5acb685c19409a1630f440dca6bc70258f20..fa5d712c3d7ed8e2b6006eb6b55dc6315dc73171 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)