From 166fab1e97c839497f8191fa3752cbdefac6788e Mon Sep 17 00:00:00 2001 From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch> Date: Fri, 5 Oct 2018 18:38:31 +0200 Subject: [PATCH] Athena code migrated from in-house GeoModelKernel to standalone GeoModelKernel library Given the standalone library is based on Eigen instead of CLHEP, all GeoModel clients in Athena code were also migrated to the Eigen-based interface of GeoModel. This affected a large number of packages. Most significant changes have been introduced to subsystem GeoModel packages. The in-house GeoModelKernel code has been removed from the repository. Almost all header files in PixelGeoModel have been moved to the src directory. The next step should be turning this package into a component-only library. Similar code reorganization can be applied to SCT_GeoModel too. Subsystem readout geometry interfaces remain mostly unchanged, except for a minor change in the InDet readout geometry interface (which was unavoidable). Several non-GeoModel packages affected by this migration mostly required addition of missing CLHEP includes. Former-commit-id: 9cffebb16406dd699b3b8162a9d460b9f91a3a24 --- .../BeamPipeGeoModel/CMakeLists.txt | 8 +- .../src/BeamPipeDetectorFactory.cxx | 64 +- .../CavernInfraGeoModel/CMakeLists.txt | 6 +- .../src/CavernInfraDetectorFactory.cxx | 348 +-- .../src/CavernInfraDetectorFactory01.cxx | 250 +- .../GeoModelEnvelopes/CMakeLists.txt | 5 +- .../src/ForDetEnvelopeFactory.cxx | 9 +- .../CaloDetDescr/ICaloCoordinateTool.h | 2 +- .../CaloDetDescr/src/CaloDetectorElements.cxx | 23 +- .../src/CaloTrackingGeometryBuilder.cxx | 9 +- .../src/DQTGlobalWZFinderTool.cxx | 2 +- .../AGDD/AGDDControl/CMakeLists.txt | 8 +- .../AGDDControl/src/AGDD2GeoModelBuilder.cxx | 52 +- .../AGDD/AGDDControl/src/AGDDController.cxx | 1 - .../AGDDKernel/AGDDDetectorPositioner.h | 1 + .../AGDD/AGDDKernel/CMakeLists.txt | 9 +- .../GeoModel/AtlasGeoModel/python/LArGM.py | 1 - .../GeoModel/GeoAdaptors/CMakeLists.txt | 1 + .../GeoAdaptors/GeoAdaptors/GeoSiHit.icc | 4 +- .../GeoModel/GeoModelExamples/CMakeLists.txt | 15 +- .../src/ToyDetectorFactory.cxx | 28 +- .../GeoModelExamples/src/ToyDetectorTool.cxx | 84 +- .../GeoModelExamples/src/ToyDetectorTool.h | 10 +- .../GeoModel/GeoModelKernel/CMakeLists.txt | 18 - .../GeoModelKernel/CellBinning.h | 120 - .../GeoModelKernel/CellPartitioning.h | 65 - .../GeoModelKernel/GeoModelKernel/ConstLink.h | 205 -- .../GeoModelKernel/GeoAbsPositionInfo.h | 65 - .../GeoModelKernel/GeoAccessVolAndSTAction.h | 83 - .../GeoModelKernel/GeoAlignableTransform.h | 53 - .../GeoModelKernel/GeoModelKernel/GeoBox.h | 82 - .../GeoModelKernel/GeoClearAbsPosAction.h | 34 - .../GeoModelKernel/GeoModelKernel/GeoCons.h | 118 - .../GeoModelKernel/GeoCountVolAction.h | 40 - .../GeoModelKernel/GeoCountVolAndSTAction.h | 41 - .../GeoModelKernel/GeoCutVolAction.h | 80 - .../GeoModelKernel/GeoElement.h | 98 - .../GeoModelKernel/GeoEllipticalTube.h | 79 - .../GeoModelKernel/GeoModelKernel/GeoFacet.h | 89 - .../GeoModelKernel/GeoFullPhysVol.h | 87 - .../GeoModelKernel/GeoGenericTrap.h | 57 - .../GeoModelKernel/GeoGraphNode.h | 52 - .../GeoModelKernel/GeoIdentifierTag.h | 46 - .../GeoModelKernel/GeoModelKernel/GeoLogVol.h | 66 - .../GeoModelKernel/GeoMaterial.h | 142 -- .../GeoModelKernel/GeoNameTag.h | 45 - .../GeoModelKernel/GeoNodeAction.h | 99 - .../GeoModelKernel/GeoNodePath.h | 13 - .../GeoModelKernel/GeoPVConstLink.h | 49 - .../GeoModelKernel/GeoModelKernel/GeoPVLink.h | 42 - .../GeoModelKernel/GeoModelKernel/GeoPara.h | 111 - .../GeoModelKernel/GeoModelKernel/GeoPcon.h | 141 -- .../GeoModelKernel/GeoPerfUtils.h | 31 - .../GeoModelKernel/GeoModelKernel/GeoPgon.h | 141 -- .../GeoModelKernel/GeoPhysVol.h | 77 - .../GeoModelKernel/GeoPolyhedrizeAction.h | 78 - .../GeoModelKernel/GeoPolyhedron.h | 520 ---- .../GeoModelKernel/GeoPrintGraphAction.h | 102 - .../GeoModelKernel/GeoSerialDenominator.h | 50 - .../GeoModelKernel/GeoSerialIdentifier.h | 42 - .../GeoModelKernel/GeoSerialTransformer.h | 66 - .../GeoModelKernel/GeoModelKernel/GeoShape.h | 77 - .../GeoModelKernel/GeoShapeAction.h | 130 - .../GeoModelKernel/GeoShapeIntersection.h | 68 - .../GeoModelKernel/GeoShapePath.h | 13 - .../GeoModelKernel/GeoShapeShift.h | 68 - .../GeoModelKernel/GeoShapeSubtraction.h | 67 - .../GeoModelKernel/GeoShapeUnion.h | 67 - .../GeoModelKernel/GeoSimplePolygonBrep.h | 98 - .../GeoModelKernel/GeoTessellatedSolid.h | 53 - .../GeoModelKernel/GeoModelKernel/GeoTorus.h | 85 - .../GeoModelKernel/GeoTransform.h | 47 - .../GeoModelKernel/GeoModelKernel/GeoTrap.h | 159 -- .../GeoModelKernel/GeoTraversalState.h | 120 - .../GeoModelKernel/GeoModelKernel/GeoTrd.h | 101 - .../GeoModelKernel/GeoModelKernel/GeoTube.h | 84 - .../GeoModelKernel/GeoModelKernel/GeoTubs.h | 101 - .../GeoModelKernel/GeoVAlignmentStore.h | 42 - .../GeoModelKernel/GeoVDetectorElement.h | 51 - .../GeoModelKernel/GeoVDetectorFactory.h | 41 - .../GeoModelKernel/GeoVDetectorManager.h | 52 - .../GeoModelKernel/GeoVFullPhysVol.h | 55 - .../GeoModelKernel/GeoVPhysVol.h | 106 - .../GeoModelKernel/GeoVolumeAction.h | 67 - .../GeoModelKernel/GeoVolumeCursor.h | 99 - .../GeoModelKernel/GeoModelKernel/GeoXF.h | 211 -- .../GeoModelKernel/GeometryMap.h | 43 - .../GeoModelKernel/GeoModelKernel/Path.h | 145 -- .../GeoModelKernel/GeoModelKernel/Query.h | 72 - .../GeoModelKernel/GeoModelKernel/RCBase.h | 51 - .../GeoModelKernel/TemplateVolAction.h | 26 - .../GeoModelKernel/TinyHepTransform.h | 522 ---- .../GeoModel/GeoModelKernel/doc/packagedoc.h | 18 - .../GeoModelKernel/src/BooleanProcessor.src | 2109 ---------------- .../GeoModelKernel/src/CellBinning.cxx | 11 - .../GeoModelKernel/src/CellPartitioning.cxx | 35 - .../GeoModelKernel/src/GeoAbsPositionInfo.cxx | 55 - .../src/GeoAccessVolAndSTAction.cxx | 191 -- .../src/GeoAccessVolumeAction.cxx | 208 -- .../src/GeoAccessVolumeAction.h | 114 - .../src/GeoAlignableTransform.cxx | 75 - .../GeoModel/GeoModelKernel/src/GeoBox.cxx | 41 - .../src/GeoClearAbsPosAction.cxx | 18 - .../GeoModel/GeoModelKernel/src/GeoCons.cxx | 46 - .../GeoModelKernel/src/GeoCountVolAction.cxx | 38 - .../src/GeoCountVolAndSTAction.cxx | 43 - .../GeoModelKernel/src/GeoCutVolAction.cxx | 89 - .../GeoModelKernel/src/GeoElement.cxx | 49 - .../GeoModelKernel/src/GeoEllipticalTube.cxx | 48 - .../GeoModel/GeoModelKernel/src/GeoFacet.cxx | 47 - .../GeoModelKernel/src/GeoFullPhysVol.cxx | 253 -- .../GeoModelKernel/src/GeoGenericTrap.cxx | 51 - .../GeoModelKernel/src/GeoGraphNode.cxx | 23 - .../GeoModelKernel/src/GeoIdentifierTag.cxx | 20 - .../GeoModel/GeoModelKernel/src/GeoLogVol.cxx | 21 - .../GeoModelKernel/src/GeoMaterial.cxx | 413 ---- .../GeoModelKernel/src/GeoNameTag.cxx | 21 - .../GeoModelKernel/src/GeoNodeAction.cxx | 82 - .../GeoModelKernel/src/GeoPVConstLink.cxx | 79 - .../GeoModel/GeoModelKernel/src/GeoPVLink.cxx | 54 - .../GeoModel/GeoModelKernel/src/GeoPara.cxx | 111 - .../GeoModel/GeoModelKernel/src/GeoPcon.cxx | 64 - .../GeoModelKernel/src/GeoPerfUtils.cxx | 59 - .../GeoModel/GeoModelKernel/src/GeoPgon.cxx | 77 - .../GeoModelKernel/src/GeoPhysVol.cxx | 209 -- .../src/GeoPolyhedrizeAction.cxx | 169 -- .../GeoModelKernel/src/GeoPolyhedron.cxx | 2171 ----------------- .../src/GeoPrintGraphAction.cxx | 115 - .../src/GeoSelClearAbsPosAction.cxx | 46 - .../src/GeoSelClearAbsPosAction.h | 48 - .../src/GeoSerialDenominator.cxx | 20 - .../src/GeoSerialIdentifier.cxx | 28 - .../src/GeoSerialTransformer.cxx | 31 - .../GeoModel/GeoModelKernel/src/GeoShape.cxx | 41 - .../GeoModelKernel/src/GeoShapeAction.cxx | 166 -- .../src/GeoShapeIntersection.cxx | 88 - .../GeoModelKernel/src/GeoShapeShift.cxx | 73 - .../src/GeoShapeSubtraction.cxx | 88 - .../GeoModelKernel/src/GeoShapeUnion.cxx | 89 - .../src/GeoSimplePolygonBrep.cxx | 68 - .../src/GeoTessellatedSolid.cxx | 56 - .../GeoModel/GeoModelKernel/src/GeoTorus.cxx | 45 - .../GeoModelKernel/src/GeoTransform.cxx | 30 - .../GeoModel/GeoModelKernel/src/GeoTrap.cxx | 61 - .../GeoModelKernel/src/GeoTraversalState.cxx | 102 - .../GeoModel/GeoModelKernel/src/GeoTrd.cxx | 50 - .../GeoModel/GeoModelKernel/src/GeoTube.cxx | 45 - .../GeoModel/GeoModelKernel/src/GeoTubs.cxx | 44 - .../src/GeoVDetectorElement.cxx | 14 - .../src/GeoVDetectorFactory.cxx | 15 - .../src/GeoVDetectorManager.cxx | 24 - .../GeoModelKernel/src/GeoVFullPhysVol.cxx | 209 -- .../GeoModelKernel/src/GeoVPhysVol.cxx | 100 - .../GeoModelKernel/src/GeoVolumeAction.cxx | 44 - .../GeoModelKernel/src/GeoVolumeCursor.cxx | 241 -- .../GeoModel/GeoModelKernel/src/GeoXF.cxx | 243 -- .../GeoModelKernel/src/GeometryMap.cxx | 120 - .../src/PolygonTriangulator.cxx | 2112 ---------------- .../GeoModelKernel/src/PolygonTriangulator.h | 62 - .../GeoModel/GeoModelKernel/src/RCBase.cxx | 34 - .../GeoModelKernel/src/TemplateVolAction.cxx | 18 - .../GeoModel/GeoModelKernel/src/qt.pro | 34 - .../GeoModel/GeoModelSvc/CMakeLists.txt | 8 +- .../GeoModel/GeoModelSvc/src/GeoModelSvc.cxx | 4 +- .../GeoModel/GeoModelSvc/src/GeoModelSvc.h | 3 +- .../GeoModelSvc/src/RDBMaterialManager.cxx | 25 +- .../GeoModel/GeoModelUtilities/CMakeLists.txt | 9 +- .../GeoModelUtilities/GeoAlignmentStore.h | 20 +- .../GeoModelUtilities/GeoDBUtils.h | 22 +- .../GeoModelUtilities/GeoExtendedMaterial.h | 6 +- .../src/GeoAlignmentStore.cxx | 12 +- .../GeoModel/GeoSpecialShapes/CMakeLists.txt | 8 +- .../AFP/AFP_GeoModel/CMakeLists.txt | 12 +- .../AFP_GeoModel/src/AFP_GeoModelFactory.cxx | 10 +- .../AFP/AFP_GeoModel/src/AFP_GeoModelHP.cxx | 127 +- .../AFP/AFP_GeoModel/src/AFP_GeoModelRP.cxx | 16 +- .../AFP/AFP_GeoModel/src/AFP_GeoModelSID.cxx | 200 +- .../AFP/AFP_GeoModel/src/AFP_GeoModelTD.cxx | 29 +- .../AFP_Geometry/AFP_ConfigParams.h | 2 +- .../AFP_Geometry/AFP_Geometry/AFP_Geometry.h | 1 - .../AFP/AFP_Geometry/CMakeLists.txt | 3 +- .../ALFA/ALFA_GeoModel/CMakeLists.txt | 7 +- .../src/ALFA_DetectorFactory.cxx | 202 +- .../ALFA_GeoModel/src/ALFA_DetectorTool.cxx | 8 +- .../ALFA_Geometry/ALFA_Geometry/ALFA_Config.h | 1 - .../ALFA_Geometry/ALFA_GeometryReader.h | 2 +- .../ALFA/ALFA_Geometry/CMakeLists.txt | 3 +- .../ForwardRegionGeoModel/CMakeLists.txt | 7 +- .../src/ForwardRegionGeoModelElements.cxx | 194 +- .../src/ForwardRegionGeoModelFactory.cxx | 159 +- .../src/ForwardRegionGeoModelTool.cxx | 37 +- .../LUCID/LUCID_GeoModel/CMakeLists.txt | 15 +- .../LUCID/LUCID_GeoModel/src/GetRefIndex.cxx | 9 +- .../src/LUCID_DetectorFactory.cxx | 108 +- .../LUCID_GeoModel/src/LUCID_RDBAaccess.cxx | 99 +- ForwardDetectors/ZDC/ZDC_GeoM/CMakeLists.txt | 9 +- .../ZDC/ZDC_GeoM/src/ZDC_DetFactory.cxx | 80 +- .../GeneratorFilters/VBFMjjIntervalFilter.h | 1 + Generators/GeneratorFilters/src/HTFilter.cxx | 1 + .../src/VBFMjjIntervalFilter.cxx | 1 + .../InDetAlignGenAlgs/src/InDetAlignCog.cxx | 2 +- .../src/InDetAlignFillTrack.cxx | 2 + .../PixelConditionsAlgorithms/CMakeLists.txt | 3 +- .../SCT_ConditionsAlgorithms/CMakeLists.txt | 1 + .../src/SCT_DetectorElementCondAlg.h | 1 + .../InDetDetDescr/BCM_GeoModel/CMakeLists.txt | 5 +- .../BCM_GeoModel/src/BCM_Builder.cxx | 15 +- .../BCM_GeoModel/src/BCM_Module.cxx | 79 +- .../BCM_GeoModel/src/BCM_Wall.cxx | 22 +- .../InDetDetDescr/BLM_GeoModel/CMakeLists.txt | 5 +- .../BLM_GeoModel/src/BLM_Builder.cxx | 11 +- .../BLM_GeoModel/src/BLM_Module.cxx | 115 +- .../BLM_GeoModel/src/BLM_Wall.cxx | 232 +- .../InDetGeoModelUtils/CMakeLists.txt | 5 +- .../InDetGeoModelUtils/TopLevelPlacements.h | 12 +- .../InDetGeoModelUtils/src/ExtraMaterial.cxx | 4 +- .../src/GenericTubeMaker.cxx | 16 +- .../src/InDetMaterialManager.cxx | 56 +- .../InDetGeoModelUtils/src/ServiceVolume.cxx | 15 +- .../src/ServiceVolumeMaker.cxx | 30 +- .../src/TopLevelPlacements.cxx | 40 +- .../InDetGeoModelUtils/src/TubeVolData.cxx | 28 +- .../InDetGeoModelUtils/src/VolumeBuilder.cxx | 35 +- .../InDetGeoModelUtils/src/VolumeSplitter.cxx | 6 +- .../InDetReadoutGeometry/CMakeLists.txt | 4 +- .../ExtendedAlignableTransform.h | 1 + .../PixelDetectorManager.h | 1 + .../InDetReadoutGeometry/PixelDiodeMatrix.h | 1 + .../InDetReadoutGeometry/SiCommonItems.h | 1 + .../InDetReadoutGeometry/SiDetectorDesign.h | 1 + .../InDetReadoutGeometry/SiDetectorElement.h | 8 +- .../TRT_BarrelDescriptor.h | 1 + .../InDetReadoutGeometry/TRT_BaseElement.h | 5 +- .../InDetReadoutGeometry/TRT_BaseElement.icc | 12 - .../InDetReadoutGeometry/TRT_Conditions.h | 1 + .../TRT_DetectorManager.h | 1 + .../TRT_EndcapDescriptor.h | 1 + .../src/SiDetectorElement.cxx | 24 +- .../src/SiDetectorManager.cxx | 15 +- .../src/TRT_BarrelElement.cxx | 7 +- .../src/TRT_DetectorManager.cxx | 12 +- .../src/TRT_EndcapElement.cxx | 18 +- .../InDetServMatGeoModel/CMakeLists.txt | 9 +- .../src/EndPlateFactory.cxx | 146 +- .../src/EndPlateFactoryFS.cxx | 162 +- .../src/InDetServMatBuilderToolSLHC.cxx | 22 +- .../src/InDetServMatFactory.cxx | 52 +- .../src/InDetServMatFactoryDC2.cxx | 36 +- .../src/InDetServMatFactoryDC3.cxx | 42 +- .../src/InDetServMatFactoryFS.cxx | 50 +- .../src/InDetServMatFactorySLHC.cxx | 14 +- .../src/InDetServMatGeometryManager.cxx | 30 +- .../src/PixelServMatFactoryDC2.cxx | 22 +- .../src/PixelServMatFactoryDC3.cxx | 30 +- .../src/PixelServMatFactoryFS.cxx | 2 +- .../src/SCT_ServMatFactory.cxx | 84 +- .../src/SCT_ServMatFactoryDC2.cxx | 76 +- .../src/SCT_ServMatFactoryDC3.cxx | 90 +- .../src/SCT_ServMatFactoryFS.cxx | 36 +- .../src/ServiceVolume.cxx | 2 +- .../src/SquirrelCageFactory.cxx | 273 ++- .../src/SquirrelCageFactoryFS.cxx | 116 +- .../src/SupportRailFactory.cxx | 315 +-- .../src/SupportRailFactoryFS.cxx | 92 +- .../src/TRT_ServMatFactory.cxx | 35 +- .../src/TRT_ServMatFactoryDC2.cxx | 48 +- .../src/TRT_ServMatFactoryDC3.cxx | 44 +- .../src/TRT_ServMatFactoryFS.cxx | 12 +- .../InDetTrackingGeometry/CMakeLists.txt | 4 +- .../src/BeamPipeBuilder.cxx | 8 +- .../InDetDetDescr/PixelCabling/CMakeLists.txt | 5 +- .../PixelGeoModel/CMakeLists.txt | 9 +- .../PixelGeoModel/src/DBM_Det.cxx | 31 +- .../{PixelGeoModel => src}/DBM_Det.h | 4 +- .../PixelGeoModel/src/DBM_Module.cxx | 37 +- .../{PixelGeoModel => src}/DBM_Module.h | 4 +- .../PixelGeoModel/src/DBM_ModuleCage.cxx | 64 +- .../{PixelGeoModel => src}/DBM_ModuleCage.h | 3 +- .../PixelGeoModel/src/DBM_Services.cxx | 2 +- .../{PixelGeoModel => src}/DBM_Services.h | 3 +- .../PixelGeoModel/src/DBM_Telescope.cxx | 65 +- .../{PixelGeoModel => src}/DBM_Telescope.h | 3 +- .../PixelGeoModel/src/GeoPixelBarrel.cxx | 16 +- .../{PixelGeoModel => src}/GeoPixelBarrel.h | 2 +- .../PixelGeoModel/src/GeoPixelCable.cxx | 4 +- .../{PixelGeoModel => src}/GeoPixelCable.h | 2 +- .../PixelGeoModel/src/GeoPixelChip.cxx | 2 +- .../{PixelGeoModel => src}/GeoPixelChip.h | 2 +- .../src/GeoPixelDetailedStaveSupport.cxx | 184 +- .../GeoPixelDetailedStaveSupport.h | 19 +- .../PixelGeoModel/src/GeoPixelDisk.cxx | 37 +- .../{PixelGeoModel => src}/GeoPixelDisk.h | 2 +- .../PixelGeoModel/src/GeoPixelDiskSLHC.cxx | 14 +- .../{PixelGeoModel => src}/GeoPixelDiskSLHC.h | 2 +- .../src/GeoPixelDiskSupports.cxx | 2 +- .../GeoPixelDiskSupports.h | 2 +- .../PixelGeoModel/src/GeoPixelECCable.cxx | 2 +- .../{PixelGeoModel => src}/GeoPixelECCable.h | 2 +- .../PixelGeoModel/src/GeoPixelEndCap.cxx | 16 +- .../{PixelGeoModel => src}/GeoPixelEndCap.h | 2 +- .../PixelGeoModel/src/GeoPixelEnvelope.cxx | 34 +- .../{PixelGeoModel => src}/GeoPixelEnvelope.h | 2 +- .../PixelGeoModel/src/GeoPixelFluid.cxx | 2 +- .../{PixelGeoModel => src}/GeoPixelFluid.h | 2 +- .../PixelGeoModel/src/GeoPixelFrame.cxx | 34 +- .../{PixelGeoModel => src}/GeoPixelFrame.h | 2 +- .../PixelGeoModel/src/GeoPixelHybrid.cxx | 2 +- .../{PixelGeoModel => src}/GeoPixelHybrid.h | 2 +- .../src/GeoPixelIBLFwdServices.cxx | 6 +- .../GeoPixelIBLFwdServices.h | 9 +- .../src/GeoPixelIBLFwdSvcCADModel.cxx | 40 +- .../GeoPixelIBLFwdSvcCADModel.h | 13 +- .../src/GeoPixelIBLFwdSvcModel1.cxx | 36 +- .../GeoPixelIBLFwdSvcModel1.h | 13 +- .../src/GeoPixelIFlexServices.cxx | 31 +- .../GeoPixelIFlexServices.h | 9 +- .../PixelGeoModel/src/GeoPixelLadder.cxx | 43 +- .../{PixelGeoModel => src}/GeoPixelLadder.h | 2 +- .../src/GeoPixelLadderServices.cxx | 118 +- .../GeoPixelLadderServices.h | 21 +- .../PixelGeoModel/src/GeoPixelLayer.cxx | 79 +- .../{PixelGeoModel => src}/GeoPixelLayer.h | 2 +- .../PixelGeoModel/src/GeoPixelModule.cxx | 38 +- .../{PixelGeoModel => src}/GeoPixelModule.h | 4 +- .../PixelGeoModel/src/GeoPixelOldFrame.cxx | 78 +- .../{PixelGeoModel => src}/GeoPixelOldFrame.h | 2 +- .../PixelGeoModel/src/GeoPixelPigtail.cxx | 4 +- .../{PixelGeoModel => src}/GeoPixelPigtail.h | 2 +- .../PixelGeoModel/src/GeoPixelRingSLHC.cxx | 26 +- .../{PixelGeoModel => src}/GeoPixelRingSLHC.h | 2 +- .../PixelGeoModel/src/GeoPixelServices.cxx | 24 +- .../{PixelGeoModel => src}/GeoPixelServices.h | 2 +- .../PixelGeoModel/src/GeoPixelSiCrystal.cxx | 14 +- .../GeoPixelSiCrystal.h | 2 +- .../src/GeoPixelSimpleStaveSupport.cxx | 5 +- .../GeoPixelSimpleStaveSupport.h | 9 +- .../PixelGeoModel/src/GeoPixelStaveRing.cxx | 8 +- .../GeoPixelStaveRing.h | 4 +- .../src/GeoPixelStaveRingServices.cxx | 61 +- .../GeoPixelStaveRingServices.h | 9 +- .../GeoPixelStaveSupport.h | 7 +- .../PixelGeoModel/src/GeoPixelTMT.cxx | 17 +- .../{PixelGeoModel => src}/GeoPixelTMT.h | 11 +- .../PixelGeoModel/src/GeoVPixelFactory.cxx | 2 +- .../{PixelGeoModel => src}/GeoVPixelFactory.h | 2 +- .../PixelGeoModel/src/OraclePixGeoManager.cxx | 502 ++-- .../OraclePixGeoManager.h | 13 +- .../PixelGeoModel/src/PixelDetectorDC1DC2.cxx | 247 +- .../PixelDetectorDC1DC2.h | 101 +- .../src/PixelDetectorFactory.cxx | 16 +- .../PixelDetectorFactory.h | 0 .../src/PixelDetectorFactoryDC2.cxx | 16 +- .../PixelDetectorFactoryDC2.h | 0 .../src/PixelDetectorFactorySR1.cxx | 30 +- .../PixelDetectorFactorySR1.h | 0 .../PixelGeoModel/src/PixelDetectorTool.cxx | 14 +- .../PixelDetectorTool.h | 0 .../src/PixelGeoModelAthenaComps.cxx | 2 +- .../PixelGeoModelAthenaComps.h | 0 .../src/PixelGeometryManager.cxx | 2 +- .../PixelGeometryManager.h | 10 +- .../PixelGeoModel/src/PixelLegacyManager.cxx | 271 +- .../PixelLegacyManager.h | 0 .../PixelGeoModel/src/PixelMaterialMap.cxx | 2 +- .../{PixelGeoModel => src}/PixelMaterialMap.h | 0 .../PixelGeoModel/src/PixelStaveTypes.cxx | 2 +- .../{PixelGeoModel => src}/PixelStaveTypes.h | 0 .../PixelGeoModel/src/PixelSwitches.cxx | 2 +- .../{PixelGeoModel => src}/PixelSwitches.h | 0 .../src/components/PixelGeoModel_entries.cxx | 2 +- .../InDetDetDescr/SCT_GeoModel/CMakeLists.txt | 18 +- .../SCT_GeoModel/SCT_GeneralParameters.h | 4 +- .../SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h | 11 +- .../SCT_GeoModel/SCT_GeoModel/SCT_Module.h | 19 +- .../SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h | 12 +- .../SCT_GeoModel/SCT_GeoModel/SCT_Ski.h | 14 +- .../SCT_GeoModel/src/SCT_Barrel.cxx | 42 +- .../src/SCT_BarrelModuleParameters.cxx | 58 +- .../SCT_GeoModel/src/SCT_BarrelParameters.cxx | 182 +- .../SCT_GeoModel/src/SCT_Bracket.cxx | 2 +- .../SCT_GeoModel/src/SCT_Clamp.cxx | 2 +- .../SCT_GeoModel/src/SCT_CloseOut.cxx | 2 +- .../SCT_GeoModel/src/SCT_ComponentFactory.cxx | 4 +- .../SCT_GeoModel/src/SCT_CoolingBlock.cxx | 2 +- .../SCT_GeoModel/src/SCT_CoolingEnd.cxx | 2 +- .../SCT_GeoModel/src/SCT_CoolingPipe.cxx | 2 +- .../SCT_GeoModel/src/SCT_DetectorFactory.cxx | 20 +- .../SCT_GeoModel/src/SCT_Dogleg.cxx | 2 +- .../SCT_GeoModel/src/SCT_FSIEndJewel.cxx | 2 +- .../SCT_GeoModel/src/SCT_FSIFibreMask.cxx | 2 +- .../SCT_GeoModel/src/SCT_FSIHelper.cxx | 6 +- .../SCT_GeoModel/src/SCT_FSIScorpion.cxx | 2 +- .../SCT_GeoModel/src/SCT_Flange.cxx | 2 +- .../SCT_GeoModel/src/SCT_Forward.cxx | 16 +- .../src/SCT_ForwardModuleParameters.cxx | 80 +- .../src/SCT_ForwardParameters.cxx | 117 +- .../SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx | 4 +- .../SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx | 10 +- .../src/SCT_FwdCylinderServices.cxx | 52 +- .../SCT_GeoModel/src/SCT_FwdDiscFixation.cxx | 2 +- .../SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx | 2 +- .../SCT_GeoModel/src/SCT_FwdDiscSupport.cxx | 2 +- .../SCT_GeoModel/src/SCT_FwdFSI.cxx | 2 +- .../SCT_GeoModel/src/SCT_FwdHybrid.cxx | 22 +- .../SCT_GeoModel/src/SCT_FwdModule.cxx | 66 +- .../src/SCT_FwdModuleConnector.cxx | 7 +- .../SCT_GeoModel/src/SCT_FwdOptoHarness.cxx | 5 +- .../SCT_GeoModel/src/SCT_FwdPPConnector.cxx | 2 +- .../SCT_GeoModel/src/SCT_FwdPPCooling.cxx | 2 +- .../SCT_GeoModel/src/SCT_FwdPatchPanel.cxx | 2 +- .../SCT_GeoModel/src/SCT_FwdPowerTape.cxx | 6 +- .../SCT_GeoModel/src/SCT_FwdRing.cxx | 57 +- .../SCT_GeoModel/src/SCT_FwdRingCooling.cxx | 3 +- .../SCT_GeoModel/src/SCT_FwdSensor.cxx | 22 +- .../SCT_GeoModel/src/SCT_FwdSpine.cxx | 12 +- .../SCT_GeoModel/src/SCT_FwdSubSpine.cxx | 14 +- .../SCT_GeoModel/src/SCT_FwdSupportFrame.cxx | 2 +- .../src/SCT_FwdThermalShieldElement.cxx | 2 +- .../SCT_GeoModel/src/SCT_FwdWheel.cxx | 51 +- .../src/SCT_GeneralParameters.cxx | 20 +- .../SCT_GeoModel/src/SCT_Harness.cxx | 2 +- .../SCT_GeoModel/src/SCT_Hybrid.cxx | 2 +- .../SCT_GeoModel/src/SCT_InnerSide.cxx | 23 +- .../SCT_GeoModel/src/SCT_InterLink.cxx | 24 +- .../SCT_GeoModel/src/SCT_Layer.cxx | 82 +- .../SCT_GeoModel/src/SCT_MaterialManager.cxx | 2 +- .../SCT_GeoModel/src/SCT_Module.cxx | 130 +- .../SCT_GeoModel/src/SCT_OuterSide.cxx | 28 +- .../SCT_GeoModel/src/SCT_Pigtail.cxx | 2 +- .../SCT_GeoModel/src/SCT_PixelAttachment.cxx | 2 +- .../SCT_GeoModel/src/SCT_PowerTape.cxx | 2 +- .../SCT_GeoModel/src/SCT_Sensor.cxx | 10 +- .../SCT_GeoModel/src/SCT_Ski.cxx | 83 +- .../SCT_GeoModel/src/SCT_SkiAux.cxx | 27 +- .../SCT_GeoModel/src/SCT_SkiPowerTape.cxx | 18 +- .../SCT_GeoModel/src/SCT_Spider.cxx | 2 +- .../SCT_GeoModel/src/SCT_SupportCyl.cxx | 2 +- .../SCT_SLHC_GeoModel/CMakeLists.txt | 18 +- .../SCT_SLHC_GeoModel/SCT_FwdRing.h | 4 +- .../SCT_SLHC_GeoModel/SCT_GeneralParameters.h | 5 +- .../SCT_SLHC_GeoModel/SCT_InnerSide.h | 2 +- .../SCT_SLHC_GeoModel/SCT_Module.h | 5 +- .../SCT_SLHC_GeoModel/SCT_OuterSide.h | 2 +- .../SCT_SLHC_GeoModel/SCT_Ski.h | 6 +- .../SCT_SLHC_GeoModel/src/SCT_Barrel.cxx | 8 +- .../src/SCT_BarrelModuleParameters.cxx | 34 +- .../src/SCT_BarrelModuleParametersOld.cxx | 54 +- .../src/SCT_BarrelParameters.cxx | 52 +- .../src/SCT_BarrelParametersOld.cxx | 46 +- .../SCT_SLHC_GeoModel/src/SCT_BaseBoard.cxx | 2 +- .../src/SCT_ComponentFactory.cxx | 4 +- .../src/SCT_DetectorFactory.cxx | 34 +- .../SCT_SLHC_GeoModel/src/SCT_Forward.cxx | 8 +- .../src/SCT_ForwardModuleParameters.cxx | 34 +- .../src/SCT_ForwardModuleParametersOld.cxx | 78 +- .../src/SCT_ForwardParameters.cxx | 34 +- .../src/SCT_ForwardParametersOld.cxx | 58 +- .../src/SCT_FwdDiscSupport.cxx | 4 +- .../SCT_SLHC_GeoModel/src/SCT_FwdModule.cxx | 55 +- .../SCT_SLHC_GeoModel/src/SCT_FwdRing.cxx | 47 +- .../SCT_SLHC_GeoModel/src/SCT_FwdSensor.cxx | 8 +- .../SCT_SLHC_GeoModel/src/SCT_FwdSpine.cxx | 8 +- .../SCT_SLHC_GeoModel/src/SCT_FwdWheel.cxx | 24 +- .../src/SCT_GeneralParameters.cxx | 14 +- .../SCT_SLHC_GeoModel/src/SCT_InnerSide.cxx | 8 +- .../SCT_SLHC_GeoModel/src/SCT_Layer.cxx | 30 +- .../src/SCT_MaterialManager.cxx | 2 +- .../SCT_SLHC_GeoModel/src/SCT_Module.cxx | 44 +- .../SCT_SLHC_GeoModel/src/SCT_OuterSide.cxx | 8 +- .../SCT_SLHC_GeoModel/src/SCT_Sensor.cxx | 6 +- .../SCT_SLHC_GeoModel/src/SCT_Ski.cxx | 25 +- .../src/SCT_StaveSupport.cxx | 2 +- .../InDetDetDescr/TRT_GeoModel/CMakeLists.txt | 9 +- .../TRT_GeoModel/src/ArrayFunction.cxx | 4 +- .../TRT_GeoModel/src/ArrayFunction.h | 4 +- .../src/TRTDetectorFactory_Full.cxx | 310 +-- .../src/TRTDetectorFactory_Full.h | 9 +- .../TRT_GeoModel/src/TRTParameterInterface.h | 5 +- .../src/TRT_DetDescrDB_ParameterInterface.cxx | 254 +- .../src/TRT_DetDescrDB_ParameterInterface.h | 2 +- .../src/SiSmearedDigitizationTool.cxx | 4 +- .../InDetDiMuonMonitoring/CMakeLists.txt | 5 +- .../InDetDiMuonMonitoring/src/DiMuMon.cxx | 23 +- .../src/MuonSelector.cxx | 1 + .../src/ZmumuEvent.cxx | 1 + .../src/TRT_StandaloneTrackFinder.cxx | 3 +- .../src/SingleTrackConversionTool.cxx | 1 + .../src/VertexPointEstimator.cxx | 1 + .../src/InDetDNASeparator.cxx | 3 +- .../src/InDetDetailedTrackSelectorTool.cxx | 1 + .../src/InDetIsoTrackSelectorTool.cxx | 1 + .../src/InDetTrackSelectorTool.cxx | 1 + .../SimpleTRT_SeededSpacePointFinder_ATL.cxx | 1 + .../src/TrackStatHelper.cxx | 1 + .../InDetTrackValidation/CMakeLists.txt | 4 +- LArCalorimeter/LArDetDescr/CMakeLists.txt | 4 +- .../LArDetDescr/LArDetDescr/FindVolAction.h | 42 - .../LArDetDescr/src/FindVolAction.cxx | 83 - .../LArDetDescr/src/LArNumberHelper.cxx | 375 ++- .../LArDetDescr/src/LArRecoMaterialTool.cxx | 19 +- .../LArDetDescr/src/LArRecoSimpleGeomTool.cxx | 222 +- .../LArG4/LArG4FastSimulation/CMakeLists.txt | 7 +- .../src/BarrelFastSimDedicatedSD.cxx | 7 +- .../src/EndcapFastSimDedicatedSD.cxx | 7 +- .../src/FCALFastSimDedicatedSD.cxx | 15 +- .../LArG4/LArG4Validation/CMakeLists.txt | 5 +- .../LArG4Validation}/src/GeoXPEngine.cxx | 2 +- .../LArG4/LArG4Validation/src}/GeoXPEngine.h | 11 +- .../src/SingleTrackValidation.cxx | 2 +- .../LArGeoModel/LArGeoAlgsNV/CMakeLists.txt | 8 +- .../LArGeoAlgsNV/src/LArDetectorFactory.cxx | 18 +- .../LArGeoAlgsNV/src/LArDetectorFactory.h | 4 +- .../LArGeoAlgsNV/src/LArDetectorTool.cxx | 391 ++- .../LArGeoAlgsNV/src/LArDetectorToolNV.h | 11 +- .../LArGeoModel/LArGeoBarrel/CMakeLists.txt | 9 +- .../LArGeoBarrel/BarrelConstruction.h | 20 +- .../BarrelPresamplerConstruction.h | 2 +- .../LArGeoBarrel/src/BarrelConstruction.cxx | 570 ++--- .../src/BarrelCryostatConstruction.cxx | 156 +- .../LArGeoBarrel/src/BarrelDMConstruction.cxx | 474 ++-- .../src/BarrelPresamplerConstruction.cxx | 108 +- .../LArGeoModel/LArGeoCode/CMakeLists.txt | 8 +- .../LArGeoCode/src/LArMaterialManager.cxx | 122 +- .../LArGeoModel/LArGeoEndcap/CMakeLists.txt | 9 +- .../LArGeoEndcap/EMECConstruction.h | 4 +- .../EndcapPresamplerConstruction.h | 2 +- .../EndcapPresamplerGeometryHelper.h | 6 +- .../LArGeoEndcap/src/EMECConstruction.cxx | 102 +- .../src/EMECSupportConstruction.cxx | 552 +++-- .../src/EndcapCryostatConstruction.cxx | 145 +- .../LArGeoEndcap/src/EndcapDMConstruction.cxx | 33 +- .../LArGeoEndcap/src/EndcapDMConstruction.h | 4 +- .../src/EndcapPresamplerConstruction.cxx | 16 +- .../src/EndcapPresamplerGeometryHelper.cxx | 16 +- .../LArGeoModel/LArGeoFcal/CMakeLists.txt | 13 +- .../LArGeoFcal/src/FCALConstruction.cxx | 119 +- .../LArGeoH62002Algs/CMakeLists.txt | 8 +- .../src/ExcluderConstruction.cxx | 30 +- .../src/FrontBeamConstructionH62002.cxx | 41 +- .../src/HECConstructionH62002.cxx | 122 +- .../src/LArDetectorFactoryH62002.cxx | 112 +- .../src/TableConstructionH62002.cxx | 35 +- .../LArGeoH62003Algs/CMakeLists.txt | 8 +- .../src/LArDetectorConstructionH62003.cxx | 79 +- .../LArGeoH62004Algs/CMakeLists.txt | 8 +- .../src/ExcluderConstructionH62004.cxx | 97 +- .../src/FCALConstructionH62004.cxx | 94 +- .../src/FrontBeamConstructionH62004.cxx | 51 +- .../src/HECConstructionH62004.cxx | 116 +- .../src/LArDetectorFactoryH62004.cxx | 82 +- .../src/MiddleBeamConstructionH62004.cxx | 26 +- .../src/ModulesConstructionH62004.cxx | 363 ++- .../src/ModulesConstructionH62004.h | 2 +- .../src/MovableTableConstructionH62004.cxx | 62 +- .../src/WarmTCConstructionH62004.cxx | 76 +- .../LArGeoH6Cryostats/CMakeLists.txt | 14 +- .../LArGeoH6Cryostats/MWPCConstruction.h | 3 +- .../LArGeoH6Cryostats/src/BPCConstruction.cxx | 133 +- .../src/H6CryostatConstruction.cxx | 36 +- .../src/MWPCConstruction.cxx | 54 +- .../src/WallsConstruction.cxx | 77 +- .../LArGeoModel/LArGeoHec/CMakeLists.txt | 9 +- .../LArGeoHec/src/HEC2WheelConstruction.cxx | 17 +- .../LArGeoHec/src/HECClampConstruction.cxx | 31 +- .../LArGeoHec/src/HECModuleConstruction.cxx | 21 +- .../LArGeoHec/src/HECWheelConstruction.cxx | 21 +- .../LArGeoModel/LArGeoMiniFcal/CMakeLists.txt | 9 +- .../LArGeoMiniFcal/MiniFcalConstruction.h | 16 +- .../src/MiniFcalConstruction.cxx | 53 +- .../LArGeoModel/LArGeoTBBarrel/CMakeLists.txt | 14 +- .../src/TBBarrelCryostatConstruction.cxx | 126 +- .../LArGeoModel/LArGeoTBEC/CMakeLists.txt | 11 +- .../src/CryostatConstructionTBEC.cxx | 97 +- .../LArGeoTBEC/src/EMECModuleConstruction.cxx | 122 +- .../src/LArDetectorConstructionTBEC.cxx | 85 +- .../LArGeoModel/LArHV/CMakeLists.txt | 7 +- .../LArReadoutGeometry/CMakeLists.txt | 4 +- .../LArReadoutGeometry/EMBAccordionDetails.h | 5 +- .../EMBBasicReadoutNumbers.h | 4 +- .../LArReadoutGeometry/EMBCell.h | 4 +- .../LArReadoutGeometry/EMBCellConstLink.h | 4 +- .../LArReadoutGeometry/EMBDetDescr.h | 4 +- .../LArReadoutGeometry/EMBDetectorManager.h | 4 +- .../LArReadoutGeometry/EMBDetectorRegion.h | 18 +- .../LArReadoutGeometry/EMBHVPathologies.h | 4 +- .../LArReadoutGeometry/EMECCell.h | 4 +- .../LArReadoutGeometry/EMECCellConstLink.h | 57 +- .../LArReadoutGeometry/EMECDetDescr.h | 4 +- .../LArReadoutGeometry/EMECDetectorManager.h | 4 +- .../LArReadoutGeometry/EMECDetectorRegion.h | 28 +- .../LArReadoutGeometry/FCALDetectorManager.h | 4 +- .../LArReadoutGeometry/FCALModule.h | 23 +- .../LArReadoutGeometry/FCALTile.h | 4 +- .../LArReadoutGeometry/FCALTube.h | 4 +- .../LArReadoutGeometry/FCALTubeConstLink.h | 4 +- .../LArReadoutGeometry/FCAL_ChannelMap.h | 4 +- .../LArReadoutGeometry/HECCell.h | 4 +- .../LArReadoutGeometry/HECCellConstLink.h | 57 +- .../LArReadoutGeometry/HECDetDescr.h | 4 +- .../LArReadoutGeometry/HECDetectorManager.h | 4 +- .../LArReadoutGeometry/HECDetectorRegion.h | 27 +- .../LArReadoutGeometry/HECLongBlock.h | 19 +- .../LArReadoutGeometry/HECRadialSegment.h | 4 +- .../LArReadoutGeometry/LArDetectorManager.h | 4 +- .../src/EMBAccordionDetails.cxx | 20 +- .../src/EMBBasicReadoutNumbers.cxx | 12 +- .../src/EMBCellConstLink.cxx | 28 - .../src/EMBDetectorRegion.cxx | 73 +- .../LArReadoutGeometry/src/EMECDetDescr.cxx | 65 +- .../src/EMECDetectorManager.cxx | 17 +- .../src/EMECDetectorRegion.cxx | 71 +- .../LArReadoutGeometry/src/FCALModule.cxx | 10 +- .../src/FCAL_ChannelMap.cxx | 8 +- .../src/GeoStraightAccSection.cxx | 10 +- .../src/HECCellConstLink.cxx | 28 - .../LArReadoutGeometry/src/HECDetDescr.cxx | 70 +- .../src/HECDetectorManager.cxx | 15 +- .../src/HECDetectorRegion.cxx | 24 +- .../LArReadoutGeometry/src/HECLongBlock.cxx | 66 +- .../src/HECRadialSegment.cxx | 34 - .../src/LArDetectorManager.cxx | 69 +- .../LArTrackingGeometry/CMakeLists.txt | 7 +- .../src/LArVolumeBuilder.cxx | 39 +- .../MuonCnv/MuonEventTPCnv/CMakeLists.txt | 7 +- .../MuonAGDD/src/MuonAGDDToolHelper.cxx | 9 +- .../MuonDetDescr/MuonAGDDBase/CMakeLists.txt | 5 +- .../MuonReadoutGeometry/CMakeLists.txt | 6 +- .../MuonReadoutGeometry/MuonDetectorManager.h | 2 +- .../MuonReadoutGeometry/MuonReadoutElement.h | 16 +- .../MuonReadoutGeometry/MuonStation.h | 3 +- .../src/CscReadoutElement.cxx | 4 +- .../src/MMReadoutElement.cxx | 2 +- .../src/MdtReadoutElement.cxx | 22 +- .../src/MuonDetectorElement.cxx | 3 - .../src/MuonReadoutElement.cxx | 16 +- .../MuonReadoutGeometry/src/MuonStation.cxx | 8 +- .../src/RpcReadoutElement.cxx | 4 +- .../src/sTgcReadoutElement.cxx | 2 +- .../MuonTrackingGeometry/CMakeLists.txt | 4 +- .../src/MuonInertMaterialBuilder.cxx | 8 +- .../src/MuonStationBuilder.cxx | 4 +- .../src/MuonStationTypeBuilder.cxx | 36 +- .../src/MuonTrackingGeometryBuilder.cxx | 4 +- MuonSpectrometer/MuonGeoModel/CMakeLists.txt | 13 +- .../MuonGeoModel/MuonGeoModel/DBReader.h | 254 +- .../MuonGeoModel/MuonGeoModel/Station.h | 19 +- MuonSpectrometer/MuonGeoModel/src/Csc.cxx | 4 +- .../MuonGeoModel/src/CscMultilayer.cxx | 21 +- MuonSpectrometer/MuonGeoModel/src/Cutout.cxx | 20 +- .../MuonGeoModel/src/DBReader.cxx | 1 - MuonSpectrometer/MuonGeoModel/src/Ded.cxx | 5 +- .../MuonGeoModel/src/DriftTube.cxx | 13 +- .../MuonGeoModel/src/MMSpacer.cxx | 11 +- .../MuonGeoModel/src/Micromegas.cxx | 47 +- .../MuonGeoModel/src/MultiLayer.cxx | 81 +- .../MuonGeoModel/src/MuonChamber.cxx | 124 +- .../src/MuonDetectorFactory001.cxx | 45 +- .../MuonGeoModel/src/RDBReaderAtlas.cxx | 10 +- MuonSpectrometer/MuonGeoModel/src/Rpc.cxx | 29 +- .../MuonGeoModel/src/RpcLayer.cxx | 23 +- .../MuonGeoModel/src/SimpleVolAction.cxx | 1 + MuonSpectrometer/MuonGeoModel/src/Spacer.cxx | 11 +- .../MuonGeoModel/src/SpacerBeam.cxx | 11 +- MuonSpectrometer/MuonGeoModel/src/Station.cxx | 270 +- MuonSpectrometer/MuonGeoModel/src/Tgc.cxx | 61 +- MuonSpectrometer/MuonGeoModel/src/sTGC.cxx | 33 +- .../src/MuonTGMeasAssocAlg.cxx | 2 +- .../D3PDMaker/JetTagD3PDMaker/CMakeLists.txt | 3 +- .../src/JetTagTwoTrackVertexFillerTool.cxx | 3 +- .../JetTagVxOnJetAxisTrackAssociationTool.cxx | 3 +- .../D3PDMaker/TileD3PDMaker/CMakeLists.txt | 1 + .../TileD3PDMaker/src/TileCellFillerTool.cxx | 1 + .../TileD3PDMaker/src/TileCellFillerTool.h | 2 + .../src/TileClusterFillerTool.cxx | 1 + .../src/TileClusterFilterAlg.cxx | 1 + .../src/TileCosmicMuonFilterAlg.cxx | 1 + .../TileD3PDMaker/src/TileEopFilterAlg.cxx | 1 + .../TileD3PDMaker/src/TileMuonFillerTool.cxx | 1 + .../TileD3PDMaker/src/TileMuonFilterAlg.cxx | 1 + .../TileD3PDMaker/src/TileTrackFillerTool.cxx | 1 + .../TileD3PDMaker/src/TileTrackFilterAlg.cxx | 1 + .../TileD3PDMaker/src/TrackTools.cxx | 1 + .../src/PhotonTruthTool.cxx | 4 - .../src/EgammaTagTool.cxx | 13 +- .../JetTagMonitoring/src/JetTagMonitoring.cxx | 52 +- Projects/Athena/build_externals.sh | 8 +- .../src/TrackDepositInCaloTool.cxx | 2 + .../src/MuidCaloEnergyTool.cxx | 2 +- .../MuonMomentumBalanceSignificanceTool.cxx | 3 +- .../TrackToCalo/src/MuonCaloEnergyTool.cxx | 4 +- .../src/CalibrationNtupleMakerTool.cxx | 3 +- .../egamma/egammaAlgs/src/egammaBuilder.h | 8 +- .../egammaAlgs/src/egammaForwardBuilder.h | 4 +- .../egammaAlgs/src/egammaRecBuilder.cxx | 3 - .../src/egammaSuperClusterBuilder.cxx | 2 - .../src/egammaSuperClusterBuilder.h | 3 +- .../src/electronSuperClusterBuilder.cxx | 2 - .../src/photonSuperClusterBuilder.cxx | 2 - .../egamma/egammaEvent/src/EMConvert.cxx | 2 +- .../Root/egammaMVAFunctions.cxx | 9 +- .../egammaMVACalib/src/egammaMVACalibTool.cxx | 10 +- .../egammaPerformance/src/ZeeTaPMonTool.cxx | 3 +- .../egammaTools/src/EMConversionBuilder.h | 11 +- .../src/LayerNumberAllocator.cxx | 2 +- .../tauMonitoring/src/tauMonTool.cxx | 3 +- .../Root/TauSubstructureVariables.cxx | 3 +- .../tauRecTools/src/TauCalibrateEM.cxx | 3 +- .../tauRecTools/src/TauCellVariables.cxx | 2 +- .../src/TauElectronVetoVariables.cxx | 4 +- .../G4AtlasTests/src/MDTHitsTestTool.cxx | 2 +- Simulation/G4Utilities/Geo2G4/CMakeLists.txt | 15 +- .../src/ExtParameterisedVolumeBuilder.cxx | 8 +- .../G4Utilities/Geo2G4/src/Geo2G4Builder.cxx | 13 +- .../G4Utilities/Geo2G4/src/Geo2G4Builder.h | 7 +- .../Geo2G4/src/Geo2G4STParameterisation.cxx | 4 +- .../Geo2G4/src/Geo2G4SolidFactory.cxx | 28 +- .../G4Utilities/GeoMaterial2G4/CMakeLists.txt | 7 +- .../src/FastCaloSimSvcV2.cxx | 2 + .../ISF_FatrasDetDescrModel/CMakeLists.txt | 5 +- .../PlanarDetElement.h | 4 +- .../src/PlanarDetLayerBuilder.cxx | 8 +- .../src/HadIntProcessorParametric.cxx | 1 + .../src/PhotonConversionTool.cxx | 1 + .../src/PhysicsValidationTool.cxx | 1 + .../ISF_FatrasTools/src/TransportEngine.cxx | 1 + .../ISF_FatrasTools/src/TransportTool.cxx | 1 + .../ISF_FatrasToolsID/CMakeLists.txt | 1 + .../src/HitCreatorSilicon.cxx | 3 +- TestBeam/TBRec/src/TBTrackToCaloAlg.cxx | 3 - .../TileCosmicAlgs/src/TileMuonFitter.cxx | 2 + TileCalorimeter/TileDetDescr/CMakeLists.txt | 7 +- .../TileDetDescr/src/CellVolumes.h | 83 +- .../TileDetDescr/src/TileDetDescrManager.cxx | 17 +- .../src/TileFCSmStepToTileHitVec.cxx | 1 + .../CombinedScintillator/CMakeLists.txt | 10 +- .../TileAncillary/DeadMaterial/CMakeLists.txt | 10 +- .../TileAncillary/LarCrate/CMakeLists.txt | 10 +- .../TileAncillary/MuonWall/CMakeLists.txt | 10 +- .../PhantomCalorimeter/CMakeLists.txt | 10 +- .../src/TileGeoG4DMLookupBuilder.cc | 1 + TileCalorimeter/TileGeoModel/CMakeLists.txt | 13 +- .../TileGeoModel/src/TileAtlasFactory.cxx | 912 +++---- .../TileGeoModel/src/TileDetectorFactory.cxx | 318 +-- .../TileGeoModel/src/TileGeoCutBuilder.cxx | 8 +- .../src/TileGeoSectionBuilder.cxx | 822 +++---- .../TileGeoModel/src/TileTBFactory.cxx | 288 +-- .../TileRecUtils/src/TileCellBuilder.cxx | 1 + .../TileTrackingGeometry/CMakeLists.txt | 7 +- .../src/TileVolumeBuilder.cxx | 20 +- .../ActsGeometry/src/ActsDetectorElement.cxx | 8 +- .../TrkDetDescrGeoModelCnv/CMakeLists.txt | 7 +- .../src/GeoMaterialConverter.cxx | 8 +- .../src/GeoShapeConverter.cxx | 14 +- .../TrkDetElementBase/CMakeLists.txt | 6 +- .../TrkDetElementBase/TrkDetElementBase.h | 7 +- .../TrkJiveXML/src/TrackRetriever.cxx | 8 +- .../src/STEP_Propagator.cxx | 1 + .../src/DistributedKalmanFilter.cxx | 3 +- .../src/GlobalChi2Fitter.cxx | 4 + .../src/ForwardKalmanFitter.cxx | 2 + .../src/FieldIntegralByTrackQueryTool.cxx | 4 +- .../src/TruthTrackBuilder.cxx | 5 +- .../src/TrackValidationNtupleWriter.cxx | 1 + .../TrkVKalVrtFitter/src/VKalMagFld.cxx | 1 + .../ITrackToVertexIPEstimator.h | 1 + .../TrackToVertexIPEstimator.h | 1 + .../src/TrigT2HistoPrmVtx.cxx | 6 +- .../src/TrigT2HistoPrmVtxAllTE.cxx | 6 +- .../TrigmuComb/TrigmuComb/muCombMT.h | 1 + .../TrigBphysHypo/src/TrigL2TrkMassHypo.cxx | 2 +- .../TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx | 2 + .../TrigEgammaHypo/src/TrigEFMtAllTE.cxx | 2 + .../TrigEgammaHypo/src/TrigL2ElectronFex.cxx | 2 + .../TrigEgammaHypo/src/TrigL2ElectronFexMT.h | 2 + .../TrigEgammaHypo/src/TrigL2ElectronHypo.cxx | 1 + .../src/TrigEFDPhiMetJetAllTE.cxx | 3 +- .../src/TrigCaloRatioHypo.cxx | 2 +- .../TrigMuonHypo/TrigMuonEFCombinerHypoTool.h | 1 + .../TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h | 1 + .../TrigJetMonitoring/src/HLTJetMonTool.cxx | 72 +- graphics/GeometryJiveXML/CMakeLists.txt | 3 +- .../GeometryJiveXML/src/GeometryWriter.cxx | 6 +- .../VP12DGeometrySystems/CMakeLists.txt | 4 +- .../StoreGateGeometryReader.h | 2 - .../VP12DGeometrySystem.h | 2 +- .../src/StoreGateGeometryReader.cxx | 49 +- .../src/VP12DGeometrySystem.cxx | 20 +- .../src/IParticleCollHandle_CaloCluster.cxx | 8 +- .../src/IParticleHandle_Muon.cxx | 3 +- .../src/IParticleHandle_TrackParticle.cxx | 3 +- .../VP1CaloReadoutSystems/CMakeLists.txt | 1 + .../src/VP1CaloReadoutSystem.cxx | 20 +- .../VP1Systems/VP1CaloSystems/CMakeLists.txt | 6 +- .../VP1CaloSystems/VP1CaloCellController.h | 3 +- .../VP1CaloSystems/VP1CaloCells.h | 8 +- .../src/VP1CaloCellController.cxx | 2 +- .../VP1CaloSystems/src/VP1CaloCells.cxx | 2 - .../VP1CaloSystems/src/VP1MbtsHelper.cxx | 6 +- .../VP1GeometrySystems/CMakeLists.txt | 5 +- .../VP1GeometrySystems/src/DumpShape.cxx | 10 +- .../src/VP1GeometrySystem.cxx | 4 +- .../VP1GeometrySystems/src/VolumeHandle.cxx | 4 +- .../VP1Systems/VP1PRDSystems/CMakeLists.txt | 4 +- .../src/MuonChamberProjectionHelper.cxx | 4 +- .../VP1PRDSystems/src/PRDHandle_TGC.cxx | 2 +- .../VP1RawDataSystems/CMakeLists.txt | 4 +- .../src/VP1RawDataHandle_BCM_RDO.cxx | 6 +- .../src/VP1RawDataHandle_LUCID.cxx | 2 +- .../VP1Systems/VP1TrackSystems/CMakeLists.txt | 4 +- .../src/SimHitHandle_SiHit.cxx | 2 +- .../src/TrackPropagationHelper.cxx | 1 + .../VP1TrackingGeometrySystems/CMakeLists.txt | 4 +- .../src/TrackingVolumeToSoNode.cxx | 24 +- .../src/VP1VertexCollection.cxx | 5 +- graphics/VP1/VP1Utils/CMakeLists.txt | 4 +- graphics/VP1/VP1Utils/src/HitToSodeNode.cxx | 2 +- .../VP1/VP1Utils/src/SbPolyhedrizeAction.cxx | 12 +- .../VP1/VP1Utils/src/SoVisualizeAction.cxx | 15 +- 818 files changed, 10799 insertions(+), 29385 deletions(-) delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/CMakeLists.txt delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/CellBinning.h delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/CellPartitioning.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/ConstLink.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAbsPositionInfo.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAccessVolAndSTAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAlignableTransform.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoBox.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoClearAbsPosAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCons.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCountVolAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCountVolAndSTAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCutVolAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoElement.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoEllipticalTube.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFacet.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFullPhysVol.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoGenericTrap.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoGraphNode.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoIdentifierTag.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoLogVol.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoMaterial.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNameTag.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNodeAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNodePath.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPVConstLink.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPVLink.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPara.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPcon.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPerfUtils.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPgon.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPhysVol.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPolyhedrizeAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPolyhedron.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPrintGraphAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialDenominator.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialIdentifier.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialTransformer.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShape.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeIntersection.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapePath.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeShift.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeSubtraction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeUnion.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSimplePolygonBrep.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTessellatedSolid.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTorus.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTransform.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTrap.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTraversalState.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTrd.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTube.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTubs.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVAlignmentStore.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorElement.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorManager.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVFullPhysVol.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVPhysVol.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVolumeAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVolumeCursor.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoXF.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeometryMap.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/Path.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/Query.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/RCBase.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/TemplateVolAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/TinyHepTransform.h delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/doc/packagedoc.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/BooleanProcessor.src delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/CellBinning.cxx delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/src/CellPartitioning.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoAbsPositionInfo.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolAndSTAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolumeAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolumeAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoAlignableTransform.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoBox.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoClearAbsPosAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoCons.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoCountVolAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoCountVolAndSTAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoCutVolAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoElement.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoEllipticalTube.cxx delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/src/GeoFacet.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoFullPhysVol.cxx delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/src/GeoGenericTrap.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoGraphNode.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoIdentifierTag.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoLogVol.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoMaterial.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoNameTag.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoNodeAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPVConstLink.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPVLink.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPara.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPcon.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPerfUtils.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPgon.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPhysVol.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPolyhedrizeAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPolyhedron.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoPrintGraphAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoSelClearAbsPosAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoSelClearAbsPosAction.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialDenominator.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialIdentifier.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialTransformer.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoShape.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeIntersection.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeShift.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeSubtraction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeUnion.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoSimplePolygonBrep.cxx delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/src/GeoTessellatedSolid.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoTorus.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoTransform.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoTrap.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoTraversalState.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoTrd.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoTube.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoTubs.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorElement.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorFactory.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorManager.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoVFullPhysVol.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoVPhysVol.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoVolumeAction.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoVolumeCursor.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeoXF.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/GeometryMap.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/PolygonTriangulator.cxx delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/src/PolygonTriangulator.h delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/RCBase.cxx delete mode 100755 DetectorDescription/GeoModel/GeoModelKernel/src/TemplateVolAction.cxx delete mode 100644 DetectorDescription/GeoModel/GeoModelKernel/src/qt.pro delete mode 100755 InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.icc rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/DBM_Det.h (88%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/DBM_Module.h (90%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/DBM_ModuleCage.h (84%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/DBM_Services.h (80%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/DBM_Telescope.h (81%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelBarrel.h (89%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelCable.h (92%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelChip.h (88%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelDetailedStaveSupport.h (80%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelDisk.h (87%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelDiskSLHC.h (85%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelDiskSupports.h (92%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelECCable.h (86%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelEndCap.h (89%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelEnvelope.h (84%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelFluid.h (91%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelFrame.h (90%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelHybrid.h (88%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelIBLFwdServices.h (81%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelIBLFwdSvcCADModel.h (76%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelIBLFwdSvcModel1.h (76%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelIFlexServices.h (79%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelLadder.h (95%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelLadderServices.h (54%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelLayer.h (95%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelModule.h (90%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelOldFrame.h (92%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelPigtail.h (86%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelRingSLHC.h (89%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelServices.h (95%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelSiCrystal.h (95%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelSimpleStaveSupport.h (84%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelStaveRing.h (83%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelStaveRingServices.h (84%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelStaveSupport.h (86%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoPixelTMT.h (83%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/GeoVPixelFactory.h (94%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/OraclePixGeoManager.h (98%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelDetectorDC1DC2.h (88%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelDetectorFactory.h (100%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelDetectorFactoryDC2.h (100%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelDetectorFactorySR1.h (100%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelDetectorTool.h (100%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelGeoModelAthenaComps.h (100%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelGeometryManager.h (98%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelLegacyManager.h (100%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelMaterialMap.h (100%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelStaveTypes.h (100%) rename InnerDetector/InDetDetDescr/PixelGeoModel/{PixelGeoModel => src}/PixelSwitches.h (100%) delete mode 100755 LArCalorimeter/LArDetDescr/LArDetDescr/FindVolAction.h delete mode 100755 LArCalorimeter/LArDetDescr/src/FindVolAction.cxx rename {DetectorDescription/GeoModel/GeoModelKernel => LArCalorimeter/LArG4/LArG4Validation}/src/GeoXPEngine.cxx (98%) rename {DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel => LArCalorimeter/LArG4/LArG4Validation/src}/GeoXPEngine.h (93%) diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt b/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt index 87f8b8aa5b4..f8006b9f70b 100644 --- a/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt +++ b/AtlasGeometryCommon/BeamPipeGeoModel/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( BeamPipeGeoModel ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities PRIVATE Control/SGTools @@ -20,17 +19,18 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( BeamPipeGeoModelLib src/*.cxx PUBLIC_HEADERS BeamPipeGeoModel - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} GeoModelKernel GeoModelUtilities StoreGateLib SGtests + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities StoreGateLib PRIVATE_LINK_LIBRARIES SGTools AthenaKernel GaudiKernel ) atlas_add_component( BeamPipeGeoModel src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} GeoModelKernel GeoModelUtilities SGTools StoreGateLib SGtests GaudiKernel BeamPipeGeoModelLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities SGTools StoreGateLib GaudiKernel BeamPipeGeoModelLib ) diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx index ff888b08c63..0838e4a43bc 100755 --- a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx +++ b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorFactory.cxx @@ -15,6 +15,8 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoTransform.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" @@ -38,7 +40,7 @@ BeamPipeDetectorFactory::BeamPipeDetectorFactory(StoreGateSvc *detStore, m_materialManager(0), m_detectorStore(detStore), m_access(pAccess), - m_centralRegionZMax(1500*CLHEP::mm) + m_centralRegionZMax(1500*GeoModelKernelUnits::mm) {} BeamPipeDetectorFactory::~BeamPipeDetectorFactory() @@ -67,8 +69,8 @@ void BeamPipeDetectorFactory::create(GeoPhysVol *world) // It is split into 3 sections. // left, right and central. This is to allow different truth scoring in the different regions. - m_centralRegionZMax = 1500 * CLHEP::mm; // For backward compatibility in DB. - if (bpipeGeneral->size() != 0) m_centralRegionZMax = (*bpipeGeneral)[0]->getDouble("CENTRALZMAX") * CLHEP::mm; + m_centralRegionZMax = 1500 * GeoModelKernelUnits::mm; // For backward compatibility in DB. + if (bpipeGeneral->size() != 0) m_centralRegionZMax = (*bpipeGeneral)[0]->getDouble("CENTRALZMAX") * GeoModelKernelUnits::mm; EnvelopeShapes envelopes; @@ -102,16 +104,16 @@ void BeamPipeDetectorFactory::create(GeoPhysVol *world) double beamy = 0.0; double beamz = 0.0; if (bpipePosition->size() != 0) { - beamx = (*bpipePosition)[0]->getDouble("POSX") * CLHEP::mm; - beamy = (*bpipePosition)[0]->getDouble("POSY") * CLHEP::mm; - beamz = (*bpipePosition)[0]->getDouble("POSZ") * CLHEP::mm; + beamx = (*bpipePosition)[0]->getDouble("POSX") * GeoModelKernelUnits::mm; + beamy = (*bpipePosition)[0]->getDouble("POSY") * GeoModelKernelUnits::mm; + beamz = (*bpipePosition)[0]->getDouble("POSZ") * GeoModelKernelUnits::mm; } // Only shift the central section // Central world->add(tag); - world->add(new GeoTransform(HepGeom::Translate3D(beamx,beamy,beamz))); + world->add(new GeoTransform(GeoTrf::Translate3D(beamx,beamy,beamz))); world->add(pvMotherCentral); m_detectorManager->addTreeTop(pvMotherCentral); // @@ -122,7 +124,7 @@ void BeamPipeDetectorFactory::create(GeoPhysVol *world) // FwdMinus world->add(tag); - world->add(new GeoTransform(HepGeom::RotateY3D(180*CLHEP::degree))); + world->add(new GeoTransform(GeoTrf::RotateY3D(180*GeoModelKernelUnits::degree))); world->add(pvMotherFwdMinus); m_detectorManager->addTreeTop(pvMotherFwdMinus); @@ -148,12 +150,12 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region) for (unsigned int itemp=0; itemp<bpipeSections->size(); itemp++) { std::string material = (*bpipeSections)[itemp]->getString("MATERIAL"); - double rMin1 = (*bpipeSections)[itemp]->getDouble("RMIN1") * CLHEP::mm; - double rMax1 = (*bpipeSections)[itemp]->getDouble("RMAX1") * CLHEP::mm; - double rMin2 = (*bpipeSections)[itemp]->getDouble("RMIN2") * CLHEP::mm; - double rMax2 = (*bpipeSections)[itemp]->getDouble("RMAX2") * CLHEP::mm; - double z = (*bpipeSections)[itemp]->getDouble("Z") * CLHEP::mm; - double dZ = (*bpipeSections)[itemp]->getDouble("DZ") * CLHEP::mm; + double rMin1 = (*bpipeSections)[itemp]->getDouble("RMIN1") * GeoModelKernelUnits::mm; + double rMax1 = (*bpipeSections)[itemp]->getDouble("RMAX1") * GeoModelKernelUnits::mm; + double rMin2 = (*bpipeSections)[itemp]->getDouble("RMIN2") * GeoModelKernelUnits::mm; + double rMax2 = (*bpipeSections)[itemp]->getDouble("RMAX2") * GeoModelKernelUnits::mm; + double z = (*bpipeSections)[itemp]->getDouble("Z") * GeoModelKernelUnits::mm; + double dZ = (*bpipeSections)[itemp]->getDouble("DZ") * GeoModelKernelUnits::mm; int secNum = (*bpipeSections)[itemp]->getInt("SECNUM"); double zmin = z - dZ; @@ -204,7 +206,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region) shape = new GeoCons(rMin1,rMin2, rMax1,rMax2, dZnew, - 0*CLHEP::deg,360*CLHEP::deg); + 0*GeoModelKernelUnits::deg,360*GeoModelKernelUnits::deg); isTube = false; } @@ -221,7 +223,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region) pvSection->ref(); // Determine if this is a geometry where the first section can act as the mother of the following - // sections. The following sections are only added to this if their ave CLHEP::radius is within the CLHEP::radial + // sections. The following sections are only added to this if their ave GeoModelKernelUnits::radius is within the GeoModelKernelUnits::radial // extent and their ave z is within the z extent. // As soon as one section fails to meet this the latter sections are not considered. if(secNum==1) { @@ -240,7 +242,7 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region) GeoTransform* tfSection = 0; - if (znew != 0 && (secNum==1 || !addToFirstSection)) tfSection = new GeoTransform(HepGeom::TranslateZ3D(znew)); + if (znew != 0 && (secNum==1 || !addToFirstSection)) tfSection = new GeoTransform(GeoTrf::TranslateZ3D(znew)); GeoNameTag* ntSection = new GeoNameTag(name); ntSection->ref(); @@ -267,10 +269,10 @@ void BeamPipeDetectorFactory::addSections(GeoPhysVol* parent, int region) GeoTransform* tfSectionRot = 0; if (isTube) { // No need for rotation. - tfSectionRot = new GeoTransform(HepGeom::TranslateZ3D(-znew)); + tfSectionRot = new GeoTransform(GeoTrf::TranslateZ3D(-znew)); } else { // For cone we need to rotate around Y axis. - tfSectionRot = new GeoTransform(HepGeom::TranslateZ3D(-znew)*HepGeom::RotateY3D(180*CLHEP::deg)); + tfSectionRot = new GeoTransform(GeoTrf::TranslateZ3D(-znew)*GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg)); } parent->add(ntSection); parent->add(tfSectionRot); @@ -303,8 +305,8 @@ BeamPipeDetectorFactory::makeEnvelope(IRDBRecordset_ptr bpipeEnvelope) std::vector<EnvelopeEntry> fwdEntry; for (unsigned int i=0; i<bpipeEnvelope->size(); i++) { - double z = (*bpipeEnvelope)[i]->getDouble("Z") * CLHEP::mm; - double r = (*bpipeEnvelope)[i]->getDouble("R") * CLHEP::mm; + double z = (*bpipeEnvelope)[i]->getDouble("Z") * GeoModelKernelUnits::mm; + double r = (*bpipeEnvelope)[i]->getDouble("R") * GeoModelKernelUnits::mm; EnvelopeEntry entry(z,r); if (z < m_centralRegionZMax) { centralEntry.push_back(entry); @@ -327,7 +329,7 @@ BeamPipeDetectorFactory::makeEnvelope(IRDBRecordset_ptr bpipeEnvelope) envelopes.centralShape = new GeoTube(0, rFwd, m_centralRegionZMax); } else { // This case probably will never get used and is untested. - GeoPcon* pcone = new GeoPcon(0, 360*CLHEP::deg); + GeoPcon* pcone = new GeoPcon(0, 360*GeoModelKernelUnits::deg); pcone->addPlane(-m_centralRegionZMax,0,rFwd); for (int i=centralEntry.size()-1; i>=0; i--) { @@ -347,12 +349,12 @@ BeamPipeDetectorFactory::makeEnvelope(IRDBRecordset_ptr bpipeEnvelope) // forward { - GeoPcon* pcone = new GeoPcon(0, 360*CLHEP::deg); + GeoPcon* pcone = new GeoPcon(0, 360*GeoModelKernelUnits::deg); pcone->addPlane(m_centralRegionZMax,0,rFwd); if (fwdEntry.size() == 0) { // Unlikely case but for completeness // we make small fwd region if everything is in central region. - pcone->addPlane(m_centralRegionZMax+0.1*CLHEP::mm,0,rFwd); + pcone->addPlane(m_centralRegionZMax+0.1*GeoModelKernelUnits::mm,0,rFwd); } for (unsigned int i=0; i<fwdEntry.size(); i++) { double z = fwdEntry[i].z(); @@ -371,12 +373,12 @@ BeamPipeDetectorFactory::EnvelopeShapes BeamPipeDetectorFactory::makeEnvelopeOld(IRDBRecordset_ptr atlasMother) { - double iir = (*atlasMother)[0]->getDouble("IDETIR")*CLHEP::cm; - double cir = (*atlasMother)[0]->getDouble("CALOIR")*CLHEP::cm; - double mir = (*atlasMother)[0]->getDouble("MUONIR")*CLHEP::cm; - double totlen = (*atlasMother)[0]->getDouble("ZMAX")*CLHEP::cm; - double ilen = (*atlasMother)[0]->getDouble("IDETZMX")*CLHEP::cm; - double clen = (*atlasMother)[0]->getDouble("CALOZMX")*CLHEP::cm; + double iir = (*atlasMother)[0]->getDouble("IDETIR")*GeoModelKernelUnits::cm; + double cir = (*atlasMother)[0]->getDouble("CALOIR")*GeoModelKernelUnits::cm; + double mir = (*atlasMother)[0]->getDouble("MUONIR")*GeoModelKernelUnits::cm; + double totlen = (*atlasMother)[0]->getDouble("ZMAX")*GeoModelKernelUnits::cm; + double ilen = (*atlasMother)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; + double clen = (*atlasMother)[0]->getDouble("CALOZMX")*GeoModelKernelUnits::cm; // Central Section. GeoTube * bpipeCentralShape = new GeoTube(0, iir, m_centralRegionZMax); @@ -386,7 +388,7 @@ BeamPipeDetectorFactory::makeEnvelopeOld(IRDBRecordset_ptr atlasMother) // Right section (+ve z) - GeoPcon* bpipeEnvPcone = new GeoPcon(0, 360*CLHEP::deg); + GeoPcon* bpipeEnvPcone = new GeoPcon(0, 360*GeoModelKernelUnits::deg); bpipeEnvPcone->addPlane(m_centralRegionZMax,0,iir); bpipeEnvPcone->addPlane(ilen,0,iir); bpipeEnvPcone->addPlane(ilen,0,cir); diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/CMakeLists.txt b/AtlasGeometryCommon/CavernInfraGeoModel/CMakeLists.txt index 5309743d9e3..b8b5a6b095b 100644 --- a/AtlasGeometryCommon/CavernInfraGeoModel/CMakeLists.txt +++ b/AtlasGeometryCommon/CavernInfraGeoModel/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( CavernInfraGeoModel ) atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities PRIVATE Control/StoreGate @@ -18,15 +17,16 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) +find_package( Eigen ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( CavernInfraGeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelKernel GeoModelUtilities StoreGateLib SGtests GaudiKernel ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities StoreGateLib SGtests GaudiKernel ) # Install files from the package: atlas_install_headers( CavernInfraGeoModel ) diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx index 39c25768280..e1678ccd3d1 100755 --- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx +++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory.cxx @@ -79,20 +79,20 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world) //// -----------------------------------Build SX1------------------------------------------ recordIndex = elementMap["SX1"]; - double SX1Xpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double SX1Ypos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double SX1Zpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double SX1HalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double SX1HalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double SX1HalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double SX1Xpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double SX1Ypos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double SX1Zpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double SX1HalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double SX1HalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double SX1HalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["SX1Air"]; - double SX1AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double SX1AirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double SX1AirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double SX1AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double SX1AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double SX1AirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double SX1AirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double SX1AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; - GeoTransform *s1XYZt = new GeoTransform(HepGeom::Translate3D(SX1Xpos,SX1Ypos,SX1Zpos)); //1.7 -8.7 + GeoTransform *s1XYZt = new GeoTransform(GeoTrf::Translate3D(SX1Xpos,SX1Ypos,SX1Zpos)); //1.7 -8.7 world->add(s1XYZt); GeoBox *SX1 = new GeoBox(SX1HalfWidth ,SX1HalfHeight, SX1HalfLength); // 11.7, 6.5, 42.3 GeoLogVol *lvsx1s = new GeoLogVol("SX1Steel",SX1,shieldSteel); @@ -101,7 +101,7 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world) world->add(sx1); - GeoTransform *s1z = new GeoTransform(HepGeom::TranslateY3D(SX1AirYpos)); + GeoTransform *s1z = new GeoTransform(GeoTrf::TranslateY3D(SX1AirYpos)); sx1->add(s1z); GeoBox *SX1Air = new GeoBox( SX1AirHalfWidth, SX1AirHalfHeight, SX1AirHalfLength); GeoLogVol *lvsx1a = new GeoLogVol("SX1Air",SX1Air,air); @@ -112,49 +112,49 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world) //// ------------------First: Build cavern with concrete----------------------------- recordIndex = elementMap["WallACConc"]; - double WallACConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double WallACConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double WallACConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double WallACConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double WallACConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double WallACConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; double WallACConcSphi= (*cavernElements)[recordIndex]->getDouble("SPHI"); double WallACConcDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); recordIndex = elementMap["BoxConc"]; - double BoxConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double BoxConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double BoxConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double BoxConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double BoxConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double BoxConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["VaultConc"]; - double VaultConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double VaultConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double VaultConcYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); - double VaultConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double VaultConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double VaultConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double VaultConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double VaultConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double VaultConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; double VaultConcSphi= (*cavernElements)[recordIndex]->getDouble("SPHI"); double VaultConcDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); recordIndex = elementMap["HallConc"]; - double HallConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double HallConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double HallConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double HallConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double HallConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double HallConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["BoxConcW"]; - double BoxConcWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxConcWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxConcWYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["BoxConcVleft"]; - double BoxConcVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxConcVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxConcVleftYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["BoxConcVright"]; - double BoxConcVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxConcVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxConcVrightYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["SurfaceFloor"]; - double SurfaceFloorXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double SurfaceFloorZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double SurfaceFloorHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double SurfaceFloorHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double SurfaceFloorHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double SurfaceFloorXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double SurfaceFloorZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double SurfaceFloorHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double SurfaceFloorHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double SurfaceFloorHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; GeoTubs *WallACConcrete = new GeoTubs(WallACConcMinR, WallACConcMaxR, WallACConcHalfHeight, WallACConcSphi, WallACConcDphi); @@ -163,51 +163,51 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world) GeoBox *HallConcrete = new GeoBox(HallConcHalfLength, HallConcHalfWidth, HallConcHalfHeight); GeoBox *SurfaceFloor = new GeoBox(SurfaceFloorHalfLength, SurfaceFloorHalfWidth, SurfaceFloorHalfHeight); - HepGeom::Transform3D BoxCutWallConc = HepGeom::TranslateZ3D(BoxConcWZpos)*HepGeom::RotateY3D(BoxConcWYrotate); - HepGeom::Transform3D BoxCutVaultLeftConc = HepGeom::TranslateZ3D(BoxConcVleftZpos)*HepGeom::RotateY3D(BoxConcVleftYrotate); - HepGeom::Transform3D BoxCutVaulRightConc = HepGeom::TranslateZ3D(BoxConcVrightZpos)*HepGeom::RotateY3D(BoxConcVrightYrotate); + GeoTrf::Transform3D BoxCutWallConc = GeoTrf::TranslateZ3D(BoxConcWZpos)*GeoTrf::RotateY3D(BoxConcWYrotate); + GeoTrf::Transform3D BoxCutVaultLeftConc = GeoTrf::TranslateZ3D(BoxConcVleftZpos)*GeoTrf::RotateY3D(BoxConcVleftYrotate); + GeoTrf::Transform3D BoxCutVaulRightConc = GeoTrf::TranslateZ3D(BoxConcVrightZpos)*GeoTrf::RotateY3D(BoxConcVrightYrotate); recordIndex = elementMap["HoleJN"]; - double HoleJNrmin = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::mm; - double HoleJNrmax = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::mm; - double HoleJNdz = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::mm; + double HoleJNrmin = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::mm; + double HoleJNrmax = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::mm; + double HoleJNdz = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::mm; GeoTubs *HoleJN = new GeoTubs(HoleJNrmin,HoleJNrmax,HoleJNdz, 0.,2.*M_PI); // should be 2300mm in radius recordIndex = elementMap["WallAAir"]; - double WallAAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double WallAAirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; + double WallAAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double WallAAirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; recordIndex = elementMap["WallCAir"]; - double WallCAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double WallCAirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; + double WallCAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double WallCAirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; double WallCAirZrotate = (*cavernElements)[recordIndex]->getDouble("ZROTATE"); //---------------- Cut the vault and side walls---------------------------- - const GeoShape & CutWallConc = (*WallACConcrete).subtract((*BoxConc) << HepGeom::Transform3D(BoxCutWallConc)). - subtract((*HoleJN) << HepGeom::RotateY3D(M_PI*0.5) << HepGeom::TranslateZ3D(-0.5*WallAAirZpos)*HepGeom::TranslateY3D(-WallCAirXpos*1.0) ); - const GeoShape & CutVaultConc = (*VaultConcrete).subtract((*BoxConc) << HepGeom::Transform3D(BoxCutVaultLeftConc)). - subtract((*BoxConc) << HepGeom::Transform3D(BoxCutVaulRightConc)); + const GeoShape & CutWallConc = (*WallACConcrete).subtract((*BoxConc) << GeoTrf::Transform3D(BoxCutWallConc)). + subtract((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ); + const GeoShape & CutVaultConc = (*VaultConcrete).subtract((*BoxConc) << GeoTrf::Transform3D(BoxCutVaultLeftConc)). + subtract((*BoxConc) << GeoTrf::Transform3D(BoxCutVaulRightConc)); recordIndex = elementMap["ShaftCut"]; - double ShaftCutZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double ShaftCutZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double ShaftCutYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); - double ShaftCutHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double ShaftCutMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double ShaftCutMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double ShaftCutHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double ShaftCutMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double ShaftCutMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; recordIndex = elementMap["PX14Conc"]; - double PX14ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double PX14ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double PX14ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double PX14ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double PX14ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double PX14ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double PX14ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double PX14ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double PX14ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double PX14ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; recordIndex = elementMap["PX16Conc"]; - double PX16ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double PX16ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double PX16ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double PX16ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double PX16ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double PX16ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double PX16ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double PX16ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double PX16ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double PX16ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; //--------------- Build concrete shafts------------------------------. GeoTube *ShaftCut = new GeoTube(ShaftCutMinR, ShaftCutMaxR, ShaftCutHalfHeight); @@ -215,41 +215,41 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world) GeoTube *PX16Conc = new GeoTube(PX16ConcMinR, PX16ConcMaxR, PX16ConcHalfHeight); const GeoShape & ShaftsConc= - ((*PX14Conc) << HepGeom::TranslateX3D(PX14ConcXpos)*HepGeom::TranslateY3D(PX14ConcYpos)). - add((*PX16Conc) << HepGeom::TranslateX3D(PX16ConcXpos)*HepGeom::TranslateY3D(PX16ConcYpos)). - subtract((*ShaftCut) << HepGeom::TranslateZ3D(ShaftCutZpos)*HepGeom::RotateY3D(ShaftCutYrotate)); + ((*PX14Conc) << GeoTrf::TranslateX3D(PX14ConcXpos)*GeoTrf::TranslateY3D(PX14ConcYpos)). + add((*PX16Conc) << GeoTrf::TranslateX3D(PX16ConcXpos)*GeoTrf::TranslateY3D(PX16ConcYpos)). + subtract((*ShaftCut) << GeoTrf::TranslateZ3D(ShaftCutZpos)*GeoTrf::RotateY3D(ShaftCutYrotate)); recordIndex = elementMap["WallCConc"]; - double WallCConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double WallCConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; + double WallCConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double WallCConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; double WallCConcZrotate = (*cavernElements)[recordIndex]->getDouble("ZROTATE"); recordIndex = elementMap["WallAConc"]; - double WallAConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double WallAConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; + double WallAConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double WallAConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; recordIndex = elementMap["ShaftsConc"]; - double ShaftsConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double ShaftsConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; //--------------- Build concrete nose ------------------------------. recordIndex =elementMap["BoxConcJN"]; - double BoxConcJNDX = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::mm; - double BoxConcJNDY = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::mm; - double BoxConcJNDZ = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::mm; - double BoxConcJNXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::mm; + double BoxConcJNDX = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::mm; + double BoxConcJNDY = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::mm; + double BoxConcJNDZ = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::mm; + double BoxConcJNXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::mm; recordIndex =elementMap["BoxConcExtraJN"]; - double BoxConcExtraJNDX = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::mm; - double BoxConcExtraJNDY = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::mm; - double BoxConcExtraJNDZ = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::mm; - double BoxConcExtraJNXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::mm; + double BoxConcExtraJNDX = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::mm; + double BoxConcExtraJNDY = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::mm; + double BoxConcExtraJNDZ = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::mm; + double BoxConcExtraJNXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::mm; double BoxConcExtraJNYpos = (*cavernElements)[recordIndex]->getDouble("YPOS"); recordIndex =elementMap["StrutConcJN"]; - double StrutConcJNDX = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::mm; - double StrutConcJNDY = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::mm; - double StrutConcJNDZ = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::mm; - double StrutConcJNXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::mm; - double StrutConcJNYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::mm; - double StrutConcJNZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::mm; + double StrutConcJNDX = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::mm; + double StrutConcJNDY = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::mm; + double StrutConcJNDZ = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::mm; + double StrutConcJNXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::mm; + double StrutConcJNYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::mm; + double StrutConcJNZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::mm; GeoBox *BoxConcJNC = new GeoBox(BoxConcJNDX,BoxConcJNDY,BoxConcJNDZ); GeoBox *BoxConcJNA = new GeoBox(BoxConcJNDX,BoxConcJNDY,BoxConcJNDZ); @@ -258,77 +258,77 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world) const GeoBox *StrutConcJN = new GeoBox(StrutConcJNDX,StrutConcJNDY,StrutConcJNDZ); recordIndex = elementMap["CavernAir"]; - double CavernAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double CavernAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; //----------------Assemble everything--------------------------------. const GeoShape & Concrete= (*HallConcrete). - add((CutWallConc << HepGeom::TranslateZ3D(WallCConcZpos)*HepGeom::TranslateX3D(WallCConcXpos)*HepGeom::RotateZ3D(WallCConcZrotate))). - add((ShaftsConc << HepGeom::TranslateZ3D(ShaftsConcZpos))). - add((CutVaultConc << HepGeom::TranslateZ3D(VaultConcZpos)*HepGeom::RotateY3D(VaultConcYrotate))). - add((*SurfaceFloor) << HepGeom::TranslateZ3D(SurfaceFloorZpos)*HepGeom::TranslateX3D(SurfaceFloorXpos)). - add((CutWallConc << HepGeom::TranslateZ3D(WallAConcZpos)*HepGeom::TranslateX3D(WallAConcXpos))). - - add((*BoxConcJNC) << HepGeom::TranslateX3D(BoxConcJNXpos) * HepGeom::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add((*BoxConcStupidExtraJNC) << HepGeom::TranslateX3D(BoxConcExtraJNXpos) * HepGeom::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) * HepGeom::TranslateY3D(-BoxConcExtraJNYpos) ). - add((*BoxConcJNA) << HepGeom::TranslateX3D(-BoxConcJNXpos-15*CLHEP::mm) * HepGeom::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add((*BoxConcStupidExtraJNA) << HepGeom::TranslateX3D(-BoxConcExtraJNXpos-15*CLHEP::mm) * HepGeom::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) * HepGeom::TranslateY3D(BoxConcExtraJNYpos) ). - - add((*StrutConcJN) << HepGeom::TranslateX3D(StrutConcJNXpos) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add((*StrutConcJN) << HepGeom::TranslateX3D(StrutConcJNXpos) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(StrutConcJNYpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add((*StrutConcJN) << HepGeom::TranslateX3D(StrutConcJNXpos) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(-StrutConcJNYpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add((*StrutConcJN) << HepGeom::TranslateX3D(-StrutConcJNXpos-15.*CLHEP::mm) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add((*StrutConcJN) << HepGeom::TranslateX3D(-StrutConcJNXpos-15.*CLHEP::mm) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(StrutConcJNYpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add((*StrutConcJN) << HepGeom::TranslateX3D(-StrutConcJNXpos-15.*CLHEP::mm) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * HepGeom::TranslateY3D(-StrutConcJNYpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ); - -// subtract((*HoleJN) << HepGeom::RotateY3D(M_PI*0.5) << HepGeom::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*HepGeom::TranslateY3D(-WallCAirXpos*1.0) ); -// subtract((*HoleJN) << HepGeom::RotateY3D(M_PI*0.5) << HepGeom::TranslateZ3D(-0.5*WallAAirZpos)*HepGeom::TranslateY3D(-WallCAirXpos*1.0) ); + add((CutWallConc << GeoTrf::TranslateZ3D(WallCConcZpos)*GeoTrf::TranslateX3D(WallCConcXpos)*GeoTrf::RotateZ3D(WallCConcZrotate))). + add((ShaftsConc << GeoTrf::TranslateZ3D(ShaftsConcZpos))). + add((CutVaultConc << GeoTrf::TranslateZ3D(VaultConcZpos)*GeoTrf::RotateY3D(VaultConcYrotate))). + add((*SurfaceFloor) << GeoTrf::TranslateZ3D(SurfaceFloorZpos)*GeoTrf::TranslateX3D(SurfaceFloorXpos)). + add((CutWallConc << GeoTrf::TranslateZ3D(WallAConcZpos)*GeoTrf::TranslateX3D(WallAConcXpos))). + + add((*BoxConcJNC) << GeoTrf::TranslateX3D(BoxConcJNXpos) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add((*BoxConcStupidExtraJNC) << GeoTrf::TranslateX3D(BoxConcExtraJNXpos) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) * GeoTrf::TranslateY3D(-BoxConcExtraJNYpos) ). + add((*BoxConcJNA) << GeoTrf::TranslateX3D(-BoxConcJNXpos-15*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add((*BoxConcStupidExtraJNA) << GeoTrf::TranslateX3D(-BoxConcExtraJNXpos-15*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) * GeoTrf::TranslateY3D(BoxConcExtraJNYpos) ). + + add((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5+CavernAirZpos) * GeoTrf::TranslateY3D(-StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ); + +// subtract((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ); +// subtract((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ); //// -----------------------Second: Build cavern with air------------------------------- // Create variables for Concrete Cavern and get index of the record in cavernElements recordIndex = elementMap["WallACAir"]; - double WallACAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double WallACAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double WallACAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double WallACAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double WallACAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double WallACAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; double WallACAirSphi= (*cavernElements)[recordIndex]->getDouble("SPHI"); double WallACAirDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); recordIndex = elementMap["BoxAir"]; - double BoxAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double BoxAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double BoxAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double BoxAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double BoxAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double BoxAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["VaultAir"]; - double VaultAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double VaultAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double VaultAirYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); - double VaultAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double VaultAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double VaultAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double VaultAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double VaultAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double VaultAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; double VaultAirSphi= (*cavernElements)[recordIndex]->getDouble("SPHI"); double VaultAirDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); recordIndex = elementMap["HallAir"]; - double HallAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double HallAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double HallAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double HallAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double HallAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double HallAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["BaseAir"]; - double BaseAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double BaseAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double BaseAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double BaseAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double BaseAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double BaseAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double BaseAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double BaseAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["BoxAirW"]; - double BoxAirWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxAirWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxAirWYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["BoxAirVleft"]; - double BoxAirVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxAirVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxAirVleftYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["BoxAirVright"]; - double BoxAirVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxAirVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxAirVrightYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); GeoTubs *WallACAir = new GeoTubs(WallACAirMinR, WallACAirMaxR, WallACAirHalfHeight, WallACAirSphi, WallACAirDphi); @@ -336,86 +336,86 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world) GeoTubs *VaultAir = new GeoTubs(VaultAirMinR, VaultAirMaxR, VaultAirHalfHeight, VaultAirSphi, VaultAirDphi); GeoBox *HallAir = new GeoBox(HallAirHalfLength, HallAirHalfWidth, HallAirHalfHeight); GeoBox *BaseAir = new GeoBox(BaseAirHalfLength, BaseAirHalfWidth, BaseAirHalfHeight); - HepGeom::Transform3D BoxCutWallAir = HepGeom::TranslateZ3D(BoxAirWZpos)*HepGeom::RotateY3D(BoxAirWYrotate); - HepGeom::Transform3D BoxCutVaultLeftAir = HepGeom::TranslateZ3D(BoxAirVleftZpos)*HepGeom::RotateY3D(BoxAirVleftYrotate); - HepGeom::Transform3D BoxCutVaulRightAir = HepGeom::TranslateZ3D(BoxAirVrightZpos)*HepGeom::RotateY3D(BoxAirVrightYrotate); + GeoTrf::Transform3D BoxCutWallAir = GeoTrf::TranslateZ3D(BoxAirWZpos)*GeoTrf::RotateY3D(BoxAirWYrotate); + GeoTrf::Transform3D BoxCutVaultLeftAir = GeoTrf::TranslateZ3D(BoxAirVleftZpos)*GeoTrf::RotateY3D(BoxAirVleftYrotate); + GeoTrf::Transform3D BoxCutVaulRightAir = GeoTrf::TranslateZ3D(BoxAirVrightZpos)*GeoTrf::RotateY3D(BoxAirVrightYrotate); //------------------Cut the vault and side walls---------------------------- - const GeoShape & CutWallAir = (*WallACAir).subtract((*BoxAir) << HepGeom::Transform3D(BoxCutWallAir)); - const GeoShape & CutVaultAir = (*VaultAir).subtract((*BoxAir) << HepGeom::Transform3D(BoxCutVaultLeftAir)). - subtract((*BoxAir) << HepGeom::Transform3D(BoxCutVaulRightAir)); + const GeoShape & CutWallAir = (*WallACAir).subtract((*BoxAir) << GeoTrf::Transform3D(BoxCutWallAir)); + const GeoShape & CutVaultAir = (*VaultAir).subtract((*BoxAir) << GeoTrf::Transform3D(BoxCutVaultLeftAir)). + subtract((*BoxAir) << GeoTrf::Transform3D(BoxCutVaulRightAir)); //--------------- Build air shafts------------------------------. recordIndex = elementMap["PX14Air"]; - double PX14AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double PX14AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double PX14AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double PX14AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double PX14AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double PX14AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double PX14AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double PX14AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double PX14AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double PX14AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; recordIndex = elementMap["PX16Air"]; - double PX16AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double PX16AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double PX16AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double PX16AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double PX16AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double PX16AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double PX16AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double PX16AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double PX16AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double PX16AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; GeoTube *PX14Air = new GeoTube(PX14AirMinR, PX14AirMaxR, PX14AirHalfHeight); GeoTube *PX16Air = new GeoTube(PX16AirMinR, PX16AirMaxR, PX16AirHalfHeight); recordIndex = elementMap["CavShaftsConc"]; - double CavShaftsYPos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; + double CavShaftsYPos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; double CavShaftsXrotate = (*cavernElements)[recordIndex]->getDouble("XROTATE"); double CavShaftsYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); const GeoShape & ShaftsAir= - ((*PX14Air) << HepGeom::TranslateX3D(PX14AirXpos)*HepGeom::TranslateY3D(PX14AirYpos)). - add((*PX16Air) << HepGeom::TranslateX3D(PX16AirXpos)*HepGeom::TranslateY3D(PX16AirYpos)); + ((*PX14Air) << GeoTrf::TranslateX3D(PX14AirXpos)*GeoTrf::TranslateY3D(PX14AirYpos)). + add((*PX16Air) << GeoTrf::TranslateX3D(PX16AirXpos)*GeoTrf::TranslateY3D(PX16AirYpos)); //----------------Assemble everything--------------------------------. const GeoShape & CavernAir = (*HallAir). -// add((*AirJN) << HepGeom::RotateY3D(M_PI*0.5) << HepGeom::TranslateZ3D(-0.5*WallAAirZpos)*HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add(CutWallAir << HepGeom::TranslateZ3D(WallAAirZpos)*HepGeom::TranslateX3D(WallAAirXpos)). - add(CutWallAir << HepGeom::TranslateZ3D(WallCAirZpos)*HepGeom::TranslateX3D(WallCAirXpos)*HepGeom::RotateZ3D(WallCAirZrotate)). - add(CutVaultAir << HepGeom::TranslateZ3D(VaultAirZpos)*HepGeom::RotateY3D(VaultAirYrotate)). - add((*BaseAir) << HepGeom::TranslateZ3D(BaseAirZpos)). - - subtract((*BoxConcJNC) << HepGeom::TranslateX3D(BoxConcJNXpos) * HepGeom::TranslateZ3D(-WallAAirZpos*0.5) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - subtract((*BoxConcStupidExtraJNC) << HepGeom::TranslateX3D(BoxConcExtraJNXpos) * HepGeom::TranslateZ3D(-WallAAirZpos*0.5) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) * HepGeom::TranslateY3D(-BoxConcExtraJNYpos) ). - subtract((*BoxConcJNA) << HepGeom::TranslateX3D(-BoxConcJNXpos-15*CLHEP::mm) * HepGeom::TranslateZ3D(-WallAAirZpos*0.5) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - subtract((*BoxConcStupidExtraJNA) << HepGeom::TranslateX3D(-BoxConcExtraJNXpos-15*CLHEP::mm) * HepGeom::TranslateZ3D(-WallAAirZpos*0.5) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) * HepGeom::TranslateY3D(BoxConcExtraJNYpos) ). - - subtract((*StrutConcJN) << HepGeom::TranslateX3D(StrutConcJNXpos) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - subtract((*StrutConcJN) << HepGeom::TranslateX3D(StrutConcJNXpos) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * HepGeom::TranslateY3D(StrutConcJNYpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - subtract((*StrutConcJN) << HepGeom::TranslateX3D(StrutConcJNXpos) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * HepGeom::TranslateY3D(-StrutConcJNYpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - subtract((*StrutConcJN) << HepGeom::TranslateX3D(-StrutConcJNXpos-15.*CLHEP::mm) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - subtract((*StrutConcJN) << HepGeom::TranslateX3D(-StrutConcJNXpos-15.*CLHEP::mm) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * HepGeom::TranslateY3D(StrutConcJNYpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - subtract((*StrutConcJN) << HepGeom::TranslateX3D(-StrutConcJNXpos-15.*CLHEP::mm) * HepGeom::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * HepGeom::TranslateY3D(-StrutConcJNYpos) * HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). - add((*HoleJN) << HepGeom::RotateY3D(M_PI*0.5) << HepGeom::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*HepGeom::TranslateY3D(-WallCAirXpos*1.0) << HepGeom::TranslateY3D(CavShaftsYPos)*HepGeom::RotateY3D(CavShaftsYrotate)*HepGeom::RotateX3D(CavShaftsXrotate) ); +// add((*AirJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add(CutWallAir << GeoTrf::TranslateZ3D(WallAAirZpos)*GeoTrf::TranslateX3D(WallAAirXpos)). + add(CutWallAir << GeoTrf::TranslateZ3D(WallCAirZpos)*GeoTrf::TranslateX3D(WallCAirXpos)*GeoTrf::RotateZ3D(WallCAirZrotate)). + add(CutVaultAir << GeoTrf::TranslateZ3D(VaultAirZpos)*GeoTrf::RotateY3D(VaultAirYrotate)). + add((*BaseAir) << GeoTrf::TranslateZ3D(BaseAirZpos)). + + subtract((*BoxConcJNC) << GeoTrf::TranslateX3D(BoxConcJNXpos) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + subtract((*BoxConcStupidExtraJNC) << GeoTrf::TranslateX3D(BoxConcExtraJNXpos) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) * GeoTrf::TranslateY3D(-BoxConcExtraJNYpos) ). + subtract((*BoxConcJNA) << GeoTrf::TranslateX3D(-BoxConcJNXpos-15*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + subtract((*BoxConcStupidExtraJNA) << GeoTrf::TranslateX3D(-BoxConcExtraJNXpos-15*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) * GeoTrf::TranslateY3D(BoxConcExtraJNYpos) ). + + subtract((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + subtract((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + subtract((*StrutConcJN) << GeoTrf::TranslateX3D(StrutConcJNXpos) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + subtract((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + subtract((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + subtract((*StrutConcJN) << GeoTrf::TranslateX3D(-StrutConcJNXpos-15.*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-StrutConcJNZpos-WallAAirZpos*0.5) * GeoTrf::TranslateY3D(-StrutConcJNYpos) * GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). + add((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) << GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate) ); recordIndex = elementMap["ShaftsAir"]; - double ShaftsAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double ShaftsAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; const GeoShape & AirHall= - ((CavernAir << HepGeom::TranslateZ3D(CavernAirZpos))). - add((ShaftsAir << HepGeom::TranslateZ3D(ShaftsAirZpos))); //allows for a built-in 2m thick plugs for both PX14 & PX16 + ((CavernAir << GeoTrf::TranslateZ3D(CavernAirZpos))). + add((ShaftsAir << GeoTrf::TranslateZ3D(ShaftsAirZpos))); //allows for a built-in 2m thick plugs for both PX14 & PX16 //// -----------------------Build BedRock for Shafts and Cavern------------------------------- recordIndex = elementMap["Rock"]; - double RockHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double RockHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double RockHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double RockXPos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double RockYPos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; + double RockHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double RockHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double RockHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double RockXPos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double RockYPos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; GeoBox *Rockbox = new GeoBox( RockHalfWidth, RockHalfHeight, RockHalfLength); // 300, 50.75, 300 const GeoShape & BedRock = ((*Rockbox) . - subtract((AirHall) <<HepGeom::TranslateY3D(CavShaftsYPos)*HepGeom::RotateY3D(CavShaftsYrotate)*HepGeom::RotateX3D(CavShaftsXrotate))). - subtract((*HoleJN) << HepGeom::RotateY3D(M_PI*0.5) << HepGeom::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*HepGeom::TranslateY3D(-WallCAirXpos*1.0) << HepGeom::TranslateY3D(CavShaftsYPos)*HepGeom::RotateY3D(CavShaftsYrotate)*HepGeom::RotateX3D(CavShaftsXrotate) ); + subtract((AirHall) <<GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate))). + subtract((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) << GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate) ); - GeoTransform *rZt = new GeoTransform(HepGeom::TranslateY3D(RockYPos)*HepGeom::TranslateX3D(RockXPos)); + GeoTransform *rZt = new GeoTransform(GeoTrf::TranslateY3D(RockYPos)*GeoTrf::TranslateX3D(RockXPos)); world->add(rZt); GeoLogVol *lvr = new GeoLogVol("BEDROCK",&BedRock,rock); GeoPhysVol *bedrock = new GeoPhysVol(lvr); @@ -424,10 +424,10 @@ void CavernInfraDetectorFactory::create(GeoPhysVol *world) const GeoShape & CavConcrete = ((Concrete). -// add((*HoleJN) << HepGeom::RotateY3D(M_PI*0.5) << HepGeom::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*HepGeom::TranslateY3D(-WallCAirXpos*1.0) ). +// add((*HoleJN) << GeoTrf::RotateY3D(M_PI*0.5) << GeoTrf::TranslateZ3D(-0.5*WallAAirZpos+CavernAirZpos)*GeoTrf::TranslateY3D(-WallCAirXpos*1.0) ). subtract(AirHall)); - GeoTransform* xfTop = new GeoTransform(HepGeom::TranslateY3D(CavShaftsYPos)*HepGeom::RotateY3D(CavShaftsYrotate)*HepGeom::RotateX3D(CavShaftsXrotate)); + GeoTransform* xfTop = new GeoTransform(GeoTrf::TranslateY3D(CavShaftsYPos)*GeoTrf::RotateY3D(CavShaftsYrotate)*GeoTrf::RotateX3D(CavShaftsXrotate)); bedrock->add(xfTop); GeoLogVol *lvcsc = new GeoLogVol("CAV_SHAFTS_CONC",&CavConcrete,conc); GeoPhysVol *CavShaftsConc = new GeoPhysVol(lvcsc); diff --git a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx index 174be865228..3e5158b2f53 100755 --- a/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx +++ b/AtlasGeometryCommon/CavernInfraGeoModel/src/CavernInfraDetectorFactory01.cxx @@ -24,10 +24,10 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoSerialDenominator.h" #include "GeoModelKernel/GeoSerialTransformer.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "StoreGate/StoreGateSvc.h" @@ -38,7 +38,7 @@ #include "RDBAccessSvc/IRDBAccessSvc.h" #include <string> #include <map> -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; CavernInfraDetectorFactory01::CavernInfraDetectorFactory01(StoreGateSvc *detStore, @@ -94,18 +94,18 @@ void CavernInfraDetectorFactory01::create(GeoPhysVol *world) //// -----------------------------------Build SX1------------------------------------------ recordIndex = elementMap["SX1"]; - double SX1Xpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double SX1Ypos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double SX1HalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double SX1HalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double SX1HalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double SX1Xpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double SX1Ypos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double SX1HalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double SX1HalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double SX1HalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["SX1Air"]; - double SX1AirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double SX1AirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double SX1AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double SX1AirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double SX1AirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double SX1AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; - GeoTransform *s1XYZt = new GeoTransform(HepGeom::Translate3D(SX1Ypos,91.75*CLHEP::m, SX1Xpos)); //1.7 -8.7 + GeoTransform *s1XYZt = new GeoTransform(GeoTrf::Translate3D(SX1Ypos,91.75*GeoModelKernelUnits::m, SX1Xpos)); //1.7 -8.7 world->add(s1XYZt); GeoBox *SX1 = new GeoBox(SX1HalfWidth ,SX1HalfHeight, SX1HalfLength); // 11.7, 6.5, 42.3 GeoLogVol *lvsx1s = new GeoLogVol("SX1Steel",SX1,shieldSteel); @@ -113,7 +113,7 @@ void CavernInfraDetectorFactory01::create(GeoPhysVol *world) world->add(tag); world->add(sx1); - GeoTransform *s1z = new GeoTransform(HepGeom::TranslateY3D(-.005*CLHEP::m)); + GeoTransform *s1z = new GeoTransform(GeoTrf::TranslateY3D(-.005*GeoModelKernelUnits::m)); sx1->add(s1z); GeoBox *SX1Air = new GeoBox( SX1AirHalfWidth, SX1AirHalfHeight, SX1AirHalfLength); GeoLogVol *lvsx1a = new GeoLogVol("SX1Air",SX1Air,air); @@ -124,49 +124,49 @@ void CavernInfraDetectorFactory01::create(GeoPhysVol *world) //// ------------------First: Build cavern with concrete----------------------------- recordIndex = elementMap["WallACConc"]; - double WallACConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double WallACConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double WallACConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double WallACConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double WallACConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double WallACConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; double WallACConcSphi= (*cavernElements)[recordIndex]->getDouble("SPHI"); double WallACConcDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); recordIndex = elementMap["BoxConc"]; - double BoxConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double BoxConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double BoxConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double BoxConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double BoxConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double BoxConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["VaultConc"]; - double VaultConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double VaultConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double VaultConcYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); - double VaultConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double VaultConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double VaultConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double VaultConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double VaultConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double VaultConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; double VaultConcSphi= (*cavernElements)[recordIndex]->getDouble("SPHI"); double VaultConcDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); recordIndex = elementMap["HallConc"]; - double HallConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double HallConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double HallConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double HallConcHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double HallConcHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double HallConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["BoxConcW"]; - double BoxConcWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxConcWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxConcWYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["BoxConcVleft"]; - double BoxConcVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxConcVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxConcVleftYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["BoxConcVright"]; - double BoxConcVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxConcVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxConcVrightYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["SurfaceFloor"]; - double SurfaceFloorXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double SurfaceFloorZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double SurfaceFloorHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double SurfaceFloorHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double SurfaceFloorHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double SurfaceFloorXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double SurfaceFloorZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double SurfaceFloorHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double SurfaceFloorHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double SurfaceFloorHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; GeoTubs *WallACConcrete = new GeoTubs(WallACConcMinR, WallACConcMaxR, WallACConcHalfHeight, WallACConcSphi, WallACConcDphi); @@ -175,35 +175,35 @@ void CavernInfraDetectorFactory01::create(GeoPhysVol *world) GeoBox *HallConcrete = new GeoBox(HallConcHalfLength, HallConcHalfWidth, HallConcHalfHeight); GeoBox *SurfaceFloor = new GeoBox(SurfaceFloorHalfLength, SurfaceFloorHalfWidth, SurfaceFloorHalfHeight); - HepGeom::Transform3D BoxCutWallConc = HepGeom::TranslateZ3D(BoxConcWZpos)*HepGeom::RotateY3D(BoxConcWYrotate); - HepGeom::Transform3D BoxCutVaultLeftConc = HepGeom::TranslateZ3D(BoxConcVleftZpos)*HepGeom::RotateY3D(BoxConcVleftYrotate); - HepGeom::Transform3D BoxCutVaulRightConc = HepGeom::TranslateZ3D(BoxConcVrightZpos)*HepGeom::RotateY3D(BoxConcVrightYrotate); + GeoTrf::Transform3D BoxCutWallConc = GeoTrf::TranslateZ3D(BoxConcWZpos)*GeoTrf::RotateY3D(BoxConcWYrotate); + GeoTrf::Transform3D BoxCutVaultLeftConc = GeoTrf::TranslateZ3D(BoxConcVleftZpos)*GeoTrf::RotateY3D(BoxConcVleftYrotate); + GeoTrf::Transform3D BoxCutVaulRightConc = GeoTrf::TranslateZ3D(BoxConcVrightZpos)*GeoTrf::RotateY3D(BoxConcVrightYrotate); //---------------- Cut the vault and side walls---------------------------- - const GeoShape & CutWallConc = (*WallACConcrete).subtract((*BoxConc) << HepGeom::Transform3D(BoxCutWallConc)); - const GeoShape & CutVaultConc = (*VaultConcrete).subtract((*BoxConc) << HepGeom::Transform3D(BoxCutVaultLeftConc)). - subtract((*BoxConc) << HepGeom::Transform3D(BoxCutVaulRightConc)); + const GeoShape & CutWallConc = (*WallACConcrete).subtract((*BoxConc) << GeoTrf::Transform3D(BoxCutWallConc)); + const GeoShape & CutVaultConc = (*VaultConcrete).subtract((*BoxConc) << GeoTrf::Transform3D(BoxCutVaultLeftConc)). + subtract((*BoxConc) << GeoTrf::Transform3D(BoxCutVaulRightConc)); recordIndex = elementMap["ShaftCut"]; - double ShaftCutZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double ShaftCutZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double ShaftCutYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); - double ShaftCutHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double ShaftCutMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double ShaftCutMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double ShaftCutHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double ShaftCutMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double ShaftCutMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; recordIndex = elementMap["PX14Conc"]; - double PX14ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double PX14ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double PX14ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double PX14ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double PX14ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double PX14ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double PX14ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double PX14ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double PX14ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double PX14ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; recordIndex = elementMap["PX16Conc"]; - double PX16ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double PX16ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double PX16ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double PX16ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double PX16ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double PX16ConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double PX16ConcYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double PX16ConcHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double PX16ConcMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double PX16ConcMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; //--------------- Build concrete shafts------------------------------. GeoTube *ShaftCut = new GeoTube(ShaftCutMinR, ShaftCutMaxR, ShaftCutHalfHeight); @@ -211,75 +211,75 @@ void CavernInfraDetectorFactory01::create(GeoPhysVol *world) GeoTube *PX16Conc = new GeoTube(PX16ConcMinR, PX16ConcMaxR, PX16ConcHalfHeight); const GeoShape & ShaftsConc= - ((*PX14Conc) << HepGeom::TranslateX3D(PX14ConcXpos)*HepGeom::TranslateY3D(PX14ConcYpos)). - add((*PX16Conc) << HepGeom::TranslateX3D(PX16ConcXpos)*HepGeom::TranslateY3D(PX16ConcYpos)). - subtract((*ShaftCut) << HepGeom::TranslateZ3D(ShaftCutZpos)*HepGeom::RotateY3D(ShaftCutYrotate)); + ((*PX14Conc) << GeoTrf::TranslateX3D(PX14ConcXpos)*GeoTrf::TranslateY3D(PX14ConcYpos)). + add((*PX16Conc) << GeoTrf::TranslateX3D(PX16ConcXpos)*GeoTrf::TranslateY3D(PX16ConcYpos)). + subtract((*ShaftCut) << GeoTrf::TranslateZ3D(ShaftCutZpos)*GeoTrf::RotateY3D(ShaftCutYrotate)); recordIndex = elementMap["WallCConc"]; - double WallCConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double WallCConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; + double WallCConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double WallCConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; double WallCConcZrotate = (*cavernElements)[recordIndex]->getDouble("ZROTATE"); recordIndex = elementMap["WallAConc"]; - double WallAConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double WallAConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; + double WallAConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double WallAConcXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; recordIndex = elementMap["ShaftsConc"]; - double ShaftsConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double ShaftsConcZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; //----------------Assemble everything--------------------------------. const GeoShape & Concrete= (*HallConcrete). - add((CutWallConc << HepGeom::TranslateZ3D(WallCConcZpos)*HepGeom::TranslateX3D(WallCConcXpos)*HepGeom::RotateZ3D(WallCConcZrotate))). - add((ShaftsConc << HepGeom::TranslateZ3D(ShaftsConcZpos))). - add((CutVaultConc << HepGeom::TranslateZ3D(VaultConcZpos)*HepGeom::RotateY3D(VaultConcYrotate))). - add((*SurfaceFloor) << HepGeom::TranslateZ3D(SurfaceFloorZpos)*HepGeom::TranslateX3D(SurfaceFloorXpos)). - add((CutWallConc << HepGeom::TranslateZ3D(WallAConcZpos)*HepGeom::TranslateX3D(WallAConcXpos))); + add((CutWallConc << GeoTrf::TranslateZ3D(WallCConcZpos)*GeoTrf::TranslateX3D(WallCConcXpos)*GeoTrf::RotateZ3D(WallCConcZrotate))). + add((ShaftsConc << GeoTrf::TranslateZ3D(ShaftsConcZpos))). + add((CutVaultConc << GeoTrf::TranslateZ3D(VaultConcZpos)*GeoTrf::RotateY3D(VaultConcYrotate))). + add((*SurfaceFloor) << GeoTrf::TranslateZ3D(SurfaceFloorZpos)*GeoTrf::TranslateX3D(SurfaceFloorXpos)). + add((CutWallConc << GeoTrf::TranslateZ3D(WallAConcZpos)*GeoTrf::TranslateX3D(WallAConcXpos))); //// -----------------------Second: Build cavern with air------------------------------- // Create variables for Concrete Cavern and get index of the record in cavernElements recordIndex = elementMap["WallACAir"]; - double WallACAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double WallACAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double WallACAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double WallACAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double WallACAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double WallACAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; double WallACAirSphi= (*cavernElements)[recordIndex]->getDouble("SPHI"); double WallACAirDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); recordIndex = elementMap["BoxAir"]; - double BoxAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double BoxAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double BoxAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double BoxAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double BoxAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double BoxAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["VaultAir"]; - double VaultAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double VaultAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double VaultAirYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); - double VaultAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double VaultAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double VaultAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double VaultAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double VaultAirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double VaultAirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; double VaultAirSphi= (*cavernElements)[recordIndex]->getDouble("SPHI"); double VaultAirDphi= (*cavernElements)[recordIndex]->getDouble("DPHI"); recordIndex = elementMap["HallAir"]; - double HallAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double HallAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double HallAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double HallAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double HallAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double HallAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["BaseAir"]; - double BaseAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double BaseAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double BaseAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double BaseAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double BaseAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double BaseAirHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double BaseAirHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double BaseAirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; recordIndex = elementMap["BoxAirW"]; - double BoxAirWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxAirWZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxAirWYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["BoxAirVleft"]; - double BoxAirVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxAirVleftZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxAirVleftYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); recordIndex = elementMap["BoxAirVright"]; - double BoxAirVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double BoxAirVrightZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; double BoxAirVrightYrotate = (*cavernElements)[recordIndex]->getDouble("YROTATE"); GeoTubs *WallACAir = new GeoTubs(WallACAirMinR, WallACAirMaxR, WallACAirHalfHeight, WallACAirSphi, WallACAirDphi); @@ -287,78 +287,78 @@ void CavernInfraDetectorFactory01::create(GeoPhysVol *world) GeoTubs *VaultAir = new GeoTubs(VaultAirMinR, VaultAirMaxR, VaultAirHalfHeight, VaultAirSphi, VaultAirDphi); GeoBox *HallAir = new GeoBox(HallAirHalfLength, HallAirHalfWidth, HallAirHalfHeight); GeoBox *BaseAir = new GeoBox(BaseAirHalfLength, BaseAirHalfWidth, BaseAirHalfHeight); - HepGeom::Transform3D BoxCutWallAir = HepGeom::TranslateZ3D(BoxAirWZpos)*HepGeom::RotateY3D(BoxAirWYrotate); - HepGeom::Transform3D BoxCutVaultLeftAir = HepGeom::TranslateZ3D(BoxAirVleftZpos)*HepGeom::RotateY3D(BoxAirVleftYrotate); - HepGeom::Transform3D BoxCutVaulRightAir = HepGeom::TranslateZ3D(BoxAirVrightZpos)*HepGeom::RotateY3D(BoxAirVrightYrotate); + GeoTrf::Transform3D BoxCutWallAir = GeoTrf::TranslateZ3D(BoxAirWZpos)*GeoTrf::RotateY3D(BoxAirWYrotate); + GeoTrf::Transform3D BoxCutVaultLeftAir = GeoTrf::TranslateZ3D(BoxAirVleftZpos)*GeoTrf::RotateY3D(BoxAirVleftYrotate); + GeoTrf::Transform3D BoxCutVaulRightAir = GeoTrf::TranslateZ3D(BoxAirVrightZpos)*GeoTrf::RotateY3D(BoxAirVrightYrotate); //------------------Cut the vault and side walls---------------------------- - const GeoShape & CutWallAir = (*WallACAir).subtract((*BoxAir) << HepGeom::Transform3D(BoxCutWallAir)); - const GeoShape & CutVaultAir = (*VaultAir).subtract((*BoxAir) << HepGeom::Transform3D(BoxCutVaultLeftAir)). - subtract((*BoxAir) << HepGeom::Transform3D(BoxCutVaulRightAir)); + const GeoShape & CutWallAir = (*WallACAir).subtract((*BoxAir) << GeoTrf::Transform3D(BoxCutWallAir)); + const GeoShape & CutVaultAir = (*VaultAir).subtract((*BoxAir) << GeoTrf::Transform3D(BoxCutVaultLeftAir)). + subtract((*BoxAir) << GeoTrf::Transform3D(BoxCutVaulRightAir)); //--------------- Build air shafts------------------------------. recordIndex = elementMap["PX14Air"]; - double PX14AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double PX14AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double PX14AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double PX14AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double PX14AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double PX14AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double PX14AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double PX14AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double PX14AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double PX14AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; recordIndex = elementMap["PX16Air"]; - double PX16AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; - double PX16AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*CLHEP::m; - double PX16AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; - double PX16AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*CLHEP::m; - double PX16AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*CLHEP::m; + double PX16AirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; + double PX16AirYpos = (*cavernElements)[recordIndex]->getDouble("YPOS")*GeoModelKernelUnits::m; + double PX16AirHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; + double PX16AirMinR = (*cavernElements)[recordIndex]->getDouble("MINR")*GeoModelKernelUnits::m; + double PX16AirMaxR = (*cavernElements)[recordIndex]->getDouble("MAXR")*GeoModelKernelUnits::m; GeoTube *PX14Air = new GeoTube(PX14AirMinR, PX14AirMaxR, PX14AirHalfHeight); GeoTube *PX16Air = new GeoTube(PX16AirMinR, PX16AirMaxR, PX16AirHalfHeight); const GeoShape & ShaftsAir= - ((*PX14Air) << HepGeom::TranslateX3D(PX14AirXpos)*HepGeom::TranslateY3D(PX14AirYpos)). - add((*PX16Air) << HepGeom::TranslateX3D(PX16AirXpos)*HepGeom::TranslateY3D(PX16AirYpos)); + ((*PX14Air) << GeoTrf::TranslateX3D(PX14AirXpos)*GeoTrf::TranslateY3D(PX14AirYpos)). + add((*PX16Air) << GeoTrf::TranslateX3D(PX16AirXpos)*GeoTrf::TranslateY3D(PX16AirYpos)); //----------------Assemble everything--------------------------------. recordIndex = elementMap["WallAAir"]; - double WallAAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double WallAAirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; + double WallAAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double WallAAirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; recordIndex = elementMap["WallCAir"]; - double WallCAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; - double WallCAirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*CLHEP::m; + double WallCAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; + double WallCAirXpos = (*cavernElements)[recordIndex]->getDouble("XPOS")*GeoModelKernelUnits::m; double WallCAirZrotate = (*cavernElements)[recordIndex]->getDouble("ZROTATE"); const GeoShape & CavernAir = (*HallAir). - add(CutWallAir << HepGeom::TranslateZ3D(WallAAirZpos)*HepGeom::TranslateX3D(WallAAirXpos)). - add(CutWallAir << HepGeom::TranslateZ3D(WallCAirZpos)*HepGeom::TranslateX3D(WallCAirXpos)*HepGeom::RotateZ3D(WallCAirZrotate)). - add(CutVaultAir << HepGeom::TranslateZ3D(VaultAirZpos)*HepGeom::RotateY3D(VaultAirYrotate)). - add((*BaseAir) << HepGeom::TranslateZ3D(BaseAirZpos)); + add(CutWallAir << GeoTrf::TranslateZ3D(WallAAirZpos)*GeoTrf::TranslateX3D(WallAAirXpos)). + add(CutWallAir << GeoTrf::TranslateZ3D(WallCAirZpos)*GeoTrf::TranslateX3D(WallCAirXpos)*GeoTrf::RotateZ3D(WallCAirZrotate)). + add(CutVaultAir << GeoTrf::TranslateZ3D(VaultAirZpos)*GeoTrf::RotateY3D(VaultAirYrotate)). + add((*BaseAir) << GeoTrf::TranslateZ3D(BaseAirZpos)); recordIndex = elementMap["ShaftsAir"]; - double ShaftsAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double ShaftsAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; recordIndex = elementMap["CavernAir"]; - double CavernAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*CLHEP::m; + double CavernAirZpos = (*cavernElements)[recordIndex]->getDouble("ZPOS")*GeoModelKernelUnits::m; const GeoShape & AirHall= - ((CavernAir << HepGeom::TranslateZ3D(CavernAirZpos))). - add((ShaftsAir << HepGeom::TranslateZ3D(ShaftsAirZpos))); //allows for a built-in 2m thick plugs for both PX14 & PX16 + ((CavernAir << GeoTrf::TranslateZ3D(CavernAirZpos))). + add((ShaftsAir << GeoTrf::TranslateZ3D(ShaftsAirZpos))); //allows for a built-in 2m thick plugs for both PX14 & PX16 //// -----------------------Build BedRock for Shafts and Cavern------------------------------- recordIndex = elementMap["Rock"]; - double RockHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*CLHEP::m; - double RockHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*CLHEP::m; - double RockHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*CLHEP::m; + double RockHalfLength = (*cavernElements)[recordIndex]->getDouble("HALFLENGTH")*GeoModelKernelUnits::m; + double RockHalfWidth = (*cavernElements)[recordIndex]->getDouble("HALFWIDTH")*GeoModelKernelUnits::m; + double RockHalfHeight = (*cavernElements)[recordIndex]->getDouble("HALFHEIGHT")*GeoModelKernelUnits::m; GeoBox *Rockbox = new GeoBox( RockHalfWidth, RockHalfHeight, RockHalfLength); // 300, 50.75, 300 const GeoShape & BedRock = ((*Rockbox) . - subtract((AirHall) <<HepGeom::TranslateY3D(-34.5*CLHEP::m)*HepGeom::RotateY3D(-1.57)*HepGeom::RotateX3D(-1.57))); + subtract((AirHall) <<GeoTrf::TranslateY3D(-34.5*GeoModelKernelUnits::m)*GeoTrf::RotateY3D(-1.57)*GeoTrf::RotateX3D(-1.57))); - GeoTransform *rZt = new GeoTransform(HepGeom::TranslateY3D(34.5*CLHEP::m)*HepGeom::TranslateX3D(-1.7*CLHEP::m)); + GeoTransform *rZt = new GeoTransform(GeoTrf::TranslateY3D(34.5*GeoModelKernelUnits::m)*GeoTrf::TranslateX3D(-1.7*GeoModelKernelUnits::m)); world->add(rZt); GeoLogVol *lvr = new GeoLogVol("BEDROCK",&BedRock,rock); GeoPhysVol *bedrock = new GeoPhysVol(lvr); @@ -368,7 +368,7 @@ void CavernInfraDetectorFactory01::create(GeoPhysVol *world) const GeoShape & CavConcrete = ((Concrete).subtract(AirHall)); - GeoTransform* xfTop = new GeoTransform(HepGeom::TranslateY3D(-34.5*CLHEP::m)*HepGeom::RotateY3D(-1.57)*HepGeom::RotateX3D(-1.57)); + GeoTransform* xfTop = new GeoTransform(GeoTrf::TranslateY3D(-34.5*GeoModelKernelUnits::m)*GeoTrf::RotateY3D(-1.57)*GeoTrf::RotateX3D(-1.57)); bedrock->add(xfTop); GeoLogVol *lvcsc = new GeoLogVol("CAV_SHAFTS_CONC",&CavConcrete,conc); GeoPhysVol *CavShaftsConc = new GeoPhysVol(lvcsc); diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/CMakeLists.txt b/AtlasGeometryCommon/GeoModelEnvelopes/CMakeLists.txt index 781268782af..6bfb3c8cad7 100644 --- a/AtlasGeometryCommon/GeoModelEnvelopes/CMakeLists.txt +++ b/AtlasGeometryCommon/GeoModelEnvelopes/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( GeoModelEnvelopes ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities PRIVATE Control/SGTools @@ -16,11 +15,13 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoModel/GeoModelInterfaces GaudiKernel ) +find_package( GeoModel ) + # Component(s) in the package: atlas_add_component( GeoModelEnvelopes src/*.cxx src/components/*.cxx - LINK_LIBRARIES GeoModelKernel GeoModelUtilities SGTools StoreGateLib SGtests GaudiKernel ) + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} GeoModelUtilities SGTools StoreGateLib GaudiKernel ) # Install files from the package: atlas_install_headers( GeoModelEnvelopes ) diff --git a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.cxx b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.cxx index 76a21574318..555b0b924ce 100755 --- a/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.cxx +++ b/AtlasGeometryCommon/GeoModelEnvelopes/src/ForDetEnvelopeFactory.cxx @@ -11,7 +11,6 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoShapeUnion.h" @@ -45,10 +44,10 @@ void ForDetEnvelopeFactory::create(GeoPhysVol *world) const GeoMaterial* air = m_materialManager->getMaterial("std::Air"); // Build boolean shape: union of two tubes - const GeoTube* tube1 = new GeoTube(0.,2000.*CLHEP::mm,188750.*CLHEP::mm); - GeoTube* tube2 = new GeoTube(0.,2000.*CLHEP::mm,188750.*CLHEP::mm); - HepGeom::TranslateZ3D xfRelativeA(211250.*CLHEP::mm); - HepGeom::TranslateZ3D xfRelativeC(-211250.*CLHEP::mm); + const GeoTube* tube1 = new GeoTube(0.,2000.*GeoModelKernelUnits::mm,188750.*GeoModelKernelUnits::mm); + GeoTube* tube2 = new GeoTube(0.,2000.*GeoModelKernelUnits::mm,188750.*GeoModelKernelUnits::mm); + GeoTrf::TranslateZ3D xfRelativeA(211250.*GeoModelKernelUnits::mm); + GeoTrf::TranslateZ3D xfRelativeC(-211250.*GeoModelKernelUnits::mm); const GeoShapeShift& envShape1 = (*tube1)<<xfRelativeA; const GeoShapeUnion& envShape = envShape1.add((*tube2)<<xfRelativeC); diff --git a/Calorimeter/CaloDetDescr/CaloDetDescr/ICaloCoordinateTool.h b/Calorimeter/CaloDetDescr/CaloDetDescr/ICaloCoordinateTool.h index 8d167276d27..a8a49c8c6a8 100755 --- a/Calorimeter/CaloDetDescr/CaloDetDescr/ICaloCoordinateTool.h +++ b/Calorimeter/CaloDetDescr/CaloDetDescr/ICaloCoordinateTool.h @@ -36,7 +36,7 @@ - the LAr+Tile local coordinate system, which differs for 2 reasons : - the origin is shifted by x = 2298 CLHEP::mm, and + the origin is shifted by x = 2298 mm, and the two calos sit on a rotating table to allow eta scans. In the local coordinate system, calorimeters have a pointing diff --git a/Calorimeter/CaloDetDescr/src/CaloDetectorElements.cxx b/Calorimeter/CaloDetDescr/src/CaloDetectorElements.cxx index bd559b942e3..ef80c226e66 100755 --- a/Calorimeter/CaloDetDescr/src/CaloDetectorElements.cxx +++ b/Calorimeter/CaloDetDescr/src/CaloDetectorElements.cxx @@ -10,6 +10,7 @@ #include "CaloGeoHelpers/CaloPhiRange.h" +#include "GaudiKernel/SystemOfUnits.h" namespace { @@ -196,12 +197,12 @@ void EMECDetectorElement::init_description(bool isTestBeam, const CaloElementPos // we need to apply the famous ZShift. Amg::Transform3D xfNominal; if(m_cell->getEndcapIndex()==0) - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,m_region->getProjectivityDisplacement()*CLHEP::cm))*xfDef; // Negative EMEC + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,m_region->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Negative EMEC else - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-m_region->getProjectivityDisplacement()*CLHEP::cm))*xfDef; // Positive EMEC + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-m_region->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Positive EMEC if(isTestBeam){ - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,3689.5*CLHEP::mm)); + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,3689.5*Gaudi::Units::mm)); } const Amg::Transform3D &xfAbs = m_region->getAbsoluteTransformAmg(); @@ -333,12 +334,12 @@ void HECDetectorElement::init_description(bool isTestBeam, const CaloElementPosi // we need to apply the famous ZShift. Amg::Transform3D xfNominal; if(m_cell->getEndcapIndex()==0) - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,m_region->getProjectivityDisplacement()*CLHEP::cm))*xfDef; // Negative HEC + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,m_region->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Negative HEC else - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-m_region->getProjectivityDisplacement()*CLHEP::cm))*xfDef; // Positive HEC + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-m_region->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Positive HEC if(isTestBeam){ - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 4277.*CLHEP::mm)); + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 4277.*Gaudi::Units::mm)); } const Amg::Transform3D &xfAbs = m_region->getAbsoluteTransformAmg(); @@ -465,18 +466,18 @@ void FCALDetectorElement::init_description(bool isTestBeam, const CaloElementPos // we need to apply the famous ZShift. Amg::Transform3D xfNominal; if(m_module->getEndcapIndex()==FCALModule::POS) - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-m_module->getProjectivityDisplacement()*CLHEP::cm))*xfDef; + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-m_module->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; else - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,m_module->getProjectivityDisplacement()*CLHEP::cm))*xfDef; + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,m_module->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; if(isTestBeam){ if(m_module->getModuleIndex() == FCALModule::FCAL1) - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 4668.5*CLHEP::mm)); + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 4668.5*Gaudi::Units::mm)); else if (m_module->getModuleIndex() == FCALModule::FCAL2) - xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 5128.3*CLHEP::mm)); + xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 5128.3*Gaudi::Units::mm)); else { std::cout<<"Wrong FCAL module for TB, using FCAL1 !!!"<<std::endl; - xfNominal = Amg::Translation3D( Amg::Vector3D(0.,0.,4668.5*CLHEP::mm)); + xfNominal = Amg::Translation3D( Amg::Vector3D(0.,0.,4668.5*Gaudi::Units::mm)); } } diff --git a/Calorimeter/CaloTrackingGeometry/src/CaloTrackingGeometryBuilder.cxx b/Calorimeter/CaloTrackingGeometry/src/CaloTrackingGeometryBuilder.cxx index c733109a9b7..4e597a60acf 100755 --- a/Calorimeter/CaloTrackingGeometry/src/CaloTrackingGeometryBuilder.cxx +++ b/Calorimeter/CaloTrackingGeometry/src/CaloTrackingGeometryBuilder.cxx @@ -38,6 +38,7 @@ #include "TrkSurfaces/TrapezoidBounds.h" #include "TrkSurfaces/DiscSurface.h" #include "TrkSurfaces/PlaneSurface.h" +#include "GaudiKernel/SystemOfUnits.h" #include <memory> // CLHEP //#include "CLHEP/Geometry/Transform3D.h" @@ -48,8 +49,8 @@ //using HepGeom::Vector3D; //using CLHEP::Hep3Vector; //using CLHEP::HepRotation; -using CLHEP::mm; -using CLHEP::radian; +//using CLHEP::mm; +//using CLHEP::radian; // constructor Calo::CaloTrackingGeometryBuilder::CaloTrackingGeometryBuilder(const std::string& t, const std::string& n, const IInterface* p) : @@ -60,7 +61,7 @@ Calo::CaloTrackingGeometryBuilder::CaloTrackingGeometryBuilder(const std::string m_lArVolumeBuilder("LAr::LArVolumeBuilder/LArVolumeBuilder"), m_tileVolumeBuilder("Tile::TileVolumeBuilder/TileVolumeBuilder"), m_caloMaterial(0), - m_caloEnvelope(25*mm), + m_caloEnvelope(25*Gaudi::Units::mm), m_enclosingEnvelopeSvc("AtlasGeometry_EnvelopeDefSvc", n), m_caloDefaultRadius(4250.), m_caloDefaultHalflengthZ(6500.), @@ -529,7 +530,7 @@ const Trk::TrackingGeometry* Calo::CaloTrackingGeometryBuilder::trackingGeometry Trk::DiscLayer* mbtsPosLayer = new Trk::DiscLayer(mbtsPosZpos,dibo->clone(), //mbtsPosLayerSurfArray, Trk::HomogeneousLayerMaterial(Trk::MaterialProperties(*m_caloMaterial,1.),1.), - 1.*mm); + 1.*Gaudi::Units::mm); m_mbtsNegLayers=new std::vector<const Trk::Layer*>; m_mbtsPosLayers=new std::vector<const Trk::Layer*>; diff --git a/DataQuality/DataQualityTools/src/DQTGlobalWZFinderTool.cxx b/DataQuality/DataQualityTools/src/DQTGlobalWZFinderTool.cxx index e9955f00474..12312aeab20 100644 --- a/DataQuality/DataQualityTools/src/DQTGlobalWZFinderTool.cxx +++ b/DataQuality/DataQualityTools/src/DQTGlobalWZFinderTool.cxx @@ -493,7 +493,7 @@ StatusCode DQTGlobalWZFinderTool::fillHistograms() xAOD::MuonContainer::const_iterator muonItr; for (muonItr=muons->begin(); muonItr != muons->end(); ++muonItr) { - Float_t minptCutJPsi(1.0*CLHEP::GeV); + Float_t minptCutJPsi(1.0*GeV); auto muTrk = (*muonItr)->primaryTrackParticle(); float d0sig; if (!muTrk) { diff --git a/DetectorDescription/AGDD/AGDDControl/CMakeLists.txt b/DetectorDescription/AGDD/AGDDControl/CMakeLists.txt index 8e975adbaac..e1c69121a29 100644 --- a/DetectorDescription/AGDD/AGDDControl/CMakeLists.txt +++ b/DetectorDescription/AGDD/AGDDControl/CMakeLists.txt @@ -9,25 +9,27 @@ atlas_subdir( AGDDControl ) atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps DetectorDescription/AGDD/AGDDKernel - DetectorDescription/GeoModel/GeoModelKernel PRIVATE Control/StoreGate DetectorDescription/AGDD/AGDDModel DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoPrimitives GaudiKernel Tools/PathResolver ) # External dependencies: find_package( CLHEP ) find_package( XercesC ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( AGDDControl src/*.cxx PUBLIC_HEADERS AGDDControl - INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIR} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AGDDKernel GeoModelKernel StoreGateLib SGtests + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps AGDDKernel StoreGateLib SGtests PRIVATE_LINK_LIBRARIES AGDDModel GeoModelUtilities GaudiKernel PathResolver ) diff --git a/DetectorDescription/AGDD/AGDDControl/src/AGDD2GeoModelBuilder.cxx b/DetectorDescription/AGDD/AGDDControl/src/AGDD2GeoModelBuilder.cxx index 2eb7c7f7df8..562bcea91cf 100644 --- a/DetectorDescription/AGDD/AGDDControl/src/AGDD2GeoModelBuilder.cxx +++ b/DetectorDescription/AGDD/AGDDControl/src/AGDD2GeoModelBuilder.cxx @@ -60,6 +60,8 @@ #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoTransform.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/Bootstrap.h" @@ -234,8 +236,8 @@ void AGDD2GeoModelBuilder::CreateSnake(AGDDSnake* v) CLHEP::HepRotation h; HepGeom::Transform3D ttt1(h,v1); HepGeom::Transform3D ttt2(h,v2); - static GeoShape *s1=new GeoShapeShift(box1,ttt1); - static GeoShape *s2=new GeoShapeShift(box1,ttt2); + static GeoShape *s1=new GeoShapeShift(box1,Amg::CLHEPTransformToEigen(ttt1)); + static GeoShape *s2=new GeoShapeShift(box1,Amg::CLHEPTransformToEigen(ttt2)); // std::cout<<" Snake "<<v->GetName()<<" nr. of Points "<<v->NrOfPoints()<<std::endl; double radius=v->Radius(); @@ -257,7 +259,7 @@ void AGDD2GeoModelBuilder::CreateSnake(AGDDSnake* v) rrr.rotateZ(axis2.phi()); rrr.rotateY(angle2); HepGeom::Transform3D ttt(rrr,vt); - GeoShape *ssnew=new GeoShapeShift(s1,ttt); + GeoShape *ssnew=new GeoShapeShift(s1,Amg::CLHEPTransformToEigen(ttt)); solid = new GeoShapeSubtraction(solid,ssnew); // std::cout<<" angles theta, phi "<<axis2.theta()<<" "<<axis2.phi()<<std::endl; @@ -265,13 +267,13 @@ void AGDD2GeoModelBuilder::CreateSnake(AGDDSnake* v) CLHEP::Hep3Vector vref(0.,0.,-lengthnew/2.); CLHEP::HepRotation r; HepGeom::Transform3D tref(r,vref); - solid=new GeoShapeShift(solid,tref); + solid=new GeoShapeShift(solid,Amg::CLHEPTransformToEigen(tref)); CLHEP::HepRotation r1; r1.rotateY(axis0.theta()); r1.rotateZ(axis0.phi()); CLHEP::Hep3Vector vtt(v->GetPoint(0).x(),v->GetPoint(0).y(),v->GetPoint(0).z()); HepGeom::Transform3D t(r1,vtt); - solid=new GeoShapeShift(solid,t); + solid=new GeoShapeShift(solid,Amg::CLHEPTransformToEigen(t)); for (int i=1;i<v->NrOfPoints()-1;i++) { @@ -298,25 +300,25 @@ void AGDD2GeoModelBuilder::CreateSnake(AGDDSnake* v) GeoShape* ss=new GeoTubs(0.,radius,lengthnew/2.,0.,4*asin(1.)); - const CLHEP::Hep3Vector vt1(0.,0.,+lengthnew/2.-delta_l1-2.); + const CLHEP::Hep3Vector vt1(0.,0.,+lengthnew/2.-delta_l1-2.); const CLHEP::Hep3Vector vt2(0.,0.,-lengthnew/2.+delta_l2+2.); - CLHEP::HepRotation rrr1,rrr2; + CLHEP::HepRotation rrr1,rrr2; - rrr1.rotateY(angle1); + rrr1.rotateY(angle1); rrr1.rotateZ(-axis1.phi()); rrr2.rotateY(-angle2); rrr2.rotateZ(axis2.phi()); - HepGeom::Transform3D ttt1(rrr1,vt1); + HepGeom::Transform3D ttt1(rrr1,vt1); HepGeom::Transform3D ttt2(rrr2,vt2); - GeoShape *ssnew1=new GeoShapeShift(s2,ttt1); + GeoShape *ssnew1=new GeoShapeShift(s2,Amg::CLHEPTransformToEigen(ttt1)); ss = new GeoShapeSubtraction(ss,ssnew1); if (i<(v->NrOfPoints()-2)) { - GeoShape *ssnew2=new GeoShapeShift(s1,ttt2); - ss = new GeoShapeSubtraction(ss,ssnew2); + GeoShape *ssnew2=new GeoShapeShift(s1,Amg::CLHEPTransformToEigen(ttt2)); + ss = new GeoShapeSubtraction(ss,ssnew2); } - ss=new GeoShapeShift(ss,ttref); + ss=new GeoShapeShift(ss,Amg::CLHEPTransformToEigen(ttref)); // std::cout<<" angles: theta "<<axis.theta()<<" phi "<<axis.phi()<<std::endl; CLHEP::HepRotation rr1; @@ -327,7 +329,7 @@ void AGDD2GeoModelBuilder::CreateSnake(AGDDSnake* v) const CLHEP::Hep3Vector vv(v->GetPoint(i).x(),v->GetPoint(i).y(),v->GetPoint(i).z()); HepGeom::Transform3D tt(rr1,vv); - ss=new GeoShapeShift(ss,tt); + ss=new GeoShapeShift(ss,Amg::CLHEPTransformToEigen(tt)); solid=new GeoShapeUnion(solid,ss); } v->SetSolid(solid); @@ -408,7 +410,7 @@ void AGDD2GeoModelBuilder::CreateUnion(AGDDUnion* v) // std::cout<<" volume name "<<vol->GetName()<<std::endl; vol->CreateSolid(); GeoShape *sV=(GeoShape*)(vol->GetSolid()); - sV=new GeoShapeShift(sV,pos->Transform()); + sV=new GeoShapeShift(sV,Amg::CLHEPTransformToEigen(pos->Transform())); for (int i=1;i<nPos;i++) { AGDDPositioner* pp=v->GetDaughter(i); @@ -416,7 +418,7 @@ void AGDD2GeoModelBuilder::CreateUnion(AGDDUnion* v) // std::cout<<" \t secondary volume name "<<vv->GetName()<<std::endl; vv->CreateSolid(); GeoShape *nsV=(GeoShape*)(vv->GetSolid()); - nsV=new GeoShapeShift(nsV,pp->Transform()); + nsV=new GeoShapeShift(nsV,Amg::CLHEPTransformToEigen(pp->Transform())); sV=new GeoShapeUnion(sV,nsV); } v->SetMaterial(vol->GetMaterial()); @@ -430,14 +432,14 @@ void AGDD2GeoModelBuilder::CreateIntersection(AGDDIntersection* v) AGDDVolume *vol=pos->GetVolume(); vol->CreateSolid(); GeoShape *sV=(GeoShape*)(vol->GetSolid()); - sV=new GeoShapeShift(sV,pos->Transform()); + sV=new GeoShapeShift(sV,Amg::CLHEPTransformToEigen(pos->Transform())); for (int i=1;i<nPos;i++) { AGDDPositioner* pp=v->GetDaughter(i); AGDDVolume *vv=pp->GetVolume(); vv->CreateSolid(); GeoShape *nsV=(GeoShape*)(vv->GetSolid()); - nsV=new GeoShapeShift(nsV,pp->Transform()); + nsV=new GeoShapeShift(nsV,Amg::CLHEPTransformToEigen(pp->Transform())); sV=new GeoShapeIntersection(sV,nsV); } v->SetMaterial(vol->GetMaterial()); @@ -450,14 +452,14 @@ void AGDD2GeoModelBuilder::CreateSubtraction(AGDDSubtraction* v) AGDDVolume *vol=pos->GetVolume(); vol->CreateSolid(); GeoShape *sV=(GeoShape*)(vol->GetSolid()); - sV=new GeoShapeShift(sV,pos->Transform()); + sV=new GeoShapeShift(sV,Amg::CLHEPTransformToEigen(pos->Transform())); for (int i=1;i<nPos;i++) { AGDDPositioner* pp=v->GetDaughter(i); AGDDVolume *vv=pp->GetVolume(); vv->CreateSolid(); GeoShape *nsV=(GeoShape*)(vv->GetSolid()); - nsV=new GeoShapeShift(nsV,pp->Transform()); + nsV=new GeoShapeShift(nsV,Amg::CLHEPTransformToEigen(pp->Transform())); sV=new GeoShapeSubtraction(sV,nsV); } v->SetMaterial(vol->GetMaterial()); @@ -542,7 +544,7 @@ void AGDD2GeoModelBuilder::CreateComposition(AGDDComposition *v) // if (isDetElement) std::cout<<"\t\t Detector: "<<volName<<" "<<detFullTag<<std::endl; } HepGeom::Transform3D trf=pos->Transform(); - GeoTransform *geotrf=new GeoTransform(trf); + GeoTransform *geotrf=new GeoTransform(Amg::CLHEPTransformToEigen(trf)); void *temp=vol->GetVolume(); // GeoFullPhysVol are needed for detectors (corresponding to ReadoutElements) @@ -627,7 +629,7 @@ void AGDD2GeoModelBuilder::BuildAllVolumes() std::cout<<"AGDDController: mother not set!!"<<std::endl; return; } - GeoTransform *gtrf=new GeoTransform(trf); + GeoTransform *gtrf=new GeoTransform(Amg::CLHEPTransformToEigen(trf)); m_mother->add(gtrf); m_mother->add(vvv); } @@ -672,7 +674,7 @@ void AGDD2GeoModelBuilder::BuildFromSection(std::string s) std::cout<<"AGDDController: mother not set!!"<<std::endl; return; } - GeoTransform *gtrf=new GeoTransform(trf); + GeoTransform *gtrf=new GeoTransform(Amg::CLHEPTransformToEigen(trf)); m_mother->add(gtrf); m_mother->add(vvv); } @@ -701,7 +703,7 @@ void AGDD2GeoModelBuilder::BuildFromSection(std::string s) std::cout<<"AGDDController: mother not set!!"<<std::endl; return; } - GeoTransform *gtrf=new GeoTransform(trf); + GeoTransform *gtrf=new GeoTransform(Amg::CLHEPTransformToEigen(trf)); m_mother->add(gtrf); m_mother->add(vvv); } @@ -736,7 +738,7 @@ void AGDD2GeoModelBuilder::BuildFromVolume(std::string s) std::cout<<"AGDDController: mother not set!!"<<std::endl; return; } - GeoTransform *gtrf=new GeoTransform(trf); + GeoTransform *gtrf=new GeoTransform(Amg::CLHEPTransformToEigen(trf)); m_mother->add(gtrf); m_mother->add(vvv); } diff --git a/DetectorDescription/AGDD/AGDDControl/src/AGDDController.cxx b/DetectorDescription/AGDD/AGDDControl/src/AGDDController.cxx index 0768a24a6c1..c771dce1c05 100644 --- a/DetectorDescription/AGDD/AGDDControl/src/AGDDController.cxx +++ b/DetectorDescription/AGDD/AGDDControl/src/AGDDController.cxx @@ -18,7 +18,6 @@ #include "GeoModelKernel/GeoVDetectorManager.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoVPhysVol.h" -#include "GeoModelKernel/GeoPVLink.h" #include "GeoModelKernel/GeoPVConstLink.h" #include "StoreGate/StoreGateSvc.h" diff --git a/DetectorDescription/AGDD/AGDDKernel/AGDDKernel/AGDDDetectorPositioner.h b/DetectorDescription/AGDD/AGDDKernel/AGDDKernel/AGDDDetectorPositioner.h index d1afb6874fb..0090c8203ca 100644 --- a/DetectorDescription/AGDD/AGDDKernel/AGDDKernel/AGDDDetectorPositioner.h +++ b/DetectorDescription/AGDD/AGDDKernel/AGDDKernel/AGDDDetectorPositioner.h @@ -5,6 +5,7 @@ #ifndef AGDDDetectorPositioner_H #define AGDDDetectorPositioner_H +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoFullPhysVol.h" #include "CLHEP/Geometry/Transform3D.h" #include "CLHEP/Vector/ThreeVector.h" diff --git a/DetectorDescription/AGDD/AGDDKernel/CMakeLists.txt b/DetectorDescription/AGDD/AGDDKernel/CMakeLists.txt index eca55dd7859..3512565a61b 100644 --- a/DetectorDescription/AGDD/AGDDKernel/CMakeLists.txt +++ b/DetectorDescription/AGDD/AGDDKernel/CMakeLists.txt @@ -5,18 +5,19 @@ # Declare the package name: atlas_subdir( AGDDKernel ) -# Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel ) + DetectorDescription/GeoPrimitives ) # External dependencies: find_package( CLHEP ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( AGDDKernel src/*.cxx PUBLIC_HEADERS AGDDKernel - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelKernel ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} ) diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/LArGM.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/LArGM.py index 853df4b8f2a..e1356826b36 100755 --- a/DetectorDescription/GeoModel/AtlasGeoModel/python/LArGM.py +++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/LArGM.py @@ -9,7 +9,6 @@ from AthenaCommon.DetFlags import DetFlags if ( DetFlags.detdescr.LAr_on() ): from GeoModelSvc.GeoModelSvcConf import GeoModelSvc GeoModelSvc = GeoModelSvc() - from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV GeoModelSvc.DetectorTools += [ LArDetectorToolNV() ] diff --git a/DetectorDescription/GeoModel/GeoAdaptors/CMakeLists.txt b/DetectorDescription/GeoModel/GeoAdaptors/CMakeLists.txt index 7f04caf1688..74ef724ce07 100644 --- a/DetectorDescription/GeoModel/GeoAdaptors/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoAdaptors/CMakeLists.txt @@ -12,6 +12,7 @@ atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloSimEvent Control/StoreGate DetectorDescription/Identifier + DetectorDescription/GeoPrimitives InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetSimEvent diff --git a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoSiHit.icc b/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoSiHit.icc index 1e523bce887..2a6c9edbdd7 100755 --- a/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoSiHit.icc +++ b/DetectorDescription/GeoModel/GeoAdaptors/GeoAdaptors/GeoSiHit.icc @@ -10,7 +10,7 @@ #include "StoreGate/StoreGate.h" #include "InDetIdentifier/PixelID.h" #include "InDetIdentifier/SCT_ID.h" - +#include "GeoPrimitives/CLHEPtoEigenConverter.h" inline void GeoSiHit::init() { @@ -56,7 +56,7 @@ inline HepGeom::Point3D<double> GeoSiHit::getGlobalPosition() const { if (geoelement) { - const HepGeom::Point3D<double> globalStartPos = geoelement->transformHit() * HepGeom::Point3D<double>(m_hit->localStartPosition()); + const HepGeom::Point3D<double> globalStartPos = Amg::EigenTransformToCLHEP(geoelement->transformHit()) * HepGeom::Point3D<double>(m_hit->localStartPosition()); double x=globalStartPos.x(); double y=globalStartPos.y(); diff --git a/DetectorDescription/GeoModel/GeoModelExamples/CMakeLists.txt b/DetectorDescription/GeoModel/GeoModelExamples/CMakeLists.txt index 4453e6da32d..2c31c9c6e38 100644 --- a/DetectorDescription/GeoModel/GeoModelExamples/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoModelExamples/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( GeoModelExamples ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities PRIVATE Control/StoreGate @@ -17,19 +16,19 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel ) # External dependencies: -find_package( CLHEP ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( GeoModelExamplesLib src/*.cxx PUBLIC_HEADERS GeoModelExamples - PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES GeoModelKernel GeoModelUtilities StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} Identifier GaudiKernel ) + PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES GeoModelUtilities StoreGateLib + PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} Identifier GaudiKernel ) atlas_add_component( GeoModelExamples src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelKernel GeoModelUtilities StoreGateLib SGtests Identifier GaudiKernel GeoModelExamplesLib ) + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities StoreGateLib Identifier GaudiKernel GeoModelExamplesLib ) diff --git a/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorFactory.cxx b/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorFactory.cxx index b9bea9a06ed..ab0496f70da 100755 --- a/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorFactory.cxx +++ b/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorFactory.cxx @@ -5,6 +5,8 @@ #include "ToyDetectorFactory.h" #include "CentralScrutinizer.h" #include "GeoModelInterfaces/AbsMaterialManager.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTube.h" @@ -16,14 +18,14 @@ #include "GeoModelKernel/GeoSerialDenominator.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoSerialTransformer.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; @@ -65,7 +67,7 @@ void ToyDetectorFactory::create(GeoPhysVol *world) //-----------------------------------------------------------------------------------// // Next make the box that describes the shape of the toy volume: // // // - const GeoBox *toyBox = new GeoBox(800*CLHEP::cm,800*CLHEP::cm, 1000*CLHEP::cm); // + const GeoBox *toyBox = new GeoBox(800*GeoModelKernelUnits::cm,800*GeoModelKernelUnits::cm, 1000*GeoModelKernelUnits::cm); // // // // Bundle this with a material into a logical volume: // // // @@ -84,7 +86,7 @@ void ToyDetectorFactory::create(GeoPhysVol *world) // Daughters // // // // // - const GeoTube *ringTube = new GeoTube(500*CLHEP::cm, 1000*CLHEP::cm, 5.0*CLHEP::cm); // + const GeoTube *ringTube = new GeoTube(500*GeoModelKernelUnits::cm, 1000*GeoModelKernelUnits::cm, 5.0*GeoModelKernelUnits::cm); // // // // Bundle this with a material into a logical volume: // // // @@ -96,7 +98,7 @@ void ToyDetectorFactory::create(GeoPhysVol *world) toyPhys->add(ringName); // for (int i=0;i<100;i++) { // GeoFullPhysVol *ringPhys = new GeoFullPhysVol(ringLog); // - GeoAlignableTransform *xform = new GeoAlignableTransform(HepGeom::TranslateZ3D((i-50)*20*CLHEP::cm)); + GeoAlignableTransform *xform = new GeoAlignableTransform(GeoTrf::TranslateZ3D((i-50)*20*GeoModelKernelUnits::cm)); toyPhys->add(xform); // toyPhys->add(ringPhys); // m_detectorManager->addCentralScrutinizer(new CentralScrutinizer(ringPhys)); // @@ -111,11 +113,11 @@ void ToyDetectorFactory::create(GeoPhysVol *world) // parametrizations in the Toy // //-----------------------------------------------------------------------------------// - GeoBox *sPass = new GeoBox(5.0*CLHEP::cm, 30*CLHEP::cm, 30*CLHEP::cm); + GeoBox *sPass = new GeoBox(5.0*GeoModelKernelUnits::cm, 30*GeoModelKernelUnits::cm, 30*GeoModelKernelUnits::cm); GeoLogVol *lPass = new GeoLogVol("Passive", sPass, poly); GeoPhysVol *pPass = new GeoPhysVol(lPass); - GeoBox *sIPass = new GeoBox(4*CLHEP::cm, 25*CLHEP::cm, 25*CLHEP::cm); + GeoBox *sIPass = new GeoBox(4*GeoModelKernelUnits::cm, 25*GeoModelKernelUnits::cm, 25*GeoModelKernelUnits::cm); GeoLogVol *lIPass = new GeoLogVol("InnerPassive", sIPass, air); GeoPhysVol *pIPass = new GeoPhysVol(lIPass); @@ -124,11 +126,11 @@ void ToyDetectorFactory::create(GeoPhysVol *world) const unsigned int NPLATES=100; Variable i; Sin sin; - GENFUNCTION f = 360*CLHEP::deg/NPLATES*i; + GENFUNCTION f = 360*GeoModelKernelUnits::deg/NPLATES*i; GENFUNCTION g = sin(4*f); GENFUNCTION h = -g; - TRANSFUNCTION t1 = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(1100*CLHEP::cm)*Pow(HepGeom::TranslateZ3D(800*CLHEP::cm),g); - TRANSFUNCTION t2 = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(1100*CLHEP::cm)*Pow(HepGeom::TranslateZ3D(800*CLHEP::cm),h); + TRANSFUNCTION t1 = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(1100*GeoModelKernelUnits::cm)*Pow(GeoTrf::TranslateZ3D(800*GeoModelKernelUnits::cm),g); + TRANSFUNCTION t2 = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(1100*GeoModelKernelUnits::cm)*Pow(GeoTrf::TranslateZ3D(800*GeoModelKernelUnits::cm),h); //-----------------------------------------------------------------------------------// // Inside, by the way, the serial transformer will evaluate the functions: // diff --git a/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorTool.cxx b/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorTool.cxx index 4459e699f35..243055152ca 100755 --- a/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorTool.cxx +++ b/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorTool.cxx @@ -8,66 +8,76 @@ #include "GeoModelUtilities/GeoModelExperiment.h" #include "GaudiKernel/IService.h" #include "GaudiKernel/ISvcLocator.h" -#include "GaudiKernel/MsgStream.h" #include "StoreGate/StoreGateSvc.h" -/** - ** Constructor(s) - **/ +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/GeoVolumeCursor.h" +#include <string> + ToyDetectorTool::ToyDetectorTool( const std::string& type, const std::string& name, const IInterface* parent ) -: GeoModelTool( type, name, parent ) + : GeoModelTool( type, name, parent ) { } -/** - ** Destructor - **/ ToyDetectorTool::~ToyDetectorTool() { - // This will need to be modified once we register the Toy DetectorNode in - // the Transient Detector Store - if ( 0 != m_detector ) { - delete m_detector; - m_detector = 0; - } + delete m_detector; } -/** - ** Create the Detector Node corresponding to this tool - **/ -StatusCode -ToyDetectorTool::create() +StatusCode ToyDetectorTool::create() { - MsgStream log(msgSvc(), name()); - // - // Locate the top level experiment node - // + ATH_MSG_INFO("ToyDetectorTool::create() ..."); + + // Locate the top level experiment GeoModelExperiment* theExpt = nullptr; - if (StatusCode::SUCCESS != detStore()->retrieve( theExpt, "ATLAS" )) { - log << MSG::ERROR - << "Could not find GeoModelExperiment ATLAS" - << endmsg; - return (StatusCode::FAILURE); - } + ATH_CHECK(detStore()->retrieve(theExpt, "ATLAS")); ToyDetectorFactory theToyFactory(detStore().operator->()); - if ( 0 == m_detector ) { - // Create the ToyDetectorNode instance + if(m_detector==nullptr) { + // Build geometry try { // // This strange way of casting is to avoid an // utterly brain damaged compiler warning. // - GeoPhysVol *world=&*theExpt->getPhysVol(); + GeoPhysVol *world=theExpt->getPhysVol(); theToyFactory.create(world); - } catch (const std::bad_alloc&) { - log << MSG::FATAL << "Could not create new ToyDetectorNode!" << endmsg; + printVolume(world); + } + catch (const std::bad_alloc&) { + ATH_MSG_FATAL("Could not Toy Detector Geometry!"); return StatusCode::FAILURE; } - // Register the ToyDetectorNode instance with the Transient Detector Store + // Add detector manager to AtlasExperiment and also record it into DetStore theExpt->addManager(theToyFactory.getDetectorManager()); - if (detStore()->record(theToyFactory.getDetectorManager(),theToyFactory.getDetectorManager()->getName())!=StatusCode::SUCCESS) return StatusCode::FAILURE; - return StatusCode::SUCCESS; + if (detStore()->record(theToyFactory.getDetectorManager(),theToyFactory.getDetectorManager()->getName()).isSuccess()) return StatusCode::SUCCESS; + ATH_MSG_FATAL("Failed to record Toy Detector Manager into Detector Store!"); + } + else { + ATH_MSG_FATAL("Attempt to build Toy Detector Geometry one more time. The geometry can be built only once!"); } return StatusCode::FAILURE; } + +void ToyDetectorTool::printVolume(GeoPVConstLink volume) +{ + static int level{0}; + GeoVolumeCursor cursor(volume); + while(!cursor.atEnd()) { + GeoPVConstLink physChild = cursor.getVolume(); + GeoTrf::Transform3D position = cursor.getTransform(); + for(int k{0};k<level;++k) std::cout << "... "; + std::cout << cursor.getName() << " " << (cursor.getId().isValid()?std::to_string(cursor.getId()).c_str():"N/A") + << " Transform:" << "\n"; + for(int i{0};i<3;++i) { + for(int j{0};j<4;++j) { + std::cout << position(i,j) << " "; + } + std::cout << "\n"; + } + level++; + printVolume(physChild); + level--; + cursor.next(); + } +} diff --git a/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorTool.h b/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorTool.h index 0c8605ec0c3..9be8ef68bfe 100755 --- a/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorTool.h +++ b/DetectorDescription/GeoModel/GeoModelExamples/src/ToyDetectorTool.h @@ -6,17 +6,17 @@ #define GEOMODELEXAMPLES_TOYDETECTORTOOL_H #include "GeoModelUtilities/GeoModelTool.h" +#include "GeoModelKernel/GeoPVConstLink.h" -class ToyDetectorTool : public GeoModelTool { +class ToyDetectorTool : public GeoModelTool +{ public: - - // Standard Constructor ToyDetectorTool( const std::string& type, const std::string& name, const IInterface* parent ); - - // Standard Destructor virtual ~ToyDetectorTool() override final; virtual StatusCode create() override final; + private: + void printVolume(GeoPVConstLink volime); }; #endif // GEOMODELEXAMPLES_TOYDETECTORTOOL_H diff --git a/DetectorDescription/GeoModel/GeoModelKernel/CMakeLists.txt b/DetectorDescription/GeoModel/GeoModelKernel/CMakeLists.txt deleted file mode 100644 index ab6956fee8f..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -################################################################################ -# Package: GeoModelKernel -################################################################################ - -# Declare the package name: -atlas_subdir( GeoModelKernel ) - -# External dependencies: -find_package( CLHEP ) - -# Component(s) in the package: -atlas_add_library( GeoModelKernel - src/*.cxx - PUBLIC_HEADERS GeoModelKernel - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ) - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/CellBinning.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/CellBinning.h deleted file mode 100755 index 966ffdd6db8..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/CellBinning.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_CELLBINNING_H -#define GEOMODELKERNEL_CELLBINNING_H - -/** - * @class CellBinning - * - * @brief A simple class to specify a range, and a number of bins. - * The binning is specified as one would specify bins of a histogram. - * In addition to the usual start-of-range, end-of-range, and number - * of divisions this class also has an index for the first bin number. - * In this package the cell binning is used to set up regions of homogenous - * granularity (or just "regions"). - */ - -class CellBinning -{ - - public: - - /** - * @brief Constructor - */ - CellBinning (double startVal, double endVal, unsigned int nBins, unsigned int firstDivisionNumber = 0); - - - /** - * @brief Gets the ith bin lower edge - */ - double binLower (unsigned int i) const; - - /** - * @brief gets the ith bin upper edge - */ - double binUpper (unsigned int i) const; - - /** - * @brief gets the ith bin center - */ - double binCenter (unsigned int i) const; - - /** - * @brief Starting value - */ - double getStart () const; - - /** - * @brief Ending Value - */ - double getEnd () const; - - /** - * @brief Number of Bins - */ - unsigned int getNumDivisions () const; - - /** - * @brief gets the bin width - */ - double getDelta () const; - - /** - * @brief Number for the first division. Optional, default=0. - */ - unsigned int getFirstDivisionNumber () const; - - - private: - - double m_start; - double m_end; - unsigned int m_numDivisions; - double m_delta; - unsigned int m_firstDivisionNumber; -}; - -inline double CellBinning::binLower (unsigned int i) const -{ - return m_start + (i-m_firstDivisionNumber)*m_delta; -} - -inline double CellBinning::binUpper (unsigned int i) const -{ - return m_start + (i-m_firstDivisionNumber+1)*m_delta; -} - -inline double CellBinning::binCenter (unsigned int i) const -{ - return m_start + (i-m_firstDivisionNumber+0.5)*m_delta; -} - -inline double CellBinning::getStart () const -{ - return m_start; -} - -inline double CellBinning::getEnd () const -{ - return m_end; -} - -inline unsigned int CellBinning::getNumDivisions () const -{ - return m_numDivisions; -} - -inline double CellBinning::getDelta () const -{ - return m_delta; -} - -inline unsigned int CellBinning::getFirstDivisionNumber () const -{ - return m_firstDivisionNumber; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/CellPartitioning.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/CellPartitioning.h deleted file mode 100644 index 96ef57366da..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/CellPartitioning.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_CELLPARTITIONING_H -#define GEOMODELKERNEL_CELLPARTITIONING_H -#include <vector> - -class CellPartitioning -{ - public: - - CellPartitioning(unsigned int firstDivisionNumber = 0); - - CellPartitioning(const CellPartitioning& right); - - virtual ~CellPartitioning(); - - CellPartitioning& operator=(const CellPartitioning& right); - - void addValue(double xVal); - - double binLower(unsigned int i) const - { - return m_partition[i-getFirstDivisionNumber()]; - } - - double binUpper(unsigned int i) const - { - return m_partition[i-getFirstDivisionNumber()+1]; - } - - double binCenter(unsigned int i) const - { - return 0.5*(binUpper(i)+binLower(i)); - } - - unsigned int getNumDivisions() const - { - return m_partition.size()-1; - } - - unsigned int getFirstDivisionNumber() const - { - return m_firstDivisionNumber; - } - - double getStart() const - { - return m_partition[0]; - } - - double getEnd() const - { - return m_partition[m_partition.size()-1]; - } - - private: - - std::vector<double> m_partition; - - unsigned int m_firstDivisionNumber; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/ConstLink.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/ConstLink.h deleted file mode 100755 index 42c097699de..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/ConstLink.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_CONSTLINK_H -#define GEOMODELKERNEL_CONSTLINK_H - -/** - * @class ConstLink - * - * @brief Smart links to reference-counted pointers. Used in this - * package for calorimeter cells - ** Template Smart Pointer Class. This reference counted - * link allocates on demand. It audits the total pointer - * count and collects the garbage when nobody's looking. - */ - -template <class T> -class ConstLink -{ - public: - - - /** - * @brief Constructor - */ - ConstLink(); - - /** - * @brief Copy Constructor - */ - ConstLink(const ConstLink< T > &right); - - /** - * @brief Constructor - */ - ConstLink (const T *target); - - /** - * @brief Destructor - */ - virtual ~ConstLink(); - - /** - * @brief Assignment - */ - ConstLink< T > & operator=(const ConstLink< T > &right); - - /** - * @brief Equality - */ - int operator==(const ConstLink< T > &right) const; - - /** - * @brief Inequality - */ - int operator!=(const ConstLink< T > &right) const; - - - /** - * @brief Relational operator - */ - int operator<(const ConstLink< T > &right) const; - - /** - * @brief Relational operator - */ - int operator>(const ConstLink< T > &right) const; - - /** - * @brief Relational operator - */ - int operator<=(const ConstLink< T > &right) const; - - /** - * @brief Relational operator - */ - int operator>=(const ConstLink< T > &right) const; - - - - /** - * @brief Dereference: (*t).method(); - */ - virtual const T & operator * () const; - - /** - * @brief Dereference: t->method() - */ - virtual const T * operator -> () const; - - /** - * @brief Check pointer validity: if (t) {...} - */ - operator bool () const; - - - - private: - /** - * @brief Raw pointer to reference counted object. - */ - mutable T *m_ptr; -}; - - - -template <class T> -inline ConstLink<T>::ConstLink() - :m_ptr(nullptr) -{ -} - -template <class T> -inline ConstLink<T>::ConstLink(const ConstLink<T> &right) - :m_ptr(right.m_ptr) -{ - if (m_ptr) m_ptr->ref(); -} - -template <class T> -inline ConstLink<T>::ConstLink (const T *target) - :m_ptr(const_cast<T *> (target)) -{ - if (target) target->ref(); -} - - -template <class T> -inline ConstLink<T>::~ConstLink() -{ - if (m_ptr) m_ptr->unref(); -} - - -template <class T> -inline ConstLink<T> & ConstLink<T>::operator=(const ConstLink<T> &right) -{ - if (this!=&right) { - if (m_ptr) m_ptr->unref(); - m_ptr = right.m_ptr; - if (m_ptr) m_ptr->ref(); - } - return *this; -} - - -template <class T> -inline int ConstLink<T>::operator==(const ConstLink<T> &right) const -{ - return m_ptr==right.m_ptr; -} - -template <class T> -inline int ConstLink<T>::operator!=(const ConstLink<T> &right) const -{ - return m_ptr!=right.m_ptr; -} - - -template <class T> -inline int ConstLink<T>::operator<(const ConstLink<T> &right) const -{ - return m_ptr<right.m_ptr; -} - -template <class T> -inline int ConstLink<T>::operator>(const ConstLink<T> &right) const -{ - return m_ptr>right.m_ptr; -} - -template <class T> -inline int ConstLink<T>::operator<=(const ConstLink<T> &right) const -{ - return m_ptr<=right.m_ptr; -} - -template <class T> -inline int ConstLink<T>::operator>=(const ConstLink<T> &right) const -{ - return m_ptr>=right.m_ptr; -} - - - -template <class T> -inline const T & ConstLink<T>::operator * () const -{ - return *m_ptr; -} - -template <class T> -inline const T * ConstLink<T>::operator -> () const -{ - return m_ptr; -} - -template <class T> -inline ConstLink<T>::operator bool () const -{ - return m_ptr; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAbsPositionInfo.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAbsPositionInfo.h deleted file mode 100755 index ed6ecb53f09..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAbsPositionInfo.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOABSPOSITIONINFO_H -#define GEOMODELKERNEL_GEOABSPOSITIONINFO_H - -/** - * @class GeoAbsPositionInfo - * - * @brief This class represents anything whose default and aligned - * postions are known and cached. - */ - -#include <CLHEP/Geometry/Transform3D.h> - -class GeoAbsPositionInfo -{ - public: - GeoAbsPositionInfo(); - ~GeoAbsPositionInfo(); - - // Returns the default absolute transform. - const HepGeom::Transform3D * getAbsTransform () const; - - // Returns the default absolute transform. - const HepGeom::Transform3D * getDefAbsTransform () const; - - - // Clears the absolute transform. - void clearAbsTransform (); - - // Clears the default absolute transform. - void clearDefAbsTransform (); - - // Sets the absolute transform. - void setAbsTransform (const HepGeom::Transform3D & xform); - - // Sets the absolute transform. - void setDefAbsTransform (const HepGeom::Transform3D & xform); - - private: - GeoAbsPositionInfo(const GeoAbsPositionInfo &right); - GeoAbsPositionInfo & operator=(const GeoAbsPositionInfo &right); - - // The absolute transform from the world coord down to this - // positioned object. - HepGeom::Transform3D *m_absTransform; - - // The default absolute transform from the world coord down - // to this positioned object. - HepGeom::Transform3D *m_defAbsTransform; -}; - -inline const HepGeom::Transform3D * GeoAbsPositionInfo::getAbsTransform () const -{ - return m_absTransform; -} - -inline const HepGeom::Transform3D * GeoAbsPositionInfo::getDefAbsTransform () const -{ - return m_defAbsTransform; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAccessVolAndSTAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAccessVolAndSTAction.h deleted file mode 100755 index f3dd738150e..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAccessVolAndSTAction.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOACCESSVOLANDSTACTION_H -#define GEOMODELKERNEL_GEOACCESSVOLANDSTACTION_H - -/** - * @class GeoAccessVolAndSTAction - * - * @brief Accesses volumes and serial transformers, returning the ith volume - * and also its transformation relative to the parent. - * - * Used only by Geo2G4. Hence should not depend on the Alignment Store - */ - -#include "GeoModelKernel/GeoNodeAction.h" -#include "CLHEP/Geometry/Transform3D.h" -#include <vector> - -class GeoVPhysVol; -class GeoTransform; - -class GeoAccessVolAndSTAction final : public GeoNodeAction -{ - public: - GeoAccessVolAndSTAction(unsigned int index); - virtual ~GeoAccessVolAndSTAction() override; - - virtual void handleTransform(const GeoTransform* xform) override; - virtual void handlePhysVol(const GeoPhysVol* vol) override; - virtual void handleFullPhysVol(const GeoFullPhysVol* vol) override; - - PVConstLink getVolume() const; - const HepGeom::Transform3D & getTransform() const; - const HepGeom::Transform3D & getDefTransform() const; - const std::string & getName() const; - - virtual void handleNameTag(const GeoNameTag *nameTag) override; - virtual void handleSerialDenominator(const GeoSerialDenominator* sD) override; - - virtual void handleSerialTransformer(const GeoSerialTransformer* sT) override; - const GeoSerialTransformer* getSerialTransformer() const; - - virtual void handleIdentifierTag(const GeoIdentifierTag* idTag) override; - - Query<unsigned int> getId() const; - - private: - GeoAccessVolAndSTAction(const GeoAccessVolAndSTAction &right); - const GeoAccessVolAndSTAction & operator=(const GeoAccessVolAndSTAction &right); - - /// A pointer to the ith physical volume under this one. - PVConstLink m_volume; - - /// A pointer to the Serial Transformer - const GeoSerialTransformer* m_serialTransformer; - - /// The transformation and default transformation to the ith volume. - HepGeom::Transform3D m_transform; - HepGeom::Transform3D m_defTransform; - - unsigned int m_index; - unsigned int m_counter; - - /// The name of the volume. From a nametag or a serial denominator - mutable std::string m_name; - - /// The identifier of the volume. From an identifier tag. - mutable Query<unsigned int> m_id; - - /// A pointer to a name tag. If the volume is named. - const GeoNameTag *m_nameTag; - const GeoSerialDenominator *m_serialDenominator; - const GeoIdentifierTag *m_idTag; - - std::vector<const GeoTransform *> m_pendingTransformList; - unsigned int m_serialDenomPosition; -}; - -#endif - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAlignableTransform.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAlignableTransform.h deleted file mode 100755 index 97cd3fd142f..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoAlignableTransform.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOALIGNABLETRANSFORM_H -#define GEOMODELKERNEL_GEOALIGNABLETRANSFORM_H - -#include "GeoModelKernel/GeoTransform.h" -#include <vector> - -class GeoVAlignmentStore; - -class GeoAlignableTransform final : public GeoTransform -{ - public: - GeoAlignableTransform(const HepGeom::Transform3D &transform); - - /// Gets the total transform, including the alignment correction - virtual HepGeom::Transform3D getTransform(const GeoVAlignmentStore* store=nullptr) const override; - - /// Sets an alignment delta - void setDelta(const HepGeom::Transform3D& delta, GeoVAlignmentStore* store=nullptr); - - /// Clears the alignment delta - // To Do: This method will become obsolete once we migrate LAr to the Alignment Store. - // At that point thie method should be dropped - void clearDelta(GeoVAlignmentStore* store=nullptr); - - /// When a node is added to a parent in the graph, the node - /// is always notified. What happens at that time is up to - /// the node. Most nodes do not need to do anything. - /// Some--the alignable transforms in particular--need to - /// take some actions, such as adding the parent volume to a list - virtual void dockTo(GeoVPhysVol* parent) override; - - protected: - virtual ~GeoAlignableTransform() override; - - private: - GeoAlignableTransform(const GeoAlignableTransform &right); - GeoAlignableTransform & operator=(const GeoAlignableTransform &right); - - // Pointer to an alignment correction. Until some - // alignment correction is set, this pointer is nullptr and - // the memory is unallocated. - HepGeom::Transform3D* m_delta; - - // A list of parents who use this alignable target. They - // must all be notified when the alignment changes! - std::vector<GeoGraphNode*> m_parentList; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoBox.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoBox.h deleted file mode 100755 index b024be9ad71..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoBox.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOBOX_H -#define GEOMODELKERNEL_GEOBOX_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoBox : public GeoShape -{ - public: - // Constructor for the BOX. - GeoBox (double XHalfLength, double YHalfLength, double ZHalfLength); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the BOX shape type, as a string. - virtual const std::string & type () const; - - // Returns the BOX shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Executes a GeoShapeAction. - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification., - static ShapeType getClassTypeID (); - - // Half length in the x-direction. - const double& getXHalfLength () const; - - // Half-length in the y direction. - const double& getYHalfLength () const; - - // Half-length in the z direction. - const double& getZHalfLength () const; - - protected: - virtual ~GeoBox(); - - private: - GeoBox(const GeoBox &right); - GeoBox & operator=(const GeoBox &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - double m_xHalfLength; - double m_yHalfLength; - double m_zHalfLength; -}; - -inline const std::string& GeoBox::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoBox::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoBox::getXHalfLength () const -{ - return m_xHalfLength; -} - -inline const double& GeoBox::getYHalfLength () const -{ - return m_yHalfLength; -} - -inline const double& GeoBox::getZHalfLength () const -{ - return m_zHalfLength; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoClearAbsPosAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoClearAbsPosAction.h deleted file mode 100755 index e079a39b20e..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoClearAbsPosAction.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** - * @class GeoClearAbsPosAction - * - * @brief Clears absolute postion information from full physical - * volume nodes. This action is initiated from a change in - * the alignment of an alignable transformation...although - * it may of course be used by other clients, too. - */ - -#ifndef GEOMODELKERNEL_GEOCLEARABSPOSACTION_H -#define GEOMODELKERNEL_GEOCLEARABSPOSACTION_H - -#include "GeoModelKernel/GeoNodeAction.h" - -class GeoClearAbsPosAction : public GeoNodeAction -{ - public: - GeoClearAbsPosAction(); - virtual ~GeoClearAbsPosAction(); - - // Handles a physical volume. - virtual void handleFullPhysVol (const GeoFullPhysVol *vol); - - private: - GeoClearAbsPosAction(const GeoClearAbsPosAction &right); - GeoClearAbsPosAction & operator=(const GeoClearAbsPosAction &right); - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCons.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCons.h deleted file mode 100755 index 052e59d381b..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCons.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOCONS_H -#define GEOMODELKERNEL_GEOCONS_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoCons : public GeoShape -{ - public: - GeoCons (double RMin1, double RMin2, double RMax1, double RMax2, double DZ, double SPhi, double DPhi); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the CONS shape type, as a string. - virtual const std::string & type () const; - - // Returns the CONS shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - // Inside radius at -dZ - const double& getRMin1 () const; - - // Inside radius at +dZ - const double& getRMin2 () const; - - // Outside radius at -dZ - const double& getRMax1 () const; - - // Outside radius at +dZ - const double& getRMax2 () const; - - // Half length in Z direction. - const double& getDZ () const; - - // Starting angle of the segment in radians - const double& getSPhi () const; - - // Delta angle of the segment in radians. - const double& getDPhi () const; - - protected: - virtual ~GeoCons(); - - private: - GeoCons(const GeoCons &right); - GeoCons & operator=(const GeoCons &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_rMin1; - double m_rMin2; - double m_rMax1; - double m_rMax2; - double m_dZ; - double m_sPhi; - double m_dPhi; -}; - -inline const std::string& GeoCons::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoCons::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoCons::getRMin1 () const -{ - return m_rMin1; -} - -inline const double& GeoCons::getRMin2 () const -{ - return m_rMin2; -} - -inline const double& GeoCons::getRMax1 () const -{ - return m_rMax1; -} - -inline const double& GeoCons::getRMax2 () const -{ - return m_rMax2; -} - -inline const double& GeoCons::getDZ () const -{ - return m_dZ; -} - -inline const double& GeoCons::getSPhi () const -{ - return m_sPhi; -} - -inline const double& GeoCons::getDPhi () const -{ - return m_dPhi; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCountVolAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCountVolAction.h deleted file mode 100755 index 91667073523..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCountVolAction.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOCOUNTVOLACTION_H -#define GEOMODELKERNEL_GEOCOUNTVOLACTION_H - -#include "GeoModelKernel/GeoNodeAction.h" - -class GeoCountVolAction : public GeoNodeAction -{ - public: - GeoCountVolAction (); - virtual ~GeoCountVolAction(); - - // Handles a physical volume. - virtual void handlePhysVol (const GeoPhysVol *); - - // Handles a physical volume. - virtual void handleFullPhysVol (const GeoFullPhysVol *); - - // Handles a Serial Transformer - virtual void handleSerialTransformer (const GeoSerialTransformer *st); - - // The volume count. - unsigned int getCount () const; - - private: - GeoCountVolAction(const GeoCountVolAction &right); - GeoCountVolAction & operator=(const GeoCountVolAction &right); - - unsigned int m_count; -}; - -inline unsigned int GeoCountVolAction::getCount () const -{ - return m_count; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCountVolAndSTAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCountVolAndSTAction.h deleted file mode 100755 index 7d49c5f1bc1..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCountVolAndSTAction.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOCOUNTVOLANDSTACTION_H -#define GEOMODELKERNEL_GEOCOUNTVOLANDSTACTION_H - -/** - * @class: GeoCountVolAndSTAction - * - * @brief An action to count the number of physical volumes - * and Serial Transformers - */ - -#include "GeoModelKernel/GeoNodeAction.h" - -class GeoCountVolAndSTAction : public GeoNodeAction -{ - public: - GeoCountVolAndSTAction(); - virtual ~GeoCountVolAndSTAction(); - - virtual void handlePhysVol(const GeoPhysVol*); - virtual void handleFullPhysVol(const GeoFullPhysVol*); - virtual void handleSerialTransformer(const GeoSerialTransformer*); - - unsigned int getCount() const; - - private: - GeoCountVolAndSTAction(const GeoCountVolAndSTAction &right); - const GeoCountVolAndSTAction & operator=(const GeoCountVolAndSTAction &right); - - unsigned int m_count; -}; - -inline unsigned int GeoCountVolAndSTAction::getCount() const -{ - return m_count; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCutVolAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCutVolAction.h deleted file mode 100755 index 4890003655c..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoCutVolAction.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOCUTVOLACTION_H -#define GEOMODELKERNEL_GEOCUTVOLACTION_H - -/** - * @class GeoCutVolAction - * - * @brief Geo Volume action providing a mechanism for Cutoff implementation - * - * The cutoff is applied to the mother Physical Volume and then it is - * propagated down to all of child volumes. - * - * GeoCutVolAction object navigates the input Physical Volume (PV) tree. - * For each original PV in the tree it creates and a new PV with - * the same characteristics - material, LV name, PV name, ID, transform - * in parents coordinate frame - except for shape. The new PV hierarchy - * is kept by the GeoCutVolAction internally and can be obtained after - * the action is done by calling getPV() method. - * - * When the cut action is finished users have to use the new PV tree - * obtained with getPV(). The original PV can be dereferenced and - * the action object destroyed. - * - * In order to implement a cutoff, one needs to provide two input - * arguments to the constructor of GeoCutVolAction - * 1. A shape to be cut off the mother volume and all its children - * 2. A transformation of the cutoff shape with respect to the - * coordinate frame of the mother shape - * - * Here is an example of GeoCutVolAction usage: - * - * |--------------------------------------------------------------------------| - * | ... First construct a physical volume *origPhysVol* and add all daughter | - * | volumes to it | - * | | - * | GeoCutVolAction action(shape,transform); | - * | pPhysVol->apply(&action); | - * | GeoPhysVol* cutPhysVol = action.getPV(); | - * | pPhysVol->unref(); | - * | | - * | ... Use *cutPhysVol* afterwards (atach to the upper level volumes) | - * |--------------------------------------------------------------------------| - */ - -#include "GeoModelKernel/GeoVolumeAction.h" -#include "GeoModelKernel/GeoShape.h" -#include "CLHEP/Geometry/Transform3D.h" -#include <stack> - -class GeoPhysVol; - -class GeoCutVolAction : public GeoVolumeAction -{ - public: - // Constructor parameters: - // Shape: the shape to be cut - // Transformation: Shape transformation with respect to the mother Physical Volume - GeoCutVolAction(const GeoShape& Shape, - const HepGeom::Transform3D& Transform); - - ~GeoCutVolAction(); - - virtual void handleVPhysVol (const GeoVPhysVol *); - - // Get the cutoff result - GeoPhysVol* getPV(); - - private: - GeoPhysVol* m_physVol; - - const GeoShape& m_shape; - HepGeom::Transform3D m_transform; - - std::stack<GeoPhysVol*>* m_copyStack; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoElement.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoElement.h deleted file mode 100755 index b3abcb9f2b1..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoElement.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOELEMENT_H -#define GEOMODELKERNEL_GEOELEMENT_H - -/** - * @class GeoElement - * - * @brief This class represents chemical elements. Elements are - * allocated on the heap and deleted automatically when their reference count - * falls to zero. - */ - -#include "GeoModelKernel/RCBase.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include <string> - -class GeoElement : public RCBase -{ - public: - GeoElement (const std::string &Name, const std::string &Symbol, double Z, double A); - - int operator==(const GeoElement &right) const; - int operator!=(const GeoElement &right) const; - - // Returns the effective number of nucleons in the element. - double getN () const; - - // The name of the element, e.g. "Carbon". - const std::string& getName () const; - - // The chemical symbol for the element, e.g. C, O, S, Na.... - const std::string& getSymbol () const; - - // The atomic number Z for the material. - const double& getZ () const; - - // The average atomic mass for the element. - const double& getA () const; - - // Tsai formula for the radiation length - double getRadTsai () const; - - protected: - virtual ~GeoElement(); - - private: - GeoElement(const GeoElement &right); - GeoElement & operator=(const GeoElement &right); - - std::string m_name; - std::string m_symbol; - - double m_z; - double m_a; -}; - -inline int GeoElement::operator==(const GeoElement &right) const -{ - return - m_name == - right.m_name && m_symbol == right.m_symbol && m_z == right.m_z && m_a == right.m_a; -} - -inline int GeoElement::operator!=(const GeoElement &right) const -{ - return m_name != right.m_name || - m_symbol != right.m_symbol || m_z != right.m_z || m_a != right.m_a; -} - -inline double GeoElement::getN () const -{ - return m_a * (CLHEP::mole / CLHEP::gram); -} - -inline const std::string& GeoElement::getName () const -{ - return m_name; -} - -inline const std::string& GeoElement::getSymbol () const -{ - return m_symbol; -} - -inline const double& GeoElement::getZ () const -{ - return m_z; -} - -inline const double& GeoElement::getA () const -{ - return m_a; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoEllipticalTube.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoEllipticalTube.h deleted file mode 100755 index a374b8e6db7..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoEllipticalTube.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOELLIPTICALTUBE_H -#define GEOMODELKERNEL_GEOELLIPTICALTUBE_H - -/** - * @class: GeoEllipticalTube - * - * @brief This is a tube with elliptical cross section - * The equation of the surface in x/y is 1.0 = (x/dx)**2 + (y/dy)**2 - */ - -#include "GeoModelKernel/GeoShape.h" - -class GeoEllipticalTube : public GeoShape -{ - public: - GeoEllipticalTube(double XHalfLength, double YHalfLength, double ZHalfLength); - - virtual double volume () const; - - virtual const std::string & type () const; - virtual ShapeType typeID () const; - - virtual void exec (GeoShapeAction *action) const; - - static const std::string& getClassType (); - static ShapeType getClassTypeID (); - - const double& getXHalfLength() const; - const double& getYHalfLength() const; - const double& getZHalfLength() const; - - protected: - virtual ~GeoEllipticalTube(); - - private: - - GeoEllipticalTube(const GeoEllipticalTube &right); - GeoEllipticalTube & operator=(const GeoEllipticalTube &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_xHalfLength; - double m_yHalfLength; - double m_zHalfLength; -}; - - -inline const std::string& GeoEllipticalTube::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoEllipticalTube::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoEllipticalTube::getXHalfLength() const -{ - return m_xHalfLength; -} - -inline const double& GeoEllipticalTube::getYHalfLength() const -{ - return m_yHalfLength; -} - -inline const double& GeoEllipticalTube::getZHalfLength() const -{ - return m_zHalfLength; -} - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFacet.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFacet.h deleted file mode 100755 index a2310520ba5..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFacet.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOFACET_H -#define GEOMODELKERNEL_GEOFACET_H - -/** - * @class: GeoFacet - * - * @brief Base class for GeoModel Facets - * Two implementations exist: - * 1. GeoTriangularFacet - * 2. GeoQuadrangularFacet - */ - -#include "GeoModelKernel/RCBase.h" -#include "CLHEP/Vector/ThreeVector.h" -#include <vector> - -typedef CLHEP::Hep3Vector GeoFacetVertex; - -// ** Base class -class GeoFacet : public RCBase -{ - public: - enum GeoFacetVertexType - { - ABSOLUTE, - RELATIVE - }; - - inline size_t getNumberOfVertices() const; - inline GeoFacetVertex getVertex(size_t) const; - inline GeoFacetVertexType getVertexType() const; - - protected: - GeoFacet() - : m_nVertices(0), - m_vertexType(ABSOLUTE) {}; - virtual ~GeoFacet(){}; - - size_t m_nVertices; - std::vector<GeoFacetVertex> m_vertices; - GeoFacetVertexType m_vertexType; -}; - -// Triangular facet -class GeoTriangularFacet : public GeoFacet -{ - public: - GeoTriangularFacet(GeoFacetVertex - ,GeoFacetVertex - ,GeoFacetVertex - ,GeoFacetVertexType); - - virtual ~GeoTriangularFacet(); -}; - -// Quadrangular facet -class GeoQuadrangularFacet : public GeoFacet -{ - public: - GeoQuadrangularFacet(GeoFacetVertex - ,GeoFacetVertex - ,GeoFacetVertex - ,GeoFacetVertex - ,GeoFacetVertexType); - - virtual ~GeoQuadrangularFacet(); -}; - -// Inline methods -inline size_t GeoFacet::getNumberOfVertices() const -{ - return m_nVertices; -} - -inline GeoFacetVertex GeoFacet::getVertex(size_t index) const -{ - return (index<m_nVertices ? m_vertices[index] : GeoFacetVertex(999999.,999999.,999999.)); -} - -inline GeoFacet::GeoFacetVertexType GeoFacet::getVertexType() const -{ - return m_vertexType; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFullPhysVol.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFullPhysVol.h deleted file mode 100755 index 203fe8d83d8..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoFullPhysVol.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOFULLPHYSVOL_H -#define GEOMODELKERNEL_GEOFULLPHYSVOL_H - -#include "GeoModelKernel/GeoVFullPhysVol.h" -#include <vector> -#include <string> - -class GeoLogVol; -class GeoVAlignmentStore; - -/** - * @class GeoFullPhysVol - * - * @brief This class represent a physical volume whose absolute - * default and aligned positions are known and held in cache. - * - * These pieces should not be part of a subtree which is used as a - * shared instance. For if it is, then of course the absolute position - * of the piece is an absurdity. The run time error will result as - * soon as the absolute position is requested. - * - * These elements may be declared to readout geometry. See the class - * ReadoutElement. - */ - -class GeoFullPhysVol final : public GeoVFullPhysVol -{ - public: - GeoFullPhysVol (const GeoLogVol* LogVol); - - /// Adds a Graph Node to the Geometry Graph. - void add(GeoGraphNode* graphNode); - - /// Returns the number of child physical volumes. - virtual unsigned int getNChildVols() const override; - - /// Returns the ith child volume - virtual PVConstLink getChildVol(unsigned int index) const override; - - /// Returns the transform to the ith volume. - virtual HepGeom::Transform3D getXToChildVol(unsigned int index, const GeoVAlignmentStore* store=nullptr) const override; - - /// Returns the default transform to the ith volume. - virtual HepGeom::Transform3D getDefXToChildVol(unsigned int index, const GeoVAlignmentStore* store=nullptr) const override; - - /// Executes a GeoNodeAction. - virtual void exec(GeoNodeAction *action) const override; - - /// Returns the name of the child. - virtual std::string getNameOfChildVol(unsigned int i) const override; - - /// Returns the id of the child. - virtual Query<int> getIdOfChildVol(unsigned int i) const override; - - /// Returns the number of child physical volumes and Serial Transformers. - virtual unsigned int getNChildVolAndST() const override; - - GeoFullPhysVol* clone(bool attached = true); - const GeoFullPhysVol* cloneOrigin() const; - /// The following method breaks consistency of cloned volumes! - /// Use it only in Simulation jobs and - /// don't call it until geometry has been completely translated to G4 - void clear(); // drop subtree - virtual HepGeom::Transform3D getX (const GeoVAlignmentStore* store=nullptr) const override; - virtual HepGeom::Transform3D getDefX (const GeoVAlignmentStore* store=nullptr) const override; - virtual unsigned int getNChildNodes() const override; - virtual const GeoGraphNode * const *getChildNode (unsigned int i) const override; - virtual const GeoGraphNode * const *findChildNode(const GeoGraphNode *n) const override; - - protected: - virtual ~GeoFullPhysVol() override; - - private: - GeoFullPhysVol(const GeoFullPhysVol &right); - GeoFullPhysVol & operator=(const GeoFullPhysVol &right); - - /// Hold the list of children. - std::vector<const GeoGraphNode *> m_daughters; - - const GeoFullPhysVol* m_cloneOrigin; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoGenericTrap.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoGenericTrap.h deleted file mode 100755 index dd2211758d1..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoGenericTrap.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOGENERICTRAP_H -#define GEOMODELKERNEL_GEOGENERICTRAP_H - -#include "GeoModelKernel/GeoShape.h" -#include <CLHEP/Vector/TwoVector.h> -#include <vector> - -typedef CLHEP::Hep2Vector GeoTwoVector; -typedef std::vector<GeoTwoVector> GeoGenericTrapVertices; - -class GeoGenericTrap : public GeoShape -{ - public: - GeoGenericTrap(double ZHalfLength, const GeoGenericTrapVertices& Vertices); - - virtual double volume() const; - - virtual const std::string& type() const; - virtual ShapeType typeID() const; - - static const std::string& getClassType(); - static ShapeType getClassTypeID(); - - virtual void exec(GeoShapeAction *action) const; - - double getZHalfLength() const; - const GeoGenericTrapVertices& getVertices() const; - - protected: - virtual ~GeoGenericTrap(); - - private: - GeoGenericTrap(const GeoGenericTrap &right); - GeoGenericTrap& operator=(const GeoGenericTrap &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_zHalfLength; - GeoGenericTrapVertices m_vertices; -}; - -inline const std::string& GeoGenericTrap::getClassType() -{ - return s_classType; -} - -inline ShapeType GeoGenericTrap::getClassTypeID() -{ - return s_classTypeID; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoGraphNode.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoGraphNode.h deleted file mode 100755 index 2f72979fdad..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoGraphNode.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOGRAPHNODE_H -#define GEOMODELKERNEL_GEOGRAPHNODE_H - -/** - * @class GeoGraphNode - * - * @brief Represents Nodes that can be assembled together to make - * a graph. Subclasses (for now): - * - * * GeoVTransform - * *GeoFixedTransform. .. for fixed transforms - * *GeoVariableTransform .. for variable transforms. - * - * * GeoVPhysVol - * *GeoPhysVol .. for normal recursive access. - * *GeoRAPhysVol .. for random access - */ - -#include "GeoModelKernel/RCBase.h" - -class GeoNodeAction; -class GeoVPhysVol; - -class GeoGraphNode : public RCBase -{ - public: - GeoGraphNode (); - - // Executes a GeoNodeAction. - virtual void exec (GeoNodeAction *action) const; - - // When a node is added to a parent in the graph, the node - // is always notified. What happens at that time is up to - // the node. Most nodes do not need to do anything. - // Some--the alignable transforms in particular--need to - // take some actions, such as adding the parent volume to a - // list. - virtual void dockTo (GeoVPhysVol* ); - - protected: - virtual ~GeoGraphNode(); - - private: - GeoGraphNode(const GeoGraphNode &right); - GeoGraphNode & operator=(const GeoGraphNode &right); -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoIdentifierTag.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoIdentifierTag.h deleted file mode 100755 index f7b37647e53..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoIdentifierTag.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOIDENTIFIERTAG_H -#define GEOMODELKERNEL_GEOIDENTIFIERTAG_H - -/** - * @class GeoIdentifierTag - * - * @brief This class gives an integral identifer to the following physical volume. - * - * Courtesy of Philipp Shieferdecker (LMU Munich). - */ - -#include "GeoModelKernel/GeoGraphNode.h" - -class GeoIdentifierTag : public GeoGraphNode -{ - public: - // Constructor for the identifier tag. Takes an unsigned int - GeoIdentifierTag (int id); - - // Executes a GeoNodeAction. - virtual void exec (GeoNodeAction *action) const; - - // Specifies the identifier of the next physical volume in - // the node tree. - int getIdentifier () const; - - protected: - virtual ~GeoIdentifierTag(); - - private: - GeoIdentifierTag(const GeoIdentifierTag &right); - GeoIdentifierTag & operator=(const GeoIdentifierTag &right); - - int m_identifier; -}; - -inline int GeoIdentifierTag::getIdentifier () const -{ - return m_identifier; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoLogVol.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoLogVol.h deleted file mode 100755 index 3c38abd2055..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoLogVol.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOLOGVOL_H -#define GEOMODELKERNEL_GEOLOGVOL_H - -/** - * @class GeoLogVol - * - * @brief A Logical Volume, or agglomeration of shape and material. - * The logical volume increases the reference count of the shape and the material. - */ - -#include "GeoModelKernel/GeoShape.h" -#include "GeoModelKernel/RCBase.h" -#include "GeoModelKernel/GeoMaterial.h" -#include <vector> - -class GeoLogVol : public RCBase -{ - public: - GeoLogVol (const std::string &Name, const GeoShape *Shape, const GeoMaterial *Material); - - // Returns the name of the logical volume. - const std::string & getName () const; - - // Returns the shape of the logical volume. - const GeoShape * getShape () const; - - // Returns the material of the logical volume. - const GeoMaterial * getMaterial () const; - - protected: - virtual ~GeoLogVol(); - - private: - GeoLogVol(const GeoLogVol &right); - GeoLogVol & operator=(const GeoLogVol &right); - - // The name of the logical volume. - std::string m_name; - - // Material composition of this volume. - const GeoMaterial *m_material; - - // Shape of this volume. - const GeoShape *m_shape; -}; - -inline const std::string & GeoLogVol::getName () const -{ - return m_name; -} - -inline const GeoShape * GeoLogVol::getShape () const -{ - return m_shape; -} - -inline const GeoMaterial * GeoLogVol::getMaterial () const -{ - return m_material; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoMaterial.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoMaterial.h deleted file mode 100755 index f4dbd736a11..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoMaterial.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOMATERIAL_H -#define GEOMODELKERNEL_GEOMATERIAL_H - -/** - * @class GeoMaterial - * - * @brief This class represents materials. A material is a - * collection of elements. In addition it has a density, - * radiation length, and interaction length, and can - * provide a description of energy lost which is computed - * from its composition. - * - * Also noteworthy: - * - * * Materials are allocated on the heap and deleted - * automatically when their reference count falls to zero. - * - * * After the constructor is called the elements are added - * one-by-one; when the last one is called the material - * must be "locked" after the last element is added. - * - * * The materials are assigned an identifier. - */ - -#include "GeoModelKernel/RCBase.h" -#include "GeoModelKernel/GeoElement.h" -#include <vector> - -class GeoMaterial : public RCBase -{ - public: - GeoMaterial (const std::string &Name, double Density); - - // Add an element to the material. - void add (const GeoElement* element, double fraction = 1.0); - - // Add another material to the material (this copies all of - // the element from the other material into this one). - // Fraction is by mass. - void add (const GeoMaterial* material, double fraction); - - // Lock the material against the addition of other - // materials or elements. - void lock (); - - // Constant dEdx term. - double getDeDxConstant () const; - - // I0 term (ionization potential). From tables. Units: eV. - double getDeDxI0 () const; - - // Get dEdx_min. dEdxConstant*11.528 Paul Avery, CBX-92-39. - double getDeDxMin () const; - - // Returns the radiation length, computed from the density - // and the list of constituents, and their properties. - double getRadLength () const; - - // Return the nuclear interaction length, computed from the - // density, the list of constituents, and their properties. - double getIntLength () const; - - unsigned int getNumElements () const; - - // Gets the ith element. - const GeoElement* getElement (unsigned int i) const; - - // Gets the fraction by weight of the ith element - double getFraction (int i) const; - - // The name of the material. - const std::string& getName () const; - - // The density of the material. - const double& getDensity () const; - - // Gives an integral identifier for the material. For - // convenience. - const unsigned int& getID () const; - - protected: - virtual ~GeoMaterial(); - - private: - GeoMaterial(const GeoMaterial &right); - GeoMaterial & operator=(const GeoMaterial &right); - - std::string m_name; - double m_density; - unsigned int m_iD; - - // A list of the fractional composition of each material. - // Fraction is by mass. - std::vector<double> m_fraction; - - // The radiation length of the material. - double m_radLength; - - // The interaction length of the material. - double m_intLength; - - // A static used to assign unique identifiers to new - // materials. - static unsigned int s_lastID; - - // The constant term in the formula governing dE/dx. - double m_dedDxConst; - - // The ionization potential in the formula governing dE/dx. - double m_deDxI0; - - // A flag used to lock the material from further addition - // of elements or other constituents. - bool m_locked; - - static const double s_ionizationPotential[93]; - - private: - // The list of GeoElements composing a GeoMaterial. - std::vector<const GeoElement *> m_element; -}; - -inline const std::string& GeoMaterial::getName () const -{ - return m_name; -} - -inline const double& GeoMaterial::getDensity () const -{ - return m_density; -} - -inline const unsigned int& GeoMaterial::getID () const -{ - return m_iD; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNameTag.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNameTag.h deleted file mode 100755 index 3d378130100..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNameTag.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEONAMETAG_H -#define GEOMODELKERNEL_GEONAMETAG_H - -/** - * @class GeoNameTag - * - * @brief This class gives a name to the next physical volume. - */ - -#include "GeoModelKernel/GeoGraphNode.h" -#include <string> - -class GeoNameTag : public GeoGraphNode -{ - public: - // Constructor for the name tag. Takes a base name. - GeoNameTag (const std::string &BaseName); - - // Executes a GeoNodeAction. - virtual void exec (GeoNodeAction *action) const; - - // Specifies the name of the next physical volume in the - // node tree. - const std::string& getName () const; - - protected: - virtual ~GeoNameTag(); - - private: - GeoNameTag(const GeoNameTag &right); - GeoNameTag & operator=(const GeoNameTag &right); - - std::string m_name; -}; - -inline const std::string& GeoNameTag::getName () const -{ - return m_name; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNodeAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNodeAction.h deleted file mode 100755 index db0eaea61a7..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNodeAction.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEONODEACTION_H -#define GEOMODELKERNEL_GEONODEACTION_H - -/** - * @class GeoNodeAction - * - * @brief This type of action sees the geometry graph in full - * detail, including each transformation and property - * node. The function of this graph is to represent a - * simpler tree of positioned volumes. To visit only those - * volumes while keeping track of the state (including - * relative positioning), use the VolumeAction. - */ - -#include "GeoModelKernel/GeoGraphNode.h" -#include "GeoModelKernel/GeoPhysVol.h" -#include "GeoModelKernel/GeoFullPhysVol.h" -#include "GeoModelKernel/GeoTransform.h" -#include "GeoModelKernel/GeoNameTag.h" -#include "GeoModelKernel/GeoIdentifierTag.h" -#include "GeoModelKernel/GeoSerialDenominator.h" -#include "GeoModelKernel/GeoSerialIdentifier.h" -#include "GeoModelKernel/GeoSerialTransformer.h" -#include "GeoModelKernel/GeoNodePath.h" - -class GeoNodeAction -{ - public: - - enum Depth - { ALL_ANCESTORS = -1, SELF = 0, SELF_AND_CHILDREN = 1 }; - - public: - GeoNodeAction(); - virtual ~GeoNodeAction(); - - // Handles a Node. - virtual void handleNode (const GeoGraphNode *); - - // Handles a Transform. - virtual void handleTransform (const GeoTransform *); - - // Handles a physical volume. - virtual void handlePhysVol (const GeoPhysVol *); - - // Handles a physical volume. - virtual void handleFullPhysVol (const GeoFullPhysVol *); - - // Returns a pointer to the path object. - GeoNodePath* getPath (); - - Query<unsigned int> getDepthLimit (); - - // Cause the action to terminate. - void terminate (); - - // Determine whether the action should terminate. - bool shouldTerminate () const; - - // Handles a Name Tag. - virtual void handleNameTag (const GeoNameTag *); - - // Handles a Serial Denominator. - virtual void handleSerialDenominator (const GeoSerialDenominator *); - - // Sets a depth limit. - void setDepthLimit (unsigned int limit); - - // Clears a depth limit, if any. - void clearDepthLimit (); - - // Handles a Serial Transformer - virtual void handleSerialTransformer (const GeoSerialTransformer *); - - // Handles an Identifier Tag. - virtual void handleIdentifierTag (const GeoIdentifierTag *); - - virtual void handleSerialIdentifier(const GeoSerialIdentifier *); - - protected: - // Termination flag; causes an abortion of action execution. - bool m_terminate; - - private: - GeoNodeAction(const GeoNodeAction &right); - GeoNodeAction & operator=(const GeoNodeAction &right); - - // A limit may be placed upon the depth to which the action - // descends. 0 = self. 1 = self and children. - Query<unsigned int> m_depth; - - GeoNodePath m_path; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNodePath.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNodePath.h deleted file mode 100755 index b2cd5f73ed3..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoNodePath.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEONODEPATH_H -#define GEOMODELKERNEL_GEONODEPATH_H - -#include "GeoModelKernel/Path.h" -#include "GeoModelKernel/GeoVPhysVol.h" - -typedef Path< GeoVPhysVol > GeoNodePath; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPVConstLink.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPVConstLink.h deleted file mode 100755 index efb2c042478..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPVConstLink.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPVCONSTLINK_H -#define GEOMODELKERNEL_GEOPVCONSTLINK_H - -/** - * @class GeoPVConstLink - * - * @brief Smart pointer to physical volume... constant - */ - -class GeoVPhysVol; - -class GeoPVConstLink -{ - public: - GeoPVConstLink(); - GeoPVConstLink(const GeoPVConstLink &right); - GeoPVConstLink (const GeoVPhysVol *addr); - - virtual ~GeoPVConstLink(); - - int operator==(const GeoPVConstLink &right) const; - int operator!=(const GeoPVConstLink &right) const; - - int operator<(const GeoPVConstLink &right) const; - int operator>(const GeoPVConstLink &right) const; - int operator<=(const GeoPVConstLink &right) const; - int operator>=(const GeoPVConstLink &right) const; - - // Dereference this smart pointer, like a regular pointer. - virtual const GeoVPhysVol & operator * () const; - - // Allow use of smartPointer->operation()..... - virtual const GeoVPhysVol * operator -> () const; - - operator bool () const; - - GeoPVConstLink& operator = (const GeoPVConstLink& right); - - protected: - // A pointer to the underlying volume - GeoVPhysVol * m_ptr; - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPVLink.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPVLink.h deleted file mode 100755 index af94674fe91..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPVLink.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPVLINK_H -#define GEOMODELKERNEL_GEOPVLINK_H - -/** - * @class GeoPVConstLink - * - * @brief Smart pointer to physical volume... non-constant - */ - -#include "GeoModelKernel/GeoPVConstLink.h" - -class GeoPVLink : public GeoPVConstLink -{ - public: - GeoPVLink(); - GeoPVLink(const GeoPVLink &right); - GeoPVLink (const GeoVPhysVol *addr); - - virtual ~GeoPVLink(); - - // Dereference this smart pointer, like a regular pointer. - virtual GeoVPhysVol & operator * (); - - // Allow use of smartPointer->operation()..... - virtual GeoVPhysVol * operator -> (); - - // Dereference this smart pointer, like a regular pointer. - virtual const GeoVPhysVol & operator * () const; - - // Allow use of smartPointer->operation()..... - virtual const GeoVPhysVol * operator -> () const; - - // Assignment operator. - GeoPVLink& operator = (const GeoPVLink& right); -}; - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPara.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPara.h deleted file mode 100755 index 7072aee43ce..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPara.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPARA_H -#define GEOMODELKERNEL_GEOPARA_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoPara : public GeoShape -{ - public: - // Constructor for the BOX. - GeoPara (double XHalfLength, double YHalfLength, double ZHalfLength, double Alpha, double Theta, double Phi); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the PARA shape type, as a string. - virtual const std::string & type () const; - - // Returns the PARA shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - // Half length in the x-direction. - const double& getXHalfLength () const; - - // Half-length in the y direction. - const double& getYHalfLength () const; - - // Half-length in the z direction. - const double& getZHalfLength () const; - - // Polar (theta) angle. - const double& getTheta () const; - - // The angle alpha...between the two sides of the top face - // of the parallelapiped. - const double& getAlpha () const; - - // Azimuthal (phi) angle. - const double& getPhi () const; - - protected: - virtual ~GeoPara(); - - private: - GeoPara(const GeoPara &right); - GeoPara & operator=(const GeoPara &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_xHalfLength; - double m_yHalfLength; - double m_zHalfLength; - double m_theta; - double m_alpha; - double m_phi; -}; - -inline const std::string& GeoPara::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoPara::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoPara::getXHalfLength () const -{ - return m_xHalfLength; -} - -inline const double& GeoPara::getYHalfLength () const -{ - return m_yHalfLength; -} - -inline const double& GeoPara::getZHalfLength () const -{ - return m_zHalfLength; -} - -inline const double& GeoPara::getTheta () const -{ - return m_theta; -} - -inline const double& GeoPara::getAlpha () const -{ - return m_alpha; -} - -inline const double& GeoPara::getPhi () const -{ - return m_phi; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPcon.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPcon.h deleted file mode 100755 index c08797c8d8f..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPcon.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPCON_H -#define GEOMODELKERNEL_GEOPCON_H - -/** - * @class GeoPcon - * - * @brief This shape represents a polycone. - * Specify the starting angle and delta angle (subtended angle) - * of the polycone first, Then add at least two planes with the - * addPlane( double zPlane, double rInner, double rOuter) method. - */ - -#include "GeoModelKernel/GeoShape.h" -#include <vector> - -class GeoPcon : public GeoShape -{ - public: - // Constructor for the PCON. Note that the constructor - // does not fully build this object. The PCON is not valid - // until at least two polygon planes have been added. - GeoPcon (double SPhi, double DPhi); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the PCON shape type, as a string. - virtual const std::string & type () const; - - // Returns the PCON shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Add another plane to the polycone A minimum of two - // planes are required to create a valid polycone. - void addPlane (double ZPlane, double RMinPlane, double RMaxPlane); - - // Returns the number of planes that have been created for - // the polycone. - unsigned int getNPlanes () const; - - // True if the polycone has at least two planes. False - // otherwise. - bool isValid () const; - - // Get the Z Position of the specified plane. - const double & getZPlane (unsigned int i) const; - - // Get the RMin of the specified plane. - const double & getRMinPlane (unsigned int i) const; - - // Get the Z Position of the specified plane. - const double & getRMaxPlane (unsigned int i) const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - // Starting angle of the segment in radians. - const double& getSPhi () const; - - // Delta angle of the segment in radians. - const double& getDPhi () const; - - protected: - virtual ~GeoPcon(); - - private: - GeoPcon(const GeoPcon &right); - GeoPcon & operator=(const GeoPcon &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_sPhi; - double m_dPhi; - - // Z Position of poly-cone planes. - std::vector<double> m_zPlane; - - // Minimum radius of poly-cone planes. - std::vector<double> m_rMinPlane; - - // Maximum radius of poly-cone planes. - std::vector<double> m_rMaxPlane; -}; - -inline unsigned int GeoPcon::getNPlanes () const -{ - return m_zPlane.size (); -} - -inline bool GeoPcon::isValid () const -{ - return getNPlanes () >= 2; -} - -inline const double & GeoPcon::getZPlane (unsigned int i) const -{ - return m_zPlane[i]; -} - -inline const double & GeoPcon::getRMinPlane (unsigned int i) const -{ - return m_rMinPlane[i]; -} - -inline const double & GeoPcon::getRMaxPlane (unsigned int i) const -{ - return m_rMaxPlane[i]; -} - -inline const std::string& GeoPcon::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoPcon::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoPcon::getSPhi () const -{ - return m_sPhi; -} - -inline const double& GeoPcon::getDPhi () const -{ - return m_dPhi; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPerfUtils.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPerfUtils.h deleted file mode 100755 index a3e23d91318..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPerfUtils.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPERFUTILS_H -#define GEOMODELKERNEL_GEOPERFUTILS_H - -/** - * @class GeoPerfUtils - * - * @brief This is a collection of performance utilities used to - * benchmark the GeoModel. Currently it includes a routine - * to fetch the current memory consumption in kilobytes and - * a routine to fetch the current CPU consumption in jiffies. - * - * Joe Boudreau March 2005. - */ - -class GeoPerfUtils { - - public: - - // Get the current Memory Usage (kbytes); - static int getMem(); - - // Get the current CPU Usage (jiffies= 1/100th of a second): - static int getCpu(); - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPgon.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPgon.h deleted file mode 100755 index 12f22cb28af..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPgon.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPGON_H -#define GEOMODELKERNEL_GEOPGON_H - -#include "GeoModelKernel/GeoShape.h" -#include <vector> - -class GeoPgon : public GeoShape -{ - public: - // Constructor for the PGON. Note that the constructor - // does not fully build this object. The PGON is not valid - // until at least two polygon planes have been added. - GeoPgon (double SPhi, double DPhi, unsigned int NSides); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the PGON shape type, as a string. - virtual const std::string & type () const; - - // Returns the PGON shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Add another plane to the polygon. A minimum of two - // planes are required to create a valid polygon. - void addPlane (double ZPlane, double RMinPlane, double RMaxPlane); - - // Returns the number of planes that have been created for - // the polygon. - unsigned int getNPlanes () const; - - // True if the polygon has at least two planes. False - // otherwise. - bool isValid () const; - - // Get the Z Position of the specified plane. - const double & getZPlane (unsigned int i) const; - - // Get the RMin of the specified plane. - const double & getRMinPlane (unsigned int i) const; - - // Get the Z Position of the specified plane. - const double & getRMaxPlane (unsigned int i) const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - // Starting angle of the segment in radians. - const double& getSPhi () const; - - // Delta angle of the segment in radians. - const double& getDPhi () const; - - // Number of sides in each polygonal segment. - const unsigned int& getNSides () const; - - protected: - virtual ~GeoPgon(); - - private: - GeoPgon(const GeoPgon &right); - GeoPgon & operator=(const GeoPgon &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_sPhi; - double m_dPhi; - unsigned int m_nSides; - - // Z Position of polygon planes. - std::vector<double> m_zPlane; - - // Minimum radius of polygon planes. - std::vector<double> m_rMinPlane; - - // Maximum radius of polygon planes. - std::vector<double> m_rMaxPlane; -}; - -inline unsigned int GeoPgon::getNPlanes () const -{ - return m_zPlane.size (); -} - -inline bool GeoPgon::isValid () const -{ - return m_zPlane.size () >= 2; -} - -inline const double & GeoPgon::getZPlane (unsigned int i) const -{ - return m_zPlane[i]; -} - -inline const double & GeoPgon::getRMinPlane (unsigned int i) const -{ - return m_rMinPlane[i]; -} - -inline const double & GeoPgon::getRMaxPlane (unsigned int i) const -{ - return m_rMaxPlane[i]; -} - -inline const std::string& GeoPgon::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoPgon::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoPgon::getSPhi () const -{ - return m_sPhi; -} - -inline const double& GeoPgon::getDPhi () const -{ - return m_dPhi; -} - -inline const unsigned int& GeoPgon::getNSides () const -{ - return m_nSides; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPhysVol.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPhysVol.h deleted file mode 100755 index d7124483080..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPhysVol.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPHYSVOL_H -#define GEOMODELKERNEL_GEOPHYSVOL_H - -#include "GeoModelKernel/GeoVPhysVol.h" - -/** - * @class GeoPhysVol - * - * @brief A GeoPhysVol is a physical volume for normal recursive - * access only. This means, normally, that it represents a - * piece of detector that nobody cares about except for - * tracing engines like GEANT. More specifically: - * - * The position of the physical volume is not kept with - * the physical volume. It can easily be obtained by - * traversing detector graph (ComputeTransformAction), but - * it cannot be obtained in constant time. If you need to - * know the absolute default and/or aligned position of the - * detector, you need to use a different kind of physical - * volume called a GeoRAPhysicalVolume, which has a higher - * memory cost. - */ - -class GeoPhysVol : public GeoVPhysVol -{ - public: - GeoPhysVol(const GeoLogVol* LogVol); - - GeoPhysVol(const GeoPhysVol &right) = delete; - GeoPhysVol & operator=(const GeoPhysVol &right) = delete; - - void add(GeoGraphNode* graphNode); - - /// Returns the number of child physical volumes. - virtual unsigned int getNChildVols() const override final; - - /// Returns the ith child volume - virtual PVConstLink getChildVol(unsigned int index) const override final; - - /// Returns the transform to the ith volume. - virtual HepGeom::Transform3D getXToChildVol(unsigned int index - ,const GeoVAlignmentStore* store=nullptr) const override final; - - /// Returns the default transform to the ith volume. - virtual HepGeom::Transform3D getDefXToChildVol(unsigned int index - ,const GeoVAlignmentStore* store=nullptr) const override final; - - /// Executes a GeoNodeAction. - virtual void exec(GeoNodeAction *action) const override final; - - /// Returns the name of the child. - virtual std::string getNameOfChildVol(unsigned int i) const override final; - - /// Returns the id of the child. - virtual Query<int> getIdOfChildVol(unsigned int i) const override final; - - /// Returns the number of child physical volumes and Serial Transformers. - virtual unsigned int getNChildVolAndST() const override final; - - virtual HepGeom::Transform3D getX (const GeoVAlignmentStore* store=nullptr) const override final; - virtual HepGeom::Transform3D getDefX (const GeoVAlignmentStore* store=nullptr) const override final; - virtual unsigned int getNChildNodes() const override final; - virtual const GeoGraphNode * const *getChildNode (unsigned int i) const override final; - virtual const GeoGraphNode * const *findChildNode(const GeoGraphNode *n) const override final; - - protected: - virtual ~GeoPhysVol() override; - - private: - std::vector<const GeoGraphNode*> m_daughters; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPolyhedrizeAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPolyhedrizeAction.h deleted file mode 100755 index 79309aa0dab..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPolyhedrizeAction.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPOLYHEDRIZEACTION_H -#define GEOMODELKERNEL_GEOPOLYHEDRIZEACTION_H - -/** - * @class GeoPolyhedrizeAction - * - * @brief This action polyhedrizes a shape. This includes, for example, boolean shapes. - * A polhyedral representation is useful when you want to: - * -visualize the shape - * -compute the shape's volume - */ - - -#include "GeoModelKernel/GeoShapeAction.h" -class GeoPolyhedron; - -class GeoPolyhedrizeAction : public GeoShapeAction -{ - public: - GeoPolyhedrizeAction(); - virtual ~GeoPolyhedrizeAction(); - - // Handles a shift shape. - virtual void handleShift (const GeoShapeShift *shift); - - // Handles a union shape. - virtual void handleUnion (const GeoShapeUnion *unio); - - // Handles an intersection shape. - virtual void handleIntersection (const GeoShapeIntersection *isect); - - // Handles a subtraction shape. - virtual void handleSubtraction (const GeoShapeSubtraction *subtract); - - // Handles a box shape. - virtual void handleBox (const GeoBox *box); - - // Handles a cons shape. - virtual void handleCons (const GeoCons *cons); - - // Handles a para shape. - virtual void handlePara (const GeoPara *para); - - // Handles a pcon shape. - virtual void handlePcon (const GeoPcon *pcon); - - // Handles a pgon shape. - virtual void handlePgon (const GeoPgon *pgon); - - // Handles a trap shape. - virtual void handleTrap (const GeoTrap *trap); - - // Handles a trd shape. - virtual void handleTrd (const GeoTrd *trd); - - // Handles a tube shape. - virtual void handleTube (const GeoTube *tube); - - // Handles a tubs shape. - virtual void handleTubs (const GeoTubs *tubs); - - // Returns the polyhedral representation of a shape. - const GeoPolyhedron * getPolyhedron () const; - - private: - GeoPolyhedrizeAction(const GeoPolyhedrizeAction &right); - GeoPolyhedrizeAction & operator=(const GeoPolyhedrizeAction &right); - - // This polyhedral representation of the shape. - GeoPolyhedron *m_polyhedron; -}; - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPolyhedron.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPolyhedron.h deleted file mode 100755 index e31293d228b..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPolyhedron.h +++ /dev/null @@ -1,520 +0,0 @@ -#ifndef GeoPolyhedron_h -#define GeoPolyhedron_h -//--------------------------------------------------------------------// -// JFB: // -// GeoPolyhedron was HepPolyhedron, retrofitted to GeoModel // -// infrastructure: // -//--------------------------------------------------------------------// - - -// ******************************************************************** -// * DISCLAIMER * -// * * -// * The following disclaimer summarizes all the specific disclaimers * -// * of contributors to this software. The specific disclaimers,which * -// * govern, are listed with their locations in: * -// * http://cern.ch/geant4/license * -// * * -// * Neither the authors of this software system, nor their employing * -// * institutes,nor the agencies providing financial support for this * -// * work make any representation or warranty, express or implied, * -// * regarding this software system or assume any liability for its * -// * use. * -// * * -// * This code implementation is the intellectual property of the * -// * GEANT4 collaboration. * -// * By copying, distributing or modifying the Program (or any work * -// * based on the Program) you indicate your acceptance of this * -// * statement, and all its terms. * -// ******************************************************************** -// -// -// -// Class Description: -// GeoPolyhedron is an intermediate class between description of a shape -// and visualization systems. It is intended to provide some service like: -// - polygonization of shapes with triangulization (quadrilaterization) -// of complex polygons; -// - calculation of normals for faces and vertices; -// - finding result of boolean operation on polyhedra; -// -// Public constructors: -// -// GeoPolyhedronBox (dx,dy,dz) -// - create polyhedron for Box; -// GeoPolyhedronTrd1 (dx1,dx2,dy,dz) -// - create polyhedron for G3 Trd1; -// GeoPolyhedronTrd2 (dx1,dx2,dy1,dy2,dz) -// - create polyhedron for G3 Trd2; -// GeoPolyhedronTrap (dz,theta,phi, h1,bl1,tl1,alp1, h2,bl2,tl2,alp2) -// - create polyhedron for G3 Trap; -// GeoPolyhedronPara (dx,dy,dz,alpha,theta,phi) -// - create polyhedron for G3 Para; -// GeoPolyhedronTube (rmin,rmax,dz) -// - create polyhedron for G3 Tube; -// GeoPolyhedronTubs (rmin,rmax,dz,phi1,dphi) -// - create polyhedron for G3 Tubs; -// GeoPolyhedronCone (rmin1,rmax1,rmin2,rmax2,dz) -// - create polyhedron for G3 Cone; -// GeoPolyhedronCons (rmin1,rmax1,rmin2,rmax2,dz,phi1,dphi) -// - create polyhedron for G3 Cons; -// GeoPolyhedronPgon (phi,dphi,npdv,nz, z(*),rmin(*),rmax(*)) -// - create polyhedron for G3 Pgon; -// GeoPolyhedronPcon (phi,dphi,nz, z(*),rmin(*),rmax(*)) -// - create polyhedron for G3 Pcon; -// GeoPolyhedronSphere (rmin,rmax,phi,dphi,the,dthe) -// - create polyhedron for Sphere; -// GeoPolyhedronTorus (rmin,rmax,rtor,phi,dphi) -// - create polyhedron for Torus; -// Public functions: -// -// GetNoVertices () - returns number of vertices; -// GetNoFacets () - returns number of faces; -// GetNextVertexIndex (index,edgeFlag) - get vertex indeces of the -// quadrilaterals in order; -// returns false when finished each face; -// GetVertex (index) - returns vertex by index; -// GetNextVertex (vertex,edgeFlag) - get vertices with edge visibility -// of the quadrilaterals in order; -// returns false when finished each face; -// GetNextVertex (vertex,edgeFlag,normal) - get vertices with edge -// visibility and normal of the quadrilaterals -// in order; returns false when finished each face; -// GetNextEdgeIndeces (i1,i2,edgeFlag) - get indeces of the next edge; -// returns false for the last edge; -// GetNextEdgeIndeces (i1,i2,edgeFlag,iface1,iface2) - get indeces of -// the next edge with indeces of the faces -// to which the edge belongs; -// returns false for the last edge; -// GetNextEdge (p1,p2,edgeFlag) - get next edge; -// returns false for the last edge; -// GetNextEdge (p1,p2,edgeFlag,iface1,iface2) - get next edge with indeces -// of the faces to which the edge belongs; -// returns false for the last edge; -// GetFacet (index,n,nodes,edgeFlags=0,normals=0) - get face by index; -// GetNextFacet (n,nodes,edgeFlags=0,normals=0) - get next face with normals -// at the nodes; returns false for the last face; -// GetNormal (index) - get normal of face given by index; -// GetUnitNormal (index) - get unit normal of face given by index; -// GetNextNormal (normal) - get normals of each face in order; -// returns false when finished all faces; -// GetNextUnitNormal (normal) - get normals of unit length of each face -// in order; returns false when finished all faces; -// GetSurfaceArea() - get surface area of the polyhedron; -// GetVolume() - get volume of the polyhedron; -// GetNumberOfRotationSteps() - get number of steps for whole circle; -// SetNumberOfRotationSteps (n) - set number of steps for whole circle; -// ResetNumberOfRotationSteps() - reset number of steps for whole circle -// to default value; -// History: -// -// 20.06.96 Evgeni Chernyaev <Evgueni.Tcherniaev@cern.ch> - initial version -// -// 23.07.96 John Allison -// - added GetNoVertices, GetNoFacets, GetNextVertex, GetNextNormal -// -// 30.09.96 E.Chernyaev -// - added GetNextVertexIndex, GetVertex by Yasuhide Sawada -// - added GetNextUnitNormal, GetNextEdgeIndeces, GetNextEdge -// - improvements: angles now expected in radians -// int -> G4int, double -> G4double -// - G4ThreeVector replaced by either G4Point3D or G4Normal3D -// -// 15.12.96 E.Chernyaev -// - private functions G4PolyhedronAlloc, G4PolyhedronPrism renamed -// to AllocateMemory and CreatePrism -// - added private functions GetNumberOfRotationSteps, RotateEdge, -// RotateAroundZ, SetReferences -// - rewritten G4PolyhedronCons; -// - added G4PolyhedronPara, ...Trap, ...Pgon, ...Pcon, ...Sphere, ...Torus, -// so full List of implemented shapes now looks like: -// BOX, TRD1, TRD2, TRAP, TUBE, TUBS, CONE, CONS, PARA, PGON, PCON, -// SPHERE, TORUS -// -// 01.06.97 E.Chernyaev -// - RotateAroundZ modified and SetSideFacets added to allow Rmin=Rmax -// in bodies of revolution -// -// 24.06.97 J.Allison -// - added static private member fNumberOfRotationSteps and static public -// functions void SetNumberOfRotationSteps (G4int n) and -// void ResetNumberOfRotationSteps (). Modified -// GetNumberOfRotationSteps() appropriately. Made all three functions -// inline (at end of this .hh file). -// Usage: -// G4Polyhedron::SetNumberOfRotationSteps -// (fpView -> GetViewParameters ().GetNoOfSides ()); -// pPolyhedron = solid.CreatePolyhedron (); -// G4Polyhedron::ResetNumberOfRotationSteps (); -// -// 19.03.00 E.Chernyaev -// - added boolean operations (add, subtract, intersect) on polyhedra; -// -// 25.05.01 E.Chernyaev -// - added GetSurfaceArea() and GetVolume(); -// -#include "CLHEP/Geometry/Point3D.h" -#include "CLHEP/Geometry/Vector3D.h" -#include "CLHEP/Geometry/Normal3D.h" -#include "CLHEP/Geometry/Plane3D.h" -#include "CLHEP/Vector/Rotation.h" - -typedef HepGeom::Point3D<double> HVPoint3D; -typedef HepGeom::Vector3D<double> HVNormal3D; -typedef HepGeom::Normal3D<double> HVVector3D; -typedef HepGeom::Plane3D<double> HVPlane3D; -typedef CLHEP::HepRotation HVRotation; - -#include <iostream> - -#ifndef DEFAULT_NUMBER_OF_STEPS -#define DEFAULT_NUMBER_OF_STEPS 24 -#endif - -class GeoFacet -{ - friend class GeoPolyhedron; - friend std::ostream & operator<< (std::ostream &, const GeoFacet & facet); - -private: - struct - { - int v, f; - } - m_edge[4]; - -public: - GeoFacet (int v1 = 0, int f1 = 0, int v2 = 0, int f2 = 0, - int v3 = 0, int f3 = 0, int v4 = 0, int f4 = 0) - { - m_edge[0].v = v1; - m_edge[0].f = f1; - m_edge[1].v = v2; - m_edge[1].f = f2; - m_edge[2].v = v3; - m_edge[2].f = f3; - m_edge[3].v = v4; - m_edge[3].f = f4; - } -}; - -class GeoPolyhedron -{ - friend std::ostream & operator<< (std::ostream &, const GeoPolyhedron & ph); - -private: - static int s_fNumberOfRotationSteps; - -protected: - int m_nvert, m_nface; - HVPoint3D *m_pV; - GeoFacet *m_pF; - - // Allocate memory for GeoPolyhedron - void AllocateMemory (int Nvert, int Nface); - - // Find neighbouring facet - int FindNeighbour (int iFace, int iNode, int iOrder) const; - - // Find normal at node - HVNormal3D FindNodeNormal (int iFace, int iNode) const; - - // Create GeoPolyhedron for prism with quadrilateral base - void CreatePrism (); - - // Generate facets by revolving an edge around Z-axis - void RotateEdge (int k1, int k2, double r1, double r2, - int v1, int v2, int vEdge, - bool ifWholeCircle, int ns, int &kface); - - // Set side facets for the case of incomplete rotation - void SetSideFacets (int ii[4], int vv[4], - int *kk, double *r, double dphi, int ns, int &kface); - - // Create GeoPolyhedron for body of revolution around Z-axis - void RotateAroundZ (int nstep, double phi, double dphi, - int np1, int np2, - const double *z, double *r, int nodeVis, int edgeVis); - - // For each edge set reference to neighbouring facet - void SetReferences (); - - // Invert the order on nodes in facets - void InvertFacets (); - -public: - // Constructor - GeoPolyhedron (int Nvert = 0, int Nface = 0):m_nvert (Nvert), m_nface (Nface), - m_pV (Nvert ? new HVPoint3D[Nvert + 1] : 0), - m_pF (Nface ? new GeoFacet[Nface + 1] : 0) - { - } - - // Copy constructor - GeoPolyhedron (const GeoPolyhedron & from); - - // Destructor - virtual ~ GeoPolyhedron () - { - delete[]m_pV; - delete[]m_pF; - } - - // Assignment - virtual GeoPolyhedron & operator= (const GeoPolyhedron & from); - - // Get number of vertices - int GetNoVertices () const - { - return m_nvert; - } - - // Get number of facets - int GetNoFacets () const - { - return m_nface; - } - - // Transform the polyhedron - GeoPolyhedron & Transform (const HVRotation & rot, - const HVVector3D & trans); - - // Get next vertex index of the quadrilateral - bool GetNextVertexIndex (int &index, int &edgeFlag) const; - - // Get vertex by index - HVPoint3D GetVertex (int index) const; - - // Get next vertex + edge visibility of the quadrilateral - bool GetNextVertex (HVPoint3D & vertex, int &edgeFlag) const; - - // Get next vertex + edge visibility + normal of the quadrilateral - bool GetNextVertex (HVPoint3D & vertex, int &edgeFlag, - HVNormal3D & normal) const; - - // Get indeces of the next edge with indeces of the faces - bool GetNextEdgeIndeces (int &i1, int &i2, int &edgeFlag, - int &iface1, int &iface2) const; - - // Get indeces of the next edge - bool GetNextEdgeIndeces (int &i1, int &i2, int &edgeFlag) const; - - // Get next edge - bool GetNextEdge (HVPoint3D & p1, HVPoint3D & p2, int &edgeFlag) const; - - // Get next edge - bool GetNextEdge (HVPoint3D & p1, HVPoint3D & p2, int &edgeFlag, - int &iface1, int &iface2) const; - - // Get face by index - void GetFacet (int iFace, int &n, int *iNodes, - int *edgeFlags = 0, int *iFaces = 0) const; - - // Get face by index - void GetFacet (int iFace, int &n, HVPoint3D * nodes, - int *edgeFlags = 0, HVNormal3D * normals = 0) const; - - // Get next face with normals at the nodes - bool GetNextFacet (int &n, HVPoint3D * nodes, - int *edgeFlags = 0, HVNormal3D * normals = 0) const; - - // Get normal of the face given by index - HVNormal3D GetNormal (int iFace) const; - - // Get unit normal of the face given by index - HVNormal3D GetUnitNormal (int iFace) const; - - // Get normal of the next face - bool GetNextNormal (HVNormal3D & normal) const; - - // Get normal of unit length of the next face - bool GetNextUnitNormal (HVNormal3D & normal) const; - - // Boolean operations - GeoPolyhedron add (const GeoPolyhedron & p) const; - GeoPolyhedron subtract (const GeoPolyhedron & p) const; - GeoPolyhedron intersect (const GeoPolyhedron & p) const; - - // Get area of the surface of the polyhedron - double GetSurfaceArea () const; - - // Get volume of the polyhedron - double GetVolume () const; - - // Get number of steps for whole circle - static int GetNumberOfRotationSteps () - { - return s_fNumberOfRotationSteps; - } - - // Set number of steps for whole circle - static void SetNumberOfRotationSteps (int n); - - // Reset number of steps for whole circle to default value - static void ResetNumberOfRotationSteps () - { - s_fNumberOfRotationSteps = DEFAULT_NUMBER_OF_STEPS; - } - - - -}; - -class GeoPolyhedronTrd2:public GeoPolyhedron -{ -public: - GeoPolyhedronTrd2 (double Dx1, double Dx2, - double Dy1, double Dy2, double Dz); - virtual ~ GeoPolyhedronTrd2 (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronTrd1:public GeoPolyhedronTrd2 -{ -public: - GeoPolyhedronTrd1 (double Dx1, double Dx2, double Dy, double Dz); - virtual ~ GeoPolyhedronTrd1 (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronBox:public GeoPolyhedronTrd2 -{ -public: - GeoPolyhedronBox (double Dx, double Dy, double Dz); - virtual ~ GeoPolyhedronBox (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronTrap:public GeoPolyhedron -{ -public: - GeoPolyhedronTrap (double Dz, double Theta, double Phi, - double Dy1, - double Dx1, double Dx2, double Alp1, - double Dy2, double Dx3, double Dx4, double Alp2); - virtual ~ GeoPolyhedronTrap (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronPara:public GeoPolyhedronTrap -{ -public: - GeoPolyhedronPara (double Dx, double Dy, double Dz, - double Alpha, double Theta, double Phi); - virtual ~ GeoPolyhedronPara (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronCons:public GeoPolyhedron -{ -public: - GeoPolyhedronCons (double Rmn1, double Rmx1, - double Rmn2, double Rmx2, double Dz, - double Phi1, double Dphi); - virtual ~ GeoPolyhedronCons (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronCone:public GeoPolyhedronCons -{ -public: - GeoPolyhedronCone (double Rmn1, double Rmx1, - double Rmn2, double Rmx2, double Dz); - virtual ~ GeoPolyhedronCone (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronTubs:public GeoPolyhedronCons -{ -public: - GeoPolyhedronTubs (double Rmin, double Rmax, double Dz, - double Phi1, double Dphi); - virtual ~ GeoPolyhedronTubs (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronTube:public GeoPolyhedronCons -{ -public: - GeoPolyhedronTube (double Rmin, double Rmax, double Dz); - virtual ~ GeoPolyhedronTube (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronPgon:public GeoPolyhedron -{ -public: - GeoPolyhedronPgon (double phi, double dphi, int npdv, int nz, - const double *z, const double *rmin, const double *rmax); - virtual ~ GeoPolyhedronPgon (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronPcon:public GeoPolyhedronPgon -{ -public: - GeoPolyhedronPcon (double phi, double dphi, int nz, - const double *z, const double *rmin, const double *rmax); - virtual ~ GeoPolyhedronPcon (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronSphere:public GeoPolyhedron -{ -public: - GeoPolyhedronSphere (double rmin, double rmax, - double phi, double dphi, double the, double dthe); - virtual ~ GeoPolyhedronSphere (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - -class GeoPolyhedronTorus:public GeoPolyhedron -{ -public: - GeoPolyhedronTorus (double rmin, double rmax, double rtor, - double phi, double dphi); - virtual ~ GeoPolyhedronTorus (); - virtual GeoPolyhedron & operator = (const GeoPolyhedron & from) - { - return GeoPolyhedron::operator = (from); - } -}; - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPrintGraphAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPrintGraphAction.h deleted file mode 100755 index bed2e982748..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoPrintGraphAction.h +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOPRINTGRAPHACTION_H -#define GEOMODELKERNEL_GEOPRINTGRAPHACTION_H - -/** - * @class GeoPrintGraphAction - * - * @brief This action prints the node tree. It can be configured - * to print a message on the following types of nodes: - * * Transforms - * * Physical Volumes and Full Physical Volumes - * * SerialDenominators - * * SerialTransforms - * * IdentifierTag - */ - -#include "GeoModelKernel/GeoNodeAction.h" -#include <iostream> - -class GeoPrintGraphAction : public GeoNodeAction -{ - enum Type { TRANSFORM, - VOLUME, - NAMETAG, - IDENTIFIERTAG}; - public: - GeoPrintGraphAction (std::ostream &o); - virtual ~GeoPrintGraphAction(); - - // Handles a Transform. - virtual void handleTransform (const GeoTransform *xform); - - // Handles a physical volume. - virtual void handlePhysVol (const GeoPhysVol *vol); - - // Handles a physical volume. - virtual void handleFullPhysVol (const GeoFullPhysVol *vol); - - // Handles a Name Tag. - virtual void handleNameTag (const GeoNameTag *nameTag); - - // Handles a Serial Denominator. - virtual void handleSerialDenominator (const GeoSerialDenominator *sD); - - // Handles a Serial Transformer - virtual void handleSerialTransformer (const GeoSerialTransformer *sT); - - // Handles an Identifier Tag. - virtual void handleIdentifierTag (const GeoIdentifierTag *idTag); - - // Sets the notification state. Default: everything on. - void setNotification (Type type, bool state); - - private: - GeoPrintGraphAction(const GeoPrintGraphAction &right); - GeoPrintGraphAction & operator=(const GeoPrintGraphAction &right); - - // Indent the print. - void indent (); - - // A pointer to a name tag. If the volume is named. - const GeoNameTag *m_nameTag; - - // A pointer to a serial denominator. If one exists. - const GeoSerialDenominator *m_serialDenominator; - - // A pointer to an identifier tag. If the volume is - // identified. - const GeoIdentifierTag *m_idTag; - - // List of Pending Transformations. - std::vector<const GeoTransform *> m_pendingTransformList; - - // On/off flag for transforms. - bool m_transformState; - - // On/off flag for physical volumes. - bool m_volumeState; - - // On/off flag for name tags. - bool m_nametagState; - - // On/off flag for serial denominators. - bool m_serialDenominatorState; - - // On/off flag for serial transformers. - bool m_serialTransformerState; - - // On/off flag for identifier tags. - bool m_identifierState; - - std::ostream &m_o; - - // Flag for indent (intially 0) - mutable bool m_indented; -}; - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialDenominator.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialDenominator.h deleted file mode 100755 index 6e85abef4c7..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialDenominator.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSERIALDENOMINATOR_H -#define GEOMODELKERNEL_GEOSERIALDENOMINATOR_H - -/** - * @class GeoSerialDenominator - * - * @brief This class generates a name for all physical volumes - * following it. The name is a prefix string followed by a - * serial number that starts at zero. The naming scheme - * applies to all following sibling physical volumes. The - * naming is reset only when a GeoNameTag or another Geo - * SerialDenominator is found. - */ - -#include "GeoModelKernel/GeoGraphNode.h" -#include <string> - -class GeoSerialDenominator : public GeoGraphNode -{ - public: - GeoSerialDenominator (const std::string &BaseName); - - // Executes a GeoNodeAction. - virtual void exec (GeoNodeAction *action) const; - - // Specifies the name of the next physical volume in the - // node tree. - const std::string& getBaseName () const; - - protected: - virtual ~GeoSerialDenominator(); - - private: - GeoSerialDenominator(const GeoSerialDenominator &right); - GeoSerialDenominator & operator=(const GeoSerialDenominator &right); - - std::string m_baseName; - -}; - -inline const std::string& GeoSerialDenominator::getBaseName () const -{ - return m_baseName; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialIdentifier.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialIdentifier.h deleted file mode 100755 index 63a06d4756b..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialIdentifier.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSERIALIDENTIFIER_H -#define GEOMODELKERNEL_GEOSERIALIDENTIFIER_H - -/** - * @class GeoSerialIdentifier - * - * @brief Like a GeoSerialDenominator. Identifies volumes, including virtual volumes. - */ - -#include "GeoModelKernel/GeoGraphNode.h" - -class GeoSerialIdentifier : public GeoGraphNode -{ - public: - GeoSerialIdentifier(int baseId); - - virtual void exec(GeoNodeAction *action) const; - - inline int getBaseId() const; - - protected: - virtual ~GeoSerialIdentifier(); - - private: - GeoSerialIdentifier(const GeoSerialIdentifier &right); - const GeoSerialIdentifier & operator=(const GeoSerialIdentifier &right); - - int m_baseId; -}; - -inline int GeoSerialIdentifier::getBaseId() const -{ - return m_baseId; -} - -#endif - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialTransformer.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialTransformer.h deleted file mode 100755 index b937e7456f3..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSerialTransformer.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSERIALTRANSFORMER_H -#define GEOMODELKERNEL_GEOSERIALTRANSFORMER_H - -/** - * @class GeoSerialTransformer - * - * @brief This class takes a physical volume and places it - * according to a transformation field, N times. - */ - -#include "GeoModelKernel/GeoGraphNode.h" -#include "GeoModelKernel/GeoVPhysVol.h" -#include "GeoModelKernel/GeoXF.h" - -class GeoSerialTransformer : public GeoGraphNode -{ - public: - GeoSerialTransformer (const GeoVPhysVol *volume, const GeoXF::Function *func, unsigned int copies); - - // Executes a GeoNodeAction. - virtual void exec (GeoNodeAction *action) const; - - // Returns the transformation field itself. - const GeoXF::Function * getFunction () const; - - // Returns the volume: - PVConstLink getVolume () const - { - return m_physVol; - } - - // Returns the number of copies: - unsigned int getNCopies () const - { - return m_nCopies; - } - - // Returns the transformation to the ith copy: - HepGeom::Transform3D getTransform (int i) const - { - return (*m_function) (i); - } - - protected: - virtual ~GeoSerialTransformer(); - - private: - GeoSerialTransformer(const GeoSerialTransformer &right); - GeoSerialTransformer & operator=(const GeoSerialTransformer &right); - - // Number of copies of a physical volume to generate. - unsigned int m_nCopies; - - // Recipe for the transformation; specifically, a - // Transform-valued m_function of a single variable. - const GeoXF::Function *m_function; - - // The physical volume to be multiply placed. - const GeoVPhysVol *m_physVol; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShape.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShape.h deleted file mode 100755 index d9679c1260e..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShape.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSHAPE_H -#define GEOMODELKERNEL_GEOSHAPE_H - -/** - * @class GeoShape - * - * @brief This class describes a Shape. Shapes will be able to do the following things: - * * Identify themselves. - * * Compute their volume. - * * Combine themselves using Boolean operations with other shapes. - * The type identification works as follows: - * if (myShape->typeId()==GeoBox::classTypeId()) { - * ..... - * } - * This avoids the need for dynamic casting with these - * classes. - * - * Also noteworthy: Shapes are allocated on the heap and - * deleted automatically when their reference count falls - * to zero. - */ - -#include "GeoModelKernel/RCBase.h" -#include <CLHEP/Geometry/Transform3D.h> -#include <string> - -typedef unsigned int ShapeType; -class GeoShapeIntersection; -class GeoShapeUnion; -class GeoShapeSubtraction; -class GeoShapeShift; -class GeoShapeAction; - -class GeoShape : public RCBase -{ - public: - // Constructor for shape. Must provide the name, a string to identify this shape. - GeoShape (); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const = 0; - - // Boolean OR operation for shapes - const GeoShapeUnion & add (const GeoShape& shape) const; - - // Subtraction operation for shapes. - const GeoShapeSubtraction & subtract (const GeoShape& shape) const; - - // Intersection of shapes. - const GeoShapeIntersection & intersect (const GeoShape& shape) const; - - // Shift shapes, for boolean operations. - const GeoShapeShift & operator << (const HepGeom::Transform3D &shift) const; - - // Returns the shape type, as a string. - virtual const std::string & type () const = 0; - - // Returns the shape type, as an coded integer. - virtual ShapeType typeID () const = 0; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const = 0; - - protected: - virtual ~GeoShape(); - - private: - GeoShape(const GeoShape &right); - GeoShape & operator=(const GeoShape &right); - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeAction.h deleted file mode 100755 index 813ccff7ad3..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeAction.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSHAPEACTION_H -#define GEOMODELKERNEL_GEOSHAPEACTION_H - -/** - * @class GeoShapeAction - * - * @brief This class is a visitor for shapes. It allows a - * navigation of the boolean expression tree for shapes, in - * order to accomplish actions such as volume computation. - * This is essentially an internal class. - */ - -#include "GeoModelKernel/Query.h" -#include "GeoModelKernel/GeoShapePath.h" - -class GeoShape; -class GeoShapeIntersection; -class GeoShapeUnion; -class GeoShapeSubtraction; -class GeoShapeShift; -class GeoBox; -class GeoCons; -class GeoPcon; -class GeoPgon; -class GeoTrap; -class GeoTrd; -class GeoPara; -class GeoTubs; -class GeoTube; -class GeoEllipticalTube; -class GeoTorus; - -class LArCustomShape; - -class GeoSimplePolygonBrep; -class GeoTessellatedSolid; - -class GeoGenericTrap; - -class GeoShapeAction -{ - public: - GeoShapeAction(); - virtual ~GeoShapeAction(); - - Query<unsigned int> getDepthLimit (); - - // Sets a depth limit. - void setDepthLimit (unsigned int limit); - - // Clears a depth limit, if any. - void clearDepthLimit (); - - // Cause the action to terminate. - void terminate (); - - // Determine whether the action should terminate. - bool shouldTerminate () const; - - // Handles a shape. - virtual void handleShape (const GeoShape *); - - // Handles a shift shape. - virtual void handleShift (const GeoShapeShift *shift); - - // Handles a union shape. - virtual void handleUnion (const GeoShapeUnion *unio); - - // Handles an intersection shape. - virtual void handleIntersection (const GeoShapeIntersection *isect); - - // Handles a subtraction shape. - virtual void handleSubtraction (const GeoShapeSubtraction *subtract); - - // Handles a box shape. - virtual void handleBox (const GeoBox *box); - - // Handles a cons shape. - virtual void handleCons (const GeoCons *cons); - - // Handles a para shape. - virtual void handlePara (const GeoPara *para); - - // Handles a pcon shape. - virtual void handlePcon (const GeoPcon *pcon); - - // Handles a pgon shape. - virtual void handlePgon (const GeoPgon *pgon); - - // Handles a trap shape. - virtual void handleTrap (const GeoTrap *trap); - - // Handles a trd shape. - virtual void handleTrd (const GeoTrd *trd); - - // Handles a tube shape. - virtual void handleTube (const GeoTube *tube); - - // Handles a tubs shape. - virtual void handleTubs (const GeoTubs *tubs); - - // Returns a pointer to the path object. - GeoShapePath * getPath (); - - virtual void handleLArCustom (const LArCustomShape *); - virtual void handleSimplePolygonBrep (const GeoSimplePolygonBrep *); - virtual void handleTessellatedSolid (const GeoTessellatedSolid *); - virtual void handleEllipticalTube (const GeoEllipticalTube *); - virtual void handleTorus (const GeoTorus *); - virtual void handleGenericTrap (const GeoGenericTrap *); - - private: - GeoShapeAction(const GeoShapeAction &right); - GeoShapeAction & operator=(const GeoShapeAction &right); - - // A limit may be placed upon the depth to which the action - // descends. 0 = self. 1 = self and children. - Query<unsigned int> m_depth; - - // Termination flag; causes an abortion of action execution. - bool m_terminate; - GeoShapePath m_path; - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeIntersection.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeIntersection.h deleted file mode 100755 index 26fcd708f88..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeIntersection.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSHAPEINTERSECTION_H -#define GEOMODELKERNEL_GEOSHAPEINTERSECTION_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoShapeIntersection : public GeoShape -{ - public: - // Constructor taking two shape operands. - GeoShapeIntersection (const GeoShape* A, const GeoShape* B); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the AND shape type, as a string. - virtual const std::string & type () const; - - // Returns the AND shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Returns the first operand being ANDed - const GeoShape* getOpA () const; - - // Returns the second operand being ANDed. - const GeoShape* getOpB () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - protected: - virtual ~GeoShapeIntersection(); - - private: - GeoShapeIntersection(const GeoShapeIntersection &right); - GeoShapeIntersection & operator=(const GeoShapeIntersection &right); - - // The first shape operand in the AND operation. - const GeoShape* m_opA; - - // The second shape operand in the AND operation. - const GeoShape* m_opB; - - static const std::string s_classType; - static const ShapeType s_classTypeID; - -}; - -inline const std::string& GeoShapeIntersection::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoShapeIntersection::getClassTypeID () -{ - return s_classTypeID; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapePath.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapePath.h deleted file mode 100755 index 865b0ac6ca8..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapePath.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSHAPEPATH_H -#define GEOMODELKERNEL_GEOSHAPEPATH_H - -#include "GeoModelKernel/GeoShape.h" -#include "GeoModelKernel/Path.h" - -typedef Path< GeoShape > GeoShapePath; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeShift.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeShift.h deleted file mode 100755 index d228140c5f3..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeShift.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSHAPESHIFT_H -#define GEOMODELKERNEL_GEOSHAPESHIFT_H - -#include "GeoModelKernel/GeoShape.h" -#include "CLHEP/Geometry/Transform3D.h" - -class GeoShapeShift : public GeoShape -{ - public: - GeoShapeShift (const GeoShape* A, const HepGeom::Transform3D &X); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the OR shape type, as a string. - virtual const std::string & type () const; - - // Returns the OR shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Returns the first operand being ORed - const GeoShape* getOp () const; - - // Returns the shift of this shape. - const HepGeom::Transform3D & getX () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - protected: - virtual ~GeoShapeShift(); - - private: - GeoShapeShift(const GeoShapeShift &right); - GeoShapeShift & operator=(const GeoShapeShift &right); - - // The shape operand in the NOT operation. - const GeoShape* m_op; - - // Gives the amount by which the volume is shifted. - HepGeom::Transform3D m_shift; - - static const std::string s_classType; - static const ShapeType s_classTypeID; - -}; - -inline const std::string& GeoShapeShift::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoShapeShift::getClassTypeID () -{ - return s_classTypeID; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeSubtraction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeSubtraction.h deleted file mode 100755 index 45646a344b9..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeSubtraction.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSHAPESUBTRACTION_H -#define GEOMODELKERNEL_GEOSHAPESUBTRACTION_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoShapeSubtraction : public GeoShape -{ - public: - GeoShapeSubtraction (const GeoShape* A, const GeoShape* B); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the NOT shape type, as a string. - virtual const std::string & type () const; - - // Returns the NOT shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Returns the first operand in the subtraction - const GeoShape* getOpA () const; - - // Returns the second operand in the subtraction - const GeoShape* getOpB () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - protected: - virtual ~GeoShapeSubtraction(); - - private: - GeoShapeSubtraction(const GeoShapeSubtraction &right); - GeoShapeSubtraction & operator=(const GeoShapeSubtraction &right); - - // The shape operand in the Subtraction operation - const GeoShape* m_opA; - - // The shape operand in the Subtraction operation - const GeoShape* m_opB; - - static const std::string s_classType; - static const ShapeType s_classTypeID; - -}; - -inline const std::string& GeoShapeSubtraction::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoShapeSubtraction::getClassTypeID () -{ - return s_classTypeID; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeUnion.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeUnion.h deleted file mode 100755 index a1f33324dad..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoShapeUnion.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSHAPEUNION_H -#define GEOMODELKERNEL_GEOSHAPEUNION_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoShapeUnion : public GeoShape -{ - public: - GeoShapeUnion (const GeoShape* A, const GeoShape* B); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the OR shape type, as a string. - virtual const std::string & type () const; - - // Returns the OR shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Returns the first operand being ORed - const GeoShape* getOpA () const; - - // Returns the second operand being ORed. - const GeoShape* getOpB () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - protected: - virtual ~GeoShapeUnion(); - - private: - GeoShapeUnion(const GeoShapeUnion &right); - GeoShapeUnion & operator=(const GeoShapeUnion &right); - - // The first shape operand in the OR operation. - const GeoShape* m_opA; - - // The second shape operand in the OR operation. - const GeoShape* m_opB; - - static const std::string s_classType; - static const ShapeType s_classTypeID; - -}; - -inline const std::string& GeoShapeUnion::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoShapeUnion::getClassTypeID () -{ - return s_classTypeID; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSimplePolygonBrep.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSimplePolygonBrep.h deleted file mode 100755 index 288a47ddd6c..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoSimplePolygonBrep.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSIMPLEPOLYGONBREP_H -#define GEOMODELKERNEL_GEOSIMPLEPOLYGONBREP_H - -/** - * @class: GeoSimplePolygonBrep - * - * @brief This shape represents a BREP solid consisting - * of two equivalent polygonial faces perpendicular to Z axis. - * The polygones are described by array of (x,y) vertices, - * The solid is considered valid if the number of polygon vertices >=3 - * - * Constructor parameter is a half length along Z axis - */ - -#include <vector> -#include "GeoModelKernel/GeoShape.h" - - -class GeoSimplePolygonBrep : public GeoShape -{ - public: - GeoSimplePolygonBrep(double dz); - - virtual double volume() const; - - virtual const std::string& type() const; - virtual ShapeType typeID() const; - - void addVertex(double XVertex, double YVertex); - unsigned int getNVertices() const; - - bool isValid () const; - - const double & getXVertex(unsigned int i) const; - const double & getYVertex(unsigned int i) const; - - virtual void exec(GeoShapeAction *action) const; - - static const std::string& getClassType(); - static ShapeType getClassTypeID(); - - const double& getDZ() const; - - protected: - virtual ~GeoSimplePolygonBrep(); - - private: - GeoSimplePolygonBrep(const GeoSimplePolygonBrep &right); - GeoSimplePolygonBrep & operator=(const GeoSimplePolygonBrep &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_dZ; - std::vector<double> m_xVertices; - std::vector<double> m_yVertices; -}; - -inline unsigned int GeoSimplePolygonBrep::getNVertices() const -{ - return m_xVertices.size(); -} - -inline bool GeoSimplePolygonBrep::isValid() const -{ - return getNVertices()>=3; -} - -inline const double& GeoSimplePolygonBrep::getXVertex(unsigned int i) const -{ - return m_xVertices[i]; -} - -inline const double& GeoSimplePolygonBrep::getYVertex(unsigned int i) const -{ - return m_yVertices[i]; -} - -inline const std::string& GeoSimplePolygonBrep::getClassType() -{ - return s_classType; -} - -inline ShapeType GeoSimplePolygonBrep::getClassTypeID() -{ - return s_classTypeID; -} - -inline const double& GeoSimplePolygonBrep::getDZ() const -{ - return m_dZ; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTessellatedSolid.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTessellatedSolid.h deleted file mode 100755 index 3774c3a9736..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTessellatedSolid.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOTESSELLATEDSOLID_H -#define GEOMODELKERNEL_GEOTESSELLATEDSOLID_H - -#include "GeoModelKernel/GeoShape.h" -#include "GeoModelKernel/GeoFacet.h" - -class GeoTessellatedSolid : public GeoShape -{ - public: - GeoTessellatedSolid(); - - virtual double volume() const; - - virtual const std::string& type() const; - virtual ShapeType typeID() const; - - static const std::string& getClassType(); - static ShapeType getClassTypeID(); - - virtual void exec(GeoShapeAction *action) const; - - void addFacet(GeoFacet*); - GeoFacet* getFacet(size_t) const; - size_t getNumberOfFacets() const; - - protected: - virtual ~GeoTessellatedSolid(); - - private: - GeoTessellatedSolid(const GeoTessellatedSolid &right); - GeoTessellatedSolid& operator=(const GeoTessellatedSolid &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - std::vector<GeoFacet*> m_facets; -}; - -inline const std::string& GeoTessellatedSolid::getClassType() -{ - return s_classType; -} - -inline ShapeType GeoTessellatedSolid::getClassTypeID() -{ - return s_classTypeID; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTorus.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTorus.h deleted file mode 100755 index 74f03650f38..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTorus.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOTORUS_H -#define GEOMODELKERNEL_GEOTORUS_H - -#include "GeoModelKernel/GeoShape.h" - - -class GeoTorus : public GeoShape -{ - public: - GeoTorus (double Rmin, double Rmax, double Rtor, double SPhi, double DPhi); - - virtual double volume () const; - - virtual const std::string & type () const; - virtual ShapeType typeID () const; - - static const std::string& getClassType (); - static ShapeType getClassTypeID (); - - virtual void exec (GeoShapeAction *action) const; - - const double& getRMin () const; - const double& getRMax () const; - const double& getRTor () const; - const double& getSPhi () const; - const double& getDPhi () const; - - protected: - virtual ~GeoTorus(); - - private: - GeoTorus(const GeoTorus &right); - GeoTorus & operator=(const GeoTorus &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_rMin; - double m_rMax; - double m_rTor; - double m_sPhi; - double m_dPhi; -}; - -inline const std::string& GeoTorus::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoTorus::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoTorus::getRMin () const -{ - return m_rMin; -} - -inline const double& GeoTorus::getRMax () const -{ - return m_rMax; -} - -inline const double& GeoTorus::getRTor () const -{ - return m_rTor; -} - -inline const double& GeoTorus::getSPhi () const -{ - return m_sPhi; -} - -inline const double& GeoTorus::getDPhi () const -{ - return m_dPhi; -} - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTransform.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTransform.h deleted file mode 100755 index bb8f120d9ea..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTransform.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOTRANSFORM_H -#define GEOMODELKERNEL_GEOTRANSFORM_H - -/** - * @class GeoTransform - * - * @brief A basic geometrical (Euclidean) transform. Can return a HepGeom::Transform3D. - * Reference counted. There is no (mis)alignment present in this class. For a transform - * that can be (mis)aligned, see GeoAlignableTransform - * - */ - -#include "GeoModelKernel/GeoGraphNode.h" -#include "CLHEP/Geometry/Transform3D.h" - -class GeoVAlignmentStore; - -class GeoTransform : public GeoGraphNode -{ - public: - GeoTransform(const HepGeom::Transform3D& transform); - - GeoTransform(const GeoTransform &right) = delete; - GeoTransform & operator=(const GeoTransform &right) = delete; - - /// Gets the total transformation. - virtual HepGeom::Transform3D getTransform(const GeoVAlignmentStore* store=nullptr) const; - - /// Gets the default transformation (no alignment correction) - HepGeom::Transform3D getDefTransform(const GeoVAlignmentStore* store=nullptr) const; - - /// Executes a GeoNodeAction. - virtual void exec(GeoNodeAction *action) const override final; - - protected: - virtual ~GeoTransform() override; - - private: - // The Euclidean (Rigid Body) transform. - HepGeom::Transform3D m_transform; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTrap.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTrap.h deleted file mode 100755 index 2f47b45bbed..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTrap.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOTRAP_H -#define GEOMODELKERNEL_GEOTRAP_H - -/** - * @class GeoTrap - * - * @brief This shape represents a very general trapezoid - */ - -#include "GeoModelKernel/GeoShape.h" - -class GeoTrap : public GeoShape -{ - public: - GeoTrap (double ZHalfLength, double Theta, double Phi, double Dydzn, double Dxdyndzn, double Dxdypdzn, double Angleydzn, double Dydzp, double Dxdyndzp, double Dxdypdzp, double Angleydzp); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the TRAP shape type, as a string. - virtual const std::string & type () const; - - // Returns the TRAP shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - // Z half length. - const double& getZHalfLength () const; - - // Polar (theta) angle. - const double& getTheta () const; - - // Azimuthal (phi) angle. - const double& getPhi () const; - - // Y half length at -z. - const double& getDydzn () const; - - // X half length at -z, -y. - const double& getDxdyndzn () const; - - // X half length at -z, +y - const double& getDxdypdzn () const; - - const double& getAngleydzn () const; - - // Y half length at +z. - const double& getDydzp () const; - - // X half length at +z, -y - const double& getDxdyndzp () const; - - // X half length at +z, +y - const double& getDxdypdzp () const; - - const double& getAngleydzp () const; - - protected: - virtual ~GeoTrap(); - - private: - GeoTrap(const GeoTrap &right); - GeoTrap & operator=(const GeoTrap &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_zHalfLength; - double m_theta; - double m_phi; - double m_dydzn; - double m_dxdyndzn; - double m_dxdypdzn; - double m_angleydzn; - double m_dydzp; - double m_dxdyndzp; - double m_dxdypdzp; - double m_angleydzp; - -}; - -inline const std::string& GeoTrap::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoTrap::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoTrap::getZHalfLength () const -{ - return m_zHalfLength; -} - -inline const double& GeoTrap::getTheta () const -{ - return m_theta; -} - -inline const double& GeoTrap::getPhi () const -{ - return m_phi; -} - -inline const double& GeoTrap::getDydzn () const -{ - return m_dydzn; -} - -inline const double& GeoTrap::getDxdyndzn () const -{ - return m_dxdyndzn; -} - -inline const double& GeoTrap::getDxdypdzn () const -{ - return m_dxdypdzn; -} - -inline const double& GeoTrap::getAngleydzn () const -{ - return m_angleydzn; -} - -inline const double& GeoTrap::getDydzp () const -{ - return m_dydzp; -} - -inline const double& GeoTrap::getDxdyndzp () const -{ - return m_dxdyndzp; -} - -inline const double& GeoTrap::getDxdypdzp () const -{ - return m_dxdypdzp; -} - -inline const double& GeoTrap::getAngleydzp () const -{ - return m_angleydzp; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTraversalState.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTraversalState.h deleted file mode 100755 index 276611c7a09..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTraversalState.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOTRAVERSALSTATE_H -#define GEOMODELKERNEL_GEOTRAVERSALSTATE_H - -/** - * @class GeoTraversalState - * - * @brief This incorporates a traversal state, including the following information: - * * The absolute transform from the place where the action started. - * * The default absolute transform from the place where the action started. - * * The path to the node. - * * The depth - */ - -#include "GeoModelKernel/GeoNodePath.h" -#include "CLHEP/Geometry/Transform3D.h" -#include <stack> -#include <string> - -class GeoTraversalState -{ - public: - GeoTraversalState (); - virtual ~GeoTraversalState(); - - // Gets the transformation of the current node with respect - // to its parent. - const HepGeom::Transform3D & getTransform () const; - - // Gets the name of the current node. - const std::string & getName () const; - - // Gets the default transformation of the current node with - // respect to its parent. - const HepGeom::Transform3D & getDefTransform () const; - - // Gets the absolute name of the current node. - const std::string & getAbsoluteName () const; - - // Gets the default absolute transformation to the current - // node. - const HepGeom::Transform3D & getDefAbsoluteTransform () const; - - // Gets the absolute transformation to the current node. - const HepGeom::Transform3D & getAbsoluteTransform () const; - - // Sets the transform for the current node. - void setTransform (const HepGeom::Transform3D &transform); - - // Sets the name for the current node. - void setName (const std::string &name); - - // Sets the default absolute transform for the current node. - void setDefTransform (const HepGeom::Transform3D &transform); - - // Goes to the next level. Pushes the last absolute - // transform onto the stack so that it can be retreived - // when going back to the previous level. - void nextLevel (const GeoVPhysVol* pv); - - // Goes to the previous level. Pops the last absolute - // transform onto the stack, restoring the absolute - // transform to that of the previous level. - void previousLevel (); - - // Returns the path. - const GeoNodePath * getPath () const; - - // Sets the identifier for the current node. - void setId (const Query<int> &id); - - // Gets the id of the current node. - const Query<int> getId () const; - - private: - GeoTraversalState(const GeoTraversalState &right); - GeoTraversalState & operator=(const GeoTraversalState &right); - - // A list of tranformations for all nodes visited at all - // previous levels of traversal. - std::stack<HepGeom::Transform3D> m_absTransformList; - - // A list of default tranformations for all nodes visited - // at all previous levels of traversal. - std::stack<HepGeom::Transform3D> m_defAbsTransformList; - - // List of volume names. - std::stack<std::string> m_absNameList; - - // The absolute transform for the present volume. - HepGeom::Transform3D m_absTransform; - - // The default absolute transform. - HepGeom::Transform3D m_defAbsTransform; - - // The absolute name. - std::string m_absName; - - // The transform from parent to current. - HepGeom::Transform3D m_transform; - - // The default transform from parent to current. - HepGeom::Transform3D m_defTransform; - - // The relative name. - std::string m_name; - - // And identifier for this volume. - Query<int> m_id; - - // The path from the point at which the action started, to - // the current node. - GeoNodePath m_path; - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTrd.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTrd.h deleted file mode 100755 index 6bfa31c4ec1..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTrd.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOTRD_H -#define GEOMODELKERNEL_GEOTRD_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoTrd : public GeoShape -{ - public: - GeoTrd (double XHalfLength1, double XHalfLength2, double YHalfLength1, double YHalfLength2, double ZHalfLength); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the TRD shape type, as a string. - virtual const std::string & type () const; - - // Returns the TRD shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - // Half length in the x-direction at -dz. - const double& getXHalfLength1 () const; - - // Half length in the x-direction at +dz - const double& getXHalfLength2 () const; - - // Half-length in the y direction at +dz. - const double& getYHalfLength1 () const; - - // Half-length in the y direction at -dz - const double& getYHalfLength2 () const; - - // Half-length in the z direction. - const double& getZHalfLength () const; - - protected: - virtual ~GeoTrd(); - - private: - GeoTrd(const GeoTrd &right); - GeoTrd & operator=(const GeoTrd &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_xHalfLength1; - double m_xHalfLength2; - double m_yHalfLength1; - double m_yHalfLength2; - double m_zHalfLength; - -}; - -inline const std::string& GeoTrd::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoTrd::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoTrd::getXHalfLength1 () const -{ - return m_xHalfLength1; -} - -inline const double& GeoTrd::getXHalfLength2 () const -{ - return m_xHalfLength2; -} - -inline const double& GeoTrd::getYHalfLength1 () const -{ - return m_yHalfLength1; -} - -inline const double& GeoTrd::getYHalfLength2 () const -{ - return m_yHalfLength2; -} - -inline const double& GeoTrd::getZHalfLength () const -{ - return m_zHalfLength; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTube.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTube.h deleted file mode 100755 index 4354cfd4baa..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTube.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOTUBE_H -#define GEOMODELKERNEL_GEOTUBE_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoTube : public GeoShape -{ - public: - GeoTube (double RMin, double RMax, double ZHalfLength); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the TUBE shape type, as a string. - virtual const std::string & type () const; - - // Returns the TUBE shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - // Minimum (inner) tube radius. - const double& getRMin () const; - - // Maximum (outer) tube radius. - const double& getRMax () const; - - // Tube half-length in the z direction. - const double& getZHalfLength () const; - - protected: - //## Destructor (generated) - virtual ~GeoTube(); - - private: - GeoTube(const GeoTube &right); - GeoTube & operator=(const GeoTube &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_rMin; - double m_rMax; - double m_zHalfLength; - -}; - -inline const std::string& GeoTube::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoTube::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoTube::getRMin () const -{ - return m_rMin; -} - -inline const double& GeoTube::getRMax () const -{ - return m_rMax; -} - -inline const double& GeoTube::getZHalfLength () const -{ - return m_zHalfLength; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTubs.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTubs.h deleted file mode 100755 index 68f8399fb5b..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoTubs.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOTUBS_H -#define GEOMODELKERNEL_GEOTUBS_H - -#include "GeoModelKernel/GeoShape.h" - -class GeoTubs : public GeoShape -{ - public: - GeoTubs (double RMin, double RMax, double ZHalfLength, double SPhi, double DPhi); - - // Returns the volume of the shape, for mass inventory - virtual double volume () const; - - // Returns the TUBS shape type, as a string. - virtual const std::string & type () const; - - // Returns the TUBS shape type, as a coded integer. - virtual ShapeType typeID () const; - - // Executes a GeoShapeAction - virtual void exec (GeoShapeAction *action) const; - - // For type identification. - static const std::string& getClassType (); - - // For type identification. - static ShapeType getClassTypeID (); - - // Minimum (inner) tube section radius. - const double& getRMin () const; - - // Maximum (outer) tube section radius. - const double& getRMax () const; - - // Tube section half-length in the z direction. - const double& getZHalfLength () const; - - // Starting angle of the tube section in radians. - const double& getSPhi () const; - - // Delta angle of the tube section in radians. - const double& getDPhi () const; - - protected: - virtual ~GeoTubs(); - - private: - GeoTubs(const GeoTubs &right); - GeoTubs & operator=(const GeoTubs &right); - - static const std::string s_classType; - static const ShapeType s_classTypeID; - - double m_rMin; - double m_rMax; - double m_zHalfLength; - double m_sPhi; - double m_dPhi; - -}; - -inline const std::string& GeoTubs::getClassType () -{ - return s_classType; -} - -inline ShapeType GeoTubs::getClassTypeID () -{ - return s_classTypeID; -} - -inline const double& GeoTubs::getRMin () const -{ - return m_rMin; -} - -inline const double& GeoTubs::getRMax () const -{ - return m_rMax; -} - -inline const double& GeoTubs::getZHalfLength () const -{ - return m_zHalfLength; -} - -inline const double& GeoTubs::getSPhi () const -{ - return m_sPhi; -} - -inline const double& GeoTubs::getDPhi () const -{ - return m_dPhi; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVAlignmentStore.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVAlignmentStore.h deleted file mode 100755 index f561eb284af..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVAlignmentStore.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOVALIGNMENTSTORE_H -#define GEOMODELKERNEL_GEOVALIGNMENTSTORE_H - -/** - * @class GeoVAlignmentStore - * - * @brief Abstract base class for GeoModel alignment stores - * The interface allows to store/retrieve transformations that serve as: - * 1. Delta-s of Alignable Transforms - * 2. Abs positions of Full Physical Volumes - * 3. Def Abs positions of Full Physical Volumes - */ - -class GeoAlignableTransform; -class GeoVFullPhysVol; -namespace HepGeom { - class Transform3D; -} - -class GeoVAlignmentStore -{ - public: - GeoVAlignmentStore() {} - virtual ~GeoVAlignmentStore() {} - - virtual void setDelta(const GeoAlignableTransform*, const HepGeom::Transform3D&) = 0; - virtual const HepGeom::Transform3D* getDelta(const GeoAlignableTransform*) const = 0; - - virtual void setAbsPosition(const GeoVFullPhysVol*, const HepGeom::Transform3D&) = 0; - virtual const HepGeom::Transform3D* getAbsPosition(const GeoVFullPhysVol*) const = 0; - - virtual void setDefAbsPosition(const GeoVFullPhysVol*, const HepGeom::Transform3D&) = 0; - virtual const HepGeom::Transform3D* getDefAbsPosition(const GeoVFullPhysVol*) const = 0; - -}; - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorElement.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorElement.h deleted file mode 100755 index 4bfb10d7e74..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorElement.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOVDETECTORELEMENT_H -#define GEOMODELKERNEL_GEOVDETECTORELEMENT_H - -/** - * @class GeoVDetectorElement - * - * @brief A GeoVDetectorElement is a piece of readout geometry. - * This is an abstract base class for readout objects which - * have a distinct association to a piece of physical - * geometry and whose position we track by specifying a - * Euclidean transformation w.r.t global coordinates. level - * that one can keep track of with Euclidean - * transformations. Examples: - * - * * silicon wafers (not strips or pixels!) - * * calorimeter modules (not cells!) - */ - -#include "GeoModelKernel/GeoVFullPhysVol.h" -class Identifier; - -class GeoVDetectorElement -{ - public: - GeoVDetectorElement (const GeoVFullPhysVol* fullPhysVol); - virtual ~GeoVDetectorElement(); - - // Returns a pointer to a physical volume which is - // associated with this detector element. - const GeoVFullPhysVol* getMaterialGeom () const; - - private: - GeoVDetectorElement(const GeoVDetectorElement &right); - GeoVDetectorElement & operator=(const GeoVDetectorElement &right); - - private: - const GeoVFullPhysVol *m_materialGeom; - -}; - -inline const GeoVFullPhysVol* GeoVDetectorElement::getMaterialGeom () const -{ - return m_materialGeom; -} - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h deleted file mode 100755 index 55e50891036..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorFactory.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOVDETECTORFACTORY_H -#define GEOMODELKERNEL_GEOVDETECTORFACTORY_H - -/** - * @class: GeoVDetectorFactory - * - * @brief Abstact Base Class for a detector factory. The detector - * factory builds the geometry and creates a GeoDetector - * Manager, which one may thereafter query for all raw - * geometry, and all readout geometry. - */ - -#include "GeoModelKernel/GeoVPhysVol.h" - -class GeoPhysVol; -class GeoVDetectorManager; - -class GeoVDetectorFactory -{ - public: - GeoVDetectorFactory(); - virtual ~GeoVDetectorFactory(); - - // Create the system. - virtual void create (GeoPhysVol* world) = 0; - - // Access to the Detector Manager. When implementing this - // method, please use the covariant return type mechanism. - virtual const GeoVDetectorManager* getDetectorManager () const = 0; - - private: - GeoVDetectorFactory(const GeoVDetectorFactory &right); - GeoVDetectorFactory & operator=(const GeoVDetectorFactory &right); - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorManager.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorManager.h deleted file mode 100755 index 0526ce30954..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVDetectorManager.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOVDETECTORMANAGER_H -#define GEOMODELKERNEL_GEOVDETECTORMANAGER_H - -/** - * @class GeoVDetectorManager - * - * @brief This class is the Manager for each detector. It has two - * required query mechanism: one for "tree tops" (These - * are top level pieces of raw geometry; there may be one - * or more of these), and another one for detector - * elements, which represent readout units. - * - * Subsystems engineers should override this. They may in - * addition add their own query mechanisms to their - * interface. - * They may in fact add anything else they require to their - * interface. - */ - -#include "GeoModelKernel/GeoVPhysVol.h" - -class GeoVDetectorElement; - -class GeoVDetectorManager -{ - public: - GeoVDetectorManager(); - virtual ~GeoVDetectorManager(); - - // Returns the number of Tree Tops (Top Level Physicsl - // Volumes) - virtual unsigned int getNumTreeTops () const = 0; - - // Access to the Tree Top - virtual PVConstLink getTreeTop (unsigned int i) const = 0; - - const std::string & getName() const; - void setName(const std::string & name); - - private: - GeoVDetectorManager(const GeoVDetectorManager &right); - GeoVDetectorManager & operator=(const GeoVDetectorManager &right); - - std::string m_name; - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVFullPhysVol.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVFullPhysVol.h deleted file mode 100755 index 193e52a5453..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVFullPhysVol.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOVFULLPHYSVOL_H -#define GEOMODELKERNEL_GEOVFULLPHYSVOL_H - -#include "GeoModelKernel/GeoVPhysVol.h" -#include "GeoModelKernel/GeoAbsPositionInfo.h" - -class GeoVAlignmentStore; - -// To Do: consider dropping it from the class hierarchy? -class GeoVFullPhysVol : public GeoVPhysVol -{ - public: - GeoVFullPhysVol(const GeoLogVol* logVol); - - GeoVFullPhysVol(const GeoVFullPhysVol &right) = delete; - GeoVFullPhysVol & operator=(const GeoVFullPhysVol &right) = delete; - - /// Returns the absolute transform of the volume. - const HepGeom::Transform3D& getAbsoluteTransform(GeoVAlignmentStore* store=nullptr) const; - - /// Clears the position information. This can be used if - /// the cache is determined to be invalid. The usual client - /// is one of the parents, upon changing its own position. - /// There is little need for casual users to call this. - void clearPositionInfo() const; - - /// Returns the default absolute transform of the volume. - const HepGeom::Transform3D& getDefAbsoluteTransform(GeoVAlignmentStore* store=nullptr) const; - - /// Returns the absolute name of this node. - const std::string& getAbsoluteName(); - - /// Returns the identification bits. - unsigned int getId() const; - - protected: - virtual ~GeoVFullPhysVol() override; - - private: - /// The absolute name of this volume. - std::string m_absName; - - /// An identifier. This is locally cached in a full physical volume. - mutable Query<int> *m_id; - - /// Information on the where this volume is, by default and after alignment corrections. - mutable GeoAbsPositionInfo *m_absPosInfo; - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVPhysVol.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVPhysVol.h deleted file mode 100755 index 63170791260..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVPhysVol.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOVPHYSVOL_H -#define GEOMODELKERNEL_GEOVPHYSVOL_H - -#include "GeoModelKernel/GeoPVLink.h" -#define SMARTLINKS -#ifdef SMARTLINKS -typedef GeoPVLink PVLink; -typedef GeoPVConstLink PVConstLink; -#else -class GeoVPhysVol; -typedef GeoVPhysVol *PVLink; -typedef const GeoVPhysVol *PVConstLink; -#endif -#include "CLHEP/Geometry/Transform3D.h" -#include "GeoModelKernel/Query.h" -#include <string> - -#include "GeoModelKernel/GeoLogVol.h" -#include "GeoModelKernel/GeoGraphNode.h" - -class GeoVolumeAction; -class GeoVAlignmentStore; - -class GeoVPhysVol : public GeoGraphNode -{ - public: - GeoVPhysVol(const GeoLogVol* LogVol); - - GeoVPhysVol(const GeoVPhysVol &right) = delete; - GeoVPhysVol & operator=(const GeoVPhysVol &right) = delete; - - /// Returns true if the physical volume is accessed by more than one parent. - /// Should check this before trusting the parent pointer. - bool isShared() const; - - /// Returns the index of a specific daughter volume. The Query class can be used - /// just like an unsigned int, but it provides and isValid() method to determine - /// whether it is valid and throws an exception if an invalid value is blithely used. - Query<unsigned int> indexOf(PVConstLink daughter) const; - - /// Gets the parent, if the parent is unique, and otherwise returns a nullptr pointer. - PVConstLink getParent() const; - - /// Returns the logical volume. - const GeoLogVol* getLogVol() const; - - /// Returns the number of child physical volumes. - virtual unsigned int getNChildVols() const = 0; - - /// Returns the ith child volume - virtual PVConstLink getChildVol(unsigned int index) const = 0; - - /// Returns the transform to the ith volume. - virtual HepGeom::Transform3D getXToChildVol(unsigned int index, const GeoVAlignmentStore* store=nullptr) const = 0; - - /// Returns the default transform to the ith volume. - virtual HepGeom::Transform3D getDefXToChildVol(unsigned int index, const GeoVAlignmentStore* store=nullptr) const = 0; - - /// Returns the name of the child. - virtual std::string getNameOfChildVol(unsigned int i) const = 0; - - /// Applies an action to the volume. The volume executes the action and the applies - /// it to the children, either from the top down or the bottom up, depending upon - /// the configuration of the action. - void apply(GeoVolumeAction* action) const; - - /// When a node is added to a parent in the graph, the node is always notified. - /// What happens at that time is up to the node. Most nodes do not need to do - /// anything. Some--the alignable transforms in particular--need to take some - /// take some actions, such as adding the parent volume to a list. - virtual void dockTo(GeoVPhysVol* parent); - - /// Returns the id of the child. - virtual Query<int> getIdOfChildVol(unsigned int i) const = 0; - - /// Returns the number of child physical volumes and Serial Transformers. - virtual unsigned int getNChildVolAndST() const = 0; - - virtual HepGeom::Transform3D getX (const GeoVAlignmentStore* store=nullptr) const = 0; - virtual HepGeom::Transform3D getDefX (const GeoVAlignmentStore* store=nullptr) const = 0; - virtual unsigned int getNChildNodes() const=0; - virtual const GeoGraphNode * const *getChildNode (unsigned int i) const=0; - virtual const GeoGraphNode * const *findChildNode(const GeoGraphNode *n) const=0; - - protected: - virtual ~GeoVPhysVol(); - - private: - /// If one parent ...pointer=PARENT; - /// If no parent ...pointer=nullptr. - /// If more than one parent ...pointer=this; - const GeoVPhysVol* m_parentPtr; - - const GeoLogVol *m_logVol; -}; - -inline bool GeoVPhysVol::isShared () const -{ - return m_parentPtr == this; -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVolumeAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVolumeAction.h deleted file mode 100755 index 9a8f387cb55..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVolumeAction.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOVOLUMEACTION_H -#define GEOMODELKERNEL_GEOVOLUMEACTION_H - -/** - * @class GeoVolumeAction - * - * @brief This type of action sees and traverses a simpler tree of - * positioned volumes. It does not descend into - * transformations or other properties, but simply - * accumulates their effect into an internal state that can - * be accessed during traversal. That state includes, for - * example, the position relative to the parent. - */ - -#include "GeoModelKernel/GeoTraversalState.h" - -class GeoVolumeAction -{ - public: - enum Type - { TOP_DOWN, BOTTOM_UP }; - - public: - GeoVolumeAction (Type type = TOP_DOWN); - virtual ~GeoVolumeAction(); - - // Callback method. Overriden by users. - virtual void handleVPhysVol (const GeoVPhysVol *); - - // Cause the action to terminate. - void terminate (); - - // Determine whether the action should terminate. - bool shouldTerminate () const; - - // Returns the traversal state. From this one can get - // placement information about the volume, even if it is a - // shared instance. - const GeoTraversalState* getState () const; - - // Returns the traversal state, as above. Non const type. - GeoTraversalState* getState (); - - // Returns the type: GeoVolumeAction::TOP_DOWN or GeoVolume - // Action::BOTTOM_UP. - GeoVolumeAction::Type getType () const; - - private: - GeoVolumeAction(const GeoVolumeAction &right); - GeoVolumeAction & operator=(const GeoVolumeAction &right); - - // This type specifies that the action should be carried - // out from the bottom up or from the top down. - Type m_type; - - // Termination flag; causes an abortion of action execution. - bool m_terminate; - - GeoTraversalState m_traversalState; - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVolumeCursor.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVolumeCursor.h deleted file mode 100755 index de845a1e8bd..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoVolumeCursor.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOVOLUMECURSOR_H -#define GEOMODELKERNEL_GEOVOLUMECURSOR_H - -#include "GeoModelKernel/GeoNodeAction.h" -#include "CLHEP/Geometry/Transform3D.h" -#include <vector> - -class GeoVAlignmentStore; - -class GeoVolumeCursor final : public GeoNodeAction -{ - public: - GeoVolumeCursor (PVConstLink parent, GeoVAlignmentStore* store=nullptr); - virtual ~GeoVolumeCursor() override; - - GeoVolumeCursor(const GeoVolumeCursor &right) = delete; - GeoVolumeCursor & operator=(const GeoVolumeCursor &right) = delete; - - /// Advance - void next(); - - /// Check if we are at the last volume. - bool atEnd() const; - - /// Returns the selected physical volume or nullptr if not found. - PVConstLink getVolume () const; - - /// Returns the transformation to the volume. - HepGeom::Transform3D getTransform () const; - - /// Returns the default ransformation to the volume. - HepGeom::Transform3D getDefTransform () const; - - /// Returns the name of the volume. From nametag or serial denominator. - std::string getName () const; - - /// Returns the id of the volume. From the identifier. - Query<int> getId () const; - - bool hasAlignableTransform() const; - - private: - /// Handles a Transform. - virtual void handleTransform (const GeoTransform *xform) override; - - /// Handles a physical volume. - virtual void handlePhysVol (const GeoPhysVol *vol) override; - - /// Handles a physical volume. - virtual void handleFullPhysVol (const GeoFullPhysVol *vol) override; - - /// Handles a Name Tag. - virtual void handleNameTag (const GeoNameTag *nameTag) override; - - /// Handles a Serial Denominator. - virtual void handleSerialDenominator (const GeoSerialDenominator *sD) override; - - /// Handles a Serial Transformer - virtual void handleSerialTransformer (const GeoSerialTransformer *sT) override; - - /// Handles an Identifier Tag. - virtual void handleIdentifierTag (const GeoIdentifierTag *idTag) override; - - /// Handles a Serial Identifier. - virtual void handleSerialIdentifier(const GeoSerialIdentifier *sI) override; - - /// Ressucitate (undo terminate) - void resuscitate(); - - - PVConstLink m_parent; - PVConstLink m_volume; - HepGeom::Transform3D m_transform; - HepGeom::Transform3D m_defTransform; - - unsigned int m_majorIndex; - unsigned int m_minorIndex; - unsigned int m_minorLimit; - const GeoSerialTransformer *m_serialTransformer; - - const GeoNameTag *m_nameTag; - const GeoSerialDenominator *m_serialDenominator; - const GeoIdentifierTag *m_idTag; - std::vector<const GeoTransform *> m_pendingTransformList; - unsigned int m_serialDenomPosition; - const GeoSerialIdentifier *m_serialIdentifier; - unsigned int m_serialIdentPosition; - unsigned int m_volCount; - - bool m_hasAlignTrans; - - GeoVAlignmentStore *m_alignStore; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoXF.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoXF.h deleted file mode 100755 index 87ff911c0fd..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoXF.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -//------------------------GeoTransformFunction--------------------------// -// // -// GeoTransformFunction, base class for function objects which // -// evaluate to a HepTransform. // -// // -//----------------------------------------------------------------------// -#ifndef GEOMODELKERNEL_GEOTRANSFORMFUNCTION_H -#define GEOMODELKERNEL_GEOTRANSFORMFUNCTION_H -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Argument.hh" -#include "CLHEP/Geometry/Transform3D.h" -//-----------------------------------------------------------------------// -// Exact return type of arithmentic operations. To the user, the return // -// type is TRANsFUNCTION, or const GeoXF::Function &. // -//-----------------------------------------------------------------------// - -namespace GeoXF -{ - - class Product; - class PreMult; - class PostMult; - class Pow; - - - class Function - { - - public: - - // Default Constructor - Function (); - - // Destructor - virtual ~ Function (); - - // Function value: N-dimensional functions must override these: - virtual unsigned int dimensionality () const; //returns 1; - - // Function value - virtual HepGeom::Transform3D operator () (double argument) const = 0; - virtual HepGeom::Transform3D operator () (const Genfun:: - Argument & argument) const = - 0; - - // Every function must override this: - virtual Function *clone () const = 0; - - // Copy constructor - Function (const Function & right); - - private: - - // Assignment operator - const Function & operator = (const Function & right); - - }; - - - - - - - class Pow:public Function - { - - public: - - Pow (const HepGeom::Transform3D &, Genfun::GENFUNCTION f); - - virtual ~ Pow (); - - virtual HepGeom::Transform3D operator () (double argument) const; - virtual HepGeom::Transform3D operator () (const Genfun:: - Argument & argument) const; - - // Every function must override this: - Pow *clone () const; - - // Copy constructor: - Pow (const Pow & right); - - private: - - // Assignment operator - const Pow & operator = (const Pow & right); - - const HepGeom::Transform3D m_xf; - const Genfun::AbsFunction * m_function; - - }; - - - - - - Product operator * (const Function & op1, const Function & op2); - PreMult operator * (const HepGeom::Transform3D & xf, const Function & op2); - PostMult operator * (const Function & op2, const HepGeom::Transform3D & xf); - - - // Internally used class:: Product: - - class Product:public Function - { - - public: - - - Product (const Function * arg1, const Function * arg2); - - virtual ~ Product (); - - virtual unsigned int dimensionality () const; - - virtual HepGeom::Transform3D operator () (double argument) const; - virtual HepGeom::Transform3D operator () (const Genfun:: - Argument & argument) const; - - // Every function must override this: - virtual Product *clone () const; - - // Copy constructor: - Product (const Product & right); - - Product& operator= (const Product & right) = delete; - - private: - - const Function *m_arg1; - const Function *m_arg2; - - }; - - // Internally used class:: PreMult : - - class PreMult:public Function - { - - public: - - - PreMult (const HepGeom::Transform3D & arg1, const Function * arg2); - - virtual ~ PreMult (); - - virtual unsigned int dimensionality () const; - - virtual HepGeom::Transform3D operator () (double argument) const; - virtual HepGeom::Transform3D operator () (const Genfun:: - Argument & argument) const; - - // Every function must override this: - virtual PreMult *clone () const; - - // Copy constructor: - PreMult (const PreMult & right); - - PreMult& operator= (const PreMult & right) = delete; - - private: - - const HepGeom::Transform3D m_arg1; - const Function *m_arg2; - - }; - - // Internally used class:: PostMult : - - class PostMult:public Function - { - - public: - - - PostMult (const Function * arg1, const HepGeom::Transform3D & arg2); - - virtual ~ PostMult (); - - virtual unsigned int dimensionality () const; - - virtual HepGeom::Transform3D operator () (double argument) const; - virtual HepGeom::Transform3D operator () (const Genfun:: - Argument & argument) const; - - // Every function must override this: - virtual PostMult *clone () const; - - // Copy constructor: - PostMult (const PostMult & right); - - PostMult& operator= (const PostMult & right) = delete; - - private: - - const Function *m_arg1; - const HepGeom::Transform3D m_arg2; - - }; - - typedef const Function & TRANSFUNCTION; - - - -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeometryMap.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeometryMap.h deleted file mode 100755 index 4f13d91e210..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeometryMap.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOMETRYMAP_H -#define GEOMODELKERNEL_GEOMETRYMAP_H -#include <string> -#include "GeoModelKernel/GeoVPhysVol.h" - -class GeometryMap { - - public: - - // constructor - GeometryMap(); - - // Destructor; - ~GeometryMap(); - - GeometryMap (const GeometryMap&) = delete; - GeometryMap& operator= (const GeometryMap&) = delete; - - // Add a name to the list of designated volumes: Can use wildcards. - void add(const std::string & name); - - // Create the map; this will maintain a list of all volumes matching - // the expressions under the given physical volume. - void finalize(PVConstLink pv); - - - // For iteration: - typedef std::vector<PVConstLink>::const_iterator Iterator; - - Iterator begin() const; - Iterator end() const; - - private: - - class Clockwork; - Clockwork *m_c; - -}; -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/Path.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/Path.h deleted file mode 100755 index c9604266ef0..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/Path.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_PATH_H -#define GEOMODELKERNEL_PATH_H - -/** - * @class Path - * - * @brief Represents a path from one point in the general tree, to the present point. - */ - -#include <vector> -#include <cstdlib> - -template <class T> -class Path -{ - public: - Path(); - Path(const Path< T > &right); - ~Path(); - - Path< T > & operator=(const Path< T > &right); - - // Pops the last node from the stack. - const T * pop (); - - // Pushes another node on to the tail of the path. - void push (const T *node); - - // Returns the length of the path. - unsigned int getLength () const; - - // Returns the ith Item. - const T * getItem (unsigned int i) const; - - // Gets the head of the path. - const T * getHead () const; - - // Gets the tail of the path. - const T * getTail () const; - - private: - // A list of physical volumes betwee the head of the path - // and the tail of the path. - std::vector<const T *> m_nodeList; - -}; - -template <class T> -inline Path<T>::Path() -{ - m_nodeList.reserve(2); -} - -template <class T> -inline Path<T>::Path(const Path<T> &right) - : m_nodeList(right.m_nodeList) -{ -} - -template <class T> -inline Path<T>::~Path() -{ -} - -template <class T> -inline Path<T> & Path<T>::operator=(const Path<T> &right) -{ - if (this != &right) - { - m_nodeList = right.m_nodeList; - } - return *this; -} - -template <class T> -inline const T * Path<T>::pop () -{ - if (m_nodeList.size () == 0) - { - return nullptr; - } - else - { - const T *gvp = m_nodeList.back (); - m_nodeList.pop_back (); - return gvp; - } -} - -template <class T> -inline void Path<T>::push (const T *node) -{ - m_nodeList.push_back (node); -} - -template <class T> -inline unsigned int Path<T>::getLength () const -{ - return m_nodeList.size (); -} - -template <class T> -inline const T * Path<T>::getItem (unsigned int i) const -{ - if (m_nodeList.size () == 0) - { - return nullptr; - } - else - { - return m_nodeList[i]; - } -} - -template <class T> -inline const T * Path<T>::getHead () const -{ - if (m_nodeList.size () == 0) - { - return nullptr; - } - else - { - return m_nodeList.front (); - } -} - -template <class T> -inline const T * Path<T>::getTail () const -{ - if (m_nodeList.size () == 0) - { - return nullptr; - } - else - { - return m_nodeList.back (); - } -} - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/Query.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/Query.h deleted file mode 100755 index 34487da8bef..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/Query.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_QUERY_H -#define GEOMODELKERNEL_QUERY_H - -/** - * @class Query - * - * @brief This class can be used to return the result of a query - * that can fail. Objects of this class can convert themselves to the - * result type T. Client code can check for a valid result; if it doesn't, - * and the result is valid, no problem. But if the result is invalid you - * will print an error message and terminate. - * - * Joe Boudreau - * based on Barton & Nackman's "Scientific and Engineering C++" - */ - -#include <stdexcept> -template < class T > class Query -{ - -public: - - // Constructor: - inline Query (const T &); - - // Default constructor: - inline Query (); - - // Convert to "T" - inline operator T () const; - - // Test Validity - inline bool isValid () const; - -private: - - bool m_failed; - T m_instance; - -}; - - -template < class T > inline Query < T >::Query (const T & t): -m_failed (false), -m_instance (t) -{ -} - -template < class T > inline Query < T >::Query (): -m_failed (true), -m_instance (T()) -{ -} - -template < class T > inline Query < T >::operator T () const -{ - if (m_failed) - throw std::range_error ("Failed query"); - return m_instance; -} - -template < class T > inline bool Query < T >::isValid () const -{ - return !m_failed; -} - - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/RCBase.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/RCBase.h deleted file mode 100755 index 0dfd0b5a9ac..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/RCBase.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** - * @class RCBase - * - * @brief This is a base class for objects whose memory is managed - * through reference counting. Reference-counted objects - * can only be created using - * operator new, the cannot be created on the stack. - * - * The methods ref() and unref() can be called to increase - * and decrease the reference count of an object. When - * the reference count decreases to zero, the object deletes - * itself - */ - -#ifndef GEOMODELKERNEL_RCBASE_H -#define GEOMODELKERNEL_RCBASE_H - -#include <atomic> - -class RCBase -{ - public: - RCBase(); - - // Increase the reference count - void ref () const; - - // Decreases the reference count. When the reference count - // falls to zero, the object deletes itself. - void unref () const; - - // Return the reference count. - unsigned int refCount () const; - - protected: - virtual ~RCBase(); - - private: - RCBase(const RCBase &right); - RCBase & operator=(const RCBase &right); - - // The reference count - mutable std::atomic<unsigned> m_count; - -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/TemplateVolAction.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/TemplateVolAction.h deleted file mode 100755 index 788d81d9858..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/TemplateVolAction.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_TEMPLATEVOLACTION_H -#define GEOMODELKERNEL_TEMPLATEVOLACTION_H - -/** - * @class TemplateVolAction - * - * @brief An example that does nothing, for people to copy and fill in - */ - -#include "GeoModelKernel/GeoVolumeAction.h" - -class TemplateVolAction : public GeoVolumeAction -{ - public: - TemplateVolAction(); - ~TemplateVolAction(); - - // Callback method. Overriden by users. - virtual void handleVPhysVol (const GeoVPhysVol *); -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/TinyHepTransform.h b/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/TinyHepTransform.h deleted file mode 100755 index f09623d874f..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/TinyHepTransform.h +++ /dev/null @@ -1,522 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef _TINYHEPTRANSFORM_H_ -#define _TINYHEPTRANSFORM_H_ -//-------------------------------------------------------------------------// -// // -// Tiny HepTransforms Joe Boudreau September 2003 // -// // -// These are essentially alternate representations of HepGeom::Transform3D // -// that are designed for memory optimization. // -// // -// This header file includes the following classes: // -// // -// tiny::HepTranslate3D // -// tiny::HepTranslateX3D // -// tiny::HepTranslateY3D // -// tiny::HepTranslateZ3D // -// tiny::HepRotate3D // -// tiny::HepRotateX3D // -// tiny::HepRotateY3D // -// tiny::HepRotateZ3D // -// tiny::HepReflect3D // -// tiny::HepReflectX3D // -// tiny::HepReflectY3D // -// tiny::HepReflectZ3D // -// tiny::HepScale3D // -// tiny::HepScale3XD // -// tiny::HepScale3YD // -// tiny::HepScale3ZD // -// // -// tiny::HepGeom::Transform3D // -// tiny::HepProperTransform3D // -// // -// The "Input classes" all contain constructors with the same signature // -// as their CLHEP counterparts. However, they do not store more info // -// than what they need; for example, HepTranslateZ3D stores just one // -// floating point number. However it can cast itself to a HepGeom::Transform3D // -// and so can be used exactly as a regular HepGeom::Transform3D. (Sometimes // -// you will need explicit casts in order to coax this behaviour). // -// // -// The "output classes" can be assigned the value of the HepGeom::Transform3D // -// but store it in a memory-optimized way. Six floats for a proper // -// transform and nine floats for a transform with scaling. In case // -// an improper CLHEP Transform is assigned to a tiny transform, a run // -// time error will occur. // -// // -//-------------------------------------------------------------------------// - -#include "CLHEP/Geometry/Point3D.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include <iostream> -#include <stdexcept> - -namespace tiny { - - class Transform { - - public: - - virtual operator ::HepGeom::Transform3D() const = 0; - - }; - - - class HepReflectX3D: public Transform { - - public: - - virtual operator ::HepGeom::Transform3D() const { - return ::HepReflectX3D(); - } - - }; - - class HepReflectY3D: public Transform { - - public: - - virtual operator ::HepGeom::Transform3D() const { - return ::HepReflectY3D(); - } - - }; - - class HepReflectZ3D: public Transform { - - public: - - virtual operator ::HepGeom::Transform3D() const { - return ::HepReflectZ3D(); - } - - }; - - class HepTranslateX3D: public Transform { - - public: - - inline HepTranslateX3D(double a): - _a(a) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepTranslateX3D(_a); - } - - private: - - float _a; - - }; - - class HepTranslateY3D: public Transform { - - public: - - inline HepTranslateY3D(double a): - _a(a) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepTranslateY3D(_a); - } - - private: - - float _a; - - }; - - class HepTranslateZ3D: public Transform { - - public: - - inline HepTranslateZ3D(double a): - _a(a) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepTranslateZ3D(_a); - } - - private: - - float _a; - - }; - - class HepScaleX3D: public Transform { - - public: - - inline HepScaleX3D(double a): - _a(a) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepScaleX3D(_a); - } - - private: - - float _a; - - }; - - class HepScaleY3D: public Transform { - - public: - - inline HepScaleY3D(double a): - _a(a) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepScaleY3D(_a); - } - - private: - - float _a; - - }; - - class HepScaleZ3D: public Transform { - - public: - - inline HepScaleZ3D(double a): - _a(a) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepScaleZ3D(_a); - } - - private: - - float _a; - - }; - - class HepRotateX3D: public Transform { - - public: - - inline HepRotateX3D(double a): - _a(a) {} - - - virtual operator ::HepGeom::Transform3D() const { - return ::HepRotateX3D(_a); - } - - private: - - float _a; - - }; - - class HepRotateY3D: public Transform { - - public: - - inline HepRotateY3D(double a): - _a(a) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepRotateY3D(_a); - } - - private: - - float _a; - - }; - - class HepRotateZ3D: public Transform { - - public: - - inline HepRotateZ3D(double a): - _a(a) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepRotateZ3D(_a); - } - - private: - - float _a; - - }; - - - - class HepRotate3D: public Transform { - - public: - - inline HepRotate3D(const CLHEP::HepRotation &m) { - double angle; - CLHEP::Hep3Vector axis; - m.getAngleAxis(angle, axis); - axis.setMag(angle); - ax=axis.x(); ay = axis.y(); az=axis.z(); - - } - - inline HepRotate3D(double a, const HepGeom::Vector3D<double> & v) { - CLHEP::Hep3Vector axis=v; - axis.setMag(a); - ax=axis.x(); ay=axis.y(); az=axis.z(); - } - - inline HepRotate3D(double a, - const HepGeom::Point3D<double> & p1, - const HepGeom::Point3D<double> & p2) { - ::HepRotate3D tmp(a, p1, p2); - const CLHEP::HepRotation & m = tmp.getRotation(); - double angle; - CLHEP::Hep3Vector axis; - m.getAngleAxis(angle, axis); - axis.setMag(angle); - ax=axis.x(); ay = axis.y(); az=axis.z(); - } - - inline HepRotate3D(const HepGeom::Point3D<double> & fr1, - const HepGeom::Point3D<double> & fr2, - const HepGeom::Point3D<double> & to1, - const HepGeom::Point3D<double> & to2) { - ::HepRotate3D tmp(fr1, fr2, to1, to2); - const CLHEP::HepRotation & m = tmp.getRotation(); - double angle; - CLHEP::Hep3Vector axis; - m.getAngleAxis(angle, axis); - axis.setMag(angle); - ax=axis.x(); ay = axis.y(); az=axis.z(); - } - - virtual operator ::HepGeom::Transform3D() const { - return ::HepRotate3D(sqrt(ax*ax+ay*ay+az*az), HepGeom::Vector3D<double> (ax,ay,az)); - } - - private: - - float ax, ay, az; - - }; - - class HepTranslate3D: public Transform { - - public: - inline HepTranslate3D (const CLHEP::Hep3Vector & v): - ax(v.x()),ay(v.y()), az(v.z()){} - - inline HepTranslate3D (double dx, double dy, double dz): - ax(dx),ay(dy),az(dz) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepTranslate3D(ax,ay,az); - } - - private: - float ax, ay, az; - }; - - class HepScale3D: public Transform { - - public: - - inline HepScale3D (double s): - ax(s),ay(s), az(s){} - - inline HepScale3D (double sx, double sy, double sz): - ax(sx),ay(sy),az(sz) {} - - virtual operator ::HepGeom::Transform3D() const { - return ::HepScale3D(ax,ay,az); - } - - private: - float ax, ay, az; - }; - - class HepReflect3D: public Transform { - - public: - - inline HepReflect3D(double a, double b, double c, double d) { - double mag = sqrt(a*a+b*b+c*c); - d = d/mag; - ax = d*a/mag; - ay = d*b/mag; - az = d*c/mag; - - } - - inline HepReflect3D(const HepGeom::Normal3D<double> & normal, - const HepGeom::Point3D<double> & point) { - HepGeom::Normal3D<double> nNorm=normal; - nNorm.setMag(1.0); - double d = nNorm*point; - nNorm.setMag(d); - } - - virtual operator ::HepGeom::Transform3D() const { - double mag = sqrt(ax*ax+ay*ay+az*az); - return ::HepReflect3D(ax/mag,ay/mag,az/mag ,mag); - } - - private: - float ax, ay, az; - }; - - - class HepProperTransform3D: public Transform { - - public: - - inline HepProperTransform3D(): - tx(0),ty(0), tz(0), rx(0), ry(0), rz(0) {} - - - inline HepProperTransform3D(const ::HepGeom::Transform3D & source) { - HepGeom::Scale3D scale; - HepGeom::Rotate3D rotate; - HepGeom::Translate3D translate; - - source.getDecomposition(scale, rotate, translate); - const double EPS=5E-5; - if (fabs(scale.xx()-1.0)>EPS || fabs(scale.yy()-1.0)>EPS || fabs(scale.zz()-1.0)>EPS) { - - throw std::range_error("tiny::HepProperTransform3D detects an improper transformation (scaling or reflection)"); - } - - double angle; - CLHEP::HepRotation rotation( HepRep3x3(rotate.xx(), rotate.xy(), rotate.xz(), - rotate.yx(), rotate.yy(), rotate.yz(), - rotate.zx(), rotate.zy(), rotate.zz())); - CLHEP::Hep3Vector axis; - rotation.getAngleAxis(angle, axis); - axis.setMag(angle); - rx=axis.x(); ry = axis.y(); rz=axis.z(); - - tx = translate.dx(); - ty = translate.dy(); - tz = translate.dz(); - - } - - inline const HepProperTransform3D & operator = (const ::HepGeom::Transform3D & source) { - HepGeom::Scale3D scale; - HepGeom::Rotate3D rotate; - HepGeom::Translate3D translate; - - source.getDecomposition(scale, rotate, translate); - const double EPS=5E-5; - if (fabs(scale.xx()-1.0)>EPS || fabs(scale.yy()-1.0)>EPS || fabs(scale.zz()-1.0)>EPS) { - throw std::range_error("tiny::HepProperTransform3D detects an improper transformation (scaling or reflection)"); - } - - double angle; - CLHEP::HepRotation rotation( HepRep3x3(rotate.xx(), rotate.xy(), rotate.xz(), - rotate.yx(), rotate.yy(), rotate.yz(), - rotate.zx(), rotate.zy(), rotate.zz())); - CLHEP::Hep3Vector axis; - rotation.getAngleAxis(angle, axis); - axis.setMag(angle); - rx=axis.x(); ry = axis.y(); rz=axis.z(); - - tx = translate.dx(); - ty = translate.dy(); - tz = translate.dz(); - return *this; - } - - virtual operator ::HepGeom::Transform3D() const { - return ::HepGeom::Transform3D(CLHEP::CLHEP::HepRotation(CLHEP::Hep3Vector(rx,ry,rz),sqrt(rx*rx+ry*ry+rz*rz)), - CLHEP::Hep3Vector(tx,ty,tz)); - } - - private: - - float tx, ty, tz; - float rx, ry, rz; - - }; - - - class HepGeom::Transform3D: public Transform { - - public: - - inline HepGeom::Transform3D(): - tx(0),ty(0), tz(0), rx(0), ry(0), rz(0), sx(0), sy(0), sz(0) {} - - - inline HepGeom::Transform3D(const ::HepGeom::Transform3D & source) { - HepGeom::Scale3D scale; - HepGeom::Rotate3D rotate; - HepGeom::Translate3D translate; - - source.getDecomposition(scale, rotate, translate); - - double angle; - CLHEP::HepRotation rotation( HepRep3x3(rotate.xx(), rotate.xy(), rotate.xz(), - rotate.yx(), rotate.yy(), rotate.yz(), - rotate.zx(), rotate.zy(), rotate.zz())); - CLHEP::Hep3Vector axis; - rotation.getAngleAxis(angle, axis); - axis.setMag(angle); - rx=axis.x(); ry = axis.y(); rz=axis.z(); - - tx = translate.dx(); - ty = translate.dy(); - tz = translate.dz(); - - sx = scale.xx(); - sy = scale.yy(); - sz = scale.zz(); - - } - - inline const HepGeom::Transform3D & operator = (const ::HepGeom::Transform3D & source) { - HepGeom::Scale3D scale; - HepGeom::Rotate3D rotate; - HepGeom::Translate3D translate; - - source.getDecomposition(scale, rotate, translate); - - double angle; - CLHEP::HepRotation rotation( HepRep3x3(rotate.xx(), rotate.xy(), rotate.xz(), - rotate.yx(), rotate.yy(), rotate.yz(), - rotate.zx(), rotate.zy(), rotate.zz())); - CLHEP::Hep3Vector axis; - rotation.getAngleAxis(angle, axis); - axis.setMag(angle); - rx=axis.x(); ry = axis.y(); rz=axis.z(); - - tx = translate.dx(); - ty = translate.dy(); - tz = translate.dz(); - - sx = scale.xx(); - sy = scale.yy(); - sz = scale.zz(); - - return *this; - } - - virtual operator ::HepGeom::Transform3D() const { - return ::HepGeom::Transform3D(CLHEP::CLHEP::HepRotation(CLHEP::Hep3Vector(rx,ry,rz),sqrt(rx*rx+ry*ry+rz*rz)), - CLHEP::Hep3Vector(tx,ty,tz))*HepGeom::Scale3D(sx,sy,sz); - } - - private: - - float tx, ty, tz; - float rx, ry, rz; - float sx, sy, sz; - }; - -} -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/doc/packagedoc.h b/DetectorDescription/GeoModel/GeoModelKernel/doc/packagedoc.h deleted file mode 100644 index e7b866ef33c..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/doc/packagedoc.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/** - - -@page GeoModelKernel_page - -The package contains kernel classes of the GeoModel toolkit: physical and logical volumes, -shapes, transformations, parameterized volumes, volume identifiers, actions. - --------------------------------- - REQUIREMENTS --------------------------------- - - -*/ diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/BooleanProcessor.src b/DetectorDescription/GeoModel/GeoModelKernel/src/BooleanProcessor.src deleted file mode 100755 index 1e610798497..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/BooleanProcessor.src +++ /dev/null @@ -1,2109 +0,0 @@ -/*********************************************************************** - * * - * Name: BooleanProcessor Date: 10.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Internal class for executing boolean operations * - * on Polyhedra * - * * - * G.Barrand, 27/03/2001 : * - * triangulateContour : the pnext logic does not work. The * - * push_backs in the edge list reshuffle the addresses ! * - * Problem detected on Windows. * - * * - ***********************************************************************/ -#define ExtNode Geo_ExtNode -#define ExtEdge Geo_ExtEdge -#define ExtFace Geo_ExtFace -#define FaceList Geo_FaceList -#define ExtPolyhedron Geo_ExtPolyhedron -#define BooleanProcessor Geo_BooleanProcessor - - -#define INITIAL_SIZE 200 -#define CRAZY_POINT HVPoint3D(-10.e+6, -10.e+6, -10.e+6) -#define GRANULARITY (10.e+5) - -#define SWAP(A,B) w = A; A = B; B = w - -#define OP_UNION 0 // Operations -#define OP_INTERSECTION 1 -#define OP_SUBTRACTION 2 - -#define OUT_OF_PLANE 0 // Face vs face statuses -#define ON_PLANE 1 -#define INTERSECTION 2 -#define EDGE 3 -#define NON_PLANAR_FACE 4 - -#define UNKNOWN_FACE 0 // Face statuses -#define ORIGINAL_FACE -1 -#define NEW_FACE -2 -#define UNSUITABLE_FACE -3 -#define DEFECTIVE_FACE -4 - - -// ---------------------------------------------------- Extended node --- -class ExtNode { - public: - HVPoint3D v; - int s; - - public: - ExtNode():s(0) {} //G.Barrand - ExtNode(HVPoint3D vertex, int status=0) : v(vertex), s(status) {} - ~ExtNode() {} - - ExtNode(const ExtNode & node) : v(node.v), s(node.s) {} - - ExtNode & operator=(const ExtNode & node) - { - if (this != &node) { - v = node.v; - s = node.s; - } - return *this; - } -}; - -// ---------------------------------------------------- Extended edge --- -class ExtEdge { - public: - int i1, i2; // end points - int iface1; // native face - int iface2; // neighbouring face - int ivis; // visibility: +1 (visible), -1 (invisible) - int inext; // index of next edge - - public: - ExtEdge(int k1=0, int k2=0, int kface1=0, int kface2=0, int kvis=0) : - i1(k1), i2(k2), iface1(kface1), iface2(kface2), ivis(kvis), inext(0) {} - - ~ExtEdge() {}; - - ExtEdge(const ExtEdge & edge) : - i1(edge.i1), i2(edge.i2), iface1(edge.iface1), iface2(edge.iface2), - ivis(edge.ivis), inext(edge.inext) {} - - ExtEdge & operator=(const ExtEdge & edge) { - i1 = edge.i1; - i2 = edge.i2; - iface1 = edge.iface1; - iface2 = edge.iface2; - ivis = edge.ivis; - inext = edge.inext; - return *this; - } - - void invert() { - int w; - SWAP(i1, i2); - } -}; - -// ---------------------------------------------------- Extended face --- -class ExtFace { - public: - int iedges[4]; // indices of original edges - HVPlane3D plane; // face plane - double rmin[3], rmax[3]; // bounding box - int iold; // head of the list of the original edges - int inew; // head of the list of the new edges - int iprev; // index of previous face - int inext; // index of next face - - public: - ExtFace(int iedge=0) : iold(iedge), inew(0), iprev(0), inext(0) - { - int i; - for (i=0; i<4; i++) { iedges[i] = 0; } - for (i=0; i<3; i++) { rmin[i] = 0.; rmax[i] = 0.; } - } - ~ExtFace() {} - - ExtFace(const ExtFace & face) : - plane(face.plane), iold(face.iold), inew(face.inew), - iprev(face.iprev), inext(face.inext) - { - int i; - for (i=0; i<4; i++) { iedges[i] = face.iedges[i]; } - for (i=0; i<3; i++) { rmin[i] = face.rmin[i]; rmax[i] = face.rmax[i]; } - } - - ExtFace & operator=(const ExtFace & face) { - int i; - for (i=0; i<4; i++) { iedges[i] = face.iedges[i]; } - plane = face.plane; - for (i=0; i<3; i++) { rmin[i] = face.rmin[i]; rmax[i] = face.rmax[i]; } - iold = face.iold; - inew = face.inew; - iprev = face.iprev; - inext = face.inext; - return *this; - } - - void invert(); -}; - -// ---------------------------------------------------- Global arrays --- -static std::vector<ExtNode> nodes; // vector of nodes -static std::vector<ExtEdge> edges; // vector of edges -static std::vector<ExtFace> faces; // vector of faces - -// ---------------------------------------------------- List of faces --- -class FaceList { - private: - int m_ihead; - int m_ilast; - - public: - FaceList() : m_ihead(0), m_ilast(0) {} - ~FaceList() {} - - void clean() { m_ihead = 0; m_ilast = 0; } - int front() { return m_ihead; } - - void push_back(int i) { - if (m_ilast == 0) { m_ihead = i; } else { faces[m_ilast].inext = i; } - faces[i].iprev = m_ilast; - faces[i].inext = 0; - m_ilast = i; - } - - void remove(int i) { - if (m_ihead == i) { - m_ihead = faces[i].inext; - }else{ - faces[faces[i].iprev].inext = faces[i].inext; - } - if (m_ilast == i) { - m_ilast = faces[i].iprev; - }else{ - faces[faces[i].inext].iprev = faces[i].iprev; - } - faces[i].iprev = 0; - faces[i].inext = 0; - } -}; - -// --------------------- Polyhedron with extended access to -// its members from the BooleanProcessor class --- -class ExtPolyhedron : public GeoPolyhedron { - friend class BooleanProcessor; - virtual GeoPolyhedron& operator = (const GeoPolyhedron& from) { - return GeoPolyhedron::operator = (from); - } -}; - -// ----------------------------------------- Boolean processor class --- -class BooleanProcessor { - private: - int m_processor_error; // is set in case of error - int m_operation; // 0 (union), 1 (intersection), 2 (subtraction) - int m_ifaces1, m_ifaces2; // lists of faces - int m_iout1, m_iout2; // lists of faces with status "out" - double m_rmin[3], m_rmax[3]; // intersection of bounding boxes - double m_del; // precision (tolerance) - - FaceList m_result_faces; // list of accepted faces - FaceList m_suitable_faces; // list of suitable faces - FaceList m_unsuitable_faces; // list of unsuitable faces - FaceList m_unknown_faces; // list of unknown faces - - std::vector<int> m_external_contours; // heads of external contours - std::vector<int> m_internal_contours; // heads of internal contours - - private: - void takePolyhedron(const GeoPolyhedron & p, double, double, double); - double findMinMax(); - void selectOutsideFaces(int & ifaces, int & iout); - int testFaceVsPlane(ExtEdge & edge); - void renumberNodes(int & i1, int & i2, int & i3, int & i4); - int testEdgeVsEdge(ExtEdge & edge1, ExtEdge & edge2); - void removeJunkNodes() { while(nodes.back().s != 0) nodes.pop_back(); } - void divideEdge(int & i1, int & i2); - void insertEdge(const ExtEdge & edge); - void caseII(ExtEdge & edge1, ExtEdge & edge2); - void caseIE(ExtEdge & edge1, ExtEdge & edge2); - void caseEE(ExtEdge & edge1, ExtEdge & edge2); - void testFaceVsFace(int iface1, int iface2); - void invertNewEdges(int iface); - void checkDoubleEdges(int iface); - void assembleFace(int what, int iface); - void assembleNewFaces(int what, int ihead); - void initiateLists(); - void assemblePolyhedra(); - void findABC(double x1, double y1, double x2, double y2, - double &a, double &b, double &c) const; - int checkDirection(double *x, double *y) const; - int checkIntersection(int ix, int iy, int i1, int i2) const; - void mergeContours(int ix, int iy, int kext, int kint); - int checkTriangle(int iedge1, int iedge2, int ix, int iy) const; - void triangulateContour(int ix, int iy, int ihead); - void modifyReference(int iface, int i1, int i2, int iref); - void triangulateFace(int iface); - GeoPolyhedron createPolyhedron(); - - public: - BooleanProcessor(): m_processor_error(0), m_operation(0), m_ifaces1(0), m_ifaces2(0), m_iout1(0), m_iout2(0), m_del(0.) - { - int i; - for (i=0; i<3; i++) { m_rmin[i] = 0.; m_rmax[i] = 0.; } - } - ~BooleanProcessor() {} - - GeoPolyhedron execute(int op, - const GeoPolyhedron &a, - const GeoPolyhedron &b); - - void draw(); - void draw_edge(int, int); - void draw_contour(int, int, int); - void draw_faces(int, int, int); -}; - -inline void ExtFace::invert() -/*********************************************************************** - * * - * Name: ExtFace::invert() Date: 28.02.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Invert face * - * * - ***********************************************************************/ -{ - int iEprev, iEcur, iEnext; - - iEprev = 0; iEcur = iold; - while (iEcur > 0) { - edges[iEcur].invert(); - iEnext = edges[iEcur].inext; - edges[iEcur].inext = iEprev; - iEprev = iEcur; - iEcur = iEnext; - } - if (iold > 0) iold = iEprev; - - iEprev = 0; iEcur = inew; - while (iEcur > 0) { - edges[iEcur].invert(); - iEnext = edges[iEcur].inext; - edges[iEcur].inext = iEprev; - iEprev = iEcur; - iEcur = iEnext; - } - if (inew > 0) inew = iEprev; - - plane = HVPlane3D(-plane.a(),-plane.b(),-plane.c(), -plane.d()); -} - -void BooleanProcessor::takePolyhedron(const GeoPolyhedron & p, - double dx, double dy, double dz) -/*********************************************************************** - * * - * Name: BooleanProcessor::takePolyhedron Date: 16.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Transfer Polyhedron to internal representation * - * * - ***********************************************************************/ -{ - int i, k, nnode, iNodes[5], iVis[4], iFaces[4]; - int dnode = nodes.size() - 1; - int dface = faces.size() - 1; - -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Warray-bounds" -#endif - - // S E T N O D E S - - // for (i=1; i <= p.GetNoVertices(); i++) { - // nodes.push_back(ExtNode(p.GetVertex(i))); - // } - - HVPoint3D ppp; - for (i=1; i <= p.GetNoVertices(); i++) { - ppp = p.GetVertex(i); - ppp+= HVPoint3D(dx,dy,dz); - nodes.push_back(ExtNode(ppp)); - } - - // S E T F A C E S - - for (int iface=1; iface <= p.GetNoFacets(); iface++) { - faces.push_back(ExtFace(edges.size())); - - // S E T F A C E N O D E S - - p.GetFacet(iface, nnode, iNodes, iVis, iFaces); - for (i=0; i<nnode; i++) { - if (iNodes[i] < 1 || iNodes[i] > p.GetNoVertices()) m_processor_error = 1; - if (iFaces[i] < 1 || iFaces[i] > p.GetNoFacets()) m_processor_error = 1; - iNodes[i] += dnode; - iFaces[i] += dface; - } - - // S E T E D G E S - - iNodes[nnode] = iNodes[0]; - faces.back().iedges[3] = 0; - for (i=0; i<nnode; i++) { - faces.back().iedges[i] = edges.size(); - edges.push_back(ExtEdge(iNodes[i], iNodes[i+1], - iface+dface, iFaces[i], iVis[i])); - edges.back().inext = edges.size(); - } - edges.back().inext = 0; - - // S E T F A C E M I N - M A X - - for (i=0; i<3; i++) { - faces.back().rmin[i] = nodes[iNodes[0]].v[i]; - faces.back().rmax[i] = nodes[iNodes[0]].v[i]; - } - for (i=1; i<nnode; i++) { - for (k=0; k<3; k++) { - if (faces.back().rmin[k] > nodes[iNodes[i]].v[k]) - faces.back().rmin[k] = nodes[iNodes[i]].v[k]; - if (faces.back().rmax[k] < nodes[iNodes[i]].v[k]) - faces.back().rmax[k] = nodes[iNodes[i]].v[k]; - } - } - - // S E T F A C E P L A N E - - HVNormal3D n = (nodes[iNodes[2]].v-nodes[iNodes[0]].v).cross - (nodes[iNodes[3]].v-nodes[iNodes[1]].v); - HVPoint3D point(0,0,0); - - for (i=0; i<nnode; i++) { point += nodes[iNodes[i]].v; } - point *= (1./nnode); - HVNormal3D nunit = n/n.mag(); - faces.back().plane = HVPlane3D(nunit, point); - - // S E T R E F E R E N C E T O T H E N E X T F A C E - - faces.back().inext = faces.size(); - } - faces.back().inext = 0; - -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif -} - -double BooleanProcessor::findMinMax() -/*********************************************************************** - * * - * Name: BooleanProcessor::findMinMax Date: 16.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Find min-max (bounding) boxes for polyhedra * - * * - ***********************************************************************/ -{ - if (m_ifaces1 == 0 || m_ifaces2 == 0) return 0; - - int i, iface; - double rmin1[3], rmax1[3]; - double rmin2[3], rmax2[3]; - - // F I N D B O U N D I N G B O X E S - - for (i=0; i<3; i++) { - rmin1[i] = faces[m_ifaces1].rmin[i]; - rmax1[i] = faces[m_ifaces1].rmax[i]; - rmin2[i] = faces[m_ifaces2].rmin[i]; - rmax2[i] = faces[m_ifaces2].rmax[i]; - } - - iface = faces[m_ifaces1].inext; - while(iface > 0) { - for (i=0; i<3; i++) { - if (rmin1[i] > faces[iface].rmin[i]) rmin1[i] = faces[iface].rmin[i]; - if (rmax1[i] < faces[iface].rmax[i]) rmax1[i] = faces[iface].rmax[i]; - } - iface = faces[iface].inext; - } - - iface = faces[m_ifaces2].inext; - while(iface > 0) { - for (i=0; i<3; i++) { - if (rmin2[i] > faces[iface].rmin[i]) rmin2[i] = faces[iface].rmin[i]; - if (rmax2[i] < faces[iface].rmax[i]) rmax2[i] = faces[iface].rmax[i]; - } - iface = faces[iface].inext; - } - - // F I N D I N T E R S E C T I O N O F B O U N D I N G B O X E S - - for (i=0; i<3; i++) { - m_rmin[i] = (rmin1[i] > rmin2[i]) ? rmin1[i] : rmin2[i]; - m_rmax[i] = (rmax1[i] < rmax2[i]) ? rmax1[i] : rmax2[i]; - } - - // F I N D T O L E R A N C E - - double del1 = 0; - double del2 = 0; - for (i=0; i<3; i++) { - if ((rmax1[i]-rmin1[i]) > del1) del1 = rmax1[i]-rmin1[i]; - if ((rmax2[i]-rmin2[i]) > del2) del2 = rmax2[i]-rmin2[i]; - } - return ((del1 < del2) ? del1 : del2) * (1./GRANULARITY); -} - -void BooleanProcessor::selectOutsideFaces(int & ifaces, int & iout) -/*********************************************************************** - * * - * Name: BooleanProcessor::selectOutsideFaces Date: 10.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Preselection of outside faces * - * * - ***********************************************************************/ -{ - int i, outflag, iface = ifaces, *prev; - HVPoint3D mmbox[8] = { HVPoint3D(m_rmin[0],m_rmin[1],m_rmin[2]), - HVPoint3D(m_rmax[0],m_rmin[1],m_rmin[2]), - HVPoint3D(m_rmin[0],m_rmax[1],m_rmin[2]), - HVPoint3D(m_rmax[0],m_rmax[1],m_rmin[2]), - HVPoint3D(m_rmin[0],m_rmin[1],m_rmax[2]), - HVPoint3D(m_rmax[0],m_rmin[1],m_rmax[2]), - HVPoint3D(m_rmin[0],m_rmax[1],m_rmax[2]), - HVPoint3D(m_rmax[0],m_rmax[1],m_rmax[2]) }; - prev = &ifaces; - while (iface > 0) { - - // B O U N D I N G B O X vs B O U N D I N G B O X - - outflag = 0; - for (i=0; i<3; i++) { - if (faces[iface].rmin[i] > m_rmax[i] + m_del) { outflag = 1; break; } - if (faces[iface].rmax[i] < m_rmin[i] - m_del) { outflag = 1; break; } - } - - // B O U N D I N G B O X vs P L A N E - - if (outflag == 0) { - int npos = 0, nneg = 0; - double d; - for (i=0; i<8; i++) { - - const HVVector3D & nm = faces[iface].plane.normal(); - double dz = fabs(faces[iface].plane.d()); - d = mmbox[i].dot(nm)-dz; - // d = faces[iface].plane.distance(mmbox[i]); - if (d > +m_del) npos++; - if (d < -m_del) nneg++; - } - if (npos == 8 || nneg == 8) outflag = 1; - } - - // U P D A T E L I S T S - - if (outflag == 1) { - *prev = faces[iface].inext; - faces[iface].inext = iout; - iout = iface; - }else{ - prev = &faces[iface].inext; - } - iface = *prev; - } -} - -int BooleanProcessor::testFaceVsPlane(ExtEdge & edge) -/*********************************************************************** - * * - * Name: BooleanProcessor::testFaceVsPlane Date: 19.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Find result of intersection of face by plane * - * * - ***********************************************************************/ -{ - int iface = edge.iface1; - HVPlane3D plane = faces[edge.iface2].plane; - int i, nnode, npos = 0, nneg = 0, nzer = 0; - double dd[5]; - - // F I N D D I S T A N C E S - - nnode = (faces[iface].iedges[3] == 0) ? 3 : 4; - for (i=0; i<nnode; i++) { - - - const HVVector3D & nm = plane.normal(); - double dz = fabs(plane.d()); - dd[i] = nodes[edges[faces[iface].iedges[i]].i1].v.dot(nm)-dz; - // dd[i] = plane.distance(nodes[edges[faces[iface].iedges[i]].i1].v); - - if (dd[i] > m_del) { - npos++; - }else if (dd[i] < -m_del) { - nneg++; - }else{ - nzer++; dd[i] = 0; - } - } - - // S O M E S I M P L E C A S E S ( N O I N T E R S E C T I O N ) - - if (npos == nnode || nneg == nnode) return OUT_OF_PLANE; - if (nzer == 1 && nneg == 0) return OUT_OF_PLANE; - if (nzer == 1 && npos == 0) return OUT_OF_PLANE; - if (nzer == nnode) return ON_PLANE; - if (nzer == 3) return NON_PLANAR_FACE; - - // F I N D I N T E R S E C T I O N - - int ie1(0), ie2(0), s1(0), s2(0), status, nint = 0; - enum { PLUS_MINUS, MINUS_PLUS, ZERO_ZERO, ZERO_PLUS, ZERO_MINUS }; - - dd[nnode] = dd[0]; - for (i=0; i<nnode; i++) { - if (dd[i] > 0) { - if (dd[i+1] >= 0) continue; - status = PLUS_MINUS; - }else if (dd[i] < 0) { - if (dd[i+1] <= 0) continue; - status = MINUS_PLUS; - }else{ - status = ZERO_ZERO; - if (dd[i+1] > 0) status = ZERO_PLUS; - if (dd[i+1] < 0) status = ZERO_MINUS; - } - switch (nint) { - case 0: - ie1 = i; s1 = status; nint++; break; - case 1: - ie2 = i; s2 = status; nint++; break; - default: - return NON_PLANAR_FACE; - } - } - if (nint != 2) return NON_PLANAR_FACE; - - // F O R M I N T E R S E C T I O N S E G M E N T - - if (s1 != ZERO_ZERO && s2 != ZERO_ZERO) { - if (s1 == s2) return NON_PLANAR_FACE; - int iedge, i1(0), i2(0), ii[2]; - double d1(0.), d2(0.), dd ; - ii[0] = ie1; ii[1] = ie2; - for (i=0; i<2; i++) { - iedge = faces[iface].iedges[ii[i]]; - while (iedge > 0) { - i1 = edges[iedge].i1; - i2 = edges[iedge].i2; - - - const HVVector3D & nm1 = plane.normal(); - double dz1 = fabs(plane.d()); - d1 = nodes[i1].v.dot(nm1)-dz1; - - const HVVector3D & nm2 = plane.normal(); - double dz2 = fabs(plane.d()); - d2 = nodes[i2].v.dot(nm2)-dz2; - - // d1 = plane.distance(nodes[i1].v); - // d2 = plane.distance(nodes[i2].v); - if (d1 > m_del) { - if (d2 < -m_del) { ii[i] = nodes.size(); break; } // +- - }else if (d1 < -m_del) { - if (d2 > m_del) { ii[i] = nodes.size(); break; } // -+ - }else{ - ii[i] = i1; break; // 0+ or 0- - } - iedge = edges[iedge].inext; - } - if (ii[i] == (int) nodes.size()) { - dd = d2-d1; d1 = d1/dd; d2 = d2/dd; - nodes.push_back(ExtNode(((float)d2)*nodes[i1].v-((float)d1)*nodes[i2].v, iedge)); - } - } - edge.inext = 0; - if (s1 == MINUS_PLUS || s1 == ZERO_PLUS) { - edge.i1 = ii[1]; - edge.i2 = ii[0]; - }else{ - edge.i1 = ii[0]; - edge.i2 = ii[1]; - } - return INTERSECTION; - }else{ - if (npos == nneg) return NON_PLANAR_FACE; - edge.inext = (s1 == ZERO_ZERO) ? ie1+1 : ie2+1; - if (s1 == ZERO_PLUS || s2 == ZERO_MINUS) { - edge.i1 = edges[faces[iface].iedges[ie2]].i1; - edge.i2 = edges[faces[iface].iedges[ie1]].i1; - }else{ - edge.i1 = edges[faces[iface].iedges[ie1]].i1; - edge.i2 = edges[faces[iface].iedges[ie2]].i1; - } - return EDGE; - } -} - -void BooleanProcessor::renumberNodes(int & i1, int & i2, int & i3, int & i4) -/*********************************************************************** - * * - * Name: BooleanProcessor::renumberNodes Date: 19.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Renumber nodes and remove last temporary node. * - * Remark: In principal this routine can be replaced just * - * with i1 = i2; * - * Removal of temporary nodes provides additional control * - * on number of nodes, that is very useful for debugging. * - * * - ***********************************************************************/ -{ - if (i1 == i2) return; - if (nodes[i1].s == 0 || nodes.back().s == 0) { i1 = i2; return; } - - int ilast = nodes.size()-1; - if (i1 == ilast) { i1 = i2; nodes.pop_back(); return; } - if (i2 == ilast) { i2 = i1; } - if (i3 == ilast) { i3 = i1; } - if (i4 == ilast) { i4 = i1; } - nodes[i1] = nodes.back(); i1 = i2; nodes.pop_back(); -} - -int BooleanProcessor::testEdgeVsEdge(ExtEdge & edge1, ExtEdge & edge2) -/*********************************************************************** - * * - * Name: BooleanProcessor::testEdgeVsEdge Date: 19.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Find common part of two edges * - * * - ***********************************************************************/ -{ - int i, ii = 0; - double d, dd = 0.; - - for (i=0; i<3; i++) { - d = nodes[edge1.i1].v[i]-nodes[edge1.i2].v[i]; - if (d < 0.) d = -d; - if (d > dd) { dd = d; ii = i; } - } - double t1 = nodes[edge1.i1].v[ii]; - double t2 = nodes[edge1.i2].v[ii]; - double t3 = nodes[edge2.i1].v[ii]; - double t4 = nodes[edge2.i2].v[ii]; - if (t2-t1 < 0.) { t1 = -t1; t2 = -t2; t3 = -t3; t4 = -t4; } - - if (t3 <= t1+m_del || t4 >= t2-m_del) return 0; - if (t3 > t2+m_del) { - renumberNodes(edge2.i1, edge1.i2, edge1.i1, edge2.i2); - }else if (t3 < t2-m_del) { - renumberNodes(edge1.i2, edge2.i1, edge1.i1, edge2.i2); - } - if (t4 < t1-m_del) { - renumberNodes(edge2.i2, edge1.i1, edge1.i2, edge2.i1); - }else if (t4 > t1+m_del) { - renumberNodes(edge1.i1, edge2.i2, edge1.i2, edge2.i1); - } - return 1; -} - -void BooleanProcessor::divideEdge(int & i1, int & i2) -/*********************************************************************** - * * - * Name: BooleanProcessor::divideEdge Date: 24.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Unify the nodes and divide edge on two parts by the node. * - * * - ***********************************************************************/ -{ - int iedges[2]; - iedges[0] = nodes[i1].s; - iedges[1] = nodes[i2].s; - - // U N I F Y N O D E S - - if (i1 < i2) { i2 = i1; } - else if (i1 > i2) { i1 = i2; } - else { iedges[1] = 0; } - if (iedges[0] == iedges[1]) return; - - int ie1, ie2, inode = i1; - nodes[inode].s = 0; - for (int i=0; i<2; i++) { - - // F I N D C O R R E S P O N D I N G E D G E - - if ((ie1 = iedges[i]) == 0) continue; - ie2 = faces[edges[ie1].iface2].iedges[0]; - while (ie2 > 0) { - if (edges[ie2].i1 == edges[ie1].i2 && - edges[ie2].i2 == edges[ie1].i1) break; - ie2 = edges[ie2].inext; - } - - // D I V I D E E D G E S - - edges.push_back(edges[ie1]); - edges[ie1].inext = edges.size() - 1; - edges[ie1].i2 = inode; - edges.back().i1 = inode; - - edges.push_back(edges[ie2]); - edges[ie2].inext = edges.size() - 1; - edges[ie2].i2 = inode; - edges.back().i1 = inode; - } -} - -void BooleanProcessor::insertEdge(const ExtEdge & edge) -/*********************************************************************** - * * - * Name: BooleanProcessor::insertEdge Date: 24.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Insert edge to the list of new edges * - * * - ***********************************************************************/ -{ - int iface = edge.iface1; - edges.push_back(edge); - edges.back().inext = faces[iface].inew; - faces[iface].inew = edges.size() - 1; -} - -void BooleanProcessor::caseII(ExtEdge & edge1, ExtEdge & edge2) -/*********************************************************************** - * * - * Name: BooleanProcessor::caseII Date: 19.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Intersection/Intersection case * - * * - ***********************************************************************/ -{ - divideEdge(edge1.i1, edge2.i2); - divideEdge(edge1.i2, edge2.i1); - edge1.ivis = 1; - edge2.ivis = 1; - insertEdge(edge1); - insertEdge(edge2); -} - -void BooleanProcessor::caseIE(ExtEdge &, ExtEdge &) -/*********************************************************************** - * * - * Name: BooleanProcessor::caseIE Date: 19.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Intersection/Edge-touch case * - * * - ***********************************************************************/ -{ - m_processor_error = 1; - std::cout - << "BooleanProcessor::caseIE : unimplemented case" - << std::endl; -} - -void BooleanProcessor::caseEE(ExtEdge & , ExtEdge & ) -/*********************************************************************** - * * - * Name: BooleanProcessor::caseEE Date: 19.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Edge-touch/Edge-touch case * - * * - ***********************************************************************/ -{ - m_processor_error = 1; - std::cout - << "BooleanProcessor::caseEE : unimplemented case" - << std::endl; -} - -void BooleanProcessor::testFaceVsFace(int iface1, int iface2) -/*********************************************************************** - * * - * Name: BooleanProcessor::testFaceVsFace Date: 11.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Find result (an edge) of intersection of two faces * - * * - ***********************************************************************/ -{ - ExtEdge edge1, edge2; - int irep1, irep2; - - // M I N - M A X - - for (int i=0; i<3; i++) { - if (faces[iface1].rmin[i] > faces[iface2].rmax[i] + m_del) return; - if (faces[iface1].rmax[i] < faces[iface2].rmin[i] - m_del) return; - } - - // F A C E - 1 vs P L A N E - 2 - - edge1.iface1 = iface1; - edge1.iface2 = iface2; - irep1 = testFaceVsPlane(edge1); - if (irep1 == OUT_OF_PLANE || irep1 == ON_PLANE) { - removeJunkNodes(); - return; - } - - // F A C E - 2 vs P L A N E - 1 - - edge2.iface1 = iface2; - edge2.iface2 = iface1; - irep2 = testFaceVsPlane(edge2); - if (irep2 == OUT_OF_PLANE || irep2 == ON_PLANE) { - removeJunkNodes(); - return; - } - - // C H E C K F O R N O N P L A N A R F A C E - - if (irep1 == NON_PLANAR_FACE || irep2 == NON_PLANAR_FACE) { - removeJunkNodes(); - return; - } - - // F I N D I N T E R S E C T I O N P A R T - - if (testEdgeVsEdge(edge1, edge2) == 0) return; - - // C O N S I D E R D I F F E R E N T C A S E S - - if (irep1 == INTERSECTION && irep2 == INTERSECTION) caseII(edge1, edge2); - if (irep1 == INTERSECTION && irep2 == EDGE) caseIE(edge1, edge2); - if (irep1 == EDGE && irep2 == INTERSECTION) caseIE(edge2, edge1); - if (irep1 == EDGE && irep2 == EDGE) caseEE(edge1, edge2); - removeJunkNodes(); - -} - -void BooleanProcessor::invertNewEdges(int iface) -/*********************************************************************** - * * - * Name: BooleanProcessor::invertNewEdges Date: 04.02.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Invert direction of new edges * - * * - ***********************************************************************/ -{ - int iedge = faces[iface].inew; - while (iedge > 0) { - edges[iedge].invert(); - iedge = edges[iedge].inext; - } -} - -void BooleanProcessor::checkDoubleEdges(int) -/*********************************************************************** - * * - * Name: BooleanProcessor::checkDoubleEdges Date: 04.02.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Eliminate duplication of edges * - * * - ***********************************************************************/ -{ - -} - -void BooleanProcessor::assembleFace(int what, int iface) -/*********************************************************************** - * * - * Name: BooleanProcessor::assembleFace Date: 19.02.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Assemble face * - * * - ***********************************************************************/ -{ - // A S S E M B L E N E W F A C E - - int ihead; // head of the list of edges for new face - int icur; // current edge in the list - last edge inserted to the list - int *ilink; // pointer to the current link - int ifirst; // first node of a contour - int *i; // pointer to the index of the current edge in a loop - int ioldflag=0; // is set if an edge from iold has been taken - -#define INSERT_EDGE_TO_THE_LIST(A) \ -*ilink = A; ilink = &edges[A].inext; *ilink = 0 - - ilink = &ihead; - for(;;) { - if (faces[iface].inew == 0) break; - - // S T A R T N E W C O N T O U R - - icur = faces[iface].inew; - faces[iface].inew = edges[icur].inext; - INSERT_EDGE_TO_THE_LIST(icur); - ifirst = edges[icur].i1; - - // C O N S T R U C T T H E C O N T O U R - - for (;;) { - i = &faces[iface].inew; - while(*i > 0) { - if (edges[*i].i1 == edges[icur].i2) break; - i = &edges[*i].inext; - } - if (*i == 0) { - i = &faces[iface].iold; - while(*i > 0) { - if (edges[*i].i1 == edges[icur].i2) ioldflag = 1; - if (edges[*i].i1 == edges[icur].i2) break; - i = &edges[*i].inext; - } - } - if (*i > 0) { - icur = *i; - *i = edges[icur].inext; - INSERT_EDGE_TO_THE_LIST(icur); - if (edges[icur].i2 == ifirst) { break; } else { continue; } - }else{ - m_processor_error = 1; - std::cerr - << "BooleanProcessor::assembleFace(" << iface << ") : " - << "could not find next edge of the contour" - << std::endl; - faces[iface].inew = DEFECTIVE_FACE; - return; - } - } - } - - // C H E C K O R I G I N A L C O N T O U R - - int iedge; - iedge = faces[iface].iold; - if (what == 0 && ioldflag == 0 && iedge > 0) { - for (;;) { - if (edges[iedge].inext > 0) { - if (edges[iedge].i2 == edges[edges[iedge].inext].i1) { - iedge = edges[iedge].inext; - }else{ - break; - } - }else{ - if (edges[iedge].i2 == edges[faces[iface].iold].i1) { - edges[iedge].inext = ihead; // set new face - return; - }else{ - break; - } - } - } - } - - // M A R K U N S U I T A B L E N E I G H B O U R I N G F A C E S - - int iface2; - iedge = faces[iface].iold; - while(iedge > 0) { - iface2 = edges[iedge].iface2; - if (faces[iface2].inew == 0) faces[iface2].inew = UNSUITABLE_FACE; - iedge = edges[iedge].inext; - } - faces[iface].iold = ihead; // set new face -} - -void BooleanProcessor::assembleNewFaces(int what, int ihead) -/*********************************************************************** - * * - * Name: BooleanProcessor::assembleNewFaces Date: 30.01.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Assemble internal or external parts of faces * - * * - ***********************************************************************/ -{ - int iface = ihead; - while(iface > 0) { - if (faces[iface].inew > 0) { - if (what != 0) invertNewEdges(iface); - checkDoubleEdges(iface); - assembleFace(what, iface); - faces[iface].inew = - (faces[iface].iold == 0) ? UNSUITABLE_FACE : NEW_FACE; - } - iface = faces[iface].inext; - } -} - -void BooleanProcessor::initiateLists() -/*********************************************************************** - * * - * Name: BooleanProcessor::initiateLists Date: 28.02.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Initiate lists of faces. * - * * - ***********************************************************************/ -{ - int i, iface; - - // R E S E T L I S T S O F F A C E S - - m_result_faces.clean(); - m_suitable_faces.clean(); - m_unsuitable_faces.clean(); - m_unknown_faces.clean(); - - // I N I T I A T E T H E L I S T S - - iface = m_iout1; - while (iface > 0) { - i = iface; - iface = faces[i].inext; - if (m_operation == OP_INTERSECTION) { - m_unsuitable_faces.push_back(i); - faces[i].inew = UNSUITABLE_FACE; - }else{ - m_suitable_faces.push_back(i); - faces[i].inew = ORIGINAL_FACE; - } - } - iface = m_iout2; - while (iface > 0) { - i = iface; - iface = faces[i].inext; - if (m_operation == OP_UNION) { - m_suitable_faces.push_back(i); - faces[i].inew = ORIGINAL_FACE; - }else{ - m_unsuitable_faces.push_back(i); - faces[i].inew = UNSUITABLE_FACE; - } - } - iface = m_ifaces1; - while (iface > 0) { - i = iface; - iface = faces[i].inext; - switch(faces[i].inew) { - case UNKNOWN_FACE: - m_unknown_faces.push_back(i); - break; - case ORIGINAL_FACE: case NEW_FACE: - m_suitable_faces.push_back(i); - break; - case UNSUITABLE_FACE: - m_unsuitable_faces.push_back(i); - break; - default: - faces[i].iprev = 0; - faces[i].inext = 0; - break; - } - } - iface = m_ifaces2; - while (iface > 0) { - i = iface; - iface = faces[i].inext; - if (m_operation == OP_SUBTRACTION) faces[i].invert(); - switch(faces[i].inew) { - case UNKNOWN_FACE: - m_unknown_faces.push_back(i); - break; - case ORIGINAL_FACE: case NEW_FACE: - m_suitable_faces.push_back(i); - break; - case UNSUITABLE_FACE: - m_unsuitable_faces.push_back(i); - break; - default: - faces[i].iprev = 0; - faces[i].inext = 0; - break; - } - } - m_ifaces1 = m_ifaces2 = m_iout1 = m_iout2 = 0; -} - -void BooleanProcessor::assemblePolyhedra() -/*********************************************************************** - * * - * Name: BooleanProcessor::assemblePolyhedra() Date: 10.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Collect suitable faces and remove unsuitable ones. * - * * - ***********************************************************************/ -{ - int i, iedge, iface; - - // L O O P A L O N G S U I T A B L E F A C E S - - iface = m_suitable_faces.front(); - while(iface > 0) { - i = iface; - iedge = faces[i].iold; - while(iedge > 0) { - iface = edges[iedge].iface2; - if (faces[iface].inew == UNKNOWN_FACE) { - m_unknown_faces.remove(iface); - m_suitable_faces.push_back(iface); - faces[iface].inew = ORIGINAL_FACE; - } - iedge = edges[iedge].inext; - } - iface = faces[i].inext; - m_suitable_faces.remove(i); - m_result_faces.push_back(i); - } - if (m_unknown_faces.front() == 0) return; - - // L O O P A L O N G U N S U I T A B L E F A C E S - - iface = m_unsuitable_faces.front(); - while(iface > 0) { - i = iface; - iedge = faces[i].iold; - while(iedge > 0) { - iface = edges[iedge].iface2; - if (faces[iface].inew == UNKNOWN_FACE) { - m_unknown_faces.remove(iface); - m_unsuitable_faces.push_back(iface); - faces[iface].inew = UNSUITABLE_FACE; - } - iedge = edges[iedge].inext; - } - iface = faces[i].inext; - m_unsuitable_faces.remove(i); - } - - /* From S.Ponce - At last, there is a problem in the assemblePolyhedra method. At least, I - think it is there. The problem deals with boolean operations on solids, - when one of the two contains entirely the other one. It has no sense for - intersection and union but still has sense for subtraction. In this - case, faces from the inner solid are stored in the m_unknown_faces - FaceList. And an error occurs in the execute method. This may be correct - for intersection and union but in the case of subtraction, one should do - that in assemblePolyhedra : - */ - // Unknown faces are actually suitable face !!! - iface = m_unknown_faces.front(); - while(iface > 0) { - i = iface; - faces[i].inew = ORIGINAL_FACE; - iface = faces[i].inext; - m_unknown_faces.remove(i); - m_result_faces.push_back(i); - } - /* - Otherwise, the inner hole that the second solid was building in the - first one does not exist. I'm not very clear on what to do for unions - and intersections. I think this kind of situation should be detected and - one of the solid should simply be ignored. - */ - -} - -inline void -BooleanProcessor::findABC(double x1, double y1, double x2, double y2, - double &a, double &b, double &c) const -/*********************************************************************** - * * - * Name: BooleanProcessor::findABC Date: 07.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Find line equation Ax+By+C=0 * - * * - ***********************************************************************/ -{ - a = y1 - y2; - b = x2 - x1; - double inv_w = 1 / (fabs(a)+fabs(b)); - a *= inv_w; - b *= inv_w; - c = -(a*x2 + b*y2); -} - -int BooleanProcessor::checkDirection(double *x, double *y) const -/*********************************************************************** - * * - * Name: BooleanProcessor::checkDirection Date: 06.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Check direction of line 1-4 * - * * - ***********************************************************************/ -{ - double a1, b1, c1, a2, b2, c2, d1, d2; - - // T E S T L I N E 1 - 4 V S E X T E R N A L C O N T O U R - - findABC(x[0], y[0], x[1], y[1], a1, b1, c1); - findABC(x[1], y[1], x[2], y[2], a2, b2, c2); - d1 = a1*x[4] + b1*y[4] + c1; - d2 = a2*x[4] + b2*y[4] + c2; - if (d1 <= m_del && d2 <= m_del) return 1; - if (! (d1 > m_del && d2 > m_del)) { - if ( a1*x[2] + b1*y[2] + c1 >= -m_del) return 1; - } - - // T E S T L I N E 1 - 4 V S I N T E R N A L C O N T O U R - - findABC(x[3], y[3], x[4], y[4], a1, b1, c1); - findABC(x[4], y[4], x[5], y[5], a2, b2, c2); - d1 = a1*x[1] + b1*y[1] + c1; - d2 = a2*x[1] + b2*y[1] + c2; - if (d1 <= m_del && d2 <= m_del) return 1; - if (!(d1 > m_del && d2 > m_del)) { - if ( a1*x[5] + b1*y[5] + c1 >= -m_del) return 1; - } - return 0; -} - -int BooleanProcessor::checkIntersection(int ix, int iy, int i1, int i2) const -/*********************************************************************** - * * - * Name: BooleanProcessor::checkDirection Date: 06.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Check line i1-i2 on intersection with contours * - * * - ***********************************************************************/ -{ - // F I N D L I N E E Q U A T I O N - - double x1, y1, x2, y2, a1, b1, c1; - x1 = nodes[i1].v[ix]; - y1 = nodes[i1].v[iy]; - x2 = nodes[i2].v[ix]; - y2 = nodes[i2].v[iy]; - findABC(x1, y1, x2, y2, a1, b1, c1); - - // L O O P A L O N G E X T E R N A L C O N T O U R S - - int icontour, iedge, k1, k2; - double x3, y3, x4, y4, a2, b2, c2, d1, d2; - for(icontour=0; icontour<(int) m_external_contours.size(); icontour++) { - iedge = m_external_contours[icontour]; - while(iedge > 0) { - k1 = edges[iedge].i1; - k2 = edges[iedge].i2; - iedge = edges[iedge].inext; - if (k1 == i1 || k2 == i1) continue; - if (k1 == i2 || k2 == i2) continue; - x3 = nodes[k1].v[ix]; - y3 = nodes[k1].v[iy]; - x4 = nodes[k2].v[ix]; - y4 = nodes[k2].v[iy]; - d1 = a1*x3 + b1*y3 + c1; - d2 = a1*x4 + b1*y4 + c1; - if (d1 > m_del && d2 > m_del) continue; - if (d1 < -m_del && d2 < -m_del) continue; - - findABC(x3, y3, x4, y4, a2, b2, c2); - d1 = a2*x1 + b2*y1 + c2; - d2 = a2*x2 + b2*y2 + c2; - if (d1 > m_del && d2 > m_del) continue; - if (d1 < -m_del && d2 < -m_del) continue; - return 1; - } - } - - // L O O P A L O N G E X T E R N A L C O N T O U R S - - for(icontour=0; icontour<(int) m_internal_contours.size(); icontour++) { - iedge = m_internal_contours[icontour]; - while(iedge > 0) { - k1 = edges[iedge].i1; - k2 = edges[iedge].i2; - iedge = edges[iedge].inext; - if (k1 == i1 || k2 == i1) continue; - if (k1 == i2 || k2 == i2) continue; - x3 = nodes[k1].v[ix]; - y3 = nodes[k1].v[iy]; - x4 = nodes[k2].v[ix]; - y4 = nodes[k2].v[iy]; - d1 = a1*x3 + b1*y3 + c1; - d2 = a1*x4 + b1*y4 + c1; - if (d1 > m_del && d2 > m_del) continue; - if (d1 < -m_del && d2 < -m_del) continue; - - findABC(x3, y3, x4, y4, a2, b2, c2); - d1 = a2*x1 + b2*y1 + c2; - d2 = a2*x2 + b2*y2 + c2; - if (d1 > m_del && d2 > m_del) continue; - if (d1 < -m_del && d2 < -m_del) continue; - return 1; - } - } - return 0; -} - -void BooleanProcessor::mergeContours(int ix, int iy, int kext, int kint) -/*********************************************************************** - * * - * Name: BooleanProcessor::mergeContours Date: 06.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Attemp to merge internal contour with external one * - * * - ***********************************************************************/ -{ - int i1ext, i2ext, i1int, i2int, i, k[6]; - double x[6], y[6]; - - // L O O P A L O N G E X T E R N A L C O N T O U R - - i1ext = m_external_contours[kext]; - while (i1ext > 0) { - i2ext = edges[i1ext].inext; - if (i2ext == 0) i2ext = m_external_contours[kext]; - k[0] = edges[i1ext].i1; - k[1] = edges[i1ext].i2; - k[2] = edges[i2ext].i2; - for (i=0; i<3; i++) { - x[i] = nodes[k[i]].v[ix]; - y[i] = nodes[k[i]].v[iy]; - } - - // L O O P A L O N G I N T E R N A L C O N T O U R - - i1int = m_internal_contours[kint]; - while (i1int > 0) { - i2int = edges[i1int].inext; - if (i2int == 0) i2int = m_internal_contours[kint]; - k[3] = edges[i1int].i1; - k[4] = edges[i1int].i2; - k[5] = edges[i2int].i2; - for (i=3; i<6; i++) { - x[i] = nodes[k[i]].v[ix]; - y[i] = nodes[k[i]].v[iy]; - } - - // T E S T L I N E K1 - K4 - // I F O K T H E N M E R G E C O N T O U R S - - if (checkDirection(x, y) == 0) { - if (checkIntersection(ix, iy, k[1], k[4]) == 0) { - i = i1int; - for(;;) { - if (edges[i].inext == 0) { - edges[i].inext = m_internal_contours[kint]; - m_internal_contours[kint] = 0; - break; - }else{ - i = edges[i].inext; - } - } - i = edges[i1int].iface1; - edges.push_back(ExtEdge(k[1], k[4], i, -(edges.size()+1), -1)); - edges.back().inext = i2int; - edges.push_back(ExtEdge(k[4], k[1], i, -(edges.size()-1), -1)); - edges.back().inext = edges[i1ext].inext; - edges[i1ext].inext = edges.size()-2; - edges[i1int].inext = edges.size()-1; - return; - } - } - i1int = edges[i1int].inext; - } - i1ext = edges[i1ext].inext; - } -} - -int -BooleanProcessor::checkTriangle(int iedge1, int iedge2, int ix, int iy) const -/*********************************************************************** - * * - * Name: BooleanProcessor::checkTriangle Date: 08.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Check triangle for correctness * - * * - ***********************************************************************/ -{ - int k[3]; - double x[3], y[3]; - double a1, b1, c1; - - k[0] = edges[iedge1].i1; - k[1] = edges[iedge1].i2; - k[2] = edges[iedge2].i2; - for (int i=0; i<3; i++) { - x[i] = nodes[k[i]].v[ix]; - y[i] = nodes[k[i]].v[iy]; - } - - // C H E C K P R I N C I P A L C O R R E C T N E S S - - findABC(x[2], y[2], x[0], y[0], a1, b1, c1); - if (a1*x[1]+b1*y[1]+c1 <= 0.1*m_del) return 1; - - // C H E C K T H A T T H E R E I S N O P O I N T S I N S I D E - - int inode, iedge; - double a2, b2, c2, a3, b3, c3; - - findABC(x[0], y[0], x[1], y[1], a2, b2, c2); - findABC(x[1], y[1], x[2], y[2], a3, b3, c3); - iedge = iedge2; - for (;;) { - iedge = edges[iedge].inext; - if (edges[iedge].inext == iedge1) return 0; - inode = edges[iedge].i2; - if (inode == k[0]) continue; - if (inode == k[1]) continue; - if (inode == k[2]) continue; - x[1] = nodes[inode].v[ix]; - y[1] = nodes[inode].v[iy]; - if (a1*x[1]+b1*y[1]+c1 < -0.1*m_del) continue; - if (a2*x[1]+b2*y[1]+c2 < -0.1*m_del) continue; - if (a3*x[1]+b3*y[1]+c3 < -0.1*m_del) continue; - return 1; - } -} - -void BooleanProcessor::triangulateContour(int ix, int iy, int ihead) -/*********************************************************************** - * * - * Name: BooleanProcessor::triangulateContour Date: 06.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Triangulate external contour * - * * - ***********************************************************************/ -{ - - //std::cout << "Next Countour" << std::endl; - //int draw_flag = 0; - //if (draw_flag) draw_contour(5, 3, ihead); - - // C L O S E C O N T O U R - //GB : we do not want to use the pnext logic, the - //GB : below push_backs in edge list reshuffle - //GB : the addresses (crash on WIN32). - /*GB - int *pnext, nnode = 0; - pnext = &ihead; - for (;;) { - if (*pnext > 0) { - pnext = &edges[*pnext].inext; - nnode++; - }else{ - *pnext = ihead; - break; - } - } - GB*/ - int nnode = 1; - int ipnext = ihead; - for (;;) { - if (edges[ipnext].inext > 0) { - ipnext = edges[ipnext].inext; - nnode++; - }else{ - edges[ipnext].inext = ihead; - break; - } - } - - // L O O P A L O N G C O N T O U R - int iedge1, iedge2, iedge3, istart = 0; - for (;;) { - //GB iedge1 = *pnext; - iedge1 = edges[ipnext].inext; - iedge2 = edges[iedge1].inext; - if (istart == 0) { - istart = iedge1; - if (nnode <= 3) { - iedge3 = edges[iedge2].inext; - edges[iedge1].iface1 = faces.size(); - edges[iedge2].iface1 = faces.size(); - edges[iedge3].iface1 = faces.size(); - edges[iedge3].inext = 0; - faces.push_back(ExtFace()); - faces.back().iold = iedge1; - faces.back().inew = ORIGINAL_FACE; - - //if (draw_flag) draw_contour(4, 2, iedge1); - - break; - } - }else if (istart == iedge1) { - m_processor_error = 1; - std::cerr - << "BooleanProcessor::triangulateContour : " - << "could not generate a triangle (infinite loop)" - << std::endl; - break; - } - - // C H E C K C O R E C T N E S S O F T H E T R I A N G L E - - if (checkTriangle(iedge1,iedge2,ix,iy) != 0) { - //GB pnext = &edges[*pnext].inext; - ipnext = edges[ipnext].inext; //GB - continue; - } - - // M O D I F Y C O N T O U R - - int i1 = edges[iedge1].i1; - int i3 = edges[iedge2].i2; - int iface1 = edges[iedge1].iface1; - int iface2 = faces.size(); - - //GB *pnext = edges.size(); - edges[ipnext].inext = edges.size(); //GB - edges.push_back(ExtEdge(i1, i3, iface1, -(edges.size()+1), -1)); - edges.back().inext = edges[iedge2].inext; - - // A D D N E W T R I A N G L E T O T H E L I S T - - edges[iedge2].inext = edges.size(); - edges.push_back(ExtEdge(i3, i1, iface2, -(edges.size()-1), -1)); - faces.push_back(ExtFace()); - faces.back().iold = iedge1; - faces.back().inew = ORIGINAL_FACE; - edges[iedge1].iface1 = iface2; - edges[iedge2].iface1 = iface2; - //GB pnext = &edges[*pnext].inext; - ipnext = edges[ipnext].inext; //GB - istart = 0; - nnode--; - - //if (draw_flag) draw_contour(4, 2, iedge1); - - } -} - -void BooleanProcessor::modifyReference(int iface, int i1, int i2, int iref) -/*********************************************************************** - * * - * Name: BooleanProcessor::modifyReference Date: 13.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Modify reference to the neighbouring face * - * * - ***********************************************************************/ -{ - int iedge = faces[iface].iold; - while (iedge > 0) { - if (edges[iedge].i1 == i2 && edges[iedge].i2 == i1) { - edges[iedge].iface2 = iref; - return; - } - iedge = edges[iedge].inext; - } - m_processor_error = 1; - std::cerr - << "BooleanProcessor::modifyReference : could not find the edge, " - << "iface=" << iface << ", i1,i2=" << i1 << "," << i2 << ", iref=" << iref - << std::endl; -} - -void BooleanProcessor::triangulateFace(int iface) -/*********************************************************************** - * * - * Name: BooleanProcessor::triangulateFace Date: 02.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Triangulation of an extended face * - * * - ***********************************************************************/ -{ - - // F I N D M A X C O M P O N E N T O F T H E N O R M A L - // S E T IX, IY, IZ - - HVNormal3D normal = faces[iface].plane.normal(); - int ix, iy, iz = 0; - if (ffabs(normal[1]) > ffabs(normal[iz])) iz = 1; - if (ffabs(normal[2]) > ffabs(normal[iz])) iz = 2; - if (normal[iz] > 0) { - ix = (iz+1)%3; iy = (ix+1)%3; - }else{ - iy = (iz+1)%3; ix = (iy+1)%3; - } - - // F I L L L I S T S O F C O N T O U R S - - m_external_contours.clear(); - m_internal_contours.clear(); - double z; - int i1, i2, ifirst, iedge, icontour = faces[iface].iold; - while (icontour > 0) { - iedge = icontour; - ifirst = edges[iedge].i1; - z = 0.0; - for(;;) { - if (iedge > 0) { - i1 = edges[iedge].i1; - i2 = edges[iedge].i2; - z += nodes[i1].v[ix]*nodes[i2].v[iy]-nodes[i2].v[ix]*nodes[i1].v[iy]; - if (ifirst != i2) { - iedge = edges[iedge].inext; - continue; - }else{ - if (z > m_del*m_del) { - m_external_contours.push_back(icontour); - }else if (z < -m_del*m_del) { - m_internal_contours.push_back(icontour); - }else{ - m_processor_error = 1; - std::cerr - << "BooleanProcessor::triangulateFace : too small contour" - << std::endl; - } - icontour = edges[iedge].inext; - edges[iedge].inext = 0; - break; - } - }else{ - m_processor_error = 1; - std::cerr - << "BooleanProcessor::triangulateFace : broken contour" - << std::endl; - icontour = 0; - break; - } - } - } - - // G E T R I D O F I N T E R N A L C O N T O U R S - - int kint, kext; - for (kint=0; kint < (int) m_internal_contours.size(); kint++) { - for (kext=0; kext < (int) m_external_contours.size(); kext++) { - mergeContours(ix, iy, kext, kint); - if (m_internal_contours[kint] == 0) break; - } - if (kext == (int) m_external_contours.size()) { - m_processor_error = 1; - std::cerr - << "BooleanProcessor::triangulateFace : " - << "could not merge internal contour " << kint - << std::endl; - } - } - - // T R I A N G U L A T E C O N T O U R S - - int nface = faces.size(); - for (kext=0; kext < (int) m_external_contours.size(); kext++) { - triangulateContour(ix, iy, m_external_contours[kext]); - } - faces[iface].inew = UNSUITABLE_FACE; - - // M O D I F Y R E F E R E N C E S - - for (iface=nface; iface<(int) faces.size(); iface++) { - iedge = faces[iface].iold; - while (iedge > 0) { - if (edges[iedge].iface1 != iface) { - m_processor_error = 1; - std::cerr - << "BooleanProcessor::triangulateFace : wrong reference to itself, " - << "iface=" << iface << ", iface1=" << edges[iedge].iface1 - << std::endl; - }else if (edges[iedge].iface2 > 0) { - modifyReference(edges[iedge].iface2, - edges[iedge].i1, edges[iedge].i2, iface); - }else if (edges[iedge].iface2 < 0) { - edges[iedge].iface2 = edges[-edges[iedge].iface2].iface1; - } - iedge = edges[iedge].inext; - } - } -} - -GeoPolyhedron BooleanProcessor::createPolyhedron() -/*********************************************************************** - * * - * Name: BooleanProcessor::createPolyhedron() Date: 14.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Create GeoPolyhedron. * - * * - ***********************************************************************/ -{ - unsigned int i, iedge, nnode = 0, nface = 0; - - // R E N U M E R A T E N O D E S A N D F A C E S - - for (i=1; i<nodes.size(); i++) nodes[i].s = 0; - - for (i=1; i<faces.size(); i++) { - if (faces[i].inew == ORIGINAL_FACE) { - faces[i].inew = ++nface; - iedge = faces[i].iold; - while (iedge > 0) { - nodes[edges[iedge].i1].s = 1; - iedge = edges[iedge].inext; - } - }else{ - faces[i].inew = 0; - } - } - - for (i=1; i<nodes.size(); i++) { - if (nodes[i].s == 1) nodes[i].s = ++nnode; - } - - // A L L O C A T E M E M O R Y - - ExtPolyhedron polyhedron; - if (nface == 0) return polyhedron; - polyhedron.AllocateMemory(nnode, nface); - - // S E T N O D E S - - for (i=1; i<nodes.size(); i++) { - if (nodes[i].s != 0) polyhedron.m_pV[nodes[i].s] = nodes[i].v; - } - - // S E T F A C E S - - int k, v[4], f[4]; - for (i=1; i<faces.size(); i++) { - if (faces[i].inew == 0) continue; - v[3] = f[3] = k = 0; - v[2] = f[2] = 0; - v[1] = f[1] = 0; - v[0] = f[0] = 0; - iedge = faces[i].iold; - while (iedge > 0) { - if (k > 3) { - std::cerr - << "BooleanProcessor::createPolyhedron : too many edges" - << std::endl; - break; - } - v[k] = nodes[edges[iedge].i1].s; - if (edges[iedge].ivis < 0) v[k] = -v[k]; - f[k] = faces[edges[iedge].iface2].inew; - iedge = edges[iedge].inext; - k++; - } - if (k < 3) { - std::cerr - << "BooleanProcessor::createPolyhedron : " - << "face has only " << k << " edges" - << std::endl; - } - polyhedron.m_pF[faces[i].inew] = - GeoFacet(v[0],f[0], v[1],f[1], v[2],f[2], v[3],f[3]); - } - return polyhedron; -} - -GeoPolyhedron BooleanProcessor::execute(int op, - const GeoPolyhedron & a, - const GeoPolyhedron & b) -/*********************************************************************** - * * - * Name: BooleanProcessor::execute Date: 10.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Execute boolean operation. * - * * - ***********************************************************************/ -{ - static int ishift = 0; - static double shift[8][3] = { - { 31, 23, 17}, - { -31, -23, -17}, - { -23, 17, 31}, - { 23, -17, -31}, - { -17, -31, 23}, - { 17, 31, -23}, - { 31, -23, 17}, - { -31, 23, -17} - }; - - // I N I T I A T E P R O C E S S O R - - m_processor_error = 0; - m_operation = op; - nodes.clear(); nodes.push_back(CRAZY_POINT); - edges.clear(); edges.push_back(ExtEdge()); - faces.clear(); faces.push_back(ExtFace()); - - // T A K E P O L Y H E D R A - - m_ifaces1 = faces.size(); takePolyhedron(a,0,0,0); - m_ifaces2 = faces.size(); takePolyhedron(b,0,0,0); - - if (m_processor_error) { // corrapted polyhedron - std::cerr - << "BooleanProcessor: corrapted input polyhedron" - << std::endl; - return GeoPolyhedron(); - } - if (m_ifaces1 == m_ifaces2) { // a is empty - switch (m_operation) { - case OP_UNION: - return b; - case OP_INTERSECTION: - std::cerr - << "BooleanProcessor: intersection with empty polyhedron" - << std::endl; - return GeoPolyhedron(); - case OP_SUBTRACTION: - std::cerr - << "BooleanProcessor: subtraction from empty polyhedron" - << std::endl; - return GeoPolyhedron(); - } - } - if (m_ifaces2 == (int) faces.size()) { // b is empty - switch (m_operation) { - case OP_UNION: - return a; - case OP_INTERSECTION: - std::cerr - << "BooleanProcessor: intersection with empty polyhedron" - << std::endl; - return GeoPolyhedron(); - case OP_SUBTRACTION: - return a; - } - } - - // S E T I N I T I A L M I N - M A X A N D T O L E R A N C E - - m_del = findMinMax(); - - // W O R K A R O U N D T O A V O I D I E A N D E E - - double ddxx = m_del*shift[ishift][0]; - double ddyy = m_del*shift[ishift][1]; - double ddzz = m_del*shift[ishift][2]; - ishift++; if (ishift == 8) ishift = 0; - - m_operation = op; - nodes.clear(); nodes.push_back(CRAZY_POINT); - edges.clear(); edges.push_back(ExtEdge()); - faces.clear(); faces.push_back(ExtFace()); - - m_ifaces1 = faces.size(); takePolyhedron(a,0,0,0); - m_ifaces2 = faces.size(); takePolyhedron(b,ddxx,ddyy,ddzz); - - m_del = findMinMax(); - - // P R E S E L E C T O U T S I D E F A C E S - - //G.Barrand : from LHCb/S.Ponce ; do not start again : - int ifa1, ifa2; - m_iout1 = m_iout2 = 0; - //G.Barrand for(;;) { - //G.Barrand ifa1 = m_iout1; - //G.Barrand ifa2 = m_iout2; - selectOutsideFaces(m_ifaces1, m_iout1); - selectOutsideFaces(m_ifaces2, m_iout2); - //if (m_iout1 == ifa1 && m_iout2 == ifa2) break; - findMinMax(); - //G.Barrand } - -#define PROCESSOR_ERROR \ -std::cerr << "BooleanProcessor: boolean operation failed" << std::endl;\ -return a; - - // F I N D N E W E D G E S - - if (m_ifaces1 != 0 && m_ifaces2 != 0 ) { - ifa1 = m_ifaces1; - while (ifa1 > 0) { - ifa2 = m_ifaces2; - while (ifa2 > 0) { - testFaceVsFace(ifa1, ifa2); - ifa2 = faces[ifa2].inext; - } - ifa1 = faces[ifa1].inext; - } - } - if (m_processor_error) { PROCESSOR_ERROR } - - // C O N S T R U C T N E W F A C E S - - assembleNewFaces((m_operation == OP_INTERSECTION) ? 1 : 0, m_ifaces1); - if (m_processor_error) { PROCESSOR_ERROR } - assembleNewFaces((m_operation == OP_UNION) ? 0 : 1, m_ifaces2); - if (m_processor_error) { PROCESSOR_ERROR } - - // A S S E M B L E S U I T A B L E F A C E S - - initiateLists(); - assemblePolyhedra(); - if (m_unknown_faces.front() != 0) { - m_processor_error = 1; - std::cerr - << "BooleanProcessor::execute : unknown faces !!!" - << std::endl; - } - if (m_processor_error) { PROCESSOR_ERROR } - - // T R I A N G U L A T E A C C E P T E D F A C E S - - ifa1 = m_result_faces.front(); - while (ifa1 > 0) { - ifa2 = ifa1; - ifa1 = faces[ifa2].inext; - if (faces[ifa2].inew == NEW_FACE) triangulateFace(ifa2); - if (m_processor_error) { PROCESSOR_ERROR } - } - - // C R E A T E P O L Y H E D R O N - - return createPolyhedron(); -} - - -//#include <cfortran.h> -//#include <higz.h> -//#include "zbuf.h" -//void BooleanProcessor::draw() -/*********************************************************************** - * * - * Name: BooleanProcessor::draw Date: 10.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Draw * - * * - ***********************************************************************/ -/* -{ - int II; - int icol, i1, i2, iedge, iface, ilist[4]; - float p1[3], p2[3]; - - ilist[0] = m_ifaces1; - ilist[1] = m_ifaces2; - ilist[2] = m_iout1; - ilist[3] = m_iout2; - - for (int i=0; i<4; i++) { - - if (i == 0) cout << "========= Ifaces_1" << endl; - if (i == 1) cout << "========= Ifaces_2" << endl; - if (i == 2) cout << "========= Iout_1" << endl; - if (i == 3) cout << "========= Iout_2" << endl; - - icol = i+1; - iface = ilist[i]; - while (iface > 0) { - - cout << "iface = " << iface << endl; - cout << "--- iold" << endl; - - iedge = faces[iface].iold; - icol = 2; - - while (iedge > 0) { - - cout << " iegde = " << iedge - << " i1,i2 =" << edges[iedge].i1 << "," << edges[iedge].i2 - << " iface1,iface2 = " - << edges[iedge].iface1 << "," << edges[iedge].iface2 - << endl; - - i1 = edges[iedge].i1; - p1[0] = nodes[i1].v[0]; - p1[1] = nodes[i1].v[1]; - p1[2] = nodes[i1].v[2]; - IHWTON(p1,p1); - i2 = edges[iedge].i2; - p2[0] = nodes[i2].v[0]; - p2[1] = nodes[i2].v[1]; - p2[2] = nodes[i2].v[2]; - IHWTON(p2,p2); -// icol = (edges[iedge].ivis > 0) ? 1 : 2; - IHZLIN(icol,p1[0],p1[1],p1[2], p2[0],p2[1],p2[2]); - iedge = edges[iedge].inext; - } - - cout << "--- inew" << endl; - - iedge = faces[iface].inew; - icol = 3; - - while (iedge > 0) { - - cout << " iegde = " << iedge - << " i1,i2 =" << edges[iedge].i1 << "," << edges[iedge].i2 - << " iface1,iface2 = " - << edges[iedge].iface1 << "," << edges[iedge].iface2 - << endl; - - i1 = edges[iedge].i1; - p1[0] = nodes[i1].v[0]; - p1[1] = nodes[i1].v[1]; - p1[2] = nodes[i1].v[2]; - IHWTON(p1,p1); - i2 = edges[iedge].i2; - p2[0] = nodes[i2].v[0]; - p2[1] = nodes[i2].v[1]; - p2[2] = nodes[i2].v[2]; - IHWTON(p2,p2); -// icol = (edges[iedge].ivis > 0) ? 1 : 2; - IHZLIN(icol,p1[0],p1[1],p1[2], p2[0],p2[1],p2[2]); - iedge = edges[iedge].inext; - } - iface = faces[iface].inext; - - IHZTOX(0,100,100); - ixupdwi(0); - cin >> II; - ixclrwi(); - IHZCLE(0); - - - } - } -} -*/ - -/* -//-------------------------------------------------------------------- -void -BooleanProcessor::draw_edge(int icol, int iedge) { - int i1, i2; - float p1[3], p2[3]; - - i1 = edges[iedge].i1; - p1[0] = nodes[i1].v[0]; - p1[1] = nodes[i1].v[1]; - p1[2] = nodes[i1].v[2]; - IHWTON(p1,p1); - i2 = edges[iedge].i2; - p2[0] = nodes[i2].v[0]; - p2[1] = nodes[i2].v[1]; - p2[2] = nodes[i2].v[2]; - IHWTON(p2,p2); - IHZLIN(icol,p1[0],p1[1],p1[2], p2[0],p2[1],p2[2]); -} - -//-------------------------------------------------------------------- -void -BooleanProcessor::draw_contour(int i1col, int i2col, int ihead) { - int iedge, icol; - iedge = ihead; - while (iedge > 0) { - icol = (edges[iedge].ivis > 0) ? i1col : i2col; - draw_edge(icol, iedge); - iedge = edges[iedge].inext; - } - - IHZTOX(0,100,100); - ixupdwi(0); - - int i; - std::cin >> i; -} -*/ diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/CellBinning.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/CellBinning.cxx deleted file mode 100755 index b146f30ddc6..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/CellBinning.cxx +++ /dev/null @@ -1,11 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/CellBinning.h" - -CellBinning::CellBinning (double startVal, double endVal, unsigned int nBins, unsigned int firstDivisionNumber) - :m_start(startVal),m_end(endVal),m_numDivisions(nBins),m_delta((endVal-startVal)/m_numDivisions),m_firstDivisionNumber(firstDivisionNumber) -{ -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/CellPartitioning.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/CellPartitioning.cxx deleted file mode 100644 index f2f2fe999de..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/CellPartitioning.cxx +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/CellPartitioning.h" - -CellPartitioning::CellPartitioning(unsigned int firstDivisionNumber): - m_firstDivisionNumber(firstDivisionNumber) -{ -} - -CellPartitioning::CellPartitioning(const CellPartitioning& right): - m_partition(right.m_partition), - m_firstDivisionNumber(right.m_firstDivisionNumber) -{ -} - -CellPartitioning::~CellPartitioning() -{ -} - -CellPartitioning& CellPartitioning::operator=(const CellPartitioning& right) -{ - if (this!=&right) { - m_partition=right.m_partition; - m_firstDivisionNumber = right.m_firstDivisionNumber; - } - return *this; -} - -void CellPartitioning::addValue(double xVal) -{ - m_partition.push_back(xVal); -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAbsPositionInfo.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAbsPositionInfo.cxx deleted file mode 100755 index ef9273c2138..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAbsPositionInfo.cxx +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoAbsPositionInfo.h" -#include "CLHEP/Geometry/Transform3D.h" -#include <memory> - -GeoAbsPositionInfo::GeoAbsPositionInfo() - : m_absTransform(nullptr), - m_defAbsTransform(nullptr) -{ -} - -GeoAbsPositionInfo::~GeoAbsPositionInfo() -{ - delete m_absTransform; - delete m_defAbsTransform; -} - -void GeoAbsPositionInfo::clearAbsTransform () -{ - delete m_absTransform; - m_absTransform = nullptr; -} - -void GeoAbsPositionInfo::clearDefAbsTransform () -{ - delete m_defAbsTransform; - m_defAbsTransform = nullptr; -} - -void GeoAbsPositionInfo::setAbsTransform (const HepGeom::Transform3D & xform) -{ - if (m_absTransform) - { - (*m_absTransform) = xform; - } - else - { - m_absTransform = new HepGeom::Transform3D (xform); - } -} - -void GeoAbsPositionInfo::setDefAbsTransform (const HepGeom::Transform3D & xform) -{ - if (m_defAbsTransform) - { - (*m_defAbsTransform) = xform; - } - else - { - m_defAbsTransform = new HepGeom::Transform3D (xform); - } -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolAndSTAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolAndSTAction.cxx deleted file mode 100755 index 10e05babdf0..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolAndSTAction.cxx +++ /dev/null @@ -1,191 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoAccessVolAndSTAction.h" - -#include "GeoModelKernel/GeoNameTag.h" -#include "GeoModelKernel/GeoSerialDenominator.h" -#include <string> - -GeoAccessVolAndSTAction::GeoAccessVolAndSTAction(unsigned int index) - : m_volume(0) - , m_serialTransformer(0) - , m_index(index) - , m_counter(0) - , m_nameTag(0) - , m_serialDenominator(0) - , m_idTag(0) - , m_serialDenomPosition(0) -{ - setDepthLimit(1); -} - -GeoAccessVolAndSTAction::~GeoAccessVolAndSTAction() -{ -} - -void GeoAccessVolAndSTAction::handleTransform(const GeoTransform *xform) -{ - m_pendingTransformList.push_back (xform); -} - -void GeoAccessVolAndSTAction::handlePhysVol(const GeoPhysVol *vol) -{ - // Return if we have not got any children - if(getPath()->getLength()-1 == 0) - return; - - // Otherwise check if the index equals the counter: - if(m_index == m_counter) { - m_volume = vol; - m_serialTransformer = 0; - unsigned int listSize = m_pendingTransformList.size(); - - if(listSize == 0) { - // do nothing.... - } - else if(listSize == 1) { - m_transform = m_pendingTransformList[0]->getTransform(nullptr); - m_defTransform = m_pendingTransformList[0]->getDefTransform(nullptr); - } - else { - for(unsigned int t=0; t<m_pendingTransformList.size(); t++) { - m_transform = m_transform * m_pendingTransformList[t]->getTransform(nullptr); - m_defTransform = m_defTransform * m_pendingTransformList[t]->getDefTransform(nullptr); - } - } - terminate (); - } - else { - m_idTag = 0; - m_nameTag = 0; - m_pendingTransformList.erase(m_pendingTransformList.begin(), - m_pendingTransformList.end()); - } - - m_counter++; -} - -void GeoAccessVolAndSTAction::handleFullPhysVol(const GeoFullPhysVol *vol) -{ - // Return if we have not got any children - if(getPath()->getLength()-1 == 0) - return; - - // Otherwise check if the index equals the counter: - if(m_index == m_counter) - { - m_volume = vol; - m_serialTransformer = 0; - - unsigned int listSize = m_pendingTransformList.size(); - if(listSize == 0) { - // do nothing.... - } - else if(listSize == 1) { - m_transform = m_pendingTransformList[0]->getTransform(nullptr); - m_defTransform = m_pendingTransformList[0]->getDefTransform(nullptr); - } - else { - for(unsigned int t = 0; t < m_pendingTransformList.size (); t++) { - m_transform = m_transform * m_pendingTransformList[t]->getTransform(nullptr); - m_defTransform = m_defTransform * m_pendingTransformList[t]->getDefTransform(nullptr); - } - } - terminate(); - } - else { - m_pendingTransformList.erase (m_pendingTransformList.begin(), - m_pendingTransformList.end()); - m_nameTag = 0; - m_idTag = 0; - } - - m_counter++; -} - -PVConstLink GeoAccessVolAndSTAction::getVolume() const -{ - return m_volume; -} - -const HepGeom::Transform3D & GeoAccessVolAndSTAction::getTransform() const -{ - return m_transform; -} - -const HepGeom::Transform3D & GeoAccessVolAndSTAction::getDefTransform() const -{ - return m_defTransform; -} - -const std::string & GeoAccessVolAndSTAction::getName() const -{ - if(m_name.empty()) { - if(m_nameTag) { - m_name = m_nameTag->getName(); - } - else if(m_serialDenominator) { - m_name = m_serialDenominator->getBaseName() + std::to_string(m_index-m_serialDenomPosition); - } - else { - m_name = "ANON"; - } - } - return m_name; -} - -void GeoAccessVolAndSTAction::handleNameTag(const GeoNameTag *nameTag) -{ - m_nameTag = nameTag; - m_serialDenominator = 0; - m_serialDenomPosition = 0; -} - -void GeoAccessVolAndSTAction::handleSerialDenominator(const GeoSerialDenominator *sD) -{ - m_serialDenominator = sD; - m_serialDenomPosition = m_counter; -} - -void GeoAccessVolAndSTAction::handleSerialTransformer(const GeoSerialTransformer *sT) -{ - m_pendingTransformList.erase(m_pendingTransformList.begin(), - m_pendingTransformList.end()); - - if(m_index == m_counter) { - m_volume = 0; - m_serialTransformer = sT; - terminate(); - } - else { - m_idTag = 0; - m_nameTag = 0; - m_counter++; - } -} - -const GeoSerialTransformer* GeoAccessVolAndSTAction::getSerialTransformer() const -{ - return m_serialTransformer; -} - -void GeoAccessVolAndSTAction::handleIdentifierTag(const GeoIdentifierTag *idTag) -{ - m_idTag = idTag; -} - -Query<unsigned int> GeoAccessVolAndSTAction::getId() const -{ - if(m_idTag) { - return Query<unsigned int>(m_idTag->getIdentifier()); - } - else { - return Query<unsigned int>(); - } -} - - - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolumeAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolumeAction.cxx deleted file mode 100755 index 8fc6e79ca68..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolumeAction.cxx +++ /dev/null @@ -1,208 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoAccessVolumeAction.h" -#include "GeoModelKernel/GeoNameTag.h" -#include "GeoModelKernel/GeoSerialDenominator.h" -#include "GeoModelKernel/GeoSerialIdentifier.h" -#include <string> - -GeoAccessVolumeAction::GeoAccessVolumeAction(unsigned int Index, const GeoVAlignmentStore* store) - : m_index(Index) - , m_counter(0) - , m_nameTag(nullptr) - , m_serialDenominator(nullptr) - , m_idTag(nullptr) - , m_serialDenomPosition(0) - , m_serialIdentifier(nullptr) - , m_serialIdentPosition(0) - , m_alignStore(store) -{ - setDepthLimit (1); - m_pendingTransformList.reserve(1); -} - -GeoAccessVolumeAction::~GeoAccessVolumeAction() -{ -} - -void GeoAccessVolumeAction::handleTransform (const GeoTransform *xform) -{ - m_pendingTransformList.push_back (xform); -} - -void GeoAccessVolumeAction::handlePhysVol (const GeoPhysVol *vol) -{ - // - // Return if we have not got to any children: - // - if(getPath()->getLength()-1 == 0) - return; - // - // Otherwise check if the index equals the counter: - // - if(m_index == m_counter) { - m_volume = vol; - unsigned int listSize = m_pendingTransformList.size (); - if(listSize == 0) { - // do nothing.... - } - else if(listSize == 1) { - m_transform = m_pendingTransformList[0]->getTransform(m_alignStore); - m_defTransform = m_pendingTransformList[0]->getDefTransform(m_alignStore); - } - else { - for(unsigned int t = 0; t < m_pendingTransformList.size (); t++) { - m_transform = m_transform * m_pendingTransformList[t]->getTransform(m_alignStore); - m_defTransform = m_defTransform * m_pendingTransformList[t]->getDefTransform(m_alignStore); - } - } - terminate(); - } - else { - m_idTag = nullptr; - m_nameTag = nullptr; - m_pendingTransformList.erase (m_pendingTransformList.begin (), - m_pendingTransformList.end ()); - } - // - // Increment the counter: - // - m_counter++; -} - -void GeoAccessVolumeAction::handleFullPhysVol (const GeoFullPhysVol *vol) -{ - // - // Return if we have not got to any children: - // - if(getPath()->getLength()-1 == 0) - return; - // - // Otherwise check if the index equals the counter: - // - if(m_index == m_counter) { - m_volume = vol; - unsigned int listSize = m_pendingTransformList.size (); - if(listSize == 0) { - // do nothing.... - } - else if(listSize == 1) { - m_transform = m_pendingTransformList[0]->getTransform(m_alignStore); - m_defTransform = m_pendingTransformList[0]->getDefTransform(m_alignStore); - } - else { - for(unsigned int t = 0; t < m_pendingTransformList.size (); t++) { - m_transform = m_transform * m_pendingTransformList[t]->getTransform(m_alignStore); - m_defTransform = m_defTransform * m_pendingTransformList[t]->getDefTransform(m_alignStore); - } - } - terminate(); - } - else { - m_pendingTransformList.erase (m_pendingTransformList.begin (), - m_pendingTransformList.end ()); - m_nameTag = nullptr; - m_idTag = nullptr; - } - // - // Increment the counter: - // - m_counter++; -} - -PVConstLink GeoAccessVolumeAction::getVolume () const -{ - return m_volume; -} - -const HepGeom::Transform3D & GeoAccessVolumeAction::getTransform () const -{ - return m_transform; -} - -const HepGeom::Transform3D & GeoAccessVolumeAction::getDefTransform () const -{ - return m_defTransform; -} - -const std::string & GeoAccessVolumeAction::getName () const -{ - if(m_name.empty()) { - if(m_nameTag) { - m_name = m_nameTag->getName(); - } - else if(m_serialDenominator) { - m_name = m_serialDenominator->getBaseName() + std::to_string(m_index-m_serialDenomPosition); - } - else { - m_name = "ANON"; - } - } - return m_name; -} - -void GeoAccessVolumeAction::handleNameTag (const GeoNameTag *nameTag) -{ - m_nameTag = nameTag; - m_serialDenominator = nullptr; - m_serialDenomPosition = 0; -} - -void GeoAccessVolumeAction::handleSerialDenominator (const GeoSerialDenominator *sD) -{ - m_serialDenominator = sD; - m_serialDenomPosition = m_counter; -} - -void GeoAccessVolumeAction::handleSerialTransformer (const GeoSerialTransformer *sT) -{ - // - // Otherwise check if the index equals the counter: - // - if(m_index < m_counter + sT->getNCopies()) { - unsigned int copy = m_index - m_counter; - m_volume = sT->getVolume(); - for(unsigned int t = 0; t < m_pendingTransformList.size (); t++) { - m_transform = m_transform * m_pendingTransformList[t]->getTransform(m_alignStore); - m_defTransform = m_defTransform * m_pendingTransformList[t]->getDefTransform(m_alignStore); - } - m_transform = m_transform * sT->getTransform (copy); - m_defTransform = m_defTransform * sT->getTransform (copy); - m_counter += (copy + 1); - terminate (); - } - else { - m_idTag = nullptr; - m_nameTag = nullptr; - m_pendingTransformList.erase(m_pendingTransformList.begin (), - m_pendingTransformList.end ()); - m_counter += sT->getNCopies(); - } -} - -void GeoAccessVolumeAction::handleIdentifierTag (const GeoIdentifierTag *idTag) -{ - m_idTag = idTag; - m_serialIdentifier = nullptr; - m_serialIdentPosition = 0; -} - -Query<int> GeoAccessVolumeAction::getId () const -{ - Query<int> id; - if(m_idTag) { - id = Query<int>(m_idTag->getIdentifier()); - } - else if(m_serialIdentifier) { - id = Query<int>(m_index - m_serialIdentPosition + m_serialIdentifier->getBaseId()); - } - return id; -} - -void GeoAccessVolumeAction::handleSerialIdentifier(const GeoSerialIdentifier *sI) -{ - m_serialIdentifier = sI; - m_serialIdentPosition = m_counter; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolumeAction.h b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolumeAction.h deleted file mode 100755 index 935329d2a3a..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAccessVolumeAction.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GeoAccessVolumeAction_h -#define GeoAccessVolumeAction_h 1 - -#include "GeoModelKernel/GeoNodeAction.h" -#include "CLHEP/Geometry/Transform3D.h" -#include <vector> - -class GeoVPhysVol; -class GeoTransform; -class GeoVAlignmentStore; - -/** - * @class GeoAccessVolumeAction - * - * @brief Accesses volumes, returning the ith volume and also its transformation relative to the parent. - */ - -class GeoAccessVolumeAction final : public GeoNodeAction -{ - public: - - GeoAccessVolumeAction (unsigned int Index, const GeoVAlignmentStore* store); - virtual ~GeoAccessVolumeAction() override; - - /// Handles a Transform. - virtual void handleTransform (const GeoTransform *xform) override; - - /// Handles a physical volume. - virtual void handlePhysVol (const GeoPhysVol *vol) override; - - /// Handles a physical volume. - virtual void handleFullPhysVol (const GeoFullPhysVol *vol) override; - - /// Returns the selected physical volume or nullptr if not found. - PVConstLink getVolume () const; - - /// Returns the transformation to the volume. - const HepGeom::Transform3D & getTransform () const; - - /// Returns the default ransformation to the volume. - const HepGeom::Transform3D & getDefTransform () const; - - /// Returns the name of the volume. From nametag or serial denominator. - const std::string & getName () const; - - /// Handles a Name Tag. - virtual void handleNameTag (const GeoNameTag *nameTag) override; - - /// Handles a Serial Denominator. - virtual void handleSerialDenominator (const GeoSerialDenominator *sD) override; - - /// Handles a Serial Transformer - virtual void handleSerialTransformer (const GeoSerialTransformer *sT) override; - - /// Handles an Identifier Tag. - virtual void handleIdentifierTag (const GeoIdentifierTag *idTag) override; - - /// Returns the id of the volume. From the identifier. - Query<int> getId () const; - - /// Handles an Serial Identifier - virtual void handleSerialIdentifier(const GeoSerialIdentifier *sI) override; - - private: - - GeoAccessVolumeAction(const GeoAccessVolumeAction &right); - GeoAccessVolumeAction & operator=(const GeoAccessVolumeAction &right); - - /// Returns a pointer to the ith physical volume under this one. - PVConstLink m_volume; - - /// The transformation to the ith volume. - HepGeom::Transform3D m_transform; - - /// The default transformation to the ith volume. - HepGeom::Transform3D m_defTransform; - - /// The volume which we are interested in seeking. - unsigned int m_index; - - /// The volume which we are interested in seeking. - unsigned int m_counter; - - /// The name of the volume. From a nametag or a serial denominator. - mutable std::string m_name; - - /// The identifier of the volume. From an identifier tag. - mutable Query<int> m_id; - - /// A pointer to a name tag. If the volume is named. - const GeoNameTag *m_nameTag; - - /// A pointer to a serial denominator. If one exists. - const GeoSerialDenominator *m_serialDenominator; - - /// A pointer to an identifier tag. If the volume is identified. - const GeoIdentifierTag *m_idTag; - - /// List of Pending Transformations. - std::vector<const GeoTransform *> m_pendingTransformList; - - /// Position of the serial denominator. Used to assign a numeric suffix to the name, eg BaseName+99 - unsigned int m_serialDenomPosition; - - const GeoSerialIdentifier *m_serialIdentifier; - unsigned int m_serialIdentPosition; - const GeoVAlignmentStore* m_alignStore; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAlignableTransform.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAlignableTransform.cxx deleted file mode 100755 index ee1313c6521..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoAlignableTransform.cxx +++ /dev/null @@ -1,75 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoAlignableTransform.h" -#include "GeoModelKernel/GeoClearAbsPosAction.h" -#include "GeoModelKernel/GeoVAlignmentStore.h" -#include "GeoSelClearAbsPosAction.h" -#include <set> - -GeoAlignableTransform::GeoAlignableTransform (const HepGeom::Transform3D& transform) - : GeoTransform(transform) - , m_delta (nullptr) -{ -} - -GeoAlignableTransform::~GeoAlignableTransform() -{ - delete m_delta; -} - -HepGeom::Transform3D GeoAlignableTransform::getTransform(const GeoVAlignmentStore* store) const -{ - const HepGeom::Transform3D* delta = (store==nullptr ? m_delta : store->getDelta(this)); - return GeoTransform::getTransform(nullptr) * (delta==nullptr ? HepGeom::Transform3D() : *delta); -} - -void GeoAlignableTransform::setDelta (const HepGeom::Transform3D& delta, GeoVAlignmentStore* store) -{ - if(store==nullptr) { - if(m_delta && (*m_delta == delta)) return; - - if(m_delta) { - (*m_delta) = delta; - } - else { - m_delta = new HepGeom::Transform3D(delta); - } - - std::set<GeoGraphNode*> uniqueParents; - for(GeoGraphNode* parent : m_parentList) { - if(uniqueParents.find(parent)==uniqueParents.end()) { - GeoSelClearAbsPosAction cc(this); - parent->exec(&cc); - uniqueParents.insert(parent); - } - } - } // if(store==nullptr) - else { - store->setDelta(this,delta); - } -} - -void GeoAlignableTransform::clearDelta(GeoVAlignmentStore* store) -{ - // Does not make sence to clear deltas inside Alignment Store - if(store!=nullptr) return; - - delete m_delta; - m_delta = nullptr; - - std::set<GeoGraphNode*> uniqueParents; - for(GeoGraphNode* parent : m_parentList) { - if(uniqueParents.find(parent)==uniqueParents.end()) { - GeoSelClearAbsPosAction cc(this); - parent->exec (&cc); - uniqueParents.insert(parent); - } - } -} - -void GeoAlignableTransform::dockTo(GeoVPhysVol* parent) -{ - m_parentList.push_back (parent); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoBox.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoBox.cxx deleted file mode 100755 index 0c24a98defb..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoBox.cxx +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoBox.h" -#include "GeoModelKernel/GeoPolyhedron.h" -#include "GeoModelKernel/GeoShapeAction.h" - -const std::string GeoBox::s_classType = "Box"; -const ShapeType GeoBox::s_classTypeID = 0x10; - -GeoBox::GeoBox (double XHalfLength, double YHalfLength, double ZHalfLength) - : m_xHalfLength (XHalfLength) - , m_yHalfLength (YHalfLength) - , m_zHalfLength (ZHalfLength) -{ -} - -GeoBox::~GeoBox() -{ -} - -double GeoBox::volume () const -{ - return 8.0 * m_xHalfLength * m_yHalfLength * m_zHalfLength; -} - -const std::string & GeoBox::type () const -{ - return s_classType; -} - -ShapeType GeoBox::typeID () const -{ - return s_classTypeID; -} - -void GeoBox::exec (GeoShapeAction *action) const -{ - action->handleBox(this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoClearAbsPosAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoClearAbsPosAction.cxx deleted file mode 100755 index 7383e12e342..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoClearAbsPosAction.cxx +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoClearAbsPosAction.h" - -GeoClearAbsPosAction::GeoClearAbsPosAction() -{ -} - -GeoClearAbsPosAction::~GeoClearAbsPosAction() -{ -} - -void GeoClearAbsPosAction::handleFullPhysVol (const GeoFullPhysVol *vol) -{ - vol->clearPositionInfo (); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCons.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCons.cxx deleted file mode 100755 index 1082bfb271d..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCons.cxx +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoCons.h" -#include "GeoModelKernel/GeoShapeAction.h" - -const std::string GeoCons::s_classType = "Cons"; -const ShapeType GeoCons::s_classTypeID = 0x11; - -GeoCons::GeoCons (double RMin1, double RMin2, double RMax1, double RMax2, double DZ, double SPhi, double DPhi) - : m_rMin1 (RMin1) - , m_rMin2 (RMin2) - , m_rMax1 (RMax1) - , m_rMax2 (RMax2) - , m_dZ (DZ) - , m_sPhi (SPhi) - , m_dPhi (DPhi) -{ -} - -GeoCons::~GeoCons() -{ -} - -double GeoCons::volume () const -{ - return (m_dPhi * (1./3)) * m_dZ * (m_rMax1 * m_rMax1 + m_rMax2 * m_rMax2 + m_rMax1 * m_rMax2 - - m_rMin1 * m_rMin1 - m_rMin2 * m_rMin2 - - m_rMin1 * m_rMin2); -} - -const std::string & GeoCons::type () const -{ - return s_classType; -} - -ShapeType GeoCons::typeID () const -{ - return s_classTypeID; -} - -void GeoCons::exec (GeoShapeAction *action) const -{ - action->handleCons(this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCountVolAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCountVolAction.cxx deleted file mode 100755 index 1299bf04575..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCountVolAction.cxx +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoCountVolAction.h" - -GeoCountVolAction::GeoCountVolAction () - : m_count (0) -{ - setDepthLimit (1); -} - -GeoCountVolAction::~GeoCountVolAction() -{ -} - -void GeoCountVolAction::handlePhysVol (const GeoPhysVol *) -{ - // - // Do not count the top volume, this action counts only children! - // - if (getPath ()->getLength () > 1) - m_count++; -} - -void GeoCountVolAction::handleFullPhysVol (const GeoFullPhysVol *) -{ - // - // Do not count the top volume, this action counts only children! - // - if (getPath ()->getLength () > 1) - m_count++; -} - -void GeoCountVolAction::handleSerialTransformer (const GeoSerialTransformer *st) -{ - m_count += st->getNCopies (); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCountVolAndSTAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCountVolAndSTAction.cxx deleted file mode 100755 index 1bc7b55b013..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCountVolAndSTAction.cxx +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoCountVolAndSTAction.h" - -GeoCountVolAndSTAction::GeoCountVolAndSTAction() - :m_count (0) -{ - setDepthLimit (1); -} - -GeoCountVolAndSTAction::~GeoCountVolAndSTAction() -{ -} - -void GeoCountVolAndSTAction::handlePhysVol(const GeoPhysVol*) -{ - // - // Do not count the top volume, this action counts only children! - // - if (getPath ()->getLength () > 1) - m_count++; -} - -void GeoCountVolAndSTAction::handleFullPhysVol(const GeoFullPhysVol*) -{ - // - // Do not count the top volume, this action counts only children! - // - if (getPath ()->getLength () > 1) - m_count++; -} - -void GeoCountVolAndSTAction::handleSerialTransformer(const GeoSerialTransformer *) -{ - m_count ++; -} - - - - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCutVolAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCutVolAction.cxx deleted file mode 100755 index 4382b6e6ff5..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoCutVolAction.cxx +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoCutVolAction.h" -#include "GeoModelKernel/GeoPhysVol.h" -#include "GeoModelKernel/GeoIdentifierTag.h" -#include "GeoModelKernel/GeoNameTag.h" -#include "GeoModelKernel/GeoTransform.h" -#include "GeoModelKernel/GeoShapeShift.h" -#include "GeoModelKernel/GeoShapeSubtraction.h" - -GeoCutVolAction::GeoCutVolAction(const GeoShape& Shape, - const HepGeom::Transform3D& Transform) - : GeoVolumeAction (GeoVolumeAction::TOP_DOWN) - , m_physVol(0) - , m_shape(Shape) - , m_transform(Transform) - , m_copyStack(new std::stack<GeoPhysVol*>) -{ -} - -GeoCutVolAction::~GeoCutVolAction() -{ - while(m_copyStack->size()>0) - m_copyStack->pop(); - delete m_copyStack; -} - -void GeoCutVolAction::handleVPhysVol(const GeoVPhysVol *pv) -{ - // Determine path length: - // 0 - for the starting PV - // 1 - for the first level daughters etc. - unsigned int pathLen = this->getState()->getPath()->getLength(); - - // Get Logical Volume details - const GeoLogVol* lvOriginal = pv->getLogVol(); - const std::string& lvNameOriginal = lvOriginal->getName(); - const GeoMaterial* lvMatOriginal = lvOriginal->getMaterial(); - const GeoShape* lvShapeOriginal = lvOriginal->getShape(); - - if(pathLen==0) - { - // We are at the first PV. Create the resulting PV - const GeoShape& cutShape = (*lvShapeOriginal).subtract(m_shape << m_transform); - GeoLogVol* lvNew = new GeoLogVol(lvNameOriginal,&cutShape,lvMatOriginal); - - m_physVol = new GeoPhysVol(lvNew); - - // Save the new PV in the copy stack - m_copyStack->push(m_physVol); - } - else - { - // determine the parent PV in the copy tree - while(m_copyStack->size()>pathLen) - m_copyStack->pop(); - GeoPhysVol* copyParent = m_copyStack->top(); - - // Calculate cut transform to the reference frame of current PV - HepGeom::Transform3D cutTransform = (this->getState()->getAbsoluteTransform()).inverse()*m_transform; - - // Construct new PV - const GeoShape& cutShape = (*lvShapeOriginal).subtract(m_shape << cutTransform); - GeoLogVol* lvNew = new GeoLogVol(lvNameOriginal,&cutShape,lvMatOriginal); - GeoPhysVol* pvNew = new GeoPhysVol(lvNew); - - // Get its characteristics (name, id, transform to parent) - std::string pvName = this->getState()->getName(); - if(pvName != "") - copyParent->add(new GeoNameTag(pvName)); - - const Query<int> pvId = this->getState()->getId(); - if(pvId.isValid()) - copyParent->add(new GeoIdentifierTag(pvId)); - - copyParent->add(new GeoTransform(this->getState()->getTransform())); - copyParent->add(pvNew); - - // Save new PV in the copy stack - m_copyStack->push(pvNew); - } -} - -GeoPhysVol* GeoCutVolAction::getPV() -{ - return m_physVol; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoElement.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoElement.cxx deleted file mode 100755 index 6f50aa3699c..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoElement.cxx +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoElement.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include <cmath> - -GeoElement::GeoElement (const std::string &Name, const std::string &Symbol, double Z, double A) - : m_name (Name) - , m_symbol (Symbol) - , m_z (Z) - , m_a (A) -{ -} - -GeoElement::~GeoElement() -{ -} - - -double GeoElement::getRadTsai() const -{ - // Compute Coulomb correction factor (Phys Rev. D50 3-1 (1994) page 1254) - const double k1 = 0.0083, k2 = 0.20206, k3 = 0.0020, k4 = 0.0369; - double az2 = (CLHEP::fine_structure_const*m_z)*(CLHEP::fine_structure_const*m_z); - double az4 = az2 * az2; - - double coulomb = (k1*az4 + k2 + 1./(1.+az2))*az2 - (k3*az4 + k4)*az4; - - // Compute Tsai's Expression for the Radiation Length (Phys Rev. D50 3-1 (1994) page 1254) - const double Lrad_light[] = {5.31, 4.79, 4.74, 4.71}; - const double Lprad_light[] = {6.144, 5.621, 5.805, 5.924}; - - const double logZ3 = std::log(m_z) * (1./3); - - double Lrad, Lprad; - int iz = (int)(m_z+0.5) - 1 ; - if (iz<=3) { - Lrad = Lrad_light[iz]; - Lprad = Lprad_light[iz]; - } else { - Lrad = std::log(184.15) - logZ3; - Lprad = std::log(1194.) - 2*logZ3; - } - - double radTsai = 4*CLHEP::alpha_rcl2*m_z*(m_z*(Lrad-coulomb) + Lprad); - return radTsai; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoEllipticalTube.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoEllipticalTube.cxx deleted file mode 100755 index d0848e1111b..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoEllipticalTube.cxx +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include <cmath> -#include "GeoModelKernel/GeoPolyhedrizeAction.h" -#include "GeoModelKernel/GeoShapeAction.h" - -#include "GeoModelKernel/GeoEllipticalTube.h" -const std::string GeoEllipticalTube::s_classType = "EllipticalTube"; -const ShapeType GeoEllipticalTube::s_classTypeID = 0x22; - - -GeoEllipticalTube::GeoEllipticalTube(double XHalfLength, double YHalfLength, double ZHalfLength) - : m_xHalfLength(XHalfLength) - , m_yHalfLength(YHalfLength) - , m_zHalfLength(ZHalfLength) -{ -} - - -GeoEllipticalTube::~GeoEllipticalTube() -{ -} - -double GeoEllipticalTube::volume () const -{ -#ifndef M_PI - double M_PI = acos (-1.0); -#endif - return 2 * M_PI * m_xHalfLength * m_yHalfLength * m_zHalfLength; -} - -const std::string & GeoEllipticalTube::type () const -{ - return s_classType; -} - -ShapeType GeoEllipticalTube::typeID () const -{ - return s_classTypeID; -} - -void GeoEllipticalTube::exec (GeoShapeAction *action) const -{ - action->handleEllipticalTube(this); -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoFacet.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoFacet.cxx deleted file mode 100644 index 697edf3c992..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoFacet.cxx +++ /dev/null @@ -1,47 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoFacet.h" - -// ___________________ Triangular Facet ________________________ -GeoTriangularFacet::GeoTriangularFacet(GeoFacetVertex v0 - ,GeoFacetVertex v1 - ,GeoFacetVertex v2 - ,GeoFacetVertexType type) - : GeoFacet() -{ - m_nVertices = 3; - m_vertexType = type; - m_vertices.reserve(3); - m_vertices[0] = v0; - m_vertices[1] = v1; - m_vertices[2] = v2; -} - - -GeoTriangularFacet::~GeoTriangularFacet() -{ -} - -// ___________________ Triangular Facet ________________________ -GeoQuadrangularFacet::GeoQuadrangularFacet(GeoFacetVertex v0 - ,GeoFacetVertex v1 - ,GeoFacetVertex v2 - ,GeoFacetVertex v3 - ,GeoFacetVertexType type) - : GeoFacet() -{ - m_nVertices = 4; - m_vertexType = type; - m_vertices.reserve(4); - m_vertices[0] = v0; - m_vertices[1] = v1; - m_vertices[2] = v2; - m_vertices[3] = v3; -} - - -GeoQuadrangularFacet::~GeoQuadrangularFacet() -{ -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoFullPhysVol.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoFullPhysVol.cxx deleted file mode 100755 index 57c6160ae61..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoFullPhysVol.cxx +++ /dev/null @@ -1,253 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoFullPhysVol.h" -#include "GeoModelKernel/GeoTransform.h" -#include "GeoModelKernel/GeoNodeAction.h" -#include "GeoModelKernel/GeoCountVolAction.h" -#include "GeoModelKernel/GeoCountVolAndSTAction.h" -#include "GeoAccessVolumeAction.h" -#include <algorithm> - -GeoFullPhysVol::GeoFullPhysVol (const GeoLogVol* LogVol) - : GeoVFullPhysVol(LogVol) - , m_cloneOrigin(nullptr) -{ -} - -GeoFullPhysVol::~GeoFullPhysVol() -{ - for(const GeoGraphNode* daughter : m_daughters) daughter->unref(); - if(m_cloneOrigin && m_cloneOrigin!=this) m_cloneOrigin->unref(); -} - -void GeoFullPhysVol::add(GeoGraphNode* graphNode) -{ - if(m_cloneOrigin) throw std::runtime_error("Attempt to modify contents of a cloned FPV"); - - m_daughters.push_back(graphNode); - graphNode->ref(); - graphNode->dockTo(this); -} - -unsigned int GeoFullPhysVol::getNChildVols() const -{ - GeoCountVolAction cv; - exec(&cv); - return cv.getCount(); -} - -PVConstLink GeoFullPhysVol::getChildVol(unsigned int index) const -{ - GeoAccessVolumeAction av(index,nullptr); - exec(&av); - return av.getVolume(); -} - -HepGeom::Transform3D GeoFullPhysVol::getXToChildVol(unsigned int index, const GeoVAlignmentStore* store) const -{ - GeoAccessVolumeAction av(index,store); - exec(&av); - return av.getTransform(); -} - -HepGeom::Transform3D GeoFullPhysVol::getDefXToChildVol(unsigned int index, const GeoVAlignmentStore* store) const -{ - GeoAccessVolumeAction av(index,store); - exec(&av); - return av.getDefTransform(); -} - -void GeoFullPhysVol::exec(GeoNodeAction *action) const -{ - // - // Put this node on the head of the path: bb - // - action->getPath()->push(this); - if(action->getDepthLimit().isValid() - && action->getPath()->getLength()-1 > action->getDepthLimit()) { - action->getPath()->pop(); - return; - } - // - // Perform the action on this node: - // - action->handleFullPhysVol(this); - if(action->shouldTerminate()) { - action->getPath()->pop(); - return; - } - - // - // Pass this on to the children. - // - if(action->getDepthLimit().isValid() - && action->getPath()->getLength() > action->getDepthLimit()) { - } - else { - for(size_t c = 0; c<m_daughters.size(); c++) { - m_daughters[c]->exec(action); - if(action->shouldTerminate()) { - action->getPath()->pop(); - return; - } - } - } - - // - // Take this node back off the head of the path: - // - action->getPath()->pop(); -} - -std::string GeoFullPhysVol::getNameOfChildVol(unsigned int i) const -{ - GeoAccessVolumeAction av(i,nullptr); - exec(&av); - return av.getName(); -} - -Query<int> GeoFullPhysVol::getIdOfChildVol(unsigned int i) const -{ - GeoAccessVolumeAction av(i,nullptr); - exec(&av); - return av.getId (); -} - -unsigned int GeoFullPhysVol::getNChildVolAndST() const -{ - GeoCountVolAndSTAction cv; - exec(&cv); - return cv.getCount(); -} - -/// Meaning of the input parameter 'attached' -/// TRUE: all cloned volumes are meant to stay identical to their clone origin for the lifetime -/// further changes are permitted neither in the origin nor in the clone results -/// -/// FALSE: use this value if you expect further changes in either clone origing or its clone results -/// which don't need to be syncronized. The clone origin and its clone are identical ONLY by -/// the time of cloning, further identity is not guaranteed -GeoFullPhysVol* GeoFullPhysVol::clone(bool attached) -{ - GeoFullPhysVol* clone = new GeoFullPhysVol(this->getLogVol()); - for(unsigned int ind = 0; ind < this->m_daughters.size(); ind++) { - GeoGraphNode* daughter =(GeoGraphNode*) m_daughters[ind]; - clone->add(daughter); - } - - if(attached) { - if(this->m_cloneOrigin==0) { - this->m_cloneOrigin = this; - } - clone->m_cloneOrigin = this->m_cloneOrigin; - this->m_cloneOrigin->ref(); - } - - return clone; -} - -const GeoFullPhysVol* GeoFullPhysVol::cloneOrigin() const -{ - return m_cloneOrigin; -} - -/// Breaks the consistency of cloned volumes! -/// Use it only in Simulation jobs and -/// Don't call it until geometry has been completely translated to G4 -void GeoFullPhysVol::clear() -{ - for(size_t i=0; i<m_daughters.size(); i++) - m_daughters[i]->unref(); - m_daughters.clear(); -} - -HepGeom::Transform3D GeoFullPhysVol::getX(const GeoVAlignmentStore* store) const { - // - // Check we are not shared: - // - if (isShared()) throw std::runtime_error("Transform requested from shared volume"); - HepGeom::Transform3D xform; - // - // Get the address of the first graph node, from the parent: - // - const GeoGraphNode * const * fence = getParent()->getChildNode(0); - const GeoGraphNode * const * node1 = getParent()->findChildNode(this); - - for(const GeoGraphNode * const * current = node1 - 1; current>=fence; current--) { - - // If this happens, we are done, compute & return--------------------// - // // - if (dynamic_cast<const GeoVPhysVol *>(*current)) break; // - //-------------------------------------------------------------------// - - // If this happens, we are done, compute & return--------------------// - // // - if (dynamic_cast<const GeoSerialTransformer *>(*current)) break; // - //-------------------------------------------------------------------// - - const GeoTransform *xf = dynamic_cast<const GeoTransform *> (*current); - - //-------------------------------------------------------------------// - // If this happens, accumulate into transform // - if (xf) xform = xf->getTransform(store)*xform; // - //-------------------------------------------------------------------// - } - return xform; -} - -HepGeom::Transform3D GeoFullPhysVol::getDefX(const GeoVAlignmentStore* store) const { - // - // Check we are not shared: - // - if (isShared()) throw std::runtime_error("Transform requested from shared volume"); - HepGeom::Transform3D xform; - // - // Get the address of the first graph node, from the parent: - // - const GeoGraphNode * const * fence = getParent()->getChildNode(0); - const GeoGraphNode * const * node1 = getParent()->findChildNode(this); - - for(const GeoGraphNode * const * current = node1 - 1; current>=fence; current--) { - - // If this happens, we are done, compute & return--------------------// - // // - if (dynamic_cast<const GeoVPhysVol *>(*current)) break; // - //-------------------------------------------------------------------// - - // If this happens, we are done, compute & return--------------------// - // // - if (dynamic_cast<const GeoSerialTransformer *>(*current)) break; // - //-------------------------------------------------------------------// - - const GeoTransform *xf = dynamic_cast<const GeoTransform *> (*current); - - //-------------------------------------------------------------------// - // If this happens, accumulate into transform // - if (xf) xform = xf->getDefTransform(store)*xform; // - //-------------------------------------------------------------------// - } - return xform; - -} - -unsigned int GeoFullPhysVol::getNChildNodes() const -{ - return m_daughters.size(); -} - -const GeoGraphNode * const * GeoFullPhysVol::getChildNode(unsigned int i) const -{ - return &(m_daughters[i]); -} -const GeoGraphNode * const * GeoFullPhysVol::findChildNode(const GeoGraphNode * n) const -{ - std::vector<const GeoGraphNode *>::const_iterator i = std::find(m_daughters.begin(),m_daughters.end(),n); - if (i==m_daughters.end()) { - return nullptr; - } - else { - return &*i; - } -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoGenericTrap.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoGenericTrap.cxx deleted file mode 100644 index 260cf3513eb..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoGenericTrap.cxx +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoGenericTrap.h" -#include "GeoModelKernel/GeoShapeAction.h" - -const std::string GeoGenericTrap::s_classType = "GenericTrap"; -const ShapeType GeoGenericTrap::s_classTypeID = 0x23; - -GeoGenericTrap::GeoGenericTrap(double ZHalfLength, const GeoGenericTrapVertices& Vertices) - : m_zHalfLength(ZHalfLength) - , m_vertices(Vertices) -{ -} - -GeoGenericTrap::~GeoGenericTrap() -{ -} - -double GeoGenericTrap::volume() const -{ - // -- ToDo - return 0.; -} - -const std::string& GeoGenericTrap::type() const -{ - return s_classType; -} - -ShapeType GeoGenericTrap::typeID() const -{ - return s_classTypeID; -} - -void GeoGenericTrap::exec(GeoShapeAction *action) const -{ - action->handleGenericTrap(this); -} - -double GeoGenericTrap::getZHalfLength() const -{ - return m_zHalfLength; -} - -const GeoGenericTrapVertices& GeoGenericTrap::getVertices() const -{ - return m_vertices; -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoGraphNode.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoGraphNode.cxx deleted file mode 100755 index 49ab96dec4b..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoGraphNode.cxx +++ /dev/null @@ -1,23 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoGraphNode.h" -#include "GeoModelKernel/GeoNodeAction.h" - -GeoGraphNode::GeoGraphNode () -{ -} - -GeoGraphNode::~GeoGraphNode() -{ -} - -void GeoGraphNode::exec (GeoNodeAction *action) const -{ - action->handleNode (this); -} - -void GeoGraphNode::dockTo (GeoVPhysVol* ) -{ -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoIdentifierTag.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoIdentifierTag.cxx deleted file mode 100755 index fe6a9bf5fd6..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoIdentifierTag.cxx +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoIdentifierTag.h" -#include "GeoModelKernel/GeoNodeAction.h" - -GeoIdentifierTag::GeoIdentifierTag (int id) - : m_identifier(id) -{ -} - -GeoIdentifierTag::~GeoIdentifierTag() -{ -} - -void GeoIdentifierTag::exec (GeoNodeAction *action) const -{ - action->handleIdentifierTag (this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoLogVol.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoLogVol.cxx deleted file mode 100755 index 4827936b28d..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoLogVol.cxx +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoLogVol.h" - -GeoLogVol::GeoLogVol (const std::string &Name, const GeoShape *Shape, const GeoMaterial *Material) - : m_name (Name) - , m_material (Material) - , m_shape (Shape) -{ - m_material->ref (); - m_shape->ref (); -} - -GeoLogVol::~GeoLogVol() -{ - m_material->unref (); - m_shape->unref (); -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoMaterial.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoMaterial.cxx deleted file mode 100755 index 3fbfe9cb191..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoMaterial.cxx +++ /dev/null @@ -1,413 +0,0 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include <stdexcept> -#include <cmath> -#include <numeric> -#include <cfloat> -#include <iostream> -#include <algorithm> -#include <iterator> - -// These constants are the ionization potentials, indexed by atomic -// number. They have been obtained from -// -// http://physics.nist.gov/PhysRefData/XrayMassCoef/tab1.html -// -// Which is the reference of the particle data book. Approximate -// semiempirical formulae are not accurate enough, so we take the -// tabular values. These are in electron-volts. - - -const double - GeoMaterial::s_ionizationPotential[93] = { - 0.0 * - CLHEP::eV, - 19.2 * - CLHEP::eV, - 41.8 * - CLHEP::eV, - 40.0 * - CLHEP::eV, - 63.7 * - CLHEP::eV, - 76.0 * - CLHEP::eV, - 78.0 * - CLHEP::eV, - 82.0 * - CLHEP::eV, - 95.0 * - CLHEP::eV, - 115.0 * - CLHEP::eV, - 137.0 * - CLHEP::eV, - 149.0 * - CLHEP::eV, - 156.0 * - CLHEP::eV, - 166.0 * - CLHEP::eV, - 173.0 * - CLHEP::eV, - 173.0 * - CLHEP::eV, - 180.0 * - CLHEP::eV, - 174.0 * - CLHEP::eV, - 188.0 * - CLHEP::eV, - 190.0 * - CLHEP::eV, - 191.0 * - CLHEP::eV, - 216.0 * - CLHEP::eV, - 233.0 * - CLHEP::eV, - 245.0 * - CLHEP::eV, - 257.0 * - CLHEP::eV, - 272.0 * - CLHEP::eV, - 286.0 * - CLHEP::eV, - 297.0 * - CLHEP::eV, - 311.0 * - CLHEP::eV, - 322.0 * - CLHEP::eV, - 330.0 * - CLHEP::eV, - 334.0 * - CLHEP::eV, - 350.0 * - CLHEP::eV, - 347.0 * - CLHEP::eV, - 348.0 * - CLHEP::eV, - 343.0 * - CLHEP::eV, - 352.0 * - CLHEP::eV, - 363.0 * - CLHEP::eV, - 366.0 * - CLHEP::eV, - 379.0 * - CLHEP::eV, - 393.0 * - CLHEP::eV, - 417.0 * - CLHEP::eV, - 424.0 * - CLHEP::eV, - 428.0 * - CLHEP::eV, - 441.0 * - CLHEP::eV, - 449.0 * - CLHEP::eV, - 470.0 * - CLHEP::eV, - 470.0 * - CLHEP::eV, - 469.0 * - CLHEP::eV, - 488.0 * - CLHEP::eV, - 488.0 * - CLHEP::eV, - 487.0 * - CLHEP::eV, - 485.0 * - CLHEP::eV, - 491.0 * - CLHEP::eV, - 482.0 * - CLHEP::eV, - 488.0 * - CLHEP::eV, - 491.0 * - CLHEP::eV, - 501.0 * - CLHEP::eV, - 523.0 * - CLHEP::eV, - 535.0 * - CLHEP::eV, - 546.0 * - CLHEP::eV, - 560.0 * - CLHEP::eV, - 574.0 * - CLHEP::eV, - 580.0 * - CLHEP::eV, - 591.0 * - CLHEP::eV, - 614.0 * - CLHEP::eV, - 628.0 * - CLHEP::eV, - 650.0 * - CLHEP::eV, - 658.0 * - CLHEP::eV, - 674.0 * - CLHEP::eV, - 684.0 * - CLHEP::eV, - 694.0 * - CLHEP::eV, - 705.0 * - CLHEP::eV, - 718.0 * - CLHEP::eV, - 727.0 * - CLHEP::eV, - 736.0 * - CLHEP::eV, - 746.0 * - CLHEP::eV, - 757.0 * - CLHEP::eV, - 790.0 * - CLHEP::eV, - 790.0 * - CLHEP::eV, - 800.0 * - CLHEP::eV, - 810.0 * - CLHEP::eV, - 823.0 * - CLHEP::eV, - 823.0 * - CLHEP::eV, - 830.0 * - CLHEP::eV, - 825.0 * - CLHEP::eV, - 794.0 * - CLHEP::eV, - 827.0 * - CLHEP::eV, - 826.0 * - CLHEP::eV, - 841.0 * - CLHEP::eV, - 847.0 * - CLHEP::eV, - 878.0 * - CLHEP::eV, - 890.0 * - CLHEP::eV -}; - -unsigned int GeoMaterial::s_lastID = 0; - -GeoMaterial::GeoMaterial (const std::string &Name, double Density) - : m_name(Name) - , m_density(Density) - , m_iD(s_lastID++) - , m_radLength(0) - , m_intLength(0) - , m_dedDxConst(0) - , m_deDxI0(0) - , m_locked(false) -{ -} - -GeoMaterial::~GeoMaterial() -{ - for (size_t i = 0; i < m_element.size (); i++) - { - m_element[i]->unref (); - } -} - -void GeoMaterial::add (const GeoElement* element, double fraction) -{ - // You can only add materials until you call "lock"... - if (!m_locked) - { - std::vector <const GeoElement *>::iterator e = std::find(m_element.begin(),m_element.end(),element); - if (e==m_element.end()) { - m_element.push_back (element); - m_fraction.push_back (fraction); - element->ref (); - } - else { - int n = e-m_element.begin(); - m_fraction[n]+=fraction; - } - } - else - { - throw std::out_of_range ("Element added after material locked"); - } -} - -void GeoMaterial::add (const GeoMaterial* material, double fraction) -{ - if (!m_locked) - { - for (size_t e = 0; e < material->getNumElements (); e++) - { - add(material->m_element[e],fraction * material->m_fraction[e]); - } - } - else - { - throw std::out_of_range ("Material added after material locked"); - } -} - -void GeoMaterial::lock () -{ - if(m_locked) return; - - m_locked = true; - - // -------------------------------------------// - // Now compute some quantities: // - // Source of these calculations is: // - // // - // For DeDx constants and X0: PDG. // - // For Lambda0: G4. // - // // - // For energy loss // - // // - const double C0 = 0.00307 * CLHEP::cm3 / CLHEP::gram; // - // // - // For nuclear absorption length. // - const double lambda0 = 35 * CLHEP::gram / CLHEP::cm2; // - // // - //--------------------------------------------// - - if (getNumElements () == 0) - { - throw std::out_of_range ("Attempt to lock a material with no elements"); - return; - } - - - //--------------------------------------------// - // // - // -------------------------------------------// - - double dEDxConstant = 0, dEDxI0 = 0, NILinv = 0.0, radInv = 0.0; - - { // ===============Renormalization================================ - double wSum=std::accumulate(m_fraction.begin(),m_fraction.end(),0.0); - if (fabs(wSum-1.0)>0.00001) { - std::cerr << "Warning in material " - << m_name - << ". Mass fractions sum to " - << wSum << "; renormalizing to 1.0" << std::endl; - } - double inv_wSum = 1. / wSum; - for (size_t e=0;e<getNumElements();e++) {m_fraction[e]*=inv_wSum;} - } // ============================================================== - - const double inv_lambda0 = 1. / lambda0; - for (size_t e = 0; e < getNumElements (); e++) - { - double w = getFraction (e); // Weight fraction. - double Z = m_element[e]->getZ (); // Atomic number - double A = m_element[e]->getA (); // Atomic mass. - double N = m_element[e]->getN (); // Number of nucleons. - double dovera = m_density ? m_density / A : 0; // don't crash if both are 0 - double n = m_fraction[e] * CLHEP::Avogadro * dovera; // Number density. - int iZ = (int) (m_element[e]->getZ () + 0.5) - 1; // Atomic number index - - dEDxConstant += w * C0 * dovera * Z; - // Make sure we don't overflow the table: - // the `Ether' special `element' has Z set to 500. - if (iZ >= 0 && iZ < (std::end(s_ionizationPotential)-std::begin(s_ionizationPotential))) - dEDxI0 += w * s_ionizationPotential[iZ]; - NILinv += n * pow (N, 2.0 / 3.0) * CLHEP::amu * inv_lambda0; - - double nAtomsPerVolume = A ? CLHEP::Avogadro*m_density*m_fraction[e]/A : 0.; - radInv += (nAtomsPerVolume*m_element[e]->getRadTsai()); - } - m_dedDxConst = dEDxConstant; - m_deDxI0 = dEDxI0 ; - m_intLength = NILinv ? 1.0 / NILinv : 0; - m_radLength = radInv ? 1.0 / radInv : 0; -} - -double GeoMaterial::getDeDxConstant () const -{ - if (!m_locked) - throw std::out_of_range ("Material accessed before lock"); - return m_dedDxConst; -} - -double GeoMaterial::getDeDxI0 () const -{ - if (!m_locked) - throw std::out_of_range ("Material accessed before lock"); - return m_deDxI0; -} - -double GeoMaterial::getDeDxMin () const -{ - //------------------------------------------------------------// - static const double ConstToMin = 11.528; // - //------------------------------------------------------------// - - if (!m_locked) - throw std::out_of_range ("Material accessed before lock"); - - // -----------------------------------------------------------// - // See: Paul Avery's notes on track fitting, CBX 92-39. // - // Good for typical materials // - // -----------------------------------------------------------// - - return m_dedDxConst * ConstToMin; - -} - -double GeoMaterial::getRadLength () const -{ - if (!m_locked) - throw std::out_of_range ("Material accessed before lock"); - return m_radLength; -} - -double GeoMaterial::getIntLength () const -{ - if (!m_locked) - throw std::out_of_range ("Material accessed before lock"); - return m_intLength; -} - -unsigned int GeoMaterial::getNumElements () const -{ - if (!m_locked) - throw std::out_of_range ("Material accessed before lock"); - return m_element.size (); -} - -const GeoElement* GeoMaterial::getElement (unsigned int i) const -{ - if (!m_locked) - throw std::out_of_range ("Material accessed before lock"); - return m_element[i]; -} - -double GeoMaterial::getFraction (int i) const -{ - if (!m_locked) - throw std::out_of_range ("Material accessed before lock"); - return m_fraction[i]; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoNameTag.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoNameTag.cxx deleted file mode 100755 index 1dc26acea3e..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoNameTag.cxx +++ /dev/null @@ -1,21 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoNameTag.h" -#include "GeoModelKernel/GeoNodeAction.h" - -GeoNameTag::GeoNameTag (const std::string &BaseName) - : m_name (BaseName) -{ -} - - -GeoNameTag::~GeoNameTag() -{ -} - -void GeoNameTag::exec (GeoNodeAction *action) const -{ - action->handleNameTag (this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoNodeAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoNodeAction.cxx deleted file mode 100755 index e4164026dad..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoNodeAction.cxx +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoNodeAction.h" - -GeoNodeAction::GeoNodeAction() - : m_terminate (false) -{ -} - -GeoNodeAction::~GeoNodeAction() -{ -} - -void GeoNodeAction::handleNode (const GeoGraphNode *) -{ - // Do nothing... -} - -void GeoNodeAction::handleTransform (const GeoTransform *) -{ - // Do nothing... -} - -void GeoNodeAction::handlePhysVol (const GeoPhysVol *) -{ -} - -void GeoNodeAction::handleFullPhysVol (const GeoFullPhysVol *) -{ -} - -GeoNodePath* GeoNodeAction::getPath () -{ - return &m_path; -} - -Query<unsigned int> GeoNodeAction::getDepthLimit () -{ - return m_depth; -} - -void GeoNodeAction::terminate () -{ - m_terminate = true; -} - -bool GeoNodeAction::shouldTerminate () const -{ - return m_terminate; -} - -void GeoNodeAction::handleNameTag (const GeoNameTag *) -{ -} - -void GeoNodeAction::handleSerialDenominator (const GeoSerialDenominator *) -{ -} - -void GeoNodeAction::setDepthLimit (unsigned int limit) -{ - m_depth = limit; -} - -void GeoNodeAction::clearDepthLimit () -{ - m_depth = Query < unsigned int >(); -} - -void GeoNodeAction::handleSerialTransformer (const GeoSerialTransformer *) -{ -} - -void GeoNodeAction::handleIdentifierTag (const GeoIdentifierTag *) -{ -} - -void GeoNodeAction::handleSerialIdentifier(const GeoSerialIdentifier *) -{ -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPVConstLink.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPVConstLink.cxx deleted file mode 100755 index e65e17fa924..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPVConstLink.cxx +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoPVConstLink.h" - -GeoPVConstLink::GeoPVConstLink() - : m_ptr (0) -{ -} - -GeoPVConstLink::GeoPVConstLink(const GeoPVConstLink &right) - : m_ptr (right.m_ptr) -{ -} - -GeoPVConstLink::GeoPVConstLink (const GeoVPhysVol *addr) - : m_ptr (const_cast < GeoVPhysVol * >(addr)) -{ -} - -GeoPVConstLink::~GeoPVConstLink() -{ -} - - -int GeoPVConstLink::operator==(const GeoPVConstLink &right) const -{ - return m_ptr == right.m_ptr; -} - -int GeoPVConstLink::operator!=(const GeoPVConstLink &right) const -{ - return m_ptr != right.m_ptr; -} - -int GeoPVConstLink::operator<(const GeoPVConstLink &right) const -{ - return m_ptr < right.m_ptr; -} - -int GeoPVConstLink::operator>(const GeoPVConstLink &right) const -{ - return m_ptr > right.m_ptr; -} - -int GeoPVConstLink::operator<=(const GeoPVConstLink &right) const -{ - return m_ptr <= right.m_ptr; -} - -int GeoPVConstLink::operator>=(const GeoPVConstLink &right) const -{ - return m_ptr >= right.m_ptr; -} - -const GeoVPhysVol & GeoPVConstLink::operator * () const -{ - return *m_ptr; -} - -const GeoVPhysVol * GeoPVConstLink::operator -> () const -{ - return m_ptr; -} - -GeoPVConstLink::operator bool () const -{ - return m_ptr; -} - -GeoPVConstLink& GeoPVConstLink::operator = (const GeoPVConstLink& right) -{ - if (this != &right) - { - m_ptr = right.m_ptr; - } - return *this; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPVLink.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPVLink.cxx deleted file mode 100755 index 7bb581cddf7..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPVLink.cxx +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoPVLink.h" - -GeoPVLink::GeoPVLink() - : GeoPVConstLink (0) -{ -} - -GeoPVLink::GeoPVLink(const GeoPVLink &right) - : GeoPVConstLink (right) -{ -} - -GeoPVLink::GeoPVLink (const GeoVPhysVol *addr) - : GeoPVConstLink (addr) -{ -} - -GeoPVLink::~GeoPVLink() -{ -} - -GeoVPhysVol & GeoPVLink::operator * () -{ - return *m_ptr; -} - -GeoVPhysVol * GeoPVLink::operator -> () -{ - return m_ptr; -} - -const GeoVPhysVol & GeoPVLink::operator * () const -{ - return *m_ptr; -} - -const GeoVPhysVol * GeoPVLink::operator -> () const -{ - return m_ptr; -} - -GeoPVLink& GeoPVLink::operator = (const GeoPVLink& right) -{ - if (&right != this) - { - m_ptr = right.m_ptr; - } - return *this; -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPara.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPara.cxx deleted file mode 100755 index 6ecaada7fbb..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPara.cxx +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -//## begin module%1.5%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.5%.codegen_version - -//## begin module%3CD26D7503D0.cm preserve=no -// %X% %Q% %Z% %W% -//## end module%3CD26D7503D0.cm - -//## begin module%3CD26D7503D0.cp preserve=no -//## end module%3CD26D7503D0.cp - -//## Module: GeoPara%3CD26D7503D0; Pseudo Package body -//## Source file: /home/atlas/GEO/GeoModelKernel/GeoPara.cxx - -//## begin module%3CD26D7503D0.additionalIncludes preserve=no -//## end module%3CD26D7503D0.additionalIncludes - -//## begin module%3CD26D7503D0.includes preserve=yes -#include <cmath> -#include "CLHEP/Geometry/Vector3D.h" -#include "GeoModelKernel/GeoShapeAction.h" -//## end module%3CD26D7503D0.includes - -// GeoPara -#include "GeoModelKernel/GeoPara.h" -//## begin module%3CD26D7503D0.additionalDeclarations preserve=yes -//## end module%3CD26D7503D0.additionalDeclarations - - -// Class GeoPara - -//## begin GeoPara::s_classType%3CD26D7503D1.attr preserve=no public: static const std::string {U} "Para" -const std::string GeoPara::s_classType = "Para"; -//## end GeoPara::s_classType%3CD26D7503D1.attr - -//## begin GeoPara::s_classTypeID%3CD26D7503D2.attr preserve=no public: static const ShapeType {U} 0x12 -const ShapeType GeoPara::s_classTypeID = 0x12; -//## end GeoPara::s_classTypeID%3CD26D7503D2.attr - -GeoPara::GeoPara (double XHalfLength, double YHalfLength, double ZHalfLength, double Alpha, double Theta, double Phi) - //## begin GeoPara::GeoPara%3CD5A8D5005A.hasinit preserve=no - //## end GeoPara::GeoPara%3CD5A8D5005A.hasinit - //## begin GeoPara::GeoPara%3CD5A8D5005A.initialization preserve=yes - : -m_xHalfLength (XHalfLength), -m_yHalfLength (YHalfLength), -m_zHalfLength (ZHalfLength), -m_theta (Theta), -m_alpha (Alpha), -m_phi (Phi) - //## end GeoPara::GeoPara%3CD5A8D5005A.initialization -{ - //## begin GeoPara::GeoPara%3CD5A8D5005A.body preserve=yes - //## end GeoPara::GeoPara%3CD5A8D5005A.body -} - - -GeoPara::~GeoPara() -{ - //## begin GeoPara::~GeoPara%3CD26D7503D0_dest.body preserve=yes - //## end GeoPara::~GeoPara%3CD26D7503D0_dest.body -} - - - -//## Other Operations (implementation) -double GeoPara::volume () const -{ - //## begin GeoPara::volume%3CD2A6DB00FC.body preserve=yes - HepGeom::Vector3D<double> - v0 (1, 0, 0), - v1 (sin (m_alpha), cos (m_alpha), 0), - v2 (sin (m_theta) * cos (m_phi), sin (m_theta) * sin (m_phi), cos (m_theta)); - double factor = (v0.cross (v1).dot (v2)); - - return 8.0 * factor * m_xHalfLength * m_yHalfLength * m_zHalfLength; - //## end GeoPara::volume%3CD2A6DB00FC.body -} - -const std::string & GeoPara::type () const -{ - //## begin GeoPara::type%3CD2A83C0208.body preserve=yes - return s_classType; - //## end GeoPara::type%3CD2A83C0208.body -} - -ShapeType GeoPara::typeID () const -{ - //## begin GeoPara::typeID%3CD2A83C0226.body preserve=yes - return s_classTypeID; - //## end GeoPara::typeID%3CD2A83C0226.body -} - -void GeoPara::exec (GeoShapeAction *action) const -{ - //## begin GeoPara::exec%3DB96A3602F5.body preserve=yes - action->handlePara(this); - //## end GeoPara::exec%3DB96A3602F5.body -} - -// Additional Declarations - //## begin GeoPara%3CD26D7503D0.declarations preserve=yes - //## end GeoPara%3CD26D7503D0.declarations - -//## begin module%3CD26D7503D0.epilog preserve=yes -//## end module%3CD26D7503D0.epilog diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPcon.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPcon.cxx deleted file mode 100755 index a7407b86c71..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPcon.cxx +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoPcon.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include <cmath> -#include <stdexcept> - -const std::string GeoPcon::s_classType = "Pcon"; -const ShapeType GeoPcon::s_classTypeID = 0x13; - -GeoPcon::GeoPcon (double SPhi, double DPhi) - : m_sPhi (SPhi) - , m_dPhi (DPhi) -{ -} - -GeoPcon::~GeoPcon() -{ -} - -double GeoPcon::volume () const -{ - if (!isValid ()) - throw std::runtime_error ("Volume requested for incomplete polycone"); - double v = 0; - for (size_t s = 0; s < getNPlanes () - 1; s++) - { - double fDz = fabs (getZPlane (s + 1) - getZPlane (s)) / 2.0; - double fRmin1 = getRMinPlane (s + 1); - double fRmin2 = getRMinPlane (s); - double fRmax1 = getRMaxPlane (s + 1); - double fRmax2 = getRMaxPlane (s); - v += - (m_dPhi * (1./3)) * fDz * (fRmax1 * fRmax1 + fRmax2 * fRmax2 + - fRmax1 * fRmax2 - fRmin1 * fRmin1 - - fRmin2 * fRmin2 - fRmin1 * fRmin2); - } - return v; -} - -const std::string & GeoPcon::type () const -{ - return s_classType; -} - -ShapeType GeoPcon::typeID () const -{ - return s_classTypeID; -} - -void GeoPcon::addPlane (double ZPlane, double RMinPlane, double RMaxPlane) -{ - m_zPlane.push_back (ZPlane); - m_rMinPlane.push_back (RMinPlane); - m_rMaxPlane.push_back (RMaxPlane); -} - -void GeoPcon::exec (GeoShapeAction *action) const -{ - action->handlePcon(this); -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPerfUtils.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPerfUtils.cxx deleted file mode 100755 index 57405a2ddd4..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPerfUtils.cxx +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoPerfUtils.h" -#include <unistd.h> -#include <sys/types.h> -#include <sstream> -#include <fstream> -int GeoPerfUtils::getMem() { - int memSize = 0; - { - pid_t pid = getpid(); - std::ostringstream procstream; - procstream << "/proc/" << pid << "/status"; - std::ifstream memfile(procstream.str().c_str()); - - - std::string line; - while ((memfile >> line)) { - if (line=="VmSize:") { - memfile >> line; - std::istringstream istream(line); - istream >> memSize; - } - } - } - return memSize; -} - -int GeoPerfUtils::getCpu() { - - pid_t pid = getpid(); - std::ostringstream procstream; - procstream << "/proc/" << pid << "/stat"; - std::ifstream memfile(procstream.str().c_str()); - - int nblancks=0; - int uTime = 0; - int sTime = 0; - - char line[256]; - while ((memfile >> line)) { - nblancks++; - - if (nblancks==13) { - memfile >> line; - std::istringstream istream(line); - istream >> uTime; - - memfile >> line; - std::istringstream istream1(line); - istream1 >> sTime; - - return uTime+sTime; - } - } - return 0; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPgon.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPgon.cxx deleted file mode 100755 index 63d07db06c2..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPgon.cxx +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoPgon.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include <cmath> -#include <stdexcept> - -const std::string GeoPgon::s_classType = "Pgon"; -const ShapeType GeoPgon::s_classTypeID = 0x14; - -GeoPgon::GeoPgon (double SPhi, double DPhi, unsigned int NSides) - : m_sPhi (SPhi) - , m_dPhi (DPhi) - , m_nSides (NSides) -{ -} - -GeoPgon::~GeoPgon() -{ -} - -double GeoPgon::volume () const -{ - if (!isValid ()) - throw std::runtime_error ("Volume requested for incomplete polygon"); - double v = 0; - int sides = getNSides (); - double alpha = m_dPhi/sides; - double sinAlpha = sin(alpha); - - for (size_t s = 0; s < getNPlanes () - 1; s++) { - double z2 = getZPlane (s); - double z1 = getZPlane (s + 1); - double fRmin1 = getRMinPlane (s + 1); - double fRmin2 = getRMinPlane (s); - double fRmax1 = getRMaxPlane (s + 1); - double fRmax2 = getRMaxPlane (s); - - double b1 = (fRmax1 - fRmax2)/(z1 - z2); - double b2 = (fRmin1 - fRmin2)/(z1 - z2); - - double a1 = fRmax2 - b1 * z2; - double a2 = fRmin2 - b2 * z2; - - //v+=fabs((a1*a1-a2*a2)*(z1-z2) + (a1*b1-a2*b2)*(z1*z1-z2*z2) + (b1*b1-b2*b2)*(z1*z1*z1-z2*z2*z2)/3.); - // Equivalent which should be less sensitive to numerical precision errors: - v += fabs(z1 - z2) * ((a1 - a2) * (a1 + a2) + - (a1*b1 - a2*b2) * (z1 + z2) + - (b1 - b2) * (b1 + b2) * (z1*z1+z2*z2+z1*z2)*(1./3)); - } - v *= 0.5 * sides * sinAlpha; - return v; -} - -const std::string & GeoPgon::type () const -{ - return s_classType; -} - -ShapeType GeoPgon::typeID () const -{ - return s_classTypeID; -} - -void GeoPgon::addPlane (double ZPlane, double RMinPlane, double RMaxPlane) -{ - m_zPlane.push_back (ZPlane); - m_rMinPlane.push_back (RMinPlane); - m_rMaxPlane.push_back (RMaxPlane); -} - -void GeoPgon::exec (GeoShapeAction *action) const -{ - action->handlePgon(this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPhysVol.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPhysVol.cxx deleted file mode 100755 index 5dd2f79ad20..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPhysVol.cxx +++ /dev/null @@ -1,209 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoPhysVol.h" -#include "GeoModelKernel/GeoNodeAction.h" -#include "GeoModelKernel/GeoTransform.h" -#include "GeoModelKernel/GeoCountVolAction.h" -#include "GeoModelKernel/GeoCountVolAndSTAction.h" -#include "GeoAccessVolumeAction.h" -#include <algorithm> - -GeoPhysVol::GeoPhysVol(const GeoLogVol* LogVol) - : GeoVPhysVol(LogVol) -{ -} - - -GeoPhysVol::~GeoPhysVol() -{ - for(const GeoGraphNode* daughter : m_daughters) daughter->unref(); -} - -void GeoPhysVol::add(GeoGraphNode* graphNode) -{ - m_daughters.push_back(graphNode); - graphNode->ref(); - graphNode->dockTo(this); -} - -unsigned int GeoPhysVol::getNChildVols() const -{ - GeoCountVolAction cv; - exec(&cv); - return cv.getCount (); -} - -PVConstLink GeoPhysVol::getChildVol(unsigned int index) const -{ - GeoAccessVolumeAction av(index,nullptr); - exec(&av); - return av.getVolume(); -} - -HepGeom::Transform3D GeoPhysVol::getXToChildVol(unsigned int index - ,const GeoVAlignmentStore* store) const -{ - GeoAccessVolumeAction av(index,store); - exec(&av); - return av.getTransform(); -} - -HepGeom::Transform3D GeoPhysVol::getDefXToChildVol(unsigned int index - ,const GeoVAlignmentStore* store) const -{ - GeoAccessVolumeAction av(index,store); - exec(&av); - return av.getDefTransform(); -} - -void GeoPhysVol::exec(GeoNodeAction *action) const -{ - // - // Put this node on the head of the path: - // - action->getPath()->push(this); - if(action->getDepthLimit().isValid() - && action->getPath()->getLength() - 1 > action->getDepthLimit()) { - action->getPath ()->pop (); - return; - } - // - // Perform the action on this node: - // - action->handlePhysVol(this); - if(action->shouldTerminate()) { - action->getPath()->pop(); - return; - } - // - // Pass this on to the children. - // - if(action->getDepthLimit().isValid() - && action->getPath()->getLength() > action->getDepthLimit()) { - } - else { - for(size_t c = 0; c < m_daughters.size (); c++) { - m_daughters[c]->exec(action); - if(action->shouldTerminate()) { - action->getPath()->pop(); - return; - } - } - } - // - // Take this node back off the head of the path: - // - action->getPath()->pop(); -} - -std::string GeoPhysVol::getNameOfChildVol(unsigned int i) const -{ - GeoAccessVolumeAction av(i,nullptr); - exec(&av); - return av.getName(); -} - -Query<int> GeoPhysVol::getIdOfChildVol(unsigned int i) const -{ - GeoAccessVolumeAction av(i,nullptr); - exec(&av); - return av.getId(); -} - -unsigned int GeoPhysVol::getNChildVolAndST() const -{ - GeoCountVolAndSTAction cv; - exec(&cv); - return cv.getCount(); -} - -HepGeom::Transform3D GeoPhysVol::getX(const GeoVAlignmentStore* store) const { - // - // Check we are not shared: - // - if (isShared()) throw std::runtime_error("Transform requested from shared volume"); - HepGeom::Transform3D xform; - // - // Get the address of the first graph node, from the parent: - // - const GeoGraphNode * const * fence = getParent()->getChildNode(0); - const GeoGraphNode * const * node1 = getParent()->findChildNode(this); - - for(const GeoGraphNode * const * current = node1 - 1; current>=fence; current--) { - - // If this happens, we are done, compute & return--------------------// - // // - if(dynamic_cast<const GeoVPhysVol *>(*current)) break; // - //-------------------------------------------------------------------// - - // If this happens, we are done, compute & return--------------------// - // // - if(dynamic_cast<const GeoSerialTransformer *>(*current)) break; // - //-------------------------------------------------------------------// - - const GeoTransform *xf = dynamic_cast<const GeoTransform *> (*current); - - //-------------------------------------------------------------------// - // If this happens, accumulate into transform // - if (xf) xform = xf->getTransform(store)*xform; // - //-------------------------------------------------------------------// - } - return xform; -} - -HepGeom::Transform3D GeoPhysVol::getDefX(const GeoVAlignmentStore* store) const { - // - // Check we are not shared: - // - if (isShared()) throw std::runtime_error("Transform requested from shared volume"); - HepGeom::Transform3D xform; - // - // Get the address of the first graph node, from the parent: - // - const GeoGraphNode * const * fence = getParent()->getChildNode(0); - const GeoGraphNode * const * node1 = getParent()->findChildNode(this); - - for(const GeoGraphNode * const * current = node1 - 1; current>=fence; current--) { - - // If this happens, we are done, compute & return--------------------// - // // - if (dynamic_cast<const GeoVPhysVol *>(*current)) break; // - //-------------------------------------------------------------------// - - // If this happens, we are done, compute & return--------------------// - // // - if (dynamic_cast<const GeoSerialTransformer *>(*current)) break; // - //-------------------------------------------------------------------// - - const GeoTransform *xf = dynamic_cast<const GeoTransform *> (*current); - - //-------------------------------------------------------------------// - // If this happens, accumulate into transform // - if (xf) xform = xf->getDefTransform(store)*xform; // - //-------------------------------------------------------------------// - } - return xform; -} - -unsigned int GeoPhysVol::getNChildNodes() const -{ - return m_daughters.size(); -} - -const GeoGraphNode * const * GeoPhysVol::getChildNode(unsigned int i) const -{ - return &(m_daughters[i]); -} - -const GeoGraphNode * const * GeoPhysVol::findChildNode(const GeoGraphNode * n) const -{ - std::vector<const GeoGraphNode *>::const_iterator i = std::find(m_daughters.begin(),m_daughters.end(),n); - if (i==m_daughters.end()) { - return nullptr; - } - else { - return &*i; - } -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPolyhedrizeAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPolyhedrizeAction.cxx deleted file mode 100755 index 68c4b207e75..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPolyhedrizeAction.cxx +++ /dev/null @@ -1,169 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoPolyhedrizeAction.h" -#include "GeoModelKernel/GeoPolyhedron.h" -#include "GeoModelKernel/GeoShapeShift.h" -#include "GeoModelKernel/GeoShapeIntersection.h" -#include "GeoModelKernel/GeoShapeUnion.h" -#include "GeoModelKernel/GeoShapeSubtraction.h" -#include "GeoModelKernel/GeoBox.h" -#include "GeoModelKernel/GeoCons.h" -#include "GeoModelKernel/GeoPcon.h" -#include "GeoModelKernel/GeoPgon.h" -#include "GeoModelKernel/GeoTrap.h" -#include "GeoModelKernel/GeoTrd.h" -#include "GeoModelKernel/GeoTube.h" -#include "GeoModelKernel/GeoTubs.h" -#include "GeoModelKernel/GeoPara.h" - -GeoPolyhedrizeAction::GeoPolyhedrizeAction() - : m_polyhedron(nullptr) -{ - setDepthLimit(0); -} - -GeoPolyhedrizeAction::~GeoPolyhedrizeAction() -{ - delete m_polyhedron; -} - -void GeoPolyhedrizeAction::handleShift (const GeoShapeShift *shift) -{ - shift->getOp()->exec(this); - m_polyhedron->Transform (shift->getX().getRotation (), shift->getX().getTranslation()); -} - -void GeoPolyhedrizeAction::handleUnion (const GeoShapeUnion *unio) -{ - GeoPolyhedrizeAction auxA,auxB; - unio->getOpA()->exec(&auxA); - unio->getOpB()->exec(&auxB); - m_polyhedron = new GeoPolyhedron(auxA.getPolyhedron()->add(*auxB.getPolyhedron())); -} - -void GeoPolyhedrizeAction::handleIntersection (const GeoShapeIntersection *isect) -{ - GeoPolyhedrizeAction auxA,auxB; - isect->getOpA()->exec(&auxA); - isect->getOpB()->exec(&auxB); - m_polyhedron=new GeoPolyhedron(auxA.getPolyhedron()->intersect(*auxB.getPolyhedron())); -} - -void GeoPolyhedrizeAction::handleSubtraction (const GeoShapeSubtraction *subtract) -{ - GeoPolyhedrizeAction auxA,auxB; - subtract->getOpA()->exec(&auxA); - subtract->getOpB()->exec(&auxB); - m_polyhedron=new GeoPolyhedron(auxA.getPolyhedron()->subtract(*auxB.getPolyhedron())); -} - -void GeoPolyhedrizeAction::handleBox (const GeoBox *box) -{ - m_polyhedron=new GeoPolyhedronBox (box->getXHalfLength(), - box->getYHalfLength(), - box->getZHalfLength()); -} - -void GeoPolyhedrizeAction::handleCons (const GeoCons *cons) -{ - m_polyhedron = new GeoPolyhedronCons (cons->getRMin1(), - cons->getRMax1(), - cons->getRMin2(), - cons->getRMax2(), - cons->getDZ(), - cons->getSPhi(), - cons->getDPhi()); -} - -void GeoPolyhedrizeAction::handlePara (const GeoPara *para) -{ - m_polyhedron=new GeoPolyhedronPara(para->getXHalfLength(), - para->getYHalfLength(), - para->getZHalfLength(), - para->getAlpha(), - para->getTheta(), - para->getPhi()); -} - -void GeoPolyhedrizeAction::handlePcon (const GeoPcon *pcon) -{ - double *z = new double[pcon->getNPlanes ()]; - double *rmn = new double[pcon->getNPlanes ()]; - double *rmx = new double[pcon->getNPlanes ()]; - - for (unsigned int s = 0; s < pcon->getNPlanes (); s++) - { - z[s] = pcon->getZPlane (s); - rmn[s] = pcon->getRMinPlane (s); - rmx[s] = pcon->getRMaxPlane (s); - } - m_polyhedron = new GeoPolyhedronPcon (pcon->getSPhi(), pcon->getDPhi(), pcon->getNPlanes (), z, rmn, rmx); - - delete[]z; - delete[]rmn; - delete[]rmx; -} - -void GeoPolyhedrizeAction::handlePgon (const GeoPgon *pgon) -{ - double *z = new double[pgon->getNPlanes ()]; - double *rmn = new double[pgon->getNPlanes ()]; - double *rmx = new double[pgon->getNPlanes ()]; - - for (unsigned int s = 0; s < pgon->getNPlanes (); s++) - { - z[s] = pgon->getZPlane (s); - rmn[s] = pgon->getRMinPlane (s); - rmx[s] = pgon->getRMaxPlane (s); - } - m_polyhedron = new GeoPolyhedronPgon (pgon->getSPhi(), pgon->getDPhi(), pgon->getNSides(), pgon->getNPlanes (), z, rmn, rmx); - - delete[]z; - delete[]rmn; - delete[]rmx; -} - -void GeoPolyhedrizeAction::handleTrap (const GeoTrap *trap) -{ - m_polyhedron = new GeoPolyhedronTrap (trap->getZHalfLength(), - trap->getTheta(), - trap->getPhi(), - trap->getDydzn(), - trap->getDxdyndzn(), - trap->getDxdypdzn(), 0, - trap->getDydzp(), - trap->getDxdyndzp(), - trap->getDxdypdzp(),0); -} - -void GeoPolyhedrizeAction::handleTrd (const GeoTrd *trd) -{ - m_polyhedron = new GeoPolyhedronTrd2 (trd->getXHalfLength1(), - trd->getXHalfLength2(), - trd->getYHalfLength1(), - trd->getYHalfLength2(), - trd->getZHalfLength()); -} - -void GeoPolyhedrizeAction::handleTube (const GeoTube *tube) -{ - m_polyhedron = new GeoPolyhedronTube (tube->getRMin(), - tube->getRMax(), - tube->getZHalfLength()); -} - -void GeoPolyhedrizeAction::handleTubs (const GeoTubs *tubs) -{ - m_polyhedron= new GeoPolyhedronTubs (tubs->getRMin(), - tubs->getRMax(), - tubs->getZHalfLength(), - tubs->getSPhi(), - tubs->getDPhi()); -} - -const GeoPolyhedron * GeoPolyhedrizeAction::getPolyhedron () const -{ - return m_polyhedron; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPolyhedron.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPolyhedron.cxx deleted file mode 100755 index 9a3deb083a4..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPolyhedron.cxx +++ /dev/null @@ -1,2171 +0,0 @@ - -#include "GeoModelKernel/GeoPolyhedron.h" - -#include <iostream> -#include <vector> - -#define perMillion 0.000001 -#define deg (M_PI/180.0) - -#include <float.h> //G.Barrand : to have DBL_EPSILON on Windows. - -// G.Barrand : introduce iabs to avoid a mess with cmath and some compiler. -inline int -iabs (int a) -{ - return a < 0 ? -a : a; -} -inline float -ffabs (float a) -{ - return a < 0.0f ? -a : a; -} - -//--------------------------------------------------------------------// -// JFB: // -// GeoPolyhedron was GeoPolyhedron, retrofitted to GeoModel // -// infrastructure: // -//--------------------------------------------------------------------// - -// -// ******************************************************************** -// * DISCLAIMER * -// * * -// * The following disclaimer summarizes all the specific disclaimers * -// * of contributors to this software. The specific disclaimers,which * -// * govern, are listed with their locations in: * -// * http://cern.ch/geant4/license * -// * * -// * Neither the authors of this software system, nor their employing * -// * institutes,nor the agencies providing financial support for this * -// * work make any representation or warranty, express or implied, * -// * regarding this software system or assume any liability for its * -// * use. * -// * * -// * This code implementation is the intellectual property of the * -// * GEANT4 collaboration. * -// * By copying, distributing or modifying the Program (or any work * -// * based on the Program) you indicate your acceptance of this * -// * statement, and all its terms. * -// ******************************************************************** -// -// -// -// -// G4 Polyhedron library -// -// History: -// 23.07.96 E.Chernyaev <Evgueni.Tcherniaev@cern.ch> - initial version -// -// 30.09.96 E.Chernyaev -// - added GetNextVertexIndex, GetVertex by Yasuhide Sawada -// - added GetNextUnitNormal, GetNextEdgeIndeces, GetNextEdge -// -// 15.12.96 E.Chernyaev -// - added GetNumberOfRotationSteps, RotateEdge, RotateAroundZ, SetReferences -// - rewritten G4PolyhedronCons; -// - added G4PolyhedronPara, ...Trap, ...Pgon, ...Pcon, ...Sphere, ...Torus -// -// 01.06.97 E.Chernyaev -// - modified RotateAroundZ, added SetSideFacets -// -// 19.03.00 E.Chernyaev -// - implemented boolean operations (add, subtract, intersect) on polyhedra; -// -// 25.05.01 E.Chernyaev -// - added GetSurfaceArea() and GetVolume(); -// - - -/*********************************************************************** - * * - * Name: GeoPolyhedron operator << Date: 09.05.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Print contents of G4 polyhedron * - * * - ***********************************************************************/ -std::ostream & operator<< (std::ostream & ostr, const GeoFacet & facet) -{ - for (int k = 0; k < 4; k++) - { - ostr << " " << facet.m_edge[k].v << "/" << facet.m_edge[k].f; - } - return ostr; -} - -std::ostream & operator<< (std::ostream & ostr, const GeoPolyhedron & ph) -{ - ostr << std::endl; - ostr << "Nverteces=" << ph.m_nvert << ", Nfacets=" << ph.m_nface << std::endl; - int i; - for (i = 1; i <= ph.m_nvert; i++) - { - ostr << "xyz(" << i << ")=" - << ph.m_pV[i][0] << ' ' << ph.m_pV[i][1] << ' ' << ph.m_pV[i][2] - << std::endl; - } - for (i = 1; i <= ph.m_nface; i++) - { - ostr << "face(" << i << ")=" << ph.m_pF[i] << std::endl; - } - return ostr; -} - -GeoPolyhedron::GeoPolyhedron (const GeoPolyhedron & from) -/*********************************************************************** - * * - * Name: GeoPolyhedron copy constructor Date: 23.07.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - ***********************************************************************/ -{ - if (from.m_nvert > 0 && from.m_nface > 0) - { - m_nvert = from.m_nvert; - m_nface = from.m_nface; - m_pV = new HVPoint3D[m_nvert + 1]; - m_pF = new GeoFacet[m_nface + 1]; - int i; - for (i = 0; i <= m_nvert; i++) - m_pV[i] = from.m_pV[i]; - for (i = 0; i <= m_nface; i++) - m_pF[i] = from.m_pF[i]; - } - else - { - m_nvert = 0; - m_nface = 0; - m_pV = 0; - m_pF = 0; - } -} - -GeoPolyhedron & GeoPolyhedron::operator= (const GeoPolyhedron & from) -/*********************************************************************** - * * - * Name: GeoPolyhedron operator = Date: 23.07.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Copy contents of one GEANT4 polyhedron to another * - * * - ***********************************************************************/ -{ - if (this == &from) - return *this; - delete[]m_pV; - delete[]m_pF; - if (from.m_nvert > 0 && from.m_nface > 0) - { - m_nvert = from.m_nvert; - m_nface = from.m_nface; - m_pV = new HVPoint3D[m_nvert + 1]; - m_pF = new GeoFacet[m_nface + 1]; - int - i; - for (i = 1; i <= m_nvert; i++) - m_pV[i] = from.m_pV[i]; - for (i = 1; i <= m_nface; i++) - m_pF[i] = from.m_pF[i]; - } - else - { - m_nvert = 0; - m_nface = 0; - m_pV = 0; - m_pF = 0; - } - return *this; -} - -int -GeoPolyhedron::FindNeighbour (int iFace, int iNode, int iOrder) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::FindNeighbour Date: 22.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Find neighbouring face * - * * - ***********************************************************************/ -{ - int i; - for (i = 0; i < 4; i++) - { - if (iNode == iabs (m_pF[iFace].m_edge[i].v)) - break; - } - if (i == 4) - { - std::cerr - << "GeoPolyhedron::FindNeighbour: face " << iFace - << " has no node " << iNode << std::endl; - return 0; - } - if (iOrder < 0) - { - if (--i < 0) - i = 3; - if (m_pF[iFace].m_edge[i].v == 0) - i = 2; - } - return (m_pF[iFace].m_edge[i].v > 0) ? 0 : m_pF[iFace].m_edge[i].f; -} - -HVNormal3D GeoPolyhedron::FindNodeNormal (int iFace, int iNode) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::FindNodeNormal Date: 22.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Find normal at given node * - * * - ***********************************************************************/ -{ - HVNormal3D - normal = - GetUnitNormal (iFace); - int - k = - iFace, - iOrder = - 1, - n = - 1; - - for (;;) - { - k = FindNeighbour (k, iNode, iOrder); - if (k == iFace) - break; - if (k > 0) - { - n++; - normal += GetUnitNormal (k); - } - else - { - if (iOrder < 0) - break; - k = iFace; - iOrder = -iOrder; - } - } - normal.setMag (1.0); - return normal; -} - -void -GeoPolyhedron::SetNumberOfRotationSteps (int n) -/*********************************************************************** - * * - * Name: GeoPolyhedron::SetNumberOfRotationSteps Date: 24.06.97 * - * Author: J.Allison (Manchester University) Revised: * - * * - * Function: Set number of steps for whole circle * - * * - ***********************************************************************/ -{ - const int nMin = 3; - if (n < nMin) - { - std::cerr - << "GeoPolyhedron::SetNumberOfRotationSteps: attempt to set the\n" - << "number of steps per circle < " << nMin << "; forced to " << nMin - << std::endl; - s_fNumberOfRotationSteps = nMin; - } - else - { - s_fNumberOfRotationSteps = n; - } -} - -void -GeoPolyhedron::AllocateMemory (int Nvert, int Nface) -/*********************************************************************** - * * - * Name: GeoPolyhedron::AllocateMemory Date: 19.06.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Allocate memory for GEANT4 polyhedron * - * * - * Input: Nvert - number of nodes * - * Nface - number of faces * - * * - ***********************************************************************/ -{ - m_nvert = Nvert; - m_nface = Nface; - m_pV = new HVPoint3D[m_nvert + 1]; - m_pF = new GeoFacet[m_nface + 1]; -} - -void -GeoPolyhedron::CreatePrism () -/*********************************************************************** - * * - * Name: GeoPolyhedron::CreatePrism Date: 15.07.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Set facets for a prism * - * * - ***********************************************************************/ -{ - enum - { DUMMY, BOTTOM, LEFT, BACK, RIGHT, FRONT, TOP }; - - m_pF[1] = GeoFacet (1, LEFT, 4, BACK, 3, RIGHT, 2, FRONT); - m_pF[2] = GeoFacet (5, TOP, 8, BACK, 4, BOTTOM, 1, FRONT); - m_pF[3] = GeoFacet (8, TOP, 7, RIGHT, 3, BOTTOM, 4, LEFT); - m_pF[4] = GeoFacet (7, TOP, 6, FRONT, 2, BOTTOM, 3, BACK); - m_pF[5] = GeoFacet (6, TOP, 5, LEFT, 1, BOTTOM, 2, RIGHT); - m_pF[6] = GeoFacet (5, FRONT, 6, RIGHT, 7, BACK, 8, LEFT); -} - -void -GeoPolyhedron::RotateEdge (int k1, int k2, double r1, double r2, - int v1, int v2, int vEdge, - bool ifWholeCircle, int ns, int &kface) -/*********************************************************************** - * * - * Name: GeoPolyhedron::RotateEdge Date: 05.12.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Create set of facets by rotation of an edge around Z-axis * - * * - * Input: k1, k2 - end vertices of the edge * - * r1, r2 - radiuses of the end vertices * - * v1, v2 - visibility of edges produced by rotation of the end * - * vertices * - * vEdge - visibility of the edge * - * ifWholeCircle - is true in case of whole circle rotation * - * ns - number of discrete steps * - * r[] - r-coordinates * - * kface - current free cell in the m_pF array * - * * - ***********************************************************************/ -{ - if (r1 == 0. && r2 == 0) - return; - - int i; - int i1 = k1; - int i2 = k2; - int ii1 = ifWholeCircle ? i1 : i1 + ns; - int ii2 = ifWholeCircle ? i2 : i2 + ns; - int vv = ifWholeCircle ? vEdge : 1; - - if (ns == 1) - { - if (r1 == 0.) - { - m_pF[kface++] = GeoFacet (i1, 0, v2 * i2, 0, (i2 + 1), 0); - } - else if (r2 == 0.) - { - m_pF[kface++] = GeoFacet (i1, 0, i2, 0, v1 * (i1 + 1), 0); - } - else - { - m_pF[kface++] = - GeoFacet (i1, 0, v2 * i2, 0, (i2 + 1), 0, v1 * (i1 + 1), 0); - } - } - else - { - if (r1 == 0.) - { - m_pF[kface++] = - GeoFacet (vv * i1, 0, v2 * i2, 0, vEdge * (i2 + 1), 0); - for (i2++, i = 1; i < ns - 1; i2++, i++) - { - m_pF[kface++] = - GeoFacet (vEdge * i1, 0, v2 * i2, 0, vEdge * (i2 + 1), 0); - } - m_pF[kface++] = GeoFacet (vEdge * i1, 0, v2 * i2, 0, vv * ii2, 0); - } - else if (r2 == 0.) - { - m_pF[kface++] = - GeoFacet (vv * i1, 0, vEdge * i2, 0, v1 * (i1 + 1), 0); - for (i1++, i = 1; i < ns - 1; i1++, i++) - { - m_pF[kface++] = - GeoFacet (vEdge * i1, 0, vEdge * i2, 0, v1 * (i1 + 1), 0); - } - m_pF[kface++] = GeoFacet (vEdge * i1, 0, vv * i2, 0, v1 * ii1, 0); - } - else - { - m_pF[kface++] = - GeoFacet (vv * i1, 0, v2 * i2, 0, vEdge * (i2 + 1), 0, - v1 * (i1 + 1), 0); - for (i1++, i2++, i = 1; i < ns - 1; i1++, i2++, i++) - { - m_pF[kface++] = - GeoFacet (vEdge * i1, 0, v2 * i2, 0, vEdge * (i2 + 1), 0, - v1 * (i1 + 1), 0); - } - m_pF[kface++] = - GeoFacet (vEdge * i1, 0, v2 * i2, 0, vv * ii2, 0, v1 * ii1, 0); - } - } -} - -void -GeoPolyhedron::SetSideFacets (int ii[4], int vv[4], - int *kk, double *r, - double dphi, int ns, int &kface) -/*********************************************************************** - * * - * Name: GeoPolyhedron::SetSideFacets Date: 20.05.97 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Set side facets for the case of incomplete rotation * - * * - * Input: ii[4] - indeces of original verteces * - * vv[4] - visibility of edges * - * kk[] - indeces of nodes * - * r[] - radiuses * - * dphi - delta phi * - * ns - number of discrete steps * - * kface - current free cell in the pF array * - * * - ***********************************************************************/ -{ - int k1, k2, k3, k4; - if (fabs (dphi - M_PI) < perMillion) - { // half a circle - for (int i = 0; i < 4; i++) - { - k1 = ii[i]; - k2 = (i == 3) ? ii[0] : ii[i + 1]; - if (r[k1] == 0. && r[k2] == 0.) - vv[i] = -1; - } - } - - if (ii[1] == ii[2]) - { - k1 = kk[ii[0]]; - k2 = kk[ii[2]]; - k3 = kk[ii[3]]; - m_pF[kface++] = GeoFacet (vv[0] * k1, 0, vv[2] * k2, 0, vv[3] * k3, 0); - if (r[ii[0]] != 0.) - k1 += ns; - if (r[ii[2]] != 0.) - k2 += ns; - if (r[ii[3]] != 0.) - k3 += ns; - m_pF[kface++] = GeoFacet (vv[2] * k3, 0, vv[0] * k2, 0, vv[3] * k1, 0); - } - else if (kk[ii[0]] == kk[ii[1]]) - { - k1 = kk[ii[0]]; - k2 = kk[ii[2]]; - k3 = kk[ii[3]]; - m_pF[kface++] = GeoFacet (vv[1] * k1, 0, vv[2] * k2, 0, vv[3] * k3, 0); - if (r[ii[0]] != 0.) - k1 += ns; - if (r[ii[2]] != 0.) - k2 += ns; - if (r[ii[3]] != 0.) - k3 += ns; - m_pF[kface++] = GeoFacet (vv[2] * k3, 0, vv[1] * k2, 0, vv[3] * k1, 0); - } - else if (kk[ii[2]] == kk[ii[3]]) - { - k1 = kk[ii[0]]; - k2 = kk[ii[1]]; - k3 = kk[ii[2]]; - m_pF[kface++] = GeoFacet (vv[0] * k1, 0, vv[1] * k2, 0, vv[3] * k3, 0); - if (r[ii[0]] != 0.) - k1 += ns; - if (r[ii[1]] != 0.) - k2 += ns; - if (r[ii[2]] != 0.) - k3 += ns; - m_pF[kface++] = GeoFacet (vv[1] * k3, 0, vv[0] * k2, 0, vv[3] * k1, 0); - } - else - { - k1 = kk[ii[0]]; - k2 = kk[ii[1]]; - k3 = kk[ii[2]]; - k4 = kk[ii[3]]; - m_pF[kface++] = - GeoFacet (vv[0] * k1, 0, vv[1] * k2, 0, vv[2] * k3, 0, vv[3] * k4, 0); - if (r[ii[0]] != 0.) - k1 += ns; - if (r[ii[1]] != 0.) - k2 += ns; - if (r[ii[2]] != 0.) - k3 += ns; - if (r[ii[3]] != 0.) - k4 += ns; - m_pF[kface++] = - GeoFacet (vv[2] * k4, 0, vv[1] * k3, 0, vv[0] * k2, 0, vv[3] * k1, 0); - } -} - -void -GeoPolyhedron::RotateAroundZ (int nstep, double phi, double dphi, - int np1, int np2, - const double *z, double *r, - int nodeVis, int edgeVis) -/*********************************************************************** - * * - * Name: GeoPolyhedron::RotateAroundZ Date: 27.11.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Create GeoPolyhedron for a solid produced by rotation of * - * two polylines around Z-axis * - * * - * Input: nstep - number of discrete steps, if 0 then default * - * phi - starting phi angle * - * dphi - delta phi * - * np1 - number of points in external polyline * - * (must be negative in case of closed polyline) * - * np2 - number of points in internal polyline (may be 1) * - * z[] - z-coordinates (+z >>> -z for both polylines) * - * r[] - r-coordinates * - * nodeVis - how to Draw edges joing consecutive positions of * - * node during rotation * - * edgeVis - how to Draw edges * - * * - ***********************************************************************/ -{ - static double wholeCircle = 2 * M_PI; - - // S E T R O T A T I O N P A R A M E T E R S - - bool ifWholeCircle = (fabs (dphi - wholeCircle) < perMillion) ? - true : false; - double delPhi = ifWholeCircle ? wholeCircle : dphi; - int nSphi = (nstep > 0) ? - nstep : int (delPhi * GetNumberOfRotationSteps () / wholeCircle + .5); - if (nSphi == 0) - nSphi = 1; - int nVphi = ifWholeCircle ? nSphi : nSphi + 1; - bool ifClosed = np1 > 0 ? false : true; - - // C O U N T V E R T E C E S - - int absNp1 = iabs (np1); - int absNp2 = iabs (np2); - int i1beg = 0; - int i1end = absNp1 - 1; - int i2beg = absNp1; - int i2end = absNp1 + absNp2 - 1; - int i, j, k; - - for (i = i1beg; i <= i2end; i++) - { - if (fabs (r[i]) < perMillion) - r[i] = 0.; - } - - j = 0; // external nodes - for (i = i1beg; i <= i1end; i++) - { - j += (r[i] == 0.) ? 1 : nVphi; - } - - bool ifSide1 = false; // internal nodes - bool ifSide2 = false; - - if (r[i2beg] != r[i1beg] || z[i2beg] != z[i1beg]) - { - j += (r[i2beg] == 0.) ? 1 : nVphi; - ifSide1 = true; - } - - for (i = i2beg + 1; i < i2end; i++) - { - j += (r[i] == 0.) ? 1 : nVphi; - } - - if (r[i2end] != r[i1end] || z[i2end] != z[i1end]) - { - if (absNp2 > 1) - j += (r[i2end] == 0.) ? 1 : nVphi; - ifSide2 = true; - } - - // C O U N T F A C E S - - k = ifClosed ? absNp1 * nSphi : (absNp1 - 1) * nSphi; // external faces - - if (absNp2 > 1) - { // internal faces - for (i = i2beg; i < i2end; i++) - { - if (r[i] > 0. || r[i + 1] > 0.) - k += nSphi; - } - - if (ifClosed) - { - if (r[i2end] > 0. || r[i2beg] > 0.) - k += nSphi; - } - } - - if (!ifClosed) - { // side faces - if (ifSide1 && (r[i1beg] > 0. || r[i2beg] > 0.)) - k += nSphi; - if (ifSide2 && (r[i1end] > 0. || r[i2end] > 0.)) - k += nSphi; - } - - if (!ifWholeCircle) - { // phi_side faces - k += ifClosed ? 2 * absNp1 : 2 * (absNp1 - 1); - } - - // A L L O C A T E M E M O R Y - - AllocateMemory (j, k); - - // G E N E R A T E V E R T E C E S - - int *kk; - kk = new int[absNp1 + absNp2]; - - k = 1; - for (i = i1beg; i <= i1end; i++) - { - kk[i] = k; - if (r[i] == 0.) - { - m_pV[k++] = HVPoint3D (0, 0, z[i]); - } - else - { - k += nVphi; - } - } - - i = i2beg; - if (ifSide1) - { - kk[i] = k; - if (r[i] == 0.) - { - m_pV[k++] = HVPoint3D (0, 0, z[i]); - } - else - { - k += nVphi; - } - } - else - { - kk[i] = kk[i1beg]; - } - - for (i = i2beg + 1; i < i2end; i++) - { - kk[i] = k; - if (r[i] == 0.) - { - m_pV[k++] = HVPoint3D (0, 0, z[i]); - } - else - { - k += nVphi; - } - } - - if (absNp2 > 1) - { - i = i2end; - if (ifSide2) - { - kk[i] = k; - if (r[i] == 0.) - m_pV[k] = HVPoint3D (0, 0, z[i]); - } - else - { - kk[i] = kk[i1end]; - } - } - - double cosPhi, sinPhi; - - double fac = delPhi / nSphi; - for (j = 0; j < nVphi; j++) - { - cosPhi = cos (phi + j * fac); - sinPhi = sin (phi + j * fac); - for (i = i1beg; i <= i2end; i++) - { - if (r[i] != 0.) - m_pV[kk[i] + j] = HVPoint3D (r[i] * cosPhi, r[i] * sinPhi, z[i]); - } - } - - // G E N E R A T E E X T E R N A L F A C E S - - int v1, v2; - - k = 1; - v2 = ifClosed ? nodeVis : 1; - for (i = i1beg; i < i1end; i++) - { - v1 = v2; - if (!ifClosed && i == i1end - 1) - { - v2 = 1; - } - else - { - v2 = (r[i] == r[i + 1] && r[i + 1] == r[i + 2]) ? -1 : nodeVis; - } - RotateEdge (kk[i], kk[i + 1], r[i], r[i + 1], v1, v2, - edgeVis, ifWholeCircle, nSphi, k); - } - if (ifClosed) - { - RotateEdge (kk[i1end], kk[i1beg], r[i1end], r[i1beg], nodeVis, nodeVis, - edgeVis, ifWholeCircle, nSphi, k); - } - - // G E N E R A T E I N T E R N A L F A C E S - - if (absNp2 > 1) - { - v2 = ifClosed ? nodeVis : 1; - for (i = i2beg; i < i2end; i++) - { - v1 = v2; - if (!ifClosed && i == i2end - 1) - { - v2 = 1; - } - else - { - v2 = (r[i] == r[i + 1] && r[i + 1] == r[i + 2]) ? -1 : nodeVis; - } - RotateEdge (kk[i + 1], kk[i], r[i + 1], r[i], v2, v1, - edgeVis, ifWholeCircle, nSphi, k); - } - if (ifClosed) - { - RotateEdge (kk[i2beg], kk[i2end], r[i2beg], r[i2end], nodeVis, - nodeVis, edgeVis, ifWholeCircle, nSphi, k); - } - } - - // G E N E R A T E S I D E F A C E S - - if (!ifClosed) - { - if (ifSide1) - { - RotateEdge (kk[i2beg], kk[i1beg], r[i2beg], r[i1beg], 1, 1, - -1, ifWholeCircle, nSphi, k); - } - if (ifSide2) - { - RotateEdge (kk[i1end], kk[i2end], r[i1end], r[i2end], 1, 1, - -1, ifWholeCircle, nSphi, k); - } - } - - // G E N E R A T E S I D E F A C E S for the case of incomplete circle - - if (!ifWholeCircle) - { - - int ii[4], vv[4]; - - if (ifClosed) - { - for (i = i1beg; i <= i1end; i++) - { - ii[0] = i; - ii[3] = (i == i1end) ? i1beg : i + 1; - ii[1] = (absNp2 == 1) ? i2beg : ii[0] + absNp1; - ii[2] = (absNp2 == 1) ? i2beg : ii[3] + absNp1; - vv[0] = -1; - vv[1] = 1; - vv[2] = -1; - vv[3] = 1; - SetSideFacets (ii, vv, kk, r, dphi, nSphi, k); - } - } - else - { - for (i = i1beg; i < i1end; i++) - { - ii[0] = i; - ii[3] = i + 1; - ii[1] = (absNp2 == 1) ? i2beg : ii[0] + absNp1; - ii[2] = (absNp2 == 1) ? i2beg : ii[3] + absNp1; - vv[0] = (i == i1beg) ? 1 : -1; - vv[1] = 1; - vv[2] = (i == i1end - 1) ? 1 : -1; - vv[3] = 1; - SetSideFacets (ii, vv, kk, r, dphi, nSphi, k); - } - } - } - - delete[]kk; - - if (k - 1 != m_nface) - { - std::cerr - << "Polyhedron::RotateAroundZ: number of generated faces (" - << k - 1 << ") is not equal to the number of allocated faces (" - << m_nface << ")" << std::endl; - } -} - -void -GeoPolyhedron::SetReferences () -/*********************************************************************** - * * - * Name: GeoPolyhedron::SetReferences Date: 04.12.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: For each edge set reference to neighbouring facet * - * * - ***********************************************************************/ -{ - if (m_nface <= 0) - return; - - struct edgeListMember - { - edgeListMember *next; - int v2; - int iface; - int iedge; - } - *edgeList, *freeList, **headList; - - - // A L L O C A T E A N D I N I T I A T E L I S T S - - edgeList = new edgeListMember[2 * m_nface]; - headList = new edgeListMember *[m_nvert]; - - int i; - for (i = 0; i < m_nvert; i++) - { - headList[i] = 0; - } - freeList = edgeList; - for (i = 0; i < 2 * m_nface - 1; i++) - { - edgeList[i].next = &edgeList[i + 1]; - } - edgeList[2 * m_nface - 1].next = 0; - - // L O O P A L O N G E D G E S - - int iface, iedge, nedge, i1, i2, k1, k2; - edgeListMember *prev, *cur; - - for (iface = 1; iface <= m_nface; iface++) - { - nedge = (m_pF[iface].m_edge[3].v == 0) ? 3 : 4; - for (iedge = 0; iedge < nedge; iedge++) - { - i1 = iedge; - i2 = (iedge < nedge - 1) ? iedge + 1 : 0; - i1 = iabs (m_pF[iface].m_edge[i1].v); - i2 = iabs (m_pF[iface].m_edge[i2].v); - k1 = (i1 < i2) ? i1 : i2; // k1 = ::min(i1,i2); - k2 = (i1 > i2) ? i1 : i2; // k2 = ::max(i1,i2); - - // check head of the List corresponding to k1 - cur = headList[k1]; - if (cur == 0) - { - headList[k1] = freeList; - freeList = freeList->next; - cur = headList[k1]; - cur->next = 0; - cur->v2 = k2; - cur->iface = iface; - cur->iedge = iedge; - continue; - } - - if (cur->v2 == k2) - { - headList[k1] = cur->next; - cur->next = freeList; - freeList = cur; - m_pF[iface].m_edge[iedge].f = cur->iface; - m_pF[cur->iface].m_edge[cur->iedge].f = iface; - i1 = (m_pF[iface].m_edge[iedge].v < 0) ? -1 : 1; - i2 = (m_pF[cur->iface].m_edge[cur->iedge].v < 0) ? -1 : 1; - if (i1 != i2) - { - std::cerr - << "Polyhedron::SetReferences: different edge visibility " - << iface << "/" << iedge << "/" - << m_pF[iface].m_edge[iedge].v << " and " - << cur->iface << "/" << cur->iedge << "/" - << m_pF[cur->iface].m_edge[cur->iedge].v << std::endl; - } - continue; - } - - // check List itself - for (;;) - { - prev = cur; - cur = prev->next; - if (cur == 0) - { - prev->next = freeList; - freeList = freeList->next; - cur = prev->next; - cur->next = 0; - cur->v2 = k2; - cur->iface = iface; - cur->iedge = iedge; - break; - } - - if (cur->v2 == k2) - { - prev->next = cur->next; - cur->next = freeList; - freeList = cur; - m_pF[iface].m_edge[iedge].f = cur->iface; - m_pF[cur->iface].m_edge[cur->iedge].f = iface; - i1 = (m_pF[iface].m_edge[iedge].v < 0) ? -1 : 1; - i2 = (m_pF[cur->iface].m_edge[cur->iedge].v < 0) ? -1 : 1; - if (i1 != i2) - { - std::cerr - << - "Polyhedron::SetReferences: different edge visibility " - << iface << "/" << iedge << "/" << m_pF[iface]. - m_edge[iedge].v << " and " << cur->iface << "/" << cur-> - iedge << "/" << m_pF[cur->iface].m_edge[cur->iedge]. - v << std::endl; - } - break; - } - } - } - } - - // C H E C K T H A T A L L L I S T S A R E E M P T Y - - for (i = 0; i < m_nvert; i++) - { - if (headList[i] != 0) - { - std::cerr - << "Polyhedron::SetReferences: List " << i << " is not empty" - << std::endl; - } - } - - // F R E E M E M O R Y - - delete[]edgeList; - delete[]headList; -} - -void -GeoPolyhedron::InvertFacets () -/*********************************************************************** - * * - * Name: GeoPolyhedron::InvertFacets Date: 01.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Invert the order of the nodes in the facets * - * * - ***********************************************************************/ -{ - if (m_nface <= 0) - return; - int i, k, nnode, v[4]={0}, f[4]={0}; - for (i = 1; i <= m_nface; i++) - { - nnode = (m_pF[i].m_edge[3].v == 0) ? 3 : 4; - for (k = 0; k < nnode; k++) - { - v[k] = (k + 1 == nnode) ? m_pF[i].m_edge[0].v : m_pF[i].m_edge[k + 1].v; - if (v[k] * m_pF[i].m_edge[k].v < 0) - v[k] = -v[k]; - f[k] = m_pF[i].m_edge[k].f; - } - for (k = 0; k < nnode; k++) - { - m_pF[i].m_edge[nnode - 1 - k].v = v[k]; - m_pF[i].m_edge[nnode - 1 - k].f = f[k]; - } - } -} - -GeoPolyhedron & GeoPolyhedron::Transform (const HVRotation & rotation, - const HVVector3D & translation) -/*********************************************************************** - * * - * Name: GeoPolyhedron::Transform Date: 01.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Make transformation of the polyhedron * - * * - ***********************************************************************/ -{ - if (m_nvert > 0) - { - for (int i = 1; i <= m_nvert; i++) - { - m_pV[i] = rotation * m_pV[i] + translation; - } - - // C H E C K D E T E R M I N A N T A N D - // I N V E R T F A C E T S I F I T I S N E G A T I V E - - HVVector3D x = rotation * HVVector3D (1, 0, 0); - HVVector3D y = rotation * HVVector3D (0, 1, 0); - HVVector3D z = rotation * HVVector3D (0, 0, 1); - if ((x.cross (y)).dot (z) < 0) - InvertFacets (); - } - return *this; -} - -bool GeoPolyhedron::GetNextVertexIndex (int &index, int &edgeFlag) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextVertexIndex Date: 03.09.96 * - * Author: Yasuhide Sawada Revised: * - * * - * Function: * - * * - ***********************************************************************/ -{ - static int - iFace = - 1; - static int - iQVertex = - 0; - int - vIndex = - m_pF[iFace]. - m_edge[iQVertex]. - v; - - edgeFlag = (vIndex > 0) ? 1 : 0; - index = iabs (vIndex); - - if (iQVertex >= 3 || m_pF[iFace].m_edge[iQVertex + 1].v == 0) - { - iQVertex = 0; - if (++iFace > m_nface) - iFace = 1; - return false; // Last Edge - } - else - { - ++iQVertex; - return true; // not Last Edge - } -} - -HVPoint3D GeoPolyhedron::GetVertex (int index) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetVertex Date: 03.09.96 * - * Author: Yasuhide Sawada Revised: 17.11.99 * - * * - * Function: Get vertex of the index. * - * * - ***********************************************************************/ -{ - if (index <= 0 || index > m_nvert) - { - std::cerr - << "GeoPolyhedron::GetVertex: irrelevant index " << index - << std::endl; - return HVPoint3D (); - } - return m_pV[index]; -} - -bool -GeoPolyhedron::GetNextVertex (HVPoint3D & vertex, int &edgeFlag) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextVertex Date: 22.07.96 * - * Author: John Allison Revised: * - * * - * Function: Get vertices of the quadrilaterals in order for each * - * face in face order. Returns false when finished each * - * face. * - * * - ***********************************************************************/ -{ - int index; - bool rep = GetNextVertexIndex (index, edgeFlag); - vertex = m_pV[index]; - return rep; -} - -bool - GeoPolyhedron::GetNextVertex (HVPoint3D & vertex, int &edgeFlag, - HVNormal3D & normal) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextVertex Date: 26.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get vertices with normals of the quadrilaterals in order * - * for each face in face order. * - * Returns false when finished each face. * - * * - ***********************************************************************/ -{ - static int iFace = 1; - static int iNode = 0; - - if (m_nface == 0) - return false; // empty polyhedron - - int k = m_pF[iFace].m_edge[iNode].v; - if (k > 0) - { - edgeFlag = 1; - } - else - { - edgeFlag = -1; - k = -k; - } - vertex = m_pV[k]; - normal = FindNodeNormal (iFace, k); - if (iNode >= 3 || m_pF[iFace].m_edge[iNode + 1].v == 0) - { - iNode = 0; - if (++iFace > m_nface) - iFace = 1; - return false; // last node - } - else - { - ++iNode; - return true; // not last node - } -} - -bool - GeoPolyhedron::GetNextEdgeIndeces (int &i1, int &i2, int &edgeFlag, - int &iface1, int &iface2) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextEdgeIndeces Date: 30.09.96 * - * Author: E.Chernyaev Revised: 17.11.99 * - * * - * Function: Get indeces of the next edge together with indeces of * - * of the faces which share the edge. * - * Returns false when the last edge. * - * * - ***********************************************************************/ -{ - static int iFace = 1; - static int iQVertex = 0; - static int iOrder = 1; - int k1, k2, kflag, kface1, kface2; - - if (iFace == 1 && iQVertex == 0) - { - k2 = m_pF[m_nface].m_edge[0].v; - k1 = m_pF[m_nface].m_edge[3].v; - if (k1 == 0) - k1 = m_pF[m_nface].m_edge[2].v; - if (iabs (k1) > iabs (k2)) - iOrder = -1; - } - - do - { - k1 = m_pF[iFace].m_edge[iQVertex].v; - kflag = k1; - k1 = iabs (k1); - kface1 = iFace; - kface2 = m_pF[iFace].m_edge[iQVertex].f; - if (iQVertex >= 3 || m_pF[iFace].m_edge[iQVertex + 1].v == 0) - { - iQVertex = 0; - k2 = iabs (m_pF[iFace].m_edge[iQVertex].v); - iFace++; - } - else - { - iQVertex++; - k2 = iabs (m_pF[iFace].m_edge[iQVertex].v); - } - } - while (iOrder * k1 > iOrder * k2); - - i1 = k1; - i2 = k2; - edgeFlag = (kflag > 0) ? 1 : 0; - iface1 = kface1; - iface2 = kface2; - - if (iFace > m_nface) - { - iFace = 1; - iOrder = 1; - return false; - } - else - { - return true; - } -} - -bool -GeoPolyhedron::GetNextEdgeIndeces (int &i1, int &i2, int &edgeFlag) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextEdgeIndeces Date: 17.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get indeces of the next edge. * - * Returns false when the last edge. * - * * - ***********************************************************************/ -{ - int kface1, kface2; - return GetNextEdgeIndeces (i1, i2, edgeFlag, kface1, kface2); -} - -bool - GeoPolyhedron::GetNextEdge (HVPoint3D & p1, - HVPoint3D & p2, int &edgeFlag) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextEdge Date: 30.09.96 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get next edge. * - * Returns false when the last edge. * - * * - ***********************************************************************/ -{ - int i1, i2; - bool rep = GetNextEdgeIndeces (i1, i2, edgeFlag); - p1 = m_pV[i1]; - p2 = m_pV[i2]; - return rep; -} - -bool - GeoPolyhedron::GetNextEdge (HVPoint3D & p1, HVPoint3D & p2, - int &edgeFlag, int &iface1, int &iface2) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextEdge Date: 17.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get next edge with indeces of the faces which share * - * the edge. * - * Returns false when the last edge. * - * * - ***********************************************************************/ -{ - int i1, i2; - bool rep = GetNextEdgeIndeces (i1, i2, edgeFlag, iface1, iface2); - p1 = m_pV[i1]; - p2 = m_pV[i2]; - return rep; -} - -void -GeoPolyhedron::GetFacet (int iFace, int &n, int *iNodes, - int *edgeFlags, int *iFaces) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetFacet Date: 15.12.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get face by index * - * * - ***********************************************************************/ -{ - if (iFace < 1 || iFace > m_nface) - { - std::cerr - << "GeoPolyhedron::GetFacet: irrelevant index " << iFace << std::endl; - n = 0; - } - else - { - int i, k; - for (i = 0; i < 4; i++) - { - k = m_pF[iFace].m_edge[i].v; - if (k == 0) - break; - if (iFaces != 0) - iFaces[i] = m_pF[iFace].m_edge[i].f; - if (k > 0) - { - iNodes[i] = k; - if (edgeFlags != 0) - edgeFlags[i] = 1; - } - else - { - iNodes[i] = -k; - if (edgeFlags != 0) - edgeFlags[i] = -1; - } - } - n = i; - } -} - -void -GeoPolyhedron::GetFacet (int index, int &n, HVPoint3D * nodes, - int *edgeFlags, HVNormal3D * normals) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetFacet Date: 17.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get face by index * - * * - ***********************************************************************/ -{ - int iNodes[4]; - GetFacet (index, n, iNodes, edgeFlags); - if (n != 0) - { - for (int i = 0; i < 4; i++) - { - nodes[i] = m_pV[iNodes[i]]; - if (normals != 0) - normals[i] = FindNodeNormal (index, iNodes[i]); - } - } -} - -bool - GeoPolyhedron::GetNextFacet (int &n, HVPoint3D * nodes, - int *edgeFlags, HVNormal3D * normals) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextFacet Date: 19.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get next face with normals of unit length at the nodes. * - * Returns false when finished all faces. * - * * - ***********************************************************************/ -{ - static int iFace = 1; - - if (edgeFlags == 0) - { - GetFacet (iFace, n, nodes); - } - else if (normals == 0) - { - GetFacet (iFace, n, nodes, edgeFlags); - } - else - { - GetFacet (iFace, n, nodes, edgeFlags, normals); - } - - if (++iFace > m_nface) - { - iFace = 1; - return false; - } - else - { - return true; - } -} - -HVNormal3D GeoPolyhedron::GetNormal (int iFace) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNormal Date: 19.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get normal of the face given by index * - * * - ***********************************************************************/ -{ - if (iFace < 1 || iFace > m_nface) - { - std::cerr - << "GeoPolyhedron::GetNormal: irrelevant index " << iFace - << std::endl; - return HVNormal3D (); - } - - int - i0 = - iabs (m_pF[iFace].m_edge[0].v); - int - i1 = - iabs (m_pF[iFace].m_edge[1].v); - int - i2 = - iabs (m_pF[iFace].m_edge[2].v); - int - i3 = - iabs (m_pF[iFace].m_edge[3].v); - if (i3 == 0) - i3 = i0; - return (m_pV[i2] - m_pV[i0]).cross (m_pV[i3] - m_pV[i1]); -} - -HVNormal3D GeoPolyhedron::GetUnitNormal (int iFace) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNormal Date: 19.11.99 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get unit normal of the face given by index * - * * - ***********************************************************************/ -{ - if (iFace < 1 || iFace > m_nface) - { - std::cerr - << "GeoPolyhedron::GetUnitNormal: irrelevant index " << iFace - << std::endl; - return HVNormal3D (); - } - - int - i0 = - iabs (m_pF[iFace].m_edge[0].v); - int - i1 = - iabs (m_pF[iFace].m_edge[1].v); - int - i2 = - iabs (m_pF[iFace].m_edge[2].v); - int - i3 = - iabs (m_pF[iFace].m_edge[3].v); - if (i3 == 0) - i3 = i0; - HVNormal3D - nm = (m_pV[i2] - m_pV[i0]). - cross (m_pV[i3] - m_pV[i1]); - nm.setMag (1.0); - return nm; -} - -bool GeoPolyhedron::GetNextNormal (HVNormal3D & normal) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextNormal Date: 22.07.96 * - * Author: John Allison Revised: 19.11.99 * - * * - * Function: Get normals of each face in face order. Returns false * - * when finished all faces. * - * * - ***********************************************************************/ -{ - static int - iFace = - 1; - normal = GetNormal (iFace); - if (++iFace > m_nface) - { - iFace = 1; - return false; - } - else - { - return true; - } -} - -bool GeoPolyhedron::GetNextUnitNormal (HVNormal3D & normal) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetNextUnitNormal Date: 16.09.96 * - * Author: E.Chernyaev Revised: * - * * - * Function: Get normals of unit length of each face in face order. * - * Returns false when finished all faces. * - * * - ***********************************************************************/ -{ - bool - rep = - GetNextNormal (normal); - normal.setMag (1.0); - return rep; -} - -double -GeoPolyhedron::GetSurfaceArea () const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetSurfaceArea Date: 25.05.01 * - * Author: E.Chernyaev Revised: * - * * - * Function: Returns area of the surface of the polyhedron. * - * * - ***********************************************************************/ -{ - double s = 0.; - for (int iFace = 1; iFace <= m_nface; iFace++) - { - int i0 = iabs (m_pF[iFace].m_edge[0].v); - int i1 = iabs (m_pF[iFace].m_edge[1].v); - int i2 = iabs (m_pF[iFace].m_edge[2].v); - int i3 = iabs (m_pF[iFace].m_edge[3].v); - if (i3 == 0) - i3 = i0; - s += ((m_pV[i2] - m_pV[i0]).cross (m_pV[i3] - m_pV[i1])).mag (); - } - return s / 2.; -} - -double -GeoPolyhedron::GetVolume () const -/*********************************************************************** - * * - * Name: GeoPolyhedron::GetVolume Date: 25.05.01 * - * Author: E.Chernyaev Revised: * - * * - * Function: Returns volume of the polyhedron. * - * * - ***********************************************************************/ -{ - double v = 0.; - for (int iFace = 1; iFace <= m_nface; iFace++) - { - int i0 = iabs (m_pF[iFace].m_edge[0].v); - int i1 = iabs (m_pF[iFace].m_edge[1].v); - int i2 = iabs (m_pF[iFace].m_edge[2].v); - int i3 = iabs (m_pF[iFace].m_edge[3].v); - HVPoint3D g; - if (i3 == 0) - { - i3 = i0; - g = (m_pV[i0] + m_pV[i1] + m_pV[i2]) * (1.0f / 3.0f); - } - else - { - g = (m_pV[i0] + m_pV[i1] + m_pV[i2] + m_pV[i3]) * 0.25f; - } - v += ((m_pV[i2] - m_pV[i0]).cross (m_pV[i3] - m_pV[i1])).dot (g); - } - return v * (1./6); -} - -GeoPolyhedronTrd2::GeoPolyhedronTrd2 (double Dx1, double Dx2, - double Dy1, double Dy2, double Dz) -/*********************************************************************** - * * - * Name: GeoPolyhedronTrd2 Date: 22.07.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Create GEANT4 TRD2-trapezoid * - * * - * Input: Dx1 - half-length along X at -Dz 8----7 * - * Dx2 - half-length along X ay +Dz 5----6 ! * - * Dy1 - half-length along Y ay -Dz ! 4-!--3 * - * Dy2 - half-length along Y ay +Dz 1----2 * - * Dz - half-length along Z * - * * - ***********************************************************************/ -{ - AllocateMemory (8, 6); - - m_pV[1] = HVPoint3D (-Dx1, -Dy1, -Dz); - m_pV[2] = HVPoint3D (Dx1, -Dy1, -Dz); - m_pV[3] = HVPoint3D (Dx1, Dy1, -Dz); - m_pV[4] = HVPoint3D (-Dx1, Dy1, -Dz); - m_pV[5] = HVPoint3D (-Dx2, -Dy2, Dz); - m_pV[6] = HVPoint3D (Dx2, -Dy2, Dz); - m_pV[7] = HVPoint3D (Dx2, Dy2, Dz); - m_pV[8] = HVPoint3D (-Dx2, Dy2, Dz); - - CreatePrism (); -} - -GeoPolyhedronTrd2::~GeoPolyhedronTrd2 () -{ -} - -GeoPolyhedronTrd1::GeoPolyhedronTrd1 (double Dx1, double Dx2, - double Dy, double Dz): -GeoPolyhedronTrd2 (Dx1, Dx2, Dy, Dy, Dz) -{ -} - -GeoPolyhedronTrd1::~GeoPolyhedronTrd1 () -{ -} - -GeoPolyhedronBox::GeoPolyhedronBox (double Dx, double Dy, double Dz): -GeoPolyhedronTrd2 (Dx, Dx, Dy, Dy, Dz) -{ -} - -GeoPolyhedronBox::~GeoPolyhedronBox () -{ -} - -GeoPolyhedronTrap::GeoPolyhedronTrap (double Dz, - double Theta, - double Phi, - double Dy1, - double Dx1, - double Dx2, - double Alp1, - double Dy2, - double Dx3, double Dx4, double Alp2) -/*********************************************************************** - * * - * Name: GeoPolyhedronTrap Date: 20.11.96 * - * Author: E.Chernyaev Revised: * - * * - * Function: Create GEANT4 TRAP-trapezoid * - * * - * Input: DZ - half-length in Z * - * Theta,Phi - polar angles of the line joining centres of the * - * faces at Z=-Dz and Z=+Dz * - * Dy1 - half-length in Y of the face at Z=-Dz * - * Dx1 - half-length in X of low edge of the face at Z=-Dz * - * Dx2 - half-length in X of top edge of the face at Z=-Dz * - * Alp1 - angle between Y-axis and the median joining top and * - * low edges of the face at Z=-Dz * - * Dy2 - half-length in Y of the face at Z=+Dz * - * Dx3 - half-length in X of low edge of the face at Z=+Dz * - * Dx4 - half-length in X of top edge of the face at Z=+Dz * - * Alp2 - angle between Y-axis and the median joining top and * - * low edges of the face at Z=+Dz * - * * - ***********************************************************************/ -{ - double DzTthetaCphi = Dz * tan (Theta) * cos (Phi); - double DzTthetaSphi = Dz * tan (Theta) * sin (Phi); - double Dy1Talp1 = Dy1 * tan (Alp1); - double Dy2Talp2 = Dy2 * tan (Alp2); - - AllocateMemory (8, 6); - - m_pV[1] = - HVPoint3D (-DzTthetaCphi - Dy1Talp1 - Dx1, -DzTthetaSphi - Dy1, -Dz); - m_pV[2] = - HVPoint3D (-DzTthetaCphi - Dy1Talp1 + Dx1, -DzTthetaSphi - Dy1, -Dz); - m_pV[3] = - HVPoint3D (-DzTthetaCphi + Dy1Talp1 + Dx2, -DzTthetaSphi + Dy1, -Dz); - m_pV[4] = - HVPoint3D (-DzTthetaCphi + Dy1Talp1 - Dx2, -DzTthetaSphi + Dy1, -Dz); - m_pV[5] = HVPoint3D (DzTthetaCphi - Dy2Talp2 - Dx3, DzTthetaSphi - Dy2, Dz); - m_pV[6] = HVPoint3D (DzTthetaCphi - Dy2Talp2 + Dx3, DzTthetaSphi - Dy2, Dz); - m_pV[7] = HVPoint3D (DzTthetaCphi + Dy2Talp2 + Dx4, DzTthetaSphi + Dy2, Dz); - m_pV[8] = HVPoint3D (DzTthetaCphi + Dy2Talp2 - Dx4, DzTthetaSphi + Dy2, Dz); - - CreatePrism (); -} - -GeoPolyhedronTrap::~GeoPolyhedronTrap () -{ -} - -GeoPolyhedronPara::GeoPolyhedronPara (double Dx, double Dy, double Dz, - double Alpha, double Theta, double Phi): -GeoPolyhedronTrap (Dz, Theta, Phi, Dy, Dx, Dx, Alpha, Dy, Dx, Dx, Alpha) -{ -} - -GeoPolyhedronPara::~GeoPolyhedronPara () -{ -} - -GeoPolyhedronCons::GeoPolyhedronCons (double Rmn1, - double Rmx1, - double Rmn2, - double Rmx2, - double Dz, double Phi1, double Dphi) -/*********************************************************************** - * * - * Name: GeoPolyhedronCons::GeoPolyhedronCons Date: 15.12.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: 15.12.96 * - * * - * Function: Constructor for CONS, TUBS, CONE, TUBE * - * * - * Input: Rmn1, Rmx1 - inside and outside radiuses at -Dz * - * Rmn2, Rmx2 - inside and outside radiuses at +Dz * - * Dz - half length in Z * - * Phi1 - starting angle of the segment * - * Dphi - segment range * - * * - ***********************************************************************/ -{ - static double wholeCircle = 2 * M_PI; - - // C H E C K I N P U T P A R A M E T E R S - - int k = 0; - if (Rmn1 < 0. || Rmx1 < 0. || Rmn2 < 0. || Rmx2 < 0.) - k = 1; - if (Rmn1 > Rmx1 || Rmn2 > Rmx2) - k = 1; - if (Rmn1 == Rmx1 && Rmn2 == Rmx2) - k = 1; - - if (Dz <= 0.) - k += 2; - - double phi1, phi2, dphi; - if (Dphi < 0.) - { - phi2 = Phi1; - phi1 = phi2 - Dphi; - } - else if (Dphi == 0.) - { - phi1 = Phi1; - phi2 = phi1 + wholeCircle; - } - else - { - phi1 = Phi1; - phi2 = phi1 + Dphi; - } - dphi = phi2 - phi1; - if (fabs (dphi - wholeCircle) < perMillion) - dphi = wholeCircle; - if (dphi > wholeCircle) - k += 4; - - if (k != 0) - { - std::cerr << "GeoPolyhedronCone(s)/Tube(s): error in input parameters"; - if ((k & 1) != 0) - std::cerr << " (radiuses)"; - if ((k & 2) != 0) - std::cerr << " (half-length)"; - if ((k & 4) != 0) - std::cerr << " (angles)"; - std::cerr << std::endl; - std::cerr << " Rmn1=" << Rmn1 << " Rmx1=" << Rmx1; - std::cerr << " Rmn2=" << Rmn2 << " Rmx2=" << Rmx2; - std::cerr << " Dz=" << Dz << " Phi1=" << Phi1 << " Dphi=" << Dphi - << std::endl; - return; - } - - // P R E P A R E T W O P O L Y L I N E S - - double zz[4], rr[4]; - zz[0] = Dz; - zz[1] = -Dz; - zz[2] = Dz; - zz[3] = -Dz; - rr[0] = Rmx2; - rr[1] = Rmx1; - rr[2] = Rmn2; - rr[3] = Rmn1; - - // R O T A T E P O L Y L I N E S - - RotateAroundZ (0, phi1, dphi, 2, 2, zz, rr, -1, -1); - SetReferences (); -} - -GeoPolyhedronCons::~GeoPolyhedronCons () -{ -} - -GeoPolyhedronCone::GeoPolyhedronCone (double Rmn1, double Rmx1, - double Rmn2, double Rmx2, double Dz): -GeoPolyhedronCons (Rmn1, Rmx1, Rmn2, Rmx2, Dz, 0 * deg, 360 * deg) -{ -} - -GeoPolyhedronCone::~GeoPolyhedronCone () -{ -} - -GeoPolyhedronTubs::GeoPolyhedronTubs (double Rmin, double Rmax, - double Dz, double Phi1, double Dphi): -GeoPolyhedronCons (Rmin, Rmax, Rmin, Rmax, Dz, Phi1, Dphi) -{ -} - -GeoPolyhedronTubs::~GeoPolyhedronTubs () -{ -} - -GeoPolyhedronTube::GeoPolyhedronTube (double Rmin, double Rmax, double Dz): -GeoPolyhedronCons (Rmin, Rmax, Rmin, Rmax, Dz, 0 * deg, 360 * deg) -{ -} - -GeoPolyhedronTube::~GeoPolyhedronTube () -{ -} - -GeoPolyhedronPgon::GeoPolyhedronPgon (double phi, - double dphi, - int npdv, - int nz, - const double *z, - const double *rmin, const double *rmax) -/*********************************************************************** - * * - * Name: GeoPolyhedronPgon Date: 09.12.96 * - * Author: E.Chernyaev Revised: * - * * - * Function: Constructor of polyhedron for PGON, PCON * - * * - * Input: phi - initial phi * - * dphi - delta phi * - * npdv - number of steps along phi * - * nz - number of z-planes (at least two) * - * z[] - z coordinates of the slices * - * rmin[] - smaller r at the slices * - * rmax[] - bigger r at the slices * - * * - ***********************************************************************/ -{ - // C H E C K I N P U T P A R A M E T E R S - - if (dphi <= 0. || dphi > 2 * M_PI) - { - std::cerr - << "GeoPolyhedronPgon/Pcon: wrong delta phi = " << dphi << std::endl; - return; - } - - if (nz < 2) - { - std::cerr - << "GeoPolyhedronPgon/Pcon: number of z-planes less than two = " << nz - << std::endl; - return; - } - - if (npdv < 0) - { - std::cerr - << "GeoPolyhedronPgon/Pcon: error in number of phi-steps =" << npdv - << std::endl; - return; - } - - int i; - for (i = 0; i < nz; i++) - { - if (rmin[i] < 0. || rmax[i] < 0. || rmin[i] > rmax[i]) - { - std::cerr - << "GeoPolyhedronPgon: error in radiuses rmin[" << i << "]=" - << rmin[i] << " rmax[" << i << "]=" << rmax[i] << std::endl; - return; - } - } - - // P R E P A R E T W O P O L Y L I N E S - - double *zz, *rr; - zz = new double[2 * nz]; - rr = new double[2 * nz]; - - if (z[0] > z[nz - 1]) - { - for (i = 0; i < nz; i++) - { - zz[i] = z[i]; - rr[i] = rmax[i]; - zz[i + nz] = z[i]; - rr[i + nz] = rmin[i]; - } - } - else - { - for (i = 0; i < nz; i++) - { - zz[i] = z[nz - i - 1]; - rr[i] = rmax[nz - i - 1]; - zz[i + nz] = z[nz - i - 1]; - rr[i + nz] = rmin[nz - i - 1]; - } - } - - // R O T A T E P O L Y L I N E S - - RotateAroundZ (npdv, phi, dphi, nz, nz, zz, rr, -1, (npdv == 0) ? -1 : 1); - SetReferences (); - - delete[]zz; - delete[]rr; -} - -GeoPolyhedronPgon::~GeoPolyhedronPgon () -{ -} - -GeoPolyhedronPcon::GeoPolyhedronPcon (double phi, double dphi, int nz, - const double *z, - const double *rmin, const double *rmax): -GeoPolyhedronPgon (phi, dphi, 0, nz, z, rmin, rmax) -{ -} - -GeoPolyhedronPcon::~GeoPolyhedronPcon () -{ -} - -GeoPolyhedronSphere::GeoPolyhedronSphere (double rmin, double rmax, - double phi, double dphi, - double the, double dthe) -/*********************************************************************** - * * - * Name: GeoPolyhedronSphere Date: 11.12.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Constructor of polyhedron for SPHERE * - * * - * Input: rmin - internal radius * - * rmax - external radius * - * phi - initial phi * - * dphi - delta phi * - * the - initial theta * - * dthe - delta theta * - * * - ***********************************************************************/ -{ - // C H E C K I N P U T P A R A M E T E R S - - if (dphi <= 0. || dphi > 2 * M_PI) - { - std::cerr - << "GeoPolyhedronSphere: wrong delta phi = " << dphi << std::endl; - return; - } - - if (the < 0. || the > M_PI) - { - std::cerr << "GeoPolyhedronSphere: wrong theta = " << the << std::endl; - return; - } - - if (dthe <= 0. || dthe > M_PI) - { - std::cerr - << "GeoPolyhedronSphere: wrong delta theta = " << dthe << std::endl; - return; - } - - if ((the + dthe >= M_PI) && (the + dthe < M_PI + 2 * DBL_EPSILON)) - dthe = M_PI - the; //G.Barrand : coming from LHCb/S.Ponce. - - if (the + dthe > M_PI) - { - std::cerr - << "GeoPolyhedronSphere: wrong theta + delta theta = " - << the << " " << dthe << std::endl; - return; - } - - if (rmin < 0. || rmin >= rmax) - { - std::cerr - << "GeoPolyhedronSphere: error in radiuses" - << " rmin=" << rmin << " rmax=" << rmax << std::endl; - return; - } - - // P R E P A R E T W O P O L Y L I N E S - - int ns = (GetNumberOfRotationSteps () + 1) / 2; - int np1 = int (dthe * ns * M_1_PI + .5) + 1; - if (np1 <= 1) - np1 = 2; - int np2 = rmin < perMillion ? 1 : np1; - - double *zz, *rr; - zz = new double[np1 + np2]; - rr = new double[np1 + np2]; - - double a = dthe / (np1 - 1); - double cosa, sina; - for (int i = 0; i < np1; i++) - { - cosa = cos (the + i * a); - sina = sin (the + i * a); - zz[i] = rmax * cosa; - rr[i] = rmax * sina; - if (np2 > 1) - { - zz[i + np1] = rmin * cosa; - rr[i + np1] = rmin * sina; - } - } - if (np2 == 1) - { - zz[np1] = 0.; - rr[np1] = 0.; - } - - // R O T A T E P O L Y L I N E S - - RotateAroundZ (0, phi, dphi, np1, np2, zz, rr, -1, -1); - SetReferences (); - - delete[]zz; - delete[]rr; -} - -GeoPolyhedronSphere::~GeoPolyhedronSphere () -{ -} - -GeoPolyhedronTorus::GeoPolyhedronTorus (double rmin, - double rmax, - double rtor, double phi, double dphi) -/*********************************************************************** - * * - * Name: GeoPolyhedronTorus Date: 11.12.96 * - * Author: E.Chernyaev (IHEP/Protvino) Revised: * - * * - * Function: Constructor of polyhedron for TORUS * - * * - * Input: rmin - internal radius * - * rmax - external radius * - * rtor - radius of torus * - * phi - initial phi * - * dphi - delta phi * - * * - ***********************************************************************/ -{ - // C H E C K I N P U T P A R A M E T E R S - - if (dphi <= 0. || dphi > 2 * M_PI) - { - std::cerr - << "GeoPolyhedronTorus: wrong delta phi = " << dphi << std::endl; - return; - } - - if (rmin < 0. || rmin >= rmax || rmax >= rtor) - { - std::cerr - << "GeoPolyhedronTorus: error in radiuses" - << " rmin=" << rmin << " rmax=" << rmax << " rtorus=" << rtor - << std::endl; - return; - } - - // P R E P A R E T W O P O L Y L I N E S - - int np1 = GetNumberOfRotationSteps (); - int np2 = rmin < perMillion ? 1 : np1; - - std::vector<double> rr (np1+np2, 0); - std::vector<double> zz (np1+np2, 0); - - double a = 2 * M_PI / np1; - double cosa, sina; - for (int i = 0; i < np1; i++) - { - cosa = cos (i * a); - sina = sin (i * a); - zz[i] = rmax * cosa; - rr[i] = rtor + rmax * sina; - if (np2 > 1) - { - zz[i + np1] = rmin * cosa; - rr[i + np1] = rtor + rmin * sina; - } - } - if (np2 == 1) - { - zz[np1] = 0.; - rr[np1] = rtor; - np2 = -1; - } - - // R O T A T E P O L Y L I N E S - - RotateAroundZ (0, phi, dphi, -np1, -np2, zz.data(), rr.data(), -1, -1); - SetReferences (); -} - -GeoPolyhedronTorus::~GeoPolyhedronTorus () -{ -} - -int - GeoPolyhedron::s_fNumberOfRotationSteps = - DEFAULT_NUMBER_OF_STEPS; -/*********************************************************************** - * * - * Name: GeoPolyhedron::s_fNumberOfRotationSteps Date: 24.06.97 * - * Author: J.Allison (Manchester University) Revised: * - * * - * Function: Number of steps for whole circle * - * * - ***********************************************************************/ - -#include "BooleanProcessor.src" -static - Geo_BooleanProcessor - processor; - -GeoPolyhedron GeoPolyhedron::add (const GeoPolyhedron & p) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::add Date: 19.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Boolean "union" of two polyhedra * - * * - ***********************************************************************/ -{ - return processor.execute (OP_UNION, *this, p); -} - -GeoPolyhedron GeoPolyhedron::intersect (const GeoPolyhedron & p) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::intersect Date: 19.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Boolean "intersection" of two polyhedra * - * * - ***********************************************************************/ -{ - return processor.execute (OP_INTERSECTION, *this, p); -} - -GeoPolyhedron GeoPolyhedron::subtract (const GeoPolyhedron & p) const -/*********************************************************************** - * * - * Name: GeoPolyhedron::add Date: 19.03.00 * - * Author: E.Chernyaev Revised: * - * * - * Function: Boolean "subtraction" of "p" from "this" * - * * - ***********************************************************************/ -{ - return processor.execute (OP_SUBTRACTION, *this, p); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPrintGraphAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPrintGraphAction.cxx deleted file mode 100755 index 7ff1252d7cb..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoPrintGraphAction.cxx +++ /dev/null @@ -1,115 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoPrintGraphAction.h" - -GeoPrintGraphAction::GeoPrintGraphAction (std::ostream &o) - : m_nameTag(nullptr) - , m_serialDenominator(nullptr) - , m_idTag(nullptr) - , m_transformState(true) - , m_volumeState(true) - , m_nametagState(true) - , m_serialDenominatorState(true) - , m_serialTransformerState(true) - , m_identifierState(true) - , m_o(o) - , m_indented(false) -{ -} - -GeoPrintGraphAction::~GeoPrintGraphAction() -{ -} - -void GeoPrintGraphAction::handleTransform (const GeoTransform *xform) -{ - m_pendingTransformList.push_back(xform); - if (m_transformState) { - indent(); - m_o << "TRANSFORM+"; - } -} - -void GeoPrintGraphAction::handlePhysVol (const GeoPhysVol *vol) -{ - if (m_volumeState) { - indent(); - m_o << "VOLUME(" << vol->getLogVol()->getName() <<")" << std::endl; - } - m_pendingTransformList.erase(m_pendingTransformList.begin(),m_pendingTransformList.end()); - m_indented=false; -} - -void GeoPrintGraphAction::handleFullPhysVol (const GeoFullPhysVol *vol) -{ - if (m_volumeState) { - indent(); - m_o << "VOLUME(" << vol->getLogVol()->getName() <<")" << std::endl; - } - m_pendingTransformList.erase(m_pendingTransformList.begin(),m_pendingTransformList.end()); - m_indented=false; -} - -void GeoPrintGraphAction::handleNameTag (const GeoNameTag *nameTag) -{ - if (m_nametagState) { - indent(); - m_o << "NAMETAG: " << nameTag->getName() << "+"; - } -} - -void GeoPrintGraphAction::handleSerialDenominator (const GeoSerialDenominator *sD) -{ - if (m_nametagState) { - indent(); - m_o << "SERIAL DENOMINATOR:: " << sD->getBaseName() << "+"; - } -} - -void GeoPrintGraphAction::handleSerialTransformer (const GeoSerialTransformer *sT) -{ - if (m_volumeState) { - indent(); - m_o << sT->getNCopies() << " PARAMETERIZED VOLUMES(" << sT->getVolume()->getLogVol()->getName() << ")" << std::endl; - } - m_pendingTransformList.erase(m_pendingTransformList.begin(),m_pendingTransformList.end()); - m_indented=false; -} - -void GeoPrintGraphAction::handleIdentifierTag (const GeoIdentifierTag *idTag) -{ - if (m_identifierState) { - indent(); - m_o << "NAME: " << idTag->getIdentifier() << "+"; - } -} - -void GeoPrintGraphAction::setNotification (Type type, bool state) -{ - if (type==TRANSFORM) { - m_transformState=state; - } - else if (type==VOLUME) { - m_volumeState=state; - } - else if (type==NAMETAG) { - m_nametagState=state; - } - else if (type==IDENTIFIERTAG) { - m_identifierState=state; - } -} - -void GeoPrintGraphAction::indent () -{ - if (!m_indented) { - m_indented=true; - for (size_t i=0;i<getPath()->getLength(); i++) { - m_o << " "; - } - } -} - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSelClearAbsPosAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSelClearAbsPosAction.cxx deleted file mode 100755 index a1c32a6155e..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSelClearAbsPosAction.cxx +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoSelClearAbsPosAction.h" -#include "GeoModelKernel/GeoClearAbsPosAction.h" -#include "GeoModelKernel/GeoAlignableTransform.h" -#include <sstream> - -GeoSelClearAbsPosAction::GeoSelClearAbsPosAction(const GeoAlignableTransform* alignTrans) - : m_alignTrans(alignTrans) - , m_needToClearCache(false) -{ - setDepthLimit(1); -} - -GeoSelClearAbsPosAction::~GeoSelClearAbsPosAction() -{ -} - -void GeoSelClearAbsPosAction::handleTransform(const GeoTransform *xform) -{ - if(xform==m_alignTrans) - m_needToClearCache = true; -} - -void GeoSelClearAbsPosAction::handlePhysVol(const GeoPhysVol *vol) -{ - if(getPath()->getLength()>1 && m_needToClearCache) { - GeoClearAbsPosAction cc; - vol->exec(&cc); - m_needToClearCache = false; - } -} - -void GeoSelClearAbsPosAction::handleFullPhysVol(const GeoFullPhysVol *vol) -{ - if(getPath()->getLength()>1 && m_needToClearCache) { - GeoClearAbsPosAction cc; - vol->exec(&cc); - m_needToClearCache = false; - } -} - - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSelClearAbsPosAction.h b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSelClearAbsPosAction.h deleted file mode 100755 index 251dae80515..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSelClearAbsPosAction.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef GEOMODELKERNEL_GEOSELCLEARABSPOSACTION_H -#define GEOMODELKERNEL_GEOSELCLEARABSPOSACTION_H - -/** - * @class GeoSelClearAbsPosAction - * - * @brief This action class has been introduced in order to speed up GeoAlignableTransform::setDelta(), - * which is heavily used by alignment callbacks. - * - * The action takes a pointer to GeoAlignableTransform - * and clears position caches only for those daughters of given - * physical volume, which are affected by this alignable transform. - */ - -#include "GeoModelKernel/GeoNodeAction.h" - -class GeoAlignableTransform; - -class GeoSelClearAbsPosAction:public GeoNodeAction -{ - public: - GeoSelClearAbsPosAction(const GeoAlignableTransform* alignTrans); - virtual ~GeoSelClearAbsPosAction(); - - private: - - // Handles a Transform. - virtual void handleTransform (const GeoTransform *xform); - - // Handles a physical volume. - virtual void handlePhysVol (const GeoPhysVol *vol); - - // Handles a physical volume. - virtual void handleFullPhysVol (const GeoFullPhysVol *vol); - - private: - GeoSelClearAbsPosAction(const GeoSelClearAbsPosAction &right); - GeoSelClearAbsPosAction & operator=(const GeoSelClearAbsPosAction &right); - - const GeoAlignableTransform* m_alignTrans; - bool m_needToClearCache; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialDenominator.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialDenominator.cxx deleted file mode 100755 index af65ced105d..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialDenominator.cxx +++ /dev/null @@ -1,20 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoSerialDenominator.h" -#include "GeoModelKernel/GeoNodeAction.h" - -GeoSerialDenominator::GeoSerialDenominator (const std::string &BaseName) - : m_baseName (BaseName) -{ -} - -GeoSerialDenominator::~GeoSerialDenominator() -{ -} - -void GeoSerialDenominator::exec (GeoNodeAction *action) const -{ - action->handleSerialDenominator (this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialIdentifier.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialIdentifier.cxx deleted file mode 100755 index c5984b9620f..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialIdentifier.cxx +++ /dev/null @@ -1,28 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoSerialIdentifier.h" -#include "GeoModelKernel/GeoNodeAction.h" - -GeoSerialIdentifier::GeoSerialIdentifier(int BaseId) - : m_baseId (BaseId) -{ -} - - -GeoSerialIdentifier::~GeoSerialIdentifier() -{ -} - - - -void GeoSerialIdentifier::exec(GeoNodeAction *action) const -{ - action->handleSerialIdentifier (this); -} - - - - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialTransformer.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialTransformer.cxx deleted file mode 100755 index f97e6dc12fd..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSerialTransformer.cxx +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoSerialTransformer.h" -#include "GeoModelKernel/GeoNodeAction.h" - -GeoSerialTransformer::GeoSerialTransformer (const GeoVPhysVol *volume, const GeoXF::Function *func, unsigned int copies) - : m_nCopies (copies) - , m_function (func->clone ()) - , m_physVol (volume) -{ - m_physVol->ref (); -} - -GeoSerialTransformer::~GeoSerialTransformer() -{ - m_physVol->unref (); - delete m_function; -} - -void GeoSerialTransformer::exec (GeoNodeAction *action) const -{ - action->handleSerialTransformer (this); -} - -const GeoXF::Function * GeoSerialTransformer::getFunction () const -{ - return m_function; -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShape.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShape.cxx deleted file mode 100755 index a23693b3074..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShape.cxx +++ /dev/null @@ -1,41 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoShape.h" -#include "GeoModelKernel/GeoShapeIntersection.h" -#include "GeoModelKernel/GeoShapeUnion.h" -#include "GeoModelKernel/GeoShapeSubtraction.h" -#include "GeoModelKernel/GeoShapeShift.h" - -GeoShape::GeoShape () -{ -} - -GeoShape::~GeoShape() -{ -} - -const GeoShapeUnion & GeoShape::add (const GeoShape& shape) const -{ - GeoShapeUnion *unionNode = new GeoShapeUnion (this, &shape); - return *unionNode; -} - -const GeoShapeSubtraction & GeoShape::subtract (const GeoShape& shape) const -{ - GeoShapeSubtraction *subNode = new GeoShapeSubtraction (this, &shape); - return *subNode; -} - -const GeoShapeIntersection & GeoShape::intersect (const GeoShape& shape) const -{ - GeoShapeIntersection *intNode = new GeoShapeIntersection (this, &shape); - return *intNode; -} - -const GeoShapeShift & GeoShape::operator << (const HepGeom::Transform3D &shift) const -{ - GeoShapeShift *shiftNode = new GeoShapeShift (this, shift); - return *shiftNode; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeAction.cxx deleted file mode 100755 index ebe7978a915..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeAction.cxx +++ /dev/null @@ -1,166 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoShapeAction.h" - -#include "GeoModelKernel/GeoShapeShift.h" -#include "GeoModelKernel/GeoShapeIntersection.h" -#include "GeoModelKernel/GeoShapeUnion.h" -#include "GeoModelKernel/GeoShapeSubtraction.h" -#include "GeoModelKernel/GeoBox.h" -#include "GeoModelKernel/GeoCons.h" -#include "GeoModelKernel/GeoPcon.h" -#include "GeoModelKernel/GeoPgon.h" -#include "GeoModelKernel/GeoTrap.h" -#include "GeoModelKernel/GeoTrd.h" -#include "GeoModelKernel/GeoTube.h" -#include "GeoModelKernel/GeoTubs.h" -#include "GeoModelKernel/GeoPara.h" - -#include "GeoModelKernel/GeoSimplePolygonBrep.h" -#include "GeoModelKernel/GeoTessellatedSolid.h" -#include "GeoModelKernel/GeoEllipticalTube.h" -#include "GeoModelKernel/GeoTorus.h" -#include "GeoModelKernel/GeoGenericTrap.h" - - -GeoShapeAction::GeoShapeAction() - : m_terminate(false) -{ -} - -GeoShapeAction::~GeoShapeAction() -{ -} - -Query<unsigned int> GeoShapeAction::getDepthLimit () -{ - return m_depth; -} - -void GeoShapeAction::setDepthLimit (unsigned int limit) -{ - m_depth=limit; -} - -void GeoShapeAction::clearDepthLimit () -{ - m_depth=Query<unsigned int> (); -} - -void GeoShapeAction::terminate () -{ - m_terminate=true; -} - -bool GeoShapeAction::shouldTerminate () const -{ - return m_terminate; -} - -void GeoShapeAction::handleShape (const GeoShape *) -{ -} - -void GeoShapeAction::handleShift (const GeoShapeShift *shift) -{ - handleShape(shift); -} - -void GeoShapeAction::handleUnion (const GeoShapeUnion *unio) -{ - handleShape(unio); -} - -void GeoShapeAction::handleIntersection (const GeoShapeIntersection *isect) -{ - handleShape(isect); -} - -void GeoShapeAction::handleSubtraction (const GeoShapeSubtraction *subtract) -{ - handleShape(subtract); -} - -void GeoShapeAction::handleBox (const GeoBox *box) -{ - handleShape(box); -} - -void GeoShapeAction::handleCons (const GeoCons *cons) -{ - handleShape(cons); -} - -void GeoShapeAction::handlePara (const GeoPara *para) -{ - handleShape(para); -} - -void GeoShapeAction::handlePcon (const GeoPcon *pcon) -{ - handleShape(pcon); -} - -void GeoShapeAction::handlePgon (const GeoPgon *pgon) -{ - handleShape(pgon); -} - -void GeoShapeAction::handleTrap (const GeoTrap *trap) -{ - handleShape(trap); -} - -void GeoShapeAction::handleTrd (const GeoTrd *trd) -{ - handleShape(trd); -} - -void GeoShapeAction::handleTube (const GeoTube *tube) -{ - handleShape(tube); -} - -void GeoShapeAction::handleTubs (const GeoTubs *tubs) -{ - handleShape(tubs); -} - -GeoShapePath * GeoShapeAction::getPath () -{ - return &m_path; -} - -void GeoShapeAction::handleLArCustom (const LArCustomShape *lar) -{ - handleShape( (GeoShape *) lar); -} - -void GeoShapeAction::handleSimplePolygonBrep (const GeoSimplePolygonBrep* brep) -{ - handleShape(brep); -} - -void GeoShapeAction::handleTessellatedSolid (const GeoTessellatedSolid* tessellated) -{ - handleShape(tessellated); -} - -void GeoShapeAction::handleEllipticalTube (const GeoEllipticalTube * elltube) -{ - handleShape(elltube); -} - -void GeoShapeAction::handleTorus (const GeoTorus * torus) -{ - handleShape(torus); -} - -void GeoShapeAction::handleGenericTrap (const GeoGenericTrap * gentrap) -{ - handleShape(gentrap); -} - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeIntersection.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeIntersection.cxx deleted file mode 100755 index f7f32cbb9ab..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeIntersection.cxx +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoShapeIntersection.h" -#include "GeoModelKernel/GeoPolyhedron.h" -#include "GeoModelKernel/GeoPolyhedrizeAction.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include <stdexcept> - -const std::string GeoShapeIntersection::s_classType = "Intersection"; -const ShapeType GeoShapeIntersection::s_classTypeID = 0x00; - -GeoShapeIntersection::GeoShapeIntersection (const GeoShape* A, const GeoShape* B) - : m_opA (A) - , m_opB (B) -{ - m_opA->ref (); - m_opB->ref (); -} - -GeoShapeIntersection::~GeoShapeIntersection() -{ - m_opA->unref (); - m_opB->unref (); -} - -double GeoShapeIntersection::volume () const -{ - GeoPolyhedrizeAction a; - exec(&a); - const GeoPolyhedron *poly = a.getPolyhedron(); - double vol = poly->GetVolume (); - return vol; -} - -const std::string & GeoShapeIntersection::type () const -{ - return s_classType; -} - -ShapeType GeoShapeIntersection::typeID () const -{ - return s_classTypeID; -} - -const GeoShape* GeoShapeIntersection::getOpA () const -{ - return m_opA; -} - -const GeoShape* GeoShapeIntersection::getOpB () const -{ - return m_opB; -} - -void GeoShapeIntersection::exec (GeoShapeAction *action) const -{ - action->getPath ()->push (this); - action->handleIntersection (this); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - - if (action->getDepthLimit ().isValid () - && action->getPath ()->getLength () > action->getDepthLimit ()) - { - } - - else - { - m_opA->exec(action); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - m_opB->exec(action); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - } - action->getPath()->pop(); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeShift.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeShift.cxx deleted file mode 100755 index 7c0f6ba47da..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeShift.cxx +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoShapeShift.h" -#include "GeoModelKernel/GeoShapeAction.h" - -const std::string GeoShapeShift::s_classType = "Shift"; -const ShapeType GeoShapeShift::s_classTypeID = 0x03; - -GeoShapeShift::GeoShapeShift (const GeoShape* A, const HepGeom::Transform3D &X) - : m_op (A) - , m_shift (X) -{ - m_op->ref (); -} - -GeoShapeShift::~GeoShapeShift() -{ - m_op->unref (); -} - -double GeoShapeShift::volume () const -{ - return m_op->volume (); -} - -const std::string & GeoShapeShift::type () const -{ - return s_classType; -} - -ShapeType GeoShapeShift::typeID () const -{ - return s_classTypeID; -} - -const GeoShape* GeoShapeShift::getOp () const -{ - return m_op; -} - -const HepGeom::Transform3D & GeoShapeShift::getX () const -{ - return m_shift; -} - -void GeoShapeShift::exec (GeoShapeAction *action) const -{ - action->getPath ()->push (this); - action->handleShift (this); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - - if (action->getDepthLimit ().isValid () - && action->getPath ()->getLength () > action->getDepthLimit ()) - { - } - - else - { - m_op->exec(action); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - } - action->getPath()->pop(); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeSubtraction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeSubtraction.cxx deleted file mode 100755 index 632b4df5240..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeSubtraction.cxx +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoShapeSubtraction.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include "GeoModelKernel/GeoPolyhedrizeAction.h" -#include "GeoModelKernel/GeoPolyhedron.h" -#include <stdexcept> - -const std::string GeoShapeSubtraction::s_classType = "Subtraction"; -const ShapeType GeoShapeSubtraction::s_classTypeID = 0x02; - -GeoShapeSubtraction::GeoShapeSubtraction (const GeoShape* A, const GeoShape* B) - : m_opA (A) - , m_opB (B) -{ - m_opA->ref (); - m_opB->ref (); -} - -GeoShapeSubtraction::~GeoShapeSubtraction() -{ - m_opA->unref (); - m_opB->unref (); -} - -double GeoShapeSubtraction::volume () const -{ - GeoPolyhedrizeAction a; - exec(&a); - const GeoPolyhedron *poly = a.getPolyhedron(); - double vol = poly->GetVolume (); - return vol; -} - -const std::string & GeoShapeSubtraction::type () const -{ - return s_classType; -} - -ShapeType GeoShapeSubtraction::typeID () const -{ - return s_classTypeID; -} - -const GeoShape* GeoShapeSubtraction::getOpA () const -{ - return m_opA; -} - -const GeoShape* GeoShapeSubtraction::getOpB () const -{ - return m_opB; -} - -void GeoShapeSubtraction::exec (GeoShapeAction *action) const -{ - action->getPath ()->push (this); - action->handleSubtraction (this); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - - if (action->getDepthLimit ().isValid () - && action->getPath ()->getLength () > action->getDepthLimit ()) - { - } - - else - { - m_opA->exec(action); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - m_opB->exec(action); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - } - action->getPath()->pop(); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeUnion.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeUnion.cxx deleted file mode 100755 index 7d2a4acf8c9..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoShapeUnion.cxx +++ /dev/null @@ -1,89 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoShapeUnion.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include "GeoModelKernel/GeoPolyhedron.h" -#include "GeoModelKernel/GeoPolyhedrizeAction.h" -#include <stdexcept> - -const std::string GeoShapeUnion::s_classType = "Union"; -const ShapeType GeoShapeUnion::s_classTypeID = 0x01; - -GeoShapeUnion::GeoShapeUnion (const GeoShape* A, const GeoShape* B) - : m_opA (A) - , m_opB (B) -{ - m_opA->ref (); - m_opB->ref (); -} - -GeoShapeUnion::~GeoShapeUnion() -{ - m_opA->unref (); - m_opB->unref (); -} - -double GeoShapeUnion::volume () const -{ - GeoPolyhedrizeAction a; - exec (&a); - const GeoPolyhedron *poly = a.getPolyhedron (); - double vol = poly->GetVolume (); - return vol; -} - -const std::string & GeoShapeUnion::type () const -{ - return s_classType; -} - -ShapeType GeoShapeUnion::typeID () const -{ - return s_classTypeID; -} - -const GeoShape* GeoShapeUnion::getOpA () const -{ - return m_opA; -} - -const GeoShape* GeoShapeUnion::getOpB () const -{ - return m_opB; -} - -void GeoShapeUnion::exec (GeoShapeAction *action) const -{ - action->getPath ()->push (this); - action->handleUnion (this); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - - if (action->getDepthLimit ().isValid () - && action->getPath ()->getLength () > action->getDepthLimit ()) - { - } - - else - { - m_opA->exec(action); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - m_opB->exec(action); - if (action->shouldTerminate ()) - { - action->getPath ()->pop (); - return; - } - } - action->getPath()->pop(); -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSimplePolygonBrep.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSimplePolygonBrep.cxx deleted file mode 100755 index 3d6971dee7a..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoSimplePolygonBrep.cxx +++ /dev/null @@ -1,68 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoSimplePolygonBrep.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include "PolygonTriangulator.h"//For volume. -#include <cmath> -#include <stdexcept> - -const std::string GeoSimplePolygonBrep::s_classType = "SimplePolygonBrep"; -const ShapeType GeoSimplePolygonBrep::s_classTypeID = 0x20; - -GeoSimplePolygonBrep::GeoSimplePolygonBrep(double dz) - : m_dZ(dz) -{ -} - -GeoSimplePolygonBrep::~GeoSimplePolygonBrep() -{ -} - -double GeoSimplePolygonBrep::volume () const -{ - if (!isValid()) - throw std::runtime_error ("Volume requested for incomplete simple polygon brep"); - - //Todo: Cache the polygon area so we wont have to do this every time. - PolygonTriangulator pt(m_xVertices,m_yVertices); - - double area(0);//Fixme: Should be cached! - - double x1, x2, x3, y1, y2, y3; - PolygonTriangulator::Triangles::const_iterator it, itE = pt.triangles()->end(); - for (it = pt.triangles()->begin(); it!=itE; ++it) { - x1 = m_xVertices.at(it->at(0)-1); - x2 = m_xVertices.at(it->at(1)-1); - x3 = m_xVertices.at(it->at(2)-1); - y1 = m_yVertices.at(it->at(0)-1); - y2 = m_yVertices.at(it->at(1)-1); - y3 = m_yVertices.at(it->at(2)-1); - area += fabs ( -x2*y1 + x3*y1 + x1 * y2 - x3 * y2 - x1*y3 + x2*y3 );//This is actually twice the area of the triangle we are adding - } - - return area * m_dZ;//area is thus twice the area, but dZ is only half the depth, so the two factors of two cancel out. -} - -const std::string & GeoSimplePolygonBrep::type() const -{ - return s_classType; -} - -ShapeType GeoSimplePolygonBrep::typeID() const -{ - return s_classTypeID; -} - -void GeoSimplePolygonBrep::addVertex(double XVertex, double YVertex) -{ - m_xVertices.push_back(XVertex); - m_yVertices.push_back(YVertex); -} - -void GeoSimplePolygonBrep::exec(GeoShapeAction *action) const -{ - action->handleSimplePolygonBrep(this); -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTessellatedSolid.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTessellatedSolid.cxx deleted file mode 100644 index 318eea22d82..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTessellatedSolid.cxx +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoTessellatedSolid.h" -#include "GeoModelKernel/GeoShapeAction.h" - -const std::string GeoTessellatedSolid::s_classType = "TessellatedSolid"; -const ShapeType GeoTessellatedSolid::s_classTypeID = 0x21; - -GeoTessellatedSolid::GeoTessellatedSolid() -{ -} - -GeoTessellatedSolid::~GeoTessellatedSolid() -{ - for(size_t i=0; i<m_facets.size(); ++i) - m_facets[i]->unref(); -} - -double GeoTessellatedSolid::volume() const -{ - // -- ToDo - return 0.; -} - -const std::string& GeoTessellatedSolid::type() const -{ - return s_classType; -} - -ShapeType GeoTessellatedSolid::typeID() const -{ - return s_classTypeID; -} - -void GeoTessellatedSolid::exec(GeoShapeAction *action) const -{ - action->handleTessellatedSolid(this); -} - -void GeoTessellatedSolid::addFacet(GeoFacet* facet) -{ - facet->ref(); - m_facets.push_back(facet); -} - -GeoFacet* GeoTessellatedSolid::getFacet(size_t index) const -{ - return (index<m_facets.size() ? m_facets[index] : 0); -} - -size_t GeoTessellatedSolid::getNumberOfFacets() const -{ - return m_facets.size(); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTorus.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTorus.cxx deleted file mode 100755 index 0adb87aa4c5..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTorus.cxx +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoTorus.h" -#include "GeoModelKernel/GeoPolyhedron.h" -#include "GeoModelKernel/GeoShapeAction.h" - -const std::string GeoTorus::s_classType = "Torus"; -const ShapeType GeoTorus::s_classTypeID = 0x24; - -GeoTorus::GeoTorus (double Rmin, double Rmax, double Rtor, double SPhi, double DPhi) - : m_rMin (Rmin) - , m_rMax (Rmax) - , m_rTor(Rtor) - , m_sPhi (SPhi) - , m_dPhi (DPhi) -{ -} - - -GeoTorus::~GeoTorus() -{ -} - -//## Other Operations (implementation) -double GeoTorus::volume () const -{ - return 8.0; -} - -const std::string & GeoTorus::type () const -{ - return s_classType; -} - -ShapeType GeoTorus::typeID () const -{ - return s_classTypeID; -} - -void GeoTorus::exec (GeoShapeAction *action) const -{ - action->handleTorus(this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTransform.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTransform.cxx deleted file mode 100755 index db85aad747d..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTransform.cxx +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoTransform.h" -#include "GeoModelKernel/GeoNodeAction.h" - -GeoTransform::GeoTransform (const HepGeom::Transform3D& transform) - : m_transform(transform) -{ -} - -GeoTransform::~GeoTransform() -{ -} - -HepGeom::Transform3D GeoTransform::getTransform(const GeoVAlignmentStore* /*store*/) const -{ - return m_transform; -} - -HepGeom::Transform3D GeoTransform::getDefTransform(const GeoVAlignmentStore* /*store*/) const -{ - return m_transform; -} - -void GeoTransform::exec(GeoNodeAction *action) const -{ - action->handleTransform(this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTrap.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTrap.cxx deleted file mode 100755 index 19c0b8eef19..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTrap.cxx +++ /dev/null @@ -1,61 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoTrap.h" -#include "GeoModelKernel/GeoShapeAction.h" - -const std::string GeoTrap::s_classType = "Trap"; -const ShapeType GeoTrap::s_classTypeID = 0x15; - -GeoTrap::GeoTrap (double ZHalfLength, double Theta, double Phi, double Dydzn, double Dxdyndzn, double Dxdypdzn, double Angleydzn, double Dydzp, double Dxdyndzp, double Dxdypdzp, double Angleydzp) - : m_zHalfLength (ZHalfLength) - , m_theta (Theta) - , m_phi (Phi) - , m_dydzn (Dydzn) - , m_dxdyndzn (Dxdyndzn) - , m_dxdypdzn (Dxdypdzn) - , m_angleydzn (Angleydzn) - , m_dydzp (Dydzp) - , m_dxdyndzp (Dxdyndzp) - , m_dxdypdzp (Dxdypdzp) - , m_angleydzp (Angleydzp) -{ -} - -GeoTrap::~GeoTrap() -{ -} - -double GeoTrap::volume () const -{ - double fDz = m_zHalfLength; - double fDy1 = m_dydzn; - double pDx1 = m_dxdyndzn; - double pDx2 = m_dxdypdzn; - double fDy2 = m_dydzp; - double pDx3 = m_dxdyndzp; - double pDx4 = m_dxdypdzp; - - - double fDx1 = 0.5 * (pDx1 + pDx2); - double fDx2 = 0.5 * (pDx3 + pDx4); - - return 4.0 * ((fDx1 + fDx2) * (fDy1 + fDy2) * (fDz * 0.5) + - (fDx2 - fDx1) * (fDy2 - fDy1) * (fDz * (1./6))); -} - -const std::string & GeoTrap::type () const -{ - return s_classType; -} - -ShapeType GeoTrap::typeID () const -{ - return s_classTypeID; -} - -void GeoTrap::exec (GeoShapeAction *action) const -{ - action->handleTrap(this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTraversalState.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTraversalState.cxx deleted file mode 100755 index 59e37fe35c6..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTraversalState.cxx +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoTraversalState.h" - -GeoTraversalState::GeoTraversalState () -{ -} - -GeoTraversalState::~GeoTraversalState() -{ -} - -const HepGeom::Transform3D & GeoTraversalState::getTransform () const -{ - return m_transform; -} - -const std::string & GeoTraversalState::getName () const -{ - return m_name; -} - -const HepGeom::Transform3D & GeoTraversalState::getDefTransform () const -{ - return m_defTransform; -} - -const std::string & GeoTraversalState::getAbsoluteName () const -{ - return m_absName; -} - -const HepGeom::Transform3D & GeoTraversalState::getDefAbsoluteTransform () const -{ - return m_defAbsTransform; -} - -const HepGeom::Transform3D & GeoTraversalState::getAbsoluteTransform () const -{ - return m_absTransform; -} - -void GeoTraversalState::setTransform (const HepGeom::Transform3D &transform) -{ - m_transform = transform; - m_absTransform = m_absTransformList.top () * transform; -} - -void GeoTraversalState::setName (const std::string &name) -{ - m_name = name; - m_absName = m_absNameList.top () + "/" + name; -} - -void GeoTraversalState::setDefTransform (const HepGeom::Transform3D &transform) -{ - m_defTransform = transform; - m_defAbsTransform = m_defAbsTransformList.top () * transform; -} - -void GeoTraversalState::nextLevel (const GeoVPhysVol* pv) -{ - m_absNameList.push (m_absName); - m_absTransformList.push (m_absTransform); - m_defAbsTransformList.push (m_defAbsTransform); - - m_path.push(pv); - // - // Reinitialize to identity. - // - - m_absTransform = m_defAbsTransform = m_transform = m_defTransform = - HepGeom::Transform3D (); -} - -void GeoTraversalState::previousLevel () -{ - m_absTransform = m_absTransformList.top (); - m_defAbsTransform = m_defAbsTransformList.top (); - m_absTransformList.pop (); - m_defAbsTransformList.pop (); - m_absNameList.pop (); - m_path.pop(); - m_transform = m_defTransform = HepGeom::Transform3D (); -} - -const GeoNodePath * GeoTraversalState::getPath () const -{ - return &m_path; -} - -void GeoTraversalState::setId (const Query<int> &id) -{ - m_id=id; -} - -const Query<int> GeoTraversalState::getId () const -{ - return m_id; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTrd.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTrd.cxx deleted file mode 100755 index 9e174d30906..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTrd.cxx +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoTrd.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include "GeoModelKernel/GeoPolyhedron.h" - -const std::string GeoTrd::s_classType = "Trd"; -const ShapeType GeoTrd::s_classTypeID = 0x16; - -GeoTrd::GeoTrd (double XHalfLength1, double XHalfLength2, double YHalfLength1, double YHalfLength2, double ZHalfLength) - : m_xHalfLength1 (XHalfLength1) - , m_xHalfLength2 (XHalfLength2) - , m_yHalfLength1 (YHalfLength1) - , m_yHalfLength2 (YHalfLength2) - , m_zHalfLength (ZHalfLength) -{ -} - -GeoTrd::~GeoTrd() -{ -} - -double GeoTrd::volume () const -{ - double fDz = m_zHalfLength; - double fDy1 = m_yHalfLength1; - double fDx1 = m_xHalfLength1; - double fDx2 = m_xHalfLength2; - double fDy2 = m_yHalfLength2; - return 4.0 * ((fDx1 + fDx2) * (fDy1 + fDy2) * (fDz * 0.5) + - (fDx2 - fDx1) * (fDy2 - fDy1) * (fDz * (1./6))); -} - -const std::string & GeoTrd::type () const -{ - return s_classType; -} - -ShapeType GeoTrd::typeID () const -{ - return s_classTypeID; -} - -void GeoTrd::exec (GeoShapeAction *action) const -{ - action->handleTrd(this); -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTube.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTube.cxx deleted file mode 100755 index cdf3c826e2c..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTube.cxx +++ /dev/null @@ -1,45 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoTube.h" -#include "GeoModelKernel/GeoPolyhedrizeAction.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include <cmath> - -const std::string GeoTube::s_classType = "Tube"; -const ShapeType GeoTube::s_classTypeID = 0x17; - -GeoTube::GeoTube (double RMin, double RMax, double ZHalfLength) - : m_rMin (RMin) - , m_rMax (RMax) - , m_zHalfLength (ZHalfLength) -{ -} - -GeoTube::~GeoTube() -{ -} - -double GeoTube::volume () const -{ -#ifndef M_PI - double M_PI = acos (-1.0); -#endif - return 2 * M_PI * (m_rMax * m_rMax - m_rMin * m_rMin) * m_zHalfLength; -} - -const std::string & GeoTube::type () const -{ - return s_classType; -} - -ShapeType GeoTube::typeID () const -{ - return s_classTypeID; -} - -void GeoTube::exec (GeoShapeAction *action) const -{ - action->handleTube(this); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTubs.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTubs.cxx deleted file mode 100755 index 52323fb0db5..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTubs.cxx +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoTubs.h" -#include "GeoModelKernel/GeoShapeAction.h" -#include "GeoModelKernel/GeoPolyhedron.h" - -const std::string GeoTubs::s_classType = "Tubs"; -const ShapeType GeoTubs::s_classTypeID = 0x18; - -GeoTubs::GeoTubs (double RMin, double RMax, double ZHalfLength, double SPhi, double DPhi) - : m_rMin (RMin) - , m_rMax (RMax) - , m_zHalfLength (ZHalfLength) - , m_sPhi (SPhi) - , m_dPhi (DPhi) -{ -} - -GeoTubs::~GeoTubs() -{ -} - -double GeoTubs::volume () const -{ - return m_dPhi * (m_rMax * m_rMax - m_rMin * m_rMin) * m_zHalfLength; -} - -const std::string & GeoTubs::type () const -{ - return s_classType; -} - -ShapeType GeoTubs::typeID () const -{ - return s_classTypeID; -} - -void GeoTubs::exec (GeoShapeAction *action) const -{ - action->handleTubs(this); -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorElement.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorElement.cxx deleted file mode 100755 index dead3554911..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorElement.cxx +++ /dev/null @@ -1,14 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoVDetectorElement.h" - -GeoVDetectorElement::GeoVDetectorElement (const GeoVFullPhysVol* fullPhysVol) - : m_materialGeom(fullPhysVol) -{ -} - -GeoVDetectorElement::~GeoVDetectorElement() -{ -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorFactory.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorFactory.cxx deleted file mode 100755 index 25daefa33e6..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorFactory.cxx +++ /dev/null @@ -1,15 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoVDetectorFactory.h" -#include "GeoModelKernel/GeoVDetectorManager.h" -#include "GeoModelKernel/GeoPhysVol.h" - -GeoVDetectorFactory::GeoVDetectorFactory() -{ -} - -GeoVDetectorFactory::~GeoVDetectorFactory() -{ -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorManager.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorManager.cxx deleted file mode 100755 index c5b8370f51f..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVDetectorManager.cxx +++ /dev/null @@ -1,24 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoVDetectorManager.h" -#include "GeoModelKernel/GeoVDetectorElement.h" - -GeoVDetectorManager::GeoVDetectorManager() -{ -} - -GeoVDetectorManager::~GeoVDetectorManager() -{ -} - -void GeoVDetectorManager::setName(const std::string & name) -{ - m_name=name; -} - -const std::string & GeoVDetectorManager::getName() const -{ - return m_name; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVFullPhysVol.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVFullPhysVol.cxx deleted file mode 100755 index 45767884ecf..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVFullPhysVol.cxx +++ /dev/null @@ -1,209 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoVFullPhysVol.h" -#include "GeoModelKernel/GeoVAlignmentStore.h" -#include <string> - -GeoVFullPhysVol::GeoVFullPhysVol(const GeoLogVol* logVol) - : GeoVPhysVol(logVol) - , m_id(nullptr) - , m_absPosInfo(nullptr) -{ -} - -GeoVFullPhysVol::~GeoVFullPhysVol() -{ - delete m_absPosInfo; - delete m_id; -} - -const HepGeom::Transform3D & GeoVFullPhysVol::getAbsoluteTransform(GeoVAlignmentStore* store) const -{ - //------------------------------------------------------------------------------------------------// - // // - // Get ready for something to go wrong: // - // // - static std::string errorMessage("Full Physical Volume errroneously placed in a shared portion of a detector description graph.\nName of shared volume: "); - // // - //------------------------------------------------------------------------------------------------// - if(isShared()) throw std::runtime_error(errorMessage); - - if(store==nullptr && !m_absPosInfo) m_absPosInfo = new GeoAbsPositionInfo(); - - // - // Check the cache first. If not empty, then return the cached value - // - if(store==nullptr){ - if(m_absPosInfo->getAbsTransform()) return *m_absPosInfo->getAbsTransform(); - } - else { - const HepGeom::Transform3D* storedPos = store->getAbsPosition(this); - if(storedPos!=nullptr) return *storedPos; - } - - // The cache is empty. Compute the absolute position from the top of the tree down to here, and cache it - PVConstLink child(this), parent(getParent()); - HepGeom::Transform3D tProd; - - while (parent) { -#ifdef HOSED - int index = parent->indexOf (child); - HepGeom::Transform3D transform = parent->getXToChildVol(index,store); -#else - HepGeom::Transform3D transform = child->getX(store); -#endif - tProd = transform * tProd; - child = parent; - if(child->isShared()) { - throw std::runtime_error(errorMessage); - } - else { - parent = child->getParent(); - } - } - - if(store==nullptr) { - m_absPosInfo->setAbsTransform(tProd); - return *m_absPosInfo->getAbsTransform(); - } - else { - store->setAbsPosition(this,tProd); - const HepGeom::Transform3D* storedPosition = store->getAbsPosition(this); - return *storedPosition; - } -} - -void GeoVFullPhysVol::clearPositionInfo() const -{ - delete m_absPosInfo; - m_absPosInfo = nullptr; -} - -const HepGeom::Transform3D& GeoVFullPhysVol::getDefAbsoluteTransform(GeoVAlignmentStore* store) const -{ - //------------------------------------------------------------------------------------------------// - // // - // Get ready for something to go wrong: // - // // - static std::string errorMessage("Full Physical Volume errroneously placed in a shared portion of a detector description graph.\nName of shared volume: "); - // // - //------------------------------------------------------------------------------------------------// - if(isShared()) throw std::runtime_error(errorMessage); - - if(store==nullptr && !m_absPosInfo) m_absPosInfo = new GeoAbsPositionInfo(); - - // - // Check the cache first. If not empty, then return the cached value - // - if(store==nullptr){ - if(m_absPosInfo->getDefAbsTransform()) return *m_absPosInfo->getDefAbsTransform(); - } - else { - const HepGeom::Transform3D* storedPos = store->getDefAbsPosition(this); - if(storedPos!=nullptr) return *storedPos; - } - - // The cache is empty. Compute the absolute position from the top of the tree down to here, and cache it - PVConstLink child(this), parent(getParent()); - HepGeom::Transform3D tProd; - - while (parent) { -#ifdef HOSED - int index = parent->indexOf (child); - HepGeom::Transform3D transform = parent->getDefXToChildVol(index,store); -#else - HepGeom::Transform3D transform = child->getDefX(store); -#endif - tProd = transform * tProd; - child = parent; - if(child->isShared()) { - throw std::runtime_error(errorMessage); - } - else { - parent = child->getParent(); - } - } - - if(store==nullptr) { - m_absPosInfo->setDefAbsTransform(tProd); - return *m_absPosInfo->getDefAbsTransform(); - } - else { - store->setDefAbsPosition(this,tProd); - const HepGeom::Transform3D* storedPosition = store->getDefAbsPosition(this); - return *storedPosition; - } -} - -const std::string & GeoVFullPhysVol::getAbsoluteName () -{ - //------------------------------------------------------------------------------------------------// - // // - // Get ready for something to go wrong: // - // // - static std::string errorMessage("Full Physical Volume errroneously placed in a shared portion of a detector description graph.\nName of shared volume: "); - // // - //------------------------------------------------------------------------------------------------// - - if(m_absName == "") { - if(isShared()) throw std::runtime_error(errorMessage); - - // - // Check the cache. If it is empty, compute the absolute position from the - // top of the tree down to here, and update the cache - // - PVConstLink child(this), parent(getParent()); - std::string tProd; - - while (parent) { - int index = parent->indexOf (child); - std::string name = parent->getNameOfChildVol (index); - - tProd = tProd + "/" + name; - child = parent; - if (child->isShared ()) { - throw std::runtime_error(errorMessage); - } - else { - parent = child->getParent (); - } - } - m_absName = tProd; - } - - return m_absName; -} - -unsigned int GeoVFullPhysVol::getId () const -{ - //------------------------------------------------------------------------------------------------// - // // - // Get ready for something to go wrong: // - // // - static std::string errorMessage("Full Physical Volume errroneously placed in a shared portion of a detector description graph.\nName of shared volume: "); - // // - //------------------------------------------------------------------------------------------------// - - if(m_id==nullptr) { - if(isShared()) throw std::runtime_error(errorMessage); - - // - // Check the cache. If it is empty, compute the absolute position from the - // top of the tree down to here, and update the cache - // - PVConstLink child = this, parent = nullptr; - if(child->isShared()) { - throw std::runtime_error(errorMessage); - } - else { - parent = child->getParent(); - } - - int index = parent->indexOf(child); - m_id = new Query<int>(parent->getIdOfChildVol(index)); - } - return *m_id; -} - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVPhysVol.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVPhysVol.cxx deleted file mode 100755 index 616f90ab2c2..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVPhysVol.cxx +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoVPhysVol.h" -#include "GeoModelKernel/GeoVolumeAction.h" -#include "GeoAccessVolumeAction.h" -#include <stdexcept> -#include <string> - -GeoVPhysVol::GeoVPhysVol(const GeoLogVol* LogVol) - : m_parentPtr(nullptr) - , m_logVol(LogVol) -{ - if(m_logVol) m_logVol->ref(); -} - -GeoVPhysVol::~GeoVPhysVol() -{ - if(m_logVol) m_logVol->unref(); -} - -Query<unsigned int> GeoVPhysVol::indexOf(PVConstLink daughter) const -{ - unsigned int nChildVols{getNChildVols()}; - for(unsigned int i=0; i<nChildVols; i++) { // To Do: replace this with Volume Iterator! - if(getChildVol(i) == daughter) return i; - } - return Query<unsigned int >(); -} - -PVConstLink GeoVPhysVol::getParent() const -{ - if(m_parentPtr != this) return m_parentPtr; - return nullptr; -} - -const GeoLogVol* GeoVPhysVol::getLogVol() const -{ - return m_logVol; -} - -void GeoVPhysVol::apply(GeoVolumeAction *action) const -{ - int nVols(0); - switch(action->getType()) { - case GeoVolumeAction::TOP_DOWN: - action->handleVPhysVol(this); - if(action->shouldTerminate()) return; - - action->getState()->nextLevel(this); - nVols = getNChildVols(); - for(int d = 0; d < nVols; d++) { - GeoAccessVolumeAction av(d,nullptr); - exec (&av); - - action->getState()->setTransform(av.getTransform()); - action->getState()->setDefTransform(av.getDefTransform()); - action->getState()->setId(av.getId()); - action->getState()->setName(av.getName()); - - av.getVolume()->apply(action); - if(action->shouldTerminate()) break; - } - action->getState()->previousLevel(); - break; - case GeoVolumeAction::BOTTOM_UP: - action->getState()->nextLevel(this); - nVols = getNChildVols(); - for(int d = 0; d < nVols; d++) { - GeoAccessVolumeAction av(d,nullptr); - exec(&av); - - action->getState()->setTransform(av.getTransform()); - action->getState()->setDefTransform(av.getDefTransform()); - action->getState()->setId(av.getId()); - action->getState()->setName(av.getName()); - - av.getVolume()->apply(action); - if(action->shouldTerminate()) break; - } - action->getState()->previousLevel(); - - action->handleVPhysVol(this); - if(action->shouldTerminate()) return; // To Do: do I need this? - break; - default: - throw std::runtime_error("GeoVPhysVol::apply(). Unsupported GeoVolumeAction type " + std::to_string((unsigned)action->getType())); - } -} - -void GeoVPhysVol::dockTo(GeoVPhysVol* parent) -{ - if(m_parentPtr) { - m_parentPtr = this; - } - else { - m_parentPtr = parent; - } -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVolumeAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVolumeAction.cxx deleted file mode 100755 index 5dbf90ff2ce..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVolumeAction.cxx +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoVolumeAction.h" - -GeoVolumeAction::GeoVolumeAction (Type type) - : m_type(type) - , m_terminate(false) -{ -} - -GeoVolumeAction::~GeoVolumeAction() -{ -} - -void GeoVolumeAction::handleVPhysVol (const GeoVPhysVol *) -{ -} - -void GeoVolumeAction::terminate () -{ - m_terminate = true; -} - -bool GeoVolumeAction::shouldTerminate () const -{ - return m_terminate; -} - -const GeoTraversalState* GeoVolumeAction::getState () const -{ - return &m_traversalState; -} - -GeoTraversalState* GeoVolumeAction::getState () -{ - return &m_traversalState; -} - -GeoVolumeAction::Type GeoVolumeAction::getType () const -{ - return m_type; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVolumeCursor.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVolumeCursor.cxx deleted file mode 100755 index d4035b11b40..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoVolumeCursor.cxx +++ /dev/null @@ -1,241 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoVolumeCursor.h" -#include "GeoModelKernel/GeoNameTag.h" -#include "GeoModelKernel/GeoSerialDenominator.h" -#include "GeoModelKernel/GeoSerialIdentifier.h" -#include "GeoModelKernel/GeoAlignableTransform.h" -#include <string> - -GeoVolumeCursor::GeoVolumeCursor (PVConstLink parent, GeoVAlignmentStore* store) - : m_parent(parent) - , m_majorIndex(0) - , m_minorIndex(0) - , m_minorLimit(0) - , m_serialTransformer(nullptr) - , m_nameTag(nullptr) - , m_serialDenominator(nullptr) - , m_idTag(nullptr) - , m_serialDenomPosition(0) - , m_serialIdentifier(nullptr) - , m_serialIdentPosition(0) - , m_volCount(0) - , m_hasAlignTrans(false) - , m_alignStore(store) -{ - setDepthLimit(0); - next(); -} - -GeoVolumeCursor::~GeoVolumeCursor() -{ -} - -void GeoVolumeCursor::next() { - resuscitate(); - - if (m_minorLimit) { // We are doing a serial transformer - m_minorIndex++; - if (m_minorIndex==m_minorLimit) { - m_minorIndex=0; - m_minorLimit=0; - m_majorIndex++; - next(); - } - else { - m_volCount++; - } - } - else { // We are not doing a serial transformer - m_idTag = nullptr; - m_nameTag = nullptr; - m_serialTransformer = nullptr; - m_pendingTransformList.erase (m_pendingTransformList.begin (), - m_pendingTransformList.end ()); - m_hasAlignTrans = false; - m_volume=nullptr; - - int N = m_parent->getNChildNodes(); - if(N==0) return; - const GeoGraphNode * const *node = m_parent->getChildNode(m_majorIndex); - const GeoGraphNode * const *back = m_parent->getChildNode(N-1); - const GeoGraphNode * const *end = back+1; - while (node!=end) { - (*node)->exec(this); - if (m_minorLimit) { // We have stepped into ST - } - else { // We have not stepped into ST. - node++; - m_majorIndex++; - } - if (m_terminate) { - m_volCount++; - break; - } - } - } -} - -void GeoVolumeCursor::resuscitate() { - m_terminate = false; -} - -bool GeoVolumeCursor::atEnd() const { - return !m_volume; -} - -void GeoVolumeCursor::handleTransform (const GeoTransform *xform) -{ - m_pendingTransformList.push_back (xform); - if(dynamic_cast<const GeoAlignableTransform*>(xform)) - m_hasAlignTrans = true; -} - -void GeoVolumeCursor::handlePhysVol (const GeoPhysVol *vol) -{ - - m_volume = vol; - unsigned int listSize = m_pendingTransformList.size (); - if (listSize == 0) { - m_transform = HepGeom::Transform3D(); - m_defTransform = HepGeom::Transform3D(); - } - else { - m_transform = m_pendingTransformList[0]->getTransform(m_alignStore); - m_defTransform = m_pendingTransformList[0]->getDefTransform(m_alignStore); - for (unsigned int t = 1; t < m_pendingTransformList.size (); t++) { - m_transform = m_transform * m_pendingTransformList[t]->getTransform(m_alignStore); - m_defTransform = m_defTransform * m_pendingTransformList[t]->getDefTransform(m_alignStore); - } - } - terminate (); -} - -void GeoVolumeCursor::handleFullPhysVol (const GeoFullPhysVol *vol) -{ - m_volume = vol; - unsigned int listSize = m_pendingTransformList.size (); - if (listSize == 0) { - m_transform = HepGeom::Transform3D(); - m_defTransform = HepGeom::Transform3D(); - } - else { - m_transform = m_pendingTransformList[0]->getTransform(m_alignStore); - m_defTransform = m_pendingTransformList[0]->getDefTransform(m_alignStore); - for (unsigned int t = 1; t < m_pendingTransformList.size (); t++) { - m_transform = m_transform * m_pendingTransformList[t]->getTransform(m_alignStore); - m_defTransform = m_defTransform * m_pendingTransformList[t]->getDefTransform(m_alignStore); - } - } - terminate (); -} - -void GeoVolumeCursor::handleSerialTransformer (const GeoSerialTransformer *sT) -{ - - m_minorLimit = sT->getNCopies(); - m_minorIndex = 0; - m_serialTransformer = sT; - m_volume = sT->getVolume(); - - unsigned int listSize = m_pendingTransformList.size (); - if (listSize == 0) { - m_transform = HepGeom::Transform3D(); - m_defTransform = HepGeom::Transform3D(); - } - else { - m_transform = m_pendingTransformList[0]->getTransform(m_alignStore); - m_defTransform = m_pendingTransformList[0]->getDefTransform(m_alignStore); - for (unsigned int t = 1; t < m_pendingTransformList.size (); t++) { - m_transform = m_transform * m_pendingTransformList[t]->getTransform(m_alignStore); - m_defTransform = m_defTransform * m_pendingTransformList[t]->getDefTransform(m_alignStore); - } - } - terminate (); -} - -void GeoVolumeCursor::handleNameTag (const GeoNameTag *nameTag) -{ - m_nameTag = nameTag; - m_serialDenominator = nullptr; - m_serialDenomPosition = 0; -} - -void GeoVolumeCursor::handleSerialDenominator (const GeoSerialDenominator *sD) -{ - m_serialDenominator = sD; - m_serialDenomPosition = m_volCount; -} - - -void GeoVolumeCursor::handleIdentifierTag (const GeoIdentifierTag *idTag) -{ - m_idTag = idTag; - m_serialIdentifier = nullptr; - m_serialIdentPosition = m_volCount; -} - -void GeoVolumeCursor::handleSerialIdentifier(const GeoSerialIdentifier *sI) -{ - m_serialIdentifier = sI; - m_serialIdentPosition =m_volCount; -} - -PVConstLink GeoVolumeCursor::getVolume () const -{ - return m_volume; -} - -HepGeom::Transform3D GeoVolumeCursor::getTransform () const -{ - if (m_minorLimit) { - return m_transform*m_serialTransformer->getTransform(m_minorIndex); - } - else { - return m_transform; - } -} - -HepGeom::Transform3D GeoVolumeCursor::getDefTransform () const -{ - if (m_minorLimit) { - return m_transform*m_serialTransformer->getTransform(m_minorIndex); - } - else { - return m_defTransform; - } -} - -std::string GeoVolumeCursor::getName () const -{ - std::string name; - if(m_nameTag) { - name = m_nameTag->getName(); - } - else if(m_serialDenominator) { - name = m_serialDenominator->getBaseName() + std::to_string((int)(m_volCount-m_serialDenomPosition-1)); - } - else { - name = "ANON"; - } - return name; -} - -Query<int> GeoVolumeCursor::getId () const -{ - Query<int> id; - if (m_idTag) { - id = Query<int> (m_idTag->getIdentifier ()); - } - else if (m_serialIdentifier) { - id = Query<int> (m_volCount - m_serialIdentPosition - 1 + m_serialIdentifier->getBaseId()); - } - return id; -} - -bool GeoVolumeCursor::hasAlignableTransform() const -{ - return m_hasAlignTrans; -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoXF.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeoXF.cxx deleted file mode 100755 index aec472376e5..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoXF.cxx +++ /dev/null @@ -1,243 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeoXF.h" -#include <stdexcept> -namespace GeoXF -{ - - - - //------------------------------------------------------------------// - // // - // Implementation of Function // - // // - //------------------------------------------------------------------// - - Function::Function () - { - } - - Function::~Function () - { - } - - Product operator * (const Function & a, const Function & b) - { - return Product (&a, &b); - } - - PreMult operator * (const HepGeom::Transform3D & xf, const Function & b) - { - return PreMult (xf, &b); - } - - PostMult operator * (const Function & a, const HepGeom::Transform3D & xf) - { - return PostMult (&a, xf); - } - - unsigned int Function::dimensionality () const - { - return 1; - } - - //------------------------------------------------------------------// - // // - // Implementation of Product // - // // - //------------------------------------------------------------------// - - Product::Product (const Function * arg1, - const Function * arg2):m_arg1 (arg1->clone ()), - m_arg2 (arg2->clone ()) - { - if (arg1->dimensionality () != arg2->dimensionality ()) - { - throw std:: - runtime_error ("Warning: dimension mismatch in GeoXF::Product"); - } - } - - - // Every function must override this: - Product *Product::clone () const - { - return new Product (*this); - } - - // Copy constructor: - Product::Product (const Product & right):Function (), - m_arg1 (right.m_arg1->clone ()), m_arg2 (right.m_arg2->clone ()) - { - } - - - Product::~Product () - { - delete m_arg1; - delete m_arg2; - } - - unsigned int Product::dimensionality () const - { - return m_arg1->dimensionality (); - } - - HepGeom::Transform3D Product::operator () (double x) const - { - return (*m_arg1) (x) * (*m_arg2) (x); - } - - HepGeom::Transform3D Product::operator () (const Genfun::Argument & x) const - { - return (*m_arg1) (x) * (*m_arg2) (x); - } - - - - //------------------------------------------------------------------// - // // - // Implementation of PreMult // - // // - //------------------------------------------------------------------// - - PreMult::PreMult (const HepGeom::Transform3D & arg1, - const Function * arg2):m_arg1 (arg1), - m_arg2 (arg2->clone ()) - { - } - - - // Every function must override this: - PreMult *PreMult::clone () const - { - return new PreMult (*this); - } - - // Copy constructor: - PreMult::PreMult (const PreMult & right):Function (), m_arg1 (right.m_arg1), - m_arg2 (right.m_arg2->clone ()) - { - } - - - PreMult::~PreMult () - { - delete m_arg2; - } - - unsigned int PreMult::dimensionality () const - { - return m_arg2->dimensionality (); - } - - HepGeom::Transform3D PreMult::operator () (double x) const - { - return m_arg1 * (*m_arg2) (x); - } - - HepGeom::Transform3D PreMult::operator () (const Genfun::Argument & x) const - { - return m_arg1 * (*m_arg2) (x); - } - - - //------------------------------------------------------------------// - // // - // Implementation of PostMult // - // // - //------------------------------------------------------------------// - - PostMult::PostMult (const Function * arg1, - const HepGeom::Transform3D & arg2):m_arg1 (arg1->clone ()), - m_arg2 (arg2) - { - } - - - // Every function must override this: - PostMult *PostMult::clone () const - { - return new PostMult (*this); - } - - // Copy constructor: - PostMult::PostMult (const PostMult & right):Function (), - m_arg1 (right.m_arg1->clone ()), m_arg2 (right.m_arg2) - { - } - - - PostMult::~PostMult () - { - delete m_arg1; - } - - unsigned int PostMult::dimensionality () const - { - return m_arg1->dimensionality (); - } - - HepGeom::Transform3D PostMult::operator () (double x) const - { - return (*m_arg1) (x) * m_arg2; - } - - HepGeom::Transform3D PostMult::operator () (const Genfun::Argument & x) const - { - return (*m_arg1) (x) * m_arg2; - } - - - Pow::Pow (const HepGeom::Transform3D & xform, Genfun::GENFUNCTION f):m_xf (xform), - m_function (f.clone ()) - { - } - - Pow::~Pow () - { - delete m_function; - } - - HepGeom::Transform3D Pow::operator () (double x) const - { - // - // Get the translation part and the rotation part: - // - CLHEP::HepRotation rotate = m_xf.getRotation (); - CLHEP::Hep3Vector translate = m_xf.getTranslation (); - CLHEP::HepAxisAngle aa = rotate.axisAngle (); - // - // Evaluate the function - // - double nTimes = (*m_function) (x); - // - // Modify: - // - translate *= nTimes; - aa.setDelta (aa.delta () * nTimes); - // - // Now compose these and return a result: - // - return HepGeom::Translate3D (translate) * HepGeom::Rotate3D (aa.delta (), - aa.axis ()); - } - - HepGeom::Transform3D Pow::operator () (const Genfun::Argument & argument) const - { - return operator () (argument[0]); - } - - Pow *Pow::clone () const - { - return new Pow (*this); - } - - Pow::Pow (const Pow & right):Function (), m_xf (right.m_xf), - m_function (right.m_function->clone ()) - { - } - -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeometryMap.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/GeometryMap.cxx deleted file mode 100755 index 5b0e9418eac..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeometryMap.cxx +++ /dev/null @@ -1,120 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/GeometryMap.h" -#include "GeoModelKernel/GeoVolumeCursor.h" -#include <map> -#include <sys/types.h> -#include <regex.h> -// '^to\w*re$' -class GeometryMap::Clockwork { - -public: - - Clockwork():lV(0){} - - std::vector<std::string> geometryRegex; - std::vector<regex_t *> geometryPreg; - std::vector<std::vector<std::string> > pathList; - std::vector<PVConstLink> physicalVolumes; - unsigned int lV; - - void finalize(unsigned int i, PVConstLink v); -}; - - -GeometryMap::GeometryMap(): - m_c(new Clockwork()) { -} - - -GeometryMap::~GeometryMap() { - delete m_c; -} - -void GeometryMap::add(const std::string & Path) { - std::vector <std::string> pathList; - - std::string path=Path; - // First look for the character "/": - size_t pos = 0; - while (1) { - size_t end = path.find('/',pos); - if (end==path.npos) break; - - std::string sub0(path,pos,end-pos); - pathList.push_back(sub0); - std::string sub1(path,end+1,path.npos-end-1); - path=sub1; - pos=0; - } - // Then look for wild cards: - m_c->pathList.push_back(pathList); - - std::string regex="^"; - //size_t pos=0; - while (1) { - size_t end = path.find('*',pos); - std::string sub(path,pos,end-pos); - regex+=sub; - if (end==path.npos) break; - regex+=".*"; - pos=end+1; - if (pos==path.npos) break; - } - regex+="$"; - m_c->geometryRegex.push_back(regex); - regex_t *preg = new regex_t; - regcomp(preg,regex.c_str(),REG_EXTENDED); - m_c->geometryPreg.push_back(preg); - -} - -void GeometryMap::finalize( PVConstLink v) { - - for (size_t i=0;i<m_c->pathList.size();i++) { - m_c->lV=0; - m_c->finalize(i,v); - } -} - - -void GeometryMap::Clockwork::finalize(unsigned int i, PVConstLink v) { - - static const size_t NMATCH=11; - regmatch_t pmatch[NMATCH]; - - // Something has gone wrong... - if (lV>pathList[i].size()) { - return; - } - if (lV==pathList[i].size()) { - std::string name = v->getLogVol()->getName(); - if (regexec((geometryPreg[i]),name.c_str(), NMATCH, pmatch, 0)==0) { - physicalVolumes.push_back(v); - } - } - else { - GeoVolumeCursor x(v,nullptr); - while (!x.atEnd()) { - lV++; - finalize(i, x.getVolume()); - lV--; - x.next(); - } - } -} - - - - - - -GeometryMap::Iterator GeometryMap::begin() const { - return m_c->physicalVolumes.begin(); -} - -GeometryMap::Iterator GeometryMap::end() const { - return m_c->physicalVolumes.end(); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/PolygonTriangulator.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/PolygonTriangulator.cxx deleted file mode 100755 index 72444010780..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/PolygonTriangulator.cxx +++ /dev/null @@ -1,2112 +0,0 @@ -#include "PolygonTriangulator.h" - -/////////////////////////////////////////////////////////////////////// -// // -// Class: PolygonTriangulator // -// // -// Description: Triangulates any (non-complex) 2D polygon. // -// // -// Author: Thomas Kittelmann (Thomas.Kittelmann@cern.ch), March 2007 // -// // -// Notes: // -// // -// Actual algorithms are adapted from // -// http://www.mema.ucl.ac.be/~wu/Poly2Tri/poly2tri.html // -// (see copyright notice below) // -// // -// Main changes performed for the present incarnation are // -// interface & namespace changes, indentation, small // -// performance tweaks and removal of unused features. // -// Most importantly, got rid of static and globals so the class // -// can be reliably used more than once per process. Also, the // -// output triangles are sorted to preserve "handedness". // -// // -/////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////// Copyright file from poly2tri webpage follows: ///////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -// -// Poly2Tri:Fast and Robust Simple Polygon triangulation with/without holes -// by Sweep Line Algorithm -// Liang, Wu -// http://www.mema.ucl.ac.be/~wu/Poly2Tri/poly2tri.html -// Copyright (C) 2003, 2004, 2005, ALL RIGHTS RESERVED. -// -// --------------------------------------------------------------------- -// wu@mema.ucl.ac.be wuliang@femagsoft.com -// Centre for Sys. Eng. & App. Mech. FEMAGSoft S.A. -// Universite Cathalique de Louvain 4, Avenue Albert Einstein -// Batiment Euler, Avenue Georges Lemaitre, 4 B-1348 Louvain-la-Neuve -// B-1348, Louvain-la-Neuve Belgium -// Belgium -// --------------------------------------------------------------------- -// -// This program is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -// TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -// -// This program may be freely redistributed under the condition that all -// the copyright notices in all source files ( including the copyright -// notice printed when the `-h' switch is selected) are not removed.Both -// the binary and source codes may not be sold or included in any comme- -// rcial products without a license from the corresponding author(s) & -// entities. -// -// 1) Arbitrary precision floating-point arithmetic and fast robust geo- -// metric predicates (predicates.cc) is copyrighted by -// Jonathan Shewchuk (http://www.cs.berkeley.edu/~jrs) and you may get -// the source code from http://www.cs.cmu.edu/~quake/robust.html -// -// 2) The shell script mps2eps is copyrighted by Jon Edvardsson -// (http://www.ida.liu.se/~pelab/members/index.php4/?12) and you may -// get the copy from http://www.ida.liu.se/~joned/download/mps2eps/ -// -// 3) All other source codes and exmaples files distributed in Poly2Tri -// are copyrighted by Liang, Wu (http://www.mema.ucl.ac.be/~wu) and -// FEMAGSoft S.A. -// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// -/////////////////////////////////////////////////////////////////////////////// - -#include <algorithm> -#include <cmath> -#include <cstdlib> -#include <map> -#include <limits> -#include <list> -#include <queue> -#include <set> -#include <iostream> -#include <stack> -#include <assert.h> - -namespace internal_poltrig { - - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////// Defs.h //////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - - //-------------------------------------------------------------------------/ - //Copyright (C) 2003, 2004, 2005, ALL RIGHTS RESERVED. - //Centre for Sys. Eng. & App. Mech. FEMAGSoft S.A. - //Universite Cathalique de Louvain 4, Avenue Albert Einstein - //Batiment Euler, Avenue Georges Lemaitre, 4 B-1348 Louvain-la-Neuve - //B-1348, Louvain-la-Neuve Belgium - //Belgium - //-------------------------------------------------------------------------/ - //Name: defs.h - //Purpose: some definition for mesh generation - //Author: Wu Liang - //Created: 03/2000 - //-------------------------------------------------------------------------/ - - -#define sqr(t) (t)*(t) - - //const double PI=3.141592653589793238462643383279502884197169399375105820974944592308; - enum Type { UNKNOWN, INPUT, INSERT, START, END, MERGE, SPLIT, REGULAR_UP, REGULAR_DOWN}; - - class Pointbase; - class Linebase; - - template <class T, class KeyType> class SplayTree; - typedef std::map<unsigned int, Pointbase*> PointbaseMap; - typedef std::map<unsigned int, Linebase*> LineMap; - typedef std::priority_queue<Pointbase> PQueue; - typedef SplayTree<Linebase*, double> EdgeBST; - typedef std::list<unsigned int> Monopoly; - typedef std::list<Monopoly> Monopolys; - typedef std::vector<unsigned int> Triangle; - typedef std::list<Triangle> Triangles; - typedef std::map<unsigned int, std::set<unsigned int> > AdjEdgeMap; - - - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////// predicates.cc ///////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - - /*****************************************************************************/ - /* */ - /* Routines for Arbitrary Precision Floating-point Arithmetic */ - /* and Fast Robust Geometric Predicates */ - /* (predicates.cc) */ - /* */ - /* May 18, 1996 */ - /* */ - /* Placed in the public domain by */ - /* Jonathan Richard Shewchuk */ - /* School of Computer Science */ - /* Carnegie Mellon University */ - /* 5000 Forbes Avenue */ - /* Pittsburgh, Pennsylvania 15213-3891 */ - /* jrs@cs.cmu.edu */ - /* */ - /* This file contains C implementation of algorithms for exact addition */ - /* and multiplication of floating-point numbers, and predicates for */ - /* robustly performing the orientation and incircle tests used in */ - /* computational geometry. The algorithms and underlying theory are */ - /* described in Jonathan Richard Shewchuk. "Adaptive Precision Floating- */ - /* Point Arithmetic and Fast Robust Geometric Predicates." Technical */ - /* Report CMU-CS-96-140, School of Computer Science, Carnegie Mellon */ - /* University, Pittsburgh, Pennsylvania, May 1996. (Submitted to */ - /* Discrete & Computational Geometry.) */ - /* */ - /* This file, the paper listed above, and other information are available */ - /* from the Web page http://www.cs.cmu.edu/~quake/robust.html . */ - /* */ - /*****************************************************************************/ - - /*****************************************************************************/ - /* */ - /* Using this code: */ - /* */ - /* First, read the short or long version of the paper (from the Web page */ - /* above). */ - /* */ - /* Be sure to call exactinit() once, before calling any of the arithmetic */ - /* functions or geometric predicates. Also be sure to turn on the */ - /* optimizer when compiling this file. */ - /* */ - /* */ - /* Several geometric predicates are defined. Their parameters are all */ - /* points. Each point is an array of two or three floating-point */ - /* numbers. The geometric predicates, described in the papers, are */ - /* */ - /* orient2d(pa, pb, pc) */ - /* orient2dfast(pa, pb, pc) */ - /* orient3d(pa, pb, pc, pd) */ - /* orient3dfast(pa, pb, pc, pd) */ - /* incircle(pa, pb, pc, pd) */ - /* incirclefast(pa, pb, pc, pd) */ - /* insphere(pa, pb, pc, pd, pe) */ - /* inspherefast(pa, pb, pc, pd, pe) */ - /* */ - /* Those with suffix "fast" are approximate, non-robust versions. Those */ - /* without the suffix are adaptive precision, robust versions. There */ - /* are also versions with the suffices "exact" and "slow", which are */ - /* non-adaptive, exact arithmetic versions, which I use only for timings */ - /* in my arithmetic papers. */ - /* */ - /* */ - /* An expansion is represented by an array of floating-point numbers, */ - /* sorted from smallest to largest magnitude (possibly with interspersed */ - /* zeros). The length of each expansion is stored as a separate integer, */ - /* and each arithmetic function returns an integer which is the length */ - /* of the expansion it created. */ - /* */ - /* Several arithmetic functions are defined. Their parameters are */ - /* */ - /* e, f Input expansions */ - /* elen, flen Lengths of input expansions (must be >= 1) */ - /* h Output expansion */ - /* b Input scalar */ - /* */ - /* The arithmetic functions are */ - /* */ - /* grow_expansion(elen, e, b, h) */ - /* grow_expansion_zeroelim(elen, e, b, h) */ - /* expansion_sum(elen, e, flen, f, h) */ - /* expansion_sum_zeroelim1(elen, e, flen, f, h) */ - /* expansion_sum_zeroelim2(elen, e, flen, f, h) */ - /* fast_expansion_sum(elen, e, flen, f, h) */ - /* fast_expansion_sum_zeroelim(elen, e, flen, f, h) */ - /* linear_expansion_sum(elen, e, flen, f, h) */ - /* linear_expansion_sum_zeroelim(elen, e, flen, f, h) */ - /* scale_expansion(elen, e, b, h) */ - /* scale_expansion_zeroelim(elen, e, b, h) */ - /* compress(elen, e, h) */ - /* */ - /* All of these are described in the long version of the paper; some are */ - /* described in the short version. All return an integer that is the */ - /* length of h. Those with suffix _zeroelim perform zero elimination, */ - /* and are recommended over their counterparts. The procedure */ - /* fast_expansion_sum_zeroelim() (or linear_expansion_sum_zeroelim() on */ - /* processors that do not use the round-to-even tiebreaking rule) is */ - /* recommended over expansion_sum_zeroelim(). Each procedure has a */ - /* little note next to it (in the code below) that tells you whether or */ - /* not the output expansion may be the same array as one of the input */ - /* expansions. */ - /* */ - /* */ - /* If you look around below, you'll also find macros for a bunch of */ - /* simple unrolled arithmetic operations, and procedures for printing */ - /* expansions (commented out because they don't work with all C */ - /* compilers) and for generating rand floating-point numbers whose */ - /* significand bits are all rand. Most of the macros have undocumented */ - /* requirements that certain of their parameters should not be the same */ - /* variable; for safety, better to make sure all the parameters are */ - /* distinct variables. Feel free to send email to jrs@cs.cmu.edu if you */ - /* have questions. */ - /* */ - /*****************************************************************************/ - - /* On some machines, the exact arithmetic routines might be defeated by the */ - /* use of internal extended precision floating-point registers. Sometimes */ - /* this problem can be fixed by defining certain values to be volatile, */ - /* thus forcing them to be stored to memory and rounded off. This isn't */ - /* a great solution, though, as it slows the arithmetic down. */ - /* */ - /* To try this out, write "#define INEXACT volatile" below. Normally, */ - /* however, INEXACT should be defined to be nothing. ("#define INEXACT".) */ - -#define INEXACT /* Nothing */ - /* #define INEXACT volatile */ - -#define REAL double /* float or double */ - - /* Which of the following two methods of finding the absolute values is */ - /* fastest is compiler-dependent. A few compilers can inline and optimize */ - /* the fabs() call; but most will incur the overhead of a function call, */ - /* which is disastrously slow. A faster way on IEEE machines might be to */ - /* mask the appropriate bit, but that's difficult to do in C. */ - -#define Absolute(a) ((a) >= 0.0 ? (a) : -(a)) - /* #define Absolute(a) fabs(a) */ - - /* Many of the operations are broken up into two pieces, a main part that */ - /* performs an approximate operation, and a "tail" that computes the */ - /* roundoff error of that operation. */ - /* */ - /* The operations Fast_Two_Sum(), Fast_Two_Diff(), Two_Sum(), Two_Diff(), */ - /* Split(), and Two_Product() are all implemented as described in the */ - /* reference. Each of these macros requires certain variables to be */ - /* defined in the calling routine. The variables `bvirt', `c', `abig', */ - /* `_i', `_j', `_k', `_l', `_m', and `_n' are declared `INEXACT' because */ - /* they store the result of an operation that may incur roundoff error. */ - /* The input parameter `x' (or the highest numbered `x_' parameter) must */ - /* also be declared `INEXACT'. */ - -#define Fast_Two_Sum_Tail(a, b, x, y) \ - bvirt = x - a; \ - y = b - bvirt - -#define Fast_Two_Sum(a, b, x, y) \ - x = (REAL) (a + b); \ - Fast_Two_Sum_Tail(a, b, x, y) - -#define Two_Sum_Tail(a, b, x, y) \ - bvirt = (REAL) (x - a); \ - avirt = x - bvirt; \ - bround = b - bvirt; \ - around = a - avirt; \ - y = around + bround - -#define Two_Sum(a, b, x, y) \ - x = (REAL) (a + b); \ - Two_Sum_Tail(a, b, x, y) - -#define Two_Diff_Tail(a, b, x, y) \ - bvirt = (REAL) (a - x); \ - avirt = x + bvirt; \ - bround = bvirt - b; \ - around = a - avirt; \ - y = around + bround - -#define Two_Diff(a, b, x, y) \ - x = (REAL) (a - b); \ - Two_Diff_Tail(a, b, x, y) - - - // c = (REAL) (splitter * a); - -#define Split(a, ahi, alo) \ - c = (REAL) (1.0 * a); \ - abig = (REAL) (c - a); \ - ahi = c - abig; \ - alo = a - ahi - -#define Two_Product_Tail(a, b, x, y) \ - Split(a, ahi, alo); \ - Split(b, bhi, blo); \ - err1 = x - (ahi * bhi); \ - err2 = err1 - (alo * bhi); \ - err3 = err2 - (ahi * blo); \ - y = (alo * blo) - err3 - -#define Two_Product(a, b, x, y) \ - x = (REAL) (a * b); \ - Two_Product_Tail(a, b, x, y) - - /* Macros for summing expansions of various fixed lengths. These are all */ - /* unrolled versions of Expansion_Sum(). */ - -#define Two_One_Diff(a1, a0, b, x2, x1, x0) \ - Two_Diff(a0, b , i, x0); \ - Two_Sum( a1, i, x2, x1) - -#define Two_Two_Diff(a1, a0, b1, b0, x3, x2, x1, x0) \ - Two_One_Diff(a1, a0, b0, j, zero, x0); \ - Two_One_Diff(j, zero, b1, x3, x2, x1) - - - //TK: weird globals, never initialised. Just replaced with 1.0 everywhere... - // REAL splitter(1); /* = 2^ceiling(p / 2) + 1. Used to split floats in half. */ - /* A set of coefficients used to calculate maximum roundoff errors. */ - // REAL resulterrbound; - // REAL ccwerrboundA, ccwerrboundB, ccwerrboundC; - // REAL o3derrboundA, o3derrboundB, o3derrboundC; - // REAL iccerrboundA, iccerrboundB, iccerrboundC; - // REAL isperrboundA, isperrboundB, isperrboundC; - - /*****************************************************************************/ - /* */ - /* fast_expansion_sum_zeroelim() Sum two expansions, eliminating zero */ - /* components from the output expansion. */ - /* */ - /* Sets h = e + f. See the long version of my paper for details. */ - /* */ - /* If round-to-even is used (as with IEEE 754), maintains the strongly */ - /* nonoverlapping property. (That is, if e is strongly nonoverlapping, h */ - /* will be also.) Does NOT maintain the nonoverlapping or nonadjacent */ - /* properties. */ - /* */ - /*****************************************************************************/ - - int fast_expansion_sum_zeroelim(const int& elen, REAL* e, const int& flen, REAL* f, REAL* h) - /* h cannot be e or f. */ - { - REAL Q; - INEXACT REAL Qnew; - INEXACT REAL hh; - INEXACT REAL bvirt; - REAL avirt, bround, around; - int eindex, findex, hindex; - REAL enow, fnow; - - enow = e[0]; - fnow = f[0]; - eindex = findex = 0; - if ((fnow > enow) == (fnow > -enow)) { - Q = enow; - enow = e[++eindex]; - } else { - Q = fnow; - fnow = f[++findex]; - } - hindex = 0; - if ((eindex < elen) && (findex < flen)) { - if ((fnow > enow) == (fnow > -enow)) { - Fast_Two_Sum(enow, Q, Qnew, hh); - enow = e[++eindex]; - } else { - Fast_Two_Sum(fnow, Q, Qnew, hh); - fnow = f[++findex]; - } - Q = Qnew; - if (hh != 0.0) { - h[hindex++] = hh; - } - while ((eindex < elen) && (findex < flen)) { - if ((fnow > enow) == (fnow > -enow)) { - Two_Sum(Q, enow, Qnew, hh); - enow = e[++eindex]; - } else { - Two_Sum(Q, fnow, Qnew, hh); - fnow = f[++findex]; - } - Q = Qnew; - if (hh != 0.0) { - h[hindex++] = hh; - } - } - } - while (eindex < elen) { - Two_Sum(Q, enow, Qnew, hh); - enow = e[++eindex]; - Q = Qnew; - if (hh != 0.0) { - h[hindex++] = hh; - } - } - while (findex < flen) { - Two_Sum(Q, fnow, Qnew, hh); - fnow = f[++findex]; - Q = Qnew; - if (hh != 0.0) { - h[hindex++] = hh; - } - } - if ((Q != 0.0) || (hindex == 0)) { - h[hindex++] = Q; - } - return hindex; - } - - - /*****************************************************************************/ - /* */ - /* estimate() Produce a one-word estimate of an expansion's value. */ - /* */ - /* See either version of my paper for details. */ - /* */ - /*****************************************************************************/ - - REAL estimate(const int& elen, REAL* e) - { - REAL Q; - int eindex; - - Q = e[0]; - for (eindex = 1; eindex < elen; ++eindex) { - Q += e[eindex]; - } - return Q; - } - - /*****************************************************************************/ - /* */ - /* orient2dfast() Approximate 2D orientation test. Nonrobust. */ - /* orient2dexact() Exact 2D orientation test. Robust. */ - /* orient2dslow() Another exact 2D orientation test. Robust. */ - /* orient2d() Adaptive exact 2D orientation test. Robust. */ - /* */ - /* Return a positive value if the points pa, pb, and pc occur */ - /* in counterclockwise order; a negative value if they occur */ - /* in clockwise order; and zero if they are collinear. The */ - /* result is also a rough approximation of twice the signed */ - /* area of the triangle defined by the three points. */ - /* */ - /* Only the first and last routine should be used; the middle two are for */ - /* timings. */ - /* */ - /* The last three use exact arithmetic to ensure a correct answer. The */ - /* result returned is the determinant of a matrix. In orient2d() only, */ - /* this determinant is computed adaptively, in the sense that exact */ - /* arithmetic is used only to the degree it is needed to ensure that the */ - /* returned value has the correct sign. Hence, orient2d() is usually quite */ - /* fast, but will run more slowly when the input points are collinear or */ - /* nearly so. */ - /* */ - /*****************************************************************************/ - - REAL orient2dadapt(REAL* pa, REAL* pb, REAL* pc, const REAL& detsum) - { - INEXACT REAL acx, acy, bcx, bcy; - REAL acxtail, acytail, bcxtail, bcytail; - INEXACT REAL detleft, detright; - REAL detlefttail, detrighttail; - REAL det, errbound; - REAL B[4], C1[8], C2[12], D[16]; - INEXACT REAL B3; - int C1length, C2length, Dlength; - REAL u[4]; - INEXACT REAL u3; - INEXACT REAL s1, t1; - REAL s0, t0; - - INEXACT REAL bvirt; - REAL avirt, bround, around; - INEXACT REAL c; - INEXACT REAL abig; - REAL ahi, alo, bhi, blo; - REAL err1, err2, err3; - INEXACT REAL i, j; - REAL zero; - - acx = (REAL) (pa[0] - pc[0]); - bcx = (REAL) (pb[0] - pc[0]); - acy = (REAL) (pa[1] - pc[1]); - bcy = (REAL) (pb[1] - pc[1]); - - Two_Product(acx, bcy, detleft, detlefttail); - Two_Product(acy, bcx, detright, detrighttail); - - Two_Two_Diff(detleft, detlefttail, detright, detrighttail, - B3, B[2], B[1], B[0]); - B[3] = B3; - - det = estimate(4, B); - // errbound = ccwerrboundB * detsum; - errbound = detsum; - if ((det >= errbound) || (-det >= errbound)) { - return det; - } - - Two_Diff_Tail(pa[0], pc[0], acx, acxtail); - Two_Diff_Tail(pb[0], pc[0], bcx, bcxtail); - Two_Diff_Tail(pa[1], pc[1], acy, acytail); - Two_Diff_Tail(pb[1], pc[1], bcy, bcytail); - - if ((acxtail == 0.0) && (acytail == 0.0) - && (bcxtail == 0.0) && (bcytail == 0.0)) { - return det; - } - - // errbound = ccwerrboundC * detsum + resulterrbound * Absolute(det); - errbound = detsum + Absolute(det); - det += (acx * bcytail + bcy * acxtail) - - (acy * bcxtail + bcx * acytail); - if ((det >= errbound) || (-det >= errbound)) { - return det; - } - - Two_Product(acxtail, bcy, s1, s0); - Two_Product(acytail, bcx, t1, t0); - Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]); - u[3] = u3; - C1length = fast_expansion_sum_zeroelim(4, B, 4, u, C1); - - Two_Product(acx, bcytail, s1, s0); - Two_Product(acy, bcxtail, t1, t0); - Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]); - u[3] = u3; - C2length = fast_expansion_sum_zeroelim(C1length, C1, 4, u, C2); - - Two_Product(acxtail, bcytail, s1, s0); - Two_Product(acytail, bcxtail, t1, t0); - Two_Two_Diff(s1, s0, t1, t0, u3, u[2], u[1], u[0]); - u[3] = u3; - Dlength = fast_expansion_sum_zeroelim(C2length, C2, 4, u, D); - - return(D[Dlength - 1]); - } - - REAL orient2d(REAL* pa, REAL* pb, REAL* pc) - { - REAL detleft, detright, det; - REAL detsum, errbound; - - detleft = (pa[0] - pc[0]) * (pb[1] - pc[1]); - detright = (pa[1] - pc[1]) * (pb[0] - pc[0]); - det = detleft - detright; - - if (detleft > 0.0) { - if (detright <= 0.0) { - return det; - } else { - detsum = detleft + detright; - } - } else if (detleft < 0.0) { - if (detright >= 0.0) { - return det; - } else { - detsum = -detleft - detright; - } - } else { - return det; - } - - // errbound = ccwerrboundA * detsum; - errbound = detsum; - if ((det >= errbound) || (-det >= errbound)) { - return det; - } - - return orient2dadapt(pa, pb, pc, detsum); - } - - - //////////////////////////////////////////////// - - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////// splay.h /////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - - //-------------------------------------------------------------------------/ - //Copyright (C) 2003, 2004, 2005, ALL RIGHTS RESERVED. - //Centre for Sys. Eng. & App. Mech. FEMAGSoft S.A. - //Universite Cathalique de Louvain 4, Avenue Albert Einstein - //Batiment Euler, Avenue Georges Lemaitre, 4 B-1348 Louvain-la-Neuve - //B-1348, Louvain-la-Neuve Belgium - //Belgium - //-------------------------------------------------------------------------/ - // - //Name: splay.h (self-adjusting balanced binary search tree) - //Purpose: declaration and implentation of splay tree class for fast - // binary searching - //Author: Liang, Wu (wu@mema.ucl.ac.be, wuliang@femagsoft.com) - //Created: 03/2002 - //Modified: 2003, 2004, 2005 - //-------------------------------------------------------------------------/ - - template <class T, class KeyType> - class SplayTree; - - template <class T, class KeyType> - class BTreeNode - { - public: - friend class SplayTree<T, KeyType>; - BTreeNode( ) : m_data(), m_left( nullptr ), m_right( nullptr ), m_visited(false) { } - BTreeNode( const T & data, BTreeNode *lt, BTreeNode *rt ) - : m_data(data),m_left( lt ), m_right( rt ), m_visited(false) { } - - T& data() { return m_data; } - BTreeNode* Left() { return m_left; } - BTreeNode* Right() { return m_right; } - void SetVisited(const bool& visited) { m_visited=visited; } - bool GetVisited() { return m_visited; } - KeyType keyValue() { return m_data->keyValue(); } - - private: - T m_data; - BTreeNode *m_left; - BTreeNode *m_right; - bool m_visited; - - }; - - - template <class T, class KeyType> - class SplayTree - { - public: - explicit SplayTree( ):m_root(nullptr),m_size(0) { } - SplayTree( const SplayTree & rhs ); - ~SplayTree( ); - - void MakeEmpty( ); - bool IsEmpty( ) const; - long int Size() { return m_size; } - BTreeNode<T, KeyType>* Root() { - // cppcheck false positive: - // cppcheck-suppress CastIntegerToAddressAtReturn - return m_root; - } - - void Find( const KeyType& keys, BTreeNode<T, KeyType>* & res); - void FindMin( BTreeNode<T, KeyType>* &min ); - void FindMax( BTreeNode<T, KeyType>* &max ); - // We only use this function for polygon Triangulation to find the direct - // left edge of an event vertex; - void FindMaxSmallerThan( const KeyType& keys, BTreeNode<T, KeyType>* &res); - - void Insert( const T & x ); - void Delete( const KeyType& keys); - void Delete( const KeyType& keys, BTreeNode<T, KeyType>* &res); - void DeleteMin(BTreeNode<T, KeyType>* &min); - void DeleteMax(BTreeNode<T, KeyType>* &max); - - const SplayTree & operator=( const SplayTree & rhs ); - void PreOrder( void(*Visit)(BTreeNode<T,KeyType> *u) ) - { PreOrder(Visit, m_root); } - void InOrder( void(*Visit)(BTreeNode<T,KeyType> *u) ) - { InOrder(Visit, m_root); } - - void InOrder( void(*Visit)(BTreeNode<T,KeyType>*u, double y), double y) - { InOrder(Visit, m_root, y); } - - void PostOrder( void(*Visit)(BTreeNode<T,KeyType> *u) ) - { PostOrder(Visit, m_root); } - - int Height( ) const { return Height(m_root); } //height of m_root - int Height(BTreeNode<T, KeyType> *t) const; //Height of subtree t; - BTreeNode<T, KeyType>* Left(BTreeNode<T, KeyType> *node) { return node->m_left; } - BTreeNode<T, KeyType>* Right(BTreeNode<T, KeyType> *node) { return node->m_right; } - - private: - BTreeNode<T, KeyType> *m_root; - long int m_size; - - void reclaimMemory( BTreeNode<T, KeyType> * t ) const; - BTreeNode<T, KeyType> * clone( BTreeNode<T, KeyType> *t ) const; - - //Transverse - void PreOrder( void(*Visit)(BTreeNode<T, KeyType> *u), BTreeNode<T, KeyType> *t); - void InOrder( void(*Visit)(BTreeNode<T, KeyType> *u), BTreeNode<T, KeyType> *t); - void PostOrder( void(*Visit)(BTreeNode<T, KeyType> *u), BTreeNode<T, KeyType> *t); - - void InOrder( void(*Visit)(BTreeNode<T, KeyType>*, double y), - BTreeNode<T, KeyType> *t, double y); - - - - // Tree manipulations - void rotateWithLeftChild( BTreeNode<T, KeyType> * & k2 ) const; - void rotateWithRightChild( BTreeNode<T, KeyType> * & k1 ) const; - void splay( const KeyType& keys, BTreeNode<T, KeyType> * & t ) const; - }; - - //---------------------------------------------------------------------- - //Constructor; - //---------------------------------------------------------------------- - template <class T, class KeyType> - SplayTree<T, KeyType>::SplayTree( const SplayTree<T, KeyType> & rhs ) - { - *this = rhs; - } - - //----------------------------------------------------------------------- - //Destructor. - //----------------------------------------------------------------------- - template <class T, class KeyType> - SplayTree<T, KeyType>::~SplayTree( ) - { - MakeEmpty( ); - } - - //------------------------------------------------------------------------ - //Insert x into the tree. - //------------------------------------------------------------------------ - template <class T, class KeyType> - void SplayTree<T, KeyType>::Insert( const T & x ) - { - - BTreeNode<T, KeyType> *newNode= new BTreeNode<T, KeyType>; - newNode->m_data=x; - - if( m_root == nullptr ) - { - newNode->m_left = newNode->m_right = nullptr; - m_root = newNode; ++m_size; - } - else - { - KeyType keys=x->keyValue(); - splay( keys, m_root ); - KeyType rootk=m_root->keyValue(); - if( keys < rootk ) - { - newNode->m_left = m_root->m_left; - newNode->m_right = m_root; - m_root->m_left = nullptr; - m_root = newNode; - ++m_size; - } - else if( keys > rootk ) - { - - newNode->m_right = m_root->m_right; - newNode->m_left = m_root; - m_root->m_right = nullptr; - m_root = newNode; - ++m_size; - } - else - { - //slight incresed the keyvalue to avoid duplicated keys - x->increaseKeyValue(1.0e-10); - Insert(x); - delete newNode; - } - } - } - - //--------------------------------------------------------------------- - //Remove the node with the keys from the tree, and retrieve the result - //--------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::Delete( const KeyType& keys, BTreeNode<T, KeyType>* &res) - { - BTreeNode<T, KeyType> *newTree; - - splay( keys, m_root ); - if( m_root->keyValue() != keys ) { res=nullptr; return; } // Item not found; do nothing - - res = m_root; - - if( m_root->m_left == nullptr ) - newTree = m_root->m_right; - else - { - // Find the maximum in the m_left subtree - // Splay it to the m_root; and then attach m_right child - newTree = m_root->m_left; - splay( keys, newTree ); - newTree->m_right = m_root->m_right; - } - - m_root = newTree; - m_size--; - } - - //--------------------------------------------------------------------- - //Remove the node with the keys from the tree. - //--------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::Delete( const KeyType& keys) - { - BTreeNode<T, KeyType> *newTree; - - splay( keys, m_root ); - KeyType rootk=m_root->keyValue(); - if( rootk != keys ) { return; } // Item not found; do nothing - - if( m_root->m_left == nullptr ) newTree = m_root->m_right; - else - { - // Find the maximum in the m_left subtree - // Splay it to the m_root; and then attach m_right child - newTree = m_root->m_left; - splay( keys, newTree ); - newTree->m_right = m_root->m_right; - } - - delete m_root; - m_root = newTree; - m_size--; - } - - - - //--------------------------------------------------------------------- - //Find and Delete the node with min keys from the tree; - //--------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::DeleteMin(BTreeNode<T, KeyType>* &min) - { - if( IsEmpty( ) ) { min=nullptr; return; } - - double keys=-1.0e30; - splay( keys, m_root ); - - min = m_root; - - BTreeNode<T, KeyType> *newTree; - if( m_root->m_left == nullptr ) newTree = m_root->m_right; - else - { - newTree = m_root->m_left; - splay( keys, newTree ); - newTree->m_right = m_root->m_right; - } - - m_size--; - m_root = newTree; - - } - - //---------------------------------------------------------------------- - //Find and Delete the node with max keys from the tree; - //---------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::DeleteMax(BTreeNode<T, KeyType>* &max) - { - if( IsEmpty( ) ) { max=nullptr; return; } - - double keys=1.0e30; - splay( keys, m_root ); - - max = m_root; - - BTreeNode<T, KeyType> *newTree; - if( m_root->m_left == nullptr ) newTree = m_root->m_right; - else - { - newTree = m_root->m_left; - splay( keys, newTree ); - newTree->m_right = m_root->m_right; - } - m_size--; - m_root = newTree; - } - - - //---------------------------------------------------------------------- - //Find the smallest item in the tree, but won't delete it from the tree. - //---------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::FindMin(BTreeNode<T, KeyType>* & min ) - { - if( IsEmpty( ) ) { min=nullptr; return; } - BTreeNode<T, KeyType> *ptr = m_root; - - while( ptr->m_left != nullptr ) ptr = ptr->m_left; - splay( ptr->keyValue(), m_root ); - min = ptr; - } - - //---------------------------------------------------------------------- - //Find the largest item in the tree. but won't delete it from the tree. - //---------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::FindMax(BTreeNode<T, KeyType>* & max) - { - if( IsEmpty( ) ) { max=nullptr; return; } - - BTreeNode<T, KeyType> *ptr = m_root; - while( ptr->m_right != nullptr ) ptr = ptr->m_right; - splay( ptr->keyValue(), m_root ); - max = ptr; - } - - //-------------------------------------------------------------------- - //Find the node with the keys in the tree. - //res==nullptr if it donesn't exist in the tree; - //-------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::Find( const KeyType& keys, BTreeNode<T, KeyType>* & res) - { - if( IsEmpty( ) ) { res=nullptr; return; } - splay( keys, m_root ); - if( m_root->keyValue() != keys ) { res=nullptr; return; } - else res = m_root; - } - - //-------------------------------------------------------------------- - //Find the maximum node smaller than or equal to the given key. - //This function specially designed for polygon Triangulation to - //find the direct left edge at event vertex; - //-------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::FindMaxSmallerThan( const KeyType& keys, BTreeNode<T, KeyType>* &res) - { - if( IsEmpty( ) ) { res=nullptr; return; } - splay( keys, m_root ); - - if( m_root->data()->keyValue() < keys) res=m_root; - else if(m_root->m_left) - { - res=m_root->m_left; - while(res->m_right) res=res->m_right; - } - else - { - assert(false); - } - } - - //-------------------------------------------------------------------- - //Make the tree logically empty. - //-------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::MakeEmpty( ) - { - BTreeNode<T, KeyType>* ptr; - while( !IsEmpty( ) ) - { - DeleteMax(ptr); - delete ptr; - } - } - - //--------------------------------------------------------------------- - //Test if the tree is logically empty. - //--------------------------------------------------------------------- - template <class T, class KeyType> - bool SplayTree<T, KeyType>::IsEmpty( ) const - { - return m_root == nullptr; - } - - //---------------------------------------------------------------------- - //copy overload operator. - //---------------------------------------------------------------------- - template <class T, class KeyType> - const SplayTree<T, KeyType> & SplayTree<T, KeyType>::operator=( const SplayTree<T, KeyType> & rhs ) - { - if( this != &rhs ) - { - MakeEmpty( ); - m_root = clone( rhs.m_root ); - } - - return *this; - } - - //----------------------------------------------------------------------- - //Internal method to perform a top-down splay. - //x is the key of target node to splay around. - //t is the m_root of the subtree to splay. - //----------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::splay( const KeyType& keys, BTreeNode<T, KeyType> * & t ) const - { - BTreeNode<T, KeyType> *leftTreeMax, *rightTreeMin; - // static BTreeNode<T, KeyType> header; - BTreeNode<T, KeyType> header;//TK: Removed static keyword. Rather a bit slower than thread problems... - - header.m_left = header.m_right = nullptr; - leftTreeMax = rightTreeMin = &header; - - for( ; ; ) - { - KeyType rkey=t->keyValue(); - if( keys < rkey ) - { - if(t->m_left == nullptr) break; - if( keys < t->m_left->keyValue() ) rotateWithLeftChild( t ); - if( t->m_left == nullptr ) break; - - // Link Right - rightTreeMin->m_left = t; - rightTreeMin = t; - t = t->m_left; - } - else if( keys > rkey ) - { - if( t->m_right == nullptr ) break; - if( keys > t->m_right->keyValue() ) rotateWithRightChild( t ); - if( t->m_right == nullptr ) break; - - // Link Left - leftTreeMax->m_right = t; - leftTreeMax = t; - t = t->m_right; - } - else break; - } - - leftTreeMax->m_right = t->m_left; - rightTreeMin->m_left = t->m_right; - t->m_left = header.m_right; - t->m_right = header.m_left; - - } - - //-------------------------------------------------------------------- - //Rotate binary tree node with m_left child. - //-------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::rotateWithLeftChild( BTreeNode<T, KeyType> * & k2 ) const - { - BTreeNode<T, KeyType> *k1 = k2->m_left; - k2->m_left = k1->m_right; - k1->m_right = k2; - k2 = k1; - } - - //--------------------------------------------------------------------- - //Rotate binary tree node with m_right child. - //--------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::rotateWithRightChild( BTreeNode<T, KeyType> * & k1 ) const - { - BTreeNode<T, KeyType> *k2 = k1->m_right; - k1->m_right = k2->m_left; - k2->m_left = k1; - k1 = k2; - } - - //---------------------------------------------------------------------- - //Internal method to reclaim internal nodes in subtree t. - //WARNING: This is prone to running out of stack space. - //---------------------------------------------------------------------- - template <class T, class KeyType> - void SplayTree<T, KeyType>::reclaimMemory( BTreeNode<T, KeyType> * t ) const - { - if( t != t->m_left ) - { - reclaimMemory( t->m_left ); - reclaimMemory( t->m_right ); - delete t; - } - } - - //----------------------------------------------------------------------- - //Internal method to clone subtree. - //WARNING: This is prone to running out of stack space. - //----------------------------------------------------------------------- - template <class T, class KeyType> - BTreeNode<T, KeyType> * SplayTree<T, KeyType>::clone( BTreeNode<T, KeyType> * t ) const - { - if( t == t->m_left ) // Cannot test against nullptrNode!!! - return nullptr; - else - return new BTreeNode<T, KeyType>( t->m_data, clone( t->m_left ), clone( t->m_right ) ); - } - - //----------------------------------------------------------------------- - //Tranverse the tree by pre-order method; - //----------------------------------------------------------------------- - template<class T, class KeyType> - void SplayTree<T, KeyType>::PreOrder( void(*Visit)(BTreeNode<T, KeyType> *u), BTreeNode<T, KeyType> *t) - { - if(t!=nullptr) - { - Visit(t); - PreOrder(Visit,t->m_left); - PreOrder(Visit,t->m_right); - } - - } - - //----------------------------------------------------------------------- - //Tranverse the tree by in-order method; - //----------------------------------------------------------------------- - template<class T, class KeyType> - void SplayTree<T, KeyType>::InOrder( void(*Visit)(BTreeNode<T, KeyType> *u), BTreeNode<T, KeyType> *t) - { - if(t!=nullptr) - { - InOrder(Visit,t->m_left); - Visit(t); - InOrder(Visit,t->m_right); - } - } - - - //----------------------------------------------------------------------- - //Tranverse the tree by in-order method; - //----------------------------------------------------------------------- - template<class T, class KeyType> - void SplayTree<T, KeyType>::InOrder( void(*Visit)(BTreeNode<T, KeyType>*u, double y) - , BTreeNode<T, KeyType> *t, double y) - { - if(t!=nullptr) - { - InOrder(Visit,t->m_left, y); - Visit(t, y); - InOrder(Visit,t->m_right, y); - } - } - - - - //----------------------------------------------------------------------- - //Tranverse the tree by post-order method; - //----------------------------------------------------------------------- - template<class T, class KeyType> - void SplayTree<T, KeyType>::PostOrder( void(*Visit)(BTreeNode<T, KeyType> *u), BTreeNode<T, KeyType> *t) - { - if(t!=nullptr) - { - PostOrder(Visit,t->m_left); - PostOrder(Visit,t->m_right); - Visit(t); - } - } - - //----------------------------------------------------------------------- - //return the height of subtree - //----------------------------------------------------------------------- - template<class T, class KeyType> - int SplayTree<T, KeyType>::Height(BTreeNode<T, KeyType> *subtree) const - { - if(subtree==nullptr) return 0; - int lh=Height(subtree->m_left); - int rh=Height(subtree->m_right); - - return (lh>rh)?(++lh):(++rh); - } - - - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////// geometry.h ////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - - //-------------------------------------------------------------------------/ - //Copyright (C) 2003, 2004, 2005, ALL RIGHTS RESERVED. - //Centre for Sys. Eng. & App. Mech. FEMAGSoft S.A. - //Universite Cathalique de Louvain 4, Avenue Albert Einstein - //Batiment Euler, Avenue Georges Lemaitre, 4 B-1348 Louvain-la-Neuve - //B-1348, Louvain-la-Neuve Belgium - //Belgium - //-------------------------------------------------------------------------/ - // - //Name: geometry.h (all geometry primitives related polygon triang- - // ulation by sweep line algorithm) - //Author: Liang, Wu (wu@mema.ucl.ac.be, wuliang@femagsoft.com) - //Created: 03/2001 - //Modified: 10/2005. Modified and simplified only for polygon triangul- - // ation purpose. - //-------------------------------------------------------------------------/ - - - //base class for points; - class Pointbase - { - public: - //constructors and destructor - Pointbase(): id(0), x(0.), y(0.), type(UNKNOWN), left(false){} - Pointbase(const Pointbase& pb); - - Pointbase(const double& xx, const double& yy) - :id(0), x(xx), y(yy), type(UNKNOWN), left(false) { } - - Pointbase(const int& idd, const double& xx, const double& yy) - :id(idd), x(xx), y(yy), type(UNKNOWN), left(false) { } - - Pointbase(const double& xx, const double& yy, const Type& ttype) - :id(0), x(xx), y(yy), type(ttype), left(false) { } - - Pointbase(const int& idd, const double& xx, const double& yy, const Type& ttype) - :id(idd),x(xx), y(yy), type(ttype), left(false) { } - - //operator overloading - friend bool operator==(const Pointbase&, const Pointbase&); - friend bool operator>(const Pointbase&, const Pointbase&); - friend bool operator<(const Pointbase&, const Pointbase&); - friend bool operator!=(const Pointbase&, const Pointbase&); - - //public data - unsigned int id; //id of point; - double x, y; //coordinates; - Type type; //type of points; - bool left; //left chain or not; - - Pointbase & operator= ( const Pointbase & pb ) - { - if (this != &pb) { - this->id=pb.id; - this->x=pb.x; - this->y=pb.y; - this->type=pb.type; - this->left=pb.left; - } - return *this; - } - }; - - //base class for polygon boundary - //Linebase class is a directed line segment with start/end point - class Linebase - { - public: - //constructors and destructor - Linebase(); - Linebase(Pointbase* ep1, Pointbase* ep2, const Type& type,long int & l_id); - Linebase(const Linebase& line); - ~Linebase() {}; - - unsigned int id() const { return m_id; } - - //two end points - Pointbase* endPoint(const int& i) const { return m_endp[i]; } - Type type() const { return m_type; } - double keyValue() const { return m_key; } - void setKeyValue(const double& y); - //slightly increased the key to avoid duplicated key for searching tree. - void increaseKeyValue(const double& diff) { m_key+=diff; } - //reverse a directed line segment; reversable only for inserted diagonals - void reverse(); - - //set and return helper of a directed line segment; - void setHelper(const unsigned int& i) { m_helper=i; } - unsigned int helper() { return m_helper; } - - protected: - unsigned int m_id; //id of a line segment; - Pointbase* m_endp[2]; //two end points; - - Type m_type; //type of a line segement, input/insert - double m_key; //key of a line segment for splay tree searching - unsigned int m_helper; //helper of a line segemnt - public: - Linebase & operator= ( const Linebase & line ) - { - if (this != &line) { - this->m_id=line.m_id; - this->m_endp[0]=line.m_endp[0]; - this->m_endp[1]=line.m_endp[1]; - this->m_type=line.m_type; - this->m_key=line.m_key; - this->m_helper=line.m_helper; - } - return *this; - } - }; - - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////// geometry.cc ////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////// - - //-------------------------------------------------------------------------/ - //Copyright (C) 2003, 2004, 2005, ALL RIGHTS RESERVED. - //Centre for Sys. Eng. & App. Mech. FEMAGSoft S.A. - //Universite Cathalique de Louvain 4, Avenue Albert Einstein - //Batiment Euler, Avenue Georges Lemaitre, 4 B-1348 Louvain-la-Neuve - //B-1348, Louvain-la-Neuve Belgium - //Belgium - //-------------------------------------------------------------------------/ - // - //Name: geometry.cc (all geometry primitive implementations related - // to polygon triangulation by sweep line algorithm) - //Author: Liang, Wu (wu@mema.ucl.ac.be, wuliang@femagsoft.com) - //Created: 03/2001 - //Modified: 10/2005. Modified and simplified only for polygon triangul- - // ation purpose. - //-------------------------------------------------------------------------/ - - - //Jonathan schewchuk's exact arithmetic code, see predicates.cc for detais; - extern double orient2d(double* pa, double* pb, double* pc); - - //---------------------------------------------------------------------------- - //square of the distance of two points; - //---------------------------------------------------------------------------- - double dist_sqr(const Pointbase& sp, const Pointbase& ep) - { - return sqr(sp.x-ep.x)+sqr(sp.y-ep.y); - } - - //---------------------------------------------------------------------------- - //square of the distance of two points; - //---------------------------------------------------------------------------- - double dist_sqr(double *pa, double *pb) - { - return sqr(pa[0]-pb[0])+sqr(pa[1]-pb[1]); - } - - void UpdateKey(BTreeNode<Linebase*,double>* node, double y) - { - node->data()->setKeyValue(y); - } - - //---------------------------------------------------------------------------- - //copy constructor - //---------------------------------------------------------------------------- - Pointbase::Pointbase(const Pointbase& pb) - { - this->id=pb.id; - this->x=pb.x; - this->y=pb.y; - this->type=pb.type; - this->left=pb.left; - } - - //---------------------------------------------------------------------------- - //operator ( ==, >, < and != ) overloading for pointbase class - //---------------------------------------------------------------------------- - bool operator==(const Pointbase& pa, const Pointbase& pb) - { - return (pa.x==pb.x && pa.y==pb.y); - } - - //---------------------------------------------------------------------------- - bool operator>(const Pointbase& pa, const Pointbase& pb) - { - return( (pa.y > pb.y) || ( (pa.y==pb.y) && (pa.x < pb.x)) ); - } - - //---------------------------------------------------------------------------- - bool operator<(const Pointbase& pa, const Pointbase& pb) - { - return( (pa.y < pb.y) || ( (pa.y==pb.y) && (pa.x > pb.x)) ); - } - - //---------------------------------------------------------------------------- - bool operator!=(const Pointbase& pa, const Pointbase& pb) - { - return !(pa.x==pb.x && pa.y==pb.y); - } - - //---------------------------------------------------------------------------- - //Linebase construct - //---------------------------------------------------------------------------- - Linebase::Linebase():m_type(UNKNOWN),m_key(0.),m_helper(0) - { - for(int i=0; i<2; ++i) m_endp[i]=0; - m_id=0; - } - - //----------------------------------------------------------------------------- - //Linebase construct - //----------------------------------------------------------------------------- - Linebase::Linebase(Pointbase* sp, Pointbase* ep, const Type& type, long int & l_id):m_type(type),m_key(0.),m_helper(0) - { - m_endp[0]=sp; - m_endp[1]=ep; - m_id=++l_id; - } - - //---------------------------------------------------------------------------- - //copy constructor - //---------------------------------------------------------------------------- - Linebase::Linebase(const Linebase& line) - { - this->m_id=line.m_id; - this->m_endp[0]=line.m_endp[0]; - this->m_endp[1]=line.m_endp[1]; - this->m_type=line.m_type; - this->m_key=line.m_key; - this->m_helper=line.m_helper; - } - - - //---------------------------------------------------------------------------- - //reverse a directed line segment, reverseable only for insert diagonals - //---------------------------------------------------------------------------- - void Linebase::reverse() - { - assert(m_type==INSERT); - Pointbase* tmp=m_endp[0]; - m_endp[0]=m_endp[1]; - m_endp[1]=tmp; - } - - void Linebase::setKeyValue(const double& y) - { - if( m_endp[1]->y==m_endp[0]->y ) - m_key=m_endp[0]->x < m_endp[1]->x ? m_endp[0]->x:m_endp[1]->x; - else m_key=( y - m_endp[0]->y ) * ( m_endp[1]->x - m_endp[0]->x ) / (m_endp[1]->y - m_endp[0]->y ) + m_endp[0]->x; - } - -}//end namespace internal_poltrig - -class PolygonTriangulator::Polygon -{ -public: - //constructor and destructor - Polygon(const std::vector<double>& x,const std::vector<double>& y); - ~Polygon(); - - // main member function for polygon triangulation; - void partition2Monotone(); - void searchMonotones(); - void triangulation(); - - //return all triangles - const Triangles* triangles() { return &m_triangles; } - - internal_poltrig::PointbaseMap& points() { return m_points; } - internal_poltrig::LineMap& edges() { return m_edges; } - - //private member functions. -private: - long int m_l_id;//previous a global, but that gives mem. crashes. Must be reinitted for every polygon. - - void set_contour (const std::vector<double>& x,const std::vector<double>& y); - void initializate(); - - //prev or next point/edge id for a given ith point/edge; - unsigned int prev(const unsigned int& i); - unsigned int next(const unsigned int& i); - - //handle event vertext according to vertex type; - void handleStartVertex(const unsigned int& ); - void handleEndVertex(const unsigned int& ); - void handleSplitVertex(const unsigned int& ); - void handleMergeVertex(const unsigned int& ); - void handleRegularVertexUp(const unsigned int& ); - void handleRegularVertexDown(const unsigned int& ); - - //add diagonal between two vertices; - void addDiagonal(const unsigned int& i, const unsigned int& j); - - - //angle ABC for three given points, for monotone polygon searching purpose; - double angleCosb(double *A, double *B, double *C); - //find the next edge, for monotone polygon searching purpose; - unsigned int selectNextEdge(internal_poltrig::Linebase* edge); - - //triangulate a monotone polygon piece; - void triangulateMonotone(internal_poltrig::Monopoly& mpoly); - - //private data memebers - internal_poltrig::PQueue m_qpoints; //priority queue for event points - internal_poltrig::EdgeBST m_edgebst; //edge binary searching tree (splaytree) - internal_poltrig::Monopolys m_mpolys; //all monotone polygon piece list; - Triangles m_triangles; //all triangle list; - - //data for monotone piece searching purpose; - internal_poltrig::AdjEdgeMap m_startAdjEdgeMap; //all edges starting from given points (map) - internal_poltrig::LineMap m_diagonals; //added diagonals to partition polygon to - //monotont pieces, not all diagonals of - - void init_vertices_and_lines(); - unsigned int m_ncontours; //number of contours - std::vector<unsigned int> m_nVertices; // - internal_poltrig::PointbaseMap m_points; //all vertices - internal_poltrig::LineMap m_edges; //all edges - double m_xmin,m_xmax, m_ymin,m_ymax; //boundary box for polygon - -}; - - -void PolygonTriangulator::Polygon::init_vertices_and_lines() -{ - int sid,eid; - int num=0; - - internal_poltrig::Type type; - - for(unsigned j=0; j<m_ncontours; ++j) - { - for(unsigned i=1; i<=m_nVertices[j]; ++i)//fixme: 0-based? - { - sid=num+i; - eid=(i==m_nVertices[j])?num+1:num+i+1; - type = internal_poltrig::INPUT; - internal_poltrig::Linebase* line=new internal_poltrig::Linebase(m_points[sid], m_points[eid], type,m_l_id); - m_edges[m_l_id]=line; - } - num+=m_nVertices[j]; - } - - int sum=0; - for(unsigned int i=0; i<m_ncontours; ++i) - { - sum+= m_nVertices[i]; - m_nVertices[i]=sum; - } - -} - - -//---------------------------------------------------------------------------- -//get input -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::set_contour(const std::vector<double>& x,const std::vector<double>& y) -{ - assert(x.size()==y.size()); - - m_nVertices.push_back( x.size() ); - unsigned int i = m_points.size()+1/*1*/;//fixme: get rid of the +1 ? - double xx,yy; - internal_poltrig::Type type; - for (unsigned int j = 0; j < m_nVertices[m_ncontours]; ++j, ++i) - { - xx=x.at(j); - yy=y.at(j); - type=internal_poltrig::INPUT; - internal_poltrig::Pointbase* point=new internal_poltrig::Pointbase(i,xx,yy,type); - if(xx > m_xmax ) m_xmax=xx; - if(xx < m_xmin ) m_xmin=xx; - if(yy > m_ymax ) m_ymax=yy; - if(yy < m_ymin ) m_ymin=yy; - m_points[i]=point; - } - - ++m_ncontours; - -} - - - - -//---------------------------------------------------------------------------- -//polygon class constructor -//---------------------------------------------------------------------------- -PolygonTriangulator::Polygon::Polygon(const std::vector<double>& x,const std::vector<double>& y) -{ - m_l_id = 0; - m_ncontours=0; - - m_xmin = m_ymin = std::numeric_limits<double>::infinity(); - m_xmax = m_ymax = - std::numeric_limits<double>::infinity(); - - - set_contour(x,y); - init_vertices_and_lines(); - initializate(); -} - -//---------------------------------------------------------------------------- -//polygon destructor -//---------------------------------------------------------------------------- -PolygonTriangulator::Polygon::~Polygon() -{ - //clear all dynamic allocated memory - internal_poltrig::PointbaseMap::iterator itp=m_points.begin(); - for(; itp!=m_points.end(); ++itp) - { - delete itp->second; - } - - internal_poltrig::LineMap::iterator itl=m_edges.begin(); - for(; itl!=m_edges.end(); ++itl) - { - delete itl->second; - } - -} - -//---------------------------------------------------------------------------- -//return the previous point (or edge) id for a given ith point (or edge); -//---------------------------------------------------------------------------- -unsigned int PolygonTriangulator::Polygon::prev(const unsigned int& i) -{ - unsigned int j(0),prevLoop(0),currentLoop(0); - - while ( i > m_nVertices[currentLoop] ) - { - prevLoop=currentLoop; - ++currentLoop; - } - - if( i==1 || (i==m_nVertices[prevLoop]+1) ) j=m_nVertices[currentLoop]; - else if( i <= m_nVertices[currentLoop] ) j=i-1; - - return j; -} - -//---------------------------------------------------------------------------- -//return the next point (or edge) id for a given ith point (or edge); -//---------------------------------------------------------------------------- -unsigned int PolygonTriangulator::Polygon::next(const unsigned int& i) -{ - unsigned int j(0),prevLoop(0),currentLoop(0); - - while ( i > m_nVertices[currentLoop] ) - { - prevLoop=currentLoop; - ++currentLoop; - } - - if( i < m_nVertices[currentLoop] ) j=i+1; - else if ( i==m_nVertices[currentLoop] ) - { - if( currentLoop==0) j=1; - else j=m_nVertices[prevLoop]+1; - } - - return j; -} - -//---------------------------------------------------------------------------- -//polygon initialization; -//to find types of all polygon vertices; -//create a priority queue for all vertices; -//construct an edge set for each vertex (the set holds all edges starting from -//the vertex, only for loop searching purpose). -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::initializate() -{ - internal_poltrig::PointbaseMap::iterator it=m_points.begin(); - for(; it!=m_points.end(); ++it) - { - int id=it->first; - int idp=prev(id); - int idn=next(id); - internal_poltrig::Pointbase p=*m_points[id], pnext=*m_points[idn], pprev=*m_points[idp]; - - if( p > pnext && pprev > p ) - m_points[id]->type=internal_poltrig::REGULAR_DOWN; - else if (p > pprev && pnext > p) - m_points[id]->type=internal_poltrig::REGULAR_UP; - else - { - double pa[2], pb[2], pc[2]; - - pa[0]=m_points[idp]->x; - pa[1]=m_points[idp]->y; - - pb[0]=m_points[id]->x; - pb[1]=m_points[id]->y; - - pc[0]=m_points[idn]->x; - pc[1]=m_points[idn]->y; - - double area=internal_poltrig::orient2d(pa,pb,pc); - - if( pprev > p && pnext > p ) m_points[id]->type=(area >0) ? internal_poltrig::END: internal_poltrig::MERGE ; - if( pprev < p && pnext < p ) m_points[id]->type=(area >0) ? internal_poltrig::START : internal_poltrig::SPLIT; - - } - - m_qpoints.push(*(it->second)); - - m_startAdjEdgeMap[id].insert(id); - - } -} - -//---------------------------------------------------------------------------- -//Add a diagonal from point id i to j -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::addDiagonal(const unsigned int& i, const unsigned int& j) -{ - internal_poltrig::Type type=internal_poltrig::INSERT; - internal_poltrig::Linebase* diag=new internal_poltrig::Linebase(m_points[i], m_points[j], type,m_l_id); - m_edges[diag->id()]=diag; - - m_startAdjEdgeMap[i].insert(diag->id()); - m_startAdjEdgeMap[j].insert(diag->id()); - - m_diagonals[diag->id()]=diag; - -} - -//---------------------------------------------------------------------------- -//Handle start vertex -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::handleStartVertex(const unsigned int& i) -{ - double y=m_points[i]->y; - m_edgebst.InOrder(internal_poltrig::UpdateKey, y); - - m_edges[i]->setHelper(i); - m_edges[i]->setKeyValue(y); - m_edgebst.Insert(m_edges[i]); - -} - -//---------------------------------------------------------------------------- -//Handle end vertex -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::handleEndVertex(const unsigned int& i) -{ - double y=m_points[i]->y; - m_edgebst.InOrder(internal_poltrig::UpdateKey, y); - - unsigned int previ=prev(i); - internal_poltrig::Linebase* edge=m_edges[previ]; - unsigned int helper=m_edges[previ]->helper(); - - - if(m_points[helper]->type==internal_poltrig::MERGE) addDiagonal(i, helper); - m_edgebst.Delete(edge->keyValue()); - -} - -//---------------------------------------------------------------------------- -//Handle split vertex -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::handleSplitVertex(const unsigned int& i) -{ - double x=m_points[i]->x, y=m_points[i]->y; - m_edgebst.InOrder(internal_poltrig::UpdateKey, y); - - internal_poltrig::BTreeNode<internal_poltrig::Linebase*, double>* leftnode; - m_edgebst.FindMaxSmallerThan(x, leftnode); - internal_poltrig::Linebase* leftedge=leftnode->data(); - - unsigned int helper=leftedge->helper(); - addDiagonal(i, helper); - - leftedge->setHelper(i); - m_edges[i]->setHelper(i); - m_edges[i]->setKeyValue(y); - m_edgebst.Insert(m_edges[i]); -} - -//---------------------------------------------------------------------------- -//Handle merge vertex -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::handleMergeVertex(const unsigned int& i) -{ - double x=m_points[i]->x, y=m_points[i]->y; - m_edgebst.InOrder(internal_poltrig::UpdateKey, y); - - unsigned int previ=prev(i); - unsigned int helper=m_edges[previ]->helper(); - if (m_points[helper]->type==internal_poltrig::MERGE) addDiagonal(i, helper); - m_edgebst.Delete(m_edges[previ]->keyValue()); - - internal_poltrig::BTreeNode<internal_poltrig::Linebase*, double>* leftnode; - m_edgebst.FindMaxSmallerThan(x, leftnode); - internal_poltrig::Linebase* leftedge=leftnode->data(); - - helper=leftedge->helper(); - if(m_points[helper]->type==internal_poltrig::MERGE) addDiagonal(i, helper); - - leftedge->setHelper(i); -} - -//---------------------------------------------------------------------------- -//Handle regular down vertex -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::handleRegularVertexDown(const unsigned int& i) -{ - double y=m_points[i]->y; - m_edgebst.InOrder(internal_poltrig::UpdateKey, y); - - unsigned int previ=prev(i); - unsigned int helper=m_edges[previ]->helper(); - if(m_points[helper]->type==internal_poltrig::MERGE) addDiagonal(i, helper); - - m_edgebst.Delete(m_edges[previ]->keyValue()); - m_edges[i]->setHelper(i); - m_edges[i]->setKeyValue(y); - m_edgebst.Insert(m_edges[i]); - -} - -//---------------------------------------------------------------------------- -////Handle regular up vertex -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::handleRegularVertexUp(const unsigned int& i) -{ - double x=m_points[i]->x, y=m_points[i]->y; - m_edgebst.InOrder(internal_poltrig::UpdateKey, y); - - internal_poltrig::BTreeNode<internal_poltrig::Linebase*, double>* leftnode; - m_edgebst.FindMaxSmallerThan(x, leftnode); - - internal_poltrig::Linebase* leftedge=leftnode->data(); - - unsigned int helper=leftedge->helper(); - if(m_points[helper]->type==internal_poltrig::MERGE) addDiagonal(i, helper); - leftedge->setHelper(i); - -} - -//---------------------------------------------------------------------------- -//partition polygon to monotone polygon pieces -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::partition2Monotone() -{ - - if(m_qpoints.top().type!=internal_poltrig::START) - { - std::cout<<"Please check your input polygon:\n1)orientations?\n2)duplicated points?\n"; - exit(1); - } - - while(!m_qpoints.empty()) - { - internal_poltrig::Pointbase vertex=m_qpoints.top(); - m_qpoints.pop(); - unsigned int id=vertex.id; - - switch(vertex.type) - { - case internal_poltrig::START: handleStartVertex(id); break; - case internal_poltrig::END: handleEndVertex(id); break; - case internal_poltrig::MERGE: handleMergeVertex(id); break; - case internal_poltrig::SPLIT: handleSplitVertex(id); break; - case internal_poltrig::REGULAR_UP: handleRegularVertexUp(id); break; - case internal_poltrig::REGULAR_DOWN: handleRegularVertexDown(id); break; - default: - std::cout<<"No duplicated points please!\n"; - exit(1); break; - } - } -} - - -//---------------------------------------------------------------------------- -//two Auxiliary functions to find monotone polygon pieces -//---------------------------------------------------------------------------- - -//---------------------------------------------------------------------------- -//calculate angle B for A, B, C three given points -//---------------------------------------------------------------------------- -double PolygonTriangulator::Polygon::angleCosb(double *pa, double *pb, double *pc) -{ - double dxab = pa[0] - pb[0]; - double dyab = pa[1] - pb[1]; - - double dxcb = pc[0] - pb[0]; - double dycb = pc[1] - pb[1]; - - double dxab2 = dxab * dxab; - double dyab2 = dyab * dyab; - double dxcb2 = dxcb * dxcb; - double dycb2 = dycb * dycb; - double ab = dxab2 + dyab2; - double cb = dxcb2 + dycb2; - - double cosb = dxab * dxcb + dyab * dycb; - double denom = sqrt( ab * cb); - - cosb/=denom; - - return cosb; -} - -//---------------------------------------------------------------------------- -//for any given edge, find the next edge we should choose when searching for -//monotone polygon pieces; -//---------------------------------------------------------------------------- -unsigned int PolygonTriangulator::Polygon::selectNextEdge(internal_poltrig::Linebase* edge) -{ - - unsigned int eid= edge->endPoint(1)->id; - std::set<unsigned int> edges=m_startAdjEdgeMap[eid]; - assert(!edges.empty()); - - unsigned int nexte=0; - if( edges.size() == 1 ) nexte=*(edges.begin()); - else if( edges.size() > 1 ) - { - unsigned int nexte_ccw(0), nexte_cw(0); - double max=-2.0,min=2.0; - - - std::set<unsigned int>::iterator it=edges.begin(); - for(; it!=edges.end(); ++it) - { - if(*it==edge->id()) continue; - double A[2], B[2], C[2]; - A[0]=edge->endPoint(0)->x; A[1]=edge->endPoint(0)->y; - B[0]=edge->endPoint(1)->x; B[1]=edge->endPoint(1)->y; - - if(edge->endPoint(1)!=m_edges[*it]->endPoint(0)) m_edges[*it]->reverse(); - C[0]=m_edges[*it]->endPoint(1)->x; C[1]=m_edges[*it]->endPoint(1)->y; - - double area=internal_poltrig::orient2d(A, B, C); - double cosb=angleCosb(A, B, C); - - if( area > 0 && max < cosb ) { nexte_ccw=*it; max=cosb; } - else if( min > cosb ) { nexte_cw=*it; min=cosb; } - } - - nexte = (nexte_ccw!=0) ? nexte_ccw : nexte_cw; - } - - return nexte; -} - -//---------------------------------------------------------------------------- -//searching all monotone pieces; -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::searchMonotones() -{ - int loop=0; - - internal_poltrig::LineMap edges=m_edges; - - while( edges.size() > m_diagonals.size() ) - { - ++loop; - internal_poltrig::Monopoly poly; - internal_poltrig::LineMap::iterator it=edges.begin(); - internal_poltrig::Pointbase* startp=it->second->endPoint(0); - internal_poltrig::Pointbase* endp=0; - internal_poltrig::Linebase* next=it->second; - - poly.push_back(startp->id); - - for(;;) - { - endp=next->endPoint(1); - if(next->type()!=internal_poltrig::INSERT) - { - edges.erase(next->id()); - m_startAdjEdgeMap[next->endPoint(0)->id].erase(next->id()); - } - if(endp==startp) break; - poly.push_back(endp->id); - - unsigned int nexte=selectNextEdge(next); - - if(nexte==0) - { - std::cout<<"Please check your input polygon:\n"; - std::cout<<"1)orientations?\n2)with duplicated points?\n3)is a simple one?\n"; - exit(1); - } - //assert( nexte > 0); - next=edges[nexte]; - if(next->endPoint(0) !=endp ) next->reverse(); - } - - m_mpolys.push_back(poly); - } -} - - -//---------------------------------------------------------------------------- -//triangulate a monotone polygon; -//---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::triangulateMonotone(internal_poltrig::Monopoly& mpoly) -{ - internal_poltrig::PQueue qvertex; - internal_poltrig::Monopoly::iterator it=mpoly.begin(), itnext; - for(; itnext=it, it!=mpoly.end(); ++it) - { - ++itnext; - if(itnext==mpoly.end()) itnext=mpoly.begin(); - internal_poltrig::Pointbase point=*m_points[*it], pointnext=*m_points[*itnext]; - point.left=(point > pointnext)? true:false; - qvertex.push(point); - } - - std::stack<internal_poltrig::Pointbase> spoint; - for(int i=0; i<2; ++i) { spoint.push(qvertex.top()); qvertex.pop(); } - - while ( qvertex.size() > 1 ) - { - internal_poltrig::Pointbase topQueuePoint=qvertex.top(); - internal_poltrig::Pointbase topStackPoint=spoint.top(); - - if(topQueuePoint.left!=topStackPoint.left) - { - while ( spoint.size() > 1 ) - { - internal_poltrig::Pointbase p1=spoint.top(); - spoint.pop(); - internal_poltrig::Pointbase p2=spoint.top(); - Triangle v(3); - v[0]=topQueuePoint.id; - v[1]=p1.id; - v[2]=p2.id; - sort(v.begin(),v.end());//TK - m_triangles.push_back(v); - - } - spoint.pop(); - spoint.push(topStackPoint); - spoint.push(topQueuePoint); - } - else - { - while( spoint.size() > 1 ) - { - internal_poltrig::Pointbase stack1Point=spoint.top(); - spoint.pop(); - internal_poltrig::Pointbase stack2Point=spoint.top(); - spoint.push(stack1Point); - double pa[2], pb[2], pc[2]; - pa[0]=topQueuePoint.x; pa[1]=topQueuePoint.y; - pb[0]=stack2Point.x; pb[1]=stack2Point.y; - pc[0]=stack1Point.x; pc[1]=stack1Point.y; - - double area=internal_poltrig::orient2d(pa,pb,pc); - bool left=stack1Point.left; - if( (area > 0 && left) || (area < 0 && !left ) ) - { - Triangle v(3); - v[0]=topQueuePoint.id; - v[1]=stack2Point.id; - v[2]=stack1Point.id; - sort(v.begin(),v.end());//TK - m_triangles.push_back(v); - spoint.pop(); - } else break; - } - - spoint.push(topQueuePoint); - - } - - qvertex.pop(); - - } - - internal_poltrig::Pointbase lastQueuePoint=qvertex.top(); - while( spoint.size() !=1 ) - { - internal_poltrig::Pointbase topPoint=spoint.top(); - spoint.pop(); - internal_poltrig::Pointbase top2Point=spoint.top(); - - Triangle v(3); - v[0]=lastQueuePoint.id; - v[1]=topPoint.id; - v[2]=top2Point.id; - sort(v.begin(),v.end());//TK - m_triangles.push_back(v); - } -} - -//---------------------------------------------------------------------------- -//main triangulation function; -////---------------------------------------------------------------------------- -void PolygonTriangulator::Polygon::triangulation() -{ - partition2Monotone(); - searchMonotones(); - internal_poltrig::Monopolys::iterator it=m_mpolys.begin(); - for(; it!=m_mpolys.end(); ++it) - triangulateMonotone(*it); -} - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// - -PolygonTriangulator::PolygonTriangulator(const std::vector<double>& polygon_xcoords, - const std::vector<double>& polygon_ycoords) - : m_polygon(new Polygon(polygon_xcoords,polygon_ycoords)) -{ - m_polygon->triangulation(); -} - -PolygonTriangulator::~PolygonTriangulator() { delete m_polygon; } - -const PolygonTriangulator::Triangles* PolygonTriangulator::triangles() const -{ - return m_polygon->triangles(); -} - - diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/PolygonTriangulator.h b/DetectorDescription/GeoModel/GeoModelKernel/src/PolygonTriangulator.h deleted file mode 100644 index 558acef0608..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/PolygonTriangulator.h +++ /dev/null @@ -1,62 +0,0 @@ - -/////////////////////////////////////////////////////////////////////// -// // -// Class: PolygonTriangulator // -// // -// Description: Triangulates any (non-complex) 2D polygon. // -// // -// Author: Thomas Kittelmann (Thomas.Kittelmann@cern.ch), March 2007 // -// // -// Notes: // -// // -// Actual algorithms are adapted from // -// http://www.mema.ucl.ac.be/~wu/Poly2Tri/poly2tri.html // -// (see copyright notice in .src file) // -// // -// Main changes performed for the present incarnation are // -// interface & namespace changes, indentation, small // -// performance tweaks and removal of unused features. // -// Most importantly, got rid of static and globals so the class // -// can be reliably used more than once per process. Also, the // -// output triangles are sorted to preserve "handedness". // -// // -/////////////////////////////////////////////////////////////////////// - - -#ifndef POLYGONTRIANGULATOR_H -#define POLYGONTRIANGULATOR_H - -#include <vector> -#include <list> - -class PolygonTriangulator { -public: - - typedef std::vector<unsigned> Triangle; - typedef std::list<Triangle> Triangles; - - //When constructed it automatically performs the triangulation. - PolygonTriangulator(const std::vector<double>& polygon_xcoords, - const std::vector<double>& polygon_ycoords); - - - // Access the result with this - const Triangles* triangles() const; - - // Output "handedness" (clockwise or anticlockwise order) is the - // same for all of the triangles as it were for the input points. - - //NB: If triangles().size()==0, something went wrong. - - ~PolygonTriangulator(); - -private: - // Copying/assignment not legal: - PolygonTriangulator( const PolygonTriangulator & ); - PolygonTriangulator & operator= ( const PolygonTriangulator & ); - - class Polygon; - Polygon * m_polygon; -}; - -#endif diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/RCBase.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/RCBase.cxx deleted file mode 100755 index 19f1e4c5560..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/RCBase.cxx +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/RCBase.h" -#include <exception> - -RCBase::RCBase() - : m_count(0) -{ -} - -RCBase::~RCBase() -{ -} - -void RCBase::ref () const -{ - m_count++; -} - -void RCBase::unref () const -{ - if (m_count.load()>0) { - m_count--; - if (m_count.load()==0) - delete this; - } -} - -unsigned int RCBase::refCount () const -{ - return m_count.load(); -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/TemplateVolAction.cxx b/DetectorDescription/GeoModel/GeoModelKernel/src/TemplateVolAction.cxx deleted file mode 100755 index e1dccfb1776..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/TemplateVolAction.cxx +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "GeoModelKernel/TemplateVolAction.h" - -TemplateVolAction::TemplateVolAction() - : GeoVolumeAction (GeoVolumeAction::TOP_DOWN) -{ -} - -TemplateVolAction::~TemplateVolAction() -{ -} - -void TemplateVolAction::handleVPhysVol (const GeoVPhysVol *) -{ -} diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/qt.pro b/DetectorDescription/GeoModel/GeoModelKernel/src/qt.pro deleted file mode 100644 index f34caee1ce2..00000000000 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/qt.pro +++ /dev/null @@ -1,34 +0,0 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Thu Sep 18 19:41:36 2008 -###################################################################### - -TEMPLATE = lib dll -TARGET = GeoModelKernel -DEPENDPATH += . -INCLUDEPATH += . .. /usr/local/include - -DESTDIR= . -CONFIG += build_all debug c++11 - -# Input -HEADERS += ../GeoModelKernel/*.h - -SOURCES += *.cxx - -INSTALLS += target -target.path=/usr/local/lib - -headers.path=/usr/local/include/GeoModelKernel -headers.files= ../GeoModelKernel/*.h -INSTALLS += headers - -mac { - INCLUDEPATH += . .. -} - -unix { - QMAKE_CXXFLAGS += -std=c++11 - INCLUDEPATH += . .. -} - - diff --git a/DetectorDescription/GeoModel/GeoModelSvc/CMakeLists.txt b/DetectorDescription/GeoModel/GeoModelSvc/CMakeLists.txt index b79da15a4c5..2ae87919c5d 100644 --- a/DetectorDescription/GeoModel/GeoModelSvc/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoModelSvc/CMakeLists.txt @@ -14,7 +14,6 @@ atlas_depends_on_subdirs( PRIVATE Control/StoreGate Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities Event/EventInfo Event/EventInfoMgt @@ -24,14 +23,17 @@ atlas_depends_on_subdirs( PRIVATE find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) + +find_package( GeoModel ) + # Component(s) in the package: atlas_add_component( GeoModelSvc src/GeoModelSvc.cxx src/GeoDbTagSvc.cxx src/RDBMaterialManager.cxx src/components/GeoModelSvc_entries.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps CxxUtils AthenaKernel SGTools StoreGateLib SGtests GeoModelKernel GeoModelUtilities EventInfo GaudiKernel ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps CxxUtils AthenaKernel SGTools StoreGateLib SGtests GeoModelUtilities EventInfo GaudiKernel ) # Install files from the package: atlas_install_headers( GeoModelSvc ) diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx index 9a2d25af76b..87e010c774e 100755 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx @@ -6,6 +6,8 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" +#include "GeoModelKernel/GeoVolumeCursor.h" +#include "GeoModelKernel/Units.h" #include "GeoModelUtilities/GeoModelExperiment.h" #include "GeoModelSvc.h" #include "RDBMaterialManager.h" @@ -313,7 +315,7 @@ StatusCode GeoModelSvc::geoInit() // Build the world node from which everything else will be suspended const GeoMaterial* air = theMaterialManager->getMaterial("std::Air"); - const GeoBox* worldBox = new GeoBox(1000*CLHEP::cm,1000*CLHEP::cm, 1000*CLHEP::cm); + const GeoBox* worldBox = new GeoBox(1000*GeoModelKernelUnits::cm,1000*GeoModelKernelUnits::cm, 1000*GeoModelKernelUnits::cm); const GeoLogVol* worldLog = new GeoLogVol("WorldLog", worldBox, air); GeoPhysVol *worldPhys=new GeoPhysVol(worldLog); diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h index a54fc8f44ff..027f82af668 100755 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.h @@ -5,7 +5,7 @@ #ifndef GEOMODELSVC_GEOMODELSVC_H #define GEOMODELSVC_GEOMODELSVC_H -#include "GeoModelKernel/Query.h" +#include "GeoModelKernel/GeoPVConstLink.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelInterfaces/IGeoDbTagSvc.h" #include "GeoModelInterfaces/IGeoModelTool.h" @@ -16,6 +16,7 @@ #include "AthenaBaseComps/AthService.h" #include "StoreGate/StoreGateSvc.h" #include "EventInfoMgt/ITagInfoMgr.h" +#include <fstream> class ISvcLocator; diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx index 9082962a454..ba8282f9c87 100755 --- a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx +++ b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx @@ -8,6 +8,7 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoElement.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGate.h" #include "StoreGate/DataHandle.h" @@ -67,7 +68,7 @@ int printElement ( GeoElement* &p_element) std::cout << " ***** CheckElement(): Print the Element: " << name << std::endl; std::cout << " ***** The Element: name, symbol, A, Z " << std::endl; - std::cout << " ***** "<<name <<" "<<symbol <<" "<< a * (CLHEP::mole / CLHEP::gram) <<" "<< z <<" " << std::endl; + std::cout << " ***** "<<name <<" "<<symbol <<" "<< a * (GeoModelKernelUnits::mole / GeoModelKernelUnits::gram) <<" "<< z <<" " << std::endl; return 1; } @@ -81,7 +82,7 @@ int printElement ( const GeoElement* &p_element) std::cout << " ***** PrintElement(): Print the Element: " << name << std::endl; std::cout << " ***** The Element: name, symbol, A, Z " << std::endl; - std::cout << " ***** "<<name <<" "<<symbol <<" "<< a * (CLHEP::mole / CLHEP::gram) <<" "<< z <<" " << std::endl; + std::cout << " ***** "<<name <<" "<<symbol <<" "<< a * (GeoModelKernelUnits::mole / GeoModelKernelUnits::gram) <<" "<< z <<" " << std::endl; return 1; } @@ -89,7 +90,7 @@ int printElement ( const GeoElement* &p_element) int printMaterial ( GeoMaterial* &p_material) { std::string name = p_material->getName(); - double density = p_material->getDensity() * (CLHEP::cm3 / CLHEP::gram); + double density = p_material->getDensity() * (GeoModelKernelUnits::cm3 / GeoModelKernelUnits::gram); std::cout << " ***** PrintMaterial(): Print the Material: " << name << std::endl; std::cout << " ***** The Material: name, density " << std::endl; @@ -101,7 +102,7 @@ int printMaterial ( GeoMaterial* &p_material) int printFullMaterial ( GeoMaterial* &p_material) { std::string name = p_material->getName(); - double density = p_material->getDensity() * (CLHEP::cm3 / CLHEP::gram); + double density = p_material->getDensity() * (GeoModelKernelUnits::cm3 / GeoModelKernelUnits::gram); std::cout << " ***** PrintFullMaterial(): Print the Material: " << name << std::endl; std::cout << " ***** The Material: name, density" << std::endl; @@ -588,7 +589,7 @@ GeoMaterial* RDBMaterialManager::getMaterial(const std::string & name) { if (ind == tmp_materials->size()) return NULL; - pmaterial = new GeoMaterial( material_name,material_density * (CLHEP::gram / CLHEP::cm3)); + pmaterial = new GeoMaterial( material_name,material_density * (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3)); bool firstComponent = true; @@ -802,7 +803,7 @@ const GeoMaterial* RDBMaterialManager:: getMaterial(const std::string &name) co if (ind == tmp_materials->size()) return NULL; - pmaterial = new GeoMaterial( material_name,material_density * (CLHEP::gram / CLHEP::cm3)); + pmaterial = new GeoMaterial( material_name,material_density * (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3)); bool firstComponent = true; bool hasSubMaterial = false; @@ -903,7 +904,7 @@ const GeoElement *RDBMaterialManager::getElement(const std::string & name) const element_a = rec->getDouble("A"); element_z = rec->getDouble("Z"); - pelement = new GeoElement( element_name , element_symbol ,element_z , element_a *(CLHEP::gram/CLHEP::mole)); + pelement = new GeoElement( element_name , element_symbol ,element_z , element_a *(GeoModelKernelUnits::gram/GeoModelKernelUnits::mole)); // a table to keep the memory allocation, and easy for delete pelement->ref(); @@ -946,7 +947,7 @@ const GeoElement *RDBMaterialManager::getElement(unsigned int atomicNumber) cons element_a = rec->getDouble("A"); element_z = rec->getDouble("Z"); - pelement = new GeoElement( element_name , element_symbol ,element_z , element_a *(CLHEP::gram/CLHEP::mole)); + pelement = new GeoElement( element_name , element_symbol ,element_z , element_a *(GeoModelKernelUnits::gram/GeoModelKernelUnits::mole)); // a table to keep the memory allocation, and easy for delete pelement->ref(); @@ -996,7 +997,7 @@ GeoElement *RDBMaterialManager::getElement(const std::string & name) { element_a = rec->getDouble("A"); element_z = rec->getDouble("Z"); - pelement = new GeoElement( element_name , element_symbol ,element_z , element_a *(CLHEP::gram/CLHEP::mole)); + pelement = new GeoElement( element_name , element_symbol ,element_z , element_a *(GeoModelKernelUnits::gram/GeoModelKernelUnits::mole)); // a table to keep the memory allocation, and easy for delete pelement->ref(); @@ -1038,7 +1039,7 @@ GeoElement *RDBMaterialManager::getElement(unsigned int atomicNumber) { element_a = rec->getDouble("A"); element_z = rec->getDouble("Z"); - pelement = new GeoElement( element_name , element_symbol ,element_z , element_a *(CLHEP::gram/CLHEP::mole)); + pelement = new GeoElement( element_name , element_symbol ,element_z , element_a *(GeoModelKernelUnits::gram/GeoModelKernelUnits::mole)); // a table to keep the memory allocation, and easy for delete pelement->ref(); @@ -1107,13 +1108,13 @@ std::ostream & RDBMaterialManager::printAll(std::ostream & o) const std::vector<GeoElement *>::const_iterator e; for (e=m_elementVector.begin();e!= m_elementVector.end();e++) { - o << (*e)->getSymbol() << '\t' << (*e)->getZ() << '\t' << (*e)->getA() * (CLHEP::mole / CLHEP::gram) << '\t' << (*e)->getName() << std::endl; + o << (*e)->getSymbol() << '\t' << (*e)->getZ() << '\t' << (*e)->getA() * (GeoModelKernelUnits::mole / GeoModelKernelUnits::gram) << '\t' << (*e)->getName() << std::endl; } std::map<std::string, GeoMaterial *>::const_iterator m; for (m=m_materialMap.begin();m!=m_materialMap.end();m++) { - o << "Material: " << (*m).first << " Density " << (*m).second->getDensity() * (CLHEP::cm3 / CLHEP::gram) << std::endl; + o << "Material: " << (*m).first << " Density " << (*m).second->getDensity() * (GeoModelKernelUnits::cm3 / GeoModelKernelUnits::gram) << std::endl; for (size_t i = 0; i< (*m).second->getNumElements();i++) { o <<" ***** ***** "<< int ((*m).second->getFraction(i)*100) << "% \t" << (*m).second->getElement(i)->getName() << std::endl; diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/CMakeLists.txt b/DetectorDescription/GeoModel/GeoModelUtilities/CMakeLists.txt index af571f9f714..e0d3a273ec4 100644 --- a/DetectorDescription/GeoModel/GeoModelUtilities/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoModelUtilities/CMakeLists.txt @@ -11,21 +11,20 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel PRIVATE GaudiKernel ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) +find_package( Eigen ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( GeoModelUtilities src/*.cxx PUBLIC_HEADERS GeoModelUtilities - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps GeoModelKernel + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps SGTools PRIVATE_LINK_LIBRARIES GaudiKernel ) diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoAlignmentStore.h b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoAlignmentStore.h index 57ea209176f..2c5b88144cd 100755 --- a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoAlignmentStore.h +++ b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoAlignmentStore.h @@ -6,10 +6,10 @@ #define GEOMODELUTILITIES_GEOALIGNMENTSTORE_H #include "GeoModelKernel/GeoVAlignmentStore.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelUtilities/TransformMap.h" #include "AthenaKernel/CLASS_DEF.h" #include "AthenaKernel/CondCont.h" -#include "CLHEP/Geometry/Transform3D.h" #include <stdexcept> class GeoAlignmentStore : public GeoVAlignmentStore @@ -18,20 +18,20 @@ class GeoAlignmentStore : public GeoVAlignmentStore GeoAlignmentStore() {} virtual ~GeoAlignmentStore() override {} - virtual void setDelta(const GeoAlignableTransform*, const HepGeom::Transform3D&) override; - virtual const HepGeom::Transform3D* getDelta(const GeoAlignableTransform*) const override; + virtual void setDelta(const GeoAlignableTransform*, const GeoTrf::Transform3D&) override; + virtual const GeoTrf::Transform3D* getDelta(const GeoAlignableTransform*) const override; - virtual void setAbsPosition(const GeoVFullPhysVol*, const HepGeom::Transform3D&) override; - virtual const HepGeom::Transform3D* getAbsPosition(const GeoVFullPhysVol*) const override; + virtual void setAbsPosition(const GeoVFullPhysVol*, const GeoTrf::Transform3D&) override; + virtual const GeoTrf::Transform3D* getAbsPosition(const GeoVFullPhysVol*) const override; - virtual void setDefAbsPosition(const GeoVFullPhysVol*, const HepGeom::Transform3D&) override; - virtual const HepGeom::Transform3D* getDefAbsPosition(const GeoVFullPhysVol*) const override; + virtual void setDefAbsPosition(const GeoVFullPhysVol*, const GeoTrf::Transform3D&) override; + virtual const GeoTrf::Transform3D* getDefAbsPosition(const GeoVFullPhysVol*) const override; private: - TransformMap<GeoAlignableTransform,HepGeom::Transform3D> m_deltas; - TransformMap<GeoVFullPhysVol,HepGeom::Transform3D> m_absPositions; - TransformMap<GeoVFullPhysVol,HepGeom::Transform3D> m_defAbsPositions; + TransformMap<GeoAlignableTransform,GeoTrf::Transform3D> m_deltas; + TransformMap<GeoVFullPhysVol,GeoTrf::Transform3D> m_absPositions; + TransformMap<GeoVFullPhysVol,GeoTrf::Transform3D> m_defAbsPositions; }; CLASS_DEF(GeoAlignmentStore, 135648236, 1) diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoDBUtils.h b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoDBUtils.h index 8420072fe32..ce79227f837 100755 --- a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoDBUtils.h +++ b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoDBUtils.h @@ -8,7 +8,9 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" #include <string> -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" + class GeoDBUtils { @@ -24,16 +26,16 @@ class GeoDBUtils { return NULL; } - inline static HepGeom::Transform3D getTransform (const IRDBRecord *currentRec) { - double x = currentRec->getDouble("TRANSX")*CLHEP::mm; - double y = currentRec->getDouble("TRANSY")*CLHEP::mm; - double z = currentRec->getDouble("TRANSZ")*CLHEP::mm; - double theta = currentRec->getDouble("THETA")*CLHEP::rad; - double phi = currentRec->getDouble("PHI")*CLHEP::rad; - double rotationAngle = currentRec->getDouble("ROTATIONANGLE")*CLHEP::rad; + inline static GeoTrf::Transform3D getTransform (const IRDBRecord *currentRec) { + double x = currentRec->getDouble("TRANSX")*GeoModelKernelUnits::mm; + double y = currentRec->getDouble("TRANSY")*GeoModelKernelUnits::mm; + double z = currentRec->getDouble("TRANSZ")*GeoModelKernelUnits::mm; + double theta = currentRec->getDouble("THETA")*GeoModelKernelUnits::rad; + double phi = currentRec->getDouble("PHI")*GeoModelKernelUnits::rad; + double rotationAngle = currentRec->getDouble("ROTATIONANGLE")*GeoModelKernelUnits::rad; - CLHEP::Hep3Vector axis(sin(theta)*cos(phi), sin(theta)*sin(phi),cos(theta)); - return HepGeom::Translate3D(x,y,z)*HepGeom::Rotate3D(rotationAngle,axis); + GeoTrf::Vector3D axis(sin(theta)*cos(phi), sin(theta)*sin(phi),cos(theta)); + return GeoTrf::Translate3D(x,y,z)*GeoTrf::Rotate3D(rotationAngle,axis); } }; diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoExtendedMaterial.h b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoExtendedMaterial.h index 50754634e7e..1bd84a6a193 100755 --- a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoExtendedMaterial.h +++ b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoExtendedMaterial.h @@ -6,7 +6,7 @@ #define GeoExtendedMaterial_h 1 #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoModelKernel/Units.h" #include "GeoModelUtilities/GeoMaterialPropertiesTable.h" @@ -18,8 +18,8 @@ class GeoExtendedMaterial : public GeoMaterial GeoExtendedMaterial(const std::string &Name, double Density, GeoMaterialState State = stateUndefined, - double Temperature = CLHEP::STP_Temperature, - double Pressure = CLHEP::STP_Pressure); + double Temperature = GeoModelKernelUnits::STP_Temperature, + double Pressure = GeoModelKernelUnits::STP_Pressure); virtual ~GeoExtendedMaterial(); diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/src/GeoAlignmentStore.cxx b/DetectorDescription/GeoModel/GeoModelUtilities/src/GeoAlignmentStore.cxx index adb7ad82586..6e25227815e 100644 --- a/DetectorDescription/GeoModel/GeoModelUtilities/src/GeoAlignmentStore.cxx +++ b/DetectorDescription/GeoModel/GeoModelUtilities/src/GeoAlignmentStore.cxx @@ -4,33 +4,33 @@ #include "GeoModelUtilities/GeoAlignmentStore.h" -void GeoAlignmentStore::setDelta(const GeoAlignableTransform* axf, const HepGeom::Transform3D& xf) +void GeoAlignmentStore::setDelta(const GeoAlignableTransform* axf, const GeoTrf::Transform3D& xf) { if(!m_deltas.setTransform(axf,xf)) throw ExcAlignmentStore("Attempted to overwrite Delta in the Alignment Store"); } -const HepGeom::Transform3D* GeoAlignmentStore::getDelta(const GeoAlignableTransform* axf) const +const GeoTrf::Transform3D* GeoAlignmentStore::getDelta(const GeoAlignableTransform* axf) const { return m_deltas.getTransform(axf); } -void GeoAlignmentStore::setAbsPosition(const GeoVFullPhysVol* fpv, const HepGeom::Transform3D& xf) +void GeoAlignmentStore::setAbsPosition(const GeoVFullPhysVol* fpv, const GeoTrf::Transform3D& xf) { m_absPositions.setTransform(fpv,xf); } -const HepGeom::Transform3D* GeoAlignmentStore::getAbsPosition(const GeoVFullPhysVol* fpv) const +const GeoTrf::Transform3D* GeoAlignmentStore::getAbsPosition(const GeoVFullPhysVol* fpv) const { return m_absPositions.getTransform(fpv); } -void GeoAlignmentStore::setDefAbsPosition(const GeoVFullPhysVol* fpv, const HepGeom::Transform3D& xf) +void GeoAlignmentStore::setDefAbsPosition(const GeoVFullPhysVol* fpv, const GeoTrf::Transform3D& xf) { m_defAbsPositions.setTransform(fpv,xf); } -const HepGeom::Transform3D* GeoAlignmentStore::getDefAbsPosition(const GeoVFullPhysVol* fpv) const +const GeoTrf::Transform3D* GeoAlignmentStore::getDefAbsPosition(const GeoVFullPhysVol* fpv) const { return m_defAbsPositions.getTransform(fpv); } diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/CMakeLists.txt b/DetectorDescription/GeoModel/GeoSpecialShapes/CMakeLists.txt index c8d260fdff3..8411eee2fe6 100644 --- a/DetectorDescription/GeoModel/GeoSpecialShapes/CMakeLists.txt +++ b/DetectorDescription/GeoModel/GeoSpecialShapes/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( GeoSpecialShapes ) atlas_depends_on_subdirs( PUBLIC Control/SGTools Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel PRIVATE Control/AthenaKernel Control/CxxUtils @@ -24,6 +23,7 @@ find_package( CLHEP ) find_package( GSL ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( ROOT COMPONENTS Matrix Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Physics HistPainter Rint ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( GeoSpecialShapes @@ -33,18 +33,18 @@ atlas_add_library( GeoSpecialShapes INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} SGTools GeoModelKernel StoreGateLib SGtests + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} SGTools StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${GSL_LIBRARIES} AthenaKernel CxxUtils GeoModelUtilities GaudiKernel ) atlas_add_dictionary( LArGeoCheckerDict GeoSpecialShapes/LArGeoCheckerDict.h GeoSpecialShapes/selection.xml INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CLHEP_LIBRARIES} SGTools StoreGateLib SGtests GeoModelKernel AthenaKernel CxxUtils GeoModelUtilities GaudiKernel GeoSpecialShapes ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} SGTools StoreGateLib SGtests AthenaKernel CxxUtils GeoModelUtilities GaudiKernel GeoSpecialShapes ) atlas_add_dictionary( LArWheelEnums GeoSpecialShapes/LArWheelCalculatorEnums.h GeoSpecialShapes/selectionEnums.xml INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CLHEP_LIBRARIES} SGTools StoreGateLib SGtests GeoModelKernel AthenaKernel CxxUtils GeoModelUtilities GaudiKernel GeoSpecialShapes ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} SGTools StoreGateLib SGtests AthenaKernel CxxUtils GeoModelUtilities GaudiKernel GeoSpecialShapes ) diff --git a/ForwardDetectors/AFP/AFP_GeoModel/CMakeLists.txt b/ForwardDetectors/AFP/AFP_GeoModel/CMakeLists.txt index fb580b2f694..cff22ddfd0b 100644 --- a/ForwardDetectors/AFP/AFP_GeoModel/CMakeLists.txt +++ b/ForwardDetectors/AFP/AFP_GeoModel/CMakeLists.txt @@ -8,29 +8,31 @@ atlas_subdir( AFP_GeoModel ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities ForwardDetectors/AFP/AFP_Geometry PRIVATE Control/StoreGate Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/GeoModel/GeoModelInterfaces + DetectorDescription/GeoPrimitives GaudiKernel ) # External dependencies: find_package( CLHEP ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( AFP_GeoModelLib src/*.cxx PUBLIC_HEADERS AFP_GeoModel - PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES AthenaKernel GeoModelKernel GeoModelUtilities AFP_Geometry StoreGateLib SGtests + LINK_LIBRARIES AthenaKernel ${GEOMODEL_LIBRARIES} GeoModelUtilities AFP_Geometry StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaPoolUtilities GaudiKernel ) atlas_add_component( AFP_GeoModel src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities AFP_Geometry StoreGateLib SGtests AthenaPoolUtilities GaudiKernel AFP_GeoModelLib ) + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities AFP_Geometry StoreGateLib SGtests AthenaPoolUtilities GaudiKernel AFP_GeoModelLib ) diff --git a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelFactory.cxx b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelFactory.cxx index fba5b202f2b..682fd351257 100755 --- a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelFactory.cxx +++ b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelFactory.cxx @@ -25,6 +25,8 @@ #include "GeoModelUtilities/GeoBorderSurfaceContainer.h" #include "AFP_Geometry/AFP_Geometry.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + #include <iostream> #include <fstream> @@ -245,7 +247,7 @@ void AFP_GeoModelFactory::create(GeoPhysVol *world) const GeoLogVol* pLogLongEnv = new GeoLogVol("AFP00_LogLongHamburgPipeEnv", pBoxLongEnv, m_MapMaterials[std::string("OpticalVacuum")]); GeoOpticalPhysVol* pPhysLongEnv = new GeoOpticalPhysVol(pLogLongEnv); sprintf(szLabel,"AFP00_LongHamburgPipeEnv"); - world->add(new GeoTransform(TransEnvInWorld)); + world->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransEnvInWorld))); world->add(new GeoNameTag(szLabel)); world->add(pPhysLongEnv); m_detectorManager->addTreeTop(pPhysLongEnv); @@ -270,7 +272,7 @@ void AFP_GeoModelFactory::create(GeoPhysVol *world) const GeoLogVol* pLogShortEnv = new GeoLogVol("AFP01_LogShortHamburgPipeEnv", pBoxShortEnv, m_MapMaterials[std::string("std::Vacuum")]); GeoPhysVol* pPhysShortEnv = new GeoPhysVol(pLogShortEnv); sprintf(szLabel,"AFP01_ShortHamburgPipeEnv"); - world->add(new GeoTransform(TransEnvInWorld)); + world->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransEnvInWorld))); world->add(new GeoNameTag(szLabel)); world->add(pPhysShortEnv); m_detectorManager->addTreeTop(pPhysShortEnv); @@ -290,7 +292,7 @@ void AFP_GeoModelFactory::create(GeoPhysVol *world) const GeoLogVol* pLogShortEnv1 = new GeoLogVol("AFP02_LogShortHamburgPipeEnv", pBoxShortEnv1, m_MapMaterials[std::string("std::Vacuum")]); GeoPhysVol* pPhysShortEnv1 = new GeoPhysVol(pLogShortEnv1); sprintf(szLabel,"AFP02_ShortHamburgPipeEnv"); - world->add(new GeoTransform(TransEnvInWorld)); + world->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransEnvInWorld))); world->add(new GeoNameTag(szLabel)); world->add(pPhysShortEnv1); m_detectorManager->addTreeTop(pPhysShortEnv1); @@ -310,7 +312,7 @@ void AFP_GeoModelFactory::create(GeoPhysVol *world) const GeoLogVol* pLogLongEnv1 = new GeoLogVol("AFP03_LogLongHamburgPipeEnv", pBoxLongEnv1, m_MapMaterials[std::string("OpticalVacuum")]); GeoOpticalPhysVol* pPhysLongEnv1 = new GeoOpticalPhysVol(pLogLongEnv1); sprintf(szLabel,"AFP03_LongHamburgPipeEnv"); - world->add(new GeoTransform(TransEnvInWorld)); + world->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransEnvInWorld))); world->add(new GeoNameTag(szLabel)); world->add(pPhysLongEnv1); m_detectorManager->addTreeTop(pPhysLongEnv1); diff --git a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelHP.cxx b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelHP.cxx index 41b18102168..8ca2d8b4e90 100644 --- a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelHP.cxx +++ b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelHP.cxx @@ -19,6 +19,7 @@ #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "CLHEP/GenericFunctions/AbsFunction.hh" #include "CLHEP/GenericFunctions/Variable.hh" #include "CLHEP/GenericFunctions/Sin.hh" @@ -26,6 +27,8 @@ #include "GeoModelInterfaces/StoredMaterialManager.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + #include <iostream> #include <fstream> #include <string> @@ -51,7 +54,7 @@ void AFP_GeoModelFactory::AddShortHamburgPipe(GeoPhysVol* pPhysMotherVol, const sprintf(szLabel,"%s_ShortHamburgPipe",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransInMotherVolume*HepGeom::RotateZ3D((DETXSIDE==+1)? -180*CLHEP::deg:0.0*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransInMotherVolume*HepGeom::RotateZ3D((DETXSIDE==+1)? -180*CLHEP::deg:0.0*CLHEP::deg)))); pPhysMotherVol->add(hamburgPipeSPhys); } @@ -66,7 +69,7 @@ void AFP_GeoModelFactory::AddLongHamburgPipe(GeoPhysVol* pPhysMotherVol, const c sprintf(szLabel,"%s_LongHamburgPipe",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransInMotherVolume*HepGeom::RotateZ3D((DETXSIDE==+1)? -180*CLHEP::deg:0.0*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransInMotherVolume*HepGeom::RotateZ3D((DETXSIDE==+1)? -180*CLHEP::deg:0.0*CLHEP::deg)))); pPhysMotherVol->add(hamburgPipeSPhys); } @@ -79,13 +82,13 @@ GeoShape* AFP_GeoModelFactory::GetSolidLongHamburgPipe() // Common box with round corners const GeoBox* halftubeFull = new GeoBox(35*CLHEP::mm+0.5*thickness,50*CLHEP::mm+thickness,420*CLHEP::mm); const GeoBox* halftubeIn0 = new GeoBox(35*CLHEP::mm,50*CLHEP::mm,420*CLHEP::mm-thickness); - HepGeom::Transform3D moveHTubeIn = HepGeom::Translate3D(-thickness,0,0); + GeoTrf::Transform3D moveHTubeIn = GeoTrf::Translate3D(-thickness,0,0); const GeoShapeShift& halftubeIn = (*halftubeIn0)<<moveHTubeIn; GeoShapeSubtraction* halftube0 = new GeoShapeSubtraction(halftubeFull,&halftubeIn); const GeoTubs* cornerCutterH10 = new GeoTubs(18.05*CLHEP::mm+thickness, 35*CLHEP::mm, 420.1*CLHEP::mm, 0*CLHEP::deg, 90*CLHEP::deg); const GeoTubs* cornerCutterH20 = new GeoTubs(18.05*CLHEP::mm+thickness, 35*CLHEP::mm, 420.1*CLHEP::mm, 270*CLHEP::deg, 90*CLHEP::deg); - HepGeom::Transform3D moveCutterH1 = HepGeom::Translate3D(17*CLHEP::mm, 32*CLHEP::mm, 0); - HepGeom::Transform3D moveCutterH2 = HepGeom::Translate3D(17*CLHEP::mm, -32*CLHEP::mm, 0); + GeoTrf::Transform3D moveCutterH1 = GeoTrf::Translate3D(17*CLHEP::mm, 32*CLHEP::mm, 0); + GeoTrf::Transform3D moveCutterH2 = GeoTrf::Translate3D(17*CLHEP::mm, -32*CLHEP::mm, 0); const GeoShapeShift& cornerCutterH1 = (*cornerCutterH10)<<moveCutterH1; const GeoShapeShift& cornerCutterH2 = (*cornerCutterH20)<<moveCutterH2; GeoShapeSubtraction* halftube01 = new GeoShapeSubtraction(new GeoShapeSubtraction(halftube0, &cornerCutterH2), &cornerCutterH1); @@ -94,18 +97,18 @@ GeoShape* AFP_GeoModelFactory::GetSolidLongHamburgPipe() const GeoShapeShift& cornerAddH1 = (*cornerAddH10)<<moveCutterH1; const GeoShapeShift& cornerAddH2 = (*cornerAddH20)<<moveCutterH2; GeoShapeSubtraction* halftube02 = new GeoShapeSubtraction(new GeoShapeSubtraction(halftube01, &cornerAddH2), &cornerAddH1); - HepGeom::Transform3D moveHTube = HepGeom::Translate3D(35*CLHEP::mm+2*thickness2,0,0); + GeoTrf::Transform3D moveHTube = GeoTrf::Translate3D(35*CLHEP::mm+2*thickness2,0,0); const GeoShapeShift& halftube = (*halftube02)<<moveHTube; // Plane covering the middle part (detector housing) const GeoBox* plane0 = new GeoBox(0.5*thickness2, 50*CLHEP::mm+thickness, 350*CLHEP::mm); - HepGeom::Transform3D movePlane = HepGeom::Translate3D(0.5*thickness2,0,0); + GeoTrf::Transform3D movePlane = GeoTrf::Translate3D(0.5*thickness2,0,0); const GeoShapeShift& plane = (*plane0)<<movePlane; // Floor thinning const GeoTrd* floor0 = new GeoTrd(360*CLHEP::mm, 360*CLHEP::mm, 8*CLHEP::mm, 20*CLHEP::mm, 0.5*(thickness2-0.3*CLHEP::mm)); - HepGeom::Transform3D rotateFloor = HepGeom::RotateY3D(90*CLHEP::deg); - HepGeom::Transform3D moveFloor = HepGeom::Translate3D(0.5*thickness2+0.3*CLHEP::mm,0,0); + GeoTrf::Transform3D rotateFloor = GeoTrf::RotateY3D(90*CLHEP::deg); + GeoTrf::Transform3D moveFloor = GeoTrf::Translate3D(0.5*thickness2+0.3*CLHEP::mm,0,0); const GeoShapeShift& floor = (*floor0)<<rotateFloor<<moveFloor; // Thin window @@ -113,32 +116,32 @@ GeoShape* AFP_GeoModelFactory::GetSolidLongHamburgPipe() const GeoTrd* window20 = new GeoTrd(11*CLHEP::mm+0.5*(thickness2-0.3*CLHEP::mm), 11*CLHEP::mm+0.5*(thickness2-0.3*CLHEP::mm), 26*CLHEP::mm, 14*CLHEP::mm, 0.5*(thickness-HBPTHINWINDOWTHICKNESS)); const GeoBox* windowCutSide0 = new GeoBox(11.1*CLHEP::mm+0.5*(thickness2-0.3*CLHEP::mm), 6*CLHEP::mm, 0.5*(thickness-0.25*CLHEP::mm)+0.1*CLHEP::mm); const GeoBox* windowCutCorner0 = new GeoBox(35*CLHEP::mm, 20*CLHEP::mm, 0.5*(thickness-0.25*CLHEP::mm)+0.1*CLHEP::mm); - HepGeom::Transform3D moveCutSide = HepGeom::Translate3D(0,HBPWINDOWCUTYSIGN*20*CLHEP::mm,0); + GeoTrf::Transform3D moveCutSide = GeoTrf::Translate3D(0,HBPWINDOWCUTYSIGN*20*CLHEP::mm,0); const GeoShapeShift& windowCutSide = (*windowCutSide0)<<moveCutSide; - HepGeom::Transform3D moveCutCorner = HepGeom::Translate3D(11*CLHEP::mm-0.5*(thickness2-0.3*CLHEP::mm)+0.5*sqrt(2)*20*CLHEP::mm,HBPWINDOWCUTYSIGN*(2*CLHEP::mm+0.5*sqrt(2)*20*CLHEP::mm),0); - HepGeom::Transform3D rotateCutCorner = HepGeom::RotateZ3D(HBPWINDOWCUTYSIGN*-45*CLHEP::deg); + GeoTrf::Transform3D moveCutCorner = GeoTrf::Translate3D(11*CLHEP::mm-0.5*(thickness2-0.3*CLHEP::mm)+0.5*sqrt(2)*20*CLHEP::mm,HBPWINDOWCUTYSIGN*(2*CLHEP::mm+0.5*sqrt(2)*20*CLHEP::mm),0); + GeoTrf::Transform3D rotateCutCorner = GeoTrf::RotateZ3D(HBPWINDOWCUTYSIGN*-45*CLHEP::deg); const GeoShapeShift& windowCutCorner = (*windowCutCorner0)<<rotateCutCorner<<moveCutCorner; const GeoShapeSubtraction& window11 = window10->subtract(windowCutCorner); const GeoShapeSubtraction* window12 = new GeoShapeSubtraction(&window11, &windowCutSide); const GeoShapeSubtraction& window21 = window20->subtract(windowCutCorner); const GeoShapeSubtraction* window22 = new GeoShapeSubtraction(&window21, &windowCutSide); - HepGeom::Transform3D moveWindow1 = HepGeom::Translate3D(-11*CLHEP::mm+0.5*(thickness2+0.3*CLHEP::mm), HBPWINDOWCUTYSIGN*6*CLHEP::mm, 350*CLHEP::mm+0.5*thickness+HBPTHINWINDOWTHICKNESS); - HepGeom::Transform3D moveWindow2 = HepGeom::Translate3D(-11*CLHEP::mm+0.5*(thickness2+0.3*CLHEP::mm), HBPWINDOWCUTYSIGN*6*CLHEP::mm, -350*CLHEP::mm-0.5*thickness-HBPTHINWINDOWTHICKNESS); + GeoTrf::Transform3D moveWindow1 = GeoTrf::Translate3D(-11*CLHEP::mm+0.5*(thickness2+0.3*CLHEP::mm), HBPWINDOWCUTYSIGN*6*CLHEP::mm, 350*CLHEP::mm+0.5*thickness+HBPTHINWINDOWTHICKNESS); + GeoTrf::Transform3D moveWindow2 = GeoTrf::Translate3D(-11*CLHEP::mm+0.5*(thickness2+0.3*CLHEP::mm), HBPWINDOWCUTYSIGN*6*CLHEP::mm, -350*CLHEP::mm-0.5*thickness-HBPTHINWINDOWTHICKNESS); const GeoShapeShift& window1 = (*window12)<<moveWindow1; const GeoShapeShift& window2 = (*window22)<<moveWindow2; // Boxes with round corners on ends const GeoBox* endsFull0 = new GeoBox(25.85*CLHEP::mm, 50*CLHEP::mm+thickness, 35*CLHEP::mm); const GeoBox* endsIn0 = new GeoBox(25.85*CLHEP::mm-0.5*thickness, 50*CLHEP::mm, 35*CLHEP::mm-thickness); - HepGeom::Transform3D moveEndIn = HepGeom::Translate3D(thickness,0,0); + GeoTrf::Transform3D moveEndIn = GeoTrf::Translate3D(thickness,0,0); const GeoShapeShift& endsIn = (*endsIn0)<<moveEndIn; GeoShapeSubtraction* ends0 = new GeoShapeSubtraction(endsFull0,&endsIn); const GeoTubs* cornerCutter10 = new GeoTubs(9*CLHEP::mm+thickness, 20*CLHEP::mm, 35.1*CLHEP::mm, 90*CLHEP::deg, 90*CLHEP::deg); const GeoTubs* cornerCutter20 = new GeoTubs(9*CLHEP::mm+thickness, 20*CLHEP::mm, 35.1*CLHEP::mm, 180*CLHEP::deg, 90*CLHEP::deg); - HepGeom::Transform3D moveCutter1 = HepGeom::Translate3D(-(16.85*CLHEP::mm-thickness)*CLHEP::mm, 41*CLHEP::mm, 0); - HepGeom::Transform3D moveCutter2 = HepGeom::Translate3D(-(16.85*CLHEP::mm-thickness)*CLHEP::mm, -(41*CLHEP::mm), 0); - HepGeom::Transform3D moveAdd1 = HepGeom::Translate3D(-(16.85*CLHEP::mm-thickness), 41*CLHEP::mm, 0); - HepGeom::Transform3D moveAdd2 = HepGeom::Translate3D(-(16.85*CLHEP::mm-thickness), -(41*CLHEP::mm), 0); + GeoTrf::Transform3D moveCutter1 = GeoTrf::Translate3D(-(16.85*CLHEP::mm-thickness)*CLHEP::mm, 41*CLHEP::mm, 0); + GeoTrf::Transform3D moveCutter2 = GeoTrf::Translate3D(-(16.85*CLHEP::mm-thickness)*CLHEP::mm, -(41*CLHEP::mm), 0); + GeoTrf::Transform3D moveAdd1 = GeoTrf::Translate3D(-(16.85*CLHEP::mm-thickness), 41*CLHEP::mm, 0); + GeoTrf::Transform3D moveAdd2 = GeoTrf::Translate3D(-(16.85*CLHEP::mm-thickness), -(41*CLHEP::mm), 0); const GeoShapeShift& cornerCutter1 = (*cornerCutter10)<<moveCutter1; const GeoShapeShift& cornerCutter2 = (*cornerCutter20)<<moveCutter2; GeoShapeSubtraction* ends01 = new GeoShapeSubtraction(new GeoShapeSubtraction(ends0, &cornerCutter2), &cornerCutter1); @@ -147,16 +150,16 @@ GeoShape* AFP_GeoModelFactory::GetSolidLongHamburgPipe() const GeoShapeShift& cornerAdd1 = (*cornerAdd10)<<moveAdd1; const GeoShapeShift& cornerAdd2 = (*cornerAdd20)<<moveAdd2; GeoShapeSubtraction* ends = new GeoShapeSubtraction(new GeoShapeSubtraction(ends01, &cornerAdd2), &cornerAdd1); - HepGeom::Transform3D moveEnd1 = HepGeom::Translate3D(-25.9*CLHEP::mm+thickness2, 0, 385.1*CLHEP::mm); - HepGeom::Transform3D rotateEnd2 = HepGeom::RotateX3D(180*CLHEP::deg); + GeoTrf::Transform3D moveEnd1 = GeoTrf::Translate3D(-25.9*CLHEP::mm+thickness2, 0, 385.1*CLHEP::mm); + GeoTrf::Transform3D rotateEnd2 = GeoTrf::RotateX3D(180*CLHEP::deg); const GeoShapeShift& end1 = (*ends)<<moveEnd1; const GeoShapeShift& end2 = (*ends)<<moveEnd1<<rotateEnd2; // Holes for the beam pipe const GeoTube* hole10 = new GeoTube(0, 40*CLHEP::mm-0.1*CLHEP::mm, 0.55*thickness); const GeoTube* hole20 = new GeoTube(0, 40*CLHEP::mm-0.1*CLHEP::mm, 0.55*thickness); - HepGeom::Transform3D moveHole1 = HepGeom::Translate3D(15*CLHEP::mm+2*thickness2, 0, 420*CLHEP::mm-0.5*thickness); - HepGeom::Transform3D moveHole2 = HepGeom::Translate3D(15*CLHEP::mm+2*thickness2, 0, -(420*CLHEP::mm-0.5*thickness)); + GeoTrf::Transform3D moveHole1 = GeoTrf::Translate3D(15*CLHEP::mm+2*thickness2, 0, 420*CLHEP::mm-0.5*thickness); + GeoTrf::Transform3D moveHole2 = GeoTrf::Translate3D(15*CLHEP::mm+2*thickness2, 0, -(420*CLHEP::mm-0.5*thickness)); const GeoShapeShift& hole1 = (*hole10)<<moveHole1; const GeoShapeShift& hole2 = (*hole20)<<moveHole2; @@ -164,8 +167,8 @@ GeoShape* AFP_GeoModelFactory::GetSolidLongHamburgPipe() // Beam pipe in and out const GeoTube* tube10 = new GeoTube(40*CLHEP::mm, 40*CLHEP::mm+thickness, 75*CLHEP::mm); const GeoTube* tube20 = new GeoTube(40*CLHEP::mm, 40*CLHEP::mm+thickness, 75*CLHEP::mm); - HepGeom::Transform3D moveTube1 = HepGeom::Translate3D(15*CLHEP::mm+2*thickness2, 0, 495.05*CLHEP::mm); - HepGeom::Transform3D moveTube2 = HepGeom::Translate3D(15*CLHEP::mm+2*thickness2, 0, -495.05*CLHEP::mm); + GeoTrf::Transform3D moveTube1 = GeoTrf::Translate3D(15*CLHEP::mm+2*thickness2, 0, 495.05*CLHEP::mm); + GeoTrf::Transform3D moveTube2 = GeoTrf::Translate3D(15*CLHEP::mm+2*thickness2, 0, -495.05*CLHEP::mm); const GeoShapeShift& tube1 = (*tube10)<<moveTube1; const GeoShapeShift& tube2 = (*tube20)<<moveTube2; @@ -193,13 +196,13 @@ GeoShape* AFP_GeoModelFactory::GetSolidShortHamburgPipe() // Common box with round corners const GeoBox* halftubeSFull = new GeoBox(35*CLHEP::mm+0.5*thickness,50*CLHEP::mm+thickness,120*CLHEP::mm); const GeoBox* halftubeSIn0 = new GeoBox(35*CLHEP::mm,50*CLHEP::mm,120*CLHEP::mm-thickness); - HepGeom::Transform3D moveHSTubeIn = HepGeom::Translate3D(-thickness,0,0); + GeoTrf::Transform3D moveHSTubeIn = GeoTrf::Translate3D(-thickness,0,0); const GeoShapeShift& halftubeSIn = (*halftubeSIn0)<<moveHSTubeIn; GeoShapeSubtraction* halftubeS0 = new GeoShapeSubtraction(halftubeSFull,&halftubeSIn); const GeoTubs* cornerCutterHS10 = new GeoTubs(18.05*CLHEP::mm+thickness, 35*CLHEP::mm, 120.1*CLHEP::mm, 0*CLHEP::deg, 90*CLHEP::deg); const GeoTubs* cornerCutterHS20 = new GeoTubs(18.05*CLHEP::mm+thickness, 35*CLHEP::mm, 120.1*CLHEP::mm, 270*CLHEP::deg, 90*CLHEP::deg); - HepGeom::Transform3D moveCutterHS1 = HepGeom::Translate3D(17*CLHEP::mm, 32*CLHEP::mm, 0); - HepGeom::Transform3D moveCutterHS2 = HepGeom::Translate3D(17*CLHEP::mm, -32*CLHEP::mm, 0); + GeoTrf::Transform3D moveCutterHS1 = GeoTrf::Translate3D(17*CLHEP::mm, 32*CLHEP::mm, 0); + GeoTrf::Transform3D moveCutterHS2 = GeoTrf::Translate3D(17*CLHEP::mm, -32*CLHEP::mm, 0); const GeoShapeShift& cornerCutterHS1 = (*cornerCutterHS10)<<moveCutterHS1; const GeoShapeShift& cornerCutterHS2 = (*cornerCutterHS20)<<moveCutterHS2; GeoShapeSubtraction* halftubeS01 = new GeoShapeSubtraction(new GeoShapeSubtraction(halftubeS0, &cornerCutterHS2), &cornerCutterHS1); @@ -208,18 +211,18 @@ GeoShape* AFP_GeoModelFactory::GetSolidShortHamburgPipe() const GeoShapeShift& cornerAddHS1 = (*cornerAddHS10)<<moveCutterHS1; const GeoShapeShift& cornerAddHS2 = (*cornerAddHS20)<<moveCutterHS2; GeoShapeSubtraction* halftubeS02 = new GeoShapeSubtraction(new GeoShapeSubtraction(halftubeS01, &cornerAddHS2), &cornerAddHS1); - HepGeom::Transform3D moveHSTube = HepGeom::Translate3D(35*CLHEP::mm+2*thickness2,0,0); + GeoTrf::Transform3D moveHSTube = GeoTrf::Translate3D(35*CLHEP::mm+2*thickness2,0,0); const GeoShapeShift& halftubeS = (*halftubeS02)<<moveHSTube; // Plane covering the middle part (detector housing) const GeoBox* planeS0 = new GeoBox(0.5*thickness2, 50*CLHEP::mm+thickness, 50*CLHEP::mm); - HepGeom::Transform3D movePlaneS = HepGeom::Translate3D(0.5*thickness2,0,0); + GeoTrf::Transform3D movePlaneS = GeoTrf::Translate3D(0.5*thickness2,0,0); const GeoShapeShift& planeS = (*planeS0)<<movePlaneS; // Floor thinning const GeoTrd* floor0 = new GeoTrd(60*CLHEP::mm, 60*CLHEP::mm, 8*CLHEP::mm, 20*CLHEP::mm, 0.5*(thickness2-0.3*CLHEP::mm)); - HepGeom::Transform3D rotateFloor = HepGeom::RotateY3D(90*CLHEP::deg); - HepGeom::Transform3D moveFloor = HepGeom::Translate3D(0.5*thickness2+0.3*CLHEP::mm,0,0); + GeoTrf::Transform3D rotateFloor = GeoTrf::RotateY3D(90*CLHEP::deg); + GeoTrf::Transform3D moveFloor = GeoTrf::Translate3D(0.5*thickness2+0.3*CLHEP::mm,0,0); const GeoShapeShift& floor = (*floor0)<<rotateFloor<<moveFloor; // Thin window @@ -227,17 +230,17 @@ GeoShape* AFP_GeoModelFactory::GetSolidShortHamburgPipe() const GeoTrd* window20 = new GeoTrd(11*CLHEP::mm+0.5*(thickness2-0.3*CLHEP::mm), 11*CLHEP::mm+0.5*(thickness2-0.3*CLHEP::mm), 26*CLHEP::mm, 14*CLHEP::mm, 0.5*(thickness-HBPTHINWINDOWTHICKNESS)); const GeoBox* windowCutSide0 = new GeoBox(11.1*CLHEP::mm+0.5*(thickness2-0.3*CLHEP::mm), 6*CLHEP::mm, 0.5*(thickness-0.25*CLHEP::mm)+0.1*CLHEP::mm); const GeoBox* windowCutCorner0 = new GeoBox(35*CLHEP::mm, 20*CLHEP::mm, 0.5*(thickness-0.25*CLHEP::mm)+0.1*CLHEP::mm); - HepGeom::Transform3D moveCutSide = HepGeom::Translate3D(0,HBPWINDOWCUTYSIGN*20*CLHEP::mm,0); + GeoTrf::Transform3D moveCutSide = GeoTrf::Translate3D(0,HBPWINDOWCUTYSIGN*20*CLHEP::mm,0); const GeoShapeShift& windowCutSide = (*windowCutSide0)<<moveCutSide; - HepGeom::Transform3D moveCutCorner = HepGeom::Translate3D(11*CLHEP::mm-0.5*(thickness2-0.3*CLHEP::mm)+0.5*sqrt(2)*20*CLHEP::mm,HBPWINDOWCUTYSIGN*(2*CLHEP::mm+0.5*sqrt(2)*20*CLHEP::mm),0); - HepGeom::Transform3D rotateCutCorner = HepGeom::RotateZ3D(HBPWINDOWCUTYSIGN*-45*CLHEP::deg); + GeoTrf::Transform3D moveCutCorner = GeoTrf::Translate3D(11*CLHEP::mm-0.5*(thickness2-0.3*CLHEP::mm)+0.5*sqrt(2)*20*CLHEP::mm,HBPWINDOWCUTYSIGN*(2*CLHEP::mm+0.5*sqrt(2)*20*CLHEP::mm),0); + GeoTrf::Transform3D rotateCutCorner = GeoTrf::RotateZ3D(HBPWINDOWCUTYSIGN*-45*CLHEP::deg); const GeoShapeShift& windowCutCorner = (*windowCutCorner0)<<rotateCutCorner<<moveCutCorner; const GeoShapeSubtraction& window11 = window10->subtract(windowCutCorner); const GeoShapeSubtraction* window12 = new GeoShapeSubtraction(&window11, &windowCutSide); const GeoShapeSubtraction& window21 = window20->subtract(windowCutCorner); const GeoShapeSubtraction* window22 = new GeoShapeSubtraction(&window21, &windowCutSide); - HepGeom::Transform3D moveWindow1 = HepGeom::Translate3D(-11*CLHEP::mm+0.5*(thickness2+0.3*CLHEP::mm), HBPWINDOWCUTYSIGN*6*CLHEP::mm, 50*CLHEP::mm+0.5*thickness+HBPTHINWINDOWTHICKNESS); - HepGeom::Transform3D moveWindow2 = HepGeom::Translate3D(-11*CLHEP::mm+0.5*(thickness2+0.3*CLHEP::mm), HBPWINDOWCUTYSIGN*6*CLHEP::mm, -50*CLHEP::mm-0.5*thickness-HBPTHINWINDOWTHICKNESS); + GeoTrf::Transform3D moveWindow1 = GeoTrf::Translate3D(-11*CLHEP::mm+0.5*(thickness2+0.3*CLHEP::mm), HBPWINDOWCUTYSIGN*6*CLHEP::mm, 50*CLHEP::mm+0.5*thickness+HBPTHINWINDOWTHICKNESS); + GeoTrf::Transform3D moveWindow2 = GeoTrf::Translate3D(-11*CLHEP::mm+0.5*(thickness2+0.3*CLHEP::mm), HBPWINDOWCUTYSIGN*6*CLHEP::mm, -50*CLHEP::mm-0.5*thickness-HBPTHINWINDOWTHICKNESS); const GeoShapeShift& window1 = (*window12)<<moveWindow1; const GeoShapeShift& window2 = (*window22)<<moveWindow2; @@ -245,15 +248,15 @@ GeoShape* AFP_GeoModelFactory::GetSolidShortHamburgPipe() // Boxes with round corners on ends const GeoBox* endsSFull0 = new GeoBox(25.85*CLHEP::mm, 50*CLHEP::mm+thickness, 35*CLHEP::mm); const GeoBox* endsSIn0 = new GeoBox(25.85*CLHEP::mm-0.5*thickness, 50*CLHEP::mm, 35*CLHEP::mm-thickness); - HepGeom::Transform3D moveEndSIn = HepGeom::Translate3D(thickness,0,0); + GeoTrf::Transform3D moveEndSIn = GeoTrf::Translate3D(thickness,0,0); const GeoShapeShift& endsSIn = (*endsSIn0)<<moveEndSIn; GeoShapeSubtraction* endsS0 = new GeoShapeSubtraction(endsSFull0,&endsSIn); const GeoTubs* cornerCutterS10 = new GeoTubs(9*CLHEP::mm+thickness, 20*CLHEP::mm, 35.1*CLHEP::mm, 90*CLHEP::deg, 90*CLHEP::deg); const GeoTubs* cornerCutterS20 = new GeoTubs(9*CLHEP::mm+thickness, 20*CLHEP::mm, 35.1*CLHEP::mm, 180*CLHEP::deg, 90*CLHEP::deg); - HepGeom::Transform3D moveCutterS1 = HepGeom::Translate3D(-(16.85*CLHEP::mm-thickness)*CLHEP::mm, 41*CLHEP::mm, 0); - HepGeom::Transform3D moveCutterS2 = HepGeom::Translate3D(-(16.85*CLHEP::mm-thickness)*CLHEP::mm, -(41*CLHEP::mm), 0); - HepGeom::Transform3D moveAddS1 = HepGeom::Translate3D(-(16.85*CLHEP::mm-thickness), 41*CLHEP::mm, 0); - HepGeom::Transform3D moveAddS2 = HepGeom::Translate3D(-(16.85*CLHEP::mm-thickness), -(41*CLHEP::mm), 0); + GeoTrf::Transform3D moveCutterS1 = GeoTrf::Translate3D(-(16.85*CLHEP::mm-thickness)*CLHEP::mm, 41*CLHEP::mm, 0); + GeoTrf::Transform3D moveCutterS2 = GeoTrf::Translate3D(-(16.85*CLHEP::mm-thickness)*CLHEP::mm, -(41*CLHEP::mm), 0); + GeoTrf::Transform3D moveAddS1 = GeoTrf::Translate3D(-(16.85*CLHEP::mm-thickness), 41*CLHEP::mm, 0); + GeoTrf::Transform3D moveAddS2 = GeoTrf::Translate3D(-(16.85*CLHEP::mm-thickness), -(41*CLHEP::mm), 0); const GeoShapeShift& cornerCutterS1 = (*cornerCutterS10)<<moveCutterS1; const GeoShapeShift& cornerCutterS2 = (*cornerCutterS20)<<moveCutterS2; GeoShapeSubtraction* endsS01 = new GeoShapeSubtraction(new GeoShapeSubtraction(endsS0, &cornerCutterS2), &cornerCutterS1); @@ -262,16 +265,16 @@ GeoShape* AFP_GeoModelFactory::GetSolidShortHamburgPipe() const GeoShapeShift& cornerAddS1 = (*cornerAddS10)<<moveAddS1; const GeoShapeShift& cornerAddS2 = (*cornerAddS20)<<moveAddS2; GeoShapeSubtraction* endsS = new GeoShapeSubtraction(new GeoShapeSubtraction(endsS01, &cornerAddS2), &cornerAddS1); - HepGeom::Transform3D moveEndS1 = HepGeom::Translate3D(-25.9*CLHEP::mm+thickness2, 0, 85.1*CLHEP::mm); - HepGeom::Transform3D rotateEndS2 = HepGeom::RotateX3D(180*CLHEP::deg); + GeoTrf::Transform3D moveEndS1 = GeoTrf::Translate3D(-25.9*CLHEP::mm+thickness2, 0, 85.1*CLHEP::mm); + GeoTrf::Transform3D rotateEndS2 = GeoTrf::RotateX3D(180*CLHEP::deg); const GeoShapeShift& endS1 = (*endsS)<<moveEndS1; const GeoShapeShift& endS2 = (*endsS)<<moveEndS1<<rotateEndS2; // Holes for the beam pipe const GeoTube* holeS10 = new GeoTube(0, 40*CLHEP::mm-0.05*CLHEP::mm, 0.55*thickness); const GeoTube* holeS20 = new GeoTube(0, 40*CLHEP::mm-0.05*CLHEP::mm, 0.55*thickness); - HepGeom::Transform3D moveholeS1 = HepGeom::Translate3D(15*CLHEP::mm+2*thickness2, 0, 120*CLHEP::mm-0.5*thickness); - HepGeom::Transform3D moveholeS2 = HepGeom::Translate3D(15*CLHEP::mm+2*thickness2, 0, -(120*CLHEP::mm-0.5*thickness)); + GeoTrf::Transform3D moveholeS1 = GeoTrf::Translate3D(15*CLHEP::mm+2*thickness2, 0, 120*CLHEP::mm-0.5*thickness); + GeoTrf::Transform3D moveholeS2 = GeoTrf::Translate3D(15*CLHEP::mm+2*thickness2, 0, -(120*CLHEP::mm-0.5*thickness)); const GeoShapeShift& holeS1 = (*holeS10)<<moveholeS1; const GeoShapeShift& holeS2 = (*holeS20)<<moveholeS2; @@ -279,8 +282,8 @@ GeoShape* AFP_GeoModelFactory::GetSolidShortHamburgPipe() // Beam pipe in and out const GeoTube* tubeS10 = new GeoTube(40*CLHEP::mm, 40*CLHEP::mm+thickness, 75*CLHEP::mm); const GeoTube* tubeS20 = new GeoTube(40*CLHEP::mm, 40*CLHEP::mm+thickness, 75*CLHEP::mm); - HepGeom::Transform3D movetubeS1 = HepGeom::Translate3D(15*CLHEP::mm+2*thickness2, 0, 195.05*CLHEP::mm); - HepGeom::Transform3D movetubeS2 = HepGeom::Translate3D(15*CLHEP::mm+2*thickness2, 0, -195.05*CLHEP::mm); + GeoTrf::Transform3D movetubeS1 = GeoTrf::Translate3D(15*CLHEP::mm+2*thickness2, 0, 195.05*CLHEP::mm); + GeoTrf::Transform3D movetubeS2 = GeoTrf::Translate3D(15*CLHEP::mm+2*thickness2, 0, -195.05*CLHEP::mm); const GeoShapeShift& tubeS1 = (*tubeS10)<<movetubeS1; const GeoShapeShift& tubeS2 = (*tubeS20)<<movetubeS2; @@ -303,12 +306,12 @@ GeoShape* AFP_GeoModelFactory::GetSolidShortWindowPlates() { double plateXHalfLength = 0.5*52/sin(m_CfgParams.hbpcfg.windowPlateAngle*CLHEP::deg)*CLHEP::mm; const GeoBox* windowPlate = new GeoBox(plateXHalfLength, 53*CLHEP::mm, 0.5*m_CfgParams.hbpcfg.windowPlateThickness*CLHEP::mm); - HepGeom::Transform3D moveXPlate1 = HepGeom::Translate3D(-plateXHalfLength, 0, 0); - HepGeom::Transform3D moveZPlate1 = HepGeom::Translate3D(0, 0, 75*CLHEP::mm); - HepGeom::Transform3D rotatePlate1 = HepGeom::RotateY3D((90-m_CfgParams.hbpcfg.windowPlateAngle)*CLHEP::deg); - HepGeom::Transform3D moveXPlate2 = HepGeom::Translate3D(-plateXHalfLength, 0, 0); - HepGeom::Transform3D moveZPlate2 = HepGeom::Translate3D(0, 0, -75*CLHEP::mm); - HepGeom::Transform3D rotatePlate2 = HepGeom::RotateY3D(-(90-m_CfgParams.hbpcfg.windowPlateAngle)*CLHEP::deg); + GeoTrf::Transform3D moveXPlate1 = GeoTrf::Translate3D(-plateXHalfLength, 0, 0); + GeoTrf::Transform3D moveZPlate1 = GeoTrf::Translate3D(0, 0, 75*CLHEP::mm); + GeoTrf::Transform3D rotatePlate1 = GeoTrf::RotateY3D((90-m_CfgParams.hbpcfg.windowPlateAngle)*CLHEP::deg); + GeoTrf::Transform3D moveXPlate2 = GeoTrf::Translate3D(-plateXHalfLength, 0, 0); + GeoTrf::Transform3D moveZPlate2 = GeoTrf::Translate3D(0, 0, -75*CLHEP::mm); + GeoTrf::Transform3D rotatePlate2 = GeoTrf::RotateY3D(-(90-m_CfgParams.hbpcfg.windowPlateAngle)*CLHEP::deg); const GeoShapeShift& windowPlate1 = (*windowPlate)<<moveXPlate1<<rotatePlate1<<moveZPlate1; const GeoShapeShift& windowPlate2 = (*windowPlate)<<moveXPlate2<<rotatePlate2<<moveZPlate2; @@ -319,12 +322,12 @@ GeoShape* AFP_GeoModelFactory::GetSolidLongWindowPlates() { double plateXHalfLength = 0.5*52/sin(m_CfgParams.hbpcfg.windowPlateAngle*CLHEP::deg)*CLHEP::mm; const GeoBox* windowPlate = new GeoBox(plateXHalfLength, 53*CLHEP::mm, 0.5*m_CfgParams.hbpcfg.windowPlateThickness*CLHEP::mm); - HepGeom::Transform3D moveXPlate1 = HepGeom::Translate3D(-plateXHalfLength, 0, 0); - HepGeom::Transform3D moveZPlate1 = HepGeom::Translate3D(0, 0, 350*CLHEP::mm); - HepGeom::Transform3D rotatePlate1 = HepGeom::RotateY3D((90-m_CfgParams.hbpcfg.windowPlateAngle)*CLHEP::deg); - HepGeom::Transform3D moveXPlate2 = HepGeom::Translate3D(-plateXHalfLength, 0, 0); - HepGeom::Transform3D moveZPlate2 = HepGeom::Translate3D(0, 0, -350*CLHEP::mm); - HepGeom::Transform3D rotatePlate2 = HepGeom::RotateY3D(-(90-m_CfgParams.hbpcfg.windowPlateAngle)*CLHEP::deg); + GeoTrf::Transform3D moveXPlate1 = GeoTrf::Translate3D(-plateXHalfLength, 0, 0); + GeoTrf::Transform3D moveZPlate1 = GeoTrf::Translate3D(0, 0, 350*CLHEP::mm); + GeoTrf::Transform3D rotatePlate1 = GeoTrf::RotateY3D((90-m_CfgParams.hbpcfg.windowPlateAngle)*CLHEP::deg); + GeoTrf::Transform3D moveXPlate2 = GeoTrf::Translate3D(-plateXHalfLength, 0, 0); + GeoTrf::Transform3D moveZPlate2 = GeoTrf::Translate3D(0, 0, -350*CLHEP::mm); + GeoTrf::Transform3D rotatePlate2 = GeoTrf::RotateY3D(-(90-m_CfgParams.hbpcfg.windowPlateAngle)*CLHEP::deg); const GeoShapeShift& windowPlate1 = (*windowPlate)<<moveXPlate1<<rotatePlate1<<moveZPlate1; const GeoShapeShift& windowPlate2 = (*windowPlate)<<moveXPlate2<<rotatePlate2<<moveZPlate2; @@ -342,7 +345,7 @@ void AFP_GeoModelFactory::AddShortWindowPlates(GeoPhysVol* pPhysMotherVol, const sprintf(szLabel,"%s_ShortWindowPlates",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransInMotherVolume*HepGeom::RotateZ3D((DETXSIDE==+1)? -180*CLHEP::deg:0.0*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransInMotherVolume*HepGeom::RotateZ3D((DETXSIDE==+1)? -180*CLHEP::deg:0.0*CLHEP::deg)))); pPhysMotherVol->add(windowPlatesSPhys); } @@ -357,6 +360,6 @@ void AFP_GeoModelFactory::AddLongWindowPlates(GeoPhysVol* pPhysMotherVol, const sprintf(szLabel,"%s_LongWindowPlates",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransInMotherVolume*HepGeom::RotateZ3D((DETXSIDE==+1)? -180*CLHEP::deg:0.0*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransInMotherVolume*HepGeom::RotateZ3D((DETXSIDE==+1)? -180*CLHEP::deg:0.0*CLHEP::deg)))); pPhysMotherVol->add(windowPlatesPhys); } diff --git a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelRP.cxx b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelRP.cxx index 7d57f120c87..eec0dff0d6a 100644 --- a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelRP.cxx +++ b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelRP.cxx @@ -26,6 +26,7 @@ #include "CLHEP/GenericFunctions/Cos.hh" #include "GeoModelInterfaces/StoredMaterialManager.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" #include <iostream> #include <fstream> @@ -65,7 +66,6 @@ void AFP_GeoModelFactory::AddRomanPot(GeoPhysVol* pPhysMotherVol, const char* ps char szLabel[32]; double fLength,fRMin,fRMax; GeoShapeShift* pMoveCut; - HepGeom::Transform3D TransCut; GeoShape* pSolCut; //HepGeom::Transform3D TransRPot=TransInMotherVolume*HepGeom::TranslateX3D(-(0.5*RPOT_MAINTUBUS_LENGTH+RPOT_FLOOR_WNDTHICKNESS)); @@ -82,7 +82,7 @@ void AFP_GeoModelFactory::AddRomanPot(GeoPhysVol* pPhysMotherVol, const char* ps sprintf(szLabel,"%s_RPMainTubus",pszStationName); GeoFullPhysVol* pPhysTubus=new GeoFullPhysVol(pLogTubus); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransRPot*HepGeom::RotateY3D(90*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransRPot*HepGeom::RotateY3D(90*CLHEP::deg)))); pPhysMotherVol->add(pPhysTubus); //Main tubus - floor (bottom) part --------------------------------------------------------------------------- @@ -97,7 +97,7 @@ void AFP_GeoModelFactory::AddRomanPot(GeoPhysVol* pPhysMotherVol, const char* ps pPhysTubus=new GeoFullPhysVol(pLogTubus); sprintf(szLabel,"%s_RPMainTubusFloorPart",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransRPot*HepGeom::TranslateX3D(0.5*fLength+0.5*fMainTubusSteelPartLength)*HepGeom::RotateY3D(90*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransRPot*HepGeom::TranslateX3D(0.5*fLength+0.5*fMainTubusSteelPartLength)*HepGeom::RotateY3D(90*CLHEP::deg)))); pPhysMotherVol->add(pPhysTubus); //--upper mass @@ -113,7 +113,7 @@ void AFP_GeoModelFactory::AddRomanPot(GeoPhysVol* pPhysMotherVol, const char* ps pPhysTubus=new GeoFullPhysVol(pLogTubus); sprintf(szLabel,"%s_LogRPMainTubusUMass",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransRPot*HepGeom::TranslateX3D(0.5*fLength+0.5*fMainTubusSteelPartLength)*HepGeom::RotateY3D(90*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransRPot*HepGeom::TranslateX3D(0.5*fLength+0.5*fMainTubusSteelPartLength)*HepGeom::RotateY3D(90*CLHEP::deg)))); pPhysMotherVol->add(pPhysTubus); //-lower mass @@ -128,7 +128,7 @@ void AFP_GeoModelFactory::AddRomanPot(GeoPhysVol* pPhysMotherVol, const char* ps pPhysTubus=new GeoFullPhysVol(pLogTubus); sprintf(szLabel,"%s_LogRPMainTubusLMass",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransRPot*HepGeom::TranslateX3D(0.5*fLength+0.5*fMainTubusSteelPartLength)*HepGeom::RotateY3D(90*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransRPot*HepGeom::TranslateX3D(0.5*fLength+0.5*fMainTubusSteelPartLength)*HepGeom::RotateY3D(90*CLHEP::deg)))); pPhysMotherVol->add(pPhysTubus); // //cut volume 1 @@ -200,7 +200,7 @@ void AFP_GeoModelFactory::AddRomanPot(GeoPhysVol* pPhysMotherVol, const char* ps double fTrdHYLength1=0.5*RPOT_FLOOR_WNDWIDTH-RPOT_FLOOR_WNDTHICKNESS*tan(RPOT_FLOOR_WNDFACET); double fTrdHZLength=0.5*(RPOT_FLOOR_THICKNESS-RPOT_FLOOR_WNDTHICKNESS); pSolCut=new GeoTrd(fTrdHXLength1,fTrdHXLength2,fTrdHYLength1,fTrdHYLength2,fTrdHZLength); - TransCut=HepGeom::TranslateZ3D(0.5*fLength-fTrdHZLength); + GeoTrf::Transform3D TransCut=GeoTrf::TranslateZ3D(0.5*fLength-fTrdHZLength); pMoveCut=new GeoShapeShift(pSolCut, TransCut); GeoShapeSubtraction* pSolFloor=new GeoShapeSubtraction(pSolTubus, pMoveCut); @@ -209,7 +209,7 @@ void AFP_GeoModelFactory::AddRomanPot(GeoPhysVol* pPhysMotherVol, const char* ps pPhysTubus=new GeoFullPhysVol(pLogTubus); sprintf(szLabel,"%s_RPFloorTubus",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransRPot*HepGeom::TranslateX3D(0.5*fMainTubusSteelPartLength+RPOT_MAINTUBUS_FLOORPARTLENGTH+0.5*RPOT_FLOOR_THICKNESS)*HepGeom::RotateY3D(90*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransRPot*HepGeom::TranslateX3D(0.5*fMainTubusSteelPartLength+RPOT_MAINTUBUS_FLOORPARTLENGTH+0.5*RPOT_FLOOR_THICKNESS)*HepGeom::RotateY3D(90*CLHEP::deg)))); pPhysMotherVol->add(pPhysTubus); //Flange tubus ------------------------------------------------------------------------------------------------- @@ -223,7 +223,7 @@ void AFP_GeoModelFactory::AddRomanPot(GeoPhysVol* pPhysMotherVol, const char* ps pPhysTubus=new GeoFullPhysVol(pLogTubus); sprintf(szLabel,"%s_RPFlangeTubus",pszStationName); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(TransRPot*HepGeom::TranslateX3D(-0.5*fMainTubusSteelPartLength-0.5*RPOT_FLANGE_THICKNESS)*HepGeom::RotateY3D(90*CLHEP::deg))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransRPot*HepGeom::TranslateX3D(-0.5*fMainTubusSteelPartLength-0.5*RPOT_FLANGE_THICKNESS)*HepGeom::RotateY3D(90*CLHEP::deg)))); pPhysMotherVol->add(pPhysTubus); diff --git a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelSID.cxx b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelSID.cxx index af9d123d325..46fd4fbdc5c 100644 --- a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelSID.cxx +++ b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelSID.cxx @@ -18,12 +18,14 @@ #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "CLHEP/GenericFunctions/AbsFunction.hh" #include "CLHEP/GenericFunctions/Variable.hh" #include "CLHEP/GenericFunctions/Sin.hh" #include "CLHEP/GenericFunctions/Cos.hh" #include "GeoModelInterfaces/StoredMaterialManager.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" #include <iostream> #include <fstream> @@ -70,7 +72,7 @@ void AFP_GeoModelFactory::AddSiDetector(GeoPhysVol* pPhysMotherVol, const char* GeoFullPhysVol* pPhysSIDVacuumSensor=new GeoFullPhysVol(pLogSIDVacuumSensor); sprintf(szLabel,"%s_SIDVacuumSensor[%i]",pszStationName,nSpecVacSensorID); pPhysMotherVol->add(new GeoNameTag(szLabel)); - pPhysMotherVol->add(new GeoTransform(m_pGeometry->GetSIDTransform(ESTT_VACUUMSENSOR,pszStationName,nSpecVacSensorID))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(m_pGeometry->GetSIDTransform(ESTT_VACUUMSENSOR,pszStationName,nSpecVacSensorID)))); pPhysMotherVol->add(pPhysSIDVacuumSensor); //add global vacuum sensitive volume (ID=11) @@ -94,7 +96,7 @@ void AFP_GeoModelFactory::AddSiDetector(GeoPhysVol* pPhysMotherVol, const char* sprintf(szLabel,"%s_SIDPlate[%i]",pszStationName,i); pPhysMotherVol->add(new GeoNameTag(szLabel)); //pPhysMotherVol->add(new GeoTransform(PlateTotTrans)); - pPhysMotherVol->add(new GeoTransform(m_pGeometry->GetSIDTransform(ESTT_PLATE,pszStationName,i))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(m_pGeometry->GetSIDTransform(ESTT_PLATE,pszStationName,i)))); pPhysMotherVol->add(pPhysSIDPlate); //m_pDetectorManager->addTreeTop(pPhysSIDPlate); @@ -119,7 +121,7 @@ void AFP_GeoModelFactory::AddSiDetector(GeoPhysVol* pPhysMotherVol, const char* sprintf(szLabel,"%s_SIDSensor[%i]",pszStationName,i); pPhysMotherVol->add(new GeoNameTag(szLabel)); //pPhysMotherVol->add(new GeoTransform(TransSID)); - pPhysMotherVol->add(new GeoTransform(m_pGeometry->GetSIDTransform(ESTT_SENSOR,pszStationName,i))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(m_pGeometry->GetSIDTransform(ESTT_SENSOR,pszStationName,i)))); pPhysMotherVol->add(pPhysSID); //m_MapSIDTransToLocal[std::string(pszStationName)][i]=m_pGeometry->GetSIDTransform(ESTT_SENSORLOCAL,pszStationName,i); @@ -133,7 +135,7 @@ void AFP_GeoModelFactory::AddSiDetector(GeoPhysVol* pPhysMotherVol, const char* pPhysMotherVol->add(new GeoNameTag(szLabel)); //pPhysMotherVol->add(new GeoTransform(TotTransform*HepGeom::Translate3D(fxm,0.0*CLHEP::mm,i*NOMINALSIDSPACING/cos(falpha))*HepGeom::RotateY3D(falpha))); //pPhysMotherVol->add(new GeoTransform(HepGeom::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+((GeoBox*)m_MapShapes["Sensor"])->getXHalfLength()), 0.0*CLHEP::mm, -pMainPlate->getZHalfLength()-0.5*SID_VACUUMSENSORTHICKNESS))); - pPhysMotherVol->add(new GeoTransform(m_pGeometry->GetSIDTransform(ESTT_VACUUMSENSOR,pszStationName,i))); + pPhysMotherVol->add(new GeoTransform(Amg::CLHEPTransformToEigen(m_pGeometry->GetSIDTransform(ESTT_VACUUMSENSOR,pszStationName,i)))); pPhysMotherVol->add(pPhysSIDVacuumSensor); } } @@ -141,22 +143,22 @@ void AFP_GeoModelFactory::AddSiDetector(GeoPhysVol* pPhysMotherVol, const char* GeoShape* AFP_GeoModelFactory::CreateSolidSIDSupport() { - double fdelta=0.01*CLHEP::mm; - - // main plate + edge - GeoBox* pMainBlock=new GeoBox(0.5*75.6*CLHEP::mm,0.5*(80-2*3.25)*CLHEP::mm,0.5*SID_PLATETHICKNESS); - GeoBox* pEdge=new GeoBox(0.5*(94-75.6+10)*CLHEP::mm,0.5*(108-14)*CLHEP::mm, 0.5*SID_PLATETHICKNESS); - HepGeom::Transform3D TransEdge=HepGeom::Translate3D(DETXSIDE*(pMainBlock->getXHalfLength()+pEdge->getXHalfLength()),pEdge->getYHalfLength()-pMainBlock->getYHalfLength(), 0.0*CLHEP::mm); - GeoShapeShift* pMoveEdge=new GeoShapeShift(pEdge, TransEdge); - GeoShapeUnion* pSupport1=new GeoShapeUnion(pMainBlock,pMoveEdge); - - // cut sensitive area - GeoBox* pSensorCut=new GeoBox(0.5*(21.0+10)*CLHEP::mm, 0.5*(22+10.0)*CLHEP::mm, 0.5*SID_PLATETHICKNESS+fdelta); - HepGeom::Transform3D TransSensorCut=HepGeom::Translate3D(DETXSIDE*(-pMainBlock->getXHalfLength()+pSensorCut->getXHalfLength()-fdelta), 0.0*CLHEP::mm, 0.0*CLHEP::mm); - GeoShapeShift* pMoveSensorCut=new GeoShapeShift(pSensorCut, TransSensorCut); - GeoShapeSubtraction* pSupport2=new GeoShapeSubtraction(pSupport1, pMoveSensorCut); - - return pSupport2; + double fdelta=0.01*CLHEP::mm; + + // main plate + edge + GeoBox* pMainBlock=new GeoBox(0.5*75.6*CLHEP::mm,0.5*(80-2*3.25)*CLHEP::mm,0.5*SID_PLATETHICKNESS); + GeoBox* pEdge=new GeoBox(0.5*(94-75.6+10)*CLHEP::mm,0.5*(108-14)*CLHEP::mm, 0.5*SID_PLATETHICKNESS); + GeoTrf::Transform3D TransEdge=GeoTrf::Translate3D(DETXSIDE*(pMainBlock->getXHalfLength()+pEdge->getXHalfLength()),pEdge->getYHalfLength()-pMainBlock->getYHalfLength(), 0.0*CLHEP::mm); + GeoShapeShift* pMoveEdge=new GeoShapeShift(pEdge,TransEdge); + GeoShapeUnion* pSupport1=new GeoShapeUnion(pMainBlock,pMoveEdge); + + // cut sensitive area + GeoBox* pSensorCut=new GeoBox(0.5*(21.0+10)*CLHEP::mm, 0.5*(22+10.0)*CLHEP::mm, 0.5*SID_PLATETHICKNESS+fdelta); + GeoTrf::Transform3D TransSensorCut=GeoTrf::Translate3D(DETXSIDE*(-pMainBlock->getXHalfLength()+pSensorCut->getXHalfLength()-fdelta), 0.0*CLHEP::mm, 0.0*CLHEP::mm); + GeoShapeShift* pMoveSensorCut=new GeoShapeShift(pSensorCut, TransSensorCut); + GeoShapeSubtraction* pSupport2=new GeoShapeSubtraction(pSupport1, pMoveSensorCut); + + return pSupport2; } GeoShape* AFP_GeoModelFactory::CreateSolidSIDPlate() @@ -165,35 +167,35 @@ GeoShape* AFP_GeoModelFactory::CreateSolidSIDPlate() double fSensorHolderWidth=0.3*CLHEP::mm; double fSensorHolderPlateWidth=0.0*CLHEP::mm;//0.3*CLHEP::mm; //thin plate under sensor - double fPlateThickness=m_CfgParams.sidcfg.fSupportThickness; - - //main plate including cover + edge - GeoBox* pMainPlate=new GeoBox(0.5*SID_MAINPLATEXDIM, 0.5*SID_MAINPLATEYDIM, 0.5*fPlateThickness); - GeoBox* pEdge=new GeoBox(0.5*(94*CLHEP::mm-SID_MAINPLATEXDIM),0.5*108*CLHEP::mm, 0.5*fPlateThickness); - HepGeom::Transform3D TransEdge=HepGeom::Translate3D(DETXSIDE*(pMainPlate->getXHalfLength()+pEdge->getXHalfLength()),0.0*CLHEP::mm, 0.0*CLHEP::mm); - GeoShapeShift* pMoveEdge=new GeoShapeShift(pEdge, TransEdge); - GeoShapeUnion* pDetPlate1=new GeoShapeUnion(pMainPlate,pMoveEdge); - - //cut sensitive area - GeoBox* pSensorCut=new GeoBox(0.5*21.0*CLHEP::mm, 0.5*22.0*CLHEP::mm,pMainPlate->getZHalfLength()-0.5*fSensorHolderWidth); - HepGeom::Transform3D TransSensorCut=HepGeom::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+pSensorCut->getXHalfLength()-fdelta),0.0*CLHEP::mm, -pMainPlate->getZHalfLength()+pSensorCut->getZHalfLength()-fdelta); - GeoShapeShift* pMoveSensorCut=new GeoShapeShift(pSensorCut, TransSensorCut); - GeoShapeSubtraction* pDetPlate2=new GeoShapeSubtraction(pDetPlate1, pMoveSensorCut); - + double fPlateThickness=m_CfgParams.sidcfg.fSupportThickness; + + //main plate including cover + edge + GeoBox* pMainPlate=new GeoBox(0.5*SID_MAINPLATEXDIM, 0.5*SID_MAINPLATEYDIM, 0.5*fPlateThickness); + GeoBox* pEdge=new GeoBox(0.5*(94*CLHEP::mm-SID_MAINPLATEXDIM),0.5*108*CLHEP::mm, 0.5*fPlateThickness); + GeoTrf::Transform3D TransEdge=GeoTrf::Translate3D(DETXSIDE*(pMainPlate->getXHalfLength()+pEdge->getXHalfLength()),0.0*CLHEP::mm, 0.0*CLHEP::mm); + GeoShapeShift* pMoveEdge=new GeoShapeShift(pEdge, TransEdge); + GeoShapeUnion* pDetPlate1=new GeoShapeUnion(pMainPlate,pMoveEdge); + + //cut sensitive area + GeoBox* pSensorCut=new GeoBox(0.5*21.0*CLHEP::mm, 0.5*22.0*CLHEP::mm,pMainPlate->getZHalfLength()-0.5*fSensorHolderWidth); + GeoTrf::Transform3D TransSensorCut=GeoTrf::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+pSensorCut->getXHalfLength()-fdelta),0.0*CLHEP::mm, -pMainPlate->getZHalfLength()+pSensorCut->getZHalfLength()-fdelta); + GeoShapeShift* pMoveSensorCut=new GeoShapeShift(pSensorCut, TransSensorCut); + GeoShapeSubtraction* pDetPlate2=new GeoShapeSubtraction(pDetPlate1, pMoveSensorCut); + GeoBox* pSensorCut2=new GeoBox(0.5*18*CLHEP::mm+fdelta,0.5*16*CLHEP::mm,0.5*(fSensorHolderWidth-fSensorHolderPlateWidth)+fdelta); - HepGeom::Transform3D TransSensorCut2=HepGeom::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+pSensorCut2->getXHalfLength()-fdelta),0.0*CLHEP::mm, pMainPlate->getZHalfLength()-pSensorCut2->getZHalfLength()-fSensorHolderPlateWidth+fdelta); - GeoShapeShift* pMoveSensorCut2=new GeoShapeShift(pSensorCut2, TransSensorCut2); - GeoShapeSubtraction* pDetPlate3=new GeoShapeSubtraction(pDetPlate2, pMoveSensorCut2); + GeoTrf::Transform3D TransSensorCut2=GeoTrf::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+pSensorCut2->getXHalfLength()-fdelta),0.0*CLHEP::mm, pMainPlate->getZHalfLength()-pSensorCut2->getZHalfLength()-fSensorHolderPlateWidth+fdelta); + GeoShapeShift* pMoveSensorCut2=new GeoShapeShift(pSensorCut2, TransSensorCut2); + GeoShapeSubtraction* pDetPlate3=new GeoShapeSubtraction(pDetPlate2, pMoveSensorCut2); - //cut side edges - GeoBox* pSideEdge=new GeoBox(0.5*27.5*CLHEP::mm, 0.5*12.5*CLHEP::mm, 0.5*2*CLHEP::mm); - HepGeom::Transform3D TransSideEdgeUp=HepGeom::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+pSideEdge->getXHalfLength()-fdelta),pMainPlate->getYHalfLength()-pSideEdge->getYHalfLength()+fdelta,-pMainPlate->getZHalfLength()+pSideEdge->getZHalfLength()-fdelta); - GeoShapeShift* pMoveSideEdgeUp=new GeoShapeShift(pSideEdge,TransSideEdgeUp); - GeoShapeSubtraction* pDetPlate4=new GeoShapeSubtraction(pDetPlate3, pMoveSideEdgeUp); + //cut side edges + GeoBox* pSideEdge=new GeoBox(0.5*27.5*CLHEP::mm, 0.5*12.5*CLHEP::mm, 0.5*2*CLHEP::mm); + GeoTrf::Transform3D TransSideEdgeUp=GeoTrf::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+pSideEdge->getXHalfLength()-fdelta),pMainPlate->getYHalfLength()-pSideEdge->getYHalfLength()+fdelta,-pMainPlate->getZHalfLength()+pSideEdge->getZHalfLength()-fdelta); + GeoShapeShift* pMoveSideEdgeUp=new GeoShapeShift(pSideEdge,TransSideEdgeUp); + GeoShapeSubtraction* pDetPlate4=new GeoShapeSubtraction(pDetPlate3, pMoveSideEdgeUp); - HepGeom::Transform3D TransSideEdgeDown=HepGeom::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+pSideEdge->getXHalfLength()-fdelta),-pMainPlate->getYHalfLength()+pSideEdge->getYHalfLength()-fdelta,-pMainPlate->getZHalfLength()+pSideEdge->getZHalfLength()-fdelta); - GeoShapeShift* pMoveSideEdgeDown=new GeoShapeShift(pSideEdge,TransSideEdgeDown); - GeoShapeSubtraction* pDetPlate5=new GeoShapeSubtraction(pDetPlate4, pMoveSideEdgeDown); + GeoTrf::Transform3D TransSideEdgeDown=GeoTrf::Translate3D(DETXSIDE*(-pMainPlate->getXHalfLength()+pSideEdge->getXHalfLength()-fdelta),-pMainPlate->getYHalfLength()+pSideEdge->getYHalfLength()-fdelta,-pMainPlate->getZHalfLength()+pSideEdge->getZHalfLength()-fdelta); + GeoShapeShift* pMoveSideEdgeDown=new GeoShapeShift(pSideEdge,TransSideEdgeDown); + GeoShapeSubtraction* pDetPlate5=new GeoShapeSubtraction(pDetPlate4, pMoveSideEdgeDown); //m_MapShapes["MainPlate"]=pMainPlate; //m_MapShapes["EdgePlate"]=pEdge; @@ -205,65 +207,65 @@ GeoShape* AFP_GeoModelFactory::CreateSolidSIDPlate() GeoShape* AFP_GeoModelFactory::CreateSolidSIDCooling() { // Symmetric part - GeoBox* pCoolingCh1=new GeoBox(0.5*22*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D DownLeft1=HepGeom::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh1->getXHalfLength()+2.)*CLHEP::mm, (13.+4.+2.+2.)*CLHEP::mm, 0.0*CLHEP::mm); - GeoShapeShift* pMoveDownLeft1=new GeoShapeShift(pCoolingCh1, DownLeft1); - - GeoBox* pCoolingCh11=new GeoBox(0.5*25.*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D DownLeft2=HepGeom::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh11->getXHalfLength()+2.)*CLHEP::mm, (13.+2.)*CLHEP::mm, 0.0*CLHEP::mm); - GeoShapeShift* pMoveDownLeft2=new GeoShapeShift(pCoolingCh11, DownLeft2); - GeoShapeUnion* pCoolingChU1=new GeoShapeUnion(pMoveDownLeft1,pMoveDownLeft2); - - GeoBox* pCoolingCh2=new GeoBox(0.5*4*CLHEP::mm, 0.5*(4+2+4)*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D DownLeft3=HepGeom::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh2->getXHalfLength()+2.)*CLHEP::mm, (13.+pCoolingCh2->getYHalfLength())*CLHEP::mm, 0.0*CLHEP::mm); - GeoShapeShift* pMoveDownLeft3=new GeoShapeShift(pCoolingCh2, DownLeft3); - GeoShapeUnion* pCoolingChU2=new GeoShapeUnion(pCoolingChU1,pMoveDownLeft3); + GeoBox* pCoolingCh1=new GeoBox(0.5*22*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D DownLeft1=GeoTrf::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh1->getXHalfLength()+2.)*CLHEP::mm, (13.+4.+2.+2.)*CLHEP::mm, 0.0*CLHEP::mm); + GeoShapeShift* pMoveDownLeft1=new GeoShapeShift(pCoolingCh1, DownLeft1); - double alpha1=-CLHEP::pi*15.5/180.; - GeoBox* pCoolingCh3=new GeoBox(0.5*39./std::cos(alpha1)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D MidLeft=HepGeom::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh3->getXHalfLength()+23.)*CLHEP::mm, 26.25*CLHEP::mm, 0.0*CLHEP::mm)*HepGeom::RotateZ3D(alpha1); - GeoShapeShift* pMoveMidLeft=new GeoShapeShift(pCoolingCh3, MidLeft); - GeoShapeUnion* pCoolingChU3=new GeoShapeUnion(pCoolingChU2,pMoveMidLeft); + GeoBox* pCoolingCh11=new GeoBox(0.5*25.*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D DownLeft2=GeoTrf::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh11->getXHalfLength()+2.)*CLHEP::mm, (13.+2.)*CLHEP::mm, 0.0*CLHEP::mm); + GeoShapeShift* pMoveDownLeft2=new GeoShapeShift(pCoolingCh11, DownLeft2); + GeoShapeUnion* pCoolingChU1=new GeoShapeUnion(pMoveDownLeft1,pMoveDownLeft2); + + GeoBox* pCoolingCh2=new GeoBox(0.5*4*CLHEP::mm, 0.5*(4+2+4)*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D DownLeft3=GeoTrf::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh2->getXHalfLength()+2.)*CLHEP::mm, (13.+pCoolingCh2->getYHalfLength())*CLHEP::mm, 0.0*CLHEP::mm); + GeoShapeShift* pMoveDownLeft3=new GeoShapeShift(pCoolingCh2, DownLeft3); + GeoShapeUnion* pCoolingChU2=new GeoShapeUnion(pCoolingChU1,pMoveDownLeft3); + + double alpha1=-CLHEP::pi*15.5/180.; + GeoBox* pCoolingCh3=new GeoBox(0.5*39./std::cos(alpha1)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D MidLeft=GeoTrf::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh3->getXHalfLength()+23.)*CLHEP::mm, 26.25*CLHEP::mm, 0.0*CLHEP::mm)*GeoTrf::RotateZ3D(alpha1); + GeoShapeShift* pMoveMidLeft=new GeoShapeShift(pCoolingCh3, MidLeft); + GeoShapeUnion* pCoolingChU3=new GeoShapeUnion(pCoolingChU2,pMoveMidLeft); - GeoBox* pCoolingCh4=new GeoBox(0.5*(18+14)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D UpLeft=HepGeom::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh4->getXHalfLength()+62.)*CLHEP::mm, 31.5*CLHEP::mm, 0.0*CLHEP::mm); - GeoShapeShift* pMoveUpLeft=new GeoShapeShift(pCoolingCh4, UpLeft); - GeoShapeUnion* pCoolingChU4=new GeoShapeUnion(pCoolingChU3,pMoveUpLeft); - - HepGeom::RotateX3D Rot=HepGeom::RotateX3D(CLHEP::pi); - GeoShapeShift* pRot=new GeoShapeShift(pCoolingChU4, Rot); - GeoShapeUnion* pCoolingChU5=new GeoShapeUnion(pCoolingChU4,pRot); - - GeoBox* pCoolingCh5=new GeoBox(0.5*(25.99)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D Center1=HepGeom::Translate3D(DETXSIDE*(-37.8+25.)*CLHEP::mm, 0.0*CLHEP::mm, 0.0*CLHEP::mm)*HepGeom::RotateZ3D(-CLHEP::pi/2.); - GeoShapeShift* pMoveCenter1=new GeoShapeShift(pCoolingCh5, Center1); - GeoShapeUnion* pCoolingChU6=new GeoShapeUnion(pCoolingChU5,pMoveCenter1); - - // Asymmetric (central) part - GeoBox* pCoolingCh6=new GeoBox(0.5*(48.2)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D Center2=HepGeom::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh6->getXHalfLength()+45.8)*CLHEP::mm, -12.*CLHEP::mm, 0.0*CLHEP::mm); - GeoShapeShift* pMoveCenter2=new GeoShapeShift(pCoolingCh6, Center2); - GeoShapeUnion* pCoolingChU7=new GeoShapeUnion(pCoolingChU6,pMoveCenter2); - - GeoBox* pCoolingCh7=new GeoBox(0.5*(18.6)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D Center3=HepGeom::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh7->getXHalfLength()+31.4)*CLHEP::mm, -6.*CLHEP::mm, 0.0*CLHEP::mm)*HepGeom::RotateZ3D(+CLHEP::pi/4.01); - GeoShapeShift* pMoveCenter3=new GeoShapeShift(pCoolingCh7, Center3); - GeoShapeUnion* pCoolingChU8=new GeoShapeUnion(pCoolingChU7,pMoveCenter3); - - GeoBox* pCoolingCh8=new GeoBox(0.5*(8.6)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); - HepGeom::Transform3D Center4=HepGeom::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh8->getXHalfLength()+27.)*CLHEP::mm, 0.0*CLHEP::mm, 0.0*CLHEP::mm); - GeoShapeShift* pMoveCenter4=new GeoShapeShift(pCoolingCh8, Center4); - GeoShapeUnion* pCoolingChU9=new GeoShapeUnion(pCoolingChU8,pMoveCenter4); - - return pCoolingChU9; + GeoBox* pCoolingCh4=new GeoBox(0.5*(18+14)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D UpLeft=GeoTrf::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh4->getXHalfLength()+62.)*CLHEP::mm, 31.5*CLHEP::mm, 0.0*CLHEP::mm); + GeoShapeShift* pMoveUpLeft=new GeoShapeShift(pCoolingCh4, UpLeft); + GeoShapeUnion* pCoolingChU4=new GeoShapeUnion(pCoolingChU3,pMoveUpLeft); + + GeoTrf::RotateX3D Rot=GeoTrf::RotateX3D(CLHEP::pi); + GeoShapeShift* pRot=new GeoShapeShift(pCoolingChU4, Rot); + GeoShapeUnion* pCoolingChU5=new GeoShapeUnion(pCoolingChU4,pRot); + + GeoBox* pCoolingCh5=new GeoBox(0.5*(25.99)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D Center1=GeoTrf::Translate3D(DETXSIDE*(-37.8+25.)*CLHEP::mm, 0.0*CLHEP::mm, 0.0*CLHEP::mm)*GeoTrf::RotateZ3D(-CLHEP::pi/2.); + GeoShapeShift* pMoveCenter1=new GeoShapeShift(pCoolingCh5, Center1); + GeoShapeUnion* pCoolingChU6=new GeoShapeUnion(pCoolingChU5,pMoveCenter1); + + // Asymmetric (central) part + GeoBox* pCoolingCh6=new GeoBox(0.5*(48.2)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D Center2=GeoTrf::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh6->getXHalfLength()+45.8)*CLHEP::mm, -12.*CLHEP::mm, 0.0*CLHEP::mm); + GeoShapeShift* pMoveCenter2=new GeoShapeShift(pCoolingCh6, Center2); + GeoShapeUnion* pCoolingChU7=new GeoShapeUnion(pCoolingChU6,pMoveCenter2); + + GeoBox* pCoolingCh7=new GeoBox(0.5*(18.6)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D Center3=GeoTrf::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh7->getXHalfLength()+31.4)*CLHEP::mm, -6.*CLHEP::mm, 0.0*CLHEP::mm)*GeoTrf::RotateZ3D(+CLHEP::pi/4.01); + GeoShapeShift* pMoveCenter3=new GeoShapeShift(pCoolingCh7, Center3); + GeoShapeUnion* pCoolingChU8=new GeoShapeUnion(pCoolingChU7,pMoveCenter3); + + GeoBox* pCoolingCh8=new GeoBox(0.5*(8.6)*CLHEP::mm, 0.5*4*CLHEP::mm, 0.5*4*CLHEP::mm); + GeoTrf::Transform3D Center4=GeoTrf::Translate3D(DETXSIDE*(-75.6/2.+pCoolingCh8->getXHalfLength()+27.)*CLHEP::mm, 0.0*CLHEP::mm, 0.0*CLHEP::mm); + GeoShapeShift* pMoveCenter4=new GeoShapeShift(pCoolingCh8, Center4); + GeoShapeUnion* pCoolingChU9=new GeoShapeUnion(pCoolingChU8,pMoveCenter4); + + return pCoolingChU9; } GeoShape* AFP_GeoModelFactory::CreateSolidSIDVacuumLayer() { - // sensitive layer of vacuum (very thin) - GeoBox* pVacuumSensor=new GeoBox(0.5*180.0*CLHEP::mm,0.5*160.0*CLHEP::mm,0.5*SID_VACUUMSENSORTHICKNESS); - - return pVacuumSensor; + // sensitive layer of vacuum (very thin) + GeoBox* pVacuumSensor=new GeoBox(0.5*180.0*CLHEP::mm,0.5*160.0*CLHEP::mm,0.5*SID_VACUUMSENSORTHICKNESS); + + return pVacuumSensor; } diff --git a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelTD.cxx b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelTD.cxx index f260c07cfdd..974d5d13f89 100644 --- a/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelTD.cxx +++ b/ForwardDetectors/AFP/AFP_GeoModel/src/AFP_GeoModelTD.cxx @@ -26,6 +26,8 @@ #include "StoreGate/StoreGateSvc.h" #include "GeoModelUtilities/GeoModelTool.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelUtilities/GeoOpticalPhysVol.h" #include "GeoModelUtilities/GeoOpticalSurface.h" @@ -199,7 +201,6 @@ void AFP_GeoModelFactory::AddSepRadLBar(const char* pszStationName, const int nQ double fd,falpha; const double fslimcut=TD_SLIMCUT; CLHEP::Hep3Vector vecCutShift; - CLHEP::HepRotation Rot; GeoBox* pSolAux; char szLabel[64]; //G4LogicalBorderSurface* pSurface; --TODO @@ -230,11 +231,11 @@ void AFP_GeoModelFactory::AddSepRadLBar(const char* pszStationName, const int nQ GeoShape* pSolVertBar=NULL; if(LQBarDims.bIs45degElbow){ fd=LQBarDims.fVertBarXDim/sin(45.0*CLHEP::deg); //cut box dim - Rot=CLHEP::HepRotation(); Rot.rotateZ(45.0*CLHEP::deg); - vecCutShift=HepGeom::Vector3D<double>(0.5*LQBarDims.fVertBarXDim,0.5*fVertAirYDim,0.0*CLHEP::mm); + GeoTrf::RotateZ3D Rot(45.0*CLHEP::deg); + GeoTrf::Translation3D vecCutShift(0.5*LQBarDims.fVertBarXDim,0.5*fVertAirYDim,0.0*CLHEP::mm); pSolAux=new GeoBox(0.5*fd+fslimcut,0.5*fd+fslimcut,0.5*LQBarDims.fLBarZDim+fslimcut); - HepGeom::Transform3D TransCutWnd=HepGeom::Transform3D(Rot,vecCutShift); + GeoTrf::Transform3D TransCutWnd = vecCutShift*Rot; GeoShapeShift* pMoveCutWnd=new GeoShapeShift(pSolAux, TransCutWnd); GeoShapeSubtraction* pSolVertBar2=new GeoShapeSubtraction(pSolVertBar1, pMoveCutWnd); //G4SubtractionSolid* pSolVertBar2=new G4SubtractionSolid("SolVertBar2",pSolVertBar1,pSolAux,pRot,vecCutShift); @@ -250,7 +251,7 @@ void AFP_GeoModelFactory::AddSepRadLBar(const char* pszStationName, const int nQ GeoOpticalPhysVol* pPhysVertBar=new GeoOpticalPhysVol(pLogVertBar); sprintf(szLabel,"%s_Q%i_VertBar[%i]",pszStationName,nQuarticID,nLQBarID); pPhysMotherVolume->add(new GeoNameTag(szLabel)); - pPhysMotherVolume->add(new GeoTransform(LQBarTotTransform)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(LQBarTotTransform))); pPhysMotherVolume->add(pPhysVertBar); sprintf(szLabel,"%s_Q%i_VertAirLightGuideSurface[%i]",pszStationName,nQuarticID,nLQBarID); bsContainer->push_back(GeoBorderSurface(szLabel, pPhysVertBar, pPhysMotherVolume, m_pReflectionOptSurface)); @@ -272,10 +273,10 @@ void AFP_GeoModelFactory::AddSepRadLBar(const char* pszStationName, const int nQ HepGeom::Vector3D<double> vecX=vecA4+vecA5; vecCutShift=CLHEP::Hep3Vector(0.0*CLHEP::mm,-0.5*LQBarDims.fRadiatorLength,0.5*LQBarDims.fLBarZDim)+CLHEP::Hep3Vector(vecX); - Rot=CLHEP::HepRotation(); Rot.rotateX(-(90.0*CLHEP::deg-falpha)); + GeoTrf::RotateX3D Rot(-(90.0*CLHEP::deg-falpha)); pSolAux=new GeoBox(0.5*LQBarDims.fVertBarXDim+fslimcut,0.5*fd+fslimcut,0.5*fd+fslimcut); - HepGeom::Transform3D TransCutWnd=HepGeom::Transform3D(Rot,vecCutShift); + GeoTrf::Transform3D TransCutWnd=GeoTrf::Translation3D(vecCutShift.x(),vecCutShift.y(),vecCutShift.z())*Rot; GeoShapeShift* pMoveCutWnd=new GeoShapeShift(pSolAux, TransCutWnd); GeoShapeSubtraction* pSolRadiator2=new GeoShapeSubtraction(pSolRadiator1, pMoveCutWnd); //G4SubtractionSolid* pSolRadiator2=new G4SubtractionSolid("SolRadiator2",pSolRadiator1,pSolAux,pRot,vecCutShift); @@ -299,7 +300,7 @@ void AFP_GeoModelFactory::AddSepRadLBar(const char* pszStationName, const int nQ GeoPhysVol* pPhysRadiator=new GeoPhysVol(pLogRadiator); sprintf(szLabel,"%s_Q%i_Radiator[%i]",pszStationName,nQuarticID,nLQBarID); pPhysMotherVolume->add(new GeoNameTag(szLabel)); - pPhysMotherVolume->add(new GeoTransform(LQBarTotTransform*TransRadiator2VertBar)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(LQBarTotTransform*TransRadiator2VertBar))); pPhysMotherVolume->add(pPhysRadiator); sprintf(szLabel,"%s_Q%i_RadiatorSurface[%i]",pszStationName,nQuarticID,nLQBarID); bsContainer->push_back(GeoBorderSurface(szLabel, pPhysVertBar, pPhysMotherVolume, m_pOpticalSurface)); @@ -369,11 +370,11 @@ void AFP_GeoModelFactory::AddHorizontalArm(const char* pszStationName, const int HepGeom::Vector3D<double> vecA2=+0.5*fd*sqrt(2.0)*(HepGeom::RotateZ3D(+(45.0*CLHEP::deg-falpha))*HepGeom::Vector3D<double>(1.0,0.0,0.0)).unit(); HepGeom::Vector3D<double> vecX=vecA1+vecA2; CLHEP::Hep3Vector vecCutShift=CLHEP::Hep3Vector(bAddSepPart? 0.5*fTaperPartXDim:0.5*LQBarDims.fHorzBarXDim,0.5*LQBarDims.fHorzBarYDim,0.0)+CLHEP::Hep3Vector(vecX); - CLHEP::HepRotation Rot=CLHEP::HepRotation(); Rot.rotateZ(falpha); + GeoTrf::RotateZ3D Rot(falpha); GeoBox* pSolAux=new GeoBox(0.5*fd,0.5*fd,0.5*LQBarDims.fLBarZDim+fslimcut); - HepGeom::Transform3D TransCutWnd=HepGeom::Transform3D(Rot,vecCutShift); + GeoTrf::Transform3D TransCutWnd = GeoTrf::Translation3D(vecCutShift.x(),vecCutShift.y(),vecCutShift.z())*Rot; GeoShapeShift* pMoveCutWnd=new GeoShapeShift(pSolAux, TransCutWnd); pSolHorzBar=new GeoShapeSubtraction(pSolHorzBar1, pMoveCutWnd); //pSolHorzBar=new G4SubtractionSolid("SolHorzBarWithTaper",pSolHorzBar1,pSolAux,pRot,vecCutShift); @@ -395,7 +396,7 @@ void AFP_GeoModelFactory::AddHorizontalArm(const char* pszStationName, const int pPhysHorzBar=new GeoOpticalPhysVol(pLogHorzBar); sprintf(szLabel,"%s_Q%i_HorzBarTaper[%i]",pszStationName, nQuarticID, nLQBarID); pPhysMotherVolume->add(new GeoNameTag(szLabel)); - pPhysMotherVolume->add(new GeoTransform(TransInMotherVolume)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransInMotherVolume))); pPhysMotherVolume->add(pPhysHorzBar); sprintf(szLabel,"%s_Q%i_HorzTaperAirGuideSurface[%i]",pszStationName,nQuarticID,nLQBarID); bsContainer->push_back(GeoBorderSurface(szLabel, pPhysHorzBar, pPhysMotherVolume, (LQBarDims.eTaperMaterial==EM_VACUUM)? m_pReflectionOptSurface:m_pOpticalSurface)); @@ -411,7 +412,7 @@ void AFP_GeoModelFactory::AddHorizontalArm(const char* pszStationName, const int pPhysHorzBar=new GeoOpticalPhysVol(pLogHorzBar); sprintf(szLabel,"%s_Q%i_HorzBar[%i]",pszStationName, nQuarticID, nLQBarID); pPhysMotherVolume->add(new GeoNameTag(szLabel)); - pPhysMotherVolume->add(new GeoTransform(TransInMotherVolume)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransInMotherVolume))); pPhysMotherVolume->add(pPhysHorzBar); sprintf(szLabel,"%s_Q%i_HorzAirGuideSurface[%i]",pszStationName,nQuarticID,nLQBarID); bsContainer->push_back(GeoBorderSurface(szLabel, pPhysHorzBar, pPhysMotherVolume, m_pReflectionOptSurface)); @@ -429,7 +430,7 @@ void AFP_GeoModelFactory::AddHorizontalArm(const char* pszStationName, const int pPhysHorzBar=new GeoOpticalPhysVol(pLogHorzBar); sprintf(szLabel,"%s_Q%i_HorzBar[%i]",pszStationName, nQuarticID, nLQBarID); pPhysMotherVolume->add(new GeoNameTag(szLabel)); - pPhysMotherVolume->add(new GeoTransform(TransInMotherVolume)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransInMotherVolume))); pPhysMotherVolume->add(pPhysHorzBar); if(LQBarDims.eType==ELBT_HYBRID || LQBarDims.eType==ELBT_HYBRIDMETALELBOW) { @@ -468,7 +469,7 @@ void AFP_GeoModelFactory::AddSensor(const char* pszStationName, const int nQuart //sprintf(szLabel,"%s_Q%i_TDSensor[%i]",pszStationName,nQuarticID,nRowsCnt*i+j); sprintf(szLabel,"%s_Q%i_TDSensor[%i][%02i]",pszStationName,nQuarticID,nLQBarID,(m_CfgParams.tdcfg.nColsCnt>1)? nLQBarID:i); pPhysMotherVolume->add(new GeoNameTag(szLabel)); - pPhysMotherVolume->add(new GeoTransform(TotTransform)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TotTransform))); pPhysMotherVolume->add(pPhysSensor); //TotTransform=TransInMotherVolume*HepGeom::TranslateZ3D(fFirstSensorZPos+i*fSensorLength); //sprintf(szLabel,"%s_Q%i_LogSensor[%i][%02i]",pszStationName,nQuarticID,nLQBarID,(m_LBarDimensions.nNumOfLBars>1)? nLQBarID:i); diff --git a/ForwardDetectors/AFP/AFP_Geometry/AFP_Geometry/AFP_ConfigParams.h b/ForwardDetectors/AFP/AFP_Geometry/AFP_Geometry/AFP_ConfigParams.h index b9bcb4b9303..6ee1da52a21 100644 --- a/ForwardDetectors/AFP/AFP_Geometry/AFP_Geometry/AFP_ConfigParams.h +++ b/ForwardDetectors/AFP/AFP_Geometry/AFP_Geometry/AFP_ConfigParams.h @@ -10,8 +10,8 @@ #include <vector> #include <string> +#include "CLHEP/Geometry/Transform3D.h" #include "AFP_Geometry/AFP_constants.h" -#include "GeoModelKernel/GeoTransform.h" enum eLQBarType { ELBT_UNDEFINED=0, ELBT_REGULAR=1, ELBT_METALELBOW=2, ELBT_AIRGUIDE=3, ELBT_HYBRID=4, ELBT_HYBRIDMETALELBOW=5, ELBT_ONEARM=6, ELBT_ONEARMAIRGUIDE=7, ELBT_MIKELBAR=8 }; enum eSkinReflectivityMode { ESRM_SINGLE=1, ESRM_SPECTRAL1=2 }; diff --git a/ForwardDetectors/AFP/AFP_Geometry/AFP_Geometry/AFP_Geometry.h b/ForwardDetectors/AFP/AFP_Geometry/AFP_Geometry/AFP_Geometry.h index 7069f519e06..22dafcf98a0 100644 --- a/ForwardDetectors/AFP/AFP_Geometry/AFP_Geometry/AFP_Geometry.h +++ b/ForwardDetectors/AFP/AFP_Geometry/AFP_Geometry/AFP_Geometry.h @@ -10,7 +10,6 @@ #include "AFP_Geometry/AFP_ConfigParams.h" #include "CLHEP/Geometry/Point3D.h" -#include "GeoModelKernel/GeoTransform.h" #include "AthenaKernel/CLASS_DEF.h" #include <list> diff --git a/ForwardDetectors/AFP/AFP_Geometry/CMakeLists.txt b/ForwardDetectors/AFP/AFP_Geometry/CMakeLists.txt index de155c59036..557ff779a12 100644 --- a/ForwardDetectors/AFP/AFP_Geometry/CMakeLists.txt +++ b/ForwardDetectors/AFP/AFP_Geometry/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( AFP_Geometry ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel PRIVATE Control/StoreGate GaudiKernel @@ -23,6 +22,6 @@ atlas_add_library( AFP_Geometry PUBLIC_HEADERS AFP_Geometry INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelKernel StoreGateLib SGtests + LINK_LIBRARIES ${CLHEP_LIBRARIES} StoreGateLib SGtests PRIVATE_LINK_LIBRARIES AthenaKernel GaudiKernel PathResolver ) diff --git a/ForwardDetectors/ALFA/ALFA_GeoModel/CMakeLists.txt b/ForwardDetectors/ALFA/ALFA_GeoModel/CMakeLists.txt index c0c2769378a..92f6f3c1654 100644 --- a/ForwardDetectors/ALFA/ALFA_GeoModel/CMakeLists.txt +++ b/ForwardDetectors/ALFA/ALFA_GeoModel/CMakeLists.txt @@ -11,8 +11,8 @@ atlas_depends_on_subdirs( PUBLIC Database/AthenaPOOL/AthenaPoolUtilities Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoPrimitives ForwardDetectors/ALFA/ALFA_Geometry PRIVATE Control/StoreGate @@ -21,13 +21,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( ALFA_GeoModel src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaKernel AthenaPoolUtilities GeoModelKernel GeoModelUtilities ALFA_Geometry StoreGateLib SGtests GaudiKernel ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel AthenaPoolUtilities GeoModelUtilities ALFA_Geometry StoreGateLib SGtests GaudiKernel ) # Install files from the package: atlas_install_headers( ALFA_GeoModel ) diff --git a/ForwardDetectors/ALFA/ALFA_GeoModel/src/ALFA_DetectorFactory.cxx b/ForwardDetectors/ALFA/ALFA_GeoModel/src/ALFA_DetectorFactory.cxx index d24ad6e620f..e2c6f1d75ef 100755 --- a/ForwardDetectors/ALFA/ALFA_GeoModel/src/ALFA_DetectorFactory.cxx +++ b/ForwardDetectors/ALFA/ALFA_GeoModel/src/ALFA_DetectorFactory.cxx @@ -14,6 +14,7 @@ #include "GeoModelKernel/GeoShapeSubtraction.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoNameTag.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" @@ -21,6 +22,8 @@ #include "GeoModelUtilities/StoredAlignX.h" #include "GeoModelUtilities/StoredPhysVol.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/MsgStream.h" #include "AthenaKernel/getMessageSvc.h" @@ -392,15 +395,15 @@ void ALFA_DetectorFactory::CreateAxes(GeoPhysVol* pMotherVolume) GeoFullPhysVol* pPhysBoxZ=new GeoFullPhysVol(pLogBoxZ); pMotherVolume->add(new GeoNameTag("BoxX")); - pMotherVolume->add(new GeoTransform(HepGeom::Translate3D(0, 0, 0))); + pMotherVolume->add(new GeoTransform(GeoTrf::Transform3D::Identity())); pMotherVolume->add(pPhysBoxX); pMotherVolume->add(new GeoNameTag("BoxY")); - pMotherVolume->add(new GeoTransform(HepGeom::Translate3D(0, 0, 0))); + pMotherVolume->add(new GeoTransform(GeoTrf::Transform3D::Identity())); pMotherVolume->add(pPhysBoxY); pMotherVolume->add(new GeoNameTag("BoxZ")); - pMotherVolume->add(new GeoTransform(HepGeom::Translate3D(0, 0, 0))); + pMotherVolume->add(new GeoTransform(GeoTrf::Transform3D::Identity())); pMotherVolume->add(pPhysBoxZ); //helper box @@ -416,7 +419,6 @@ void ALFA_DetectorFactory::CreateAxes(GeoPhysVol* pMotherVolume) void ALFA_DetectorFactory::AddBeamPipeInStation(GeoFullPhysVol* pPhysStation, const char* pszStationLabel) { char szLabel[32]; - HepGeom::Transform3D TransTube; double fzs=2*ALFASTATIONHSIZEZ; double fzd=INNERDETZSPACE; @@ -429,15 +431,13 @@ void ALFA_DetectorFactory::AddBeamPipeInStation(GeoFullPhysVol* pPhysStation, co GeoFullPhysVol* pPhysTube=new GeoFullPhysVol(pLogTube); sprintf(szLabel,"%s_IBP01",pszStationLabel); - TransTube=HepGeom::TranslateZ3D(fZPos); pPhysStation->add(new GeoNameTag(szLabel)); - pPhysStation->add(new GeoTransform(TransTube)); + pPhysStation->add(new GeoTransform(GeoTrf::TranslateZ3D(fZPos))); pPhysStation->add(pPhysTube); sprintf(szLabel,"%s_IBP02",pszStationLabel); - TransTube=HepGeom::TranslateZ3D(-fZPos); pPhysStation->add(new GeoNameTag(szLabel)); - pPhysStation->add(new GeoTransform(TransTube)); + pPhysStation->add(new GeoTransform(GeoTrf::TranslateZ3D(-fZPos))); pPhysStation->add(pPhysTube); } @@ -455,7 +455,7 @@ void ALFA_DetectorFactory::AddGlobalVacuumSensorInStation(GeoFullPhysVol *pPhysS GeoLogVol* pLogGVS=new GeoLogVol(szLabel,pSolGVS,m_MapMaterials[string("std::Vacuum")]); GeoFullPhysVol* pPhysGVS=new GeoFullPhysVol(pLogGVS); - HepGeom::Transform3D TransGVS=HepGeom::TranslateZ3D(fZOffset); + GeoTrf::TranslateZ3D TransGVS(fZOffset); pPhysStation->add(new GeoNameTag(szLabel)); pPhysStation->add(new GeoTransform(TransGVS)); pPhysStation->add(pPhysGVS); @@ -483,7 +483,7 @@ void ALFA_DetectorFactory::ConstructAlfaStations(map<eAStationName,ALFAPHYSVOLUM pPhysAlfaBox=new GeoFullPhysVol(pLogAlfaBox); //TransAlfaBox=HepGeom::Translate3D(AStationParams.IdealMainPoint[0], AStationParams.IdealMainPoint[1], AStationParams.IdealMainPoint[2]); pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(AStationParams.ASTransformInATLAS)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(AStationParams.ASTransformInATLAS))); pWorld->add(pPhysAlfaBox); m_pDetectorManager->addTreeTop(pPhysAlfaBox); if(m_Config.bAddIBP) AddBeamPipeInStation(pPhysAlfaBox,AStationParams.szLabel); @@ -501,7 +501,7 @@ void ALFA_DetectorFactory::ConstructAlfaStations(map<eAStationName,ALFAPHYSVOLUM pPhysAlfaBox=new GeoFullPhysVol(pLogAlfaBox); //TransAlfaBox=HepGeom::Translate3D(AStationParams.IdealMainPoint[0], AStationParams.IdealMainPoint[1], AStationParams.IdealMainPoint[2]); pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(AStationParams.ASTransformInATLAS)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(AStationParams.ASTransformInATLAS))); pWorld->add(pPhysAlfaBox); m_pDetectorManager->addTreeTop(pPhysAlfaBox); if(m_Config.bAddIBP) AddBeamPipeInStation(pPhysAlfaBox,AStationParams.szLabel); @@ -519,7 +519,7 @@ void ALFA_DetectorFactory::ConstructAlfaStations(map<eAStationName,ALFAPHYSVOLUM pPhysAlfaBox=new GeoFullPhysVol(pLogAlfaBox); //TransAlfaBox=HepGeom::Translate3D(AStationParams.IdealMainPoint[0], AStationParams.IdealMainPoint[1], AStationParams.IdealMainPoint[2]); pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(AStationParams.ASTransformInATLAS)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(AStationParams.ASTransformInATLAS))); pWorld->add(pPhysAlfaBox); m_pDetectorManager->addTreeTop(pPhysAlfaBox); if(m_Config.bAddIBP) AddBeamPipeInStation(pPhysAlfaBox,AStationParams.szLabel); @@ -537,7 +537,7 @@ void ALFA_DetectorFactory::ConstructAlfaStations(map<eAStationName,ALFAPHYSVOLUM pPhysAlfaBox=new GeoFullPhysVol(pLogAlfaBox); //TransAlfaBox=HepGeom::Translate3D(AStationParams.IdealMainPoint[0], AStationParams.IdealMainPoint[1], AStationParams.IdealMainPoint[2]); pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(AStationParams.ASTransformInATLAS)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(AStationParams.ASTransformInATLAS))); pWorld->add(pPhysAlfaBox); m_pDetectorManager->addTreeTop(pPhysAlfaBox); if(m_Config.bAddIBP) AddBeamPipeInStation(pPhysAlfaBox,AStationParams.szLabel); @@ -572,11 +572,11 @@ void ALFA_DetectorFactory::ConstructBeampipe(GeoPhysVol* pWorld) //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH); TransTube=HepGeom::TranslateZ3D(ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH)*AStationParams01.ASTransformInATLAS; pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube); m_pDetectorManager->addTreeTop(pPhysTube); pWorld->add(new GeoNameTag(szLabel2)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube2); m_pDetectorManager->addTreeTop(pPhysTube2); LogStream<<MSG::INFO<<"ALFA_Beampipe01: hlength="<<ALFAEDGEBEAMPIPEHLENGTH<<", z="<<AStationParams01.IdealMainPoint[2]+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH<<endmsg; @@ -595,11 +595,11 @@ void ALFA_DetectorFactory::ConstructBeampipe(GeoPhysVol* pWorld) //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-fInnerTubeHLength); TransTube=HepGeom::TranslateZ3D(-ALFASTATIONHSIZEZ-fInnerTubeHLength)*AStationParams01.ASTransformInATLAS; pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube); m_pDetectorManager->addTreeTop(pPhysTube); pWorld->add(new GeoNameTag(szLabel2)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube2); m_pDetectorManager->addTreeTop(pPhysTube2); LogStream<<MSG::INFO<<"ALFA_Beampipe02: hlength="<<fInnerTubeHLength<<", z="<<AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-fInnerTubeHLength<<endmsg; @@ -616,11 +616,11 @@ void ALFA_DetectorFactory::ConstructBeampipe(GeoPhysVol* pWorld) //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH); TransTube=HepGeom::TranslateZ3D(-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH)*AStationParams01.ASTransformInATLAS; pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube); m_pDetectorManager->addTreeTop(pPhysTube); pWorld->add(new GeoNameTag(szLabel2)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube2); m_pDetectorManager->addTreeTop(pPhysTube2); LogStream<<MSG::INFO<<"ALFA_Beampipe03: hlength="<<ALFAEDGEBEAMPIPEHLENGTH<<", z="<<AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH<<endmsg; @@ -637,11 +637,11 @@ void ALFA_DetectorFactory::ConstructBeampipe(GeoPhysVol* pWorld) //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH); TransTube=HepGeom::TranslateZ3D(+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH)*AStationParams01.ASTransformInATLAS; pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube); m_pDetectorManager->addTreeTop(pPhysTube); pWorld->add(new GeoNameTag(szLabel2)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube2); m_pDetectorManager->addTreeTop(pPhysTube2); LogStream<<MSG::INFO<<"ALFA_Beampipe04: hlength="<<ALFAEDGEBEAMPIPEHLENGTH<<", z="<<AStationParams01.IdealMainPoint[2]+ALFASTATIONHSIZEZ+ALFAEDGEBEAMPIPEHLENGTH<<endmsg; @@ -660,11 +660,11 @@ void ALFA_DetectorFactory::ConstructBeampipe(GeoPhysVol* pWorld) //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-fInnerTubeHLength); TransTube=HepGeom::TranslateZ3D(-ALFASTATIONHSIZEZ-fInnerTubeHLength)*AStationParams01.ASTransformInATLAS; pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube); m_pDetectorManager->addTreeTop(pPhysTube); pWorld->add(new GeoNameTag(szLabel2)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube2); m_pDetectorManager->addTreeTop(pPhysTube2); LogStream<<MSG::INFO<<"ALFA_Beampipe02: hlength="<<fInnerTubeHLength<<", z="<<AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-fInnerTubeHLength<<endmsg; @@ -681,11 +681,11 @@ void ALFA_DetectorFactory::ConstructBeampipe(GeoPhysVol* pWorld) //TransTube=HepGeom::Translate3D(0.0*CLHEP::mm, 0.0*CLHEP::mm, AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH); TransTube=HepGeom::TranslateZ3D(-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH)*AStationParams01.ASTransformInATLAS; pWorld->add(new GeoNameTag(szLabel)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube); m_pDetectorManager->addTreeTop(pPhysTube); pWorld->add(new GeoNameTag(szLabel2)); - pWorld->add(new GeoTransform(TransTube)); + pWorld->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransTube))); pWorld->add(pPhysTube2); m_pDetectorManager->addTreeTop(pPhysTube2); LogStream<<MSG::INFO<<"ALFA_Beampipe06: hlength="<<ALFAEDGEBEAMPIPEHLENGTH<<", z="<<AStationParams01.IdealMainPoint[2]-ALFASTATIONHSIZEZ-ALFAEDGEBEAMPIPEHLENGTH<<endmsg; @@ -775,8 +775,8 @@ void ALFA_DetectorFactory::create(GeoPhysVol* pWorld) pPhysAlfaBox=mapActiveStations[RPosParams.eASName].pPhysVolume; TransAlfaBox=mapActiveStations[RPosParams.eASName].Transform; - pAlTransRPBox=new GeoAlignableTransform(RPosParams.RPTransformInStation); - pAlTransDetInRPMainPoint=new GeoAlignableTransform(RPosParams.DetTransformInMainPoint); + pAlTransRPBox=new GeoAlignableTransform(Amg::CLHEPTransformToEigen(RPosParams.RPTransformInStation)); + pAlTransDetInRPMainPoint=new GeoAlignableTransform(Amg::CLHEPTransformToEigen(RPosParams.DetTransformInMainPoint)); //create Roman pot ---------------------------------------------------------------------------- sprintf(szLabel,"LogRPBox[%02d]",eRPName); @@ -797,7 +797,7 @@ void ALFA_DetectorFactory::create(GeoPhysVol* pWorld) sprintf(szLabel,"RPAir[%02d]",eRPName); TransRPAir=HepGeom::Translate3D(0.0,0.0,0.0); pPhysRPBox->add(new GeoNameTag(szLabel)); - pPhysRPBox->add(new GeoTransform(TransRPAir)); + pPhysRPBox->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransRPAir))); pPhysRPBox->add(pPhysRPAir); //LogStream<<MSG::INFO<<"MARK4"<<endmsg; @@ -808,7 +808,7 @@ void ALFA_DetectorFactory::create(GeoPhysVol* pWorld) sprintf(szLabel,"Trigger[%02d]",eRPName); pPhysRPAir->add(new GeoNameTag(szLabel)); pPhysRPAir->add(pAlTransDetInRPMainPoint); - pPhysRPAir->add(new GeoTransform(HepGeom::Translate3D(-22.0*CLHEP::mm,-31.325*CLHEP::mm,11.3*CLHEP::mm))); + pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(-22.0*CLHEP::mm,-31.325*CLHEP::mm,11.3*CLHEP::mm))); pPhysRPAir->add(pPhysObj); //LogStream<<MSG::INFO<<"MARK5"<<endmsg; @@ -819,7 +819,7 @@ void ALFA_DetectorFactory::create(GeoPhysVol* pWorld) sprintf(szLabel,"RPSupport[%02d]",eRPName); pPhysRPAir->add(new GeoNameTag(szLabel)); pPhysRPAir->add(pAlTransDetInRPMainPoint); - pPhysRPAir->add(new GeoTransform(HepGeom::Translate3D(0.0*CLHEP::mm,85.475*CLHEP::mm,-28.5*CLHEP::mm))); + pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(0.0*CLHEP::mm,85.475*CLHEP::mm,-28.5*CLHEP::mm))); pPhysRPAir->add(pPhysObj); //LogStream<<MSG::INFO<<"MARK6"<<endmsg; @@ -831,7 +831,7 @@ void ALFA_DetectorFactory::create(GeoPhysVol* pWorld) sprintf(szLabel,"G10Substrate[%02d][%d]",eRPName,i); pPhysRPAir->add(new GeoNameTag(szLabel)); pPhysRPAir->add(pAlTransDetInRPMainPoint); - pPhysRPAir->add(new GeoTransform(HepGeom::Translate3D(ALFA_stagger[i]*CLHEP::mm,-27.525*CLHEP::mm,(-17.5+i*2)*CLHEP::mm)*HepGeom::RotateX3D(-90.0*CLHEP::deg))); + pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(ALFA_stagger[i]*CLHEP::mm,-27.525*CLHEP::mm,(-17.5+i*2)*CLHEP::mm)*GeoTrf::RotateX3D(-90.0*CLHEP::deg))); pPhysRPAir->add(pPhysObj); } @@ -843,7 +843,7 @@ void ALFA_DetectorFactory::create(GeoPhysVol* pWorld) sprintf(szLabel,"RPSupport[%02d][%d]",eRPName,i); pPhysRPAir->add(new GeoNameTag(szLabel)); pPhysRPAir->add(pAlTransDetInRPMainPoint); - pPhysRPAir->add(new GeoTransform(HepGeom::Translate3D(0.0*CLHEP::mm,5.975*CLHEP::mm,(-17.5+i*2)*CLHEP::mm))); + pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(0.0*CLHEP::mm,5.975*CLHEP::mm,(-17.5+i*2)*CLHEP::mm))); pPhysRPAir->add(pPhysObj); } //LogStream<<MSG::INFO<<"MARK7"<<endmsg; @@ -863,7 +863,7 @@ void ALFA_DetectorFactory::create(GeoPhysVol* pWorld) sprintf(szLabel,"ODPlate[%02d][%d]",eRPName,i); pPhysRPAir->add(new GeoNameTag(szLabel)); pPhysRPAir->add(pAlTransDetInRPMainPoint); - pPhysRPAir->add(new GeoTransform(HepGeom::Translate3D(0.0*CLHEP::mm,-0.175*CLHEP::mm,(15+i*2)*CLHEP::mm))); + pPhysRPAir->add(new GeoTransform(GeoTrf::Translate3D(0.0*CLHEP::mm,-0.175*CLHEP::mm,(15+i*2)*CLHEP::mm))); pPhysRPAir->add(pPhysObj); } //LogStream<<MSG::INFO<<"MARK9"<<endmsg; @@ -909,47 +909,47 @@ GeoShape* ALFA_DetectorFactory::CreateSolidRP() GeoBox* RPbox2 = new GeoBox(21*CLHEP::mm,5.425*CLHEP::mm,7.5*CLHEP::mm); GeoBox* RPbox3 = new GeoBox(22*CLHEP::mm,1*CLHEP::mm,8.5*CLHEP::mm); - HepGeom::Transform3D RP_Move1= HepGeom::Translate3D(0, 4.425*CLHEP::mm, 0); + GeoTrf::Transform3D RP_Move1= GeoTrf::Translate3D(0, 4.425*CLHEP::mm, 0); GeoShapeShift * mowe1 = new GeoShapeShift(RPbox3,RP_Move1); GeoShapeUnion * RPsemi1 = new GeoShapeUnion(RPbox2, mowe1); - HepGeom::Transform3D RP_Move2= HepGeom::Translate3D( 38.5*CLHEP::mm, -35.25*CLHEP::mm, 14.5*CLHEP::mm); + GeoTrf::Transform3D RP_Move2= GeoTrf::Translate3D( 38.5*CLHEP::mm, -35.25*CLHEP::mm, 14.5*CLHEP::mm); GeoShapeShift * mowe2 = new GeoShapeShift(RPsemi1,RP_Move2); GeoShapeUnion * RPsemi2 = new GeoShapeUnion(RPbox1, mowe2); - HepGeom::Transform3D RP_Move3= HepGeom::Translate3D(-38.5*CLHEP::mm, -35.25*CLHEP::mm, 14.5*CLHEP::mm); + GeoTrf::Transform3D RP_Move3= GeoTrf::Translate3D(-38.5*CLHEP::mm, -35.25*CLHEP::mm, 14.5*CLHEP::mm); GeoShapeShift * mowe3 = new GeoShapeShift(RPsemi1,RP_Move3); GeoShapeUnion * RPsemi3 = new GeoShapeUnion(RPsemi2, mowe3); GeoTube* RPtube1 = new GeoTube(0*CLHEP::mm,74*CLHEP::mm,26.675*CLHEP::mm); GeoTube* RPtube2 = new GeoTube(0*CLHEP::mm,126.5*CLHEP::mm,9.875*CLHEP::mm); - HepGeom::Transform3D RP_Move4= HepGeom::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -36.55*CLHEP::mm); + GeoTrf::Transform3D RP_Move4= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -36.55*CLHEP::mm); GeoShapeShift * mowe4 = new GeoShapeShift(RPtube2,RP_Move4); GeoShapeUnion * RPsemi4 = new GeoShapeUnion(RPtube1, mowe4); GeoBox* RPbox4 = new GeoBox(104*CLHEP::mm,104*CLHEP::mm,9.875*CLHEP::mm); GeoBox* RPbox5 = new GeoBox(131.75*CLHEP::mm,131.75*CLHEP::mm,22.5*CLHEP::mm); - HepGeom::Transform3D RP_Move5= HepGeom::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -56.3*CLHEP::mm); + GeoTrf::Transform3D RP_Move5= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -56.3*CLHEP::mm); GeoShapeShift * mowe5 = new GeoShapeShift(RPbox4,RP_Move5); GeoShapeUnion * RPsemi5 = new GeoShapeUnion(RPsemi4, mowe5); - HepGeom::Transform3D RP_Move6= HepGeom::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -88.675*CLHEP::mm); + GeoTrf::Transform3D RP_Move6= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, -88.675*CLHEP::mm); GeoShapeShift * mowe6 = new GeoShapeShift(RPbox5,RP_Move6); GeoShapeUnion * RPsemi6 = new GeoShapeUnion(RPsemi5, mowe6); - HepGeom::Transform3D RP_MoveRot7= HepGeom::Translate3D(0*CLHEP::mm, 56.5*CLHEP::mm, -8.5*CLHEP::mm)*HepGeom::RotateX3D(90*CLHEP::deg); + GeoTrf::Transform3D RP_MoveRot7= GeoTrf::Translate3D(0*CLHEP::mm, 56.5*CLHEP::mm, -8.5*CLHEP::mm)*GeoTrf::RotateX3D(90*CLHEP::deg); GeoShapeShift * mowe7 = new GeoShapeShift(RPsemi6,RP_MoveRot7); GeoShapeUnion * RPsemi7 = new GeoShapeUnion(RPsemi3, mowe7); GeoBox* RPbox6 = new GeoBox(16.97*CLHEP::mm,16.97*CLHEP::mm,0.75*CLHEP::mm); - HepGeom::Transform3D RP_MoveRot8= HepGeom::Translate3D(0*CLHEP::mm, -21.525*CLHEP::mm, 22.25*CLHEP::mm)*HepGeom::RotateZ3D(45*CLHEP::deg); + GeoTrf::Transform3D RP_MoveRot8= GeoTrf::Translate3D(0*CLHEP::mm, -21.525*CLHEP::mm, 22.25*CLHEP::mm)*GeoTrf::RotateZ3D(45*CLHEP::deg); GeoShapeShift * mowe8 = new GeoShapeShift(RPbox6,RP_MoveRot8); GeoShapeSubtraction * RPsemi8 = new GeoShapeSubtraction(RPsemi7, mowe8); - HepGeom::Transform3D RP_MoveRot9= HepGeom::Translate3D(0*CLHEP::mm, -21.525*CLHEP::mm, -22.25*CLHEP::mm)*HepGeom::RotateZ3D(45*CLHEP::deg); + GeoTrf::Transform3D RP_MoveRot9= GeoTrf::Translate3D(0*CLHEP::mm, -21.525*CLHEP::mm, -22.25*CLHEP::mm)*GeoTrf::RotateZ3D(45*CLHEP::deg); GeoShapeShift * mowe9 = new GeoShapeShift(RPbox6,RP_MoveRot9); GeoShapeSubtraction * shapeRP = new GeoShapeSubtraction(RPsemi8, mowe9); @@ -964,23 +964,23 @@ GeoShape* ALFA_DetectorFactory::CreateSolidAir() GeoBox* RP_Airbox4 = new GeoBox(20*CLHEP::mm,5.675*CLHEP::mm,6.5*CLHEP::mm); GeoTube* RP_Airtube1 = new GeoTube(0*CLHEP::mm,69*CLHEP::mm,65.425*CLHEP::mm); - HepGeom::Transform3D RP_Air_Move1= HepGeom::Translate3D(0,31.325*CLHEP::mm, 0); + GeoTrf::Transform3D RP_Air_Move1= GeoTrf::Translate3D(0,31.325*CLHEP::mm, 0); GeoShapeShift * mowe1 = new GeoShapeShift(RP_Airbox2,RP_Air_Move1); GeoShapeUnion * RP_Airsemi1 = new GeoShapeUnion(RP_Airbox1, mowe1); - HepGeom::Transform3D RP_Air_Move2= HepGeom::Translate3D(0,-28.75*CLHEP::mm, 0); + GeoTrf::Transform3D RP_Air_Move2= GeoTrf::Translate3D(0,-28.75*CLHEP::mm, 0); GeoShapeShift * mowe2 = new GeoShapeShift(RP_Airbox3,RP_Air_Move2); GeoShapeUnion * RP_Airsemi2 = new GeoShapeUnion(RP_Airsemi1, mowe2); - HepGeom::Transform3D RP_Air_Move3= HepGeom::Translate3D( 38.5*CLHEP::mm,-33.5*CLHEP::mm,14.5*CLHEP::mm); + GeoTrf::Transform3D RP_Air_Move3= GeoTrf::Translate3D( 38.5*CLHEP::mm,-33.5*CLHEP::mm,14.5*CLHEP::mm); GeoShapeShift * mowe3 = new GeoShapeShift(RP_Airbox4,RP_Air_Move3); GeoShapeUnion * RP_Airsemi3 = new GeoShapeUnion(RP_Airsemi2, mowe3); - HepGeom::Transform3D RP_Air_Move4= HepGeom::Translate3D(-38.5*CLHEP::mm,-33.5*CLHEP::mm,14.5*CLHEP::mm); + GeoTrf::Transform3D RP_Air_Move4= GeoTrf::Translate3D(-38.5*CLHEP::mm,-33.5*CLHEP::mm,14.5*CLHEP::mm); GeoShapeShift * mowe4 = new GeoShapeShift(RP_Airbox4,RP_Air_Move4); GeoShapeUnion * RP_Airsemi4 = new GeoShapeUnion(RP_Airsemi3, mowe4); - HepGeom::Transform3D RP_Air_MoveRot5= HepGeom::Translate3D(0*CLHEP::mm,100.25*CLHEP::mm, -8.5*CLHEP::mm)*HepGeom::RotateX3D(90*CLHEP::deg); + GeoTrf::Transform3D RP_Air_MoveRot5= GeoTrf::Translate3D(0*CLHEP::mm,100.25*CLHEP::mm, -8.5*CLHEP::mm)*GeoTrf::RotateX3D(90*CLHEP::deg); GeoShapeShift * mowe5 = new GeoShapeShift(RP_Airtube1,RP_Air_MoveRot5); GeoShapeUnion * shapeRP_Air = new GeoShapeUnion(RP_Airsemi4, mowe5); @@ -993,19 +993,19 @@ GeoShape* ALFA_DetectorFactory::CreateSolidTrigger() GeoBox* ALFA_Trigbox2 = new GeoBox(15.75*CLHEP::mm,15.75*CLHEP::mm,3*CLHEP::mm); GeoBox* ALFA_Trigbox3 = new GeoBox(3*CLHEP::mm,7.5*CLHEP::mm,1.5*CLHEP::mm); - HepGeom::Transform3D ALFA_Trig_MoveRot1= HepGeom::Translate3D(17.235*CLHEP::mm, -17.235*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(45*CLHEP::deg); + GeoTrf::Transform3D ALFA_Trig_MoveRot1= GeoTrf::Translate3D(17.235*CLHEP::mm, -17.235*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(45*CLHEP::deg); GeoShapeShift * mowe1 = new GeoShapeShift(ALFA_Trigbox2, ALFA_Trig_MoveRot1); GeoShapeSubtraction * ALFA_Trigsemi1 = new GeoShapeSubtraction(ALFA_Trigbox1, mowe1); - HepGeom::Transform3D ALFA_Trig_Move2= HepGeom::Translate3D(0*CLHEP::mm,0*CLHEP::mm, 3.5*CLHEP::mm); + GeoTrf::Transform3D ALFA_Trig_Move2= GeoTrf::Translate3D(0*CLHEP::mm,0*CLHEP::mm, 3.5*CLHEP::mm); GeoShapeShift * mowe2 = new GeoShapeShift(ALFA_Trigsemi1,ALFA_Trig_Move2); GeoShapeUnion * ALFA_Trigsemi2 = new GeoShapeUnion(ALFA_Trigsemi1, mowe2); - HepGeom::Transform3D ALFA_Trig_Move3= HepGeom::Translate3D(44*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D ALFA_Trig_Move3= GeoTrf::Translate3D(44*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe3 = new GeoShapeShift(ALFA_Trigbox3,ALFA_Trig_Move3); GeoShapeUnion * ALFA_Trigsemi3 = new GeoShapeUnion(ALFA_Trigbox3, mowe3); - HepGeom::Transform3D ALFA_Trig_MoveRot4= HepGeom::Translate3D(22*CLHEP::mm, 10.424*CLHEP::mm, -7.6*CLHEP::mm)*HepGeom::RotateZ3D(-45*CLHEP::deg); + GeoTrf::Transform3D ALFA_Trig_MoveRot4= GeoTrf::Translate3D(22*CLHEP::mm, 10.424*CLHEP::mm, -7.6*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg); GeoShapeShift * mowe4 = new GeoShapeShift(ALFA_Trigsemi2,ALFA_Trig_MoveRot4); GeoShapeUnion * shapeALFA_Trigger = new GeoShapeUnion(ALFA_Trigsemi3, mowe4); @@ -1019,15 +1019,15 @@ GeoShape* ALFA_DetectorFactory::CreateSolidRPSupport() GeoBox* RP_Supbox3 = new GeoBox(18*CLHEP::mm, 5*CLHEP::mm,18*CLHEP::mm); GeoBox* RP_Supbox4 = new GeoBox(18*CLHEP::mm,3.5*CLHEP::mm,18*CLHEP::mm); - HepGeom::Transform3D RP_Sup_Move1= HepGeom::Translate3D(0, 42*CLHEP::mm, 8*CLHEP::mm); + GeoTrf::Transform3D RP_Sup_Move1= GeoTrf::Translate3D(0, 42*CLHEP::mm, 8*CLHEP::mm); GeoShapeShift * mowe1 = new GeoShapeShift(RP_Supbox2, RP_Sup_Move1); GeoShapeUnion * RP_Supsemi1 = new GeoShapeUnion(RP_Supbox1, mowe1); - HepGeom::Transform3D RP_Sup_Move2= HepGeom::Translate3D(0, 56*CLHEP::mm, 20*CLHEP::mm); + GeoTrf::Transform3D RP_Sup_Move2= GeoTrf::Translate3D(0, 56*CLHEP::mm, 20*CLHEP::mm); GeoShapeShift * mowe2 = new GeoShapeShift(RP_Supbox3, RP_Sup_Move2); GeoShapeUnion * RP_Supsemi2 = new GeoShapeUnion(RP_Supsemi1, mowe2); - HepGeom::Transform3D RP_Sup_Move3= HepGeom::Translate3D(0, 64.5*CLHEP::mm, 20*CLHEP::mm); + GeoTrf::Transform3D RP_Sup_Move3= GeoTrf::Translate3D(0, 64.5*CLHEP::mm, 20*CLHEP::mm); GeoShapeShift * mowe3 = new GeoShapeShift(RP_Supbox4, RP_Sup_Move3); GeoShapeUnion * shapeRP_Support = new GeoShapeUnion(RP_Supsemi2, mowe3); @@ -1040,11 +1040,11 @@ GeoShape* ALFA_DetectorFactory::CreateSolidG10Shapes() GeoTrd* G10trd2 = new GeoTrd( 30*CLHEP::mm, 9.5*CLHEP::mm, 0.15*CLHEP::mm, 0.15*CLHEP::mm, 10.25*CLHEP::mm); GeoBox* G10box1 = new GeoBox( 30*CLHEP::mm, 0.15*CLHEP::mm, 3.75*CLHEP::mm); - HepGeom::Transform3D G10_Move1= HepGeom::Translate3D(0, 0, 4.75*CLHEP::mm); + GeoTrf::Transform3D G10_Move1= GeoTrf::Translate3D(0, 0, 4.75*CLHEP::mm); GeoShapeShift* mowe1 = new GeoShapeShift(G10box1, G10_Move1); GeoShapeUnion* G10_Subsemi1 = new GeoShapeUnion(G10trd1, mowe1); - HepGeom::Transform3D G10_Move2= HepGeom::Translate3D(0, 0, 18.75*CLHEP::mm); + GeoTrf::Transform3D G10_Move2= GeoTrf::Translate3D(0, 0, 18.75*CLHEP::mm); GeoShapeShift* mowe2 = new GeoShapeShift(G10trd2, G10_Move2); GeoShapeUnion* shapeG10_Substrate = new GeoShapeUnion(G10_Subsemi1, mowe2); @@ -1061,20 +1061,20 @@ map<int,GeoShape*>* ALFA_DetectorFactory::CreateSolidTiPlates() GeoBox* TiPlate_box1 = new GeoBox(16*CLHEP::mm,120*CLHEP::mm,0.75*CLHEP::mm); GeoBox* TiPlate_box2 = new GeoBox(19.9793*CLHEP::mm,19.9793*CLHEP::mm,2*CLHEP::mm); - HepGeom::Transform3D TiPlate_Move1= HepGeom::Translate3D(0, 69*CLHEP::mm, 0); + GeoTrf::Transform3D TiPlate_Move1= GeoTrf::Translate3D(0, 69*CLHEP::mm, 0); GeoShapeShift * mowe1 = new GeoShapeShift(TiPlate_Holder,TiPlate_Move1); GeoShapeUnion * TiPlatesemi1 = new GeoShapeUnion(TiPlate_Substr, mowe1); for(i=0; i<ALFA_Nb_Plates; i++){ - HepGeom::Transform3D TiPlate_MoveRot2 = HepGeom::Translate3D(ALFA_stagger[i]*CLHEP::mm, -26.872*CLHEP::mm, 1*CLHEP::mm)*HepGeom::RotateZ3D( 45*CLHEP::deg); - HepGeom::Transform3D TiPlate_MoveRot3 = HepGeom::Translate3D(ALFA_stagger[i]*CLHEP::mm, -26.872*CLHEP::mm,-1*CLHEP::mm)*HepGeom::RotateZ3D(-45*CLHEP::deg); + GeoTrf::Transform3D TiPlate_MoveRot2 = GeoTrf::Translate3D(ALFA_stagger[i]*CLHEP::mm, -26.872*CLHEP::mm, 1*CLHEP::mm)*GeoTrf::RotateZ3D( 45*CLHEP::deg); + GeoTrf::Transform3D TiPlate_MoveRot3 = GeoTrf::Translate3D(ALFA_stagger[i]*CLHEP::mm, -26.872*CLHEP::mm,-1*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg); GeoShapeShift * mowe2 = new GeoShapeShift(TiPlate_box1, TiPlate_MoveRot2); GeoShapeShift * mowe3 = new GeoShapeShift(TiPlate_box1, TiPlate_MoveRot3); GeoShapeSubtraction * TiPlatesemi2 = new GeoShapeSubtraction(TiPlatesemi1,mowe2); GeoShapeSubtraction * TiPlatesemi3 = new GeoShapeSubtraction(TiPlatesemi2,mowe3); - HepGeom::Transform3D TiPlate_MoveRot4 = HepGeom::Translate3D(ALFA_stagger[i]*CLHEP::mm, -32.5*CLHEP::mm,0*CLHEP::mm)*HepGeom::RotateZ3D(-45*CLHEP::deg); + GeoTrf::Transform3D TiPlate_MoveRot4 = GeoTrf::Translate3D(ALFA_stagger[i]*CLHEP::mm, -32.5*CLHEP::mm,0*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg); GeoShapeShift * mowe4 = new GeoShapeShift(TiPlate_box2, TiPlate_MoveRot4); GeoShapeSubtraction* shapeTi_Plate = new GeoShapeSubtraction(TiPlatesemi3, mowe4); @@ -1093,11 +1093,11 @@ map<int,GeoShape*>* ALFA_DetectorFactory::CreateSolidODPlates() GeoBox* OD_Tibox2 = new GeoBox(10*CLHEP::mm,36.5*CLHEP::mm,1*CLHEP::mm); GeoBox* OD_Tibox3 = new GeoBox(19*CLHEP::mm,21.5*CLHEP::mm,2*CLHEP::mm); - HepGeom::Transform3D OD_Move01= HepGeom::Translate3D(0, 75.15*CLHEP::mm, 0); + GeoTrf::Transform3D OD_Move01= GeoTrf::Translate3D(0, 75.15*CLHEP::mm, 0); GeoShapeShift * mowe01 = new GeoShapeShift(OD_Tibox2,OD_Move01); GeoShapeUnion * OD_Tisemi01 = new GeoShapeUnion(OD_Tibox1, mowe01); - HepGeom::Transform3D OD_Move02= HepGeom::Translate3D(0, -19.15*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0); + GeoTrf::Transform3D OD_Move02= GeoTrf::Translate3D(0, -19.15*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0); GeoShapeShift * mowe02 = new GeoShapeShift(OD_Tibox3, OD_Move02); GeoShapeSubtraction * OD_Tisemi02 = new GeoShapeSubtraction(OD_Tisemi01, mowe02); @@ -1107,52 +1107,52 @@ map<int,GeoShape*>* ALFA_DetectorFactory::CreateSolidODPlates() GeoBox* OD_Tibox6 = new GeoBox(72.5*CLHEP::mm,150*CLHEP::mm,1*CLHEP::mm); GeoBox* OD_Tibox7 = new GeoBox(150*CLHEP::mm,72.5*CLHEP::mm,1*CLHEP::mm); - HepGeom::Transform3D OD_Move04 = HepGeom::Translate3D(72.5*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D OD_Move04 = GeoTrf::Translate3D(72.5*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe04 = new GeoShapeShift(OD_Tibox6,OD_Move04); GeoShapeSubtraction * OD_Tisemi04 = new GeoShapeSubtraction(OD_Titube1, mowe04); - HepGeom::Transform3D OD_Move05 = HepGeom::Translate3D(0*CLHEP::mm, 72.5*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D OD_Move05 = GeoTrf::Translate3D(0*CLHEP::mm, 72.5*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe05 = new GeoShapeShift(OD_Tibox7,OD_Move05); GeoShapeSubtraction * OD_Tisemi05 = new GeoShapeSubtraction(OD_Tisemi04, mowe05); GeoBox* OD_Tibox8 = new GeoBox(8.*CLHEP::mm,20.*CLHEP::mm,0.6*CLHEP::mm); GeoBox* OD_Tibox9 = new GeoBox(20.*CLHEP::mm,60.*CLHEP::mm,0.6*CLHEP::mm); - HepGeom::Transform3D OD_Move06= HepGeom::Translate3D(4*CLHEP::mm, -42.5*CLHEP::mm, 0.*CLHEP::mm); + GeoTrf::Transform3D OD_Move06= GeoTrf::Translate3D(4*CLHEP::mm, -42.5*CLHEP::mm, 0.*CLHEP::mm); GeoShapeShift * mowe06 = new GeoShapeShift(OD_Tibox8,OD_Move06); GeoShapeUnion * OD_Tisemi06 = new GeoShapeUnion(OD_Tisemi05, mowe06); - HepGeom::Transform3D OD_Move07= HepGeom::Translate3D(-42.5*CLHEP::mm, 60*CLHEP::mm, 0.*CLHEP::mm); + GeoTrf::Transform3D OD_Move07= GeoTrf::Translate3D(-42.5*CLHEP::mm, 60*CLHEP::mm, 0.*CLHEP::mm); GeoShapeShift * mowe07 = new GeoShapeShift(OD_Tibox9,OD_Move07); GeoShapeUnion * OD_Tisemi07 = new GeoShapeUnion(OD_Tisemi06, mowe07); for(i=0;i<OD_Nb_Plates;i++) { - HepGeom::Transform3D OD_Move08= HepGeom::Translate3D(-27*CLHEP::mm, (-8.183+OD_stagger[i])*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0); + GeoTrf::Transform3D OD_Move08= GeoTrf::Translate3D(-27*CLHEP::mm, (-8.183+OD_stagger[i])*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0); GeoShapeShift * mowe08 = new GeoShapeShift(OD_Tisemi07, OD_Move08); GeoShapeSubtraction * OD_Tisemi08 = new GeoShapeSubtraction(OD_Tibox5, mowe08); - HepGeom::Transform3D OD_Move09= HepGeom::Translate3D(27*CLHEP::mm, (-8.183+OD_stagger[i])*CLHEP::mm, 0)*HepGeom::RotateY3D(180*CLHEP::deg); + GeoTrf::Transform3D OD_Move09= GeoTrf::Translate3D(27*CLHEP::mm, (-8.183+OD_stagger[i])*CLHEP::mm, 0)*GeoTrf::RotateY3D(180*CLHEP::deg); GeoShapeShift * mowe09 = new GeoShapeShift(OD_Tisemi07, OD_Move09); GeoShapeSubtraction * OD_Tisemi09 = new GeoShapeSubtraction(OD_Tisemi08, mowe09); - HepGeom::Transform3D OD_Move11= HepGeom::Translate3D(-27*CLHEP::mm, (-0.383+OD_stagger[i])*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0); + GeoTrf::Transform3D OD_Move11= GeoTrf::Translate3D(-27*CLHEP::mm, (-0.383+OD_stagger[i])*CLHEP::mm, 0);//(0, -29.383*CLHEP::mm, 0); GeoShapeShift * mowe11 = new GeoShapeShift(OD_Tisemi07, OD_Move11); GeoShapeSubtraction * OD_Tisemi11 = new GeoShapeSubtraction(OD_Tibox5, mowe11); - HepGeom::Transform3D OD_Move12= HepGeom::Translate3D(27*CLHEP::mm, (-0.383+OD_stagger[i])*CLHEP::mm, 0)*HepGeom::RotateY3D(180*CLHEP::deg); + GeoTrf::Transform3D OD_Move12= GeoTrf::Translate3D(27*CLHEP::mm, (-0.383+OD_stagger[i])*CLHEP::mm, 0)*GeoTrf::RotateY3D(180*CLHEP::deg); GeoShapeShift * mowe12 = new GeoShapeShift(OD_Tisemi07, OD_Move12); GeoShapeSubtraction * OD_Tisemi12 = new GeoShapeSubtraction(OD_Tisemi11, mowe12); - HepGeom::Transform3D OD_Move14= HepGeom::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, 0.7*CLHEP::mm); + GeoTrf::Transform3D OD_Move14= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm, 0.7*CLHEP::mm); GeoShapeShift * mowe14 = new GeoShapeShift(OD_Tisemi09,OD_Move14); GeoShapeUnion * OD_Tisemi14 = new GeoShapeUnion(OD_Tisemi02, mowe14); - HepGeom::Transform3D OD_Move15= HepGeom::Translate3D(0*CLHEP::mm, 0*CLHEP::mm,-0.7*CLHEP::mm); + GeoTrf::Transform3D OD_Move15= GeoTrf::Translate3D(0*CLHEP::mm, 0*CLHEP::mm,-0.7*CLHEP::mm); GeoShapeShift * mowe15 = new GeoShapeShift(OD_Tisemi12,OD_Move15); GeoShapeUnion * OD_Tisemi15 = new GeoShapeUnion(OD_Tisemi14, mowe15); - HepGeom::Transform3D OD_Move16 = HepGeom::Translate3D(0, -19.15*CLHEP::mm, 0); + GeoTrf::Transform3D OD_Move16 = GeoTrf::Translate3D(0, -19.15*CLHEP::mm, 0); GeoShapeShift * mowe16 = new GeoShapeShift(OD_Tibox3, OD_Move16); GeoShapeSubtraction * shapeOD_TiPlate = new GeoShapeSubtraction(OD_Tisemi15, mowe16); @@ -1178,19 +1178,19 @@ void ALFA_DetectorFactory::ConstructODFiberCladdings(const eRPotName eRPName, Ge GeoBox* OD_Cladbox3 = new GeoBox(30*CLHEP::mm,50*CLHEP::mm,1*CLHEP::mm); GeoBox* OD_Cladbox4 = new GeoBox(50*CLHEP::mm,30*CLHEP::mm,1*CLHEP::mm); - HepGeom::Transform3D OD_CladMove1 = HepGeom::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D OD_CladMove1 = GeoTrf::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe1 = new GeoShapeShift(OD_Cladbox3, OD_CladMove1); GeoShapeSubtraction * OD_Cladsemi1 = new GeoShapeSubtraction(OD_Cladtube1, mowe1); - HepGeom::Transform3D OD_CladMove2 = HepGeom::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D OD_CladMove2 = GeoTrf::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe2 = new GeoShapeShift(OD_Cladbox4, OD_CladMove2); GeoShapeSubtraction * OD_Cladsemi2 = new GeoShapeSubtraction(OD_Cladsemi1, mowe2); - HepGeom::Transform3D OD_CladMov3= HepGeom::Translate3D(4*CLHEP::mm, -26.25*CLHEP::mm, 0); + GeoTrf::Transform3D OD_CladMov3= GeoTrf::Translate3D(4*CLHEP::mm, -26.25*CLHEP::mm, 0); GeoShapeShift * mowe3 = new GeoShapeShift(OD_Cladbox1, OD_CladMov3); GeoShapeUnion * OD_Cladsemi3 = new GeoShapeUnion(OD_Cladsemi2, mowe3); - HepGeom::Transform3D OD_CladMov4= HepGeom::Translate3D(-26.25*CLHEP::mm, 15*CLHEP::mm, 0); + GeoTrf::Transform3D OD_CladMov4= GeoTrf::Translate3D(-26.25*CLHEP::mm, 15*CLHEP::mm, 0); GeoShapeShift * mowe4 = new GeoShapeShift(OD_Cladbox2, OD_CladMov4); GeoShapeUnion * shapeOD_Cladding = new GeoShapeUnion(OD_Cladsemi3, mowe4); @@ -1213,7 +1213,7 @@ void ALFA_DetectorFactory::ConstructODFiberCladdings(const eRPotName eRPName, Ge ConstructODFibers00(eRPName, i, EFT_ODFIBERU0, physOD_CladdingU_0, MotherTransform, TransODCladdingU0); pPhysMotherVolume->add(pDetTransform); - pPhysMotherVolume->add(new GeoTransform(TransODCladdingU0)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODCladdingU0))); sprintf(szLabel,"physODclad[%d][0][%d]",eRPName,i); pPhysMotherVolume->add(new GeoNameTag(szLabel)); pPhysMotherVolume->add(physOD_CladdingU_0); @@ -1224,7 +1224,7 @@ void ALFA_DetectorFactory::ConstructODFiberCladdings(const eRPotName eRPName, Ge ConstructODFibers01(eRPName, i, EFT_ODFIBERU1, physOD_CladdingU_1, MotherTransform, TransODCladdingU1); pPhysMotherVolume->add(pDetTransform); - pPhysMotherVolume->add(new GeoTransform(TransODCladdingU1)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODCladdingU1))); sprintf(szLabel,"physODclad[%d][1][%d]",eRPName,i); pPhysMotherVolume->add(new GeoNameTag(szLabel)); pPhysMotherVolume->add(physOD_CladdingU_1); @@ -1235,7 +1235,7 @@ void ALFA_DetectorFactory::ConstructODFiberCladdings(const eRPotName eRPName, Ge ConstructODFibers00(eRPName, i, EFT_ODFIBERV0, physOD_CladdingV_0, MotherTransform, TransODCladdingV0); pPhysMotherVolume->add(pDetTransform); - pPhysMotherVolume->add(new GeoTransform(TransODCladdingV0)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODCladdingV0))); sprintf(szLabel,"physODclad[%d][2][%d]",eRPName,i); pPhysMotherVolume->add(new GeoNameTag(szLabel)); pPhysMotherVolume->add(physOD_CladdingV_0); @@ -1246,7 +1246,7 @@ void ALFA_DetectorFactory::ConstructODFiberCladdings(const eRPotName eRPName, Ge ConstructODFibers01(eRPName, i, EFT_ODFIBERV1, physOD_CladdingV_1, MotherTransform, TransODCladdingV1); pPhysMotherVolume->add(pDetTransform); - pPhysMotherVolume->add(new GeoTransform(TransODCladdingV1)); + pPhysMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODCladdingV1))); sprintf(szLabel,"physODclad[%d][3][%d]",eRPName,i); pPhysMotherVolume->add(new GeoNameTag(szLabel)); pPhysMotherVolume->add(physOD_CladdingV_1); @@ -1269,15 +1269,15 @@ void ALFA_DetectorFactory::ConstructODFibers00(const eRPotName eRPName, const in for(i=0; i<OD_Nb_Fibers; i++){ GeoTube* OD_Fibertube1 = new GeoTube((29.51-0.5*i)*CLHEP::mm,(29.99-0.5*i)*CLHEP::mm,0.24*CLHEP::mm); - HepGeom::Transform3D OD_FiberMove1 = HepGeom::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D OD_FiberMove1 = GeoTrf::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe1 = new GeoShapeShift(OD_Fiberbox3, OD_FiberMove1); GeoShapeSubtraction * OD_Fibersemi1 = new GeoShapeSubtraction(OD_Fibertube1, mowe1); - HepGeom::Transform3D OD_FiberMove2 = HepGeom::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D OD_FiberMove2 = GeoTrf::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe2 = new GeoShapeShift(OD_Fiberbox4, OD_FiberMove2); GeoShapeSubtraction * OD_Fibersemi2 = new GeoShapeSubtraction(OD_Fibersemi1, mowe2); - HepGeom::Transform3D OD_FiberMov4= HepGeom::Translate3D((-29.75+0.5*i)*CLHEP::mm, 15*CLHEP::mm, 0); + GeoTrf::Transform3D OD_FiberMov4= GeoTrf::Translate3D((-29.75+0.5*i)*CLHEP::mm, 15*CLHEP::mm, 0); GeoShapeShift * mowe4 = new GeoShapeShift(OD_Fiberbox2, OD_FiberMov4); GeoShapeUnion * shapeOD_Fiber = new GeoShapeUnion(OD_Fibersemi2, mowe4); @@ -1304,7 +1304,7 @@ void ALFA_DetectorFactory::ConstructODFibers00(const eRPotName eRPName, const in //ODFiber00Active - physical volumes GeoPhysVol* physOD_FiberActive = new GeoPhysVol(logOD_FiberActive); - pMotherVolume->add(new GeoTransform(TransODFiber)); + pMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODFiber))); pMotherVolume->add(new GeoNameTag(szLabel)); pMotherVolume->add(physOD_FiberActive); @@ -1355,7 +1355,7 @@ void ALFA_DetectorFactory::ConstructODFibers00(const eRPotName eRPName, const in if (eFType==EFT_ODFIBERU0) sprintf(szLabel,"ODFiberU0[%d][%d][%d]",eRPName,iODPlate+1,i+1); else if (eFType==EFT_ODFIBERV0) sprintf(szLabel,"ODFiberV0[%d][%d][%d]",eRPName,iODPlate+1,i+1); GeoPhysVol* physOD_Fiber = new GeoPhysVol(logOD_Fiber); - pMotherVolume->add(new GeoTransform(HepGeom::Translate3D(0*CLHEP::mm,0*CLHEP::mm,0*CLHEP::mm))); + pMotherVolume->add(new GeoTransform(GeoTrf::Translate3D(0*CLHEP::mm,0*CLHEP::mm,0*CLHEP::mm))); pMotherVolume->add(new GeoNameTag(szLabel)); pMotherVolume->add(physOD_Fiber); } @@ -1375,15 +1375,15 @@ void ALFA_DetectorFactory::ConstructODFibers01(const eRPotName eRPName, const in for(i=0; i<OD_Nb_Fibers; i++){ GeoTube* OD_Fibertube1 = new GeoTube((22.51+0.5*i)*CLHEP::mm,(22.99+0.5*i)*CLHEP::mm,0.24*CLHEP::mm); - HepGeom::Transform3D OD_FiberMove1 = HepGeom::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D OD_FiberMove1 = GeoTrf::Translate3D(30*CLHEP::mm, 0*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe1 = new GeoShapeShift(OD_Fiberbox3, OD_FiberMove1); GeoShapeSubtraction * OD_Fibersemi1 = new GeoShapeSubtraction(OD_Fibertube1, mowe1); - HepGeom::Transform3D OD_FiberMove2 = HepGeom::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm); + GeoTrf::Transform3D OD_FiberMove2 = GeoTrf::Translate3D(0*CLHEP::mm, 30*CLHEP::mm, 0*CLHEP::mm); GeoShapeShift * mowe2 = new GeoShapeShift(OD_Fiberbox4, OD_FiberMove2); GeoShapeSubtraction * OD_Fibersemi2 = new GeoShapeSubtraction(OD_Fibersemi1, mowe2); - HepGeom::Transform3D OD_FiberMov4= HepGeom::Translate3D((-22.75-0.5*i)*CLHEP::mm, 15*CLHEP::mm, 0); + GeoTrf::Transform3D OD_FiberMov4= GeoTrf::Translate3D((-22.75-0.5*i)*CLHEP::mm, 15*CLHEP::mm, 0); GeoShapeShift * mowe4 = new GeoShapeShift(OD_Fiberbox2, OD_FiberMov4); GeoShapeUnion * shapeOD_Fiber = new GeoShapeUnion(OD_Fibersemi2, mowe4); @@ -1418,7 +1418,7 @@ void ALFA_DetectorFactory::ConstructODFibers01(const eRPotName eRPName, const in //ODFiber01Active - physical volumes GeoPhysVol* physOD_FiberActive = new GeoPhysVol(logOD_FiberActive); - pMotherVolume->add(new GeoTransform(TransODFiber)); + pMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransODFiber))); pMotherVolume->add(new GeoNameTag(szLabel)); pMotherVolume->add(physOD_FiberActive); @@ -1445,7 +1445,7 @@ void ALFA_DetectorFactory::ConstructODFibers01(const eRPotName eRPName, const in if (eFType==EFT_ODFIBERU1) sprintf(szLabel,"ODFiberU1[%d][%d][%d]",eRPName,iODPlate+1,i+1); else if (eFType==EFT_ODFIBERV1) sprintf(szLabel,"ODFiberV1[%d][%d][%d]",eRPName,iODPlate+1,i+1); GeoPhysVol* physOD_Fiber = new GeoPhysVol(logOD_Fiber); - pMotherVolume->add(new GeoTransform(HepGeom::Translate3D(0*CLHEP::mm,0*CLHEP::mm,0*CLHEP::mm))); + pMotherVolume->add(new GeoTransform(GeoTrf::Translate3D(0*CLHEP::mm,0*CLHEP::mm,0*CLHEP::mm))); pMotherVolume->add(new GeoNameTag(szLabel)); pMotherVolume->add(physOD_Fiber); } @@ -1493,7 +1493,7 @@ void ALFA_DetectorFactory::ConstructUFiberCladdings(const eRPotName eRPName, Geo //G4RotationMatrix* Clad_Rot1 = new G4RotationMatrix; //Clad_Rot1 -> rotateZ(-45*CLHEP::deg); //G4ThreeVector Clad_Move1(-17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm); - HepGeom::Transform3D Clad_Move1=HepGeom::Translate3D(-17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(-45*CLHEP::deg); + GeoTrf::Transform3D Clad_Move1=GeoTrf::Translate3D(-17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg); mowe1=new GeoShapeShift(ALFA_Cladbox2,Clad_Move1); shapeALFA_Clad = new GeoShapeSubtraction(ALFA_Cladbox1,mowe1); @@ -1505,7 +1505,7 @@ void ALFA_DetectorFactory::ConstructUFiberCladdings(const eRPotName eRPName, Geo physALFA_CladdingU[i] = new GeoFullPhysVol(pLogCladdingU); pMotherVolume->add(new GeoNameTag(strLabel)); pMotherVolume->add(pDetTransform); - pMotherVolume->add(new GeoTransform(TransCladdingU[i])); + pMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransCladdingU[i]))); pMotherVolume->add(physALFA_CladdingU[i]); /* @@ -1545,7 +1545,7 @@ void ALFA_DetectorFactory::ConstructUFiberCladdings(const eRPotName eRPName, Geo double fAngle=m_pGeoReader->GetUFiberAngle(eRPName, i+1, j+1); double fDx=fXPos-(+15.75-0.5*(j))*CLHEP::mm; - HepGeom::Transform3D TrimMove=HepGeom::Translate3D((-33.165+0.5*j)*CLHEP::mm-fDx, -17.415*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(+45.0*CLHEP::deg); //bug fix 23.2.2010 + GeoTrf::Transform3D TrimMove=GeoTrf::Translate3D((-33.165+0.5*j)*CLHEP::mm-fDx, -17.415*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(+45.0*CLHEP::deg); //bug fix 23.2.2010 const GeoShapeShift* Sh6=new GeoShapeShift(CladTrim,TrimMove); const GeoShapeSubtraction* solFibU=new GeoShapeSubtraction(Fib1,Sh6); sprintf(strLabel,"logALFA_FiberU[%d]",j+1); @@ -1555,7 +1555,7 @@ void ALFA_DetectorFactory::ConstructUFiberCladdings(const eRPotName eRPName, Geo TransFiber=HepGeom::Translate3D(fXPos, 0*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(-fAngle); physiFibU=new GeoFullPhysVol(logALFA_FiberU); physALFA_CladdingU[i]->add(new GeoNameTag(strLabel)); - physALFA_CladdingU[i]->add(new GeoTransform(TransFiber)); + physALFA_CladdingU[i]->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransFiber))); physALFA_CladdingU[i]->add(physiFibU); //set translation vector of the fiber with respect to the main reference point @@ -1604,7 +1604,7 @@ void ALFA_DetectorFactory::ConstructVFiberCladdings(const eRPotName eRPName, Geo //G4RotationMatrix* Clad_Rot1 = new G4RotationMatrix; //Clad_Rot1 -> rotateZ(-45*CLHEP::deg); //G4ThreeVector Clad_Move1(-17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm); - HepGeom::Transform3D Clad_Move1=HepGeom::Translate3D(+17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(-45*CLHEP::deg); + GeoTrf::Transform3D Clad_Move1=GeoTrf::Translate3D(+17.415*CLHEP::mm, -17.415*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(-45*CLHEP::deg); mowe1=new GeoShapeShift(ALFA_Cladbox2,Clad_Move1); shapeALFA_Clad = new GeoShapeSubtraction(ALFA_Cladbox1,mowe1); @@ -1616,7 +1616,7 @@ void ALFA_DetectorFactory::ConstructVFiberCladdings(const eRPotName eRPName, Geo physALFA_CladdingV[i] = new GeoFullPhysVol(pLogCladdingV); pMotherVolume->add(new GeoNameTag(strLabel)); pMotherVolume->add(pDetTransform); - pMotherVolume->add(new GeoTransform(TransCladdingV[i])); + pMotherVolume->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransCladdingV[i]))); pMotherVolume->add(physALFA_CladdingV[i]); } @@ -1647,7 +1647,7 @@ void ALFA_DetectorFactory::ConstructVFiberCladdings(const eRPotName eRPName, Geo double fAngle=m_pGeoReader->GetVFiberAngle(eRPName, i+1, j+1); double fDx=fXPos-(+15.75-0.5*(j))*CLHEP::mm; - HepGeom::Transform3D TrimMove=HepGeom::Translate3D((1.665+0.5*j)*CLHEP::mm-fDx, -17.415*CLHEP::mm, 0*CLHEP::mm)*HepGeom::RotateZ3D(+45.0*CLHEP::deg); + GeoTrf::Transform3D TrimMove=GeoTrf::Translate3D((1.665+0.5*j)*CLHEP::mm-fDx, -17.415*CLHEP::mm, 0*CLHEP::mm)*GeoTrf::RotateZ3D(+45.0*CLHEP::deg); const GeoShapeShift* Sh6=new GeoShapeShift(CladTrim,TrimMove); const GeoShapeSubtraction* solFibV=new GeoShapeSubtraction(Fib1,Sh6); sprintf(strLabel,"logALFA_FiberV[%d]",j+1); @@ -1658,7 +1658,7 @@ void ALFA_DetectorFactory::ConstructVFiberCladdings(const eRPotName eRPName, Geo physiFibV=new GeoFullPhysVol(logALFA_FiberV); physALFA_CladdingV[i]->add(new GeoNameTag(strLabel)); - physALFA_CladdingV[i]->add(new GeoTransform(TransFiber)); + physALFA_CladdingV[i]->add(new GeoTransform(Amg::CLHEPTransformToEigen(TransFiber))); physALFA_CladdingV[i]->add(physiFibV); //set translation vector of the fiber with respect to the main reference point @@ -1947,7 +1947,7 @@ void ALFA_DetectorFactory::UpdateTransforms(PALIGNPARAMETERS pAlignParams) if(sc==StatusCode::SUCCESS){ pAlTrans=pAlignX->getAlignX(); //pAlTrans->setDelta(RPosParams.RPSWTransformInStation); - pAlTrans->setDelta(RPosParams.RPTransformInStation); + pAlTrans->setDelta(Amg::CLHEPTransformToEigen(RPosParams.RPTransformInStation)); } sprintf(szLabel,"AlTransDetInRPMainPoint[%02d]",eRPName); @@ -1955,7 +1955,7 @@ void ALFA_DetectorFactory::UpdateTransforms(PALIGNPARAMETERS pAlignParams) if(sc==StatusCode::SUCCESS){ pAlTrans=pAlignX->getAlignX(); //pAlTrans->setDelta(RPosParams.DetSWTransformInMainPoint); - pAlTrans->setDelta(RPosParams.DetTransformInMainPoint); + pAlTrans->setDelta(Amg::CLHEPTransformToEigen(RPosParams.DetTransformInMainPoint)); } } diff --git a/ForwardDetectors/ALFA/ALFA_GeoModel/src/ALFA_DetectorTool.cxx b/ForwardDetectors/ALFA/ALFA_GeoModel/src/ALFA_DetectorTool.cxx index a43313394d4..dc4c44db524 100755 --- a/ForwardDetectors/ALFA/ALFA_GeoModel/src/ALFA_DetectorTool.cxx +++ b/ForwardDetectors/ALFA/ALFA_GeoModel/src/ALFA_DetectorTool.cxx @@ -244,9 +244,9 @@ StatusCode ALFA_DetectorTool::align(IOVSVC_CALLBACK_ARGS) sc=detStore()->retrieve(pStPhysRPBox,"StRPBox[03]"); if(sc.isSuccess()){ const GeoFullPhysVol* pPhysRPBox=pStPhysRPBox->getPhysVol(); - const HepGeom::Transform3D& xf= pPhysRPBox->getAbsoluteTransform(); + const GeoTrf::Transform3D& xf= pPhysRPBox->getAbsoluteTransform(); - msg(MSG::INFO) << "Translation of RPBOX: "<< xf.getTranslation() << endmsg; + msg(MSG::INFO) << "Translation of RPBOX: "<< xf.translation() << endmsg; } if(detStore()->retrieve(listAttrColl,COOLFOLDER_DETSWCORR )==StatusCode::SUCCESS){ @@ -263,8 +263,8 @@ StatusCode ALFA_DetectorTool::align(IOVSVC_CALLBACK_ARGS) sc=detStore()->retrieve(pStPhysRPBox,"StRPBox[03]"); if(sc.isSuccess()){ const GeoFullPhysVol* pPhysRPBox=pStPhysRPBox->getPhysVol(); - const HepGeom::Transform3D& xf= pPhysRPBox->getAbsoluteTransform(); - msg(MSG::INFO) << "Translation of RPBOX after update: "<< xf.getTranslation() << endmsg; + const GeoTrf::Transform3D& xf= pPhysRPBox->getAbsoluteTransform(); + msg(MSG::INFO) << "Translation of RPBOX after update: "<< xf.translation() << endmsg; } } else{ diff --git a/ForwardDetectors/ALFA/ALFA_Geometry/ALFA_Geometry/ALFA_Config.h b/ForwardDetectors/ALFA/ALFA_Geometry/ALFA_Geometry/ALFA_Config.h index 4edf51634d3..a1f3a153b36 100644 --- a/ForwardDetectors/ALFA/ALFA_Geometry/ALFA_Geometry/ALFA_Config.h +++ b/ForwardDetectors/ALFA/ALFA_Geometry/ALFA_Geometry/ALFA_Config.h @@ -9,7 +9,6 @@ #include "ALFA_constants.h" #include "CLHEP/Geometry/Point3D.h" -#include "GeoModelKernel/GeoTransform.h" #include <list> #include <map> diff --git a/ForwardDetectors/ALFA/ALFA_Geometry/ALFA_Geometry/ALFA_GeometryReader.h b/ForwardDetectors/ALFA/ALFA_Geometry/ALFA_Geometry/ALFA_GeometryReader.h index 7405dcdc31f..9f1aa48b810 100644 --- a/ForwardDetectors/ALFA/ALFA_Geometry/ALFA_Geometry/ALFA_GeometryReader.h +++ b/ForwardDetectors/ALFA/ALFA_Geometry/ALFA_Geometry/ALFA_GeometryReader.h @@ -8,8 +8,8 @@ #include "ALFA_constants.h" +#include "CLHEP/Geometry/Transform3D.h" #include "CLHEP/Geometry/Point3D.h" -#include "GeoModelKernel/GeoTransform.h" #include "AthenaKernel/CLASS_DEF.h" #include "ALFA_Geometry/ALFA_ConfigParams.h" diff --git a/ForwardDetectors/ALFA/ALFA_Geometry/CMakeLists.txt b/ForwardDetectors/ALFA/ALFA_Geometry/CMakeLists.txt index 3910308730c..7a8854b5553 100644 --- a/ForwardDetectors/ALFA/ALFA_Geometry/CMakeLists.txt +++ b/ForwardDetectors/ALFA/ALFA_Geometry/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel PRIVATE Control/StoreGate @@ -27,7 +26,7 @@ atlas_add_library( ALFA_Geometry PUBLIC_HEADERS ALFA_Geometry INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GaudiKernel StoreGateLib SGtests + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GaudiKernel StoreGateLib SGtests PRIVATE_LINK_LIBRARIES PathResolver ) # Install files from the package: diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/CMakeLists.txt b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/CMakeLists.txt index 2027c917822..3d637b720bf 100644 --- a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/CMakeLists.txt +++ b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( ForwardRegionGeoModel ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities GaudiKernel PRIVATE @@ -18,6 +17,8 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( CLHEP ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( ForwardRegionGeoModelLib @@ -25,13 +26,13 @@ atlas_add_library( ForwardRegionGeoModelLib PUBLIC_HEADERS ForwardRegionGeoModel INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel StoreGateLib SGtests + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel StoreGateLib SGtests PRIVATE_LINK_LIBRARIES PathResolver ) atlas_add_component( ForwardRegionGeoModel src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelKernel GeoModelUtilities GaudiKernel StoreGateLib SGtests PathResolver ForwardRegionGeoModelLib ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities GaudiKernel StoreGateLib SGtests PathResolver ForwardRegionGeoModelLib ) # Install files from the package: atlas_install_runtime( share/*.csv ) diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelElements.cxx b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelElements.cxx index 4f292748a96..2e884a193a8 100644 --- a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelElements.cxx +++ b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelElements.cxx @@ -17,20 +17,20 @@ #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" GeoPhysVol* ForwardRegionGeoModelFactory::insertMagnetEnvelope(std::string name, double x, double y, double z, double rotationAngle, double diameter, double halfL, double dL, GeoPhysVol* fwrPhys) { const GeoTube *tube = new GeoTube(0, diameter/2, halfL-dL); - HepGeom::Transform3D shift = HepGeom::Translate3D(x,y,z); - HepGeom::Transform3D rotate = HepGeom::RotateY3D(rotationAngle); -// HepGeom::Transform3D rotateX180 = HepGeom::RotateX3D(180*CLHEP::deg); + GeoTrf::Transform3D shift = GeoTrf::Translate3D(x,y,z); + GeoTrf::Transform3D rotate = GeoTrf::RotateY3D(rotationAngle); +// Transform3D rotateX180 = GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg); const GeoShapeShift& magTube0 = (*tube)<<rotate<<shift; // const GeoShapeUnion& magTube = magTube0.add((*tube)<<rotate<<shift<<rotateX180); @@ -49,7 +49,7 @@ GeoPhysVol* ForwardRegionGeoModelFactory::insertMagnetEnvelope(std::string name, void ForwardRegionGeoModelFactory::insertCircularElement(std::string name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol* fwrPhys) { - double r0 = std::max(xAperture,yAperture)*CLHEP::mm/2; + double r0 = std::max(xAperture,yAperture)*GeoModelKernelUnits::mm/2; const GeoTube *ringTube = new GeoTube(r0, r0+tubeThickness, halfL-dL); @@ -58,9 +58,9 @@ void ForwardRegionGeoModelFactory::insertCircularElement(std::string name, doubl GeoPhysVol *ringPhys = new GeoPhysVol(ringLog); //create rotation and traslation and add them to the tree of volumes of the world (move and rotate the volume) - GeoTransform *move = new GeoTransform(HepGeom::Translate3D(x,y,z)); + GeoTransform *move = new GeoTransform(GeoTrf::Translate3D(x,y,z)); fwrPhys->add(move); - GeoTransform *rotate = new GeoTransform(HepGeom::RotateY3D(rotationAngle)); + GeoTransform *rotate = new GeoTransform(GeoTrf::RotateY3D(rotationAngle)); fwrPhys->add(rotate); GeoNameTag *tag = new GeoNameTag(name); @@ -69,7 +69,7 @@ void ForwardRegionGeoModelFactory::insertCircularElement(std::string name, doubl fwrPhys->add(ringPhys); // // The other side of the forward region may be obtained by rotation -// GeoTransform *rotateX180 = new GeoTransform(HepGeom::RotateX3D(180*CLHEP::deg)); +// GeoTransform *rotateX180 = new GeoTransform(GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)); // // the other side // fwrPhys->add(rotateX180); @@ -87,12 +87,12 @@ void ForwardRegionGeoModelFactory::insertEllipticalElement(std::string name, dou // GeoEllipticalTube causes VP1 to fall, so for visualization GeoBox is used if(!m_Config.vp1Compatibility) { - ringTube0 = new GeoEllipticalTube(xAperture*CLHEP::mm/2+tubeThickness, yAperture*CLHEP::mm/2+tubeThickness, halfL-dL); - ringTube2 = new GeoEllipticalTube(xAperture*CLHEP::mm/2, yAperture*CLHEP::mm/2, halfL-dL); + ringTube0 = new GeoEllipticalTube(xAperture*GeoModelKernelUnits::mm/2+tubeThickness, yAperture*GeoModelKernelUnits::mm/2+tubeThickness, halfL-dL); + ringTube2 = new GeoEllipticalTube(xAperture*GeoModelKernelUnits::mm/2, yAperture*GeoModelKernelUnits::mm/2, halfL-dL); } else { - ringTube0 = new GeoBox(xAperture*CLHEP::mm/2+tubeThickness, yAperture*CLHEP::mm/2+tubeThickness, halfL-dL); - ringTube2 = new GeoBox(xAperture*CLHEP::mm/2, yAperture*CLHEP::mm/2, halfL-dL); + ringTube0 = new GeoBox(xAperture*GeoModelKernelUnits::mm/2+tubeThickness, yAperture*GeoModelKernelUnits::mm/2+tubeThickness, halfL-dL); + ringTube2 = new GeoBox(xAperture*GeoModelKernelUnits::mm/2, yAperture*GeoModelKernelUnits::mm/2, halfL-dL); } GeoShapeSubtraction * ringTube = new GeoShapeSubtraction(ringTube0, ringTube2); @@ -101,9 +101,9 @@ void ForwardRegionGeoModelFactory::insertEllipticalElement(std::string name, dou GeoPhysVol *ringPhys = new GeoPhysVol(ringLog); //create rotation and traslation and add them to the tree of volumes of the world (move and rotate the volume) - GeoTransform *move = new GeoTransform(HepGeom::Translate3D(x,y,z)); + GeoTransform *move = new GeoTransform(GeoTrf::Translate3D(x,y,z)); fwrPhys->add(move); - GeoTransform *rotate = new GeoTransform(HepGeom::RotateY3D(rotationAngle)); + GeoTransform *rotate = new GeoTransform(GeoTrf::RotateY3D(rotationAngle)); fwrPhys->add(rotate); GeoNameTag *tag = new GeoNameTag(name); @@ -112,7 +112,7 @@ void ForwardRegionGeoModelFactory::insertEllipticalElement(std::string name, dou fwrPhys->add(ringPhys); // // The other side of the forward region may be obtained by rotation -// GeoTransform *rotateX180 = new GeoTransform(HepGeom::RotateX3D(180*CLHEP::deg)); +// GeoTransform *rotateX180 = new GeoTransform(GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)); // // the other side // fwrPhys->add(rotateX180); @@ -125,22 +125,22 @@ void ForwardRegionGeoModelFactory::insertEllipticalElement(std::string name, dou void ForwardRegionGeoModelFactory::insertXRecticircularElement(std::string name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol* fwrPhys) { - double beamScreenSeparation = 1.5*CLHEP::mm; - double beamScreenCuThick = 0.05*CLHEP::mm; - double beamScreenSteelThick = 1*CLHEP::mm; + double beamScreenSeparation = 1.5*GeoModelKernelUnits::mm; + double beamScreenCuThick = 0.05*GeoModelKernelUnits::mm; + double beamScreenSteelThick = 1*GeoModelKernelUnits::mm; - const GeoTube *ringTube = new GeoTube(yAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick+beamScreenSeparation, yAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick+beamScreenSeparation+tubeThickness, halfL-dL); - const GeoTube *circ = new GeoTube(0, yAperture*CLHEP::mm/2, halfL-dL); - const GeoBox *rect = new GeoBox(xAperture*CLHEP::mm/2, yAperture*CLHEP::mm/2, halfL-dL); + const GeoTube *ringTube = new GeoTube(yAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick+beamScreenSeparation, yAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick+beamScreenSeparation+tubeThickness, halfL-dL); + const GeoTube *circ = new GeoTube(0, yAperture*GeoModelKernelUnits::mm/2, halfL-dL); + const GeoBox *rect = new GeoBox(xAperture*GeoModelKernelUnits::mm/2, yAperture*GeoModelKernelUnits::mm/2, halfL-dL); GeoShapeIntersection *innerVac = new GeoShapeIntersection(rect,circ); - const GeoTube *circ2 = new GeoTube(0, yAperture*CLHEP::mm/2+beamScreenCuThick, halfL-dL); - const GeoBox *rect2 = new GeoBox(xAperture*CLHEP::mm/2+beamScreenCuThick, yAperture*CLHEP::mm/2+beamScreenCuThick, halfL-dL); + const GeoTube *circ2 = new GeoTube(0, yAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick, halfL-dL); + const GeoBox *rect2 = new GeoBox(xAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick, yAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick, halfL-dL); GeoShapeIntersection *beamScreenCu0 = new GeoShapeIntersection(rect2,circ2); GeoShapeSubtraction *beamScreenCu = new GeoShapeSubtraction(beamScreenCu0, innerVac); - const GeoTube *circ3 = new GeoTube(0, yAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick, halfL-dL); - const GeoBox *rect3 = new GeoBox(xAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick, yAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick, halfL-dL); + const GeoTube *circ3 = new GeoTube(0, yAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick, halfL-dL); + const GeoBox *rect3 = new GeoBox(xAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick, yAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick, halfL-dL); GeoShapeIntersection *beamScreenSteel01 = new GeoShapeIntersection(rect3,circ3); GeoShapeSubtraction *beamScreenSteel02 = new GeoShapeSubtraction(beamScreenSteel01, innerVac); GeoShapeSubtraction *beamScreenSteel = new GeoShapeSubtraction(beamScreenSteel02, beamScreenCu); @@ -154,9 +154,9 @@ void ForwardRegionGeoModelFactory::insertXRecticircularElement(std::string name, GeoPhysVol *ringPhysSteel = new GeoPhysVol(ringLogSteel); //create rotation and traslation and add them to the tree of volumes of the world (move and rotate the volume) - GeoTransform *move = new GeoTransform(HepGeom::Translate3D(x,y,z)); + GeoTransform *move = new GeoTransform(GeoTrf::Translate3D(x,y,z)); fwrPhys->add(move); - GeoTransform *rotate = new GeoTransform(HepGeom::RotateY3D(rotationAngle)); + GeoTransform *rotate = new GeoTransform(GeoTrf::RotateY3D(rotationAngle)); fwrPhys->add(rotate); GeoNameTag *tag = new GeoNameTag(name+"BeamPipe"); @@ -179,7 +179,7 @@ void ForwardRegionGeoModelFactory::insertXRecticircularElement(std::string name, // // The other side of the forward region may be obtain by rotation -// GeoTransform *rotateX180 = new GeoTransform(HepGeom::RotateX3D(180*CLHEP::deg)); +// GeoTransform *rotateX180 = new GeoTransform(GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)); // // the other side // fwrPhys->add(rotateX180); @@ -206,22 +206,22 @@ void ForwardRegionGeoModelFactory::insertXRecticircularElement(std::string name, void ForwardRegionGeoModelFactory::insertYRecticircularElement(std::string name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol* fwrPhys) { - double beamScreenSeparation = 1.5*CLHEP::mm; - double beamScreenCuThick = 0.05*CLHEP::mm; - double beamScreenSteelThick = 1*CLHEP::mm; + double beamScreenSeparation = 1.5*GeoModelKernelUnits::mm; + double beamScreenCuThick = 0.05*GeoModelKernelUnits::mm; + double beamScreenSteelThick = 1*GeoModelKernelUnits::mm; - const GeoTube *ringTube = new GeoTube(xAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick+beamScreenSeparation, xAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick+beamScreenSeparation+tubeThickness, halfL-dL); - const GeoTube *circ = new GeoTube(0, xAperture*CLHEP::mm/2, halfL-dL); - const GeoBox *rect = new GeoBox(xAperture*CLHEP::mm/2, yAperture*CLHEP::mm/2, halfL-dL); + const GeoTube *ringTube = new GeoTube(xAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick+beamScreenSeparation, xAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick+beamScreenSeparation+tubeThickness, halfL-dL); + const GeoTube *circ = new GeoTube(0, xAperture*GeoModelKernelUnits::mm/2, halfL-dL); + const GeoBox *rect = new GeoBox(xAperture*GeoModelKernelUnits::mm/2, yAperture*GeoModelKernelUnits::mm/2, halfL-dL); GeoShapeIntersection *innerVac = new GeoShapeIntersection(rect,circ); - const GeoTube *circ2 = new GeoTube(0, xAperture*CLHEP::mm/2+beamScreenCuThick, halfL-dL); - const GeoBox *rect2 = new GeoBox(xAperture*CLHEP::mm/2+beamScreenCuThick, yAperture*CLHEP::mm/2+beamScreenCuThick, halfL-dL); + const GeoTube *circ2 = new GeoTube(0, xAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick, halfL-dL); + const GeoBox *rect2 = new GeoBox(xAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick, yAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick, halfL-dL); GeoShapeIntersection *beamScreenCu0 = new GeoShapeIntersection(rect2,circ2); GeoShapeSubtraction *beamScreenCu = new GeoShapeSubtraction(beamScreenCu0, innerVac); - const GeoTube *circ3 = new GeoTube(0, xAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick, halfL-dL); - const GeoBox *rect3 = new GeoBox(xAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick, yAperture*CLHEP::mm/2+beamScreenCuThick+beamScreenSteelThick, halfL-dL); + const GeoTube *circ3 = new GeoTube(0, xAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick, halfL-dL); + const GeoBox *rect3 = new GeoBox(xAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick, yAperture*GeoModelKernelUnits::mm/2+beamScreenCuThick+beamScreenSteelThick, halfL-dL); GeoShapeIntersection *beamScreenSteel01 = new GeoShapeIntersection(rect3,circ3); GeoShapeSubtraction *beamScreenSteel02 = new GeoShapeSubtraction(beamScreenSteel01, innerVac); GeoShapeSubtraction *beamScreenSteel = new GeoShapeSubtraction(beamScreenSteel02, beamScreenCu); @@ -235,9 +235,9 @@ void ForwardRegionGeoModelFactory::insertYRecticircularElement(std::string name, GeoPhysVol *ringPhysSteel = new GeoPhysVol(ringLogSteel); //create rotation and traslation and add them to the tree of volumes of the world (move and rotate the volume) - GeoTransform *move = new GeoTransform(HepGeom::Translate3D(x,y,z)); + GeoTransform *move = new GeoTransform(GeoTrf::Translate3D(x,y,z)); fwrPhys->add(move); - GeoTransform *rotate = new GeoTransform(HepGeom::RotateY3D(rotationAngle)); + GeoTransform *rotate = new GeoTransform(GeoTrf::RotateY3D(rotationAngle)); fwrPhys->add(rotate); GeoNameTag *tag = new GeoNameTag(name+"BeamPipe"); @@ -258,7 +258,7 @@ void ForwardRegionGeoModelFactory::insertYRecticircularElement(std::string name, fwrPhys->add(ringPhysSteel); // // The other side of the forward region may be obtain by rotation -// GeoTransform *rotateX180 = new GeoTransform(HepGeom::RotateX3D(180*CLHEP::deg)); +// GeoTransform *rotateX180 = new GeoTransform(GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)); // // the other side // fwrPhys->add(rotateX180); @@ -290,13 +290,13 @@ void ForwardRegionGeoModelFactory::insertTrousersElement(std::string name, doubl // CONSTANTS double TAN_A, TAN_B, TAN_C, TAN_Dsmall, TAN_Dbig, TAN_thick1, TAN_xseparation; - TAN_A = 700*CLHEP::mm; - TAN_B = 500*CLHEP::mm; - TAN_C = 3700*CLHEP::mm; - TAN_Dsmall = 52*CLHEP::mm; - TAN_Dbig = 212*CLHEP::mm; - TAN_thick1 = 4.5*CLHEP::mm; - TAN_xseparation = 80*CLHEP::mm; + TAN_A = 700*GeoModelKernelUnits::mm; + TAN_B = 500*GeoModelKernelUnits::mm; + TAN_C = 3700*GeoModelKernelUnits::mm; + TAN_Dsmall = 52*GeoModelKernelUnits::mm; + TAN_Dbig = 212*GeoModelKernelUnits::mm; + TAN_thick1 = 4.5*GeoModelKernelUnits::mm; + TAN_xseparation = 80*GeoModelKernelUnits::mm; // Derived constants double TAN_Rsmall, TAN_Rbig, TAN_coneZh, TAN_coneR, TAN_coneXh;//, TAN_halflength; @@ -310,16 +310,16 @@ void ForwardRegionGeoModelFactory::insertTrousersElement(std::string name, doubl // volume construction // inner part - GeoPcon *TANi_cone0 = new GeoPcon(0,360*CLHEP::deg); + GeoPcon *TANi_cone0 = new GeoPcon(0,360*GeoModelKernelUnits::deg); TANi_cone0->addPlane(2*TAN_coneZh, TAN_Rsmall, 2*TAN_Rbig); TANi_cone0->addPlane(TAN_coneZh, TAN_Rsmall, 2*TAN_Rbig); TANi_cone0->addPlane(-TAN_coneZh, TAN_coneR, 2*TAN_Rbig); - HepGeom::Transform3D TAN_moveCone = HepGeom::Translate3D(TAN_coneXh,0,0.5*(TAN_A-TAN_B)); - HepGeom::Transform3D TAN_rotateCone = HepGeom::RotateY3D(5*CLHEP::deg); + GeoTrf::Transform3D TAN_moveCone = GeoTrf::Translate3D(TAN_coneXh,0,0.5*(TAN_A-TAN_B)); + GeoTrf::Transform3D TAN_rotateCone = GeoTrf::RotateY3D(5*GeoModelKernelUnits::deg); const GeoShapeShift& TANi_cone = (*TANi_cone0)<<TAN_rotateCone<<TAN_moveCone; const GeoBox *TAN_box0 = new GeoBox(2*TAN_Rbig,2*TAN_Rbig,TAN_A+TAN_B); - HepGeom::Transform3D TAN_moveBox = HepGeom::Translate3D(-2*TAN_Rbig,0,0); + GeoTrf::Transform3D TAN_moveBox = GeoTrf::Translate3D(-2*TAN_Rbig,0,0); const GeoShapeShift& TAN_box = (*TAN_box0)<<TAN_moveBox; const GeoTube *TANi_bigtube = new GeoTube(0, TAN_Rbig, 0.5*(TAN_A+TAN_B)); @@ -327,14 +327,14 @@ void ForwardRegionGeoModelFactory::insertTrousersElement(std::string name, doubl GeoShapeSubtraction *TANi_hcyl = new GeoShapeSubtraction(TANi_bigtube, &TAN_box); GeoShapeSubtraction *TANi_h = new GeoShapeSubtraction(TANi_hcyl, &TANi_cone); - HepGeom::Transform3D TAN_moveH = HepGeom::Translate3D(0,0,-0.5*TAN_C); - HepGeom::Transform3D TAN_rotateH = HepGeom::RotateZ3D(180*CLHEP::deg); + GeoTrf::Transform3D TAN_moveH = GeoTrf::Translate3D(0,0,-0.5*TAN_C); + GeoTrf::Transform3D TAN_rotateH = GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg); - HepGeom::Transform3D TAN_moveTube1 = HepGeom::Translate3D(TAN_xseparation,0,0.5*(TAN_A+TAN_B)); - HepGeom::Transform3D TAN_moveTube2 = HepGeom::Translate3D(-TAN_xseparation,0,0.5*(TAN_A+TAN_B)); + GeoTrf::Transform3D TAN_moveTube1 = GeoTrf::Translate3D(TAN_xseparation,0,0.5*(TAN_A+TAN_B)); + GeoTrf::Transform3D TAN_moveTube2 = GeoTrf::Translate3D(-TAN_xseparation,0,0.5*(TAN_A+TAN_B)); // outer part - GeoPcon *TANo_cone0 = new GeoPcon(0,360*CLHEP::deg); + GeoPcon *TANo_cone0 = new GeoPcon(0,360*GeoModelKernelUnits::deg); TANo_cone0->addPlane(2*TAN_coneZh, TAN_Rsmall+TAN_thick1, 2*TAN_Rbig); TANo_cone0->addPlane(TAN_coneZh, TAN_Rsmall+TAN_thick1, 2*TAN_Rbig); TANo_cone0->addPlane(-TAN_coneZh, TAN_coneR+TAN_thick1, 2*TAN_Rbig); @@ -347,7 +347,7 @@ void ForwardRegionGeoModelFactory::insertTrousersElement(std::string name, doubl GeoShapeSubtraction *TANo_h = new GeoShapeSubtraction(TANo_hcyl, &TANo_cone); const GeoTube *TAN_antiblock0 = new GeoTube(0, TAN_Rsmall, 0.5*(TAN_A+2*TAN_B)); // antiblock tube -- just in case.. - HepGeom::Transform3D TAN_moveAntiblock = HepGeom::Translate3D(TAN_xseparation,0,0); + GeoTrf::Transform3D TAN_moveAntiblock = GeoTrf::Translate3D(TAN_xseparation,0,0); const GeoShapeShift& TAN_antiblock = (*TAN_antiblock0)<<TAN_moveAntiblock; GeoShapeSubtraction *TAN_shape0 = new GeoShapeSubtraction(TANo_h, TANi_h); @@ -355,7 +355,7 @@ void ForwardRegionGeoModelFactory::insertTrousersElement(std::string name, doubl const GeoShapeShift& TAN_shape1 = (*TAN_shape)<<TAN_moveH; const GeoShapeShift& TAN_shape2 = (*TAN_shape)<<TAN_moveH<<TAN_rotateH; - const GeoTube *TANo_ftube = new GeoTube(TAN_Rsmall,TAN_Rsmall+TAN_thick1,0.5*TAN_C-0.1*CLHEP::mm); + const GeoTube *TANo_ftube = new GeoTube(TAN_Rsmall,TAN_Rsmall+TAN_thick1,0.5*TAN_C-0.1*GeoModelKernelUnits::mm); const GeoShapeShift& TANo_ftube1 = (*TANo_ftube)<<TAN_moveTube1; const GeoShapeShift& TANo_ftube2 = (*TANo_ftube)<<TAN_moveTube2; @@ -369,9 +369,9 @@ void ForwardRegionGeoModelFactory::insertTrousersElement(std::string name, doubl GeoPhysVol *ringPhys = new GeoPhysVol(ringLog); //create rotation and traslation and add them to the tree of volumes of the world (move and rotate the volume) - GeoTransform *move = new GeoTransform(HepGeom::Translate3D(x,y,z)); + GeoTransform *move = new GeoTransform(GeoTrf::Translate3D(x,y,z)); fwrPhys->add(move); - GeoTransform *rotate = new GeoTransform(HepGeom::RotateY3D(rotationAngle)); + GeoTransform *rotate = new GeoTransform(GeoTrf::RotateY3D(rotationAngle)); fwrPhys->add(rotate); GeoNameTag *tag = new GeoNameTag(name); @@ -380,7 +380,7 @@ void ForwardRegionGeoModelFactory::insertTrousersElement(std::string name, doubl fwrPhys->add(ringPhys); // // The other side of the forward region may be obtained by rotation -// GeoTransform *rotateX180 = new GeoTransform(HepGeom::RotateX3D(180*CLHEP::deg)); +// GeoTransform *rotateX180 = new GeoTransform(GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)); // // the other side // fwrPhys->add(rotateX180); @@ -395,48 +395,48 @@ void ForwardRegionGeoModelFactory::insertTCLElement(std::string name, double x, { // Constants double TCL_BOX_halflength, TCL_BOX_halfwidth, TCL_BOX_halfheight, TCL_BOX_sideThickness, TCL_BOX_topBottomThickness, TCL_BOX_endThickness, TCL_TUBE_halflength, TCL_TUBE_halfapperture, TCL_TUBE_thickness; - TCL_BOX_sideThickness = 6*CLHEP::mm; - TCL_BOX_topBottomThickness = 18*CLHEP::mm; - TCL_BOX_endThickness = 18*CLHEP::mm; + TCL_BOX_sideThickness = 6*GeoModelKernelUnits::mm; + TCL_BOX_topBottomThickness = 18*GeoModelKernelUnits::mm; + TCL_BOX_endThickness = 18*GeoModelKernelUnits::mm; - TCL_BOX_halflength = 621*CLHEP::mm; - TCL_BOX_halfwidth = 132*CLHEP::mm; + TCL_BOX_halflength = 621*GeoModelKernelUnits::mm; + TCL_BOX_halfwidth = 132*GeoModelKernelUnits::mm; TCL_BOX_halfheight = 60+TCL_BOX_topBottomThickness; - TCL_TUBE_halflength = 59.5*CLHEP::mm; - TCL_TUBE_halfapperture = 53*CLHEP::mm; - TCL_TUBE_thickness = 2*CLHEP::mm; + TCL_TUBE_halflength = 59.5*GeoModelKernelUnits::mm; + TCL_TUBE_halfapperture = 53*GeoModelKernelUnits::mm; + TCL_TUBE_thickness = 2*GeoModelKernelUnits::mm; double TCL_CuBlock_halflength, TCL_CuBlock_halfwidth, TCL_CuBlock_halfheight, TCL_CuBlockCylCut_zDepth, TCL_CuBlockCylCut_angle, TCL_CuBlockCylCut_cylR, TCL_CuBlockCylCut_cylHalflength, TCL_CuBlockCylCut_xDepth, TCL_CuBlockCylCut_xShift; - TCL_CuBlock_halflength = 597*CLHEP::mm; - TCL_CuBlock_halfwidth = 14.5*CLHEP::mm; - TCL_CuBlock_halfheight = 40*CLHEP::mm; + TCL_CuBlock_halflength = 597*GeoModelKernelUnits::mm; + TCL_CuBlock_halfwidth = 14.5*GeoModelKernelUnits::mm; + TCL_CuBlock_halfheight = 40*GeoModelKernelUnits::mm; - TCL_CuBlockCylCut_zDepth = 90*CLHEP::mm; - TCL_CuBlockCylCut_angle = 12*CLHEP::deg; - TCL_CuBlockCylCut_cylR = 40*CLHEP::mm; + TCL_CuBlockCylCut_zDepth = 90*GeoModelKernelUnits::mm; + TCL_CuBlockCylCut_angle = 12*GeoModelKernelUnits::deg; + TCL_CuBlockCylCut_cylR = 40*GeoModelKernelUnits::mm; TCL_CuBlockCylCut_cylHalflength = TCL_CuBlockCylCut_zDepth/cos(TCL_CuBlockCylCut_angle); TCL_CuBlockCylCut_xDepth = TCL_CuBlockCylCut_zDepth*tan(TCL_CuBlockCylCut_angle); TCL_CuBlockCylCut_xShift = -TCL_CuBlock_halfwidth-TCL_CuBlockCylCut_cylR/cos(TCL_CuBlockCylCut_angle)+TCL_CuBlockCylCut_xDepth; double TCL_CuBeam_halflength, TCL_CuBeam_halfwidth, TCL_CuBeam_halfheight, TCL_Cooling_width; - TCL_CuBeam_halflength = 530*CLHEP::mm; - TCL_CuBeam_halfwidth = 15*CLHEP::mm; - TCL_CuBeam_halfheight = 40*CLHEP::mm; + TCL_CuBeam_halflength = 530*GeoModelKernelUnits::mm; + TCL_CuBeam_halfwidth = 15*GeoModelKernelUnits::mm; + TCL_CuBeam_halfheight = 40*GeoModelKernelUnits::mm; - TCL_Cooling_width = 9*CLHEP::mm; + TCL_Cooling_width = 9*GeoModelKernelUnits::mm; // rotate by 180 deg around X and Y - HepGeom::Transform3D rotateX180 = HepGeom::RotateX3D(180*CLHEP::deg); - HepGeom::Transform3D rotateY180 = HepGeom::RotateY3D(180*CLHEP::deg); + GeoTrf::Transform3D rotateX180 = GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg); + GeoTrf::Transform3D rotateY180 = GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg); // inner vacuum volume solid const GeoBox * boxIn = new GeoBox(TCL_BOX_halfwidth-TCL_BOX_sideThickness, TCL_BOX_halfheight-TCL_BOX_topBottomThickness, TCL_BOX_halflength-TCL_BOX_endThickness); const GeoTube * tubeIn = new GeoTube(0, TCL_TUBE_halfapperture, TCL_TUBE_halflength+0.5*TCL_BOX_endThickness); - HepGeom::Transform3D moveTubeIn = HepGeom::Translate3D(0, 0, TCL_BOX_halflength+TCL_TUBE_halflength-0.5*TCL_BOX_endThickness); + GeoTrf::Transform3D moveTubeIn = GeoTrf::Translate3D(0, 0, TCL_BOX_halflength+TCL_TUBE_halflength-0.5*TCL_BOX_endThickness); const GeoShapeShift& tubeIn1 = (*tubeIn)<<moveTubeIn; const GeoShapeShift& tubeIn2 = (*tubeIn)<<moveTubeIn<<rotateY180; const GeoShapeUnion * innerVac0 = new GeoShapeUnion(boxIn,&tubeIn1); @@ -445,7 +445,7 @@ void ForwardRegionGeoModelFactory::insertTCLElement(std::string name, double x, // outer steel case solid const GeoBox * boxFull = new GeoBox(TCL_BOX_halfwidth, TCL_BOX_halfheight, TCL_BOX_halflength); const GeoTube * tubeOut = new GeoTube(TCL_TUBE_halfapperture, TCL_TUBE_halfapperture+TCL_TUBE_thickness, TCL_TUBE_halflength); - HepGeom::Transform3D moveTubeOut = HepGeom::Translate3D(0, 0, TCL_BOX_halflength+TCL_TUBE_halflength); + GeoTrf::Transform3D moveTubeOut = GeoTrf::Translate3D(0, 0, TCL_BOX_halflength+TCL_TUBE_halflength); const GeoShapeShift& tubeOut1 = (*tubeOut)<<moveTubeOut; const GeoShapeShift& tubeOut2 = (*tubeOut)<<moveTubeOut<<rotateY180; const GeoShapeUnion * outerSteelFull0 = new GeoShapeUnion(boxFull,&tubeOut1); @@ -455,29 +455,29 @@ void ForwardRegionGeoModelFactory::insertTCLElement(std::string name, double x, // Copper block solid const GeoBox * cuBoxFull = new GeoBox(TCL_CuBlock_halfwidth, TCL_CuBlock_halfheight, TCL_CuBlock_halflength); const GeoTube * cylCut0 = new GeoTube(0, TCL_CuBlockCylCut_cylR, TCL_CuBlockCylCut_cylHalflength); - HepGeom::Transform3D rotateCylCut = HepGeom::RotateY3D(TCL_CuBlockCylCut_angle); - HepGeom::Transform3D moveCylCut = HepGeom::Translate3D(TCL_CuBlockCylCut_xShift, 0, TCL_CuBlock_halflength); + GeoTrf::Transform3D rotateCylCut = GeoTrf::RotateY3D(TCL_CuBlockCylCut_angle); + GeoTrf::Transform3D moveCylCut = GeoTrf::Translate3D(TCL_CuBlockCylCut_xShift, 0, TCL_CuBlock_halflength); const GeoShapeShift& cylCut1 = (*cylCut0)<<rotateCylCut<<moveCylCut; const GeoShapeShift& cylCut2 = (*cylCut0)<<rotateCylCut<<moveCylCut<<rotateX180; const GeoShapeSubtraction * cuBox0 = new GeoShapeSubtraction(cuBoxFull, &cylCut1); const GeoShapeSubtraction * cuBox1 = new GeoShapeSubtraction(cuBox0, &cylCut2); - HepGeom::Transform3D moveCuBoxI = HepGeom::Translate3D(TCLJawDistI+TCL_CuBlock_halfwidth, 0, 0); + GeoTrf::Transform3D moveCuBoxI = GeoTrf::Translate3D(TCLJawDistI+TCL_CuBlock_halfwidth, 0, 0); const GeoShapeShift& cuBoxI = (*cuBox1)<<moveCuBoxI; - HepGeom::Transform3D moveCuBoxO = HepGeom::Translate3D(+TCLJawDistO+TCL_CuBlock_halfwidth, 0, 0); + GeoTrf::Transform3D moveCuBoxO = GeoTrf::Translate3D(+TCLJawDistO+TCL_CuBlock_halfwidth, 0, 0); const GeoShapeShift& cuBoxO = (*cuBox1)<<moveCuBoxO<<rotateY180; // Copper beam solid const GeoBox * cuBeamFull = new GeoBox(TCL_CuBeam_halfwidth, TCL_CuBeam_halfheight, TCL_CuBeam_halflength); - HepGeom::Transform3D moveCuBeamI = HepGeom::Translate3D(TCLJawDistI+2*TCL_CuBlock_halfwidth+TCL_Cooling_width+TCL_CuBeam_halfwidth, 0, 0); + GeoTrf::Transform3D moveCuBeamI = GeoTrf::Translate3D(TCLJawDistI+2*TCL_CuBlock_halfwidth+TCL_Cooling_width+TCL_CuBeam_halfwidth, 0, 0); const GeoShapeShift& cuBeamI = (*cuBeamFull)<<moveCuBeamI; - HepGeom::Transform3D moveCuBeamO = HepGeom::Translate3D(+TCLJawDistO+2*TCL_CuBlock_halfwidth+TCL_Cooling_width+TCL_CuBeam_halfwidth, 0, 0); + GeoTrf::Transform3D moveCuBeamO = GeoTrf::Translate3D(+TCLJawDistO+2*TCL_CuBlock_halfwidth+TCL_Cooling_width+TCL_CuBeam_halfwidth, 0, 0); const GeoShapeShift& cuBeamO = (*cuBeamFull)<<moveCuBeamO<<rotateY180; // Watter cooling in first aproximation (water box) const GeoBox * waterBox = new GeoBox(0.5*TCL_Cooling_width, TCL_CuBlock_halfheight, TCL_CuBlock_halflength); - HepGeom::Transform3D moveWaterBoxI = HepGeom::Translate3D(TCLJawDistI+2*TCL_CuBlock_halfwidth+0.5*TCL_Cooling_width, 0, 0); + GeoTrf::Transform3D moveWaterBoxI = GeoTrf::Translate3D(TCLJawDistI+2*TCL_CuBlock_halfwidth+0.5*TCL_Cooling_width, 0, 0); const GeoShapeShift& waterBoxI = (*waterBox)<<moveWaterBoxI; - HepGeom::Transform3D moveWaterBoxO = HepGeom::Translate3D(+TCLJawDistO+2*TCL_CuBlock_halfwidth+0.5*TCL_Cooling_width, 0, 0); + GeoTrf::Transform3D moveWaterBoxO = GeoTrf::Translate3D(+TCLJawDistO+2*TCL_CuBlock_halfwidth+0.5*TCL_Cooling_width, 0, 0); const GeoShapeShift& waterBoxO = (*waterBox)<<moveWaterBoxO<<rotateY180; @@ -504,7 +504,7 @@ void ForwardRegionGeoModelFactory::insertTCLElement(std::string name, double x, GeoPhysVol *waterBoxPhysO = new GeoPhysVol(waterBoxLogO); //create rotation and traslation and add them to the tree of volumes of the world (move and rotate the volume) - GeoTransform *move = new GeoTransform(HepGeom::Translate3D(x,y,z)); + GeoTransform *move = new GeoTransform(GeoTrf::Translate3D(x,y,z)); fwrPhys->add(move); GeoNameTag *tag = new GeoNameTag(name); diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelFactory.cxx b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelFactory.cxx index bb6c0bfcb4a..da385074719 100755 --- a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelFactory.cxx +++ b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelFactory.cxx @@ -16,13 +16,12 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" -#include "GeoModelKernel/GeoTransform.h" -#include "GeoModelKernel/GeoAlignableTransform.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "CLHEP/Geometry/Point3D.h" #include "StoreGate/StoreGateSvc.h" #include "StoreGate/DataHandle.h" @@ -48,28 +47,28 @@ void FWD_CONFIGURATION::clear() { - TCL4JawDistB1I = 57*CLHEP::mm; - TCL5JawDistB1I = 57*CLHEP::mm; - TCL6JawDistB1I = 57*CLHEP::mm; - TCL4JawDistB2I = 57*CLHEP::mm; - TCL5JawDistB2I = 57*CLHEP::mm; - TCL6JawDistB2I = 57*CLHEP::mm; - TCL4JawDistB1O = 57*CLHEP::mm; - TCL5JawDistB1O = 57*CLHEP::mm; - TCL6JawDistB1O = 57*CLHEP::mm; - TCL4JawDistB2O = 57*CLHEP::mm; - TCL5JawDistB2O = 57*CLHEP::mm; - TCL6JawDistB2O = 57*CLHEP::mm; + TCL4JawDistB1I = 57*GeoModelKernelUnits::mm; + TCL5JawDistB1I = 57*GeoModelKernelUnits::mm; + TCL6JawDistB1I = 57*GeoModelKernelUnits::mm; + TCL4JawDistB2I = 57*GeoModelKernelUnits::mm; + TCL5JawDistB2I = 57*GeoModelKernelUnits::mm; + TCL6JawDistB2I = 57*GeoModelKernelUnits::mm; + TCL4JawDistB1O = 57*GeoModelKernelUnits::mm; + TCL5JawDistB1O = 57*GeoModelKernelUnits::mm; + TCL6JawDistB1O = 57*GeoModelKernelUnits::mm; + TCL4JawDistB2O = 57*GeoModelKernelUnits::mm; + TCL5JawDistB2O = 57*GeoModelKernelUnits::mm; + TCL6JawDistB2O = 57*GeoModelKernelUnits::mm; vp1Compatibility = false; buildTCL4 = false; buildTCL6 = false; ALFAInNewPosition = false; - newPosB7L1 = 245656.77*CLHEP::mm; - newPosB7R1 = -245656.11*CLHEP::mm; - posAFPL1 = 204500*CLHEP::mm; - posAFPL2 = 212675*CLHEP::mm; - posAFPR1 = -204500*CLHEP::mm; - posAFPL2 = -212675*CLHEP::mm; + newPosB7L1 = 245656.77*GeoModelKernelUnits::mm; + newPosB7R1 = -245656.11*GeoModelKernelUnits::mm; + posAFPL1 = 204500*GeoModelKernelUnits::mm; + posAFPL2 = 212675*GeoModelKernelUnits::mm; + posAFPR1 = -204500*GeoModelKernelUnits::mm; + posAFPL2 = -212675*GeoModelKernelUnits::mm; } @@ -118,7 +117,7 @@ void ForwardRegionGeoModelFactory::DefineMaterials() // water matName = "water"; - GeoMaterial *water = new GeoMaterial("H20", 1.0*CLHEP::gram/CLHEP::cm3); + GeoMaterial *water = new GeoMaterial("H20", 1.0*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); GeoElement *hydrogen = new GeoElement("Hydrogen","H",1.0, 1.010); GeoElement *oxygen = new GeoElement("Oxygen", "O", 8.0, 16.0); water->add(hydrogen,0.11); @@ -146,7 +145,7 @@ void ForwardRegionGeoModelFactory::DefineMaterials() // Copper for beam screens matName = "Copper"; - GeoMaterial *copper = new GeoMaterial("Copper", 8.94*CLHEP::g/CLHEP::cm3); + GeoMaterial *copper = new GeoMaterial("Copper", 8.94*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); copper->add(const_cast<GeoElement*> (Cu),1.0); copper->lock(); m_MapMaterials.insert(std::pair<std::string,GeoMaterial*>(matName,copper)); @@ -154,7 +153,7 @@ void ForwardRegionGeoModelFactory::DefineMaterials() // Tungsten for TCL6 matName = "Tungsten"; const GeoElement* W = materialManager->getElement("Wolfram"); - GeoMaterial *tungsten = new GeoMaterial("Tungsten", 19.25*CLHEP::g/CLHEP::cm3); + GeoMaterial *tungsten = new GeoMaterial("Tungsten", 19.25*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); tungsten->add(const_cast<GeoElement*> (W),1.0); tungsten->lock(); m_MapMaterials.insert(std::pair<std::string,GeoMaterial*>(matName,tungsten)); @@ -162,14 +161,14 @@ void ForwardRegionGeoModelFactory::DefineMaterials() // GlidCop AL15 copper -- aproximate composition (trace impurities (< 0.01 wt. %) not included) // source: http://www-ferp.ucsd.edu/LIB/PROPS/compcu15.html matName = "GlidCopAL15"; - GeoMaterial *glidcop=new GeoMaterial("GlidCopAL15", 8.90*CLHEP::g/CLHEP::cm3); + GeoMaterial *glidcop=new GeoMaterial("GlidCopAL15", 8.90*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); double aCu, aAl, aO, aB, aTot; - aCu=99.7*Cu->getA()/(CLHEP::g/CLHEP::mole); - aAl=0.15*Al->getA()/(CLHEP::g/CLHEP::mole); - aO=0.13*O->getA()/(CLHEP::g/CLHEP::mole); - aB=0.02*B->getA()/(CLHEP::g/CLHEP::mole); + aCu=99.7*Cu->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aAl=0.15*Al->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aO=0.13*O->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aB=0.02*B->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); aTot=aCu+aAl+aO+aB; glidcop->add(const_cast<GeoElement*> (Cu), aCu/aTot); @@ -181,20 +180,20 @@ void ForwardRegionGeoModelFactory::DefineMaterials() // Steel Grade 316L (Roman Pot) matName = "Steel"; - GeoMaterial *steel=new GeoMaterial("Steel", 8*CLHEP::g/CLHEP::cm3); + GeoMaterial *steel=new GeoMaterial("Steel", 8*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); double aC,aN,aSi,aP,aS,aCr,aMn,aFe,aNi,aMo,Atot; - aFe=62.045*Fe->getA()/(CLHEP::g/CLHEP::mole); - aC =0.03*C ->getA()/(CLHEP::g/CLHEP::mole); - aMn=2.0*Mn ->getA()/(CLHEP::g/CLHEP::mole); - aSi=0.75*Si->getA()/(CLHEP::g/CLHEP::mole); - aP =0.045*P->getA()/(CLHEP::g/CLHEP::mole); - aS =0.03*S ->getA()/(CLHEP::g/CLHEP::mole); - aCr=18.0*Cr->getA()/(CLHEP::g/CLHEP::mole); - aMo=3.0*Mo ->getA()/(CLHEP::g/CLHEP::mole); - aNi=14.0*Ni->getA()/(CLHEP::g/CLHEP::mole); - aN =0.10*N ->getA()/(CLHEP::g/CLHEP::mole); + aFe=62.045*Fe->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aC =0.03*C ->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aMn=2.0*Mn ->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aSi=0.75*Si->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aP =0.045*P->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aS =0.03*S ->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aCr=18.0*Cr->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aMo=3.0*Mo ->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aNi=14.0*Ni->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + aN =0.10*N ->getA()/(GeoModelKernelUnits::g/GeoModelKernelUnits::mole); Atot=aFe+aC+aMn+aSi+aP+aS+aCr+aMo+aNi+aN; steel->add(const_cast<GeoElement*> (Fe),aFe/Atot); @@ -264,8 +263,8 @@ void ForwardRegionGeoModelFactory::constructElements(GeoPhysVol *fwrPhys,std::ve double startX = pointMagStart[0]; double endX = pointMagEnd[0]; double rotationAngle = atan2(endX - startX,endZ - startZ); - double r = atof(loadedDataFile[i][xAperture].c_str())*CLHEP::mm/2; - double dL = abs(r*tan(rotationAngle))+0.2*CLHEP::mm; + double r = atof(loadedDataFile[i][xAperture].c_str())*GeoModelKernelUnits::mm/2; + double dL = abs(r*tan(rotationAngle))+0.2*GeoModelKernelUnits::mm; // move start and end points of the magnet element and neighbour elemens accordingly @@ -290,12 +289,12 @@ void ForwardRegionGeoModelFactory::constructElements(GeoPhysVol *fwrPhys,std::ve // --------------- elements cycle ----------------- for(int i=0; i < lDFSize; i++) { - startZ = atof(loadedDataFile[i][zStart].c_str())*CLHEP::m; - endZ = atof(loadedDataFile[i][zEnd].c_str())*CLHEP::m; - startX = atof(loadedDataFile[i][xStart].c_str())*CLHEP::m; - endX = atof(loadedDataFile[i][xEnd].c_str())*CLHEP::m; - startY = atof(loadedDataFile[i][yStart].c_str())*CLHEP::m; - endY = atof(loadedDataFile[i][yEnd].c_str())*CLHEP::m; + startZ = atof(loadedDataFile[i][zStart].c_str())*GeoModelKernelUnits::m; + endZ = atof(loadedDataFile[i][zEnd].c_str())*GeoModelKernelUnits::m; + startX = atof(loadedDataFile[i][xStart].c_str())*GeoModelKernelUnits::m; + endX = atof(loadedDataFile[i][xEnd].c_str())*GeoModelKernelUnits::m; + startY = atof(loadedDataFile[i][yStart].c_str())*GeoModelKernelUnits::m; + endY = atof(loadedDataFile[i][yEnd].c_str())*GeoModelKernelUnits::m; // translation of element x = (startX + endX)/2; @@ -309,10 +308,10 @@ void ForwardRegionGeoModelFactory::constructElements(GeoPhysVol *fwrPhys,std::ve // half-length of element halfL = sqrt((endX - startX)*(endX - startX) + (endZ - startZ)*(endZ - startZ))/2; - r = atof(loadedDataFile[i][xAperture].c_str())*CLHEP::mm/2; + r = atof(loadedDataFile[i][xAperture].c_str())*GeoModelKernelUnits::mm/2; // overlap correction - dL = abs(r*tan(rotationAngle))+0.2*CLHEP::mm; + dL = abs(r*tan(rotationAngle))+0.2*GeoModelKernelUnits::mm; // do not shorten magnetic volumes if(loadedDataFile[i][name].find("Mag") != std::string::npos) @@ -324,7 +323,7 @@ void ForwardRegionGeoModelFactory::constructElements(GeoPhysVol *fwrPhys,std::ve if(atoi(loadedDataFile[i][type].c_str()) == 0){ // envelope to allow tracking with G4TrackAction if(loadedDataFile[i][name] == "VCDBP.7R1.B"){ - GeoPhysVol* trackEnv = insertMagnetEnvelope(loadedDataFile[i][name], x, y, z, rotationAngle, 100*CLHEP::mm, halfL, dL, fwrPhys); + GeoPhysVol* trackEnv = insertMagnetEnvelope(loadedDataFile[i][name], x, y, z, rotationAngle, 100*GeoModelKernelUnits::mm, halfL, dL, fwrPhys); insertCircularElement(loadedDataFile[i][name], x, y, z, rotationAngle, atof(loadedDataFile[i][xAperture].c_str()), atof(loadedDataFile[i][yAperture].c_str()), halfL, dL, atof(loadedDataFile[i][tubeThickness].c_str()), trackEnv); } else @@ -351,20 +350,20 @@ void ForwardRegionGeoModelFactory::constructElements(GeoPhysVol *fwrPhys,std::ve // elliptical aperture if(atoi(loadedDataFile[i][type].c_str()) == 1) { - magEnv = insertMagnetEnvelope(loadedDataFile[i][name], x, y, z, rotationAngle, 20*CLHEP::cm, halfL, dL, fwrPhys); + magEnv = insertMagnetEnvelope(loadedDataFile[i][name], x, y, z, rotationAngle, 20*GeoModelKernelUnits::cm, halfL, dL, fwrPhys); insertEllipticalElement(loadedDataFile[i][name], x, y, z, rotationAngle, atof(loadedDataFile[i][xAperture].c_str()), atof(loadedDataFile[i][yAperture].c_str()), halfL, dL, atof(loadedDataFile[i][tubeThickness].c_str()), magEnv); } - double magDiam = 19.4*CLHEP::cm; + double magDiam = 19.4*GeoModelKernelUnits::cm; if(loadedDataFile[i][name].find("Mag") != std::string::npos) - magDiam= 19.4*CLHEP::cm; + magDiam= 19.4*GeoModelKernelUnits::cm; if(loadedDataFile[i][name] == "LQXAA.1R1MagQ1" || loadedDataFile[i][name] == "LQXAG.3R1MagQ3") - magDiam = 48*CLHEP::cm; + magDiam = 48*GeoModelKernelUnits::cm; if(loadedDataFile[i][name] == "LQXBA.2R1MagQ2a" || loadedDataFile[i][name] == "LQXBA.2R1MagQ2b") - magDiam = 52*CLHEP::cm; + magDiam = 52*GeoModelKernelUnits::cm; //else magDiam = std::max(atof(loadedDataFile[i][xAperture].c_str()), atof(loadedDataFile[i][yAperture].c_str()))+2*atof(loadedDataFile[i][tubeThickness].c_str()); - //else magDiam = 19.4*CLHEP::cm; + //else magDiam = 19.4*GeoModelKernelUnits::cm; // rectcircular aperture with flats in x if(atoi(loadedDataFile[i][type].c_str()) == 2) { @@ -398,37 +397,37 @@ void ForwardRegionGeoModelFactory::create(GeoPhysVol *world) double startZ,endZ; - if(m_Config.vp1Compatibility) startZ = 19.0*CLHEP::m; - else startZ = 22.0*CLHEP::m; - endZ = 268.904*CLHEP::m; + if(m_Config.vp1Compatibility) startZ = 19.0*GeoModelKernelUnits::m; + else startZ = 22.0*GeoModelKernelUnits::m; + endZ = 268.904*GeoModelKernelUnits::m; //rotationAngle_old = 0; // mother volume -- union of tubes, one for each side - //const GeoBox *fwrBox = new GeoBox(2*CLHEP::m,0.5*CLHEP::m,(endZ-startZ)/2); - const GeoTube *fwrTubeL = new GeoTube(0,2*CLHEP::m,(endZ-startZ)/2); - GeoTube *fwrTubeR = new GeoTube(0,2*CLHEP::m,(endZ-startZ)/2); - HepGeom::Transform3D shiftL = HepGeom::Translate3D(0,0,(endZ+startZ)/2); - HepGeom::Transform3D shiftR = HepGeom::Translate3D(0,0,-(endZ+startZ)/2); + //const GeoBox *fwrBox = new GeoBox(2*GeoModelKernelUnits::m,0.5*GeoModelKernelUnits::m,(endZ-startZ)/2); + const GeoTube *fwrTubeL = new GeoTube(0,2*GeoModelKernelUnits::m,(endZ-startZ)/2); + GeoTube *fwrTubeR = new GeoTube(0,2*GeoModelKernelUnits::m,(endZ-startZ)/2); + GeoTrf::Transform3D shiftL = GeoTrf::Translate3D(0,0,(endZ+startZ)/2); + GeoTrf::Transform3D shiftR = GeoTrf::Translate3D(0,0,-(endZ+startZ)/2); const GeoShapeShift& fwrTube0 = (*fwrTubeL)<<shiftL; const GeoShapeUnion& fwrTube1 = fwrTube0.add((*fwrTubeR)<<shiftR); // cut out slots for ALFA - const GeoTube *alfa = new GeoTube(0, 2*CLHEP::m, 500*CLHEP::mm); - HepGeom::Transform3D shiftAlfaL1 = HepGeom::Translate3D(0,0,237388*CLHEP::mm); - HepGeom::Transform3D shiftAlfaR1 = HepGeom::Translate3D(0,0,-237408*CLHEP::mm); - HepGeom::Transform3D shiftAlfaL2 = HepGeom::Translate3D(0,0,(m_Config.ALFAInNewPosition ? m_Config.newPosB7L1 : 241528*CLHEP::mm)); - HepGeom::Transform3D shiftAlfaR2 = HepGeom::Translate3D(0,0,(m_Config.ALFAInNewPosition ? m_Config.newPosB7R1 :-241548*CLHEP::mm)); + const GeoTube *alfa = new GeoTube(0, 2*GeoModelKernelUnits::m, 500*GeoModelKernelUnits::mm); + GeoTrf::Transform3D shiftAlfaL1 = GeoTrf::Translate3D(0,0,237388*GeoModelKernelUnits::mm); + GeoTrf::Transform3D shiftAlfaR1 = GeoTrf::Translate3D(0,0,-237408*GeoModelKernelUnits::mm); + GeoTrf::Transform3D shiftAlfaL2 = GeoTrf::Translate3D(0,0,(m_Config.ALFAInNewPosition ? m_Config.newPosB7L1 : 241528*GeoModelKernelUnits::mm)); + GeoTrf::Transform3D shiftAlfaR2 = GeoTrf::Translate3D(0,0,(m_Config.ALFAInNewPosition ? m_Config.newPosB7R1 :-241548*GeoModelKernelUnits::mm)); const GeoShapeSubtraction& fwrTube2 = fwrTube1.subtract((*alfa)<<shiftAlfaL1).subtract((*alfa)<<shiftAlfaL2).subtract((*alfa)<<shiftAlfaR1).subtract((*alfa)<<shiftAlfaR2); // cut out slots for AFP - const GeoTube *afp = new GeoTube(0, 2.5*CLHEP::m, 280*CLHEP::mm); - const GeoTube *afp2 = new GeoTube(0, 2.5*CLHEP::m, 580*CLHEP::mm); - HepGeom::Transform3D shiftAfpL1 = HepGeom::Translate3D(0,0,m_Config.posAFPL1); - HepGeom::Transform3D shiftAfpR1 = HepGeom::Translate3D(0,0,m_Config.posAFPR1); - HepGeom::Transform3D shiftAfpL2 = HepGeom::Translate3D(0,0,m_Config.posAFPL2); - HepGeom::Transform3D shiftAfpR2 = HepGeom::Translate3D(0,0,m_Config.posAFPR2); + const GeoTube *afp = new GeoTube(0, 2.5*GeoModelKernelUnits::m, 280*GeoModelKernelUnits::mm); + const GeoTube *afp2 = new GeoTube(0, 2.5*GeoModelKernelUnits::m, 580*GeoModelKernelUnits::mm); + GeoTrf::Transform3D shiftAfpL1 = GeoTrf::Translate3D(0,0,m_Config.posAFPL1); + GeoTrf::Transform3D shiftAfpR1 = GeoTrf::Translate3D(0,0,m_Config.posAFPR1); + GeoTrf::Transform3D shiftAfpL2 = GeoTrf::Translate3D(0,0,m_Config.posAFPL2); + GeoTrf::Transform3D shiftAfpR2 = GeoTrf::Translate3D(0,0,m_Config.posAFPR2); const GeoShapeSubtraction& fwrTube = fwrTube2.subtract((*afp)<<shiftAfpL1).subtract((*afp)<<shiftAfpR1).subtract((*afp2)<<shiftAfpL2).subtract((*afp2)<<shiftAfpR2); diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelTool.cxx b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelTool.cxx index daba635469d..cd2494ced12 100755 --- a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelTool.cxx +++ b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/src/ForwardRegionGeoModelTool.cxx @@ -10,6 +10,7 @@ #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/MsgStream.h" #include "StoreGate/StoreGateSvc.h" +#include "GeoModelKernel/Units.h" /** ** Constructor(s) @@ -18,28 +19,28 @@ ForwardRegionGeoModelTool::ForwardRegionGeoModelTool( const std::string& type, c : GeoModelTool( type, name, parent ) { m_Config.clear(); - declareProperty("TCL4JawDistB1I",m_Config.TCL4JawDistB1I=57*CLHEP::mm); - declareProperty("TCL4JawDistB2I",m_Config.TCL4JawDistB2I=57*CLHEP::mm); - declareProperty("TCL5JawDistB1I",m_Config.TCL5JawDistB1I=57*CLHEP::mm); - declareProperty("TCL5JawDistB2I",m_Config.TCL5JawDistB2I=57*CLHEP::mm); - declareProperty("TCL6JawDistB1I",m_Config.TCL6JawDistB1I=57*CLHEP::mm); - declareProperty("TCL6JawDistB2I",m_Config.TCL6JawDistB2I=57*CLHEP::mm); - declareProperty("TCL4JawDistB1O",m_Config.TCL4JawDistB1O=57*CLHEP::mm); - declareProperty("TCL4JawDistB2O",m_Config.TCL4JawDistB2O=57*CLHEP::mm); - declareProperty("TCL5JawDistB1O",m_Config.TCL5JawDistB1O=57*CLHEP::mm); - declareProperty("TCL5JawDistB2O",m_Config.TCL5JawDistB2O=57*CLHEP::mm); - declareProperty("TCL6JawDistB1O",m_Config.TCL6JawDistB1O=57*CLHEP::mm); - declareProperty("TCL6JawDistB2O",m_Config.TCL6JawDistB2O=57*CLHEP::mm); + declareProperty("TCL4JawDistB1I",m_Config.TCL4JawDistB1I=57*GeoModelKernelUnits::mm); + declareProperty("TCL4JawDistB2I",m_Config.TCL4JawDistB2I=57*GeoModelKernelUnits::mm); + declareProperty("TCL5JawDistB1I",m_Config.TCL5JawDistB1I=57*GeoModelKernelUnits::mm); + declareProperty("TCL5JawDistB2I",m_Config.TCL5JawDistB2I=57*GeoModelKernelUnits::mm); + declareProperty("TCL6JawDistB1I",m_Config.TCL6JawDistB1I=57*GeoModelKernelUnits::mm); + declareProperty("TCL6JawDistB2I",m_Config.TCL6JawDistB2I=57*GeoModelKernelUnits::mm); + declareProperty("TCL4JawDistB1O",m_Config.TCL4JawDistB1O=57*GeoModelKernelUnits::mm); + declareProperty("TCL4JawDistB2O",m_Config.TCL4JawDistB2O=57*GeoModelKernelUnits::mm); + declareProperty("TCL5JawDistB1O",m_Config.TCL5JawDistB1O=57*GeoModelKernelUnits::mm); + declareProperty("TCL5JawDistB2O",m_Config.TCL5JawDistB2O=57*GeoModelKernelUnits::mm); + declareProperty("TCL6JawDistB1O",m_Config.TCL6JawDistB1O=57*GeoModelKernelUnits::mm); + declareProperty("TCL6JawDistB2O",m_Config.TCL6JawDistB2O=57*GeoModelKernelUnits::mm); declareProperty("vp1Compatibility", m_Config.vp1Compatibility=false); declareProperty("buildTCL4",m_Config.buildTCL4=false); declareProperty("buildTCL6",m_Config.buildTCL6=false); declareProperty("ALFAInNewPosition",m_Config.ALFAInNewPosition=false); - declareProperty("newPosB7L1",m_Config.newPosB7L1=245656.77*CLHEP::mm); - declareProperty("newPosB7R1",m_Config.newPosB7R1=-245656.11*CLHEP::mm); - declareProperty("posAFPL1",m_Config.posAFPL1=204500*CLHEP::mm); - declareProperty("posAFPR1",m_Config.posAFPR1=-204500*CLHEP::mm); - declareProperty("posAFPL2",m_Config.posAFPL2=212675*CLHEP::mm); - declareProperty("posAFPR2",m_Config.posAFPR2=-212675*CLHEP::mm); + declareProperty("newPosB7L1",m_Config.newPosB7L1=245656.77*GeoModelKernelUnits::mm); + declareProperty("newPosB7R1",m_Config.newPosB7R1=-245656.11*GeoModelKernelUnits::mm); + declareProperty("posAFPL1",m_Config.posAFPL1=204500*GeoModelKernelUnits::mm); + declareProperty("posAFPR1",m_Config.posAFPR1=-204500*GeoModelKernelUnits::mm); + declareProperty("posAFPL2",m_Config.posAFPL2=212675*GeoModelKernelUnits::mm); + declareProperty("posAFPR2",m_Config.posAFPR2=-212675*GeoModelKernelUnits::mm); } /** diff --git a/ForwardDetectors/LUCID/LUCID_GeoModel/CMakeLists.txt b/ForwardDetectors/LUCID/LUCID_GeoModel/CMakeLists.txt index 98759e89f84..a15717f40dc 100644 --- a/ForwardDetectors/LUCID/LUCID_GeoModel/CMakeLists.txt +++ b/ForwardDetectors/LUCID/LUCID_GeoModel/CMakeLists.txt @@ -7,7 +7,6 @@ atlas_subdir( LUCID_GeoModel ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities GaudiKernel PRIVATE @@ -19,20 +18,20 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LUCID_GeoModelLib src/*.cxx PUBLIC_HEADERS LUCID_GeoModel - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES GeoModelKernel GeoModelUtilities GaudiKernel StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel SGTools ) + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities GaudiKernel StoreGateLib SGtests + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaKernel SGTools ) atlas_add_component( LUCID_GeoModel src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelKernel GeoModelUtilities GaudiKernel AthenaKernel SGTools StoreGateLib SGtests LUCID_GeoModelLib ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities GaudiKernel AthenaKernel SGTools StoreGateLib SGtests LUCID_GeoModelLib ) diff --git a/ForwardDetectors/LUCID/LUCID_GeoModel/src/GetRefIndex.cxx b/ForwardDetectors/LUCID/LUCID_GeoModel/src/GetRefIndex.cxx index f926c62af1d..518c44509c2 100644 --- a/ForwardDetectors/LUCID/LUCID_GeoModel/src/GetRefIndex.cxx +++ b/ForwardDetectors/LUCID/LUCID_GeoModel/src/GetRefIndex.cxx @@ -7,15 +7,16 @@ #include <iomanip> #include <math.h> -#include "CLHEP/Units/PhysicalConstants.h" -#include "CLHEP/Units/SystemOfUnits.h" +//#include "CLHEP/Units/PhysicalConstants.h" +//#include "CLHEP/Units/SystemOfUnits.h" #include "LUCID_DetectorFactory.h" #include "GetRefIndex.h" +#include "GeoModelKernel/Units.h" double GetRefIndexGas(double lambda, double pressure, double temperature) { - double e = 2.*M_PI*CLHEP::hbarc/(CLHEP::eV*CLHEP::nm)/lambda; + double e = 2.*M_PI*GeoModelKernelUnits::hbarc/(GeoModelKernelUnits::eV*GeoModelKernelUnits::nm)/lambda; double e0 = 17; double k = 0.25938; double x = k*pressure/temperature/(1 - pow(e/e0, 2)); @@ -28,7 +29,7 @@ double GetRefIndexQuartz(double lambda) { double const SellCoeu[] = {46.41, 228.71, 0.014}; double const SellCoed[] = {10.666, 18.125, 0.125}; - double e = 2.*M_PI*CLHEP::hbarc/(CLHEP::eV*CLHEP::nm)/lambda; + double e = 2.*M_PI*GeoModelKernelUnits::hbarc/(GeoModelKernelUnits::eV*GeoModelKernelUnits::nm)/lambda; double r = 1.; for(int i=0; i<3; i++) r += SellCoeu[i]/(SellCoed[i]*SellCoed[i] - e*e); diff --git a/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_DetectorFactory.cxx b/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_DetectorFactory.cxx index fc0384bf23b..eaae2ee4153 100755 --- a/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_DetectorFactory.cxx +++ b/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_DetectorFactory.cxx @@ -15,6 +15,8 @@ #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelUtilities/GeoExtendedMaterial.h" #include "GeoModelUtilities/GeoMaterialPropertiesTable.h" #include "GeoModelUtilities/GeoOpticalSurface.h" @@ -78,7 +80,7 @@ void LUCID_DetectorFactory::create(GeoPhysVol* world) { log << MSG::DEBUG << " Build LUCID side A " << endmsg; - GeoPcon* aShape = new GeoPcon(0, 360*CLHEP::deg); + GeoPcon* aShape = new GeoPcon(0, 360*GeoModelKernelUnits::deg); aShape->addPlane( 0, m_lp->coolingRadius, m_lp->VJconeRadiusFront); aShape->addPlane(m_lp->VJconelength, m_lp->coolingRadius, m_lp->VJconeRadiusBack); @@ -90,7 +92,7 @@ void LUCID_DetectorFactory::create(GeoPhysVol* world) { addCooling(phyVolA); addVessel (phyVolA); - world->add(new GeoAlignableTransform(HepGeom::Translate3D(0, 0, m_lp->VJdistanceToIP))); + world->add(new GeoAlignableTransform(GeoTrf::Translate3D(0, 0, m_lp->VJdistanceToIP))); world->add(new GeoNameTag("LucidSideA")); world->add(phyVolA); @@ -100,7 +102,7 @@ void LUCID_DetectorFactory::create(GeoPhysVol* world) { GeoFullPhysVol* phyVolC = phyVolA->clone(); - world->add(new GeoAlignableTransform(HepGeom::Translate3D(0, 0, -m_lp->VJdistanceToIP )*HepGeom::RotateY3D(180*CLHEP::degree)*HepGeom::RotateZ3D(180*CLHEP::degree))); + world->add(new GeoAlignableTransform(GeoTrf::Translate3D(0, 0, -m_lp->VJdistanceToIP )*GeoTrf::RotateY3D(180*GeoModelKernelUnits::degree)*GeoTrf::RotateZ3D(180*GeoModelKernelUnits::degree))); world->add(new GeoNameTag("LucidSideC")); world->add(phyVolC); @@ -121,7 +123,7 @@ void LUCID_DetectorFactory::buildMaterials() { m_alu = m_materialManager->getMaterial("std::Aluminium"); - log << MSG::DEBUG << " Aluminium density[g/cm3]: " << m_alu->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + log << MSG::DEBUG << " Aluminium density[g/cm3]: " << m_alu->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; log << MSG::DEBUG << " Build Cherenkov Gas " << endmsg; @@ -134,9 +136,9 @@ void LUCID_DetectorFactory::buildMaterials() { m_gas->add(const_cast<GeoElement*>(fluorine), 10*fluorine->getA()/(4*carbon->getA() + 10*fluorine->getA())); log << MSG::DEBUG << " gasState : " << m_gas->getState() << endmsg; - log << MSG::DEBUG << " gasTemperature[kelvin]: " << m_gas->getTemperature()/CLHEP::kelvin << endmsg; - log << MSG::DEBUG << " gasPressure [bar]: " << m_gas->getPressure()/CLHEP::bar << endmsg; - log << MSG::DEBUG << " gasDensity [g/cm3]: " << m_gas->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + log << MSG::DEBUG << " gasTemperature[kelvin]: " << m_gas->getTemperature()/GeoModelKernelUnits::kelvin << endmsg; + log << MSG::DEBUG << " gasPressure [bar]: " << m_gas->getPressure()/GeoModelKernelUnits::bar << endmsg; + log << MSG::DEBUG << " gasDensity [g/cm3]: " << m_gas->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; log << MSG::DEBUG << " Wavelength dependent properties " << endmsg; @@ -149,16 +151,16 @@ void LUCID_DetectorFactory::buildMaterials() { double* gasAbsLength = new double[waveLengthNum]; double* tubeReflectivity = new double[waveLengthNum]; - double absLengthScale = (m_lp->gasPressure) ? (m_lp->gasPressure/CLHEP::bar) : 1; + double absLengthScale = (m_lp->gasPressure) ? (m_lp->gasPressure/GeoModelKernelUnits::bar) : 1; for(int i=0; i<waveLengthNum; i++) { - photonWaveLength[i] = (m_lp->waveLengthMin + i*m_lp->waveLengthStep)*CLHEP::nm; - photonEnergy [i] = 2.*M_PI*(CLHEP::hbarc/(CLHEP::eV*CLHEP::nm))/(photonWaveLength[i]/CLHEP::nm)*CLHEP::eV; - quartzRefIndex [i] = GetRefIndexQuartz (photonWaveLength[i]/CLHEP::nm); - gasRefIndex [i] = GetRefIndexGas (photonWaveLength[i]/CLHEP::nm, m_lp->gasPressure/CLHEP::bar, m_lp->gasTemperature/CLHEP::kelvin); - gasAbsLength [i] = GetAbsLengthGas (photonWaveLength[i]/CLHEP::nm)*CLHEP::m/absLengthScale; - tubeReflectivity[i] = GetReflectivity (photonWaveLength[i]/CLHEP::nm); + photonWaveLength[i] = (m_lp->waveLengthMin + i*m_lp->waveLengthStep)*GeoModelKernelUnits::nm; + photonEnergy [i] = 2.*M_PI*(GeoModelKernelUnits::hbarc/(GeoModelKernelUnits::eV*GeoModelKernelUnits::nm))/(photonWaveLength[i]/GeoModelKernelUnits::nm)*GeoModelKernelUnits::eV; + quartzRefIndex [i] = GetRefIndexQuartz (photonWaveLength[i]/GeoModelKernelUnits::nm); + gasRefIndex [i] = GetRefIndexGas (photonWaveLength[i]/GeoModelKernelUnits::nm, m_lp->gasPressure/GeoModelKernelUnits::bar, m_lp->gasTemperature/GeoModelKernelUnits::kelvin); + gasAbsLength [i] = GetAbsLengthGas (photonWaveLength[i]/GeoModelKernelUnits::nm)*GeoModelKernelUnits::m/absLengthScale; + tubeReflectivity[i] = GetReflectivity (photonWaveLength[i]/GeoModelKernelUnits::nm); } log << MSG::DEBUG << " **************************************************************************************************** " << endmsg; @@ -167,11 +169,11 @@ void LUCID_DetectorFactory::buildMaterials() { for(int i=0; i<waveLengthNum; i++) { log << MSG::DEBUG - << std::setw(11) << photonWaveLength[i]/CLHEP::nm - << std::setw(11) << photonEnergy [i]/CLHEP::eV + << std::setw(11) << photonWaveLength[i]/GeoModelKernelUnits::nm + << std::setw(11) << photonEnergy [i]/GeoModelKernelUnits::eV << std::setw(13) << quartzRefIndex [i] << std::setw(10) << gasRefIndex [i] - << std::setw(16) << gasAbsLength [i]/CLHEP::m + << std::setw(16) << gasAbsLength [i]/GeoModelKernelUnits::m << std::setw(17) << tubeReflectivity[i] << endmsg; } @@ -190,7 +192,7 @@ void LUCID_DetectorFactory::buildMaterials() { log << MSG::DEBUG << " Build Quartz for PMT windows" << endmsg; - m_quartz = new GeoExtendedMaterial("SiO2", m_lp->quartzDensity, stateSolid, CLHEP::STP_Temperature); + m_quartz = new GeoExtendedMaterial("SiO2", m_lp->quartzDensity, stateSolid, GeoModelKernelUnits::STP_Temperature); const GeoElement* oxygen = m_materialManager->getElement("Oxygen"); const GeoElement* silicon = m_materialManager->getElement("Silicon"); @@ -211,7 +213,7 @@ void LUCID_DetectorFactory::buildMaterials() { m_cop = m_materialManager->getMaterial("std::Copper"); - log << MSG::DEBUG << " Copper density[g/cm3]: " << m_cop->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + log << MSG::DEBUG << " Copper density[g/cm3]: " << m_cop->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; log << MSG::DEBUG << " Build Reflective Tube Optical Surfaces " << endmsg; @@ -249,17 +251,17 @@ void LUCID_DetectorFactory::calcTubeParams() { for (int i=0; i<nLayers; i++) { - m_tubeTheta [i] = atan(layerRadius[i]/m_lp->distanceToIP)*CLHEP::rad; - tubePhiOffset[i] = (i==0)*M_PI/8*CLHEP::rad; + m_tubeTheta [i] = atan(layerRadius[i]/m_lp->distanceToIP)*GeoModelKernelUnits::rad; + tubePhiOffset[i] = (i==0)*M_PI/8*GeoModelKernelUnits::rad; for (int j=0; j<nPmtTubesPerLayer; j++) { - tubePhiAngle[i][j] = 2*M_PI*j/nPmtTubesPerLayer*CLHEP::rad + tubePhiOffset[i]; + tubePhiAngle[i][j] = 2*M_PI*j/nPmtTubesPerLayer*GeoModelKernelUnits::rad + tubePhiOffset[i]; - double tubeDistance = layerRadius[i] + m_lp->tubeLength/2*sin(m_tubeTheta[i]/CLHEP::rad); + double tubeDistance = layerRadius[i] + m_lp->tubeLength/2*sin(m_tubeTheta[i]/GeoModelKernelUnits::rad); - m_tubePosition[i][j][0] = tubeDistance*cos(tubePhiAngle[i][j]/CLHEP::rad); if (fabs(m_tubePosition[i][j][0]) < 1e-10) m_tubePosition[i][j][0] = 0; - m_tubePosition[i][j][1] = tubeDistance*sin(tubePhiAngle[i][j]/CLHEP::rad); if (fabs(m_tubePosition[i][j][1]) < 1e-10) m_tubePosition[i][j][1] = 0; + m_tubePosition[i][j][0] = tubeDistance*cos(tubePhiAngle[i][j]/GeoModelKernelUnits::rad); if (fabs(m_tubePosition[i][j][0]) < 1e-10) m_tubePosition[i][j][0] = 0; + m_tubePosition[i][j][1] = tubeDistance*sin(tubePhiAngle[i][j]/GeoModelKernelUnits::rad); if (fabs(m_tubePosition[i][j][1]) < 1e-10) m_tubePosition[i][j][1] = 0; } } @@ -274,13 +276,13 @@ void LUCID_DetectorFactory::calcTubeParams() { log << MSG::DEBUG << setiosflags(std::ios::right) << std::setw( 6) << lay << std::setw( 5) << tub - << std::setw(11) << m_lp->tubeRadius/CLHEP::mm - << std::setw(16) << layerRadius [lay]/CLHEP::mm - << std::setw(14) << m_tubeTheta [lay]/CLHEP::degree - << std::setw(19) << tubePhiOffset [lay]/CLHEP::degree - << std::setw(18) << tubePhiAngle [lay][tub]/CLHEP::degree - << std::setw(19) << m_tubePosition[lay][tub][0]/CLHEP::mm - << std::setw(18) << m_tubePosition[lay][tub][1]/CLHEP::mm + << std::setw(11) << m_lp->tubeRadius/GeoModelKernelUnits::mm + << std::setw(16) << layerRadius [lay]/GeoModelKernelUnits::mm + << std::setw(14) << m_tubeTheta [lay]/GeoModelKernelUnits::degree + << std::setw(19) << tubePhiOffset [lay]/GeoModelKernelUnits::degree + << std::setw(18) << tubePhiAngle [lay][tub]/GeoModelKernelUnits::degree + << std::setw(19) << m_tubePosition[lay][tub][0]/GeoModelKernelUnits::mm + << std::setw(18) << m_tubePosition[lay][tub][1]/GeoModelKernelUnits::mm << endmsg; log << MSG::DEBUG << " ********************************************************************************************************************************* " << endmsg; @@ -296,12 +298,12 @@ void LUCID_DetectorFactory::addVJcone(GeoFullPhysVol* parent) { m_lp->VJconeRadiusBack - m_lp->VJconeThickness, m_lp->VJconeRadiusFront, m_lp->VJconeRadiusBack, - (m_lp->VJconelength - (m_lp->VJconeFrontRingLength - m_lp->VJconeFrontRingOverlap))/2, 0*CLHEP::deg,360*CLHEP::deg); + (m_lp->VJconelength - (m_lp->VJconeFrontRingLength - m_lp->VJconeFrontRingOverlap))/2, 0*GeoModelKernelUnits::deg,360*GeoModelKernelUnits::deg); GeoLogVol* logVol0 = new GeoLogVol("lvVJcone", aShape0, m_alu); GeoPhysVol* phyVol0 = new GeoPhysVol(logVol0); - parent->add(new GeoTransform(HepGeom::TranslateZ3D((m_lp->VJconelength + (m_lp->VJconeFrontRingLength - m_lp->VJconeFrontRingOverlap))/2))); + parent->add(new GeoTransform(GeoTrf::TranslateZ3D((m_lp->VJconelength + (m_lp->VJconeFrontRingLength - m_lp->VJconeFrontRingOverlap))/2))); parent->add(new GeoNameTag("LucidVJcone")); parent->add(phyVol0); @@ -311,7 +313,7 @@ void LUCID_DetectorFactory::addVJcone(GeoFullPhysVol* parent) { GeoLogVol* logVol1 = new GeoLogVol("lvVJconeFrontRing", aShape1, m_alu); GeoPhysVol* phyVol1 = new GeoPhysVol(logVol1); - parent->add(new GeoTransform(HepGeom::TranslateZ3D(m_lp->VJconeFrontRingLength/2))); + parent->add(new GeoTransform(GeoTrf::TranslateZ3D(m_lp->VJconeFrontRingLength/2))); parent->add(new GeoNameTag("LucidVJconeFrontRing")); parent->add(phyVol1); } @@ -326,7 +328,7 @@ void LUCID_DetectorFactory::addCooling(GeoFullPhysVol* parent) { GeoLogVol* logVol = new GeoLogVol("lvCooling", aShape, m_cop); GeoPhysVol* phyVol = new GeoPhysVol(logVol); - parent->add(new GeoTransform(HepGeom::Translate3D(0, 0, m_lp->vesselLength/2 + (m_lp->distanceToIP - m_lp->VJdistanceToIP)))); + parent->add(new GeoTransform(GeoTrf::Translate3D(0, 0, m_lp->vesselLength/2 + (m_lp->distanceToIP - m_lp->VJdistanceToIP)))); parent->add(new GeoNameTag("LucidCooling")); parent->add(phyVol); } @@ -336,7 +338,7 @@ void LUCID_DetectorFactory::addVessel(GeoFullPhysVol* parent) { MsgStream log(Athena::getMessageSvc(), "LUCID_DetectorFactory::addVessel"); log << MSG::INFO << " LUCID_DetectorFactory::addVessel " << endmsg; - GeoPcon* aShape = new GeoPcon(0, 360*CLHEP::deg); + GeoPcon* aShape = new GeoPcon(0, 360*GeoModelKernelUnits::deg); aShape->addPlane( 0, m_lp->vesselInnerRadius, m_lp->vesselOuterRadMin + m_lp->vesselOuterThickness); aShape->addPlane(m_lp->vesselLength, m_lp->vesselInnerRadius, m_lp->vesselOuterRadMax + m_lp->vesselOuterThickness); @@ -347,7 +349,7 @@ void LUCID_DetectorFactory::addVessel(GeoFullPhysVol* parent) { addVesselGas(phyVol); - parent->add(new GeoAlignableTransform(HepGeom::Translate3D(0, 0, m_lp->distanceToIP - m_lp->VJdistanceToIP ))); + parent->add(new GeoAlignableTransform(GeoTrf::Translate3D(0, 0, m_lp->distanceToIP - m_lp->VJdistanceToIP ))); parent->add(new GeoNameTag("LucidVessel")); parent->add(phyVol); } @@ -358,7 +360,7 @@ void LUCID_DetectorFactory::addVesselGas(GeoPhysVol* parent) { log << MSG::INFO << " LUCID_DetectorFactory::addVesselGas " << endmsg; - GeoPcon* aShape = new GeoPcon(0, 360*CLHEP::deg); + GeoPcon* aShape = new GeoPcon(0, 360*GeoModelKernelUnits::deg); aShape->addPlane( 0, m_lp->vesselInnerRadius + m_lp->vesselInnerThickness, m_lp->vesselOuterRadMin); aShape->addPlane(m_lp->vesselLength, m_lp->vesselInnerRadius + m_lp->vesselInnerThickness, m_lp->vesselOuterRadMax); @@ -382,7 +384,7 @@ void LUCID_DetectorFactory::addBulkHeads(GeoPhysVol* parent) { GeoLogVol* logVol0 = new GeoLogVol("lvBulkHead0", aShape0, m_alu); GeoPhysVol* phyVol0 = new GeoPhysVol(logVol0); - parent->add(new GeoTransform(HepGeom::Translate3D(0, 0, m_lp->bulkheadThickness/2))); + parent->add(new GeoTransform(GeoTrf::Translate3D(0, 0, m_lp->bulkheadThickness/2))); parent->add(new GeoNameTag("LucidBulkHead0")); parent->add(phyVol0); @@ -390,7 +392,7 @@ void LUCID_DetectorFactory::addBulkHeads(GeoPhysVol* parent) { GeoLogVol* logVol1 = new GeoLogVol("lvBulkHead1", aShape1, m_alu); GeoPhysVol* phyVol1 = new GeoPhysVol(logVol1); - parent->add(new GeoTransform(HepGeom::Translate3D(0, 0, m_lp->vesselLength - m_lp->bulkheadThickness/2))); + parent->add(new GeoTransform(GeoTrf::Translate3D(0, 0, m_lp->vesselLength - m_lp->bulkheadThickness/2))); parent->add(new GeoNameTag("LucidBulkHead1")); parent->add(phyVol1); } @@ -428,30 +430,31 @@ void LUCID_DetectorFactory::addTubes(GeoPhysVol* parent) { double x = m_tubePosition[lay][tub][0]; double y = m_tubePosition[lay][tub][1]; - + double r = sqrt(x*x+y*y); + char sname[256]; log << MSG::DEBUG << " Add PMT as daugther of the TubeGas " << endmsg; sprintf(sname, "LucidPmt%d", tubeNumber); phyVol2->add(new GeoNameTag (sname)); - phyVol2->add(new GeoTransform(HepGeom::Translate3D(0, 0, (m_lp->tubeLength - m_lp->pmtThickness)/2))); + phyVol2->add(new GeoTransform(GeoTrf::Translate3D(0, 0, (m_lp->tubeLength - m_lp->pmtThickness)/2))); phyVol2->add(phyVol3); log << MSG::DEBUG << " Add Alluminium Tube as daugther of the VesselGas " << endmsg; sprintf(sname, "LucidTube%d", tubeNumber); parent->add(new GeoNameTag (sname)); - parent->add(new GeoTransform(HepGeom::Rotate3D (m_tubeTheta[lay], CLHEP::Hep3Vector(-y, x, 0)))); - parent->add(new GeoTransform(HepGeom::Translate3D(x, y, m_lp->vesselLength/2 + (m_lp->vesselLength - m_lp->tubeLength)/2 - m_lp->bulkheadThickness))); + parent->add(new GeoTransform(GeoTrf::Rotate3D (m_tubeTheta[lay],GeoTrf:: Vector3D(-y/r, x/r, 0)))); + parent->add(new GeoTransform(GeoTrf::Translate3D(x, y, m_lp->vesselLength/2 + (m_lp->vesselLength - m_lp->tubeLength)/2 - m_lp->bulkheadThickness))); parent->add(phyVol1); log << MSG::DEBUG << " Add TubeGas as daugther of the VesselGas " << endmsg; sprintf(sname, "LucidTubeGas%d", tubeNumber); parent->add(new GeoNameTag (sname)); - parent->add(new GeoTransform(HepGeom::Rotate3D (m_tubeTheta[lay], CLHEP::Hep3Vector(-y, x, 0)))); - parent->add(new GeoTransform(HepGeom::Translate3D(x, y, m_lp->vesselLength/2 + (m_lp->vesselLength - m_lp->tubeLength)/2 - m_lp->bulkheadThickness))); + parent->add(new GeoTransform(GeoTrf::Rotate3D (m_tubeTheta[lay], GeoTrf::Vector3D(-y/r, x/r, 0)))); + parent->add(new GeoTransform(GeoTrf::Translate3D(x, y, m_lp->vesselLength/2 + (m_lp->vesselLength - m_lp->tubeLength)/2 - m_lp->bulkheadThickness))); parent->add(phyVol2); log << MSG::DEBUG << " Add the Optical Surface between Gas and Tube physica volumes " << endmsg; @@ -479,6 +482,7 @@ void LUCID_DetectorFactory::addTubes(GeoPhysVol* parent) { log << MSG::DEBUG << " Set Fiber-Readout Tubes on Inner layer at 45 degrees " << endmsg; x = y = r*cos(M_PI/4); + double r1 = sqrt(x*x + y*y); if (tubeNumber==17 || tubeNumber==18) x = -x; if (tubeNumber==18 || tubeNumber==19) y = -y; @@ -489,23 +493,23 @@ void LUCID_DetectorFactory::addTubes(GeoPhysVol* parent) { sprintf(sname, "LucidPmt%d", tubeNumber); phyVol2->add(new GeoNameTag (sname)); - phyVol2->add(new GeoTransform(HepGeom::Translate3D(0, 0, (m_lp->tubeLength - m_lp->pmtThickness)/2))); + phyVol2->add(new GeoTransform(GeoTrf::Translate3D(0, 0, (m_lp->tubeLength - m_lp->pmtThickness)/2))); phyVol2->add(phyVol3); log << MSG::DEBUG << " Add Alluminium Tube as daugther of the VesselGas " << endmsg; sprintf(sname, "LucidTube%d", tubeNumber); parent->add(new GeoNameTag (sname)); - parent->add(new GeoTransform(HepGeom::Rotate3D (m_tubeTheta[0], CLHEP::Hep3Vector(-y, x, 0)))); - parent->add(new GeoTransform(HepGeom::Translate3D(x, y, m_lp->vesselLength/2 + (m_lp->vesselLength - m_lp->tubeLength)/2 - m_lp->bulkheadThickness))); + parent->add(new GeoTransform(GeoTrf::Rotate3D (m_tubeTheta[0], GeoTrf::Vector3D(-y/r1, x/r1, 0)))); + parent->add(new GeoTransform(GeoTrf::Translate3D(x, y, m_lp->vesselLength/2 + (m_lp->vesselLength - m_lp->tubeLength)/2 - m_lp->bulkheadThickness))); parent->add(phyVol1); log << MSG::DEBUG << " Add TubeGas as daugther of the VesselGas " << endmsg; sprintf(sname, "LucidTubeGas%d", tubeNumber); parent->add(new GeoNameTag (sname)); - parent->add(new GeoTransform(HepGeom::Rotate3D (m_tubeTheta[0], CLHEP::Hep3Vector(-y, x, 0)))); - parent->add(new GeoTransform(HepGeom::Translate3D(x, y, m_lp->vesselLength/2 + (m_lp->vesselLength - m_lp->tubeLength )/2 - m_lp->bulkheadThickness))); + parent->add(new GeoTransform(GeoTrf::Rotate3D (m_tubeTheta[0], GeoTrf::Vector3D(-y/r1, x/r1, 0)))); + parent->add(new GeoTransform(GeoTrf::Translate3D(x, y, m_lp->vesselLength/2 + (m_lp->vesselLength - m_lp->tubeLength )/2 - m_lp->bulkheadThickness))); parent->add(phyVol2); log << MSG::DEBUG << " Add the Optical Surface between Gas and Tube physica volumes " << endmsg; diff --git a/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_RDBAaccess.cxx b/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_RDBAaccess.cxx index 9942f3f901e..f301f728917 100755 --- a/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_RDBAaccess.cxx +++ b/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_RDBAaccess.cxx @@ -4,7 +4,8 @@ #include "LUCID_RDBAaccess.h" -#include "CLHEP/Units/SystemOfUnits.h" +//#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include "GeoModelUtilities/DecodeVersionKey.h" #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -72,34 +73,34 @@ void LUCID_RDBAccess::SetParameters() { for(AccessSvc_iter = m_lucidParams->begin(); AccessSvc_iter != m_lucidParams->end(); AccessSvc_iter++) { - distanceToIP = (*AccessSvc_iter)->getDouble("DISTANCETOIP")*CLHEP::mm; - VJdistanceToIP = (*AccessSvc_iter)->getDouble("VJDISTANCETOIP")*CLHEP::mm; - VJconelength = (*AccessSvc_iter)->getDouble("VJCONELENGTH")*CLHEP::mm; - VJconeRadiusFront = (*AccessSvc_iter)->getDouble("VJCONERADIUSFRONT")*CLHEP::mm; - VJconeRadiusBack = (*AccessSvc_iter)->getDouble("VJCONERADIUSBACK")*CLHEP::mm; - VJconeThickness = (*AccessSvc_iter)->getDouble("VJCONETHICKNESS")*CLHEP::mm; - VJconeFrontRingThickness = (*AccessSvc_iter)->getDouble("VJCONEFRONTRINGTHICKNESS")*CLHEP::mm; - VJconeFrontRingLength = (*AccessSvc_iter)->getDouble("VJCONEFRONTRINGLENGTH")*CLHEP::mm; - VJconeFrontRingOverlap = (*AccessSvc_iter)->getDouble("VJCONEFRONTRINGOVERLAP")*CLHEP::mm; - vesselInnerRadius = (*AccessSvc_iter)->getDouble("VESSELINNERRADIUS")*CLHEP::mm; - vesselInnerThickness = (*AccessSvc_iter)->getDouble("VESSELINNERTHICKNESS")*CLHEP::mm; - vesselOuterRadMin = (*AccessSvc_iter)->getDouble("VESSELOUTERRADMIN")*CLHEP::mm + 3*CLHEP::mm; - vesselOuterRadMax = (*AccessSvc_iter)->getDouble("VESSELOUTERRADMAX")*CLHEP::mm + 3*CLHEP::mm; - vesselOuterThickness = (*AccessSvc_iter)->getDouble("VESSELOUTERTHICKNESS")*CLHEP::mm; - vesselLength = (*AccessSvc_iter)->getDouble("VESSELLENGTH")*CLHEP::mm; - bulkheadThickness = (*AccessSvc_iter)->getDouble("BULKHEADTHICKNESS")*CLHEP::mm; - coolingRadius = (*AccessSvc_iter)->getDouble("COOLINGRADIUS")*CLHEP::mm; - coolingThickness = (*AccessSvc_iter)->getDouble("COOLINGTHICKNESS")*CLHEP::mm; - layerRadius1 = (*AccessSvc_iter)->getDouble("LAYERRADIUS1")*CLHEP::mm; - layerRadius2 = (*AccessSvc_iter)->getDouble("LAYERRADIUS2")*CLHEP::mm; - tubeRadius = (*AccessSvc_iter)->getDouble("TUBERADIUS")*CLHEP::mm; - tubeThickness = (*AccessSvc_iter)->getDouble("TUBETHICKNESS")*CLHEP::mm; - tubeLength = (*AccessSvc_iter)->getDouble("TUBELENGTH")*CLHEP::mm; - pmtThickness = (*AccessSvc_iter)->getDouble("PMTTHICKNESS")*CLHEP::mm; - gasPressure = (*AccessSvc_iter)->getDouble("GASPRESSURE")*CLHEP::bar; - gasDensity = (*AccessSvc_iter)->getDouble("GASDENSITY")*CLHEP::gram/CLHEP::cm3; - gasTemperature = (*AccessSvc_iter)->getDouble("GASTEMPERATURE")*CLHEP::kelvin; - quartzDensity = (*AccessSvc_iter)->getDouble("QUARTZDENSITY")*CLHEP::gram/CLHEP::cm3; + distanceToIP = (*AccessSvc_iter)->getDouble("DISTANCETOIP")*GeoModelKernelUnits::mm; + VJdistanceToIP = (*AccessSvc_iter)->getDouble("VJDISTANCETOIP")*GeoModelKernelUnits::mm; + VJconelength = (*AccessSvc_iter)->getDouble("VJCONELENGTH")*GeoModelKernelUnits::mm; + VJconeRadiusFront = (*AccessSvc_iter)->getDouble("VJCONERADIUSFRONT")*GeoModelKernelUnits::mm; + VJconeRadiusBack = (*AccessSvc_iter)->getDouble("VJCONERADIUSBACK")*GeoModelKernelUnits::mm; + VJconeThickness = (*AccessSvc_iter)->getDouble("VJCONETHICKNESS")*GeoModelKernelUnits::mm; + VJconeFrontRingThickness = (*AccessSvc_iter)->getDouble("VJCONEFRONTRINGTHICKNESS")*GeoModelKernelUnits::mm; + VJconeFrontRingLength = (*AccessSvc_iter)->getDouble("VJCONEFRONTRINGLENGTH")*GeoModelKernelUnits::mm; + VJconeFrontRingOverlap = (*AccessSvc_iter)->getDouble("VJCONEFRONTRINGOVERLAP")*GeoModelKernelUnits::mm; + vesselInnerRadius = (*AccessSvc_iter)->getDouble("VESSELINNERRADIUS")*GeoModelKernelUnits::mm; + vesselInnerThickness = (*AccessSvc_iter)->getDouble("VESSELINNERTHICKNESS")*GeoModelKernelUnits::mm; + vesselOuterRadMin = (*AccessSvc_iter)->getDouble("VESSELOUTERRADMIN")*GeoModelKernelUnits::mm + 3*GeoModelKernelUnits::mm; + vesselOuterRadMax = (*AccessSvc_iter)->getDouble("VESSELOUTERRADMAX")*GeoModelKernelUnits::mm + 3*GeoModelKernelUnits::mm; + vesselOuterThickness = (*AccessSvc_iter)->getDouble("VESSELOUTERTHICKNESS")*GeoModelKernelUnits::mm; + vesselLength = (*AccessSvc_iter)->getDouble("VESSELLENGTH")*GeoModelKernelUnits::mm; + bulkheadThickness = (*AccessSvc_iter)->getDouble("BULKHEADTHICKNESS")*GeoModelKernelUnits::mm; + coolingRadius = (*AccessSvc_iter)->getDouble("COOLINGRADIUS")*GeoModelKernelUnits::mm; + coolingThickness = (*AccessSvc_iter)->getDouble("COOLINGTHICKNESS")*GeoModelKernelUnits::mm; + layerRadius1 = (*AccessSvc_iter)->getDouble("LAYERRADIUS1")*GeoModelKernelUnits::mm; + layerRadius2 = (*AccessSvc_iter)->getDouble("LAYERRADIUS2")*GeoModelKernelUnits::mm; + tubeRadius = (*AccessSvc_iter)->getDouble("TUBERADIUS")*GeoModelKernelUnits::mm; + tubeThickness = (*AccessSvc_iter)->getDouble("TUBETHICKNESS")*GeoModelKernelUnits::mm; + tubeLength = (*AccessSvc_iter)->getDouble("TUBELENGTH")*GeoModelKernelUnits::mm; + pmtThickness = (*AccessSvc_iter)->getDouble("PMTTHICKNESS")*GeoModelKernelUnits::mm; + gasPressure = (*AccessSvc_iter)->getDouble("GASPRESSURE")*GeoModelKernelUnits::bar; + gasDensity = (*AccessSvc_iter)->getDouble("GASDENSITY")*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3; + gasTemperature = (*AccessSvc_iter)->getDouble("GASTEMPERATURE")*GeoModelKernelUnits::kelvin; + quartzDensity = (*AccessSvc_iter)->getDouble("QUARTZDENSITY")*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3; tubePolish = (*AccessSvc_iter)->getDouble("TUBEPOLISH"); waveLengthStep = (*AccessSvc_iter)->getDouble("WAVELENGTHSTEP"); waveLengthMin = (*AccessSvc_iter)->getDouble("WAVELENGTHMIN"); @@ -111,26 +112,26 @@ void LUCID_RDBAccess::Print() { MsgStream log(Athena::getMessageSvc(), "LUCID_GeoModel::LUCID_RDBAaccess"); - log << MSG::DEBUG << " distanceToIP [mm]: " << distanceToIP/CLHEP::mm << endmsg; - log << MSG::DEBUG << " vesselInnerRadius [mm]: " << vesselInnerRadius/CLHEP::mm << endmsg; - log << MSG::DEBUG << " vesselInnerThickness [mm]: " << vesselInnerThickness/CLHEP::mm << endmsg; - log << MSG::DEBUG << " vesselOuterRadMin [mm]: " << vesselOuterRadMin /CLHEP::mm << endmsg; - log << MSG::DEBUG << " vesselOuterRadMax [mm]: " << vesselOuterRadMax/CLHEP::mm << endmsg; - log << MSG::DEBUG << " vesselOuterThickness [mm]: " << vesselOuterThickness/CLHEP::mm << endmsg; - log << MSG::DEBUG << " vesselLength [mm]: " << vesselLength /CLHEP::mm << endmsg; - log << MSG::DEBUG << " bulkheadThickness [mm]: " << bulkheadThickness/CLHEP::mm << endmsg; - log << MSG::DEBUG << " coolingRadius [mm]: " << coolingRadius/CLHEP::mm << endmsg; - log << MSG::DEBUG << " coolingThickness [mm]: " << coolingThickness/CLHEP::mm << endmsg; - log << MSG::DEBUG << " layerRadius1 [mm]: " << layerRadius1/CLHEP::mm << endmsg; - log << MSG::DEBUG << " layerRadius2 [mm]: " << layerRadius2/CLHEP::mm << endmsg; - log << MSG::DEBUG << " tubeRadius [mm]: " << tubeRadius/CLHEP::mm << endmsg; - log << MSG::DEBUG << " tubeThickness [mm]: " << tubeThickness/CLHEP::mm << endmsg; - log << MSG::DEBUG << " tubeLength [mm]: " << tubeLength/CLHEP::mm << endmsg; - log << MSG::DEBUG << " pmtThickness [mm]: " << pmtThickness/CLHEP::mm << endmsg; - log << MSG::DEBUG << " gasPressure [bar]: " << gasPressure/CLHEP::bar << endmsg; - log << MSG::DEBUG << " gasDensity [g/cm3]: " << gasDensity/(CLHEP::gram/CLHEP::cm3) << endmsg; - log << MSG::DEBUG << " gasTempearture [kelvin]: " << gasTemperature/CLHEP::kelvin << endmsg; - log << MSG::DEBUG << " quartzDensity [g/cm3]: " << quartzDensity/(CLHEP::gram/CLHEP::cm3) << endmsg; + log << MSG::DEBUG << " distanceToIP [mm]: " << distanceToIP/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " vesselInnerRadius [mm]: " << vesselInnerRadius/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " vesselInnerThickness [mm]: " << vesselInnerThickness/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " vesselOuterRadMin [mm]: " << vesselOuterRadMin /GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " vesselOuterRadMax [mm]: " << vesselOuterRadMax/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " vesselOuterThickness [mm]: " << vesselOuterThickness/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " vesselLength [mm]: " << vesselLength /GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " bulkheadThickness [mm]: " << bulkheadThickness/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " coolingRadius [mm]: " << coolingRadius/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " coolingThickness [mm]: " << coolingThickness/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " layerRadius1 [mm]: " << layerRadius1/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " layerRadius2 [mm]: " << layerRadius2/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " tubeRadius [mm]: " << tubeRadius/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " tubeThickness [mm]: " << tubeThickness/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " tubeLength [mm]: " << tubeLength/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " pmtThickness [mm]: " << pmtThickness/GeoModelKernelUnits::mm << endmsg; + log << MSG::DEBUG << " gasPressure [bar]: " << gasPressure/GeoModelKernelUnits::bar << endmsg; + log << MSG::DEBUG << " gasDensity [g/cm3]: " << gasDensity/(GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3) << endmsg; + log << MSG::DEBUG << " gasTempearture [kelvin]: " << gasTemperature/GeoModelKernelUnits::kelvin << endmsg; + log << MSG::DEBUG << " quartzDensity [g/cm3]: " << quartzDensity/(GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3) << endmsg; log << MSG::DEBUG << " tubePolish : " << tubePolish << endmsg; log << MSG::DEBUG << " waveLengthStep : " << waveLengthStep << endmsg; log << MSG::DEBUG << " waveLengthMin : " << waveLengthMin << endmsg; diff --git a/ForwardDetectors/ZDC/ZDC_GeoM/CMakeLists.txt b/ForwardDetectors/ZDC/ZDC_GeoM/CMakeLists.txt index 8cd8f0f156b..0bdd429f705 100644 --- a/ForwardDetectors/ZDC/ZDC_GeoM/CMakeLists.txt +++ b/ForwardDetectors/ZDC/ZDC_GeoM/CMakeLists.txt @@ -8,21 +8,24 @@ atlas_subdir( ZDC_GeoM ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities PRIVATE Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces GaudiKernel ) +# External dependencies: +find_package( GeoModel ) + + # Component(s) in the package: atlas_add_library( ZDC_GeoMLib src/*.cxx PUBLIC_HEADERS ZDC_GeoM - LINK_LIBRARIES AthenaKernel GeoModelKernel GeoModelUtilities StoreGateLib SGtests + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities StoreGateLib SGtests PRIVATE_LINK_LIBRARIES GaudiKernel ) atlas_add_component( ZDC_GeoM src/components/*.cxx - LINK_LIBRARIES AthenaKernel GeoModelKernel GeoModelUtilities StoreGateLib SGtests GaudiKernel ZDC_GeoMLib ) + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities StoreGateLib SGtests GaudiKernel ZDC_GeoMLib ) diff --git a/ForwardDetectors/ZDC/ZDC_GeoM/src/ZDC_DetFactory.cxx b/ForwardDetectors/ZDC/ZDC_GeoM/src/ZDC_DetFactory.cxx index 547e1939b1e..89a9a75de05 100644 --- a/ForwardDetectors/ZDC/ZDC_GeoM/src/ZDC_DetFactory.cxx +++ b/ForwardDetectors/ZDC/ZDC_GeoM/src/ZDC_DetFactory.cxx @@ -18,6 +18,8 @@ #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoSerialTransformer.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -34,7 +36,7 @@ //I have assumed that the cavity is 1016mm (4*4=16mm larger than the one in the above webpage) //Ionization chamber material is air currently -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; ZDC_DetFactory::ZDC_DetFactory(StoreGateSvc* detStore) : m_detectorManager(NULL) , m_detectorStore(detStore) {} @@ -53,27 +55,27 @@ void ZDC_DetFactory::create(GeoPhysVol* world) const GeoMaterial* air = materialManager->getMaterial("std::Air"); - GeoElement* Oxygen = new GeoElement ("Oxygen" ,"O" , 8.0 , 16.0*CLHEP::g/CLHEP::mole); - GeoElement* Sillicon = new GeoElement ("Sillicon","Si" , 14.0 , 28.085*CLHEP::g/CLHEP::mole); - GeoElement* Tung = new GeoElement ("Tungsten","W" , 74.0 , 183.84*CLHEP::g/CLHEP::mole); - GeoElement* Iron = new GeoElement ("Iron" ,"Fe" , 26.0 , 55.845 *CLHEP::g/CLHEP::mole); - GeoElement* Carbon = new GeoElement ("Carbon" ,"C" , 6.0 , 12.0107*CLHEP::g/CLHEP::mole); - GeoElement* Nickel = new GeoElement ("Nickel" ,"Ni" , 28.0 , 58.6934*CLHEP::g/CLHEP::mole); + GeoElement* Oxygen = new GeoElement ("Oxygen" ,"O" , 8.0 , 16.0*GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + GeoElement* Sillicon = new GeoElement ("Sillicon","Si" , 14.0 , 28.085*GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + GeoElement* Tung = new GeoElement ("Tungsten","W" , 74.0 , 183.84*GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + GeoElement* Iron = new GeoElement ("Iron" ,"Fe" , 26.0 , 55.845 *GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + GeoElement* Carbon = new GeoElement ("Carbon" ,"C" , 6.0 , 12.0107*GeoModelKernelUnits::g/GeoModelKernelUnits::mole); + GeoElement* Nickel = new GeoElement ("Nickel" ,"Ni" , 28.0 , 58.6934*GeoModelKernelUnits::g/GeoModelKernelUnits::mole); - GeoMaterial* Quartz = new GeoMaterial("Quartz",2.20*CLHEP::gram/CLHEP::cm3); + GeoMaterial* Quartz = new GeoMaterial("Quartz",2.20*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); Quartz->add(Sillicon,0.467); Quartz->add(Oxygen,0.533); Quartz->lock(); // Absorber composition: savannah.cern.ch/task/download.php?file_id=22925 - GeoMaterial* Tungsten = new GeoMaterial("Tungsten",18.155*CLHEP::g/CLHEP::cm3); + GeoMaterial* Tungsten = new GeoMaterial("Tungsten",18.155*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Tungsten->add(Tung, 0.948); Tungsten->add(Nickel, 0.037); Tungsten->add(Iron, 0.015); Tungsten->lock(); - GeoMaterial* Steel = new GeoMaterial("Steel", 7.9*CLHEP::gram/CLHEP::cm3); + GeoMaterial* Steel = new GeoMaterial("Steel", 7.9*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); Steel->add(Iron , 0.98); Steel->add(Carbon, 0.02); Steel->lock(); @@ -82,11 +84,11 @@ void ZDC_DetFactory::create(GeoPhysVol* world) //List of shapes and logical volumes //https://atlasop.cern.ch/atlas-point1/twiki/pub/Main/ZDCOperationManualShifter/zdc_layout.png - GeoBox* Envelope_Box = new GeoBox (10.0*CLHEP::cm/2.0 ,20.0*CLHEP::cm/2.0 ,100.0*CLHEP::cm/2.0); - GeoBox* Module_Box = new GeoBox ( 9.0*CLHEP::cm/2.0 ,18.0*CLHEP::cm/2.0 , 13.4*CLHEP::cm/2.0); - GeoBox* Steel_Plate_Box = new GeoBox ( 9.0*CLHEP::cm/2.0 ,18.0*CLHEP::cm/2.0 , 1.0*CLHEP::cm/2.0); - GeoTube* Pixel_Tube = new GeoTube( 0.0*CLHEP::mm , 1.0*CLHEP::mm/2.0 , 13.4*CLHEP::cm/2.0); - GeoTube* Strip_Tube = new GeoTube( 0.0*CLHEP::mm , 1.5*CLHEP::mm/2.0 , 18.0*CLHEP::cm/2.0); + GeoBox* Envelope_Box = new GeoBox (10.0*GeoModelKernelUnits::cm/2.0 ,20.0*GeoModelKernelUnits::cm/2.0 ,100.0*GeoModelKernelUnits::cm/2.0); + GeoBox* Module_Box = new GeoBox ( 9.0*GeoModelKernelUnits::cm/2.0 ,18.0*GeoModelKernelUnits::cm/2.0 , 13.4*GeoModelKernelUnits::cm/2.0); + GeoBox* Steel_Plate_Box = new GeoBox ( 9.0*GeoModelKernelUnits::cm/2.0 ,18.0*GeoModelKernelUnits::cm/2.0 , 1.0*GeoModelKernelUnits::cm/2.0); + GeoTube* Pixel_Tube = new GeoTube( 0.0*GeoModelKernelUnits::mm , 1.0*GeoModelKernelUnits::mm/2.0 , 13.4*GeoModelKernelUnits::cm/2.0); + GeoTube* Strip_Tube = new GeoTube( 0.0*GeoModelKernelUnits::mm , 1.5*GeoModelKernelUnits::mm/2.0 , 18.0*GeoModelKernelUnits::cm/2.0); GeoLogVol* Envelope_Logical = new GeoLogVol("Envelope_Logical" ,Envelope_Box ,air); GeoLogVol* Steel_Plate_Logical = new GeoLogVol("Steel_Plate_Logical",Steel_Plate_Box ,Steel); @@ -122,8 +124,8 @@ void ZDC_DetFactory::create(GeoPhysVol* world) GeoIdentifierTag* Pixel_ID = new GeoIdentifierTag( 11000+L1*8+K1); GeoFullPhysVol* Pixel_Physical = new GeoFullPhysVol(Pixel_Logical); - ShiftX = new GeoAlignableTransform(HepGeom::TranslateX3D((4.5-K)*CLHEP::cm)); - ShiftY = new GeoAlignableTransform(HepGeom::TranslateY3D((4.5-L)*CLHEP::cm)); + ShiftX = new GeoAlignableTransform(GeoTrf::TranslateX3D((4.5-K)*GeoModelKernelUnits::cm)); + ShiftY = new GeoAlignableTransform(GeoTrf::TranslateY3D((4.5-L)*GeoModelKernelUnits::cm)); Module_Physical[0][0]->add(Pixel_ID); Module_Physical[0][0]->add(ShiftX); @@ -149,8 +151,8 @@ void ZDC_DetFactory::create(GeoPhysVol* world) GeoIdentifierTag* Pixel_ID = new GeoIdentifierTag( I*10000+2000+ Pix_id); GeoFullPhysVol* Pixel_Physical = new GeoFullPhysVol(Pixel_Logical); - ShiftX = new GeoAlignableTransform(HepGeom::TranslateX3D( (4.5-K)*CLHEP::cm )); - ShiftY = new GeoAlignableTransform(HepGeom::TranslateY3D( (5.5-L)*CLHEP::cm )); + ShiftX = new GeoAlignableTransform(GeoTrf::TranslateX3D( (4.5-K)*GeoModelKernelUnits::cm )); + ShiftY = new GeoAlignableTransform(GeoTrf::TranslateY3D( (5.5-L)*GeoModelKernelUnits::cm )); Module_Physical[I-1][1]->add(Pixel_ID); Module_Physical[I-1][1]->add(ShiftX); @@ -169,9 +171,9 @@ void ZDC_DetFactory::create(GeoPhysVol* world) GeoFullPhysVol* Strip_Physical = new GeoFullPhysVol (Strip_Logical); GeoIdentifierTag* Strip_ID = new GeoIdentifierTag(I*10000+J*1000+K*12+L*10+M); - RotateX = new GeoAlignableTransform(HepGeom::RotateX3D (90*CLHEP::deg)); - ShiftX = new GeoAlignableTransform(HepGeom::TranslateX3D((L-5.5)*CLHEP::cm + (M-0.75)*1.5*CLHEP::mm +0.75*CLHEP::mm)); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((K*1.2 - 7.8)*CLHEP::cm)); + RotateX = new GeoAlignableTransform(GeoTrf::RotateX3D (90*GeoModelKernelUnits::deg)); + ShiftX = new GeoAlignableTransform(GeoTrf::TranslateX3D((L-5.5)*GeoModelKernelUnits::cm + (M-0.75)*1.5*GeoModelKernelUnits::mm +0.75*GeoModelKernelUnits::mm)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((K*1.2 - 7.8)*GeoModelKernelUnits::cm)); Module_Physical[I-1][J-1]->add(Strip_ID); Module_Physical[I-1][J-1]->add(ShiftZ); @@ -194,9 +196,9 @@ void ZDC_DetFactory::create(GeoPhysVol* world) GeoFullPhysVol* Strip_Physical = new GeoFullPhysVol(Strip_Logical); GeoIdentifierTag* Strip_ID = new GeoIdentifierTag(I*10000 + J*1000 + K*12 + L*10 + M); - RotateX = new GeoAlignableTransform(HepGeom::RotateX3D (90*CLHEP::deg)); - ShiftX = new GeoAlignableTransform(HepGeom::TranslateX3D((L-5.5)*CLHEP::cm + (M-0.75)*1.5*CLHEP::mm + 0.75*CLHEP::mm)); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((K*1.2-7.8)*CLHEP::cm )); + RotateX = new GeoAlignableTransform(GeoTrf::RotateX3D (90*GeoModelKernelUnits::deg)); + ShiftX = new GeoAlignableTransform(GeoTrf::TranslateX3D((L-5.5)*GeoModelKernelUnits::cm + (M-0.75)*1.5*GeoModelKernelUnits::mm + 0.75*GeoModelKernelUnits::mm)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((K*1.2-7.8)*GeoModelKernelUnits::cm )); Module_Physical[I-1][J-1]->add(Strip_ID); Module_Physical[I-1][J-1]->add(ShiftZ); @@ -226,13 +228,13 @@ void ZDC_DetFactory::create(GeoPhysVol* world) Envelope_Physical[I] = new GeoFullPhysVol(Envelope_Logical); Steel_Plate_Physical = new GeoFullPhysVol(Steel_Plate_Logical); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 0.5)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 0.5)*GeoModelKernelUnits::cm*sgn)); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Steel_Plate_Physical); Vol_Name = "EM_XY"; Vol_Name = Vol_Name + Vol_Name_append; - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D ((-47.2 + 1 + 6.7)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D ((-47.2 + 1 + 6.7)*GeoModelKernelUnits::cm*sgn)); tag = new GeoNameTag(Vol_Name.c_str()); Envelope_Physical[I]->add(tag); @@ -240,58 +242,58 @@ void ZDC_DetFactory::create(GeoPhysVol* world) Envelope_Physical[I]->add(Module_Physical[I][0]); Steel_Plate_Physical = new GeoFullPhysVol(Steel_Plate_Logical); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 +.5)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 +.5)*GeoModelKernelUnits::cm*sgn)); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Steel_Plate_Physical); Steel_Plate_Physical = new GeoFullPhysVol(Steel_Plate_Logical); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + .5)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + .5)*GeoModelKernelUnits::cm*sgn)); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Steel_Plate_Physical); Vol_Name = "HM_XY"; Vol_Name = Vol_Name + Vol_Name_append; - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 6.7)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 6.7)*GeoModelKernelUnits::cm*sgn)); tag = new GeoNameTag(Vol_Name.c_str()); Envelope_Physical[I]->add(tag); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Module_Physical[I][1]); Steel_Plate_Physical = new GeoFullPhysVol(Steel_Plate_Logical); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + .5)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + .5)*GeoModelKernelUnits::cm*sgn)); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Steel_Plate_Physical); Steel_Plate_Physical = new GeoFullPhysVol(Steel_Plate_Logical); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 +.5)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 +.5)*GeoModelKernelUnits::cm*sgn)); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Steel_Plate_Physical); Vol_Name = "HM_01"; Vol_Name = Vol_Name + Vol_Name_append; - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 6.7)*CLHEP::cm*sgn )); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 6.7)*GeoModelKernelUnits::cm*sgn )); tag = new GeoNameTag(Vol_Name.c_str()); Envelope_Physical[I]->add(tag); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Module_Physical[I][2]); Steel_Plate_Physical = new GeoFullPhysVol(Steel_Plate_Logical); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 13.4 + .5)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 13.4 + .5)*GeoModelKernelUnits::cm*sgn)); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Steel_Plate_Physical); Steel_Plate_Physical = new GeoFullPhysVol(Steel_Plate_Logical); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 13.4 + 1 + .5)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 13.4 + 1 + .5)*GeoModelKernelUnits::cm*sgn)); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Steel_Plate_Physical); Vol_Name = "HM_02"; Vol_Name = Vol_Name + Vol_Name_append; - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 13.4 + 1 + 1 + 6.7)*CLHEP::cm*sgn )); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 13.4 + 1 + 1 + 6.7)*GeoModelKernelUnits::cm*sgn )); tag = new GeoNameTag(Vol_Name.c_str()); Envelope_Physical[I]->add(tag); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Module_Physical[I][3]); Steel_Plate_Physical = new GeoFullPhysVol(Steel_Plate_Logical); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 13.4 + 1 + 1 + 13.4 + .5)*CLHEP::cm*sgn)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D((-47.2 + 1 + 13.4 + 1 + 6 + 10 + 1 + 13.4 + 1 + 3 + 1 + 13.4 + 1 + 1 + 13.4 + .5)*GeoModelKernelUnits::cm*sgn)); Envelope_Physical[I]->add(ShiftZ); Envelope_Physical[I]->add(Steel_Plate_Physical); } @@ -303,7 +305,7 @@ void ZDC_DetFactory::create(GeoPhysVol* world) world->add(tag); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D(-141.580*CLHEP::m)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D(-141.580*GeoModelKernelUnits::m)); world->add(ShiftZ); world->add(Envelope_Physical[0]); @@ -318,7 +320,7 @@ void ZDC_DetFactory::create(GeoPhysVol* world) world->add(tag); - ShiftZ = new GeoAlignableTransform(HepGeom::TranslateZ3D(141.580 *CLHEP::m)); + ShiftZ = new GeoAlignableTransform(GeoTrf::TranslateZ3D(141.580 *GeoModelKernelUnits::m)); world->add(ShiftZ); world->add(Envelope_Physical[1]); diff --git a/Generators/GeneratorFilters/GeneratorFilters/VBFMjjIntervalFilter.h b/Generators/GeneratorFilters/GeneratorFilters/VBFMjjIntervalFilter.h index d321064c034..54dc51fe82f 100644 --- a/Generators/GeneratorFilters/GeneratorFilters/VBFMjjIntervalFilter.h +++ b/Generators/GeneratorFilters/GeneratorFilters/VBFMjjIntervalFilter.h @@ -7,6 +7,7 @@ #include "GeneratorModules/GenFilter.h" #include "xAODJet/JetContainer.h" +#include "CLHEP/Vector/LorentzVector.h" class IAtRndmGenSvc; diff --git a/Generators/GeneratorFilters/src/HTFilter.cxx b/Generators/GeneratorFilters/src/HTFilter.cxx index e332acfde8f..cda6a1ac76f 100644 --- a/Generators/GeneratorFilters/src/HTFilter.cxx +++ b/Generators/GeneratorFilters/src/HTFilter.cxx @@ -20,6 +20,7 @@ #include "HepMC/GenEvent.h" // #include "GeneratorObjects/McEventCollection.h" #include "TruthUtils/HepMCHelpers.h" +#include "CLHEP/Units/SystemOfUnits.h" //-------------------------------------------------------------------------- diff --git a/Generators/GeneratorFilters/src/VBFMjjIntervalFilter.cxx b/Generators/GeneratorFilters/src/VBFMjjIntervalFilter.cxx index 2b167dfcdbe..830c25e8a37 100644 --- a/Generators/GeneratorFilters/src/VBFMjjIntervalFilter.cxx +++ b/Generators/GeneratorFilters/src/VBFMjjIntervalFilter.cxx @@ -8,6 +8,7 @@ #include "StoreGate/DataHandle.h" #include "AthenaKernel/IAtRndmGenSvc.h" // For random numbers... #include "CLHEP/Random/RandomEngine.h" +#include "CLHEP/Units/SystemOfUnits.h" #include "EventInfo/EventInfo.h" // For setting the weight #include "EventInfo/EventType.h" // From event info - the real holder of the event weight diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx index b756a435613..26a534e47dd 100644 --- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx +++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/src/InDetAlignCog.cxx @@ -601,7 +601,7 @@ StatusCode InDetAlignCog::getTRT_Elements(bool cog_already_calculated, InDetAlig // Get Default Transform (of module in barrel, layer in endcap) - const Amg::Transform3D defTransform = Amg::CLHEPTransformToEigen( element->defTransform() ); + const Amg::Transform3D defTransform = element->defTransform(); ATH_MSG_VERBOSE("defTransform 2 3" << " " << bec << " " << phi_module << " " << layer_wheel << " " << straw_layer << " " << printTransform(defTransform)); diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx index 1cf0a0aa793..121aa2ed174 100644 --- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx +++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/src/InDetAlignFillTrack.cxx @@ -40,6 +40,8 @@ #include "TrkToolInterfaces/ITrackSummaryTool.h" #include "TrkEventPrimitives/FitQuality.h" #include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" +#include "CLHEP/Geometry/Point3D.h" +#include "CLHEP/Units/SystemOfUnits.h" #include "InDetAlignGenTools/InDetAlignFillTrack.h" #include "HepPDT/ParticleDataTable.hh" diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt index 0eb8a5e0b91..92013e6daa3 100644 --- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt @@ -28,7 +28,6 @@ atlas_depends_on_subdirs( InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetDetDescr/PixelCabling - InnerDetector/InDetDetDescr/PixelGeoModel Tools/PathResolver) # External dependencies: @@ -53,7 +52,7 @@ atlas_add_component( PixelConditionsAlgorithms ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities GaudiKernel PixelConditionsData SGTools StoreGateLib CoralDB GeoModelUtilities Identifier InDetIdentifier InDetReadoutGeometry - PixelGeoModelLib PixelCablingLib PixelConditionsAlgorithmsLib PathResolver ) + PixelCablingLib PixelConditionsAlgorithmsLib PathResolver ) # Install files from the package: #atlas_install_joboptions( share/*.py ) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt index 0f54ba381fe..45a5d999e45 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/Identifier DetectorDescription/DetDescrCond/DetDescrConditions DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoPrimitives GaudiKernel InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/SCT_ConditionsData diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h index d2d814a0268..07c81ceb9ba 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.h @@ -7,6 +7,7 @@ #include "AthenaBaseComps/AthAlgorithm.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelUtilities/GeoAlignmentStore.h" #include "InDetReadoutGeometry/SiCommonItems.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" diff --git a/InnerDetector/InDetDetDescr/BCM_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/BCM_GeoModel/CMakeLists.txt index b02017798ff..7c5cd7aadb8 100644 --- a/InnerDetector/InDetDetDescr/BCM_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/BCM_GeoModel/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel PRIVATE Database/RDBAccessSvc @@ -19,13 +18,15 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( BCM_GeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel GeoModelKernel GaudiKernel GeoModelUtilities ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel GeoModelUtilities ) # Install files from the package: atlas_install_headers( BCM_GeoModel ) diff --git a/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Builder.cxx b/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Builder.cxx index c2da53e0d19..79e8b6c9197 100755 --- a/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Builder.cxx +++ b/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Builder.cxx @@ -231,14 +231,13 @@ StatusCode InDetDD::BCM_Builder::build(GeoVPhysVol* pv) BCM_ModuleParameters* parameters = manager->Module(i); //setting transformation - CLHEP::Hep3Vector pos(parameters->Position_X(), parameters->Position_Y(), parameters->Position_Z()); - CLHEP::HepRotation rm; - rm.rotateY(-90.*CLHEP::deg); - rm.rotateZ(-90.*CLHEP::deg); - rm.rotateX(parameters->Rotation_X()*CLHEP::deg); - rm.rotateY(parameters->Rotation_Y()*CLHEP::deg); - rm.rotateZ(parameters->Rotation_Z()*CLHEP::deg); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Translation3D pos(parameters->Position_X(), parameters->Position_Y(), parameters->Position_Z()); + GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(parameters->Rotation_Z()*GeoModelKernelUnits::deg) + * GeoTrf::RotateY3D(parameters->Rotation_Y()*GeoModelKernelUnits::deg) + * GeoTrf::RotateX3D(parameters->Rotation_X()*GeoModelKernelUnits::deg) + * GeoTrf::RotateZ3D(-90.*GeoModelKernelUnits::deg) + * GeoTrf::RotateY3D(-90.*GeoModelKernelUnits::deg); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm)); xform->ref(); ATH_MSG_DEBUG(" --> Module " << i << " build!"); diff --git a/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Module.cxx b/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Module.cxx index 646fd13aab7..28ba6043a84 100755 --- a/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Module.cxx +++ b/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Module.cxx @@ -109,10 +109,9 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall C GeoPhysVol* WallC = wall.Build(ModLength/2, ReducedModWidth/2, G10Thick, CuThick, g10, copper, mat_mgr); - CLHEP::Hep3Vector WallCPos(ModHeight/2 - WallThick/2, 0, 0); - CLHEP::HepRotation rmC; - rmC.rotateY(90.*CLHEP::deg); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rmC,WallCPos)); + GeoTrf::Translation3D WallCPos(ModHeight/2 - WallThick/2, 0, 0); + GeoTrf::RotateY3D rmC(90.*GeoModelKernelUnits::deg); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(WallCPos*rmC)); GeoNameTag* tag = new GeoNameTag("Wall C"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -121,9 +120,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall D GeoPhysVol* WallD = wall.Build((ModTailHeight - WallThick - MainWallThick)/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr); - CLHEP::Hep3Vector WallDPos(ModHeight/2 - WallThick - (ModTailHeight - WallThick - MainWallThick)/2, 0, WallThick/2 - ModLength/2); - CLHEP::HepRotation rmD; - xform = new GeoTransform(HepGeom::Transform3D(rmD,WallDPos)); + GeoTrf::Translate3D WallDPos(ModHeight/2 - WallThick - (ModTailHeight - WallThick - MainWallThick)/2, 0, WallThick/2 - ModLength/2); + xform = new GeoTransform(WallDPos); tag = new GeoNameTag("Wall D"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -132,8 +130,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall H GeoPhysVol* WallH = wall.Build((ModTailHeight - WallThick - MainWallThick)/2, ReducedModWidth/2, LamelCuThick, LamelG10Thick, LamelCuThick, copper, g10, copper, mat_mgr); - CLHEP::Hep3Vector WallHPos(ModHeight/2 -WallThick - (ModTailHeight - WallThick - MainWallThick)/2, 0, ModLength/2 - LamelHoffset); - xform = new GeoTransform(HepGeom::Transform3D(rmD,WallHPos)); + GeoTrf::Translate3D WallHPos(ModHeight/2 -WallThick - (ModTailHeight - WallThick - MainWallThick)/2, 0, ModLength/2 - LamelHoffset); + xform = new GeoTransform(WallHPos); tag = new GeoNameTag("Wall H"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -142,8 +140,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall J GeoPhysVol* WallJ = wall.Build((ModTailHeight - WallThick - MainWallThick - MainWallBackCuThick)/2, ReducedModWidth/2, LamelCuThick, LamelG10Thick, LamelCuThick, copper, g10, copper, mat_mgr); - CLHEP::Hep3Vector WallJPos(ModHeight/2 -WallThick - (ModTailHeight - WallThick - MainWallThick - MainWallBackCuThick)/2, 0, ModLength/2 - LamelJoffset); - xform = new GeoTransform(HepGeom::Transform3D(rmD,WallJPos)); + GeoTrf::Translate3D WallJPos(ModHeight/2 -WallThick - (ModTailHeight - WallThick - MainWallThick - MainWallBackCuThick)/2, 0, ModLength/2 - LamelJoffset); + xform = new GeoTransform(WallJPos); tag = new GeoNameTag("Wall J"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -152,8 +150,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall E //if changing thickness of E one must also change length and position of MainWall and wallK (extra copper) GeoPhysVol* WallE = wall.Build(ModHeight/2 - WallThick, ReducedModWidth/2, parameters->BackWallThickness(), CuThick, g10, copper, mat_mgr); - CLHEP::Hep3Vector WallEPos(0, 0,ModLength/2 - (parameters->BackWallThickness()+CuThick)/2); - xform = new GeoTransform(HepGeom::Transform3D(rmD,WallEPos)); + GeoTrf::Translate3D WallEPos(0, 0,ModLength/2 - (parameters->BackWallThickness()+CuThick)/2); + xform = new GeoTransform(WallEPos); tag = new GeoNameTag("Wall E"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -163,8 +161,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul double heightI = ModHeight - ModTailHeight - WallThick; GeoPhysVol* WallI = wall.Build(heightI/2, ReducedModWidth/2, LamelG10Thick, "bcmWallLog", g10); - CLHEP::Hep3Vector WallIPos(WallThick + heightI/2 - ModHeight/2, 0, ModLength/2 - LamelIoffset); - xform = new GeoTransform(HepGeom::Transform3D(rmD,WallIPos)); + GeoTrf::Translate3D WallIPos(WallThick + heightI/2 - ModHeight/2, 0, ModLength/2 - LamelIoffset); + xform = new GeoTransform(WallIPos); tag = new GeoNameTag("Wall I"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -173,8 +171,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall F GeoPhysVol* WallF = wall.Build(heightI/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr); - CLHEP::Hep3Vector WallFPos(WallThick + heightI/2 - ModHeight/2, 0, ModLength/2 - ModHeadLength + WallThick/2); - xform = new GeoTransform(HepGeom::Transform3D(rmD,WallFPos)); + GeoTrf::Translate3D WallFPos(WallThick + heightI/2 - ModHeight/2, 0, ModLength/2 - ModHeadLength + WallThick/2); + xform = new GeoTransform(WallFPos); tag = new GeoNameTag("Wall F"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -183,8 +181,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall G GeoPhysVol* WallG = wall.Build(ModHeadLength/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr); - CLHEP::Hep3Vector WallGPos(WallThick/2 - ModHeight/2, 0, ModLength/2 - ModHeadLength/2); - xform = new GeoTransform(HepGeom::Transform3D(rmC,WallGPos)); + GeoTrf::Translation3D WallGPos(WallThick/2 - ModHeight/2, 0, ModLength/2 - ModHeadLength/2); + xform = new GeoTransform(GeoTrf::Transform3D(WallGPos*rmC)); tag = new GeoNameTag("Wall G"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -193,8 +191,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //main wall GeoPhysVol* WallMain = wall.Build((ModLength - parameters->BackWallThickness() - CuThick)/2, ReducedModWidth/2, MainWallCuThick, MainWallG10Thick, copper, g10, mat_mgr); - CLHEP::Hep3Vector WallMainPos(ModHeight/2 + MainWallThick/2 - ModTailHeight, 0, -(parameters->BackWallThickness() + CuThick)/2); - xform = new GeoTransform(HepGeom::Transform3D(rmC,WallMainPos)); + GeoTrf::Translation3D WallMainPos(ModHeight/2 + MainWallThick/2 - ModTailHeight, 0, -(parameters->BackWallThickness() + CuThick)/2); + xform = new GeoTransform(GeoTrf::Transform3D(WallMainPos*rmC)); tag = new GeoNameTag("Wall Main"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -205,8 +203,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul double lengthK = LamelHoffset - LamelHThick/2 - (parameters->BackWallThickness() + CuThick); GeoPhysVol* WallK = wall.Build(lengthK/2, ReducedModWidth/2, CuThick, "bcmWallLog",copper); - CLHEP::Hep3Vector WallKPos(ModHeight/2 + MainWallThick + CuThick/2 - ModTailHeight, 0, ModLength/2 - lengthK/2 - (parameters->BackWallThickness() + CuThick)); - xform = new GeoTransform(HepGeom::Transform3D(rmC,WallKPos)); + GeoTrf::Translation3D WallKPos(ModHeight/2 + MainWallThick + CuThick/2 - ModTailHeight, 0, ModLength/2 - lengthK/2 - (parameters->BackWallThickness() + CuThick)); + xform = new GeoTransform(GeoTrf::Transform3D(WallKPos*rmC)); tag = new GeoNameTag("Wall extra cupper"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -216,8 +214,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul GeoPhysVol* DiamondVolA = wall.Build(diamondSize/2, diamondSize/2, diamondThick, "bcmDiamondLog", diamond); double diamond_x = ModHeight/2 + MainWallThick + diamondThick/2 - ModTailHeight; - CLHEP::Hep3Vector DiamondPosA(diamond_x, parameters->DiamondPosition_Y(), parameters->DiamondPosition_Z()); - xform = new GeoTransform(HepGeom::Transform3D(rmC,DiamondPosA)); + GeoTrf::Translation3D DiamondPosA(diamond_x, parameters->DiamondPosition_Y(), parameters->DiamondPosition_Z()); + xform = new GeoTransform(GeoTrf::Transform3D(DiamondPosA*rmC)); tag = new GeoNameTag("Diamond"); env_bcmModPhys->add(tag); env_bcmModPhys->add(new GeoIdentifierTag(11950)); @@ -226,8 +224,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul GeoPhysVol* DiamondVolB = wall.Build(diamondSize/2, diamondSize/2, diamondThick, "bcmDiamondLog", diamond); - CLHEP::Hep3Vector DiamondPosB(diamond_x + diamondThick + parameters->DiamondDelta_X(), parameters->DiamondPosition_Y() + parameters->DiamondDelta_Y(), parameters->DiamondPosition_Z() + parameters->DiamondDelta_Z()); - xform = new GeoTransform(HepGeom::Transform3D(rmC,DiamondPosB)); + GeoTrf::Translation3D DiamondPosB(diamond_x + diamondThick + parameters->DiamondDelta_X(), parameters->DiamondPosition_Y() + parameters->DiamondDelta_Y(), parameters->DiamondPosition_Z() + parameters->DiamondDelta_Z()); + xform = new GeoTransform(GeoTrf::Transform3D(DiamondPosB*rmC)); tag = new GeoNameTag("Diamond"); env_bcmModPhys->add(tag); env_bcmModPhys->add(new GeoIdentifierTag(11951)); @@ -237,10 +235,9 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall A GeoPhysVol* WallA = wall.Build(ModTailHeight/2, (ModLength - ModHeadLength)/2, CuThick, G10Thick, copper, g10, mat_mgr); - CLHEP::Hep3Vector WallAPos((ModHeight - ModTailHeight)/2 , (ReducedModWidth + WallThick)/2, -ModHeadLength/2); - CLHEP::HepRotation rmA; - rmA.rotateX(90.*CLHEP::deg); - xform = new GeoTransform(HepGeom::Transform3D(rmA,WallAPos)); + GeoTrf::Translation3D WallAPos((ModHeight - ModTailHeight)/2 , (ReducedModWidth + WallThick)/2, -ModHeadLength/2); + GeoTrf::RotateX3D rmA(90.*GeoModelKernelUnits::deg); + xform = new GeoTransform(GeoTrf::Transform3D(WallAPos*rmA)); tag = new GeoNameTag("Wall A"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -249,8 +246,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall AA GeoPhysVol* WallAA = wall.Build(ModTailHeight/2, (ModLength - ModHeadLength)/2, G10Thick, CuThick, g10, copper, mat_mgr); - CLHEP::Hep3Vector WallAAPos((ModHeight - ModTailHeight)/2 , -(ReducedModWidth + WallThick)/2, -ModHeadLength/2); - xform = new GeoTransform(HepGeom::Transform3D(rmA,WallAAPos)); + GeoTrf::Translation3D WallAAPos((ModHeight - ModTailHeight)/2 , -(ReducedModWidth + WallThick)/2, -ModHeadLength/2); + xform = new GeoTransform(GeoTrf::Transform3D(WallAAPos*rmA)); tag = new GeoNameTag("Wall AA"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -259,8 +256,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall B GeoPhysVol* WallB = wall.Build(ModHeight/2, ModHeadLength/2, CuThick, G10Thick, copper, g10, mat_mgr); - CLHEP::Hep3Vector WallBPos(0, (ReducedModWidth + WallThick)/2, (ModLength - ModHeadLength)/2); - xform = new GeoTransform(HepGeom::Transform3D(rmA,WallBPos)); + GeoTrf::Translation3D WallBPos(0, (ReducedModWidth + WallThick)/2, (ModLength - ModHeadLength)/2); + xform = new GeoTransform(GeoTrf::Transform3D(WallBPos*rmA)); tag = new GeoNameTag("Wall B"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -269,8 +266,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul //wall BB GeoPhysVol* WallBB = wall.Build(ModHeight/2, ModHeadLength/2, G10Thick, CuThick, g10, copper, mat_mgr); - CLHEP::Hep3Vector WallBBPos(0, -(ReducedModWidth + WallThick)/2, (ModLength - ModHeadLength)/2); - xform = new GeoTransform(HepGeom::Transform3D(rmA,WallBBPos)); + GeoTrf::Translation3D WallBBPos(0, -(ReducedModWidth + WallThick)/2, (ModLength - ModHeadLength)/2); + xform = new GeoTransform(GeoTrf::Transform3D(WallBBPos*rmA)); tag = new GeoNameTag("Wall BB"); env_bcmModPhys->add(tag); env_bcmModPhys->add(xform); @@ -281,12 +278,8 @@ GeoPhysVol* BCM_Module::Build(const AbsMaterialManager* mat_mgr, const BCM_Modul // Add the BCM envelop inside the new complex encompassing volume // -------------------------------------------------------------------------------------- - CLHEP::HepRotation rmEnv; - rmEnv.rotateZ(90.*CLHEP::deg); - rmEnv.rotateY(90.*CLHEP::deg); - - CLHEP::Hep3Vector WallEnvPos(0., 0., 0.); - xform = new GeoTransform(HepGeom::Transform3D(rmEnv,WallEnvPos)); + GeoTrf::Transform3D rmEnv = GeoTrf::RotateY3D(90.*GeoModelKernelUnits::deg)*GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg); + xform = new GeoTransform(rmEnv); tag = new GeoNameTag("EnvBcmWallLog"); bcmModPhys->add(tag); bcmModPhys->add(xform); diff --git a/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Wall.cxx b/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Wall.cxx index cc2adaab24a..c9cdb3954e6 100755 --- a/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Wall.cxx +++ b/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Wall.cxx @@ -37,9 +37,8 @@ GeoPhysVol* BCM_Wall::Build(double halfX, double halfY, double thick_one, double const GeoLogVol* bcmWallOneLog = new GeoLogVol("bcmWallLog", bcmWallOneBox, material_one); GeoPhysVol* bcmWallOnePhys = new GeoPhysVol(bcmWallOneLog); - CLHEP::Hep3Vector WallOnePos(0,0,thick_one/2 - wallthick/2); - CLHEP::HepRotation rm; - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,WallOnePos)); + GeoTrf::Translate3D WallOnePos(0,0,thick_one/2 - wallthick/2); + GeoTransform* xform = new GeoTransform(WallOnePos); bcmWallPhys->add(xform); bcmWallPhys->add(bcmWallOnePhys); @@ -49,8 +48,8 @@ GeoPhysVol* BCM_Wall::Build(double halfX, double halfY, double thick_one, double const GeoLogVol* bcmWallTwoLog = new GeoLogVol("bcmWallLog", bcmWallTwoBox, material_two); GeoPhysVol* bcmWallTwoPhys = new GeoPhysVol(bcmWallTwoLog); - CLHEP::Hep3Vector WallTwoPos(0,0,wallthick/2 - thick_two/2); - xform = new GeoTransform(HepGeom::Transform3D(rm,WallTwoPos)); + GeoTrf::Translate3D WallTwoPos(0,0,wallthick/2 - thick_two/2); + xform = new GeoTransform(WallTwoPos); bcmWallPhys->add(xform); bcmWallPhys->add(bcmWallTwoPhys); @@ -73,9 +72,8 @@ GeoPhysVol* BCM_Wall::Build(double halfX, double halfY, double thick_one, double const GeoLogVol* bcmWallOneLog = new GeoLogVol("bcmWallLog", bcmWallOneBox, material_one); GeoPhysVol* bcmWallOnePhys = new GeoPhysVol(bcmWallOneLog); - CLHEP::Hep3Vector WallOnePos(0,0,thick_one/2 - wallthick/2); - CLHEP::HepRotation rm; - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,WallOnePos)); + GeoTrf::Translate3D WallOnePos(0,0,thick_one/2 - wallthick/2); + GeoTransform* xform = new GeoTransform(WallOnePos); bcmWallPhys->add(xform); bcmWallPhys->add(bcmWallOnePhys); @@ -85,8 +83,8 @@ GeoPhysVol* BCM_Wall::Build(double halfX, double halfY, double thick_one, double const GeoLogVol* bcmWallTwoLog = new GeoLogVol("bcmWallLog", bcmWallTwoBox, material_two); GeoPhysVol* bcmWallTwoPhys = new GeoPhysVol(bcmWallTwoLog); - CLHEP::Hep3Vector WallTwoPos(0,0,thick_one -wallthick/2 + thick_two/2); - xform = new GeoTransform(HepGeom::Transform3D(rm,WallTwoPos)); + GeoTrf::Translate3D WallTwoPos(0,0,thick_one -wallthick/2 + thick_two/2); + xform = new GeoTransform(WallTwoPos); bcmWallPhys->add(xform); bcmWallPhys->add(bcmWallTwoPhys); @@ -96,8 +94,8 @@ GeoPhysVol* BCM_Wall::Build(double halfX, double halfY, double thick_one, double const GeoLogVol* bcmWallThreeLog = new GeoLogVol("bcmWallLog", bcmWallThreeBox, material_three); GeoPhysVol* bcmWallThreePhys = new GeoPhysVol(bcmWallThreeLog); - CLHEP::Hep3Vector WallThreePos(0,0,wallthick/2 - thick_three/2); - xform = new GeoTransform(HepGeom::Transform3D(rm,WallThreePos)); + GeoTrf::Translate3D WallThreePos(0,0,wallthick/2 - thick_three/2); + xform = new GeoTransform(WallThreePos); bcmWallPhys->add(xform); bcmWallPhys->add(bcmWallThreePhys); diff --git a/InnerDetector/InDetDetDescr/BLM_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/BLM_GeoModel/CMakeLists.txt index 68d046510be..b5ea30eeef7 100644 --- a/InnerDetector/InDetDetDescr/BLM_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/BLM_GeoModel/CMakeLists.txt @@ -9,9 +9,7 @@ atlas_subdir( BLM_GeoModel ) atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel - Control/AthenaKernel DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel PRIVATE Database/RDBAccessSvc @@ -20,13 +18,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( BLM_GeoModel src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaKernel GeoModelKernel GaudiKernel GeoModelUtilities ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel GeoModelUtilities ) # Install files from the package: atlas_install_headers( BLM_GeoModel ) diff --git a/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Builder.cxx b/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Builder.cxx index 6a400d2c42d..12c308b8d30 100644 --- a/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Builder.cxx +++ b/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Builder.cxx @@ -240,12 +240,11 @@ StatusCode InDetDD::BLM_Builder::build(GeoVPhysVol* pv) BLM_ModuleParameters* parameters = manager->Module(i); //setting transformation - CLHEP::Hep3Vector pos(parameters->R()*cos(parameters->Phi()*CLHEP::deg), parameters->R()*sin(parameters->Phi()*CLHEP::deg), parameters->Z()); - CLHEP::HepRotation rm; - rm.rotateX(parameters->Rotation_X()*CLHEP::deg); - rm.rotateY(parameters->Rotation_Y()*CLHEP::deg); - rm.rotateZ(parameters->Rotation_Z()*CLHEP::deg); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Translation3D pos(parameters->R()*cos(parameters->Phi()*GeoModelKernelUnits::deg), parameters->R()*sin(parameters->Phi()*GeoModelKernelUnits::deg), parameters->Z()); + GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(parameters->Rotation_Z()*GeoModelKernelUnits::deg) + * GeoTrf::RotateY3D(parameters->Rotation_Y()*GeoModelKernelUnits::deg) + * GeoTrf::RotateX3D(parameters->Rotation_X()*GeoModelKernelUnits::deg); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm)); xform->ref(); //building module int k=i+222; diff --git a/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Module.cxx b/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Module.cxx index 405089fda99..5b5e88207f4 100755 --- a/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Module.cxx +++ b/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Module.cxx @@ -47,7 +47,7 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul { if(msg) (*msg) << "BLM _ PEEK _ MISSING." << endmsg; - GeoMaterial* peektmp = new GeoMaterial("PEEK", 1.3*CLHEP::gram/CLHEP::cm3); + GeoMaterial* peektmp = new GeoMaterial("PEEK", 1.3*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); GeoElement* hydrogen = new GeoElement("Hydrogen", "H", 1.0, 1.010); GeoElement* oxygen = new GeoElement("Oxygen", "O", 8.0, 16.000); GeoElement* carbon = new GeoElement("Carbon", "C", 6.0, 12.010); @@ -63,7 +63,7 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul //PEEK /* //STAINLESS STEEL - GeoMaterial* stainless_steel = new GeoMaterial("S_steel", 7.8*CLHEP::gram/CLHEP::cm3); + GeoMaterial* stainless_steel = new GeoMaterial("S_steel", 7.8*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); GeoElement* iron = new GeoElement("Iron", "Fe", 26.0, 55.845); GeoElement* chromium = new GeoElement("Chromium", "Cr", 24.0, 51.996); stainless_steel->add(iron, 0.89); @@ -79,9 +79,8 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul //holder GeoPhysVol* holder = wall.BuildHolder(peek); - CLHEP::Hep3Vector holderPos(0, BLM_Wall::s_holder_height-ModHeight/2-BLM_Wall::s_holder_thickness/2, 0); - CLHEP::HepRotation holderRot; - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(holderRot, holderPos)); + GeoTrf::Translate3D holderPos(0, BLM_Wall::s_holder_height-ModHeight/2-BLM_Wall::s_holder_thickness/2, 0); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(holderPos)); GeoNameTag* tag = new GeoNameTag("Holder"); blmModPhys->add(tag); blmModPhys->add(xform); @@ -91,12 +90,12 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul GeoPhysVol* layer1a = wall.BuildLayerI(CuThick, copper, false); GeoPhysVol* layer1b = wall.BuildLayerI(LamelThick15, g10, false); GeoPhysVol* layer1c = wall.BuildLayerI(CuThick, copper, true); - CLHEP::Hep3Vector layer1Posa(0, BLM_Wall::s_holder_height-ModHeight/2+CuThick/2, ModLength/2-BLM_Wall::s_extended_length/2); - CLHEP::Hep3Vector layer1Posb(0, BLM_Wall::s_holder_height-ModHeight/2+CuThick+LamelThick15/2, ModLength/2-BLM_Wall::s_extended_length/2); - CLHEP::Hep3Vector layer1Posc(0, BLM_Wall::s_holder_height-ModHeight/2+3*CuThick/2+LamelThick15, ModLength/2-BLM_Wall::s_extended_length/2); - GeoTransform* yforma = new GeoTransform(HepGeom::Transform3D(holderRot, layer1Posa)); - GeoTransform* yformb = new GeoTransform(HepGeom::Transform3D(holderRot, layer1Posb)); - GeoTransform* yformc = new GeoTransform(HepGeom::Transform3D(holderRot, layer1Posc)); + GeoTrf::Translate3D layer1Posa(0, BLM_Wall::s_holder_height-ModHeight/2+CuThick/2, ModLength/2-BLM_Wall::s_extended_length/2); + GeoTrf::Translate3D layer1Posb(0, BLM_Wall::s_holder_height-ModHeight/2+CuThick+LamelThick15/2, ModLength/2-BLM_Wall::s_extended_length/2); + GeoTrf::Translate3D layer1Posc(0, BLM_Wall::s_holder_height-ModHeight/2+3*CuThick/2+LamelThick15, ModLength/2-BLM_Wall::s_extended_length/2); + GeoTransform* yforma = new GeoTransform(GeoTrf::Transform3D(layer1Posa)); + GeoTransform* yformb = new GeoTransform(GeoTrf::Transform3D(layer1Posb)); + GeoTransform* yformc = new GeoTransform(GeoTrf::Transform3D(layer1Posc)); tag = new GeoNameTag("Layer1"); blmModPhys->add(tag); blmModPhys->add(yforma); @@ -112,12 +111,12 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul GeoPhysVol* layer2a = wall.BuildLayerII(CuThick, copper); GeoPhysVol* layer2b = wall.BuildLayerII(LamelThick234, g10); GeoPhysVol* layer2c = wall.BuildLayerII(CuThick, copper); - CLHEP::Hep3Vector layer2Posa(0, BLM_Wall::s_holder_height-ModHeight/2+5*CuThick/2+LamelThick15, ModLength/2-BLM_Wall::s_length/2); - CLHEP::Hep3Vector layer2Posb(0, BLM_Wall::s_holder_height-ModHeight/2+3*CuThick+LamelThick15+LamelThick234/2, ModLength/2-BLM_Wall::s_length/2); - CLHEP::Hep3Vector layer2Posc(0, BLM_Wall::s_holder_height-ModHeight/2+7*CuThick/2+LamelThick15+LamelThick234, ModLength/2-BLM_Wall::s_length/2); - yforma = new GeoTransform(HepGeom::Transform3D(holderRot, layer2Posa)); - yformb = new GeoTransform(HepGeom::Transform3D(holderRot, layer2Posb)); - yformc = new GeoTransform(HepGeom::Transform3D(holderRot, layer2Posc)); + GeoTrf::Translate3D layer2Posa(0, BLM_Wall::s_holder_height-ModHeight/2+5*CuThick/2+LamelThick15, ModLength/2-BLM_Wall::s_length/2); + GeoTrf::Translate3D layer2Posb(0, BLM_Wall::s_holder_height-ModHeight/2+3*CuThick+LamelThick15+LamelThick234/2, ModLength/2-BLM_Wall::s_length/2); + GeoTrf::Translate3D layer2Posc(0, BLM_Wall::s_holder_height-ModHeight/2+7*CuThick/2+LamelThick15+LamelThick234, ModLength/2-BLM_Wall::s_length/2); + yforma = new GeoTransform(GeoTrf::Transform3D(layer2Posa)); + yformb = new GeoTransform(GeoTrf::Transform3D(layer2Posb)); + yformc = new GeoTransform(GeoTrf::Transform3D(layer2Posc)); tag = new GeoNameTag("Layer2"); blmModPhys->add(tag); blmModPhys->add(yforma); @@ -133,12 +132,12 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul GeoPhysVol* layer3a = wall.BuildLayerIII(CuThick, copper); GeoPhysVol* layer3b = wall.BuildLayerIII(LamelThick234, g10); GeoPhysVol* layer3c = wall.BuildLayerIII(CuThick, copper); - CLHEP::Hep3Vector layer3Posa(0, BLM_Wall::s_holder_height-ModHeight/2+9*CuThick/2+LamelThick15+LamelThick234, ModLength/2-BLM_Wall::s_length/2); - CLHEP::Hep3Vector layer3Posb(0, BLM_Wall::s_holder_height-ModHeight/2+5*CuThick+LamelThick15+3*LamelThick234/2, ModLength/2-BLM_Wall::s_length/2); - CLHEP::Hep3Vector layer3Posc(0, BLM_Wall::s_holder_height-ModHeight/2+11*CuThick/2+LamelThick15+2*LamelThick234, ModLength/2-BLM_Wall::s_length/2); - yforma = new GeoTransform(HepGeom::Transform3D(holderRot, layer3Posa)); - yformb = new GeoTransform(HepGeom::Transform3D(holderRot, layer3Posb)); - yformc = new GeoTransform(HepGeom::Transform3D(holderRot, layer3Posc)); + GeoTrf::Translate3D layer3Posa(0, BLM_Wall::s_holder_height-ModHeight/2+9*CuThick/2+LamelThick15+LamelThick234, ModLength/2-BLM_Wall::s_length/2); + GeoTrf::Translate3D layer3Posb(0, BLM_Wall::s_holder_height-ModHeight/2+5*CuThick+LamelThick15+3*LamelThick234/2, ModLength/2-BLM_Wall::s_length/2); + GeoTrf::Translate3D layer3Posc(0, BLM_Wall::s_holder_height-ModHeight/2+11*CuThick/2+LamelThick15+2*LamelThick234, ModLength/2-BLM_Wall::s_length/2); + yforma = new GeoTransform(GeoTrf::Transform3D(layer3Posa)); + yformb = new GeoTransform(GeoTrf::Transform3D(layer3Posb)); + yformc = new GeoTransform(GeoTrf::Transform3D(layer3Posc)); tag = new GeoNameTag("Layer3"); blmModPhys->add(tag); blmModPhys->add(yforma); @@ -154,12 +153,12 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul GeoPhysVol* layer4a = wall.BuildLayerIV(CuThick, copper); GeoPhysVol* layer4b = wall.BuildLayerIV(LamelThick234, g10); GeoPhysVol* layer4c = wall.BuildLayerIV(CuThick, copper); - CLHEP::Hep3Vector layer4Posa(0, BLM_Wall::s_holder_height-ModHeight/2+13*CuThick/2+LamelThick15+2*LamelThick234, ModLength/2-BLM_Wall::s_length/2); - CLHEP::Hep3Vector layer4Posb(0, BLM_Wall::s_holder_height-ModHeight/2+7*CuThick+LamelThick15+5*LamelThick234/2, ModLength/2-BLM_Wall::s_length/2); - CLHEP::Hep3Vector layer4Posc(0, BLM_Wall::s_holder_height-ModHeight/2+15*CuThick/2+LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2); - yforma = new GeoTransform(HepGeom::Transform3D(holderRot, layer4Posa)); - yformb = new GeoTransform(HepGeom::Transform3D(holderRot, layer4Posb)); - yformc = new GeoTransform(HepGeom::Transform3D(holderRot, layer4Posc)); + GeoTrf::Translate3D layer4Posa(0, BLM_Wall::s_holder_height-ModHeight/2+13*CuThick/2+LamelThick15+2*LamelThick234, ModLength/2-BLM_Wall::s_length/2); + GeoTrf::Translate3D layer4Posb(0, BLM_Wall::s_holder_height-ModHeight/2+7*CuThick+LamelThick15+5*LamelThick234/2, ModLength/2-BLM_Wall::s_length/2); + GeoTrf::Translate3D layer4Posc(0, BLM_Wall::s_holder_height-ModHeight/2+15*CuThick/2+LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2); + yforma = new GeoTransform(GeoTrf::Transform3D(layer4Posa)); + yformb = new GeoTransform(GeoTrf::Transform3D(layer4Posb)); + yformc = new GeoTransform(GeoTrf::Transform3D(layer4Posc)); tag = new GeoNameTag("Layer4"); blmModPhys->add(tag); blmModPhys->add(yforma); @@ -175,12 +174,12 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul GeoPhysVol* layer5a = wall.BuildLayerV(CuThick, copper); GeoPhysVol* layer5b = wall.BuildLayerV(LamelThick15, g10); GeoPhysVol* layer5c = wall.BuildLayerV(CuThick, copper); - CLHEP::Hep3Vector layer5Posa(0, BLM_Wall::s_holder_height-ModHeight/2+17*CuThick/2+LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2); - CLHEP::Hep3Vector layer5Posb(0, BLM_Wall::s_holder_height-ModHeight/2+9*CuThick+3*LamelThick15/2+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2); - CLHEP::Hep3Vector layer5Posc(0, BLM_Wall::s_holder_height-ModHeight/2+19*CuThick/2+2*LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2); - yforma = new GeoTransform(HepGeom::Transform3D(holderRot, layer5Posa)); - yformb = new GeoTransform(HepGeom::Transform3D(holderRot, layer5Posb)); - yformc = new GeoTransform(HepGeom::Transform3D(holderRot, layer5Posc)); + GeoTrf::Translate3D layer5Posa(0, BLM_Wall::s_holder_height-ModHeight/2+17*CuThick/2+LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2); + GeoTrf::Translate3D layer5Posb(0, BLM_Wall::s_holder_height-ModHeight/2+9*CuThick+3*LamelThick15/2+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2); + GeoTrf::Translate3D layer5Posc(0, BLM_Wall::s_holder_height-ModHeight/2+19*CuThick/2+2*LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2); + yforma = new GeoTransform(GeoTrf::Transform3D(layer5Posa)); + yformb = new GeoTransform(GeoTrf::Transform3D(layer5Posb)); + yformc = new GeoTransform(GeoTrf::Transform3D(layer5Posc)); tag = new GeoNameTag("Layer5"); blmModPhys->add(tag); blmModPhys->add(yforma); @@ -201,26 +200,24 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul GeoPhysVol* screw6 = wall.BuildScrew(10, stainless_steel); GeoPhysVol* screw7 = wall.BuildScrew(BLM_Wall::s_holder_thickness, stainless_steel); GeoPhysVol* screw8 = wall.BuildScrew(BLM_Wall::s_holder_thickness, stainless_steel); - CLHEP::HepRotation screwRot; - screwRot.rotateX(90.*CLHEP::deg); - CLHEP::HepRotation screwRot1; - screwRot1.rotateX(180.*CLHEP::deg); - CLHEP::Hep3Vector screwPos1(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_hole_position); - CLHEP::Hep3Vector screwPos2(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_hole_position); - CLHEP::Hep3Vector screwPos3(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_length+BLM_Wall::s_hole_position); - CLHEP::Hep3Vector screwPos4(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_length+BLM_Wall::s_hole_position); - CLHEP::Hep3Vector screwPos5(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_extended_length+2.1); - CLHEP::Hep3Vector screwPos6(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_extended_length+2.1); - CLHEP::Hep3Vector screwPos7(ModWidth/2-BLM_Wall::s_hole_position, 3.5-ModHeight/2, BLM_Wall::s_holder_thickness-ModLength/2+1); - CLHEP::Hep3Vector screwPos8(BLM_Wall::s_hole_position-ModWidth/2, 3.5-ModHeight/2, BLM_Wall::s_holder_thickness-ModLength/2+1); - GeoTransform* xform1 = new GeoTransform(HepGeom::Transform3D(screwRot, screwPos1)); - GeoTransform* xform2 = new GeoTransform(HepGeom::Transform3D(screwRot, screwPos2)); - GeoTransform* xform3 = new GeoTransform(HepGeom::Transform3D(screwRot, screwPos3)); - GeoTransform* xform4 = new GeoTransform(HepGeom::Transform3D(screwRot, screwPos4)); - GeoTransform* xform5 = new GeoTransform(HepGeom::Transform3D(screwRot, screwPos5)); - GeoTransform* xform6 = new GeoTransform(HepGeom::Transform3D(screwRot, screwPos6)); - GeoTransform* xform7 = new GeoTransform(HepGeom::Transform3D(screwRot1, screwPos7)); - GeoTransform* xform8 = new GeoTransform(HepGeom::Transform3D(screwRot1, screwPos8)); + GeoTrf::RotateX3D screwRot(90.*GeoModelKernelUnits::deg); + GeoTrf::RotateX3D screwRot1(180.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D screwPos1(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_hole_position); + GeoTrf::Translation3D screwPos2(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_hole_position); + GeoTrf::Translation3D screwPos3(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_length+BLM_Wall::s_hole_position); + GeoTrf::Translation3D screwPos4(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_length+BLM_Wall::s_hole_position); + GeoTrf::Translation3D screwPos5(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_extended_length+2.1); + GeoTrf::Translation3D screwPos6(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_extended_length+2.1); + GeoTrf::Translation3D screwPos7(ModWidth/2-BLM_Wall::s_hole_position, 3.5-ModHeight/2, BLM_Wall::s_holder_thickness-ModLength/2+1); + GeoTrf::Translation3D screwPos8(BLM_Wall::s_hole_position-ModWidth/2, 3.5-ModHeight/2, BLM_Wall::s_holder_thickness-ModLength/2+1); + GeoTransform* xform1 = new GeoTransform(GeoTrf::Transform3D(screwPos1*screwRot)); + GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(screwPos2*screwRot)); + GeoTransform* xform3 = new GeoTransform(GeoTrf::Transform3D(screwPos3*screwRot)); + GeoTransform* xform4 = new GeoTransform(GeoTrf::Transform3D(screwPos4*screwRot)); + GeoTransform* xform5 = new GeoTransform(GeoTrf::Transform3D(screwPos5*screwRot)); + GeoTransform* xform6 = new GeoTransform(GeoTrf::Transform3D(screwPos6*screwRot)); + GeoTransform* xform7 = new GeoTransform(GeoTrf::Transform3D(screwPos7*screwRot1)); + GeoTransform* xform8 = new GeoTransform(GeoTrf::Transform3D(screwPos8*screwRot1)); tag = new GeoNameTag("Screw"); blmModPhys->add(tag); blmModPhys->add(xform1); @@ -249,8 +246,8 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul //clamp GeoPhysVol* clamp = wall.BuildClamp(g10); - CLHEP::Hep3Vector clampPos(0, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234-BLM_Wall::s_clamp_thickness/2, ModLength/2-BLM_Wall::s_extended_length+2.1+2.5-BLM_Wall::s_clamp_length/2); - yforma = new GeoTransform(HepGeom::Transform3D(holderRot, clampPos)); + GeoTrf::Translate3D clampPos(0, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234-BLM_Wall::s_clamp_thickness/2, ModLength/2-BLM_Wall::s_extended_length+2.1+2.5-BLM_Wall::s_clamp_length/2); + yforma = new GeoTransform(GeoTrf::Transform3D(clampPos)); tag = new GeoNameTag("Clamp"); blmModPhys->add(tag); blmModPhys->add(yforma); @@ -258,8 +255,8 @@ GeoPhysVol* BLM_Module::Build(const AbsMaterialManager* mat_mgr, const BLM_Modul //diamond//blmDiamondLog GeoPhysVol* DiamondVol = wall.BuildBlock(8, diamondThick, diamondSize, "blmDiamondLog", diamond); - CLHEP::Hep3Vector DiamondPos(parameters->DiamondPosition_X(), BLM_Wall::s_holder_height-ModHeight/2+CuThick+LamelThick15+diamondThick/2, ModLength/2-diamondSize/2-5+parameters->DiamondPosition_Z()); - xform = new GeoTransform(HepGeom::Transform3D(holderRot,DiamondPos)); + GeoTrf::Translate3D DiamondPos(parameters->DiamondPosition_X(), BLM_Wall::s_holder_height-ModHeight/2+CuThick+LamelThick15+diamondThick/2, ModLength/2-diamondSize/2-5+parameters->DiamondPosition_Z()); + xform = new GeoTransform(GeoTrf::Transform3D(DiamondPos)); tag = new GeoNameTag("Diamond"); blmModPhys->add(tag); blmModPhys->add(new GeoIdentifierTag(2009)); diff --git a/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Wall.cxx b/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Wall.cxx index 301a75ec9ed..e2983ec4d48 100755 --- a/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Wall.cxx +++ b/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Wall.cxx @@ -29,15 +29,14 @@ GeoPhysVol* BLM_Wall::BuildClamp(const GeoMaterial* material) const GeoBox* blmWallBox = new GeoBox(s_width/2, s_clamp_thickness/2, s_clamp_length/2); const GeoTube* blmWallHole = new GeoTube(0, s_hole_r, s_clamp_thickness); //rotations - CLHEP::HepRotation rm; - rm.rotateX(90.*CLHEP::deg); + GeoTrf::RotateX3D rm(90.*GeoModelKernelUnits::deg); //position of holes - CLHEP::Hep3Vector pos1(s_width/2-s_hole_position, 0, s_clamp_length/2-2.5); - CLHEP::Hep3Vector pos2(s_hole_position-s_width/2, 0, s_clamp_length/2-2.5); + GeoTrf::Translation3D pos1(s_width/2-s_hole_position, 0, s_clamp_length/2-2.5); + GeoTrf::Translation3D pos2(s_hole_position-s_width/2, 0, s_clamp_length/2-2.5); //offsets - HepGeom::Transform3D offset1(rm,pos1); - HepGeom::Transform3D offset2(rm,pos2); + GeoTrf::Transform3D offset1 = pos1*rm; + GeoTrf::Transform3D offset2 = pos2*rm; const GeoShapeSubtraction& blm1 = blmWallBox->subtract(((*blmWallHole) << offset1)); const GeoShapeSubtraction& blmFinal = blm1.subtract(((*blmWallHole)<< offset2)); @@ -61,9 +60,7 @@ GeoPhysVol* BLM_Wall::BuildScrew(double length, const GeoMaterial* material) const GeoTube* blmScrew = new GeoTube(0, 2.5, 1); const GeoTube* blmScrew1 = new GeoTube(0, 1.5, length/2); //positions - CLHEP::HepRotation rm; - CLHEP::Hep3Vector pos1(0, 0, length/2+1); - HepGeom::Transform3D offset1(rm,pos1); + GeoTrf::Translate3D offset1(0, 0, length/2+1); const GeoShapeUnion& blmFinal = blmScrew->add(((*blmScrew1) << offset1)); const GeoLogVol* blmWallLog = new GeoLogVol("blmWallLog", &blmFinal, material); @@ -79,33 +76,28 @@ GeoPhysVol* BLM_Wall::BuildHolder(const GeoMaterial* material) const GeoTube* blmWallHole = new GeoTube(0, s_hole_r, s_holder_thickness); const GeoBox* blmWallHole1 = new GeoBox(s_holder_spacing/2, s_holder_height, (s_holder_spacing_length+s_holder_thickness)/2+1); //rotations - CLHEP::HepRotation rm; - CLHEP::HepRotation rm1; - rm.rotateX(90.*CLHEP::deg); + GeoTrf::RotateX3D rm(90.*GeoModelKernelUnits::deg); //position of holes - CLHEP::Hep3Vector pos1(s_width/2-s_hole_position, 0, s_holder_length/2-s_hole_position); - CLHEP::Hep3Vector pos2(s_hole_position-s_width/2, 0, s_holder_length/2-s_hole_position); - CLHEP::Hep3Vector pos3(s_width/2-s_hole_position, 0, s_holder_length/2-s_length+s_hole_position); - CLHEP::Hep3Vector pos4(s_hole_position-s_width/2, 0, s_holder_length/2-s_length+s_hole_position); - CLHEP::Hep3Vector pos5(s_width/2-s_hole_position, 0, s_holder_length/2-s_extended_length+2.1); - CLHEP::Hep3Vector pos6(s_hole_position-s_width/2, 0, s_holder_length/2-s_extended_length+2.1); - CLHEP::Hep3Vector pos9(s_width/2-s_hole_position, 3.5+s_holder_thickness/2-s_holder_height, s_holder_thickness/2-s_holder_length/2); - CLHEP::Hep3Vector pos10(s_hole_position-s_width/2, 3.5+s_holder_thickness/2-s_holder_height, s_holder_thickness/2-s_holder_length/2); + GeoTrf::Translation3D pos1(s_width/2-s_hole_position, 0, s_holder_length/2-s_hole_position); + GeoTrf::Translation3D pos2(s_hole_position-s_width/2, 0, s_holder_length/2-s_hole_position); + GeoTrf::Translation3D pos3(s_width/2-s_hole_position, 0, s_holder_length/2-s_length+s_hole_position); + GeoTrf::Translation3D pos4(s_hole_position-s_width/2, 0, s_holder_length/2-s_length+s_hole_position); + GeoTrf::Translation3D pos5(s_width/2-s_hole_position, 0, s_holder_length/2-s_extended_length+2.1); + GeoTrf::Translation3D pos6(s_hole_position-s_width/2, 0, s_holder_length/2-s_extended_length+2.1); + GeoTrf::Translate3D offset9(s_width/2-s_hole_position, 3.5+s_holder_thickness/2-s_holder_height, s_holder_thickness/2-s_holder_length/2); + GeoTrf::Translate3D offset10(s_hole_position-s_width/2, 3.5+s_holder_thickness/2-s_holder_height, s_holder_thickness/2-s_holder_length/2); //position of vertical boxes - CLHEP::Hep3Vector pos7(0, s_holder_thickness/2-s_holder_height/2, s_holder_thickness/2-s_holder_length/2); + GeoTrf::Translate3D offset7(0, s_holder_thickness/2-s_holder_height/2, s_holder_thickness/2-s_holder_length/2); //position of the hole - CLHEP::Hep3Vector pos8(0, -s_holder_height/2, (s_holder_spacing_length+s_holder_thickness)/2-s_holder_length/2-2); + GeoTrf::Translate3D offset8(0, -s_holder_height/2, (s_holder_spacing_length+s_holder_thickness)/2-s_holder_length/2-2); //offsets - HepGeom::Transform3D offset1(rm,pos1); - HepGeom::Transform3D offset2(rm,pos2); - HepGeom::Transform3D offset3(rm,pos3); - HepGeom::Transform3D offset4(rm,pos4); - HepGeom::Transform3D offset5(rm,pos5); - HepGeom::Transform3D offset6(rm,pos6); - HepGeom::Transform3D offset7(rm1,pos7); - HepGeom::Transform3D offset8(rm1,pos8); - HepGeom::Transform3D offset9(rm1,pos9); - HepGeom::Transform3D offset10(rm1,pos10); + GeoTrf::Transform3D offset1 = pos1*rm; + GeoTrf::Transform3D offset2 = pos2*rm; + GeoTrf::Transform3D offset3 = pos3*rm; + GeoTrf::Transform3D offset4 = pos4*rm; + GeoTrf::Transform3D offset5 = pos5*rm; + GeoTrf::Transform3D offset6 = pos6*rm; + const GeoShapeUnion& blm1 = blmWallBox->add(((*blmWallBox1) << offset7)); const GeoShapeSubtraction& blm3 = blm1.subtract(((*blmWallHole1)<< offset8)); const GeoShapeSubtraction& blm4 = blm3.subtract(((*blmWallHole) << offset1)); @@ -132,29 +124,24 @@ GeoPhysVol* BLM_Wall::BuildLayerI(double thick, const GeoMaterial* material, boo const GeoShape* blmWallHole1 = new GeoBox(s_width/2-3.5, thick, 5.9); const GeoShape* blmWallHole2 = new GeoBox(s_width/2-6.1, thick, 4); const GeoShape* blmWallHole3 = new GeoBox(3.89, thick, 3.89); - CLHEP::HepRotation rm; - CLHEP::HepRotation rm1; - CLHEP::HepRotation rm2; - rm.rotateX(90.*CLHEP::deg); - rm1.rotateY(45.*CLHEP::deg); - CLHEP::Hep3Vector pos1(s_width/2-s_hole_position, 0, s_extended_length/2-s_hole_position); - CLHEP::Hep3Vector pos2(s_hole_position-s_width/2, 0, s_extended_length/2-s_hole_position); - CLHEP::Hep3Vector pos3(s_width/2-s_hole_position, 0, s_extended_length/2-s_length+s_hole_position); - CLHEP::Hep3Vector pos4(s_hole_position-s_width/2, 0, s_extended_length/2-s_length+s_hole_position); - CLHEP::Hep3Vector pos9(s_width/2-s_hole_position, 0, 2.1-s_extended_length/2); - CLHEP::Hep3Vector pos10(s_hole_position-s_width/2, 0, 2.1-s_extended_length/2); - CLHEP::Hep3Vector pos5(0, 0, s_extended_length/2-s_length+12.55); - CLHEP::Hep3Vector pos6(0, 0, s_extended_length/2-s_length+4); - CLHEP::Hep3Vector pos7(0, 0, s_extended_length/2+6.6-s_length); - HepGeom::Transform3D offset1(rm,pos1); - HepGeom::Transform3D offset2(rm,pos2); - HepGeom::Transform3D offset3(rm,pos3); - HepGeom::Transform3D offset4(rm,pos4); - HepGeom::Transform3D offset5(rm2,pos5); - HepGeom::Transform3D offset6(rm2,pos6); - HepGeom::Transform3D offset7(rm1,pos7); - HepGeom::Transform3D offset9(rm,pos9); - HepGeom::Transform3D offset10(rm,pos10); + GeoTrf::RotateX3D rm(90.*GeoModelKernelUnits::deg); + GeoTrf::RotateY3D rm1(45.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos1(s_width/2-s_hole_position, 0, s_extended_length/2-s_hole_position); + GeoTrf::Translation3D pos2(s_hole_position-s_width/2, 0, s_extended_length/2-s_hole_position); + GeoTrf::Translation3D pos3(s_width/2-s_hole_position, 0, s_extended_length/2-s_length+s_hole_position); + GeoTrf::Translation3D pos4(s_hole_position-s_width/2, 0, s_extended_length/2-s_length+s_hole_position); + GeoTrf::Translation3D pos9(s_width/2-s_hole_position, 0, 2.1-s_extended_length/2); + GeoTrf::Translation3D pos10(s_hole_position-s_width/2, 0, 2.1-s_extended_length/2); + GeoTrf::Translate3D offset5(0, 0, s_extended_length/2-s_length+12.55); + GeoTrf::Translate3D offset6(0, 0, s_extended_length/2-s_length+4); + GeoTrf::Translation3D pos7(0, 0, s_extended_length/2+6.6-s_length); + GeoTrf::Transform3D offset1 = pos1*rm; + GeoTrf::Transform3D offset2 = pos2*rm; + GeoTrf::Transform3D offset3 = pos3*rm; + GeoTrf::Transform3D offset4 = pos4*rm; + GeoTrf::Transform3D offset7 = pos7*rm1; + GeoTrf::Transform3D offset9 = pos9*rm; + GeoTrf::Transform3D offset10 = pos10*rm; const GeoShapeSubtraction& blm1 = blmWallBox->subtract(((*blmWallHole3) << offset7)); const GeoShapeSubtraction& blm2 = blm1.subtract(((*blmWallHole) << offset2)); @@ -175,21 +162,19 @@ GeoPhysVol* BLM_Wall::BuildLayerI(double thick, const GeoMaterial* material, boo { const GeoShape* blmWallBox = new GeoBox(s_width/2, thick/2, s_extended_length/2); const GeoShape* blmWallHole = new GeoTube(0, s_hole_r, thick); - CLHEP::HepRotation rm; - CLHEP::HepRotation rm1; - rm.rotateX(90.*CLHEP::deg); - CLHEP::Hep3Vector pos1(s_width/2-s_hole_position, 0, s_extended_length/2-s_hole_position); - CLHEP::Hep3Vector pos2(s_hole_position-s_width/2, 0, s_extended_length/2-s_hole_position); - CLHEP::Hep3Vector pos3(s_width/2-s_hole_position, 0, s_extended_length/2-s_length+s_hole_position); - CLHEP::Hep3Vector pos4(s_hole_position-s_width/2, 0, s_extended_length/2-s_length+s_hole_position); - CLHEP::Hep3Vector pos5(s_width/2-s_hole_position, 0, 2.1-s_extended_length/2); - CLHEP::Hep3Vector pos6(s_hole_position-s_width/2, 0, 2.1-s_extended_length/2); - HepGeom::Transform3D offset1(rm,pos1); - HepGeom::Transform3D offset2(rm,pos2); - HepGeom::Transform3D offset3(rm,pos3); - HepGeom::Transform3D offset4(rm,pos4); - HepGeom::Transform3D offset5(rm,pos5); - HepGeom::Transform3D offset6(rm,pos6); + GeoTrf::RotateX3D rm(90.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos1(s_width/2-s_hole_position, 0, s_extended_length/2-s_hole_position); + GeoTrf::Translation3D pos2(s_hole_position-s_width/2, 0, s_extended_length/2-s_hole_position); + GeoTrf::Translation3D pos3(s_width/2-s_hole_position, 0, s_extended_length/2-s_length+s_hole_position); + GeoTrf::Translation3D pos4(s_hole_position-s_width/2, 0, s_extended_length/2-s_length+s_hole_position); + GeoTrf::Translation3D pos5(s_width/2-s_hole_position, 0, 2.1-s_extended_length/2); + GeoTrf::Translation3D pos6(s_hole_position-s_width/2, 0, 2.1-s_extended_length/2); + GeoTrf::Transform3D offset1 = pos1*rm; + GeoTrf::Transform3D offset2 = pos2*rm; + GeoTrf::Transform3D offset3 = pos3*rm; + GeoTrf::Transform3D offset4 = pos4*rm; + GeoTrf::Transform3D offset5 = pos5*rm; + GeoTrf::Transform3D offset6 = pos6*rm; const GeoShapeSubtraction& blm1 = blmWallBox->subtract(((*blmWallHole) << offset1)); const GeoShapeSubtraction& blm2 = blm1.subtract(((*blmWallHole) << offset2)); const GeoShapeSubtraction& blm3 = blm2.subtract(((*blmWallHole) << offset3)); @@ -212,28 +197,23 @@ GeoPhysVol* BLM_Wall::BuildLayerII(double thick, const GeoMaterial* material) const GeoShape* blmWallHole2 = new GeoBox(s_width/2-6.1, thick, 4); //const GeoShape* blmWallHole3 = new GeoBox(1.76777, thick, 1.76777); const GeoShape* blmWallHole3 = new GeoBox(3.9, thick, 3.9); - CLHEP::HepRotation rm; - CLHEP::HepRotation rm1; - CLHEP::HepRotation rm2; - rm.rotateX(90.*CLHEP::deg); - rm1.rotateY(45.*CLHEP::deg); - CLHEP::Hep3Vector pos1(s_width/2-s_hole_position, 0, s_length/2-s_hole_position); - CLHEP::Hep3Vector pos2(s_hole_position-s_width/2, 0, s_length/2-s_hole_position); - CLHEP::Hep3Vector pos3(s_width/2-s_hole_position, 0, s_hole_position-s_length/2); - CLHEP::Hep3Vector pos4(s_hole_position-s_width/2, 0, s_hole_position-s_length/2); - CLHEP::Hep3Vector pos5(0, 0, 1.5); - CLHEP::Hep3Vector pos6(0, 0, -7.175); - CLHEP::Hep3Vector pos7(s_width/2-6.1, 0, 6.6-s_length/2); - //CLHEP::Hep3Vector pos8(6.1-s_width/2, 0, 6.6-s_length/2); - CLHEP::Hep3Vector pos8(0, 0, 6.6-s_length/2); - HepGeom::Transform3D offset1(rm,pos1); - HepGeom::Transform3D offset2(rm,pos2); - HepGeom::Transform3D offset3(rm,pos3); - HepGeom::Transform3D offset4(rm,pos4); - HepGeom::Transform3D offset5(rm2,pos5); - HepGeom::Transform3D offset6(rm2,pos6); - HepGeom::Transform3D offset7(rm1,pos7); - HepGeom::Transform3D offset8(rm1,pos8); + GeoTrf::RotateX3D rm(90.*GeoModelKernelUnits::deg); + GeoTrf::RotateY3D rm1(45.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos1(s_width/2-s_hole_position, 0, s_length/2-s_hole_position); + GeoTrf::Translation3D pos2(s_hole_position-s_width/2, 0, s_length/2-s_hole_position); + GeoTrf::Translation3D pos3(s_width/2-s_hole_position, 0, s_hole_position-s_length/2); + GeoTrf::Translation3D pos4(s_hole_position-s_width/2, 0, s_hole_position-s_length/2); + GeoTrf::Translate3D offset5(0, 0, 1.5); + GeoTrf::Translate3D offset6(0, 0, -7.175); + //GeoTrf::Translation3D pos7(s_width/2-6.1, 0, 6.6-s_length/2); + //GeoTrf::Vector3D pos8(6.1-s_width/2, 0, 6.6-s_length/2); + GeoTrf::Translation3D pos8(0, 0, 6.6-s_length/2); + GeoTrf::Transform3D offset1 = pos1*rm; + GeoTrf::Transform3D offset2 = pos2*rm; + GeoTrf::Transform3D offset3 = pos3*rm; + GeoTrf::Transform3D offset4 = pos4*rm; + //GeoTrf::Transform3D offset7 = pos7*rm1; + GeoTrf::Transform3D offset8 = pos8*rm1; const GeoShapeSubtraction& blm1 = blmWallBox->subtract(((*blmWallHole3) << offset8)); const GeoShapeSubtraction& blm2 = blm1.subtract(((*blmWallHole) << offset2)); @@ -255,19 +235,16 @@ GeoPhysVol* BLM_Wall::BuildLayerIII(double thick, const GeoMaterial* material) const GeoShape* blmWallBox = new GeoBox(s_width/2, thick/2, s_length/2); const GeoShape* blmWallHole = new GeoTube(0, s_hole_r, thick); const GeoShape* blmWallHole1 = new GeoBox(s_width/2-3.5, thick, 5.425); - CLHEP::HepRotation rm; - CLHEP::HepRotation rm1; - rm.rotateX(90.*CLHEP::deg); - CLHEP::Hep3Vector pos1(s_width/2-s_hole_position, 0, s_length/2-s_hole_position); - CLHEP::Hep3Vector pos2(s_hole_position-s_width/2, 0, s_length/2-s_hole_position); - CLHEP::Hep3Vector pos3(s_width/2-s_hole_position, 0, s_hole_position-s_length/2); - CLHEP::Hep3Vector pos4(s_hole_position-s_width/2, 0, s_hole_position-s_length/2); - CLHEP::Hep3Vector pos5(0, 0, 2.075); - HepGeom::Transform3D offset1(rm,pos1); - HepGeom::Transform3D offset2(rm,pos2); - HepGeom::Transform3D offset3(rm,pos3); - HepGeom::Transform3D offset4(rm,pos4); - HepGeom::Transform3D offset5(rm1,pos5); + GeoTrf::RotateX3D rm(90.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos1(s_width/2-s_hole_position, 0, s_length/2-s_hole_position); + GeoTrf::Translation3D pos2(s_hole_position-s_width/2, 0, s_length/2-s_hole_position); + GeoTrf::Translation3D pos3(s_width/2-s_hole_position, 0, s_hole_position-s_length/2); + GeoTrf::Translation3D pos4(s_hole_position-s_width/2, 0, s_hole_position-s_length/2); + GeoTrf::Translate3D offset5(0, 0, 2.075); + GeoTrf::Transform3D offset1 = pos1*rm; + GeoTrf::Transform3D offset2 = pos2*rm; + GeoTrf::Transform3D offset3 = pos3*rm; + GeoTrf::Transform3D offset4 = pos4*rm; const GeoShapeSubtraction& blm1 = blmWallBox->subtract(((*blmWallHole) << offset1)); const GeoShapeSubtraction& blm2 = blm1.subtract(((*blmWallHole) << offset2)); const GeoShapeSubtraction& blm3 = blm2.subtract(((*blmWallHole) << offset3)); @@ -286,21 +263,17 @@ GeoPhysVol* BLM_Wall::BuildLayerIV(double thick, const GeoMaterial* material) const GeoShape* blmWallHole = new GeoTube(0, s_hole_r, thick); const GeoShape* blmWallHole1 = new GeoBox(s_width/2-3.5, thick, 5.425); const GeoShape* blmWallHole2 = new GeoBox(s_width/2-8.1, thick, 4); - CLHEP::HepRotation rm; - CLHEP::HepRotation rm1; - rm.rotateX(90.*CLHEP::deg); - CLHEP::Hep3Vector pos1(s_width/2-s_hole_position, 0, s_length/2-s_hole_position); - CLHEP::Hep3Vector pos2(s_hole_position-s_width/2, 0, s_length/2-s_hole_position); - CLHEP::Hep3Vector pos3(s_width/2-s_hole_position, 0, s_hole_position-s_length/2); - CLHEP::Hep3Vector pos4(s_hole_position-s_width/2, 0, s_hole_position-s_length/2); - CLHEP::Hep3Vector pos5(0, 0, 2.075); - CLHEP::Hep3Vector pos6(0, 0, -7.175); - HepGeom::Transform3D offset1(rm,pos1); - HepGeom::Transform3D offset2(rm,pos2); - HepGeom::Transform3D offset3(rm,pos3); - HepGeom::Transform3D offset4(rm,pos4); - HepGeom::Transform3D offset5(rm1,pos5); - HepGeom::Transform3D offset6(rm1,pos6); + GeoTrf::RotateX3D rm(90.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos1(s_width/2-s_hole_position, 0, s_length/2-s_hole_position); + GeoTrf::Translation3D pos2(s_hole_position-s_width/2, 0, s_length/2-s_hole_position); + GeoTrf::Translation3D pos3(s_width/2-s_hole_position, 0, s_hole_position-s_length/2); + GeoTrf::Translation3D pos4(s_hole_position-s_width/2, 0, s_hole_position-s_length/2); + GeoTrf::Translate3D offset5(0, 0, 2.075); + GeoTrf::Translate3D offset6(0, 0, -7.175); + GeoTrf::Transform3D offset1 = pos1*rm; + GeoTrf::Transform3D offset2 = pos2*rm; + GeoTrf::Transform3D offset3 = pos3*rm; + GeoTrf::Transform3D offset4 = pos4*rm; const GeoShapeSubtraction& blm1 = blmWallBox->subtract(((*blmWallHole) << offset1)); const GeoShapeSubtraction& blm2 = blm1.subtract(((*blmWallHole) << offset2)); const GeoShapeSubtraction& blm3 = blm2.subtract(((*blmWallHole) << offset3)); @@ -318,16 +291,15 @@ GeoPhysVol* BLM_Wall::BuildLayerV(double thick, const GeoMaterial* material) { const GeoShape* blmWallBox = new GeoBox(s_width/2, thick/2, s_length/2); const GeoShape* blmWallHole = new GeoTube(0, s_hole_r, thick); - CLHEP::HepRotation rm; - rm.rotateX(90.*CLHEP::deg); - CLHEP::Hep3Vector pos1(s_width/2-s_hole_position, 0, s_length/2-s_hole_position); - CLHEP::Hep3Vector pos2(s_hole_position-s_width/2, 0, s_length/2-s_hole_position); - CLHEP::Hep3Vector pos3(s_width/2-s_hole_position, 0, s_hole_position-s_length/2); - CLHEP::Hep3Vector pos4(s_hole_position-s_width/2, 0, s_hole_position-s_length/2); - HepGeom::Transform3D offset1(rm,pos1); - HepGeom::Transform3D offset2(rm,pos2); - HepGeom::Transform3D offset3(rm,pos3); - HepGeom::Transform3D offset4(rm,pos4); + GeoTrf::RotateX3D rm(90.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos1(s_width/2-s_hole_position, 0, s_length/2-s_hole_position); + GeoTrf::Translation3D pos2(s_hole_position-s_width/2, 0, s_length/2-s_hole_position); + GeoTrf::Translation3D pos3(s_width/2-s_hole_position, 0, s_hole_position-s_length/2); + GeoTrf::Translation3D pos4(s_hole_position-s_width/2, 0, s_hole_position-s_length/2); + GeoTrf::Transform3D offset1 = pos1*rm; + GeoTrf::Transform3D offset2 = pos2*rm; + GeoTrf::Transform3D offset3 = pos3*rm; + GeoTrf::Transform3D offset4 = pos4*rm; const GeoShapeSubtraction& blm1 = blmWallBox->subtract(((*blmWallHole) << offset1)); const GeoShapeSubtraction& blm2 = blm1.subtract(((*blmWallHole) << offset2)); const GeoShapeSubtraction& blm3 = blm2.subtract(((*blmWallHole) << offset3)); diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/CMakeLists.txt index a9dee220a6c..35712cde5b0 100644 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/CMakeLists.txt @@ -9,18 +9,19 @@ atlas_subdir( InDetGeoModelUtils ) atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel PRIVATE Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoPrimitives DetectorDescription/GeometryDBSvc ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( InDetGeoModelUtils @@ -28,6 +29,6 @@ atlas_add_library( InDetGeoModelUtils PUBLIC_HEADERS InDetGeoModelUtils INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GaudiKernel StoreGateLib SGtests + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GaudiKernel StoreGateLib SGtests PRIVATE_LINK_LIBRARIES GeoModelUtilities ) diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/TopLevelPlacements.h b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/TopLevelPlacements.h index ae144a72c31..541fba5a442 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/TopLevelPlacements.h +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/InDetGeoModelUtils/TopLevelPlacements.h @@ -5,8 +5,9 @@ #ifndef INDETGEOMODELUTILS_TOPLEVELPLACEMENTS_H #define INDETGEOMODELUTILS_TOPLEVELPLACEMENTS_H -#include "CLHEP/Geometry/Transform3D.h" #include "RDBAccessSvc/IRDBAccessSvc.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <map> #include <string> @@ -22,7 +23,7 @@ public: ~TopLevelPlacements(); bool present(const std::string & partName) const; - const HepGeom::Transform3D & transform(const std::string & partName) const; + const GeoTrf::Transform3D & transform(const std::string & partName) const; private: @@ -30,18 +31,17 @@ private: class Part { public: std::string label; - HepGeom::Transform3D transform; + GeoTrf::Transform3D transform; }; void fillPlacements(IRDBRecordset_ptr topLevelTable); - HepGeom::Transform3D partTransform(const IRDBRecord* record) const; + GeoTrf::Transform3D partTransform(const IRDBRecord* record) const; Part * getPart(const std::string & partName) const; std::map<std::string, Part *> m_parts; bool m_noTopLevelTable; - static HepGeom::Transform3D s_identityTransform; - + static GeoTrf::Transform3D s_identityTransform; }; #endif // INDETGEOMODELUTILS_TOPLEVELPLACEMENTS_H diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ExtraMaterial.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ExtraMaterial.cxx index 87de0f163a3..6dfe4a12d5e 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ExtraMaterial.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ExtraMaterial.cxx @@ -9,16 +9,14 @@ //#include "InDetGeoModelUtils/InDetMaterialManager.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoTubs.h" #include "GeoModelKernel/GeoCons.h" -#include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Geometry/Transform3D.h" - #include "GeoModelInterfaces/AbsMaterialManager.h" diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/GenericTubeMaker.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/GenericTubeMaker.cxx index 920a3f05161..94f7b5f3630 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/GenericTubeMaker.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/GenericTubeMaker.cxx @@ -12,6 +12,8 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "RDBAccessSvc/IRDBRecord.h" @@ -98,7 +100,7 @@ namespace InDetDD { GeoTransform* xform = 0; double zOffset = m_volData.zMid() - zParent; if (zOffset != 0 || iRepeat > 0) { - xform = new GeoTransform(HepGeom::TranslateZ3D(zOffset) * HepGeom::RotateZ3D(phi)); + xform = new GeoTransform(GeoTrf::TranslateZ3D(zOffset) * GeoTrf::RotateZ3D(phi)); } if (parent) { @@ -111,8 +113,8 @@ namespace InDetDD { // Place in negative z as well. if (m_volData.bothZ()) { - GeoTransform* xformNeg = new GeoTransform(HepGeom::RotateY3D(180 * CLHEP::deg) * HepGeom::TranslateZ3D( - zOffset) * HepGeom::RotateZ3D(phi)); + GeoTransform* xformNeg = new GeoTransform(GeoTrf::RotateY3D(180 * GeoModelKernelUnits::deg) * GeoTrf::TranslateZ3D( + zOffset) * GeoTrf::RotateZ3D(phi)); if (parent) { parent->add(xformNeg); parent->add(child); @@ -135,20 +137,20 @@ namespace InDetDD { if (parentPos) { if (newXform) { - parentPos->add(new GeoTransform(HepGeom::TranslateZ3D(zOffset) * HepGeom::RotateZ3D(phi))); + parentPos->add(new GeoTransform(GeoTrf::TranslateZ3D(zOffset) * GeoTrf::RotateZ3D(phi))); } parentPos->add(child); } else if (fullparentPos) { if (newXform) { - fullparentPos->add(new GeoTransform(HepGeom::TranslateZ3D(zOffset) * HepGeom::RotateZ3D(phi))); + fullparentPos->add(new GeoTransform(GeoTrf::TranslateZ3D(zOffset) * GeoTrf::RotateZ3D(phi))); } fullparentPos->add(child); } // Place in negative z as well. if (m_volData.bothZ()) { - GeoTransform* xformNeg = new GeoTransform(HepGeom::RotateY3D(180 * CLHEP::deg) * HepGeom::TranslateZ3D( - zOffset) * HepGeom::RotateZ3D(phi)); + GeoTransform* xformNeg = new GeoTransform(GeoTrf::RotateY3D(180 * GeoModelKernelUnits::deg) * GeoTrf::TranslateZ3D( + zOffset) * GeoTrf::RotateZ3D(phi)); if (parentNeg) { parentNeg->add(xformNeg); parentNeg->add(child); diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/InDetMaterialManager.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/InDetMaterialManager.cxx index f8ae66df9ce..e811e511ae6 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/InDetMaterialManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/InDetMaterialManager.cxx @@ -8,11 +8,11 @@ #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoElement.h" +#include "GeoModelKernel/Units.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" #include "GeometryDBSvc/IGeometryDBSvc.h" #include "StoreGate/StoreGateSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" #include <iostream> #include <iomanip> @@ -142,8 +142,8 @@ InDetMaterialManager::getCompositeMaterialForVolume(const std::string& newMatNam baseMaterials.reserve(2); fracWeight.reserve(2); - msg(MSG::DEBUG) << "Composite material : " << volumeTot / CLHEP::cm3 << " = " << volume1 / CLHEP::cm3 << " + " << - volume2 / CLHEP::cm3 << endmsg; + msg(MSG::DEBUG) << "Composite material : " << volumeTot / GeoModelKernelUnits::cm3 << " = " << volume1 / GeoModelKernelUnits::cm3 << " + " << + volume2 / GeoModelKernelUnits::cm3 << endmsg; msg(MSG::DEBUG) << "Composite material : " << matName1 << " " << matName2 << endmsg; double density1, density2; @@ -152,21 +152,21 @@ InDetMaterialManager::getCompositeMaterialForVolume(const std::string& newMatNam if ((iter = m_weightMap.find(matName1)) != m_weightMap.end()) { const GeoMaterial* mat1 = getMaterialForVolume(matName1, volume1); density1 = mat1->getDensity(); - msg(MSG::DEBUG) << "Composite material 1 - weight : " << density1 / (CLHEP::gram / CLHEP::cm3) << endmsg; + msg(MSG::DEBUG) << "Composite material 1 - weight : " << density1 / (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) << endmsg; } else { const GeoMaterial* mat1 = getMaterial(matName1); density1 = mat1->getDensity(); - msg(MSG::DEBUG) << "Composite material 1 - standard : " << density1 / (CLHEP::gram / CLHEP::cm3) << endmsg; + msg(MSG::DEBUG) << "Composite material 1 - standard : " << density1 / (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) << endmsg; } if ((iter = m_weightMap.find(matName2)) != m_weightMap.end()) { const GeoMaterial* mat2 = getMaterialForVolume(matName2, volume2); density2 = mat2->getDensity(); - msg(MSG::DEBUG) << "Composite material 2 - weight : " << density2 / (CLHEP::gram / CLHEP::cm3) << endmsg; + msg(MSG::DEBUG) << "Composite material 2 - weight : " << density2 / (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) << endmsg; } else { const GeoMaterial* mat2 = getMaterial(matName2); density2 = mat2->getDensity(); - msg(MSG::DEBUG) << "Composite material 2 - standard : " << density2 / (CLHEP::gram / CLHEP::cm3) << endmsg; + msg(MSG::DEBUG) << "Composite material 2 - standard : " << density2 / (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) << endmsg; } double weight1 = density1 * volume1; @@ -179,9 +179,9 @@ InDetMaterialManager::getCompositeMaterialForVolume(const std::string& newMatNam double frac2 = weight2 / (weight1 + weight2); double density_2 = 1.0 / (frac1 / density1 + frac2 / density2); double density_3 = (weight1 + weight2) / (volume1 + volume2); - msg(MSG::DEBUG) << "-> weights : " << weight1 / (CLHEP::gram) << " " << weight2 / (CLHEP::gram) << endmsg; - msg(MSG::DEBUG) << "-> density : " << density / (CLHEP::gram / CLHEP::cm3) << " " << density_2 / - (CLHEP::gram / CLHEP::cm3) << " " << density_3 / (CLHEP::gram / CLHEP::cm3) << endmsg; + msg(MSG::DEBUG) << "-> weights : " << weight1 / (GeoModelKernelUnits::gram) << " " << weight2 / (GeoModelKernelUnits::gram) << endmsg; + msg(MSG::DEBUG) << "-> density : " << density / (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) << " " << density_2 / + (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) << " " << density_3 / (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) << endmsg; baseMaterials.push_back(matName1); @@ -228,8 +228,8 @@ InDetMaterialManager::getMaterialInternal(const std::string& origMaterialName, if (material) { if (!compareDensity(material->getDensity(), density)) { msg(MSG::WARNING) << "Density is not consistent for material " << newName2 - << " " << material->getDensity() / (CLHEP::gram / CLHEP::cm3) - << " / " << density / (CLHEP::gram / CLHEP::cm3) << endmsg; + << " " << material->getDensity() / (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) + << " / " << density / (GeoModelKernelUnits::gram / GeoModelKernelUnits::cm3) << endmsg; } newMaterial = material; } else { @@ -311,7 +311,7 @@ InDetMaterialManager::addMaterial(GeoMaterial* material) { m_store[name] = material; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Created new material: " << name << ", " << material->getDensity() / - (CLHEP::g / CLHEP::cm3) << " CLHEP::g/CLHEP::cm3" << endmsg; + (GeoModelKernelUnits::g / GeoModelKernelUnits::cm3) << " g/cm3" << endmsg; } } @@ -338,7 +338,7 @@ InDetMaterialManager::addWeightTable(IRDBRecordset_ptr weightTable, const std::s if (db()->testField(weightTable, "BASEMATERIAL", i)) { materialBase = db()->getString(weightTable, "BASEMATERIAL", i); } - double weight = db()->getDouble(weightTable, "WEIGHT", i) * CLHEP::gram; + double weight = db()->getDouble(weightTable, "WEIGHT", i) * GeoModelKernelUnits::gram; //std::cout << materialName << " " << materialBase << " " << weight/CLHEP::g << std::endl; bool linearWeightFlag = false; @@ -364,7 +364,7 @@ void InDetMaterialManager::addWeightMaterial(std::string materialName, std::string materialBase, double weight, int linearWeightFlag) { // Weight in gr - weight = weight * CLHEP::gram; + weight = weight * GeoModelKernelUnits::gram; if (m_weightMap.find(materialName) != m_weightMap.end()) { msg(MSG::WARNING) << "Material: " << materialName << " already exists in weight table" << endmsg; @@ -389,7 +389,7 @@ InDetMaterialManager::addWeightTableOld(IRDBRecordset_ptr weightTable, const std if (!record->isFieldNull("BASEMATERIAL")) { materialBase = record->getString("BASEMATERIAL"); } - double weight = record->getDouble("WEIGHT") * CLHEP::gram; + double weight = record->getDouble("WEIGHT") * GeoModelKernelUnits::gram; //std::cout << materialName << " " << materialBase << " " << weight/CLHEP::g << std::endl; bool linearWeightFlag = false; @@ -492,12 +492,12 @@ InDetMaterialManager::getMaterialForVolume(const std::string& materialName, doub if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << - "Found material in weight table - name, base, weight(CLHEP::g), volume(CLHEP::cm3), density(CLHEP::g/CLHEP::cm3): " + "Found material in weight table - name, base, weight(g), volume(cm3), density(g/cm3): " << materialName << ", " << materialBase << ", " - << weight / CLHEP::gram << ", " - << volume / CLHEP::cm3 << ", " - << density / (CLHEP::g / CLHEP::cm3) << endmsg; + << weight / GeoModelKernelUnits::gram << ", " + << volume / GeoModelKernelUnits::cm3 << ", " + << density / (GeoModelKernelUnits::g / GeoModelKernelUnits::cm3) << endmsg; } if (materialBase.empty()) { @@ -516,7 +516,7 @@ InDetMaterialManager::getMaterialForVolume(const std::string& materialName, doub msg(MSG::VERBOSE) << "Material not in weight table, using standard material: " << materialName - << ", volume(CLHEP::cm3) = " << volume / CLHEP::cm3 + << ", volume(cm3) = " << volume / GeoModelKernelUnits::cm3 << endmsg; return getMaterial(materialName); } @@ -586,7 +586,7 @@ InDetMaterialManager::getMaterialForVolumeLength(const std::string& materialName msg(MSG::VERBOSE) << "Material not in weight table, using standard material: " << materialName - << ", volume(CLHEP::cm3) = " << volume / CLHEP::cm3 + << ", volume(cm3) = " << volume / GeoModelKernelUnits::cm3 << endmsg; return getMaterial(materialName); } @@ -639,9 +639,9 @@ InDetMaterialManager::getMaterialForVolumeLength(const std::string& name, weight *= factors[iComp]; } msg(MSG::DEBUG) << "Material " << materialName - << " found in weight table, weight " << iter->second.weight / CLHEP::gram + << " found in weight table, weight " << iter->second.weight / GeoModelKernelUnits::gram << " factor " << factors[iComp] - << " w*fac*len " << weight * length / CLHEP::gram + << " w*fac*len " << weight * length / GeoModelKernelUnits::gram << " basMat " << materialBase << " linear? " << iter->second.linearWeightFlag << endmsg; @@ -668,7 +668,7 @@ InDetMaterialManager::getMaterialForVolumeLength(const std::string& name, */ // In this case the factor should correspond to the linear weight - double weight = factors.at(iComp) * length * CLHEP::gram; + double weight = factors.at(iComp) * length * GeoModelKernelUnits::gram; // If material not found, will get error message when attempting to make the material. So carry on here. baseMaterials.push_back(materialName); @@ -681,7 +681,7 @@ InDetMaterialManager::getMaterialForVolumeLength(const std::string& name, msg(MSG::VERBOSE) << "Creating material from multiple components: " << name << endmsg; for (unsigned int i = 0; i < materialComponents.size(); ++i) { msg(MSG::VERBOSE) << " Component " << i << ": Name = " << baseMaterials[i] - << " Weight(CLHEP::g) = " << fracWeight[i] / CLHEP::g << endmsg; + << " Weight(g) = " << fracWeight[i] / GeoModelKernelUnits::g << endmsg; } } @@ -799,7 +799,7 @@ InDetMaterialManager::addTextFileMaterials() { // read in material table for (unsigned int iMat = 0; iMat < db()->getTableSize(materialTable); iMat++) { std::string materialName = db()->getString(materialTable, "NAME", iMat); - double density = db()->getDouble(materialTable, "DENSITY", iMat) * CLHEP::g / CLHEP::cm3; + double density = db()->getDouble(materialTable, "DENSITY", iMat) * GeoModelKernelUnits::g / GeoModelKernelUnits::cm3; materials[materialName] = MaterialDef(materialName, density); } @@ -899,7 +899,7 @@ InDetMaterialManager::createMaterial(const MaterialDef& material) { // Now build the material GeoMaterial* newMaterial = new GeoMaterial(material.name(), material.density()); if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Creating material: " << material.name() - << " with density: " << material.density() / (CLHEP::g / CLHEP::cm3) << + << " with density: " << material.density() / (GeoModelKernelUnits::g / GeoModelKernelUnits::cm3) << endmsg; for (unsigned int i = 0; i < material.numComponents(); i++) { double fracWeight = material.fraction(i) / totWeight; diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ServiceVolume.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ServiceVolume.cxx index e722f040718..55c9e70441e 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ServiceVolume.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ServiceVolume.cxx @@ -52,31 +52,31 @@ // Ignored: ROUT, RIN2, ROUT2 // RIN: Radial position of center of tube // PHI: phi position of center -// WIDTH (CLHEP::mm): diameter +// WIDTH (mm): diameter // REPEAT: Repeat this many times in phi with equal distance between them. // ROD2 (hollow tube not centered around Z axis) // Ignored: ROUT, ROUT2 // RIN: Radial position of center of tube // RIN2: inner radius // PHI: phi position of center -// WIDTH (CLHEP::mm): diameter +// WIDTH (mm): diameter // REPEAT: Repeat this many times in phi with equal distance between them. // BOX // Ignored: RIN2, ROUT2 // ROUT-RIN = thickness of box (radially) // (RIN+ROUT)/2 = radial poistion of center of box // PHI: phi position of center -// WIDTH (CLHEP::mm) = width of box +// WIDTH (mm) = width of box // REPEAT: Repeat this many times in phi with equal distance between them. // TRAP // Ignored: RIN2, ROUT2 // ROUT-RIN = thickness of trapezoid (radially) // (RIN+ROUT)/2 = radial poistion of center of trapzoid // PHI: phi position of center -// WIDTH (CLHEP::mm) = width of trapezoid at center +// WIDTH (mm) = width of trapezoid at center // REPEAT: Repeat this many times in phi with equal distance between them. // -// **IMPORTANT NOTE** WIDTH can be in degrees or CLHEP::mm. See OraclePixGeoManager +// **IMPORTANT NOTE** WIDTH can be in degrees or mm. See OraclePixGeoManager #include "InDetGeoModelUtils/ServiceVolume.h" #include "GeoModelKernel/GeoTube.h" @@ -86,6 +86,7 @@ #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTrap.h" #include "GeoModelKernel/GeoShapeSubtraction.h" +#include "GeoModelKernel/Units.h" #include <string> #include <iostream> @@ -238,10 +239,10 @@ namespace InDetDD { // Inner edge GeoShape* shapeTmp2 = 0; if (m_rmin == m_rmin2) { - shapeTmp2 = new GeoTube(0, m_rmin, halflength + 0.1 * CLHEP::mm); + shapeTmp2 = new GeoTube(0, m_rmin, halflength + 0.1 * GeoModelKernelUnits::mm); volume -= 2 * M_PI * m_rmin * m_rmin * halflength; } else { - shapeTmp2 = new GeoCons(0, 0, m_rmin, m_rmin2, halflength + 0.1 * CLHEP::mm, 0, 2 * M_PI); + shapeTmp2 = new GeoCons(0, 0, m_rmin, m_rmin2, halflength + 0.1 * GeoModelKernelUnits::mm, 0, 2 * M_PI); volume -= 2 * M_PI * pow(0.5 * (m_rmin + m_rmin2), 2) * halflength; } serviceShape = &(shapeTmp1->subtract(*shapeTmp2)); diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ServiceVolumeMaker.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ServiceVolumeMaker.cxx index c980d5cc37d..8e56a2b2ca2 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ServiceVolumeMaker.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/ServiceVolumeMaker.cxx @@ -10,7 +10,7 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "GeometryDBSvc/IGeometryDBSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" namespace InDetDD { ServiceVolumeSchema::ServiceVolumeSchema() { @@ -97,56 +97,56 @@ namespace InDetDD { double ServiceVolumeMakerMgr::rmin(int index) const { - return db()->getDouble(m_table, m_schema.rmin(), index) * CLHEP::mm; + return db()->getDouble(m_table, m_schema.rmin(), index) * GeoModelKernelUnits::mm; } double ServiceVolumeMakerMgr::rmax(int index) const { - return db()->getDouble(m_table, m_schema.rmax(), index) * CLHEP::mm; + return db()->getDouble(m_table, m_schema.rmax(), index) * GeoModelKernelUnits::mm; } double ServiceVolumeMakerMgr::rmin2(int index) const { - return db()->getDouble(m_table, m_schema.rmin2(), index) * CLHEP::mm; + return db()->getDouble(m_table, m_schema.rmin2(), index) * GeoModelKernelUnits::mm; } double ServiceVolumeMakerMgr::rmax2(int index) const { - return db()->getDouble(m_table, m_schema.rmax2(), index) * CLHEP::mm; + return db()->getDouble(m_table, m_schema.rmax2(), index) * GeoModelKernelUnits::mm; } double ServiceVolumeMakerMgr::zmin(int index) const { - return db()->getDouble(m_table, m_schema.zmin(), index) * CLHEP::mm; + return db()->getDouble(m_table, m_schema.zmin(), index) * GeoModelKernelUnits::mm; } double ServiceVolumeMakerMgr::zmax(int index) const { - return db()->getDouble(m_table, m_schema.zmax(), index) * CLHEP::mm; + return db()->getDouble(m_table, m_schema.zmax(), index) * GeoModelKernelUnits::mm; } double ServiceVolumeMakerMgr::phiDelta(int index) const { - return db()->getDouble(m_table, m_schema.phiDelta(), index) * CLHEP::deg; + return db()->getDouble(m_table, m_schema.phiDelta(), index) * GeoModelKernelUnits::deg; } double ServiceVolumeMakerMgr::width(int index) const { if (m_schema.has_width()) { - return db()->getDouble(m_table, m_schema.width(), index) * CLHEP::mm; + return db()->getDouble(m_table, m_schema.width(), index) * GeoModelKernelUnits::mm; } return 0; } double ServiceVolumeMakerMgr::phiStart(int index) const { - return db()->getDouble(m_table, m_schema.phiStart(), index) * CLHEP::deg; + return db()->getDouble(m_table, m_schema.phiStart(), index) * GeoModelKernelUnits::deg; } double ServiceVolumeMakerMgr::phiStep(int index) const { if (m_schema.has_phiStep()) { - return db()->getDouble(m_table, m_schema.phiStep(), index) * CLHEP::deg; + return db()->getDouble(m_table, m_schema.phiStep(), index) * GeoModelKernelUnits::deg; } return 0; } @@ -309,8 +309,8 @@ namespace InDetDD { double phiDelta = m_mgr->phiDelta(ii); bool fullPhiSector = false; - if (phiDelta == 0 || phiDelta >= 359.9 * CLHEP::degree) { - phiDelta = 360 * CLHEP::degree; + if (phiDelta == 0 || phiDelta >= 359.9 * GeoModelKernelUnits::degree) { + phiDelta = 360 * GeoModelKernelUnits::degree; fullPhiSector = true; } //else { @@ -340,12 +340,12 @@ namespace InDetDD { double phiWidth = phiDelta; if (shapeType == "CONS" || shapeType == "TUBS") { - const double phiepsilon = 0.001 * CLHEP::degree; + const double phiepsilon = 0.001 * GeoModelKernelUnits::degree; phiWidth -= 2 * phiepsilon; phiStart += phiepsilon; } - // Can be in degree or CLHEP::mm. Usually it is CLHEP::deg expect for BOX, TRAP and ROD shape + // Can be in degree or mm. Usually it is deg expect for BOX, TRAP and ROD shape // Geometry manager makes no assumptions about units. So we must interpret here. if (shapeType == "BOX" || shapeType == "ROD" || shapeType == "ROD2" || shapeType == "TRAP") { phiWidth = m_mgr->width(ii); // in mm diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/TopLevelPlacements.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/TopLevelPlacements.cxx index bd6b6f12ce8..8f8fce59eef 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/TopLevelPlacements.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/TopLevelPlacements.cxx @@ -2,19 +2,13 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ - #include "InDetGeoModelUtils/TopLevelPlacements.h" - -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/Units.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" +#include <iostream> - - - -HepGeom::Transform3D TopLevelPlacements::s_identityTransform = HepGeom::Transform3D(); - +GeoTrf::Transform3D TopLevelPlacements::s_identityTransform = GeoTrf::Transform3D::Identity(); TopLevelPlacements::TopLevelPlacements(IRDBRecordset_ptr topLevelTable) : m_noTopLevelTable(true) { @@ -26,7 +20,7 @@ TopLevelPlacements::~TopLevelPlacements() { for (iter = m_parts.begin(); iter != m_parts.end(); ++iter) delete iter->second; } -const HepGeom::Transform3D& +const GeoTrf::Transform3D& TopLevelPlacements::transform(const std::string& partName) const { Part* part = getPart(partName); @@ -63,18 +57,18 @@ TopLevelPlacements::fillPlacements(IRDBRecordset_ptr topLevelTable) { } } -HepGeom::Transform3D +GeoTrf::Transform3D TopLevelPlacements::partTransform(const IRDBRecord* record) const { - double posX = record->getDouble("POSX") * CLHEP::mm; - double posY = record->getDouble("POSY") * CLHEP::mm; - double posZ = record->getDouble("POSZ") * CLHEP::mm; - double rotX = record->getDouble("ROTX") * CLHEP::degree; - double rotY = record->getDouble("ROTY") * CLHEP::degree; - double rotZ = record->getDouble("ROTZ") * CLHEP::degree; + double posX = record->getDouble("POSX") * GeoModelKernelUnits::mm; + double posY = record->getDouble("POSY") * GeoModelKernelUnits::mm; + double posZ = record->getDouble("POSZ") * GeoModelKernelUnits::mm; + double rotX = record->getDouble("ROTX") * GeoModelKernelUnits::degree; + double rotY = record->getDouble("ROTY") * GeoModelKernelUnits::degree; + double rotZ = record->getDouble("ROTZ") * GeoModelKernelUnits::degree; int rotOrder = record->getInt("ROTORDER"); // Translation part - HepGeom::Transform3D transform = HepGeom::Translate3D(posX, posY, posZ); + GeoTrf::Translate3D transform(posX, posY, posZ); // If rotation is zero return translation if (rotX == 0 && rotY == 0 && rotZ == 0) { @@ -100,14 +94,14 @@ TopLevelPlacements::partTransform(const IRDBRecord* record) const { } // List of the three transforms - HepGeom::Transform3D* xformList[3] = { + GeoTrf::Transform3D* xformList[3] = { 0, 0, 0 }; - if (rotX != 0) xformList[0] = new HepGeom::RotateX3D(rotX); - if (rotY != 0) xformList[1] = new HepGeom::RotateY3D(rotY); - if (rotZ != 0) xformList[2] = new HepGeom::RotateZ3D(rotZ); + if (rotX != 0) xformList[0] = new GeoTrf::RotateX3D(rotX); + if (rotY != 0) xformList[1] = new GeoTrf::RotateY3D(rotY); + if (rotZ != 0) xformList[2] = new GeoTrf::RotateZ3D(rotZ); - HepGeom::Transform3D rotation; + GeoTrf::Transform3D rotation(GeoTrf::Transform3D::Identity()); if (xformList[ixyz1]) rotation = *(xformList[ixyz1]) * rotation; if (xformList[ixyz2]) rotation = *(xformList[ixyz2]) * rotation; if (xformList[ixyz3]) rotation = *(xformList[ixyz3]) * rotation; diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/TubeVolData.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/TubeVolData.cxx index d12523d06b7..10e14267b97 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/TubeVolData.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/TubeVolData.cxx @@ -4,7 +4,7 @@ #include "InDetGeoModelUtils/TubeVolData.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> #include <string> @@ -36,7 +36,7 @@ namespace InDetDD { m_length(0.), m_zMid(0.) { // add an 2*epsilon gap between phi sectors. - const double phiepsilon = 0.001 * CLHEP::degree; + const double phiepsilon = 0.001 * GeoModelKernelUnits::degree; bool fullPhiSector = false; @@ -45,14 +45,14 @@ namespace InDetDD { // The rest are obtained directly from RDB. if (m_record) { - m_phiStart = m_record->getDouble("PHISTART") * CLHEP::degree; - m_phiDelta = m_record->getDouble("PHIDELTA") * CLHEP::degree; - m_phiStep = m_record->getDouble("PHISTEP") * CLHEP::degree; + m_phiStart = m_record->getDouble("PHISTART") * GeoModelKernelUnits::degree; + m_phiDelta = m_record->getDouble("PHIDELTA") * GeoModelKernelUnits::degree; + m_phiStep = m_record->getDouble("PHISTEP") * GeoModelKernelUnits::degree; m_nRepeat = m_record->getInt("NREPEAT"); - m_rmin1 = m_record->getDouble("RMIN") * CLHEP::mm; - m_rmax1 = m_record->getDouble("RMAX") * CLHEP::mm; - m_rmin2 = m_record->getDouble("RMIN2") * CLHEP::mm; - m_rmax2 = m_record->getDouble("RMAX2") * CLHEP::mm; + m_rmin1 = m_record->getDouble("RMIN") * GeoModelKernelUnits::mm; + m_rmax1 = m_record->getDouble("RMAX") * GeoModelKernelUnits::mm; + m_rmin2 = m_record->getDouble("RMIN2") * GeoModelKernelUnits::mm; + m_rmax2 = m_record->getDouble("RMAX2") * GeoModelKernelUnits::mm; m_radialDiv = 0; if (!m_record->isFieldNull("RADIAL")) { m_radialDiv = m_record->getInt("RADIAL"); @@ -62,13 +62,13 @@ namespace InDetDD { m_bothZ = m_record->getInt("ZSYMM"); } - double zmin = m_record->getDouble("ZMIN") * CLHEP::mm; - double zmax = m_record->getDouble("ZMAX") * CLHEP::mm; + double zmin = m_record->getDouble("ZMIN") * GeoModelKernelUnits::mm; + double zmax = m_record->getDouble("ZMAX") * GeoModelKernelUnits::mm; m_length = std::abs(zmax - zmin); m_zMid = 0.5 * (zmin + zmax); - if (m_phiDelta == 0 || m_phiDelta >= 359.9 * CLHEP::degree) { - m_phiDelta = 360 * CLHEP::degree; + if (m_phiDelta == 0 || m_phiDelta >= 359.9 * GeoModelKernelUnits::degree) { + m_phiDelta = 360 * GeoModelKernelUnits::degree; fullPhiSector = true; } else { m_phiDelta -= 2 * phiepsilon; @@ -79,7 +79,7 @@ namespace InDetDD { if (m_nRepeat <= 0) m_nRepeat = 1; // if PHISTEP==0 then set it to be equi-distant steps filling up phi. if (m_phiStep == 0) { - m_phiStep = 360 * CLHEP::degree / m_nRepeat; + m_phiStep = 360 * GeoModelKernelUnits::degree / m_nRepeat; } if (m_rmin2 <= 0) m_rmin2 = m_rmin1; diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeBuilder.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeBuilder.cxx index b5051db82a4..a8367990da3 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeBuilder.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeBuilder.cxx @@ -5,13 +5,14 @@ #include "InDetGeoModelUtils/VolumeBuilder.h" #include "InDetGeoModelUtils/ServiceVolume.h" #include "InDetGeoModelUtils/InDetMaterialManager.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoTransform.h" -#include "CLHEP/Geometry/Transform3D.h" - +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" namespace InDetDD { VolumeBuilder::VolumeBuilder(const Zone& zone, const std::vector<const ServiceVolume* >& services) @@ -225,7 +226,7 @@ namespace InDetDD { if (msgLvl(MSG::DEBUG)) { msg(MSG::DEBUG) << "Volume/material: " << logName << "/" << materialName << endmsg; if (!param.shapeType().empty()) msg(MSG::DEBUG) << " shape: " << param.shapeType() << endmsg; - msg(MSG::DEBUG) << " volume (CLHEP::cm3): " << volume / CLHEP::cm3 << endmsg; + msg(MSG::DEBUG) << " volume (cm3): " << volume / GeoModelKernelUnits::cm3 << endmsg; msg(MSG::DEBUG) << " rmin,rmax,zmin,zmax: " << param.rmin() << ", " << param.rmax() << ", " @@ -298,24 +299,24 @@ namespace InDetDD { rotateAroundY = true; } // Most are just translated in z - HepGeom::Transform3D xform = HepGeom::TranslateZ3D(zpos); + GeoTrf::Transform3D xform = GeoTrf::TranslateZ3D(zpos); double phiStart = 0; // BOX, ROD and TRAP need special treatment. const std::string& shapeType = param.shapeType(); if (shapeType == "TRAP" || shapeType == "TRAP2") { // Need to rotate by -90 deg. - xform = HepGeom::RotateZ3D(-90. * CLHEP::deg) * xform; + xform = GeoTrf::RotateZ3D(-90. * GeoModelKernelUnits::deg) * xform; } if (shapeType == "TRAP2") { - xform = HepGeom::RotateZ3D(-90. * CLHEP::deg) * xform; // * HepGeom::RotateX3D(-90.*CLHEP::deg); + xform = GeoTrf::RotateZ3D(-90. * GeoModelKernelUnits::deg) * xform; // * GeoTrf::RotateX3D(-90.*GeoModelKernelUnits::deg); } if (shapeType == "BOX" || shapeType == "TRAP" || shapeType == "TRAP2") { double radius = 0.5 * (param.rmin() + param.rmax()); - xform = HepGeom::TranslateX3D(radius) * xform; + xform = GeoTrf::TranslateX3D(radius) * xform; phiStart = param.phiLoc(); } else if (shapeType == "ROD" || shapeType == "ROD2") { double radius = param.rmin(); - xform = HepGeom::TranslateX3D(radius) * xform; + xform = GeoTrf::TranslateX3D(radius) * xform; phiStart = param.phiLoc(); } // For volumes that are placed more than once. @@ -325,11 +326,11 @@ namespace InDetDD { } double phi = phiStart + deltaPhi * iCopy; if (phi) { - xform = HepGeom::RotateZ3D(phi) * xform; + xform = GeoTrf::RotateZ3D(phi) * xform; } // For shapes that are not symmetric about a rotation around Y axis. We need to rotate. if (rotateAroundY) { - xform = HepGeom::RotateY3D(180. * CLHEP::degree) * xform; + xform = GeoTrf::RotateY3D(180. * GeoModelKernelUnits::degree) * xform; } return new GeoTransform(xform); } @@ -353,25 +354,25 @@ namespace InDetDD { rotateAroundY = true; } // Most are just translated in z - HepGeom::Transform3D xform = HepGeom::TranslateZ3D(zpos); + GeoTrf::Transform3D xform = GeoTrf::TranslateZ3D(zpos); const std::string& shapeType = param.shapeType(); double phiStart = 0; // BOX, ROD and TRAP need special treatment. if (shapeType == "TRAP") { // Need to rotate by -90 deg. - xform = HepGeom::RotateZ3D(-90. * CLHEP::deg) * xform; + xform = GeoTrf::RotateZ3D(-90. * GeoModelKernelUnits::deg) * xform; } if (shapeType == "TRAP2") { // Need to rotate by -90 deg. - xform = HepGeom::RotateX3D(-90. * CLHEP::deg) * xform; + xform = GeoTrf::RotateX3D(-90. * GeoModelKernelUnits::deg) * xform; } if (shapeType == "BOX" || shapeType == "TRAP" || shapeType == "TRAP2") { double radius = 0.5 * (param.rmin() + param.rmax()) - rCenter; - xform = HepGeom::TranslateX3D(radius) * xform; + xform = GeoTrf::TranslateX3D(radius) * xform; phiStart = param.phiLoc(); } else if (shapeType == "ROD" || shapeType == "ROD2") { double radius = param.rmin(); - xform = HepGeom::TranslateX3D(radius) * xform; + xform = GeoTrf::TranslateX3D(radius) * xform; phiStart = param.phiLoc(); } // For volumes that are placed more than once. @@ -381,11 +382,11 @@ namespace InDetDD { } double phi = phiStart + deltaPhi * iCopy; if (phi) { - xform = HepGeom::RotateZ3D(phi) * xform; + xform = GeoTrf::RotateZ3D(phi) * xform; } // For shapes that are not symmetric about a rotation around Y axis. We need to rotate. if (rotateAroundY) { - xform = HepGeom::RotateY3D(180. * CLHEP::degree) * xform; + xform = GeoTrf::RotateY3D(180. * GeoModelKernelUnits::degree) * xform; } return new GeoTransform(xform); } diff --git a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeSplitter.cxx b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeSplitter.cxx index 35fb29ef43a..d91cd6bbd7c 100755 --- a/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeSplitter.cxx +++ b/InnerDetector/InDetDetDescr/InDetGeoModelUtils/src/VolumeSplitter.cxx @@ -5,7 +5,7 @@ #include "InDetGeoModelUtils/VolumeSplitter.h" #include "InDetGeoModelUtils/VolumeSplitterUtils.h" #include "InDetGeoModelUtils/ServiceVolume.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <sstream> #include <algorithm> @@ -13,7 +13,7 @@ namespace InDetDD { VolumeSplitter::VolumeSplitter() : m_ownVolumes(true), - m_epsilon(0.0001 * CLHEP::mm) + m_epsilon(0.0001 * GeoModelKernelUnits::mm) {} VolumeSplitter::~VolumeSplitter() { @@ -150,7 +150,7 @@ namespace InDetDD { } } -// This takes care of cone like volumes and adjust the CLHEP::radius according to the adjusted z. +// This takes care of cone like volumes and adjust the radius according to the adjusted z. void VolumeSplitter::adjustR(const ServiceVolume& param, ServiceVolume* paramNew) { double z1 = param.zmin(); diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt index fe9ae4f1765..40aebd36568 100644 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/CMakeLists.txt @@ -11,7 +11,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Control/StoreGate DetectorDescription/AtlasDetDescr - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities DetectorDescription/GeoPrimitives DetectorDescription/Identifier @@ -30,6 +29,7 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( CLHEP ) find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( InDetReadoutGeometry @@ -37,6 +37,6 @@ atlas_add_library( InDetReadoutGeometry PUBLIC_HEADERS InDetReadoutGeometry INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel AtlasDetDescr GeoModelKernel GeoModelUtilities GeoPrimitives Identifier GaudiKernel InDetCondServices InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel AtlasDetDescr GeoModelUtilities GeoPrimitives Identifier GaudiKernel InDetCondServices InDetIdentifier TrkDetElementBase TrkSurfaces TrkEventPrimitives StoreGateLib SGtests AthenaBaseComps DetDescrConditions PRIVATE_LINK_LIBRARIES AthenaPoolUtilities IdDictDetDescr TRT_ConditionsData ) diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/ExtendedAlignableTransform.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/ExtendedAlignableTransform.h index 37e427afc36..9cf563c55b2 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/ExtendedAlignableTransform.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/ExtendedAlignableTransform.h @@ -11,6 +11,7 @@ #ifndef INDETREADOUTGEOMETRY_EXTENDEDALIGNABLETRANSFORM_H #define INDETREADOUTGEOMETRY_EXTENDEDALIGNABLETRANSFORM_H +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoVFullPhysVol.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h index 3744b92d1ef..7d42b82f07c 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h @@ -11,6 +11,7 @@ #ifndef InDetReadoutGeometry_PixelDetectorManager_h #define InDetReadoutGeometry_PixelDetectorManager_h 1 +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoVPhysVol.h" #include "InDetReadoutGeometry/SiDetectorManager.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDiodeMatrix.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDiodeMatrix.h index 35190f3655b..7dc7b3e60e4 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDiodeMatrix.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDiodeMatrix.h @@ -12,6 +12,7 @@ #define INDETREADOUTGEOMETRY_PIXELDIODEMATRIX_H #include "InDetReadoutGeometry/SiCellId.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" #include "TrkDetElementBase/TrkDetElementBase.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h index 5f6f8ef5e00..99d2b50e97d 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiCommonItems.h @@ -17,6 +17,7 @@ class AtlasDetectorID; #include "AthenaKernel/MsgStreamMember.h" #include "GaudiKernel/ServiceHandle.h" #include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" #include "InDetCondServices/ISiLorentzAngleTool.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorDesign.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorDesign.h index ea3d11ff2ae..52487fb58cb 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorDesign.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorDesign.h @@ -17,6 +17,7 @@ #include "CLHEP/Geometry/Point3D.h" #include "CLHEP/Geometry/Vector3D.h" #include "AtlasDetDescr/AtlasDetectorID.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" #include "InDetDD_Defs.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h index 978e9e5a3ca..87a2c22cbe8 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h @@ -24,6 +24,8 @@ #include "InDetReadoutGeometry/InDetDD_Defs.h" #include "CLHEP/Geometry/Point3D.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" class AtlasDetectorID; class GeoVFullPhysVol; @@ -182,7 +184,7 @@ namespace InDetDD { //@{ // Position /// Local (simulation/hit frame) to global transform - virtual const HepGeom::Transform3D & transformHit() const; + virtual const GeoTrf::Transform3D & transformHit() const; /// Local (reconstruction frame) to global transform const Amg::Transform3D & transform() const; /// Default Local (reconstruction frame) to global transform @@ -662,7 +664,7 @@ namespace InDetDD { inline HepGeom::Point3D<double> SiDetectorElement::globalPositionHit(const HepGeom::Point3D<double> &localPos) const { - return transformHit()*localPos; + return Amg::EigenTransformToCLHEP(transformHit())*localPos; } inline Amg::Vector3D SiDetectorElement::globalPosition(const Amg::Vector2D &localPos) const @@ -674,7 +676,7 @@ namespace InDetDD { inline Amg::Vector3D SiDetectorElement::globalPositionHit(const Amg::Vector3D &localPos) const { - return Amg::CLHEPTransformToEigen(transformHit()) * localPos; + return transformHit() * localPos; } inline HepGeom::Point3D<double> SiDetectorElement::globalPositionCLHEP(const Amg::Vector2D &localPos) const diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelDescriptor.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelDescriptor.h index 793007ef803..244ff8ec08b 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelDescriptor.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BarrelDescriptor.h @@ -10,6 +10,7 @@ #ifndef TRT_BarrelDescriptor_h #define TRT_BarrelDescriptor_h 1 +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" #include "GeoModelKernel/GeoXF.h" #include <vector> diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.h index c240c7ccbad..a59add9b67b 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.h @@ -70,8 +70,8 @@ namespace InDetDD { // --- GeoModel transformation forwards ----------------------------------------------------- // - /** Get Default Transform (of module in barrel, layer in endcap) from GeoModel before alignment corrections: CLHEP */ - const HepGeom::Transform3D& defTransform() const; + /** Get Default Transform (of module in barrel, layer in endcap) from GeoModel before alignment corrections */ + inline const GeoTrf::Transform3D& defTransform() const { return getMaterialGeom()->getDefAbsoluteTransform(); } /** Default Local -> global transform of the straw (ie before alignment corrections) : CLHEP */ virtual HepGeom::Transform3D defStrawTransform(int straw) const = 0; @@ -235,7 +235,6 @@ namespace InDetDD { } -#include "TRT_BaseElement.icc" #endif diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.icc b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.icc deleted file mode 100755 index 828631ffe63..00000000000 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_BaseElement.icc +++ /dev/null @@ -1,12 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -namespace InDetDD { - -inline const HepGeom::Transform3D & TRT_BaseElement::defTransform() const -{ - return getMaterialGeom()->getDefAbsoluteTransform(); -} - -} diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_Conditions.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_Conditions.h index 2c1551d6694..fd3d53b578a 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_Conditions.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_Conditions.h @@ -11,6 +11,7 @@ #ifndef INDETREADOUTGEOMETRY_TRT_CONDITIONS_H #define INDETREADOUTGEOMETRY_TRT_CONDITIONS_H +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" #include "CLHEP/Geometry/Transform3D.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h index 30e7231d79b..b79ad864f28 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h @@ -16,6 +16,7 @@ #include "InDetReadoutGeometry/InDetDD_Defs.h" #include "InDetReadoutGeometry/Version.h" #include "InDetReadoutGeometry/TRT_DetElementCollection.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoVPhysVol.h" #include "InDetIdentifier/TRT_ID.h" #include "GeoModelKernel/GeoXF.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapDescriptor.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapDescriptor.h index e6b9a1c55b6..a6edf251a9c 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapDescriptor.h +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_EndcapDescriptor.h @@ -10,6 +10,7 @@ #ifndef TRT_EndcapDescriptor_h #define TRT_EndcapDescriptor_h 1 +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/RCBase.h" #include "GeoModelKernel/GeoXF.h" diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx index f1ddcf9bde3..6c9c34a291a 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx @@ -153,14 +153,14 @@ SiDetectorElement::updateCache() const bool firstTimeTmp = m_firstTime; m_firstTime = false; - const HepGeom::Transform3D & geoTransform = transformHit(); + const GeoTrf::Transform3D & geoTransform = transformHit(); double radialShift = 0.; const InDetDD::StripStereoAnnulusDesign * testDesign = dynamic_cast<const InDetDD::StripStereoAnnulusDesign*>(m_design); if(testDesign) radialShift = testDesign->localModuleCentreRadius(); HepGeom::Point3D<double> centerGeoModel(radialShift, 0., 0.); - m_centerCLHEP = geoTransform * centerGeoModel; + m_centerCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * centerGeoModel; m_center = Amg::Vector3D(m_centerCLHEP[0],m_centerCLHEP[1],m_centerCLHEP[2]); // @@ -193,9 +193,9 @@ SiDetectorElement::updateCache() const const HepGeom::Vector3D<double> &geoModelEtaAxis = localAxes[m_hitEta]; const HepGeom::Vector3D<double> &geoModelDepthAxis = localAxes[m_hitDepth]; - HepGeom::Vector3D<double> globalDepthAxis(geoTransform * geoModelDepthAxis); - HepGeom::Vector3D<double> globalPhiAxis(geoTransform * geoModelPhiAxis); - HepGeom::Vector3D<double> globalEtaAxis(geoTransform * geoModelEtaAxis); + HepGeom::Vector3D<double> globalDepthAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelDepthAxis); + HepGeom::Vector3D<double> globalPhiAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelPhiAxis); + HepGeom::Vector3D<double> globalEtaAxis(Amg::EigenTransformToCLHEP(geoTransform) * geoModelEtaAxis); @@ -298,7 +298,7 @@ SiDetectorElement::updateCache() const - m_transformCLHEP = geoTransform * recoToHitTransform(); + m_transformCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * recoToHitTransform(); //m_transform = m_commonItems->solenoidFrame() * geoTransform * recoToHitTransform(); m_transform = Amg::CLHEPTransformToEigen(m_transformCLHEP); @@ -315,7 +315,7 @@ SiDetectorElement::updateCache() const msg(MSG::DEBUG) << "Local frame is left-handed, Swapping depth axis to make it right handed." << endmsg; m_depthDirection = !m_depthDirection; - m_transformCLHEP = geoTransform * recoToHitTransform(); + m_transformCLHEP = Amg::EigenTransformToCLHEP(geoTransform) * recoToHitTransform(); m_transform = Amg::CLHEPTransformToEigen(m_transformCLHEP); //m_transform = m_commonItems->solenoidFrame() * geoTransform * recoToHitTransform(); } else { @@ -363,11 +363,11 @@ SiDetectorElement::updateCache() const } -const HepGeom::Transform3D & +const GeoTrf::Transform3D & SiDetectorElement::transformHit() const { if (m_geoAlignStore) { - const HepGeom::Transform3D* ptrXf = m_geoAlignStore->getAbsPosition(getMaterialGeom()); + const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getAbsPosition(getMaterialGeom()); if(ptrXf) return *ptrXf; } return getMaterialGeom()->getAbsoluteTransform(); @@ -395,10 +395,10 @@ const HepGeom::Transform3D SiDetectorElement::defTransformCLHEP() const { if (m_geoAlignStore) { - const HepGeom::Transform3D* ptrXf = m_geoAlignStore->getDefAbsPosition(getMaterialGeom()); - if(ptrXf) return *ptrXf * recoToHitTransform(); + const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getDefAbsPosition(getMaterialGeom()); + if(ptrXf) return Amg::EigenTransformToCLHEP(*ptrXf) * recoToHitTransform(); } - return getMaterialGeom()->getDefAbsoluteTransform() * recoToHitTransform(); + return Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform()) * recoToHitTransform(); } const Amg::Transform3D diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx index 4b7980893c1..eeeb8201d39 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxx @@ -11,7 +11,7 @@ #include "StoreGate/StoreGateSvc.h" #include "GeoModelKernel/GeoXF.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoGenericFunctions/Variable.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "DetDescrConditions/AlignableTransformContainer.h" #include "InDetReadoutGeometry/SiDetectorElementCollection.h" @@ -85,12 +85,11 @@ namespace InDetDD const GeoVFullPhysVol* child = extXF->child(); if (child && extXF->alignableTransform()) { // the definitiv absolut transform is in CLHEP -> do the calculation in CLHEP - HepGeom::Transform3D localToGlobalXFCLHEP = Amg::EigenTransformToCLHEP(localToGlobalXF); - const HepGeom::Transform3D& transform = child->getDefAbsoluteTransform(); + const GeoTrf::Transform3D& transform = child->getDefAbsoluteTransform(); // calucluate the corrected delta according to the formula above - HepGeom::Transform3D correctedDelta = transform.inverse()*localToGlobalXFCLHEP // (A*B*C).inverse() * T - * Amg::EigenTransformToCLHEP(delta) // l - * localToGlobalXFCLHEP.inverse() * transform; // T.inverse() * (A*B*C) + GeoTrf::Transform3D correctedDelta = transform.inverse()*localToGlobalXF // (A*B*C).inverse() * T + * delta // l + * localToGlobalXF.inverse() * transform; // T.inverse() * (A*B*C) extXF->alignableTransform()->setDelta(correctedDelta, alignStore); return true; } else { @@ -123,8 +122,8 @@ namespace InDetDD const GeoVFullPhysVol * child = extXF->child(); if (child && extXF->alignableTransform()) { // do the calculation in CLHEP - const HepGeom::Transform3D& transform = child->getDefAbsoluteTransform(); - extXF->alignableTransform()->setDelta(transform.inverse() * Amg::EigenTransformToCLHEP(delta) * transform, alignStore); + const GeoTrf::Transform3D& transform = child->getDefAbsoluteTransform(); + extXF->alignableTransform()->setDelta(transform.inverse() * delta * transform, alignStore); return true; } else { return false; diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelElement.cxx index a476eb4531d..e44a52697d0 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_BarrelElement.cxx @@ -15,6 +15,8 @@ #include "TRT_ConditionsData/ExpandedIdentifier.h" #include "TRT_ConditionsData/StrawDxContainer.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + namespace InDetDD { TRT_BarrelElement::TRT_BarrelElement(const GeoVFullPhysVol *volume, @@ -95,7 +97,7 @@ HepGeom::Transform3D TRT_BarrelElement::calculateStrawTransform(int straw) const size_t offsetInto = m_descriptor->getStrawTransformOffset(); double zPos = -m_descriptor->strawZPos(); double zAng = m_code.isPosZ() ? M_PI : 0; - return getMaterialGeom()->getAbsoluteTransform()*((*f)(straw+offsetInto)) + return Amg::EigenTransformToCLHEP(getMaterialGeom()->getAbsoluteTransform()*((*f)(straw+offsetInto))) * HepGeom::RotateY3D(zAng)*HepGeom::TranslateZ3D(zPos) * calculateLocalStrawTransform(straw); ////return conditions()->solenoidFrame() @@ -152,7 +154,8 @@ HepGeom::Transform3D TRT_BarrelElement::defStrawTransform(int straw) const size_t offsetInto = m_descriptor->getStrawTransformOffset(); double zPos = -m_descriptor->strawZPos(); double zAng = m_code.isPosZ() ? M_PI : 0; - return getMaterialGeom()->getDefAbsoluteTransform()*((*f)(straw+offsetInto))* HepGeom::RotateY3D(zAng)*HepGeom::TranslateZ3D(zPos); + return Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform()*((*f)(straw+offsetInto))) + * HepGeom::RotateY3D(zAng)*HepGeom::TranslateZ3D(zPos); } else { std::cout << "calculateStrawTransform: f is 0 !!!!" << std::endl; return HepGeom::Transform3D(); diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx index 643824f4b35..d432e4298ce 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx @@ -532,13 +532,13 @@ namespace InDetDD { if (!child) { msg(MSG::ERROR) << "global frame specified, but child == 0" << endmsg; } else { - const HepGeom::Transform3D & childXF = child->getDefAbsoluteTransform(); - extXF->alignableTransform()->setDelta(childXF.inverse() * Amg::EigenTransformToCLHEP(delta) * childXF); + const GeoTrf::Transform3D & childXF = child->getDefAbsoluteTransform(); + extXF->alignableTransform()->setDelta(childXF.inverse() * delta * childXF); } } else if (frame == InDetDD::local) { // Local // if its a local frame then no transform necessary. We set it directly. - extXF->alignableTransform()->setDelta(Amg::EigenTransformToCLHEP(delta)); + extXF->alignableTransform()->setDelta(delta); } else { // Other frame // if child or frame is zero it will have been set to local or global above @@ -547,9 +547,9 @@ namespace InDetDD { ATH_MSG_ERROR("Child can't be null if frame is 'other'"); return false; } else { - const HepGeom::Transform3D & xfChild = child->getDefAbsoluteTransform(); - const HepGeom::Transform3D & xfFrame = frameVol->getDefAbsoluteTransform(); - extXF->alignableTransform()->setDelta(xfChild.inverse() * xfFrame * Amg::EigenTransformToCLHEP(delta) * xfFrame.inverse() * xfChild); + const GeoTrf::Transform3D & xfChild = child->getDefAbsoluteTransform(); + const GeoTrf::Transform3D & xfFrame = frameVol->getDefAbsoluteTransform(); + extXF->alignableTransform()->setDelta(xfChild.inverse() * xfFrame * delta * xfFrame.inverse() * xfChild); } } diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapElement.cxx index ce9c0fa38f9..c5637d308b5 100755 --- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapElement.cxx +++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_EndcapElement.cxx @@ -12,6 +12,7 @@ #include "GeoPrimitives/GeoPrimitives.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "CLHEP/Geometry/Transform3D.h" #include "TrkSurfaces/DiscBounds.h" @@ -97,7 +98,8 @@ namespace InDetDD { size_t offsetInto = m_descriptor->getStrawTransformOffset(); - return getMaterialGeom()->getAbsoluteTransform()*((*f)(istraw+offsetInto)) * calculateLocalStrawTransform(straw); + return Amg::EigenTransformToCLHEP(getMaterialGeom()->getAbsoluteTransform()*((*f)(istraw+offsetInto))) + * calculateLocalStrawTransform(straw); ////return conditions()->solenoidFrame() //// * getMaterialGeom()->getAbsoluteTransform()*((*f)(istraw+offsetInto)); @@ -108,7 +110,9 @@ namespace InDetDD { double phi = m_descriptor->startPhi() + m_descriptor->strawPitch() * straw; double r = m_descriptor->innerRadius() + 0.5 * m_descriptor->strawLength() ; - CLHEP::Hep3Vector pos(r*cos(phi), r*sin(phi), (getMaterialGeom()->getAbsoluteTransform()*HepGeom::Point3D<double>()).z()); + CLHEP::Hep3Vector pos(r*cos(phi) + , r*sin(phi) + , (Amg::EigenTransformToCLHEP(getMaterialGeom()->getAbsoluteTransform())*HepGeom::Point3D<double>()).z()); CLHEP::HepRotation rot; // Axis (in local (0,0,1)) points towards beam axis. rot.rotateY(-0.5*M_PI); // Make it point along -ve X. @@ -175,13 +179,15 @@ namespace InDetDD { int istraw = m_code.isPosZ() ? straw : m_descriptor->nStraws()-1 - straw; size_t offsetInto = m_descriptor->getStrawTransformOffset(); - return getMaterialGeom()->getDefAbsoluteTransform()*((*f)(istraw+offsetInto)); + return Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform()*((*f)(istraw+offsetInto))); } else { double phi = m_descriptor->startPhi() + m_descriptor->strawPitch() * straw; double r = m_descriptor->innerRadius() + 0.5 * m_descriptor->strawLength() ; - CLHEP::Hep3Vector pos(r*cos(phi), r*sin(phi), (getMaterialGeom()->getDefAbsoluteTransform()*HepGeom::Point3D<double>()).z()); + CLHEP::Hep3Vector pos(r*cos(phi) + , r*sin(phi) + , (Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform())*HepGeom::Point3D<double>()).z()); CLHEP::HepRotation rot; rot.rotateY(-0.5*M_PI); // Make it point along -ve X. rot.rotateZ(phi); @@ -228,9 +234,9 @@ namespace InDetDD { Amg::Transform3D * transform = 0; if (m_code.isPosZ()) - transform = new Amg::Transform3D(Amg::CLHEPTransformToEigen( (getMaterialGeom()->getAbsoluteTransform() * HepGeom::RotateZ3D(phiCenter)))); + transform = new Amg::Transform3D((getMaterialGeom()->getAbsoluteTransform() * GeoTrf::RotateZ3D(phiCenter))); else - transform = new Amg::Transform3D(Amg::CLHEPTransformToEigen( (getMaterialGeom()->getAbsoluteTransform() * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateZ3D(phiCenter)))); + transform = new Amg::Transform3D((getMaterialGeom()->getAbsoluteTransform() * GeoTrf::RotateY3D(180*CLHEP::deg) * GeoTrf::RotateZ3D(phiCenter))); // create the igredients and the cache Trk::DiscBounds* bounds = new Trk::DiscBounds(rMin, rMax, phiHalfWidth); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/CMakeLists.txt index 1ab76249c61..cbc87c5da2a 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/CMakeLists.txt @@ -10,7 +10,7 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelKernel + DetectorDescription/GeoPrimitives DetectorDescription/GeoModel/GeoModelUtilities GaudiKernel InnerDetector/InDetDetDescr/InDetGeoModelUtils @@ -23,15 +23,16 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( InDetServMatGeoModel src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils SGTools StoreGateLib SGtests ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps AthenaKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils SGTools StoreGateLib SGtests ) # Install files from the package: atlas_install_headers( InDetServMatGeoModel ) diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/EndPlateFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/EndPlateFactory.cxx index 7866fd46a53..98dfcadc271 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/EndPlateFactory.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/EndPlateFactory.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/EndPlateFactory.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -46,29 +48,29 @@ void EndPlateFactory::create(GeoPhysVol *mother) //---------------------------------------------------------------------------------- // std::string matName = mat[(int) (*pbfi)[ii]->getFloat("MAT")]; // const GeoMaterial* cylMat = materialManager()->getMaterial(matName); -// double rmin = (*pbfi)[ii]->getFloat("RIN")*CLHEP::cm; +// double rmin = (*pbfi)[ii]->getFloat("RIN")*GeoModelKernelUnits::cm; //---------------------------------------------------------------------------------- - double safety = 0.01*CLHEP::mm; - double maxRofEP = 1075.0*CLHEP::mm - safety; // Interfere with TRT PatchPanel1 - double RibConnection = 550.0*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; + double maxRofEP = 1075.0*GeoModelKernelUnits::mm - safety; // Interfere with TRT PatchPanel1 + double RibConnection = 550.0*GeoModelKernelUnits::mm; - maxRofEP = (*shell)[0]->getDouble("EPMAXR")*CLHEP::mm - safety; - RibConnection = (*ribs)[0]->getDouble("RIBCONNECTION")*CLHEP::mm; + maxRofEP = (*shell)[0]->getDouble("EPMAXR")*GeoModelKernelUnits::mm - safety; + RibConnection = (*ribs)[0]->getDouble("RIBCONNECTION")*GeoModelKernelUnits::mm; // // Internal shell. Default (initial) values // - double rminInt = 425.*CLHEP::mm; - double rmaxInt = 1040.*CLHEP::mm; - double thickShell = 3.*CLHEP::mm; - double thick2 = 10.*CLHEP::mm; - double zposEP = 3370.*CLHEP::mm; - double zleng = 42.*CLHEP::mm; - rminInt = (*shell)[0]->getDouble("RMININT")*CLHEP::mm; - rmaxInt = (*shell)[0]->getDouble("RMAXINT")*CLHEP::mm; - thickShell = (*shell)[0]->getDouble("THICKSHELL")*CLHEP::mm; - thick2 = (*shell)[0]->getDouble("THICKADD")*CLHEP::mm; - zposEP = (*shell)[0]->getDouble("ZSTART")*CLHEP::mm; - zleng = (*shell)[0]->getDouble("ZSHIFT")*CLHEP::mm; + double rminInt = 425.*GeoModelKernelUnits::mm; + double rmaxInt = 1040.*GeoModelKernelUnits::mm; + double thickShell = 3.*GeoModelKernelUnits::mm; + double thick2 = 10.*GeoModelKernelUnits::mm; + double zposEP = 3370.*GeoModelKernelUnits::mm; + double zleng = 42.*GeoModelKernelUnits::mm; + rminInt = (*shell)[0]->getDouble("RMININT")*GeoModelKernelUnits::mm; + rmaxInt = (*shell)[0]->getDouble("RMAXINT")*GeoModelKernelUnits::mm; + thickShell = (*shell)[0]->getDouble("THICKSHELL")*GeoModelKernelUnits::mm; + thick2 = (*shell)[0]->getDouble("THICKADD")*GeoModelKernelUnits::mm; + zposEP = (*shell)[0]->getDouble("ZSTART")*GeoModelKernelUnits::mm; + zleng = (*shell)[0]->getDouble("ZSHIFT")*GeoModelKernelUnits::mm; GeoPcon* shellInt = new GeoPcon(0.,2*M_PI); @@ -86,10 +88,10 @@ void EndPlateFactory::create(GeoPhysVol *mother) const GeoLogVol* shellLogInt = new GeoLogVol("EPShellInt",shellInt,shellMat); GeoVPhysVol* shellPhysInt = new GeoPhysVol(shellLogInt); - CLHEP::Hep3Vector servpos1(0.,0., zposEP); - CLHEP::Hep3Vector servpos2(0.,0.,-zposEP); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos2)); + GeoTrf::Translate3D servpos1(0.,0., zposEP); + GeoTrf::Vector3D servpos2(0.,0.,-zposEP); + GeoTransform* xform1 = new GeoTransform(servpos1); + GeoTransform* xform2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,M_PI,0),servpos2)); mother->add(xform1); mother->add(shellPhysInt); mother->add(xform2); @@ -99,22 +101,22 @@ void EndPlateFactory::create(GeoPhysVol *mother) // // External shell (default/initial values) - double zgap = 50.*CLHEP::mm; - double rminExt = 250.*CLHEP::mm; + double zgap = 50.*GeoModelKernelUnits::mm; + double rminExt = 250.*GeoModelKernelUnits::mm; double rmaxExt = maxRofEP; - zgap = (*shell)[0]->getDouble("ZGAP")*CLHEP::mm; - rminExt = (*shell)[0]->getDouble("RMINEXT")*CLHEP::mm; + zgap = (*shell)[0]->getDouble("ZGAP")*GeoModelKernelUnits::mm; + rminExt = (*shell)[0]->getDouble("RMINEXT")*GeoModelKernelUnits::mm; const GeoTube* shellExt = new GeoTube(rminExt,rmaxExt,thickShell/2.); const GeoLogVol* shellLogExt = new GeoLogVol("EPShellExt",shellExt,shellMat); GeoVPhysVol* shellPhysExt = new GeoPhysVol(shellLogExt); - CLHEP::Hep3Vector servpos3(0.,0., zposEP+zleng+thickShell+zgap+thickShell/2.); - CLHEP::Hep3Vector servpos4(0.,0.,-zposEP-zleng-thickShell-zgap-thickShell/2.); - GeoTransform *xform3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos3)); - GeoTransform *xform4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos4)); + GeoTrf::Translate3D servpos3(0.,0., zposEP+zleng+thickShell+zgap+thickShell/2.); + GeoTrf::Vector3D servpos4(0.,0.,-zposEP-zleng-thickShell-zgap-thickShell/2.); + GeoTransform *xform3 = new GeoTransform(servpos3); + GeoTransform* xform4 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,M_PI,0),servpos4)); mother->add(xform3); mother->add(shellPhysExt); @@ -125,19 +127,19 @@ void EndPlateFactory::create(GeoPhysVol *mother) // // Insert - default (initial) values - double zthick = 16.0*CLHEP::mm; - double zinsert = 3018.*CLHEP::mm-zthick; - double rminins = 252.*CLHEP::mm; - double rmaxins = 435.*CLHEP::mm; - double rthick = 5.*CLHEP::mm; - double zlengi = 410.*CLHEP::mm; + double zthick = 16.0*GeoModelKernelUnits::mm; + double zinsert = 3018.*GeoModelKernelUnits::mm-zthick; + double rminins = 252.*GeoModelKernelUnits::mm; + double rmaxins = 435.*GeoModelKernelUnits::mm; + double rthick = 5.*GeoModelKernelUnits::mm; + double zlengi = 410.*GeoModelKernelUnits::mm; - zthick = (*insert)[0]->getDouble("ZTHICK")*CLHEP::mm; - zinsert = (*insert)[0]->getDouble("ZINSERT")*CLHEP::mm; - rminins = (*insert)[0]->getDouble("RMININS")*CLHEP::mm; - rmaxins = (*insert)[0]->getDouble("RMAXINS")*CLHEP::mm; - rthick = (*insert)[0]->getDouble("RTHICK")*CLHEP::mm; - zlengi = (*insert)[0]->getDouble("ZLENGINS")*CLHEP::mm; + zthick = (*insert)[0]->getDouble("ZTHICK")*GeoModelKernelUnits::mm; + zinsert = (*insert)[0]->getDouble("ZINSERT")*GeoModelKernelUnits::mm; + rminins = (*insert)[0]->getDouble("RMININS")*GeoModelKernelUnits::mm; + rmaxins = (*insert)[0]->getDouble("RMAXINS")*GeoModelKernelUnits::mm; + rthick = (*insert)[0]->getDouble("RTHICK")*GeoModelKernelUnits::mm; + zlengi = (*insert)[0]->getDouble("ZLENGINS")*GeoModelKernelUnits::mm; GeoPcon* Insert = new GeoPcon(0.,2*M_PI); Insert->addPlane(0. , rminins, rmaxins+rthick); @@ -151,10 +153,10 @@ void EndPlateFactory::create(GeoPhysVol *mother) const GeoLogVol* InsertLog = new GeoLogVol("EPInsert",Insert,insertMat); GeoVPhysVol* InsertPhys = new GeoPhysVol(InsertLog); - CLHEP::Hep3Vector servpos5(0.,0., zinsert); - CLHEP::Hep3Vector servpos6(0.,0.,-zinsert); - GeoTransform *xform5 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos5)); - GeoTransform *xform6 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos6)); + GeoTrf::Translate3D servpos5(0.,0., zinsert); + GeoTrf::Vector3D servpos6(0.,0.,-zinsert); + GeoTransform *xform5 = new GeoTransform(servpos5); + GeoTransform* xform6 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,M_PI,0),servpos6)); mother->add(xform5); mother->add(InsertPhys); @@ -167,15 +169,15 @@ void EndPlateFactory::create(GeoPhysVol *mother) // Short ribs - default (initial) values // Initial position is along X axis then move and rotate // - double ribY = 12.0*CLHEP::mm; + double ribY = 12.0*GeoModelKernelUnits::mm; double ribZ = zgap - safety; - double ribX = 380.0*CLHEP::mm; - double posX = 550.0*CLHEP::mm+ribX/2.; + double ribX = 380.0*GeoModelKernelUnits::mm; + double posX = 550.0*GeoModelKernelUnits::mm+ribX/2.; - ribY = (*ribs)[0]->getDouble("SHORTWID")*CLHEP::mm; + ribY = (*ribs)[0]->getDouble("SHORTWID")*GeoModelKernelUnits::mm; ribZ = zgap - safety; - ribX = (*ribs)[0]->getDouble("SHORTLENG")*CLHEP::mm; - posX = (*ribs)[0]->getDouble("SHORTRSTART")*CLHEP::mm + ribX/2.; + ribX = (*ribs)[0]->getDouble("SHORTLENG")*GeoModelKernelUnits::mm; + posX = (*ribs)[0]->getDouble("SHORTRSTART")*GeoModelKernelUnits::mm + ribX/2.; const GeoBox* ribShort = new GeoBox(ribX/2., ribY/2., ribZ/2.); @@ -192,12 +194,12 @@ void EndPlateFactory::create(GeoPhysVol *mother) for (int ip=1; ip<12; ip++){ if( ip==3 || ip==6 || ip==9) continue; double angl= ip*M_PI/6.; - CLHEP::Hep3Vector ribpos_pos( posX*cos(angl), posX*sin(angl), zposEP+zleng+thickShell+zgap/2.); - CLHEP::Hep3Vector ribpos_neg( posX*cos(angl), posX*sin(angl),-zposEP-zleng-thickShell-zgap/2.); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_pos)); + GeoTrf::Vector3D ribpos_pos( posX*cos(angl), posX*sin(angl), zposEP+zleng+thickShell+zgap/2.); + GeoTrf::Vector3D ribpos_neg( posX*cos(angl), posX*sin(angl),-zposEP-zleng-thickShell-zgap/2.); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0,0),ribpos_pos)); mother->add(xrib); mother->add(ribShortPhys); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_neg)); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0,0),ribpos_neg)); mother->add(xrib); mother->add(ribShortPhys); } @@ -205,22 +207,22 @@ void EndPlateFactory::create(GeoPhysVol *mother) //--------------------------------------------------------------------------------- // Long ribs (initial position is along X axis then move and rotate) // - double ribY1 = 20.0*CLHEP::mm; + double ribY1 = 20.0*GeoModelKernelUnits::mm; double ribZ1 = zgap - safety; - double ribX1 = RibConnection-250.*CLHEP::mm; - double posX1 = 250.*CLHEP::mm+ribX1/2.; + double ribX1 = RibConnection-250.*GeoModelKernelUnits::mm; + double posX1 = 250.*GeoModelKernelUnits::mm+ribX1/2.; - double ribY2 = 30.0*CLHEP::mm; + double ribY2 = 30.0*GeoModelKernelUnits::mm; double ribZ2 = zgap - safety; double ribX2 = maxRofEP - RibConnection; double posX2 = RibConnection+ribX2/2.; - ribY1 = (*ribs)[0]->getDouble("LONGWID1")*CLHEP::mm; + ribY1 = (*ribs)[0]->getDouble("LONGWID1")*GeoModelKernelUnits::mm; ribZ1 = zgap - safety; - ribX1 = RibConnection - (*ribs)[0]->getDouble("LONGLENG1")*CLHEP::mm; // LONGLENG1 is a RMIN of ribs - posX1 = (*ribs)[0]->getDouble("LONGLENG1")*CLHEP::mm + ribX1/2.; // It's determined by Pixel volume -> so 250.0!!! + ribX1 = RibConnection - (*ribs)[0]->getDouble("LONGLENG1")*GeoModelKernelUnits::mm; // LONGLENG1 is a RMIN of ribs + posX1 = (*ribs)[0]->getDouble("LONGLENG1")*GeoModelKernelUnits::mm + ribX1/2.; // It's determined by Pixel volume -> so 250.0!!! - ribY2 = (*ribs)[0]->getDouble("LONGWID2")*CLHEP::mm; + ribY2 = (*ribs)[0]->getDouble("LONGWID2")*GeoModelKernelUnits::mm; ribZ2 = zgap - safety; ribX2 = maxRofEP - RibConnection; posX2 = RibConnection+ribX2/2.; @@ -239,21 +241,21 @@ void EndPlateFactory::create(GeoPhysVol *mother) for (int ip=0; ip<4; ip++){ double angl= ip*M_PI/2.; // 1st part - CLHEP::Hep3Vector ribpos_pos1( posX1*cos(angl), posX1*sin(angl), zposEP+zleng+thickShell+zgap/2.); - CLHEP::Hep3Vector ribpos_neg1( posX1*cos(angl), posX1*sin(angl),-zposEP-zleng-thickShell-zgap/2.); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_pos1)); + GeoTrf::Vector3D ribpos_pos1( posX1*cos(angl), posX1*sin(angl), zposEP+zleng+thickShell+zgap/2.); + GeoTrf::Vector3D ribpos_neg1( posX1*cos(angl), posX1*sin(angl),-zposEP-zleng-thickShell-zgap/2.); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0,0),ribpos_pos1)); mother->add(xrib); mother->add(ribLong1Phys); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_neg1)); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0,0),ribpos_neg1)); mother->add(xrib); mother->add(ribLong1Phys); // 2nd part - CLHEP::Hep3Vector ribpos_pos2( posX2*cos(angl), posX2*sin(angl), zposEP+zleng+thickShell+zgap/2.); - CLHEP::Hep3Vector ribpos_neg2( posX2*cos(angl), posX2*sin(angl),-zposEP-zleng-thickShell-zgap/2.); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_pos2)); + GeoTrf::Vector3D ribpos_pos2( posX2*cos(angl), posX2*sin(angl), zposEP+zleng+thickShell+zgap/2.); + GeoTrf::Vector3D ribpos_neg2( posX2*cos(angl), posX2*sin(angl),-zposEP-zleng-thickShell-zgap/2.); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0,0),ribpos_pos2)); mother->add(xrib); mother->add(ribLong2Phys); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_neg2)); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0,0),ribpos_neg2)); mother->add(xrib); mother->add(ribLong2Phys); } diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/EndPlateFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/EndPlateFactoryFS.cxx index 7b97e625dfc..508d487c5d1 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/EndPlateFactoryFS.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/EndPlateFactoryFS.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/EndPlateFactoryFS.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -62,29 +64,29 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) //---------------------------------------------------------------------------------- // std::string matName = mat[(int) (*pbfi)[ii]->getFloat("MAT")]; // const GeoMaterial* cylMat = materialManager->getMaterial(matName); -// double rmin = (*pbfi)[ii]->getFloat("RIN")*CLHEP::cm; +// double rmin = (*pbfi)[ii]->getFloat("RIN")*GeoModelKernelUnits::cm; //---------------------------------------------------------------------------------- - double safety = 0.01*CLHEP::mm; - double maxRofEP = 1075.0*CLHEP::mm - safety; // Interfere with TRT PatchPanel1 - double RibConnection = 550.0*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; + double maxRofEP = 1075.0*GeoModelKernelUnits::mm - safety; // Interfere with TRT PatchPanel1 + double RibConnection = 550.0*GeoModelKernelUnits::mm; - maxRofEP = (*shell)[0]->getDouble("EPMAXR")*CLHEP::mm - safety; - RibConnection = (*ribs)[0]->getDouble("RIBCONNECTION")*CLHEP::mm; + maxRofEP = (*shell)[0]->getDouble("EPMAXR")*GeoModelKernelUnits::mm - safety; + RibConnection = (*ribs)[0]->getDouble("RIBCONNECTION")*GeoModelKernelUnits::mm; // // Internal shell. Default (initial) values // - double rminInt = 425.*CLHEP::mm; - double rmaxInt = 1040.*CLHEP::mm; - double thickShell = 3.*CLHEP::mm; - double thick2 = 10.*CLHEP::mm; - double zposEP = 3370.*CLHEP::mm; - double zleng = 42.*CLHEP::mm; - rminInt = (*shell)[0]->getDouble("RMININT")*CLHEP::mm; - rmaxInt = (*shell)[0]->getDouble("RMAXINT")*CLHEP::mm; - thickShell = (*shell)[0]->getDouble("THICKSHELL")*CLHEP::mm; - thick2 = (*shell)[0]->getDouble("THICKADD")*CLHEP::mm; - zposEP = (*shell)[0]->getDouble("ZSTART")*CLHEP::mm; - zleng = (*shell)[0]->getDouble("ZSHIFT")*CLHEP::mm; + double rminInt = 425.*GeoModelKernelUnits::mm; + double rmaxInt = 1040.*GeoModelKernelUnits::mm; + double thickShell = 3.*GeoModelKernelUnits::mm; + double thick2 = 10.*GeoModelKernelUnits::mm; + double zposEP = 3370.*GeoModelKernelUnits::mm; + double zleng = 42.*GeoModelKernelUnits::mm; + rminInt = (*shell)[0]->getDouble("RMININT")*GeoModelKernelUnits::mm; + rmaxInt = (*shell)[0]->getDouble("RMAXINT")*GeoModelKernelUnits::mm; + thickShell = (*shell)[0]->getDouble("THICKSHELL")*GeoModelKernelUnits::mm; + thick2 = (*shell)[0]->getDouble("THICKADD")*GeoModelKernelUnits::mm; + zposEP = (*shell)[0]->getDouble("ZSTART")*GeoModelKernelUnits::mm; + zleng = (*shell)[0]->getDouble("ZSHIFT")*GeoModelKernelUnits::mm; GeoTube* shellInt1 = new GeoTube(rminInt,rminInt+thick2,zleng*0.5); GeoTube* shellInt2 = new GeoTube(rminInt,rmaxInt,thickShell*0.5); @@ -96,15 +98,15 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) const GeoLogVol* shellLogInt2 = new GeoLogVol("EPShellInt",shellInt2,shellMat); GeoVPhysVol* shellPhysInt2 = new GeoPhysVol(shellLogInt2); - CLHEP::Hep3Vector servpos11(0.,0., zposEP+zleng*0.5); - CLHEP::Hep3Vector servpos12(0.,0., zposEP+zleng+thickShell*0.5); - CLHEP::Hep3Vector servpos21(0.,0., -zposEP-zleng*0.5); - CLHEP::Hep3Vector servpos22(0.,0., -zposEP-zleng-thickShell*0.5); + GeoTrf::Translate3D servpos11(0.,0., zposEP+zleng*0.5); + GeoTrf::Translate3D servpos12(0.,0., zposEP+zleng+thickShell*0.5); + GeoTrf::Vector3D servpos21(0.,0., -zposEP-zleng*0.5); + GeoTrf::Vector3D servpos22(0.,0., -zposEP-zleng-thickShell*0.5); - GeoTransform *xform11 = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),servpos11)); - GeoTransform *xform12 = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),servpos12)); - GeoTransform *xform21 = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.,M_PI,0.),servpos21)); - GeoTransform *xform22 = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.,M_PI,0.),servpos22)); + GeoTransform *xform11 = new GeoTransform(servpos11); + GeoTransform *xform12 = new GeoTransform(servpos12); + GeoTransform *xform21 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos21)); + GeoTransform *xform22 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos22)); motherP->add(xform11); motherP->add(shellPhysInt1); motherP->add(xform12); @@ -118,22 +120,22 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) // // External shell (default/initial values) - double zgap = 50.*CLHEP::mm; - double rminExt = 250.*CLHEP::mm; + double zgap = 50.*GeoModelKernelUnits::mm; + double rminExt = 250.*GeoModelKernelUnits::mm; double rmaxExt = maxRofEP; - zgap = (*shell)[0]->getDouble("ZGAP")*CLHEP::mm; - rminExt = (*shell)[0]->getDouble("RMINEXT")*CLHEP::mm; + zgap = (*shell)[0]->getDouble("ZGAP")*GeoModelKernelUnits::mm; + rminExt = (*shell)[0]->getDouble("RMINEXT")*GeoModelKernelUnits::mm; const GeoTube* shellExt = new GeoTube(rminExt,rmaxExt,thickShell/2.); const GeoLogVol* shellLogExt = new GeoLogVol("EPShellExt",shellExt,shellMat); GeoVPhysVol* shellPhysExt = new GeoPhysVol(shellLogExt); - CLHEP::Hep3Vector servpos3(0.,0., zposEP+zleng+thickShell+zgap+thickShell/2.); - CLHEP::Hep3Vector servpos4(0.,0.,-zposEP-zleng-thickShell-zgap-thickShell/2.); - GeoTransform *xform3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos3)); - GeoTransform *xform4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos4)); + GeoTrf::Translate3D servpos3(0.,0., zposEP+zleng+thickShell+zgap+thickShell/2.); + GeoTrf::Vector3D servpos4(0.,0.,-zposEP-zleng-thickShell-zgap-thickShell/2.); + GeoTransform *xform3 = new GeoTransform(servpos3); + GeoTransform *xform4 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos4)); motherP->add(xform3); motherP->add(shellPhysExt); @@ -144,19 +146,19 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) // // Insert - default (initial) values - double zthick = 16.0*CLHEP::mm; - double zinsert = 3018.*CLHEP::mm-zthick; - double rminins = 252.*CLHEP::mm; - double rmaxins = 435.*CLHEP::mm; - double rthick = 5.*CLHEP::mm; - double zlengi = 410.*CLHEP::mm; + double zthick = 16.0*GeoModelKernelUnits::mm; + double zinsert = 3018.*GeoModelKernelUnits::mm-zthick; + double rminins = 252.*GeoModelKernelUnits::mm; + double rmaxins = 435.*GeoModelKernelUnits::mm; + double rthick = 5.*GeoModelKernelUnits::mm; + double zlengi = 410.*GeoModelKernelUnits::mm; - zthick = (*insert)[0]->getDouble("ZTHICK")*CLHEP::mm; - zinsert = (*insert)[0]->getDouble("ZINSERT")*CLHEP::mm; - rminins = (*insert)[0]->getDouble("RMININS")*CLHEP::mm; - rmaxins = (*insert)[0]->getDouble("RMAXINS")*CLHEP::mm; - rthick = (*insert)[0]->getDouble("RTHICK")*CLHEP::mm; - zlengi = (*insert)[0]->getDouble("ZLENGINS")*CLHEP::mm; + zthick = (*insert)[0]->getDouble("ZTHICK")*GeoModelKernelUnits::mm; + zinsert = (*insert)[0]->getDouble("ZINSERT")*GeoModelKernelUnits::mm; + rminins = (*insert)[0]->getDouble("RMININS")*GeoModelKernelUnits::mm; + rmaxins = (*insert)[0]->getDouble("RMAXINS")*GeoModelKernelUnits::mm; + rthick = (*insert)[0]->getDouble("RTHICK")*GeoModelKernelUnits::mm; + zlengi = (*insert)[0]->getDouble("ZLENGINS")*GeoModelKernelUnits::mm; GeoTube* Insert1 = new GeoTube(rminins,rmaxins+rthick,zthick*0.5); GeoTube* Insert2 = new GeoTube(rmaxins,rmaxins+rthick,(zlengi-zthick)*0.5); @@ -168,14 +170,14 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) const GeoLogVol* InsertLog2 = new GeoLogVol("EPInsert",Insert2,insertMat); GeoVPhysVol* InsertPhys2 = new GeoPhysVol(InsertLog2); - CLHEP::Hep3Vector servpos51(0.,0., zinsert+zthick*0.5); - CLHEP::Hep3Vector servpos52(0.,0., zinsert+(zthick+zlengi)*0.5); - CLHEP::Hep3Vector servpos61(0.,0., -zinsert-zthick*0.5); - CLHEP::Hep3Vector servpos62(0.,0., -zinsert-(zthick+zlengi)*0.5); - GeoTransform *xform51 = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),servpos51)); - GeoTransform *xform52 = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),servpos52)); - GeoTransform *xform61 = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.,M_PI,0.),servpos61)); - GeoTransform *xform62 = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.,M_PI,0.),servpos62)); + GeoTrf::Translate3D servpos51(0.,0., zinsert+zthick*0.5); + GeoTrf::Translate3D servpos52(0.,0., zinsert+(zthick+zlengi)*0.5); + GeoTrf::Vector3D servpos61(0.,0., -zinsert-zthick*0.5); + GeoTrf::Vector3D servpos62(0.,0., -zinsert-(zthick+zlengi)*0.5); + GeoTransform *xform51 = new GeoTransform(servpos51); + GeoTransform *xform52 = new GeoTransform(servpos52); + GeoTransform *xform61 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos61)); + GeoTransform *xform62 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos62)); motherP->add(xform51); motherP->add(InsertPhys1); @@ -192,15 +194,15 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) // Short ribs - default (initial) values // Initial position is along X axis then move and rotate // - double ribY = 12.0*CLHEP::mm; + double ribY = 12.0*GeoModelKernelUnits::mm; double ribZ = zgap - safety; - double ribX = 380.0*CLHEP::mm; - double posX = 550.0*CLHEP::mm+ribX/2.; + double ribX = 380.0*GeoModelKernelUnits::mm; + double posX = 550.0*GeoModelKernelUnits::mm+ribX/2.; - ribY = (*ribs)[0]->getDouble("SHORTWID")*CLHEP::mm; + ribY = (*ribs)[0]->getDouble("SHORTWID")*GeoModelKernelUnits::mm; ribZ = zgap - safety; - ribX = (*ribs)[0]->getDouble("SHORTLENG")*CLHEP::mm; - posX = (*ribs)[0]->getDouble("SHORTRSTART")*CLHEP::mm + ribX/2.; + ribX = (*ribs)[0]->getDouble("SHORTLENG")*GeoModelKernelUnits::mm; + posX = (*ribs)[0]->getDouble("SHORTRSTART")*GeoModelKernelUnits::mm + ribX/2.; const GeoBox* ribShort = new GeoBox(ribX/2., ribY/2., ribZ/2.); @@ -217,12 +219,12 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) for (int ip=1; ip<12; ip++){ if( ip==3 || ip==6 || ip==9) continue; double angl= ip*M_PI/6.; - CLHEP::Hep3Vector ribpos_pos( posX*cos(angl), posX*sin(angl), zposEP+zleng+thickShell+zgap/2.); - CLHEP::Hep3Vector ribpos_neg( posX*cos(angl), posX*sin(angl),-zposEP-zleng-thickShell-zgap/2.); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_pos)); + GeoTrf::Vector3D ribpos_pos( posX*cos(angl), posX*sin(angl), zposEP+zleng+thickShell+zgap/2.); + GeoTrf::Vector3D ribpos_neg( posX*cos(angl), posX*sin(angl),-zposEP-zleng-thickShell-zgap/2.); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0.,0.),ribpos_pos)); motherP->add(xrib); motherP->add(ribShortPhys); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_neg)); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0.,0.),ribpos_neg)); motherM->add(xrib); motherM->add(ribShortPhys); } @@ -230,22 +232,22 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) //--------------------------------------------------------------------------------- // Long ribs (initial position is along X axis then move and rotate) // - double ribY1 = 20.0*CLHEP::mm; + double ribY1 = 20.0*GeoModelKernelUnits::mm; double ribZ1 = zgap - safety; - double ribX1 = RibConnection-250.*CLHEP::mm; - double posX1 = 250.*CLHEP::mm+ribX1/2.; + double ribX1 = RibConnection-250.*GeoModelKernelUnits::mm; + double posX1 = 250.*GeoModelKernelUnits::mm+ribX1/2.; - double ribY2 = 30.0*CLHEP::mm; + double ribY2 = 30.0*GeoModelKernelUnits::mm; double ribZ2 = zgap - safety; double ribX2 = maxRofEP - RibConnection; double posX2 = RibConnection+ribX2/2.; - ribY1 = (*ribs)[0]->getDouble("LONGWID1")*CLHEP::mm; + ribY1 = (*ribs)[0]->getDouble("LONGWID1")*GeoModelKernelUnits::mm; ribZ1 = zgap - safety; - ribX1 = RibConnection - (*ribs)[0]->getDouble("LONGLENG1")*CLHEP::mm; // LONGLENG1 is a RMIN of ribs - posX1 = (*ribs)[0]->getDouble("LONGLENG1")*CLHEP::mm + ribX1/2.; // It's determined by Pixel volume -> so 250.0!!! + ribX1 = RibConnection - (*ribs)[0]->getDouble("LONGLENG1")*GeoModelKernelUnits::mm; // LONGLENG1 is a RMIN of ribs + posX1 = (*ribs)[0]->getDouble("LONGLENG1")*GeoModelKernelUnits::mm + ribX1/2.; // It's determined by Pixel volume -> so 250.0!!! - ribY2 = (*ribs)[0]->getDouble("LONGWID2")*CLHEP::mm; + ribY2 = (*ribs)[0]->getDouble("LONGWID2")*GeoModelKernelUnits::mm; ribZ2 = zgap - safety; ribX2 = maxRofEP - RibConnection; posX2 = RibConnection+ribX2/2.; @@ -264,21 +266,21 @@ void EndPlateFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) for (int ip=0; ip<4; ip++){ double angl= ip*M_PI/2.; // 1st part - CLHEP::Hep3Vector ribpos_pos1( posX1*cos(angl), posX1*sin(angl), zposEP+zleng+thickShell+zgap/2.); - CLHEP::Hep3Vector ribpos_neg1( posX1*cos(angl), posX1*sin(angl),-zposEP-zleng-thickShell-zgap/2.); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_pos1)); + GeoTrf::Vector3D ribpos_pos1( posX1*cos(angl), posX1*sin(angl), zposEP+zleng+thickShell+zgap/2.); + GeoTrf::Vector3D ribpos_neg1( posX1*cos(angl), posX1*sin(angl),-zposEP-zleng-thickShell-zgap/2.); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0.,0.),ribpos_pos1)); motherP->add(xrib); motherP->add(ribLong1Phys); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_neg1)); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0.,0.),ribpos_neg1)); motherM->add(xrib); motherM->add(ribLong1Phys); // 2nd part - CLHEP::Hep3Vector ribpos_pos2( posX2*cos(angl), posX2*sin(angl), zposEP+zleng+thickShell+zgap/2.); - CLHEP::Hep3Vector ribpos_neg2( posX2*cos(angl), posX2*sin(angl),-zposEP-zleng-thickShell-zgap/2.); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_pos2)); + GeoTrf::Vector3D ribpos_pos2( posX2*cos(angl), posX2*sin(angl), zposEP+zleng+thickShell+zgap/2.); + GeoTrf::Vector3D ribpos_neg2( posX2*cos(angl), posX2*sin(angl),-zposEP-zleng-thickShell-zgap/2.); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0.,0.),ribpos_pos2)); motherP->add(xrib); motherP->add(ribLong2Phys); - xrib = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(-angl,0.,0.),ribpos_neg2)); + xrib = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(-angl,0.,0.),ribpos_neg2)); motherM->add(xrib); motherM->add(ribLong2Phys); } diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatBuilderToolSLHC.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatBuilderToolSLHC.cxx index ad4299a2c7b..87365a42dd8 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatBuilderToolSLHC.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatBuilderToolSLHC.cxx @@ -12,7 +12,7 @@ #include "GeoModelInterfaces/IGeoDbTagSvc.h" #include "RDBAccessSvc/IRDBAccessSvc.h" #include "InDetGeoModelUtils/InDetMaterialManager.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include "InDetServMatGeoModel/ServicesTracker.h" #include "InDetServMatGeoModel/ServicesTrackerBuilder.h" @@ -301,14 +301,14 @@ void InDetServMatBuilderToolSLHC::printNewVolume( const ServiceVolume& vol, << " zmin " << vol.zMin() << " zmax " << vol.zMax() << endmsg; - msg(MSG::DEBUG) << "name " << vol.name() << " density " << dens * CLHEP::cm3 / CLHEP::g - << " [g/cm3] weight " << dens*param.volume()/CLHEP::kg << " [kg]" << endmsg; + msg(MSG::DEBUG) << "name " << vol.name() << " density " << dens * GeoModelKernelUnits::cm3 / GeoModelKernelUnits::g + << " [g/cm3] weight " << dens*param.volume()/GeoModelKernelUnits::kg << " [kg]" << endmsg; } if (msgLvl(MSG::DEBUG)) { // FIXME: change to VERBOSE when done! msg(MSG::DEBUG) << "Number of elements: " << mat.getNumElements() << endmsg; for (unsigned int i=0; i< mat.getNumElements(); i++) { msg(MSG::DEBUG) << "Element " << mat.getElement(i)->getName() - << " weight " << mat.getFraction(i) * weight / CLHEP::g << endmsg; + << " weight " << mat.getFraction(i) * weight / GeoModelKernelUnits::g << endmsg; } } } @@ -316,16 +316,16 @@ void InDetServMatBuilderToolSLHC::printNewVolume( const ServiceVolume& vol, void InDetServMatBuilderToolSLHC::fixMissingMaterials() { /* - m_geoMgr->matMgr()->addWeightEntry( "CoaxialHVCable", "indet::CoaxialHVCableBase", 0.0026*CLHEP::gram, true, "indet"); - m_geoMgr->matMgr()->addWeightEntry( "TwistedPair_awg36", "indet::TwistedPair_awg36Base", 0.000381*CLHEP::gram, true, "indet"); - m_geoMgr->matMgr()->addWeightEntry( "ScreenedTwistP_36", "indet::ScreenedTwistP_36Base", 0.000978*CLHEP::gram, true, "indet"); - m_geoMgr->matMgr()->addWeightEntry( "Twinax", "indet::TwinaxBase", 0.00517*CLHEP::gram, true, "indet"); + m_geoMgr->matMgr()->addWeightEntry( "CoaxialHVCable", "indet::CoaxialHVCableBase", 0.0026*GeoModelKernelUnits::gram, true, "indet"); + m_geoMgr->matMgr()->addWeightEntry( "TwistedPair_awg36", "indet::TwistedPair_awg36Base", 0.000381*GeoModelKernelUnits::gram, true, "indet"); + m_geoMgr->matMgr()->addWeightEntry( "ScreenedTwistP_36", "indet::ScreenedTwistP_36Base", 0.000978*GeoModelKernelUnits::gram, true, "indet"); + m_geoMgr->matMgr()->addWeightEntry( "Twinax", "indet::TwinaxBase", 0.00517*GeoModelKernelUnits::gram, true, "indet"); */ - //m_geoMgr->matMgr()->addWeightEntry( "ShieldingSleeve", "indet::ShieldingSleeveBase", 0.033*CLHEP::gram, true, "indet"); - //m_geoMgr->matMgr()->addWeightEntry( "ProtectionSleeve", "indet::ProtectionSleeveBase", 0.004*CLHEP::gram, true, "indet"); + //m_geoMgr->matMgr()->addWeightEntry( "ShieldingSleeve", "indet::ShieldingSleeveBase", 0.033*GeoModelKernelUnits::gram, true, "indet"); + //m_geoMgr->matMgr()->addWeightEntry( "ProtectionSleeve", "indet::ProtectionSleeveBase", 0.004*GeoModelKernelUnits::gram, true, "indet"); /* // the wight is 1, because the real weight is in ServiceMaterial NOT NEEDED - m_geoMgr->matMgr()->addWeightEntry( "CoolingPipe", "std::Titanium", 1*CLHEP::gram, true, "indet"); + m_geoMgr->matMgr()->addWeightEntry( "CoolingPipe", "std::Titanium", 1*GeoModelKernelUnits::gram, true, "indet"); std::vector<std::string> comps(2); std::vector<double> fracs(2); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactory.cxx index c29725f0f0b..6854e139abd 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactory.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactory.cxx @@ -36,7 +36,7 @@ // StoreGate includes #include "StoreGate/StoreGateSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> @@ -90,26 +90,26 @@ void InDetServMatFactory::create(GeoPhysVol *world ) InDetMaterialManager * materialManager = new InDetMaterialManager("InDetServMatMaterialManager", getAthenaComps()); materialManager->addScalingTable(scalingTable); - double safety = 0.001 * CLHEP::mm; - - double ZMaxBrlTRT = envelopes->getDouble("ZMAXBRLTRT") * CLHEP::mm; - double ZMaxBrlSCT = envelopes->getDouble("ZMAXBRLSCT") * CLHEP::mm; - double ZMinFwdSCTandTRT = envelopes->getDouble("ZMINFWDSCTANDTRT") * CLHEP::mm; - double ZMinSCTServInTRT = envelopes->getDouble("ZMINSCTSERVINTRT") * CLHEP::mm; - double ZMaxSCTServInTRT = envelopes->getDouble("ZMAXSCTSERVINTRT") * CLHEP::mm; - double ZMinPixServ = envelopes->getDouble("ZMINPIXSERV") * CLHEP::mm; - double ZMaxFwdTRTC = envelopes->getDouble("ZMAXFWDTRTC") * CLHEP::mm; - double ZMaxIDet = (*atls)[0]->getDouble("IDETZMX") * CLHEP::cm + safety; // 3470 mm - - double RMinBrlSCT = envelopes->getDouble("RMINBRLSCT") * CLHEP::mm; - double RMaxBrlTRT = envelopes->getDouble("RMAXBRLTRT") * CLHEP::mm; - double RMinBrlTRT = envelopes->getDouble("RMINBRLTRT") * CLHEP::mm; - double RMaxFwdTRT = envelopes->getDouble("RMAXFWDTRT") * CLHEP::mm; - double RMaxFwdSCT = envelopes->getDouble("RMAXFWDSCT") * CLHEP::mm; - double RMaxFwdTRTC = envelopes->getDouble("RMAXFWDTRTC") * CLHEP::mm; - double RMinPixServ = envelopes->getDouble("RMINPIXSERV") * CLHEP::mm; - double RMaxPixServ = envelopes->getDouble("RMAXPIXSERV") * CLHEP::mm; - double RMaxIDet = (*atls)[0]->getDouble("IDETOR") * CLHEP::cm + safety; // 1147 mm + double safety = 0.001 * GeoModelKernelUnits::mm; + + double ZMaxBrlTRT = envelopes->getDouble("ZMAXBRLTRT") * GeoModelKernelUnits::mm; + double ZMaxBrlSCT = envelopes->getDouble("ZMAXBRLSCT") * GeoModelKernelUnits::mm; + double ZMinFwdSCTandTRT = envelopes->getDouble("ZMINFWDSCTANDTRT") * GeoModelKernelUnits::mm; + double ZMinSCTServInTRT = envelopes->getDouble("ZMINSCTSERVINTRT") * GeoModelKernelUnits::mm; + double ZMaxSCTServInTRT = envelopes->getDouble("ZMAXSCTSERVINTRT") * GeoModelKernelUnits::mm; + double ZMinPixServ = envelopes->getDouble("ZMINPIXSERV") * GeoModelKernelUnits::mm; + double ZMaxFwdTRTC = envelopes->getDouble("ZMAXFWDTRTC") * GeoModelKernelUnits::mm; + double ZMaxIDet = (*atls)[0]->getDouble("IDETZMX") * GeoModelKernelUnits::cm + safety; // 3470 mm + + double RMinBrlSCT = envelopes->getDouble("RMINBRLSCT") * GeoModelKernelUnits::mm; + double RMaxBrlTRT = envelopes->getDouble("RMAXBRLTRT") * GeoModelKernelUnits::mm; + double RMinBrlTRT = envelopes->getDouble("RMINBRLTRT") * GeoModelKernelUnits::mm; + double RMaxFwdTRT = envelopes->getDouble("RMAXFWDTRT") * GeoModelKernelUnits::mm; + double RMaxFwdSCT = envelopes->getDouble("RMAXFWDSCT") * GeoModelKernelUnits::mm; + double RMaxFwdTRTC = envelopes->getDouble("RMAXFWDTRTC") * GeoModelKernelUnits::mm; + double RMinPixServ = envelopes->getDouble("RMINPIXSERV") * GeoModelKernelUnits::mm; + double RMaxPixServ = envelopes->getDouble("RMAXPIXSERV") * GeoModelKernelUnits::mm; + double RMaxIDet = (*atls)[0]->getDouble("IDETOR") * GeoModelKernelUnits::cm + safety; // 1147 mm // Since the TRT Wheel C space is not used in some versions and is used by some // other services we simplify the volume. @@ -124,12 +124,12 @@ void InDetServMatFactory::create(GeoPhysVol *world ) bool join1 = false; bool join2 = false; - if (std::abs(RMaxFwdTRTC - RMinPixServ) <= 1*CLHEP::mm){ + if (std::abs(RMaxFwdTRTC - RMinPixServ) <= 1*GeoModelKernelUnits::mm){ join1 = true; join2 = true; RMaxFwdTRTC = RMinPixServ; RMaxPixServ = RMinPixServ; - } else if ((RMaxFwdTRTC - 1*CLHEP::mm) <= RMaxPixServ) { + } else if ((RMaxFwdTRTC - 1*GeoModelKernelUnits::mm) <= RMaxPixServ) { join1 = true; RMaxPixServ = RMaxFwdTRTC; } @@ -142,8 +142,8 @@ void InDetServMatFactory::create(GeoPhysVol *world ) const GeoShapeUnion *ServVolAux = 0; if (!join1) { - GeoPcon* pixServP = new GeoPcon(0.,2*CLHEP::pi); - GeoPcon* pixServM = new GeoPcon(0.,2*CLHEP::pi); + GeoPcon* pixServP = new GeoPcon(0.,2*GeoModelKernelUnits::pi); + GeoPcon* pixServM = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // Plane 1: Start at the end of the SCT endcap pixServP->addPlane(ZMinPixServ, RMinPixServ, RMaxPixServ); @@ -163,7 +163,7 @@ void InDetServMatFactory::create(GeoPhysVol *world ) } // This is the volume for the TRT/SCT services - GeoPcon *sctTrtServ = new GeoPcon(0.,2*CLHEP::pi); + GeoPcon *sctTrtServ = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // Pixel Services if (join1) { diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC2.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC2.cxx index a44b966ae56..43f828b400c 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC2.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC2.cxx @@ -95,42 +95,42 @@ void InDetServMatFactoryDC2::create(GeoPhysVol *world) // double epsilon = 0.001; - double endZOfBTRT = (*trtb)[0]->getDouble("ZLEN")*CLHEP::cm; - double endZOfBSCT = (*sctg)[0]->getDouble("HLEN")*CLHEP::cm; - double begZOfFSCT = (*zscg)[0]->getDouble("ZLOEND")*CLHEP::cm; - double endZOfFSCT = (*zscg)[0]->getDouble("ZHIEND")*CLHEP::cm; + double endZOfBTRT = (*trtb)[0]->getDouble("ZLEN")*GeoModelKernelUnits::cm; + double endZOfBSCT = (*sctg)[0]->getDouble("HLEN")*GeoModelKernelUnits::cm; + double begZOfFSCT = (*zscg)[0]->getDouble("ZLOEND")*GeoModelKernelUnits::cm; + double endZOfFSCT = (*zscg)[0]->getDouble("ZHIEND")*GeoModelKernelUnits::cm; double endZOfFTRT = ((*trtb)[15]->getDouble("ZPOSA") + ((*trtb)[15]->getDouble("ZLEN")+(*trtb)[15]->getDouble("ZGAP"))/2. + ((*trtb)[2]->getDouble("ZPOSA")-(*trtb)[1]->getDouble("ZPOSA"))*3 - + (*trtb)[1]->getDouble("ZLEN")/2.)*CLHEP::cm; + + (*trtb)[1]->getDouble("ZLEN")/2.)*GeoModelKernelUnits::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; // This is endOfEndCapVolumeAB //double begZOfSCTServInTRT = ((trtb[7].zposa + (trtb[7].zlen + trtb[7].zgap)/2.) + - // (trtb[8].zposa - trtb[7].zposa)*7 + trtb[7].zlen/2.)*CLHEP::cm; + // (trtb[8].zposa - trtb[7].zposa)*7 + trtb[7].zlen/2.)*GeoModelKernelUnits::cm; // This is beginningOfEndCapVolumeC // double endZOfSCTServInTRT = (trtb[15].zposa + (trtb[15].zlen + trtb[15].zgap)/2. - - // trtb[1].zlen/2.)*CLHEP::cm; + // trtb[1].zlen/2.)*GeoModelKernelUnits::cm; - // The SCT services go from 2755.306 to 2775.306 CLHEP::mm + // The SCT services go from 2755.306 to 2775.306 GeoModelKernelUnits::mm // The TRT has a gap from 2712.25 to 2829.75 mm // We hard wire an envelope for these services instead. - double begZOfSCTServInTRT = 2755. * CLHEP::mm; - double endZOfSCTServInTRT = 2776. * CLHEP::mm; + double begZOfSCTServInTRT = 2755. * GeoModelKernelUnits::mm; + double endZOfSCTServInTRT = 2776. * GeoModelKernelUnits::mm; //std::cout << "Begin SCT services " << begZOfSCTServInTRT << std::endl; //std::cout << "End SCT services " << endZOfSCTServInTRT << std::endl; - double outROfPixel = (*zscg)[0]->getDouble("RINEND")*CLHEP::cm; - double inROfFTRT = (*trtb)[15]->getDouble("RI")*CLHEP::cm; - double outROfFSCT = (*zscg)[0]->getDouble("ROUEND")*CLHEP::cm; - double outROfBSCT = (*sctg)[0]->getDouble("RMAX")*CLHEP::cm; - double outROfPixelCables = (*pbfi)[0]->getFloat("ROUT")*CLHEP::cm; - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double outROfTRT = (*trtg)[0]->getDouble("RMAX")*CLHEP::cm; + double outROfPixel = (*zscg)[0]->getDouble("RINEND")*GeoModelKernelUnits::cm; + double inROfFTRT = (*trtb)[15]->getDouble("RI")*GeoModelKernelUnits::cm; + double outROfFSCT = (*zscg)[0]->getDouble("ROUEND")*GeoModelKernelUnits::cm; + double outROfBSCT = (*sctg)[0]->getDouble("RMAX")*GeoModelKernelUnits::cm; + double outROfPixelCables = (*pbfi)[0]->getFloat("ROUT")*GeoModelKernelUnits::cm; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double outROfTRT = (*trtg)[0]->getDouble("RMAX")*GeoModelKernelUnits::cm; // // Create the envelope for the Pixel Services: diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC3.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC3.cxx index b772fcb94f7..024b50ae510 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC3.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC3.cxx @@ -87,24 +87,24 @@ void InDetServMatFactoryDC3::create(GeoPhysVol *world ) InDetMaterialManager * materialManager = new InDetMaterialManager("InDetServMatMaterialManager", getAthenaComps()); - double ZMaxBrlTRT = envelopes->getDouble("ZMAXBRLTRT") * CLHEP::mm; - double ZMaxBrlSCT = envelopes->getDouble("ZMAXBRLSCT") * CLHEP::mm; - double ZMinFwdSCTandTRT = envelopes->getDouble("ZMINFWDSCTANDTRT") * CLHEP::mm; - double ZMinSCTServInTRT = envelopes->getDouble("ZMINSCTSERVINTRT") * CLHEP::mm; - double ZMaxSCTServInTRT = envelopes->getDouble("ZMAXSCTSERVINTRT") * CLHEP::mm; - double ZMinPixServ = envelopes->getDouble("ZMINPIXSERV") * CLHEP::mm; - double ZMaxFwdTRTC = envelopes->getDouble("ZMAXFWDTRTC") * CLHEP::mm; - double ZMaxIDet = (*atls)[0]->getDouble("IDETZMX") * CLHEP::cm; // 3490 mm - - double RMinBrlSCT = envelopes->getDouble("RMINBRLSCT") * CLHEP::mm; - double RMaxBrlTRT = envelopes->getDouble("RMAXBRLTRT") * CLHEP::mm; - double RMinBrlTRT = envelopes->getDouble("RMINBRLTRT") * CLHEP::mm; - double RMaxFwdTRT = envelopes->getDouble("RMAXFWDTRT") * CLHEP::mm; - double RMaxFwdSCT = envelopes->getDouble("RMAXFWDSCT") * CLHEP::mm; - double RMaxFwdTRTC = envelopes->getDouble("RMAXFWDTRTC") * CLHEP::mm; - double RMinPixServ = envelopes->getDouble("RMINPIXSERV") * CLHEP::mm; - double RMaxPixServ = envelopes->getDouble("RMAXPIXSERV") * CLHEP::mm; - double RMaxIDet = (*atls)[0]->getDouble("IDETOR") * CLHEP::cm; // 1147 mm + double ZMaxBrlTRT = envelopes->getDouble("ZMAXBRLTRT") * GeoModelKernelUnits::mm; + double ZMaxBrlSCT = envelopes->getDouble("ZMAXBRLSCT") * GeoModelKernelUnits::mm; + double ZMinFwdSCTandTRT = envelopes->getDouble("ZMINFWDSCTANDTRT") * GeoModelKernelUnits::mm; + double ZMinSCTServInTRT = envelopes->getDouble("ZMINSCTSERVINTRT") * GeoModelKernelUnits::mm; + double ZMaxSCTServInTRT = envelopes->getDouble("ZMAXSCTSERVINTRT") * GeoModelKernelUnits::mm; + double ZMinPixServ = envelopes->getDouble("ZMINPIXSERV") * GeoModelKernelUnits::mm; + double ZMaxFwdTRTC = envelopes->getDouble("ZMAXFWDTRTC") * GeoModelKernelUnits::mm; + double ZMaxIDet = (*atls)[0]->getDouble("IDETZMX") * GeoModelKernelUnits::cm; // 3490 mm + + double RMinBrlSCT = envelopes->getDouble("RMINBRLSCT") * GeoModelKernelUnits::mm; + double RMaxBrlTRT = envelopes->getDouble("RMAXBRLTRT") * GeoModelKernelUnits::mm; + double RMinBrlTRT = envelopes->getDouble("RMINBRLTRT") * GeoModelKernelUnits::mm; + double RMaxFwdTRT = envelopes->getDouble("RMAXFWDTRT") * GeoModelKernelUnits::mm; + double RMaxFwdSCT = envelopes->getDouble("RMAXFWDSCT") * GeoModelKernelUnits::mm; + double RMaxFwdTRTC = envelopes->getDouble("RMAXFWDTRTC") * GeoModelKernelUnits::mm; + double RMinPixServ = envelopes->getDouble("RMINPIXSERV") * GeoModelKernelUnits::mm; + double RMaxPixServ = envelopes->getDouble("RMAXPIXSERV") * GeoModelKernelUnits::mm; + double RMaxIDet = (*atls)[0]->getDouble("IDETOR") * GeoModelKernelUnits::cm; // 1147 mm @@ -112,8 +112,8 @@ void InDetServMatFactoryDC3::create(GeoPhysVol *world ) // Create the envelope for the Pixel Services: // const GeoMaterial* air = materialManager->getMaterial("std::Air"); - GeoPcon* pixServP = new GeoPcon(0.,2*CLHEP::pi); - GeoPcon* pixServM = new GeoPcon(0.,2*CLHEP::pi); + GeoPcon* pixServP = new GeoPcon(0.,2*GeoModelKernelUnits::pi); + GeoPcon* pixServM = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // Plane 1: Start at the end of the SCT endcap pixServP->addPlane(ZMinPixServ, RMinPixServ, RMaxPixServ); @@ -132,7 +132,7 @@ void InDetServMatFactoryDC3::create(GeoPhysVol *world ) const GeoShapeUnion *ServVolAux = new GeoShapeUnion(pixServP, pixServM); // This is the volume for the TRT/SCT services - GeoPcon *sctTrtServ = new GeoPcon(0.,2*CLHEP::pi); + GeoPcon *sctTrtServ = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // THE BEGINNING sctTrtServ->addPlane(-ZMaxIDet, RMaxFwdTRTC, RMaxIDet); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryFS.cxx index c0dd46354f1..4da8a0e8df6 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryFS.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryFS.cxx @@ -32,7 +32,7 @@ #include "RDBAccessSvc/IRDBAccessSvc.h" #include "GaudiKernel/Bootstrap.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> @@ -91,26 +91,26 @@ void InDetServMatFactoryFS::create(GeoPhysVol *world ) const IRDBRecord *envelopes = (*servEnvelopeTable)[0]; - double safety = 0.001 * CLHEP::mm; + double safety = 0.001 * GeoModelKernelUnits::mm; - double ZMaxBrlTRT = envelopes->getDouble("ZMAXBRLTRT") * CLHEP::mm; - double ZMaxBrlSCT = envelopes->getDouble("ZMAXBRLSCT") * CLHEP::mm; - double ZMinFwdSCTandTRT = envelopes->getDouble("ZMINFWDSCTANDTRT") * CLHEP::mm; - double ZMinSCTServInTRT = envelopes->getDouble("ZMINSCTSERVINTRT") * CLHEP::mm; - double ZMaxSCTServInTRT = envelopes->getDouble("ZMAXSCTSERVINTRT") * CLHEP::mm; - double ZMinPixServ = envelopes->getDouble("ZMINPIXSERV") * CLHEP::mm; - double ZMaxFwdTRTC = envelopes->getDouble("ZMAXFWDTRTC") * CLHEP::mm; - double ZMaxIDet = (*atls)[0]->getDouble("IDETZMX") * CLHEP::cm + safety; // 3470 mm + double ZMaxBrlTRT = envelopes->getDouble("ZMAXBRLTRT") * GeoModelKernelUnits::mm; + double ZMaxBrlSCT = envelopes->getDouble("ZMAXBRLSCT") * GeoModelKernelUnits::mm; + double ZMinFwdSCTandTRT = envelopes->getDouble("ZMINFWDSCTANDTRT") * GeoModelKernelUnits::mm; + double ZMinSCTServInTRT = envelopes->getDouble("ZMINSCTSERVINTRT") * GeoModelKernelUnits::mm; + double ZMaxSCTServInTRT = envelopes->getDouble("ZMAXSCTSERVINTRT") * GeoModelKernelUnits::mm; + double ZMinPixServ = envelopes->getDouble("ZMINPIXSERV") * GeoModelKernelUnits::mm; + double ZMaxFwdTRTC = envelopes->getDouble("ZMAXFWDTRTC") * GeoModelKernelUnits::mm; + double ZMaxIDet = (*atls)[0]->getDouble("IDETZMX") * GeoModelKernelUnits::cm + safety; // 3470 mm - double RMinBrlSCT = envelopes->getDouble("RMINBRLSCT") * CLHEP::mm; - double RMaxBrlTRT = envelopes->getDouble("RMAXBRLTRT") * CLHEP::mm; - double RMinBrlTRT = envelopes->getDouble("RMINBRLTRT") * CLHEP::mm; - double RMaxFwdTRT = envelopes->getDouble("RMAXFWDTRT") * CLHEP::mm; - double RMaxFwdSCT = envelopes->getDouble("RMAXFWDSCT") * CLHEP::mm; - double RMaxFwdTRTC = envelopes->getDouble("RMAXFWDTRTC") * CLHEP::mm; - double RMinPixServ = envelopes->getDouble("RMINPIXSERV") * CLHEP::mm; - double RMaxPixServ = envelopes->getDouble("RMAXPIXSERV") * CLHEP::mm; - double RMaxIDet = (*atls)[0]->getDouble("IDETOR") * CLHEP::cm + safety; // 1147 mm + double RMinBrlSCT = envelopes->getDouble("RMINBRLSCT") * GeoModelKernelUnits::mm; + double RMaxBrlTRT = envelopes->getDouble("RMAXBRLTRT") * GeoModelKernelUnits::mm; + double RMinBrlTRT = envelopes->getDouble("RMINBRLTRT") * GeoModelKernelUnits::mm; + double RMaxFwdTRT = envelopes->getDouble("RMAXFWDTRT") * GeoModelKernelUnits::mm; + double RMaxFwdSCT = envelopes->getDouble("RMAXFWDSCT") * GeoModelKernelUnits::mm; + double RMaxFwdTRTC = envelopes->getDouble("RMAXFWDTRTC") * GeoModelKernelUnits::mm; + double RMinPixServ = envelopes->getDouble("RMINPIXSERV") * GeoModelKernelUnits::mm; + double RMaxPixServ = envelopes->getDouble("RMAXPIXSERV") * GeoModelKernelUnits::mm; + double RMaxIDet = (*atls)[0]->getDouble("IDETOR") * GeoModelKernelUnits::cm + safety; // 1147 mm // Since the TRT Wheel C space is not used in some versions and is used by some // other services we simplify the volume. @@ -125,12 +125,12 @@ void InDetServMatFactoryFS::create(GeoPhysVol *world ) bool join1 = false; bool join2 = false; - if (std::abs(RMaxFwdTRTC - RMinPixServ) <= 1*CLHEP::mm){ + if (std::abs(RMaxFwdTRTC - RMinPixServ) <= 1*GeoModelKernelUnits::mm){ join1 = true; join2 = true; RMaxFwdTRTC = RMinPixServ; RMaxPixServ = RMinPixServ; - } else if ((RMaxFwdTRTC - 1*CLHEP::mm) <= RMaxPixServ) { + } else if ((RMaxFwdTRTC - 1*GeoModelKernelUnits::mm) <= RMaxPixServ) { join1 = true; RMaxPixServ = RMaxFwdTRTC; } @@ -144,8 +144,8 @@ void InDetServMatFactoryFS::create(GeoPhysVol *world ) GeoPcon* pixServM = 0; if (!join1) { - pixServP = new GeoPcon(0.,2*CLHEP::pi); - pixServM = new GeoPcon(0.,2*CLHEP::pi); + pixServP = new GeoPcon(0.,2*GeoModelKernelUnits::pi); + pixServM = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // Plane 1: Start at the end of the SCT endcap pixServP->addPlane(ZMinPixServ, RMinPixServ, RMaxPixServ); @@ -163,8 +163,8 @@ void InDetServMatFactoryFS::create(GeoPhysVol *world ) } // This is the volume for the TRT/SCT services - GeoPcon *sctTrtServP = new GeoPcon(0.,2*CLHEP::pi); - GeoPcon *sctTrtServM = new GeoPcon(0.,2*CLHEP::pi); + GeoPcon *sctTrtServP = new GeoPcon(0.,2*GeoModelKernelUnits::pi); + GeoPcon *sctTrtServM = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // Pixel Services if (join1) { diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactorySLHC.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactorySLHC.cxx index 60272ec92c6..79bdc998f80 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactorySLHC.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactorySLHC.cxx @@ -75,9 +75,9 @@ void InDetServMatFactorySLHC::create(GeoPhysVol *world ) double cylLength; if (oldEnvelope()) { - innerRadius = geomDB()->getDouble("","SERVICESINNERRADIUS") * CLHEP::mm; - outerRadius = geomDB()->getDouble("","SERVICESOUTERRADIUS") * CLHEP::mm; - cylLength = geomDB()->getDouble("","SERVICESCYLLENGTH") * CLHEP::mm; + innerRadius = geomDB()->getDouble("","SERVICESINNERRADIUS") * GeoModelKernelUnits::mm; + outerRadius = geomDB()->getDouble("","SERVICESOUTERRADIUS") * GeoModelKernelUnits::mm; + cylLength = geomDB()->getDouble("","SERVICESCYLLENGTH") * GeoModelKernelUnits::mm; } else { innerRadius = envelopeRMin(); outerRadius = envelopeRMax(); @@ -86,7 +86,7 @@ void InDetServMatFactorySLHC::create(GeoPhysVol *world ) envelopeShape = new GeoTube(innerRadius, outerRadius, 0.5*cylLength); zone = new InDetDD::TubeZone("InDetServMat", -0.5*cylLength, 0.5*cylLength, innerRadius, outerRadius); } else { - GeoPcon* envelopeShapeTmp = new GeoPcon(0.,2*CLHEP::pi); + GeoPcon* envelopeShapeTmp = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // table contains +ve z values only and envelope is assumed to be symmetric around z. int numPlanes = envelopeNumPlanes(); for (int i = 0; i < numPlanes * 2; i++) { @@ -183,7 +183,7 @@ InDetServMatFactorySLHC::envelopeNumPlanes() const double InDetServMatFactorySLHC::envelopeZ(int i) const { - double zmin = geomDB()->getDouble(m_InDetServGenEnvelope,"Z",i) * CLHEP::mm; + double zmin = geomDB()->getDouble(m_InDetServGenEnvelope,"Z",i) * GeoModelKernelUnits::mm; if (zmin < 0) msg(MSG::ERROR) << "InDetServGenEnvelope table should only contain +ve z values" << endmsg; return std::abs(zmin); } @@ -191,11 +191,11 @@ InDetServMatFactorySLHC::envelopeZ(int i) const double InDetServMatFactorySLHC::envelopeRMin(int i) const { - return geomDB()->getDouble(m_InDetServGenEnvelope,"RMIN",i) * CLHEP::mm; + return geomDB()->getDouble(m_InDetServGenEnvelope,"RMIN",i) * GeoModelKernelUnits::mm; } double InDetServMatFactorySLHC::envelopeRMax(int i) const { - return geomDB()->getDouble(m_InDetServGenEnvelope,"RMAX",i) * CLHEP::mm; + return geomDB()->getDouble(m_InDetServGenEnvelope,"RMAX",i) * GeoModelKernelUnits::mm; } diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatGeometryManager.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatGeometryManager.cxx index a85d8ea8fda..b1b87b9cf5c 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatGeometryManager.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatGeometryManager.cxx @@ -10,7 +10,7 @@ #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" InDetServMatGeometryManager::InDetServMatGeometryManager(const InDetDD::AthenaComps * athenaComps) : m_athenaComps(athenaComps), @@ -158,14 +158,14 @@ int InDetServMatGeometryManager::pixelNumLayers() const // layer radius double InDetServMatGeometryManager::pixelLayerRadius(int layer) const { - return db()->getDouble(m_PixelLayer,"RLAYER",layer) * CLHEP::mm; + return db()->getDouble(m_PixelLayer,"RLAYER",layer) * GeoModelKernelUnits::mm; } // layer length double InDetServMatGeometryManager::pixelLayerLength(int layer) const { int staveIndex = db()->getInt(m_PixelLayer,"STAVEINDEX",layer); - return db()->getDouble(m_PixelStave,"ENVLENGTH",staveIndex) * CLHEP::mm; + return db()->getDouble(m_PixelStave,"ENVLENGTH",staveIndex) * GeoModelKernelUnits::mm; } // Number of staves/sectors per barrel layer @@ -264,7 +264,7 @@ int InDetServMatGeometryManager::pixelNumDisks() const // disk Z position double InDetServMatGeometryManager::pixelDiskZ(int disk) const { - return db()->getDouble(m_PixelDisk,"ZDISK",disk) * CLHEP::mm; + return db()->getDouble(m_PixelDisk,"ZDISK",disk) * GeoModelKernelUnits::mm; } // disk min radius @@ -272,10 +272,10 @@ double InDetServMatGeometryManager::pixelDiskRMin(int disk) const { std::string route = pixelDiskServiceRoute(disk); if(route=="StdRoute") - return db()->getDouble(m_PixelDisk,"RMIN",disk) * CLHEP::mm - 11*CLHEP::mm; + return db()->getDouble(m_PixelDisk,"RMIN",disk) * GeoModelKernelUnits::mm - 11*GeoModelKernelUnits::mm; // support structures - SUP1RMIN is always closest to centre - return db()->getDouble(m_PixelDisk,"SUP1RMIN",disk) * CLHEP::mm; + return db()->getDouble(m_PixelDisk,"SUP1RMIN",disk) * GeoModelKernelUnits::mm; } @@ -284,10 +284,10 @@ double InDetServMatGeometryManager::pixelDiskRMax(int disk) const { std::string route = pixelDiskServiceRoute(disk); if(route=="StdRoute") - return db()->getDouble(m_PixelDisk,"RMAX",disk) * CLHEP::mm + 11*CLHEP::mm; + return db()->getDouble(m_PixelDisk,"RMAX",disk) * GeoModelKernelUnits::mm + 11*GeoModelKernelUnits::mm; // support structures - SUP3RMAX is always furthest from centre - return db()->getDouble(m_PixelDisk,"SUP3RMAX",disk) * CLHEP::mm; + return db()->getDouble(m_PixelDisk,"SUP3RMAX",disk) * GeoModelKernelUnits::mm; } @@ -297,7 +297,7 @@ double InDetServMatGeometryManager::pixelDiskEOSZOffset(int disk) const if (!db()->testField(m_PixelSvcRoute, "EOSZOFFSET")) return 0.0; else - return db()->getDouble(m_PixelSvcRoute,"EOSZOFFSET",disk) * CLHEP::mm; + return db()->getDouble(m_PixelSvcRoute,"EOSZOFFSET",disk) * GeoModelKernelUnits::mm; } // return name of support tube where @@ -310,7 +310,7 @@ std::string InDetServMatGeometryManager::pixelDiskServiceRoute(int disk) const double InDetServMatGeometryManager::pixelEnvelopeRMax() const { - return db()->getDouble(m_PixelEnvelope,"RMAX") * CLHEP::mm; + return db()->getDouble(m_PixelEnvelope,"RMAX") * GeoModelKernelUnits::mm; } int InDetServMatGeometryManager::pixelBarrelModuleType( int layer) const @@ -351,13 +351,13 @@ int InDetServMatGeometryManager::sctNumLayers() const // layer radius double InDetServMatGeometryManager::sctLayerRadius(int layer) const { - return db()->getDouble(m_SctBrlLayer,"RADIUS",layer) * CLHEP::mm; + return db()->getDouble(m_SctBrlLayer,"RADIUS",layer) * GeoModelKernelUnits::mm; } // layer length double InDetServMatGeometryManager::sctLayerLength(int layer) const { - return db()->getDouble(m_SctBrlLayer,"CYLLENGTH",layer) * CLHEP::mm; + return db()->getDouble(m_SctBrlLayer,"CYLLENGTH",layer) * GeoModelKernelUnits::mm; } // layer type. Long(0) or Short (1) strips. NEEDS CHECKING @@ -395,17 +395,17 @@ int InDetServMatGeometryManager::sctNumDisks() const // disk Z position double InDetServMatGeometryManager::sctDiskZ(int disk) const { - return db()->getDouble(m_SctFwdWheel,"ZPOSITION",disk) * CLHEP::mm; + return db()->getDouble(m_SctFwdWheel,"ZPOSITION",disk) * GeoModelKernelUnits::mm; } // disk Z position double InDetServMatGeometryManager::sctDiskRMax(int disk) const { - return db()->getDouble(m_SctFwdDiscSupport,"OUTERRADIUS",disk) * CLHEP::mm; + return db()->getDouble(m_SctFwdDiscSupport,"OUTERRADIUS",disk) * GeoModelKernelUnits::mm; } double InDetServMatGeometryManager::sctInnerSupport() const { - return db()->getDouble(m_SctBrlServPerLayer,"SUPPORTCYLINNERRAD",0) * CLHEP::mm; + return db()->getDouble(m_SctBrlServPerLayer,"SUPPORTCYLINNERRAD",0) * GeoModelKernelUnits::mm; } diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryDC2.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryDC2.cxx index 56735f08168..ce929352dd2 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryDC2.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryDC2.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/PixelServMatFactoryDC2.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -74,8 +76,8 @@ void PixelServMatFactoryDC2::create(GeoPhysVol *mother) std::string matName = mat[(int) (*pbfi)[ii]->getFloat("MAT")]; const GeoMaterial* cylMat = materialManager->getMaterial(matName); - double rmin = (*pbfi)[ii]->getFloat("RIN")*CLHEP::cm; - double rmax = (*pbfi)[ii]->getFloat("ROUT")*CLHEP::cm; + double rmin = (*pbfi)[ii]->getFloat("RIN")*GeoModelKernelUnits::cm; + double rmax = (*pbfi)[ii]->getFloat("ROUT")*GeoModelKernelUnits::cm; double zmin = (*pbfi)[ii]->getFloat("ZIN"); double zmax = (*pbfi)[ii]->getFloat("ZOUT"); // elaborate it 'a la G3... @@ -84,9 +86,9 @@ void PixelServMatFactoryDC2::create(GeoPhysVol *mother) double rl = cylMat->getRadLength(); halflength = fabs(zmax) * rl /200. ; } else { - halflength = fabs(zmax-zmin)*CLHEP::cm; + halflength = fabs(zmax-zmin)*GeoModelKernelUnits::cm; } - double zpos = fabs(zmin*CLHEP::cm)+halflength+epsilon; + double zpos = fabs(zmin*GeoModelKernelUnits::cm)+halflength+epsilon; // Build the Phys Vol std::ostringstream o; o << ii; @@ -97,18 +99,18 @@ void PixelServMatFactoryDC2::create(GeoPhysVol *mother) if(rmin > 0.) // place two { - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - CLHEP::Hep3Vector servpos2(0.,0.,-zpos); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos2)); + GeoTrf::Translate3D servpos1(0.,0.,zpos); + GeoTrf::Translate3D servpos2(0.,0.,-zpos); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(servpos2); mother->add(xform1); mother->add(ServPhys); mother->add(xform2); mother->add(ServPhys); } else { // only one on the right side if(zmin < 0) zpos = -zpos; - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); + GeoTrf::Translate3D servpos1(0.,0.,zpos); + GeoTransform *xform1 = new GeoTransform(servpos1); mother->add(xform1); mother->add(ServPhys); } diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryDC3.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryDC3.cxx index e60ea28344b..84d66d298dc 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryDC3.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryDC3.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/PixelServMatFactoryDC3.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -72,14 +74,14 @@ void PixelServMatFactoryDC3::create(GeoPhysVol *mother) std::cout << "Test Material std::Copper density="<<testMat->getDensity() <<" Rad.length="<<testMat->getRadLength()<<" Int.length="<<testMat->getIntLength()<<'\n'; - GeoMaterial* TIN = new GeoMaterial("Sn", 7.31*CLHEP::gram/CLHEP::cm3); -// GeoElement *testMat = new GeoElement("Tin", "Sn", 50.0, 118.69*CLHEP::amu_c2); + GeoMaterial* TIN = new GeoMaterial("Sn", 7.31*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); +// GeoElement *testMat = new GeoElement("Tin", "Sn", 50.0, 118.69*GeoModelKernelUnits::amu_c2); const GeoElement *tin = materialManager->getElement("Tin"); TIN->add(const_cast<GeoElement *>(tin),1.); TIN->lock(); testMat=TIN; std::cout << "Test Material Tin density="<<testMat->getDensity() <<" Rad.length="<<testMat->getRadLength()<<" Int.length="<<testMat->getIntLength()<<'\n'; - std::cout << "Atomic mass unit="<<CLHEP::amu_c2<<'\n'; + std::cout << "Atomic mass unit="<<GeoModelKernelUnits::amu_c2<<'\n'; std::cout << "gram/cm3 ="<<gram/cm3<<'\n'; */ @@ -99,8 +101,8 @@ void PixelServMatFactoryDC3::create(GeoPhysVol *mother) // <<" Rad.length="<<cylMat->getRadLength()<<'\n'; - double rmin = (*pbfi)[jj]->getFloat("RIN")*CLHEP::cm; - double rmax = (*pbfi)[jj]->getFloat("ROUT")*CLHEP::cm; + double rmin = (*pbfi)[jj]->getFloat("RIN")*GeoModelKernelUnits::cm; + double rmax = (*pbfi)[jj]->getFloat("ROUT")*GeoModelKernelUnits::cm; double zmin = (*pbfi)[jj]->getFloat("ZIN"); double zmax = (*pbfi)[jj]->getFloat("ZOUT"); @@ -113,7 +115,7 @@ void PixelServMatFactoryDC3::create(GeoPhysVol *mother) double rl = cylMat->getRadLength(); halflength = fabs(zmax) * rl /200. ; } else { - halflength = fabs(zmax-zmin)*CLHEP::cm; + halflength = fabs(zmax-zmin)*GeoModelKernelUnits::cm; } //VK Temporary!!! To bring thickness to nominal values @@ -123,7 +125,7 @@ void PixelServMatFactoryDC3::create(GeoPhysVol *mother) // if( ii == 0 ) zmin += 0.7; // in cm! //std::cout << "New="<<halflength<<", "<<zmin<<", "<<ii<<'\n'; - double zpos = fabs(zmin*CLHEP::cm)+halflength+epsilon; + double zpos = fabs(zmin*GeoModelKernelUnits::cm)+halflength+epsilon; // Build the Phys Vol std::ostringstream o; o << ii; @@ -149,17 +151,17 @@ void PixelServMatFactoryDC3::create(GeoPhysVol *mother) GeoPhysVol* ServPhys = new GeoPhysVol(ServLog); if(zmin < 0) zpos = -zpos; - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - CLHEP::Hep3Vector servpos2(0.,0.,-zpos); + GeoTrf::Vector3D servpos1(0.,0.,zpos); + GeoTrf::Vector3D servpos2(0.,0.,-zpos); // if (ii==0 || ii==2 || ii==6 || ii==1){ for (int isec=0; isec<12 ; isec++){ - std::ostringstream o; + std::ostringstream o; o<<"_"; o << isec; std::string logNameTmp = logName+o.str(); //std::cout<<isec<<", "<<logNameTmp<<'\n'; - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,isec*M_PI/6.),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,isec*M_PI/6.),servpos2)); + GeoTransform *xform1 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,0.,isec*M_PI/6.),servpos1)); + GeoTransform *xform2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,0.,isec*M_PI/6.),servpos2)); xform2->ref();//artificial refcount increment mother->add(new GeoNameTag(logNameTmp)); mother->add(xform1);//xform1 is always used @@ -172,8 +174,8 @@ void PixelServMatFactoryDC3::create(GeoPhysVol *mother) xform2->unref(); //will delete it, if it was never used } }else{ - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos2)); + GeoTransform *xform1 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,0,0),servpos1)); + GeoTransform *xform2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,0,0),servpos2)); xform2->ref();//artificial refcount increment mother->add(xform1); mother->add(ServPhys); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx index 371e02aa48e..e872b357bf6 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/PixelServMatFactoryFS.cxx @@ -105,7 +105,7 @@ void PixelServMatFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) servicePcon->getDPhi()); GeoCons* cons = new GeoCons(servicePcon->getRMinPlane(2),servicePcon->getRMinPlane(3), - servicePcon->getRMaxPlane(2),servicePcon->getRMaxPlane(3)+1E-9*CLHEP::mm, + servicePcon->getRMaxPlane(2),servicePcon->getRMaxPlane(3)+1E-9*GeoModelKernelUnits::mm, (servicePcon->getZPlane(3)-servicePcon->getZPlane(2))*0.5, servicePcon->getSPhi(), servicePcon->getDPhi()); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactory.cxx index 5310b5f5edf..12d99004ab1 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactory.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactory.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/SCT_ServMatFactory.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -70,14 +72,14 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) //------------------------------------------ //VK 10/09/2005 Construct a gap for rails - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; - // double minRofGap = 1050.0*CLHEP::mm; - // double minRofGap = 1110.0*CLHEP::mm; - double minRofGap = 1089.0*CLHEP::mm; - double phiWid=(70.*CLHEP::mm)/outROfIDet; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; + // double minRofGap = 1050.0*GeoModelKernelUnits::mm; + // double minRofGap = 1110.0*GeoModelKernelUnits::mm; + double minRofGap = 1089.0*GeoModelKernelUnits::mm; + double phiWid=(70.*GeoModelKernelUnits::mm)/outROfIDet; // std::cout << "Gap phiWid = " << phiWid << std::endl; - double safetyGap=1.*CLHEP::mm; + double safetyGap=1.*GeoModelKernelUnits::mm; //created by Adam Agocs @@ -129,7 +131,7 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) double volumeCut = 0; const GeoShape* serviceTube = serviceTubeTmp; const GeoShape* serviceTube2 = serviceTubeTmp; //because of asymmetry - if( tubeHelper.volData().maxRadius() > minRofGap && tubeHelper.volData().phiStart()*CLHEP::radian < phiTop) { + if( tubeHelper.volData().maxRadius() > minRofGap && tubeHelper.volData().phiStart()*GeoModelKernelUnits::radian < phiTop) { // Subtract RailGap out of services if (NameOfService == "PPB1EFEG" || NameOfService == "CableTrayEFEG") { @@ -166,13 +168,13 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) const GeoLogVol* serv2Log = new GeoLogVol(logName,serviceTube2,material); GeoVPhysVol* serv2Phys = new GeoPhysVol(serv2Log); - HepGeom::TranslateZ3D trans(tubeHelper.volData().zMid()); - HepGeom::TranslateZ3D trans2(-tubeHelper.volData().zMid()); + GeoTrf::TranslateZ3D trans(tubeHelper.volData().zMid()); + GeoTrf::TranslateZ3D trans2(-tubeHelper.volData().zMid()); GeoTransform * xform1 = new GeoTransform(trans); GeoTransform * xform1Neg = new GeoTransform(trans2); - GeoTransform * xform2 = new GeoTransform(HepGeom::RotateZ3D(180*CLHEP::deg)*trans); - GeoTransform * xform2Neg = new GeoTransform(HepGeom::RotateZ3D(180*CLHEP::deg)*trans2); + GeoTransform * xform2 = new GeoTransform(GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)*trans); + GeoTransform * xform2Neg = new GeoTransform(GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)*trans2); // std::cerr << xform1 << std::endl << xform1Neg << std::endl << xform2 << std::endl << xform2Neg << std::endl; @@ -202,12 +204,12 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) for (unsigned int ii =0; ii < sctsup->size(); ii++) { - RMinW = (*sctsup)[ii]->getFloat("RMIN")*CLHEP::mm; - RMaxW = (*sctsup)[ii]->getFloat("RMAX")*CLHEP::mm; - ZHalfLengthW = (*sctsup)[ii]->getFloat("THICK")/2.*CLHEP::mm; - WidI = (*sctsup)[ii]->getFloat("WIDTHINNER")*CLHEP::mm; - WidO = (*sctsup)[ii]->getFloat("WIDTHOUTER")*CLHEP::mm; - ZStartW = (*sctsup)[ii]->getFloat("ZSTART")*CLHEP::mm; + RMinW = (*sctsup)[ii]->getFloat("RMIN")*GeoModelKernelUnits::mm; + RMaxW = (*sctsup)[ii]->getFloat("RMAX")*GeoModelKernelUnits::mm; + ZHalfLengthW = (*sctsup)[ii]->getFloat("THICK")/2.*GeoModelKernelUnits::mm; + WidI = (*sctsup)[ii]->getFloat("WIDTHINNER")*GeoModelKernelUnits::mm; + WidO = (*sctsup)[ii]->getFloat("WIDTHOUTER")*GeoModelKernelUnits::mm; + ZStartW = (*sctsup)[ii]->getFloat("ZSTART")*GeoModelKernelUnits::mm; NameOfMaterial = (*sctsup)[ii]->getString("MATERIAL"); DPhi = asin(WidI/2./RMinW); @@ -225,7 +227,7 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) // double DPhiDop = asin(WidI/2./(Shift-H1)); double DPhiDop = atan(WidI/2./(Shift-H1)); const GeoShape* pTub2 = new GeoTubs(0., RMaxDop, ZHalfLengthW, M_PI-DPhiDop, 2.*DPhiDop); - const GeoShape* pTub3 = (GeoShape*) & ((*pTub2) << HepGeom::TranslateX3D(Shift)); + const GeoShape* pTub3 = (GeoShape*) & ((*pTub2) << GeoTrf::TranslateX3D(Shift)); wing = (GeoShape*) & (*pTub1).intersect(*pTub3); // GeoModel calculates the volume incorrectly so we calculate it here. @@ -258,10 +260,10 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) const GeoLogVol* wingLog = new GeoLogVol(logName,wing,wingMat); GeoVPhysVol* wingPhys = new GeoPhysVol(wingLog); - GeoTransform* wPos1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), CLHEP::Hep3Vector(0.,0., ZStartW+ZHalfLengthW))); - GeoTransform* wPos2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(M_PI,0.,0.),CLHEP::Hep3Vector(0.,0., ZStartW+ZHalfLengthW))); - GeoTransform* wPos3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), CLHEP::Hep3Vector(0.,0.,-ZStartW-ZHalfLengthW))); - GeoTransform* wPos4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(M_PI,0.,0.),CLHEP::Hep3Vector(0.,0.,-ZStartW-ZHalfLengthW))); + GeoTransform* wPos1 = new GeoTransform(GeoTrf::Translate3D(0.,0., ZStartW+ZHalfLengthW)); + GeoTransform* wPos2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(M_PI,0,0),GeoTrf::Vector3D(0.,0., ZStartW+ZHalfLengthW))); + GeoTransform* wPos3 = new GeoTransform(GeoTrf::Translate3D(0.,0.,-ZStartW-ZHalfLengthW)); + GeoTransform* wPos4 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(M_PI,0,0),GeoTrf::Vector3D(0.,0.,-ZStartW-ZHalfLengthW))); mother->add(wPos1); mother->add(wingPhys); mother->add(wPos2); @@ -291,14 +293,14 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) //------------------------------------------ //VK 10/09/2005 Construct a gap for rails - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; - // double minRofGap = 1050.0*CLHEP::mm; - // double minRofGap = 1110.0*CLHEP::mm; - double minRofGap = 1089.0*CLHEP::mm; - double phiWid=(70.*CLHEP::mm)/outROfIDet; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; + // double minRofGap = 1050.0*GeoModelKernelUnits::mm; + // double minRofGap = 1110.0*GeoModelKernelUnits::mm; + double minRofGap = 1089.0*GeoModelKernelUnits::mm; + double phiWid=(70.*GeoModelKernelUnits::mm)/outROfIDet; // std::cout << "Gap phiWid = " << phiWid << std::endl; - double safetyGap=1.*CLHEP::mm; + double safetyGap=1.*GeoModelKernelUnits::mm; const GeoShape* railGap1=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , -phiWid/2.,phiWid); const GeoShape* railGap2=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , @@ -365,12 +367,12 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) for (unsigned int ii =0; ii < sctsup->size(); ii++) { - RMinW = (*sctsup)[ii]->getFloat("RMIN")*CLHEP::mm; - RMaxW = (*sctsup)[ii]->getFloat("RMAX")*CLHEP::mm; - ZHalfLengthW = (*sctsup)[ii]->getFloat("THICK")/2.*CLHEP::mm; - WidI = (*sctsup)[ii]->getFloat("WIDTHINNER")*CLHEP::mm; - WidO = (*sctsup)[ii]->getFloat("WIDTHOUTER")*CLHEP::mm; - ZStartW = (*sctsup)[ii]->getFloat("ZSTART")*CLHEP::mm; + RMinW = (*sctsup)[ii]->getFloat("RMIN")*GeoModelKernelUnits::mm; + RMaxW = (*sctsup)[ii]->getFloat("RMAX")*GeoModelKernelUnits::mm; + ZHalfLengthW = (*sctsup)[ii]->getFloat("THICK")/2.*GeoModelKernelUnits::mm; + WidI = (*sctsup)[ii]->getFloat("WIDTHINNER")*GeoModelKernelUnits::mm; + WidO = (*sctsup)[ii]->getFloat("WIDTHOUTER")*GeoModelKernelUnits::mm; + ZStartW = (*sctsup)[ii]->getFloat("ZSTART")*GeoModelKernelUnits::mm; DPhi = asin(WidI/2./RMinW); const GeoShape* pTub1 = new GeoTubs(RMinW, RMaxW, ZHalfLengthW, 0.-DPhi, 2.*DPhi); //Basic shape @@ -385,7 +387,7 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) // double DPhiDop = asin(WidI/2./(Shift-H1)); double DPhiDop = atan(WidI/2./(Shift-H1)); const GeoShape* pTub2 = new GeoTubs(0., RMaxDop, ZHalfLengthW, M_PI-DPhiDop, 2.*DPhiDop); - const GeoShape* pTub3 = (GeoShape*) & ((*pTub2) << HepGeom::TranslateX3D(Shift)); + const GeoShape* pTub3 = (GeoShape*) & ((*pTub2) << GeoTrf::TranslateX3D(Shift)); wing = (GeoShape*) & (*pTub1).intersect(*pTub3); // GeoModel calculates the volume incorrectly so we calculate it here. @@ -418,10 +420,10 @@ void SCT_ServMatFactory::create(GeoPhysVol *mother) const GeoLogVol* wingLog = new GeoLogVol(logName,wing,wingMat); GeoVPhysVol* wingPhys = new GeoPhysVol(wingLog); - GeoTransform* wPos1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), CLHEP::Hep3Vector(0.,0., ZStartW+ZHalfLengthW))); - GeoTransform* wPos2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(M_PI,0.,0.),CLHEP::Hep3Vector(0.,0., ZStartW+ZHalfLengthW))); - GeoTransform* wPos3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), CLHEP::Hep3Vector(0.,0.,-ZStartW-ZHalfLengthW))); - GeoTransform* wPos4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(M_PI,0.,0.),CLHEP::Hep3Vector(0.,0.,-ZStartW-ZHalfLengthW))); + GeoTransform* wPos1 = new GeoTransform(GeoTrf::Translate3D(0.,0., ZStartW+ZHalfLengthW)); + GeoTransform* wPos2 = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translation3D(0.,0., ZStartW+ZHalfLengthW)*GeoTrf::RotateX3D(M_PI))); + GeoTransform* wPos3 = new GeoTransform(GeoTrf::Translate3D(0.,0.,-ZStartW-ZHalfLengthW)); + GeoTransform* wPos4 = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translation3D(0.,0.,-ZStartW-ZHalfLengthW)*GeoTrf::RotateX3D(M_PI))); mother->add(wPos1); mother->add(wingPhys); mother->add(wPos2); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryDC2.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryDC2.cxx index 4626e5092bd..32ed55a0bbb 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryDC2.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryDC2.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/SCT_ServMatFactoryDC2.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -76,20 +78,20 @@ void SCT_ServMatFactoryDC2::create(GeoPhysVol *mother) // Build SCT services in Endcap. // (Code taken from TRT_GeoModel) - double innerRadiusOfSCTSupport = (*tsci)[0]->getDouble("RMIN")*CLHEP::cm + 2*epsilon; - double outerRadiusOfSCTSupport = (*tsci)[0]->getDouble("RMAX")*CLHEP::cm; - double lengthOfSCTSupport = ((*tsci)[0]->getDouble("ZMAX")-(*tsci)[0]->getDouble("ZMIN"))*CLHEP::cm - epsilon; - double positionOfSCTSupport= 0.5 * ((*tsci)[0]->getDouble("ZMAX")+(*tsci)[0]->getDouble("ZMIN"))*CLHEP::cm; + double innerRadiusOfSCTSupport = (*tsci)[0]->getDouble("RMIN")*GeoModelKernelUnits::cm + 2*epsilon; + double outerRadiusOfSCTSupport = (*tsci)[0]->getDouble("RMAX")*GeoModelKernelUnits::cm; + double lengthOfSCTSupport = ((*tsci)[0]->getDouble("ZMAX")-(*tsci)[0]->getDouble("ZMIN"))*GeoModelKernelUnits::cm - epsilon; + double positionOfSCTSupport= 0.5 * ((*tsci)[0]->getDouble("ZMAX")+(*tsci)[0]->getDouble("ZMIN"))*GeoModelKernelUnits::cm; - double innerRadiusOfSCTCables = (*tsci)[1]->getDouble("RMIN")*CLHEP::cm + 2*epsilon; - double outerRadiusOfSCTCables = (*tsci)[1]->getDouble("RMAX")*CLHEP::cm; - double lengthOfSCTCables = ((*tsci)[1]->getDouble("ZMAX")-(*tsci)[1]->getDouble("ZMIN"))*CLHEP::cm - epsilon; - double positionOfSCTCables = 0.5 * ((*tsci)[1]->getDouble("ZMAX")+(*tsci)[1]->getDouble("ZMIN"))*CLHEP::cm; + double innerRadiusOfSCTCables = (*tsci)[1]->getDouble("RMIN")*GeoModelKernelUnits::cm + 2*epsilon; + double outerRadiusOfSCTCables = (*tsci)[1]->getDouble("RMAX")*GeoModelKernelUnits::cm; + double lengthOfSCTCables = ((*tsci)[1]->getDouble("ZMAX")-(*tsci)[1]->getDouble("ZMIN"))*GeoModelKernelUnits::cm - epsilon; + double positionOfSCTCables = 0.5 * ((*tsci)[1]->getDouble("ZMAX")+(*tsci)[1]->getDouble("ZMIN"))*GeoModelKernelUnits::cm; - double innerRadiusOfSCTCooling = (*tsci)[2]->getDouble("RMIN")*CLHEP::cm + 2*epsilon; - double outerRadiusOfSCTCooling = (*tsci)[2]->getDouble("RMAX")*CLHEP::cm; - double lengthOfSCTCooling = ((*tsci)[2]->getDouble("ZMAX")-(*tsci)[2]->getDouble("ZMIN"))*CLHEP::cm - epsilon; - double positionOfSCTCooling = 0.5 * ((*tsci)[2]->getDouble("ZMAX")+(*tsci)[2]->getDouble("ZMIN"))*CLHEP::cm; + double innerRadiusOfSCTCooling = (*tsci)[2]->getDouble("RMIN")*GeoModelKernelUnits::cm + 2*epsilon; + double outerRadiusOfSCTCooling = (*tsci)[2]->getDouble("RMAX")*GeoModelKernelUnits::cm; + double lengthOfSCTCooling = ((*tsci)[2]->getDouble("ZMAX")-(*tsci)[2]->getDouble("ZMIN"))*GeoModelKernelUnits::cm - epsilon; + double positionOfSCTCooling = 0.5 * ((*tsci)[2]->getDouble("ZMAX")+(*tsci)[2]->getDouble("ZMIN"))*GeoModelKernelUnits::cm; // For new LMT we get name from SCT table ZSCG. @@ -104,15 +106,15 @@ void SCT_ServMatFactoryDC2::create(GeoPhysVol *mother) // We define it here for now as a quick fix. // Thickness of CuK 896 tapes smeared in phi = 0.08575cm - double tapeCrossSection = (*zscg)[0]->getDouble("ALAREA")*CLHEP::cm2; + double tapeCrossSection = (*zscg)[0]->getDouble("ALAREA")*GeoModelKernelUnits::cm2; double rave = 2*innerRadiusOfSCTCables*outerRadiusOfSCTCables/(innerRadiusOfSCTCables+outerRadiusOfSCTCables); - double thickness = 988*tapeCrossSection/(2*CLHEP::pi*rave); + double thickness = 988*tapeCrossSection/(2*GeoModelKernelUnits::pi*rave); // We need to scale the density to fit in with space given. - //std::cout << "LMT thickness (CLHEP::mm) = " << thickness/CLHEP::mm << std::endl; + //std::cout << "LMT thickness (GeoModelKernelUnits::mm) = " << thickness/GeoModelKernelUnits::mm << std::endl; double densityfactor = thickness/lengthOfSCTCables; const GeoElement *copper = m_materialManager->getElement("Copper"); const GeoMaterial *kapton = m_materialManager->getMaterial("std::Kapton"); - GeoMaterial * matCuKapton = new GeoMaterial("CuKaptoninTRT",densityfactor * 2.94*CLHEP::gram/CLHEP::cm3); + GeoMaterial * matCuKapton = new GeoMaterial("CuKaptoninTRT",densityfactor * 2.94*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matCuKapton->add(const_cast<GeoElement*>(copper), 0.6142); matCuKapton->add(const_cast<GeoMaterial*>(kapton), 0.3858); matCuKapton->lock(); @@ -125,8 +127,8 @@ void SCT_ServMatFactoryDC2::create(GeoPhysVol *mother) GeoTube *sSCTSupport = new GeoTube( innerRadiusOfSCTSupport, outerRadiusOfSCTSupport, 0.5*lengthOfSCTSupport); GeoLogVol *lSCTSupport = new GeoLogVol("SCTSupport", sSCTSupport, sctCablesMaterial); GeoPhysVol *pSCTSupport = new GeoPhysVol(lSCTSupport); - GeoTransform *xSCTSupportPlus = new GeoTransform(HepGeom::TranslateZ3D(+positionOfSCTSupport)); - GeoTransform *xSCTSupportMinus = new GeoTransform(HepGeom::TranslateZ3D(-positionOfSCTSupport)); + GeoTransform *xSCTSupportPlus = new GeoTransform(GeoTrf::TranslateZ3D(+positionOfSCTSupport)); + GeoTransform *xSCTSupportMinus = new GeoTransform(GeoTrf::TranslateZ3D(-positionOfSCTSupport)); mother->add(xSCTSupportPlus); mother->add(pSCTSupport); mother->add(xSCTSupportMinus); @@ -136,8 +138,8 @@ void SCT_ServMatFactoryDC2::create(GeoPhysVol *mother) GeoTube *sSCTCables = new GeoTube(innerRadiusOfSCTCables, outerRadiusOfSCTCables, 0.5*lengthOfSCTCables); GeoLogVol *lSCTCables = new GeoLogVol("SCTCables", sSCTCables, m_materialManager->getMaterial("trt::SCTCables")); GeoPhysVol *pSCTCables = new GeoPhysVol(lSCTCables); - GeoTransform *xSCTCablesPlus = new GeoTransform(HepGeom::TranslateZ3D(+positionOfSCTCables )); - GeoTransform *xSCTCablesMinus = new GeoTransform(HepGeom::TranslateZ3D(-positionOfSCTCables )); + GeoTransform *xSCTCablesPlus = new GeoTransform(GeoTrf::TranslateZ3D(+positionOfSCTCables )); + GeoTransform *xSCTCablesMinus = new GeoTransform(GeoTrf::TranslateZ3D(-positionOfSCTCables )); mother->add(xSCTCablesPlus); mother->add(pSCTCables); @@ -149,8 +151,8 @@ void SCT_ServMatFactoryDC2::create(GeoPhysVol *mother) GeoTube *sSCTCooling = new GeoTube( innerRadiusOfSCTCooling, outerRadiusOfSCTCooling, 0.5*lengthOfSCTCooling); GeoLogVol *lSCTCooling = new GeoLogVol("SCTCooling", sSCTCooling, m_materialManager->getMaterial("trt::SCTCooling")); GeoPhysVol *pSCTCooling = new GeoPhysVol(lSCTCooling); - GeoTransform *xSCTCoolingPlus = new GeoTransform(HepGeom::TranslateZ3D(+positionOfSCTCooling )); - GeoTransform *xSCTCoolingMinus = new GeoTransform(HepGeom::TranslateZ3D(-positionOfSCTCooling )); + GeoTransform *xSCTCoolingPlus = new GeoTransform(GeoTrf::TranslateZ3D(+positionOfSCTCooling )); + GeoTransform *xSCTCoolingMinus = new GeoTransform(GeoTrf::TranslateZ3D(-positionOfSCTCooling )); mother->add(xSCTCoolingPlus); mother->add(pSCTCooling); mother->add(xSCTCoolingMinus); @@ -165,15 +167,15 @@ void SCT_ServMatFactoryDC2::create(GeoPhysVol *mother) std::ostringstream o; o << jj; std::string logName = "SctInel"+o.str(); - double halflength = ((*inel)[ii]->getFloat("ZMAX")-(*inel)[ii]->getFloat("ZMIN"))/2.*CLHEP::cm; + double halflength = ((*inel)[ii]->getFloat("ZMAX")-(*inel)[ii]->getFloat("ZMIN"))/2.*GeoModelKernelUnits::cm; int volType = (int) (*inel)[ii]->getFloat("VOLTYP"); const GeoShape* serviceTube = createShape(volType, - (*inel)[ii]->getFloat("RMIN1")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX1")*CLHEP::cm, + (*inel)[ii]->getFloat("RMIN1")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX1")*GeoModelKernelUnits::cm, halflength, - (*inel)[ii]->getFloat("RMIN2")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX2")*CLHEP::cm); + (*inel)[ii]->getFloat("RMIN2")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX2")*GeoModelKernelUnits::cm); // create the material... @@ -192,21 +194,21 @@ void SCT_ServMatFactoryDC2::create(GeoPhysVol *mother) cylMat = createMaterial(nameStr.str(), volType, fractionRL, - (*inel)[ii]->getFloat("RMIN1")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX1")*CLHEP::cm, + (*inel)[ii]->getFloat("RMIN1")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX1")*GeoModelKernelUnits::cm, halflength, - (*inel)[ii]->getFloat("RMIN2")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX2")*CLHEP::cm); + (*inel)[ii]->getFloat("RMIN2")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX2")*GeoModelKernelUnits::cm); } const GeoLogVol* ServLog = new GeoLogVol(logName,serviceTube,cylMat); GeoVPhysVol* ServPhys = new GeoPhysVol(ServLog); - double zpos = ((*inel)[ii]->getFloat("ZMAX")+(*inel)[ii]->getFloat("ZMIN"))/2.*CLHEP::cm+epsilon; + double zpos = ((*inel)[ii]->getFloat("ZMAX")+(*inel)[ii]->getFloat("ZMIN"))/2.*GeoModelKernelUnits::cm+epsilon; // place two - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - CLHEP::Hep3Vector servpos2(0.,0.,-zpos); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos2)); + GeoTrf::Translate3D servpos1(0.,0.,zpos); + GeoTrf::Translate3D servpos2(0.,0.,-zpos); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(servpos2); mother->add(xform1); mother->add(ServPhys); mother->add(xform2); @@ -225,7 +227,7 @@ const GeoShape* SCT_ServMatFactoryDC2::createShape(int volType, double rmax2=0.) { - const double epsilon = 0.001*CLHEP::mm; + const double epsilon = 0.001*GeoModelKernelUnits::mm; enum VOLTYPE{Tube=1, Cone, ICone}; const GeoShape* IDShape = 0; if(volType == Tube) { diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryDC3.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryDC3.cxx index 9003a271c90..2f2ff0f25c4 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryDC3.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryDC3.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/SCT_ServMatFactoryDC3.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -64,10 +66,10 @@ void SCT_ServMatFactoryDC3::create(GeoPhysVol *mother) //const IRDBRecordset* sctFwdServices = rdbAccessSvc()->getRecordset("SctFwdServices", sctVersionKey.tag(), sctVersionKey.node()); //VVK 10/09/2005 Construct a gap for rails - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; - double minRofGap = 1050.0*CLHEP::mm; - double phiWid=(70.*CLHEP::mm)/outROfIDet; double safetyGap=1.*CLHEP::mm; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; + double minRofGap = 1050.0*GeoModelKernelUnits::mm; + double phiWid=(70.*GeoModelKernelUnits::mm)/outROfIDet; double safetyGap=1.*GeoModelKernelUnits::mm; const GeoShape* railGap1=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , -phiWid/2.,phiWid); const GeoShape* railGap2=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , @@ -80,25 +82,25 @@ void SCT_ServMatFactoryDC3::create(GeoPhysVol *mother) // (Code taken from TRT_GeoModel) // Hardwire min sct services for now. The database structures should be moved out of TRT anyway. - double rminSCTServ = 620*CLHEP::mm; + double rminSCTServ = 620*GeoModelKernelUnits::mm; - //double innerRadiusOfSCTSupport = (*tsci)[0]->getDouble("RMIN")*CLHEP::cm + 2*epsilon; + //double innerRadiusOfSCTSupport = (*tsci)[0]->getDouble("RMIN")*GeoModelKernelUnits::cm + 2*epsilon; double innerRadiusOfSCTSupport = rminSCTServ + 2*epsilon; - double outerRadiusOfSCTSupport = (*tsci)[0]->getDouble("RMAX")*CLHEP::cm; - double lengthOfSCTSupport = ((*tsci)[0]->getDouble("ZMAX")-(*tsci)[0]->getDouble("ZMIN"))*CLHEP::cm - epsilon; - double positionOfSCTSupport= 0.5 * ((*tsci)[0]->getDouble("ZMAX")+(*tsci)[0]->getDouble("ZMIN"))*CLHEP::cm; + double outerRadiusOfSCTSupport = (*tsci)[0]->getDouble("RMAX")*GeoModelKernelUnits::cm; + double lengthOfSCTSupport = ((*tsci)[0]->getDouble("ZMAX")-(*tsci)[0]->getDouble("ZMIN"))*GeoModelKernelUnits::cm - epsilon; + double positionOfSCTSupport= 0.5 * ((*tsci)[0]->getDouble("ZMAX")+(*tsci)[0]->getDouble("ZMIN"))*GeoModelKernelUnits::cm; - //double innerRadiusOfSCTCables = (*tsci)[1]->getDouble("RMIN")*CLHEP::cm + 2*epsilon; + //double innerRadiusOfSCTCables = (*tsci)[1]->getDouble("RMIN")*GeoModelKernelUnits::cm + 2*epsilon; double innerRadiusOfSCTCables = rminSCTServ + 2*epsilon; - double outerRadiusOfSCTCables = (*tsci)[1]->getDouble("RMAX")*CLHEP::cm; - double lengthOfSCTCables = ((*tsci)[1]->getDouble("ZMAX")-(*tsci)[1]->getDouble("ZMIN"))*CLHEP::cm - epsilon; - double positionOfSCTCables = 0.5 * ((*tsci)[1]->getDouble("ZMAX")+(*tsci)[1]->getDouble("ZMIN"))*CLHEP::cm; + double outerRadiusOfSCTCables = (*tsci)[1]->getDouble("RMAX")*GeoModelKernelUnits::cm; + double lengthOfSCTCables = ((*tsci)[1]->getDouble("ZMAX")-(*tsci)[1]->getDouble("ZMIN"))*GeoModelKernelUnits::cm - epsilon; + double positionOfSCTCables = 0.5 * ((*tsci)[1]->getDouble("ZMAX")+(*tsci)[1]->getDouble("ZMIN"))*GeoModelKernelUnits::cm; - //double innerRadiusOfSCTCooling = (*tsci)[2]->getDouble("RMIN")*CLHEP::cm + 2*epsilon; + //double innerRadiusOfSCTCooling = (*tsci)[2]->getDouble("RMIN")*GeoModelKernelUnits::cm + 2*epsilon; double innerRadiusOfSCTCooling = rminSCTServ + 2*epsilon; - double outerRadiusOfSCTCooling = (*tsci)[2]->getDouble("RMAX")*CLHEP::cm; - double lengthOfSCTCooling = ((*tsci)[2]->getDouble("ZMAX")-(*tsci)[2]->getDouble("ZMIN"))*CLHEP::cm - epsilon; - double positionOfSCTCooling = 0.5 * ((*tsci)[2]->getDouble("ZMAX")+(*tsci)[2]->getDouble("ZMIN"))*CLHEP::cm; + double outerRadiusOfSCTCooling = (*tsci)[2]->getDouble("RMAX")*GeoModelKernelUnits::cm; + double lengthOfSCTCooling = ((*tsci)[2]->getDouble("ZMAX")-(*tsci)[2]->getDouble("ZMIN"))*GeoModelKernelUnits::cm - epsilon; + double positionOfSCTCooling = 0.5 * ((*tsci)[2]->getDouble("ZMAX")+(*tsci)[2]->getDouble("ZMIN"))*GeoModelKernelUnits::cm; // For new LMT we get name from SCT table SctFwdServices. @@ -113,15 +115,15 @@ void SCT_ServMatFactoryDC3::create(GeoPhysVol *mother) // We define it here for now as a quick fix. // Thickness of CuK 896 tapes smeared in phi = 0.08575cm - double tapeCrossSection = (*sctFwdServices)[0]->getDouble("POWERTAPECROSSSECT")*CLHEP::mm2; + double tapeCrossSection = (*sctFwdServices)[0]->getDouble("POWERTAPECROSSSECT")*GeoModelKernelUnits::mm2; double rave = 2*innerRadiusOfSCTCables*outerRadiusOfSCTCables/(innerRadiusOfSCTCables+outerRadiusOfSCTCables); - double thickness = 988*tapeCrossSection/(2*CLHEP::pi*rave); + double thickness = 988*tapeCrossSection/(2*GeoModelKernelUnits::pi*rave); // We need to scale the density to fit in with space given. - //std::cout << "LMT thickness (mm) = " << thickness/CLHEP::mm << std::endl; + //std::cout << "LMT thickness (mm) = " << thickness/GeoModelKernelUnits::mm << std::endl; double densityfactor = thickness/lengthOfSCTCables; const GeoElement *copper = m_materialManager->getElement("Copper"); const GeoMaterial *kapton = m_materialManager->getMaterial("std::Kapton"); - GeoMaterial * matCuKapton = new GeoMaterial("CuKaptoninTRT",densityfactor * 2.94*CLHEP::gram/CLHEP::cm3); + GeoMaterial * matCuKapton = new GeoMaterial("CuKaptoninTRT",densityfactor * 2.94*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matCuKapton->add(const_cast<GeoElement*>(copper), 0.6142); matCuKapton->add(const_cast<GeoMaterial*>(kapton), 0.3858); matCuKapton->lock(); @@ -138,8 +140,8 @@ void SCT_ServMatFactoryDC3::create(GeoPhysVol *mother) GeoTube *sSCTSupport = new GeoTube( innerRadiusOfSCTSupport, outerRadiusOfSCTSupport, 0.5*lengthOfSCTSupport); GeoLogVol *lSCTSupport = new GeoLogVol("SCTSupport", sSCTSupport, sctCablesMaterial); GeoPhysVol *pSCTSupport = new GeoPhysVol(lSCTSupport); - GeoTransform *xSCTSupportPlus = new GeoTransform(HepGeom::TranslateZ3D(+positionOfSCTSupport)); - GeoTransform *xSCTSupportMinus = new GeoTransform(HepGeom::TranslateZ3D(-positionOfSCTSupport)); + GeoTransform *xSCTSupportPlus = new GeoTransform(GeoTrf::TranslateZ3D(+positionOfSCTSupport)); + GeoTransform *xSCTSupportMinus = new GeoTransform(GeoTrf::TranslateZ3D(-positionOfSCTSupport)); mother->add(xSCTSupportPlus); mother->add(pSCTSupport); mother->add(xSCTSupportMinus); @@ -149,8 +151,8 @@ void SCT_ServMatFactoryDC3::create(GeoPhysVol *mother) GeoTube *sSCTCables = new GeoTube(innerRadiusOfSCTCables, outerRadiusOfSCTCables, 0.5*lengthOfSCTCables); GeoLogVol *lSCTCables = new GeoLogVol("SCTCables", sSCTCables, materialManager()->getMaterial("trt::SCTCables")); GeoPhysVol *pSCTCables = new GeoPhysVol(lSCTCables); - GeoTransform *xSCTCablesPlus = new GeoTransform(HepGeom::TranslateZ3D(+positionOfSCTCables )); - GeoTransform *xSCTCablesMinus = new GeoTransform(HepGeom::TranslateZ3D(-positionOfSCTCables )); + GeoTransform *xSCTCablesPlus = new GeoTransform(GeoTrf::TranslateZ3D(+positionOfSCTCables )); + GeoTransform *xSCTCablesMinus = new GeoTransform(GeoTrf::TranslateZ3D(-positionOfSCTCables )); mother->add(xSCTCablesPlus); mother->add(pSCTCables); @@ -162,8 +164,8 @@ void SCT_ServMatFactoryDC3::create(GeoPhysVol *mother) GeoTube *sSCTCooling = new GeoTube( innerRadiusOfSCTCooling, outerRadiusOfSCTCooling, 0.5*lengthOfSCTCooling); GeoLogVol *lSCTCooling = new GeoLogVol("SCTCooling", sSCTCooling, materialManager()->getMaterial("trt::SCTCooling")); GeoPhysVol *pSCTCooling = new GeoPhysVol(lSCTCooling); - GeoTransform *xSCTCoolingPlus = new GeoTransform(HepGeom::TranslateZ3D(+positionOfSCTCooling )); - GeoTransform *xSCTCoolingMinus = new GeoTransform(HepGeom::TranslateZ3D(-positionOfSCTCooling )); + GeoTransform *xSCTCoolingPlus = new GeoTransform(GeoTrf::TranslateZ3D(+positionOfSCTCooling )); + GeoTransform *xSCTCoolingMinus = new GeoTransform(GeoTrf::TranslateZ3D(-positionOfSCTCooling )); mother->add(xSCTCoolingPlus); mother->add(pSCTCooling); mother->add(xSCTCoolingMinus); @@ -183,19 +185,19 @@ void SCT_ServMatFactoryDC3::create(GeoPhysVol *mother) std::ostringstream o; o << irecold++; std::string logName = "SctInel"+o.str(); - double halflength = ((*inel)[ii]->getFloat("ZMAX")-(*inel)[ii]->getFloat("ZMIN"))/2.*CLHEP::cm; + double halflength = ((*inel)[ii]->getFloat("ZMAX")-(*inel)[ii]->getFloat("ZMIN"))/2.*GeoModelKernelUnits::cm; int volType = (int) (*inel)[ii]->getFloat("VOLTYP"); const GeoShape* serviceTubeTmp1 = createShape(volType, - (*inel)[ii]->getFloat("RMIN1")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX1")*CLHEP::cm, + (*inel)[ii]->getFloat("RMIN1")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX1")*GeoModelKernelUnits::cm, halflength, - (*inel)[ii]->getFloat("RMIN2")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX2")*CLHEP::cm); + (*inel)[ii]->getFloat("RMIN2")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX2")*GeoModelKernelUnits::cm); const GeoShape* serviceTube = serviceTubeTmp1; - if( (*inel)[ii]->getFloat("RMAX1")*CLHEP::cm > minRofGap || - (*inel)[ii]->getFloat("RMAX2")*CLHEP::cm > minRofGap ) { + if( (*inel)[ii]->getFloat("RMAX1")*GeoModelKernelUnits::cm > minRofGap || + (*inel)[ii]->getFloat("RMAX2")*GeoModelKernelUnits::cm > minRofGap ) { // //VVK Subtract RailGap out of services const GeoShape* serviceTubeTmp2 = (GeoShape*) & (*serviceTubeTmp1).subtract(*railGap1); @@ -221,21 +223,21 @@ void SCT_ServMatFactoryDC3::create(GeoPhysVol *mother) cylMat = createMaterial(nameStr.str(), volType, fractionRL, - (*inel)[ii]->getFloat("RMIN1")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX1")*CLHEP::cm, + (*inel)[ii]->getFloat("RMIN1")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX1")*GeoModelKernelUnits::cm, halflength, - (*inel)[ii]->getFloat("RMIN2")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX2")*CLHEP::cm); + (*inel)[ii]->getFloat("RMIN2")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX2")*GeoModelKernelUnits::cm); } const GeoLogVol* ServLog = new GeoLogVol(logName,serviceTube,cylMat); GeoVPhysVol* ServPhys = new GeoPhysVol(ServLog); - double zpos = ((*inel)[ii]->getFloat("ZMAX")+(*inel)[ii]->getFloat("ZMIN"))/2.*CLHEP::cm+epsilon; + double zpos = ((*inel)[ii]->getFloat("ZMAX")+(*inel)[ii]->getFloat("ZMIN"))/2.*GeoModelKernelUnits::cm+epsilon; // place two - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - CLHEP::Hep3Vector servpos2(0.,0.,-zpos); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos2)); + GeoTrf::Translate3D servpos1(0.,0.,zpos); + GeoTrf::Translate3D servpos2(0.,0.,-zpos); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(servpos2); mother->add(xform1); mother->add(ServPhys); mother->add(xform2); @@ -255,7 +257,7 @@ const GeoShape* SCT_ServMatFactoryDC3::createShape(int volType, double rmax2=0.) { - const double epsilon = 0.001*CLHEP::mm; + const double epsilon = 0.001*GeoModelKernelUnits::mm; enum VOLTYPE{Tube=1, Cone, ICone}; const GeoShape* IDShape = 0; if(volType == Tube) { diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx index a63fe0fc192..a519849def8 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SCT_ServMatFactoryFS.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/SCT_ServMatFactoryFS.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTubs.h" @@ -72,11 +74,11 @@ void SCT_ServMatFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM) //------------------------------------------ //VK 10/09/2005 Construct a gap for rails - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; - double minRofGap = 1089.0*CLHEP::mm; - double phiWid=(70.*CLHEP::mm)/outROfIDet; - double safetyGap=1.*CLHEP::mm; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; + double minRofGap = 1089.0*GeoModelKernelUnits::mm; + double phiWid=(70.*GeoModelKernelUnits::mm)/outROfIDet; + double safetyGap=1.*GeoModelKernelUnits::mm; const GeoShape* railGap1=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , -phiWid/2.,phiWid); const GeoShape* railGap2=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , @@ -157,7 +159,7 @@ void SCT_ServMatFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM) // Shape 2. Cons component of the pcon cons = new GeoCons(servicePcon->getRMinPlane(1),servicePcon->getRMinPlane(2), - servicePcon->getRMaxPlane(1),servicePcon->getRMaxPlane(2)+1E-9*CLHEP::mm, + servicePcon->getRMaxPlane(1),servicePcon->getRMaxPlane(2)+1E-9*GeoModelKernelUnits::mm, (servicePcon->getZPlane(2)-servicePcon->getZPlane(1))*0.5, 0,2*M_PI); @@ -216,12 +218,12 @@ void SCT_ServMatFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM) for (unsigned int ii =0; ii < sctsup->size(); ii++) { - RMinW = (*sctsup)[ii]->getFloat("RMIN")*CLHEP::mm; - RMaxW = (*sctsup)[ii]->getFloat("RMAX")*CLHEP::mm; - ZHalfLengthW = (*sctsup)[ii]->getFloat("THICK")/2.*CLHEP::mm; - WidI = (*sctsup)[ii]->getFloat("WIDTHINNER")*CLHEP::mm; - WidO = (*sctsup)[ii]->getFloat("WIDTHOUTER")*CLHEP::mm; - ZStartW = (*sctsup)[ii]->getFloat("ZSTART")*CLHEP::mm; + RMinW = (*sctsup)[ii]->getFloat("RMIN")*GeoModelKernelUnits::mm; + RMaxW = (*sctsup)[ii]->getFloat("RMAX")*GeoModelKernelUnits::mm; + ZHalfLengthW = (*sctsup)[ii]->getFloat("THICK")/2.*GeoModelKernelUnits::mm; + WidI = (*sctsup)[ii]->getFloat("WIDTHINNER")*GeoModelKernelUnits::mm; + WidO = (*sctsup)[ii]->getFloat("WIDTHOUTER")*GeoModelKernelUnits::mm; + ZStartW = (*sctsup)[ii]->getFloat("ZSTART")*GeoModelKernelUnits::mm; DPhi = asin(WidI/2./RMinW); const GeoShape* pTub1 = new GeoTubs(RMinW, RMaxW, ZHalfLengthW, 0.-DPhi, 2.*DPhi); //Basic shape @@ -236,7 +238,7 @@ void SCT_ServMatFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM) // double DPhiDop = asin(WidI/2./(Shift-H1)); double DPhiDop = atan(WidI/2./(Shift-H1)); const GeoShape* pTub2 = new GeoTubs(0., RMaxDop, ZHalfLengthW, M_PI-DPhiDop, 2.*DPhiDop); - const GeoShape* pTub3 = (GeoShape*) & ((*pTub2) << HepGeom::TranslateX3D(Shift)); + const GeoShape* pTub3 = (GeoShape*) & ((*pTub2) << GeoTrf::TranslateX3D(Shift)); wing = (GeoShape*) & (*pTub1).intersect(*pTub3); // GeoModel calculates the volume incorrectly so we calculate it here. @@ -269,10 +271,10 @@ void SCT_ServMatFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM) const GeoLogVol* wingLog = new GeoLogVol(logName,wing,wingMat); GeoVPhysVol* wingPhys = new GeoPhysVol(wingLog); - GeoTransform* wPos1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), CLHEP::Hep3Vector(0.,0., ZStartW+ZHalfLengthW))); - GeoTransform* wPos2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(M_PI,0.,0.),CLHEP::Hep3Vector(0.,0., ZStartW+ZHalfLengthW))); - GeoTransform* wPos3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), CLHEP::Hep3Vector(0.,0.,-ZStartW-ZHalfLengthW))); - GeoTransform* wPos4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(M_PI,0.,0.),CLHEP::Hep3Vector(0.,0.,-ZStartW-ZHalfLengthW))); + GeoTransform* wPos1 = new GeoTransform(GeoTrf::Translate3D(0.,0., ZStartW+ZHalfLengthW)); + GeoTransform* wPos2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(M_PI,0.,0.),GeoTrf::Vector3D(0.,0., ZStartW+ZHalfLengthW))); + GeoTransform* wPos3 = new GeoTransform(GeoTrf::Translate3D(0.,0.,-ZStartW-ZHalfLengthW)); + GeoTransform* wPos4 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(M_PI,0.,0.),GeoTrf::Vector3D(0.,0.,-ZStartW-ZHalfLengthW))); motherP->add(wPos1); motherP->add(wingPhys); motherP->add(wPos2); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServiceVolume.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServiceVolume.cxx index 6ffacbd81c1..9b96b7a7738 100644 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServiceVolume.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServiceVolume.cxx @@ -6,7 +6,7 @@ #include "InDetServMatGeoModel/ServicesLayer.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> void ServiceVolume::dump( bool dumpMaterial) const diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SquirrelCageFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SquirrelCageFactory.cxx index a4fc9ad753d..291fc8bde53 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SquirrelCageFactory.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SquirrelCageFactory.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/SquirrelCageFactory.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -68,37 +70,37 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) // Squirrel cage rings // Default (initial) ring parameters // -// double rminInt = 1074.0*CLHEP::mm; -// double ringThick = 4.0*CLHEP::mm; -// double ringGap = 20.*CLHEP::mm; -// double ringWid = 40.*CLHEP::mm; +// double rminInt = 1074.0*GeoModelKernelUnits::mm; +// double ringThick = 4.0*GeoModelKernelUnits::mm; +// double ringGap = 20.*GeoModelKernelUnits::mm; +// double ringWid = 40.*GeoModelKernelUnits::mm; // - double rminInt = (*cage)[0]->getDouble("RINGRMIN")*CLHEP::mm; - double ringThick = (*cage)[0]->getDouble("RINGTHICK")*CLHEP::mm; - double ringGap = (*cage)[0]->getDouble("RINGGAP")*CLHEP::mm; - double ringWid = (*cage)[0]->getDouble("RINGWIDTH")*CLHEP::mm; + double rminInt = (*cage)[0]->getDouble("RINGRMIN")*GeoModelKernelUnits::mm; + double ringThick = (*cage)[0]->getDouble("RINGTHICK")*GeoModelKernelUnits::mm; + double ringGap = (*cage)[0]->getDouble("RINGGAP")*GeoModelKernelUnits::mm; + double ringWid = (*cage)[0]->getDouble("RINGWIDTH")*GeoModelKernelUnits::mm; // //--- Default (initial) z positions -// double zposFirstRing = 805.0*CLHEP::mm+161.0*CLHEP::mm; -// double zposGap1 = 390.*CLHEP::mm; -// double zposGap2 = 402.*CLHEP::mm; -// double zposGap3 = 446.*CLHEP::mm; -// double zposGap4 = 331.*CLHEP::mm; +// double zposFirstRing = 805.0*GeoModelKernelUnits::mm+161.0*GeoModelKernelUnits::mm; +// double zposGap1 = 390.*GeoModelKernelUnits::mm; +// double zposGap2 = 402.*GeoModelKernelUnits::mm; +// double zposGap3 = 446.*GeoModelKernelUnits::mm; +// double zposGap4 = 331.*GeoModelKernelUnits::mm; // - double zposFirstRing = (*cage)[0]->getDouble("ZBASE")*CLHEP::mm; - double zposGap1 = (*cage)[0]->getDouble("ZGAP1")*CLHEP::mm; - double zposGap2 = (*cage)[0]->getDouble("ZGAP2")*CLHEP::mm; - double zposGap3 = (*cage)[0]->getDouble("ZGAP3")*CLHEP::mm; - double zposGap4 = (*cage)[0]->getDouble("ZGAP4")*CLHEP::mm; + double zposFirstRing = (*cage)[0]->getDouble("ZBASE")*GeoModelKernelUnits::mm; + double zposGap1 = (*cage)[0]->getDouble("ZGAP1")*GeoModelKernelUnits::mm; + double zposGap2 = (*cage)[0]->getDouble("ZGAP2")*GeoModelKernelUnits::mm; + double zposGap3 = (*cage)[0]->getDouble("ZGAP3")*GeoModelKernelUnits::mm; + double zposGap4 = (*cage)[0]->getDouble("ZGAP4")*GeoModelKernelUnits::mm; // // Now support ring -// double rminSup = 830.0*CLHEP::mm; -// double supThick = 90.0*CLHEP::mm; -// double supWid = 12.0*CLHEP::mm; +// double rminSup = 830.0*GeoModelKernelUnits::mm; +// double supThick = 90.0*GeoModelKernelUnits::mm; +// double supWid = 12.0*GeoModelKernelUnits::mm; // - double rminSup = (*cage)[0]->getDouble("SUPRMIN")*CLHEP::mm; - double supThick = (*cage)[0]->getDouble("SUPTHICK")*CLHEP::mm; - double supWid = (*cage)[0]->getDouble("SUPWIDTH")*CLHEP::mm; + double rminSup = (*cage)[0]->getDouble("SUPRMIN")*GeoModelKernelUnits::mm; + double supThick = (*cage)[0]->getDouble("SUPTHICK")*GeoModelKernelUnits::mm; + double supWid = (*cage)[0]->getDouble("SUPWIDTH")*GeoModelKernelUnits::mm; // double zposSupRing = zposFirstRing+ringWid*5. + zposGap1 + zposGap2 + zposGap3 + zposGap4; @@ -170,11 +172,11 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) GeoBox* UShapePart2 = new GeoBox(xDepthUSP2/2., yWidthUSP2/2., zLengthUS/2.); GeoBox* UShapePart3 = new GeoBox(xDepthUSP3/2., yWidthUSP3/2., zLengthUS/2.); - CLHEP::Hep3Vector trans1UShapeP2(xDepthUSP2/2. - xDepthUSP1/2., yWidthUSP1/2. + yWidthUSP2/2., 0.); - CLHEP::Hep3Vector trans2UShapeP2(- xDepthUSP2/2. + xDepthUSP1/2., yWidthUSP1/2. + yWidthUSP2/2., 0.); + GeoTrf::Vector3D trans1UShapeP2(xDepthUSP2/2. - xDepthUSP1/2., yWidthUSP1/2. + yWidthUSP2/2., 0.); + GeoTrf::Vector3D trans2UShapeP2(- xDepthUSP2/2. + xDepthUSP1/2., yWidthUSP1/2. + yWidthUSP2/2., 0.); - CLHEP::Hep3Vector trans1UShapeP3(xDepthUSP3/2. - xDepthUSP1/2., - yWidthUSP1/2. - yWidthUSP3/2., 0.); - CLHEP::Hep3Vector trans2UShapeP3(- xDepthUSP3/2. + xDepthUSP1/2., - yWidthUSP1/2. - yWidthUSP3/2., 0.); + GeoTrf::Vector3D trans1UShapeP3(xDepthUSP3/2. - xDepthUSP1/2., - yWidthUSP1/2. - yWidthUSP3/2., 0.); + GeoTrf::Vector3D trans2UShapeP3(- xDepthUSP3/2. + xDepthUSP1/2., - yWidthUSP1/2. - yWidthUSP3/2., 0.); //Determining the exact place of "U" Shape support @@ -194,14 +196,14 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) //Inner double phiICRT = asin((yWidthUSP1/2. + yWidthUSP2 + coordY) / rminInt); - double DphiICRT = CLHEP::pi - 2*phiICRT; + double DphiICRT = GeoModelKernelUnits::pi - 2*phiICRT; double phiICRB = asin((yWidthUSP1/2. + yWidthUSP2 - coordY) / rminInt); - double DphiICRB = CLHEP::pi - 2*phiICRB; + double DphiICRB = GeoModelKernelUnits::pi - 2*phiICRB; GeoTubs* ICRT = new GeoTubs(rminInt, rminInt + ringThick, ringWid/2., phiICRT, DphiICRT); - GeoTubs* ICRB = new GeoTubs(rminInt, rminInt + ringThick, ringWid/2., CLHEP::pi + phiICRB, DphiICRB); + GeoTubs* ICRB = new GeoTubs(rminInt, rminInt + ringThick, ringWid/2., GeoModelKernelUnits::pi + phiICRB, DphiICRB); const GeoLogVol* ICRTLog = new GeoLogVol("SQringIntTop", ICRT, ringMat); @@ -213,10 +215,10 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) //Outer double phiECRT = asin((yWidthUSP1/2. + yWidthUSP2 + coordY) / (rminInt+ringGap+ringThick)); - double DphiECRT = CLHEP::pi - 2*phiECRT; + double DphiECRT = GeoModelKernelUnits::pi - 2*phiECRT; double phiECRB = asin((yWidthUSP1/2. + yWidthUSP2 - coordY) / (rminInt+ringGap+ringThick)); - double DphiECRB = CLHEP::pi - 2*phiECRB; + double DphiECRB = GeoModelKernelUnits::pi - 2*phiECRB; // std::cerr << "phiET: " << phiECRT << ", DphiET: " << DphiECRT << std::endl; // std::cerr << "phiIT: " << phiICRT << ", DphiIT: " << DphiICRT << std::endl; @@ -224,7 +226,7 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) // std::cerr << "phiIB: " << phiICRB << ", DphiIB: " << DphiICRB << std::endl; GeoTubs* ECRT = new GeoTubs(rminInt+ringGap+ringThick, rminInt+2.*ringThick+ringGap, ringWid/2., phiECRT, DphiECRT); - GeoTubs* ECRB = new GeoTubs(rminInt+ringGap+ringThick, rminInt+2.*ringThick+ringGap, ringWid/2., CLHEP::pi + phiECRB, DphiECRB); + GeoTubs* ECRB = new GeoTubs(rminInt+ringGap+ringThick, rminInt+2.*ringThick+ringGap, ringWid/2., GeoModelKernelUnits::pi + phiECRB, DphiECRB); const GeoLogVol* ECRTLog = new GeoLogVol("SQringExtTop", ECRT, ringMat); GeoVPhysVol* ECRTPhys = new GeoPhysVol(ECRTLog); @@ -241,26 +243,26 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) //Positioning and adding to geometry //Rings - CLHEP::Hep3Vector servpos1(0.,0., zposFirstRing+ringWid/2.); - CLHEP::Hep3Vector servpos2(0.,0.,-zposFirstRing-ringWid/2.); - CLHEP::Hep3Vector servpos3(0.,0., zposFirstRing+ringWid*3./2. + zposGap1); - CLHEP::Hep3Vector servpos4(0.,0.,-zposFirstRing-ringWid*3./2. - zposGap1); - CLHEP::Hep3Vector servpos5(0.,0., zposFirstRing+ringWid*5./2. + zposGap1 + zposGap2); - CLHEP::Hep3Vector servpos6(0.,0.,-zposFirstRing-ringWid*5./2. - zposGap1 - zposGap2); - CLHEP::Hep3Vector servpos7(0.,0., zposFirstRing+ringWid*7./2. + zposGap1 + zposGap2 + zposGap3); - CLHEP::Hep3Vector servpos8(0.,0.,-zposFirstRing-ringWid*7./2. - zposGap1 - zposGap2 - zposGap3); - CLHEP::Hep3Vector servpos9(0.,0., zposFirstRing+ringWid*9./2. + zposGap1 + zposGap2 + zposGap3 + zposGap4); - CLHEP::Hep3Vector servpos10(0.,0.,-zposFirstRing-ringWid*9./2. - zposGap1 - zposGap2 - zposGap3 - zposGap4); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,0.),servpos2)); - GeoTransform *xform3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos3)); - GeoTransform *xform4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,0.),servpos4)); - GeoTransform *xform5 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos5)); - GeoTransform *xform6 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,0.),servpos6)); - GeoTransform *xform7 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos7)); - GeoTransform *xform8 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,0.),servpos8)); - GeoTransform *xform9 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos9)); - GeoTransform *xform10 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,0.),servpos10)); + GeoTrf::Translate3D servpos1(0.,0., zposFirstRing+ringWid/2.); + GeoTrf::Translate3D servpos2(0.,0.,-zposFirstRing-ringWid/2.); + GeoTrf::Translate3D servpos3(0.,0., zposFirstRing+ringWid*3./2. + zposGap1); + GeoTrf::Translate3D servpos4(0.,0.,-zposFirstRing-ringWid*3./2. - zposGap1); + GeoTrf::Translate3D servpos5(0.,0., zposFirstRing+ringWid*5./2. + zposGap1 + zposGap2); + GeoTrf::Translate3D servpos6(0.,0.,-zposFirstRing-ringWid*5./2. - zposGap1 - zposGap2); + GeoTrf::Translate3D servpos7(0.,0., zposFirstRing+ringWid*7./2. + zposGap1 + zposGap2 + zposGap3); + GeoTrf::Translate3D servpos8(0.,0.,-zposFirstRing-ringWid*7./2. - zposGap1 - zposGap2 - zposGap3); + GeoTrf::Translate3D servpos9(0.,0., zposFirstRing+ringWid*9./2. + zposGap1 + zposGap2 + zposGap3 + zposGap4); + GeoTrf::Translate3D servpos10(0.,0.,-zposFirstRing-ringWid*9./2. - zposGap1 - zposGap2 - zposGap3 - zposGap4); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(servpos2); + GeoTransform *xform3 = new GeoTransform(servpos3); + GeoTransform *xform4 = new GeoTransform(servpos4); + GeoTransform *xform5 = new GeoTransform(servpos5); + GeoTransform *xform6 = new GeoTransform(servpos6); + GeoTransform *xform7 = new GeoTransform(servpos7); + GeoTransform *xform8 = new GeoTransform(servpos8); + GeoTransform *xform9 = new GeoTransform(servpos9); + GeoTransform *xform10 = new GeoTransform(servpos10); mother->add(xform1); mother->add(ICRTPhys); mother->add(xform1); mother->add(ECRTPhys); mother->add(xform2); mother->add(ICRTPhys); mother->add(xform2); mother->add(ECRTPhys); @@ -286,45 +288,58 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) // "U Shape" support - CLHEP::Hep3Vector USSupCoordX(rminInt + xDepthUSP1/2., 0, 0); + GeoTrf::Vector3D USSupCoordX(rminInt + xDepthUSP1/2., 0, 0); - GeoTransform* transUSS; - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), USSupCoordX + CLHEP::Hep3Vector(0, coordY, bUSS + zLengthUS/2.))); + GeoTransform* transUSS{nullptr}; + GeoTrf::Vector3D tmpVec(0,0,0); + tmpVec = USSupCoordX + GeoTrf::Vector3D(0, coordY, bUSS + zLengthUS/2.); + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP1); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), USSupCoordX + CLHEP::Hep3Vector(0, coordY, bUSS + zLengthUS/2.) + trans1UShapeP2 )); + tmpVec = USSupCoordX + GeoTrf::Vector3D(0, coordY, bUSS + zLengthUS/2.) + trans1UShapeP2; + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP2); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), USSupCoordX + CLHEP::Hep3Vector(0, coordY, bUSS + zLengthUS/2.) + trans1UShapeP3 )); + tmpVec = USSupCoordX + GeoTrf::Vector3D(0, coordY, bUSS + zLengthUS/2.) + trans1UShapeP3 ; + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP3); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), -USSupCoordX + CLHEP::Hep3Vector(0, coordY, bUSS + zLengthUS/2.))); + tmpVec = -USSupCoordX + GeoTrf::Vector3D(0, coordY, bUSS + zLengthUS/2.); + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP1); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), -USSupCoordX + CLHEP::Hep3Vector(0, coordY, bUSS + zLengthUS/2.) + trans2UShapeP2 )); + tmpVec = -USSupCoordX + GeoTrf::Vector3D(0, coordY, bUSS + zLengthUS/2.) + trans2UShapeP2; + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP2); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), -USSupCoordX + CLHEP::Hep3Vector(0, coordY, bUSS + zLengthUS/2.) + trans2UShapeP3 )); + tmpVec = -USSupCoordX + GeoTrf::Vector3D(0, coordY, bUSS + zLengthUS/2.) + trans2UShapeP3; + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP3); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), USSupCoordX - CLHEP::Hep3Vector(0, - coordY, bUSS + zLengthUS/2.))); + tmpVec = USSupCoordX - GeoTrf::Vector3D(0, - coordY, bUSS + zLengthUS/2.); + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP1); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), USSupCoordX - CLHEP::Hep3Vector(0, - coordY, bUSS + zLengthUS/2.) + trans1UShapeP2 )); + tmpVec = USSupCoordX - GeoTrf::Vector3D(0, - coordY, bUSS + zLengthUS/2.) + trans1UShapeP2; + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP2); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), USSupCoordX - CLHEP::Hep3Vector(0, - coordY, bUSS + zLengthUS/2.) + trans1UShapeP3 )); + tmpVec = USSupCoordX - GeoTrf::Vector3D(0, - coordY, bUSS + zLengthUS/2.) + trans1UShapeP3; + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP3); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - USSupCoordX - CLHEP::Hep3Vector(0, - coordY, bUSS + zLengthUS/2.))); + tmpVec = - USSupCoordX - GeoTrf::Vector3D(0, - coordY, bUSS + zLengthUS/2.); + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP1); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - USSupCoordX - CLHEP::Hep3Vector(0, - coordY, bUSS + zLengthUS/2.) + trans2UShapeP2 )); + tmpVec = - USSupCoordX - GeoTrf::Vector3D(0, - coordY, bUSS + zLengthUS/2.) + trans2UShapeP2; + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP2); - transUSS = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - USSupCoordX - CLHEP::Hep3Vector(0, - coordY, bUSS + zLengthUS/2.) + trans2UShapeP3 )); + tmpVec = - USSupCoordX - GeoTrf::Vector3D(0, - coordY, bUSS + zLengthUS/2.) + trans2UShapeP3; + transUSS = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(transUSS); mother->add(UShapePP3); //Support ring positioning - CLHEP::Hep3Vector suppos1(0.,0., zposSupRing+supWid/2.); - CLHEP::Hep3Vector suppos2(0.,0.,-zposSupRing-supWid/2.); - GeoTransform *sform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), suppos1)); - GeoTransform *sform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),suppos2)); + GeoTrf::Translate3D suppos1(0.,0., zposSupRing+supWid/2.); + GeoTrf::Vector3D suppos2(0.,0.,-zposSupRing-supWid/2.); + GeoTransform *sform1 = new GeoTransform(suppos1); + GeoTransform *sform2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,M_PI,0),suppos2)); mother->add(sform1); mother->add(ringPhysSup); mother->add(sform2); @@ -351,46 +366,46 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) // Squirrel cage rings // Default (initial) ring parameters // - double rminInt = 1074.0*CLHEP::mm; - double ringThick = 4.0*CLHEP::mm; - double ringGap = 20.*CLHEP::mm; - double ringWid = 40.*CLHEP::mm; + double rminInt = 1074.0*GeoModelKernelUnits::mm; + double ringThick = 4.0*GeoModelKernelUnits::mm; + double ringGap = 20.*GeoModelKernelUnits::mm; + double ringWid = 40.*GeoModelKernelUnits::mm; // - rminInt = (*cage)[0]->getDouble("RINGRMIN")*CLHEP::mm; - ringThick = (*cage)[0]->getDouble("RINGTHICK")*CLHEP::mm; - ringGap = (*cage)[0]->getDouble("RINGGAP")*CLHEP::mm; - ringWid = (*cage)[0]->getDouble("RINGWIDTH")*CLHEP::mm; + rminInt = (*cage)[0]->getDouble("RINGRMIN")*GeoModelKernelUnits::mm; + ringThick = (*cage)[0]->getDouble("RINGTHICK")*GeoModelKernelUnits::mm; + ringGap = (*cage)[0]->getDouble("RINGGAP")*GeoModelKernelUnits::mm; + ringWid = (*cage)[0]->getDouble("RINGWIDTH")*GeoModelKernelUnits::mm; // //--- Default (initial) z positions - double zposFirstRing = 805.0*CLHEP::mm+161.0*CLHEP::mm; - double zposGap1 = 390.*CLHEP::mm; - double zposGap2 = 402.*CLHEP::mm; - double zposGap3 = 446.*CLHEP::mm; - double zposGap4 = 331.*CLHEP::mm; + double zposFirstRing = 805.0*GeoModelKernelUnits::mm+161.0*GeoModelKernelUnits::mm; + double zposGap1 = 390.*GeoModelKernelUnits::mm; + double zposGap2 = 402.*GeoModelKernelUnits::mm; + double zposGap3 = 446.*GeoModelKernelUnits::mm; + double zposGap4 = 331.*GeoModelKernelUnits::mm; // - zposFirstRing = (*cage)[0]->getDouble("ZBASE")*CLHEP::mm; - zposGap1 = (*cage)[0]->getDouble("ZGAP1")*CLHEP::mm; - zposGap2 = (*cage)[0]->getDouble("ZGAP2")*CLHEP::mm; - zposGap3 = (*cage)[0]->getDouble("ZGAP3")*CLHEP::mm; - zposGap4 = (*cage)[0]->getDouble("ZGAP4")*CLHEP::mm; + zposFirstRing = (*cage)[0]->getDouble("ZBASE")*GeoModelKernelUnits::mm; + zposGap1 = (*cage)[0]->getDouble("ZGAP1")*GeoModelKernelUnits::mm; + zposGap2 = (*cage)[0]->getDouble("ZGAP2")*GeoModelKernelUnits::mm; + zposGap3 = (*cage)[0]->getDouble("ZGAP3")*GeoModelKernelUnits::mm; + zposGap4 = (*cage)[0]->getDouble("ZGAP4")*GeoModelKernelUnits::mm; // // Now support ring - double rminSup = 830.0*CLHEP::mm; - double supThick = 90.0*CLHEP::mm; - double supWid = 12.0*CLHEP::mm; + double rminSup = 830.0*GeoModelKernelUnits::mm; + double supThick = 90.0*GeoModelKernelUnits::mm; + double supWid = 12.0*GeoModelKernelUnits::mm; // - rminSup = (*cage)[0]->getDouble("SUPRMIN")*CLHEP::mm; - supThick = (*cage)[0]->getDouble("SUPTHICK")*CLHEP::mm; - supWid = (*cage)[0]->getDouble("SUPWIDTH")*CLHEP::mm; + rminSup = (*cage)[0]->getDouble("SUPRMIN")*GeoModelKernelUnits::mm; + supThick = (*cage)[0]->getDouble("SUPTHICK")*GeoModelKernelUnits::mm; + supWid = (*cage)[0]->getDouble("SUPWIDTH")*GeoModelKernelUnits::mm; // double zposSupRing = zposFirstRing+ringWid*5. + zposGap1 + zposGap2 + zposGap3 + zposGap4; // // Now support ribbon - double ribWid = 68.0*CLHEP::mm ; - ribWid = (*cage)[0]->getDouble("RIBWIDTH")*CLHEP::mm; + double ribWid = 68.0*GeoModelKernelUnits::mm ; + ribWid = (*cage)[0]->getDouble("RIBWIDTH")*GeoModelKernelUnits::mm; double ribLeng = ringWid*5. + zposGap1 + zposGap2 + zposGap3 + zposGap4; double ribThick = 0; - if (sqversion >= 3) ribThick = (*cage)[0]->getDouble("RIBTHICK")*CLHEP::mm; + if (sqversion >= 3) ribThick = (*cage)[0]->getDouble("RIBTHICK")*GeoModelKernelUnits::mm; double safety =0.01; double ribThickMax = ringGap - 2*safety; if (ribThick == 0 || ribThick > ribThickMax) { @@ -425,26 +440,26 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) GeoVPhysVol* ringPhysSup = new GeoPhysVol(ringLogSup); GeoVPhysVol* ribPhysSup = new GeoPhysVol(ribLogSup); - CLHEP::Hep3Vector servpos1(0.,0., zposFirstRing+ringWid/2.); - CLHEP::Hep3Vector servpos2(0.,0.,-zposFirstRing-ringWid/2.); - CLHEP::Hep3Vector servpos3(0.,0., zposFirstRing+ringWid*3./2. + zposGap1); - CLHEP::Hep3Vector servpos4(0.,0.,-zposFirstRing-ringWid*3./2. - zposGap1); - CLHEP::Hep3Vector servpos5(0.,0., zposFirstRing+ringWid*5./2. + zposGap1 + zposGap2); - CLHEP::Hep3Vector servpos6(0.,0.,-zposFirstRing-ringWid*5./2. - zposGap1 - zposGap2); - CLHEP::Hep3Vector servpos7(0.,0., zposFirstRing+ringWid*7./2. + zposGap1 + zposGap2 + zposGap3); - CLHEP::Hep3Vector servpos8(0.,0.,-zposFirstRing-ringWid*7./2. - zposGap1 - zposGap2 - zposGap3); - CLHEP::Hep3Vector servpos9(0.,0., zposFirstRing+ringWid*9./2. + zposGap1 + zposGap2 + zposGap3 + zposGap4); - CLHEP::Hep3Vector servpos10(0.,0.,-zposFirstRing-ringWid*9./2. - zposGap1 - zposGap2 - zposGap3 - zposGap4); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos2)); - GeoTransform *xform3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos3)); - GeoTransform *xform4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos4)); - GeoTransform *xform5 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos5)); - GeoTransform *xform6 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos6)); - GeoTransform *xform7 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos7)); - GeoTransform *xform8 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos8)); - GeoTransform *xform9 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos9)); - GeoTransform *xform10 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos10)); + GeoTrf::Translate3D servpos1(0.,0., zposFirstRing+ringWid/2.); + GeoTrf::Translation3D servpos2(0.,0.,-zposFirstRing-ringWid/2.); + GeoTrf::Translate3D servpos3(0.,0., zposFirstRing+ringWid*3./2. + zposGap1); + GeoTrf::Translation3D servpos4(0.,0.,-zposFirstRing-ringWid*3./2. - zposGap1); + GeoTrf::Translate3D servpos5(0.,0., zposFirstRing+ringWid*5./2. + zposGap1 + zposGap2); + GeoTrf::Translation3D servpos6(0.,0.,-zposFirstRing-ringWid*5./2. - zposGap1 - zposGap2); + GeoTrf::Translate3D servpos7(0.,0., zposFirstRing+ringWid*7./2. + zposGap1 + zposGap2 + zposGap3); + GeoTrf::Translation3D servpos8(0.,0.,-zposFirstRing-ringWid*7./2. - zposGap1 - zposGap2 - zposGap3); + GeoTrf::Translate3D servpos9(0.,0., zposFirstRing+ringWid*9./2. + zposGap1 + zposGap2 + zposGap3 + zposGap4); + GeoTrf::Translation3D servpos10(0.,0.,-zposFirstRing-ringWid*9./2. - zposGap1 - zposGap2 - zposGap3 - zposGap4); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(GeoTrf::Transform3D(servpos2*GeoTrf::RotateY3D(M_PI))); + GeoTransform *xform3 = new GeoTransform(servpos3); + GeoTransform *xform4 = new GeoTransform(GeoTrf::Transform3D(servpos4*GeoTrf::RotateY3D(M_PI))); + GeoTransform *xform5 = new GeoTransform(servpos5); + GeoTransform *xform6 = new GeoTransform(GeoTrf::Transform3D(servpos6*GeoTrf::RotateY3D(M_PI))); + GeoTransform *xform7 = new GeoTransform(servpos7); + GeoTransform *xform8 = new GeoTransform(GeoTrf::Transform3D(servpos8*GeoTrf::RotateY3D(M_PI))); + GeoTransform *xform9 = new GeoTransform(servpos9); + GeoTransform *xform10 = new GeoTransform(GeoTrf::Transform3D(servpos10*GeoTrf::RotateY3D(M_PI))); mother->add(xform1); mother->add(ringPhysInt); mother->add(xform1); @@ -488,10 +503,10 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) //Support ring positioning - CLHEP::Hep3Vector suppos1(0.,0., zposSupRing+supWid/2.); - CLHEP::Hep3Vector suppos2(0.,0.,-zposSupRing-supWid/2.); - GeoTransform *sform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), suppos1)); - GeoTransform *sform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),suppos2)); + GeoTrf::Translate3D suppos1(0.,0., zposSupRing+supWid/2.); + GeoTrf::Translation3D suppos2(0.,0.,-zposSupRing-supWid/2.); + GeoTransform *sform1 = new GeoTransform(suppos1); + GeoTransform *sform2 = new GeoTransform(GeoTrf::Transform3D(suppos2*GeoTrf::RotateY3D(M_PI))); mother->add(sform1); mother->add(ringPhysSup); mother->add(sform2); @@ -500,12 +515,12 @@ void SquirrelCageFactory::create(GeoPhysVol *mother) //Support ribbon positioning - CLHEP::Hep3Vector ribpos1( 0., 0., zposFirstRing+ribLeng/2.); - CLHEP::Hep3Vector ribpos2( 0., 0.,-zposFirstRing-ribLeng/2.); - GeoTransform *rform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), ribpos1)); - GeoTransform *rform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,M_PI),ribpos1)); - GeoTransform *rform3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), ribpos2)); - GeoTransform *rform4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,M_PI),ribpos2)); + GeoTrf::Translate3D ribpos1( 0., 0., zposFirstRing+ribLeng/2.); + GeoTrf::Translate3D ribpos2( 0., 0.,-zposFirstRing-ribLeng/2.); + GeoTransform *rform1 = new GeoTransform(ribpos1); + GeoTransform *rform2 = new GeoTransform(ribpos1*GeoTrf::RotateZ3D(M_PI)); + GeoTransform *rform3 = new GeoTransform(ribpos2); + GeoTransform *rform4 = new GeoTransform(ribpos2*GeoTrf::RotateZ3D(M_PI)); mother->add(rform1); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SquirrelCageFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SquirrelCageFactoryFS.cxx index 24b3b6aa352..5983eed14c9 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SquirrelCageFactoryFS.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SquirrelCageFactoryFS.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/SquirrelCageFactoryFS.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -72,46 +74,46 @@ void SquirrelCageFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) // Squirrel cage rings // Default (initial) ring parameters // - double rminInt = 1074.0*CLHEP::mm; - double ringThick = 4.0*CLHEP::mm; - double ringGap = 20.*CLHEP::mm; - double ringWid = 40.*CLHEP::mm; + double rminInt = 1074.0*GeoModelKernelUnits::mm; + double ringThick = 4.0*GeoModelKernelUnits::mm; + double ringGap = 20.*GeoModelKernelUnits::mm; + double ringWid = 40.*GeoModelKernelUnits::mm; // - rminInt = (*cage)[0]->getDouble("RINGRMIN")*CLHEP::mm; - ringThick = (*cage)[0]->getDouble("RINGTHICK")*CLHEP::mm; - ringGap = (*cage)[0]->getDouble("RINGGAP")*CLHEP::mm; - ringWid = (*cage)[0]->getDouble("RINGWIDTH")*CLHEP::mm; + rminInt = (*cage)[0]->getDouble("RINGRMIN")*GeoModelKernelUnits::mm; + ringThick = (*cage)[0]->getDouble("RINGTHICK")*GeoModelKernelUnits::mm; + ringGap = (*cage)[0]->getDouble("RINGGAP")*GeoModelKernelUnits::mm; + ringWid = (*cage)[0]->getDouble("RINGWIDTH")*GeoModelKernelUnits::mm; // //--- Default (initial) z positions - double zposFirstRing = 805.0*CLHEP::mm+161.0*CLHEP::mm; - double zposGap1 = 390.*CLHEP::mm; - double zposGap2 = 402.*CLHEP::mm; - double zposGap3 = 446.*CLHEP::mm; - double zposGap4 = 331.*CLHEP::mm; + double zposFirstRing = 805.0*GeoModelKernelUnits::mm+161.0*GeoModelKernelUnits::mm; + double zposGap1 = 390.*GeoModelKernelUnits::mm; + double zposGap2 = 402.*GeoModelKernelUnits::mm; + double zposGap3 = 446.*GeoModelKernelUnits::mm; + double zposGap4 = 331.*GeoModelKernelUnits::mm; // - zposFirstRing = (*cage)[0]->getDouble("ZBASE")*CLHEP::mm; - zposGap1 = (*cage)[0]->getDouble("ZGAP1")*CLHEP::mm; - zposGap2 = (*cage)[0]->getDouble("ZGAP2")*CLHEP::mm; - zposGap3 = (*cage)[0]->getDouble("ZGAP3")*CLHEP::mm; - zposGap4 = (*cage)[0]->getDouble("ZGAP4")*CLHEP::mm; + zposFirstRing = (*cage)[0]->getDouble("ZBASE")*GeoModelKernelUnits::mm; + zposGap1 = (*cage)[0]->getDouble("ZGAP1")*GeoModelKernelUnits::mm; + zposGap2 = (*cage)[0]->getDouble("ZGAP2")*GeoModelKernelUnits::mm; + zposGap3 = (*cage)[0]->getDouble("ZGAP3")*GeoModelKernelUnits::mm; + zposGap4 = (*cage)[0]->getDouble("ZGAP4")*GeoModelKernelUnits::mm; // // Now support ring - double rminSup = 830.0*CLHEP::mm; - double supThick = 90.0*CLHEP::mm; - double supWid = 12.0*CLHEP::mm; + double rminSup = 830.0*GeoModelKernelUnits::mm; + double supThick = 90.0*GeoModelKernelUnits::mm; + double supWid = 12.0*GeoModelKernelUnits::mm; // - rminSup = (*cage)[0]->getDouble("SUPRMIN")*CLHEP::mm; - supThick = (*cage)[0]->getDouble("SUPTHICK")*CLHEP::mm; - supWid = (*cage)[0]->getDouble("SUPWIDTH")*CLHEP::mm; + rminSup = (*cage)[0]->getDouble("SUPRMIN")*GeoModelKernelUnits::mm; + supThick = (*cage)[0]->getDouble("SUPTHICK")*GeoModelKernelUnits::mm; + supWid = (*cage)[0]->getDouble("SUPWIDTH")*GeoModelKernelUnits::mm; // double zposSupRing = zposFirstRing+ringWid*5. + zposGap1 + zposGap2 + zposGap3 + zposGap4; // // Now support ribbon - double ribWid = 68.0*CLHEP::mm ; - ribWid = (*cage)[0]->getDouble("RIBWIDTH")*CLHEP::mm; + double ribWid = 68.0*GeoModelKernelUnits::mm ; + ribWid = (*cage)[0]->getDouble("RIBWIDTH")*GeoModelKernelUnits::mm; double ribLeng = ringWid*5. + zposGap1 + zposGap2 + zposGap3 + zposGap4; double ribThick = 0; - if (sqversion >= 3) ribThick = (*cage)[0]->getDouble("RIBTHICK")*CLHEP::mm; + if (sqversion >= 3) ribThick = (*cage)[0]->getDouble("RIBTHICK")*GeoModelKernelUnits::mm; double safety =0.01; double ribThickMax = ringGap - 2*safety; if (ribThick == 0 || ribThick > ribThickMax) { @@ -146,26 +148,26 @@ void SquirrelCageFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) GeoVPhysVol* ringPhysSup = new GeoPhysVol(ringLogSup); GeoVPhysVol* ribPhysSup = new GeoPhysVol(ribLogSup); - CLHEP::Hep3Vector servpos1(0.,0., zposFirstRing+ringWid/2.); - CLHEP::Hep3Vector servpos2(0.,0.,-zposFirstRing-ringWid/2.); - CLHEP::Hep3Vector servpos3(0.,0., zposFirstRing+ringWid*3./2. + zposGap1); - CLHEP::Hep3Vector servpos4(0.,0.,-zposFirstRing-ringWid*3./2. - zposGap1); - CLHEP::Hep3Vector servpos5(0.,0., zposFirstRing+ringWid*5./2. + zposGap1 + zposGap2); - CLHEP::Hep3Vector servpos6(0.,0.,-zposFirstRing-ringWid*5./2. - zposGap1 - zposGap2); - CLHEP::Hep3Vector servpos7(0.,0., zposFirstRing+ringWid*7./2. + zposGap1 + zposGap2 + zposGap3); - CLHEP::Hep3Vector servpos8(0.,0.,-zposFirstRing-ringWid*7./2. - zposGap1 - zposGap2 - zposGap3); - CLHEP::Hep3Vector servpos9(0.,0., zposFirstRing+ringWid*9./2. + zposGap1 + zposGap2 + zposGap3 + zposGap4); - CLHEP::Hep3Vector servpos10(0.,0.,-zposFirstRing-ringWid*9./2. - zposGap1 - zposGap2 - zposGap3 - zposGap4); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos2)); - GeoTransform *xform3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos3)); - GeoTransform *xform4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos4)); - GeoTransform *xform5 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos5)); - GeoTransform *xform6 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos6)); - GeoTransform *xform7 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos7)); - GeoTransform *xform8 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos8)); - GeoTransform *xform9 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), servpos9)); - GeoTransform *xform10 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),servpos10)); + GeoTrf::Translate3D servpos1(0.,0., zposFirstRing+ringWid/2.); + GeoTrf::Vector3D servpos2(0.,0.,-zposFirstRing-ringWid/2.); + GeoTrf::Translate3D servpos3(0.,0., zposFirstRing+ringWid*3./2. + zposGap1); + GeoTrf::Vector3D servpos4(0.,0.,-zposFirstRing-ringWid*3./2. - zposGap1); + GeoTrf::Translate3D servpos5(0.,0., zposFirstRing+ringWid*5./2. + zposGap1 + zposGap2); + GeoTrf::Vector3D servpos6(0.,0.,-zposFirstRing-ringWid*5./2. - zposGap1 - zposGap2); + GeoTrf::Translate3D servpos7(0.,0., zposFirstRing+ringWid*7./2. + zposGap1 + zposGap2 + zposGap3); + GeoTrf::Vector3D servpos8(0.,0.,-zposFirstRing-ringWid*7./2. - zposGap1 - zposGap2 - zposGap3); + GeoTrf::Translate3D servpos9(0.,0., zposFirstRing+ringWid*9./2. + zposGap1 + zposGap2 + zposGap3 + zposGap4); + GeoTrf::Vector3D servpos10(0.,0.,-zposFirstRing-ringWid*9./2. - zposGap1 - zposGap2 - zposGap3 - zposGap4); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos2)); + GeoTransform *xform3 = new GeoTransform(servpos3); + GeoTransform *xform4 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos4)); + GeoTransform *xform5 = new GeoTransform(servpos5); + GeoTransform *xform6 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos6)); + GeoTransform *xform7 = new GeoTransform(servpos7); + GeoTransform *xform8 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos8)); + GeoTransform *xform9 = new GeoTransform(servpos9); + GeoTransform *xform10 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),servpos10)); motherP->add(xform1); motherP->add(ringPhysInt); motherP->add(xform1); @@ -209,10 +211,10 @@ void SquirrelCageFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) //Support ring positioning - CLHEP::Hep3Vector suppos1(0.,0., zposSupRing+supWid/2.); - CLHEP::Hep3Vector suppos2(0.,0.,-zposSupRing-supWid/2.); - GeoTransform *sform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), suppos1)); - GeoTransform *sform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,M_PI,0.),suppos2)); + GeoTrf::Translate3D suppos1(0.,0., zposSupRing+supWid/2.); + GeoTrf::Vector3D suppos2(0.,0.,-zposSupRing-supWid/2.); + GeoTransform *sform1 = new GeoTransform(suppos1); + GeoTransform *sform2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,M_PI,0.),suppos2)); motherP->add(sform1); motherP->add(ringPhysSup); motherM->add(sform2); @@ -221,12 +223,12 @@ void SquirrelCageFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) //Support ribbon positioning - CLHEP::Hep3Vector ribpos1( 0., 0., zposFirstRing+ribLeng/2.); - CLHEP::Hep3Vector ribpos2( 0., 0.,-zposFirstRing-ribLeng/2.); - GeoTransform *rform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), ribpos1)); - GeoTransform *rform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,M_PI),ribpos1)); - GeoTransform *rform3 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), ribpos2)); - GeoTransform *rform4 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(0.,0.,M_PI),ribpos2)); + GeoTrf::Vector3D ribpos1( 0., 0., zposFirstRing+ribLeng/2.); + GeoTrf::Vector3D ribpos2( 0., 0.,-zposFirstRing-ribLeng/2.); + GeoTransform *rform1 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,0,0),ribpos1)); + GeoTransform *rform2 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,0.,M_PI),ribpos1)); + GeoTransform *rform3 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0,0,0),ribpos2)); + GeoTransform *rform4 = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.,0.,M_PI),ribpos2)); motherP->add(rform1); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SupportRailFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SupportRailFactory.cxx index 346960aee28..f6ca11d8b99 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SupportRailFactory.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SupportRailFactory.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/SupportRailFactory.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -66,18 +68,18 @@ void SupportRailFactory::create(GeoPhysVol *mother) // // Default(initial) values // - double RMAX_ID = 1150.0*CLHEP::mm -1.0*CLHEP::mm; //Some safety margin - double railLengthB = 1600.0*CLHEP::mm; - double railWidthB = 5.5*CLHEP::mm; - double railThickB = 34.7*CLHEP::mm; + double RMAX_ID = 1150.0*GeoModelKernelUnits::mm -1.0*GeoModelKernelUnits::mm; //Some safety margin + double railLengthB = 1600.0*GeoModelKernelUnits::mm; + double railWidthB = 5.5*GeoModelKernelUnits::mm; + double railThickB = 34.7*GeoModelKernelUnits::mm; // - double railLengthE = 2600.0*CLHEP::mm; -// double railWidthE = 14.*CLHEP::mm; -// double railThickE = 14.7*CLHEP::mm; + double railLengthE = 2600.0*GeoModelKernelUnits::mm; +// double railWidthE = 14.*GeoModelKernelUnits::mm; +// double railThickE = 14.7*GeoModelKernelUnits::mm; // - double suppLength = 6800.0*CLHEP::mm; - double suppWidth = 54.*CLHEP::mm; -// double suppThick = 22.6*CLHEP::mm; + double suppLength = 6800.0*GeoModelKernelUnits::mm; + double suppWidth = 54.*GeoModelKernelUnits::mm; +// double suppThick = 22.6*GeoModelKernelUnits::mm; // // Database // @@ -93,7 +95,7 @@ void SupportRailFactory::create(GeoPhysVol *mother) const GeoMaterial* alum = materialManager()->getMaterial((*railrec)[0]->getString("MATSUP")); //Radius of Squirrel cage - double rminInt = (*cage)[0]->getDouble("RINGRMIN")*CLHEP::mm; + double rminInt = (*cage)[0]->getDouble("RINGRMIN")*GeoModelKernelUnits::mm; //Thick of U Shape Support std::unique_ptr<IRDBQuery> queryUSP = rdbAccessSvc()->getQuery("IDDetRailUSP",indetVersionKey.tag(), indetVersionKey.node()); if(!queryUSP) @@ -110,21 +112,21 @@ void SupportRailFactory::create(GeoPhysVol *mother) double epsilon = 0.01; // +Some safety margin - RMAX_ID = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - //railLengthB = (*railrec)[0]->getDouble("LENGTHB")*CLHEP::mm; At database there is 34.7 but it could cause crash. + RMAX_ID = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + //railLengthB = (*railrec)[0]->getDouble("LENGTHB")*GeoModelKernelUnits::mm; At database there is 34.7 but it could cause crash. - railWidthB = (*railrec)[0]->getDouble("WIDTHB")*CLHEP::mm; - railThickB = (*railrec)[0]->getDouble("THICKB")*CLHEP::mm; + railWidthB = (*railrec)[0]->getDouble("WIDTHB")*GeoModelKernelUnits::mm; + railThickB = (*railrec)[0]->getDouble("THICKB")*GeoModelKernelUnits::mm; //------------ Limited by EP ExternalShell - railLengthE = (*endplate)[0]->getDouble("ZSTART")*CLHEP::mm - +(*endplate)[0]->getDouble("ZSHIFT")*CLHEP::mm - +(*endplate)[0]->getDouble("ZGAP")*CLHEP::mm - railLengthB/2.; -// railWidthE = (*railrec)[0]->getDouble("WIDTHE")*CLHEP::mm; -// railThickE = (*railrec)[0]->getDouble("THICKE")*CLHEP::mm; + railLengthE = (*endplate)[0]->getDouble("ZSTART")*GeoModelKernelUnits::mm + +(*endplate)[0]->getDouble("ZSHIFT")*GeoModelKernelUnits::mm + +(*endplate)[0]->getDouble("ZGAP")*GeoModelKernelUnits::mm - railLengthB/2.; +// railWidthE = (*railrec)[0]->getDouble("WIDTHE")*GeoModelKernelUnits::mm; +// railThickE = (*railrec)[0]->getDouble("THICKE")*GeoModelKernelUnits::mm; suppLength = railLengthB + 2.*railLengthE; - suppWidth = (*railrec)[0]->getDouble("WIDTHSUP")*CLHEP::mm; -// suppThick = (*railrec)[0]->getDouble("THICKSUP")*CLHEP::mm; + suppWidth = (*railrec)[0]->getDouble("WIDTHSUP")*GeoModelKernelUnits::mm; +// suppThick = (*railrec)[0]->getDouble("THICKSUP")*GeoModelKernelUnits::mm; double zLengthB = (*idSupportRails)[0]->getDouble("ZLENGTH"); double yWidthB = (*idSupportRails)[0]->getDouble("YWIDTH"); @@ -217,12 +219,12 @@ void SupportRailFactory::create(GeoPhysVol *mother) //GeoBox** railEndcap = new GeoBox*[numberOfPieces]; GeoBox* railEndcap[numberOfPieces]; - // CLHEP::Hep3Vector* vectorForTrans = new CLHEP::Hep3Vector[numberOfPieces]; - // //CLHEP::Hep3Vector vectorForTrans[numberOfPieces]; - CLHEP::Hep3Vector vectorForTrans[numberOfPieces]; + // GeoTrf::Vector3D* vectorForTrans = new GeoTrf::Vector3D[numberOfPieces]; + // //GeoTrf::Vector3D vectorForTrans[numberOfPieces]; + GeoTrf::Vector3D vectorForTrans[numberOfPieces]; GeoBox* railEndcapFirst = new GeoBox(railEBx/2., railEBy/2., railLengthE/2); - CLHEP::Hep3Vector vectorForTransFirst (0., 0., 0.); + GeoTrf::Vector3D vectorForTransFirst (0., 0., 0.); double lastY = 0.; double startY = 0.; @@ -238,12 +240,12 @@ void SupportRailFactory::create(GeoPhysVol *mother) railEndcap[i] = new GeoBox(railEBx/2. - xa, ya/2, railLengthE/2); if (i == 0) { - vectorForTrans[0] = CLHEP::Hep3Vector(0., railEBy/2. + ya/2, 0.) + vectorForTransFirst; + vectorForTrans[0] = GeoTrf::Vector3D(0., railEBy/2. + ya/2, 0.) + vectorForTransFirst; lastY = ya/2; } else { - vectorForTrans[i] = vectorForTrans[i-1] + CLHEP::Hep3Vector(0., lastY + ya/2, 0.); + vectorForTrans[i] = vectorForTrans[i-1] + GeoTrf::Vector3D(0., lastY + ya/2, 0.); lastY = ya/2; } @@ -253,12 +255,12 @@ void SupportRailFactory::create(GeoPhysVol *mother) const GeoShape* elementOfRailSupport2 = new GeoBox(railSP2x/2., railSP2y/2., suppLength/2); const GeoShape* elementOfRailSupport3 = new GeoBox(railSP3x/2., railSP3y/2., suppLength/2); - CLHEP::Hep3Vector transRailSupport1(0., 0., 0.); - CLHEP::Hep3Vector transRailSupport2Part1(-railSP1x/2. + railSP2x/2., railSP1y/2. + railSP2y/2. ,0.); - CLHEP::Hep3Vector transRailSupport3Part1(-railSP1x/2. - railSP3x/2., railSP1y/2. + railSP2y - railSP3y/2. , 0.); + GeoTrf::Vector3D transRailSupport1(0., 0., 0.); + GeoTrf::Vector3D transRailSupport2Part1(-railSP1x/2. + railSP2x/2., railSP1y/2. + railSP2y/2. ,0.); + GeoTrf::Vector3D transRailSupport3Part1(-railSP1x/2. - railSP3x/2., railSP1y/2. + railSP2y - railSP3y/2. , 0.); - CLHEP::Hep3Vector transRailSupport2Part2(railSP1x/2. - railSP2x/2., railSP1y/2. + railSP2y/2. ,0.); - CLHEP::Hep3Vector transRailSupport3Part2(railSP1x/2. + railSP3x/2., railSP1y/2. + railSP2y - railSP3y/2. ,0.); + GeoTrf::Vector3D transRailSupport2Part2(railSP1x/2. - railSP2x/2., railSP1y/2. + railSP2y/2. ,0.); + GeoTrf::Vector3D transRailSupport3Part2(railSP1x/2. + railSP3x/2., railSP1y/2. + railSP2y - railSP3y/2. ,0.); //Definition of Barrel Tracker Support Rail @@ -267,17 +269,17 @@ void SupportRailFactory::create(GeoPhysVol *mother) const GeoBox* trackerSRBP3 = new GeoBox(trackerSRBP3x/2., trackerSRBP3y/2., zLengthB/2); const GeoBox* trackerSRBP4 = new GeoBox(trackerSRBP4x/2., trackerSRBP4y/2., zLengthB/2); - CLHEP::Hep3Vector trans1TSRBP1(0., 0.,0.); - CLHEP::Hep3Vector trans2TSRBP1(0., 0.,0.); + GeoTrf::Vector3D trans1TSRBP1(0., 0.,0.); + GeoTrf::Vector3D trans2TSRBP1(0., 0.,0.); - CLHEP::Hep3Vector trans1TSRBP2(trackerSRBP1x/2. + trackerSRBP2x/2., - (trackerSRBP1y/2. - trackerSRBP2y/2. - distBottom), 0.); - CLHEP::Hep3Vector trans2TSRBP2(-trackerSRBP1x/2. - trackerSRBP2x/2., - (trackerSRBP1y/2. - trackerSRBP2y/2. - distBottom), 0.); + GeoTrf::Vector3D trans1TSRBP2(trackerSRBP1x/2. + trackerSRBP2x/2., - (trackerSRBP1y/2. - trackerSRBP2y/2. - distBottom), 0.); + GeoTrf::Vector3D trans2TSRBP2(-trackerSRBP1x/2. - trackerSRBP2x/2., - (trackerSRBP1y/2. - trackerSRBP2y/2. - distBottom), 0.); - CLHEP::Hep3Vector trans1TSRBP3(trackerSRBP1x/2. + trackerSRBP2x + trackerSRBP3x/2., - (trackerSRBP1y/2. - trackerSRBP3y/2. - distBottom), 0.); - CLHEP::Hep3Vector trans2TSRBP3(- trackerSRBP1x/2. - trackerSRBP2x - trackerSRBP3x/2., - (trackerSRBP1y/2. - trackerSRBP3y/2. - distBottom), 0.); + GeoTrf::Vector3D trans1TSRBP3(trackerSRBP1x/2. + trackerSRBP2x + trackerSRBP3x/2., - (trackerSRBP1y/2. - trackerSRBP3y/2. - distBottom), 0.); + GeoTrf::Vector3D trans2TSRBP3(- trackerSRBP1x/2. - trackerSRBP2x - trackerSRBP3x/2., - (trackerSRBP1y/2. - trackerSRBP3y/2. - distBottom), 0.); - CLHEP::Hep3Vector trans1TSRBP4(trackerSRBP1x/2. + trackerSRBP2x + trackerSRBP4x/2., trackerSRBP1y/2. - trackerSRBP4y/2. - distTop, 0.); - CLHEP::Hep3Vector trans2TSRBP4(- trackerSRBP1x/2. - trackerSRBP2x - trackerSRBP4x/2.,trackerSRBP1y/2. - trackerSRBP4y/2. - distTop, 0.); + GeoTrf::Vector3D trans1TSRBP4(trackerSRBP1x/2. + trackerSRBP2x + trackerSRBP4x/2., trackerSRBP1y/2. - trackerSRBP4y/2. - distTop, 0.); + GeoTrf::Vector3D trans2TSRBP4(- trackerSRBP1x/2. - trackerSRBP2x - trackerSRBP4x/2.,trackerSRBP1y/2. - trackerSRBP4y/2. - distTop, 0.); //Definition Of Endcap Tracker Support Rail @@ -285,14 +287,14 @@ void SupportRailFactory::create(GeoPhysVol *mother) const GeoBox* trackerSREP2 = new GeoBox(trackerSREP2x/2., trackerSREP2y/2.,zLengthE/2.); const GeoBox* trackerSREP3 = new GeoBox(trackerSREP3x/2., trackerSREP3y/2.,zLengthE/2.); - CLHEP::Hep3Vector trans1TSREP1(0. ,0.,0.); - CLHEP::Hep3Vector trans2TSREP1(0. ,0.,0.); + GeoTrf::Vector3D trans1TSREP1(0. ,0.,0.); + GeoTrf::Vector3D trans2TSREP1(0. ,0.,0.); - CLHEP::Hep3Vector trans1TSREP2(trackerSREP1x/2. + trackerSREP2x/2., -trackerSREP1y/2. + trackerSREP2y/2., 0.); - CLHEP::Hep3Vector trans2TSREP2(- trackerSREP1x/2. - trackerSREP2x/2., -trackerSREP1y/2. + trackerSREP2y/2., 0.); + GeoTrf::Vector3D trans1TSREP2(trackerSREP1x/2. + trackerSREP2x/2., -trackerSREP1y/2. + trackerSREP2y/2., 0.); + GeoTrf::Vector3D trans2TSREP2(- trackerSREP1x/2. - trackerSREP2x/2., -trackerSREP1y/2. + trackerSREP2y/2., 0.); - CLHEP::Hep3Vector trans1TSREP3(trackerSREP1x/2. + trackerSREP3x/2., trackerSREP1y/2. - trackerSREP3y/2., 0.); - CLHEP::Hep3Vector trans2TSREP3(- trackerSREP1x/2. - trackerSREP3x/2., trackerSREP1y/2. - trackerSREP3y/2., 0.); + GeoTrf::Vector3D trans1TSREP3(trackerSREP1x/2. + trackerSREP3x/2., trackerSREP1y/2. - trackerSREP3y/2., 0.); + GeoTrf::Vector3D trans2TSREP3(- trackerSREP1x/2. - trackerSREP3x/2., trackerSREP1y/2. - trackerSREP3y/2., 0.); @@ -352,30 +354,34 @@ void SupportRailFactory::create(GeoPhysVol *mother) //Support rail - male part - CLHEP::Hep3Vector suppPos1Part1(rminInt + xDepthUSP2 + railSP2x - railSP1x/2., - yWidthUSP1/2. + railSP1y/2. + coordY, 0.); - CLHEP::Hep3Vector suppPos2Part1( - rminInt - xDepthUSP2 - railSP2x + railSP1x/2., - yWidthUSP1/2. + railSP1y/2. + coordY, 0.); + GeoTrf::Vector3D suppPos1Part1(rminInt + xDepthUSP2 + railSP2x - railSP1x/2., - yWidthUSP1/2. + railSP1y/2. + coordY, 0.); + GeoTrf::Vector3D suppPos2Part1( - rminInt - xDepthUSP2 - railSP2x + railSP1x/2., - yWidthUSP1/2. + railSP1y/2. + coordY, 0.); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos1Part1)); + pos = new GeoTransform(GeoTrf::Translate3D(suppPos1Part1.x(),suppPos1Part1.y(),suppPos1Part1.z())); mother->add(pos); mother->add(railSupportPhysPart1); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos2Part1)); + pos = new GeoTransform(GeoTrf::Translate3D(suppPos2Part1.x(),suppPos2Part1.y(),suppPos2Part1.z())); mother->add(pos); mother->add(railSupportPhysPart1); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos1Part1 + transRailSupport2Part2)); + GeoTrf::Vector3D tmpVec = suppPos1Part1 + transRailSupport2Part2; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railSupportPhysPart2); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos2Part1 + transRailSupport2Part1)); + tmpVec = suppPos2Part1 + transRailSupport2Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railSupportPhysPart2); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos1Part1+ transRailSupport3Part2)); + tmpVec = suppPos1Part1+ transRailSupport3Part2; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railSupportPhysPart3); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos2Part1+ transRailSupport3Part1)); + tmpVec = suppPos2Part1+ transRailSupport3Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railSupportPhysPart3); @@ -387,140 +393,169 @@ void SupportRailFactory::create(GeoPhysVol *mother) // double safety=0.01; // to provide safety gap for G4 - CLHEP::Hep3Vector railBpos1(railSP1x/2. - railThickB/2. - railSP2x, railSP1y/2. + railWidthB/2., 0.); - CLHEP::Hep3Vector railBpos2(- railSP1x/2. + railThickB/2. + railSP2x, railSP1y/2. + railWidthB/2., 0.); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railBpos1 + suppPos1Part1)); + GeoTrf::Vector3D railBpos1(railSP1x/2. - railThickB/2. - railSP2x, railSP1y/2. + railWidthB/2., 0.); + GeoTrf::Vector3D railBpos2(- railSP1x/2. + railThickB/2. + railSP2x, railSP1y/2. + railWidthB/2., 0.); + tmpVec = railBpos1 + suppPos1Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railBarrelPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railBpos2 + suppPos2Part1)); + tmpVec = railBpos2 + suppPos2Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railBarrelPhys); // // Endcap steel rails // - CLHEP::Hep3Vector railEpos1( railSP1x/2 + railSP3x - exactPl, railSP1y/2. + railEBy/2., (railLengthB+railLengthE)/2.); - CLHEP::Hep3Vector railEpos2( -railSP1x/2 - railSP3x + exactPl, railSP1y/2. + railEBy/2., (railLengthB+railLengthE)/2.); - CLHEP::Hep3Vector railEpos3( railSP1x/2 + railSP3x - exactPl, railSP1y/2. + railEBy/2.,-(railLengthB+railLengthE)/2.); - CLHEP::Hep3Vector railEpos4( -railSP1x/2 - railSP3x + exactPl, railSP1y/2. + railEBy/2.,-(railLengthB+railLengthE)/2.); - - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos1 + vectorForTransFirst + suppPos1Part1)); + GeoTrf::Vector3D railEpos1( railSP1x/2 + railSP3x - exactPl, railSP1y/2. + railEBy/2., (railLengthB+railLengthE)/2.); + GeoTrf::Vector3D railEpos2( -railSP1x/2 - railSP3x + exactPl, railSP1y/2. + railEBy/2., (railLengthB+railLengthE)/2.); + GeoTrf::Vector3D railEpos3( railSP1x/2 + railSP3x - exactPl, railSP1y/2. + railEBy/2.,-(railLengthB+railLengthE)/2.); + GeoTrf::Vector3D railEpos4( -railSP1x/2 - railSP3x + exactPl, railSP1y/2. + railEBy/2.,-(railLengthB+railLengthE)/2.); + tmpVec = railEpos1 + vectorForTransFirst + suppPos1Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railEndcapFirstPhys); for (int i = 0; i < numberOfPieces; i++) { - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), railEpos1 + vectorForTrans[i] + suppPos1Part1)); - mother->add(pos); - mother->add(railEndcapPhys[i]); + tmpVec = railEpos1 + vectorForTrans[i] + suppPos1Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + mother->add(pos); + mother->add(railEndcapPhys[i]); } - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos2 + vectorForTransFirst + suppPos2Part1)); + tmpVec = railEpos2 + vectorForTransFirst + suppPos2Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railEndcapFirstPhys); for (int i = 0; i < numberOfPieces; i++) { - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), railEpos2 + vectorForTrans[i] + suppPos2Part1)); - mother->add(pos); - mother->add(railEndcapPhys[i]); + tmpVec = railEpos2 + vectorForTrans[i] + suppPos2Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + mother->add(pos); + mother->add(railEndcapPhys[i]); } - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos3 + vectorForTransFirst + suppPos1Part1)); + tmpVec = railEpos3 + vectorForTransFirst + suppPos1Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railEndcapFirstPhys); for (int i = 0; i < numberOfPieces; i++) { - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), railEpos3 + vectorForTrans[i] + suppPos1Part1)); - mother->add(pos); - mother->add(railEndcapPhys[i]); + tmpVec = railEpos3 + vectorForTrans[i] + suppPos1Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + mother->add(pos); + mother->add(railEndcapPhys[i]); } - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos4 + vectorForTransFirst + suppPos2Part1)); + tmpVec = railEpos4 + vectorForTransFirst + suppPos2Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(pos); mother->add(railEndcapFirstPhys); for (int i = 0; i < numberOfPieces; i++) { - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), railEpos4 + vectorForTrans[i] + suppPos2Part1)); - mother->add(pos); - mother->add(railEndcapPhys[i]); + tmpVec = railEpos4 + vectorForTrans[i] + suppPos2Part1; + pos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + mother->add(pos); + mother->add(railEndcapPhys[i]); } - CLHEP::Hep3Vector transToInnerWall(rminInt + xDepthUSP2 + railSP2x + railSP3x + trackerSRBP2x + trackerSRBP1x, 0, 0); - CLHEP::Hep3Vector transMalePart(0., 0., 0.); + GeoTrf::Vector3D transToInnerWall(rminInt + xDepthUSP2 + railSP2x + railSP3x + trackerSRBP2x + trackerSRBP1x, 0, 0); + GeoTrf::Vector3D transMalePart(0., 0., 0.); GeoTransform *xfPos; GeoTransform *xfNeg; //Barrel - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),transToInnerWall - CLHEP::Hep3Vector(trackerSRBP1x/2., 0, 0) + trans2TSRBP1 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),- transToInnerWall + CLHEP::Hep3Vector(trackerSRBP1x/2., 0, 0) + trans1TSRBP1 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans2TSRBP1 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSRBP1x/2., 0,0) + trans1TSRBP1 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSRBPP1); mother->add(xfNeg); mother->add(trackerSRBPP1); - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),transToInnerWall - CLHEP::Hep3Vector(trackerSRBP1x/2., 0, 0) + trans2TSRBP2 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - transToInnerWall + CLHEP::Hep3Vector(trackerSRBP1x/2., 0, 0) + trans1TSRBP2 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans2TSRBP2 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans1TSRBP2 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSRBPP2); mother->add(xfNeg); mother->add(trackerSRBPP2); - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), transToInnerWall - CLHEP::Hep3Vector(trackerSRBP1x/2., 0, 0) + trans2TSRBP3 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - transToInnerWall + CLHEP::Hep3Vector(trackerSRBP1x/2., 0, 0) + trans1TSRBP3 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSRBP1x/2., 0,0) + trans2TSRBP3 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans1TSRBP3 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSRBPP3); mother->add(xfNeg); mother->add(trackerSRBPP3); - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), transToInnerWall - CLHEP::Hep3Vector(trackerSRBP1x/2., 0, 0) + trans2TSRBP4 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), -transToInnerWall + CLHEP::Hep3Vector(trackerSRBP1x/2., 0, 0) + trans1TSRBP4 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSRBP1x/2., 0,0) + trans2TSRBP4 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = -transToInnerWall + GeoTrf::Vector3D(trackerSRBP1x/2., 0, 0) + trans1TSRBP4 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSRBPP4); mother->add(xfNeg); mother->add(trackerSRBPP4); //Endcap positiv - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), transToInnerWall - CLHEP::Hep3Vector(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP1 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - transToInnerWall + CLHEP::Hep3Vector(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP1 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP1 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP1 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSREPP1); mother->add(xfNeg); mother->add(trackerSREPP1); - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), transToInnerWall - CLHEP::Hep3Vector(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP2 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - transToInnerWall + CLHEP::Hep3Vector(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP2 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP2 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP2 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSREPP2); mother->add(xfNeg); mother->add(trackerSREPP2); - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), transToInnerWall - CLHEP::Hep3Vector(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP3 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - transToInnerWall + CLHEP::Hep3Vector(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP3 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSREP1x/2., 1.5, zLengthB/2 + zLengthE/2) + trans2TSREP3 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSREP1x/2., -1.5, zLengthB/2 + zLengthE/2) + trans1TSREP3 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSREPP3); mother->add(xfNeg); mother->add(trackerSREPP3); //Endcap negativ - - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), transToInnerWall - CLHEP::Hep3Vector(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP1 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - transToInnerWall + CLHEP::Hep3Vector(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP1 + transMalePart)); + + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP1 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP1 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSREPP1); mother->add(xfNeg); mother->add(trackerSREPP1); - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), transToInnerWall - CLHEP::Hep3Vector(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP2 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - transToInnerWall + CLHEP::Hep3Vector(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP2 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP2 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP2 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSREPP2); mother->add(xfNeg); mother->add(trackerSREPP2); - xfPos = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), transToInnerWall - CLHEP::Hep3Vector(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP3 + transMalePart)); - xfNeg = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), - transToInnerWall + CLHEP::Hep3Vector(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP3 + transMalePart)); + tmpVec = transToInnerWall - GeoTrf::Vector3D(trackerSREP1x/2., 1.5, - zLengthB/2 - zLengthE/2) + trans2TSREP3 + transMalePart; + xfPos = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); + tmpVec = - transToInnerWall + GeoTrf::Vector3D(trackerSREP1x/2., -1.5, - zLengthB/2 - zLengthE/2) + trans1TSREP3 + transMalePart; + xfNeg = new GeoTransform(GeoTrf::Translate3D(tmpVec.x(),tmpVec.y(),tmpVec.z())); mother->add(xfPos); mother->add(trackerSREPP3); mother->add(xfNeg); @@ -544,18 +579,18 @@ void SupportRailFactory::create(GeoPhysVol *mother) // // Default(initial) values // - double RMAX_ID = 1150.0*CLHEP::mm -1.0*CLHEP::mm; //Some safety margin - double railLengthB = 1600.0*CLHEP::mm; - double railWidthB = 5.5*CLHEP::mm; - double railThickB = 34.7*CLHEP::mm; + double RMAX_ID = 1150.0*GeoModelKernelUnits::mm -1.0*GeoModelKernelUnits::mm; //Some safety margin + double railLengthB = 1600.0*GeoModelKernelUnits::mm; + double railWidthB = 5.5*GeoModelKernelUnits::mm; + double railThickB = 34.7*GeoModelKernelUnits::mm; // - double railLengthE = 2600.0*CLHEP::mm; - double railWidthE = 14.*CLHEP::mm; - double railThickE = 14.7*CLHEP::mm; + double railLengthE = 2600.0*GeoModelKernelUnits::mm; + double railWidthE = 14.*GeoModelKernelUnits::mm; + double railThickE = 14.7*GeoModelKernelUnits::mm; // - double suppLength = 6800.0*CLHEP::mm; - double suppWidth = 54.*CLHEP::mm; - double suppThick = 22.6*CLHEP::mm; + double suppLength = 6800.0*GeoModelKernelUnits::mm; + double suppWidth = 54.*GeoModelKernelUnits::mm; + double suppThick = 22.6*GeoModelKernelUnits::mm; // // Database // @@ -578,20 +613,20 @@ void SupportRailFactory::create(GeoPhysVol *mother) double epsilon = 0.01; // +Some safety margin - RMAX_ID = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - railLengthB = (*railrec)[0]->getDouble("LENGTHB")*CLHEP::mm; - railWidthB = (*railrec)[0]->getDouble("WIDTHB")*CLHEP::mm; - railThickB = (*railrec)[0]->getDouble("THICKB")*CLHEP::mm; + RMAX_ID = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + railLengthB = (*railrec)[0]->getDouble("LENGTHB")*GeoModelKernelUnits::mm; + railWidthB = (*railrec)[0]->getDouble("WIDTHB")*GeoModelKernelUnits::mm; + railThickB = (*railrec)[0]->getDouble("THICKB")*GeoModelKernelUnits::mm; //------------ Limited by EP ExternalShell - railLengthE = (*endplate)[0]->getDouble("ZSTART")*CLHEP::mm - +(*endplate)[0]->getDouble("ZSHIFT")*CLHEP::mm - +(*endplate)[0]->getDouble("ZGAP")*CLHEP::mm - railLengthB/2.; - railWidthE = (*railrec)[0]->getDouble("WIDTHE")*CLHEP::mm; - railThickE = (*railrec)[0]->getDouble("THICKE")*CLHEP::mm; + railLengthE = (*endplate)[0]->getDouble("ZSTART")*GeoModelKernelUnits::mm + +(*endplate)[0]->getDouble("ZSHIFT")*GeoModelKernelUnits::mm + +(*endplate)[0]->getDouble("ZGAP")*GeoModelKernelUnits::mm - railLengthB/2.; + railWidthE = (*railrec)[0]->getDouble("WIDTHE")*GeoModelKernelUnits::mm; + railThickE = (*railrec)[0]->getDouble("THICKE")*GeoModelKernelUnits::mm; suppLength = railLengthB + 2.*railLengthE; - suppWidth = (*railrec)[0]->getDouble("WIDTHSUP")*CLHEP::mm; - suppThick = (*railrec)[0]->getDouble("THICKSUP")*CLHEP::mm; + suppWidth = (*railrec)[0]->getDouble("WIDTHSUP")*GeoModelKernelUnits::mm; + suppThick = (*railrec)[0]->getDouble("THICKSUP")*GeoModelKernelUnits::mm; // // To avoid rail corner outside ID envelope RMAX_ID = sqrt(RMAX_ID*RMAX_ID-suppWidth*suppWidth/4.)-epsilon; @@ -616,43 +651,43 @@ void SupportRailFactory::create(GeoPhysVol *mother) // double safety=0.01; // to provide safety gap for G4 - CLHEP::Hep3Vector railBpos1( ( RMAX_ID-suppThick-railThickB/2.-safety), 0., 0.); - CLHEP::Hep3Vector railBpos2( (-RMAX_ID+suppThick+railThickB/2.+safety), 0., 0.); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railBpos1)); + GeoTrf::Translate3D railBpos1( ( RMAX_ID-suppThick-railThickB/2.-safety), 0., 0.); + GeoTrf::Translate3D railBpos2( (-RMAX_ID+suppThick+railThickB/2.+safety), 0., 0.); + pos = new GeoTransform(railBpos1); mother->add(pos); mother->add(railBarrelPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railBpos2)); + pos = new GeoTransform(railBpos2); mother->add(pos); mother->add(railBarrelPhys); // // Endcap steel rails // - CLHEP::Hep3Vector railEpos1( ( RMAX_ID-suppThick-railThickE/2.-safety), 0., (railLengthB+railLengthE)/2.); - CLHEP::Hep3Vector railEpos2( (-RMAX_ID+suppThick+railThickE/2.+safety), 0., (railLengthB+railLengthE)/2.); - CLHEP::Hep3Vector railEpos3( ( RMAX_ID-suppThick-railThickE/2.-safety), 0.,-(railLengthB+railLengthE)/2.); - CLHEP::Hep3Vector railEpos4( (-RMAX_ID+suppThick+railThickE/2.+safety), 0.,-(railLengthB+railLengthE)/2.); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos1)); + GeoTrf::Translate3D railEpos1( ( RMAX_ID-suppThick-railThickE/2.-safety), 0., (railLengthB+railLengthE)/2.); + GeoTrf::Translate3D railEpos2( (-RMAX_ID+suppThick+railThickE/2.+safety), 0., (railLengthB+railLengthE)/2.); + GeoTrf::Translate3D railEpos3( ( RMAX_ID-suppThick-railThickE/2.-safety), 0.,-(railLengthB+railLengthE)/2.); + GeoTrf::Translate3D railEpos4( (-RMAX_ID+suppThick+railThickE/2.+safety), 0.,-(railLengthB+railLengthE)/2.); + pos = new GeoTransform(railEpos1); mother->add(pos); mother->add(railEndcapPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos2)); + pos = new GeoTransform(railEpos2); mother->add(pos); mother->add(railEndcapPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos3)); + pos = new GeoTransform(railEpos3); mother->add(pos); mother->add(railEndcapPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos4)); + pos = new GeoTransform(railEpos4); mother->add(pos); mother->add(railEndcapPhys); // // Rail supports // - CLHEP::Hep3Vector suppPos1( ( RMAX_ID-suppThick/2.), 0., 0.); - CLHEP::Hep3Vector suppPos2( (-RMAX_ID+suppThick/2.), 0., 0.); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos1)); + GeoTrf::Translate3D suppPos1( ( RMAX_ID-suppThick/2.), 0., 0.); + GeoTrf::Translate3D suppPos2( (-RMAX_ID+suppThick/2.), 0., 0.); + pos = new GeoTransform(suppPos1); mother->add(pos); mother->add(supportPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos2)); + pos = new GeoTransform(suppPos2); mother->add(pos); mother->add(supportPhys); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SupportRailFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SupportRailFactoryFS.cxx index 1020cb4e2ac..2b51616c3c2 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SupportRailFactoryFS.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/SupportRailFactoryFS.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/SupportRailFactoryFS.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -70,18 +72,18 @@ void SupportRailFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM) // // Default(initial) values // - double RMAX_ID = 1150.0*CLHEP::mm -1.0*CLHEP::mm; //Some safety margin - double railLengthB = 1600.0*CLHEP::mm; - double railWidthB = 5.5*CLHEP::mm; - double railThickB = 34.7*CLHEP::mm; + double RMAX_ID = 1150.0*GeoModelKernelUnits::mm -1.0*GeoModelKernelUnits::mm; //Some safety margin + double railLengthB = 1600.0*GeoModelKernelUnits::mm; + double railWidthB = 5.5*GeoModelKernelUnits::mm; + double railThickB = 34.7*GeoModelKernelUnits::mm; // - double railLengthE = 2600.0*CLHEP::mm; - double railWidthE = 14.*CLHEP::mm; - double railThickE = 14.7*CLHEP::mm; + double railLengthE = 2600.0*GeoModelKernelUnits::mm; + double railWidthE = 14.*GeoModelKernelUnits::mm; + double railThickE = 14.7*GeoModelKernelUnits::mm; // - double suppLength = 6800.0*CLHEP::mm; - double suppWidth = 54.*CLHEP::mm; - double suppThick = 22.6*CLHEP::mm; + double suppLength = 6800.0*GeoModelKernelUnits::mm; + double suppWidth = 54.*GeoModelKernelUnits::mm; + double suppThick = 22.6*GeoModelKernelUnits::mm; // // Database // @@ -104,20 +106,20 @@ void SupportRailFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM) double epsilon = 0.01; // +Some safety margin - RMAX_ID = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - railLengthB = (*railrec)[0]->getDouble("LENGTHB")*CLHEP::mm; - railWidthB = (*railrec)[0]->getDouble("WIDTHB")*CLHEP::mm; - railThickB = (*railrec)[0]->getDouble("THICKB")*CLHEP::mm; + RMAX_ID = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + railLengthB = (*railrec)[0]->getDouble("LENGTHB")*GeoModelKernelUnits::mm; + railWidthB = (*railrec)[0]->getDouble("WIDTHB")*GeoModelKernelUnits::mm; + railThickB = (*railrec)[0]->getDouble("THICKB")*GeoModelKernelUnits::mm; //------------ Limited by EP ExternalShell - railLengthE = (*endplate)[0]->getDouble("ZSTART")*CLHEP::mm - +(*endplate)[0]->getDouble("ZSHIFT")*CLHEP::mm - +(*endplate)[0]->getDouble("ZGAP")*CLHEP::mm - railLengthB*0.5; - railWidthE = (*railrec)[0]->getDouble("WIDTHE")*CLHEP::mm; - railThickE = (*railrec)[0]->getDouble("THICKE")*CLHEP::mm; + railLengthE = (*endplate)[0]->getDouble("ZSTART")*GeoModelKernelUnits::mm + +(*endplate)[0]->getDouble("ZSHIFT")*GeoModelKernelUnits::mm + +(*endplate)[0]->getDouble("ZGAP")*GeoModelKernelUnits::mm - railLengthB*0.5; + railWidthE = (*railrec)[0]->getDouble("WIDTHE")*GeoModelKernelUnits::mm; + railThickE = (*railrec)[0]->getDouble("THICKE")*GeoModelKernelUnits::mm; suppLength = railLengthB + 2.*railLengthE; - suppWidth = (*railrec)[0]->getDouble("WIDTHSUP")*CLHEP::mm; - suppThick = (*railrec)[0]->getDouble("THICKSUP")*CLHEP::mm; + suppWidth = (*railrec)[0]->getDouble("WIDTHSUP")*GeoModelKernelUnits::mm; + suppThick = (*railrec)[0]->getDouble("THICKSUP")*GeoModelKernelUnits::mm; // // To avoid rail corner outside ID envelope RMAX_ID = sqrt(RMAX_ID*RMAX_ID-suppWidth*suppWidth/4.)-epsilon; @@ -142,59 +144,59 @@ void SupportRailFactoryFS::create(GeoPhysVol *motherP,GeoPhysVol *motherM) // double safety=0.01; // to provide safety gap for G4 - CLHEP::Hep3Vector railBpos1P( ( RMAX_ID-suppThick-railThickB*0.5-safety), 0., railLengthB*0.25); - CLHEP::Hep3Vector railBpos2P( (-RMAX_ID+suppThick+railThickB*0.5+safety), 0., railLengthB*0.25); - CLHEP::Hep3Vector railBpos1M( ( RMAX_ID-suppThick-railThickB*0.5-safety), 0.,-railLengthB*0.25); - CLHEP::Hep3Vector railBpos2M( (-RMAX_ID+suppThick+railThickB*0.5+safety), 0.,-railLengthB*0.25); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railBpos1P)); + GeoTrf::Translate3D railBpos1P( ( RMAX_ID-suppThick-railThickB*0.5-safety), 0., railLengthB*0.25); + GeoTrf::Translate3D railBpos2P( (-RMAX_ID+suppThick+railThickB*0.5+safety), 0., railLengthB*0.25); + GeoTrf::Translate3D railBpos1M( ( RMAX_ID-suppThick-railThickB*0.5-safety), 0.,-railLengthB*0.25); + GeoTrf::Translate3D railBpos2M( (-RMAX_ID+suppThick+railThickB*0.5+safety), 0.,-railLengthB*0.25); + pos = new GeoTransform(railBpos1P); motherP->add(pos); motherP->add(railBarrelPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railBpos2P)); + pos = new GeoTransform(railBpos2P); motherP->add(pos); motherP->add(railBarrelPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railBpos1M)); + pos = new GeoTransform(railBpos1M); motherM->add(pos); motherM->add(railBarrelPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railBpos2M)); + pos = new GeoTransform(railBpos2M); motherM->add(pos); motherM->add(railBarrelPhys); // // Endcap steel rails // - CLHEP::Hep3Vector railEpos1( ( RMAX_ID-suppThick-railThickE*0.5-safety), 0., (railLengthB+railLengthE)*0.5); - CLHEP::Hep3Vector railEpos2( (-RMAX_ID+suppThick+railThickE*0.5+safety), 0., (railLengthB+railLengthE)*0.5); - CLHEP::Hep3Vector railEpos3( ( RMAX_ID-suppThick-railThickE*0.5-safety), 0.,-(railLengthB+railLengthE)*0.5); - CLHEP::Hep3Vector railEpos4( (-RMAX_ID+suppThick+railThickE*0.5+safety), 0.,-(railLengthB+railLengthE)*0.5); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos1)); + GeoTrf::Translate3D railEpos1( ( RMAX_ID-suppThick-railThickE*0.5-safety), 0., (railLengthB+railLengthE)*0.5); + GeoTrf::Translate3D railEpos2( (-RMAX_ID+suppThick+railThickE*0.5+safety), 0., (railLengthB+railLengthE)*0.5); + GeoTrf::Translate3D railEpos3( ( RMAX_ID-suppThick-railThickE*0.5-safety), 0.,-(railLengthB+railLengthE)*0.5); + GeoTrf::Translate3D railEpos4( (-RMAX_ID+suppThick+railThickE*0.5+safety), 0.,-(railLengthB+railLengthE)*0.5); + pos = new GeoTransform(railEpos1); motherP->add(pos); motherP->add(railEndcapPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos2)); + pos = new GeoTransform(railEpos2); motherP->add(pos); motherP->add(railEndcapPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos3)); + pos = new GeoTransform(railEpos3); motherM->add(pos); motherM->add(railEndcapPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),railEpos4)); + pos = new GeoTransform(railEpos4); motherM->add(pos); motherM->add(railEndcapPhys); // // Rail supports // - CLHEP::Hep3Vector suppPos1P( ( RMAX_ID-suppThick*0.5), 0., suppLength*0.25); - CLHEP::Hep3Vector suppPos2P( (-RMAX_ID+suppThick*0.5), 0., suppLength*0.25); - CLHEP::Hep3Vector suppPos1M( ( RMAX_ID-suppThick*0.5), 0.,-suppLength*0.25); - CLHEP::Hep3Vector suppPos2M( (-RMAX_ID+suppThick*0.5), 0.,-suppLength*0.25); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos1P)); + GeoTrf::Translate3D suppPos1P( ( RMAX_ID-suppThick*0.5), 0., suppLength*0.25); + GeoTrf::Translate3D suppPos2P( (-RMAX_ID+suppThick*0.5), 0., suppLength*0.25); + GeoTrf::Translate3D suppPos1M( ( RMAX_ID-suppThick*0.5), 0.,-suppLength*0.25); + GeoTrf::Translate3D suppPos2M( (-RMAX_ID+suppThick*0.5), 0.,-suppLength*0.25); + pos = new GeoTransform(suppPos1P); motherP->add(pos); motherP->add(supportPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos2P)); + pos = new GeoTransform(suppPos2P); motherP->add(pos); motherP->add(supportPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos1M)); + pos = new GeoTransform(suppPos1M); motherM->add(pos); motherM->add(supportPhys); - pos = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),suppPos2M)); + pos = new GeoTransform(suppPos2M); motherM->add(pos); motherM->add(supportPhys); diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactory.cxx index 0506fc6bd21..f4738c0bd9b 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactory.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactory.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/TRT_ServMatFactory.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -77,11 +79,11 @@ void TRT_ServMatFactory::create(GeoPhysVol *mother) m_materialManager->addScalingTable(scalingTable); //VK 10/09/2005 Construct a gap for rails - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; //VK 26.03.2007 Construct a gap for SquirrelCage ribbon - double rminInt = (*cage)[0]->getDouble("RINGRMIN")*CLHEP::mm; + double rminInt = (*cage)[0]->getDouble("RINGRMIN")*GeoModelKernelUnits::mm; //created by Adam Agocs IRDBRecordset_ptr commonParameters = rdbAccessSvc()->getRecordsetPtr("IDDetRailCommon",indetVersionKey.tag(), indetVersionKey.node()); @@ -118,7 +120,7 @@ void TRT_ServMatFactory::create(GeoPhysVol *mother) const GeoShape* serviceTube = serviceTubeTmp; - if( tubeHelper.volData().maxRadius() > rminInt && tubeHelper.volData().phiDelta() > 359.9*CLHEP::degree) + if( tubeHelper.volData().maxRadius() > rminInt && tubeHelper.volData().phiDelta() > 359.9*GeoModelKernelUnits::degree) { // Subtract RailGap out of services serviceTube = (GeoShape*) & (*serviceTubeTmp).subtract(*railGap2).subtract(*railGap1); @@ -133,12 +135,13 @@ void TRT_ServMatFactory::create(GeoPhysVol *mother) if (tubeHelper.name() == "FwdServ") { - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), CLHEP::Hep3Vector(0, 0, tubeHelper.volData().zMid() ) )); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(), - CLHEP::Hep3Vector(0, 0, tubeHelper.volData().zMid() ) )); - mother->add(xform1); mother->add(servPhys); mother->add(xform2); mother->add(servPhys); + GeoTransform *xform1 = new GeoTransform(GeoTrf::Translate3D(0, 0, tubeHelper.volData().zMid() )); + GeoTransform *xform2 = new GeoTransform(GeoTrf::Translate3D(0, 0, -tubeHelper.volData().zMid() )); + mother->add(xform1); mother->add(servPhys); mother->add(xform2); mother->add(servPhys); + } + else { + tubeHelper.placeVolume(mother, servPhys); } - else - tubeHelper.placeVolume(mother, servPhys); } railGap1->unref(); railGap2->unref(); @@ -162,8 +165,8 @@ void TRT_ServMatFactory::create(GeoPhysVol *mother) m_materialManager->addScalingTable(scalingTable); //VK 10/09/2005 Construct a gap for rails - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; double minRofGap = 1050.0; double phiWid=70./outROfIDet; double safetyGap=1.; const GeoShape* railGap1=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , @@ -176,10 +179,10 @@ void TRT_ServMatFactory::create(GeoPhysVol *mother) //VK 26.03.2007 Construct a gap for SquirrelCage ribbon - double rminInt = (*cage)[0]->getDouble("RINGRMIN")*CLHEP::mm; - double ringThick = (*cage)[0]->getDouble("RINGTHICK")*CLHEP::mm; - double ringGap = (*cage)[0]->getDouble("RINGGAP")*CLHEP::mm; - double ribWid = (*cage)[0]->getDouble("RIBWIDTH")*CLHEP::mm; + double rminInt = (*cage)[0]->getDouble("RINGRMIN")*GeoModelKernelUnits::mm; + double ringThick = (*cage)[0]->getDouble("RINGTHICK")*GeoModelKernelUnits::mm; + double ringGap = (*cage)[0]->getDouble("RINGGAP")*GeoModelKernelUnits::mm; + double ribWid = (*cage)[0]->getDouble("RIBWIDTH")*GeoModelKernelUnits::mm; double phiWidSQ=ribWid/(rminInt+ringThick+ringGap/2.); @@ -211,7 +214,7 @@ void TRT_ServMatFactory::create(GeoPhysVol *mother) const GeoShape* ribSup2 = new GeoTubs( tubeHelper.volData().rmin(), tubeHelper.volData().rmax(), 0.5*tubeHelper.volData().length(), -phiWidSQ/2.+M_PI, phiWidSQ); serviceTube = (GeoShape*) & (*serviceTubeTmp).subtract(*ribSup1).subtract(*ribSup2); - } else if( tubeHelper.volData().maxRadius() > minRofGap && tubeHelper.volData().phiDelta() > 359.9*CLHEP::degree) { + } else if( tubeHelper.volData().maxRadius() > minRofGap && tubeHelper.volData().phiDelta() > 359.9*GeoModelKernelUnits::degree) { // Subtract RailGap out of services serviceTube = (GeoShape*) & (*serviceTubeTmp).subtract(*railGap2).subtract(*railGap1); } diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryDC2.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryDC2.cxx index 9d63a9e75ec..51e16b5d099 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryDC2.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryDC2.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/TRT_ServMatFactoryDC2.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -73,10 +75,10 @@ void TRT_ServMatFactoryDC2::create(GeoPhysVol *mother) for (int ii=0; ii<NUMBEROFPANEL; ii++) { const GeoMaterial* cylMat = m_materialManager->getMaterial("trt::PatchOut"); - double rmin = (*ipan)[ii]->getFloat("RMIN")*CLHEP::cm; - double rmax = (*ipan)[ii]->getFloat("RMAX")*CLHEP::cm; - double zmin = (*ipan)[ii]->getFloat("ZMIN")*CLHEP::cm; - double zmax = (*ipan)[ii]->getFloat("ZMAX")*CLHEP::cm; + double rmin = (*ipan)[ii]->getFloat("RMIN")*GeoModelKernelUnits::cm; + double rmax = (*ipan)[ii]->getFloat("RMAX")*GeoModelKernelUnits::cm; + double zmin = (*ipan)[ii]->getFloat("ZMIN")*GeoModelKernelUnits::cm; + double zmax = (*ipan)[ii]->getFloat("ZMAX")*GeoModelKernelUnits::cm; double halflength = (zmax-zmin)/2.-2*epsilon; double zpos = zmin + halflength+2*epsilon; @@ -88,10 +90,10 @@ void TRT_ServMatFactoryDC2::create(GeoPhysVol *mother) const GeoLogVol* ServLog = new GeoLogVol(logName,serviceTube,cylMat); GeoVPhysVol* ServPhys = new GeoPhysVol(ServLog); // place two - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - CLHEP::Hep3Vector servpos2(0.,0.,-zpos); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos2)); + GeoTrf::Translate3D servpos1(0.,0.,zpos); + GeoTrf::Translate3D servpos2(0.,0.,-zpos); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(servpos2); mother->add(xform1); mother->add(ServPhys); mother->add(xform2); @@ -105,15 +107,15 @@ void TRT_ServMatFactoryDC2::create(GeoPhysVol *mother) std::ostringstream o; o << ii; std::string logName = "TrtInel"+o.str(); - double halflength = ((*inel)[ii]->getFloat("ZMAX")-(*inel)[ii]->getFloat("ZMIN"))/2.*CLHEP::cm; + double halflength = ((*inel)[ii]->getFloat("ZMAX")-(*inel)[ii]->getFloat("ZMIN"))/2.*GeoModelKernelUnits::cm; int volType = (int) (*inel)[ii]->getFloat("VOLTYP"); const GeoShape* serviceTube = createShape(volType, - (*inel)[ii]->getFloat("RMIN1")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX1")*CLHEP::cm, + (*inel)[ii]->getFloat("RMIN1")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX1")*GeoModelKernelUnits::cm, halflength, - (*inel)[ii]->getFloat("RMIN2")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX2")*CLHEP::cm); + (*inel)[ii]->getFloat("RMIN2")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX2")*GeoModelKernelUnits::cm); // create the material... // In AGE the radiation length is specified and from that the density is // calculated assuming the material is C. I do the same here for now but @@ -130,21 +132,21 @@ void TRT_ServMatFactoryDC2::create(GeoPhysVol *mother) cylMat = createMaterial(nameStr.str(), volType, fractionRL, - (*inel)[ii]->getFloat("RMIN1")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX1")*CLHEP::cm, + (*inel)[ii]->getFloat("RMIN1")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX1")*GeoModelKernelUnits::cm, halflength, - (*inel)[ii]->getFloat("RMIN2")*CLHEP::cm, - (*inel)[ii]->getFloat("RMAX2")*CLHEP::cm); + (*inel)[ii]->getFloat("RMIN2")*GeoModelKernelUnits::cm, + (*inel)[ii]->getFloat("RMAX2")*GeoModelKernelUnits::cm); } const GeoLogVol* ServLog = new GeoLogVol(logName,serviceTube,cylMat); GeoVPhysVol* ServPhys = new GeoPhysVol(ServLog); - double zpos = ((*inel)[ii]->getFloat("ZMAX")+(*inel)[ii]->getFloat("ZMIN"))/2.*CLHEP::cm+epsilon; + double zpos = ((*inel)[ii]->getFloat("ZMAX")+(*inel)[ii]->getFloat("ZMIN"))/2.*GeoModelKernelUnits::cm+epsilon; // place two - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - CLHEP::Hep3Vector servpos2(0.,0.,-zpos); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos2)); + GeoTrf::Translate3D servpos1(0.,0.,zpos); + GeoTrf::Translate3D servpos2(0.,0.,-zpos); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(servpos2); mother->add(xform1); mother->add(ServPhys); mother->add(xform2); @@ -163,7 +165,7 @@ const GeoShape* TRT_ServMatFactoryDC2::createShape(int volType, double rmax2=0.) { - const double epsilon = 0.001*CLHEP::mm; + const double epsilon = 0.001*GeoModelKernelUnits::mm; enum VOLTYPE{Tube=1, Cone, ICone}; const GeoShape* IDShape = 0; if(volType == Tube) { diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryDC3.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryDC3.cxx index bd83601d73d..8ea66da54ed 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryDC3.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryDC3.cxx @@ -5,6 +5,8 @@ #include "InDetServMatGeoModel/TRT_ServMatFactoryDC3.h" // GeoModel includes +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoTube.h" @@ -61,8 +63,8 @@ void TRT_ServMatFactoryDC3::create(GeoPhysVol *mother) //VVK 10/09/2005 Construct a gap for rails - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; double minRofGap = 1050.0; double phiWid=70./outROfIDet; double safetyGap=1.; const GeoShape* railGap1=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , @@ -76,10 +78,10 @@ void TRT_ServMatFactoryDC3::create(GeoPhysVol *mother) for (int ii=0; ii<NUMBEROFPANEL; ii++) { const GeoMaterial* cylMat = materialManager()->getMaterial("trt::PatchOut"); - double rmin = (*ipan)[ii]->getFloat("RMIN")*CLHEP::cm; - double rmax = (*ipan)[ii]->getFloat("RMAX")*CLHEP::cm; - double zmin = (*ipan)[ii]->getFloat("ZMIN")*CLHEP::cm; - double zmax = (*ipan)[ii]->getFloat("ZMAX")*CLHEP::cm; + double rmin = (*ipan)[ii]->getFloat("RMIN")*GeoModelKernelUnits::cm; + double rmax = (*ipan)[ii]->getFloat("RMAX")*GeoModelKernelUnits::cm; + double zmin = (*ipan)[ii]->getFloat("ZMIN")*GeoModelKernelUnits::cm; + double zmax = (*ipan)[ii]->getFloat("ZMAX")*GeoModelKernelUnits::cm; double halflength = (zmax-zmin)/2.-2*epsilon; double zpos = zmin + halflength+2*epsilon; @@ -102,10 +104,10 @@ void TRT_ServMatFactoryDC3::create(GeoPhysVol *mother) GeoVPhysVol* ServPhys = new GeoPhysVol(ServLog); // place two - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - CLHEP::Hep3Vector servpos2(0.,0.,-zpos); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos2)); + GeoTrf::Translate3D servpos1(0.,0.,zpos); + GeoTrf::Translate3D servpos2(0.,0.,-zpos); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(servpos2); mother->add(xform1); mother->add(ServPhys); mother->add(xform2); @@ -131,12 +133,12 @@ void TRT_ServMatFactoryDC3::create(GeoPhysVol *mother) o << irecold++; std::string logName = "TrtInel"+o.str(); int volType = (int) (*inel)[ii]->getFloat("VOLTYP"); - double RMIN1=(*inel)[ii]->getFloat("RMIN1")*CLHEP::cm; - double RMAX1=(*inel)[ii]->getFloat("RMAX1")*CLHEP::cm; - double RMIN2=(*inel)[ii]->getFloat("RMIN2")*CLHEP::cm; - double RMAX2=(*inel)[ii]->getFloat("RMAX2")*CLHEP::cm; - double ZMAX= (*inel)[ii]->getFloat("ZMAX")*CLHEP::cm; - double ZMIN= (*inel)[ii]->getFloat("ZMIN")*CLHEP::cm; + double RMIN1=(*inel)[ii]->getFloat("RMIN1")*GeoModelKernelUnits::cm; + double RMAX1=(*inel)[ii]->getFloat("RMAX1")*GeoModelKernelUnits::cm; + double RMIN2=(*inel)[ii]->getFloat("RMIN2")*GeoModelKernelUnits::cm; + double RMAX2=(*inel)[ii]->getFloat("RMAX2")*GeoModelKernelUnits::cm; + double ZMAX= (*inel)[ii]->getFloat("ZMAX")*GeoModelKernelUnits::cm; + double ZMIN= (*inel)[ii]->getFloat("ZMIN")*GeoModelKernelUnits::cm; //VK Change of TRT barrel cables definition // if(ii == 3) { RMIN1 += 0; RMAX1=RMIN1+0.589; ZMIN=950.; ZMAX=3250;} @@ -182,10 +184,10 @@ void TRT_ServMatFactoryDC3::create(GeoPhysVol *mother) GeoVPhysVol* ServPhys = new GeoPhysVol(ServLog); double zpos = (ZMAX+ZMIN)/2.+epsilon; // place two - CLHEP::Hep3Vector servpos1(0.,0.,zpos); - CLHEP::Hep3Vector servpos2(0.,0.,-zpos); - GeoTransform *xform1 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos1)); - GeoTransform *xform2 = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),servpos2)); + GeoTrf::Translate3D servpos1(0.,0.,zpos); + GeoTrf::Translate3D servpos2(0.,0.,-zpos); + GeoTransform *xform1 = new GeoTransform(servpos1); + GeoTransform *xform2 = new GeoTransform(servpos2); mother->add(xform1); mother->add(ServPhys); mother->add(xform2); @@ -205,7 +207,7 @@ void TRT_ServMatFactoryDC3::create(GeoPhysVol *mother) double rmax2=0.) { - const double epsilon = 0.001*CLHEP::mm; + const double epsilon = 0.001*GeoModelKernelUnits::mm; enum VOLTYPE{Tube=1, Cone, ICone}; const GeoShape* IDShape = 0; if(volType == Tube) { diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx index 60ce650f9c9..342c02f44fd 100755 --- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx +++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/TRT_ServMatFactoryFS.cxx @@ -75,8 +75,8 @@ void TRT_ServMatFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) //VK 10/09/2005 Construct a gap for rails - double outROfIDet = (*atls)[0]->getDouble("IDETOR")*CLHEP::cm; - double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*CLHEP::cm; + double outROfIDet = (*atls)[0]->getDouble("IDETOR")*GeoModelKernelUnits::cm; + double endZOfIDet = (*atls)[0]->getDouble("IDETZMX")*GeoModelKernelUnits::cm; double minRofGap = 1050.0; double phiWid=70./outROfIDet; double safetyGap=1.; const GeoShape* railGap1=new GeoTubs( minRofGap, outROfIDet+safetyGap ,endZOfIDet+safetyGap , @@ -89,10 +89,10 @@ void TRT_ServMatFactoryFS::create(GeoPhysVol *motherP, GeoPhysVol *motherM) //VK 26.03.2007 Construct a gap for SquirrelCage ribbon - double rminInt = (*cage)[0]->getDouble("RINGRMIN")*CLHEP::mm; - double ringThick = (*cage)[0]->getDouble("RINGTHICK")*CLHEP::mm; - double ringGap = (*cage)[0]->getDouble("RINGGAP")*CLHEP::mm; - double ribWid = (*cage)[0]->getDouble("RIBWIDTH")*CLHEP::mm; + double rminInt = (*cage)[0]->getDouble("RINGRMIN")*GeoModelKernelUnits::mm; + double ringThick = (*cage)[0]->getDouble("RINGTHICK")*GeoModelKernelUnits::mm; + double ringGap = (*cage)[0]->getDouble("RINGGAP")*GeoModelKernelUnits::mm; + double ribWid = (*cage)[0]->getDouble("RIBWIDTH")*GeoModelKernelUnits::mm; double phiWidSQ=ribWid/(rminInt+ringThick+ringGap/2.); diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt index 5b643f28a1e..f049c6b8419 100644 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/CMakeLists.txt @@ -18,7 +18,6 @@ atlas_depends_on_subdirs( PUBLIC AtlasGeometryCommon/BeamPipeGeoModel AtlasGeometryCommon/SubDetectorEnvelopes Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/Identifier InnerDetector/InDetDetDescr/InDetReadoutGeometry Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv @@ -29,13 +28,14 @@ atlas_depends_on_subdirs( PUBLIC find_package( Boost COMPONENTS filesystem thread system ) find_package( Eigen ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( InDetTrackingGeometry src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel InDetIdentifier TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry BeamPipeGeoModelLib StoreGateLib SGtests GeoModelKernel Identifier InDetReadoutGeometry TrkDetDescrGeoModelCnv TrkSurfaces TrkVolumes ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel InDetIdentifier TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry BeamPipeGeoModelLib StoreGateLib SGtests Identifier InDetReadoutGeometry TrkDetDescrGeoModelCnv TrkSurfaces TrkVolumes ) # Install files from the package: atlas_install_headers( InDetTrackingGeometry ) diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/BeamPipeBuilder.cxx b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/BeamPipeBuilder.cxx index 2527cf4616a..b0f843b2a3d 100755 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/BeamPipeBuilder.cxx +++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/src/BeamPipeBuilder.cxx @@ -36,7 +36,7 @@ InDet::BeamPipeBuilder::BeamPipeBuilder(const std::string& t, const std::string& m_beamPipeOffsetX(0.*Gaudi::Units::mm), m_beamPipeOffsetY(0.*Gaudi::Units::mm), m_beamPipeRadius(33.1*Gaudi::Units::mm), - m_beamPipeHalflength(2.7*CLHEP::m), + m_beamPipeHalflength(2.7*Gaudi::Units::m), m_beamPipeThickness(1.*Gaudi::Units::mm), m_beamPipeX0(352.8*Gaudi::Units::mm), m_beamPipeL0(407.*Gaudi::Units::mm), @@ -109,9 +109,9 @@ const std::vector< const Trk::CylinderLayer* >* InDet::BeamPipeBuilder::cylindri if (m_beamPipeMgr){ // get the central top volume PVConstLink beamPipeTopVolume = m_beamPipeMgr->getTreeTop(0); - (*beamPipeTransform) = Amg::Translation3D(beamPipeTopVolume->getX().getTranslation().x(), - beamPipeTopVolume->getX().getTranslation().y(), - beamPipeTopVolume->getX().getTranslation().z()); + (*beamPipeTransform) = Amg::Translation3D(beamPipeTopVolume->getX().translation().x(), + beamPipeTopVolume->getX().translation().y(), + beamPipeTopVolume->getX().translation().z()); const GeoLogVol* beamPipeLogVolume = beamPipeTopVolume->getLogVol(); const GeoTube* beamPipeTube = 0; if (beamPipeLogVolume){ diff --git a/InnerDetector/InDetDetDescr/PixelCabling/CMakeLists.txt b/InnerDetector/InDetDetDescr/PixelCabling/CMakeLists.txt index 115ba20ca14..3cf3b433165 100644 --- a/InnerDetector/InDetDetDescr/PixelCabling/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/PixelCabling/CMakeLists.txt @@ -16,8 +16,8 @@ atlas_depends_on_subdirs( Control/StoreGate Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/Identifier + InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetDetDescr/InDetIdentifier - InnerDetector/InDetDetDescr/PixelGeoModel Tools/PathResolver ) # External dependencies: @@ -38,8 +38,7 @@ atlas_add_component( PixelCabling ${TDAQ-COMMON_INCLUDE_DIRS} LINK_LIBRARIES ${CORAL_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} GaudiKernel AthenaBaseComps SGTools StoreGateLib - AthenaPoolUtilities Identifier InDetIdentifier PathResolver PixelGeoModelLib - PixelCablingLib ) + AthenaPoolUtilities Identifier InDetIdentifier InDetReadoutGeometry PathResolver PixelCablingLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt index 6be57eed88d..6718e6b6982 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/CMakeLists.txt @@ -12,9 +12,9 @@ atlas_depends_on_subdirs( Control/AthenaKernel Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities DetectorDescription/Identifier + DetectorDescription/GeoPrimitives GaudiKernel InnerDetector/InDetDetDescr/InDetGeoModelUtils InnerDetector/InDetDetDescr/InDetReadoutGeometry @@ -27,14 +27,15 @@ atlas_depends_on_subdirs( InnerDetector/InDetDetDescr/InDetIdentifier ) # External dependencies: -find_package( CLHEP ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( PixelGeoModelLib PixelGeoModel/*.h src/*.cxx PUBLIC_HEADERS PixelGeoModel - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GeoModelKernel + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps AthenaKernel GeoModelUtilities Identifier GaudiKernel InDetGeoModelUtils InDetReadoutGeometry PRIVATE_LINK_LIBRARIES SGTools StoreGateLib DetDescrConditions diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Det.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Det.cxx index 09a31ecd1a0..f75a38c352f 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Det.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Det.cxx @@ -2,9 +2,9 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/DBM_Det.h" -#include "PixelGeoModel/DBM_Telescope.h" -#include "PixelGeoModel/DBM_Services.h" +#include "DBM_Det.h" +#include "DBM_Telescope.h" +#include "DBM_Services.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoIdentifierTag.h" @@ -21,7 +21,7 @@ DBM_Det::DBM_Det() { // Radius to beamline // Hardcoded, so if change then change in DBM_module too - double trans_rad = 46.678*CLHEP::mm + (m_gmt_mgr->DBMTelescopeY()) / 2.; // 10-CLHEP::degree version + double trans_rad = 46.678*GeoModelKernelUnits::mm + (m_gmt_mgr->DBMTelescopeY()) / 2.; // 10-GeoModelKernelUnits::degree version // TRANS_X TRANS_Y TRANS_Z ROT_X ROT_Y ROT_Z m_module[0].push_back(trans_rad); m_module[0].push_back(0); m_module[0].push_back(Trans_Y); m_module[0].push_back(0); m_module[0].push_back(0); m_module[0].push_back(270); @@ -36,21 +36,19 @@ GeoVPhysVol* DBM_Det::Build() double safety = 0.001; //create a cylinder 8mm smaller than the BPSS outer radius to place the 4 DBM telescopes - double rmin = 45.*CLHEP::mm;//41.0*CLHEP::mm; - double rmax = 150.*CLHEP::mm; //244.*CLHEP::mm; - double halflength = m_gmt_mgr->DBMTelescopeZ()/2.;//200.*CLHEP::mm + double rmin = 45.*GeoModelKernelUnits::mm;//41.0*GeoModelKernelUnits::mm; + double rmax = 150.*GeoModelKernelUnits::mm; //244.*GeoModelKernelUnits::mm; + double halflength = m_gmt_mgr->DBMTelescopeZ()/2.;//200.*GeoModelKernelUnits::mm GeoTube * Shape = new GeoTube(rmin,rmax,halflength); const GeoMaterial* air = m_mat_mgr->getMaterial("std::Air"); const GeoLogVol* Log = new GeoLogVol("OutsideDBM",Shape,air); GeoFullPhysVol* Phys = new GeoFullPhysVol(Log); - CLHEP::HepRotation pp0rm; - // add PP0 board DBM_PP0 pp0Board; GeoVPhysVol* pp0BoardPhys = pp0Board.Build(); - CLHEP::Hep3Vector pp0Pos(0., 0., -halflength + m_gmt_mgr->DBMPP0Thick()/2. + safety); - GeoTransform* pp0xform = new GeoTransform(HepGeom::Transform3D(pp0rm,pp0Pos)); + GeoTrf::Translate3D pp0Pos(0., 0., -halflength + m_gmt_mgr->DBMPP0Thick()/2. + safety); + GeoTransform* pp0xform = new GeoTransform(pp0Pos); GeoNameTag* pp0tag = new GeoNameTag("DBM_PP0"); Phys->add(pp0tag); Phys->add(pp0xform); @@ -68,12 +66,11 @@ GeoVPhysVol* DBM_Det::Build() else if ((m_gmt_mgr->GetSide() < 0) && (i == 2)) m_gmt_mgr->SetPhi(0); //setting transformation - CLHEP::HepRotation rm; - CLHEP::Hep3Vector pos(m_module[i].at(0), m_module[i].at(1), m_module[i].at(2)); - rm.rotateX(m_module[i].at(3)*CLHEP::deg); - rm.rotateY(m_module[i].at(4)*CLHEP::deg); - rm.rotateZ(m_module[i].at(5)*CLHEP::deg); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(m_module[i].at(5)*GeoModelKernelUnits::deg) + * GeoTrf::RotateY3D(m_module[i].at(4)*GeoModelKernelUnits::deg) + * GeoTrf::RotateX3D(m_module[i].at(3)*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos(m_module[i].at(0), m_module[i].at(1), m_module[i].at(2)); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm)); GeoNameTag* tag = new GeoNameTag("DBM Module"); GeoVPhysVol* dbmModPhys = dbm.Build(); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Det.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Det.h similarity index 88% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Det.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Det.h index 711a8c95fd5..eff92889205 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Det.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Det.h @@ -9,9 +9,7 @@ #define DBMDET_H -#include "PixelGeoModel/GeoVPixelFactory.h" -#include "CLHEP/Geometry/Transform3D.h" - +#include "GeoVPixelFactory.h" #include "GaudiKernel/MsgStream.h" #include <iostream> diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx index 1fedff25c77..d4bfe3ff3f6 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.cxx @@ -3,7 +3,7 @@ */ -#include "PixelGeoModel/DBM_Module.h" +#include "DBM_Module.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" @@ -64,7 +64,7 @@ GeoVPhysVol* DBM_Module::Build() GeoIdentifierTag* diamondTag = new GeoIdentifierTag(400); - double safety = 0.003*CLHEP::mm; + double safety = 0.003*GeoModelKernelUnits::mm; //diamond dimension double diamond_X = m_gmt_mgr->DBMDiamondX(); @@ -84,8 +84,8 @@ GeoVPhysVol* DBM_Module::Build() //distances from bottom of the ceramic //Hardcoded! - double bot2Chip = 0.0*CLHEP::mm; - double bot2Diamond = 1.685*CLHEP::mm; + double bot2Chip = 0.0*GeoModelKernelUnits::mm; + double bot2Diamond = 1.685*GeoModelKernelUnits::mm; //--------------------------------------------- @@ -93,8 +93,8 @@ GeoVPhysVol* DBM_Module::Build() // Position of the corner closest to IP and beamline // Hardcoded, so if change then change in GeoPixelEnvelope and DBM_Det too - double ZToIP = 887.002*CLHEP::mm; - double RToBeam = 46.678*CLHEP::mm; + double ZToIP = 887.002*GeoModelKernelUnits::mm; + double RToBeam = 46.678*GeoModelKernelUnits::mm; // layer spacing double Zspacing = m_gmt_mgr->DBMSpacingZ(); @@ -146,10 +146,7 @@ GeoVPhysVol* DBM_Module::Build() const GeoLogVol* dbmModuleLog = new GeoLogVol("dbmModuleLog", dbmModuleBox, air); GeoPhysVol* dbmModulePhys = new GeoPhysVol(dbmModuleLog); - CLHEP::HepRotation rm; - rm.rotateY(270.*CLHEP::deg); - rm.rotateZ(90.*CLHEP::deg); - + GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(270.*GeoModelKernelUnits::deg); //diamond const GeoBox* dbmDiamondBox = new GeoBox(diamond_Z/2.0, diamond_X/2.0, diamond_Y/2.0 ); @@ -181,8 +178,8 @@ GeoVPhysVol* DBM_Module::Build() // add the element to the manager m_DDmgr->addDetectorElement(element); - CLHEP::Hep3Vector dbmDiamondPos(0, bot2Diamond+diamond_Y/2.0-substrate_Y/2.0, diamond_Z/2.0-max_thick/2.0); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,dbmDiamondPos)); + GeoTrf::Translation3D dbmDiamondPos(0, bot2Diamond+diamond_Y/2.0-substrate_Y/2.0, diamond_Z/2.0-max_thick/2.0); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(dbmDiamondPos*rm)); //tag = new GeoNameTag("dbmDiamond"); //dbmModulePhys->add(tag); dbmModulePhys->add(diamondTag); @@ -194,8 +191,8 @@ GeoVPhysVol* DBM_Module::Build() const GeoLogVol* dbmFEI4Log = new GeoLogVol("dbmWallLogF4", dbmFEI4Box, chip_mat); //should this be "dbmdiamondLog"? GeoPhysVol* dbmFEI4Phys = new GeoPhysVol(dbmFEI4Log); - CLHEP::Hep3Vector dbmFEI4Pos(0, bot2Chip+chip_Y/2.0-substrate_Y/2.0, max_thick/2.0-substrate_Z-chip_thick/2.0); - xform = new GeoTransform(HepGeom::Transform3D(rm,dbmFEI4Pos)); + GeoTrf::Translation3D dbmFEI4Pos(0, bot2Chip+chip_Y/2.0-substrate_Y/2.0, max_thick/2.0-substrate_Z-chip_thick/2.0); + xform = new GeoTransform(GeoTrf::Transform3D(dbmFEI4Pos*rm)); //tag = new GeoNameTag("dbmFEI4"); //dbmModulePhys->add(tag); dbmModulePhys->add(xform); @@ -207,9 +204,8 @@ GeoVPhysVol* DBM_Module::Build() const GeoLogVol* dbmSubstLog = new GeoLogVol("dbmWallLogCe", dbmSubstBox, aluminiumNitride); GeoPhysVol* dbmSubstPhys = new GeoPhysVol(dbmSubstLog); - CLHEP::HepRotation rmA; - CLHEP::Hep3Vector dbmSubstPos(0, 0, max_thick/2.0-substrate_Z/2.0); - xform = new GeoTransform(HepGeom::Transform3D(rmA,dbmSubstPos)); + GeoTrf::Translate3D dbmSubstPos(0, 0, max_thick/2.0-substrate_Z/2.0); + xform = new GeoTransform(dbmSubstPos); //tag = new GeoNameTag("dbmSubstrate"); //dbmModulePhys->add(tag); dbmModulePhys->add(xform); @@ -228,10 +224,9 @@ GeoVPhysVol* DBM_Module::Build() double globPosZ = ZToIP + layerUnitPos_Z + (sensorPosInModuleCage_Z * cos(angle) - sensorPosInModuleCage_Y * sin(angle)); double globPosY = RToBeam + layerUnitPos_Y + (sensorPosInModuleCage_Z * sin(angle) + sensorPosInModuleCage_Y * cos(angle)); - CLHEP::HepRotation rmX10; - rmX10.rotateX(-10.*CLHEP::deg); - CLHEP::Hep3Vector alignTransformPos(0, globPosY, globPosZ); - GeoAlignableTransform *xformAlign = new GeoAlignableTransform(HepGeom::Transform3D(rmX10, alignTransformPos)); + GeoTrf::RotateX3D rmX10(-10.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D alignTransformPos(0, globPosY, globPosZ); + GeoAlignableTransform *xformAlign = new GeoAlignableTransform(GeoTrf::Transform3D(alignTransformPos*rmX10)); m_DDmgr->addAlignableTransform(0, idwafer, xformAlign, dbmDiamondPhys); //----------------------------------------------------- diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Module.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.h similarity index 90% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Module.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.h index 40e44caf86f..13509ca8928 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Module.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Module.h @@ -5,14 +5,12 @@ #ifndef DBMModule_H #define DBMModule_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" -#include "CLHEP/Geometry/Transform3D.h" - /* @class DBM_Module * * Build the DBM Module consisting of diamond sensor, FEI4 and ceramic substrate diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_ModuleCage.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_ModuleCage.cxx index 3f21d333680..2f72f02edd6 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_ModuleCage.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_ModuleCage.cxx @@ -2,8 +2,8 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/DBM_ModuleCage.h" -#include "PixelGeoModel/DBM_Module.h" +#include "DBM_ModuleCage.h" +#include "DBM_Module.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTransform.h" @@ -20,7 +20,7 @@ GeoVPhysVol* DBM_ModuleCage::Build() { // safety, to make sure volumes don't overlap - double safety = 0.005*CLHEP::mm; + double safety = 0.005*GeoModelKernelUnits::mm; // Telescope dimension double layerUnitY = m_gmt_mgr->DBMModuleCageY(); @@ -113,8 +113,6 @@ GeoVPhysVol* DBM_ModuleCage::Build() { // Y coordinate double mainPlatePosY = -layerUnitY/2. + mainPlateY/2.; - CLHEP::HepRotation rm; - // store initial value Eta value int tempLD = m_gmt_mgr->GetLD(); @@ -137,8 +135,8 @@ GeoVPhysVol* DBM_ModuleCage::Build() { GeoVPhysVol* modulePhys = module.Build(); Rspacing = m_gmt_mgr->DBMSpacingRadial(); - CLHEP::Hep3Vector modulePos(0, -layerUnitY/2. + Rspacing + ceramicY/2., mainPlatePosZ[i]-mainPlateZ/2.-(ceramicZ+FEI4Z+moduleAirGap+diamondZ + kaptonZ)/2.-2*safety); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,modulePos)); + GeoTrf::Translate3D modulePos(0, -layerUnitY/2. + Rspacing + ceramicY/2., mainPlatePosZ[i]-mainPlateZ/2.-(ceramicZ+FEI4Z+moduleAirGap+diamondZ + kaptonZ)/2.-2*safety); + GeoTransform* xform = new GeoTransform(modulePos); GeoNameTag* tag = new GeoNameTag(tag_module[i].c_str()); containerPhys->add(tag); containerPhys->add(new GeoIdentifierTag(i)); @@ -147,27 +145,27 @@ GeoVPhysVol* DBM_ModuleCage::Build() { // add main plate - CLHEP::Hep3Vector mPSideAPos((mainPlateX+mPlateWindowX)/4.+safety/2., mainPlatePosY, mainPlatePosZ[i]); - xform = new GeoTransform(HepGeom::Transform3D(rm,mPSideAPos)); + GeoTrf::Translate3D mPSideAPos((mainPlateX+mPlateWindowX)/4.+safety/2., mainPlatePosY, mainPlatePosZ[i]); + xform = new GeoTransform(mPSideAPos); tag = new GeoNameTag(tag_mainPlate[i].c_str()); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(mPSidePhys); - CLHEP::Hep3Vector mPSideBPos(-(mainPlateX+mPlateWindowX)/4.-safety/2., mainPlatePosY, mainPlatePosZ[i]); - xform = new GeoTransform(HepGeom::Transform3D(rm,mPSideBPos)); + GeoTrf::Translate3D mPSideBPos(-(mainPlateX+mPlateWindowX)/4.-safety/2., mainPlatePosY, mainPlatePosZ[i]); + xform = new GeoTransform(mPSideBPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(mPSidePhys); - CLHEP::Hep3Vector mPBotPos(0.0, (-layerUnitY + mPlateWindowPos)/2.-safety/2., mainPlatePosZ[i]); - xform = new GeoTransform(HepGeom::Transform3D(rm,mPBotPos)); + GeoTrf::Translate3D mPBotPos(0.0, (-layerUnitY + mPlateWindowPos)/2.-safety/2., mainPlatePosZ[i]); + xform = new GeoTransform(mPBotPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(mPCenterBotPhys); - CLHEP::Hep3Vector mPTopPos(0.0, (-layerUnitY + mainPlateY + mPlateWindowY + mPlateWindowPos)/2.+safety/2., mainPlatePosZ[i]); - xform = new GeoTransform(HepGeom::Transform3D(rm,mPTopPos)); + GeoTrf::Translate3D mPTopPos(0.0, (-layerUnitY + mainPlateY + mPlateWindowY + mPlateWindowPos)/2.+safety/2., mainPlatePosZ[i]); + xform = new GeoTransform(mPTopPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(mPCenterTopPhys); @@ -198,8 +196,8 @@ GeoVPhysVol* DBM_ModuleCage::Build() { //**** add flex support - CLHEP::Hep3Vector flexSuppPos(0.0, flexSuppPosY, flexSuppPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,flexSuppPos)); + GeoTrf::Translate3D flexSuppPos(0.0, flexSuppPosY, flexSuppPosZ); + xform = new GeoTransform(flexSuppPos); tag = new GeoNameTag(tag_flex[i].c_str()); containerPhys->add(tag); containerPhys->add(xform); @@ -215,27 +213,27 @@ GeoVPhysVol* DBM_ModuleCage::Build() { double rodPosZ = mainPlatePosZ[i] - mainPlateZ/2.0 - layer1Space/2.; // Z position of rod - CLHEP::Hep3Vector rodAPos(mPlateRod2RodX/2., topRodPosY, rodPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,rodAPos)); + GeoTrf::Translate3D rodAPos(mPlateRod2RodX/2., topRodPosY, rodPosZ); + xform = new GeoTransform(rodAPos); tag = new GeoNameTag(tag_rod[i].c_str()); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(rodAPhys); - CLHEP::Hep3Vector rodBPos(-mPlateRod2RodX/2., topRodPosY, rodPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,rodBPos)); + GeoTrf::Translate3D rodBPos(-mPlateRod2RodX/2., topRodPosY, rodPosZ); + xform = new GeoTransform(rodBPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(rodAPhys); - CLHEP::Hep3Vector rodCPos(mPlateRod2RodX/2., botRodPosY, rodPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,rodCPos)); + GeoTrf::Translate3D rodCPos(mPlateRod2RodX/2., botRodPosY, rodPosZ); + xform = new GeoTransform(rodCPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(rodAPhys); - CLHEP::Hep3Vector rodDPos(-mPlateRod2RodX/2., botRodPosY, rodPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,rodDPos)); + GeoTrf::Translate3D rodDPos(-mPlateRod2RodX/2., botRodPosY, rodPosZ); + xform = new GeoTransform(rodDPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(rodAPhys); @@ -246,27 +244,27 @@ GeoVPhysVol* DBM_ModuleCage::Build() { double topRodPosZ = mainPlatePosZ[i] - mainPlateZ/2. - (Zspacing - mainPlateZ - flexSupportZ)/2.; double botRodPosZ = mainPlatePosZ[i] - mainPlateZ/2. - (Zspacing - mainPlateZ)/2.; - CLHEP::Hep3Vector rodAPos(mPlateRod2RodX/2., topRodPosY, topRodPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,rodAPos)); + GeoTrf::Translate3D rodAPos(mPlateRod2RodX/2., topRodPosY, topRodPosZ); + xform = new GeoTransform(rodAPos); tag = new GeoNameTag(tag_rod[i].c_str()); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(topRodPhys); - CLHEP::Hep3Vector rodBPos(-mPlateRod2RodX/2., topRodPosY, topRodPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,rodBPos)); + GeoTrf::Translate3D rodBPos(-mPlateRod2RodX/2., topRodPosY, topRodPosZ); + xform = new GeoTransform(rodBPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(topRodPhys); - CLHEP::Hep3Vector rodCPos(mPlateRod2RodX/2., botRodPosY, botRodPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,rodCPos)); + GeoTrf::Translate3D rodCPos(mPlateRod2RodX/2., botRodPosY, botRodPosZ); + xform = new GeoTransform(rodCPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(botRodPhys); - CLHEP::Hep3Vector rodDPos(-mPlateRod2RodX/2., botRodPosY, botRodPosZ); - xform = new GeoTransform(HepGeom::Transform3D(rm,rodDPos)); + GeoTrf::Translate3D rodDPos(-mPlateRod2RodX/2., botRodPosY, botRodPosZ); + xform = new GeoTransform(rodDPos); containerPhys->add(tag); containerPhys->add(xform); containerPhys->add(botRodPhys); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_ModuleCage.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_ModuleCage.h similarity index 84% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_ModuleCage.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_ModuleCage.h index 11191d35010..a4db870afa1 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_ModuleCage.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_ModuleCage.h @@ -5,8 +5,7 @@ #ifndef DBMModuleCage_h #define DBMModuleCage_h -#include "PixelGeoModel/GeoVPixelFactory.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoVPixelFactory.h" #include "GaudiKernel/MsgStream.h" #include <iostream> diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Services.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Services.cxx index c876266ed71..4301bab27c3 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Services.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Services.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/DBM_Services.h" +#include "DBM_Services.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoTransform.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Services.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Services.h similarity index 80% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Services.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Services.h index d4645b7ee7a..07d1c75beb6 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Services.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Services.h @@ -5,8 +5,7 @@ #ifndef DBMSERVICES_h #define DBMSERVICES_h -#include "PixelGeoModel/GeoVPixelFactory.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoVPixelFactory.h" #include "GaudiKernel/MsgStream.h" #include <iostream> diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Telescope.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Telescope.cxx index 2d458fa35b2..35b64596c7c 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Telescope.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Telescope.cxx @@ -2,8 +2,8 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/DBM_Telescope.h" -#include "PixelGeoModel/DBM_ModuleCage.h" +#include "DBM_Telescope.h" +#include "DBM_ModuleCage.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoTransform.h" @@ -23,7 +23,7 @@ GeoVPhysVol* DBM_Telescope::Build() { - double safety = 0.005*CLHEP::mm; + double safety = 0.005*GeoModelKernelUnits::mm; // telescope tilting angle in degree double angle = m_gmt_mgr->DBMAngle(); @@ -83,22 +83,20 @@ GeoVPhysVol* DBM_Telescope::Build() { const GeoLogVol* telescopeLog = new GeoLogVol("dbmTelescopeLog", telescopeBox, air); GeoPhysVol* telescopePhys = new GeoPhysVol(telescopeLog); - CLHEP::HepRotation rm; - CLHEP::HepRotation rmX10; - rmX10.rotateX(-10.*CLHEP::deg); + GeoTrf::RotateX3D rmX10(-10.*GeoModelKernelUnits::deg); DBM_ModuleCage moduleCage; GeoVPhysVol* moduleCagePhys = moduleCage.Build(); // parameters for rotating the 3-layer unit double lyRadius = sqrt(layerUnitY*layerUnitY/4 + layerUnitZ*layerUnitZ/4); - double lyAngle = atan(layerUnitY/layerUnitZ);//21.6444*CLHEP::deg; // arctan(DBM3LayersY / DBM3LayersZ) + double lyAngle = atan(layerUnitY/layerUnitZ);//21.6444*GeoModelKernelUnits::deg; // arctan(DBM3LayersY / DBM3LayersZ) // position of bottom tip of the 3-layers unit, which is the rotation point double layerUnitPos_Y = (trapBackY/cos(angle) - coolingSidePlateY)*cos(angle); double layerUnitPos_Z = coolingSidePlateY*sin(angle) + trapBackShortZ + bracketZ - brcktLockZ; - CLHEP::Hep3Vector layerUnitPos( 0.0, -telescopeY/2. + layerUnitPos_Y + lyRadius * sin(lyAngle+angle), -telescopeZ/2. + layerUnitPos_Z + lyRadius * cos(lyAngle+angle) + 3*safety); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rmX10,layerUnitPos)); + GeoTrf::Translation3D layerUnitPos( 0.0, -telescopeY/2. + layerUnitPos_Y + lyRadius * sin(lyAngle+angle), -telescopeZ/2. + layerUnitPos_Z + lyRadius * cos(lyAngle+angle) + 3*safety); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(layerUnitPos*rmX10)); GeoNameTag* tag = new GeoNameTag("dbm3layers"); telescopePhys->add(tag); telescopePhys->add(xform); @@ -109,12 +107,12 @@ GeoVPhysVol* DBM_Telescope::Build() { // back trapezoid block with window, will be rotated by 90 degree along the x-axis - const GeoTrap* trapBack = new GeoTrap(trapBackY/2., trapBack_theta, 90.0*CLHEP::deg, trapBackShortZ/2., trapBackX/2., trapBackX/2, 0.0, (trapBackShortZ+trapBackY*tan(angle))/2., trapBackX/2., trapBackX/2., 0.0); + const GeoTrap* trapBack = new GeoTrap(trapBackY/2., trapBack_theta, 90.0*GeoModelKernelUnits::deg, trapBackShortZ/2., trapBackX/2., trapBackX/2, 0.0, (trapBackShortZ+trapBackY*tan(angle))/2., trapBackX/2., trapBackX/2., 0.0); double brWindowPosY = brcktWindow_offset + brcktWindow_centerZ * tan(angle) + brcktWindowY/(2 * cos(angle)); const GeoBox* brWindow = new GeoBox(brcktWindowX/2., trapBackShortZ, brcktWindowY/2.); - CLHEP::Hep3Vector brWindowPos(0., 0., trapBackY/2. - brWindowPosY); - HepGeom::Transform3D brWindowShift(rmX10,brWindowPos); + GeoTrf::Translation3D brWindowPos(0., 0., trapBackY/2. - brWindowPosY); + GeoTrf::Transform3D brWindowShift(brWindowPos*rmX10); const GeoShapeSubtraction& trapBack1 = trapBack->subtract(((*brWindow) << brWindowShift)); @@ -122,11 +120,10 @@ GeoVPhysVol* DBM_Telescope::Build() { const GeoLogVol* trapBackLog = new GeoLogVol("bracketLog", &trapBack1, dbmPeek4); GeoPhysVol* trapBackPhys = new GeoPhysVol(trapBackLog); - CLHEP::HepRotation rmX90; - rmX90.rotateX(90.*CLHEP::deg); // rotate along x-axis by 90 degree + GeoTrf::RotateX3D rmX90(90.*GeoModelKernelUnits::deg); double trapBackPos_Z = -telescopeZ/2. + bracketZ - brcktLockZ + ( (trapBackShortZ+trapBackY*tan(angle))/2. + trapBackY/2.*sin(trapBack_theta) - trapBackY*tan(trapBack_theta) ); - CLHEP::Hep3Vector trapBackPos(0.0, -telescopeY/2. + trapBackY/2. + safety, trapBackPos_Z + 3*safety); - xform = new GeoTransform(HepGeom::Transform3D(rmX90,trapBackPos)); + GeoTrf::Translation3D trapBackPos(0.0, -telescopeY/2. + trapBackY/2. + safety, trapBackPos_Z + 3*safety); + xform = new GeoTransform(GeoTrf::Transform3D(trapBackPos*rmX90)); tag = new GeoNameTag("trapBack"); telescopePhys->add(tag); telescopePhys->add(xform); @@ -138,8 +135,8 @@ GeoVPhysVol* DBM_Telescope::Build() { const GeoLogVol* brcktTopBlockLog = new GeoLogVol("bracketLog", brcktTopBlock, dbmPeekAluminium); GeoPhysVol* brcktTopBlockPhys = new GeoPhysVol(brcktTopBlockLog); - CLHEP::Hep3Vector brcktTopBlockPos( 0., -telescopeY/2. + brcktSideBlockY + (bracketY - brcktSideBlockY)/2.+2*safety, -telescopeZ/2. + brcktTopBlockZ/2.); - xform = new GeoTransform(HepGeom::Transform3D(rm,brcktTopBlockPos)); + GeoTrf::Translate3D brcktTopBlockPos( 0., -telescopeY/2. + brcktSideBlockY + (bracketY - brcktSideBlockY)/2.+2*safety, -telescopeZ/2. + brcktTopBlockZ/2.); + xform = new GeoTransform(brcktTopBlockPos); tag = new GeoNameTag("brcktTopBlock"); telescopePhys->add(tag); telescopePhys->add(xform); @@ -151,15 +148,15 @@ GeoVPhysVol* DBM_Telescope::Build() { const GeoLogVol* brcktSideLog = new GeoLogVol("brcktSideLog", brcktSideBlock, dbmPeek2); GeoPhysVol* brcktSidePhys = new GeoPhysVol(brcktSideLog); - CLHEP::Hep3Vector brcktSidePos1( bracketX/2. - brcktSideBlockX/2., -telescopeY/2. + brcktSideBlockY/2.+safety, -telescopeZ/2. + brcktTopBlockZ/2.); - xform = new GeoTransform(HepGeom::Transform3D(rm,brcktSidePos1)); + GeoTrf::Translate3D brcktSidePos1( bracketX/2. - brcktSideBlockX/2., -telescopeY/2. + brcktSideBlockY/2.+safety, -telescopeZ/2. + brcktTopBlockZ/2.); + xform = new GeoTransform(brcktSidePos1); tag = new GeoNameTag("brcktSideBlock"); telescopePhys->add(tag); telescopePhys->add(xform); telescopePhys->add(brcktSidePhys); - CLHEP::Hep3Vector brcktSidePos2( -bracketX/2. + brcktSideBlockX/2., -telescopeY/2. + brcktSideBlockY/2. + safety, -telescopeZ/2. + brcktTopBlockZ/2.); - xform = new GeoTransform(HepGeom::Transform3D(rm,brcktSidePos2)); + GeoTrf::Translate3D brcktSidePos2( -bracketX/2. + brcktSideBlockX/2., -telescopeY/2. + brcktSideBlockY/2. + safety, -telescopeZ/2. + brcktTopBlockZ/2.); + xform = new GeoTransform(brcktSidePos2); tag = new GeoNameTag("brcktSideBlock"); telescopePhys->add(tag); telescopePhys->add(xform); @@ -171,8 +168,8 @@ GeoVPhysVol* DBM_Telescope::Build() { const GeoLogVol* brcktLockLog = new GeoLogVol("bracketLog", brcktLock, dbmPeek3); GeoPhysVol* brcktLockPhys = new GeoPhysVol(brcktLockLog); - CLHEP::Hep3Vector brcktLockPos( 0., -telescopeY/2. + trapBackY + brcktLockY/2. + 2*safety, -telescopeZ/2. + bracketZ - brcktLockZ/2. + safety); - xform = new GeoTransform(HepGeom::Transform3D(rm,brcktLockPos)); + GeoTrf::Translate3D brcktLockPos( 0., -telescopeY/2. + trapBackY + brcktLockY/2. + 2*safety, -telescopeZ/2. + bracketZ - brcktLockZ/2. + safety); + xform = new GeoTransform(brcktLockPos); tag = new GeoNameTag("brcktLock"); telescopePhys->add(tag); telescopePhys->add(xform); @@ -185,38 +182,38 @@ GeoVPhysVol* DBM_Telescope::Build() { const GeoLogVol* sidePlateLog = new GeoLogVol("sidePlateLog", sidePlate, dbmAluminium2); GeoPhysVol* sidePlatePhys = new GeoPhysVol(sidePlateLog); - double spAngle = angle + 17.57126*CLHEP::deg; + double spAngle = angle + 17.57126*GeoModelKernelUnits::deg; double spRadius = 1/2. * sqrt(coolingSidePlateZ*coolingSidePlateZ + coolingSidePlateY*coolingSidePlateY); - CLHEP::Hep3Vector sidePlatePos1( mainPlateX/2. + coolingSidePlateX/2. + 2*safety, - telescopeY/2. + spRadius * sin(spAngle), -telescopeZ/2. + layerUnitPos_Z - coolingSidePlatePos*cos(angle) + spRadius * cos(spAngle)); - xform = new GeoTransform(HepGeom::Transform3D(rmX10, sidePlatePos1)); + GeoTrf::Translation3D sidePlatePos1( mainPlateX/2. + coolingSidePlateX/2. + 2*safety, - telescopeY/2. + spRadius * sin(spAngle), -telescopeZ/2. + layerUnitPos_Z - coolingSidePlatePos*cos(angle) + spRadius * cos(spAngle)); + xform = new GeoTransform(GeoTrf::Transform3D(sidePlatePos1*rmX10)); tag = new GeoNameTag("sidePlate"); telescopePhys->add(tag); telescopePhys->add(xform); telescopePhys->add(sidePlatePhys); - CLHEP::Hep3Vector sidePlatePos2( -mainPlateX/2. - coolingSidePlateX/2. - 2*safety, - telescopeY/2. + spRadius * sin(spAngle), -telescopeZ/2. + layerUnitPos_Z - coolingSidePlatePos*cos(angle) + spRadius * cos(spAngle)); - xform = new GeoTransform(HepGeom::Transform3D(rmX10, sidePlatePos2)); + GeoTrf::Translation3D sidePlatePos2( -mainPlateX/2. - coolingSidePlateX/2. - 2*safety, - telescopeY/2. + spRadius * sin(spAngle), -telescopeZ/2. + layerUnitPos_Z - coolingSidePlatePos*cos(angle) + spRadius * cos(spAngle)); + xform = new GeoTransform(GeoTrf::Transform3D(sidePlatePos2*rmX10)); tag = new GeoNameTag("sidePlate"); telescopePhys->add(tag); telescopePhys->add(xform); telescopePhys->add(sidePlatePhys); //cooling plates next to the bracket unit - const GeoTrap* coolingFin = new GeoTrap(coolingFinHeight/2., trapBack_theta, 90.0*CLHEP::deg, (coolingFinLongZ - coolingFinHeight*tan(angle))/2., coolingFinThick/2., coolingFinThick/2, 0.0, coolingFinLongZ/2., coolingFinThick/2., coolingFinThick/2., 0.0); + const GeoTrap* coolingFin = new GeoTrap(coolingFinHeight/2., trapBack_theta, 90.0*GeoModelKernelUnits::deg, (coolingFinLongZ - coolingFinHeight*tan(angle))/2., coolingFinThick/2., coolingFinThick/2, 0.0, coolingFinLongZ/2., coolingFinThick/2., coolingFinThick/2., 0.0); const GeoMaterial* dbmAluminium3 = m_mat_mgr->getMaterialForVolume("pix::DBMAluminium3", coolingFin->volume()); const GeoLogVol* finLog = new GeoLogVol("finLog", coolingFin, dbmAluminium3); GeoPhysVol* coolingFinPhys = new GeoPhysVol(finLog); - CLHEP::Hep3Vector finPos1( mainPlateX/2. - coolingFinThick/2. + safety, -telescopeY/2. + coolingFinHeight/2. + 4*safety, -telescopeZ/2. + coolingFinPos + 0.05*CLHEP::mm); - xform = new GeoTransform(HepGeom::Transform3D(rmX90, finPos1)); + GeoTrf::Translation3D finPos1( mainPlateX/2. - coolingFinThick/2. + safety, -telescopeY/2. + coolingFinHeight/2. + 4*safety, -telescopeZ/2. + coolingFinPos + 0.05*GeoModelKernelUnits::mm); + xform = new GeoTransform(GeoTrf::Transform3D(finPos1*rmX90)); tag = new GeoNameTag("finPlate"); telescopePhys->add(tag); telescopePhys->add(xform); telescopePhys->add(coolingFinPhys); - CLHEP::Hep3Vector finPos2( -mainPlateX/2. + coolingFinThick/2. - safety, -telescopeY/2. + coolingFinHeight/2. + 4*safety, -telescopeZ/2. + coolingFinPos + 0.05*CLHEP::mm); - xform = new GeoTransform(HepGeom::Transform3D(rmX90, finPos2)); + GeoTrf::Translation3D finPos2( -mainPlateX/2. + coolingFinThick/2. - safety, -telescopeY/2. + coolingFinHeight/2. + 4*safety, -telescopeZ/2. + coolingFinPos + 0.05*GeoModelKernelUnits::mm); + xform = new GeoTransform(GeoTrf::Transform3D(finPos2*rmX90)); tag = new GeoNameTag("finPlate"); telescopePhys->add(tag); telescopePhys->add(xform); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Telescope.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Telescope.h similarity index 81% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Telescope.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Telescope.h index 7900f2f2aaa..7a9570249d5 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/DBM_Telescope.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/DBM_Telescope.h @@ -6,8 +6,7 @@ #ifndef DBMTelescope_H #define DBMTelescope_H -#include "PixelGeoModel/GeoVPixelFactory.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoVPixelFactory.h" #include "GaudiKernel/MsgStream.h" #include <iostream> diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelBarrel.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelBarrel.cxx index e47e6cdf256..27885db1d8c 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelBarrel.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelBarrel.cxx @@ -2,12 +2,12 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelBarrel.h" -#include "PixelGeoModel/GeoPixelLayer.h" -#include "PixelGeoModel/GeoPixelServices.h" -#include "PixelGeoModel/GeoPixelOldFrame.h" -#include "PixelGeoModel/GeoPixelStaveRing.h" -#include "PixelGeoModel/GeoPixelIFlexServices.h" +#include "GeoPixelBarrel.h" +#include "GeoPixelLayer.h" +#include "GeoPixelServices.h" +#include "GeoPixelOldFrame.h" +#include "GeoPixelStaveRing.h" +#include "GeoPixelIFlexServices.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoPara.h" #include "GeoModelKernel/GeoTube.h" @@ -67,11 +67,11 @@ GeoVPhysVol* GeoPixelBarrel::Build( ) { if(m_gmt_mgr->isLDPresent()){ std::ostringstream lname; lname << "Layer" << ii; - // GeoAlignableTransform * xform = new GeoAlignableTransform(HepGeom::Transform3D()); + // GeoAlignableTransform * xform = new GeoAlignableTransform(GeoTrf::Transform3D()); // IBL layer shift ( 2mm shift issue ) double layerZshift = m_gmt_mgr->PixelLayerGlobalShift(); - GeoAlignableTransform* xform = new GeoAlignableTransform(HepGeom::Transform3D(CLHEP::HepRotation(),CLHEP::Hep3Vector(0.,0.,layerZshift))); + GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::Translate3D(0.,0.,layerZshift)); GeoVPhysVol* layerphys = layer.Build(); GeoNameTag *tag = new GeoNameTag(lname.str()); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelBarrel.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelBarrel.h similarity index 89% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelBarrel.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelBarrel.h index 1e3966b012c..16f097816ab 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelBarrel.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelBarrel.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELBARREL_H #define GEOPIXELBARREL_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoPixelServices; class GeoPixelBarrel : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelCable.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelCable.cxx index 006dd2bd842..a6c8e52e21a 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelCable.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelCable.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelCable.h" +#include "GeoPixelCable.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" @@ -70,7 +70,7 @@ GeoVPhysVol* GeoPixelCable::Build() { std::ostringstream o; o << m_gmt_mgr->getLD_Label() << label; logName = logName+o.str(); - //std::cout << logName << ": " << weight/CLHEP::g << " g, " << thickness << std::endl; + //std::cout << logName << ": " << weight/GeoModelKernelUnits::g << " g, " << thickness << std::endl; GeoLogVol* theCable = new GeoLogVol(logName,cableBox,cableMat); GeoPhysVol* cablePhys = new GeoPhysVol(theCable); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelCable.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelCable.h similarity index 92% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelCable.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelCable.h index 5d7b6228a27..c27414f2d6d 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelCable.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelCable.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELCABLE_H #define GEOPIXELCABLE_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" #include <vector> class GeoPixelCable : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelChip.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelChip.cxx index feed0f3e476..65ccdc0c245 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelChip.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelChip.cxx @@ -11,7 +11,7 @@ // // Contains: nothing // -#include "PixelGeoModel/GeoPixelChip.h" +#include "GeoPixelChip.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelChip.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelChip.h similarity index 88% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelChip.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelChip.h index 143ac4f211e..57c7e6ec078 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelChip.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelChip.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELCHIP_H #define GEOPIXELCHIP_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoPixelChip : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDetailedStaveSupport.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDetailedStaveSupport.cxx index 0d743239021..6b6b9382d66 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDetailedStaveSupport.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDetailedStaveSupport.cxx @@ -6,10 +6,10 @@ // Build detailed stave support : face plate + carbon foam + cable flex + cooling pipe + end blocks // This is built one time per layer. -#include "PixelGeoModel/GeoPixelDetailedStaveSupport.h" +#include "GeoPixelDetailedStaveSupport.h" -#include "PixelGeoModel/GeoPixelSiCrystal.h" -#include "PixelGeoModel/GeoPixelModule.h" +#include "GeoPixelSiCrystal.h" +#include "GeoPixelModule.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTube.h" @@ -20,11 +20,13 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoTransform.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <algorithm> using std::max; GeoPixelDetailedStaveSupport::GeoPixelDetailedStaveSupport() + : m_transform(GeoTrf::Transform3D::Identity()) { m_staveEnvelopShape=0; m_bVerbose = (m_gmt_mgr->msgLvl(MSG::DEBUG)); @@ -199,9 +201,9 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { double halfMecStaveWidth=MechanicalStaveWidth*0.5; // SafetyMargin - m_SafetyMargin=.001*CLHEP::mm; + m_SafetyMargin=.001*GeoModelKernelUnits::mm; double xGblOffset=FacePlateThick+m_SafetyMargin; - double safetyMarginZ=.001*CLHEP::mm; + double safetyMarginZ=.001*GeoModelKernelUnits::mm; // Compute approximated stave shape based on DB parameters ComputeStaveExternalShape(); @@ -406,7 +408,7 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { const GeoMaterial* foam_material = m_mat_mgr->getMaterial(m_gmt_mgr->getMaterialName("CarbonFoam",0,0)); GeoNameTag* foam_tag = new GeoNameTag("CarbonFoam"); - GeoTransform* foam_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),CLHEP::Hep3Vector())); + GeoTransform* foam_xform = new GeoTransform(GeoTrf::Transform3D::Identity()); GeoLogVol * foam_logVol = new GeoLogVol("CarbonFoam",foam_shape,foam_material); GeoPhysVol * foam_logVolPV = new GeoPhysVol(foam_logVol); @@ -448,16 +450,16 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { omegaVolume, omegaVolume,"pix::Omega_IBL", glueVolume,"pix::Stycast2850FT"); - m_gmt_mgr->msg(MSG::INFO)<<"***> new material : "<<omega_material->getName()<<" "<<omega_material->getDensity()/(CLHEP::gram/CLHEP::cm3)<<endmsg; + m_gmt_mgr->msg(MSG::INFO)<<"***> new material : "<<omega_material->getName()<<" "<<omega_material->getDensity()/(GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3)<<endmsg; omega_logVol = new GeoLogVol("Omega",omega_shape,omega_material); } GeoNameTag* omega_tag = new GeoNameTag("Omega"); - GeoTransform* omega_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),CLHEP::Hep3Vector())); + GeoTransform* omega_xform = new GeoTransform(GeoTrf::Transform3D::Identity()); // const GeoMaterial* omega_material = m_mat_mgr->getMaterial(m_gmt_mgr->getMaterialName("Omega",0,0)); // GeoNameTag* omega_tag = new GeoNameTag("Omega"); - // GeoTransform* omega_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),CLHEP::Hep3Vector())); + // GeoTransform* omega_xform = new GeoTransform(GeoTrf::Transform3D(GeoModelKernelUnits::HepRotation(),GeoTrf::Vector3D())); // GeoLogVol * omega_logVol = new GeoLogVol("Omega",omega_shape,omega_material); GeoPhysVol * omega_logVolPV = new GeoPhysVol(omega_logVol); @@ -473,8 +475,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { // ------------------------------------------------------------------------------------------------------------ GeoBox * faceplate_shape = new GeoBox(FacePlateThick*0.5,MechanicalStaveWidth*0.5,MiddleSectionLength*.5); - CLHEP::Hep3Vector faceplate_pos((plate1x+plate2x+plate3x+plate4x)*0.25,(plate1y+plate2y+plate3y+plate4y)*0.25,0.0); - GeoTransform* faceplate_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),faceplate_pos)); + GeoTrf::Translate3D faceplate_pos((plate1x+plate2x+plate3x+plate4x)*0.25,(plate1y+plate2y+plate3y+plate4y)*0.25,0.0); + GeoTransform* faceplate_xform = new GeoTransform(faceplate_pos); std::string faceplateMatName; const GeoMaterial* faceplate_material; @@ -498,7 +500,7 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { facePlateVolume, facePlateVolume,"pix::FacePlate_IBL", glueVolume,"pix::Stycast2850FT"); - m_gmt_mgr->msg(MSG::INFO)<<"***> new material : "<<faceplate_material->getName()<<" "<<faceplate_material->getDensity()/(CLHEP::gram/CLHEP::cm3)<<endmsg; + m_gmt_mgr->msg(MSG::INFO)<<"***> new material : "<<faceplate_material->getName()<<" "<<faceplate_material->getDensity()/(GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3)<<endmsg; } // Create composite material made of faceplate + grease if a thickness of grease is defined is DB @@ -523,7 +525,7 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { facePlateVolume,faceplateMatName, greaseVolume,"pix::ThermGrease_IBL"); faceplate_logVol = new GeoLogVol("FacePlate",faceplate_shape,faceplate_material); - m_gmt_mgr->msg(MSG::INFO)<<"***> new material : "<<faceplate_material->getName()<<" "<<faceplate_material->getDensity()/(CLHEP::gram/CLHEP::cm3)<<endmsg; + m_gmt_mgr->msg(MSG::INFO)<<"***> new material : "<<faceplate_material->getName()<<" "<<faceplate_material->getDensity()/(GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3)<<endmsg; } // const GeoMaterial* faceplate_material = m_mat_mgr->getMaterial(m_gmt_mgr->getMaterialName("FacePlate",0,0)); @@ -623,9 +625,9 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { // } // Add flex in 3D model : A component - CLHEP::Hep3Vector cableflex_pos((flex1x+flex2x+flex3x+flex4x)*0.25,(flex1y+flex2y+flex3y+flex4y)*0.25,ModulePosZ+flexGapZ*0.5); - // GeoTransform* cableflex_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.0,0.0,-fabs(flex_angle)),cableflex_pos)); - GeoTransform* cableflex_xform = new GeoTransform(HepGeom::Translate3D(cableflex_pos)*HepGeom::RotateZ3D(fabs(flex_angle))); + GeoTrf::Translation3D cableflex_pos((flex1x+flex2x+flex3x+flex4x)*0.25,(flex1y+flex2y+flex3y+flex4y)*0.25,ModulePosZ+flexGapZ*0.5); + // GeoTransform* cableflex_xform = new GeoTransform(GeoTrf::Transform3D(GeoModelKernelUnits::HepRotation(0.0,0.0,-fabs(flex_angle)),cableflex_pos)); + GeoTransform* cableflex_xform = new GeoTransform(GeoTrf::Transform3D(cableflex_pos*GeoTrf::RotateZ3D(fabs(flex_angle)))); GeoLogVol * cableflex_logVol = 0; if(bFlexAndWing||bFlexConstantThickness) @@ -670,8 +672,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { // Add flex in 3D model : A component double zPos = (iModule+.5)*ModuleLength_flex+(iModule+.5)*ModuleGap_flex; - CLHEP::Hep3Vector wingflex_posA(wingFlexPosX, wingFlexPosY , zPos-ModuleLength_flex*.25); - GeoTransform* wingflex_xformA = new GeoTransform(HepGeom::Translate3D(wingflex_posA)*HepGeom::RotateZ3D(fabs(flex_angle))); + GeoTrf::Translation3D wingflex_posA(wingFlexPosX, wingFlexPosY , zPos-ModuleLength_flex*.25); + GeoTransform* wingflex_xformA = new GeoTransform(GeoTrf::Transform3D(wingflex_posA*GeoTrf::RotateZ3D(fabs(flex_angle)))); GeoPhysVol * wingflex_logVolPV_1 = new GeoPhysVol(wingflex_logVol); GeoNameTag* wingflex_tag = new GeoNameTag(wingName.str()); @@ -679,8 +681,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { logVolPV->add(wingflex_xformA); logVolPV->add(wingflex_logVolPV_1); - CLHEP::Hep3Vector wingflex_posA_2(wingFlexPosX, wingFlexPosY , zPos+ModuleLength_flex*.25); - GeoTransform* wingflex_xformA_2 = new GeoTransform(HepGeom::Translate3D(wingflex_posA_2)*HepGeom::RotateZ3D(fabs(flex_angle))); + GeoTrf::Translation3D wingflex_posA_2(wingFlexPosX, wingFlexPosY , zPos+ModuleLength_flex*.25); + GeoTransform* wingflex_xformA_2 = new GeoTransform(GeoTrf::Transform3D(wingflex_posA_2*GeoTrf::RotateZ3D(fabs(flex_angle)))); GeoPhysVol * wingflex_logVolPV_2 = new GeoPhysVol(wingflex_logVol); logVolPV->add(wingflex_tag); @@ -689,16 +691,16 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { // Add flex in 3D model : C component - CLHEP::Hep3Vector wingflex_posC(wingFlexPosX, wingFlexPosY , -zPos-ModuleLength_flex*.25); - GeoTransform* wingflex_xformC = new GeoTransform(HepGeom::Translate3D(wingflex_posC)*HepGeom::RotateZ3D(fabs(flex_angle))); + GeoTrf::Translation3D wingflex_posC(wingFlexPosX, wingFlexPosY , -zPos-ModuleLength_flex*.25); + GeoTransform* wingflex_xformC = new GeoTransform(GeoTrf::Transform3D(wingflex_posC*GeoTrf::RotateZ3D(fabs(flex_angle)))); GeoPhysVol * wingflex_logVolPV_C1 = new GeoPhysVol(wingflex_logVol); logVolPV->add(wingflex_tag); logVolPV->add(wingflex_xformC); logVolPV->add(wingflex_logVolPV_C1); - CLHEP::Hep3Vector wingflex_posC_2(wingFlexPosX, wingFlexPosY , -zPos+ModuleLength_flex*.25); - GeoTransform* wingflex_xformC_2 = new GeoTransform(HepGeom::Translate3D(wingflex_posC_2)*HepGeom::RotateZ3D(fabs(flex_angle))); + GeoTrf::Translation3D wingflex_posC_2(wingFlexPosX, wingFlexPosY , -zPos+ModuleLength_flex*.25); + GeoTransform* wingflex_xformC_2 = new GeoTransform(GeoTrf::Transform3D(wingflex_posC_2*GeoTrf::RotateZ3D(fabs(flex_angle)))); GeoPhysVol * wingflex_logVolPV_C2 = new GeoPhysVol(wingflex_logVol); logVolPV->add(wingflex_tag); @@ -713,7 +715,9 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { logVolPV->add(cableflex_xform); logVolPV->add(cableflex_logVolPV); - m_gmt_mgr->msg(MSG::INFO)<<cableflex_pos<<" "<<FlexThicknessRL<<" / "; + m_gmt_mgr->msg(MSG::INFO) + << "(" << cableflex_pos.x() << "," << cableflex_pos.y() << "," << cableflex_pos.z() << ")" + << " " << FlexThicknessRL<<" / "; // Add flex in 3D model : C component if((ModuleNumber_flex%2==1&&iModule>0)||ModuleNumber_flex%2==0) @@ -721,8 +725,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { std::ostringstream lname; lname << "StaveFlex_"<<iFlexModule<<"C"; - CLHEP::Hep3Vector cableflex_pos2((flex1x+flex2x+flex3x+flex4x)*0.25,(flex1y+flex2y+flex3y+flex4y)*0.25,-ModulePosZ-flexGapZ*0.5); - GeoTransform* cableflex_xform2 = new GeoTransform(HepGeom::Translate3D(cableflex_pos2)*HepGeom::RotateZ3D(fabs(flex_angle))); + GeoTrf::Translation3D cableflex_pos2((flex1x+flex2x+flex3x+flex4x)*0.25,(flex1y+flex2y+flex3y+flex4y)*0.25,-ModulePosZ-flexGapZ*0.5); + GeoTransform* cableflex_xform2 = new GeoTransform(GeoTrf::Transform3D(cableflex_pos2*GeoTrf::RotateZ3D(fabs(flex_angle)))); GeoLogVol * cableflex_logVol = 0; const GeoMaterial* scaledFlexMaterial=0; @@ -791,8 +795,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { wingName << "WingFlex"; // Add flex in 3D model : A component - CLHEP::Hep3Vector wingflex_posA((flex1x+flex2x+flex3x+flex4x)*0.25,(flex1y+flex2y+flex3y+flex4y)*0.25,(wingZmax-wingZmin)*.5+FlexStaveMiddleGap); - GeoTransform* wingflex_xformA = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.0,0.0,-fabs(flex_angle)),wingflex_posA)); + GeoTrf::Vector3D wingflex_posA((flex1x+flex2x+flex3x+flex4x)*0.25,(flex1y+flex2y+flex3y+flex4y)*0.25,(wingZmax-wingZmin)*.5+FlexStaveMiddleGap); + GeoTransform* wingflex_xformA = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.0,0.0,-fabs(flex_angle)),wingflex_posA)); const GeoMaterial* wingflex_material= m_mat_mgr->getMaterial("pix::WingFlexA"); GeoLogVol * wingflex_logVol = new GeoLogVol(wingName.str(),wingflex_shape,wingflex_material); @@ -803,8 +807,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { logVolPV->add(wingflex_xformA); logVolPV->add(wingflex_logVolPV); - CLHEP::Hep3Vector wingflex_posC((flex1x+flex2x+flex3x+flex4x)*0.25,(flex1y+flex2y+flex3y+flex4y)*0.25,-((wingZmax-wingZmin)*.5+FlexStaveMiddleGap)); - GeoTransform* wingflex_xformC = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.0,0.0,-fabs(flex_angle)),wingflex_posC)); + GeoTrf::Vector3D wingflex_posC((flex1x+flex2x+flex3x+flex4x)*0.25,(flex1y+flex2y+flex3y+flex4y)*0.25,-((wingZmax-wingZmin)*.5+FlexStaveMiddleGap)); + GeoTransform* wingflex_xformC = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.0,0.0,-fabs(flex_angle)),wingflex_posC)); logVolPV->add(wingflex_tag); logVolPV->add(wingflex_xformC); logVolPV->add(wingflex_logVolPV); @@ -829,16 +833,16 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { else { m_gmt_mgr->msg(MSG::INFO)<<"** TUBE : with Stycast "<<TubeGlueThick<<" diam "<<TubeOuterDiam*0.5<<" "<<TubeInnerDiam*0.5<<endmsg; - double glueVolume = (TubeOuterDiam*0.5+TubeGlueThick)*(TubeOuterDiam*0.5+TubeGlueThick)*CLHEP::pi*MiddleSectionLength; - double tubeOuterVolume = TubeOuterDiam*TubeOuterDiam*0.25*CLHEP::pi*MiddleSectionLength; - double tubeInnerVolume = TubeInnerDiam*TubeInnerDiam*0.25*CLHEP::pi*MiddleSectionLength; + double glueVolume = (TubeOuterDiam*0.5+TubeGlueThick)*(TubeOuterDiam*0.5+TubeGlueThick)*GeoModelKernelUnits::pi*MiddleSectionLength; + double tubeOuterVolume = TubeOuterDiam*TubeOuterDiam*0.25*GeoModelKernelUnits::pi*MiddleSectionLength; + double tubeInnerVolume = TubeInnerDiam*TubeInnerDiam*0.25*GeoModelKernelUnits::pi*MiddleSectionLength; const std::string compMatName="CoolingPipeGlue_IBL"; const GeoMaterial* cp_material = m_mat_mgr->getCompositeMaterialForVolume(compMatName, tubeOuterVolume-tubeInnerVolume, tubeOuterVolume-tubeInnerVolume,"pix::CoolingPipe_IBL", glueVolume-tubeOuterVolume,"pix::Stycast2850FT"); - m_gmt_mgr->msg(MSG::INFO)<<"***> new material : "<<cp_material->getName()<<" "<<cp_material->getDensity()/(CLHEP::gram/CLHEP::cm3)<<endmsg; + m_gmt_mgr->msg(MSG::INFO)<<"***> new material : "<<cp_material->getName()<<" "<<cp_material->getDensity()/(GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3)<<endmsg; cp_logVol = new GeoLogVol("CoolingPipe",coolingPipe,cp_material); } @@ -849,8 +853,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { // GeoPhysVol * cp_logPV = new GeoPhysVol(cp_log); GeoNameTag* cp_tag = new GeoNameTag("CoolingPipe"); - CLHEP::Hep3Vector cp_pos(xGblOffset+TubeMiddlePos,0.0,0.0); - GeoTransform* cp_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cp_pos)); + GeoTrf::Translate3D cp_pos(xGblOffset+TubeMiddlePos,0.0,0.0); + GeoTransform* cp_xform = new GeoTransform(cp_pos); foam_logVolPV->add(cp_tag); foam_logVolPV->add(cp_xform); foam_logVolPV->add(cp_logPV); @@ -861,8 +865,7 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { GeoPhysVol * cp_inner_logPV = new GeoPhysVol(cp_inner_log); GeoNameTag* cp_inner_tag = new GeoNameTag("CoolingPipeInner"); - CLHEP::Hep3Vector cp_inner_pos(0.0,0.0,0.0); - GeoTransform* cp_inner_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cp_inner_pos)); + GeoTransform* cp_inner_xform = new GeoTransform(GeoTrf::Transform3D::Identity()); cp_logPV->add(cp_inner_tag); cp_logPV->add(cp_inner_xform); cp_logPV->add(cp_inner_logPV); @@ -963,8 +966,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { GeoPhysVol * cp_endblock_logPV = new GeoPhysVol(cp_endblock_log); GeoNameTag* cp_endblock_tag = new GeoNameTag("EndBlockCoolingPipe"); - CLHEP::Hep3Vector cp_endblock_pos(xGblOffset+TubeMiddlePos,0.0,0.0); - GeoTransform* cp_endblock_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cp_endblock_pos)); + GeoTrf::Translate3D cp_endblock_pos(xGblOffset+TubeMiddlePos,0.0,0.0); + GeoTransform* cp_endblock_xform = new GeoTransform(cp_endblock_pos); m_endblockAPhysVol->add(cp_endblock_tag); m_endblockAPhysVol->add(cp_endblock_xform); m_endblockAPhysVol->add(cp_endblock_logPV); @@ -980,8 +983,7 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { GeoPhysVol * cp_endblock_inner_logPV = new GeoPhysVol(cp_endblock_inner_log); GeoNameTag* cp_endblock_inner_tag = new GeoNameTag("EndBlockCoolingPipeInner"); - CLHEP::Hep3Vector cp_endblock_inner_pos(0.0,0.0,0.0); - GeoTransform* cp_endblock_inner_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cp_endblock_inner_pos)); + GeoTransform* cp_endblock_inner_xform = new GeoTransform(GeoTrf::Transform3D::Identity()); cp_endblock_logPV->add(cp_endblock_inner_tag); cp_endblock_logPV->add(cp_endblock_inner_xform); cp_endblock_logPV->add(cp_endblock_inner_logPV); @@ -1024,8 +1026,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { // Add flex in 3D model : A component // GeoNameTag* cableflex_tag = new GeoNameTag(lname.str()); - CLHEP::Hep3Vector cableflex_pos(EndblockFlexXpos,EndblockFlexYpos,0.); - m_endblockFlexTrf = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.0,0.0,-fabs(flex_angle)),cableflex_pos)); + GeoTrf::Vector3D cableflex_pos(EndblockFlexXpos,EndblockFlexYpos,0.); + m_endblockFlexTrf = new GeoTransform(GeoTrf::GeoTransformRT(GeoTrf::GeoRotation(0.0,0.0,-fabs(flex_angle)),cableflex_pos)); GeoLogVol * cableflex_logVol = new GeoLogVol(lname.str(),cableflex_shape,scaledFlexMaterial); m_endblockFlexPhysVol = new GeoPhysVol(cableflex_logVol); @@ -1047,8 +1049,8 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { m_serviceCoolPipePhysVol = new GeoPhysVol(cp_service_log); // GeoNameTag* cp_service_tag = new GeoNameTag("ServiceCoolingPipe"); -// CLHEP::Hep3Vector cp_service_pos(xGblOffset+TubeMiddlePos,0.0,0.0); -// GeoTransform* cp_service_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cp_service_pos)); +// GeoTrf::Vector3D cp_service_pos(xGblOffset+TubeMiddlePos,0.0,0.0); +// GeoTransform* cp_service_xform = new GeoTransform(GeoTrf::Transform3D(GeoModelKernelUnits::HepRotation(),cp_service_pos)); // // service_logVolPV->add(cp_service_tag); // // service_logVolPV->add(cp_service_xform); // // service_logVolPV->add(cp_service_logPV); @@ -1062,17 +1064,16 @@ GeoVPhysVol* GeoPixelDetailedStaveSupport::Build() { GeoPhysVol * cp_service_inner_logPV = new GeoPhysVol(cp_service_inner_log); GeoNameTag* cp_service_inner_tag = new GeoNameTag("SrvCoolingPipeInner"); - CLHEP::Hep3Vector cp_service_inner_pos(0.0,0.0,0.0); - GeoTransform* cp_service_inner_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cp_service_inner_pos)); + GeoTransform* cp_service_inner_xform = new GeoTransform(GeoTrf::Transform3D::Identity()); m_serviceCoolPipePhysVol->add(cp_service_inner_tag); m_serviceCoolPipePhysVol->add(cp_service_inner_xform); m_serviceCoolPipePhysVol->add(cp_service_inner_logPV); - CLHEP::Hep3Vector cpipe_posA(xGblOffset+TubeMiddlePos,0.0,(MechanicalStaveLength*0.5+m_endblockSrvLength*0.5)-m_serviceZpos); - m_serviceCoolPipeTrfA = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cpipe_posA)); + GeoTrf::Translate3D cpipe_posA(xGblOffset+TubeMiddlePos,0.0,(MechanicalStaveLength*0.5+m_endblockSrvLength*0.5)-m_serviceZpos); + m_serviceCoolPipeTrfA = new GeoTransform(GeoTrf::Transform3D(cpipe_posA)); - CLHEP::Hep3Vector cpipe_posC(xGblOffset+TubeMiddlePos,0.0,-((MechanicalStaveLength*0.5+m_endblockSrvLength*0.5)-m_serviceZpos)); - m_serviceCoolPipeTrfC = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cpipe_posC)); + GeoTrf::Translate3D cpipe_posC(xGblOffset+TubeMiddlePos,0.0,-((MechanicalStaveLength*0.5+m_endblockSrvLength*0.5)-m_serviceZpos)); + m_serviceCoolPipeTrfC = new GeoTransform(GeoTrf::Transform3D(cpipe_posC)); } // ------------------------------------------------------------------------------------------------------------ @@ -1121,7 +1122,7 @@ void GeoPixelDetailedStaveSupport::computeStaveEnvelopTransformAndSize(double mo double stave_xOffset=StaveModuleOffset+moduleThickP, stave_yOffset=MechanicalStaveOffset; m_gmt_mgr->msg(MSG::INFO)<<" stave xoffset = "<< stave_xOffset <<endmsg; m_gmt_mgr->msg(MSG::INFO)<<" stave yoffset = "<< stave_yOffset <<endmsg; - m_transform = HepGeom::Translate3D(stave_xOffset,stave_yOffset,0); + m_transform = GeoTrf::Translate3D(stave_xOffset,stave_yOffset,0); double staveSupportThickness=FacePlateThick+m_FoamMiddleThick; m_thicknessP = staveSupportThickness; @@ -1310,7 +1311,7 @@ void GeoPixelDetailedStaveSupport::RemoveCoincidentAndColinearPointsFromShape(st int i2=(iPt+1)%(nbPoint); double zDist=fabs(sqrt((xPoint[i1]-xPoint[i2])*(xPoint[i1]-xPoint[i2])+(yPoint[i1]-yPoint[i2])*(yPoint[i1]-yPoint[i2]))); - if(zDist<0.01*CLHEP::mm){ + if(zDist<0.01*GeoModelKernelUnits::mm){ xPoint.erase(xPoint.begin()+i1); yPoint.erase(yPoint.begin()+i1); bRemovedPoint=true; @@ -1511,13 +1512,13 @@ void GeoPixelDetailedStaveSupport::AddSurroundingXYMargin(double vMarginX, doubl void GeoPixelDetailedStaveSupport::ComputeStaveExternalShape() { - HepGeom::Point3D<double> midStaveCenter(m_gmt_mgr->IBLStaveOmegaMidCenterX(),0.0,0.0); + GeoTrf::Vector3D midStaveCenter(m_gmt_mgr->IBLStaveOmegaMidCenterX(),0.0,0.0); double midStaveRadius=m_gmt_mgr->IBLStaveOmegaMidRadius(); - double midStaveAngle=90.0*CLHEP::deg-m_gmt_mgr->IBLStaveOmegaMidAngle(); + double midStaveAngle=90.0*GeoModelKernelUnits::deg-m_gmt_mgr->IBLStaveOmegaMidAngle(); - HepGeom::Point3D<double> endStaveCenter(m_gmt_mgr->IBLStaveOmegaEndCenterX(),m_gmt_mgr->IBLStaveOmegaEndCenterY(),0.0); + GeoTrf::Vector3D endStaveCenter(m_gmt_mgr->IBLStaveOmegaEndCenterX(),m_gmt_mgr->IBLStaveOmegaEndCenterY(),0.0); double endStaveRadius=m_gmt_mgr->IBLStaveOmegaEndRadius(); - double endStaveAngle=90.0*CLHEP::deg+m_gmt_mgr->IBLStaveOmegaEndAngle(); + double endStaveAngle=90.0*GeoModelKernelUnits::deg+m_gmt_mgr->IBLStaveOmegaEndAngle(); double omegaThick = m_gmt_mgr->IBLStaveOmegaThickness(); double omegaEndStavePointY = m_gmt_mgr->IBLStaveMechanicalStaveWidth()*0.5; @@ -1543,7 +1544,7 @@ void GeoPixelDetailedStaveSupport::ComputeStaveExternalShape() double endStavePt2=-sqrt(endStaveRadius*endStaveRadius-endStaveCenter.x()*endStaveCenter.x())+endStaveCenter.y(); double endStavePt=endStavePt1; if(fabs(endStavePt2-omegaEndStavePointY)<fabs(endStavePt1-omegaEndStavePointY))endStavePt=endStavePt2; - HepGeom::Point3D<double> endStavePoint(0.0,endStavePt,0.0); + GeoTrf::Vector3D endStavePoint(0.0,endStavePt,0.0); m_OmegaEndStaveThick=omegaEndStavePointY-endStavePt; m_gmt_mgr->msg(MSG::DEBUG)<<"End stave Y point : "<<endStavePt<<" "<<omegaEndStavePointY<<" -> "<<m_OmegaEndStaveThick<<endmsg; m_gmt_mgr->msg(MSG::DEBUG)<<"Angles : "<<midStaveAngle<<" "<<endStaveAngle<<endmsg; @@ -1551,37 +1552,36 @@ void GeoPixelDetailedStaveSupport::ComputeStaveExternalShape() // ***** compute points coordinates defining stave long side // midSidePt : point next to cooling pipe - HepGeom::Point3D<double> midSidePt(0.0,0.0,0.0); - midSidePt=HepGeom::Point3D<double>(midStaveCenter.x()+midStaveRadius*midCos, midStaveCenter.y()+midStaveRadius*midSin, 0.0); + GeoTrf::Vector3D midSidePt(midStaveCenter.x()+midStaveRadius*midCos, midStaveCenter.y()+midStaveRadius*midSin, 0.0); m_gmt_mgr->msg(MSG::DEBUG)<< "midSidePt : "<<midSidePt.x()<<" "<<midSidePt.y()<<endmsg; m_gmt_mgr->msg(MSG::DEBUG)<< "-> verif : "<<(midSidePt.x()-midStaveCenter.x())*(midSidePt.x()-midStaveCenter.x())+(midSidePt.y()-midStaveCenter.y())*(midSidePt.y()-midStaveCenter.y())-midStaveRadius*midStaveRadius<<" ps : "<<(midSidePt.x()-midStaveCenter.x())*midSin+(midSidePt.y()-midStaveCenter.y())*midCos<<endmsg; - HepGeom::Point3D<double> midSidePt_omega(0.0,0.0,0.0); - CLHEP::Hep3Vector midSideDir(midSidePt.x()-midStaveCenter.x(),midSidePt.y()-midStaveCenter.y(),0.0); + GeoTrf::Vector3D midSidePt_omega(0.0,0.0,0.0); + GeoTrf::Vector3D midSideDir(midSidePt.x()-midStaveCenter.x(),midSidePt.y()-midStaveCenter.y(),0.0); midSidePt_omega=NeighbourPoint_Rad(midSidePt,midSideDir,omegaThick); // endSidePt : point next to end of stave - HepGeom::Point3D<double> endSidePt(0.0,0.0,0.0); - endSidePt=HepGeom::Point3D<double>(endStaveCenter.x()+endStaveRadius*midCos, endStaveCenter.y()+endStaveRadius*midSin, 0.0); + GeoTrf::Vector3D endSidePt(0.0,0.0,0.0); + endSidePt=GeoTrf::Vector3D(endStaveCenter.x()+endStaveRadius*midCos, endStaveCenter.y()+endStaveRadius*midSin, 0.0); m_gmt_mgr->msg(MSG::DEBUG)<< "endSidePt : "<<endSidePt.x()<<" "<<endSidePt.y()<<endmsg; m_gmt_mgr->msg(MSG::DEBUG)<< "-> verif : "<<(endSidePt.x()-endStaveCenter.x())*(endSidePt.x()-endStaveCenter.x())+(endSidePt.y()-endStaveCenter.y())*(endSidePt.y()-endStaveCenter.y())-endStaveRadius*endStaveRadius<<" ps : "<<(endSidePt.x()-endStaveCenter.x())*midSin-(endSidePt.y()-endStaveCenter.y())*midCos<<endmsg; - HepGeom::Point3D<double> endSidePt_omega(0.0,0.0,0.0); - CLHEP::Hep3Vector endSideDir(endSidePt.x()-endStaveCenter.x(),endSidePt.y()-endStaveCenter.y(),0.0); + GeoTrf::Vector3D endSidePt_omega(0.0,0.0,0.0); + GeoTrf::Vector3D endSideDir(endSidePt.x()-endStaveCenter.x(),endSidePt.y()-endStaveCenter.y(),0.0); endSidePt_omega=NeighbourPoint_Rad(endSidePt,endSideDir,omegaThick); // ***** Points defining the vertex of foam module and omega module // Foam module - HepGeom::Point3D<double> midStavePoint(0.0,0.0,0.0); + GeoTrf::Vector3D midStavePoint(0.0,0.0,0.0); midStavePoint=IntersectionPoint(midSidePt.x(),midSidePt.y(),endSidePt.x(),endSidePt.y(), midSidePt.x(),-midSidePt.y(),endSidePt.x(),-endSidePt.y()); m_FoamMiddleThick=midStavePoint.x(); m_gmt_mgr->msg(MSG::DEBUG)<< "Foam thickness (middle) "<<m_FoamMiddleThick<<" ("<<midStavePoint.y()<<") "<<endmsg; // Omega module - HepGeom::Point3D<double> midStavePoint_omega(0.0,0.0,0.0); + GeoTrf::Vector3D midStavePoint_omega(0.0,0.0,0.0); midStavePoint_omega=IntersectionPoint(midSidePt_omega.x(),midSidePt_omega.y(),endSidePt_omega.x(),endSidePt_omega.y(), midSidePt_omega.x(),-midSidePt_omega.y(),endSidePt_omega.x(),-endSidePt_omega.y()); m_OmegaMidStaveThick=midStavePoint_omega.x()-midStavePoint.x(); @@ -1591,23 +1591,23 @@ void GeoPixelDetailedStaveSupport::ComputeStaveExternalShape() // ***** Points defining the rounded shape at the edge of the stave // Neighbour endstave point (without omega) - HepGeom::Point3D<double> endStavePoint_omega(0.0,0.0,0.0); - CLHEP::Hep3Vector endStaveDir(endStavePoint.x()-endStaveCenter.x(),endStavePoint.y()-endStaveCenter.y(),0.0); + GeoTrf::Vector3D endStavePoint_omega(0.0,0.0,0.0); + GeoTrf::Vector3D endStaveDir(endStavePoint.x()-endStaveCenter.x(),endStavePoint.y()-endStaveCenter.y(),0.0); endStavePoint_omega=NeighbourPoint_Rad(endStavePoint,endStaveDir,omegaThick); - HepGeom::Point3D<double> endSidePt_omega2(0.0,0.0,0.0); + GeoTrf::Vector3D endSidePt_omega2(0.0,0.0,0.0); endSidePt_omega2=IntersectionPoint(midSidePt_omega.x(),midSidePt_omega.y(),endSidePt_omega.x(),endSidePt_omega.y(), endStavePoint_omega.x(),endStavePoint_omega.y(),endStavePoint.x(),endStavePoint.y()+m_OmegaEndStaveThick); m_gmt_mgr->msg(MSG::DEBUG)<< "EndStave + omega par intersection X/Y "<<endSidePt_omega2.x()<<" "<<endSidePt_omega2.y()<<endmsg; m_OmegaEndStavePointX=endSidePt_omega2.x(); m_OmegaEndStavePointY=endSidePt_omega2.y(); - HepGeom::Point3D<double> endSidePt_inner(0.0,0.0,0.0); - CLHEP::Hep3Vector endSidePt_vec(endSidePt_omega2.x()-endStavePoint.x(),endSidePt_omega2.y()-(endStavePoint.y()+m_OmegaEndStaveThick),0.0); + GeoTrf::Vector3D endSidePt_inner(0.0,0.0,0.0); + GeoTrf::Vector3D endSidePt_vec(endSidePt_omega2.x()-endStavePoint.x(),endSidePt_omega2.y()-(endStavePoint.y()+m_OmegaEndStaveThick),0.0); endSidePt_inner=NeighbourPoint_Perp(endSidePt_omega2,endSidePt_vec,omegaThick,-1); // Compute Rx3,Ry3 coordinates - HepGeom::Point3D<double> endSidePt_inter(0.0,0.0,0.0); + GeoTrf::Vector3D endSidePt_inter(0.0,0.0,0.0); endSidePt_inter=IntersectionPoint(midSidePt.x(),midSidePt.y(),endSidePt.x(),endSidePt.y(), endSidePt_inner.x(),endSidePt_inner.y(),endStavePoint.x(),endStavePoint.y()); m_FoamEdgePointX=endSidePt_inter.x(); @@ -1623,7 +1623,7 @@ void GeoPixelDetailedStaveSupport::ComputeStaveExternalShape() m_gmt_mgr->msg(MSG::DEBUG)<< "Verfi angles : "<<angle1<<" "<<angle2<<" "<<angle3<<" / "<<angle1*180.0/3.1415<<" "<<angle2*180.0/3.1415<<endmsg; // Compute mid stave side point - HepGeom::Point3D<double> midSidePoint(0.0,0.0,0.0); + GeoTrf::Vector3D midSidePoint(0.0,0.0,0.0); midSidePoint=IntersectionPoint(midSidePt_omega.x(),midSidePt_omega.y(),endSidePt_omega.x(),endSidePt_omega.y(), 0.0,(endStavePoint.y()+m_OmegaEndStaveThick)*0.5,10.0,(endStavePoint.y()+m_OmegaEndStaveThick)*0.5); m_MidStaveSidePointX=midSidePoint.x(); @@ -1632,50 +1632,50 @@ void GeoPixelDetailedStaveSupport::ComputeStaveExternalShape() } -HepGeom::Point3D<double> GeoPixelDetailedStaveSupport::IntersectionPoint(double Ax,double Ay,double Bx,double By,double Cx,double Cy,double Dx,double Dy) +GeoTrf::Vector3D GeoPixelDetailedStaveSupport::IntersectionPoint(double Ax,double Ay,double Bx,double By,double Cx,double Cy,double Dx,double Dy) { double tmp=(Bx-Ax)*(Dy-Cy)-(By-Ay)*(Dx-Cx); double invTmp=1.0/tmp; double r=((Ay-Cy)*(Dx-Cx)-(Ax-Cx)*(Dy-Cy))*invTmp; - HepGeom::Point3D<double> inter(Ax+r*(Bx-Ax),Ay+r*(By-Ay),0.0); + GeoTrf::Vector3D inter(Ax+r*(Bx-Ax),Ay+r*(By-Ay),0.0); return inter; } -CLHEP::Hep3Vector GeoPixelDetailedStaveSupport::NormalizeDir(CLHEP::Hep3Vector v) +GeoTrf::Vector3D GeoPixelDetailedStaveSupport::NormalizeDir(GeoTrf::Vector3D v) { double tmp=1.0/sqrt(v.x()*v.x()+v.y()*v.y()); - return CLHEP::Hep3Vector(v.x()*tmp,v.y()*tmp,0.0); + return GeoTrf::Vector3D(v.x()*tmp,v.y()*tmp,0.0); } -HepGeom::Point3D<double> GeoPixelDetailedStaveSupport::NeighbourPoint_Rad(HepGeom::Point3D<double> p, CLHEP::Hep3Vector v, double delta) +GeoTrf::Vector3D GeoPixelDetailedStaveSupport::NeighbourPoint_Rad(GeoTrf::Vector3D p, GeoTrf::Vector3D v, double delta) { - CLHEP::Hep3Vector vNorm=NormalizeDir(v); + GeoTrf::Vector3D vNorm=NormalizeDir(v); double xnew=p.x()+delta*vNorm.x(); double ynew=p.y()+delta*vNorm.y(); - return HepGeom::Point3D<double>(xnew,ynew,0.0); + return GeoTrf::Vector3D(xnew,ynew,0.0); } -HepGeom::Point3D<double> GeoPixelDetailedStaveSupport::NeighbourPoint_Perp(HepGeom::Point3D<double> p, CLHEP::Hep3Vector v, double delta, int iDir) +GeoTrf::Vector3D GeoPixelDetailedStaveSupport::NeighbourPoint_Perp(GeoTrf::Vector3D p, GeoTrf::Vector3D v, double delta, int iDir) { - CLHEP::Hep3Vector vNorm=NormalizeDir(v); + GeoTrf::Vector3D vNorm=NormalizeDir(v); double xnew=p.x()-iDir*delta*vNorm.y(); double ynew=p.y()+iDir*delta*vNorm.x(); - return HepGeom::Point3D<double>(xnew,ynew,0.0); + return GeoTrf::Vector3D(xnew,ynew,0.0); } double GeoPixelDetailedStaveSupport::ComputeAngle(double ux, double uy, double vx, double vy) { - CLHEP::Hep3Vector u(ux,uy,0.0); - CLHEP::Hep3Vector v(vx,vy,0.0); + GeoTrf::Vector3D u(ux,uy,0.0); + GeoTrf::Vector3D v(vx,vy,0.0); - CLHEP::Hep3Vector uNorm=NormalizeDir(u); - CLHEP::Hep3Vector vNorm=NormalizeDir(v); + GeoTrf::Vector3D uNorm=NormalizeDir(u); + GeoTrf::Vector3D vNorm=NormalizeDir(v); double pScal=uNorm.x()*vNorm.x()+uNorm.y()*vNorm.y(); double angle=acos(pScal); @@ -1683,7 +1683,7 @@ double GeoPixelDetailedStaveSupport::ComputeAngle(double ux, double uy, double v return angle; } -double GeoPixelDetailedStaveSupport::ComputeDistance(HepGeom::Point3D<double> p, HepGeom::Point3D<double> q) +double GeoPixelDetailedStaveSupport::ComputeDistance(GeoTrf::Vector3D p, GeoTrf::Vector3D q) { return sqrt((q.x()-p.x())*(q.x()-p.x())+(q.y()-p.y())*(q.y()-p.y())); } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDetailedStaveSupport.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDetailedStaveSupport.h similarity index 80% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDetailedStaveSupport.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDetailedStaveSupport.h index 05421994928..9eaadecff17 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDetailedStaveSupport.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDetailedStaveSupport.h @@ -5,8 +5,9 @@ #ifndef GEOPIXELDETAILEDSTAVESUPPORT_H #define GEOPIXELDETAILEDSTAVESUPPORT_H -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" @@ -16,7 +17,7 @@ public: GeoPixelDetailedStaveSupport(); virtual GeoVPhysVol* Build(); virtual GeoVPhysVol* getPhysVol() const {return m_physVol;} - virtual const HepGeom::Transform3D & transform() const {return m_transform;} + virtual const GeoTrf::Transform3D & transform() const {return m_transform;} virtual double thicknessP() const {return m_thicknessP;} virtual double thicknessN() const {return m_thicknessN;} virtual GeoSimplePolygonBrep* computeStaveEnvelopShape( double safetyMargin); @@ -46,7 +47,7 @@ private: GeoTransform* m_serviceCoolPipeTrfA; GeoTransform* m_serviceCoolPipeTrfC; - HepGeom::Transform3D m_transform; + GeoTrf::Transform3D m_transform; double m_thicknessP; double m_thicknessN; double m_thicknessN_svc; @@ -73,12 +74,12 @@ private: double m_MidStaveSidePointY; void ComputeStaveExternalShape(); - HepGeom::Point3D<double> IntersectionPoint(double Ax,double Ay,double Bx,double By,double Cx,double Cy,double Dx,double Dy); - CLHEP::Hep3Vector NormalizeDir(CLHEP::Hep3Vector v); - HepGeom::Point3D<double> NeighbourPoint_Rad(HepGeom::Point3D<double> p, CLHEP::Hep3Vector v, double delta); - HepGeom::Point3D<double> NeighbourPoint_Perp(HepGeom::Point3D<double> p, CLHEP::Hep3Vector v, double delta, int iDir); + GeoTrf::Vector3D IntersectionPoint(double Ax,double Ay,double Bx,double By,double Cx,double Cy,double Dx,double Dy); + GeoTrf::Vector3D NormalizeDir(GeoTrf::Vector3D v); + GeoTrf::Vector3D NeighbourPoint_Rad(GeoTrf::Vector3D p, GeoTrf::Vector3D v, double delta); + GeoTrf::Vector3D NeighbourPoint_Perp(GeoTrf::Vector3D p, GeoTrf::Vector3D v, double delta, int iDir); double ComputeAngle(double ux, double uy, double vx, double vy); - double ComputeDistance(HepGeom::Point3D<double> p, HepGeom::Point3D<double> q); + double ComputeDistance(GeoTrf::Vector3D p, GeoTrf::Vector3D q); }; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDisk.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDisk.cxx index bc0d5132beb..3ba59bf0a3c 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDisk.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDisk.cxx @@ -2,10 +2,10 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelDisk.h" -#include "PixelGeoModel/GeoPixelModule.h" -#include "PixelGeoModel/GeoPixelDiskSupports.h" -#include "PixelGeoModel/GeoPixelSiCrystal.h" +#include "GeoPixelDisk.h" +#include "GeoPixelModule.h" +#include "GeoPixelDiskSupports.h" +#include "GeoPixelSiCrystal.h" #include "InDetGeoModelUtils/ExtraMaterial.h" @@ -55,7 +55,7 @@ GeoVPhysVol* GeoPixelDisk::Build( ) { // Need to specify some eta. Assume all module the same GeoPixelModule psd(theSensor); double zpos = m_gmt_mgr->PixelECSiDz1()*0.5; - double deltaPhi = 360.*CLHEP::deg/ (float) nbECSector; + double deltaPhi = 360.*GeoModelKernelUnits::deg/ (float) nbECSector; // This is the start angle of the even modules (3.75 deg): double startAngle = deltaPhi*0.25; // Start angle could eventually come from the database... @@ -133,19 +133,20 @@ GeoVPhysVol* GeoPixelDisk::Build( ) { m_gmt_mgr->SetPhi(phiId); double angle = ii*0.5*deltaPhi+startAngle; - //if ( m_gmt_mgr->GetSide()<0 ) angle = 360*CLHEP::deg-(ii*deltaPhi+startAngle); + //if ( m_gmt_mgr->GetSide()<0 ) angle = 360*GeoModelKernelUnits::deg-(ii*deltaPhi+startAngle); int diskSide = (ii%2) ? +1 : -1; // even: -1, odd +1 - CLHEP::HepRotation rm; - rm.rotateY(90*CLHEP::deg); + + + GeoTrf::Transform3D rmX(GeoTrf::Transform3D::Identity()); if (oldGeometry && m_gmt_mgr->GetSide()<0) { - if (diskSide > 0) rm.rotateX(180.*CLHEP::deg); // This is for compatibilty with older geomtries. + if (diskSide > 0) rmX = GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); // This is for compatibilty with older geomtries. } else { - if (diskSide < 0) rm.rotateX(180.*CLHEP::deg); // depth axis points towards disk. + if (diskSide < 0) rmX = GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); // depth axis points towards disk. } - rm.rotateZ(angle); - CLHEP::Hep3Vector pos(moduleRadius,0.,diskSide*zpos); - pos.rotateZ(angle); - GeoAlignableTransform* xform = new GeoAlignableTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(angle) * rmX * GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + GeoTrf::Vector3D pos(moduleRadius,0.,diskSide*zpos); + pos = GeoTrf::RotateZ3D(angle)*pos; + GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::Translate3D(pos.x(),pos.y(),pos.z())*rm); GeoVPhysVol * modulePhys = psd.Build(); std::ostringstream nameTag; nameTag << "ModuleEC" << phiId; @@ -166,7 +167,7 @@ GeoVPhysVol* GeoPixelDisk::Build( ) { GeoPixelDiskSupports pds; for(int ii =0; ii< pds.NCylinders(); ii++) { pds.SetCylinder(ii); - GeoTransform* xform = new GeoTransform( HepGeom::Translate3D(0, 0, pds.ZPos()) ); + GeoTransform* xform = new GeoTransform( GeoTrf::Translate3D(0, 0, pds.ZPos()) ); diskPhys->add(xform); diskPhys->add(pds.Build() ); } @@ -207,11 +208,11 @@ double GeoPixelDisk::Thickness() { // 7-1 I switch to the minimum thickness possible as the cables are right // outside this volume. // - // return 10*CLHEP::mm; + // return 10*GeoModelKernelUnits::mm; // GWG. It would be nice to get these numbers from the module itself to // ensure consistency. - double safety = 0.01* CLHEP::mm; // This is the safety added to the module. - double zClearance = 0.5 * CLHEP::mm; // Clearance for misalignments + double safety = 0.01* GeoModelKernelUnits::mm; // This is the safety added to the module. + double zClearance = 0.5 * GeoModelKernelUnits::mm; // Clearance for misalignments double tck = 2*(safety + 0.5*m_gmt_mgr->PixelBoardThickness() + std::max(m_gmt_mgr->PixelHybridThickness(), m_gmt_mgr->PixelChipThickness()+m_gmt_mgr->PixelChipGap()) diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDisk.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDisk.h similarity index 87% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDisk.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDisk.h index 2c0c281e84e..484e5919ae5 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDisk.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDisk.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELDISK_H #define GEOPIXELDISK_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoPixelDisk : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSLHC.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSLHC.cxx index deeca836e1f..13d094d8afe 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSLHC.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSLHC.cxx @@ -2,10 +2,10 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelDiskSLHC.h" -#include "PixelGeoModel/GeoPixelDiskSupports.h" -#include "PixelGeoModel/GeoPixelSiCrystal.h" -#include "PixelGeoModel/GeoPixelRingSLHC.h" +#include "GeoPixelDiskSLHC.h" +#include "GeoPixelDiskSupports.h" +#include "GeoPixelSiCrystal.h" +#include "GeoPixelRingSLHC.h" #include "InDetGeoModelUtils/ExtraMaterial.h" @@ -77,7 +77,7 @@ GeoVPhysVol* GeoPixelDiskSLHC::Build( ) { // front rings first (away from IP) m_gmt_mgr->setDiskFront(); GeoPixelRingSLHC gpRingF(theSensor); - GeoTransform* xfront = new GeoTransform( HepGeom::Translate3D(0, 0, zpos) ); + GeoTransform* xfront = new GeoTransform( GeoTrf::Translate3D(0, 0, zpos) ); diskPhys->add( new GeoNameTag("PixelECRing") ); diskPhys->add( new GeoIdentifierTag(2*iring) ); diskPhys->add( xfront ); @@ -89,7 +89,7 @@ GeoVPhysVol* GeoPixelDiskSLHC::Build( ) { // then back rings (near IP) m_gmt_mgr->setDiskBack(); GeoPixelRingSLHC gpRingB(theSensor); - GeoTransform* xback = new GeoTransform( HepGeom::Translate3D(0, 0, -zpos) ); + GeoTransform* xback = new GeoTransform( GeoTrf::Translate3D(0, 0, -zpos) ); diskPhys->add( new GeoNameTag("PixelECRing") ); diskPhys->add( new GeoIdentifierTag(2*iring+1) ); // unique diskPhys->add( xback ); @@ -103,7 +103,7 @@ GeoVPhysVol* GeoPixelDiskSLHC::Build( ) { for(int ii =0; ii< pds.NCylinders(); ii++) { pds.SetCylinder(ii); GeoNameTag* tag = new GeoNameTag("DiskSupport"); - GeoTransform* xform = new GeoTransform( HepGeom::Translate3D(0, 0, pds.ZPos()) ); + GeoTransform* xform = new GeoTransform( GeoTrf::Translate3D(0, 0, pds.ZPos()) ); diskPhys->add(tag); diskPhys->add(xform); diskPhys->add(pds.Build() ); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDiskSLHC.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSLHC.h similarity index 85% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDiskSLHC.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSLHC.h index 4397cfdf5f5..d3b882e6d1c 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDiskSLHC.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSLHC.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELDISKSLHC_H #define GEOPIXELDISKSLHC_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoPixelDiskSLHC : public GeoVPixelFactory { public: diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSupports.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSupports.cxx index a305d0e53c7..7e3e94f2b59 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSupports.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSupports.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelDiskSupports.h" +#include "GeoPixelDiskSupports.h" #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDiskSupports.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSupports.h similarity index 92% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDiskSupports.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSupports.h index 1a7c3415550..c60302eac1a 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelDiskSupports.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelDiskSupports.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELDISKSUPPORTS_H #define GEOPIXELDISKSUPPORTS_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoPixelDiskSupports : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelECCable.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelECCable.cxx index b0a9ff094aa..552112bcba0 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelECCable.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelECCable.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelECCable.h" +#include "GeoPixelECCable.h" #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelECCable.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelECCable.h similarity index 86% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelECCable.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelECCable.h index cde825e4b4e..ec4bf77bb4e 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelECCable.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelECCable.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELECCABLE_H #define GEOPIXELECCABLE_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoPixelECCable : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEndCap.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEndCap.cxx index 533c324f560..4279d0d89a2 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEndCap.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEndCap.cxx @@ -2,11 +2,11 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelEndCap.h" -#include "PixelGeoModel/GeoPixelDisk.h" -#include "PixelGeoModel/GeoPixelDiskSLHC.h" -#include "PixelGeoModel/GeoPixelECCable.h" -#include "PixelGeoModel/GeoPixelServices.h" +#include "GeoPixelEndCap.h" +#include "GeoPixelDisk.h" +#include "GeoPixelDiskSLHC.h" +#include "GeoPixelECCable.h" +#include "GeoPixelServices.h" #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoNameTag.h" @@ -78,7 +78,7 @@ GeoVPhysVol* GeoPixelEndCap::Build( ) { std::ostringstream nameTag; nameTag << "Disk" << idisk; GeoNameTag * tag = new GeoNameTag(nameTag.str()); - GeoAlignableTransform* xform = new GeoAlignableTransform(HepGeom::TranslateZ3D(zdisk)); + GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::TranslateZ3D(zdisk)); GeoVPhysVol * diskPhys = 0; if (m_gmt_mgr->slhc()) { @@ -102,10 +102,10 @@ GeoVPhysVol* GeoPixelEndCap::Build( ) { // if (pecc && pd) { // Not in SLHC double dz = pd->Thickness()/2. + m_gmt_mgr->PixelECCablesDistance() ; - GeoTransform * xformCablesPlus = new GeoTransform(HepGeom::TranslateZ3D(zdisk+dz)); + GeoTransform * xformCablesPlus = new GeoTransform(GeoTrf::TranslateZ3D(zdisk+dz)); ecPhys->add(xformCablesPlus); ecPhys->add(pecc->Build() ); - GeoTransform * xformCablesMinus = new GeoTransform(HepGeom::TranslateZ3D(zdisk-dz)); + GeoTransform * xformCablesMinus = new GeoTransform(GeoTrf::TranslateZ3D(zdisk-dz)); ecPhys->add(xformCablesMinus); ecPhys->add(pecc->Build() ); } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelEndCap.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEndCap.h similarity index 89% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelEndCap.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEndCap.h index 72b43040a8a..eba497217a3 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelEndCap.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEndCap.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELENDCAP_H #define GEOPIXELENDCAP_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoPixelServices; class GeoPixelEndCap : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEnvelope.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEnvelope.cxx index 1f1bdb7fab8..0a19ebf30ec 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEnvelope.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEnvelope.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelEnvelope.h" +#include "GeoPixelEnvelope.h" #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoPcon.h" #include "GeoModelKernel/GeoLogVol.h" @@ -12,14 +12,14 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "PixelGeoModel/GeoPixelBarrel.h" -#include "PixelGeoModel/GeoPixelEndCap.h" -#include "PixelGeoModel/GeoPixelServices.h" -#include "PixelGeoModel/GeoPixelFrame.h" -#include "PixelGeoModel/GeoPixelOldFrame.h" -#include "PixelGeoModel/GeoPixelIFlexServices.h" -#include "PixelGeoModel/GeoPixelIBLFwdServices.h" -#include "PixelGeoModel/DBM_Det.h" +#include "GeoPixelBarrel.h" +#include "GeoPixelEndCap.h" +#include "GeoPixelServices.h" +#include "GeoPixelFrame.h" +#include "GeoPixelOldFrame.h" +#include "GeoPixelIFlexServices.h" +#include "GeoPixelIBLFwdServices.h" +#include "DBM_Det.h" #include "InDetGeoModelUtils/VolumeBuilder.h" #include "InDetGeoModelUtils/VolumeSplitterUtils.h" @@ -59,7 +59,7 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { envelopeShape = new GeoTube(rmin,rmax,halflength); pixZone = new InDetDD::TubeZone("Pixel",-halflength,halflength,rmin,rmax); } else { - GeoPcon* envelopeShapeTmp = new GeoPcon(0.,2*CLHEP::pi); + GeoPcon* envelopeShapeTmp = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // table contains +ve z values only and envelope is assumed to be symmetric around z. int numPlanes = m_gmt_mgr->PixelEnvelopeNumPlanes(); for (int i = 0; i < numPlanes * 2; i++) { @@ -91,7 +91,7 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { // // Add the Barrel: // - HepGeom::Transform3D barrelTransform = m_gmt_mgr->partTransform("Barrel"); + GeoTrf::Transform3D barrelTransform = m_gmt_mgr->partTransform("Barrel"); m_gmt_mgr->SetBarrel(); GeoPixelBarrel brl(pixServices); @@ -115,10 +115,10 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { m_DDmgr->numerology().addEndcap(2); - HepGeom::Transform3D endcapATransform = m_gmt_mgr->partTransform("EndcapA"); + GeoTrf::Transform3D endcapATransform = m_gmt_mgr->partTransform("EndcapA"); m_gmt_mgr->SetPos(); - GeoTransform* xform = new GeoTransform(endcapATransform * HepGeom::TranslateZ3D(zpos)); + GeoTransform* xform = new GeoTransform(endcapATransform * GeoTrf::TranslateZ3D(zpos)); GeoNameTag* tag = new GeoNameTag("EndCapA"); envelopePhys->add(tag); envelopePhys->add(new GeoIdentifierTag(2)); @@ -131,11 +131,11 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { m_DDmgr->numerology().addEndcap(-2); - HepGeom::Transform3D endcapCTransform = m_gmt_mgr->partTransform("EndcapC"); + GeoTrf::Transform3D endcapCTransform = m_gmt_mgr->partTransform("EndcapC"); m_gmt_mgr->SetEndcap(); m_gmt_mgr->SetNeg(); - GeoTransform* xform = new GeoTransform(endcapCTransform * HepGeom::TranslateZ3D(-zpos) * HepGeom::RotateY3D(180*CLHEP::deg)); + GeoTransform* xform = new GeoTransform(endcapCTransform * GeoTrf::TranslateZ3D(-zpos) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg)); GeoNameTag* tag = new GeoNameTag("EndCapC"); envelopePhys->add(tag); envelopePhys->add(new GeoIdentifierTag(-2)); @@ -237,7 +237,7 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { // so if change then change in DBM_module too if (m_gmt_mgr->dbm()) { - HepGeom::Translate3D dbmTransform1( 0, 0, 887.002*CLHEP::mm + ( m_gmt_mgr->DBMTelescopeZ() )/2.); //Add 0.002mm to 887mm for safety + GeoTrf::Translate3D dbmTransform1( 0, 0, 887.002*GeoModelKernelUnits::mm + ( m_gmt_mgr->DBMTelescopeZ() )/2.); //Add 0.002mm to 887mm for safety //m_DDmgr->numerology().addEndcap(4); m_gmt_mgr->SetPartsDBM(); @@ -253,7 +253,7 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { //m_DDmgr->numerology().addEndcap(-4); m_gmt_mgr->SetNeg(); GeoNameTag* tag2 = new GeoNameTag("DBMC"); - GeoTransform* dbmTransform2 = new GeoTransform(HepGeom::TranslateZ3D(-887.002*CLHEP::mm - ( m_gmt_mgr->DBMTelescopeZ() )/2.) * HepGeom::RotateY3D(180*CLHEP::deg)); + GeoTransform* dbmTransform2 = new GeoTransform(GeoTrf::TranslateZ3D(-887.002*GeoModelKernelUnits::mm - ( m_gmt_mgr->DBMTelescopeZ() )/2.) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg)); envelopePhys->add(tag2); envelopePhys->add(new GeoIdentifierTag(-4)); envelopePhys->add(dbmTransform2); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelEnvelope.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEnvelope.h similarity index 84% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelEnvelope.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEnvelope.h index 0e21e84d5bf..da67c0c8e46 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelEnvelope.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelEnvelope.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELENVELOPE_H #define GEOPIXELENVELOPE_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoPixelEnvelope : public GeoVPixelFactory { public: diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFluid.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFluid.cxx index 4f353b767dc..5a9fc2db145 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFluid.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFluid.cxx @@ -6,7 +6,7 @@ // This class builds one trapezoid // // -#include "PixelGeoModel/GeoPixelFluid.h" +#include "GeoPixelFluid.h" #include "GeoModelKernel/GeoTrd.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelFluid.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFluid.h similarity index 91% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelFluid.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFluid.h index e6503ca4be0..06909551298 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelFluid.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFluid.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELFLUID_H #define GEOPIXELFLUID_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" #include <sstream> class GeoLogVol; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFrame.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFrame.cxx index b1a906be92f..e626969c244 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFrame.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFrame.cxx @@ -4,7 +4,8 @@ // Build the global support frame -#include "PixelGeoModel/GeoPixelFrame.h" +#include "GeoPixelFrame.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoPara.h" #include "GeoModelKernel/GeoTrap.h" @@ -14,8 +15,7 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoTransform.h" - -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <algorithm> GeoPixelFrame::GeoPixelFrame() @@ -47,18 +47,18 @@ void GeoPixelFrame::BuildAndPlace(GeoFullPhysVol * parent, int section) //////////////////////// // Make envelope to hold the frame - //double safety = 0.001 * CLHEP::mm; - double epsilon = 0.00001 * CLHEP::mm; + //double safety = 0.001 * GeoModelKernelUnits::mm; + double epsilon = 0.00001 * GeoModelKernelUnits::mm; double halflength = 0.5*std::abs(zmax - zmin); - double alpha = CLHEP::pi/numSides; + double alpha = GeoModelKernelUnits::pi/numSides; double cosalpha = cos(alpha); double sinalpha = sin(alpha); /* double rminEnv = (rminSide-safety)/cosalpha; double rmaxEnv = (rmaxSide+safety)/cosalpha; - GeoPgon * frameEnvShape = new GeoPgon(phiLoc-alpha,2*CLHEP::pi,numSides); + GeoPgon * frameEnvShape = new GeoPgon(phiLoc-alpha,2*GeoModelKernelUnits::pi,numSides); frameEnvShape->addPlane(zCenter-halflength-0.5*epsilon,rminEnv,rmaxEnv); frameEnvShape->addPlane(zCenter+halflength+0.5*epsilon,rminEnv,rmaxEnv); @@ -134,7 +134,7 @@ void GeoPixelFrame::BuildAndPlace(GeoFullPhysVol * parent, int section) if (numElements) { double sideThick = rmaxSide - rminSide; - std::vector<HepGeom::Transform3D> sideTransVec; + std::vector<GeoTrf::Transform3D> sideTransVec; std::vector<GeoShape *> sideElementShapeVec; sideTransVec.reserve(numElements); sideElementShapeVec.reserve(numElements); @@ -160,7 +160,7 @@ void GeoPixelFrame::BuildAndPlace(GeoFullPhysVol * parent, int section) zSideMax = std::max(zSideMax, zmaxInput); } GeoShape * sideElementShape = 0; - HepGeom::Transform3D rotateShape; + GeoTrf::Transform3D rotateShape(GeoTrf::Transform3D::Identity()); double shapeVolume = 0; if (same(zMin1,zMin2) && same(zMax1,zMax2)) { // Use a box @@ -172,13 +172,13 @@ void GeoPixelFrame::BuildAndPlace(GeoFullPhysVol * parent, int section) double thetaPara = 0; double phiPara = 0; sideElementShape = new GeoPara(0.5*std::abs(zMax1-zMin1), 0.5*sideWidth-epsilon, 0.5*sideThick, alphaPara, thetaPara, phiPara); - rotateShape = HepGeom::RotateY3D(-90*CLHEP::deg); + rotateShape = GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); shapeVolume = std::abs(zMax1-zMin1) * (sideWidth-2*epsilon) * sideThick; } else {// // other cases not implemented. Should not occur for the frame. std::cout << "GeoPixelFrame: This case is not handled for building the frame" << std::endl; } - sideTransVec.push_back(HepGeom::TranslateZ3D(0.25*(zMin1+zMin2+zMax1+zMax2))*rotateShape); + sideTransVec.push_back(GeoTrf::TranslateZ3D(0.25*(zMin1+zMin2+zMax1+zMax2))*rotateShape); sideElementShapeVec.push_back(sideElementShape); //totSideVolume += sideElementShape->volume(); totSideVolume += shapeVolume; @@ -194,7 +194,7 @@ void GeoPixelFrame::BuildAndPlace(GeoFullPhysVol * parent, int section) std::string sideMatName = m_gmt_mgr->PixelFrameSideMaterial(section); const GeoMaterial* sideMat = m_mat_mgr->getMaterialForVolume(sideMatName,numSides*totSideVolume); for (int iElement = 0; iElement < numElements; iElement++) { - GeoTransform * transSideElement = new GeoTransform(HepGeom::TranslateZ3D(-zSideCenter)*sideTransVec[iElement]); + GeoTransform * transSideElement = new GeoTransform(GeoTrf::TranslateZ3D(-zSideCenter)*sideTransVec[iElement]); std::ostringstream frameSideName; frameSideName << "FrameSide" << iElement; GeoLogVol * sideElementLV = new GeoLogVol(frameSideName.str(), sideElementShapeVec[iElement], sideMat); @@ -212,18 +212,18 @@ void GeoPixelFrame::BuildAndPlace(GeoFullPhysVol * parent, int section) // place the corners and sides. for (int iSide = 0; iSide<numSides; iSide++) { double angleCorner = phiLoc + alpha * (2*iSide - 1); - GeoTransform * cornerTrans = new GeoTransform(HepGeom::TranslateZ3D(zCenter)*HepGeom::RotateZ3D(angleCorner)); + GeoTransform * cornerTrans = new GeoTransform(GeoTrf::TranslateZ3D(zCenter)*GeoTrf::RotateZ3D(angleCorner)); // Place the corners parent->add(cornerTrans); parent->add(cornerPV); if (sideEnvelopePV) { double angleSide = phiLoc + alpha * (2*iSide); - HepGeom::Transform3D oddEvenRotate; + GeoTrf::Transform3D oddEvenRotate(GeoTrf::Transform3D::Identity()); if (iSide%2 && mirrorSides) { - oddEvenRotate = HepGeom::RotateZ3D(CLHEP::pi); // Every 2nd side we mirror the side. + oddEvenRotate = GeoTrf::RotateZ3D(GeoModelKernelUnits::pi); // Every 2nd side we mirror the side. } - GeoTransform * sideTrans = new GeoTransform(HepGeom::TranslateZ3D(zSideCenter)*HepGeom::RotateZ3D(angleSide) - *HepGeom::TranslateX3D(midRadius)*oddEvenRotate); + GeoTransform * sideTrans = new GeoTransform(GeoTrf::TranslateZ3D(zSideCenter)*GeoTrf::RotateZ3D(angleSide) + *GeoTrf::TranslateX3D(midRadius)*oddEvenRotate); // Place the sides parent->add(sideTrans); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelFrame.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFrame.h similarity index 90% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelFrame.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFrame.h index 34d97b4b46b..6648da6ba28 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelFrame.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelFrame.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELFRAME_H #define GEOPIXELFRAME_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoPixelFrame : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelHybrid.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelHybrid.cxx index 84086a8f87c..d2918ede95e 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelHybrid.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelHybrid.cxx @@ -11,7 +11,7 @@ // // Contains: nothing // -#include "PixelGeoModel/GeoPixelHybrid.h" +#include "GeoPixelHybrid.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelHybrid.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelHybrid.h similarity index 88% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelHybrid.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelHybrid.h index 21a12fd12d9..ed159c5257e 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelHybrid.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelHybrid.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELHYBRID_H #define GEOPIXELHYBRID_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoPixelHybrid : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdServices.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdServices.cxx index e39504eb91e..616831e979f 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdServices.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdServices.cxx @@ -6,10 +6,10 @@ // Build IBL fwd services (wavy shape) // This is built one time per layer. -#include "PixelGeoModel/GeoPixelIBLFwdServices.h" +#include "GeoPixelIBLFwdServices.h" -#include "PixelGeoModel/GeoPixelIBLFwdSvcCADModel.h" -#include "PixelGeoModel/GeoPixelIBLFwdSvcModel1.h" +#include "GeoPixelIBLFwdSvcCADModel.h" +#include "GeoPixelIBLFwdSvcModel1.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdServices.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdServices.h similarity index 81% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdServices.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdServices.h index 4b5984340d4..9b23be3728c 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdServices.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdServices.h @@ -5,17 +5,14 @@ #ifndef GEOPIXELIBLFWDSERVICES_H #define GEOPIXELIBLFWDSERVICES_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "PixelGeoModel/GeoPixelLadder.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPixelLadder.h" -#include "CLHEP/Geometry/Transform3D.h" #include "GeoModelKernel/GeoPhysVol.h" - class GeoTransform; -class GeoPhysVol; class GeoPixelIBLFwdServices : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcCADModel.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcCADModel.cxx index 9748cd9a02c..11643a2de65 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcCADModel.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcCADModel.cxx @@ -6,7 +6,7 @@ // Build IBL fwd services (wavy shape) // This is built one time per layer. -#include "PixelGeoModel/GeoPixelIBLFwdSvcCADModel.h" +#include "GeoPixelIBLFwdSvcCADModel.h" #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoTubs.h" @@ -53,7 +53,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() m_gmt_mgr->msg(MSG::INFO) <<"Build IBL fwd services - CAD tool design - Torus object is defined"<<endmsg; - // double safety = 0.01*CLHEP::mm; + // double safety = 0.01*GeoModelKernelUnits::mm; // IBL layer shift ( 2mm shift issue ) double layerZshift = m_gmt_mgr->PixelLayerGlobalShift(); @@ -63,7 +63,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() // check if sectors are properly defined if(nSectors==0) return 0; - double angle=360./(double)nSectors*CLHEP::deg; + double angle=360./(double)nSectors*GeoModelKernelUnits::deg; // Defines the IBL_Fwd02 section in the IBL services area double innerRadius = 33.; @@ -94,7 +94,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() double lgFwdSvc[4]={511., 561., 560., 706. }; double devLgFwdSvc[4]={512., 562., 562., 707. }; double devTotalLength = 2460.188; - double pi = CLHEP::pi; + double pi = GeoModelKernelUnits::pi; // Cable bundle sizes double rminCable = 0.; @@ -112,7 +112,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() double zposRing = 0.; double totalLength=0.; double hermJunction = .4; - double breakAngle = 11.*CLHEP::deg; + double breakAngle = 11.*GeoModelKernelUnits::deg; // Loop over the wavy shape sections to build a cable and a cooling pipe const GeoShape * gblShapeCableA = 0; @@ -133,9 +133,9 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() double tubeLength=deltaJunction+zpos0-zMin+hermJunction; double zposTrans=zMin+tubeLength*.5-zpos0; const GeoTube* tubeShape = new GeoTube(0., rmaxCable, tubeLength*.5); - HepGeom::Transform3D trfA = HepGeom::TranslateZ3D(zpos0+zposTrans-zMiddle); + GeoTrf::Transform3D trfA = GeoTrf::TranslateZ3D(zpos0+zposTrans-zMiddle); gblShapeCableA = addShape(gblShapeCableA, tubeShape, trfA ); - HepGeom::Transform3D trfC = HepGeom::RotateY3D(pi)*HepGeom::TranslateZ3D(zpos0+zposTrans-zMiddle); + GeoTrf::Transform3D trfC = GeoTrf::RotateY3D(pi)*GeoTrf::TranslateZ3D(zpos0+zposTrans-zMiddle); gblShapeCableC = addShape(gblShapeCableC, tubeShape, trfC ); // std::cout<<"IBL_fwd : junction "<<std::setprecision(15)<<i<<" : "<<zpos0+zposTrans-tubeLength*.5<<" "<<zpos0+zposTrans+tubeLength*.5<<" // "<<zMin<<std::endl; @@ -151,9 +151,9 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() double rtor = radius; const GeoTorus* torusShape = new GeoTorus(rminCable,rmaxCable,rtor,pi*.5-theta,2.*theta); double angle=(i%2==0)?breakAngle:pi-breakAngle; - HepGeom::Transform3D trfA = HepGeom::RotateZ3D(angle)*HepGeom::RotateY3D(-pi*.5)*HepGeom::TranslateY3D(-radius+delta)* HepGeom::TranslateX3D(zpos0+zpos-zMiddle); + GeoTrf::Transform3D trfA = GeoTrf::RotateZ3D(angle)*GeoTrf::RotateY3D(-pi*.5)*GeoTrf::TranslateY3D(-radius+delta)* GeoTrf::TranslateX3D(zpos0+zpos-zMiddle); gblShapeCableA = addShape(gblShapeCableA, torusShape, trfA ); - HepGeom::Transform3D trfC = HepGeom::RotateZ3D(angle)*HepGeom::RotateY3D(pi*.5)*HepGeom::TranslateY3D(-radius+delta)* HepGeom::TranslateX3D(zpos0+zpos-zMiddle); + GeoTrf::Transform3D trfC = GeoTrf::RotateZ3D(angle)*GeoTrf::RotateY3D(pi*.5)*GeoTrf::TranslateY3D(-radius+delta)* GeoTrf::TranslateX3D(zpos0+zpos-zMiddle); gblShapeCableC = addShape(gblShapeCableC, torusShape, trfC ); const GeoTorus* torusShape_cooling = new GeoTorus(rminCooling,rmaxCooling,rtor,pi*.5-theta,2.*theta); @@ -167,9 +167,9 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() double tubeLength=zMax-zpos+hermJunction; double zposTrans=zMax-tubeLength*.5; const GeoTube* tubeShape = new GeoTube(0., rmaxCable, tubeLength*.5); - HepGeom::Transform3D trfA = HepGeom::TranslateZ3D(zposTrans-zMiddle); + GeoTrf::Transform3D trfA = GeoTrf::TranslateZ3D(zposTrans-zMiddle); gblShapeCableA = addShape(gblShapeCableA, tubeShape, trfA ); - HepGeom::Transform3D trfC = HepGeom::RotateY3D(pi)*HepGeom::TranslateZ3D(zposTrans-zMiddle); + GeoTrf::Transform3D trfC = GeoTrf::RotateY3D(pi)*GeoTrf::TranslateZ3D(zposTrans-zMiddle); gblShapeCableC = addShape(gblShapeCableC, tubeShape, trfC ); const GeoTube* tubeShape_cooling = new GeoTube(0., rmaxCooling, tubeLength*.5); @@ -195,12 +195,12 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() // -------------- Alignement of the services with the previous services (Fwd01 area) double cooling_radius = 35.1; - double cooling_angle = -2.154*CLHEP::deg; + double cooling_angle = -2.154*GeoModelKernelUnits::deg; if(m_gmt_mgr->PixelStaveAxe()==1) { cooling_radius = 34.7 + layerRadius-33.25; - cooling_angle = -.1*CLHEP::deg; + cooling_angle = -.1*GeoModelKernelUnits::deg; } double cable_radius = 36.501; @@ -222,7 +222,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() std::ostringstream tmp1; tmp1 << "IBL_Fwd02_Cooling_A" << ii; GeoNameTag * tag1 = new GeoNameTag(tmp1.str()); - GeoTransform* xformA1 = new GeoTransform(HepGeom::RotateZ3D(phiOfCooling)*HepGeom::TranslateX3D(cooling_radius)); + GeoTransform* xformA1 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius)); m_supportPhysA->add(tag1); m_supportPhysA->add(xformA1); m_supportPhysA->add(coolingPhysVolA); @@ -230,7 +230,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() std::ostringstream tmp1C; tmp1C << "IBL_Fwd02_Cooling_C" << ii; GeoNameTag * tag1C = new GeoNameTag(tmp1C.str()); - GeoTransform* xformC1 = new GeoTransform(HepGeom::RotateZ3D(phiOfCooling)*HepGeom::TranslateX3D(cooling_radius)); + GeoTransform* xformC1 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius)); m_supportPhysC->add(tag1C); m_supportPhysC->add(xformC1); m_supportPhysC->add(coolingPhysVolC); @@ -240,7 +240,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() std::ostringstream tmp2; tmp2 << "IBL_Fwd02_Cable_A" << ii; GeoNameTag * tag2 = new GeoNameTag(tmp2.str()); - GeoTransform* xformA2 = new GeoTransform(HepGeom::RotateZ3D(phiOfCable)*HepGeom::TranslateX3D(cable_radius)); + GeoTransform* xformA2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCable)*GeoTrf::TranslateX3D(cable_radius)); m_supportPhysA->add(tag2); m_supportPhysA->add(xformA2); m_supportPhysA->add(cablePhysVolA); @@ -248,7 +248,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() std::ostringstream tmp2C; tmp2C << "IBL_Fwd02_Cable_C" << ii; GeoNameTag * tag2C = new GeoNameTag(tmp2C.str()); - GeoTransform* xformC2 = new GeoTransform(HepGeom::RotateZ3D(phiOfCable)*HepGeom::TranslateX3D(cable_radius)); + GeoTransform* xformC2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCable)*GeoTrf::TranslateX3D(cable_radius)); m_supportPhysC->add(tag2C); m_supportPhysC->add(xformC2); m_supportPhysC->add(cablePhysVolC); @@ -259,10 +259,10 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() double middleA = zMiddle+layerZshift; double middleC = -zMiddle+layerZshift; - HepGeom::Transform3D supportTrfA = HepGeom::TranslateZ3D(middleA); + GeoTrf::Transform3D supportTrfA = GeoTrf::TranslateZ3D(middleA); m_xformSupportA = new GeoTransform(supportTrfA); - HepGeom::Transform3D supportTrfC = HepGeom::TranslateZ3D(middleC); + GeoTrf::Transform3D supportTrfC = GeoTrf::TranslateZ3D(middleC); m_xformSupportC = new GeoTransform(supportTrfC); return 0; @@ -272,7 +272,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcCADModel::Build() } -const GeoShape * GeoPixelIBLFwdSvcCADModel::addShape(const GeoShape * lastShape, const GeoShape * nextShape, const HepGeom::Transform3D & trans) +const GeoShape * GeoPixelIBLFwdSvcCADModel::addShape(const GeoShape * lastShape, const GeoShape * nextShape, const GeoTrf::Transform3D & trans) { const GeoShape * shiftedShape = &(*nextShape << trans); if (lastShape) { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdSvcCADModel.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcCADModel.h similarity index 76% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdSvcCADModel.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcCADModel.h index 8ad8a742b95..63a6ddb10b6 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdSvcCADModel.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcCADModel.h @@ -5,17 +5,16 @@ #ifndef GEOPIXELIBLFWDSVC_CADMODEL_H #define GEOPIXELIBLFWDSVC_CADMODEL_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "PixelGeoModel/GeoPixelLadder.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPixelLadder.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" - class GeoTransform; -class GeoPhysVol; class GeoPixelIBLFwdSvcCADModel : public GeoVPixelFactory { @@ -36,7 +35,7 @@ public: GeoTransform *m_xformSupportA; GeoTransform *m_xformSupportC; - const GeoShape* addShape(const GeoShape * lastShape, const GeoShape * nextShape, const HepGeom::Transform3D & trans); + const GeoShape* addShape(const GeoShape * lastShape, const GeoShape * nextShape, const GeoTrf::Transform3D & trans); }; #endif diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcModel1.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcModel1.cxx index 8ee32562e12..ae12b9fea42 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcModel1.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcModel1.cxx @@ -6,7 +6,7 @@ // Build IBL fwd services (wavy shape) // This is built one time per layer. -#include "PixelGeoModel/GeoPixelIBLFwdSvcModel1.h" +#include "GeoPixelIBLFwdSvcModel1.h" #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoTubs.h" @@ -39,7 +39,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcModel1::Build() m_gmt_mgr->msg(MSG::INFO) <<"Build IBL fwd services"<<endmsg; - // double safety = 0.01*CLHEP::mm; + // double safety = 0.01*GeoModelKernelUnits::mm; // IBL layer shift ( 2mm shift issue ) double layerZshift = m_gmt_mgr->PixelLayerGlobalShift(); @@ -49,7 +49,7 @@ GeoVPhysVol* GeoPixelIBLFwdSvcModel1::Build() // check if sectors are properly defined if(nSectors==0) return 0; - double angle=360./(double)nSectors*CLHEP::deg; + double angle=360./(double)nSectors*GeoModelKernelUnits::deg; // Defines the IBL_Fwd02 section in the IBL services area double innerRadius = 33.; @@ -98,15 +98,15 @@ GeoVPhysVol* GeoPixelIBLFwdSvcModel1::Build() // double zposRing = 0.; double totalLength=0.; // double hermJunction = .4; - double breakAngle = 11.*CLHEP::deg; + double breakAngle = 11.*GeoModelKernelUnits::deg; double cooling_radius = 35.1; - double cooling_angle = -2.154*CLHEP::deg; + double cooling_angle = -2.154*GeoModelKernelUnits::deg; if(m_gmt_mgr->PixelStaveAxe()==1) { cooling_radius = 34.7 + layerRadius-33.25; - cooling_angle = -.1*CLHEP::deg; + cooling_angle = -.1*GeoModelKernelUnits::deg; } double cable_radius = 36.501; @@ -189,10 +189,10 @@ GeoVPhysVol* GeoPixelIBLFwdSvcModel1::Build() // Cable const GeoTube* cableShape = new GeoTube(rminCable, rmaxCable, zHalfLength); - double angle = 0.; //11.*CLHEP::deg; - HepGeom::Transform3D trfA1 = HepGeom::RotateZ3D(angle)*HepGeom::TranslateZ3D(zpos-zMiddle); + double angle = 0.; //11.*GeoModelKernelUnits::deg; + GeoTrf::Transform3D trfA1 = GeoTrf::RotateZ3D(angle)*GeoTrf::TranslateZ3D(zpos-zMiddle); gblShapeCableA = addShape(gblShapeCableA, cableShape, trfA1 ); - HepGeom::Transform3D trfC1 = HepGeom::RotateZ3D(angle)*HepGeom::TranslateZ3D(zMax-(zpos-zMin)-zMiddle); + GeoTrf::Transform3D trfC1 = GeoTrf::RotateZ3D(angle)*GeoTrf::TranslateZ3D(zMax-(zpos-zMin)-zMiddle); gblShapeCableC = addShape(gblShapeCableC, cableShape, trfC1 ); // Cooling @@ -211,9 +211,9 @@ GeoVPhysVol* GeoPixelIBLFwdSvcModel1::Build() // Cable const GeoTube* cableShape = new GeoTube(rminCable, rmaxCable, cableHalfLength); double angle= 0.; - HepGeom::Transform3D trfA1 = HepGeom::RotateZ3D(angle)*HepGeom::TranslateY3D(deltaMiddleLoc)* HepGeom::TranslateZ3D(zpos-zMiddle)*HepGeom::RotateX3D(-angleSign*deltaPhiLoc); + GeoTrf::Transform3D trfA1 = GeoTrf::RotateZ3D(angle)*GeoTrf::TranslateY3D(deltaMiddleLoc)* GeoTrf::TranslateZ3D(zpos-zMiddle)*GeoTrf::RotateX3D(-angleSign*deltaPhiLoc); gblShapeCableA = addShape(gblShapeCableA, cableShape, trfA1 ); - HepGeom::Transform3D trfC1 = HepGeom::RotateZ3D(angle)*HepGeom::TranslateY3D(deltaMiddleLoc)* HepGeom::TranslateZ3D(zMax-(zpos-zMin)-zMiddle)*HepGeom::RotateX3D(angleSign*deltaPhiLoc); + GeoTrf::Transform3D trfC1 = GeoTrf::RotateZ3D(angle)*GeoTrf::TranslateY3D(deltaMiddleLoc)* GeoTrf::TranslateZ3D(zMax-(zpos-zMin)-zMiddle)*GeoTrf::RotateX3D(angleSign*deltaPhiLoc); gblShapeCableC = addShape(gblShapeCableC, cableShape, trfC1 ); // Cooling @@ -269,12 +269,12 @@ GeoVPhysVol* GeoPixelIBLFwdSvcModel1::Build() std::ostringstream tmp1; tmp1 << "IBL_Fwd02_Cooling_AC" << ii; GeoNameTag * tag1 = new GeoNameTag(tmp1.str()); - GeoTransform* xformA1 = new GeoTransform(HepGeom::RotateZ3D(phiOfCooling)*HepGeom::TranslateX3D(cooling_radius)); + GeoTransform* xformA1 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius)); m_supportPhysA->add(tag1); m_supportPhysA->add(xformA1); m_supportPhysA->add(coolingPhysVolA); - GeoTransform* xformC1 = new GeoTransform(HepGeom::RotateZ3D(phiOfCooling)*HepGeom::TranslateX3D(cooling_radius)); + GeoTransform* xformC1 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius)); m_supportPhysC->add(tag1); m_supportPhysC->add(xformC1); m_supportPhysC->add(coolingPhysVolC); @@ -284,12 +284,12 @@ GeoVPhysVol* GeoPixelIBLFwdSvcModel1::Build() std::ostringstream tmp2; tmp2 << "IBL_Fwd02_Cable_AC" << ii; GeoNameTag * tag2 = new GeoNameTag(tmp2.str()); - GeoTransform* xformA2 = new GeoTransform(HepGeom::RotateZ3D(phiOfCable)*HepGeom::TranslateX3D(cable_radius)*HepGeom::RotateZ3D(breakAngle)); + GeoTransform* xformA2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCable)*GeoTrf::TranslateX3D(cable_radius)*GeoTrf::RotateZ3D(breakAngle)); m_supportPhysA->add(tag2); m_supportPhysA->add(xformA2); m_supportPhysA->add(cablePhysVolA); - GeoTransform* xformC2 = new GeoTransform(HepGeom::RotateZ3D(phiOfCable)*HepGeom::TranslateX3D(cable_radius)*HepGeom::RotateZ3D(breakAngle)); + GeoTransform* xformC2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCable)*GeoTrf::TranslateX3D(cable_radius)*GeoTrf::RotateZ3D(breakAngle)); m_supportPhysC->add(tag2); m_supportPhysC->add(xformC2); m_supportPhysC->add(cablePhysVolC); @@ -299,17 +299,17 @@ GeoVPhysVol* GeoPixelIBLFwdSvcModel1::Build() double middleA = zMiddle+layerZshift; double middleC = -zMiddle+layerZshift; - HepGeom::Transform3D supportTrfA = HepGeom::TranslateZ3D(middleA); + GeoTrf::Transform3D supportTrfA = GeoTrf::TranslateZ3D(middleA); m_xformSupportA = new GeoTransform(supportTrfA); - HepGeom::Transform3D supportTrfC = HepGeom::TranslateZ3D(middleC); + GeoTrf::Transform3D supportTrfC = GeoTrf::TranslateZ3D(middleC); m_xformSupportC = new GeoTransform(supportTrfC); return 0; } -const GeoShape * GeoPixelIBLFwdSvcModel1::addShape(const GeoShape * lastShape, const GeoShape * nextShape, const HepGeom::Transform3D & trans) +const GeoShape * GeoPixelIBLFwdSvcModel1::addShape(const GeoShape * lastShape, const GeoShape * nextShape, const GeoTrf::Transform3D & trans) { const GeoShape * shiftedShape = &(*nextShape << trans); if (lastShape) { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdSvcModel1.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcModel1.h similarity index 76% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdSvcModel1.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcModel1.h index 212e2d98706..e931d2105b5 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIBLFwdSvcModel1.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIBLFwdSvcModel1.h @@ -5,17 +5,16 @@ #ifndef GEOPIXELIBLFWDSVCMODEL1_H #define GEOPIXELIBLFWDSVCMODEL1_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "PixelGeoModel/GeoPixelLadder.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPixelLadder.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPhysVol.h" - class GeoTransform; -class GeoPhysVol; class GeoPixelIBLFwdSvcModel1 : public GeoVPixelFactory { @@ -36,7 +35,7 @@ public: GeoTransform *m_xformSupportA; GeoTransform *m_xformSupportC; - const GeoShape* addShape(const GeoShape * lastShape, const GeoShape * nextShape, const HepGeom::Transform3D & trans); + const GeoShape* addShape(const GeoShape * lastShape, const GeoShape * nextShape, const GeoTrf::Transform3D & trans); }; #endif diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIFlexServices.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIFlexServices.cxx index 1abcb581eaf..3463842e192 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIFlexServices.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIFlexServices.cxx @@ -6,7 +6,7 @@ // Build detailed stave support : face plate + carbon foam + cable flex + cooling pipe + end blocks // This is built one time per layer. -#include "PixelGeoModel/GeoPixelIFlexServices.h" +#include "GeoPixelIFlexServices.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTube.h" @@ -35,7 +35,7 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() m_gmt_mgr->msg(MSG::INFO) <<"Build IBL I-Flex services"<<endmsg; - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; // IBL layer shift ( 2mm shift issue ) double layerZshift = m_gmt_mgr->PixelLayerGlobalShift(); @@ -45,7 +45,7 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() // check if sectors are properly defined if(nSectors==0) return 0; - double angle=360./(double)nSectors*CLHEP::deg; + double angle=360./(double)nSectors*GeoModelKernelUnits::deg; double zmin=0., zmax=0.; double deltaLength = 0.; @@ -108,12 +108,12 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() double cooling_radius = 35.1; double TubeOuterDiam = m_gmt_mgr->IBLStaveTubeOuterDiameter(); double TubeInnerDiam = m_gmt_mgr->IBLStaveTubeInnerDiameter(); - double cooling_angle = -2.154*CLHEP::deg; + double cooling_angle = -2.154*GeoModelKernelUnits::deg; if(m_gmt_mgr->PixelStaveAxe()==1) { cooling_radius = 34.7 + layerRadius-33.25; - cooling_angle = -.1*CLHEP::deg; + cooling_angle = -.1*GeoModelKernelUnits::deg; } const GeoTube* service_coolingPipeA = new GeoTube(0.0,TubeOuterDiam*0.5,halfLengthA); @@ -134,8 +134,7 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() GeoPhysVol * cp_service_inner_logPVC = new GeoPhysVol(cp_service_inner_logC); GeoNameTag* cp_service_inner_tag = new GeoNameTag("PP0CoolingPipeInner"); - CLHEP::Hep3Vector cp_service_inner_pos(0.0,0.0,0.0); - GeoTransform* cp_service_inner_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cp_service_inner_pos)); + GeoTransform* cp_service_inner_xform = new GeoTransform(GeoTrf::Transform3D::Identity()); cpPhysVolA->add(cp_service_inner_tag); cpPhysVolA->add(cp_service_inner_xform); cpPhysVolA->add(cp_service_inner_logPVA); @@ -146,9 +145,9 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() GeoLogVol* flex_logVolA = 0; GeoLogVol* flex_logVolC = 0; - double flex_angle = -15.001*CLHEP::deg; + double flex_angle = -15.001*GeoModelKernelUnits::deg; if(m_gmt_mgr->PixelStaveAxe()==1) - flex_angle += 2.14*CLHEP::deg; + flex_angle += 2.14*GeoModelKernelUnits::deg; double flex_rot=0.30265; flex_rot=-0.30265*.5; @@ -174,8 +173,6 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() GeoBox * flex_shapeA = new GeoBox((flex_rmax-flex_rmin)*.5, flex_width*.5, halfLengthA); GeoBox * flex_shapeC = new GeoBox((flex_rmax-flex_rmin)*.5, flex_width*.5, halfLengthC); - CLHEP::Hep3Vector flex_pos(0.,0.,0.); - // GeoTransform* flex_xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(0.0,0.0,fabs(flex_rot)),flex_pos)); const GeoMaterial* flex_material = m_mat_mgr->getMaterial(flexMatName); if(flex_material==0) { @@ -228,7 +225,7 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() std::ostringstream tmp1; tmp1 << "fl" << ii; GeoNameTag * tag1 = new GeoNameTag(tmp1.str()); - GeoTransform* xform1 = new GeoTransform(HepGeom::RotateZ3D(phiOfCooling)*HepGeom::TranslateX3D(cooling_radius)); + GeoTransform* xform1 = new GeoTransform(GeoTrf::RotateZ3D(phiOfCooling)*GeoTrf::TranslateX3D(cooling_radius)); m_supportPhysA->add(tag1); m_supportPhysA->add(xform1); m_supportPhysA->add(cpPhysVolA); @@ -247,12 +244,12 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() if(m_section==2){ // Intermediate flex - GeoTransform* xformA2 = new GeoTransform(HepGeom::RotateZ3D(phiOfFlex)*HepGeom::TranslateX3D(flexYmidPos)*HepGeom::RotateZ3D(-90.*CLHEP::deg)*HepGeom::RotateY3D(-90.*CLHEP::deg)*HepGeom::RotateX3D(flex_rot)); + GeoTransform* xformA2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D(flexYmidPos)*GeoTrf::RotateZ3D(-90.*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90.*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(flex_rot)); m_supportPhysA->add(tag2); m_supportPhysA->add(xformA2); m_supportPhysA->add(flexPhysVolA); - GeoTransform* xformC2 = new GeoTransform(HepGeom::RotateZ3D(phiOfFlex)*HepGeom::TranslateX3D(flexYmidPos)*HepGeom::RotateZ3D(-90.*CLHEP::deg)*HepGeom::RotateY3D(90.*CLHEP::deg)*HepGeom::RotateX3D(-flex_rot)); + GeoTransform* xformC2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D(flexYmidPos)*GeoTrf::RotateZ3D(-90.*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90.*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-flex_rot)); m_supportPhysC->add(tag2); m_supportPhysC->add(xformC2); m_supportPhysC->add(flexPhysVolC); @@ -262,7 +259,7 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() // dogleg and PP0 flexes - GeoTransform* xform2 = new GeoTransform(HepGeom::RotateZ3D(phiOfFlex)*HepGeom::TranslateX3D((flex_rmin+flex_rmax)*.5)*HepGeom::RotateZ3D(flex_rot)); + GeoTransform* xform2 = new GeoTransform(GeoTrf::RotateZ3D(phiOfFlex)*GeoTrf::TranslateX3D((flex_rmin+flex_rmax)*.5)*GeoTrf::RotateZ3D(flex_rot)); m_supportPhysA->add(tag2); m_supportPhysA->add(xform2); @@ -279,12 +276,12 @@ GeoVPhysVol* GeoPixelIFlexServices::Build() double middleA = zStartPosA+halfLengthA; double middleC = zStartPosC+halfLengthC; - HepGeom::Transform3D supportTrfA = HepGeom::TranslateZ3D(middleA); //(zmin+zmax)*0.5+layerZshift); + GeoTrf::Transform3D supportTrfA = GeoTrf::TranslateZ3D(middleA); //(zmin+zmax)*0.5+layerZshift); m_xformSupportA = new GeoTransform(supportTrfA); // std::cout<<"Section final A "<<m_section<<" - "<<middleA-halfLengthA<<" "<<middleA+halfLengthA<<" "<<middleA<<std::endl; - HepGeom::Transform3D supportTrfC = HepGeom::TranslateZ3D(middleC); //(zmin+zmax)*0.5+layerZshift); + GeoTrf::Transform3D supportTrfC = GeoTrf::TranslateZ3D(middleC); //(zmin+zmax)*0.5+layerZshift); m_xformSupportC = new GeoTransform(supportTrfC); // std::cout<<"Section final C "<<m_section<<" - "<<middleC-halfLengthC<<" "<<middleC+halfLengthC<<" "<<middleC<<std::endl; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIFlexServices.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIFlexServices.h similarity index 79% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIFlexServices.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIFlexServices.h index ec9d64c31a8..bc929cde3cf 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelIFlexServices.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelIFlexServices.h @@ -5,17 +5,14 @@ #ifndef GEOPIXELIFLEXSERVICES_H #define GEOPIXELIFLEXSERVICES_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "PixelGeoModel/GeoPixelLadder.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPixelLadder.h" -#include "CLHEP/Geometry/Transform3D.h" #include "GeoModelKernel/GeoPhysVol.h" - class GeoTransform; -class GeoPhysVol; class GeoPixelIFlexServices : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadder.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadder.cxx index 73565d3a0fc..bcbc577a590 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadder.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadder.cxx @@ -2,10 +2,10 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelLadder.h" -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "PixelGeoModel/GeoPixelModule.h" -#include "PixelGeoModel/GeoPixelSiCrystal.h" +#include "GeoPixelLadder.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPixelModule.h" +#include "GeoPixelSiCrystal.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTubs.h" @@ -37,7 +37,7 @@ GeoPixelLadder::GeoPixelLadder(GeoPixelSiCrystal& theSensor, // Length of the ladder is in the db // double length = m_gmt_mgr->PixelLadderLength(); - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; m_width = calcWidth(); m_thicknessP = 0.5 * m_gmt_mgr->PixelLadderThickness(); @@ -58,7 +58,7 @@ GeoPixelLadder::GeoPixelLadder(GeoPixelSiCrystal& theSensor, const GeoShape * ladderShape = 0; // If upper and lower thicknesses are within 100 um. Make them the same. - if (std::abs(m_thicknessP - m_thicknessN) < 0.1*CLHEP::mm) { + if (std::abs(m_thicknessP - m_thicknessN) < 0.1*GeoModelKernelUnits::mm) { m_thicknessP = std::max(m_thicknessP,m_thicknessN); m_thicknessN = m_thicknessP; double halfThickness = m_thicknessP; @@ -67,7 +67,7 @@ GeoPixelLadder::GeoPixelLadder(GeoPixelSiCrystal& theSensor, else if (m_gmt_mgr->PixelBentStaveNModule() != 0) { // Calculate thickness from bent stave part - double angle = m_gmt_mgr->PixelLadderBentStaveAngle() * CLHEP::pi / 180.0; + double angle = m_gmt_mgr->PixelLadderBentStaveAngle() * GeoModelKernelUnits::pi / 180.0; double BentStaveThickness = double(m_gmt_mgr->PixelBentStaveNModule()) * m_gmt_mgr->PixelLadderModuleDeltaZ() * sin(angle); // Extend +ve or -ve ladder thickness according to stave angle @@ -85,14 +85,14 @@ GeoPixelLadder::GeoPixelLadder(GeoPixelSiCrystal& theSensor, // Shift ladder outwards if stave bends away from beam pipe double shift = 0.5*BentStaveThickness; if (angle > 0) shift *= -1.0; - const GeoShape & shiftedBox = (*box) << HepGeom::TranslateX3D(shift); + const GeoShape & shiftedBox = (*box) << GeoTrf::TranslateX3D(shift); ladderShape = &shiftedBox; } else if (!(m_gmt_mgr->PixelStaveLayout()>3&& m_gmt_mgr->PixelStaveLayout()<7)){ double halfThickness = 0.5*(m_thicknessP+m_thicknessN); double shift = 0.5*(m_thicknessP-m_thicknessN); GeoBox * box = new GeoBox(halfThickness, m_width/2., length/2.); - const GeoShape & shiftedBox = (*box) << HepGeom::TranslateX3D(shift); + const GeoShape & shiftedBox = (*box) << GeoTrf::TranslateX3D(shift); ladderShape = &shiftedBox; } else if(m_staveSupport) @@ -321,12 +321,11 @@ GeoVPhysVol* GeoPixelLadder::Build( ) { } - CLHEP::Hep3Vector modulepos(xpos+xposShift,yposShift,zpos); + GeoTrf::Translation3D modulepos(xpos+xposShift,yposShift,zpos); // // Rotate if module is inclined. // - CLHEP::HepRotation rm; - rm.rotateY(m_gmt_mgr->PixelModuleAngle()*m_gmt_mgr->PixelModuleAngleSign(etaModule) ); + GeoTrf::RotateY3D rm(m_gmt_mgr->PixelModuleAngle()*m_gmt_mgr->PixelModuleAngleSign(etaModule) ); // // Place the Module // @@ -342,7 +341,7 @@ GeoVPhysVol* GeoPixelLadder::Build( ) { GeoNameTag * tag = new GeoNameTag(nameTag.str()); GeoAlignableTransform* xform; - xform = new GeoAlignableTransform(HepGeom::Transform3D(rm,modulepos)); + xform = new GeoAlignableTransform(GeoTrf::Transform3D(modulepos*rm)); ladderPhys->add(tag); ladderPhys->add(new GeoIdentifierTag(m_gmt_mgr->Eta() ) ); ladderPhys->add(xform); @@ -383,27 +382,25 @@ GeoVPhysVol* GeoPixelLadder::Build( ) { // const GeoMaterial* materialSup = m_mat_mgr->getMaterialForVolume(matName,shapeSupBent->volume()); const GeoMaterial* materialSup = m_mat_mgr->getMaterial("pix::StaveSupportBase"); - double ang = m_gmt_mgr->PixelLadderBentStaveAngle() * CLHEP::pi / 180.0; + double ang = m_gmt_mgr->PixelLadderBentStaveAngle() * GeoModelKernelUnits::pi / 180.0; double xst = xOffset - (bentStaveHalfLength * sin(ang)); // Construct bent stave at negative z GeoLogVol* logVolBentNeg = new GeoLogVol("StaveSupportBentNeg2",shapeSupBent,materialSup); GeoPhysVol* physVolBentNeg = new GeoPhysVol(logVolBentNeg); - CLHEP::HepRotation rmNeg; - rmNeg.rotateY(ang); + GeoTrf::RotateY3D rmNeg(ang); double zstneg = -length/2.0 - (bentStaveHalfLength * cos(ang)); - HepGeom::Point3D<double> stavePosNeg(xst,0.,zstneg); - ladderPhys->add(new GeoTransform(HepGeom::Transform3D(rmNeg,stavePosNeg))); + GeoTrf::Translation3D stavePosNeg(xst,0.,zstneg); + ladderPhys->add(new GeoTransform(GeoTrf::Transform3D(stavePosNeg*rmNeg))); ladderPhys->add(physVolBentNeg); // COnstruct bent stave at positive z GeoLogVol* logVolBentPos = new GeoLogVol("StaveSupportBentPos2",shapeSupBent,materialSup); GeoPhysVol* physVolBentPos = new GeoPhysVol(logVolBentPos); - CLHEP::HepRotation rmPos; - rmPos.rotateY(-ang); + GeoTrf::RotateY3D rmPos(-ang); double zstpos = length/2.0 + (bentStaveHalfLength * cos(ang)); - HepGeom::Point3D<double> stavePosPos(xst,0.,zstpos); - ladderPhys->add(new GeoTransform(HepGeom::Transform3D(rmPos,stavePosPos))); + GeoTrf::Translation3D stavePosPos(xst,0.,zstpos); + ladderPhys->add(new GeoTransform(GeoTrf::Transform3D(stavePosPos*rmPos))); ladderPhys->add(physVolBentPos); } @@ -418,7 +415,7 @@ double GeoPixelLadder::calcThickness() { // to avoid duplication of code // - const double safety = 0.01*CLHEP::mm; + const double safety = 0.01*GeoModelKernelUnits::mm; double clearance = m_gmt_mgr->PixelLadderThicknessClearance(); clearance = std::max(clearance, safety); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLadder.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadder.h similarity index 95% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLadder.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadder.h index f21daabb9ff..8f3486bae63 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLadder.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadder.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELLADDER_H #define GEOPIXELLADDER_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoPixelSiCrystal; class GeoPixelStaveSupport; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadderServices.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadderServices.cxx index 697b6a7ecd6..1af721b80a5 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadderServices.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadderServices.cxx @@ -6,9 +6,9 @@ // This class builds the Ladder services (Omega + Al tube + glue + part of pigtail + connector) // // -#include "PixelGeoModel/GeoPixelLadderServices.h" -#include "PixelGeoModel/GeoPixelFluid.h" -#include "PixelGeoModel/GeoPixelCable.h" +#include "GeoPixelLadderServices.h" +#include "GeoPixelFluid.h" +#include "GeoPixelCable.h" #include "GeoModelKernel/GeoTubs.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoPara.h" @@ -37,7 +37,7 @@ GeoPixelLadderServices::GeoPixelLadderServices(int ladderType) // //const GeoBox* ladderSvcBox = new GeoBox(thickness/2.,width/2.,halflength); // Quick fix - we hardwire the numbers. Need to work out a way to extract this from the database numbers. - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; double xBase = 0; // ConnA: Part to fit Connector @@ -47,29 +47,29 @@ GeoPixelLadderServices::GeoPixelLadderServices(int ladderType) double xOffsetConnC = xOffsetConnA; - //double xMaxConnA = 1.250 * CLHEP::cm + xOffsetConnA + safety; - // double xMaxConnC = 1.6575 * CLHEP::cm + xOffsetConnC + safety; + //double xMaxConnA = 1.250 * GeoModelKernelUnits::cm + xOffsetConnA + safety; + // double xMaxConnC = 1.6575 * GeoModelKernelUnits::cm + xOffsetConnC + safety; // max offset is 12.5mm + 1/2 thickness of cables - // double xMaxConnA = 1.5075 * CLHEP::cm + 0.5* 0.15*CLHEP::cm + xOffsetConnA + safety; + // double xMaxConnA = 1.5075 * GeoModelKernelUnits::cm + 0.5* 0.15*GeoModelKernelUnits::cm + xOffsetConnA + safety; double xMaxConnA = m_gmt_mgr->PixelConnectorPosX(1) + 0.5*m_gmt_mgr->PixelConnectorWidthX(1) + xOffsetConnA + safety; - double xMaxConnC = 1.25 * CLHEP::cm + 0.5* 0.0125*CLHEP::cm + xOffsetConnC + safety; - double xMaxOmegaBase = 0.055 * CLHEP::cm + xBase + 1*CLHEP::mm; // The 1 mm is just extra safety. - double yWidthConnA = 1.0 * CLHEP::cm; - double yWidthConnC = 0.2 * CLHEP::cm; + double xMaxConnC = 1.25 * GeoModelKernelUnits::cm + 0.5* 0.0125*GeoModelKernelUnits::cm + xOffsetConnC + safety; + double xMaxOmegaBase = 0.055 * GeoModelKernelUnits::cm + xBase + 1*GeoModelKernelUnits::mm; // The 1 mm is just extra safety. + double yWidthConnA = 1.0 * GeoModelKernelUnits::cm; + double yWidthConnC = 0.2 * GeoModelKernelUnits::cm; double yPosConnA = m_gmt_mgr->PixelLadderCableOffsetY() - m_gmt_mgr->PixelLadderServicesY(); double yPosConnC = yPosConnA; double xCenter = 0; double xWidthOmegaBase = xMaxOmegaBase - xBase; double xWidthConnA = xMaxConnA - xBase; double xWidthConnC = xMaxConnC - xBase; - double yWidthOmega = 1.2*CLHEP::cm + m_epsilon; + double yWidthOmega = 1.2*GeoModelKernelUnits::cm + m_epsilon; const GeoBox* omegaBaseEnv = new GeoBox(0.5*xWidthOmegaBase, 0.5*yWidthOmega, halflength); const GeoBox* connAEnv = new GeoBox(0.5*xWidthConnA, 0.5*yWidthConnA + safety, halflength); const GeoBox* connCEnv = new GeoBox(0.5*xWidthConnC, 0.5*yWidthConnC + safety, halflength); - HepGeom::Transform3D omegaBaseShift = HepGeom::Translate3D(xBase + 0.5*xWidthOmegaBase - xCenter, 0., 0.); - HepGeom::Transform3D connAShift = HepGeom::Translate3D(xBase + 0.5*xWidthConnA - xCenter, yPosConnA, 0.); - HepGeom::Transform3D connCShift = HepGeom::Translate3D(xBase + 0.5*xWidthConnC - xCenter, yPosConnC, 0.); + GeoTrf::Transform3D omegaBaseShift = GeoTrf::Translate3D(xBase + 0.5*xWidthOmegaBase - xCenter, 0., 0.); + GeoTrf::Transform3D connAShift = GeoTrf::Translate3D(xBase + 0.5*xWidthConnA - xCenter, yPosConnA, 0.); + GeoTrf::Transform3D connCShift = GeoTrf::Translate3D(xBase + 0.5*xWidthConnC - xCenter, yPosConnC, 0.); const GeoShape & ladderSvcShape = ((*omegaBaseEnv) << omegaBaseShift) .add(*connAEnv << connAShift) @@ -78,10 +78,10 @@ GeoPixelLadderServices::GeoPixelLadderServices(int ladderType) m_ladderServicesLV = new GeoLogVol("LadderSvc",&ladderSvcShape,air); m_ladderServicesLV->ref(); // store coordinates of corners of envelope. - m_envelopeCornerA1 = HepGeom::Point3D<double>(xMaxConnA - xCenter, yPosConnA + 0.5* yWidthConnA + safety, 0.); - m_envelopeCornerA2 = HepGeom::Point3D<double>(xMaxConnA - xCenter, yPosConnA - 0.5* yWidthConnA + safety, 0.); - m_envelopeCornerC1 = HepGeom::Point3D<double>(xMaxConnC - xCenter, yPosConnC + 0.5* yWidthConnC + safety, 0.); - m_envelopeCornerC2 = HepGeom::Point3D<double>(xMaxConnC - xCenter, yPosConnC - 0.5* yWidthConnC + safety, 0.); + m_envelopeCornerA1 = GeoTrf::Vector3D(xMaxConnA - xCenter, yPosConnA + 0.5* yWidthConnA + safety, 0.); + m_envelopeCornerA2 = GeoTrf::Vector3D(xMaxConnA - xCenter, yPosConnA - 0.5* yWidthConnA + safety, 0.); + m_envelopeCornerC1 = GeoTrf::Vector3D(xMaxConnC - xCenter, yPosConnC + 0.5* yWidthConnC + safety, 0.); + m_envelopeCornerC2 = GeoTrf::Vector3D(xMaxConnC - xCenter, yPosConnC - 0.5* yWidthConnC + safety, 0.); m_xOffset = xBase; @@ -98,7 +98,7 @@ GeoPixelLadderServices::~GeoPixelLadderServices(){ GeoVPhysVol* GeoPixelLadderServices::Build() { GeoPhysVol* ladderSvcPhys = new GeoPhysVol(m_ladderServicesLV); //double thickness = m_gmt_mgr->PixelLadderThickness()+m_gmt_mgr->PixelCableThickness(); - //double thickness = m_gmt_mgr->PixelLadderThickness() + m_gmt_mgr->PixelCableThickness() + 0.25*CLHEP::cm; // plus 0.25 cm New DC3 ??? + //double thickness = m_gmt_mgr->PixelLadderThickness() + m_gmt_mgr->PixelCableThickness() + 0.25*GeoModelKernelUnits::cm; // plus 0.25 cm New DC3 ??? //double thickness = m_gmt_mgr->PixelLadderThickness()+ 6.5; // m_gmt_mgr->PixelCableThickness() was 0.4 cm, plus 0.25 cm New DC3 // // The Glue @@ -121,7 +121,7 @@ GeoVPhysVol* GeoPixelLadderServices::Build() { double zpos = fluid.posZ(); GeoVPhysVol* fluidPhys = fluid.Build(); - GeoTransform* xform = new GeoTransform(HepGeom::Translate3D(xpos,ypos,zpos)); + GeoTransform* xform = new GeoTransform(GeoTrf::Translate3D(xpos,ypos,zpos)); ladderSvcPhys->add(xform); ladderSvcPhys->add(fluidPhys); @@ -141,7 +141,7 @@ GeoVPhysVol* GeoPixelLadderServices::Build() { double xpos = m_xOffset + cable.getStackOffset() + m_gmt_mgr->PixelLadderCableOffsetX() - m_gmt_mgr->PixelLadderServicesX(); double ypos = m_yOffset + m_gmt_mgr->PixelLadderCableOffsetY() - m_gmt_mgr->PixelLadderServicesY(); double zpos = cable.zpos(); - GeoTransform* xform = new GeoTransform(HepGeom::Translate3D(xpos,ypos,zpos)); + GeoTransform* xform = new GeoTransform(GeoTrf::Translate3D(xpos,ypos,zpos)); ladderSvcPhys->add(xform); ladderSvcPhys->add(phys); } @@ -154,16 +154,16 @@ GeoVPhysVol* GeoPixelLadderServices::BuildOmega() { double xOffset = m_xOffset; double yOffset = m_yOffset; /* - double xUpperBend = xOffset + 2.9*CLHEP::mm; + double xUpperBend = xOffset + 2.9*GeoModelKernelUnits::mm; double yUpperBend = yOffset + 0; - double radUpperBend = 2.3*CLHEP::mm; + double radUpperBend = 2.3*GeoModelKernelUnits::mm; double xLowerBend = xOffset + 0.9; - double yLowerBend = yOffset + 3.35*CLHEP::mm; - double radLowerBend = 0.8*CLHEP::mm; - double yStart= yOffset + (4.675+0.5*2.65)*CLHEP::mm; + double yLowerBend = yOffset + 3.35*GeoModelKernelUnits::mm; + double radLowerBend = 0.8*GeoModelKernelUnits::mm; + double yStart= yOffset + (4.675+0.5*2.65)*GeoModelKernelUnits::mm; double yEnd = yOffset -yStart; - double thick = 0.3*CLHEP::mm; - double length = 816*CLHEP::mm; + double thick = 0.3*GeoModelKernelUnits::mm; + double length = 816*GeoModelKernelUnits::mm; double zOffset = 0; */ double xUpperBend = xOffset + m_gmt_mgr->PixelOmegaUpperBendX(); @@ -192,13 +192,13 @@ GeoVPhysVol* GeoPixelLadderServices::BuildOmega() { // Tube sector for upper bend - GeoTubs * upperBendShape = new GeoTubs(radUpperBend - thick, radUpperBend, 0.5* length, alpha-0.5*CLHEP::pi, CLHEP::pi - 2*alpha); + GeoTubs * upperBendShape = new GeoTubs(radUpperBend - thick, radUpperBend, 0.5* length, alpha-0.5*GeoModelKernelUnits::pi, GeoModelKernelUnits::pi - 2*alpha); // Tube sector for lower bend (+y) - GeoTubs * lowerBendShapeP = new GeoTubs(radLowerBend - thick, radLowerBend, 0.5* length, CLHEP::pi, 0.5*CLHEP::pi-alpha); + GeoTubs * lowerBendShapeP = new GeoTubs(radLowerBend - thick, radLowerBend, 0.5* length, GeoModelKernelUnits::pi, 0.5*GeoModelKernelUnits::pi-alpha); // Tube sector for lower bend (-y) - GeoTubs * lowerBendShapeM = new GeoTubs(radLowerBend - thick, radLowerBend, 0.5* length, 0.5*CLHEP::pi + alpha, 0.5*CLHEP::pi-alpha); + GeoTubs * lowerBendShapeM = new GeoTubs(radLowerBend - thick, radLowerBend, 0.5* length, 0.5*GeoModelKernelUnits::pi + alpha, 0.5*GeoModelKernelUnits::pi-alpha); // Lower Straight section (+y) GeoBox * lowerStraightBoxP = new GeoBox(0.5*thick, 0.5*(yStart - yLowerBend), 0.5*length); @@ -211,13 +211,13 @@ GeoVPhysVol* GeoPixelLadderServices::BuildOmega() { // Put it all together const GeoShape & omegaShape = - (*lowerStraightBoxP << HepGeom::Translate3D(xLowerBend-radLowerBend+0.5*thick,0.5*(yLowerBend+yStart),zOffset) ) - .add(*lowerBendShapeP << HepGeom::Translate3D(xLowerBend,yLowerBend,zOffset) ) - .add(*upperStraightBox << HepGeom::Translate3D(0.5*(xLowerStraight+xUpperStraight),0.5*(yLowerStraight+yUpperStraight),zOffset)*HepGeom::RotateZ3D(0.5*CLHEP::pi-alpha) ) - .add(*upperBendShape << HepGeom::Translate3D(xUpperBend,yUpperBend,zOffset) ) - .add(*upperStraightBox << HepGeom::Translate3D(0.5*(xLowerStraight+xUpperStraight),-0.5*(yLowerStraight+yUpperStraight),zOffset)*HepGeom::RotateZ3D(0.5*CLHEP::pi+alpha) ) - .add(*lowerBendShapeM << HepGeom::Translate3D(xLowerBend,-yLowerBend,zOffset) ) - .add(*lowerStraightBoxM << HepGeom::Translate3D(xLowerBend-radLowerBend+0.5*thick,0.5*(-yLowerBend+yEnd),zOffset) ); + (*lowerStraightBoxP << GeoTrf::Translate3D(xLowerBend-radLowerBend+0.5*thick,0.5*(yLowerBend+yStart),zOffset) ) + .add(*lowerBendShapeP << GeoTrf::Translate3D(xLowerBend,yLowerBend,zOffset) ) + .add(*upperStraightBox << GeoTrf::Translate3D(0.5*(xLowerStraight+xUpperStraight),0.5*(yLowerStraight+yUpperStraight),zOffset)*GeoTrf::RotateZ3D(0.5*GeoModelKernelUnits::pi-alpha) ) + .add(*upperBendShape << GeoTrf::Translate3D(xUpperBend,yUpperBend,zOffset) ) + .add(*upperStraightBox << GeoTrf::Translate3D(0.5*(xLowerStraight+xUpperStraight),-0.5*(yLowerStraight+yUpperStraight),zOffset)*GeoTrf::RotateZ3D(0.5*GeoModelKernelUnits::pi+alpha) ) + .add(*lowerBendShapeM << GeoTrf::Translate3D(xLowerBend,-yLowerBend,zOffset) ) + .add(*lowerStraightBoxM << GeoTrf::Translate3D(xLowerBend-radLowerBend+0.5*thick,0.5*(-yLowerBend+yEnd),zOffset) ); double totVolume = lowerStraightBoxP->volume() @@ -240,14 +240,14 @@ GeoVPhysVol* GeoPixelLadderServices::BuildAlTube() { double yOffset = m_yOffset; /* - double xUpperBend = xOffset + 2.7*CLHEP::mm; + double xUpperBend = xOffset + 2.7*GeoModelKernelUnits::mm; double yUpperBend = yOffset; - double radUpperBend = 2.0*CLHEP::mm; + double radUpperBend = 2.0*GeoModelKernelUnits::mm; double xLowerBend = xOffset + 0.55; - double yLowerBend = yOffset+1.925*CLHEP::mm; - double radLowerBend = 0.5*CLHEP::mm; - double thick = 0.2*CLHEP::mm; - double length = 838*CLHEP::mm; + double yLowerBend = yOffset+1.925*GeoModelKernelUnits::mm; + double radLowerBend = 0.5*GeoModelKernelUnits::mm; + double thick = 0.2*GeoModelKernelUnits::mm; + double length = 838*GeoModelKernelUnits::mm; double zOffset = 0; */ @@ -275,13 +275,13 @@ GeoVPhysVol* GeoPixelLadderServices::BuildAlTube() { // Tube sector for upper bend - GeoTubs * upperBendShape = new GeoTubs(radUpperBend - thick, radUpperBend, 0.5* length, alpha-0.5*CLHEP::pi, CLHEP::pi - 2*alpha); + GeoTubs * upperBendShape = new GeoTubs(radUpperBend - thick, radUpperBend, 0.5* length, alpha-0.5*GeoModelKernelUnits::pi, GeoModelKernelUnits::pi - 2*alpha); // Tube sector for lower bend (+y) - GeoTubs * lowerBendShapeP = new GeoTubs(radLowerBend - thick, radLowerBend, 0.5* length, 0.5*CLHEP::pi-alpha, 0.5*CLHEP::pi+alpha); + GeoTubs * lowerBendShapeP = new GeoTubs(radLowerBend - thick, radLowerBend, 0.5* length, 0.5*GeoModelKernelUnits::pi-alpha, 0.5*GeoModelKernelUnits::pi+alpha); // Tube sector for lower bend (-y) - GeoTubs * lowerBendShapeM = new GeoTubs(radLowerBend - thick, radLowerBend, 0.5* length, CLHEP::pi, 0.5*CLHEP::pi+alpha); + GeoTubs * lowerBendShapeM = new GeoTubs(radLowerBend - thick, radLowerBend, 0.5* length, GeoModelKernelUnits::pi, 0.5*GeoModelKernelUnits::pi+alpha); // Lower Straight section GeoBox * lowerStraightBox = new GeoBox(0.5*thick, yLowerBend, 0.5*length); @@ -291,12 +291,12 @@ GeoVPhysVol* GeoPixelLadderServices::BuildAlTube() { // Put it all together const GeoShape & alTubeShape = - (*lowerStraightBox << HepGeom::Translate3D(xLowerBend-radLowerBend+0.5*thick,0,zOffset) ) - .add(*lowerBendShapeP << HepGeom::Translate3D(xLowerBend,yLowerBend,zOffset) ) - .add(*upperStraightBox << HepGeom::Translate3D(0.5*(xLowerStraight+xUpperStraight),0.5*(yLowerStraight+yUpperStraight),zOffset)*HepGeom::RotateZ3D(0.5*CLHEP::pi-alpha) ) - .add(*upperBendShape << HepGeom::Translate3D(xUpperBend,yUpperBend,zOffset) ) - .add(*upperStraightBox << HepGeom::Translate3D(0.5*(xLowerStraight+xUpperStraight),-0.5*(yLowerStraight+yUpperStraight),zOffset)*HepGeom::RotateZ3D(0.5*CLHEP::pi+alpha) ) - .add(*lowerBendShapeM << HepGeom::Translate3D(xLowerBend,-yLowerBend,zOffset) ); + (*lowerStraightBox << GeoTrf::Translate3D(xLowerBend-radLowerBend+0.5*thick,0,zOffset) ) + .add(*lowerBendShapeP << GeoTrf::Translate3D(xLowerBend,yLowerBend,zOffset) ) + .add(*upperStraightBox << GeoTrf::Translate3D(0.5*(xLowerStraight+xUpperStraight),0.5*(yLowerStraight+yUpperStraight),zOffset)*GeoTrf::RotateZ3D(0.5*GeoModelKernelUnits::pi-alpha) ) + .add(*upperBendShape << GeoTrf::Translate3D(xUpperBend,yUpperBend,zOffset) ) + .add(*upperStraightBox << GeoTrf::Translate3D(0.5*(xLowerStraight+xUpperStraight),-0.5*(yLowerStraight+yUpperStraight),zOffset)*GeoTrf::RotateZ3D(0.5*GeoModelKernelUnits::pi+alpha) ) + .add(*lowerBendShapeM << GeoTrf::Translate3D(xLowerBend,-yLowerBend,zOffset) ); double totVolume = lowerStraightBox->volume() @@ -333,7 +333,7 @@ void GeoPixelLadderServices::BuildGlue(GeoPhysVol * parent) { GeoLogVol* glueLV = new GeoLogVol("Glue",glueShape,glueMat); GeoPhysVol* gluePV = new GeoPhysVol(glueLV); - GeoTransform * xform = new GeoTransform(HepGeom::Translate3D(m_xOffset+x1+0.5*thickness, m_yOffset-0.5*(y1+y2), zOffset)); + GeoTransform * xform = new GeoTransform(GeoTrf::Translate3D(m_xOffset+x1+0.5*thickness, m_yOffset-0.5*(y1+y2), zOffset)); parent->add(xform); parent->add(gluePV); @@ -362,7 +362,7 @@ void GeoPixelLadderServices::BuildPigtailAndConnector(GeoPhysVol * parent) { // Connector int numConn = m_gmt_mgr->PixelNumConnectorElements(); std::vector<GeoPhysVol *> connectorPhysVols(numConn); - std::vector<HepGeom::Transform3D> connectorTransforms(numConn); + std::vector<GeoTrf::Transform3D> connectorTransforms(numConn); for (int iConn = 0; iConn < numConn; iConn++) { double xPosConnector = xOffset + m_gmt_mgr->PixelConnectorPosX(iConn); double yPosConnector = yOffset + m_gmt_mgr->PixelConnectorPosY(iConn); @@ -375,7 +375,7 @@ void GeoPixelLadderServices::BuildPigtailAndConnector(GeoPhysVol * parent) { const GeoMaterial* connectorMat = m_mat_mgr->getMaterialForVolume(matNameConnector,connectorShape->volume()); GeoLogVol * connectorLV = new GeoLogVol("Connector",connectorShape,connectorMat); connectorPhysVols[iConn] = new GeoPhysVol(connectorLV); - connectorTransforms[iConn] = HepGeom::Translate3D(xPosConnector, yPosConnector, zPosConnector); + connectorTransforms[iConn] = GeoTrf::Translate3D(xPosConnector, yPosConnector, zPosConnector); } for (int iModule = 0; iModule<m_gmt_mgr->PixelNModule(); iModule++) { @@ -383,13 +383,13 @@ void GeoPixelLadderServices::BuildPigtailAndConnector(GeoPhysVol * parent) { double zShift = m_gmt_mgr->PixelModuleZPosition(moduleEta); // Place pigtail - GeoTransform * xformPigtail = new GeoTransform(HepGeom::Translate3D(xPosPigtail, yPosPigtail, zShift+zPosPigtail)); + GeoTransform * xformPigtail = new GeoTransform(GeoTrf::Translate3D(xPosPigtail, yPosPigtail, zShift+zPosPigtail)); parent->add(xformPigtail); parent->add(pigtailPhys); // Place connector for (int iConn = 0; iConn < numConn; iConn++) { - GeoTransform * xformConnector = new GeoTransform(HepGeom::TranslateZ3D(zShift)*connectorTransforms[iConn]); + GeoTransform * xformConnector = new GeoTransform(GeoTrf::TranslateZ3D(zShift)*connectorTransforms[iConn]); parent->add(xformConnector); parent->add(connectorPhysVols[iConn]); } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLadderServices.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadderServices.h similarity index 54% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLadderServices.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadderServices.h index af2f303c3fd..84fb11c61b4 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLadderServices.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLadderServices.h @@ -5,8 +5,9 @@ #ifndef GEOPIXELLADDERSERVICES_H #define GEOPIXELLADDERSERVICES_H -#include "PixelGeoModel/GeoVPixelFactory.h" -#include "CLHEP/Geometry/Point3D.h" +#include "GeoVPixelFactory.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" class GeoLogVol; class GeoPhysVol; @@ -16,10 +17,10 @@ class GeoPixelLadderServices : public GeoVPixelFactory { GeoPixelLadderServices(int ladderType); virtual ~GeoPixelLadderServices(); virtual GeoVPhysVol* Build(); - const HepGeom::Point3D<double> & envelopeCornerA1() {return m_envelopeCornerA1;} - const HepGeom::Point3D<double> & envelopeCornerA2() {return m_envelopeCornerA2;} - const HepGeom::Point3D<double> & envelopeCornerC1() {return m_envelopeCornerC1;} - const HepGeom::Point3D<double> & envelopeCornerC2() {return m_envelopeCornerC2;} + const GeoTrf::Vector3D & envelopeCornerA1() {return m_envelopeCornerA1;} + const GeoTrf::Vector3D & envelopeCornerA2() {return m_envelopeCornerA2;} + const GeoTrf::Vector3D & envelopeCornerC1() {return m_envelopeCornerC1;} + const GeoTrf::Vector3D & envelopeCornerC2() {return m_envelopeCornerC2;} double referenceX() {return m_xOffset;} double referenceY() {return m_yOffset;} @@ -32,10 +33,10 @@ class GeoPixelLadderServices : public GeoVPixelFactory { const GeoLogVol* m_ladderServicesLV; int m_ladderType; - HepGeom::Point3D<double> m_envelopeCornerA1; - HepGeom::Point3D<double> m_envelopeCornerA2; - HepGeom::Point3D<double> m_envelopeCornerC1; - HepGeom::Point3D<double> m_envelopeCornerC2; + GeoTrf::Vector3D m_envelopeCornerA1; + GeoTrf::Vector3D m_envelopeCornerA2; + GeoTrf::Vector3D m_envelopeCornerC1; + GeoTrf::Vector3D m_envelopeCornerC2; double m_xOffset; double m_yOffset; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx index a1f7aca7929..8e103b87779 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.cxx @@ -2,17 +2,17 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ - -#include "PixelGeoModel/GeoPixelLayer.h" -#include "PixelGeoModel/GeoPixelLadder.h" -#include "PixelGeoModel/GeoPixelTMT.h" -#include "PixelGeoModel/GeoPixelSimpleStaveSupport.h" -#include "PixelGeoModel/GeoPixelDetailedStaveSupport.h" -#include "PixelGeoModel/GeoPixelStaveRingServices.h" -#include "PixelGeoModel/GeoPixelLadderServices.h" -#include "PixelGeoModel/GeoPixelPigtail.h" -#include "PixelGeoModel/GeoPixelSiCrystal.h" -#include "PixelGeoModel/GeoPixelStaveRing.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoPixelLayer.h" +#include "GeoPixelLadder.h" +#include "GeoPixelTMT.h" +#include "GeoPixelSimpleStaveSupport.h" +#include "GeoPixelDetailedStaveSupport.h" +#include "GeoPixelStaveRingServices.h" +#include "GeoPixelLadderServices.h" +#include "GeoPixelPigtail.h" +#include "GeoPixelSiCrystal.h" +#include "GeoPixelStaveRing.h" #include "InDetGeoModelUtils/ExtraMaterial.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" @@ -136,10 +136,10 @@ GeoVPhysVol* GeoPixelLayer::Build() { //std::cout << "Distance along ladder surface from center to point of closest approach: " << distToClosestPoint << std::endl; // Calculate the radius of the corners of the ladder. - HepGeom::Point3D<double> ladderLowerCorner(-ladderHalfThickN, ladderHalfWidth, 0); - HepGeom::Point3D<double> ladderUpperCorner(ladderHalfThickP, -ladderHalfWidth, 0); - ladderLowerCorner = HepGeom::TranslateX3D(layerRadius) * HepGeom::RotateZ3D(std::abs(ladderTilt)) * ladderLowerCorner; - ladderUpperCorner = HepGeom::TranslateX3D(layerRadius) * HepGeom::RotateZ3D(std::abs(ladderTilt)) * ladderUpperCorner; + GeoTrf::Vector3D ladderLowerCorner(-ladderHalfThickN, ladderHalfWidth, 0); + GeoTrf::Vector3D ladderUpperCorner(ladderHalfThickP, -ladderHalfWidth, 0); + ladderLowerCorner = GeoTrf::TranslateX3D(layerRadius) * GeoTrf::RotateZ3D(std::abs(ladderTilt)) * ladderLowerCorner; + ladderUpperCorner = GeoTrf::TranslateX3D(layerRadius) * GeoTrf::RotateZ3D(std::abs(ladderTilt)) * ladderUpperCorner; double layerThicknessN = layerRadius - ladderLowerCorner.perp(); double layerThicknessP = ladderUpperCorner.perp() - layerRadius; // Will be recalculated below in case of additional services @@ -182,9 +182,9 @@ GeoVPhysVol* GeoPixelLayer::Build() { // Variables that are used later int maxLadType = 0; std::vector<GeoVPhysVol *> ladderServicesArray; - HepGeom::Transform3D ladderServicesTransform; + GeoTrf::Transform3D ladderServicesTransform(GeoTrf::Transform3D::Identity()); GeoVPhysVol* pigtailPhysVol = 0; - HepGeom::Transform3D transPigtail; + GeoTrf::Transform3D transPigtail(GeoTrf::Transform3D::Identity()); // Only make services in non SLHC geometries if (staveLayout == 0) { @@ -244,10 +244,10 @@ GeoVPhysVol* GeoPixelLayer::Build() { // We need the dimensions of the GeoPixelLadderServices. They are all the same in this regards // so any of them will do - use the first one. - HepGeom::Point3D<double> corner1 = firstLadderServices->envelopeCornerC1(); - HepGeom::Point3D<double> corner2 = firstLadderServices->envelopeCornerC2(); - HepGeom::Point3D<double> corner3 = firstLadderServices->envelopeCornerA1(); - HepGeom::Point3D<double> corner4 = firstLadderServices->envelopeCornerA2(); + GeoTrf::Vector3D corner1 = firstLadderServices->envelopeCornerC1(); + GeoTrf::Vector3D corner2 = firstLadderServices->envelopeCornerC2(); + GeoTrf::Vector3D corner3 = firstLadderServices->envelopeCornerA1(); + GeoTrf::Vector3D corner4 = firstLadderServices->envelopeCornerA2(); // translate relative to sensor center (center of tilt rotation), // then tilt then translate by radius of layer, then calculate r. @@ -256,13 +256,13 @@ GeoVPhysVol* GeoPixelLayer::Build() { // xCenter, yCenter or coordinates of ladder services relative to active layer center (center of tilt rotation) xCenter = (firstLadderServices->referenceX() + xLadderServicesOffset); yCenter = (firstLadderServices->referenceY() + yLadderServicesOffset); - HepGeom::Transform3D ladderSvcToglobal = HepGeom::TranslateX3D(layerRadius) - * HepGeom::RotateZ3D(ladderTilt) - * HepGeom::Translate3D(xCenter, yCenter, 0); - HepGeom::Point3D<double> corner1global = ladderSvcToglobal * corner1; - HepGeom::Point3D<double> corner2global = ladderSvcToglobal * corner2; - HepGeom::Point3D<double> corner3global = ladderSvcToglobal * corner3; - HepGeom::Point3D<double> corner4global = ladderSvcToglobal * corner4; + GeoTrf::Transform3D ladderSvcToglobal = GeoTrf::TranslateX3D(layerRadius) + * GeoTrf::RotateZ3D(ladderTilt) + * GeoTrf::Translate3D(xCenter, yCenter, 0); + GeoTrf::Vector3D corner1global = ladderSvcToglobal * corner1; + GeoTrf::Vector3D corner2global = ladderSvcToglobal * corner2; + GeoTrf::Vector3D corner3global = ladderSvcToglobal * corner3; + GeoTrf::Vector3D corner4global = ladderSvcToglobal * corner4; double rMaxTmp = std::max(corner1global.perp(), std::max(corner2global.perp(), @@ -287,14 +287,14 @@ GeoVPhysVol* GeoPixelLayer::Build() { // The tube and cooling have there reference point // In y: center of cooling tube // In x: ~center of envelope (will change it to base of glue layer.) - ladderServicesTransform = HepGeom::Translate3D(xCenter, yCenter, 0); + ladderServicesTransform = GeoTrf::Translate3D(xCenter, yCenter, 0); // // The Pigtail // GeoPixelPigtail pigtail; pigtailPhysVol = pigtail.Build(); - transPigtail = HepGeom::Translate3D(m_gmt_mgr->PixelPigtailBendX() + m_gmt_mgr->PixelLadderCableOffsetX(), + transPigtail = GeoTrf::Translate3D(m_gmt_mgr->PixelPigtailBendX() + m_gmt_mgr->PixelLadderCableOffsetX(), m_gmt_mgr->PixelPigtailBendY() + m_gmt_mgr->PixelLadderCableOffsetY(), 0.); @@ -304,7 +304,7 @@ GeoVPhysVol* GeoPixelLayer::Build() { // // Layer dimensions from above, etc // - double safety = 0.01 * CLHEP::mm; + double safety = 0.01 * GeoModelKernelUnits::mm; double rmin = m_gmt_mgr->PixelLayerRadius()-layerThicknessN - safety; double rmax = m_gmt_mgr->PixelLayerRadius()+layerThicknessP + safety; double length = m_gmt_mgr->PixelLadderLength() + 4*m_epsilon; // Ladder has length m_gmt_mgr->PixelLadderLength() + 2*m_epsilon @@ -315,7 +315,7 @@ GeoVPhysVol* GeoPixelLayer::Build() { if(m_gmt_mgr->GetLD()==0&&m_gmt_mgr->ibl()&&m_gmt_mgr->PixelStaveLayout()>3&&m_gmt_mgr->PixelStaveLayout()<8) { bAddIBLStaveRings=true; - double safety = 0.001 * CLHEP::mm; + double safety = 0.001 * GeoModelKernelUnits::mm; double outerRadius = m_gmt_mgr->IBLSupportMidRingInnerRadius(); rmax=outerRadius-safety; @@ -346,8 +346,8 @@ GeoVPhysVol* GeoPixelLayer::Build() { // // A few variables needed below // - double angle=(nSectors>0)?(360./(double)nSectors)*CLHEP::deg:(360.*CLHEP::deg); - HepGeom::Transform3D transRadiusAndTilt = HepGeom::TranslateX3D(layerRadius)*HepGeom::RotateZ3D(ladderTilt); + double angle=(nSectors>0)?(360./(double)nSectors)*GeoModelKernelUnits::deg:(360.*GeoModelKernelUnits::deg); + GeoTrf::Transform3D transRadiusAndTilt = GeoTrf::TranslateX3D(layerRadius)*GeoTrf::RotateZ3D(ladderTilt); double phiOfModuleZero = m_gmt_mgr->PhiOfModuleZero(); // IBL rotations are defined vs the cooling pipe center... @@ -355,14 +355,13 @@ GeoVPhysVol* GeoPixelLayer::Build() { { // Point that defines the center of the cooling pipe - HepGeom::Point3D<double> centerCoolingPipe = m_gmt_mgr->IBLStaveRotationAxis() ; - HepGeom::Point3D<double> centerCoolingPipe_inv = -centerCoolingPipe; + GeoTrf::Vector3D centerCoolingPipe = m_gmt_mgr->IBLStaveRotationAxis() ; // Transforms - HepGeom::Transform3D staveTrf = HepGeom::RotateZ3D(ladderTilt)*HepGeom::Translate3D(centerCoolingPipe_inv); + GeoTrf::Transform3D staveTrf = GeoTrf::RotateZ3D(ladderTilt)*GeoTrf::Translate3D(-centerCoolingPipe.x(),-centerCoolingPipe.y(),-centerCoolingPipe.z()); double staveRadius = m_gmt_mgr->IBLStaveRadius() ; - transRadiusAndTilt = HepGeom::TranslateX3D(staveRadius)*staveTrf; + transRadiusAndTilt = GeoTrf::TranslateX3D(staveRadius)*staveTrf; } // @@ -396,7 +395,7 @@ GeoVPhysVol* GeoPixelLayer::Build() { double phiOfSector = phiOfModuleZero + ii*angle; // transform equiv RotZ(phiOfSector)*TransZ(layerRadius)*RotZ(tilt) - HepGeom::Transform3D ladderTransform = HepGeom::RotateZ3D(phiOfSector) * transRadiusAndTilt; + GeoTrf::Transform3D ladderTransform = GeoTrf::RotateZ3D(phiOfSector) * transRadiusAndTilt; // // Place the active ladders @@ -499,7 +498,7 @@ GeoVPhysVol* GeoPixelLayer::Build() { if(m_gmt_mgr->PixelStaveAxe()==1) { GeoNameTag *tagM = new GeoNameTag("Brl0M_StaveRing"); - GeoTransform *xformSupportMidRing = new GeoTransform(HepGeom::Transform3D()); + GeoTransform *xformSupportMidRing = new GeoTransform(GeoTrf::Transform3D::Identity()); GeoVPhysVol *supportPhysMidRing = getSupportMidRing(); layerPhys->add(tagM); layerPhys->add(xformSupportMidRing); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLayer.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.h similarity index 95% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLayer.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.h index 64847a9fb5a..317b1207ddc 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelLayer.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelLayer.h @@ -5,7 +5,7 @@ #ifndef PIXELGEOMODEL_GEOPIXELLAYER_H #define PIXELGEOMODEL_GEOPIXELLAYER_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoPhysVol; class GeoTransform; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelModule.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelModule.cxx index 612341d9e3f..9f0fb3b103f 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelModule.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelModule.cxx @@ -2,10 +2,10 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelModule.h" -#include "PixelGeoModel/GeoPixelHybrid.h" -#include "PixelGeoModel/GeoPixelChip.h" -#include "PixelGeoModel/GeoPixelSiCrystal.h" +#include "GeoPixelModule.h" +#include "GeoPixelHybrid.h" +#include "GeoPixelChip.h" +#include "GeoPixelSiCrystal.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" @@ -57,12 +57,12 @@ GeoPixelModule::GeoPixelModule(GeoPixelSiCrystal& theSensor) : // Shift so the center of the box is the center of the sensor. double shift = 0.5 * (ThicknessP() - ThicknessN_noSvc()); - // const GeoShape & shiftedBox = (*moduleBox) << HepGeom::TranslateX3D(shift); + // const GeoShape & shiftedBox = (*moduleBox) << GeoTrf::TranslateX3D(shift); // moduleShape = &shiftedBox; thickness = ThicknessP()+ThicknessN_noSvc(); const GeoBox* moduleBox = new GeoBox(thickness/2.,width/2.,length/2.); - const GeoShape & shiftedBox = (*moduleBox) << HepGeom::TranslateX3D(shift); + const GeoShape & shiftedBox = (*moduleBox) << GeoTrf::TranslateX3D(shift); const GeoShape * moduleShape = &shiftedBox; if(m_moduleSvcThickness<0.001) { @@ -71,19 +71,19 @@ GeoPixelModule::GeoPixelModule(GeoPixelSiCrystal& theSensor) : } else { const GeoShape * gblShape = 0; - gblShape = addShape(gblShape, moduleShape, HepGeom::Transform3D() ); + gblShape = addShape(gblShape, moduleShape, GeoTrf::Transform3D::Identity() ); double svcWidth = width*.6; m_moduleSvcWidth = svcWidth; const GeoBox* moduleSvcBox1 = new GeoBox(m_moduleSvcThickness*.5,svcWidth*.25,length*.5); double yShift = width*.5-svcWidth*.75; double xShift = thickness*.5+m_moduleSvcThickness*.5; - gblShape = addShape(gblShape, moduleSvcBox1, (HepGeom::TranslateX3D(-xShift)*HepGeom::TranslateY3D(-yShift)) ); + gblShape = addShape(gblShape, moduleSvcBox1, (GeoTrf::TranslateX3D(-xShift)*GeoTrf::TranslateY3D(-yShift)) ); const GeoBox* moduleSvcBox2 = new GeoBox(m_moduleSvcThickness*.25,svcWidth*.25,length*.5); yShift = width*.5-svcWidth*.25; xShift = thickness*.5+m_moduleSvcThickness*.25; - gblShape = addShape(gblShape, moduleSvcBox2, (HepGeom::TranslateX3D(-xShift)*HepGeom::TranslateY3D(-yShift)) ); + gblShape = addShape(gblShape, moduleSvcBox2, (GeoTrf::TranslateX3D(-xShift)*GeoTrf::TranslateY3D(-yShift)) ); for(int iSvc=0; iSvc<m_nbModuleSvc; iSvc++) { @@ -97,7 +97,7 @@ GeoPixelModule::GeoPixelModule(GeoPixelSiCrystal& theSensor) : double offsetY = m_gmt_mgr->PixelModuleServiceOffsetY(iSvc); double xPos = -0.5*(m_gmt_mgr->PixelBoardThickness(m_isModule3D)-m_gmt_mgr->PixelHybridThickness(m_isModule3D)) - offsetX - thick_svc*.5; const GeoBox* moduleSvcBox3 = new GeoBox(thick_svc*.5+.01,width_svc*.5+.01,length*.5+.01); - gblShape = addShape(gblShape, moduleSvcBox3, (HepGeom::TranslateX3D(xPos)*HepGeom::TranslateY3D(offsetY)) ); + gblShape = addShape(gblShape, moduleSvcBox3, (GeoTrf::TranslateX3D(xPos)*GeoTrf::TranslateY3D(offsetY)) ); } } @@ -131,16 +131,16 @@ GeoVPhysVol* GeoPixelModule::Build( ) { } modulePhys->add(new GeoIdentifierTag(idTag) ); //Sensor is centered so we don't need the transform. - //GeoTransform *xformsi = new GeoTransform(HepGeom::Transform3D()); + //GeoTransform *xformsi = new GeoTransform(GeoTrf::Transform3D()); //modulePhys->add(xformsi); modulePhys->add(theSi ); // // Place the Hybrid // - if (m_gmt_mgr->PixelHybridThickness(m_isModule3D)>0.00001*CLHEP::mm){ + if (m_gmt_mgr->PixelHybridThickness(m_isModule3D)>0.00001*GeoModelKernelUnits::mm){ GeoPixelHybrid ph(m_isModule3D); double hybxpos = -0.5*(m_gmt_mgr->PixelBoardThickness(m_isModule3D)+m_gmt_mgr->PixelHybridThickness(m_isModule3D)); - GeoTransform* xform = new GeoTransform(HepGeom::TranslateX3D(hybxpos)); + GeoTransform* xform = new GeoTransform(GeoTrf::TranslateX3D(hybxpos)); modulePhys->add(xform); modulePhys->add(ph.Build() ); } @@ -151,7 +151,7 @@ GeoVPhysVol* GeoPixelModule::Build( ) { GeoPixelChip pc(m_isModule3D); double chipxpos = 0.5*(m_gmt_mgr->PixelBoardThickness(m_isModule3D)+m_gmt_mgr->PixelChipThickness(m_isModule3D))+m_gmt_mgr->PixelChipGap(m_isModule3D); double chipypos =m_gmt_mgr->PixelChipOffset(m_isModule3D); - GeoTransform* xform = new GeoTransform(HepGeom::TranslateX3D(chipxpos)*HepGeom::TranslateY3D(chipypos)); + GeoTransform* xform = new GeoTransform(GeoTrf::TranslateX3D(chipxpos)*GeoTrf::TranslateY3D(chipypos)); modulePhys->add(xform); modulePhys->add(pc.Build() ); @@ -183,7 +183,7 @@ GeoVPhysVol* GeoPixelModule::Build( ) { double xPos = -0.5*(m_gmt_mgr->PixelBoardThickness(m_isModule3D)-m_gmt_mgr->PixelHybridThickness(m_isModule3D)) - offsetX - thick*.5; double yPos = offsetY; double zPos = offsetZ; - GeoTransform* xform = new GeoTransform(HepGeom::Translate3D(xPos,yPos,zPos)); + GeoTransform* xform = new GeoTransform(GeoTrf::Translate3D(xPos,yPos,zPos)); modulePhys->add(xform); modulePhys->add(svcPhys); } @@ -200,7 +200,7 @@ double GeoPixelModule::ThicknessN_noSvc() { // is the max of ThicknessP and thickness from the module center to // the outer surface of the hybrid plus some safety. // - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; double thickn = 0.5 * m_gmt_mgr->PixelBoardThickness(m_isModule3D)+ m_gmt_mgr->PixelHybridThickness(m_isModule3D) + safety; double thick = max(thickn, ThicknessP()); @@ -234,7 +234,7 @@ double GeoPixelModule::ThicknessN() { // - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; double thickn = 0.5 * m_gmt_mgr->PixelBoardThickness(m_isModule3D)+ m_gmt_mgr->PixelHybridThickness(m_isModule3D) + safety; double thick = max(thickn, ThicknessP()); @@ -265,7 +265,7 @@ double GeoPixelModule::ThicknessP() { // is thickness from the module center to the outer surface of the // chips plus some safety. - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; double thick = 0.5 * m_gmt_mgr->PixelBoardThickness(m_isModule3D) + m_gmt_mgr->PixelChipThickness(m_isModule3D)+m_gmt_mgr->PixelChipGap(m_isModule3D) + safety; @@ -305,7 +305,7 @@ Identifier GeoPixelModule::getID() { } -const GeoShape * GeoPixelModule::addShape(const GeoShape * lastShape, const GeoShape * nextShape, const HepGeom::Transform3D & trans) +const GeoShape * GeoPixelModule::addShape(const GeoShape * lastShape, const GeoShape * nextShape, const GeoTrf::Transform3D & trans) { const GeoShape * shiftedShape = &(*nextShape << trans); if (lastShape) { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelModule.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelModule.h similarity index 90% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelModule.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelModule.h index 43b254bfbdd..74ca2f44fb0 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelModule.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelModule.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELMODULE_H #define GEOPIXELMODULE_H #include "Identifier/Identifier.h" -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoPixelSiCrystal; @@ -27,7 +27,7 @@ class GeoPixelModule : public GeoVPixelFactory { private: - const GeoShape* addShape(const GeoShape * lastShape, const GeoShape * nextShape, const HepGeom::Transform3D & trans); + const GeoShape* addShape(const GeoShape * lastShape, const GeoShape * nextShape, const GeoTrf::Transform3D & trans); const GeoLogVol* m_theModule; Identifier m_id; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelOldFrame.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelOldFrame.cxx index 0973f6f752d..e50c4ccec30 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelOldFrame.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelOldFrame.cxx @@ -6,8 +6,8 @@ // New description of the pixel support frame (M.Zdrazil + AR) // The box part (of barrel) // -#include "PixelGeoModel/GeoPixelOldFrame.h" -#include "PixelGeoModel/PixelLegacyManager.h" +#include "GeoPixelOldFrame.h" +#include "PixelLegacyManager.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTrap.h" #include "GeoModelKernel/GeoLogVol.h" @@ -113,16 +113,16 @@ void GeoPixelOldFrame::BuildInBarrel(GeoFullPhysVol * parent) { // First part m_legacyManager->setBarrelInSFrame(); - double alpha = 45.*CLHEP::deg; + double alpha = 45.*GeoModelKernelUnits::deg; double w1 = m_legacyManager->PixelBarrelBFrameWidth(); double w2 = m_legacyManager->PixelBarrelTFrameWidth(); double off = m_legacyManager->PixelBarrelFrameOffset(); for (int ii = 0; ii < m_legacyManager->PixelBarrelNBFrame(); ii++) { GeoNameTag* tag = new GeoNameTag("Inside Box Frame"); double thet = ((float)ii+0.5)*alpha; - CLHEP::Hep3Vector pos(w1*cos(thet),w1*sin(thet),off); - CLHEP::HepRotation rm; rm.rotateZ(((float)ii+2.5)*alpha); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Translation3D pos(w1*cos(thet),w1*sin(thet),off); + GeoTrf::RotateZ3D rm(((float)ii+2.5)*alpha); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform); parent->add(BuildBox()); @@ -131,9 +131,9 @@ void GeoPixelOldFrame::BuildInBarrel(GeoFullPhysVol * parent) { for (int ii = 0; ii < m_legacyManager->PixelBarrelNTFrame(); ii++) { GeoNameTag* tag = new GeoNameTag("Inside Trap Frame"); double thet = ((float)ii+1.)*alpha; - CLHEP::Hep3Vector pos(w2*cos(thet),w2*sin(thet),off); - CLHEP::HepRotation rm; rm.rotateZ(((float)ii+3.0)*alpha); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Translation3D pos(w2*cos(thet),w2*sin(thet),off); + GeoTrf::RotateZ3D rm(((float)ii+3.0)*alpha); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform); parent->add(BuildTrap()); @@ -150,14 +150,14 @@ void GeoPixelOldFrame::BuildInBarrel(GeoFullPhysVol * parent) { for (int ii = 0; ii < m_legacyManager->PixelBarrelNBFrame(); ii++) { GeoNameTag* tag = new GeoNameTag("Outside Box Frame"); double thet = ((float)ii+0.5)*alpha; - CLHEP::Hep3Vector pos(w1*cos(thet),w1*sin(thet),off); - CLHEP::HepRotation rm; rm.rotateZ(((float)ii+2.5)*alpha); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Translation3D pos(w1*cos(thet),w1*sin(thet),off); + GeoTrf::RotateZ3D rm(((float)ii+2.5)*alpha); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform); parent->add(BuildBox()); - pos.setZ(-off); - GeoTransform* xform2 = new GeoTransform(HepGeom::Transform3D(rm,pos)); + pos.z()= -off; + GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform2); parent->add(BuildBox()); @@ -166,14 +166,14 @@ void GeoPixelOldFrame::BuildInBarrel(GeoFullPhysVol * parent) { m_legacyManager->setBarrelOutSFrame(); GeoNameTag* tag = new GeoNameTag("Outside Trap Frame"); double thet = ((float)ii+1.)*alpha; - CLHEP::Hep3Vector pos(w2*cos(thet),w2*sin(thet),off); - CLHEP::HepRotation rm; rm.rotateZ(((float)ii+3.0)*alpha); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Translation3D pos(w2*cos(thet),w2*sin(thet),off); + GeoTrf::RotateZ3D rm(((float)ii+3.0)*alpha); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform); parent->add(BuildTrap()); - pos.setZ(-off); - GeoTransform* xform2 = new GeoTransform(HepGeom::Transform3D(rm,pos)); + pos.z() = -off; + GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform2); parent->add(BuildTrap()); @@ -181,19 +181,15 @@ void GeoPixelOldFrame::BuildInBarrel(GeoFullPhysVol * parent) { m_legacyManager->setEndConeSFrame(); GeoNameTag* tag2 = new GeoNameTag("Outside End Cone Trap Frame"); thet = ((float)ii+0.5)*alpha; - CLHEP::Hep3Vector posec(radi*cos(thet),radi*sin(thet),zpec); - CLHEP::HepRotation rm2; - rm2.rotateX(alxec); - rm2.rotateZ(((float)ii+2.5)*alpha); - GeoTransform* xform3 = new GeoTransform(HepGeom::Transform3D(rm2,posec)); + GeoTrf::Translation3D posec(radi*cos(thet),radi*sin(thet),zpec); + GeoTrf::Transform3D rm2 = GeoTrf::RotateZ3D(((float)ii+2.5)*alpha)*GeoTrf::RotateX3D(alxec); + GeoTransform* xform3 = new GeoTransform(GeoTrf::Transform3D(posec*rm2)); parent->add(tag2); parent->add(xform3); parent->add(BuildTrap()); - posec.setZ(-zpec); - CLHEP::HepRotation rm3; - rm3.rotateX(-alxec); - rm3.rotateZ(((float)ii+2.5)*alpha); - GeoTransform* xform4 = new GeoTransform(HepGeom::Transform3D(rm3,posec)); + posec.z() = -zpec; + GeoTrf::Transform3D rm3 = GeoTrf::RotateZ3D(((float)ii+2.5)*alpha)*GeoTrf::RotateX3D(-alxec); + GeoTransform* xform4 = new GeoTransform(GeoTrf::Transform3D(posec*rm3)); parent->add(tag2); parent->add(xform4); parent->add(BuildTrap()); @@ -210,7 +206,7 @@ void GeoPixelOldFrame::BuildOutBarrel(GeoFullPhysVol * parent) { // Add the pixel frame inside the endcap volume // m_legacyManager->setEndcapInSFrame(); - double alpha = 45.*CLHEP::deg; + double alpha = 45.*GeoModelKernelUnits::deg; double w1 = m_legacyManager->PixelEndcapBFrameWidth(); double w2 = m_legacyManager->PixelEndcapTFrameWidth(); double off = m_legacyManager->PixelEndcapFrameOffset()+m_legacyManager->PixelEndcapFrameLength(); @@ -218,18 +214,18 @@ void GeoPixelOldFrame::BuildOutBarrel(GeoFullPhysVol * parent) { for (int ii = 0; ii < m_legacyManager->PixelEndcapNBFrame(); ii++) { GeoNameTag* tag = new GeoNameTag("Outside Outer Endcap Box Frame"); double thet = ((float)ii+0.5)*alpha; - CLHEP::Hep3Vector pos(w1*cos(thet),w1*sin(thet),off); - CLHEP::HepRotation rm; rm.rotateZ(((float)ii+2.5)*alpha); - + GeoTrf::Translation3D pos(w1*cos(thet),w1*sin(thet),off); + GeoTrf::RotateZ3D rm(((float)ii+2.5)*alpha); + if (endcapAPresent) { - GeoTransform* xform1 = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTransform* xform1 = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform1); parent->add(BuildBox()); } if (endcapCPresent) { - pos.setZ(-off); - GeoTransform* xform2 = new GeoTransform(HepGeom::Transform3D(rm,pos)); + pos.z() = -off; + GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform2); parent->add(BuildBox()); @@ -239,17 +235,17 @@ void GeoPixelOldFrame::BuildOutBarrel(GeoFullPhysVol * parent) { for (int ii = 0; ii < m_legacyManager->PixelEndcapNTFrame(); ii++) { GeoNameTag* tag = new GeoNameTag("Outside Outer Endcap Trap Frame"); double thet = ((float)ii+1.)*alpha; - CLHEP::Hep3Vector pos(w2*cos(thet),w2*sin(thet),off); - CLHEP::HepRotation rm; rm.rotateZ(((float)ii+3.0)*alpha); + GeoTrf::Translation3D pos(w2*cos(thet),w2*sin(thet),off); + GeoTrf::RotateZ3D rm(((float)ii+3.0)*alpha); if (endcapAPresent) { - GeoTransform* xform1 = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTransform* xform1 = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform1); parent->add(BuildTrap()); } if (endcapCPresent) { - pos.setZ(-off); - GeoTransform* xform2 = new GeoTransform(HepGeom::Transform3D(rm,pos)); + pos.z() = -off; + GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(pos*rm)); parent->add(tag); parent->add(xform2); parent->add(BuildTrap()); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelOldFrame.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelOldFrame.h similarity index 92% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelOldFrame.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelOldFrame.h index 2a40a4964e3..2a4d9a5d71b 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelOldFrame.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelOldFrame.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELOLDFRAME_H #define GEOPIXELOLDFRAME_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoFullPhysVol; class GeoVPhysVol; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelPigtail.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelPigtail.cxx index e945ff3fedc..e7cab3d7fd9 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelPigtail.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelPigtail.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelPigtail.h" +#include "GeoPixelPigtail.h" #include "GeoModelKernel/GeoTubs.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" @@ -41,7 +41,7 @@ GeoVPhysVol* GeoPixelPigtail::Build() { GeoPhysVol* pigtailPart = new GeoPhysVol(theTubs); double zpos = posZ + zShift; - GeoTransform* xform = new GeoTransform(HepGeom::TranslateZ3D(zpos)); + GeoTransform* xform = new GeoTransform(GeoTrf::TranslateZ3D(zpos)); pigtailPhys->add(xform); pigtailPhys->add(pigtailPart); } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelPigtail.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelPigtail.h similarity index 86% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelPigtail.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelPigtail.h index 5f8766c7bbf..f21415b6d67 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelPigtail.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelPigtail.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELPIGTAIL_H #define GEOPIXELPIGTAIL_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; class GeoPixelPigtail : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelRingSLHC.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelRingSLHC.cxx index 092b102ea46..01ace765ff7 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelRingSLHC.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelRingSLHC.cxx @@ -2,9 +2,9 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoPixelRingSLHC.h" -#include "PixelGeoModel/GeoPixelModule.h" -#include "PixelGeoModel/GeoPixelSiCrystal.h" +#include "GeoPixelRingSLHC.h" +#include "GeoPixelModule.h" +#include "GeoPixelSiCrystal.h" // #include "InDetGeoModelUtils/ExtraMaterial.h" @@ -42,8 +42,8 @@ GeoVPhysVol* GeoPixelRingSLHC::Build() { //(sar) Original block was in c'tor... // Dimensions from class methods // - double rmin = m_gmt_mgr->PixelRingRMin(); // Default is 0.01 CLHEP::mm safety added - double rmax = m_gmt_mgr->PixelRingRMax(); // Default is 0.01 CLHEP::mm safety added + double rmin = m_gmt_mgr->PixelRingRMin(); // Default is 0.01 GeoModelKernelUnits::mm safety added + double rmax = m_gmt_mgr->PixelRingRMax(); // Default is 0.01 GeoModelKernelUnits::mm safety added double halflength = m_gmt_mgr->PixelRingThickness()/2.; const GeoMaterial* air = m_mat_mgr->getMaterial("std::Air"); const GeoTube* ringTube = new GeoTube(rmin,rmax,halflength); @@ -60,7 +60,7 @@ GeoVPhysVol* GeoPixelRingSLHC::Build() { if(nmodules==0) return ringPhys; // deltaPhi is angle between two adjacent modules regardless of side of the disk - double deltaPhi = 360.*CLHEP::deg / (double)nmodules; + double deltaPhi = 360.*GeoModelKernelUnits::deg / (double)nmodules; // This is the start angle of the even modules // Start angle could eventually come from the database... @@ -99,15 +99,13 @@ GeoVPhysVol* GeoPixelRingSLHC::Build() { double angle = imod*deltaPhi+startAngle; + GeoTrf::Transform3D rm = GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + if( m_gmt_mgr->isDiskBack() ) rm = rm * GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); + rm = rm * GeoTrf::RotateZ3D(angle); - CLHEP::HepRotation rm; - rm.rotateY(90*CLHEP::deg); - if( m_gmt_mgr->isDiskBack() ) rm.rotateX(180.*CLHEP::deg); // depth axis points towards disk. - - rm.rotateZ(angle); - CLHEP::Hep3Vector pos(moduleRadius,0,zpos); - pos.rotateZ(angle); - GeoAlignableTransform* xform = new GeoAlignableTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Vector3D pos(moduleRadius,0,zpos); + pos = GeoTrf::RotateZ3D(angle)*pos; + GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::Translate3D(pos.x(),pos.y(),pos.z())*rm); GeoVPhysVol * modulePhys = gpmod.Build(); std::ostringstream ostr; ostr << "Disk" << idisk << "_Sector" << iring; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelRingSLHC.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelRingSLHC.h similarity index 89% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelRingSLHC.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelRingSLHC.h index ccce4bc091b..397d1ba5200 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelRingSLHC.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelRingSLHC.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELRINGSLHC_H #define GEOPIXELRINGSLHC_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoPixelSiCrystal; class GeoLogVol; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelServices.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelServices.cxx index a5d761bdb3d..30aaf37b6dc 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelServices.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelServices.cxx @@ -34,7 +34,7 @@ // TUBS // Ignored: RIN2,ROUT2 // PHI: phi start location of tube sector -// WIDTH (CLHEP::deg): phi width of sector +// WIDTH (GeoModelKernelUnits::deg): phi width of sector // REPEAT: Repeat the tube sector this many times in phi with equal distance between them. // CONS, CONE // WIDTH,REPEAT ignored if CONE @@ -72,33 +72,33 @@ // Ignored: ROUT, RIN2, ROUT2 // RIN: Radial position of center of tube // PHI: phi position of center -// WIDTH (CLHEP::mm): diameter +// WIDTH (GeoModelKernelUnits::mm): diameter // REPEAT: Repeat this many times in phi with equal distance between them. // ROD2 // Ignored: ROUT, RIN2, ROUT2 // RIN: Radial position of center of tube // PHI: phi position of center -// WIDTH (CLHEP::mm): diameter +// WIDTH (GeoModelKernelUnits::mm): diameter // REPEAT: Repeat this many times in phi with equal distance between them. // BOX // Ignored: RIN2, ROUT2 // ROUT-RIN = thickness of box (radially) // (RIN+ROUT)/2 = radial poistion of center of box // PHI: phi position of center -// WIDTH (CLHEP::mm) = width of box +// WIDTH (GeoModelKernelUnits::mm) = width of box // REPEAT: Repeat this many times in phi with equal distance between them. // TRAP // Ignored: RIN2, ROUT2 // ROUT-RIN = thickness of trapezoid (radially) // (RIN+ROUT)/2 = radial poistion of center of trapzoid // PHI: phi position of center -// WIDTH (CLHEP::mm) = width of trapezoid at center +// WIDTH (GeoModelKernelUnits::mm) = width of trapezoid at center // REPEAT: Repeat this many times in phi with equal distance between them. // -// **IMPORTANT NOTE** WIDTH can be in degrees or CLHEP::mm. See OraclePixGeoManager +// **IMPORTANT NOTE** WIDTH can be in degrees or GeoModelKernelUnits::mm. See OraclePixGeoManager -#include "PixelGeoModel/GeoPixelServices.h" +#include "GeoPixelServices.h" #include "InDetGeoModelUtils/VolumeSplitterUtils.h" #include "InDetGeoModelUtils/VolumeBuilder.h" #include "InDetGeoModelUtils/ServiceVolume.h" @@ -206,7 +206,7 @@ GeoPixelServices::GeoPixelServices(InDetDD::Zone * pixZone) std::vector<const InDetDD::ServiceVolume *> servicesOutPix; double svc3_rMin = 99999., svc3_rMax = 0.; std::vector<const InDetDD::ServiceVolume *> servicesOther; - double safety=0.001*CLHEP::mm; + double safety=0.001*GeoModelKernelUnits::mm; for(std::vector<const InDetDD::ServiceVolume *>::const_iterator it=services.begin(); it!=services.end(); it++) { @@ -403,15 +403,15 @@ void GeoPixelServices::initializeOld(const std::string & a) double phiLoc = m_gmt_mgr->PixelServicePhiLoc(a, ii); double phiWidth = m_gmt_mgr->PixelServiceWidth(a, ii); - // Can be in degree or CLHEP::mm. Usually it is CLHEP::deg expect for BOX, TRAP and ROD shape + // Can be in degree or GeoModelKernelUnits::mm. Usually it is GeoModelKernelUnits::deg expect for BOX, TRAP and ROD shape // Geometry manager makes no assumptions about units. So we must interpret here. if (shapeType == "BOX" || shapeType == "ROD" || shapeType == "ROD2" || shapeType == "TRAP") { - phiWidth *= CLHEP::mm; + phiWidth *= GeoModelKernelUnits::mm; } else { - phiWidth *= CLHEP::degree; + phiWidth *= GeoModelKernelUnits::degree; } - if (phiWidth == 0) phiWidth = 2*CLHEP::pi; + if (phiWidth == 0) phiWidth = 2*GeoModelKernelUnits::pi; if (rmin2 <= 0) rmin2 = param.rmin(); if (rmax2 <= 0) rmax2 = param.rmax(); if (repeat == 0) repeat = 1; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelServices.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelServices.h similarity index 95% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelServices.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelServices.h index 9f5d2ca9e73..de701826a8a 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelServices.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelServices.h @@ -5,7 +5,7 @@ #ifndef GEOPIXELSERVICES_H #define GEOPIXELSERVICES_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoTransform; namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx index f2fcc130d89..57fc49f96ac 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.cxx @@ -11,7 +11,7 @@ // // Contains: nothing // -#include "PixelGeoModel/GeoPixelSiCrystal.h" +#include "GeoPixelSiCrystal.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" @@ -109,17 +109,17 @@ GeoPixelSiCrystal::GeoPixelSiCrystal(bool isBLayer, bool isModule3D) if ( (m_gmt_mgr->DesignRPActiveArea(m_isModule3D) > width) || (m_gmt_mgr->DesignZActiveArea(m_isModule3D) > length) || - (width - m_gmt_mgr->DesignRPActiveArea(m_isModule3D) > 4 * CLHEP::mm) || - (length - m_gmt_mgr->DesignZActiveArea(m_isModule3D) > 4 * CLHEP::mm) ) { + (width - m_gmt_mgr->DesignRPActiveArea(m_isModule3D) > 4 * GeoModelKernelUnits::mm) || + (length - m_gmt_mgr->DesignZActiveArea(m_isModule3D) > 4 * GeoModelKernelUnits::mm) ) { m_gmt_mgr->msg(MSG::WARNING) << "GeoPixelSiCrystal: Active area not consistent with sensor size. Sensor: " - << width/CLHEP::mm << " x " << length/CLHEP::mm << ", Active: " - << m_gmt_mgr->DesignRPActiveArea(m_isModule3D)/CLHEP::mm << " x " << m_gmt_mgr->DesignZActiveArea(m_isModule3D)/CLHEP::mm + << width/GeoModelKernelUnits::mm << " x " << length/GeoModelKernelUnits::mm << ", Active: " + << m_gmt_mgr->DesignRPActiveArea(m_isModule3D)/GeoModelKernelUnits::mm << " x " << m_gmt_mgr->DesignZActiveArea(m_isModule3D)/GeoModelKernelUnits::mm << endmsg; } else { if (m_gmt_mgr->msgLvl(MSG::DEBUG)) m_gmt_mgr->msg(MSG::DEBUG) << "GeoPixelSiCrystal: Sensor: " - << width/CLHEP::mm << " x " << length/CLHEP::mm << ", Active: " - << m_gmt_mgr->DesignRPActiveArea(m_isModule3D)/CLHEP::mm << " x " << m_gmt_mgr->DesignZActiveArea(m_isModule3D)/CLHEP::mm + << width/GeoModelKernelUnits::mm << " x " << length/GeoModelKernelUnits::mm << ", Active: " + << m_gmt_mgr->DesignRPActiveArea(m_isModule3D)/GeoModelKernelUnits::mm << " x " << m_gmt_mgr->DesignZActiveArea(m_isModule3D)/GeoModelKernelUnits::mm << endmsg; } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelSiCrystal.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.h similarity index 95% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelSiCrystal.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.h index 129f0e61e14..711b6119c4f 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelSiCrystal.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSiCrystal.h @@ -6,7 +6,7 @@ #define GEOPIXELSICRYSTAL_H #include "Identifier/Identifier.h" -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" class GeoLogVol; namespace InDetDD { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSimpleStaveSupport.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSimpleStaveSupport.cxx index 6dcc6471db1..134f811f597 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSimpleStaveSupport.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSimpleStaveSupport.cxx @@ -5,7 +5,7 @@ // Build simple stave support as a box // This is built one time per layer. -#include "PixelGeoModel/GeoPixelSimpleStaveSupport.h" +#include "GeoPixelSimpleStaveSupport.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" @@ -14,6 +14,7 @@ GeoPixelSimpleStaveSupport::GeoPixelSimpleStaveSupport() + : m_transform(GeoTrf::Transform3D::Identity()) { m_physVol = Build(); m_physVol->ref(); @@ -36,7 +37,7 @@ GeoVPhysVol* GeoPixelSimpleStaveSupport::Build() { const GeoMaterial* material = m_mat_mgr->getMaterialForVolume(matName,shape->volume()); GeoLogVol* logVol = new GeoLogVol("StaveSupport",shape,material); - m_transform = HepGeom::Translate3D(xOffset,yOffset,0); + m_transform = GeoTrf::Translate3D(xOffset,yOffset,0); m_thicknessP = xOffset + 0.5*thickness; m_thicknessN = -xOffset + 0.5*thickness; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelSimpleStaveSupport.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSimpleStaveSupport.h similarity index 84% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelSimpleStaveSupport.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSimpleStaveSupport.h index 0688cb25b06..3086935ef9d 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelSimpleStaveSupport.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelSimpleStaveSupport.h @@ -5,8 +5,9 @@ #ifndef GEOPIXELSIMPLESTAVESUPPORT_H #define GEOPIXELSIMPLESTAVESUPPORT_H -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" class GeoPixelSimpleStaveSupport : public GeoPixelStaveSupport { @@ -15,7 +16,7 @@ public: virtual ~GeoPixelSimpleStaveSupport(); virtual GeoVPhysVol* Build(); virtual GeoVPhysVol* getPhysVol() const {return m_physVol;} - virtual const HepGeom::Transform3D & transform() const {return m_transform;} + virtual const GeoTrf::Transform3D & transform() const {return m_transform;} virtual double thicknessP() const {return m_thicknessP;} virtual double thicknessN() const {return m_thicknessN;} virtual GeoSimplePolygonBrep* computeStaveEnvelopShape(double) { return 0;} @@ -33,7 +34,7 @@ public: private: GeoVPhysVol* m_physVol; - HepGeom::Transform3D m_transform; + GeoTrf::Transform3D m_transform; double m_thicknessP; double m_thicknessN; }; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRing.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRing.cxx index 87dcd7e1e7a..f949df02859 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRing.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRing.cxx @@ -5,10 +5,10 @@ // Build detailed stave support : face plate + carbon foam + cable flex + cooling pipe + end blocks // This is built one time per layer. -#include "PixelGeoModel/GeoPixelStaveRing.h" +#include "GeoPixelStaveRing.h" -#include "PixelGeoModel/GeoPixelSiCrystal.h" -#include "PixelGeoModel/GeoPixelModule.h" +#include "GeoPixelSiCrystal.h" +#include "GeoPixelModule.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTube.h" @@ -48,7 +48,7 @@ GeoVPhysVol* GeoPixelStaveRing::Build(){ m_gmt_mgr->msg(MSG::INFO) <<"Build detailed stave ring support : "<<m_ringName<<" "<<m_ringPosition<<endmsg; - double safety = 0.001*CLHEP::mm; + double safety = 0.001*GeoModelKernelUnits::mm; bool isBLayer = false; if(m_gmt_mgr->GetLD() == 0) isBLayer = true; GeoPixelSiCrystal theSensor(isBLayer); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveRing.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRing.h similarity index 83% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveRing.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRing.h index 891f12ac7ad..0a1510e18ca 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveRing.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRing.h @@ -5,9 +5,7 @@ #ifndef GEOPIXELSTAVERING_H #define GEOPIXELSTAVERING_H -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "GeoModelKernel/GeoTransform.h" +#include "GeoVPixelFactory.h" class GeoPixelStaveRing : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRingServices.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRingServices.cxx index 1c8b31dd59f..66130eeedae 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRingServices.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRingServices.cxx @@ -6,9 +6,9 @@ // Build detailed stave support : face plate + carbon foam + cable flex + cooling pipe + end blocks // This is built one time per layer. -#include "PixelGeoModel/GeoPixelStaveRingServices.h" +#include "GeoPixelStaveRingServices.h" -#include "PixelGeoModel/GeoPixelStaveRing.h" +#include "GeoPixelStaveRing.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTube.h" @@ -43,7 +43,7 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() double ladderHalfThickN = m_ladder.thicknessN(); double ladderHalfThickP = m_ladder.thicknessP(); - double safetyMargin = 0.001*CLHEP::mm; + double safetyMargin = 0.001*GeoModelKernelUnits::mm; // Get endblock from m_staveSupport GeoPhysVol* endblockA=dynamic_cast<GeoPhysVol*>(m_staveSupport.getEndblockEnvelopShape(2)); @@ -56,7 +56,7 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() GeoPhysVol* serviceCoolPipe=dynamic_cast<GeoPhysVol*>(m_staveSupport.getEndblockEnvelopShape(3)); GeoTransform* serviceCoolPipeTrfA=m_staveSupport.getEndblockEnvelopShapeTrf(2); GeoTransform* serviceCoolPipeTrfC=m_staveSupport.getEndblockEnvelopShapeTrf(-2); - const HepGeom::Transform3D ladderLocalTrf=m_staveSupport.transform(); + const GeoTrf::Transform3D ladderLocalTrf=m_staveSupport.transform(); double dogLegStaveLength=17.87; double halfSupportLength=endblockLength*0.5+dogLegStaveLength*0.5; @@ -109,21 +109,20 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() } else { - double angle=360./nSectors*CLHEP::deg; - HepGeom::Transform3D transRadiusAndTilt = HepGeom::TranslateX3D(layerRadius)*HepGeom::RotateZ3D(ladderTilt); + double angle=360./nSectors*GeoModelKernelUnits::deg; + GeoTrf::Transform3D transRadiusAndTilt = GeoTrf::TranslateX3D(layerRadius)*GeoTrf::RotateZ3D(ladderTilt); double phiOfModuleZero = m_gmt_mgr->PhiOfModuleZero(); if(m_gmt_mgr->PixelStaveAxe()==1) { // Point that defines the center of the cooling pipe - HepGeom::Point3D<double> centerCoolingPipe = m_gmt_mgr->IBLStaveRotationAxis() ; - HepGeom::Point3D<double> centerCoolingPipe_inv = -centerCoolingPipe; + GeoTrf::Vector3D centerCoolingPipe = m_gmt_mgr->IBLStaveRotationAxis() ; // Transforms - HepGeom::Transform3D staveTrf = HepGeom::RotateZ3D(ladderTilt)*HepGeom::Translate3D(centerCoolingPipe_inv); + GeoTrf::Transform3D staveTrf = GeoTrf::RotateZ3D(ladderTilt)*GeoTrf::Translate3D(-centerCoolingPipe.x(),-centerCoolingPipe.y(),-centerCoolingPipe.z()); double staveRadius = m_gmt_mgr->IBLStaveRadius() ; - transRadiusAndTilt = HepGeom::TranslateX3D(staveRadius)*staveTrf; + transRadiusAndTilt = GeoTrf::TranslateX3D(staveRadius)*staveTrf; } for(int ii = 0; ii < nSectors; ii++) { @@ -132,7 +131,7 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() double phiOfSector = phiOfModuleZero + ii*angle; // transform equiv RotZ(phiOfSector)*TransZ(layerRadius)*RotZ(tilt) - HepGeom::Transform3D ladderTransform = HepGeom::RotateZ3D(phiOfSector) * transRadiusAndTilt ; + GeoTrf::Transform3D ladderTransform = GeoTrf::RotateZ3D(phiOfSector) * transRadiusAndTilt ; // // Place endblock and endblock flex @@ -140,12 +139,12 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() std::ostringstream nameTag; nameTag << "Endblock" << ii; GeoNameTag * tag = new GeoNameTag(nameTag.str()); - GeoTransform* xformA = new GeoTransform(ladderTransform*ladderLocalTrf*HepGeom::TranslateZ3D(endblockZpos-serviceZpos-dogLegStaveLength*0.5)); + GeoTransform* xformA = new GeoTransform(ladderTransform*ladderLocalTrf*GeoTrf::TranslateZ3D(endblockZpos-serviceZpos-dogLegStaveLength*0.5)); m_supportPhysA->add(tag); m_supportPhysA->add(xformA); m_supportPhysA->add(endblockA); - GeoTransform* xformC = new GeoTransform(ladderTransform*ladderLocalTrf*HepGeom::TranslateZ3D(-endblockZpos+serviceZpos+dogLegStaveLength*0.5)); + GeoTransform* xformC = new GeoTransform(ladderTransform*ladderLocalTrf*GeoTrf::TranslateZ3D(-endblockZpos+serviceZpos+dogLegStaveLength*0.5)); m_supportPhysC->add(tag); m_supportPhysC->add(xformC); m_supportPhysC->add(endblockC); @@ -156,8 +155,8 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() std::ostringstream nameTagFlex; nameTagFlex << "EndblockFlex" << ii; GeoNameTag * tagFlex = new GeoNameTag(nameTagFlex.str()); - GeoTransform* xformFlexA = new GeoTransform(ladderTransform*ladderLocalTrf*(endblockFlexTrf->getTransform())*HepGeom::TranslateZ3D(-dogLegStaveLength*0.5)); - GeoTransform* xformFlexB = new GeoTransform(ladderTransform*ladderLocalTrf*(endblockFlexTrf->getTransform())*HepGeom::TranslateZ3D(dogLegStaveLength*0.5)); + GeoTransform* xformFlexA = new GeoTransform(ladderTransform*ladderLocalTrf*(endblockFlexTrf->getTransform())*GeoTrf::TranslateZ3D(-dogLegStaveLength*0.5)); + GeoTransform* xformFlexB = new GeoTransform(ladderTransform*ladderLocalTrf*(endblockFlexTrf->getTransform())*GeoTrf::TranslateZ3D(dogLegStaveLength*0.5)); m_supportPhysA->add(tagFlex); m_supportPhysA->add(xformFlexA); @@ -184,7 +183,7 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() m_supportPhysC->add(xformPipeC); m_supportPhysC->add(serviceCoolPipe); - HepGeom::Point3D<double> p=ladderTransform*ladderLocalTrf*(serviceCoolPipeTrfA->getTransform())*HepGeom::Point3D<double>(0.,0.,0.); +// GeoTrf::Vector3D p=ladderTransform*ladderLocalTrf*(serviceCoolPipeTrfA->getTransform())*GeoTrf::Vector3D(0.,0.,0.); // std::cout<<"Cooling pipe srv : "<<p.x()<<" "<<p.y()<<" "<<p.z(); // std::cout<<" r : "<<sqrt(p.x()*p.x()+p.y()*p.y())<<" "; // std::cout<<" ang : "<<acos(p.x()/sqrt(p.x()*p.x()+p.y()*p.y()))*180./3.1415<<" "; @@ -209,7 +208,7 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() double dimX=dimX_lin/cos(alpha1)-.15; double dimY=m_gmt_mgr->IBLStaveFlexWidth(); double dimZ=m_gmt_mgr->IBLStaveFlexBaseThickness(); - double angle=90.*CLHEP::deg-alpha1; //90.-27.99; + double angle=90.*GeoModelKernelUnits::deg-alpha1; //90.-27.99; double delta=m_gmt_mgr->IBLFlexDoglegDY(); double trX=-dimX_lin*tan(alpha1)*0.5; //-3.28; double trZ=eoStave+dimX_lin*0.5; @@ -223,13 +222,13 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() for(unsigned int iPt=0; iPt<xShape.size(); iPt++) tmp_shape->addVertex(xShape[iPt],yShape[iPt]); - // GeoPara * tmp_shape = new GeoPara(0.47,5.5,9.,0.*CLHEP::deg,55.*CLHEP::deg,0.); + // GeoPara * tmp_shape = new GeoPara(0.47,5.5,9.,0.*GeoModelKernelUnits::deg,55.*GeoModelKernelUnits::deg,0.); std::string flexMatName = m_gmt_mgr->IBLFlexMaterial(1,"doglegA"); const GeoMaterial* tmp_material = m_mat_mgr->getMaterial(flexMatName); GeoLogVol* tmp_logVol = new GeoLogVol("FlexDogLeg1",tmp_shape,tmp_material); GeoPhysVol * tmp_logVolPV = new GeoPhysVol(tmp_logVol); GeoNameTag* tmp_tag = new GeoNameTag("FlexDogLeg1"); - HepGeom::Transform3D trfGblA=ladderTransform*ladderLocalTrf*HepGeom::TranslateX3D(trX)*HepGeom::TranslateZ3D(trZ)*(endblockFlexTrf->getTransform())*HepGeom::RotateY3D(angle); + GeoTrf::Transform3D trfGblA=ladderTransform*ladderLocalTrf*GeoTrf::TranslateX3D(trX)*GeoTrf::TranslateZ3D(trZ)*(endblockFlexTrf->getTransform())*GeoTrf::RotateY3D(angle); GeoTransform* tmp_xformA = new GeoTransform(trfGblA); m_supportPhysA->add(tmp_tag); @@ -238,7 +237,7 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() trX=-dimX_lin*tan(alpha1)*0.5; //-3.28; trZ=-(eoStave+dimX_lin*0.5); - HepGeom::Transform3D trfGblC=ladderTransform*ladderLocalTrf*HepGeom::TranslateX3D(trX)*HepGeom::TranslateZ3D(trZ)*(endblockFlexTrf->getTransform())*HepGeom::RotateY3D(-angle); + GeoTrf::Transform3D trfGblC=ladderTransform*ladderLocalTrf*GeoTrf::TranslateX3D(trX)*GeoTrf::TranslateZ3D(trZ)*(endblockFlexTrf->getTransform())*GeoTrf::RotateY3D(-angle); GeoTransform* tmp_xformC = new GeoTransform(trfGblC); m_supportPhysC->add(tmp_tag); @@ -254,7 +253,7 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() double trX2=trX*2.-dimX2_lin*tan(alpha2)*0.5; //-3.28; double trZ2=eoStave+dimX_lin+dimX2_lin*0.5; xShape.clear(); yShape.clear(); - angle=90.*CLHEP::deg-alpha2; + angle=90.*GeoModelKernelUnits::deg-alpha2; xShape.push_back(dimX2*0.5); yShape.push_back(dimY2*0.5); xShape.push_back(-dimX2*0.5); yShape.push_back(dimY2*0.5); xShape.push_back(-dimX2*0.5); yShape.push_back(-dimY2*0.5); @@ -267,13 +266,13 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() GeoPhysVol * tmp2_logVolPV = new GeoPhysVol(tmp2_logVol); GeoNameTag* tmp2_tag = new GeoNameTag("FlexDogLeg2"); - GeoTransform* tmp2_xformA = new GeoTransform(ladderTransform*ladderLocalTrf*HepGeom::TranslateX3D(trX2)*HepGeom::TranslateZ3D(trZ2)*(endblockFlexTrf->getTransform())*HepGeom::RotateY3D(angle)*HepGeom::TranslateY3D(delta*.75)); + GeoTransform* tmp2_xformA = new GeoTransform(ladderTransform*ladderLocalTrf*GeoTrf::TranslateX3D(trX2)*GeoTrf::TranslateZ3D(trZ2)*(endblockFlexTrf->getTransform())*GeoTrf::RotateY3D(angle)*GeoTrf::TranslateY3D(delta*.75)); m_supportPhysA->add(tmp2_tag); m_supportPhysA->add(tmp2_xformA); m_supportPhysA->add(tmp2_logVolPV); trZ2=-(eoStave+dimX_lin+dimX2_lin*0.5); - GeoTransform* tmp2_xformC = new GeoTransform(ladderTransform*ladderLocalTrf*HepGeom::TranslateX3D(trX2)*HepGeom::TranslateZ3D(trZ2)*(endblockFlexTrf->getTransform())*HepGeom::RotateY3D(-angle)*HepGeom::TranslateY3D(delta*.75)); + GeoTransform* tmp2_xformC = new GeoTransform(ladderTransform*ladderLocalTrf*GeoTrf::TranslateX3D(trX2)*GeoTrf::TranslateZ3D(trZ2)*(endblockFlexTrf->getTransform())*GeoTrf::RotateY3D(-angle)*GeoTrf::TranslateY3D(delta*.75)); m_supportPhysC->add(tmp2_tag); m_supportPhysC->add(tmp2_xformC); m_supportPhysC->add(tmp2_logVolPV); @@ -284,30 +283,30 @@ GeoVPhysVol* GeoPixelStaveRingServices::Build() // IBL layer shift ( 2mm shift issue ) double layerZshift = m_gmt_mgr->PixelLayerGlobalShift(); - CLHEP::Hep3Vector ring_posA(0.0,0.0,staveRing.GetPositionAlongZAxis()-serviceZpos-dogLegStaveLength*0.5+layerZshift); - GeoTransform* xformA = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),ring_posA)); + GeoTrf::Translate3D ring_posA(0.0,0.0,staveRing.GetPositionAlongZAxis()-serviceZpos-dogLegStaveLength*0.5+layerZshift); + GeoTransform* xformA = new GeoTransform(ring_posA); m_supportPhysA->add(tagA); m_supportPhysA->add(xformA); m_supportPhysA->add(ringphysA); - CLHEP::Hep3Vector ring_posC(0.0,0.0,-staveRing.GetPositionAlongZAxis()+serviceZpos+dogLegStaveLength*0.5-layerZshift); - GeoTransform* xformC = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),ring_posC)); + GeoTrf::Translate3D ring_posC(0.0,0.0,-staveRing.GetPositionAlongZAxis()+serviceZpos+dogLegStaveLength*0.5-layerZshift); + GeoTransform* xformC = new GeoTransform(ring_posC); m_supportPhysC->add(tagC); m_supportPhysC->add(xformC); m_supportPhysC->add(ringphysC); m_gmt_mgr->msg(MSG::DEBUG)<<"IBL EOS : zpos "<<serviceZpos<<endmsg; - HepGeom::Transform3D supportTrfA = HepGeom::TranslateZ3D(serviceZpos+dogLegStaveLength*0.5+layerZshift); + GeoTrf::Transform3D supportTrfA = GeoTrf::TranslateZ3D(serviceZpos+dogLegStaveLength*0.5+layerZshift); m_xformSupportA = new GeoTransform(supportTrfA); - HepGeom::Transform3D supportTrfC = HepGeom::TranslateZ3D(-serviceZpos-dogLegStaveLength*0.5+layerZshift); + GeoTrf::Transform3D supportTrfC = GeoTrf::TranslateZ3D(-serviceZpos-dogLegStaveLength*0.5+layerZshift); m_xformSupportC = new GeoTransform(supportTrfC); std::ostringstream lnameM; lnameM << "Brl0M_StaveRing"; m_supportMidRing = staveRing.SetParametersAndBuild(lnameM.str(),"Mid"); - CLHEP::Hep3Vector ring_posM(0.0,0.0,0.0+layerZshift); - m_xformSupportMidRing = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),ring_posM)); + GeoTrf::Translate3D ring_posM(0.0,0.0,0.0+layerZshift); + m_xformSupportMidRing = new GeoTransform(ring_posM); return 0; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveRingServices.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRingServices.h similarity index 84% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveRingServices.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRingServices.h index de473e5f6c7..e4ebb9393c9 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveRingServices.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveRingServices.h @@ -5,17 +5,14 @@ #ifndef GEOPIXELSTAVERINGSERVICES_H #define GEOPIXELSTAVERINGSERVICES_H -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "PixelGeoModel/GeoPixelLadder.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPixelLadder.h" -#include "CLHEP/Geometry/Transform3D.h" #include "GeoModelKernel/GeoPhysVol.h" - class GeoTransform; -class GeoPhysVol; class GeoPixelStaveRingServices : public GeoVPixelFactory { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveSupport.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveSupport.h similarity index 86% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveSupport.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveSupport.h index 05a15c622e8..0b077797b64 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelStaveSupport.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelStaveSupport.h @@ -5,8 +5,9 @@ #ifndef GEOPIXELSTAVESUPPORT_H #define GEOPIXELSTAVESUPPORT_H -#include "PixelGeoModel/GeoVPixelFactory.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoVPixelFactory.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoSimplePolygonBrep.h" #include "GeoModelKernel/GeoTransform.h" @@ -14,7 +15,7 @@ class GeoPixelStaveSupport : public GeoVPixelFactory { public: virtual GeoVPhysVol* getPhysVol() const = 0; - virtual const HepGeom::Transform3D & transform() const = 0; + virtual const GeoTrf::Transform3D & transform() const = 0; virtual double thicknessP() const = 0; virtual double thicknessN() const = 0; virtual GeoSimplePolygonBrep* computeStaveEnvelopShape(double) = 0; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelTMT.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelTMT.cxx index 2138e77957c..5d2286e73b4 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelTMT.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelTMT.cxx @@ -7,7 +7,7 @@ // Each layer is given slightly different mass due to differences // in the measured mass. -#include "PixelGeoModel/GeoPixelTMT.h" +#include "GeoPixelTMT.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTubs.h" #include "GeoModelKernel/GeoTrap.h" @@ -15,14 +15,15 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoNameTag.h" - #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoShapeUnion.h" +#include "GeoModelKernel/Units.h" #include <utility> //std::swap #include <cmath> -GeoPixelTMT::GeoPixelTMT() +GeoPixelTMT::GeoPixelTMT(): + m_transform(GeoTrf::Transform3D::Identity()) { m_physVol = Build(); m_physVol->ref(); @@ -50,7 +51,7 @@ GeoVPhysVol* GeoPixelTMT::Build() { GeoNameTag* tag = new GeoNameTag("TMT"); // this part is unchanged: reading the DB, creating the shapes of the volumes and defining their position - HepGeom::RotateX3D traprot(180.*CLHEP::deg); + GeoTrf::RotateX3D traprot(180.*GeoModelKernelUnits::deg); int halfNModule = m_gmt_mgr->PixelNModule()/2; @@ -106,7 +107,7 @@ GeoVPhysVol* GeoPixelTMT::Build() { GeoLogVol* tmpLogVol= new GeoLogVol("TMT",shape,material); GeoPhysVol* tmpPhysVol= new GeoPhysVol(tmpLogVol); - GeoTransform* trans = new GeoTransform(HepGeom::Translate3D(xpos,ypos,zpos)); + GeoTransform* trans = new GeoTransform(GeoTrf::Translate3D(xpos,ypos,zpos)); theTMT->add(tag); theTMT->add(trans); @@ -123,12 +124,12 @@ GeoVPhysVol* GeoPixelTMT::Build() { // move the dublicates to the correct relative position and add it to the assembly double zshift = m_gmt_mgr->PixelModuleZPosition(1) * ii; - GeoTransform* transPos = new GeoTransform(HepGeom::Translate3D(xpos,ypos,zpos+zshift)); + GeoTransform* transPos = new GeoTransform(GeoTrf::Translate3D(xpos,ypos,zpos+zshift)); theTMT->add(tag); theTMT->add(transPos); theTMT->add(tmpPhysVol); - GeoTransform* transNeg = new GeoTransform(HepGeom::Translate3D(xpos,ypos,-(zpos+zshift))*HepGeom::RotateX3D(180*CLHEP::deg)); + GeoTransform* transNeg = new GeoTransform(GeoTrf::Translate3D(xpos,ypos,-(zpos+zshift))*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)); theTMT->add(tag); theTMT->add(transNeg); theTMT->add(tmpPhysVol); @@ -143,7 +144,7 @@ GeoVPhysVol* GeoPixelTMT::Build() { } const GeoShape * -GeoPixelTMT::addShape(const GeoShape * lastShape, const GeoShape * nextShape, const HepGeom::Transform3D & trans) +GeoPixelTMT::addShape(const GeoShape * lastShape, const GeoShape * nextShape, const GeoTrf::Transform3D & trans) { const GeoShape * shiftedShape = &(*nextShape << trans); if (lastShape) { diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelTMT.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelTMT.h similarity index 83% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelTMT.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelTMT.h index 06eee2be40d..40c1c9ef775 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoPixelTMT.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoPixelTMT.h @@ -5,8 +5,9 @@ #ifndef GEOPIXELTMT_H #define GEOPIXELTMT_H -#include "PixelGeoModel/GeoPixelStaveSupport.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPixelStaveSupport.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "AthenaKernel/MsgStreamMember.h" class GeoShape; @@ -18,7 +19,7 @@ public: virtual ~GeoPixelTMT(); virtual GeoVPhysVol* Build(); virtual GeoVPhysVol* getPhysVol() const {return m_physVol;} - virtual const HepGeom::Transform3D & transform() const {return m_transform;} + virtual const GeoTrf::Transform3D & transform() const {return m_transform;} virtual double thicknessP() const {return 0;} // Use ladder thickness from database virtual double thicknessN() const {return 0;} // Use ladder thickness from database virtual GeoSimplePolygonBrep* computeStaveEnvelopShape(double) { return 0;} @@ -35,10 +36,10 @@ public: MsgStream& msg (MSG::Level lvl) const { return m_msg << lvl;} private: - const GeoShape * addShape(const GeoShape * lastShape, const GeoShape * nextShape, const HepGeom::Transform3D & trans); + const GeoShape * addShape(const GeoShape * lastShape, const GeoShape * nextShape, const GeoTrf::Transform3D & trans); GeoVPhysVol* m_physVol; - HepGeom::Transform3D m_transform; + GeoTrf::Transform3D m_transform; mutable Athena::MsgStreamMember m_msg; }; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoVPixelFactory.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoVPixelFactory.cxx index a0097586054..c92e41de73a 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoVPixelFactory.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoVPixelFactory.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/GeoVPixelFactory.h" +#include "GeoVPixelFactory.h" using InDetDD::PixelDetectorManager; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoVPixelFactory.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoVPixelFactory.h similarity index 94% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoVPixelFactory.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoVPixelFactory.h index a932c7bcdb2..9cbb97057a9 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/GeoVPixelFactory.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/GeoVPixelFactory.h @@ -11,7 +11,7 @@ #include "GeoModelKernel/GeoFullPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" -#include "PixelGeoModel/PixelGeometryManager.h" +#include "PixelGeometryManager.h" #include "InDetGeoModelUtils/InDetMaterialManager.h" // fwd declaration diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.cxx index b33aed42418..a4a53b36862 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.cxx @@ -2,10 +2,10 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/OraclePixGeoManager.h" -#include "PixelGeoModel/PixelLegacyManager.h" -#include "PixelGeoModel/PixelMaterialMap.h" -#include "PixelGeoModel/PixelStaveTypes.h" +#include "OraclePixGeoManager.h" +#include "PixelLegacyManager.h" +#include "PixelMaterialMap.h" +#include "PixelStaveTypes.h" #include "InDetGeoModelUtils/PairIndexMap.h" #include "InDetGeoModelUtils/TopLevelPlacements.h" #include "InDetGeoModelUtils/InDetMaterialManager.h" @@ -30,9 +30,7 @@ // Distorted material manager // #include "InDetGeoModelUtils/DistortedMaterialManager.h" - -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" using InDetDD::PixelDetectorManager; @@ -66,7 +64,7 @@ OraclePixGeoManager::OraclePixGeoManager(const PixelGeoModelAthenaComps * athena m_diskRingIndexMap(0), m_zPositionMap(0), m_dbVersion(0), - m_defaultLengthUnit(CLHEP::mm) + m_defaultLengthUnit(GeoModelKernelUnits::mm) { m_commonItems = 0; m_pDDmgr = 0; @@ -173,8 +171,8 @@ OraclePixGeoManager::init() m_distortedMatManager = new InDetDD::DistortedMaterialManager; - // Set default lenth unit to CLHEP::mm for newer version and CLHEP::cm for older versions - m_defaultLengthUnit = (dbVersion() < 3) ? CLHEP::cm : CLHEP::mm; + // Set default lenth unit to GeoModelKernelUnits::mm for newer version and GeoModelKernelUnits::cm for older versions + m_defaultLengthUnit = (dbVersion() < 3) ? GeoModelKernelUnits::cm : GeoModelKernelUnits::mm; // Get the top level placements m_placements = new TopLevelPlacements(m_PixelTopLevel); @@ -265,7 +263,7 @@ OraclePixGeoManager::getIdHelper() } -const HepGeom::Transform3D & +const GeoTrf::Transform3D & OraclePixGeoManager::partTransform(const std::string & partName) const { return m_placements->transform(partName); @@ -517,7 +515,7 @@ double OraclePixGeoManager::PixelBoardLength(bool isModule3D) double OraclePixGeoManager::PixelBoardThickness(bool isModule3D) { if (m_dc1Geometry && isBarrel() && (m_currentLD == 0)) { - return 200*CLHEP::micrometer; + return 200*GeoModelKernelUnits::micrometer; } if(ibl()&&isModule3D) @@ -827,7 +825,7 @@ double OraclePixGeoManager::PixelServiceRMin2(const std::string & type, int inde if (!getPixelServiceRecordTestField("RIN2",type,index)) { return 0; } else { - return getPixelServiceRecordDouble("RIN2",type,index) * CLHEP::mm; + return getPixelServiceRecordDouble("RIN2",type,index) * GeoModelKernelUnits::mm; } } @@ -835,7 +833,7 @@ double OraclePixGeoManager::PixelServiceRMax2(const std::string & type, int inde if (!getPixelServiceRecordTestField("ROUT2",type,index)) { return 0; } else { - return getPixelServiceRecordDouble("ROUT2",type,index) * CLHEP::mm; + return getPixelServiceRecordDouble("ROUT2",type,index) * GeoModelKernelUnits::mm; } } @@ -862,7 +860,7 @@ double OraclePixGeoManager::PixelServicePhiLoc(const std::string & type, int ind if (!getPixelServiceRecordTestField("PHI",type,index)) { return 0; } else { - return getPixelServiceRecordDouble("PHI",type,index) * CLHEP::degree; + return getPixelServiceRecordDouble("PHI",type,index) * GeoModelKernelUnits::degree; } } @@ -870,7 +868,7 @@ double OraclePixGeoManager::PixelServiceWidth(const std::string & type, int inde if (!getPixelServiceRecordTestField("WIDTH",type,index)) { return 0; } else { - // Can be in degree or CLHEP::mm. Leave it to GeoPixelServices to interpret. + // Can be in degree or GeoModelKernelUnits::mm. Leave it to GeoPixelServices to interpret. return getPixelServiceRecordDouble("WIDTH",type,index); } } @@ -1097,42 +1095,42 @@ double OraclePixGeoManager::PixelCableZStart(int index) { if (dbVersion() < 3) return m_legacyManager->PixelCableZStart(index); - return db()->getDouble(m_PixelBarrelCable,"ZSTART",index) * CLHEP::mm; + return db()->getDouble(m_PixelBarrelCable,"ZSTART",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelCableZEnd(int index) { if (dbVersion() < 3) return m_legacyManager->PixelCableZEnd(index); - return db()->getDouble(m_PixelBarrelCable,"ZEND",index) * CLHEP::mm; + return db()->getDouble(m_PixelBarrelCable,"ZEND",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelCableWidth(int index) { if (dbVersion() < 3) return m_legacyManager->PixelCableWidth(index); - return db()->getDouble(m_PixelBarrelCable,"WIDTH",index) * CLHEP::mm; + return db()->getDouble(m_PixelBarrelCable,"WIDTH",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelCableThickness(int index) { if (dbVersion() < 3) return m_legacyManager->PixelCableThickness(index); - return db()->getDouble(m_PixelBarrelCable,"THICK",index) * CLHEP::mm; + return db()->getDouble(m_PixelBarrelCable,"THICK",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelCableStackOffset(int index) { if (dbVersion() < 3) return m_legacyManager->PixelCableStackOffset(index); - return db()->getDouble(m_PixelBarrelCable,"STACKPOS",index) * CLHEP::mm; + return db()->getDouble(m_PixelBarrelCable,"STACKPOS",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelCableWeight(int index) { if (dbVersion() < 3) return 0; - return db()->getDouble(m_PixelBarrelCable,"WEIGHT",index) * CLHEP::g; + return db()->getDouble(m_PixelBarrelCable,"WEIGHT",index) * GeoModelKernelUnits::g; } std::string @@ -1312,19 +1310,19 @@ unsigned int OraclePixGeoManager::PixelEnvelopeNumPlanes() double OraclePixGeoManager::PixelEnvelopeZ(int i) { - double zmin = db()->getDouble(m_PixelEnvelope,"Z",i) * CLHEP::mm; + double zmin = db()->getDouble(m_PixelEnvelope,"Z",i) * GeoModelKernelUnits::mm; if (zmin < 0) msg(MSG::ERROR) << "PixelEnvelope table should only contain +ve z values" << endmsg; return std::abs(zmin); } double OraclePixGeoManager::PixelEnvelopeRMin(int i) { - return db()->getDouble(m_PixelEnvelope,"RMIN",i) * CLHEP::mm; + return db()->getDouble(m_PixelEnvelope,"RMIN",i) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelEnvelopeRMax(int i) { - return db()->getDouble(m_PixelEnvelope,"RMAX",i) * CLHEP::mm; + return db()->getDouble(m_PixelEnvelope,"RMAX",i) * GeoModelKernelUnits::mm; } @@ -1369,32 +1367,32 @@ int OraclePixGeoManager::PixelFrameSections() double OraclePixGeoManager::PixelFrameRMinSide(int sectionIndex) { - return db()->getDouble(m_PixelFrame, "RMINSIDE", sectionIndex) * CLHEP::mm; + return db()->getDouble(m_PixelFrame, "RMINSIDE", sectionIndex) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFrameRMaxSide(int sectionIndex) { - return db()->getDouble(m_PixelFrame, "RMAXSIDE", sectionIndex) * CLHEP::mm; + return db()->getDouble(m_PixelFrame, "RMAXSIDE", sectionIndex) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFrameSideWidth(int sectionIndex) { - return db()->getDouble(m_PixelFrame, "SIDEWIDTH", sectionIndex) * CLHEP::mm; + return db()->getDouble(m_PixelFrame, "SIDEWIDTH", sectionIndex) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFrameZMin(int sectionIndex) { - return db()->getDouble(m_PixelFrame, "ZMIN", sectionIndex) * CLHEP::mm; + return db()->getDouble(m_PixelFrame, "ZMIN", sectionIndex) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFrameZMax(int sectionIndex) { - return db()->getDouble(m_PixelFrame, "ZMAX", sectionIndex) * CLHEP::mm; + return db()->getDouble(m_PixelFrame, "ZMAX", sectionIndex) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFramePhiStart(int sectionIndex) { - return db()->getDouble(m_PixelFrame, "PHISTART", sectionIndex) * CLHEP::deg; + return db()->getDouble(m_PixelFrame, "PHISTART", sectionIndex) * GeoModelKernelUnits::deg; } int OraclePixGeoManager::PixelFrameNumSides(int sectionIndex) @@ -1479,28 +1477,28 @@ double OraclePixGeoManager::PixelFrameElementZMin1(int sectionIndex, int element { int index = getFrameElementIndex(sectionIndex, element); if (index < 0) return 0; // Error message already printed in getFrameElementIndex. - return db()->getDouble(m_PixelFrameSect, "ZMIN1", index) * CLHEP::mm; + return db()->getDouble(m_PixelFrameSect, "ZMIN1", index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFrameElementZMin2(int sectionIndex, int element) { int index = getFrameElementIndex(sectionIndex, element); if (index < 0) return 0; // Error message already printed in getFrameElementIndex. - return db()->getDouble(m_PixelFrameSect, "ZMIN2", index) * CLHEP::mm; + return db()->getDouble(m_PixelFrameSect, "ZMIN2", index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFrameElementZMax1(int sectionIndex, int element) { int index = getFrameElementIndex(sectionIndex, element); if (index < 0) return 0; // Error message already printed in getFrameElementIndex. - return db()->getDouble(m_PixelFrameSect, "ZMAX1", index) * CLHEP::mm; + return db()->getDouble(m_PixelFrameSect, "ZMAX1", index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFrameElementZMax2(int sectionIndex, int element) { int index = getFrameElementIndex(sectionIndex, element); if (index < 0) return 0; // Error message already printed in getFrameElementIndex. - return db()->getDouble(m_PixelFrameSect, "ZMAX2", index) * CLHEP::mm; + return db()->getDouble(m_PixelFrameSect, "ZMAX2", index) * GeoModelKernelUnits::mm; } int OraclePixGeoManager::PixelStaveIndex(int layer) @@ -1584,14 +1582,14 @@ double OraclePixGeoManager::PixelLadderLength() { if (useLegacy()) return m_legacyManager->PixelLadderLength(); int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"ENVLENGTH",index)*CLHEP::mm; + return db()->getDouble(m_PixelStave,"ENVLENGTH",index)*GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelLadderWidthClearance() { - if (useLegacy()) return 0.9*CLHEP::mm; + if (useLegacy()) return 0.9*GeoModelKernelUnits::mm; int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"CLEARANCEY",index)*CLHEP::mm; + return db()->getDouble(m_PixelStave,"CLEARANCEY",index)*GeoModelKernelUnits::mm; } // Only used if ladder thickness is automatically calculated it, ie ENVTHICK = 0 @@ -1600,63 +1598,63 @@ double OraclePixGeoManager::PixelLadderThicknessClearance() { int index = PixelStaveIndex(m_currentLD); if (db()->testField(m_PixelStave,"CLEARANCEX",index)) { - return db()->getDouble(m_PixelStave,"CLEARANCEX",index)*CLHEP::mm; + return db()->getDouble(m_PixelStave,"CLEARANCEX",index)*GeoModelKernelUnits::mm; } - return 0.1*CLHEP::mm; + return 0.1*GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelLadderThickness() { if (useLegacy()) return m_legacyManager->PixelLadderThickness(); // 2*1.48972 mm int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"ENVTHICK",index)*CLHEP::mm; + return db()->getDouble(m_PixelStave,"ENVTHICK",index)*GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelLadderTilt() { - return db()->getDouble(m_PixelLayer,"STAVETILT",m_currentLD)*CLHEP::deg; + return db()->getDouble(m_PixelLayer,"STAVETILT",m_currentLD)*GeoModelKernelUnits::deg; } double OraclePixGeoManager::PixelLadderServicesX() { if (useLegacy()) return m_legacyManager->PixelLadderServicesX(); // 1.48972 mm int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"SERVICEOFFSETX",index) * CLHEP::mm; + return db()->getDouble(m_PixelStave,"SERVICEOFFSETX",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelLadderServicesY() { if (useLegacy()) return m_legacyManager->PixelLadderServicesY(); // 3mm int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"SERVICEOFFSETY",index) * CLHEP::mm; + return db()->getDouble(m_PixelStave,"SERVICEOFFSETY",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelLadderCableOffsetX() { if (useLegacy()) return m_legacyManager->PixelLadderCableOffsetX(); // 0 int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"CABLEOFFSETX",index) * CLHEP::mm; + return db()->getDouble(m_PixelStave,"CABLEOFFSETX",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelLadderCableOffsetY() { if (useLegacy()) return m_legacyManager->PixelLadderCableOffsetY(); // 4mm int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"CABLEOFFSETY",index) * CLHEP::mm; + return db()->getDouble(m_PixelStave,"CABLEOFFSETY",index) * GeoModelKernelUnits::mm; } // SLHC/IBL only double OraclePixGeoManager::PixelLadderSupportThickness() { int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"SUPPORTTHICK",index) * CLHEP::mm; + return db()->getDouble(m_PixelStave,"SUPPORTTHICK",index) * GeoModelKernelUnits::mm; } // SLHC/IBL only double OraclePixGeoManager::PixelLadderSupportWidth() { int index = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"SUPPORTWIDTH",index) * CLHEP::mm; + return db()->getDouble(m_PixelStave,"SUPPORTWIDTH",index) * GeoModelKernelUnits::mm; } @@ -1690,16 +1688,16 @@ double OraclePixGeoManager::PixelLadderSupportLength() { int index = PixelStaveIndex(m_currentLD); if (db()->testField(m_PixelStave,"SUPPORTHLENGTH",index)) { - double halflength = db()->getDouble(m_PixelStave,"SUPPORTHLENGTH",index) * CLHEP::mm; + double halflength = db()->getDouble(m_PixelStave,"SUPPORTHLENGTH",index) * GeoModelKernelUnits::mm; if (halflength > 0) return 2 * halflength; } - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; return PixelLadderLength() - safety; } // IBL detailed stave support only -HepGeom::Point3D<double> OraclePixGeoManager::IBLStaveRotationAxis() +GeoTrf::Vector3D OraclePixGeoManager::IBLStaveRotationAxis() { // set layer to 0 (in order to read read IBL data) int currentLD_tmp = m_currentLD; @@ -1713,7 +1711,7 @@ HepGeom::Point3D<double> OraclePixGeoManager::IBLStaveRotationAxis() IBLStaveFacePlateThickness() + IBLStaveFacePlateGreaseThickness() + // plate thickness (grease + plate) IBLStaveTubeMiddlePos(); // from plate to colling pipe center double yCenterCoolingPipe = IBLStaveMechanicalStaveOffset(); - HepGeom::Point3D<double> centerCoolingPipe(xCenterCoolingPipe, yCenterCoolingPipe, 0.); + GeoTrf::Vector3D centerCoolingPipe(xCenterCoolingPipe, yCenterCoolingPipe, 0.); m_currentLD = currentLD_tmp; return centerCoolingPipe; @@ -1727,17 +1725,17 @@ double OraclePixGeoManager::IBLStaveRadius() m_currentLD = 0; // Point that defines the center of the cooling pipe - HepGeom::Point3D<double> centerCoolingPipe_inv = -IBLStaveRotationAxis(); - HepGeom::Point3D<double> origin(0.,0.,0.); + GeoTrf::Vector3D centerCoolingPipe_inv = -IBLStaveRotationAxis(); + GeoTrf::Vector3D origin(0.,0.,0.); double layerRadius = PixelLayerRadius(); double ladderTilt = PixelLadderTilt(); // Transforms - HepGeom::Transform3D staveTrf = HepGeom::RotateZ3D(ladderTilt)*HepGeom::Translate3D(centerCoolingPipe_inv); - HepGeom::Point3D<double> sensorPos = staveTrf*origin; + GeoTrf::Transform3D staveTrf = GeoTrf::RotateZ3D(ladderTilt)*GeoTrf::Translate3D(centerCoolingPipe_inv.x(),centerCoolingPipe_inv.y(),centerCoolingPipe_inv.z()); + GeoTrf::Vector3D sensorPos = staveTrf*origin; double yPos = sensorPos.y(); - HepGeom::Point3D<double> sensorPos_layer(sqrt(layerRadius*layerRadius-yPos*yPos),yPos,0.); + GeoTrf::Vector3D sensorPos_layer(sqrt(layerRadius*layerRadius-yPos*yPos),yPos,0.); double staveRadius = sensorPos_layer.x()-sensorPos.x(); @@ -1751,7 +1749,7 @@ double OraclePixGeoManager::IBLStaveFacePlateThickness() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"FACEPLATETHICK",index)) { - double thickness = db()->getDouble(m_PixelIBLStave,"FACEPLATETHICK",index) * CLHEP::mm; + double thickness = db()->getDouble(m_PixelIBLStave,"FACEPLATETHICK",index) * GeoModelKernelUnits::mm; if (thickness > 0) return thickness ; } return 0.0; @@ -1762,7 +1760,7 @@ double OraclePixGeoManager:: IBLStaveMechanicalStaveWidth() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"STAVEWIDTH",index)) { - double value = db()->getDouble(m_PixelIBLStave,"STAVEWIDTH",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"STAVEWIDTH",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -1773,7 +1771,7 @@ double OraclePixGeoManager:: IBLStaveMechanicalStaveEndBlockLength() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"ENDBLOCKLENGTH",index)) { - double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKLENGTH",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKLENGTH",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -1784,7 +1782,7 @@ double OraclePixGeoManager:: IBLStaveMechanicalStaveEndBlockFixPoint() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"ENDBLOCKFIXINGPOS",index)) { - double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKFIXINGPOS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKFIXINGPOS",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1796,7 +1794,7 @@ double OraclePixGeoManager:: IBLStaveMechanicalStaveEndBlockOmegaOverlap() try{ int index=0; if (db()->testField(m_PixelIBLStave,"ENDBLOCKOMEGAOVERLAP",index)) { - double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKOMEGAOVERLAP",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"ENDBLOCKOMEGAOVERLAP",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1812,7 +1810,7 @@ double OraclePixGeoManager::IBLStaveLength() { int index=0; if (db()->testField(m_PixelIBLStave,"STAVELENGTH",index)) { - double value = db()->getDouble(m_PixelIBLStave,"STAVELENGTH",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"STAVELENGTH",index) * GeoModelKernelUnits::mm; return value ; } } @@ -1822,7 +1820,7 @@ double OraclePixGeoManager::IBLStaveLength() // IBL stave length not eqal to other stave length } - return 748.0 * CLHEP::mm; + return 748.0 * GeoModelKernelUnits::mm; } double OraclePixGeoManager:: IBLStaveMechanicalStaveOffset(bool isModule3D) @@ -1830,11 +1828,11 @@ double OraclePixGeoManager:: IBLStaveMechanicalStaveOffset(bool isModule3D) // int index = PixelStaveIndex(m_currentLD); int index=0; if (!isModule3D&&db()->testField(m_PixelIBLStave,"MODULELATERALOFFSET",index)) { - double value = db()->getDouble(m_PixelIBLStave,"MODULELATERALOFFSET",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"MODULELATERALOFFSET",index) * GeoModelKernelUnits::mm; return value ; } if (isModule3D&&db()->testField(m_PixelIBLStave,"MODULELATERALOFFSET3D",index)) { - double value = db()->getDouble(m_PixelIBLStave,"MODULELATERALOFFSET3D",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"MODULELATERALOFFSET3D",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1845,7 +1843,7 @@ double OraclePixGeoManager:: IBLStaveMechanicalStaveModuleOffset() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"STAVETOMODULEGAP",index)) { - double value = db()->getDouble(m_PixelIBLStave,"STAVETOMODULEGAP",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"STAVETOMODULEGAP",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1856,7 +1854,7 @@ double OraclePixGeoManager:: IBLStaveTubeOuterDiameter() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"TUBEOUTERDIAM",index)) { - double value = db()->getDouble(m_PixelIBLStave,"TUBEOUTERDIAM",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"TUBEOUTERDIAM",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -1867,7 +1865,7 @@ double OraclePixGeoManager:: IBLStaveTubeInnerDiameter() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"TUBEINNERDIAM",index)) { - double value = db()->getDouble(m_PixelIBLStave,"TUBEINNERDIAM",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"TUBEINNERDIAM",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -1878,7 +1876,7 @@ double OraclePixGeoManager:: IBLStaveTubeMiddlePos() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"TUBEMIDDLEPOS",index)) { - double value = db()->getDouble(m_PixelIBLStave,"TUBEMIDDLEPOS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"TUBEMIDDLEPOS",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1889,7 +1887,7 @@ double OraclePixGeoManager:: IBLStaveFlexLayerThickness() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"FLEXLAYERTHICK",index)) { - double value = db()->getDouble(m_PixelIBLStave,"FLEXLAYERTHICK",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"FLEXLAYERTHICK",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -1900,7 +1898,7 @@ double OraclePixGeoManager:: IBLStaveFlexBaseThickness() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"FLEXBASETHICK",index)) { - double value = db()->getDouble(m_PixelIBLStave,"FLEXBASETHICK",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"FLEXBASETHICK",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -1911,7 +1909,7 @@ double OraclePixGeoManager:: IBLStaveFlexWidth() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"FLEXWIDTH",index)) { - double value = db()->getDouble(m_PixelIBLStave,"FLEXWIDTH",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"FLEXWIDTH",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -1922,7 +1920,7 @@ double OraclePixGeoManager:: IBLStaveFlexOffset() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"FLEXOFFSET",index)) { - double value = db()->getDouble(m_PixelIBLStave,"FLEXOFFSET",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"FLEXOFFSET",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1934,7 +1932,7 @@ double OraclePixGeoManager::IBLStaveOmegaThickness() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"OMEGATHICK",index)) { - double value = db()->getDouble(m_PixelIBLStave,"OMEGATHICK",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"OMEGATHICK",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1945,7 +1943,7 @@ double OraclePixGeoManager::IBLStaveOmegaEndCenterX() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"OMEGAENDCENTERX",index)) { - double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDCENTERX",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDCENTERX",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1955,7 +1953,7 @@ double OraclePixGeoManager::IBLStaveOmegaEndCenterY() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"OMEGAENDCENTERY",index)) { - double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDCENTERY",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDCENTERY",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1965,7 +1963,7 @@ double OraclePixGeoManager::IBLStaveOmegaEndRadius() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"OMEGAENDRADIUS",index)) { - double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDRADIUS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDRADIUS",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1975,7 +1973,7 @@ double OraclePixGeoManager::IBLStaveOmegaEndAngle() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"OMEGAENDANGLE",index)) { - double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDANGLE",index) * CLHEP::deg; + double value = db()->getDouble(m_PixelIBLStave,"OMEGAENDANGLE",index) * GeoModelKernelUnits::deg; return value ; } return 0.0; @@ -1986,7 +1984,7 @@ double OraclePixGeoManager::IBLStaveOmegaMidCenterX() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"OMEGAMIDCENTERX",index)) { - double value = db()->getDouble(m_PixelIBLStave,"OMEGAMIDCENTERX",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"OMEGAMIDCENTERX",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -1997,7 +1995,7 @@ double OraclePixGeoManager::IBLStaveOmegaMidRadius() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"OMEGAMIDRADIUS",index)) { - double value = db()->getDouble(m_PixelIBLStave,"OMEGAMIDRADIUS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"OMEGAMIDRADIUS",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2007,7 +2005,7 @@ double OraclePixGeoManager::IBLStaveOmegaMidAngle() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"OMEGAOPENINGANGLE",index)) { - double value = db()->getDouble(m_PixelIBLStave,"OMEGAOPENINGANGLE",index) * CLHEP::deg; + double value = db()->getDouble(m_PixelIBLStave,"OMEGAOPENINGANGLE",index) * GeoModelKernelUnits::deg; return value ; } return 0.0; @@ -2035,7 +2033,7 @@ double OraclePixGeoManager::IBLStaveModuleGap() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"MODULEGAP",index)) { - double value = db()->getDouble(m_PixelIBLStave,"MODULEGAP",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLStave,"MODULEGAP",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -2046,7 +2044,7 @@ int OraclePixGeoManager::IBLStaveModuleType() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLStave,"MODULETYPE",index)) { - int value = db()->getInt(m_PixelIBLStave,"MODULETYPE",index) * CLHEP::mm; + int value = db()->getInt(m_PixelIBLStave,"MODULETYPE",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0; @@ -2058,7 +2056,7 @@ double OraclePixGeoManager::IBLStaveFacePlateGreaseThickness() try{ int index=0; if (db()->testField(m_PixelIBLGlueGrease,"FACEPLATEGREASETHICK",index)) { - double value = db()->getDouble(m_PixelIBLGlueGrease,"FACEPLATEGREASETHICK",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLGlueGrease,"FACEPLATEGREASETHICK",index) * GeoModelKernelUnits::mm; return value ; } return 0.; @@ -2073,7 +2071,7 @@ double OraclePixGeoManager::IBLStaveFacePlateGlueThickness() try{ int index=0; if (db()->testField(m_PixelIBLGlueGrease,"FACEPLATEGLUETHICK",index)) { - double value = db()->getDouble(m_PixelIBLGlueGrease,"FACEPLATEGLUETHICK",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLGlueGrease,"FACEPLATEGLUETHICK",index) * GeoModelKernelUnits::mm; return value ; } return 0.; @@ -2088,7 +2086,7 @@ double OraclePixGeoManager::IBLStaveTubeGlueThickness() try{ int index=0; if (db()->testField(m_PixelIBLGlueGrease,"TUBEGLUETHICK",index)) { - double value = db()->getDouble(m_PixelIBLGlueGrease,"TUBEGLUETHICK",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLGlueGrease,"TUBEGLUETHICK",index) * GeoModelKernelUnits::mm; return value ; } return 0.; @@ -2103,7 +2101,7 @@ double OraclePixGeoManager::IBLStaveOmegaGlueThickness() try{ int index=0; if (db()->testField(m_PixelIBLGlueGrease,"OMEGAGLUETHICK",index)) { - double value = db()->getDouble(m_PixelIBLGlueGrease,"OMEGAGLUETHICK",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLGlueGrease,"OMEGAGLUETHICK",index) * GeoModelKernelUnits::mm; return value ; } return 0.; @@ -2118,7 +2116,7 @@ double OraclePixGeoManager:: IBLSupportRingWidth() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLSupport,"STAVERINGWIDTH",index)) { - double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGWIDTH",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGWIDTH",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -2129,7 +2127,7 @@ double OraclePixGeoManager:: IBLSupportRingInnerRadius() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLSupport,"STAVERINGINNERRADIUS",index)) { - double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGINNERRADIUS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGINNERRADIUS",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -2140,7 +2138,7 @@ double OraclePixGeoManager:: IBLSupportRingOuterRadius() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLSupport,"STAVERINGOUTERRADIUS",index)) { - double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGOUTERRADIUS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGOUTERRADIUS",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -2152,7 +2150,7 @@ double OraclePixGeoManager:: IBLSupportMechanicalStaveRingFixPoint() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLSupport,"STAVERINGFIXINGPOS",index)) { - double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGFIXINGPOS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLSupport,"STAVERINGFIXINGPOS",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -2163,7 +2161,7 @@ double OraclePixGeoManager:: IBLSupportMidRingWidth() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGWIDTH",index)) { - double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGWIDTH",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGWIDTH",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -2174,7 +2172,7 @@ double OraclePixGeoManager:: IBLSupportMidRingInnerRadius() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGINNERRADIUS",index)) { - double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGINNERRADIUS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGINNERRADIUS",index) * GeoModelKernelUnits::mm; if (value > 0) return value; } return 0.0; @@ -2185,7 +2183,7 @@ double OraclePixGeoManager:: IBLSupportMidRingOuterRadius() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLSupport,"STAVEMIDRINGOUTERRADIUS",index)) { - double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGOUTERRADIUS",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLSupport,"STAVEMIDRINGOUTERRADIUS",index) * GeoModelKernelUnits::mm; if (value > 0) return value ; } return 0.0; @@ -2196,7 +2194,7 @@ double OraclePixGeoManager::IBLFlexMiddleGap() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,"FLEXMIDGAP",index)) { - double value = db()->getDouble(m_PixelIBLFlex,"FLEXMIDGAP",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,"FLEXMIDGAP",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2216,7 +2214,7 @@ double OraclePixGeoManager::IBLFlexDoglegLength() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGLENGTH",index)) { - double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGLENGTH",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGLENGTH",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2228,7 +2226,7 @@ double OraclePixGeoManager::IBLStaveFlexWingWidth() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,"FLEXWINGWIDTH",index)) { - double value = db()->getDouble(m_PixelIBLFlex,"FLEXWINGWIDTH",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,"FLEXWINGWIDTH",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2239,7 +2237,7 @@ double OraclePixGeoManager::IBLStaveFlexWingThick() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,"FLEXWINGTHICK",index)) { - double value = db()->getDouble(m_PixelIBLFlex,"FLEXWINGTHICK",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,"FLEXWINGTHICK",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2250,7 +2248,7 @@ double OraclePixGeoManager::IBLFlexDoglegRatio() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGRATIO",index)) { - double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGRATIO",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGRATIO",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2264,7 +2262,7 @@ double OraclePixGeoManager::IBLFlexDoglegHeight(int iHeight) // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,lname.str(),index)) { - double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2275,7 +2273,7 @@ double OraclePixGeoManager::IBLFlexDoglegDY() // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,"FLEXDOGLEGDY",index)) { - double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGDY",index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,"FLEXDOGLEGDY",index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2289,7 +2287,7 @@ double OraclePixGeoManager::IBLFlexPP0Z(int iPos) // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,lname.str(),index)) { - double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2304,7 +2302,7 @@ double OraclePixGeoManager::IBLFlexPP0Rmin(int iPos) // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,lname.str(),index)) { - double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2318,7 +2316,7 @@ double OraclePixGeoManager::IBLFlexPP0Rmax(int iPos) // int index = PixelStaveIndex(m_currentLD); int index=0; if (db()->testField(m_PixelIBLFlex,lname.str(),index)) { - double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * CLHEP::mm; + double value = db()->getDouble(m_PixelIBLFlex,lname.str(),index) * GeoModelKernelUnits::mm; return value ; } return 0.0; @@ -2369,10 +2367,10 @@ double OraclePixGeoManager:: IBLServiceGetMinRadialPosition(const std::string& s double zmin, zmax, r; int symm; if(srvType=="simple"){ - zmin=db()->getDouble(m_PixelSimpleService,"ZMIN",ii)*CLHEP::mm; - zmax=db()->getDouble(m_PixelSimpleService,"ZMAX",ii)*CLHEP::mm; + zmin=db()->getDouble(m_PixelSimpleService,"ZMIN",ii)*GeoModelKernelUnits::mm; + zmax=db()->getDouble(m_PixelSimpleService,"ZMAX",ii)*GeoModelKernelUnits::mm; symm=db()->getInt(m_PixelSimpleService,"ZSYMM",ii); - r=db()->getDouble(m_PixelSimpleService,"RMAX",ii)*CLHEP::mm; + r=db()->getDouble(m_PixelSimpleService,"RMAX",ii)*GeoModelKernelUnits::mm; } else { zmin=PixelServiceZMin(srvType, ii); @@ -2419,10 +2417,10 @@ double OraclePixGeoManager:: IBLServiceGetMaxRadialPosition(const std::string& s double zmin, zmax, r; int symm; if(srvType=="simple"){ - zmin=db()->getDouble(m_PixelSimpleService,"ZMIN",ii)*CLHEP::mm; - zmax=db()->getDouble(m_PixelSimpleService,"ZMAX",ii)*CLHEP::mm; + zmin=db()->getDouble(m_PixelSimpleService,"ZMIN",ii)*GeoModelKernelUnits::mm; + zmax=db()->getDouble(m_PixelSimpleService,"ZMAX",ii)*GeoModelKernelUnits::mm; symm=db()->getInt(m_PixelSimpleService,"ZSYMM",ii); - r=db()->getDouble(m_PixelSimpleService,"RMAX",ii)*CLHEP::mm; + r=db()->getDouble(m_PixelSimpleService,"RMAX",ii)*GeoModelKernelUnits::mm; } else { zmin=PixelServiceZMin(srvType, ii); @@ -2462,10 +2460,10 @@ double OraclePixGeoManager::PhiOfModuleZero() { // For backward compatibilty first module is at 1/2 a module division if (!db()->testField(m_PixelLayer,"PHIOFMODULEZERO",m_currentLD)){ - if(NPixelSectors()>0) return 180.0*CLHEP::degree/NPixelSectors(); + if(NPixelSectors()>0) return 180.0*GeoModelKernelUnits::degree/NPixelSectors(); return 0.; } else { - return db()->getDouble(m_PixelLayer,"PHIOFMODULEZERO",m_currentLD) * CLHEP::degree; + return db()->getDouble(m_PixelLayer,"PHIOFMODULEZERO",m_currentLD) * GeoModelKernelUnits::degree; } } @@ -2483,7 +2481,7 @@ int OraclePixGeoManager::PixelNModule() double OraclePixGeoManager::PixelModuleAngle() { int staveIndex = PixelStaveIndex(m_currentLD); - return db()->getDouble(m_PixelStave,"MODULETILT",staveIndex)*CLHEP::deg; + return db()->getDouble(m_PixelStave,"MODULETILT",staveIndex)*GeoModelKernelUnits::deg; } double OraclePixGeoManager::PixelModuleDrDistance() @@ -2526,7 +2524,7 @@ double OraclePixGeoManager::PixelModuleZPositionTabulated(int etaModule, int typ msg(MSG::ERROR) << "Z position not found for etaModule,type = " << etaModule << ", " << type << endmsg; return 0; } - return db()->getDouble(m_PixelStaveZ,"ZPOS",index) * CLHEP::mm; + return db()->getDouble(m_PixelStaveZ,"ZPOS",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelModuleShiftFlag(int etaModule) @@ -2539,7 +2537,7 @@ double OraclePixGeoManager::PixelModuleStaggerDistance() { int staveIndex = PixelStaveIndex(m_currentLD); if (!(slhc() || ibl()) || !db()->testField(m_PixelStave,"STAGGERDIST",staveIndex)) return 0; - return db()->getDouble(m_PixelStave,"STAGGERDIST",staveIndex) * CLHEP::mm; + return db()->getDouble(m_PixelStave,"STAGGERDIST",staveIndex) * GeoModelKernelUnits::mm; } int OraclePixGeoManager::PixelModuleStaggerSign(int etaModule) @@ -2692,49 +2690,49 @@ int OraclePixGeoManager::PixelTMTNumParts() double OraclePixGeoManager::PixelTMTWidthX1(int iPart) { if (useLegacy()) return m_legacyManager->PixelTMTWidthX1(iPart); - return db()->getDouble(m_PixelTMT,"WIDTHX1",iPart) * CLHEP::mm; + return db()->getDouble(m_PixelTMT,"WIDTHX1",iPart) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelTMTWidthX2(int iPart) { if (useLegacy()) return m_legacyManager->PixelTMTWidthX2(iPart); - return db()->getDouble(m_PixelTMT,"WIDTHX2",iPart) * CLHEP::mm; + return db()->getDouble(m_PixelTMT,"WIDTHX2",iPart) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelTMTWidthY(int iPart) { if (useLegacy()) return m_legacyManager->PixelTMTWidthY(iPart); - return db()->getDouble(m_PixelTMT,"WIDTHY",iPart) * CLHEP::mm; + return db()->getDouble(m_PixelTMT,"WIDTHY",iPart) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelTMTBaseX1(int iPart) { if (useLegacy()) return m_legacyManager->PixelTMTBaseX1(iPart); - return db()->getDouble(m_PixelTMT,"BASEX1",iPart) * CLHEP::mm; + return db()->getDouble(m_PixelTMT,"BASEX1",iPart) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelTMTBaseX2(int iPart) { if (useLegacy()) return m_legacyManager->PixelTMTBaseX2(iPart); - return db()->getDouble(m_PixelTMT,"BASEX2",iPart) * CLHEP::mm; + return db()->getDouble(m_PixelTMT,"BASEX2",iPart) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelTMTPosY(int iPart) { if (useLegacy()) return m_legacyManager->PixelTMTPosY(iPart); - return db()->getDouble(m_PixelTMT,"Y",iPart) * CLHEP::mm; + return db()->getDouble(m_PixelTMT,"Y",iPart) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelTMTPosZ1(int iPart) { if (useLegacy()) return m_legacyManager->PixelTMTPosZ1(iPart); - return db()->getDouble(m_PixelTMT,"Z1",iPart) * CLHEP::mm; + return db()->getDouble(m_PixelTMT,"Z1",iPart) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelTMTPosZ2(int iPart) { if (useLegacy()) return m_legacyManager->PixelTMTPosZ2(iPart); - return db()->getDouble(m_PixelTMT,"Z2",iPart) * CLHEP::mm; + return db()->getDouble(m_PixelTMT,"Z2",iPart) * GeoModelKernelUnits::mm; } bool OraclePixGeoManager::PixelTMTPerModule(int iPart) @@ -2749,61 +2747,61 @@ bool OraclePixGeoManager::PixelTMTPerModule(int iPart) double OraclePixGeoManager::PixelOmegaUpperBendX() { if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendX(); - return db()->getDouble(m_PixelOmega,"UPPERBENDX") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"UPPERBENDX") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaUpperBendY() { if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendY(); - return db()->getDouble(m_PixelOmega,"UPPERBENDY") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"UPPERBENDY") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaUpperBendRadius() { if (useLegacy()) return m_legacyManager->PixelOmegaUpperBendRadius(); - return db()->getDouble(m_PixelOmega,"UPPERBENDR") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"UPPERBENDR") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaLowerBendX() { if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendX(); - return db()->getDouble(m_PixelOmega,"LOWERBENDX") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"LOWERBENDX") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaLowerBendY() { if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendY(); - return db()->getDouble(m_PixelOmega,"LOWERBENDY") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"LOWERBENDY") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaLowerBendRadius() { if (useLegacy()) return m_legacyManager->PixelOmegaLowerBendRadius(); - return db()->getDouble(m_PixelOmega,"LOWERBENDR") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"LOWERBENDR") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaWallThickness() { if (useLegacy()) return m_legacyManager->PixelOmegaWallThickness(); - return db()->getDouble(m_PixelOmega,"THICK") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"THICK") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaLength() { if (useLegacy()) return m_legacyManager->PixelOmegaLength(); - return db()->getDouble(m_PixelOmega,"LENGTH") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"LENGTH") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaStartY() { if (useLegacy()) return m_legacyManager->PixelOmegaStartY(); - return db()->getDouble(m_PixelOmega,"STARTY") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"STARTY") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaEndY() { if (useLegacy()) return m_legacyManager->PixelOmegaEndY(); - return db()->getDouble(m_PixelOmega,"ENDY") * CLHEP::mm; + return db()->getDouble(m_PixelOmega,"ENDY") * GeoModelKernelUnits::mm; } // @@ -2813,49 +2811,49 @@ double OraclePixGeoManager::PixelOmegaEndY() double OraclePixGeoManager::PixelAlTubeUpperBendX() { if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendX(); - return db()->getDouble(m_PixelAlTube,"UPPERBENDX") * CLHEP::mm; + return db()->getDouble(m_PixelAlTube,"UPPERBENDX") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelAlTubeUpperBendY() { if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendY(); - return db()->getDouble(m_PixelAlTube,"UPPERBENDY") * CLHEP::mm; + return db()->getDouble(m_PixelAlTube,"UPPERBENDY") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelAlTubeUpperBendRadius() { if (useLegacy()) return m_legacyManager->PixelAlTubeUpperBendRadius(); - return db()->getDouble(m_PixelAlTube,"UPPERBENDR") * CLHEP::mm; + return db()->getDouble(m_PixelAlTube,"UPPERBENDR") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelAlTubeLowerBendX() { if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendX(); - return db()->getDouble(m_PixelAlTube,"LOWERBENDX") * CLHEP::mm; + return db()->getDouble(m_PixelAlTube,"LOWERBENDX") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelAlTubeLowerBendY() { if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendY(); - return db()->getDouble(m_PixelAlTube,"LOWERBENDY") * CLHEP::mm; + return db()->getDouble(m_PixelAlTube,"LOWERBENDY") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelAlTubeLowerBendRadius() { if (useLegacy()) return m_legacyManager->PixelAlTubeLowerBendRadius(); - return db()->getDouble(m_PixelAlTube,"LOWERBENDR") * CLHEP::mm; + return db()->getDouble(m_PixelAlTube,"LOWERBENDR") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelAlTubeWallThickness() { if (useLegacy()) return m_legacyManager->PixelAlTubeWallThickness(); - return db()->getDouble(m_PixelAlTube,"THICK") * CLHEP::mm; + return db()->getDouble(m_PixelAlTube,"THICK") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelAlTubeLength() { if (useLegacy()) return m_legacyManager->PixelAlTubeLength(); - return db()->getDouble(m_PixelAlTube,"LENGTH") * CLHEP::mm; + return db()->getDouble(m_PixelAlTube,"LENGTH") * GeoModelKernelUnits::mm; } // @@ -2871,37 +2869,37 @@ int OraclePixGeoManager::PixelNumOmegaGlueElements() double OraclePixGeoManager::PixelOmegaGlueStartX(int index) { if (useLegacy()) return m_legacyManager->PixelOmegaGlueStartX(index); - return db()->getDouble(m_PixelOmegaGlue,"STARTX",index) * CLHEP::mm; + return db()->getDouble(m_PixelOmegaGlue,"STARTX",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaGlueThickness(int index) { if (useLegacy()) return m_legacyManager->PixelOmegaGlueThickness(index); - return db()->getDouble(m_PixelOmegaGlue,"THICK",index) * CLHEP::mm; + return db()->getDouble(m_PixelOmegaGlue,"THICK",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaGlueStartY(int index) { if (useLegacy()) return m_legacyManager->PixelOmegaGlueStartY(index); - return db()->getDouble(m_PixelOmegaGlue,"STARTY",index) * CLHEP::mm; + return db()->getDouble(m_PixelOmegaGlue,"STARTY",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaGlueEndY(int index) { if (useLegacy()) return m_legacyManager->PixelOmegaGlueEndY(index); - return db()->getDouble(m_PixelOmegaGlue,"ENDY",index) * CLHEP::mm; + return db()->getDouble(m_PixelOmegaGlue,"ENDY",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaGlueLength(int index) { if (useLegacy()) return m_legacyManager->PixelOmegaGlueLength(index); - return db()->getDouble(m_PixelOmegaGlue,"LENGTH",index) * CLHEP::mm; + return db()->getDouble(m_PixelOmegaGlue,"LENGTH",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelOmegaGluePosZ(int index) { if (useLegacy()) return m_legacyManager->PixelOmegaGluePosZ(index); - return db()->getDouble(m_PixelOmegaGlue,"Z",index) * CLHEP::mm; + return db()->getDouble(m_PixelOmegaGlue,"Z",index) * GeoModelKernelUnits::mm; } int OraclePixGeoManager::PixelOmegaGlueTypeNum(int index) @@ -2917,45 +2915,45 @@ int OraclePixGeoManager::PixelOmegaGlueTypeNum(int index) double OraclePixGeoManager::PixelFluidZ1(int index) { if (useLegacy()) return m_legacyManager->PixelFluidZ1(index); - return db()->getDouble(m_PixelFluid,"Z1",index) * CLHEP::mm; + return db()->getDouble(m_PixelFluid,"Z1",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFluidZ2(int index) { if (useLegacy()) return m_legacyManager->PixelFluidZ2(index); - return db()->getDouble(m_PixelFluid,"Z2",index) * CLHEP::mm; + return db()->getDouble(m_PixelFluid,"Z2",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFluidThick1(int index) { if (useLegacy()) return m_legacyManager->PixelFluidThick1(index); - return db()->getDouble(m_PixelFluid,"THICK1",index) * CLHEP::mm; + return db()->getDouble(m_PixelFluid,"THICK1",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFluidThick2(int index) { if (useLegacy()) return m_legacyManager->PixelFluidThick2(index); - return db()->getDouble(m_PixelFluid,"THICK2",index) * CLHEP::mm; + return db()->getDouble(m_PixelFluid,"THICK2",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFluidWidth(int index) { if (useLegacy()) return m_legacyManager->PixelFluidWidth(index); - return db()->getDouble(m_PixelFluid,"WIDTH",index) * CLHEP::mm; + return db()->getDouble(m_PixelFluid,"WIDTH",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFluidX(int index) { if (useLegacy()) return m_legacyManager->PixelFluidX(index); - return db()->getDouble(m_PixelFluid,"X",index) * CLHEP::mm; + return db()->getDouble(m_PixelFluid,"X",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelFluidY(int index) { if (useLegacy()) return m_legacyManager->PixelFluidY(index); - return db()->getDouble(m_PixelFluid,"Y",index) * CLHEP::mm; + return db()->getDouble(m_PixelFluid,"Y",index) * GeoModelKernelUnits::mm; } int OraclePixGeoManager::PixelFluidType(int index) @@ -3001,25 +2999,25 @@ int OraclePixGeoManager::PixelFluidOrient(int layer, int phi) double OraclePixGeoManager::PixelPigtailThickness() { if (useLegacy()) return m_legacyManager->PixelPigtailThickness(); - return db()->getDouble(m_PixelPigtail,"THICK") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"THICK") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelPigtailStartY() { if (useLegacy()) return m_legacyManager->PixelPigtailStartY(); - return db()->getDouble(m_PixelPigtail,"STARTY") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"STARTY") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelPigtailEndY() { if (useLegacy()) return m_legacyManager->PixelPigtailEndY(); - return db()->getDouble(m_PixelPigtail,"ENDY") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"ENDY") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelPigtailWidthZ() { if (useLegacy()) return m_legacyManager->PixelPigtailWidthZ(); - return db()->getDouble(m_PixelPigtail,"WIDTHZ") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"WIDTHZ") * GeoModelKernelUnits::mm; } // Different width from the curved section in old geometry @@ -3032,31 +3030,31 @@ double OraclePixGeoManager::PixelPigtailFlatWidthZ() double OraclePixGeoManager::PixelPigtailPosX() { if (useLegacy()) return m_legacyManager->PixelPigtailPosX(); - return db()->getDouble(m_PixelPigtail,"X") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"X") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelPigtailPosZ() { if (useLegacy()) return m_legacyManager->PixelPigtailPosZ(); - return db()->getDouble(m_PixelPigtail,"Z") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"Z") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelPigtailBendX() { if (useLegacy()) return m_legacyManager->PixelPigtailBendX(); - return db()->getDouble(m_PixelPigtail,"BENDX") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"BENDX") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelPigtailBendY() { if (useLegacy()) return m_legacyManager->PixelPigtailBendY(); - return db()->getDouble(m_PixelPigtail,"BENDY") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"BENDY") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelPigtailBendRMin() { if (useLegacy()) return m_legacyManager->PixelPigtailBendRMin(); - return db()->getDouble(m_PixelPigtail,"BENDRMIN") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"BENDRMIN") * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelPigtailBendRMax() @@ -3068,19 +3066,19 @@ double OraclePixGeoManager::PixelPigtailBendRMax() double OraclePixGeoManager::PixelPigtailBendPhiMin() { if (useLegacy()) return m_legacyManager->PixelPigtailBendPhiMin(); - return db()->getDouble(m_PixelPigtail,"BENDPHIMIN") * CLHEP::deg; + return db()->getDouble(m_PixelPigtail,"BENDPHIMIN") * GeoModelKernelUnits::deg; } double OraclePixGeoManager::PixelPigtailBendPhiMax() { if (useLegacy()) return m_legacyManager->PixelPigtailBendPhiMax(); - return db()->getDouble(m_PixelPigtail,"BENDPHIMAX") * CLHEP::deg; + return db()->getDouble(m_PixelPigtail,"BENDPHIMAX") * GeoModelKernelUnits::deg; } double OraclePixGeoManager::PixelPigtailEnvelopeLength() { if (useLegacy()) return m_legacyManager->PixelPigtailEnvelopeLength(); - return db()->getDouble(m_PixelPigtail,"ENVLENGTH") * CLHEP::mm; + return db()->getDouble(m_PixelPigtail,"ENVLENGTH") * GeoModelKernelUnits::mm; } // @@ -3095,37 +3093,37 @@ int OraclePixGeoManager::PixelNumConnectorElements() double OraclePixGeoManager::PixelConnectorWidthX(int index) { if (useLegacy()) return m_legacyManager->PixelConnectorWidthX(index); - return db()->getDouble(m_PixelConnector,"WIDTHX",index) * CLHEP::mm; + return db()->getDouble(m_PixelConnector,"WIDTHX",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelConnectorWidthY(int index) { if (useLegacy()) return m_legacyManager->PixelConnectorWidthY(index); - return db()->getDouble(m_PixelConnector,"WIDTHY",index) * CLHEP::mm; + return db()->getDouble(m_PixelConnector,"WIDTHY",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelConnectorWidthZ(int index) { if (useLegacy()) return m_legacyManager->PixelConnectorWidthZ(index); - return db()->getDouble(m_PixelConnector,"WIDTHZ",index) * CLHEP::mm; + return db()->getDouble(m_PixelConnector,"WIDTHZ",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelConnectorPosX(int index) { if (useLegacy()) return m_legacyManager->PixelConnectorPosX(index); - return db()->getDouble(m_PixelConnector,"X",index) * CLHEP::mm; + return db()->getDouble(m_PixelConnector,"X",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelConnectorPosY(int index) { if (useLegacy()) return m_legacyManager->PixelConnectorPosY(index); - return db()->getDouble(m_PixelConnector,"Y",index) * CLHEP::mm; + return db()->getDouble(m_PixelConnector,"Y",index) * GeoModelKernelUnits::mm; } double OraclePixGeoManager::PixelConnectorPosZ(int index) { if (useLegacy()) return m_legacyManager->PixelConnectorPosZ(index); - return db()->getDouble(m_PixelConnector,"Z",index) * CLHEP::mm; + return db()->getDouble(m_PixelConnector,"Z",index) * GeoModelKernelUnits::mm; } // @@ -3389,7 +3387,7 @@ double OraclePixGeoManager::DesignPitchRP(bool isModule3D) return m_legacyManager->DesignPitchRP(isInnermostPixelLayer()); } else { int type = designType((ibl()&&isModule3D)); - return db()->getDouble(m_PixelReadout,"PITCHPHI",type) * CLHEP::mm; + return db()->getDouble(m_PixelReadout,"PITCHPHI",type) * GeoModelKernelUnits::mm; } } @@ -3399,7 +3397,7 @@ double OraclePixGeoManager::DesignPitchZ(bool isModule3D) return m_legacyManager->DesignPitchZ(isInnermostPixelLayer()); } else { int type = designType((ibl()&&isModule3D)); - return db()->getDouble(m_PixelReadout,"PITCHETA",type) * CLHEP::mm; + return db()->getDouble(m_PixelReadout,"PITCHETA",type) * GeoModelKernelUnits::mm; } } @@ -3410,7 +3408,7 @@ double OraclePixGeoManager::DesignPitchZLong(bool isModule3D) return m_legacyManager->DesignPitchZLong(isInnermostPixelLayer()); } else { int type = designType((ibl()&&isModule3D)); - double pitch = db()->getDouble(m_PixelReadout,"PITCHETALONG",type) * CLHEP::mm; + double pitch = db()->getDouble(m_PixelReadout,"PITCHETALONG",type) * GeoModelKernelUnits::mm; if (pitch == 0) pitch = DesignPitchZ(isModule3D); return pitch; } @@ -3425,7 +3423,7 @@ double OraclePixGeoManager::DesignPitchZLongEnd(bool isModule3D) int type = designType((ibl()&&isModule3D)); double pitch = 0; if (db()->testField(m_PixelReadout,"PITCHETAEND",type)) { - pitch = db()->getDouble(m_PixelReadout,"PITCHETAEND",type) * CLHEP::mm; + pitch = db()->getDouble(m_PixelReadout,"PITCHETAEND",type) * GeoModelKernelUnits::mm; } if (pitch == 0) pitch = DesignPitchZLong(isModule3D); return pitch; @@ -3520,18 +3518,18 @@ double OraclePixGeoManager::PixelDiskRMin(bool includeSupports) if (!slhc()) { return db()->getDouble(m_PixelDisk,"RIDISK",m_currentLD)*mmcm(); } else { - double result = db()->getDouble(m_PixelDisk,"RMIN",m_currentLD) * CLHEP::mm; + double result = db()->getDouble(m_PixelDisk,"RMIN",m_currentLD) * GeoModelKernelUnits::mm; if(includeSupports) { result = std::min( result, PixelDiskSupportRMin(0) ); } int etaInner = 0; // Inner ring int ringType = getDiskRingType(m_currentLD,etaInner); if (ringType >= 0 && db()->testField(m_PixelRing,"RMIN",ringType) && db()->getDouble(m_PixelRing,"RMIN",ringType)) { - double ringRmin = db()->getDouble(m_PixelRing,"RMIN",ringType) * CLHEP::mm - 0.01*CLHEP::mm; // ring envelope has a 0.01mm safety + double ringRmin = db()->getDouble(m_PixelRing,"RMIN",ringType) * GeoModelKernelUnits::mm - 0.01*GeoModelKernelUnits::mm; // ring envelope has a 0.01mm safety if (ringRmin < result) { msg(MSG::WARNING) << "Ring rmin is less than disk rmin for disk : " << m_currentLD << ". Ring rmin: " << ringRmin << ", Disk rmin: " << result <<endmsg; - result = ringRmin - 0.1*CLHEP::mm; // NB. ring envelope has a 0.01mm saftey added, but we add a little more. + result = ringRmin - 0.1*GeoModelKernelUnits::mm; // NB. ring envelope has a 0.01mm saftey added, but we add a little more. } } return result; @@ -3541,7 +3539,7 @@ double OraclePixGeoManager::PixelDiskRMin(bool includeSupports) // SLHC only double OraclePixGeoManager::PixelDiskRMax(bool includeSupports) { - double result = db()->getDouble(m_PixelDisk,"RMAX",m_currentLD) * CLHEP::mm; + double result = db()->getDouble(m_PixelDisk,"RMAX",m_currentLD) * GeoModelKernelUnits::mm; if(includeSupports) { result = std::max( result, PixelDiskSupportRMax(2) ); } @@ -3553,11 +3551,11 @@ double OraclePixGeoManager::PixelDiskRMax(bool includeSupports) // This is not so nice as PixelRingRMax can potentially call PixelDiskRMax, however it // only calls PixelDiskRMax if the above condition is not satisified. So hopefully OK. // TODO: Code could do with some improvement to make it less fragile. - double ringRmax = PixelRingRMax(0.01*CLHEP::mm); // ring envelope has a 0.01mm safety + double ringRmax = PixelRingRMax(0.01*GeoModelKernelUnits::mm); // ring envelope has a 0.01mm safety if (ringRmax > result) { msg(MSG::WARNING) << "Ring rmax is greater than disk rmax for disk : " << m_currentLD << ". Ring rmax: " << ringRmax << ", Disk rmax: " << result <<endmsg; - result = ringRmax + 0.1*CLHEP::mm; // NB. ring envelope has a 0.01mm saftey added, but we add a little more. + result = ringRmax + 0.1*GeoModelKernelUnits::mm; // NB. ring envelope has a 0.01mm saftey added, but we add a little more. } } // restore state @@ -3593,7 +3591,7 @@ double OraclePixGeoManager::PixelRingRcenter() { // If ring rmin is present and non-zero use that. int ringType = getDiskRingType(m_currentLD,m_eta); if (ringType >=0 && db()->testField(m_PixelRing,"RMIN",ringType) && db()->getDouble(m_PixelRing,"RMIN",ringType)) { - return db()->getDouble(m_PixelRing,"RMIN",ringType) * CLHEP::mm + PixelModuleLength()/2; + return db()->getDouble(m_PixelRing,"RMIN",ringType) * GeoModelKernelUnits::mm + PixelModuleLength()/2; } else { // Otherwise calculate from disk rmin/rmax int nrings = PixelDiskNRings(); @@ -3616,7 +3614,7 @@ double OraclePixGeoManager::PixelRingRMin(double safety) { // If ring rmin is present and non-zero use that. int ringType = getDiskRingType(m_currentLD,m_eta); if (ringType >= 0 && db()->testField(m_PixelRing,"RMIN",ringType) && db()->getDouble(m_PixelRing,"RMIN",ringType)) { - return db()->getDouble(m_PixelRing,"RMIN",ringType) * CLHEP::mm - std::abs(safety); + return db()->getDouble(m_PixelRing,"RMIN",ringType) * GeoModelKernelUnits::mm - std::abs(safety); } else { // Otherwise calculated it from disk rmin if(m_eta==0) return PixelDiskRMin() - std::abs(safety); @@ -3662,7 +3660,7 @@ double OraclePixGeoManager::PixelRingZpos() { double OraclePixGeoManager::PixelRingZoffset() { int index = getDiskRingIndex(m_currentLD,m_eta); - return std::abs(db()->getDouble(m_PixelDiskRing,"ZOFFSET",index))*CLHEP::mm; + return std::abs(db()->getDouble(m_PixelDiskRing,"ZOFFSET",index))*GeoModelKernelUnits::mm; } // SLHC only @@ -3676,13 +3674,13 @@ int OraclePixGeoManager::PixelRingSide() double OraclePixGeoManager::PixelRingStagger() { int ringType = getDiskRingType(m_currentLD,m_eta); - return db()->getDouble(m_PixelRing,"STAGGER",ringType)*CLHEP::mm; + return db()->getDouble(m_PixelRing,"STAGGER",ringType)*GeoModelKernelUnits::mm; } // SLHC only //int OraclePixGeoManager::PixelRingNmodules() { -// return db()->getInt("PixelRing","NMODULES",ringIndex)*CLHEP::mm(); +// return db()->getInt("PixelRing","NMODULES",ringIndex)*GeoModelKernelUnits::mm(); //} @@ -3772,7 +3770,7 @@ double OraclePixGeoManager::PixelModuleThicknessN() { // is the max of ThicknessP and thickness from the module center to // the outer surface of the hybrid plus some safety. // - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; double thickn = 0.5 * PixelBoardThickness() + PixelHybridThickness() + safety; double thick = std::max(thickn, PixelModuleThicknessP()); @@ -3787,7 +3785,7 @@ double OraclePixGeoManager::PixelModuleThicknessP() { // is thickness from the module center to the outer surface of the // chips plus some safety. - double safety = 0.01*CLHEP::mm; + double safety = 0.01*GeoModelKernelUnits::mm; double thick = 0.5 * PixelBoardThickness() + PixelChipThickness() + PixelChipGap() + safety; @@ -3831,39 +3829,39 @@ double OraclePixGeoManager::PixelModuleLength() { // return angle of the telescope double OraclePixGeoManager::DBMAngle() { - return db()->getDouble(m_DBMTelescope,"ANGLE")*CLHEP::deg; + return db()->getDouble(m_DBMTelescope,"ANGLE")*GeoModelKernelUnits::deg; } // return dimension of the DBM telescope double OraclePixGeoManager::DBMTelescopeX() { - return db()->getDouble(m_DBMTelescope,"WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMTelescope,"WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMTelescopeY() { - return db()->getDouble(m_DBMTelescope,"HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMTelescope,"HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMTelescopeZ() { - return db()->getDouble(m_DBMTelescope,"LENGTH")*CLHEP::mm; + return db()->getDouble(m_DBMTelescope,"LENGTH")*GeoModelKernelUnits::mm; } // return height and length of the module cage having a 3-layers structure double OraclePixGeoManager::DBMModuleCageY() { - return db()->getDouble(m_DBMTelescope,"CAGE_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMTelescope,"CAGE_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMModuleCageZ() { - return db()->getDouble(m_DBMTelescope,"CAGE_LENGTH")*CLHEP::mm; + return db()->getDouble(m_DBMTelescope,"CAGE_LENGTH")*GeoModelKernelUnits::mm; } // return layer spacing double OraclePixGeoManager::DBMSpacingZ() { - return db()->getDouble(m_DBMCage,"ZSPACING")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"ZSPACING")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMSpacingRadial() { if (m_currentLD == 0) - return db()->getDouble(m_DBMCage,"RADIAL_SPACE_0")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"RADIAL_SPACE_0")*GeoModelKernelUnits::mm; else if (m_currentLD == 1) - return db()->getDouble(m_DBMCage,"RADIAL_SPACE_1")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"RADIAL_SPACE_1")*GeoModelKernelUnits::mm; else if (m_currentLD == 2) - return db()->getDouble(m_DBMCage,"RADIAL_SPACE_2")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"RADIAL_SPACE_2")*GeoModelKernelUnits::mm; else { msg(MSG::WARNING) << "DBMSpacingRadial() is not found" << endmsg; return 0.; @@ -3871,174 +3869,174 @@ double OraclePixGeoManager::DBMSpacingRadial() { } // return dimension of bracket unit double OraclePixGeoManager::DBMBracketX() { - return db()->getDouble(m_DBMBracket,"WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBracketY() { - return db()->getDouble(m_DBMBracket,"HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBracketZ() { - return db()->getDouble(m_DBMBracket,"THICKNESS")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"THICKNESS")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMTrapezBackTheta() { - return db()->getDouble(m_DBMBracket,"TRAPEZBACK_THETA")*CLHEP::deg; + return db()->getDouble(m_DBMBracket,"TRAPEZBACK_THETA")*GeoModelKernelUnits::deg; } double OraclePixGeoManager::DBMTrapezBackX() { - return db()->getDouble(m_DBMBracket,"TRAPEZBACK_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"TRAPEZBACK_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMTrapezBackY() { - return db()->getDouble(m_DBMBracket,"TRAPEZBACK_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"TRAPEZBACK_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMTrapezBackShortZ() { - return db()->getDouble(m_DBMBracket,"TRAPEZBACK_ZSHORT")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"TRAPEZBACK_ZSHORT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktWindowX() { - return db()->getDouble(m_DBMBracket,"WINDOW_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"WINDOW_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktWindowY() { - return db()->getDouble(m_DBMBracket,"WINDOW_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"WINDOW_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktWindowOffset() { - return db()->getDouble(m_DBMBracket,"WINDOW_OFFSET")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"WINDOW_OFFSET")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktWindowCenterZ() { - return db()->getDouble(m_DBMBracket,"WINDOW_CENTERZ")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"WINDOW_CENTERZ")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktTopBlockZ() { - return db()->getDouble(m_DBMBracket,"TOPBLOCK_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"TOPBLOCK_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktSideBlockX() { - return db()->getDouble(m_DBMBracket,"SIDEBLOCK_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"SIDEBLOCK_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktSideBlockY() { - return db()->getDouble(m_DBMBracket,"SIDEBLOCK_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"SIDEBLOCK_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktLockZ() { - return db()->getDouble(m_DBMBracket,"LOCK_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"LOCK_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktLockY() { - return db()->getDouble(m_DBMBracket,"LOCK_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"LOCK_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktFinLongZ() { - return db()->getDouble(m_DBMBracket,"COOLINGFIN_ZLONG")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"COOLINGFIN_ZLONG")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktFinHeight() { - return db()->getDouble(m_DBMBracket,"COOLINGFIN_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"COOLINGFIN_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktFinThick() { - return db()->getDouble(m_DBMBracket,"COOLINGFIN_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"COOLINGFIN_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMBrcktFinPos() { - return db()->getDouble(m_DBMBracket,"COOLINGFIN_POS")*CLHEP::mm; + return db()->getDouble(m_DBMBracket,"COOLINGFIN_POS")*GeoModelKernelUnits::mm; } // return spacing between V-slide and first layer double OraclePixGeoManager::DBMSpace() { - return db()->getDouble(m_DBMCage,"SPACING1")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"SPACING1")*GeoModelKernelUnits::mm; } // return dimensions of the main plate double OraclePixGeoManager::DBMMainPlateX() { - return db()->getDouble(m_DBMCage,"MAINPLATE_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"MAINPLATE_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMMainPlateY() { - return db()->getDouble(m_DBMCage,"MAINPLATE_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"MAINPLATE_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMMainPlateZ() { - return db()->getDouble(m_DBMCage,"MAINPLATE_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"MAINPLATE_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMMPlateWindowWidth() { - return db()->getDouble(m_DBMCage,"MPWINDOW_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"MPWINDOW_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMMPlateWindowHeight() { - return db()->getDouble(m_DBMCage,"MPWINDOW_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"MPWINDOW_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMMPlateWindowPos() { - return db()->getDouble(m_DBMCage,"MPWINDOW_POS")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"MPWINDOW_POS")*GeoModelKernelUnits::mm; } // return dimensions of aluminium side plates double OraclePixGeoManager::DBMCoolingSidePlateX() { - return db()->getDouble(m_DBMCage,"SIDEPLATE_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"SIDEPLATE_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMCoolingSidePlateY() { - return db()->getDouble(m_DBMCage,"SIDEPLATE_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"SIDEPLATE_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMCoolingSidePlateZ() { - return db()->getDouble(m_DBMCage,"SIDEPLATE_LENGTH")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"SIDEPLATE_LENGTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMCoolingSidePlatePos() { - return db()->getDouble(m_DBMCage,"SIDEPLATE_POS")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"SIDEPLATE_POS")*GeoModelKernelUnits::mm; } // return dimension of sensor, chip and ceramic double OraclePixGeoManager::DBMDiamondX() { - return db()->getDouble(m_DBMModule,"DIAMOND_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"DIAMOND_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMDiamondY() { - return db()->getDouble(m_DBMModule,"DIAMOND_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"DIAMOND_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMDiamondZ() { - return db()->getDouble(m_DBMModule,"DIAMOND_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"DIAMOND_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMFEI4X() { - return db()->getDouble(m_DBMModule,"FEI4_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"FEI4_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMFEI4Y() { - return db()->getDouble(m_DBMModule,"FEI4_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"FEI4_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMFEI4Z() { - return db()->getDouble(m_DBMModule,"FEI4_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"FEI4_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMCeramicX() { - return db()->getDouble(m_DBMModule,"CERAMIC_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"CERAMIC_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMCeramicY() { - return db()->getDouble(m_DBMModule,"CERAMIC_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"CERAMIC_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMCeramicZ() { - return db()->getDouble(m_DBMModule,"CERAMIC_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"CERAMIC_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMAirGap() { - return db()->getDouble(m_DBMModule,"AIR_GAP")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"AIR_GAP")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMKaptonZ() { - return db()->getDouble(m_DBMModule,"KAPTONZ")*CLHEP::mm; + return db()->getDouble(m_DBMModule,"KAPTONZ")*GeoModelKernelUnits::mm; } // flex support double OraclePixGeoManager::DBMFlexSupportX() { - return db()->getDouble(m_DBMCage,"FLEXSUPP_WIDTH")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"FLEXSUPP_WIDTH")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMFlexSupportY() { - return db()->getDouble(m_DBMCage,"FLEXSUPP_HEIGHT")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"FLEXSUPP_HEIGHT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMFlexSupportZ() { - return db()->getDouble(m_DBMCage,"FLEXSUPP_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"FLEXSUPP_THICK")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMFlexSupportOffset() { - return db()->getDouble(m_DBMCage, "FLEXSUPP_OFFSET")*CLHEP::mm; + return db()->getDouble(m_DBMCage, "FLEXSUPP_OFFSET")*GeoModelKernelUnits::mm; } // return radius of supporting rod double OraclePixGeoManager::DBMRodRadius() { - return db()->getDouble(m_DBMCage,"ROD_RADIUS")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"ROD_RADIUS")*GeoModelKernelUnits::mm; } // return distance between center of rods double OraclePixGeoManager::DBMMPlateRod2RodY() { - return db()->getDouble(m_DBMCage,"ROD2ROD_VERT")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"ROD2ROD_VERT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMMPlateRod2RodX() { - return db()->getDouble(m_DBMCage,"ROD2ROD_HOR")*CLHEP::mm; + return db()->getDouble(m_DBMCage,"ROD2ROD_HOR")*GeoModelKernelUnits::mm; } // radius and thickness of PP0 board double OraclePixGeoManager::DBMPP0RIn() { - return db()->getDouble(m_DBMTelescope,"PP0_RIN")*CLHEP::mm; + return db()->getDouble(m_DBMTelescope,"PP0_RIN")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMPP0ROut() { - return db()->getDouble(m_DBMTelescope,"PP0_ROUT")*CLHEP::mm; + return db()->getDouble(m_DBMTelescope,"PP0_ROUT")*GeoModelKernelUnits::mm; } double OraclePixGeoManager::DBMPP0Thick() { - return db()->getDouble(m_DBMTelescope,"PP0_THICK")*CLHEP::mm; + return db()->getDouble(m_DBMTelescope,"PP0_THICK")*GeoModelKernelUnits::mm; } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/OraclePixGeoManager.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.h similarity index 98% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/OraclePixGeoManager.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.h index 4efca302e47..04dbd659378 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/OraclePixGeoManager.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.h @@ -5,8 +5,9 @@ #ifndef OraclePixelGeoManager_H #define OraclePixelGeoManager_H -#include "PixelGeoModel/PixelGeometryManager.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "PixelGeometryManager.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <string> #include <map> #include <vector> @@ -168,7 +169,7 @@ class OraclePixGeoManager : public PixelGeometryManager { // db version int m_dbVersion; - // default length unit set according to db version (CLHEP::mm or CLHEP::cm) + // default length unit set according to db version (GeoModelKernelUnits::mm or GeoModelKernelUnits::cm) double m_defaultLengthUnit; public: @@ -424,7 +425,7 @@ class OraclePixGeoManager : public PixelGeometryManager { double PixelLadderCableOffsetY(); // Stave support (IBL) - HepGeom::Point3D<double> IBLStaveRotationAxis(); + GeoTrf::Vector3D IBLStaveRotationAxis(); double IBLStaveRadius(); double IBLStaveFacePlateThickness(); double IBLStaveMechanicalStaveWidth(); @@ -793,7 +794,7 @@ class OraclePixGeoManager : public PixelGeometryManager { const PixelID * getIdHelper(); // Top Level placements - const HepGeom::Transform3D & partTransform(const std::string & partName) const; + const GeoTrf::Transform3D & partTransform(const std::string & partName) const; bool partPresent(const std::string & partName) const; std::string getMaterialName(const std::string & volumeName, int layerdisk = 0, int typenum = 0); @@ -835,7 +836,7 @@ class OraclePixGeoManager : public PixelGeometryManager { double CalculateThickness(double,std::string); int determineDbVersion(); void addDefaultMaterials(); - // return default length unit (CLHEP::mm or CLHEP::cm) + // return default length unit (GeoModelKernelUnits::mm or GeoModelKernelUnits::cm) double mmcm() {return m_defaultLengthUnit;} }; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx index afd98c69949..a945c0463b0 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx @@ -6,7 +6,7 @@ // This allows one to keep a stable copy of the DC2 version and // allow development of future versions. -#include "PixelGeoModel/PixelDetectorDC1DC2.h" +#include "PixelDetectorDC1DC2.h" #include "InDetReadoutGeometry/InDetDD_Defs.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" @@ -79,7 +79,7 @@ GeoVPhysVol* GeoPixelBarrel::Build( ) { //cout << "Layer" << ii << endl; m_gmt_mgr->SetCurrentLD(ii); if(m_gmt_mgr->isLDPresent()) { - GeoAlignableTransform * xform = new GeoAlignableTransform(HepGeom::Transform3D()); + GeoAlignableTransform * xform = new GeoAlignableTransform(GeoTrf::Transform3D::Identity()); GeoVPhysVol* layerphys = layer.Build(); GeoNameTag *tag = new GeoNameTag(lname[ii]); barrelPhys->add(tag); @@ -102,8 +102,8 @@ GeoVPhysVol* GeoPixelBarrel::Build( ) { for(int ii =0; ii< brlsvc.NCylinders(); ii++) { brlsvc.SetCylinder(ii); GeoNameTag* tag = new GeoNameTag("Outside Barrel Service"); - CLHEP::Hep3Vector pos(0.,0.,brlsvc.ZPos() ); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),pos)); + GeoTrf::Translate3D pos(0.,0.,brlsvc.ZPos() ); + GeoTransform* xform = new GeoTransform(pos); barrelPhys->add(tag); barrelPhys->add(xform); barrelPhys->add(brlsvc.Build() ); @@ -152,19 +152,19 @@ double GeoPixelCable::Length() { double GeoPixelCable::Thickness() { // - // This is calculated from the CLHEP::rad length of the cables and their mass + // This is calculated from the GeoModelKernelUnits::rad length of the cables and their mass // I have to go back on this later when I'll have defined a material // manager, for the time being I get the thickness by atlsim, using dtree // anf hardwire the numbers in the code... // I have to come back on the thickness using the cables recipes // - if(m_moduleNumber == 0) return 2.*0.0028412*CLHEP::cm; - if(m_moduleNumber == 1) return 2.*0.0056795*CLHEP::cm; - if(m_moduleNumber == 2) return 2.*0.0056830*CLHEP::cm; - if(m_moduleNumber == 3) return 2.*0.0056763*CLHEP::cm; - if(m_moduleNumber == 4) return 2.*0.0056752*CLHEP::cm; - if(m_moduleNumber == 5) return 2.*0.0057058*CLHEP::cm; - if(m_moduleNumber == 6) return 2.*0.0056818*CLHEP::cm; + if(m_moduleNumber == 0) return 2.*0.0028412*GeoModelKernelUnits::cm; + if(m_moduleNumber == 1) return 2.*0.0056795*GeoModelKernelUnits::cm; + if(m_moduleNumber == 2) return 2.*0.0056830*GeoModelKernelUnits::cm; + if(m_moduleNumber == 3) return 2.*0.0056763*GeoModelKernelUnits::cm; + if(m_moduleNumber == 4) return 2.*0.0056752*GeoModelKernelUnits::cm; + if(m_moduleNumber == 5) return 2.*0.0057058*GeoModelKernelUnits::cm; + if(m_moduleNumber == 6) return 2.*0.0056818*GeoModelKernelUnits::cm; return 0.; @@ -249,8 +249,8 @@ GeoVPhysVol* GeoPixelDisk::Build( ) { // GeoPixelSubDisk psd(theSensor); double zpos = -m_gmt_mgr->PixelECSiDz1()/2.; - double angle = 360.*CLHEP::deg/ (float) m_gmt_mgr->PixelECNSectors1(); - CLHEP::Hep3Vector pos(0.,0.,zpos); + double angle = 360.*GeoModelKernelUnits::deg/ (float) m_gmt_mgr->PixelECNSectors1(); + GeoTrf::Translation3D pos(0.,0.,zpos); // Set numerology m_gmt_mgr->SetEta(0); @@ -261,10 +261,8 @@ GeoVPhysVol* GeoPixelDisk::Build( ) { m_gmt_mgr->SetEta(0); for (int ii = 0; ii < m_gmt_mgr->PixelECNSectors1(); ii++) { m_gmt_mgr->SetPhi(ii); - CLHEP::HepRotation rm; - rm.rotateX(180.*CLHEP::deg ); - rm.rotateZ(ii*angle+angle/2.); - GeoAlignableTransform* xform = new GeoAlignableTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::Transform3D rm = GeoTrf::RotateZ3D(ii*angle+angle/2.)*GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); + GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::Transform3D(pos*rm)); GeoVPhysVol * modulePhys = psd.Build(); GeoNameTag* tag = new GeoNameTag("DiskSector"); diskPhys->add(tag); @@ -280,12 +278,11 @@ GeoVPhysVol* GeoPixelDisk::Build( ) { // Odd modules m_gmt_mgr->SetEta(1); zpos = m_gmt_mgr->PixelECSiDz2()/2.; - pos = CLHEP::Hep3Vector(0.,0.,zpos); + pos = GeoTrf::Translation3D(0.,0.,zpos); for (int ii = 0; ii < m_gmt_mgr->PixelECNSectors1(); ii++) { m_gmt_mgr->SetPhi(ii); - CLHEP::HepRotation rm; - rm.rotateZ((ii+1)*angle); - GeoAlignableTransform* xform = new GeoAlignableTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::RotateZ3D rm((ii+1)*angle); + GeoAlignableTransform* xform = new GeoAlignableTransform(GeoTrf::Transform3D(pos*rm)); GeoVPhysVol * modulePhys = psd.Build(); GeoNameTag* tag = new GeoNameTag("DiskSector"); diskPhys->add(tag); @@ -303,9 +300,9 @@ GeoVPhysVol* GeoPixelDisk::Build( ) { GeoPixelDiskSupports pds; for(int ii =0; ii< pds.NCylinders(); ii++) { pds.SetCylinder(ii); - CLHEP::Hep3Vector pos(0.,0.,pds.ZPos() ); + GeoTrf::Translate3D pos(0.,0.,pds.ZPos() ); GeoNameTag* tag = new GeoNameTag("DiskSupport"); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),pos)); + GeoTransform* xform = new GeoTransform(pos); diskPhys->add(tag); diskPhys->add(xform); diskPhys->add(pds.Build() ); @@ -331,7 +328,7 @@ double GeoPixelDisk::Thickness() { // 7-1 I switch to the minimum thickness possible as the cables are right // outside this volume. // - // return 10*CLHEP::mm; + // return 10*GeoModelKernelUnits::mm; double tck = 2*(m_gmt_mgr->PixelBoardThickness() +std::max(m_gmt_mgr->PixelHybridThickness(),m_gmt_mgr->PixelChipThickness())); tck += std::max(m_gmt_mgr->PixelECSiDz1(),m_gmt_mgr->PixelECSiDz2()); @@ -480,9 +477,9 @@ GeoVPhysVol* GeoPixelEndCap::Build( ) { //position of the disk double zdisk = m_gmt_mgr->PixelDiskPosition()-ecz; // place the disk - CLHEP::Hep3Vector pos(0.,0.,zdisk); + GeoTrf::Translate3D pos(0.,0.,zdisk); GeoNameTag* tag = new GeoNameTag("Disk"); - GeoAlignableTransform* xform = new GeoAlignableTransform(HepGeom::Transform3D(CLHEP::HepRotation(), pos)); + GeoAlignableTransform* xform = new GeoAlignableTransform(pos); GeoVPhysVol * diskPhys = pd.Build(); ecPhys->add(tag); ecPhys->add(new GeoIdentifierTag(ii)); @@ -498,15 +495,15 @@ GeoVPhysVol* GeoPixelEndCap::Build( ) { // place the cables twice for the two active parts // double dz = pd.Thickness()/2. + m_gmt_mgr->PixelECCablesDistance() ; - pos = CLHEP::Hep3Vector(0.,0.,zdisk+dz); + pos = GeoTrf::Translate3D(0.,0.,zdisk+dz); tag = new GeoNameTag("ECCables"); - GeoTransform * xformCablesPlus = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), pos)); + GeoTransform * xformCablesPlus = new GeoTransform(pos); ecPhys->add(tag); ecPhys->add(xformCablesPlus); ecPhys->add(pecc.Build() ); - pos = CLHEP::Hep3Vector(0.,0.,zdisk-dz); + pos = GeoTrf::Translate3D(0.,0.,zdisk-dz); tag = new GeoNameTag("ECCables"); - GeoTransform * xformCablesMinus = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(), pos)); + GeoTransform * xformCablesMinus = new GeoTransform(pos); ecPhys->add(tag); ecPhys->add(xformCablesMinus); ecPhys->add(pecc.Build() ); @@ -523,8 +520,8 @@ GeoVPhysVol* GeoPixelEndCap::Build( ) { for(int ii =0; ii< ecsvc.NCylinders(); ii++) { ecsvc.SetCylinder(ii); GeoNameTag* tag = new GeoNameTag("Outside Endcap Service"); - CLHEP::Hep3Vector pos(0.,0.,ecsvc.ZPos() ); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),pos)); + GeoTrf::Translate3D pos(0.,0.,ecsvc.ZPos() ); + GeoTransform* xform = new GeoTransform(pos); ecPhys->add(tag); ecPhys->add(xform); ecPhys->add(ecsvc.Build() ); @@ -571,8 +568,8 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { for(int ii =0; ii< brlsvc.NCylinders(); ii++) { brlsvc.SetCylinder(ii); GeoNameTag* tag = new GeoNameTag("Outside Barrel Service"); - CLHEP::Hep3Vector pos(0.,0.,brlsvc.ZPos() ); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),pos)); + GeoTrf::Translate3D pos(0.,0.,brlsvc.ZPos() ); + GeoTransform* xform = new GeoTransform(pos); envelopePhys->add(tag); envelopePhys->add(new GeoIdentifierTag(ii) ); envelopePhys->add(xform); @@ -588,18 +585,16 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { m_gmt_mgr->SetPos(); GeoPixelEndCap pec; double zpos = (m_gmt_mgr->PixelEndcapZMax()+m_gmt_mgr->PixelEndcapZMin())/2.; - CLHEP::Hep3Vector pos(0.,0.,zpos); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),pos)); + GeoTrf::Translate3D pos(0.,0.,zpos); + GeoTransform* xform = new GeoTransform(pos); tag = new GeoNameTag("EndCap 1"); envelopePhys->add(tag); envelopePhys->add(new GeoIdentifierTag(2)); envelopePhys->add(xform); envelopePhys->add(pec.Build() ); m_gmt_mgr->SetNeg(); - pos = CLHEP::Hep3Vector(0.,0.,-zpos); - CLHEP::HepRotation rm; - rm.rotateX(180.*CLHEP::deg); - xform = new GeoTransform(HepGeom::Transform3D(rm,pos)); + GeoTrf::RotateX3D rm(180.*GeoModelKernelUnits::deg); + xform = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translation3D(0.,0.,-zpos)*rm)); tag = new GeoNameTag("EndCap 2"); envelopePhys->add(tag); envelopePhys->add(new GeoIdentifierTag(-2)); @@ -613,8 +608,8 @@ GeoVPhysVol* GeoPixelEnvelope::Build( ) { for(int ii =0; ii< ecsvc.NCylinders(); ii++) { ecsvc.SetCylinder(ii); GeoNameTag* tag = new GeoNameTag("Outside Endcap Service"); - CLHEP::Hep3Vector pos(0.,0.,ecsvc.ZPos() ); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),pos)); + GeoTrf::Translate3D pos(0.,0.,ecsvc.ZPos() ); + GeoTransform* xform = new GeoTransform(pos); envelopePhys->add(tag); envelopePhys->add(xform); envelopePhys->add(new GeoIdentifierTag(ii) ); @@ -733,15 +728,14 @@ GeoVPhysVol* GeoPixelLadder::Build( ) { // Get the z position from the db // float zpos = m_gmt_mgr->PixelModulePosition(jj)*side; - CLHEP::Hep3Vector modulepos(xpos,0.,zpos); + GeoTrf::Translation3D modulepos(xpos,0.,zpos); // // // - CLHEP::HepRotation rm; // // again change sign w.r.t. g4 // - rm.rotateY(m_gmt_mgr->PixelModuleAngle()*m_gmt_mgr->PixelModuleAngleSign(ii) ); + GeoTrf::RotateY3D rm(m_gmt_mgr->PixelModuleAngle()*m_gmt_mgr->PixelModuleAngleSign(ii) ); // // Place the Module // @@ -750,11 +744,11 @@ GeoVPhysVol* GeoPixelLadder::Build( ) { GeoAlignableTransform* xform; // OLD EXAMPLE FOR ALIGNEMENT!! // if(m_gmt_mgr->IsAlign() ) { - // xform = new GeoSiAlTransform(HepGeom::Transform3D(rm,modulepos), pm.getID() ); + // xform = new GeoSiAlTransform(GeoTrf::Transform3D(rm,modulepos), pm.getID() ); // } else { - // xform = new GeoTransform(HepGeom::Transform3D(rm,modulepos)); + // xform = new GeoTransform(GeoTrf::Transform3D(rm,modulepos)); // } - xform = new GeoAlignableTransform(HepGeom::Transform3D(rm,modulepos)); + xform = new GeoAlignableTransform(GeoTrf::Transform3D(modulepos*rm)); ladderPhys->add(tag); ladderPhys->add(new GeoIdentifierTag(m_gmt_mgr->Eta() ) ); ladderPhys->add(xform); @@ -834,7 +828,7 @@ GeoVPhysVol* GeoPixelLayer::Build() { // // This is the maximum possible w/o going out of the mother volume! // - double LayerThickness = 8.499*CLHEP::mm; + double LayerThickness = 8.499*GeoModelKernelUnits::mm; const GeoMaterial* air = m_mat_mgr->getMaterial("std::Air"); // // Layer dimensions from the geometry manager @@ -855,14 +849,14 @@ GeoVPhysVol* GeoPixelLayer::Build() { GeoPixelLadder pl(theSensor); GeoPixelTubeCables ptc; int nsectors = m_gmt_mgr->NPixelSectors(); - double angle=360./nsectors*CLHEP::deg; + double angle=360./nsectors*GeoModelKernelUnits::deg; double layerradius = m_gmt_mgr->PixelLayerRadius(); double xcblpos = layerradius + (pl.Thickness()/2.+ptc.Thickness()/2)/cos(m_gmt_mgr->PixelLadderTilt()); - CLHEP::Hep3Vector posladder(layerradius, 0.,0.); - CLHEP::Hep3Vector postubecables(xcblpos, 0.,0.); - posladder.rotateZ(angle/2.); - postubecables.rotateZ(angle/2.); - + GeoTrf::Vector3D posladder(layerradius, 0.,0.); + posladder = GeoTrf::RotateZ3D(angle/2.)*posladder; + GeoTrf::Vector3D postubecables(xcblpos, 0.,0.); + postubecables = GeoTrf::RotateZ3D(angle/2.)*postubecables; + // Set numerology m_DDmgr->numerology().setNumPhiModulesForLayer(m_gmt_mgr->GetLD(),nsectors); m_DDmgr->numerology().setNumEtaModulesForLayer(m_gmt_mgr->GetLD(),m_gmt_mgr->PixelNModule()); @@ -872,33 +866,32 @@ GeoVPhysVol* GeoPixelLayer::Build() { // for(int ii = 0; ii < nsectors; ii++) { m_gmt_mgr->SetPhi(ii); - CLHEP::HepRotation rm; // // change the sign w.r.t G4 (same sign as G3) // - rm.rotateZ(( +(float) ii+0.5)*angle+m_gmt_mgr->PixelLadderTilt() ); + GeoTrf::RotateZ3D rm(( +(float) ii+0.5)*angle+m_gmt_mgr->PixelLadderTilt() ); // // Place the ladders // GeoNameTag *tag = new GeoNameTag("Ladder"); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,posladder)); + GeoTransform* xform = new GeoTransform(GeoTrf::Translate3D(posladder.x(),posladder.y(),posladder.z())*rm); layerPhys->add(tag); layerPhys->add(new GeoIdentifierTag(ii) ); layerPhys->add(xform); GeoVPhysVol* ladderphys = pl.Build() ; layerPhys->add(ladderphys ); - posladder.rotateZ(angle); + posladder = GeoTrf::RotateZ3D(angle)*posladder; if(m_gmt_mgr->DoServices() ) { // // Place the box w/ the tubes and cables for the layer // tag = new GeoNameTag("TubesAndCables"); - xform = new GeoTransform(HepGeom::Transform3D(rm,postubecables)); + xform = new GeoTransform(GeoTrf::Translate3D(postubecables.x(),postubecables.y(),postubecables.z())*rm); layerPhys->add(tag); layerPhys->add(xform); GeoVPhysVol* TCphys = ptc.Build() ; layerPhys->add(TCphys ); - postubecables.rotateZ(angle); + postubecables = GeoTrf::RotateZ3D(angle)*postubecables; } } return layerPhys; @@ -941,7 +934,7 @@ GeoVPhysVol* GeoPixelModule::Build( ) { GeoVPhysVol *theSi = m_theSensor.Build(); m_id = m_theSensor.getID(); GeoNameTag *tag = new GeoNameTag("Si Crystal"); - GeoTransform *xformsi = new GeoTransform(HepGeom::Transform3D()); + GeoTransform *xformsi = new GeoTransform(GeoTrf::Transform3D::Identity()); modulePhys->add(tag); modulePhys->add(new GeoIdentifierTag(100) ); modulePhys->add(xformsi); @@ -951,8 +944,8 @@ GeoVPhysVol* GeoPixelModule::Build( ) { // GeoPixelHybrid ph; double xpos = -0.5*(m_gmt_mgr->PixelBoardThickness()+m_gmt_mgr->PixelHybridThickness()); - CLHEP::Hep3Vector hybpos(xpos,0.,0.); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D( CLHEP::HepRotation(),hybpos) ); + GeoTrf::Translate3D hybpos(xpos,0.,0.); + GeoTransform* xform = new GeoTransform(hybpos); tag = new GeoNameTag("Hybrid"); modulePhys->add(tag); modulePhys->add(xform); @@ -962,8 +955,8 @@ GeoVPhysVol* GeoPixelModule::Build( ) { // GeoPixelChip pc; xpos = 0.5*(m_gmt_mgr->PixelBoardThickness()+m_gmt_mgr->PixelChipThickness())+m_gmt_mgr->PixelChipGap(); - CLHEP::Hep3Vector chippos(xpos,0.,0.); - xform = new GeoTransform(HepGeom::Transform3D (CLHEP::HepRotation(),chippos) ); + GeoTrf::Translate3D chippos(xpos,0.,0.); + xform = new GeoTransform(chippos); tag = new GeoNameTag("Chip"); modulePhys->add(tag); modulePhys->add(xform); @@ -1350,7 +1343,7 @@ m_theSensor(theSensor) double rmax = RMax(); double halflength = Thickness()/2.; const GeoMaterial* air = m_mat_mgr->getMaterial("std::Air"); - const GeoTubs* SDTubs = new GeoTubs(rmin,rmax,halflength,-180.*CLHEP::deg/m_gmt_mgr->PixelECNSectors1()+0.000005,360.*CLHEP::deg/m_gmt_mgr->PixelECNSectors1()-0.00001); + const GeoTubs* SDTubs = new GeoTubs(rmin,rmax,halflength,-180.*GeoModelKernelUnits::deg/m_gmt_mgr->PixelECNSectors1()+0.000005,360.*GeoModelKernelUnits::deg/m_gmt_mgr->PixelECNSectors1()-0.00001); m_theSubDisk = new GeoLogVol("SubDiskLog",SDTubs,air); m_theSubDisk->ref(); } @@ -1366,11 +1359,9 @@ GeoVPhysVol* GeoPixelSubDisk::Build( ) { // double xpos = RMin()+m_gmt_mgr->PixelBoardLength()/2.; GeoNameTag* tag = new GeoNameTag("SiCrystal"); - CLHEP::HepRotation rm; - rm.rotateY(90.*CLHEP::deg); - rm.rotateX(180.*CLHEP::deg); - CLHEP::Hep3Vector pos(xpos,0.,0.); - GeoAlignableTransform* xformsi = new GeoAlignableTransform(HepGeom::Transform3D(rm,pos) ); + GeoTrf::Transform3D rm = GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90.*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos(xpos,0.,0.); + GeoAlignableTransform* xformsi = new GeoAlignableTransform(GeoTrf::Transform3D(pos*rm)); SDPhys->add(tag); SDPhys->add(new GeoIdentifierTag(200) ); SDPhys->add(xformsi); @@ -1381,8 +1372,8 @@ GeoVPhysVol* GeoPixelSubDisk::Build( ) { GeoPixelHybrid ph; tag = new GeoNameTag("Hybrid"); double zpos = 0.5*(m_gmt_mgr->PixelBoardThickness()+m_gmt_mgr->PixelHybridThickness())+m_epsilon/2.; - pos = CLHEP::Hep3Vector(xpos,0.,zpos); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(rm,pos) ); + pos = GeoTrf::Translation3D(xpos,0.,zpos); + GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(pos*rm) ); SDPhys->add(tag); SDPhys->add(xform); SDPhys->add(ph.Build() ); @@ -1392,8 +1383,8 @@ GeoVPhysVol* GeoPixelSubDisk::Build( ) { GeoPixelChip pc; tag = new GeoNameTag("Chip"); zpos = -0.5*(m_gmt_mgr->PixelBoardThickness()+m_gmt_mgr->PixelChipThickness())-m_gmt_mgr->PixelChipGap(); - pos = CLHEP::Hep3Vector(xpos,0.,zpos); - xform = new GeoTransform(HepGeom::Transform3D(rm,pos) ); + pos = GeoTrf::Translation3D(xpos,0.,zpos); + xform = new GeoTransform(GeoTrf::Transform3D(pos*rm) ); SDPhys->add(tag); SDPhys->add(xform); SDPhys->add(pc.Build() ); @@ -1464,8 +1455,8 @@ GeoVPhysVol* GeoPixelTubeCables::Build( ) { GeoNameTag* tag = new GeoNameTag("LadderStructure"); GeoVPhysVol* ladderstructPhys = pls.Build() ; double xpos = 0.5*(-this->Thickness()+m_gmt_mgr->PixelLadderThickness()); - CLHEP::Hep3Vector pos(xpos,0.,0.); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),pos)); + GeoTrf::Translate3D pos(xpos,0.,0.); + GeoTransform* xform = new GeoTransform(pos); TCPhys->add(tag); TCPhys->add(xform); TCPhys->add(ladderstructPhys); @@ -1492,8 +1483,8 @@ GeoVPhysVol* GeoPixelTubeCables::Build( ) { // in the same way. // xcabshift += pc.Thickness()/2.; - CLHEP::Hep3Vector cablepos(xcabpos,0.,zcabpos); - GeoTransform* xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cablepos)); + GeoTrf::Translate3D cablepos(xcabpos,0.,zcabpos); + GeoTransform* xform = new GeoTransform(cablepos); GeoNameTag *tag = new GeoNameTag("Cable"); // // Left side @@ -1507,8 +1498,8 @@ GeoVPhysVol* GeoPixelTubeCables::Build( ) { // Right side // GeoVPhysVol *cablePhys2 = pc.Build(); - cablepos = CLHEP::Hep3Vector(xcabpos,0.,-zcabpos); - xform = new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotation(),cablepos)); + cablepos = GeoTrf::Translate3D(xcabpos,0.,-zcabpos); + xform = new GeoTransform(cablepos); TCPhys->add(tag); TCPhys->add(xform); // TCPhys->add(new GeoIdentifierTag(ii+100) ); @@ -1772,29 +1763,29 @@ double OraclePixGeoManager::CalculateThickness(double tck,string mat) { ///////////////////////////////////////////////////////// double OraclePixGeoManager::PixelBoardWidth() { - if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("BOARDWIDTH")*CLHEP::cm; - if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("BOARDWIDTH")*CLHEP::cm; + if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("BOARDWIDTH")*GeoModelKernelUnits::cm; + if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("BOARDWIDTH")*GeoModelKernelUnits::cm; return 0.; } double OraclePixGeoManager::PixelBoardLength() { - if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("BOARDLENGTH")*CLHEP::cm; - if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("BOARDLENGTH")*CLHEP::cm; + if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("BOARDLENGTH")*GeoModelKernelUnits::cm; + if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("BOARDLENGTH")*GeoModelKernelUnits::cm; return 0.; } double OraclePixGeoManager::PixelBoardThickness() { if (m_dc1Geometry && isBarrel() && (m_currentLD == 0)) { - return 200*CLHEP::micrometer; + return 200*GeoModelKernelUnits::micrometer; } - if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("BOARDTHICK")*CLHEP::cm; - if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("BOARDTHICK")*CLHEP::cm; + if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("BOARDTHICK")*GeoModelKernelUnits::cm; + if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("BOARDTHICK")*GeoModelKernelUnits::cm; return 0.; } double OraclePixGeoManager::PixelBoardActiveLen() { - if(isEndcap()) return (*m_pxei)[m_currentLD]->getDouble("DRACTIVE")*CLHEP::cm; - if(isBarrel()) return (*m_pxbi)[m_currentLD]->getDouble("DZELEB")*CLHEP::cm; + if(isEndcap()) return (*m_pxei)[m_currentLD]->getDouble("DRACTIVE")*GeoModelKernelUnits::cm; + if(isBarrel()) return (*m_pxbi)[m_currentLD]->getDouble("DZELEB")*GeoModelKernelUnits::cm; return 0.; } ///////////////////////////////////////////////////////// @@ -1804,14 +1795,14 @@ double OraclePixGeoManager::PixelBoardActiveLen() ///////////////////////////////////////////////////////// double OraclePixGeoManager::PixelHybridWidth() { - if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("HYBRIDWIDTH")*CLHEP::cm; - if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("HYBRIDWIDTH")*CLHEP::cm; + if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("HYBRIDWIDTH")*GeoModelKernelUnits::cm; + if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("HYBRIDWIDTH")*GeoModelKernelUnits::cm; return 0.; } double OraclePixGeoManager::PixelHybridLength() { - if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("HYBRIDLENGTH")*CLHEP::cm; - if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("HYBRIDLENGTH")*CLHEP::cm; + if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("HYBRIDLENGTH")*GeoModelKernelUnits::cm; + if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("HYBRIDLENGTH")*GeoModelKernelUnits::cm; return 0.; } double OraclePixGeoManager::PixelHybridThickness() @@ -1829,7 +1820,7 @@ double OraclePixGeoManager::PixelHybridThickness() } // if it is negative is given in % of r.l. if(thick > 0.) { - return thick*CLHEP::cm; + return thick*GeoModelKernelUnits::cm; } return CalculateThickness(thick,mat); @@ -1842,20 +1833,20 @@ double OraclePixGeoManager::PixelHybridThickness() double OraclePixGeoManager::PixelChipWidth() { - if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("CHIPWIDTH")*CLHEP::cm; - if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("CHIPWIDTH")*CLHEP::cm; + if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("CHIPWIDTH")*GeoModelKernelUnits::cm; + if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("CHIPWIDTH")*GeoModelKernelUnits::cm; return 0.; } double OraclePixGeoManager::PixelChipLength() { - if(isBarrel())return (*m_PixelModule)[m_currentLD]->getDouble("CHIPLENGTH")*CLHEP::cm; - if(isEndcap())return (*m_PixelModule)[m_currentLD+3]->getDouble("CHIPLENGTH")*CLHEP::cm; + if(isBarrel())return (*m_PixelModule)[m_currentLD]->getDouble("CHIPLENGTH")*GeoModelKernelUnits::cm; + if(isEndcap())return (*m_PixelModule)[m_currentLD+3]->getDouble("CHIPLENGTH")*GeoModelKernelUnits::cm; return 0.; } double OraclePixGeoManager::PixelChipGap() { - if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("CHIPGAP")*CLHEP::cm; - if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("CHIPGAP")*CLHEP::cm; + if(isBarrel()) return (*m_PixelModule)[m_currentLD]->getDouble("CHIPGAP")*GeoModelKernelUnits::cm; + if(isEndcap()) return (*m_PixelModule)[m_currentLD+3]->getDouble("CHIPGAP")*GeoModelKernelUnits::cm; return 0.; } double OraclePixGeoManager::PixelChipThickness() { @@ -1871,7 +1862,7 @@ double OraclePixGeoManager::PixelChipThickness() { } // if it is negative is given in % of r.l. if(thick > 0.) { - return thick*CLHEP::cm; + return thick*GeoModelKernelUnits::cm; } return CalculateThickness(thick,mat); @@ -1884,20 +1875,20 @@ double OraclePixGeoManager::PixelChipThickness() { ///////////////////////////////////////////////////////// double OraclePixGeoManager::PixelECCarbonRMin(string a) { if(a == "Inner") { - return (*m_PixelDisk)[m_currentLD]->getDouble("SUP1RMIN")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("SUP1RMIN")*GeoModelKernelUnits::cm; } else if (a == "Central") { - return (*m_PixelDisk)[m_currentLD]->getDouble("SUP2RMIN")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("SUP2RMIN")*GeoModelKernelUnits::cm; } - return (*m_PixelDisk)[m_currentLD]->getDouble("SUP3RMIN")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("SUP3RMIN")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelECCarbonRMax(string a) { if(a == "Inner") { - return (*m_PixelDisk)[m_currentLD]->getDouble("SUP1RMAX")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("SUP1RMAX")*GeoModelKernelUnits::cm; } else if (a == "Central") { - return (*m_PixelDisk)[m_currentLD]->getDouble("SUP2RMAX")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("SUP2RMAX")*GeoModelKernelUnits::cm; } else { - return (*m_PixelDisk)[m_currentLD]->getDouble("SUP3RMAX")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("SUP3RMAX")*GeoModelKernelUnits::cm; } } @@ -1916,7 +1907,7 @@ double OraclePixGeoManager::PixelECCarbonThickness(string a) { imat =(*m_PixelDisk)[m_currentLD]->getInt("SUP3MAT")-1; } if(tck>0.) { - return tck*CLHEP::cm; + return tck*GeoModelKernelUnits::cm; } return CalculateThickness(tck,mat[imat]); } @@ -1988,12 +1979,12 @@ double* OraclePixGeoManager::PixelServiceR(string a, int n) { } } // If this is negative this is the thickness of the cyl in % of r.l. - r[0] = rmin*CLHEP::cm; + r[0] = rmin*GeoModelKernelUnits::cm; if(rmax > 0) { - r[1] = rmax*CLHEP::cm; + r[1] = rmax*GeoModelKernelUnits::cm; } else { string material = PixelServiceMaterial(a,n); - r[1] = fabs(rmin*CLHEP::cm)+CalculateThickness(rmax,material); + r[1] = fabs(rmin*GeoModelKernelUnits::cm)+CalculateThickness(rmax,material); } return r; } @@ -2021,15 +2012,15 @@ double* OraclePixGeoManager::PixelServiceZ(string a,int n) { z[1] = (*m_PixelEndcapService)[n+m_endcapInFrames]->getDouble("ZOUT"); } } - z[0] = z[0] *CLHEP::cm; + z[0] = z[0] *GeoModelKernelUnits::cm; if(z[0]*(z[1]) > -0.000000001) { // same sign and z[0] > 0. - z[1] = z[1] *CLHEP::cm; + z[1] = z[1] *GeoModelKernelUnits::cm; } else { string material = PixelServiceMaterial(a,n); z[1] = z[0] * (1 + CalculateThickness(z[1],material)/fabs(z[0])); } if(isEndcap() && a == "Inside" ) { // Translate to the ecnter of EndCap - double center = ((*m_PixelEndcapGeneral)[0]->getDouble("ZMAX")+(*m_PixelEndcapGeneral)[0]->getDouble("ZMIN"))/2.*CLHEP::cm; + double center = ((*m_PixelEndcapGeneral)[0]->getDouble("ZMAX")+(*m_PixelEndcapGeneral)[0]->getDouble("ZMIN"))/2.*GeoModelKernelUnits::cm; z[0] = z[0]-center; z[1] = z[1]-center; } @@ -2157,7 +2148,7 @@ double OraclePixGeoManager::PixelLadderThickness() { double tck = (*m_PixelStave)[0]->getDouble("SUPPORTTHICK"); if( tck > 0.) { - return tck*CLHEP::cm; + return tck*GeoModelKernelUnits::cm; } else { return CalculateThickness(tck,"pix::Ladder"); } @@ -2167,7 +2158,7 @@ double OraclePixGeoManager::PixelECCablesThickness() { double tck = (*m_PixelDisk)[m_currentLD]->getDouble("CABLETHICK"); if( tck > 0.) { - return tck*CLHEP::cm; + return tck*GeoModelKernelUnits::cm; } else { return CalculateThickness(tck,"pix::ECCables"); } @@ -2228,31 +2219,31 @@ double OraclePixGeoManager::Voltage(bool isBLayer){ // override B-layer voltage for DC1 geometry by // value in old DB (approx ratio of thicknesses (200/250 = 0.8) // 97.1*0.8 = 77.68. In Nova its 77.7. - if (isBLayer && m_dc1Geometry) return 77.7*CLHEP::volt; - if(isBLayer) { return (*m_plor)[0]->getDouble("VOLTAGE")*CLHEP::volt;} - return (*m_plor)[1]->getDouble("VOLTAGE")*CLHEP::volt; + if (isBLayer && m_dc1Geometry) return 77.7*GeoModelKernelUnits::volt; + if(isBLayer) { return (*m_plor)[0]->getDouble("VOLTAGE")*GeoModelKernelUnits::volt;} + return (*m_plor)[1]->getDouble("VOLTAGE")*GeoModelKernelUnits::volt; } double OraclePixGeoManager::Temperature(bool isBLayer){ - if(isBLayer) { return (*m_plor)[0]->getDouble("TEMPC")*CLHEP::kelvin+CLHEP::STP_Temperature;} - return (*m_plor)[1]->getDouble("TEMPC")*CLHEP::kelvin+CLHEP::STP_Temperature; + if(isBLayer) { return (*m_plor)[0]->getDouble("TEMPC")*GeoModelKernelUnits::kelvin+GeoModelKernelUnits::STP_Temperature;} + return (*m_plor)[1]->getDouble("TEMPC")*GeoModelKernelUnits::kelvin+GeoModelKernelUnits::STP_Temperature; } -const HepGeom::Vector3D<double> & +const GeoTrf::Vector3D & OraclePixGeoManager::magneticField(bool isBLayer) const { if (m_magFieldFromNova) { if(isBLayer) { - m_magField = HepGeom::Vector3D<double>(0, 0, (*m_plrn)[0]->getDouble("BFIELD") * CLHEP::tesla); + m_magField = GeoTrf::Vector3D(0, 0, (*m_plrn)[0]->getDouble("BFIELD") * GeoModelKernelUnits::tesla); } else { - m_magField = HepGeom::Vector3D<double>(0, 0, (*m_plrn)[1]->getDouble("BFIELD") * CLHEP::tesla); + m_magField = GeoTrf::Vector3D(0, 0, (*m_plrn)[1]->getDouble("BFIELD") * GeoModelKernelUnits::tesla); } } return m_magField; } void -OraclePixGeoManager::setMagneticField(const HepGeom::Vector3D<double> & field) +OraclePixGeoManager::setMagneticField(const GeoTrf::Vector3D & field) { m_magField = field; m_magFieldFromNova = false; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorDC1DC2.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.h similarity index 88% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorDC1DC2.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.h index e2429494671..4a59f725104 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorDC1DC2.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.h @@ -5,8 +5,9 @@ #include "Identifier/Identifier.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Vector3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "RDBAccessSvc/IRDBRecord.h" //IRDBRecord used in code in the header #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBAccessSvc.h" //for IRDBRecordset_ptr typedef @@ -94,7 +95,7 @@ class GeoPixelCable : public GeoVPixelFactory { #ifndef GEOPIXELCHIP_H #define GEOPIXELCHIP_H -//#include "PixelGeoModel/GeoVPixelFactory.h" +//#include "GeoVPixelFactory.h" class GeoPixelChip : public GeoVPixelFactory { public: @@ -565,8 +566,8 @@ class PixelGeometryManager { virtual double Temperature(bool isBLayer)=0; // Magnetic field - virtual const HepGeom::Vector3D<double> & magneticField(bool isBLayer = false) const=0; - virtual void setMagneticField(const HepGeom::Vector3D<double> & field)=0; + virtual const GeoTrf::Vector3D & magneticField(bool isBLayer = false) const=0; + virtual void setMagneticField(const GeoTrf::Vector3D & field)=0; virtual bool useMagneticFieldSvc() const=0; virtual void setUseMagneticFieldSvc(bool flag)=0; @@ -656,7 +657,7 @@ class OraclePixGeoManager : public PixelGeometryManager { // Magnetic Field bool m_magFieldFromNova; bool m_useMagFieldSvc; - mutable HepGeom::Vector3D<double> m_magField; + mutable GeoTrf::Vector3D m_magField; // Class holding items that only one instance is needed for all detector elements. InDetDD::SiCommonItems * m_commonItems; @@ -904,8 +905,8 @@ class OraclePixGeoManager : public PixelGeometryManager { double Temperature(bool isBLayer); // Magnetic field - const HepGeom::Vector3D<double> & magneticField(bool isBLayer = false) const; - void setMagneticField(const HepGeom::Vector3D<double> & field); + const GeoTrf::Vector3D& magneticField(bool isBLayer = false) const; + void setMagneticField(const GeoTrf::Vector3D& field); bool useMagneticFieldSvc() const; void setUseMagneticFieldSvc(bool flag); @@ -925,16 +926,16 @@ class OraclePixGeoManager : public PixelGeometryManager { // ATLS double OraclePixGeoManager::GetATLSRadius() { - return (*m_atls)[0]->getDouble("RMAX")*CLHEP::cm; + return (*m_atls)[0]->getDouble("RMAX")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::GetATLSRmin() { - return (*m_atls)[0]->getDouble("RMIN")*CLHEP::cm; + return (*m_atls)[0]->getDouble("RMIN")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::GetATLSLength() { - return (*m_atls)[0]->getDouble("ZMAX")*CLHEP::cm; + return (*m_atls)[0]->getDouble("ZMAX")*GeoModelKernelUnits::cm; } // @@ -950,35 +951,35 @@ int OraclePixGeoManager::PixelEndcapMinorVersion() { return static_cast<int>(((*m_PixelEndcapGeneral)[0]->getDouble("VERSION") - PixelEndcapMajorVersion())*10 + 0.5);} // PXBG -double OraclePixGeoManager::PixelRMin() {return (*m_PixelCommon)[0]->getDouble("RMIN")*CLHEP::cm;} -double OraclePixGeoManager::PixelRMax() {return (*m_PixelCommon)[0]->getDouble("RMAX")*CLHEP::cm;} -double OraclePixGeoManager::PixelHalfLength() {return (*m_PixelCommon)[0]->getDouble("HALFLENGTH")*CLHEP::cm;} +double OraclePixGeoManager::PixelRMin() {return (*m_PixelCommon)[0]->getDouble("RMIN")*GeoModelKernelUnits::cm;} +double OraclePixGeoManager::PixelRMax() {return (*m_PixelCommon)[0]->getDouble("RMAX")*GeoModelKernelUnits::cm;} +double OraclePixGeoManager::PixelHalfLength() {return (*m_PixelCommon)[0]->getDouble("HALFLENGTH")*GeoModelKernelUnits::cm;} int OraclePixGeoManager::PixelBarrelNLayer() {return (*m_PixelBarrelGeneral)[0]->getInt("NLAYER");} // m_PixelBarrelGeneral -double OraclePixGeoManager::PixelBarrelRMin() {return (*m_PixelBarrelGeneral)[0]->getDouble("RMIN")*CLHEP::cm;} -double OraclePixGeoManager::PixelBarrelRMax() {return (*m_PixelBarrelGeneral)[0]->getDouble("RMAX")*CLHEP::cm;} -double OraclePixGeoManager::PixelBarrelHalfLength() {return (*m_PixelBarrelGeneral)[0]->getDouble("HALFLENGTH")*CLHEP::cm;} +double OraclePixGeoManager::PixelBarrelRMin() {return (*m_PixelBarrelGeneral)[0]->getDouble("RMIN")*GeoModelKernelUnits::cm;} +double OraclePixGeoManager::PixelBarrelRMax() {return (*m_PixelBarrelGeneral)[0]->getDouble("RMAX")*GeoModelKernelUnits::cm;} +double OraclePixGeoManager::PixelBarrelHalfLength() {return (*m_PixelBarrelGeneral)[0]->getDouble("HALFLENGTH")*GeoModelKernelUnits::cm;} // PXBI double OraclePixGeoManager::PixelLayerRadius() { - return (*m_PixelLayer)[m_currentLD]->getDouble("RLAYER")*CLHEP::cm; + return (*m_PixelLayer)[m_currentLD]->getDouble("RLAYER")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelLadderHalfLength() { - return (*m_PixelStave)[0]->getDouble("SUPPORTHLENGTH")*CLHEP::cm; + return (*m_PixelStave)[0]->getDouble("SUPPORTHLENGTH")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelLadderWidth() { - return (*m_PixelStave)[0]->getDouble("SUPPORTWIDTH")*CLHEP::cm; + return (*m_PixelStave)[0]->getDouble("SUPPORTWIDTH")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelLadderTilt() { - return (*m_PixelLayer)[m_currentLD]->getDouble("STAVETILT")*CLHEP::deg; + return (*m_PixelLayer)[m_currentLD]->getDouble("STAVETILT")*GeoModelKernelUnits::deg; } int OraclePixGeoManager::NPixelSectors() { @@ -987,7 +988,7 @@ int OraclePixGeoManager::NPixelSectors() double OraclePixGeoManager::PixelBalcony() { - return (*m_pxbi)[m_currentLD]->getDouble("DXELEB")*CLHEP::cm; + return (*m_pxbi)[m_currentLD]->getDouble("DXELEB")*GeoModelKernelUnits::cm; } int OraclePixGeoManager::PixelNModule() @@ -997,17 +998,17 @@ int OraclePixGeoManager::PixelNModule() double OraclePixGeoManager::PixelModuleAngle() { - return (*m_PixelStave)[0]->getDouble("MODULETILT")*CLHEP::deg; + return (*m_PixelStave)[0]->getDouble("MODULETILT")*GeoModelKernelUnits::deg; } double OraclePixGeoManager::PixelModuleDrDistance() { - return (*m_PixelStave)[0]->getDouble("CENTRMODULESHIFT")*CLHEP::cm; + return (*m_PixelStave)[0]->getDouble("CENTRMODULESHIFT")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelModulePosition(int im) { - return (*m_PixelStave)[0]->getDouble("MODULEDZ")*CLHEP::cm*im; + return (*m_PixelStave)[0]->getDouble("MODULEDZ")*GeoModelKernelUnits::cm*im; } // OBSOLETE!!! TO MOVE INTO THE NEW FACTORY @@ -1028,23 +1029,23 @@ double OraclePixGeoManager::PixelModuleAngleSign(int im) // PBAC double OraclePixGeoManager::PixelCableWidth() { - return (*m_PixelStave)[0]->getDouble("CABLEWIDTH")*CLHEP::cm; + return (*m_PixelStave)[0]->getDouble("CABLEWIDTH")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelCableThickness() { - return (*m_PixelStave)[0]->getDouble("CABLETHICK")*CLHEP::cm; + return (*m_PixelStave)[0]->getDouble("CABLETHICK")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelCableZMax() { - return (*m_PixelStave)[0]->getDouble("SUPPORTHLENGTH")*CLHEP::cm; + return (*m_PixelStave)[0]->getDouble("SUPPORTHLENGTH")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelCableZMin() { - return (*m_PixelStave)[0]->getDouble("CABLEZMIN")*CLHEP::cm; + return (*m_PixelStave)[0]->getDouble("CABLEZMIN")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelCableDeltaZ() { - return (*m_PixelStave)[0]->getDouble("MODULEDZ")*CLHEP::cm; + return (*m_PixelStave)[0]->getDouble("MODULEDZ")*GeoModelKernelUnits::cm; } @@ -1052,24 +1053,24 @@ double OraclePixGeoManager::PixelCableDeltaZ() { int OraclePixGeoManager::PixelEndcapNDisk() {return (*m_PixelEndcapGeneral)[0]->getInt("NDISK");} // Endcap container PEVO -double OraclePixGeoManager::PixelEndcapRMin() {return (*m_PixelEndcapGeneral)[0]->getDouble("RMIN")*CLHEP::cm;} +double OraclePixGeoManager::PixelEndcapRMin() {return (*m_PixelEndcapGeneral)[0]->getDouble("RMIN")*GeoModelKernelUnits::cm;} -double OraclePixGeoManager::PixelEndcapRMax() {return (*m_PixelEndcapGeneral)[0]->getDouble("RMAX")*CLHEP::cm;} +double OraclePixGeoManager::PixelEndcapRMax() {return (*m_PixelEndcapGeneral)[0]->getDouble("RMAX")*GeoModelKernelUnits::cm;} -double OraclePixGeoManager::PixelEndcapZMin() {return (*m_PixelEndcapGeneral)[0]->getDouble("ZMIN")*CLHEP::cm;} +double OraclePixGeoManager::PixelEndcapZMin() {return (*m_PixelEndcapGeneral)[0]->getDouble("ZMIN")*GeoModelKernelUnits::cm;} -double OraclePixGeoManager::PixelEndcapZMax() {return (*m_PixelEndcapGeneral)[0]->getDouble("ZMAX")*CLHEP::cm;} +double OraclePixGeoManager::PixelEndcapZMax() {return (*m_PixelEndcapGeneral)[0]->getDouble("ZMAX")*GeoModelKernelUnits::cm;} int OraclePixGeoManager::PixelEndcapNSupportFrames() {return (int) (*m_PixelEndcapGeneral)[0]->getDouble("NFRAME");} // Endcap Inner (PXEI) -double OraclePixGeoManager::PixelDiskPosition() {return (*m_PixelDisk)[m_currentLD]->getDouble("ZDISK")*CLHEP::cm;} +double OraclePixGeoManager::PixelDiskPosition() {return (*m_PixelDisk)[m_currentLD]->getDouble("ZDISK")*GeoModelKernelUnits::cm;} -double OraclePixGeoManager::PixelDiskRMin() {return (*m_PixelDisk)[m_currentLD]->getDouble("RIDISK")*CLHEP::cm;} +double OraclePixGeoManager::PixelDiskRMin() {return (*m_PixelDisk)[m_currentLD]->getDouble("RIDISK")*GeoModelKernelUnits::cm;} -double OraclePixGeoManager::PixelECSiDz1() {return (*m_PixelDisk)[m_currentLD]->getDouble("DZCOUNTER")*CLHEP::cm;} +double OraclePixGeoManager::PixelECSiDz1() {return (*m_PixelDisk)[m_currentLD]->getDouble("DZCOUNTER")*GeoModelKernelUnits::cm;} -double OraclePixGeoManager::PixelECSiDz2() {return (*m_PixelDisk)[m_currentLD]->getDouble("DZCOUNTER")*CLHEP::cm;} +double OraclePixGeoManager::PixelECSiDz2() {return (*m_PixelDisk)[m_currentLD]->getDouble("DZCOUNTER")*GeoModelKernelUnits::cm;} int OraclePixGeoManager::PixelECNSectors1() {return (*m_PixelDisk)[m_currentLD]->getInt("NMODULE");} @@ -1077,53 +1078,53 @@ int OraclePixGeoManager::PixelECNSectors2() {return (*m_PixelDisk)[m_currentLD]- // Endcap Cables PEAC double OraclePixGeoManager::PixelECCablesRMin() { - return (*m_PixelDisk)[m_currentLD]->getDouble("RMINCABLE")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("RMINCABLE")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelECCablesRMax() { - return (*m_PixelDisk)[m_currentLD]->getDouble("RMAXCABLE")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("RMAXCABLE")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::PixelECCablesDistance() { - return (*m_PixelDisk)[m_currentLD]->getDouble("ZCABLE")*CLHEP::cm; + return (*m_PixelDisk)[m_currentLD]->getDouble("ZCABLE")*GeoModelKernelUnits::cm; } // // Design // double OraclePixGeoManager::DesignRPActiveArea(){ - return (*m_pxbi)[0]->getDouble("DYACTIVE")*CLHEP::cm; + return (*m_pxbi)[0]->getDouble("DYACTIVE")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::DesignZActiveArea(){ - return (*m_pxbi)[0]->getDouble("DZELEB")*CLHEP::cm; + return (*m_pxbi)[0]->getDouble("DZELEB")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::DesignPitchRP(bool isBLayer) { - if(isBLayer) return (*m_pxbd)[0]->getDouble("PITCHRP")*CLHEP::cm; - else return (*m_pxbd)[1]->getDouble("PITCHRP")*CLHEP::cm; + if(isBLayer) return (*m_pxbd)[0]->getDouble("PITCHRP")*GeoModelKernelUnits::cm; + else return (*m_pxbd)[1]->getDouble("PITCHRP")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::DesignPitchZ(bool isBLayer) { double pitchZ; if(isBLayer) { if (m_dc1Geometry) { // Override NOVA - pitchZ = 300 * CLHEP::micrometer; + pitchZ = 300 * GeoModelKernelUnits::micrometer; } else { - pitchZ = (*m_pxbd)[0]->getDouble("PITCHZ") * CLHEP::cm; + pitchZ = (*m_pxbd)[0]->getDouble("PITCHZ") * GeoModelKernelUnits::cm; } } else { - pitchZ = (*m_pxbd)[1]->getDouble("PITCHZ") * CLHEP::cm; + pitchZ = (*m_pxbd)[1]->getDouble("PITCHZ") * GeoModelKernelUnits::cm; } return pitchZ; } double OraclePixGeoManager::DesignGapRP() { - return (*m_pdch)[0]->getDouble("GAPRP")*CLHEP::cm; + return (*m_pdch)[0]->getDouble("GAPRP")*GeoModelKernelUnits::cm; } double OraclePixGeoManager::DesignGapZ() { - return (*m_pdch)[0]->getDouble("GAPZ")*CLHEP::cm; + return (*m_pdch)[0]->getDouble("GAPZ")*GeoModelKernelUnits::cm; } diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx index 6a640ecb7ad..160edfb488b 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.cxx @@ -2,12 +2,12 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/PixelDetectorFactory.h" +#include "PixelDetectorFactory.h" #include "StoreGate/StoreGateSvc.h" -#include "PixelGeoModel/PixelSwitches.h" +#include "PixelSwitches.h" // Envelope, as a starting point of the geometry -#include "PixelGeoModel/GeoPixelEnvelope.h" +#include "GeoPixelEnvelope.h" // GeoModel includes #include "GeoModelKernel/GeoNameTag.h" @@ -20,8 +20,8 @@ #include "InDetReadoutGeometry/PixelModuleDesign.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" -#include "PixelGeoModel/OraclePixGeoManager.h" -#include "PixelGeoModel/PixelGeoModelAthenaComps.h" +#include "OraclePixGeoManager.h" +#include "PixelGeoModelAthenaComps.h" #include "InDetIdentifier/PixelID.h" @@ -120,12 +120,12 @@ void PixelDetectorFactory::create(GeoPhysVol *world) m_geometryManager->SetCurrentLD(0); m_geometryManager->SetBarrel(); if(msgLvl(MSG::DEBUG)) { - msg(MSG::DEBUG) << " B-Layer basic eta pitch: " << m_geometryManager->DesignPitchZ()/CLHEP::micrometer << "um" << endmsg; - msg(MSG::DEBUG) << " B-Layer sensor thickness: " << m_geometryManager->PixelBoardThickness()/CLHEP::micrometer << "um" << endmsg; + msg(MSG::DEBUG) << " B-Layer basic eta pitch: " << m_geometryManager->DesignPitchZ()/GeoModelKernelUnits::micrometer << "um" << endmsg; + msg(MSG::DEBUG) << " B-Layer sensor thickness: " << m_geometryManager->PixelBoardThickness()/GeoModelKernelUnits::micrometer << "um" << endmsg; } // Top level transform - HepGeom::Transform3D topTransform = m_geometryManager->partTransform("Pixel"); + GeoTrf::Transform3D topTransform = m_geometryManager->partTransform("Pixel"); // diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactory.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactory.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactory.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx index 28ffa3153b1..9731105c0ec 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.cxx @@ -3,12 +3,12 @@ */ -#include "PixelGeoModel/PixelDetectorFactoryDC2.h" +#include "PixelDetectorFactoryDC2.h" // Envelope, as a starting point of the geometry -//#include "PixelGeoModel/GeoPixelEnvelope.h" -#include "PixelGeoModel/PixelDetectorDC1DC2.h" -#include "PixelGeoModel/PixelSwitches.h" +//#include "GeoPixelEnvelope.h" +#include "PixelDetectorDC1DC2.h" +#include "PixelSwitches.h" // GeoModel includes #include "GeoModelKernel/GeoNameTag.h" @@ -20,7 +20,7 @@ #include "InDetReadoutGeometry/InDetDD_Defs.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "PixelGeoModel/PixelGeoModelAthenaComps.h" +#include "PixelGeoModelAthenaComps.h" #include "InDetIdentifier/PixelID.h" @@ -125,18 +125,18 @@ void PixelDetectorFactoryDC2::create(GeoPhysVol *world) msg(MSG::INFO) << " " << m_detectorManager->getVersion().fullDescription() << endmsg; // Printout the parameters that are different in DC1 and DC2. - msg(MSG::INFO) << " B-Layer basic eta pitch: " << geometryManager->DesignPitchZ(true)/CLHEP::micrometer << "um" << endmsg; + msg(MSG::INFO) << " B-Layer basic eta pitch: " << geometryManager->DesignPitchZ(true)/GeoModelKernelUnits::micrometer << "um" << endmsg; } geometryManager->SetCurrentLD(0); geometryManager->SetBarrel(); if(msgLvl(MSG::INFO)) - msg(MSG::INFO) << " B-Layer sensor thickness: " << geometryManager->PixelBoardThickness()/CLHEP::micrometer << "um" << endmsg; + msg(MSG::INFO) << " B-Layer sensor thickness: " << geometryManager->PixelBoardThickness()/GeoModelKernelUnits::micrometer << "um" << endmsg; // // Create the Pixel Envelope... GeoPixelEnvelope pe; GeoVPhysVol* pephys = pe.Build() ; - GeoAlignableTransform * transform = new GeoAlignableTransform(HepGeom::Transform3D()); + GeoAlignableTransform * transform = new GeoAlignableTransform(GeoTrf::Transform3D::Identity()); // // Add this to the world diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactoryDC2.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactoryDC2.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactoryDC2.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx index 1633bb780ed..e0a93585e53 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.cxx @@ -2,14 +2,14 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/PixelDetectorFactorySR1.h" +#include "PixelDetectorFactorySR1.h" -#include "PixelGeoModel/PixelSwitches.h" +#include "PixelSwitches.h" // Envelope, as a starting point of the geometry -#include "PixelGeoModel/GeoPixelBarrel.h" -#include "PixelGeoModel/GeoPixelEndCap.h" -#include "PixelGeoModel/GeoPixelServices.h" +#include "GeoPixelBarrel.h" +#include "GeoPixelEndCap.h" +#include "GeoPixelServices.h" // GeoModel includes #include "GeoModelKernel/GeoNameTag.h" @@ -22,8 +22,8 @@ #include "InDetReadoutGeometry/InDetDD_Defs.h" #include "InDetReadoutGeometry/PixelModuleDesign.h" -#include "PixelGeoModel/PixelGeoModelAthenaComps.h" -#include "PixelGeoModel/OraclePixGeoManager.h" +#include "PixelGeoModelAthenaComps.h" +#include "OraclePixGeoManager.h" #include "InDetIdentifier/PixelID.h" @@ -110,8 +110,8 @@ void PixelDetectorFactorySR1::create(GeoPhysVol *world) msg(MSG::INFO) << " " << m_detectorManager->getVersion().fullDescription() << endmsg; // Printout the parameters that are different in DC1 and DC2. - msg(MSG::INFO) << " B-Layer basic eta pitch: " << m_geometryManager->DesignPitchZ()/CLHEP::micrometer << "um" << endmsg; - msg(MSG::INFO) << " B-Layer sensor thickness: " << m_geometryManager->PixelBoardThickness()/CLHEP::micrometer << "um" << endmsg; + msg(MSG::INFO) << " B-Layer basic eta pitch: " << m_geometryManager->DesignPitchZ()/GeoModelKernelUnits::micrometer << "um" << endmsg; + msg(MSG::INFO) << " B-Layer sensor thickness: " << m_geometryManager->PixelBoardThickness()/GeoModelKernelUnits::micrometer << "um" << endmsg; } bool barrelPresent = m_geometryManager->partPresent("Barrel"); @@ -141,7 +141,7 @@ void PixelDetectorFactorySR1::create(GeoPhysVol *world) } // Top level transform - HepGeom::Transform3D topTransform = m_geometryManager->partTransform("Pixel"); + GeoTrf::Transform3D topTransform = m_geometryManager->partTransform("Pixel"); if (barrelPresent) { // @@ -151,7 +151,7 @@ void PixelDetectorFactorySR1::create(GeoPhysVol *world) GeoPixelBarrel brl(pixServices); physVol = brl.Build(); - HepGeom::Transform3D barrelTransform = m_geometryManager->partTransform("Barrel"); + GeoTrf::Transform3D barrelTransform = m_geometryManager->partTransform("Barrel"); transform = new GeoAlignableTransform(topTransform*barrelTransform); // Add this to the world @@ -178,8 +178,8 @@ void PixelDetectorFactorySR1::create(GeoPhysVol *world) m_geometryManager->SetPos(); physVol = pec.Build(); - HepGeom::Transform3D endcapATransform = m_geometryManager->partTransform("EndcapA"); - transform = new GeoAlignableTransform(topTransform * endcapATransform * HepGeom::TranslateZ3D(zpos)); + GeoTrf::Transform3D endcapATransform = m_geometryManager->partTransform("EndcapA"); + transform = new GeoAlignableTransform(topTransform * endcapATransform * GeoTrf::TranslateZ3D(zpos)); GeoNameTag* tag = new GeoNameTag("Pixel"); world->add(tag); @@ -194,8 +194,8 @@ void PixelDetectorFactorySR1::create(GeoPhysVol *world) m_geometryManager->SetNeg(); physVol = pec.Build(); - HepGeom::Transform3D endcapCTransform = m_geometryManager->partTransform("EndcapC"); - transform = new GeoAlignableTransform(topTransform * endcapCTransform * HepGeom::TranslateZ3D(-zpos) * HepGeom::RotateY3D(180*CLHEP::deg)); + GeoTrf::Transform3D endcapCTransform = m_geometryManager->partTransform("EndcapC"); + transform = new GeoAlignableTransform(topTransform * endcapCTransform * GeoTrf::TranslateZ3D(-zpos) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg)); GeoNameTag* tag = new GeoNameTag("Pixel"); world->add(tag); diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactorySR1.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorFactorySR1.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorFactorySR1.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx index 0ae6886735b..bec8812f87e 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx @@ -3,17 +3,17 @@ */ -#include "PixelGeoModel/PixelDetectorTool.h" -#include "PixelGeoModel/PixelDetectorFactory.h" -#include "PixelGeoModel/PixelDetectorFactorySR1.h" -#include "PixelGeoModel/PixelDetectorFactoryDC2.h" -#include "PixelGeoModel/PixelGeometryManager.h" -#include "PixelGeoModel/PixelSwitches.h" +#include "PixelDetectorTool.h" +#include "PixelDetectorFactory.h" +#include "PixelDetectorFactorySR1.h" +#include "PixelDetectorFactoryDC2.h" +#include "PixelGeometryManager.h" +#include "PixelSwitches.h" #include "PixelGeoModel/IBLParameterSvc.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" #include "InDetReadoutGeometry/InDetDD_Defs.h" #include "DetDescrConditions/AlignableTransformContainer.h" -#include "PixelGeoModel/PixelGeoModelAthenaComps.h" +#include "PixelGeoModelAthenaComps.h" #include "GeoModelUtilities/GeoModelExperiment.h" #include "GaudiKernel/ServiceHandle.h" #include "StoreGate/StoreGateSvc.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorTool.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelDetectorTool.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeoModelAthenaComps.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeoModelAthenaComps.cxx index 582da912462..b981d526918 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeoModelAthenaComps.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeoModelAthenaComps.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/PixelGeoModelAthenaComps.h" +#include "PixelGeoModelAthenaComps.h" PixelGeoModelAthenaComps::PixelGeoModelAthenaComps() : InDetDD::AthenaComps("PixelGeoModel"), diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelGeoModelAthenaComps.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeoModelAthenaComps.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelGeoModelAthenaComps.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeoModelAthenaComps.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeometryManager.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeometryManager.cxx index 2af97ee9680..b8f2f517b62 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeometryManager.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeometryManager.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/PixelGeometryManager.h" +#include "PixelGeometryManager.h" using namespace std; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelGeometryManager.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeometryManager.h similarity index 98% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelGeometryManager.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeometryManager.h index a576355b956..6d29cd6f795 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelGeometryManager.h +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelGeometryManager.h @@ -8,10 +8,10 @@ #include <string> #include <iostream> #include <map> +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Geometry/Vector3D.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "PixelGeoModel/PixelGeoModelAthenaComps.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "PixelGeoModelAthenaComps.h" #include "RDBAccessSvc/IRDBAccessSvc.h" class InDetMaterialManager; @@ -268,7 +268,7 @@ public: virtual int PixelStaveIndex(int layer)=0; // Stave support (IBL) - virtual HepGeom::Point3D<double> IBLStaveRotationAxis()=0; + virtual GeoTrf::Vector3D IBLStaveRotationAxis()=0; virtual double IBLStaveRadius()=0; virtual double IBLStaveFacePlateThickness()=0; virtual double IBLStaveMechanicalStaveWidth()=0; @@ -611,7 +611,7 @@ public: virtual const PixelID * getIdHelper() = 0; // Top Level placements - virtual const HepGeom::Transform3D & partTransform(const std::string & partName) const = 0; + virtual const GeoTrf::Transform3D & partTransform(const std::string & partName) const = 0; virtual bool partPresent(const std::string & partName) const = 0; virtual std::string getMaterialName(const std::string & volumeName, int layerdisk = 0, int typenum = 0) = 0; diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelLegacyManager.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelLegacyManager.cxx index 1b721a88647..1bd7b37a9ec 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelLegacyManager.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelLegacyManager.cxx @@ -3,11 +3,12 @@ */ -#include "PixelGeoModel/PixelLegacyManager.h" +#include "PixelLegacyManager.h" #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/Units.h" #include <sstream> #include <string> @@ -88,36 +89,36 @@ int PixelLegacyManager::PixelBarrelNTFrame() double PixelLegacyManager::PixelBarrelBFrameWidth() { if (m_BarrelInSFrame) { - return (*m_pfba)[0]->getDouble("WIDTH1")*CLHEP::cm; + return (*m_pfba)[0]->getDouble("WIDTH1")*GeoModelKernelUnits::cm; } else { - return (*m_pfec)[0]->getDouble("WIDTH1")*CLHEP::cm; + return (*m_pfec)[0]->getDouble("WIDTH1")*GeoModelKernelUnits::cm; } } double PixelLegacyManager::PixelBarrelTFrameWidth() { if (m_BarrelInSFrame) { - return (*m_pfba)[0]->getDouble("WIDTH2")*CLHEP::cm; + return (*m_pfba)[0]->getDouble("WIDTH2")*GeoModelKernelUnits::cm; } else { - return (*m_pfec)[0]->getDouble("WIDTH2")*CLHEP::cm; + return (*m_pfec)[0]->getDouble("WIDTH2")*GeoModelKernelUnits::cm; } } double PixelLegacyManager::PixelBarrelFrameLength() { if (m_BarrelInSFrame) { - return (*m_pfba)[0]->getDouble("LENGTH")*CLHEP::cm; + return (*m_pfba)[0]->getDouble("LENGTH")*GeoModelKernelUnits::cm; } else { - return (*m_pfec)[0]->getDouble("LENGTH")*CLHEP::cm; + return (*m_pfec)[0]->getDouble("LENGTH")*GeoModelKernelUnits::cm; } } double PixelLegacyManager::PixelBarrelFrameOffset() { if (m_BarrelInSFrame) { - return (*m_pfba)[0]->getDouble("OFFSET")*CLHEP::cm; + return (*m_pfba)[0]->getDouble("OFFSET")*GeoModelKernelUnits::cm; } else { - return (*m_pfec)[0]->getDouble("OFFSET")*CLHEP::cm; + return (*m_pfec)[0]->getDouble("OFFSET")*GeoModelKernelUnits::cm; } } @@ -134,33 +135,33 @@ int PixelLegacyManager::PixelEndcapNTFrame() double PixelLegacyManager::PixelEndcapBFrameWidth() { - return (*m_pecf)[0]->getDouble("WIDTH1")*CLHEP::cm; + return (*m_pecf)[0]->getDouble("WIDTH1")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelEndcapTFrameWidth() { - return (*m_pecf)[0]->getDouble("WIDTH2")*CLHEP::cm; + return (*m_pecf)[0]->getDouble("WIDTH2")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelEndcapFrameLength() { - return (*m_pecf)[0]->getDouble("LENGTH")*CLHEP::cm; + return (*m_pecf)[0]->getDouble("LENGTH")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelEndcapFrameOffset() { - return (*m_pecf)[0]->getDouble("OFFSET")*CLHEP::cm; + return (*m_pecf)[0]->getDouble("OFFSET")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelBFrameHalfLength() { if (m_BarrelInSFrame) { - return (*m_pbba)[0]->getDouble("DZ")*CLHEP::cm; + return (*m_pbba)[0]->getDouble("DZ")*GeoModelKernelUnits::cm; } else { if (m_EndcapInSFrame) { - return (*m_pecb)[0]->getDouble("DZ")*CLHEP::cm; + return (*m_pecb)[0]->getDouble("DZ")*GeoModelKernelUnits::cm; } else { - return (*m_pbec)[0]->getDouble("DZ")*CLHEP::cm; + return (*m_pbec)[0]->getDouble("DZ")*GeoModelKernelUnits::cm; } } } @@ -168,12 +169,12 @@ double PixelLegacyManager::PixelBFrameHalfLength() double PixelLegacyManager::PixelBFrameHalfWidth() { if (m_BarrelInSFrame) { - return (*m_pbba)[0]->getDouble("DY")*CLHEP::cm; + return (*m_pbba)[0]->getDouble("DY")*GeoModelKernelUnits::cm; } else { if (m_EndcapInSFrame) { - return (*m_pecb)[0]->getDouble("DY")*CLHEP::cm; + return (*m_pecb)[0]->getDouble("DY")*GeoModelKernelUnits::cm; } else { - return (*m_pbec)[0]->getDouble("DY")*CLHEP::cm; + return (*m_pbec)[0]->getDouble("DY")*GeoModelKernelUnits::cm; } } } @@ -181,12 +182,12 @@ double PixelLegacyManager::PixelBFrameHalfWidth() double PixelLegacyManager::PixelBFrameHalfThickness() { if (m_BarrelInSFrame) { - return (*m_pbba)[0]->getDouble("DX")*CLHEP::cm; + return (*m_pbba)[0]->getDouble("DX")*GeoModelKernelUnits::cm; } else { if (m_EndcapInSFrame) { - return (*m_pecb)[0]->getDouble("DX")*CLHEP::cm; + return (*m_pecb)[0]->getDouble("DX")*GeoModelKernelUnits::cm; } else { - return (*m_pbec)[0]->getDouble("DX")*CLHEP::cm; + return (*m_pbec)[0]->getDouble("DX")*GeoModelKernelUnits::cm; } } } @@ -194,15 +195,15 @@ double PixelLegacyManager::PixelBFrameHalfThickness() double PixelLegacyManager::PixelTFrameHalfLength() { if (m_BarrelInSFrame) { - return (*m_ptba)[0]->getDouble("DZ")*CLHEP::cm; + return (*m_ptba)[0]->getDouble("DZ")*GeoModelKernelUnits::cm; } else { if (m_EndcapInSFrame) { - return (*m_pect)[0]->getDouble("DZ")*CLHEP::cm; + return (*m_pect)[0]->getDouble("DZ")*GeoModelKernelUnits::cm; } else { if (m_EndConeSFrame) { - return (*m_pecn)[0]->getDouble("DZ")*CLHEP::cm; + return (*m_pecn)[0]->getDouble("DZ")*GeoModelKernelUnits::cm; } else { - return (*m_ptec)[0]->getDouble("DZ")*CLHEP::cm; + return (*m_ptec)[0]->getDouble("DZ")*GeoModelKernelUnits::cm; } } } @@ -211,15 +212,15 @@ double PixelLegacyManager::PixelTFrameHalfLength() double PixelLegacyManager::PixelTFrameHalfWidthY() { if (m_BarrelInSFrame) { - return (*m_ptba)[0]->getDouble("DY")*CLHEP::cm; + return (*m_ptba)[0]->getDouble("DY")*GeoModelKernelUnits::cm; } else { if (m_EndcapInSFrame) { - return (*m_pect)[0]->getDouble("DY")*CLHEP::cm; + return (*m_pect)[0]->getDouble("DY")*GeoModelKernelUnits::cm; } else { if (m_EndConeSFrame) { - return (*m_pecn)[0]->getDouble("DY")*CLHEP::cm; + return (*m_pecn)[0]->getDouble("DY")*GeoModelKernelUnits::cm; } else { - return (*m_ptec)[0]->getDouble("DY")*CLHEP::cm; + return (*m_ptec)[0]->getDouble("DY")*GeoModelKernelUnits::cm; } } } @@ -228,15 +229,15 @@ double PixelLegacyManager::PixelTFrameHalfWidthY() double PixelLegacyManager::PixelTFrameHalfWidthXzn() { if (m_BarrelInSFrame) { - return (*m_ptba)[0]->getDouble("DX1")*CLHEP::cm; + return (*m_ptba)[0]->getDouble("DX1")*GeoModelKernelUnits::cm; } else { if (m_EndcapInSFrame) { - return (*m_pect)[0]->getDouble("DX1")*CLHEP::cm; + return (*m_pect)[0]->getDouble("DX1")*GeoModelKernelUnits::cm; } else { if (m_EndConeSFrame) { - return (*m_pecn)[0]->getDouble("DX1")*CLHEP::cm; + return (*m_pecn)[0]->getDouble("DX1")*GeoModelKernelUnits::cm; } else { - return (*m_ptec)[0]->getDouble("DX1")*CLHEP::cm; + return (*m_ptec)[0]->getDouble("DX1")*GeoModelKernelUnits::cm; } } } @@ -245,15 +246,15 @@ double PixelLegacyManager::PixelTFrameHalfWidthXzn() double PixelLegacyManager::PixelTFrameHalfWidthXzp() { if (m_BarrelInSFrame) { - return (*m_ptba)[0]->getDouble("DX2")*CLHEP::cm; + return (*m_ptba)[0]->getDouble("DX2")*GeoModelKernelUnits::cm; } else { if (m_EndcapInSFrame) { - return (*m_pect)[0]->getDouble("DX2")*CLHEP::cm; + return (*m_pect)[0]->getDouble("DX2")*GeoModelKernelUnits::cm; } else { if (m_EndConeSFrame) { - return (*m_pecn)[0]->getDouble("DX2")*CLHEP::cm; + return (*m_pecn)[0]->getDouble("DX2")*GeoModelKernelUnits::cm; } else { - return (*m_ptec)[0]->getDouble("DX2")*CLHEP::cm; + return (*m_ptec)[0]->getDouble("DX2")*GeoModelKernelUnits::cm; } } } @@ -262,15 +263,15 @@ double PixelLegacyManager::PixelTFrameHalfWidthXzp() double PixelLegacyManager::PixelTFrameDzDr() { if (m_BarrelInSFrame) { - return (*m_ptba)[0]->getDouble("DZDR")*CLHEP::deg; + return (*m_ptba)[0]->getDouble("DZDR")*GeoModelKernelUnits::deg; } else { if (m_EndcapInSFrame) { - return (*m_pect)[0]->getDouble("DZDR")*CLHEP::cm; + return (*m_pect)[0]->getDouble("DZDR")*GeoModelKernelUnits::cm; } else { if (m_EndConeSFrame) { - return (*m_pecn)[0]->getDouble("DZDR")*CLHEP::deg; + return (*m_pecn)[0]->getDouble("DZDR")*GeoModelKernelUnits::deg; } else { - return (*m_ptec)[0]->getDouble("DZDR")*CLHEP::deg; + return (*m_ptec)[0]->getDouble("DZDR")*GeoModelKernelUnits::deg; } } } @@ -278,33 +279,33 @@ double PixelLegacyManager::PixelTFrameDzDr() double PixelLegacyManager::PixelBarrelFrameECRadius() { - return (*m_pecn)[0]->getDouble("RADIUS")*CLHEP::cm; + return (*m_pecn)[0]->getDouble("RADIUS")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelBarrelFrameECZPos() { - return (*m_pecn)[0]->getDouble("Z")*CLHEP::cm; + return (*m_pecn)[0]->getDouble("Z")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelBarrelFrameECAlphaX() { - return (*m_pecn)[0]->getDouble("ANGLEX")*CLHEP::deg; + return (*m_pecn)[0]->getDouble("ANGLEX")*GeoModelKernelUnits::deg; } double PixelLegacyManager::PixelBarrelFrameECAlphaY() { - return (*m_pecn)[0]->getDouble("ANGLEY")*CLHEP::deg; + return (*m_pecn)[0]->getDouble("ANGLEY")*GeoModelKernelUnits::deg; } double PixelLegacyManager::PixelLadderThickness() { - return 2 * 1.48972*CLHEP::mm; + return 2 * 1.48972*GeoModelKernelUnits::mm; } double PixelLegacyManager::PixelLadderLength() { - return 2 * (*m_pxbi)[0]->getDouble("DZLADDER")*CLHEP::cm; + return 2 * (*m_pxbi)[0]->getDouble("DZLADDER")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelLadderServicesX() @@ -314,28 +315,28 @@ double PixelLegacyManager::PixelLadderServicesX() double PixelLegacyManager::PixelLadderServicesY() { - return 3*CLHEP::mm; + return 3*GeoModelKernelUnits::mm; } double PixelLegacyManager::PixelLadderCableOffsetX() { - return 0.099*CLHEP::mm; + return 0.099*GeoModelKernelUnits::mm; } double PixelLegacyManager::PixelLadderCableOffsetY() { - return 4*CLHEP::mm; + return 4*GeoModelKernelUnits::mm; } double PixelLegacyManager::PixelLadderConnectorOffsetX() { - return -5.8*CLHEP::mm; + return -5.8*GeoModelKernelUnits::mm; } double PixelLegacyManager::PixelLadderPigtailOffsetY() { - return -0.5*CLHEP::mm - PixelLadderCableOffsetY(); + return -0.5*GeoModelKernelUnits::mm - PixelLadderCableOffsetY(); } @@ -352,34 +353,34 @@ double PixelLegacyManager::PixelCableZStart(int index) { // In old code two cables were connected to middle. Correction stops them touching. - double correction = (index == 7) ? 0.000001*CLHEP::cm : 0; - return ((*m_poci)[index]->getDouble("Z") - (*m_poci)[index]->getDouble("DZ")) * CLHEP::cm + correction; + double correction = (index == 7) ? 0.000001*GeoModelKernelUnits::cm : 0; + return ((*m_poci)[index]->getDouble("Z") - (*m_poci)[index]->getDouble("DZ")) * GeoModelKernelUnits::cm + correction; } double PixelLegacyManager::PixelCableZEnd(int index) { // In old code two cables were connected to middle. Correction stops them touching. - double correction = (index == 7) ? 0.000001*CLHEP::cm : 0; - return ((*m_poci)[index]->getDouble("Z") + (*m_poci)[index]->getDouble("DZ")) * CLHEP::cm + correction; + double correction = (index == 7) ? 0.000001*GeoModelKernelUnits::cm : 0; + return ((*m_poci)[index]->getDouble("Z") + (*m_poci)[index]->getDouble("DZ")) * GeoModelKernelUnits::cm + correction; } double PixelLegacyManager::PixelCableWidth(int index) { - return (*m_poci)[index]->getDouble("DY") * CLHEP::cm; + return (*m_poci)[index]->getDouble("DY") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelCableThickness(int index) { - return (*m_poci)[index]->getDouble("DX")*CLHEP::cm; + return (*m_poci)[index]->getDouble("DX")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelCableStackOffset(int index) { - return (*m_poci)[index]->getDouble("X")*CLHEP::cm; + return (*m_poci)[index]->getDouble("X")*GeoModelKernelUnits::cm; } @@ -416,47 +417,47 @@ double PixelLegacyManager::PixelTMTVariable(int iPart, const std::string & varNa double PixelLegacyManager::PixelTMTDzdr(int iPart) { - return PixelTMTVariable(iPart, "DZDR") * CLHEP::deg; + return PixelTMTVariable(iPart, "DZDR") * GeoModelKernelUnits::deg; } double PixelLegacyManager::PixelTMTPosX(int iPart) { - return PixelTMTVariable(iPart, "X") * CLHEP::cm; + return PixelTMTVariable(iPart, "X") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelTMTPosZ(int iPart) { - return PixelTMTVariable(iPart, "Z") * CLHEP::cm; + return PixelTMTVariable(iPart, "Z") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelTMTLength(int iPart) { - return 2 * PixelTMTVariable(iPart, "DZ") * CLHEP::cm; + return 2 * PixelTMTVariable(iPart, "DZ") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelTMTWidthX2(int iPart) { - return 2 * PixelTMTVariable(iPart, "DX2") * CLHEP::cm; + return 2 * PixelTMTVariable(iPart, "DX2") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelTMTWidthX1(int iPart) { - return 2 * PixelTMTVariable(iPart, "DX1") * CLHEP::cm; + return 2 * PixelTMTVariable(iPart, "DX1") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelTMTWidthY(int iPart) { - return 2 * PixelTMTVariable(iPart, "DY") * CLHEP::cm; + return 2 * PixelTMTVariable(iPart, "DY") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelTMTBaseX1(int iPart) { double theta = PixelTMTDzdr(iPart); if (theta == 0) { - return PixelTMTVariable(iPart, "X")*CLHEP::cm + 0.25*(PixelTMTWidthX1(iPart)+PixelTMTWidthX2(iPart)); + return PixelTMTVariable(iPart, "X")*GeoModelKernelUnits::cm + 0.25*(PixelTMTWidthX1(iPart)+PixelTMTWidthX2(iPart)); } else { - return PixelTMTVariable(iPart, "X")*CLHEP::cm - 0.5*PixelTMTLength(iPart) * tan(theta) + 0.5*PixelTMTWidthX1(iPart); + return PixelTMTVariable(iPart, "X")*GeoModelKernelUnits::cm - 0.5*PixelTMTLength(iPart) * tan(theta) + 0.5*PixelTMTWidthX1(iPart); } } @@ -464,15 +465,15 @@ double PixelLegacyManager::PixelTMTBaseX2(int iPart) { double theta = PixelTMTDzdr(iPart); if (theta == 0) { - return PixelTMTVariable(iPart, "X")*CLHEP::cm + 0.25*(PixelTMTWidthX1(iPart)+PixelTMTWidthX2(iPart)); + return PixelTMTVariable(iPart, "X")*GeoModelKernelUnits::cm + 0.25*(PixelTMTWidthX1(iPart)+PixelTMTWidthX2(iPart)); } else { - return PixelTMTVariable(iPart, "X")*CLHEP::cm + 0.5*PixelTMTLength(iPart) * tan(theta) + 0.5*PixelTMTWidthX2(iPart); + return PixelTMTVariable(iPart, "X")*GeoModelKernelUnits::cm + 0.5*PixelTMTLength(iPart) * tan(theta) + 0.5*PixelTMTWidthX2(iPart); } } double PixelLegacyManager::PixelTMTPosY(int iPart) { - return PixelTMTVariable(iPart, "Y") * CLHEP::cm; + return PixelTMTVariable(iPart, "Y") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelTMTPosZ1(int iPart) @@ -497,52 +498,52 @@ bool PixelLegacyManager::PixelTMTPerModule(int iPart) // double PixelLegacyManager::PixelOmegaUpperBendX() { - return (*m_poti)[2]->getDouble("X") * CLHEP::cm; + return (*m_poti)[2]->getDouble("X") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaUpperBendY() { - return (*m_poti)[2]->getDouble("Y") * CLHEP::cm; + return (*m_poti)[2]->getDouble("Y") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaUpperBendRadius() { - return (*m_poti)[2]->getDouble("RMAX") * CLHEP::cm; + return (*m_poti)[2]->getDouble("RMAX") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaLowerBendX() { - return (*m_poti)[0]->getDouble("X") * CLHEP::cm; + return (*m_poti)[0]->getDouble("X") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaLowerBendY() { - return (*m_poti)[0]->getDouble("Y") * CLHEP::cm; + return (*m_poti)[0]->getDouble("Y") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaLowerBendRadius() { - return (*m_poti)[0]->getDouble("RMAX") * CLHEP::cm; + return (*m_poti)[0]->getDouble("RMAX") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaWallThickness() { - return ((*m_poti)[0]->getDouble("RMAX") - (*m_poti)[0]->getDouble("RMIN")) * CLHEP::cm; + return ((*m_poti)[0]->getDouble("RMAX") - (*m_poti)[0]->getDouble("RMIN")) * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaLength() { - return 2. * (*m_poti)[0]->getDouble("DZ") * CLHEP::cm; + return 2. * (*m_poti)[0]->getDouble("DZ") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaStartY() { - return ((*m_posi)[0]->getDouble("Y") + 0.5*(*m_posi)[0]->getDouble("DY")) * CLHEP::cm; + return ((*m_posi)[0]->getDouble("Y") + 0.5*(*m_posi)[0]->getDouble("DY")) * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaEndY() { - return ((*m_posi)[1]->getDouble("Y") - 0.5*(*m_posi)[1]->getDouble("DY")) * CLHEP::cm; + return ((*m_posi)[1]->getDouble("Y") - 0.5*(*m_posi)[1]->getDouble("DY")) * GeoModelKernelUnits::cm; } // @@ -551,42 +552,42 @@ double PixelLegacyManager::PixelOmegaEndY() double PixelLegacyManager::PixelAlTubeUpperBendX() { - return (*m_poti)[5]->getDouble("X") * CLHEP::cm; + return (*m_poti)[5]->getDouble("X") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelAlTubeUpperBendY() { - return (*m_poti)[5]->getDouble("Y") * CLHEP::cm; + return (*m_poti)[5]->getDouble("Y") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelAlTubeUpperBendRadius() { - return (*m_poti)[5]->getDouble("RMAX") * CLHEP::cm; + return (*m_poti)[5]->getDouble("RMAX") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelAlTubeLowerBendX() { - return (*m_poti)[3]->getDouble("X") * CLHEP::cm; + return (*m_poti)[3]->getDouble("X") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelAlTubeLowerBendY() { - return (*m_poti)[3]->getDouble("Y") * CLHEP::cm; + return (*m_poti)[3]->getDouble("Y") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelAlTubeLowerBendRadius() { - return (*m_poti)[3]->getDouble("RMAX") * CLHEP::cm; + return (*m_poti)[3]->getDouble("RMAX") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelAlTubeWallThickness() { - return ((*m_poti)[3]->getDouble("RMAX") - (*m_poti)[3]->getDouble("RMIN")) * CLHEP::cm; + return ((*m_poti)[3]->getDouble("RMAX") - (*m_poti)[3]->getDouble("RMIN")) * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelAlTubeLength() { - return 2 * (*m_poti)[3]->getDouble("DZ") * CLHEP::cm; + return 2 * (*m_poti)[3]->getDouble("DZ") * GeoModelKernelUnits::cm; } // @@ -600,32 +601,32 @@ int PixelLegacyManager::PixelNumOmegaGlueElements() double PixelLegacyManager::PixelOmegaGlueStartX(int index) { - return ((*m_posi)[index+2]->getDouble("X") - 0.5*(*m_posi)[index+2]->getDouble("DX")) * CLHEP::cm; + return ((*m_posi)[index+2]->getDouble("X") - 0.5*(*m_posi)[index+2]->getDouble("DX")) * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaGlueThickness(int index) { - return (*m_posi)[index+2]->getDouble("DX") * CLHEP::cm; + return (*m_posi)[index+2]->getDouble("DX") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaGlueStartY(int index) { - return ((*m_posi)[index+2]->getDouble("Y") - 0.5*(*m_posi)[index+2]->getDouble("DY")) * CLHEP::cm; + return ((*m_posi)[index+2]->getDouble("Y") - 0.5*(*m_posi)[index+2]->getDouble("DY")) * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaGlueEndY(int index) { - return ((*m_posi)[index+2]->getDouble("Y") + 0.5*(*m_posi)[index+2]->getDouble("DY")) * CLHEP::cm; + return ((*m_posi)[index+2]->getDouble("Y") + 0.5*(*m_posi)[index+2]->getDouble("DY")) * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaGlueLength(int index) { - return 2 * (*m_posi)[index+2]->getDouble("DZ") * CLHEP::cm; + return 2 * (*m_posi)[index+2]->getDouble("DZ") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelOmegaGluePosZ(int index) { - return (*m_posi)[index+2]->getDouble("Z") * CLHEP::cm; + return (*m_posi)[index+2]->getDouble("Z") * GeoModelKernelUnits::cm; } int PixelLegacyManager::PixelOmegaGlueTypeNum(int index) @@ -639,24 +640,24 @@ int PixelLegacyManager::PixelOmegaGlueTypeNum(int index) double PixelLegacyManager::PixelFluidZ1(int index) { - double dz = (*m_pcff)[index%2]->getDouble("DZ")*CLHEP::cm; - double posz = (*m_pcff)[index%2]->getDouble("Z")*CLHEP::cm; + double dz = (*m_pcff)[index%2]->getDouble("DZ")*GeoModelKernelUnits::cm; + double posz = (*m_pcff)[index%2]->getDouble("Z")*GeoModelKernelUnits::cm; return posz-dz; } double PixelLegacyManager::PixelFluidZ2(int index) { - double dz = (*m_pcff)[index%2]->getDouble("DZ")*CLHEP::cm; - double posz = (*m_pcff)[index%2]->getDouble("Z")*CLHEP::cm; + double dz = (*m_pcff)[index%2]->getDouble("DZ")*GeoModelKernelUnits::cm; + double posz = (*m_pcff)[index%2]->getDouble("Z")*GeoModelKernelUnits::cm; return posz+dz; } double PixelLegacyManager::PixelFluidThick1(int index) { if (index < 2) { - return 2*(*m_pcff)[index%2]->getDouble("DX1")*CLHEP::cm; + return 2*(*m_pcff)[index%2]->getDouble("DX1")*GeoModelKernelUnits::cm; } else { - return 2*(*m_pcff)[index%2]->getDouble("DX2")*CLHEP::cm; + return 2*(*m_pcff)[index%2]->getDouble("DX2")*GeoModelKernelUnits::cm; } } @@ -664,26 +665,26 @@ double PixelLegacyManager::PixelFluidThick1(int index) double PixelLegacyManager::PixelFluidThick2(int index) { if (index < 2) { - return 2*(*m_pcff)[index%2]->getDouble("DX2")*CLHEP::cm; + return 2*(*m_pcff)[index%2]->getDouble("DX2")*GeoModelKernelUnits::cm; } else { - return 2*(*m_pcff)[index%2]->getDouble("DX1")*CLHEP::cm; + return 2*(*m_pcff)[index%2]->getDouble("DX1")*GeoModelKernelUnits::cm; } } double PixelLegacyManager::PixelFluidWidth(int index) { - return 2*(*m_pcff)[index%2]->getDouble("DY")*CLHEP::cm; + return 2*(*m_pcff)[index%2]->getDouble("DY")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelFluidX(int index) { - return (*m_pcff)[index%2]->getDouble("X")*CLHEP::cm; + return (*m_pcff)[index%2]->getDouble("X")*GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelFluidY(int index) { - return (*m_pcff)[index%2]->getDouble("Y")*CLHEP::cm; + return (*m_pcff)[index%2]->getDouble("Y")*GeoModelKernelUnits::cm; } int PixelLegacyManager::PixelFluidType(int index) @@ -715,17 +716,17 @@ int PixelLegacyManager::PixelFluidOrient(int layer, int phi) // double PixelLegacyManager::PixelPigtailThickness() { - return (*m_poai)[0]->getDouble("DX") * CLHEP::cm; + return (*m_poai)[0]->getDouble("DX") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelPigtailStartY() { - return -0.5*(*m_poai)[0]->getDouble("DY") * CLHEP::cm; + return -0.5*(*m_poai)[0]->getDouble("DY") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelPigtailEndY() { - return 0.5*(*m_poai)[0]->getDouble("DY") * CLHEP::cm; + return 0.5*(*m_poai)[0]->getDouble("DY") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelPigtailFlatWidthZ() @@ -733,59 +734,59 @@ double PixelLegacyManager::PixelPigtailFlatWidthZ() // Assume its actually the full width but in old geometry it was interpreted as a half width so we // multiply by 2. This gives the flat section twice the width of the curved section which I don't think was the // intention. - return 2*(*m_poai)[0]->getDouble("DZ") * CLHEP::cm; + return 2*(*m_poai)[0]->getDouble("DZ") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelPigtailWidthZ() { - return 2*(*m_pobi)[0]->getDouble("DZ") * CLHEP::cm; + return 2*(*m_pobi)[0]->getDouble("DZ") * GeoModelKernelUnits::cm; } // FIXME some weird offset double PixelLegacyManager::PixelPigtailPosX() { - return (*m_poai)[0]->getDouble("X") * CLHEP::cm + PixelLadderConnectorOffsetX(); + return (*m_poai)[0]->getDouble("X") * GeoModelKernelUnits::cm + PixelLadderConnectorOffsetX(); } double PixelLegacyManager::PixelPigtailPosZ() { - return (*m_poai)[0]->getDouble("Z") * CLHEP::cm; + return (*m_poai)[0]->getDouble("Z") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelPigtailBendX() { - return (*m_pobi)[0]->getDouble("X") * CLHEP::cm + PixelLadderConnectorOffsetX(); + return (*m_pobi)[0]->getDouble("X") * GeoModelKernelUnits::cm + PixelLadderConnectorOffsetX(); } double PixelLegacyManager::PixelPigtailBendY() { - return (*m_pobi)[0]->getDouble("Y") * CLHEP::cm + PixelLadderPigtailOffsetY(); + return (*m_pobi)[0]->getDouble("Y") * GeoModelKernelUnits::cm + PixelLadderPigtailOffsetY(); } double PixelLegacyManager::PixelPigtailBendRMin() { - return (*m_pobi)[0]->getDouble("RMIN") * CLHEP::cm; + return (*m_pobi)[0]->getDouble("RMIN") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelPigtailBendRMax() { - return (*m_pobi)[0]->getDouble("RMAX") * CLHEP::cm; + return (*m_pobi)[0]->getDouble("RMAX") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelPigtailBendPhiMin() { - return (*m_pobi)[0]->getDouble("PHI1") * CLHEP::deg; + return (*m_pobi)[0]->getDouble("PHI1") * GeoModelKernelUnits::deg; } double PixelLegacyManager::PixelPigtailBendPhiMax() { - return (*m_pobi)[0]->getDouble("PHI2") * CLHEP::deg; + return (*m_pobi)[0]->getDouble("PHI2") * GeoModelKernelUnits::deg; } double PixelLegacyManager::PixelPigtailEnvelopeLength() { // FIXME Check - return 2*(*m_posi)[9]->getDouble("DZ") * CLHEP::cm; + return 2*(*m_posi)[9]->getDouble("DZ") * GeoModelKernelUnits::cm; } // @@ -798,22 +799,22 @@ int PixelLegacyManager::PixelNumConnectorElements() double PixelLegacyManager::PixelConnectorWidthX(int index) { - return (*m_poai)[index+1]->getDouble("DX") * CLHEP::cm; + return (*m_poai)[index+1]->getDouble("DX") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelConnectorWidthY(int index) { - return (*m_poai)[index+1]->getDouble("DY") * CLHEP::cm; + return (*m_poai)[index+1]->getDouble("DY") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelConnectorWidthZ(int index) { - return 2*(*m_poai)[index+1]->getDouble("DZ") * CLHEP::cm; + return 2*(*m_poai)[index+1]->getDouble("DZ") * GeoModelKernelUnits::cm; } double PixelLegacyManager::PixelConnectorPosX(int index) { - return (*m_poai)[index+1]->getDouble("X") * CLHEP::cm + PixelLadderConnectorOffsetX(); + return (*m_poai)[index+1]->getDouble("X") * GeoModelKernelUnits::cm + PixelLadderConnectorOffsetX(); } double PixelLegacyManager::PixelConnectorPosY(int) @@ -823,8 +824,8 @@ double PixelLegacyManager::PixelConnectorPosY(int) double PixelLegacyManager::PixelConnectorPosZ(int index) { - // same as (*m_pobi)[0]->getDouble("Z") * CLHEP::cm; - return (*m_poai)[index+1]->getDouble("Z") * CLHEP::cm; + // same as (*m_pobi)[0]->getDouble("Z") * GeoModelKernelUnits::cm; + return (*m_poai)[index+1]->getDouble("Z") * GeoModelKernelUnits::cm; } @@ -907,19 +908,19 @@ int PixelLegacyManager::EmptyRowConnections(int index) double PixelLegacyManager::DesignRPActiveArea() { - return (*m_pxbi)[0]->getDouble("DYACTIVE")*CLHEP::cm; + return (*m_pxbi)[0]->getDouble("DYACTIVE")*GeoModelKernelUnits::cm; } double PixelLegacyManager::DesignZActiveArea() { - return (*m_pxbi)[0]->getDouble("DZELEB")*CLHEP::cm; + return (*m_pxbi)[0]->getDouble("DZELEB")*GeoModelKernelUnits::cm; } double PixelLegacyManager::DesignPitchRP(bool isBLayer) { int type = designType(isBLayer); - return (*m_pxbd)[type]->getDouble("PITCHRP")*CLHEP::cm; + return (*m_pxbd)[type]->getDouble("PITCHRP")*GeoModelKernelUnits::cm; } // FIXME m_dc1Geometry @@ -929,9 +930,9 @@ double PixelLegacyManager::DesignPitchZ(bool isBLayer) double pitchZ; if(isBLayer && m_dc1Geometry) { // Override NOVA - pitchZ = 300 * CLHEP::micrometer; + pitchZ = 300 * GeoModelKernelUnits::micrometer; } else { - pitchZ = (*m_pxbd)[type]->getDouble("PITCHZ") * CLHEP::cm; + pitchZ = (*m_pxbd)[type]->getDouble("PITCHZ") * GeoModelKernelUnits::cm; } return pitchZ; } @@ -944,12 +945,12 @@ double PixelLegacyManager::DesignPitchZLong(bool isBLayer) double PixelLegacyManager::DesignGapRP() { - return (*m_pdch)[0]->getDouble("GAPRP")*CLHEP::cm; + return (*m_pdch)[0]->getDouble("GAPRP")*GeoModelKernelUnits::cm; } double PixelLegacyManager::DesignGapZ() { - return (*m_pdch)[0]->getDouble("GAPZ")*CLHEP::cm; + return (*m_pdch)[0]->getDouble("GAPZ")*GeoModelKernelUnits::cm; } int PixelLegacyManager::DesignCircuitsEta() diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelLegacyManager.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelLegacyManager.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelLegacyManager.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelLegacyManager.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelMaterialMap.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelMaterialMap.cxx index de8662a400b..8ae48dc8c51 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelMaterialMap.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelMaterialMap.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/PixelMaterialMap.h" +#include "PixelMaterialMap.h" #include "GeometryDBSvc/IGeometryDBSvc.h" #include "RDBAccessSvc/IRDBRecordset.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelMaterialMap.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelMaterialMap.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelMaterialMap.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelMaterialMap.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelStaveTypes.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelStaveTypes.cxx index 1b09f63cf73..c6fd36caa6c 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelStaveTypes.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelStaveTypes.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/PixelStaveTypes.h" +#include "PixelStaveTypes.h" #include "GeometryDBSvc/IGeometryDBSvc.h" #include "RDBAccessSvc/IRDBRecordset.h" diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelStaveTypes.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelStaveTypes.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelStaveTypes.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelStaveTypes.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.cxx index ee874fb7919..ee273c1f38a 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#include "PixelGeoModel/PixelSwitches.h" +#include "PixelSwitches.h" PixelSwitches::PixelSwitches() : m_services(true), diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelSwitches.h b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.h similarity index 100% rename from InnerDetector/InDetDetDescr/PixelGeoModel/PixelGeoModel/PixelSwitches.h rename to InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelSwitches.h diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/components/PixelGeoModel_entries.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/components/PixelGeoModel_entries.cxx index 5e9ef7510a3..93750eecd12 100644 --- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/components/PixelGeoModel_entries.cxx +++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/components/PixelGeoModel_entries.cxx @@ -1,4 +1,4 @@ -#include "PixelGeoModel/PixelDetectorTool.h" +#include "../PixelDetectorTool.h" #include "PixelGeoModel/IBLParameterSvc.h" DECLARE_COMPONENT( PixelDetectorTool ) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt index 320b94bf0b9..edc57338d20 100644 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt @@ -9,8 +9,8 @@ atlas_subdir( SCT_GeoModel ) atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoPrimitives GaudiKernel InnerDetector/InDetDetDescr/InDetGeoModelUtils InnerDetector/InDetDetDescr/InDetReadoutGeometry @@ -26,22 +26,16 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: -atlas_add_library( SCT_GeoModelLib - src/*.cxx - PUBLIC_HEADERS SCT_GeoModel - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES SGTools AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier ) - atlas_add_component( SCT_GeoModel + src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier SCT_GeoModelLib ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h index 2f00b2724ef..922a69f6fce 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_GeneralParameters.h @@ -5,7 +5,7 @@ #ifndef SCT_GeoModel_SCT_GeneralParameters_H #define SCT_GeoModel_SCT_GeneralParameters_H -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <map> #include <string> @@ -31,7 +31,7 @@ public: double biasVoltage() const; double depletionVoltage() const; - const HepGeom::Transform3D & partTransform(const std::string & partName) const; + const GeoTrf::Transform3D & partTransform(const std::string & partName) const; bool partPresent(const std::string & partName) const; private: diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h index 44681ab41a5..fd91a3788d0 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_InnerSide.h @@ -10,8 +10,9 @@ #ifndef SCT_GEOMODEL_SCT_INNERSIDE_H #define SCT_GEOMODEL_SCT_INNERSIDE_H +#include "GeoPrimitives/GeoPrimitives.h" #include "SCT_GeoModel/SCT_ComponentFactory.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <string> @@ -42,8 +43,8 @@ public: double width() const {return m_width;} double length() const {return m_length;} - CLHEP::Hep3Vector * env1RefPointVector() const {return m_env1RefPointVector;} - CLHEP::Hep3Vector * env2RefPointVector() const {return m_env2RefPointVector;} + GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} + GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} // *** End of modified lines. ------------------ (00)********************************* @@ -76,8 +77,8 @@ private: // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (02)********************************* // *** -->> (02)********************************* - CLHEP::Hep3Vector * m_env1RefPointVector; - CLHEP::Hep3Vector * m_env2RefPointVector; + GeoTrf::Vector3D * m_env1RefPointVector; + GeoTrf::Vector3D * m_env2RefPointVector; // *** End of modified lines. ------------------ (02)********************************* }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h index c0e27493b5d..cd739b6b249 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Module.h @@ -5,10 +5,9 @@ #ifndef SCT_GEOMODEL_SCT_MODULE_H #define SCT_GEOMODEL_SCT_MODULE_H +#include "GeoPrimitives/GeoPrimitives.h" #include "SCT_GeoModel/SCT_ComponentFactory.h" - -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <string> @@ -46,8 +45,8 @@ public: double env2Width() const {return m_env2Width;} double env2Length() const {return m_env2Length;} - CLHEP::Hep3Vector * env1RefPointVector() const {return m_env1RefPointVector;} - CLHEP::Hep3Vector * env2RefPointVector() const {return m_env2RefPointVector;} + GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} + GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} double sensorGap() const {return m_sensorGap;} double stereoInner() const {return m_stereoInner;} @@ -97,12 +96,12 @@ private: const SCT_BaseBoard * m_baseBoard; //const SCT_Sensor * m_sensor; // 14:00 Thu 14th Jul 2005 D.Naito removed. - HepGeom::Transform3D * m_innerSidePos; - HepGeom::Transform3D * m_outerSidePos; - HepGeom::Translate3D * m_baseBoardPos; // 6th Apr 2005 S.Mima + GeoTrf::Transform3D * m_innerSidePos; + GeoTrf::Transform3D * m_outerSidePos; + GeoTrf::Translate3D * m_baseBoardPos; // 6th Apr 2005 S.Mima - CLHEP::Hep3Vector * m_env1RefPointVector; - CLHEP::Hep3Vector * m_env2RefPointVector; + GeoTrf::Vector3D * m_env1RefPointVector; + GeoTrf::Vector3D * m_env2RefPointVector; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h index cd458f9324e..d3fd0dab877 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_OuterSide.h @@ -5,9 +5,9 @@ #ifndef SCT_GEOMODEL_SCT_OUTERSIDE_H #define SCT_GEOMODEL_SCT_OUTERSIDE_H +#include "GeoPrimitives/GeoPrimitives.h" #include "SCT_GeoModel/SCT_ComponentFactory.h" -#include "CLHEP/Vector/ThreeVector.h" - +#include "GeoModelKernel/GeoDefinitions.h" #include <string> class GeoMaterial; @@ -38,8 +38,8 @@ public: double width() const {return m_width;} double length() const {return m_length;} - CLHEP::Hep3Vector * env1RefPointVector() const {return m_env1RefPointVector;} - CLHEP::Hep3Vector * env2RefPointVector() const {return m_env2RefPointVector;} + GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} + GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} const SCT_Hybrid * hybrid() const {return m_hybrid;} const SCT_Pigtail * pigtail() const {return m_pigtail;} @@ -67,8 +67,8 @@ private: GeoTransform * m_hybridPos; GeoTransform * m_pigtailPos; GeoTransform * m_sensorPos; - CLHEP::Hep3Vector * m_env1RefPointVector; - CLHEP::Hep3Vector * m_env2RefPointVector; + GeoTrf::Vector3D * m_env1RefPointVector; + GeoTrf::Vector3D * m_env2RefPointVector; }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h index 71491fd9bc3..63b03561170 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/SCT_GeoModel/SCT_Ski.h @@ -7,8 +7,8 @@ #include "SCT_GeoModel/SCT_ComponentFactory.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GeoModelKernel/GeoDefinitions.h" + #include <string> #include <vector> @@ -58,8 +58,8 @@ public: const SCT_CoolingPipe * coolingPipe() const {return m_coolingPipe;} GeoTransform * getRefPointTransform() const {return m_refPointTransform;} - CLHEP::Hep3Vector * env1RefPointVector() const {return m_env1RefPointVector;} - CLHEP::Hep3Vector * env2RefPointVector() const {return m_env2RefPointVector;} + GeoTrf::Vector3D * env1RefPointVector() const {return m_env1RefPointVector;} + GeoTrf::Vector3D * env2RefPointVector() const {return m_env2RefPointVector;} double env1Thickness() const {return m_env1Thickness;} double env1Width() const {return m_env1Width;} double env2Thickness() const {return m_env2Thickness;} @@ -124,9 +124,9 @@ private: GeoTransform * m_coolingPipePos; //! For calculations of envelopes of SCT_DetailLayer. - CLHEP::Hep3Vector * m_env1RefPointVector; + GeoTrf::Vector3D * m_env1RefPointVector; //! For calculations of envelopes of SCT_DetailLayer. - CLHEP::Hep3Vector * m_env2RefPointVector; + GeoTrf::Vector3D * m_env2RefPointVector; double m_env1Thickness; double m_env1Width; @@ -134,7 +134,7 @@ private: double m_env2Width; std::vector<GeoNameTag *> m_nameTag; - std::vector<HepGeom::Transform3D> m_modulePos; + std::vector<GeoTrf::Transform3D> m_modulePos; std::vector<GeoTransform *> m_doglegPos; std::vector<GeoTransform *> m_coolingBlockPos; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Barrel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Barrel.cxx index d23c7c67504..ce889524052 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Barrel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Barrel.cxx @@ -33,7 +33,7 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> @@ -59,7 +59,7 @@ SCT_Barrel::getParameters() m_thermalShieldEndWallThickness = parameters->thermalShieldEndCapThickness(); // Clearannce in z between layer and interlink. - m_zClearance = 1*CLHEP::mm; + m_zClearance = 1*GeoModelKernelUnits::mm; // Layer internal structure and services depend on geometry version m_isOldGeometry = parameters->isOldGeometry(); @@ -117,7 +117,7 @@ SCT_Barrel::build(SCT_Identifier id) const barrel->add(new GeoNameTag("Layer#"+intToString(iLayer))); barrel->add(new GeoIdentifierTag(iLayer)); // Identifier layer= iLayer id.setLayerDisk(iLayer); - GeoAlignableTransform * transform = new GeoAlignableTransform(HepGeom::Transform3D()); + GeoAlignableTransform * transform = new GeoAlignableTransform(GeoTrf::Transform3D::Identity()); barrel->add(transform); GeoVPhysVol * layerPV = layer.build(id); barrel->add(layerPV); @@ -129,18 +129,18 @@ SCT_Barrel::build(SCT_Identifier id) const // Build and place the interlinks double interLinkZPos = 0.; interLinkZPos = 0.5 * layerLength + m_zClearance + 0.5 * interLink.length(); - barrel->add(new GeoTransform(HepGeom::TranslateZ3D(+interLinkZPos))); + barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(+interLinkZPos))); barrel->add(interLink.getVolume()); - barrel->add(new GeoTransform(HepGeom::TranslateZ3D(-interLinkZPos))); + barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(-interLinkZPos))); barrel->add(interLink.getVolume()); // Build and place the cooling spiders double spiderZPos = 0.; SCT_Spider spider("Spider"); spiderZPos = interLinkZPos + 0.5*interLink.length() + 0.5*spider.length(); - barrel->add(new GeoTransform(HepGeom::TranslateZ3D(+spiderZPos))); + barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(+spiderZPos))); barrel->add(spider.getVolume()); - barrel->add(new GeoTransform(HepGeom::TranslateZ3D(-spiderZPos))); + barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(-spiderZPos))); barrel->add(spider.getVolume()); // Build and place the thermal shield. @@ -151,9 +151,9 @@ SCT_Barrel::build(SCT_Identifier id) const // Build and place SCT to Pixel attachment SCT_PixelAttachment pixelAttachment("AttachmentPixelToSCT"); - barrel->add(new GeoTransform(HepGeom::TranslateZ3D(+pixelAttachment.zPosition()))); // +ve z + barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(+pixelAttachment.zPosition()))); // +ve z barrel->add(pixelAttachment.getVolume()); - barrel->add(new GeoTransform(HepGeom::TranslateZ3D(-pixelAttachment.zPosition()))); // -ve z + barrel->add(new GeoTransform(GeoTrf::TranslateZ3D(-pixelAttachment.zPosition()))); // -ve z barrel->add(pixelAttachment.getVolume()); // Extra Material @@ -204,8 +204,8 @@ void SCT_Barrel::buildThermalShield(GeoFullPhysVol * parent) const const GeoMaterial* bulkheadMaterial = materials.getMaterialForVolume(bulkheadMaterialName,bulkheadShape->volume()); const GeoLogVol * bulkheadLog = new GeoLogVol("ThShieldBulkhead", bulkheadShape, bulkheadMaterial); GeoPhysVol * bulkhead = new GeoPhysVol(bulkheadLog); - GeoTransform * bulkheadPosPlus = new GeoTransform(HepGeom::TranslateZ3D(+(endPanelZMax-endPanelThickness-0.5*bulkheadThickness))); - GeoTransform * bulkheadPosMinus = new GeoTransform(HepGeom::TranslateZ3D(-(endPanelZMax-endPanelThickness-0.5*bulkheadThickness))); + GeoTransform * bulkheadPosPlus = new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-endPanelThickness-0.5*bulkheadThickness))); + GeoTransform * bulkheadPosMinus = new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-endPanelThickness-0.5*bulkheadThickness))); parent->add(bulkheadPosPlus); parent->add(bulkhead); parent->add(bulkheadPosMinus); @@ -216,8 +216,8 @@ void SCT_Barrel::buildThermalShield(GeoFullPhysVol * parent) const const GeoMaterial* endPanelMaterial = materials.getMaterialForVolume(endPanelMaterialName,endPanelShape->volume()); const GeoLogVol * endPanelLog = new GeoLogVol("ThShieldEndPanel", endPanelShape, endPanelMaterial); GeoPhysVol * endPanel = new GeoPhysVol(endPanelLog); - GeoTransform * endPanelPosPlus = new GeoTransform(HepGeom::TranslateZ3D(+(endPanelZMax-0.5*endPanelThickness))); - GeoTransform * endPanelPosMinus = new GeoTransform(HepGeom::TranslateZ3D(-(endPanelZMax-0.5*endPanelThickness))); + GeoTransform * endPanelPosPlus = new GeoTransform(GeoTrf::TranslateZ3D(+(endPanelZMax-0.5*endPanelThickness))); + GeoTransform * endPanelPosMinus = new GeoTransform(GeoTrf::TranslateZ3D(-(endPanelZMax-0.5*endPanelThickness))); parent->add(endPanelPosPlus); parent->add(endPanel); parent->add(endPanelPosMinus); @@ -263,8 +263,8 @@ void SCT_Barrel::buildEMIShield(GeoFullPhysVol * parent) const } else { const GeoTube* cutOut = new GeoTube(innerRadius, outerRadius, 0.5*pixelAttachmentLength); // std::cout << "Cut-out volume = " << cutOut->volume() << std::endl; - const GeoShape* emiTemp = (GeoShape*)&(emiShieldTube->subtract(*cutOut << HepGeom::TranslateZ3D(pixelAttachmentZpos))); - emiShieldShape = (GeoShape*)&emiTemp->subtract(*cutOut << HepGeom::TranslateZ3D(-pixelAttachmentZpos)); + const GeoShape* emiTemp = (GeoShape*)&(emiShieldTube->subtract(*cutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos))); + emiShieldShape = (GeoShape*)&emiTemp->subtract(*cutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos)); double emiVolume = emiShieldTube->volume() - 2. * cutOut->volume(); // std::cout << "EMI final volume = " << emiVolume << std::endl; material = materials.getMaterialForVolume(materialName, emiVolume); @@ -277,13 +277,13 @@ void SCT_Barrel::buildEMIShield(GeoFullPhysVol * parent) const if (!m_isOldGeometry) { double dphi = jointRPhi / outerRadius; const GeoTubs* emiJointTubs = new GeoTubs(outerRadius, outerRadius+jointDeltaR, 0.5*length, - -0.5 * dphi * CLHEP::radian, dphi * CLHEP::radian); + -0.5 * dphi * GeoModelKernelUnits::radian, dphi * GeoModelKernelUnits::radian); // std::cout << "EMIJoint tubs volume = " << emiJointTubs->volume() << std::endl; const GeoTubs* jointCutOut = new GeoTubs(outerRadius, outerRadius+jointDeltaR, 0.5*pixelAttachmentLength, - -0.5 * dphi * CLHEP::radian, dphi * CLHEP::radian); + -0.5 * dphi * GeoModelKernelUnits::radian, dphi * GeoModelKernelUnits::radian); // std::cout << "Cut-out volume = " << jointCutOut->volume() << std::endl; - const GeoShape* jointTemp = (GeoShape*)&(emiJointTubs->subtract(*jointCutOut << HepGeom::TranslateZ3D(pixelAttachmentZpos))); - const GeoShape* emiJointShape = (GeoShape*)&jointTemp->subtract(*jointCutOut << HepGeom::TranslateZ3D(-pixelAttachmentZpos)); + const GeoShape* jointTemp = (GeoShape*)&(emiJointTubs->subtract(*jointCutOut << GeoTrf::TranslateZ3D(pixelAttachmentZpos))); + const GeoShape* emiJointShape = (GeoShape*)&jointTemp->subtract(*jointCutOut << GeoTrf::TranslateZ3D(-pixelAttachmentZpos)); double jointVolume = emiJointTubs->volume() - 2. * jointCutOut->volume(); // std::cout << "EMIJoint final volume = " << jointVolume << std::endl; const GeoMaterial * jointMaterial = materials.getMaterialForVolume(jointMaterialName, jointVolume); @@ -291,8 +291,8 @@ void SCT_Barrel::buildEMIShield(GeoFullPhysVol * parent) const GeoPhysVol * emiJoint = new GeoPhysVol(emiJointLog); // Place 3 copies for (int i=0; i<3; i++) { - double angle = (90. + i * 120.) * CLHEP::degree; - parent->add(new GeoTransform(HepGeom::RotateZ3D(angle))); + double angle = (90. + i * 120.) * GeoModelKernelUnits::degree; + parent->add(new GeoTransform(GeoTrf::RotateZ3D(angle))); parent->add(emiJoint); } } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelModuleParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelModuleParameters.cxx index 526214f557a..5e9b1e1dc34 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelModuleParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelModuleParameters.cxx @@ -9,7 +9,7 @@ #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> @@ -19,16 +19,16 @@ using std::abs; // A few hard wired numbers (some of which should go in NOVA) // /* -const double SCT_MODULE_HYBRID_OFFSET = 5.0 * CLHEP::mm; // Planar distance from center of sensor to edge of hybrid. +const double SCT_MODULE_HYBRID_OFFSET = 5.0 * GeoModelKernelUnits::mm; // Planar distance from center of sensor to edge of hybrid. const int STEREO_UPPER_SIGN = -1; // Sign of stereo rotation of upper sensor with axis going // from lower to upper const double PITCH = 80 * micrometer; -const double HALF_ACTIVE_STRIP_LENGTH = 31 * CLHEP::mm; -const double NOMINAL_WAFER_LENGTH = 63.960 * CLHEP::mm; -const double REF_DISTANCE_BETWEEN_FIDUCIALS = 2.19 * CLHEP::mm; -const double DISTANCE_CORNER_MARK_TO_CENTER = 31.750 * CLHEP::mm; -const double DISTANCE_CORNER_MARK_TO_FIDUCIAL = 0.8 * CLHEP::mm; +const double HALF_ACTIVE_STRIP_LENGTH = 31 * GeoModelKernelUnits::mm; +const double NOMINAL_WAFER_LENGTH = 63.960 * GeoModelKernelUnits::mm; +const double REF_DISTANCE_BETWEEN_FIDUCIALS = 2.19 * GeoModelKernelUnits::mm; +const double DISTANCE_CORNER_MARK_TO_CENTER = 31.750 * GeoModelKernelUnits::mm; +const double DISTANCE_CORNER_MARK_TO_FIDUCIAL = 0.8 * GeoModelKernelUnits::mm; const double DISTANCE_CENTER_TO_CENTER = 2 * (DISTANCE_CORNER_MARK_TO_CENTER - DISTANCE_CORNER_MARK_TO_FIDUCIAL) + REF_DISTANCE_BETWEEN_FIDUCIALS; @@ -45,19 +45,19 @@ SCT_BarrelModuleParameters::SCT_BarrelModuleParameters() double SCT_BarrelModuleParameters::sensorThickness() const { - return m_rdb->brlSensor()->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->brlSensor()->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::sensorWidth() const { - return m_rdb->brlSensor()->getDouble("WIDTH") * CLHEP::mm; + return m_rdb->brlSensor()->getDouble("WIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::sensorLength() const { - return m_rdb->brlSensor()->getDouble("WAFERLENGTH") * CLHEP::mm; + return m_rdb->brlSensor()->getDouble("WAFERLENGTH") * GeoModelKernelUnits::mm; } int @@ -75,20 +75,20 @@ SCT_BarrelModuleParameters::sensorMaterial() const double SCT_BarrelModuleParameters::sensorDistCenterToCenter() const { - return 2 * m_rdb->brlSensor()->getDouble("CENTERTOFIDUCIAL") * CLHEP::mm - + m_rdb->brlSensor()->getDouble("FIDUCIALSEP") * CLHEP::mm; + return 2 * m_rdb->brlSensor()->getDouble("CENTERTOFIDUCIAL") * GeoModelKernelUnits::mm + + m_rdb->brlSensor()->getDouble("FIDUCIALSEP") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::sensorStripLength() const { - return 2 * m_rdb->brlSensor()->getDouble("ACTIVEHALFLENGTH") * CLHEP::mm; + return 2 * m_rdb->brlSensor()->getDouble("ACTIVEHALFLENGTH") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::sensorStripPitch() const { - return m_rdb->brlSensor()->getDouble("STRIPPITCH") * CLHEP::mm; + return m_rdb->brlSensor()->getDouble("STRIPPITCH") * GeoModelKernelUnits::mm; } int @@ -118,19 +118,19 @@ SCT_BarrelModuleParameters::sensorStripShift() const double SCT_BarrelModuleParameters::baseBoardThickness() const { - return m_rdb->brlModule()->getDouble("BASEBOARDTHICKNESS") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("BASEBOARDTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::baseBoardWidth() const { - return m_rdb->brlModule()->getDouble("BASEBOARDWIDTH") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("BASEBOARDWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::baseBoardLength() const { - return m_rdb->brlModule()->getDouble("BASEBOARDLENGTH") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("BASEBOARDLENGTH") * GeoModelKernelUnits::mm; } std::string @@ -142,13 +142,13 @@ SCT_BarrelModuleParameters::baseBoardMaterial() const double SCT_BarrelModuleParameters::baseBoardOffsetY() const { - return m_rdb->brlModule()->getDouble("BASEBOARDOFFSETY") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("BASEBOARDOFFSETY") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::baseBoardOffsetZ() const { - return m_rdb->brlModule()->getDouble("BASEBOARDOFFSETZ") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("BASEBOARDOFFSETZ") * GeoModelKernelUnits::mm; } // @@ -157,19 +157,19 @@ SCT_BarrelModuleParameters::baseBoardOffsetZ() const double SCT_BarrelModuleParameters::hybridThickness() const { - return m_rdb->brlModule()->getDouble("HYBRIDTHICKNESS") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("HYBRIDTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::hybridWidth() const { - return m_rdb->brlModule()->getDouble("HYBRIDWIDTH") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("HYBRIDWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::hybridLength() const { - return m_rdb->brlModule()->getDouble("HYBRIDLENGTH") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("HYBRIDLENGTH") * GeoModelKernelUnits::mm; } std::string @@ -181,13 +181,13 @@ SCT_BarrelModuleParameters::hybridMaterial() const double SCT_BarrelModuleParameters::hybridOffsetX() const { - return m_rdb->brlModule()->getDouble("HYBRIDOFFSETX") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("HYBRIDOFFSETX") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::hybridOffsetZ() const { - return m_rdb->brlModule()->getDouble("HYBRIDOFFSETZ") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("HYBRIDOFFSETZ") * GeoModelKernelUnits::mm; } // @@ -196,19 +196,19 @@ SCT_BarrelModuleParameters::hybridOffsetZ() const double SCT_BarrelModuleParameters::pigtailThickness() const { - return m_rdb->brlModule()->getDouble("PIGTAILTHICKNESS") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("PIGTAILTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::pigtailWidth() const { - return m_rdb->brlModule()->getDouble("PIGTAILWIDTH") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("PIGTAILWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::pigtailLength() const { - return m_rdb->brlModule()->getDouble("PIGTAILLENGTH") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("PIGTAILLENGTH") * GeoModelKernelUnits::mm; } std::string @@ -242,14 +242,14 @@ SCT_BarrelModuleParameters::moduleUpperSideNumber() const double SCT_BarrelModuleParameters::moduleStereoAngle() const { - return m_rdb->brlModule()->getDouble("STEREOANGLE") * CLHEP::milliradian; + return m_rdb->brlModule()->getDouble("STEREOANGLE") * GeoModelKernelUnits::milliradian; } double SCT_BarrelModuleParameters::moduleSensorToSensorGap() const { - return m_rdb->brlModule()->getDouble("SENSORTOSENSORGAP") * CLHEP::mm; + return m_rdb->brlModule()->getDouble("SENSORTOSENSORGAP") * GeoModelKernelUnits::mm; } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelParameters.cxx index 8347fe542b0..ae69ebf0f09 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_BarrelParameters.cxx @@ -8,9 +8,7 @@ #include "SCT_GeoModel/SCT_DataBase.h" #include "RDBAccessSvc/IRDBRecord.h" - - -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> #include <iostream> @@ -34,7 +32,7 @@ SCT_BarrelParameters::skiFirstStagger() const double SCT_BarrelParameters::skiRadialSep() const { - return m_rdb->brlSki()->getDouble("SKIRADIALSEP") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("SKIRADIALSEP") * GeoModelKernelUnits::mm; } int @@ -46,7 +44,7 @@ SCT_BarrelParameters::modulesPerSki() const double SCT_BarrelParameters::skiZPosition(int index) const { - return m_rdb->brlSkiZ(index)->getDouble("ZPOSITION") * CLHEP::mm; + return m_rdb->brlSkiZ(index)->getDouble("ZPOSITION") * GeoModelKernelUnits::mm; } int @@ -61,7 +59,7 @@ SCT_BarrelParameters::skiModuleIdentifier(int index) const double SCT_BarrelParameters::tilt(int iLayer) const { - return m_rdb->brlLayer(iLayer)->getDouble("TILT") * CLHEP::degree; + return m_rdb->brlLayer(iLayer)->getDouble("TILT") * GeoModelKernelUnits::degree; } int @@ -74,7 +72,7 @@ SCT_BarrelParameters::layerStereoSign(int iLayer) const double SCT_BarrelParameters::radius(int iLayer) const { - return m_rdb->brlLayer(iLayer)->getDouble("RADIUS") * CLHEP::mm; + return m_rdb->brlLayer(iLayer)->getDouble("RADIUS") * GeoModelKernelUnits::mm; } int @@ -86,7 +84,7 @@ SCT_BarrelParameters::skisPerLayer(int iLayer) const double SCT_BarrelParameters::layerBracketPhiOffset(int iLayer) const { - return m_rdb->brlLayer(iLayer)->getDouble("BRACKETPHIOFFSET") * CLHEP::deg; + return m_rdb->brlLayer(iLayer)->getDouble("BRACKETPHIOFFSET") * GeoModelKernelUnits::deg; } double @@ -95,9 +93,9 @@ SCT_BarrelParameters::layerPhiOfRefModule(int iLayer) const // For backward compatibility, if field is null return (90 - tilt) // as ref module is horizontal in old versions. if (m_rdb->brlLayer(iLayer)->isFieldNull("PHIOFREFMODULE")) { - return 90*CLHEP::deg - tilt(iLayer); + return 90*GeoModelKernelUnits::deg - tilt(iLayer); } - return m_rdb->brlLayer(iLayer)->getDouble("PHIOFREFMODULE") * CLHEP::deg; + return m_rdb->brlLayer(iLayer)->getDouble("PHIOFREFMODULE") * GeoModelKernelUnits::deg; } @@ -107,19 +105,19 @@ SCT_BarrelParameters::layerPhiOfRefModule(int iLayer) const double SCT_BarrelParameters::bracketThickness() const { - return m_rdb->brlSki()->getDouble("BRACKETTHICKNESS") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("BRACKETTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::bracketWidth() const { - return m_rdb->brlSki()->getDouble("BRACKETWIDTH") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("BRACKETWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::bracketLength() const { - return m_rdb->brlSki()->getDouble("BRACKETLENGTH") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("BRACKETLENGTH") * GeoModelKernelUnits::mm; } std::string @@ -134,19 +132,19 @@ SCT_BarrelParameters::bracketMaterial() const double SCT_BarrelParameters::doglegThickness() const { - return m_rdb->brlSki()->getDouble("DOGLEGTHICKNESS") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("DOGLEGTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::doglegWidth() const { - return m_rdb->brlSki()->getDouble("DOGLEGWIDTH") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("DOGLEGWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::doglegLength() const { - return m_rdb->brlSki()->getDouble("DOGLEGLENGTH") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("DOGLEGLENGTH") * GeoModelKernelUnits::mm; } std::string @@ -158,13 +156,13 @@ SCT_BarrelParameters::doglegMaterial() const double SCT_BarrelParameters::doglegOffsetX() const { - return m_rdb->brlSki()->getDouble("DOGLEGOFFSETX") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("DOGLEGOFFSETX") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::doglegOffsetY() const { - return m_rdb->brlSki()->getDouble("DOGLEGOFFSETY") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("DOGLEGOFFSETY") * GeoModelKernelUnits::mm; } // @@ -173,19 +171,19 @@ SCT_BarrelParameters::doglegOffsetY() const double SCT_BarrelParameters::coolingBlockThickness() const { - return m_rdb->brlSki()->getDouble("COOLINGBLOCKTHICK") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGBLOCKTHICK") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::coolingBlockWidth() const { - return m_rdb->brlSki()->getDouble("COOLINGBLOCKWIDTH") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGBLOCKWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::coolingBlockLength() const { - return m_rdb->brlSki()->getDouble("COOLINGBLOCKLENGTH") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGBLOCKLENGTH") * GeoModelKernelUnits::mm; } std::string @@ -197,19 +195,19 @@ SCT_BarrelParameters::coolingBlockMaterial() const double SCT_BarrelParameters::coolingBlockOffsetX() const { - return m_rdb->brlSki()->getDouble("COOLINGBLOCKOFFSETX") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGBLOCKOFFSETX") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::coolingBlockOffsetY() const { - return m_rdb->brlSki()->getDouble("COOLINGBLOCKOFFSETY") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGBLOCKOFFSETY") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::coolingBlockOffsetZ() const { - return m_rdb->brlSki()->getDouble("COOLINGBLOCKOFFSETZ") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGBLOCKOFFSETZ") * GeoModelKernelUnits::mm; } // @@ -218,7 +216,7 @@ SCT_BarrelParameters::coolingBlockOffsetZ() const double SCT_BarrelParameters::coolingPipeRadius() const { - return m_rdb->brlSki()->getDouble("COOLINGPIPERADIUS") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGPIPERADIUS") * GeoModelKernelUnits::mm; } std::string @@ -230,13 +228,13 @@ SCT_BarrelParameters::coolingPipeMaterial() const double SCT_BarrelParameters::coolingPipeOffsetX() const { - return m_rdb->brlSki()->getDouble("COOLINGPIPEOFFSETX") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGPIPEOFFSETX") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::coolingPipeOffsetY() const { - return m_rdb->brlSki()->getDouble("COOLINGPIPEOFFSETY") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("COOLINGPIPEOFFSETY") * GeoModelKernelUnits::mm; } @@ -246,13 +244,13 @@ SCT_BarrelParameters::coolingPipeOffsetY() const double SCT_BarrelParameters::powerTapeThickness() const { - return m_rdb->brlSki()->getDouble("POWERTAPETHICKNESS") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("POWERTAPETHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::powerTapeWidth() const { - return m_rdb->brlSki()->getDouble("POWERTAPEWIDTH") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("POWERTAPEWIDTH") * GeoModelKernelUnits::mm; } std::string @@ -264,7 +262,7 @@ SCT_BarrelParameters::powerTapeMaterial() const double SCT_BarrelParameters::powerTapeStartPointOffset() const { - return m_rdb->brlSki()->getDouble("POWERTAPESTARTOFFSET") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("POWERTAPESTARTOFFSET") * GeoModelKernelUnits::mm; } // @@ -273,13 +271,13 @@ SCT_BarrelParameters::powerTapeStartPointOffset() const double SCT_BarrelParameters::harnessThickness() const { - return m_rdb->brlSki()->getDouble("HARNESSTHICKNESS") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("HARNESSTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::harnessWidth() const { - return m_rdb->brlSki()->getDouble("HARNESSWIDTH") * CLHEP::mm; + return m_rdb->brlSki()->getDouble("HARNESSWIDTH") * GeoModelKernelUnits::mm; } std::string @@ -294,7 +292,7 @@ SCT_BarrelParameters::harnessMaterial() const double SCT_BarrelParameters::supportCylInnerRadius(int iLayer) const { - return m_rdb->brlServPerLayer(iLayer)->getDouble("SUPPORTCYLINNERRAD") * CLHEP::mm; + return m_rdb->brlServPerLayer(iLayer)->getDouble("SUPPORTCYLINNERRAD") * GeoModelKernelUnits::mm; } double @@ -306,7 +304,7 @@ SCT_BarrelParameters::supportCylOuterRadius(int iLayer) const double SCT_BarrelParameters::supportCylDeltaR(int iLayer) const { - return m_rdb->brlServPerLayer(iLayer)->getDouble("SUPPORTCYLDELTAR") * CLHEP::mm; + return m_rdb->brlServPerLayer(iLayer)->getDouble("SUPPORTCYLDELTAR") * GeoModelKernelUnits::mm; } std::string @@ -322,13 +320,13 @@ SCT_BarrelParameters::supportCylMaterial(int iLayer) const double SCT_BarrelParameters::flangeDeltaZ(int iLayer) const { - return m_rdb->brlServPerLayer(iLayer)->getDouble("FLANGEDELTAZ") * CLHEP::mm; + return m_rdb->brlServPerLayer(iLayer)->getDouble("FLANGEDELTAZ") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::flangeDeltaR(int iLayer) const { - return m_rdb->brlServPerLayer(iLayer)->getDouble("FLANGEDELTAR") * CLHEP::mm; + return m_rdb->brlServPerLayer(iLayer)->getDouble("FLANGEDELTAR") * GeoModelKernelUnits::mm; } std::string @@ -343,13 +341,13 @@ SCT_BarrelParameters::flangeMaterial(int iLayer) const double SCT_BarrelParameters::clampDeltaZ(int iLayer) const { - return m_rdb->brlServPerLayer(iLayer)->getDouble("CLAMPDELTAZ") * CLHEP::mm; + return m_rdb->brlServPerLayer(iLayer)->getDouble("CLAMPDELTAZ") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::clampDeltaR(int iLayer) const { - return m_rdb->brlServPerLayer(iLayer)->getDouble("CLAMPDELTAR") * CLHEP::mm; + return m_rdb->brlServPerLayer(iLayer)->getDouble("CLAMPDELTAR") * GeoModelKernelUnits::mm; } std::string @@ -364,7 +362,7 @@ SCT_BarrelParameters::clampMaterial(int iLayer) const double SCT_BarrelParameters::coolingEndDeltaR(int iLayer) const { - return m_rdb->brlServPerLayer(iLayer)->getDouble("COOLINGENDDELTAR") * CLHEP::mm; + return m_rdb->brlServPerLayer(iLayer)->getDouble("COOLINGENDDELTAR") * GeoModelKernelUnits::mm; } std::string @@ -379,7 +377,7 @@ SCT_BarrelParameters::coolingEndMaterial(int iLayer) const double SCT_BarrelParameters::closeOutDeltaZ(int iLayer) const { - return m_rdb->brlServPerLayer(iLayer)->getDouble("CLOSEOUTDELTAZ") * CLHEP::mm; + return m_rdb->brlServPerLayer(iLayer)->getDouble("CLOSEOUTDELTAZ") * GeoModelKernelUnits::mm; } std::string @@ -394,19 +392,19 @@ SCT_BarrelParameters::closeOutMaterial(int iLayer) const double SCT_BarrelParameters::interLinkDeltaZ() const { - return m_rdb->brlServices()->getDouble("INTERLINKDELTAZ") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("INTERLINKDELTAZ") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::interLinkInnerRadius() const { - return m_rdb->brlServices()->getDouble("INTERLINKINNERRADIUS") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("INTERLINKINNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::interLinkOuterRadius() const { - return m_rdb->brlServices()->getDouble("INTERLINKOUTERRADIUS") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("INTERLINKOUTERRADIUS") * GeoModelKernelUnits::mm; } std::string @@ -419,9 +417,9 @@ double SCT_BarrelParameters::interLinkDeltaPhi() const { if (m_rdb->brlServices()->isFieldNull("INTERLINKDPHI")) { - return 360.*CLHEP::deg; + return 360.*GeoModelKernelUnits::deg; } - return m_rdb->brlServices()->getDouble("INTERLINKDPHI") * CLHEP::deg; + return m_rdb->brlServices()->getDouble("INTERLINKDPHI") * GeoModelKernelUnits::deg; } double @@ -430,7 +428,7 @@ SCT_BarrelParameters::interLinkPhiPos() const if (m_rdb->brlServices()->isFieldNull("INTERLINKPHIPOS")) { return 0.; } - return m_rdb->brlServices()->getDouble("INTERLINKPHIPOS") * CLHEP::deg; + return m_rdb->brlServices()->getDouble("INTERLINKPHIPOS") * GeoModelKernelUnits::deg; } int @@ -448,7 +446,7 @@ SCT_BarrelParameters::bearingDeltaPhi() const if (m_rdb->brlServices()->isFieldNull("BEARINGDPHI")) { return 0.; } - return m_rdb->brlServices()->getDouble("BEARINGDPHI") * CLHEP::deg; + return m_rdb->brlServices()->getDouble("BEARINGDPHI") * GeoModelKernelUnits::deg; } double @@ -457,7 +455,7 @@ SCT_BarrelParameters::bearingPhiPos() const if (m_rdb->brlServices()->isFieldNull("BEARINGPHIPOS")) { return 0.; } - return m_rdb->brlServices()->getDouble("BEARINGPHIPOS") * CLHEP::deg; + return m_rdb->brlServices()->getDouble("BEARINGPHIPOS") * GeoModelKernelUnits::deg; } int @@ -491,13 +489,13 @@ SCT_BarrelParameters::includeFSI() const double SCT_BarrelParameters::fsiFlangeInnerRadius() const { - return m_rdb->brlFSI()->getDouble("FLANGEINNERRADIUS") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("FLANGEINNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::fsiFlangeOuterRadius() const { - return m_rdb->brlFSI()->getDouble("FLANGEOUTERRADIUS") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("FLANGEOUTERRADIUS") * GeoModelKernelUnits::mm; } std::string @@ -509,7 +507,7 @@ SCT_BarrelParameters::fsiFlangeMaterial() const double SCT_BarrelParameters::fsiFibreMaskDeltaR() const { - return m_rdb->brlFSI()->getDouble("FIBREMASKDELTAR") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("FIBREMASKDELTAR") * GeoModelKernelUnits::mm; } std::string @@ -521,19 +519,19 @@ SCT_BarrelParameters::fsiFibreMaskMaterial() const double SCT_BarrelParameters::fsiEndJewelRadialWidth() const { - return m_rdb->brlFSI()->getDouble("ENDJEWELRADIALWIDTH") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("ENDJEWELRADIALWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::fsiEndJewelRPhiWidth() const { - return m_rdb->brlFSI()->getDouble("ENDJEWELRPHIWIDTH") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("ENDJEWELRPHIWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::fsiEndJewelLength() const { - return m_rdb->brlFSI()->getDouble("ENDJEWELLENGTH") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("ENDJEWELLENGTH") * GeoModelKernelUnits::mm; } std::string @@ -551,31 +549,31 @@ SCT_BarrelParameters::fsiEndJewelNRepeat(int iLayer) const double SCT_BarrelParameters::fsiEndJewelPhi(int iLayer) const { - return m_rdb->brlFSILocation(iLayer)->getDouble("ENDJEWELPHI") * CLHEP::degree; + return m_rdb->brlFSILocation(iLayer)->getDouble("ENDJEWELPHI") * GeoModelKernelUnits::degree; } double SCT_BarrelParameters::fsiEndJewelZ(int iLayer) const { - return m_rdb->brlFSILocation(iLayer)->getDouble("ENDJEWELZ") * CLHEP::mm; + return m_rdb->brlFSILocation(iLayer)->getDouble("ENDJEWELZ") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::fsiScorpionRadialWidth() const { - return m_rdb->brlFSI()->getDouble("SCORPIONRADIALWIDTH") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("SCORPIONRADIALWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::fsiScorpionRPhiWidth() const { - return m_rdb->brlFSI()->getDouble("SCORPIONRPHIWIDTH") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("SCORPIONRPHIWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::fsiScorpionLength() const { - return m_rdb->brlFSI()->getDouble("SCORPIONLENGTH") * CLHEP::mm; + return m_rdb->brlFSI()->getDouble("SCORPIONLENGTH") * GeoModelKernelUnits::mm; } std::string @@ -593,13 +591,13 @@ SCT_BarrelParameters::fsiScorpionNRepeat(int iLayer) const double SCT_BarrelParameters::fsiScorpionPhi(int iLayer) const { - return m_rdb->brlFSILocation(iLayer)->getDouble("SCORPIONPHI") * CLHEP::degree; + return m_rdb->brlFSILocation(iLayer)->getDouble("SCORPIONPHI") * GeoModelKernelUnits::degree; } double SCT_BarrelParameters::fsiScorpionZ(int iLayer) const { - return m_rdb->brlFSILocation(iLayer)->getDouble("SCORPIONZ") * CLHEP::mm; + return m_rdb->brlFSILocation(iLayer)->getDouble("SCORPIONZ") * GeoModelKernelUnits::mm; } @@ -609,19 +607,19 @@ SCT_BarrelParameters::fsiScorpionZ(int iLayer) const double SCT_BarrelParameters::spiderDeltaZ() const { - return m_rdb->brlServices()->getDouble("SPIDERDELTAZ") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("SPIDERDELTAZ") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::spiderInnerRadius() const { - return m_rdb->brlServices()->getDouble("SPIDERINNERRADIUS") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("SPIDERINNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::spiderOuterRadius() const { - return m_rdb->brlServices()->getDouble("SPIDEROUTERRADIUS") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("SPIDEROUTERRADIUS") * GeoModelKernelUnits::mm; } std::string @@ -636,85 +634,85 @@ SCT_BarrelParameters::spiderMaterial() const double SCT_BarrelParameters::thermalShieldInnerRadius() const { - return m_rdb->brlThermalShield()->getDouble("INNERRADIUS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldOuterRadius() const { - return m_rdb->brlThermalShield()->getDouble("OUTERRADIUS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("OUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldEndZMax() const { - return m_rdb->brlThermalShield()->getDouble("ENDZMAX") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("ENDZMAX") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldCylTotalThickness() const { - return m_rdb->brlThermalShield()->getDouble("CYLTOTALTHICKNESS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("CYLTOTALTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldCylInnerWallThickness() const { - return m_rdb->brlThermalShield()->getDouble("CYLINNERWALLTHICK") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("CYLINNERWALLTHICK") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldCylOuterWallThickness() const { - return m_rdb->brlThermalShield()->getDouble("CYLOUTERWALLTHICK") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("CYLOUTERWALLTHICK") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldSpacerZWidth() const { - return m_rdb->brlThermalShield()->getDouble("SPACERZWIDTH") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("SPACERZWIDTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldFirstSpacerZMin() const { - return m_rdb->brlThermalShield()->getDouble("FIRSTSPACERZMIN") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("FIRSTSPACERZMIN") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldEndCapCylThickness() const { - return m_rdb->brlThermalShield()->getDouble("ENDCAPCYLTHICKNESS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("ENDCAPCYLTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldEndCapThickness() const { - return m_rdb->brlThermalShield()->getDouble("ENDCAPTHICKNESS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("ENDCAPTHICKNESS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldBulkheadInnerRadius() const { - return m_rdb->brlThermalShield()->getDouble("BULKHEADINNERRADIUS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("BULKHEADINNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldBulkheadOuterRadius() const { - return m_rdb->brlThermalShield()->getDouble("BULKHEADOUTERRADIUS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("BULKHEADOUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldEndPanelInnerRadius() const { - return m_rdb->brlThermalShield()->getDouble("ENDPANELINNERRADIUS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("ENDPANELINNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::thermalShieldEndPanelOuterRadius() const { - return m_rdb->brlThermalShield()->getDouble("ENDPANELOUTERRADIUS") * CLHEP::mm; + return m_rdb->brlThermalShield()->getDouble("ENDPANELOUTERRADIUS") * GeoModelKernelUnits::mm; } std::string @@ -747,19 +745,19 @@ SCT_BarrelParameters::thermalShieldMaterialInnerSect() const double SCT_BarrelParameters::emiShieldInnerRadius() const { - return m_rdb->brlServices()->getDouble("EMIINNERRADIUS") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("EMIINNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::emiShieldDeltaR() const { - return m_rdb->brlServices()->getDouble("EMIDELTAR") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("EMIDELTAR") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::emiShieldZMax() const { - return m_rdb->brlServices()->getDouble("EMIZMAX") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("EMIZMAX") * GeoModelKernelUnits::mm; } std::string @@ -771,13 +769,13 @@ SCT_BarrelParameters::emiShieldMaterial() const double SCT_BarrelParameters::emiJointDeltaR() const { - return m_rdb->brlServices()->getDouble("EMIJOINTDELTAR") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("EMIJOINTDELTAR") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::emiJointRPhi() const { - return m_rdb->brlServices()->getDouble("EMIJOINTRPHI") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("EMIJOINTRPHI") * GeoModelKernelUnits::mm; } std::string @@ -794,25 +792,25 @@ SCT_BarrelParameters::emiJointMaterial() const double SCT_BarrelParameters::pixelAttachmentInnerRadius() const { - return m_rdb->brlServices()->getDouble("PIXELATTACHINNERRAD") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("PIXELATTACHINNERRAD") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::pixelAttachmentOuterRadius() const { - return m_rdb->brlServices()->getDouble("PIXELATTACHOUTERRAD") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("PIXELATTACHOUTERRAD") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::pixelAttachmentZMin() const { - return m_rdb->brlServices()->getDouble("PIXELATTACHZMIN") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("PIXELATTACHZMIN") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::pixelAttachmentDeltaZ() const { - return m_rdb->brlServices()->getDouble("PIXELATTACHDELTAZ") * CLHEP::mm; + return m_rdb->brlServices()->getDouble("PIXELATTACHDELTAZ") * GeoModelKernelUnits::mm; } std::string @@ -833,31 +831,31 @@ SCT_BarrelParameters::numLayers() const double SCT_BarrelParameters::barrelInnerRadius() const { - return m_rdb->brlGeneral()->getDouble("INNERRADIUS") * CLHEP::mm; + return m_rdb->brlGeneral()->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::barrelOuterRadius() const { - return m_rdb->brlGeneral()->getDouble("OUTERRADIUS") * CLHEP::mm; + return m_rdb->brlGeneral()->getDouble("OUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::barrelLength() const { - return m_rdb->brlGeneral()->getDouble("LENGTH") * CLHEP::mm; + return m_rdb->brlGeneral()->getDouble("LENGTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::cylinderLength() const { - return m_rdb->brlGeneral()->getDouble("CYLINDERLENGTH") * CLHEP::mm; + return m_rdb->brlGeneral()->getDouble("CYLINDERLENGTH") * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::activeLength() const { - return m_rdb->brlGeneral()->getDouble("ACTIVELENGTH") * CLHEP::mm; + return m_rdb->brlGeneral()->getDouble("ACTIVELENGTH") * GeoModelKernelUnits::mm; } bool diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Bracket.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Bracket.cxx index 1b31c5abc0f..599d5081a5c 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Bracket.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Bracket.cxx @@ -16,7 +16,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_Bracket::SCT_Bracket(const std::string & name) : SCT_SharedComponentFactory(name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Clamp.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Clamp.cxx index f32066bda0c..a85fb7efcdf 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Clamp.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Clamp.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_Clamp::SCT_Clamp(const std::string & name, int iLayer, diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CloseOut.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CloseOut.cxx index 3058263df5c..b4b6db173cf 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CloseOut.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CloseOut.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_CloseOut::SCT_CloseOut(const std::string & name, int iLayer) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ComponentFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ComponentFactory.cxx index 330e67bef7a..cf2f14e1296 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ComponentFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ComponentFactory.cxx @@ -3,7 +3,7 @@ */ #include "SCT_GeoModel/SCT_ComponentFactory.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <sstream> #include <string> @@ -13,7 +13,7 @@ using InDetDD::SCT_DetectorManager; SCT_DetectorManager * SCT_ComponentFactory::s_detectorManager = 0; const SCT_GeometryManager * SCT_ComponentFactory::s_geometryManager = 0; -double SCT_ComponentFactory::s_epsilon = 1.0e-6 * CLHEP::mm; +double SCT_ComponentFactory::s_epsilon = 1.0e-6 * GeoModelKernelUnits::mm; SCT_ComponentFactory::SCT_ComponentFactory(const std::string & name) : m_name(name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingBlock.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingBlock.cxx index c79fee013c9..5db571788fa 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingBlock.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingBlock.cxx @@ -13,7 +13,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_CoolingBlock::SCT_CoolingBlock(const std::string & name) : SCT_SharedComponentFactory(name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingEnd.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingEnd.cxx index a8e06fefe15..969f719c3eb 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingEnd.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingEnd.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_CoolingEnd::SCT_CoolingEnd(const std::string & name, int iLayer, diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingPipe.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingPipe.cxx index 71ecc0369c6..cf1d88eaa64 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingPipe.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_CoolingPipe.cxx @@ -13,7 +13,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_CoolingPipe::SCT_CoolingPipe(const std::string & name, double length) : SCT_SharedComponentFactory(name), m_length(length) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx index f14ae1944cf..3a9fdd418ed 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx @@ -49,9 +49,9 @@ #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/ISvcLocator.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/GeoDefinitions.h" + +#include "GeoModelKernel/Units.h" #include <iostream> @@ -153,7 +153,7 @@ void SCT_DetectorFactory::create(GeoPhysVol *world) const SCT_GeneralParameters * sctGeneral = m_geometryManager->generalParameters(); - HepGeom::Transform3D sctTransform = sctGeneral->partTransform("SCT"); + GeoTrf::Transform3D sctTransform = sctGeneral->partTransform("SCT"); std::string barrelLabel = "Barrel"; std::string forwardPlusLabel = "EndcapA"; @@ -211,9 +211,9 @@ void SCT_DetectorFactory::create(GeoPhysVol *world) SCT_Identifier idFwdPlus; idFwdPlus.setBarrelEC(2); GeoVPhysVol * forwardPlusPV = sctForwardPlus.build(idFwdPlus); - HepGeom::Transform3D fwdTransformPlus(sctTransform + GeoTrf::Transform3D fwdTransformPlus(sctTransform * sctGeneral->partTransform(forwardPlusLabel) - * HepGeom::TranslateZ3D(sctForwardPlus.zCenter())); + * GeoTrf::TranslateZ3D(sctForwardPlus.zCenter())); GeoAlignableTransform * fwdGeoTransformPlus = new GeoAlignableTransform(fwdTransformPlus); //indet->add(new GeoNameTag("SCT_ForwardPlus")); @@ -245,13 +245,13 @@ void SCT_DetectorFactory::create(GeoPhysVol *world) idFwdMinus.setBarrelEC(-2); GeoVPhysVol * forwardMinusPV = sctForwardMinus.build(idFwdMinus); - HepGeom::Transform3D rot; - rot = HepGeom::RotateY3D(180 * CLHEP::degree); + GeoTrf::Transform3D rot; + rot = GeoTrf::RotateY3D(180 * GeoModelKernelUnits::degree); - HepGeom::Transform3D fwdTransformMinus(sctTransform + GeoTrf::Transform3D fwdTransformMinus(sctTransform * sctGeneral->partTransform(forwardMinusLabel) * rot - * HepGeom::TranslateZ3D(sctForwardMinus.zCenter())); + * GeoTrf::TranslateZ3D(sctForwardMinus.zCenter())); GeoAlignableTransform * fwdGeoTransformMinus = new GeoAlignableTransform(fwdTransformMinus); //indet->add(new GeoNameTag("SCT_ForwardMinus")); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Dogleg.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Dogleg.cxx index ebf9e4fefee..e79d3211d0a 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Dogleg.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Dogleg.cxx @@ -16,7 +16,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_Dogleg::SCT_Dogleg(const std::string & name) : SCT_SharedComponentFactory(name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIEndJewel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIEndJewel.cxx index 0a56ad8214e..f0517558891 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIEndJewel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIEndJewel.cxx @@ -13,7 +13,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FSIEndJewel::SCT_FSIEndJewel(const std::string & name) : SCT_SharedComponentFactory(name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIFibreMask.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIFibreMask.cxx index d714b0b5e71..96c53597a00 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIFibreMask.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIFibreMask.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FSIFibreMask::SCT_FSIFibreMask(const std::string & name, int iLayer, double length) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx index 18c1691472e..5b0b4e3c9bc 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIHelper.cxx @@ -6,7 +6,7 @@ #include "SCT_GeoModel/SCT_FSIHelper.h" #include "SCT_GeoModel/SCT_DataBase.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> @@ -66,8 +66,8 @@ FSIHelper::fill() // Loop through location types for (int iLocIndex = 0; iLocIndex < m_rdb->fwdFSILocationSize(); iLocIndex++) { std::string locType = m_rdb->fwdFSILocation(iLocIndex)->getString("LOCTYPE"); - double radius = m_rdb->fwdFSILocation(iLocIndex)->getDouble("LOCR") * CLHEP::mm; - double rphi = m_rdb->fwdFSILocation(iLocIndex)->getDouble("LOCPHI") * CLHEP::deg; + double radius = m_rdb->fwdFSILocation(iLocIndex)->getDouble("LOCR") * GeoModelKernelUnits::mm; + double rphi = m_rdb->fwdFSILocation(iLocIndex)->getDouble("LOCPHI") * GeoModelKernelUnits::deg; int side = m_rdb->fwdFSILocation(iLocIndex)->getInt("SIDE"); FSILocation * location = new FSILocation(locType, radius, rphi, side); m_locationTypes[locType] = location; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIScorpion.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIScorpion.cxx index ed7cdb1a6bd..57a8a419a60 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIScorpion.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FSIScorpion.cxx @@ -13,7 +13,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FSIScorpion::SCT_FSIScorpion(const std::string & name) : SCT_SharedComponentFactory(name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Flange.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Flange.cxx index dfac1d8135b..4422b3f751c 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Flange.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Flange.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_Flange::SCT_Flange(const std::string & name, int iLayer) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx index 6416d33b549..9282e83020c 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Forward.cxx @@ -32,7 +32,7 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <sstream> #include <cmath> @@ -140,7 +140,7 @@ SCT_Forward::build(SCT_Identifier id) const // << " at " << zpos << ", thickness = " << wheel->thickness() << std::endl; forward->add(new GeoNameTag(wheelName.str())); forward->add(new GeoIdentifierTag(iWheel)); - GeoAlignableTransform * transform = new GeoAlignableTransform(HepGeom::TranslateZ3D(zpos)); + GeoAlignableTransform * transform = new GeoAlignableTransform(GeoTrf::TranslateZ3D(zpos)); forward->add(transform); id.setLayerDisk(iWheel); GeoVPhysVol * wheelPV = wheel->build(id); @@ -155,7 +155,7 @@ SCT_Forward::build(SCT_Identifier id) const // SCT_FwdSupportFrame supportFrame("SupportFrame"); double supportFrameZPos = supportFrame.zPosition() - zCenter(); - forward->add(new GeoTransform(HepGeom::TranslateZ3D(supportFrameZPos))); + forward->add(new GeoTransform(GeoTrf::TranslateZ3D(supportFrameZPos))); forward->add(supportFrame.getVolume()); // Make and Place Cylinder Services @@ -167,7 +167,7 @@ SCT_Forward::build(SCT_Identifier id) const supportFrame.outerRadius(), m_outerRadiusCylinderServices, supportFrame.length()); - forward->add(new GeoTransform(HepGeom::TranslateZ3D(supportFrameZPos))); + forward->add(new GeoTransform(GeoTrf::TranslateZ3D(supportFrameZPos))); forward->add(cylinderServices.getVolume()); } else { @@ -204,7 +204,7 @@ SCT_Forward::build(SCT_Identifier id) const // Place the cooling pipes double coolingPipeZPos = coolingPipe.zPosition() - zCenter(); - forward->add(new GeoTransform(HepGeom::TranslateZ3D(coolingPipeZPos))); + forward->add(new GeoTransform(GeoTrf::TranslateZ3D(coolingPipeZPos))); forward->add(coolingPipe.getVolume()); // Set rStart for next cooling pipe equal to outer radius of this cooling pipe. @@ -224,7 +224,7 @@ SCT_Forward::build(SCT_Identifier id) const // Calculate radius to start placing power tapes. This is half way bewteen outer radius // of support fram and outer radius of forward envelope. // The -1 mm is to avoid a clash with the thermal shield. - double innerRadiusPowerTapes = 0.5*(supportFrame.outerRadius() + m_outerRadius) - 1*CLHEP::mm; + double innerRadiusPowerTapes = 0.5*(supportFrame.outerRadius() + m_outerRadius) - 1*GeoModelKernelUnits::mm; // Inner radius of cylinder representing power tapes. Gets incremented for each wheel. double rStart = innerRadiusPowerTapes; @@ -247,7 +247,7 @@ SCT_Forward::build(SCT_Identifier id) const // Place Power Tapes double powerTapeZPos = powerTape.zPosition() - zCenter(); - forward->add(new GeoTransform(HepGeom::TranslateZ3D(powerTapeZPos))); + forward->add(new GeoTransform(GeoTrf::TranslateZ3D(powerTapeZPos))); forward->add(powerTape.getVolume()); // Set rStart for next power tape equal to outer radius of this power tape. @@ -263,7 +263,7 @@ SCT_Forward::build(SCT_Identifier id) const SCT_FwdThermalShieldElement thermalShieldElement("FwdThermalShieldElement"+intToString(iElement), iElement); double elementZPos = thermalShieldElement.zPosition() - zCenter(); - forward->add(new GeoTransform(HepGeom::TranslateZ3D(elementZPos))); + forward->add(new GeoTransform(GeoTrf::TranslateZ3D(elementZPos))); forward->add(thermalShieldElement.getVolume()); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardModuleParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardModuleParameters.cxx index 639f97ce487..d1617a10e14 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardModuleParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardModuleParameters.cxx @@ -9,7 +9,7 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> @@ -31,55 +31,55 @@ SCT_ForwardModuleParameters::fwdSensorNumWafers(int iModuleType) const double SCT_ForwardModuleParameters::fwdSensorThickness(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorInnerWidthNear(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("INNERWIDTHNEAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("INNERWIDTHNEAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorInnerWidthFar(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("INNERWIDTHFAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("INNERWIDTHFAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorOuterWidthNear(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHNEAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHNEAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorOuterWidthFar(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHFAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHFAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorLengthNear(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHNEAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHNEAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorLengthFar(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHFAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHFAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorRadiusNear(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("RADIUSNEAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("RADIUSNEAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorRadiusFar(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("RADIUSFAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("RADIUSFAR") * GeoModelKernelUnits::mm; } std::string @@ -109,19 +109,19 @@ SCT_ForwardModuleParameters::fwdSensorActiveFar(int iModuleType) const double SCT_ForwardModuleParameters::fwdSensorActiveHalfLengthNear(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("ACTIVEHALFLENGTHNEAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("ACTIVEHALFLENGTHNEAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorActiveHalfLengthFar(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("ACTIVEHALFLENGTHFAR") * CLHEP::mm; + return m_rdb->fwdSensor(iModuleType)->getDouble("ACTIVEHALFLENGTHFAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorAngularPitch(int iModuleType) const { - return m_rdb->fwdSensor(iModuleType)->getDouble("ANGULARPITCH") * CLHEP::radian; + return m_rdb->fwdSensor(iModuleType)->getDouble("ANGULARPITCH") * GeoModelKernelUnits::radian; } int @@ -149,37 +149,37 @@ SCT_ForwardModuleParameters::fwdSensorStripShift(int iModuleType) const double SCT_ForwardModuleParameters::fwdHybridThickness() const { - return m_rdb->fwdHybrid()->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdHybrid()->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdHybridInnerWidth() const { - return m_rdb->fwdHybrid()->getDouble("INNERWIDTH") * CLHEP::mm; + return m_rdb->fwdHybrid()->getDouble("INNERWIDTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdHybridOuterWidth() const { - return m_rdb->fwdHybrid()->getDouble("OUTERWIDTH") * CLHEP::mm; + return m_rdb->fwdHybrid()->getDouble("OUTERWIDTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdHybridLength() const { - return m_rdb->fwdHybrid()->getDouble("LENGTH") * CLHEP::mm; + return m_rdb->fwdHybrid()->getDouble("LENGTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdHybridLengthToCorner() const { - return m_rdb->fwdHybrid()->getDouble("LENGTHTOCORNER") * CLHEP::mm; + return m_rdb->fwdHybrid()->getDouble("LENGTHTOCORNER") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdHybridMountPointToInnerEdge() const { - return m_rdb->fwdHybrid()->getDouble("MOUNTPOINTTOINEDGE") * CLHEP::mm; + return m_rdb->fwdHybrid()->getDouble("MOUNTPOINTTOINEDGE") * GeoModelKernelUnits::mm; } std::string @@ -194,26 +194,26 @@ SCT_ForwardModuleParameters::fwdHybridMaterial() const double SCT_ForwardModuleParameters::fwdSpineThickness(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSpineWidth(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("WIDTH") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("WIDTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSpineEndToModuleCenter(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("ENDTOMODULECENTER") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("ENDTOMODULECENTER") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSpineEndLocatorToEndMount(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("ENDLOCATORTOENDMOUNT") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("ENDLOCATORTOENDMOUNT") * GeoModelKernelUnits::mm; } @@ -230,55 +230,55 @@ SCT_ForwardModuleParameters::fwdSpineMaterial(int iModuleType) const double SCT_ForwardModuleParameters::fwdSubSpineInnerWidth(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERWIDTH") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERWIDTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSubSpineInnerLength(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERLENGTH") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERLENGTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSubSpineInnerRefDist(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERREFDIST") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBINNERREFDIST") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSubSpineMiddleWidth(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLEWIDTH") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLEWIDTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSubSpineMiddleLength(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLELENGTH") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLELENGTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSubSpineMiddleRefDist(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLEREFDIST") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBMIDDLEREFDIST") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSubSpineOuterWidth(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERWIDTH") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERWIDTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSubSpineOuterLength(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERLENGTH") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERLENGTH") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSubSpineOuterRefDist(int iModuleType) const { - return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERREFDIST") * CLHEP::mm; + return m_rdb->fwdSpine(iModuleType)->getDouble("SUBOUTERREFDIST") * GeoModelKernelUnits::mm; } std::string @@ -301,7 +301,7 @@ SCT_ForwardModuleParameters::fwdModuleNumTypes() const double SCT_ForwardModuleParameters::fwdModuleStereoAngle(int iModuleType) const { - return m_rdb->fwdModule(iModuleType)->getDouble("STEREOANGLE") * CLHEP::milliradian; + return m_rdb->fwdModule(iModuleType)->getDouble("STEREOANGLE") * GeoModelKernelUnits::milliradian; } int @@ -323,25 +323,25 @@ SCT_ForwardModuleParameters::fwdModuleUpperSideNumber(int iModuleType) const double SCT_ForwardModuleParameters::fwdModuleGlueThickness(int iModuleType) const { - return m_rdb->fwdModule(iModuleType)->getDouble("GLUETHICKNESS") * CLHEP::mm; + return m_rdb->fwdModule(iModuleType)->getDouble("GLUETHICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdModuleMountPoint(int iModuleType) const { - return m_rdb->fwdModule(iModuleType)->getDouble("MOUNTPOINT") * CLHEP::mm; + return m_rdb->fwdModule(iModuleType)->getDouble("MOUNTPOINT") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdModuleDistBtwMountPoints(int iModuleType) const { - return m_rdb->fwdModule(iModuleType)->getDouble("DISTBTWMOUNTPOINTS") * CLHEP::mm; + return m_rdb->fwdModule(iModuleType)->getDouble("DISTBTWMOUNTPOINTS") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdModuleHybridEdgeToSpine(int iModuleType) const { - return m_rdb->fwdModule(iModuleType)->getDouble("HYBRIDEDGETOSPINE")*CLHEP::mm; + return m_rdb->fwdModule(iModuleType)->getDouble("HYBRIDEDGETOSPINE")*GeoModelKernelUnits::mm; } bool @@ -367,19 +367,19 @@ SCT_ForwardModuleParameters::fwdModuleConnectorPresent() const double SCT_ForwardModuleParameters::fwdModuleConnectorDeltaR() const { - return m_rdb->fwdModuleConnector()->getDouble("DELTAR") * CLHEP::mm; + return m_rdb->fwdModuleConnector()->getDouble("DELTAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdModuleConnectorRPhi() const { - return m_rdb->fwdModuleConnector()->getDouble("RPHI") * CLHEP::mm; + return m_rdb->fwdModuleConnector()->getDouble("RPHI") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdModuleConnectorThickness() const { - return m_rdb->fwdModuleConnector()->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdModuleConnector()->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } std::string diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardParameters.cxx index a8069626575..a56ae8177ae 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_ForwardParameters.cxx @@ -10,8 +10,7 @@ #include "RDBAccessSvc/IRDBRecord.h" #include "SCT_GeoModel/SCT_FSIHelper.h" - -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> #include <cmath> @@ -39,13 +38,13 @@ SCT_ForwardParameters::fwdRingNumModules(int iRing) const double SCT_ForwardParameters::fwdRingModuleStagger(int iRing) const { - return m_rdb->fwdRing(iRing)->getDouble("MODULESTAGGER") * CLHEP::mm; + return m_rdb->fwdRing(iRing)->getDouble("MODULESTAGGER") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdRingPhiOfRefModule(int iRing) const { - return m_rdb->fwdRing(iRing)->getDouble("PHIOFREFMODULE") * CLHEP::deg; + return m_rdb->fwdRing(iRing)->getDouble("PHIOFREFMODULE") * GeoModelKernelUnits::deg; } @@ -58,7 +57,7 @@ SCT_ForwardParameters::fwdRingUsualRingSide(int iRing) const double SCT_ForwardParameters::fwdRingDistToDiscCenter(int iRing) const { - return m_rdb->fwdRing(iRing)->getDouble("RINGTODISCCENTER") * CLHEP::mm; + return m_rdb->fwdRing(iRing)->getDouble("RINGTODISCCENTER") * GeoModelKernelUnits::mm; } @@ -69,7 +68,7 @@ SCT_ForwardParameters::fwdRingDistToDiscCenter(int iRing) const double SCT_ForwardParameters::fwdWheelZPosition(int iWheel) const { - return m_rdb->fwdWheel(iWheel)->getDouble("ZPOSITION") * CLHEP::mm; + return m_rdb->fwdWheel(iWheel)->getDouble("ZPOSITION") * GeoModelKernelUnits::mm; } // Returns +/-1 @@ -168,19 +167,19 @@ SCT_ForwardParameters::fwdWheelModuleType(int iWheel, int iRing, int ec) const double SCT_ForwardParameters::fwdDiscSupportInnerRadius() const { - return m_rdb->fwdDiscSupport()->getDouble("INNERRADIUS") * CLHEP::mm; + return m_rdb->fwdDiscSupport()->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdDiscSupportOuterRadius() const { - return m_rdb->fwdDiscSupport()->getDouble("OUTERRADIUS") * CLHEP::mm; + return m_rdb->fwdDiscSupport()->getDouble("OUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdDiscSupportThickness() const { - return m_rdb->fwdDiscSupport()->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdDiscSupport()->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } std::string @@ -207,7 +206,7 @@ SCT_ForwardParameters::fwdPatchPanelType(int iLoc) const double SCT_ForwardParameters::fwdPatchPanelLocAngle(int iLoc) const { - return m_rdb->fwdPatchPanelLoc(iLoc)->getDouble("LOCANGLE") * CLHEP::degree; + return m_rdb->fwdPatchPanelLoc(iLoc)->getDouble("LOCANGLE") * GeoModelKernelUnits::degree; } bool @@ -225,26 +224,26 @@ SCT_ForwardParameters::fwdNumPatchPanelTypes() const double SCT_ForwardParameters::fwdPatchPanelThickness(int iType) const { - return m_rdb->fwdPatchPanel(iType)->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdPatchPanel(iType)->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdPatchPanelMidRadius(int iType) const { - return m_rdb->fwdPatchPanel(iType)->getDouble("MIDRADIUS") * CLHEP::mm; + return m_rdb->fwdPatchPanel(iType)->getDouble("MIDRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdPatchPanelDeltaR(int iType) const { - return m_rdb->fwdPatchPanel(iType)->getDouble("DELTAR") * CLHEP::mm; + return m_rdb->fwdPatchPanel(iType)->getDouble("DELTAR") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdPatchPanelRPhi(int iType) const { - return m_rdb->fwdPatchPanel(iType)->getDouble("RPHI") * CLHEP::mm; + return m_rdb->fwdPatchPanel(iType)->getDouble("RPHI") * GeoModelKernelUnits::mm; } std::string @@ -270,19 +269,19 @@ SCT_ForwardParameters::fwdPPConnectorPresent() const double SCT_ForwardParameters::fwdPPConnectorThickness() const { - return m_rdb->fwdPPConnector()->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdPPConnector()->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdPPConnectorDeltaR() const { - return m_rdb->fwdPPConnector()->getDouble("DELTAR") * CLHEP::mm; + return m_rdb->fwdPPConnector()->getDouble("DELTAR") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdPPConnectorRPhi() const { - return m_rdb->fwdPPConnector()->getDouble("RPHI") * CLHEP::mm; + return m_rdb->fwdPPConnector()->getDouble("RPHI") * GeoModelKernelUnits::mm; } std::string @@ -308,19 +307,19 @@ SCT_ForwardParameters::fwdPPCoolingPresent() const double SCT_ForwardParameters::fwdPPCoolingThickness() const { - return m_rdb->fwdPPCooling()->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdPPCooling()->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdPPCoolingDeltaR() const { - return m_rdb->fwdPPCooling()->getDouble("DELTAR") * CLHEP::mm; + return m_rdb->fwdPPCooling()->getDouble("DELTAR") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdPPCoolingRPhi() const { - return m_rdb->fwdPPCooling()->getDouble("RPHI") * CLHEP::mm; + return m_rdb->fwdPPCooling()->getDouble("RPHI") * GeoModelKernelUnits::mm; } std::string @@ -348,25 +347,25 @@ SCT_ForwardParameters::fwdCoolingBlockMainOrSecondary(int iType) const double SCT_ForwardParameters::fwdCoolingBlockDeltaR(int iType) const { - return m_rdb->fwdCoolingBlock(iType)->getDouble("DELTAR") * CLHEP::mm; + return m_rdb->fwdCoolingBlock(iType)->getDouble("DELTAR") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdCoolingBlockRPhi(int iType) const { - return m_rdb->fwdCoolingBlock(iType)->getDouble("RPHI") * CLHEP::mm; + return m_rdb->fwdCoolingBlock(iType)->getDouble("RPHI") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdCoolingBlockThickness(int iType) const { - return m_rdb->fwdCoolingBlock(iType)->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdCoolingBlock(iType)->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdCoolingBlockOffsetFromDisc(int iType) const { - return m_rdb->fwdCoolingBlock(iType)->getDouble("OFFSETFROMDISC") * CLHEP::mm; + return m_rdb->fwdCoolingBlock(iType)->getDouble("OFFSETFROMDISC") * GeoModelKernelUnits::mm; } std::string @@ -382,19 +381,19 @@ SCT_ForwardParameters::fwdCoolingBlockMaterial(int iType) const double SCT_ForwardParameters::fwdDiscPowerTapeInnerRadius(int iRing) const { - return m_rdb->fwdRingServices(iRing)->getDouble("POWERTAPEINNERRADIUS") * CLHEP::mm; + return m_rdb->fwdRingServices(iRing)->getDouble("POWERTAPEINNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdDiscPowerTapeOuterRadius(int iRing) const { - return m_rdb->fwdRingServices(iRing)->getDouble("POWERTAPEOUTERRADIUS") * CLHEP::mm; + return m_rdb->fwdRingServices(iRing)->getDouble("POWERTAPEOUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdDiscPowerTapeThickness(int iRing) const { - return m_rdb->fwdRingServices(iRing)->getDouble("POWERTAPETHICKNESS") * CLHEP::mm; + return m_rdb->fwdRingServices(iRing)->getDouble("POWERTAPETHICKNESS") * GeoModelKernelUnits::mm; } std::string @@ -411,19 +410,19 @@ SCT_ForwardParameters::fwdDiscPowerTapeMaterial(int iRing) const double SCT_ForwardParameters::fwdRingCoolingInnerRadius(int iRing) const { - return m_rdb->fwdRingServices(iRing)->getDouble("COOLINGINNERRADIUS") * CLHEP::mm; + return m_rdb->fwdRingServices(iRing)->getDouble("COOLINGINNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdRingCoolingOuterRadius(int iRing) const { - return m_rdb->fwdRingServices(iRing)->getDouble("COOLINGOUTERRADIUS") * CLHEP::mm; + return m_rdb->fwdRingServices(iRing)->getDouble("COOLINGOUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdRingCoolingThickness(int iRing) const { - return m_rdb->fwdRingServices(iRing)->getDouble("COOLINGTHICKNESS") * CLHEP::mm; + return m_rdb->fwdRingServices(iRing)->getDouble("COOLINGTHICKNESS") * GeoModelKernelUnits::mm; } std::string @@ -449,13 +448,13 @@ SCT_ForwardParameters::fwdDiscFixationPresent() const double SCT_ForwardParameters::fwdDiscFixationThickness() const { - return m_rdb->fwdDiscFixation()->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdDiscFixation()->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdDiscFixationRadius() const { - return m_rdb->fwdDiscFixation()->getDouble("RADIUS") * CLHEP::mm; + return m_rdb->fwdDiscFixation()->getDouble("RADIUS") * GeoModelKernelUnits::mm; } std::string @@ -470,25 +469,25 @@ SCT_ForwardParameters::fwdDiscFixationMaterial() const double SCT_ForwardParameters::fwdSupportFrameRadialThickness() const { - return m_rdb->fwdServices()->getDouble("SUPPORTFRAMEDELTAR") * CLHEP::mm; + return m_rdb->fwdServices()->getDouble("SUPPORTFRAMEDELTAR") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdSupportFrameInnerRadius() const { - return m_rdb->fwdServices()->getDouble("SUPPORTFRAMEINNERRAD") * CLHEP::mm; + return m_rdb->fwdServices()->getDouble("SUPPORTFRAMEINNERRAD") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdSupportFrameZMin() const { - return m_rdb->fwdServices()->getDouble("SUPPORTFRAMEZMIN") * CLHEP::mm; + return m_rdb->fwdServices()->getDouble("SUPPORTFRAMEZMIN") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdSupportFrameZMax() const { - return m_rdb->fwdServices()->getDouble("SUPPORTFRAMEZMAX") * CLHEP::mm; + return m_rdb->fwdServices()->getDouble("SUPPORTFRAMEZMAX") * GeoModelKernelUnits::mm; } std::string @@ -503,7 +502,7 @@ SCT_ForwardParameters::fwdSupportFrameMaterial() const double SCT_ForwardParameters::fwdCoolingPipeRadius() const { - return m_rdb->fwdServices()->getDouble("COOLINGPIPERADIUS") * CLHEP::mm; + return m_rdb->fwdServices()->getDouble("COOLINGPIPERADIUS") * GeoModelKernelUnits::mm; } std::string @@ -518,7 +517,7 @@ SCT_ForwardParameters::fwdCoolingPipeMaterial() const double SCT_ForwardParameters::fwdPowerTapeCrossSectArea() const { - return m_rdb->fwdServices()->getDouble("POWERTAPECROSSSECT") * CLHEP::mm2; + return m_rdb->fwdServices()->getDouble("POWERTAPECROSSSECT") * GeoModelKernelUnits::mm2; } @@ -540,21 +539,21 @@ SCT_ForwardParameters::fwdFSINumGeomTypes() const double SCT_ForwardParameters::fwdFSIGeomDeltaR(int iType) const { - return m_rdb->fwdFSIType(iType)->getDouble("DELTAR") * CLHEP::mm; + return m_rdb->fwdFSIType(iType)->getDouble("DELTAR") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdFSIGeomRPhi(int iType) const { - return m_rdb->fwdFSIType(iType)->getDouble("RPHI") * CLHEP::mm; + return m_rdb->fwdFSIType(iType)->getDouble("RPHI") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdFSIGeomThickness(int iType) const { // Fix for SCT-DC3-03. May be removed when ATLAS-DC3-07 is obsolete. - if (iType == 0 && m_rdb->versionTag() == "SCT-DC3-03") return 26*CLHEP::mm; - return m_rdb->fwdFSIType(iType)->getDouble("THICKNESS") * CLHEP::mm; + if (iType == 0 && m_rdb->versionTag() == "SCT-DC3-03") return 26*GeoModelKernelUnits::mm; + return m_rdb->fwdFSIType(iType)->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } std::string @@ -567,8 +566,8 @@ double SCT_ForwardParameters::fwdFSIGeomZOffset(int iType) const { // Fix for SCT-DC3-03. May be removed when ATLAS-DC3-07 is obsolete. - if (iType == 0 && m_rdb->versionTag() == "SCT-DC3-03") return 22*CLHEP::mm; - return m_rdb->fwdFSIType(iType)->getDouble("ZOFFSET") * CLHEP::mm; + if (iType == 0 && m_rdb->versionTag() == "SCT-DC3-03") return 22*GeoModelKernelUnits::mm; + return m_rdb->fwdFSIType(iType)->getDouble("ZOFFSET") * GeoModelKernelUnits::mm; } @@ -617,7 +616,7 @@ SCT_ForwardParameters::fwdCylinderServiceLocName(int iLoc) const double SCT_ForwardParameters::fwdCylinderServiceLocAngle(int iLoc) const { - return m_rdb->fwdCylServLoc(iLoc)->getDouble("LOCANGLE") * CLHEP::degree; + return m_rdb->fwdCylServLoc(iLoc)->getDouble("LOCANGLE") * GeoModelKernelUnits::degree; } int @@ -641,13 +640,13 @@ SCT_ForwardParameters::fwdCylinderServiceMaterial(int iType) const double SCT_ForwardParameters::fwdCylinderServiceDeltaR(int iType) const { - return m_rdb->fwdCylServ(iType)->getDouble("DELTAR") * CLHEP::mm; + return m_rdb->fwdCylServ(iType)->getDouble("DELTAR") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdCylinderServiceRPhi(int iType) const { - return m_rdb->fwdCylServ(iType)->getDouble("RPHI") * CLHEP::mm; + return m_rdb->fwdCylServ(iType)->getDouble("RPHI") * GeoModelKernelUnits::mm; } // @@ -668,25 +667,25 @@ SCT_ForwardParameters::fwdThermalShieldMaterial(int iElement) const double SCT_ForwardParameters::fwdThermalShieldInnerRadius(int iElement) const { - return m_rdb->fwdThermalShield(iElement)->getDouble("INNERRADIUS") * CLHEP::mm; + return m_rdb->fwdThermalShield(iElement)->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdThermalShieldOuterRadius(int iElement) const { - return m_rdb->fwdThermalShield(iElement)->getDouble("OUTERRADIUS") * CLHEP::mm; + return m_rdb->fwdThermalShield(iElement)->getDouble("OUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdThermalShieldZMin(int iElement) const { - return m_rdb->fwdThermalShield(iElement)->getDouble("ZMIN") * CLHEP::mm; + return m_rdb->fwdThermalShield(iElement)->getDouble("ZMIN") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdThermalShieldZMax(int iElement) const { - return m_rdb->fwdThermalShield(iElement)->getDouble("ZMAX") * CLHEP::mm; + return m_rdb->fwdThermalShield(iElement)->getDouble("ZMAX") * GeoModelKernelUnits::mm; } @@ -702,31 +701,31 @@ SCT_ForwardParameters::fwdNumWheels() const double SCT_ForwardParameters::fwdInnerRadius() const { - return m_rdb->fwdGeneral()->getDouble("INNERRADIUS") * CLHEP::mm; + return m_rdb->fwdGeneral()->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdOuterRadius() const { - return m_rdb->fwdGeneral()->getDouble("OUTERRADIUS") * CLHEP::mm; + return m_rdb->fwdGeneral()->getDouble("OUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdZMin() const { - return m_rdb->fwdGeneral()->getDouble("ZMIN") * CLHEP::mm; + return m_rdb->fwdGeneral()->getDouble("ZMIN") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdZMax() const { - return m_rdb->fwdGeneral()->getDouble("ZMAX") * CLHEP::mm; + return m_rdb->fwdGeneral()->getDouble("ZMAX") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdTrtGapPos() const { - return m_rdb->fwdGeneral()->getDouble("TRTGAPPOS") * CLHEP::mm; + return m_rdb->fwdGeneral()->getDouble("TRTGAPPOS") * GeoModelKernelUnits::mm; } // @@ -752,19 +751,19 @@ SCT_ForwardParameters::fwdOptoHarnessDiscType(int index) const double SCT_ForwardParameters::fwdOptoHarnessInnerRadius(int index) const { - return m_rdb->fwdOptoHarness(index)->getDouble("INNERRADIUS") * CLHEP::mm; + return m_rdb->fwdOptoHarness(index)->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdOptoHarnessOuterRadius(int index) const { - return m_rdb->fwdOptoHarness(index)->getDouble("OUTERRADIUS") * CLHEP::mm; + return m_rdb->fwdOptoHarness(index)->getDouble("OUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdOptoHarnessThickness(int index) const { - return m_rdb->fwdOptoHarness(index)->getDouble("THICKNESS") * CLHEP::mm; + return m_rdb->fwdOptoHarness(index)->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } std::string diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx index 7bda26a1010..b3420cf1379 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingBlock.cxx @@ -13,7 +13,9 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" + +#include <iostream> SCT_FwdCoolingBlock::SCT_FwdCoolingBlock(const std::string & name, int hiLo, int mainOrSecondary) : SCT_SharedComponentFactory(name), m_hiLo(hiLo), m_mainSec(mainOrSecondary) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx index 490698dcc64..2365854c61d 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCoolingPipe.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> @@ -47,13 +47,13 @@ GeoVPhysVol * SCT_FwdCoolingPipe::build() { // Calculate the dimensions. - // area = CLHEP::pi*(pipeRadius)^2 * numPipes - // also area = 2*CLHEP::pi*r_ave*delta_r approx= 2 * CLHEP::pi * rMin * delta_r + // area = GeoModelKernelUnits::pi*(pipeRadius)^2 * numPipes + // also area = 2*GeoModelKernelUnits::pi*r_ave*delta_r approx= 2 * GeoModelKernelUnits::pi * rMin * delta_r // solve for delta_r // m_thickness = delta_r - double area = CLHEP::pi * sqr(m_pipeRadius) * m_numPipes; - m_thickness = area/(2. * CLHEP::pi * m_innerRadius); + double area = GeoModelKernelUnits::pi * sqr(m_pipeRadius) * m_numPipes; + m_thickness = area/(2. * GeoModelKernelUnits::pi * m_innerRadius); m_outerRadius = m_innerRadius + m_thickness; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCylinderServices.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCylinderServices.cxx index 1be6a6d138b..75544a45403 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCylinderServices.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdCylinderServices.cxx @@ -17,10 +17,10 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <sstream> @@ -136,7 +136,7 @@ SCT_FwdCylinderServices::build() double coolingDPhi = m_coolingRPhi / coolingRmin; const GeoCons* coolingShape = new GeoCons(coolingRmin, coolingRmin, coolingRmax1, coolingRmax2, 0.5 * m_length, - -0.5 * coolingDPhi * CLHEP::radian, coolingDPhi * CLHEP::radian); + -0.5 * coolingDPhi * GeoModelKernelUnits::radian, coolingDPhi * GeoModelKernelUnits::radian); const GeoLogVol * coolingLog = new GeoLogVol("CoolingPipe", coolingShape, materials.getMaterialForVolume(m_coolingMaterialName, coolingShape->volume())); GeoPhysVol * coolingPipe = new GeoPhysVol(coolingLog); @@ -146,7 +146,7 @@ SCT_FwdCylinderServices::build() double lmtRmax2 = lmtRmin + 1.8 * m_lmtDeltaR; double lmtDPhi = m_lmtRPhi / lmtRmin; const GeoCons* lmtShape = new GeoCons(lmtRmin, lmtRmin, lmtRmax1, lmtRmax2, 0.5 * m_length, - -0.5 * lmtDPhi * CLHEP::radian, lmtDPhi * CLHEP::radian); + -0.5 * lmtDPhi * GeoModelKernelUnits::radian, lmtDPhi * GeoModelKernelUnits::radian); const GeoLogVol * lmtLog = new GeoLogVol("LMT", lmtShape, materials.getMaterialForVolume(m_lmtMaterialName,lmtShape->volume())); GeoPhysVol * lmt = new GeoPhysVol(lmtLog); @@ -156,7 +156,7 @@ SCT_FwdCylinderServices::build() double lmtCoolingDPhi = m_lmtCoolingRPhi / lmtCoolingRmin; double lmtLength = m_length - 2. * m_lmtCoolingZOffset; const GeoTubs* lmtCoolingShape = new GeoTubs(lmtCoolingRmin, lmtCoolingRmax, 0.5 * lmtLength, - -0.5 * lmtCoolingDPhi * CLHEP::radian, lmtCoolingDPhi * CLHEP::radian); + -0.5 * lmtCoolingDPhi * GeoModelKernelUnits::radian, lmtCoolingDPhi * GeoModelKernelUnits::radian); const GeoLogVol * lmtCoolingLog = new GeoLogVol("LMTCooling", lmtCoolingShape, materials.getMaterialForVolume(m_lmtCoolingMaterialName,lmtCoolingShape->volume())); GeoPhysVol * lmtCooling = new GeoPhysVol(lmtCoolingLog); @@ -166,7 +166,7 @@ SCT_FwdCylinderServices::build() double fibreRmax2 = fibreRmin + 1.8 * m_fibreDeltaR; double fibreDPhi = m_fibreRPhi / fibreRmin; const GeoCons* fibreShape = new GeoCons(fibreRmin, fibreRmin, fibreRmax1, fibreRmax2, 0.5 * m_length, - -0.5 * fibreDPhi * CLHEP::radian, fibreDPhi * CLHEP::radian); + -0.5 * fibreDPhi * GeoModelKernelUnits::radian, fibreDPhi * GeoModelKernelUnits::radian); const GeoLogVol * fibreLog = new GeoLogVol("Fibres", fibreShape, materials.getMaterialForVolume(m_fibreMaterialName,fibreShape->volume())); GeoPhysVol * fibres = new GeoPhysVol(fibreLog); @@ -175,7 +175,7 @@ SCT_FwdCylinderServices::build() double nPipeRmax = nPipeRmin + m_nPipeDeltaR; double nPipeDPhi = m_nPipeRPhi / nPipeRmin; const GeoTubs* nPipeShape = new GeoTubs(nPipeRmin, nPipeRmax, 0.5 * m_length, - -0.5 * nPipeDPhi * CLHEP::radian, nPipeDPhi * CLHEP::radian); + -0.5 * nPipeDPhi * GeoModelKernelUnits::radian, nPipeDPhi * GeoModelKernelUnits::radian); const GeoLogVol * nPipeLog = new GeoLogVol("NPipe", nPipeShape, materials.getMaterialForVolume(m_nPipeMaterialName,nPipeShape->volume())); GeoPhysVol * nPipe = new GeoPhysVol(nPipeLog); @@ -184,7 +184,7 @@ SCT_FwdCylinderServices::build() double railRmax = railRmin + m_railDeltaR; double railDPhi = m_railRPhi / railRmin; const GeoTubs* railShape = new GeoTubs(railRmin, railRmax, - 0.5 * m_length, -0.5 * railDPhi * CLHEP::radian, railDPhi * CLHEP::radian); + 0.5 * m_length, -0.5 * railDPhi * GeoModelKernelUnits::radian, railDPhi * GeoModelKernelUnits::radian); const GeoLogVol * railLog = new GeoLogVol("Rail", railShape, materials.getMaterialForVolume(m_railMaterialName,railShape->volume())); GeoPhysVol * rail = new GeoPhysVol(railLog); @@ -193,43 +193,43 @@ SCT_FwdCylinderServices::build() // Cooling pipe for (unsigned int iLoc = 0; iLoc < m_coolingLocAngle.size(); iLoc++) { - double coolingAngle = m_coolingLocAngle[iLoc] + iquad * 90*CLHEP::degree; - // std::cout << "Placing cooling pipe at " << coolingAngle / CLHEP::degree << " CLHEP::degrees" << std::endl; - cylinder->add(new GeoTransform(HepGeom::RotateZ3D(coolingAngle))); + double coolingAngle = m_coolingLocAngle[iLoc] + iquad * 90*GeoModelKernelUnits::degree; + // std::cout << "Placing cooling pipe at " << coolingAngle / GeoModelKernelUnits::degree << " GeoModelKernelUnits::degrees" << std::endl; + cylinder->add(new GeoTransform(GeoTrf::RotateZ3D(coolingAngle))); cylinder->add(coolingPipe); } // Low Mass Tapes and LMT Cooling are at same phi positions for (unsigned int iLoc = 0; iLoc < m_lmtLocAngle.size(); iLoc++) { - double lmtAngle = m_lmtLocAngle[iLoc] + iquad * 90*CLHEP::degree; - // std::cout << "Placing LMT at " << lmtAngle / CLHEP::degree << " CLHEP::degrees" << std::endl; - cylinder->add(new GeoTransform(HepGeom::RotateZ3D(lmtAngle))); + double lmtAngle = m_lmtLocAngle[iLoc] + iquad * 90*GeoModelKernelUnits::degree; + // std::cout << "Placing LMT at " << lmtAngle / GeoModelKernelUnits::degree << " GeoModelKernelUnits::degrees" << std::endl; + cylinder->add(new GeoTransform(GeoTrf::RotateZ3D(lmtAngle))); cylinder->add(lmt); - cylinder->add(new GeoTransform(HepGeom::RotateZ3D(lmtAngle)*HepGeom::TranslateZ3D(m_lmtCoolingZOffset))); + cylinder->add(new GeoTransform(GeoTrf::RotateZ3D(lmtAngle)*GeoTrf::TranslateZ3D(m_lmtCoolingZOffset))); cylinder->add(lmtCooling); } // Fibres are between pairs of LMTs for (unsigned int iLoc = 0; iLoc < m_fibreLocAngle.size(); iLoc++) { - double fibreAngle = m_fibreLocAngle[iLoc] + iquad * 90*CLHEP::degree; - // std::cout << "Placing fibres at " << fibreAngle / CLHEP::degree << " CLHEP::degrees" << std::endl; - cylinder->add(new GeoTransform(HepGeom::RotateZ3D(fibreAngle))); + double fibreAngle = m_fibreLocAngle[iLoc] + iquad * 90*GeoModelKernelUnits::degree; + // std::cout << "Placing fibres at " << fibreAngle / GeoModelKernelUnits::degree << " GeoModelKernelUnits::degrees" << std::endl; + cylinder->add(new GeoTransform(GeoTrf::RotateZ3D(fibreAngle))); cylinder->add(fibres); } // N2 Pipes for (unsigned int iLoc = 0; iLoc < m_nPipeLocAngle.size(); iLoc++) { - double nPipeAngle = m_nPipeLocAngle[iLoc] + iquad * 90*CLHEP::degree; - // std::cout << "Placing N2 pipe at " << nPipeAngle / CLHEP::degree << " CLHEP::degrees" << std::endl; - cylinder->add(new GeoTransform(HepGeom::RotateZ3D(nPipeAngle))); + double nPipeAngle = m_nPipeLocAngle[iLoc] + iquad * 90*GeoModelKernelUnits::degree; + // std::cout << "Placing N2 pipe at " << nPipeAngle / GeoModelKernelUnits::degree << " GeoModelKernelUnits::degrees" << std::endl; + cylinder->add(new GeoTransform(GeoTrf::RotateZ3D(nPipeAngle))); cylinder->add(nPipe); } // Rails for (unsigned int iLoc = 0; iLoc < m_railLocAngle.size(); iLoc++) { - double railAngle = m_railLocAngle[iLoc] + iquad * 90*CLHEP::degree; - // std::cout << "Placing rail at " << railAngle / CLHEP::degree << " CLHEP::degrees" << std::endl; - cylinder->add(new GeoTransform(HepGeom::RotateZ3D(railAngle))); + double railAngle = m_railLocAngle[iLoc] + iquad * 90*GeoModelKernelUnits::degree; + // std::cout << "Placing rail at " << railAngle / GeoModelKernelUnits::degree << " GeoModelKernelUnits::degrees" << std::endl; + cylinder->add(new GeoTransform(GeoTrf::RotateZ3D(railAngle))); cylinder->add(rail); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscFixation.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscFixation.cxx index 734b3ee6518..0bd1309dc16 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscFixation.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscFixation.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FwdDiscFixation::SCT_FwdDiscFixation(const std::string & name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx index 930585f15a5..bb71f56acd3 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscPowerTape.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FwdDiscPowerTape::SCT_FwdDiscPowerTape(const std::string & name, int iRing) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscSupport.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscSupport.cxx index 814773ea56d..9e66dc2944b 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscSupport.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdDiscSupport.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FwdDiscSupport::SCT_FwdDiscSupport(const std::string & name, int iWheel) : SCT_SharedComponentFactory(name), m_iWheel(iWheel) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdFSI.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdFSI.cxx index 563e36f9451..98c77903a3f 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdFSI.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdFSI.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FwdFSI::SCT_FwdFSI(const std::string & name, int type) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdHybrid.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdHybrid.cxx index 5da3902d003..761b82e5d9d 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdHybrid.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdHybrid.cxx @@ -28,11 +28,11 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" + +#include "GeoModelKernel/GeoDefinitions.h" + -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" #include <cmath> @@ -54,9 +54,9 @@ SCT_FwdHybrid::getParameters() m_materialName = parameters->fwdHybridMaterial(); - //double CLHEP::radlength; - //CLHEP::radlength = 18.8 * CLHEP::cm; - // [CLHEP::cm] for carbon (Partickle Physics Booklet) + //double GeoModelKernelUnits::radlength; + //GeoModelKernelUnits::radlength = 18.8 * GeoModelKernelUnits::cm; + // [GeoModelKernelUnits::cm] for carbon (Partickle Physics Booklet) m_thickness = parameters->fwdHybridThickness(); m_thickness2 = m_thickness; @@ -96,7 +96,7 @@ GeoVPhysVol * SCT_FwdHybrid::build() // double position = zsmi[m_ringType].mountd - zhyb->hybysh + (zhyb->hyby - zhyb->hybycor) / 2.; if (m_ringType == 0) { position = -1 * position; }; // outer module, hybrid in inner side - const GeoShape & hybridPos1 = (*hybridShape2 << HepGeom::TranslateZ3D(position)); + const GeoShape & hybridPos1 = (*hybridShape2 << GeoTrf::TranslateZ3D(position)); position = parameters->fwdModuleMountPoint(m_ringType) - (m_mountPointToInnerEdge) + m_length - 0.5 * parameters->fwdHybridLengthToCorner(); @@ -105,10 +105,10 @@ GeoVPhysVol * SCT_FwdHybrid::build() position = -1 * position; }; double rotation = 0.; - if (m_ringType == 0) rotation = 180. * CLHEP::deg; + if (m_ringType == 0) rotation = 180. * GeoModelKernelUnits::deg; - const GeoShape & hybridPos2 = (*hybridShape1 << HepGeom::RotateX3D(rotation) - << HepGeom::TranslateZ3D(position) ); + const GeoShape & hybridPos2 = (*hybridShape1 << GeoTrf::RotateX3D(rotation) + << GeoTrf::TranslateZ3D(position) ); SCT_MaterialManager materials; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx index ae995a69fb7..7c5baa4f2af 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModule.cxx @@ -37,11 +37,11 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" + + -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" #include <cmath> #include <sstream> @@ -104,42 +104,42 @@ const GeoLogVol * SCT_FwdModule::preBuild() const SCT_GeneralParameters * generalParameters = geometryManager()->generalParameters(); double safety = generalParameters->safety(); - double safetyTmp = safety * CLHEP::cm; // For compatibility with minor bug in older version - safety already in CLHEP units; + double safetyTmp = safety * GeoModelKernelUnits::cm; // For compatibility with minor bug in older version - safety already in CLHEP units; - // module_length = (zhyb->hyby - zhyb->hybysh + zsmi[m_ringType].mountd2 + 0.33 ) * CLHEP::cm + safety; + // module_length = (zhyb->hyby - zhyb->hybysh + zsmi[m_ringType].mountd2 + 0.33 ) * GeoModelKernelUnits::cm + safety; // Distance from outer bybrid edge to outer spine edge. - // FIXME: The 1.05CLHEP::mm is not needed - double moduleLength = m_hybrid->mountPointToOuterEdge() + m_mountPointToCenter + m_spine->moduleCenterToEnd() + 1.05 * CLHEP::mm; + // FIXME: The 1.05GeoModelKernelUnits::mm is not needed + double moduleLength = m_hybrid->mountPointToOuterEdge() + m_mountPointToCenter + m_spine->moduleCenterToEnd() + 1.05 * GeoModelKernelUnits::mm; m_length = moduleLength + safety; // We add a bit of safety for the envelope - // module_thickness = (zhyb->hybz0 * 2 + safety) * CLHEP::cm; + // module_thickness = (zhyb->hybz0 * 2 + safety) * GeoModelKernelUnits::cm; double sensorEnvelopeThickness = 2 * m_sensor->thickness() + m_spine->thickness() + 2 * m_glueThickness; m_thickness = std::max(sensorEnvelopeThickness, m_hybrid->thickness()); - // module_widthInner = ((zsmo->subdq + zssp[m_ringType].ssp0l + 0.325) * 2.+ 0.7 + safety)*CLHEP::cm; // upto to NOVA_760 - // module_widthOuter = ((zsmo->subdq + zssp[m_ringType].ssp2l + 0.325) * 2.+ 0.7 + safety)*CLHEP::cm; // upto to NOVA_760 + // module_widthInner = ((zsmo->subdq + zssp[m_ringType].ssp0l + 0.325) * 2.+ 0.7 + safety)*GeoModelKernelUnits::cm; // upto to NOVA_760 + // module_widthOuter = ((zsmo->subdq + zssp[m_ringType].ssp2l + 0.325) * 2.+ 0.7 + safety)*GeoModelKernelUnits::cm; // upto to NOVA_760 - //module_widthInner = ((zsmo->subdq + zssp[m_ringType].ssp0l) * 2.+ 0.7 + safety)*CLHEP::cm; - //module_widthOuter = ((zsmo->subdq + zssp[m_ringType].ssp2l) * 2.+ 0.7 + safety)*CLHEP::cm; + //module_widthInner = ((zsmo->subdq + zssp[m_ringType].ssp0l) * 2.+ 0.7 + safety)*GeoModelKernelUnits::cm; + //module_widthOuter = ((zsmo->subdq + zssp[m_ringType].ssp2l) * 2.+ 0.7 + safety)*GeoModelKernelUnits::cm; - m_widthInner = (m_spine->width() + 2 * m_subspineL->innerWidth() + 0.7*CLHEP::cm) + safetyTmp; - m_widthOuter = (m_spine->width() + 2 * m_subspineL->outerWidth() + 0.7*CLHEP::cm) + safetyTmp; + m_widthInner = (m_spine->width() + 2 * m_subspineL->innerWidth() + 0.7*GeoModelKernelUnits::cm) + safetyTmp; + m_widthOuter = (m_spine->width() + 2 * m_subspineL->outerWidth() + 0.7*GeoModelKernelUnits::cm) + safetyTmp; if (m_ringType == 3 ) { - // module_widthOuter = (( zsmo->subdq + zssp[m_ringType].ssp2l + 0.325) * 2.+ 1.6 + safety)*CLHEP::cm; // upto to NOVA_760 - // module_widthOuter = (( zsmo->subdq + zssp[m_ringType].ssp2l) * 2.+ 1.6 + safety)*CLHEP::cm; - m_widthOuter = m_spine->width() + 2 * m_subspineL->outerWidth() + 1.6*CLHEP::cm + safetyTmp; + // module_widthOuter = (( zsmo->subdq + zssp[m_ringType].ssp2l + 0.325) * 2.+ 1.6 + safety)*GeoModelKernelUnits::cm; // upto to NOVA_760 + // module_widthOuter = (( zsmo->subdq + zssp[m_ringType].ssp2l) * 2.+ 1.6 + safety)*GeoModelKernelUnits::cm; + m_widthOuter = m_spine->width() + 2 * m_subspineL->outerWidth() + 1.6*GeoModelKernelUnits::cm + safetyTmp; } // Calculate module shift. Distance between module physics center and center of envelope. int hybridSign = m_hybridIsOnInnerEdge ? +1: -1; - //module_shift = (zhyb->hyby - zhyb->hybysh + zsmi[m_ringType].mountd + 0.05)*CLHEP::cm; + //module_shift = (zhyb->hyby - zhyb->hybysh + zsmi[m_ringType].mountd + 0.05)*GeoModelKernelUnits::cm; //module_shift = hybrid * (module_length / 2. - module_shift); - double moduleCenterToHybridOuterEdge = m_hybrid->mountPointToOuterEdge() + m_mountPointToCenter + 0.5*CLHEP::mm; - //FIXME: Should be: (ie don't need the 0.5CLHEP::mm) + double moduleCenterToHybridOuterEdge = m_hybrid->mountPointToOuterEdge() + m_mountPointToCenter + 0.5*GeoModelKernelUnits::mm; + //FIXME: Should be: (ie don't need the 0.5GeoModelKernelUnits::mm) // double moduleCenterToHybridOuterEdge = m_hybrid->mountPointToOuterEdge() + m_mountPointToCenter ; m_moduleShift = hybridSign * (0.5 * m_length - moduleCenterToHybridOuterEdge); @@ -161,7 +161,7 @@ const GeoLogVol * SCT_FwdModule::preBuild() const GeoTrd * moduleEnvelopeShape = new GeoTrd(0.5 * m_thickness, 0.5 * m_thickness, 0.5 * m_widthInner, 0.5 * m_widthOuter, 0.5 * m_length); - const GeoShapeShift & moduleEnvelope = (*moduleEnvelopeShape << HepGeom::TranslateZ3D(m_moduleShift) ); + const GeoShapeShift & moduleEnvelope = (*moduleEnvelopeShape << GeoTrf::TranslateZ3D(m_moduleShift) ); SCT_MaterialManager materials; GeoLogVol * moduleLog = new GeoLogVol(getName(), &moduleEnvelope, materials.gasMaterial()); @@ -194,14 +194,13 @@ GeoVPhysVol * SCT_FwdModule::build(SCT_Identifier id) const double rotation; positionX =-(0.5*m_spine->thickness() + m_glueThickness + 0.5*m_sensor->thickness()); rotation = 0.5 * m_stereoAngle; - CLHEP::Hep3Vector vecB(positionX,0,0); - CLHEP::HepRotation rotB; - rotB.rotateZ(180*CLHEP::degree); // Rotate so that X axis goes from backside to implant side - rotB.rotateX(rotation); + GeoTrf::Translation3D vecB(positionX,0,0); + // Rotate so that X axis goes from backside to implant side + GeoTrf::Transform3D rotB = GeoTrf::RotateX3D(rotation)*GeoTrf::RotateZ3D(180*GeoModelKernelUnits::degree); // First translate in z (only non-zero for truncated middle) // Then rotate and then translate in x. GeoAlignableTransform *bottomTransform - = new GeoAlignableTransform(HepGeom::Transform3D(rotB,vecB)*HepGeom::TranslateZ3D(positionZ)); + = new GeoAlignableTransform(GeoTrf::Transform3D(vecB*rotB)*GeoTrf::TranslateZ3D(positionZ)); int bottomSideNumber = (m_upperSide) ? 0 : 1; id.setSide(bottomSideNumber); @@ -216,21 +215,20 @@ GeoVPhysVol * SCT_FwdModule::build(SCT_Identifier id) const if (m_ringType == 2) { // Place glass pieces in place of sensor - module->add(new GeoTransform(HepGeom::Transform3D(rotB,vecB))); + module->add(new GeoTransform(GeoTrf::Transform3D(vecB*rotB))); module->add(m_sensor->getInactive()); } // Position top (x>0) sensor positionX=-positionX; rotation=-rotation; - CLHEP::HepRotation rotT; - //rotT.rotateZ(180*CLHEP::degree); // Rotate so that X axis goes from implant side to backside - rotT.rotateX(rotation); - CLHEP::Hep3Vector vecT(positionX,0,0); + GeoTrf::RotateX3D rotT(rotation); + //rotT.rotateZ(180*GeoModelKernelUnits::degree); // Rotate so that X axis goes from implant side to backside + GeoTrf::Translation3D vecT(positionX,0,0); // First translate in z (only non-zero for truncated middle) // Then rotate and then translate in x. GeoAlignableTransform *topTransform - = new GeoAlignableTransform(HepGeom::Transform3D(rotT,vecT)*HepGeom::TranslateZ3D(positionZ)); + = new GeoAlignableTransform(GeoTrf::Transform3D(vecT*rotT)*GeoTrf::TranslateZ3D(positionZ)); int topSideNumber = m_upperSide; id.setSide(topSideNumber); @@ -244,7 +242,7 @@ GeoVPhysVol * SCT_FwdModule::build(SCT_Identifier id) const detectorManager()->addAlignableTransform(0, id.getWaferId(), topTransform, topSensorPV); if (m_ringType == 2) { // Place glass pieces in place of sensor - module->add(new GeoTransform(HepGeom::Transform3D(rotT,vecT))); + module->add(new GeoTransform(GeoTrf::Transform3D(vecT*rotT))); module->add(m_sensor->getInactive()); }; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModuleConnector.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModuleConnector.cxx index df662b0483b..d2428723b1e 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModuleConnector.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdModuleConnector.cxx @@ -14,8 +14,7 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Units/PhysicalConstants.h" // For pi +#include "GeoModelKernel/Units.h" #include <cmath> #include <iostream> @@ -49,13 +48,13 @@ SCT_FwdModuleConnector::build() const GeoBox * moduleConnShape = new GeoBox(0.5 * m_thickness, 0.5 * m_rphi, 0.5 * m_deltaR); m_material = materials.getMaterialForVolume(m_materialName, moduleConnShape->volume()); // std::cout << "Material = " << m_material->getName() << std::endl; - // std::cout << "Density = " << m_material->getDensity()/(gram/CLHEP::cm3) << std::endl; + // std::cout << "Density = " << m_material->getDensity()/(gram/GeoModelKernelUnits::cm3) << std::endl; // Shift to correct position within module double xposition = 0.5 * (parameters->fwdHybridThickness() + m_thickness); double zposition = parameters->fwdModuleMountPoint(m_ringType) - parameters->fwdHybridMountPointToInnerEdge() + parameters->fwdHybridLength() - 0.5*(m_deltaR); if (m_ringType == 0) { zposition = -1 * zposition; }; // outer module, hybrid in inner side - const GeoShape & connectorPos = (*moduleConnShape << HepGeom::Translate3D(xposition,0.,zposition)); + const GeoShape & connectorPos = (*moduleConnShape << GeoTrf::Translate3D(xposition,0.,zposition)); const GeoLogVol * moduleConnLog = new GeoLogVol(getName(), &connectorPos, m_material); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdOptoHarness.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdOptoHarness.cxx index deed889f44e..422f0087e19 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdOptoHarness.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdOptoHarness.cxx @@ -12,8 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Units/PhysicalConstants.h" // For pi +#include "GeoModelKernel/Units.h" #include <cmath> #include <iostream> @@ -59,7 +58,7 @@ SCT_FwdOptoHarness::build() m_material = materials.getMaterialForVolume(m_materialName, optoHarnessShape->volume()); // m_material = materials.getMaterial(m_materialName); // cout << "Material = " << m_material->getName() << endl; - // cout << "Density = " << m_material->getDensity()/(gram/CLHEP::cm3) << endl; + // cout << "Density = " << m_material->getDensity()/(gram/GeoModelKernelUnits::cm3) << endl; const GeoLogVol * optoHarnessLog = new GeoLogVol(getName(), optoHarnessShape, m_material); GeoPhysVol * optoHarness = new GeoPhysVol(optoHarnessLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPConnector.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPConnector.cxx index 1598f0d4133..29b530629e4 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPConnector.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPConnector.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FwdPPConnector::SCT_FwdPPConnector(const std::string & name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPCooling.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPCooling.cxx index 0c4a4e0135d..ef6c3b76ee7 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPCooling.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPPCooling.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FwdPPCooling::SCT_FwdPPCooling(const std::string & name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPatchPanel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPatchPanel.cxx index c7e3982af68..514a6bf0270 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPatchPanel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPatchPanel.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FwdPatchPanel::SCT_FwdPatchPanel(const std::string & name, int type) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPowerTape.cxx index 5bceb97faaa..136cd3e68c9 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPowerTape.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdPowerTape.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> @@ -45,11 +45,11 @@ GeoVPhysVol * SCT_FwdPowerTape::build() { // Calculate the dimensions. - // The area = 2*CLHEP::pi*r_ave*delta_r approx= 2 * CLHEP::pi * rMin * delta_r + // The area = 2*GeoModelKernelUnits::pi*r_ave*delta_r approx= 2 * GeoModelKernelUnits::pi * rMin * delta_r // where m_thickness = delta_r double area = m_crossSectArea * m_numModules; - m_thickness = area/(2. * CLHEP::pi * m_innerRadius); + m_thickness = area/(2. * GeoModelKernelUnits::pi * m_innerRadius); m_outerRadius = m_innerRadius + m_thickness; // Make the support disk. A simple tube. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx index 53d81d14de5..d7194c036ad 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRing.cxx @@ -25,10 +25,10 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <sstream> #include <cmath> @@ -128,8 +128,8 @@ SCT_FwdRing::preBuild() // If disc is rotated then recalculate the angle. // It assumed the disc is rotated around the Y axis. // TODO: Check this assumption. - if (m_discRotated) angle = CLHEP::pi - angle; - double divisionAngle = 2*CLHEP::pi / m_numModules; + if (m_discRotated) angle = GeoModelKernelUnits::pi - angle; + double divisionAngle = 2*GeoModelKernelUnits::pi / m_numModules; // Now we choose module 0 as the first module with -0.5 * divAngle < phi <= 0.5 * divAngle double moduleCount = angle / divisionAngle; @@ -140,7 +140,7 @@ SCT_FwdRing::preBuild() // Determine numbering for -ve endcap. // This is for a rotation around Y axis. // After rotation we want the first module closest to phi = 0. - double angleNegEC = CLHEP::pi - m_startAngle; + double angleNegEC = GeoModelKernelUnits::pi - m_startAngle; double moduleCountNegEC = angleNegEC / divisionAngle; m_moduleZero = static_cast<int>(floor(moduleCountNegEC + 0.5 - 0.0001)); @@ -151,16 +151,16 @@ SCT_FwdRing::preBuild() // std::cout << "RingType, RingSide, Stereo, rotated = " << m_iRing << " " << m_ringSide << " " // << m_stereoSign << " " << m_discRotated << std::endl; - // std::cout << "Ref Start angle and stagger " << m_refStartAngle/CLHEP::deg << " " << m_refFirstStagger << std::endl; - // std::cout << "First Start angle and stagger " << m_startAngle/CLHEP::deg << " " << m_firstStagger << std::endl; + // std::cout << "Ref Start angle and stagger " << m_refStartAngle/GeoModelKernelUnits::deg << " " << m_refFirstStagger << std::endl; + // std::cout << "First Start angle and stagger " << m_startAngle/GeoModelKernelUnits::deg << " " << m_firstStagger << std::endl; // std::cout << "Module zero in -ve endcap " << m_moduleZero << std::endl; makeModuleServices(); // Make envelope for ring - double moduleClearanceZ = 0.6 * CLHEP::mm; // Arbitrary choice - double moduleClearanceR = 0.5 * CLHEP::mm; + double moduleClearanceZ = 0.6 * GeoModelKernelUnits::mm; // Arbitrary choice + double moduleClearanceR = 0.5 * GeoModelKernelUnits::mm; m_innerRadius = m_module->innerRadius() - 0.5*m_module->stereoAngle()*(0.5*m_module->innerWidth()) - moduleClearanceR; m_outerRadius = sqrt(sqr(m_module->outerRadius()) + sqr(0.5*m_module->outerWidth())) @@ -168,15 +168,15 @@ SCT_FwdRing::preBuild() // Calculate clearance we have. NB. This is an approximate. //std::cout << "Module clearance (radial value does not take into account stereo rotation:" << std::endl; - //std::cout << " radial: " << moduleClearanceR/CLHEP::mm << " mm" << std::endl; - //std::cout << " away from disc in z " << moduleClearanceZ/CLHEP::mm << " mm" << std::endl; + //std::cout << " radial: " << moduleClearanceR/GeoModelKernelUnits::mm << " mm" << std::endl; + //std::cout << " away from disc in z " << moduleClearanceZ/GeoModelKernelUnits::mm << " mm" << std::endl; //std::cout << " Lo Module to cooling block: " << -m_moduleStagger-0.5*m_module->thickness() - m_moduleServicesLoOuterZPos << std::endl; //std::cout << " Hi Module to cooling block: " << +m_moduleStagger-0.5*m_module->thickness() - m_moduleServicesHiOuterZPos << std::endl; //std::cout << " Module to Module: " << m_moduleStagger-m_module->thickness() << std::endl; //std::cout << " towards disc in z " // << std::min(m_moduleStagger-m_module->thickness(), // std::min(-m_moduleStagger-0.5*m_module->thickness() - m_moduleServicesLoOuterZPos, - // +m_moduleStagger-0.5*m_module->thickness() - m_moduleServicesHiOuterZPos)) / CLHEP::mm << " mm" << std::endl; + // +m_moduleStagger-0.5*m_module->thickness() - m_moduleServicesHiOuterZPos)) / GeoModelKernelUnits::mm << " mm" << std::endl; m_thicknessOuter = 0.5 * m_module->thickness() + m_moduleStagger + moduleClearanceZ; m_thicknessInner = m_maxModuleServicesBaseToRingCenter + 2*m_safety; @@ -190,7 +190,7 @@ SCT_FwdRing::preBuild() SCT_MaterialManager materials; const GeoTube * tmpShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness); - const GeoShape & ringEnvelopeShape = (*tmpShape << HepGeom::Translate3D(0, 0, envelopeShift)); + const GeoShape & ringEnvelopeShape = (*tmpShape << GeoTrf::Translate3D(0, 0, envelopeShift)); GeoLogVol * ringLog = new GeoLogVol(getName(), &ringEnvelopeShape, materials.gasMaterial()); //std::cout << "m_innerRadius = " << m_innerRadius << std::endl; @@ -209,7 +209,7 @@ SCT_FwdRing::build(SCT_Identifier id) const // Physical volume for the half ring GeoPhysVol * ring = new GeoPhysVol(m_logVolume); - double deltaPhi = 360*CLHEP::degree / m_numModules; + double deltaPhi = 360*GeoModelKernelUnits::degree / m_numModules; bool negativeEndCap = (id.getBarrelEC() < 0); for (int i = 0; i < m_numModules; i++){ @@ -264,19 +264,18 @@ SCT_FwdRing::build(SCT_Identifier id) const //std::cout << "Endcap# = " <<id.getBarrelEC() // << ", idModule = " << idModule // << ", i = " << i - // << ", phi = " << phi/CLHEP::degree << std::endl; + // << ", phi = " << phi/GeoModelKernelUnits::degree << std::endl; - CLHEP::HepRotation rot; - rot.rotateY(90*CLHEP::degree); + GeoTrf::Transform3D rot = GeoTrf::RotateZ3D(phi + 0.5 * m_module->stereoAngle() * m_stereoSign); if (m_ringSide > 0) { - rot.rotateX(180*CLHEP::degree); + rot = rot*GeoTrf::RotateX3D(180*GeoModelKernelUnits::degree); } - rot.rotateZ(phi + 0.5 * m_module->stereoAngle() * m_stereoSign); + rot = rot*GeoTrf::RotateY3D(90*GeoModelKernelUnits::degree); double zPos = staggerUpperLower * m_moduleStagger * m_ringSide; - CLHEP::Hep3Vector xyz(m_module->sensorCenterRadius(), 0, zPos); - xyz.rotateZ(phi); - HepGeom::Transform3D modulePos(rot,xyz); + GeoTrf::Vector3D xyz(m_module->sensorCenterRadius(), 0, zPos); + xyz = GeoTrf::RotateZ3D(phi)*xyz; + GeoTrf::Transform3D modulePos = GeoTrf::Translate3D(xyz.x(),xyz.y(),xyz.z())*rot; // Add the module @@ -311,7 +310,7 @@ SCT_FwdRing::build(SCT_Identifier id) const } - ring->add(new GeoTransform(HepGeom::RotateZ3D(phi)*HepGeom::Translate3D(rModuleServices, 0, zModuleServices))); + ring->add(new GeoTransform(GeoTrf::RotateZ3D(phi)*GeoTrf::Translate3D(rModuleServices, 0, zModuleServices))); ring->add(moduleServices); } @@ -390,15 +389,15 @@ SCT_FwdRing::makeModuleServices() // Add the cooling blocks // Main Upper - m_moduleServicesHi->add(new GeoTransform(HepGeom::Translate3D(coolingBlkMainR - m_moduleServicesHiRPos, 0, 0))); + m_moduleServicesHi->add(new GeoTransform(GeoTrf::Translate3D(coolingBlkMainR - m_moduleServicesHiRPos, 0, 0))); m_moduleServicesHi->add(m_coolingBlockHiMain->getVolume()); // Secondary Upper - m_moduleServicesHi->add(new GeoTransform(HepGeom::Translate3D(coolingBlkHiSecRMid - m_moduleServicesHiRPos, 0, 0))); + m_moduleServicesHi->add(new GeoTransform(GeoTrf::Translate3D(coolingBlkHiSecRMid - m_moduleServicesHiRPos, 0, 0))); m_moduleServicesHi->add(m_coolingBlockHiSec->getVolume()); // Main Lower - m_moduleServicesLo->add(new GeoTransform(HepGeom::Translate3D(coolingBlkMainR - m_moduleServicesLoRPos, 0, 0))); + m_moduleServicesLo->add(new GeoTransform(GeoTrf::Translate3D(coolingBlkMainR - m_moduleServicesLoRPos, 0, 0))); m_moduleServicesLo->add(m_coolingBlockLoMain->getVolume()); // Secondary Lower - m_moduleServicesLo->add(new GeoTransform(HepGeom::Translate3D(coolingBlkLoSecRMid - m_moduleServicesLoRPos, 0, 0))); + m_moduleServicesLo->add(new GeoTransform(GeoTrf::Translate3D(coolingBlkLoSecRMid - m_moduleServicesLoRPos, 0, 0))); m_moduleServicesLo->add(m_coolingBlockLoSec->getVolume()); } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRingCooling.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRingCooling.cxx index 97bb0348154..4c321aa924e 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRingCooling.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdRingCooling.cxx @@ -12,8 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Units/PhysicalConstants.h" // For pi +#include "GeoModelKernel/Units.h" #include <cmath> diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx index b8b9c54094b..a681a2f0291 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSensor.cxx @@ -31,11 +31,11 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" + +#include "GeoModelKernel/GeoDefinitions.h" + -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" #include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SCT_ForwardModuleSideDesign.h" @@ -157,10 +157,10 @@ const GeoLogVol * SCT_FwdSensor::preBuild() // define the sensor as a boolean volume of the two wafers. // relative position of near sensor double positionNearZ = m_radiusN - m_sensorRadius; - const GeoShape & sensorPosN = (*sensorShapeN<< HepGeom::TranslateZ3D(positionNearZ)) ; + const GeoShape & sensorPosN = (*sensorShapeN<< GeoTrf::TranslateZ3D(positionNearZ)) ; // relative position of near sensor double positionFarZ = m_radiusF - m_sensorRadius; - const GeoShape & sensorPosF = (*sensorShapeF<< HepGeom::TranslateZ3D(positionFarZ) ); + const GeoShape & sensorPosF = (*sensorShapeF<< GeoTrf::TranslateZ3D(positionFarZ) ); sensorShape = &(sensorPosF.add(sensorPosN)); } @@ -172,7 +172,7 @@ const GeoLogVol * SCT_FwdSensor::preBuild() if (m_ringType == 2) { // Make inactive glass sensor. double positionZ = m_radiusN - m_sensorRadius; - const GeoShape & sensorPosN = (*sensorShapeN<< HepGeom::TranslateZ3D(positionZ) ); + const GeoShape & sensorPosN = (*sensorShapeN<< GeoTrf::TranslateZ3D(positionZ) ); GeoLogVol * inactiveLog = new GeoLogVol(getName()+"Glass", &sensorPosN, m_materialGlass); m_inactive = new GeoPhysVol(inactiveLog); m_inactive->ref(); @@ -316,10 +316,10 @@ void SCT_FwdSensor::makeDesign() // This is the default and no action is required. // Can force axes not to be swapped by setting to false. // - // bool phiSyCLHEP::mmetric = true; - // bool etaSyCLHEP::mmetric = false; - // bool depthSyCLHEP::mmetric = true; - // m_design->setSyCLHEP::mmetry(phiSyCLHEP::mmetric, etaSyCLHEP::mmetric, depthSyCLHEP::mmetric, + // bool phiSyGeoModelKernelUnits::mmetric = true; + // bool etaSyGeoModelKernelUnits::mmetric = false; + // bool depthSyGeoModelKernelUnits::mmetric = true; + // m_design->setSyGeoModelKernelUnits::mmetry(phiSyGeoModelKernelUnits::mmetric, etaSyGeoModelKernelUnits::mmetric, depthSyGeoModelKernelUnits::mmetric, // } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSpine.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSpine.cxx index c7291d18e08..7e01fc5b52f 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSpine.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSpine.cxx @@ -25,11 +25,11 @@ #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoShapeUnion.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" + +#include "GeoModelKernel/GeoDefinitions.h" + -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" #include <cmath> @@ -70,7 +70,7 @@ SCT_FwdSpine::getParameters() - parameters->fwdHybridMountPointToInnerEdge() - parameters->fwdModuleHybridEdgeToSpine(m_ringType); - // (zssp[m_ringType].spndox + zsmi[m_ringType].mountd - zhyb->hybysh - zhyb->hybgap0) * CLHEP::cm; + // (zssp[m_ringType].spndox + zsmi[m_ringType].mountd - zhyb->hybysh - zhyb->hybgap0) * GeoModelKernelUnits::cm; } @@ -98,7 +98,7 @@ SCT_FwdSpine::build() SCT_MaterialManager materials; - const GeoShape & spinePosMain = (*spineShapeMain << HepGeom::TranslateZ3D(position) ); + const GeoShape & spinePosMain = (*spineShapeMain << GeoTrf::TranslateZ3D(position) ); m_material = materials.getMaterialForVolume(m_materialName, spineShapeMain->volume()); GeoLogVol * spineLog = new GeoLogVol(getName(), &spinePosMain, m_material); GeoPhysVol * spine = new GeoPhysVol(spineLog); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSubSpine.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSubSpine.cxx index bd8c0303a09..20b6b3db602 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSubSpine.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSubSpine.cxx @@ -25,11 +25,11 @@ #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoShapeUnion.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" + +#include "GeoModelKernel/GeoDefinitions.h" + -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" #include <cmath> @@ -100,7 +100,7 @@ GeoVPhysVol * SCT_FwdSubSpine::build() position = mountPosition - parameters->fwdSubSpineInnerRefDist(m_ringType) - 0.5*m_length1; position = position * HybPos; position2 = (widthMain + m_width1) / 2.; - const GeoShape & spinePos1 = (*spineShape1 << HepGeom::TranslateY3D(m_spineSide * position2) << HepGeom::TranslateZ3D(position) ); + const GeoShape & spinePos1 = (*spineShape1 << GeoTrf::TranslateY3D(m_spineSide * position2) << GeoTrf::TranslateZ3D(position) ); // Middle sub spine @@ -109,7 +109,7 @@ GeoVPhysVol * SCT_FwdSubSpine::build() position = mountPosition - parameters->fwdSubSpineMiddleRefDist(m_ringType) - 0.5*m_length2; position = position * HybPos; position2 = (widthMain + m_width2) / 2.; - const GeoShape & spinePos2 = (*spineShape2 << HepGeom::TranslateY3D(m_spineSide * position2) << HepGeom::TranslateZ3D(position) ); + const GeoShape & spinePos2 = (*spineShape2 << GeoTrf::TranslateY3D(m_spineSide * position2) << GeoTrf::TranslateZ3D(position) ); subSpineMiddle = &spinePos2; } @@ -117,7 +117,7 @@ GeoVPhysVol * SCT_FwdSubSpine::build() position = mountPosition - parameters->fwdSubSpineOuterRefDist(m_ringType) - 0.5*m_length3; position = position * HybPos; position2 = (widthMain + m_width3) / 2.; - const GeoShape & spinePos3 = (*spineShape3 << HepGeom::TranslateY3D(m_spineSide * position2) << HepGeom::TranslateZ3D(position) ); + const GeoShape & spinePos3 = (*spineShape3 << GeoTrf::TranslateY3D(m_spineSide * position2) << GeoTrf::TranslateZ3D(position) ); const GeoShapeUnion & spineTmp = (spinePos1).add(spinePos3); if (m_ringType != 3) { diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSupportFrame.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSupportFrame.cxx index 6da8b36f7f7..cdac143bd99 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSupportFrame.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdSupportFrame.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_FwdSupportFrame::SCT_FwdSupportFrame(const std::string & name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdThermalShieldElement.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdThermalShieldElement.cxx index 8c9f7518517..d956aca563f 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdThermalShieldElement.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdThermalShieldElement.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx index 0e922091a4c..c28934fe5d3 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_FwdWheel.cxx @@ -37,10 +37,10 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <sstream> @@ -111,12 +111,12 @@ SCT_FwdWheel::getParameters() // FIXME: Check and put these in DB or calculate them // We have a maximum width of 80.2. Make it 75 for some clearance. - //m_innerRadius = 267 * CLHEP::mm; - //m_outerRadius = 590 * CLHEP::mm; - //m_thickness = 100 * CLHEP::mm; + //m_innerRadius = 267 * GeoModelKernelUnits::mm; + //m_outerRadius = 590 * GeoModelKernelUnits::mm; + //m_thickness = 100 * GeoModelKernelUnits::mm; // These get swapped later if the wheel is rotated. - m_thicknessFront = 30 * CLHEP::mm; - m_thicknessBack = 45 * CLHEP::mm; + m_thicknessFront = 30 * GeoModelKernelUnits::mm; + m_thicknessBack = 45 * GeoModelKernelUnits::mm; m_numFSITypes = parameters->fwdFSINumGeomTypes(); m_fsiVector = &(parameters->fsiVector(m_iWheel)); @@ -207,7 +207,7 @@ SCT_FwdWheel::preBuild() // If first or last wheel there is nothing protruding beyond the rings so we reduce the // envelope size. Comes to about 20 mm. Note the front becomes the back later for the last wheel. if ((m_iWheel == 0) || (m_iWheel == m_numWheels - 1)) { - m_thicknessFront = maxModuleThickness + 1*CLHEP::mm; // We give plenty of safety as we have the room. + m_thicknessFront = maxModuleThickness + 1*GeoModelKernelUnits::mm; // We give plenty of safety as we have the room. // But now modified by disc fixations if(m_discFixationPresent) { m_thicknessFront = std::max(m_thicknessFront,m_discFixation->radius() + m_safety); @@ -249,7 +249,7 @@ SCT_FwdWheel::preBuild() // TODO. Have to account for FSI and patch panels //m_thickness = 2. * maxRingOffset + maxThickness; - // m_thickness = 100 * CLHEP::mm; + // m_thickness = 100 * GeoModelKernelUnits::mm; // std::cout << "Wheel " << m_iWheel << ":" << std::endl; // std::cout << " innerRadius = " << m_innerRadius << std::endl; @@ -261,7 +261,7 @@ SCT_FwdWheel::preBuild() double envelopeShift = 0.5*(m_thicknessBack - m_thicknessFront); const GeoTube * tmpShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5 * m_thickness); - const GeoShape & fwdWheelEnvelopeShape = *tmpShape << HepGeom::Translate3D(0, 0, envelopeShift); + const GeoShape & fwdWheelEnvelopeShape = *tmpShape << GeoTrf::Translate3D(0, 0, envelopeShift); const GeoLogVol * fwdWheelLog = new GeoLogVol(getName(), &fwdWheelEnvelopeShape, materials.gasMaterial()); @@ -305,11 +305,10 @@ SCT_FwdWheel::build(SCT_Identifier id) const // std::cout << " ring outer radius = " << ring->outerRadius() << std::endl; - CLHEP::Hep3Vector pos(0, 0, ringZpos); std::string ringNameTag = "Ring#" + intToString(ring->identifier()); wheel->add(new GeoNameTag(ringNameTag)); wheel->add(new GeoIdentifierTag(ring->identifier())); - wheel->add(new GeoTransform(HepGeom::Translate3D(pos))); + wheel->add(new GeoTransform(GeoTrf::Translate3D(0, 0, ringZpos))); id.setEtaModule(ring->identifier()); wheel->add(ring->build(id)); @@ -319,7 +318,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const iRing); double coolingZpos = ring->ringSide() * (0.5*(m_discSupport->thickness() + cooling.thickness())); //std::cout << "coolingZpos, thickness = " << coolingZpos << ", " << cooling->thickness() << std::endl; - wheel->add(new GeoTransform(HepGeom::TranslateZ3D(coolingZpos))); + wheel->add(new GeoTransform(GeoTrf::TranslateZ3D(coolingZpos))); wheel->add(cooling.getVolume()); // Power Tapes @@ -356,7 +355,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const //std::cout << " modules min " << std::abs(ringZpos) - 0.5*ring->thicknessInner() << std::endl; //std::cout << "new powerTapeZpos, thickness = " << powerTapeZpos << ", " << powerTape->thickness() << std::endl; - wheel->add(new GeoTransform(HepGeom::TranslateZ3D(powerTapeZpos))); + wheel->add(new GeoTransform(GeoTrf::TranslateZ3D(powerTapeZpos))); wheel->add(powerTape.getVolume()); @@ -392,7 +391,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const for (int iRepeat = 0; iRepeat < numRepeat; iRepeat++) { // Calculate the location. - double patchPanelAngle = m_patchPanelLocAngle[iPPLoc] + iRepeat * 90*CLHEP::degree; + double patchPanelAngle = m_patchPanelLocAngle[iPPLoc] + iRepeat * 90*GeoModelKernelUnits::degree; double patchPanelZpos = patchPanelSide * (powerTapeZMax + 0.5*m_patchPanel[ppType]->thickness() + m_safety); double patchPanelR = m_patchPanel[ppType]->midRadius(); @@ -404,7 +403,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const } // Add it to the wheel - wheel->add(new GeoTransform(HepGeom::RotateZ3D(patchPanelAngle)*HepGeom::TranslateX3D(patchPanelR)*HepGeom::TranslateZ3D(patchPanelZpos))); + wheel->add(new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(patchPanelR)*GeoTrf::TranslateZ3D(patchPanelZpos))); wheel->add(m_patchPanel[ppType]->getVolume()); // Make and add the connector for PPF0e (type 0) @@ -419,7 +418,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const std::cout << " Wheel outer radius: " << m_outerRadius << std::endl; } // Add it to the wheel - wheel->add(new GeoTransform(HepGeom::RotateZ3D(patchPanelAngle)*HepGeom::TranslateX3D(ppConnectorR)*HepGeom::TranslateZ3D(ppConnectorZpos))); + wheel->add(new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(ppConnectorR)*GeoTrf::TranslateZ3D(ppConnectorZpos))); wheel->add(m_pPConnector->getVolume()); } @@ -435,7 +434,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const std::cout << " Wheel outer radius: " << m_outerRadius << std::endl; } // Add it to the wheel - wheel->add(new GeoTransform(HepGeom::RotateZ3D(patchPanelAngle)*HepGeom::TranslateX3D(ppCoolingR)*HepGeom::TranslateZ3D(ppCoolingZpos))); + wheel->add(new GeoTransform(GeoTrf::RotateZ3D(patchPanelAngle)*GeoTrf::TranslateX3D(ppCoolingR)*GeoTrf::TranslateZ3D(ppCoolingZpos))); wheel->add(m_pPCooling->getVolume()); } } @@ -454,7 +453,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const if(m_numRings > 2) {optoharnessName+="I";} SCT_FwdOptoHarness optoharness(optoharnessName+"W"+intToString(m_iWheel),m_numRings); double optoHarnessZpos = 0.5*m_rotateWheel*(m_discSupport->thickness() + optoharness.thickness()); - wheel->add(new GeoTransform(HepGeom::TranslateZ3D(optoHarnessZpos))); + wheel->add(new GeoTransform(GeoTrf::TranslateZ3D(optoHarnessZpos))); wheel->add(optoharness.getVolume()); optoHarnessZMax = optoHarnessZpos + 0.5*optoharness.thickness(); } @@ -472,8 +471,8 @@ SCT_FwdWheel::build(SCT_Identifier id) const // << "Sim type: " << (*m_fsiVector)[iFSI]->simTypeString() << ", " // << "Actual type: " << (*m_fsiVector)[iFSI]->actualType() << ", " // << "Loc type: " << (*m_fsiVector)[iFSI]->locationType() << ", " - // << "Radius(mm): " << fsiRadius/CLHEP::mm << ", " - // << "Phi(deg): " << fsiPhi/CLHEP::deg << ", " + // << "Radius(mm): " << fsiRadius/GeoModelKernelUnits::mm << ", " + // << "Phi(deg): " << fsiPhi/GeoModelKernelUnits::deg << ", " // << "Thickness(mm): " << m_fsiType[type]->thickness() << ", " // << "ZOffset(mm): " << m_fsiType[type]->zOffset() << ", " // << "RPhi(mm): " << m_fsiType[type]->rphi() << ", " @@ -504,7 +503,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const } } - wheel->add(new GeoTransform(HepGeom::RotateZ3D(fsiPhi)*HepGeom::TranslateX3D(fsiRadius)*HepGeom::TranslateZ3D(fsiZpos))); + wheel->add(new GeoTransform(GeoTrf::RotateZ3D(fsiPhi)*GeoTrf::TranslateX3D(fsiRadius)*GeoTrf::TranslateZ3D(fsiZpos))); wheel->add(m_fsiType[type]->getVolume()); @@ -516,7 +515,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const // The disc fixations repeat in the four quadrants. for (int iRepeat = 0; iRepeat < 4; iRepeat++) { // Calculate the location. - double discFixationAngle = m_discFixationLocAngle[iLoc] + iRepeat * 90*CLHEP::degree; + double discFixationAngle = m_discFixationLocAngle[iLoc] + iRepeat * 90*GeoModelKernelUnits::degree; double discFixationR = m_ringMaxRadius + 0.5*m_discFixation->thickness() + m_safety; // Check is within wheel if (discFixationR + 0.5*m_discFixation->thickness() >= m_outerRadius) { @@ -525,7 +524,7 @@ SCT_FwdWheel::build(SCT_Identifier id) const std::cout << " Wheel outer radius: " << m_outerRadius << std::endl; } // Add it to the wheel - wheel->add(new GeoTransform(HepGeom::RotateY3D(90.*CLHEP::degree)*HepGeom::RotateX3D(discFixationAngle)*HepGeom::TranslateZ3D(discFixationR))); + wheel->add(new GeoTransform(GeoTrf::RotateY3D(90.*GeoModelKernelUnits::degree)*GeoTrf::RotateX3D(discFixationAngle)*GeoTrf::TranslateZ3D(discFixationR))); wheel->add(m_discFixation->getVolume()); } } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx index b6039ef3e27..f5ae06e7378 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_GeneralParameters.cxx @@ -6,14 +6,14 @@ #include "SCT_GeoModel/SCT_DataBase.h" #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "InDetGeoModelUtils/TopLevelPlacements.h" #include <iostream> -const double SCT_SAFETY = 0.01 * CLHEP::mm; // Used in some places to make envelopes slightly larger to ensure +const double SCT_SAFETY = 0.01 * GeoModelKernelUnits::mm; // Used in some places to make envelopes slightly larger to ensure // no overlaps due to rounding errors. @@ -30,7 +30,7 @@ SCT_GeneralParameters::~SCT_GeneralParameters() } -const HepGeom::Transform3D & +const GeoTrf::Transform3D & SCT_GeneralParameters::partTransform(const std::string & partName) const { return m_placements->transform(partName); @@ -62,9 +62,9 @@ double SCT_GeneralParameters::temperature() const { if (m_rdb->conditionsTable()->size() == 0) { - return 266.15 * CLHEP::kelvin; // -7 C + return 266.15 * GeoModelKernelUnits::kelvin; // -7 C } - return (m_rdb->conditions()->getDouble("TEMPERATURE") + 273.15) * CLHEP::kelvin; + return (m_rdb->conditions()->getDouble("TEMPERATURE") + 273.15) * GeoModelKernelUnits::kelvin; } @@ -72,18 +72,18 @@ double SCT_GeneralParameters::biasVoltage() const { if (m_rdb->conditionsTable()->size() == 0) { - return 100 * CLHEP::volt; + return 100 * GeoModelKernelUnits::volt; } - return m_rdb->conditions()->getDouble("BIASVOLT") * CLHEP::volt; + return m_rdb->conditions()->getDouble("BIASVOLT") * GeoModelKernelUnits::volt; } double SCT_GeneralParameters::depletionVoltage() const { if (m_rdb->conditionsTable()->size() == 0) { - return 20 * CLHEP::volt; + return 20 * GeoModelKernelUnits::volt; } - return m_rdb->conditions()->getDouble("DEPLETIONVOLT") * CLHEP::volt; + return m_rdb->conditions()->getDouble("DEPLETIONVOLT") * GeoModelKernelUnits::volt; } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Harness.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Harness.cxx index 8c712f019ba..a713cba0173 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Harness.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Harness.cxx @@ -13,7 +13,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_Harness::SCT_Harness(const std::string & name, double length) : SCT_SharedComponentFactory(name), m_length(length) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Hybrid.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Hybrid.cxx index 6a4293a48aa..3572f165608 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Hybrid.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Hybrid.cxx @@ -13,7 +13,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_Hybrid::SCT_Hybrid(const std::string & name) : SCT_SharedComponentFactory(name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx index a50bb9c1e95..b30430ed63f 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InnerSide.cxx @@ -32,9 +32,8 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" - -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include <cmath> @@ -125,11 +124,11 @@ SCT_InnerSide::preBuild() // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (00)********************************* // *** -->> (00)********************************* - m_env1RefPointVector = new CLHEP::Hep3Vector(0.0, 0.0, 0.0); - m_env2RefPointVector = new CLHEP::Hep3Vector(-ise2PosX, -ise2PosY, -ise2PosZ); + m_env1RefPointVector = new GeoTrf::Vector3D(0.0, 0.0, 0.0); + m_env2RefPointVector = new GeoTrf::Vector3D(-ise2PosX, -ise2PosY, -ise2PosZ); // *** End of modified lines. ------------------ (00)********************************* - m_hybridPos = new GeoTransform(HepGeom::Translate3D(hybridPosX, hybridPosY, hybridPosZ)); + m_hybridPos = new GeoTransform(GeoTrf::Translate3D(hybridPosX, hybridPosY, hybridPosZ)); m_hybridPos->ref(); // The depth axis goes from the backside to the implant side @@ -142,11 +141,11 @@ SCT_InnerSide::preBuild() // // Shown is the outer side. The inner side is the same but with a rotation of 180 deg around the z-axis. // - //CLHEP::HepRotation rotSensor; - //rotSensor.rotateZ(180*CLHEP::deg); - //m_outerSidePos = new HepGeom::Transform3D(rotOuter, CLHEP::Hep3Vector(0.5 * (m_sensorGap + sectThickness), 0., 0.)); - //m_sensorPos = new GeoTransform(HepGeom::Transform3D(rotSensor, CLHEP::Hep3Vector(sensorPosX, sensorPosY, sensorPosZ))); - m_sensorPos = new GeoTransform(HepGeom::Translate3D(sensorPosX, sensorPosY, sensorPosZ)); + //GeoModelKernelUnits::HepRotation rotSensor; + //rotSensor.rotateZ(180*GeoModelKernelUnits::deg); + //m_outerSidePos = new GeoTrf::Transform3D(rotOuter, GeoTrf::Vector3D(0.5 * (m_sensorGap + sectThickness), 0., 0.)); + //m_sensorPos = new GeoTransform(GeoTrf::Transform3D(rotSensor, GeoTrf::Vector3D(sensorPosX, sensorPosY, sensorPosZ))); + m_sensorPos = new GeoTransform(GeoTrf::Translate3D(sensorPosX, sensorPosY, sensorPosZ)); m_sensorPos->ref(); // @@ -160,7 +159,7 @@ SCT_InnerSide::preBuild() 0.5 * l_ise2); const GeoShape & InnerSideEnvelopeShape = (*ise1Shape). - add(*ise2Shape << HepGeom::Translate3D(ise2PosX, ise2PosY, ise2PosZ)); + add(*ise2Shape << GeoTrf::Translate3D(ise2PosX, ise2PosY, ise2PosZ)); const GeoLogVol * InnerSideEnvelopeLog = new GeoLogVol("InnerSideEnvelope", &InnerSideEnvelopeShape, diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InterLink.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InterLink.cxx index 48a59aacabd..a9694cdbc68 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InterLink.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_InterLink.cxx @@ -14,7 +14,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoTransform.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_InterLink::SCT_InterLink(const std::string & name) : SCT_SharedComponentFactory(name), @@ -109,28 +109,28 @@ SCT_InterLink::build() m_interLink->ref(); // Interlink segments: - m_interLinkSegShape = new GeoTubs(m_innerRadius, m_outerRadius, 0.5*m_length, - 0.5*m_dPhi*CLHEP::radian, m_dPhi*CLHEP::radian); + m_interLinkSegShape = new GeoTubs(m_innerRadius, m_outerRadius, 0.5*m_length, - 0.5*m_dPhi*GeoModelKernelUnits::radian, m_dPhi*GeoModelKernelUnits::radian); m_interLinkSegLog = new GeoLogVol("InterlinkSegment", m_interLinkSegShape, materials.getMaterialForVolume(m_materialName, m_interLinkSegShape->volume())); m_interLinkSeg = new GeoPhysVol(m_interLinkSegLog); m_interLinkSeg->ref(); for(int i=0; i<m_nRepeat; i++) { - double interlinkAngle = m_phiPos + (i * 360./m_nRepeat)*CLHEP::deg; - GeoTransform* geoTransform = new GeoTransform(HepGeom::RotateZ3D(interlinkAngle)); + double interlinkAngle = m_phiPos + (i * 360./m_nRepeat)*GeoModelKernelUnits::deg; + GeoTransform* geoTransform = new GeoTransform(GeoTrf::RotateZ3D(interlinkAngle)); m_geoTransforms.push_back(geoTransform); m_interLink->add(geoTransform); m_interLink->add(m_interLinkSeg); } // B6 bearings - m_bearingShape = new GeoTubs(m_innerRadiusBearing, m_outerRadiusBearing, 0.5*m_lengthBearing, - 0.5*m_dPhiBearing*CLHEP::radian, m_dPhiBearing*CLHEP::radian); + m_bearingShape = new GeoTubs(m_innerRadiusBearing, m_outerRadiusBearing, 0.5*m_lengthBearing, - 0.5*m_dPhiBearing*GeoModelKernelUnits::radian, m_dPhiBearing*GeoModelKernelUnits::radian); m_bearingLog = new GeoLogVol("Bearing", m_bearingShape, materials.getMaterialForVolume(m_materialNameBearing, m_bearingShape->volume())); m_bearing = new GeoPhysVol(m_bearingLog); m_bearing->ref(); for(int i=0; i<m_nRepeatBearing; i++) { - double bearingAngle = m_phiPosBearing + (i * 360./m_nRepeatBearing)*CLHEP::deg; - GeoTransform* geoTransform = new GeoTransform(HepGeom::RotateZ3D(bearingAngle)); + double bearingAngle = m_phiPosBearing + (i * 360./m_nRepeatBearing)*GeoModelKernelUnits::deg; + GeoTransform* geoTransform = new GeoTransform(GeoTrf::RotateZ3D(bearingAngle)); m_geoTransforms.push_back(geoTransform); m_interLink->add(geoTransform); m_interLink->add(m_bearing); @@ -139,16 +139,16 @@ SCT_InterLink::build() // FSI Flange segments: // These exactly fill gaps between interlink segments, with smaller radial extent if(m_includeFSIFlange) { - double dPhiFSI = (360./m_nRepeat)*CLHEP::deg - m_dPhi; - m_FSIFlangeShape = new GeoTubs(m_innerRadiusFSIFlange, m_outerRadiusFSIFlange, 0.5*m_length, - 0.5*dPhiFSI*CLHEP::radian, dPhiFSI*CLHEP::radian); + double dPhiFSI = (360./m_nRepeat)*GeoModelKernelUnits::deg - m_dPhi; + m_FSIFlangeShape = new GeoTubs(m_innerRadiusFSIFlange, m_outerRadiusFSIFlange, 0.5*m_length, - 0.5*dPhiFSI*GeoModelKernelUnits::radian, dPhiFSI*GeoModelKernelUnits::radian); m_FSIFlangeLog = new GeoLogVol("FSIFlangeSegment", m_FSIFlangeShape, materials.getMaterialForVolume(m_materialNameFSIFlange, m_FSIFlangeShape->volume())); m_FSIFlange = new GeoPhysVol(m_FSIFlangeLog); m_FSIFlange->ref(); for(int i=0; i<m_nRepeat; i++) { - double phiPosFSI = m_phiPos + (180./m_nRepeat)*CLHEP::deg; - double FSIFlangeAngle = phiPosFSI + (i * 360./m_nRepeat)*CLHEP::deg; - GeoTransform* geoTransform = new GeoTransform(HepGeom::RotateZ3D(FSIFlangeAngle)); + double phiPosFSI = m_phiPos + (180./m_nRepeat)*GeoModelKernelUnits::deg; + double FSIFlangeAngle = phiPosFSI + (i * 360./m_nRepeat)*GeoModelKernelUnits::deg; + GeoTransform* geoTransform = new GeoTransform(GeoTrf::RotateZ3D(FSIFlangeAngle)); m_geoTransforms.push_back(geoTransform); m_interLink->add(geoTransform); m_interLink->add(m_FSIFlange); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx index 7f7e191b456..d8fbdccbe69 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Layer.cxx @@ -39,10 +39,8 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoShapeSubtraction.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include <sstream> #include <cmath> @@ -151,7 +149,7 @@ SCT_Layer::preBuild() // Calculations for making active layer components - called ski. // This is the modules + doglegs + cooling blocks + coolingpipe // - double divisionAngle = 360 * CLHEP::degree / m_skisPerLayer; + double divisionAngle = 360 * GeoModelKernelUnits::degree / m_skisPerLayer; // We define here the first module(id = 0) as the nearest module to phi = 0 with positive phi. // We allow slightly negative in case of rounding errors. @@ -201,7 +199,7 @@ SCT_Layer::preBuild() // Build the volume representing the cooling inlets, outlet and U-bends. // We cannot do this until we have the dimensions of the clamp double coolingInnerRadius = m_clamp->outerRadius(); - double clearance = 1*CLHEP::mm; + double clearance = 1*GeoModelKernelUnits::mm; double coolingLength = 0.5*m_cylinderLength - 0.5*m_activeLength - clearance; m_coolingEnd = new SCT_CoolingEnd("CoolingEnd"+layerNumStr, m_iLayer, coolingInnerRadius, coolingLength); @@ -273,7 +271,7 @@ SCT_Layer::build(SCT_Identifier id) const // We make this a fullPhysVol for alignment code. GeoFullPhysVol * layer = new GeoFullPhysVol(m_logVolume); - double divisionAngle = 360 * CLHEP::degree / m_skisPerLayer; + double divisionAngle = 360 * GeoModelKernelUnits::degree / m_skisPerLayer; // // Active Layer @@ -292,17 +290,15 @@ SCT_Layer::build(SCT_Identifier id) const double phi = m_skiPhiStart + iSki * divisionAngle; - // std::cout << "m_skiPhiStart = " << m_skiPhiStart/CLHEP::degree << ", phi = " << phi/CLHEP::degree << std::endl; + // std::cout << "m_skiPhiStart = " << m_skiPhiStart/GeoModelKernelUnits::degree << ", phi = " << phi/GeoModelKernelUnits::degree << std::endl; - CLHEP::Hep3Vector pos(m_radius, 0, 0); - CLHEP::HepRotation rot; - rot.rotateZ(phi); - rot.rotateZ(m_tilt); - pos.rotateZ(phi); + GeoTrf::Vector3D pos(m_radius, 0, 0); + pos = GeoTrf::RotateZ3D(phi)*pos; + GeoTrf::Transform3D rot = GeoTrf::RotateZ3D(m_tilt)*GeoTrf::RotateZ3D(phi); // Because the ski envelope center is not positioned at the rotation axis for the ski we must first // apply the inverse of refPointTransform() of the ski. - HepGeom::Transform3D trans(HepGeom::Transform3D(rot,pos) * m_ski->getRefPointTransform()->getTransform().inverse()); + GeoTrf::Transform3D trans(GeoTrf::Transform3D(GeoTrf::Translate3D(pos.x(),pos.y(),pos.z())*rot) * m_ski->getRefPointTransform()->getTransform().inverse()); // std::cout << "Adding ski at pos: " << pos << std::endl; // std::cout << " StereoInner = " << m_module->stereoInner() << std::endl; @@ -315,15 +311,15 @@ SCT_Layer::build(SCT_Identifier id) const // And add the service material double clampZPos = 0.5 * m_cylinderLength - 0.5 * m_clamp->length(); - activeLayer->add(new GeoTransform(HepGeom::TranslateZ3D(clampZPos))); + activeLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(clampZPos))); activeLayer->add(m_clamp->getVolume()); - activeLayer->add(new GeoTransform(HepGeom::TranslateZ3D(-clampZPos))); + activeLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(-clampZPos))); activeLayer->add(m_clamp->getVolume()); double coolingZPos = 0.5 * m_cylinderLength - 0.5 * m_coolingEnd->length(); - activeLayer->add(new GeoTransform(HepGeom::TranslateZ3D(coolingZPos))); + activeLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(coolingZPos))); activeLayer->add(m_coolingEnd->getVolume()); - activeLayer->add(new GeoTransform(HepGeom::TranslateZ3D(-coolingZPos))); + activeLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(-coolingZPos))); activeLayer->add(m_coolingEnd->getVolume()); // @@ -341,9 +337,7 @@ SCT_Layer::build(SCT_Identifier id) const for (int iSki = 0; iSki < m_skisPerLayer; iSki++){ //for (int iSki = 0; iSki < 2; iSki++){ double phi = m_skiAuxPhiStart + iSki * divisionAngle; - CLHEP::HepRotation rot; - rot.rotateZ(phi); - auxLayer->add(new GeoTransform(HepGeom::Rotate3D(rot))); + auxLayer->add(new GeoTransform(GeoTrf::RotateZ3D(phi))); auxLayer->add(m_skiAux->getVolume()); } @@ -365,9 +359,9 @@ SCT_Layer::build(SCT_Identifier id) const // Position flanges. One at each end. double flangeZPos = 0.5 * m_cylinderLength - 0.5 * m_flange->length(); - supportLayer->add(new GeoTransform(HepGeom::TranslateZ3D(flangeZPos))); + supportLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(flangeZPos))); supportLayer->add(m_flange->getVolume()); - supportLayer->add(new GeoTransform(HepGeom::TranslateZ3D(-flangeZPos))); + supportLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(-flangeZPos))); supportLayer->add(m_flange->getVolume()); // Position supportCyl @@ -376,20 +370,20 @@ SCT_Layer::build(SCT_Identifier id) const if(m_includeFSI) { // Position FSI fibre masks double fibreMaskZPos = 0.5 * m_cylinderLength - m_flange->length() - 0.5 * m_fibreMask->length(); - supportLayer->add(new GeoTransform(HepGeom::TranslateZ3D(fibreMaskZPos))); + supportLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(fibreMaskZPos))); supportLayer->add(m_fibreMask->getVolume()); - supportLayer->add(new GeoTransform(HepGeom::TranslateZ3D(-fibreMaskZPos))); + supportLayer->add(new GeoTransform(GeoTrf::TranslateZ3D(-fibreMaskZPos))); supportLayer->add(m_fibreMask->getVolume()); // Position FSI End jewels double jewelRadius = std::sqrt(m_fibreMask->innerRadius()*m_fibreMask->innerRadius() - 0.25 * m_endJewel->rPhiWidth()*m_endJewel->rPhiWidth()) - 0.5 * m_endJewel->radialWidth(); // std::cout << "jewelRadius = " << jewelRadius << std::endl; for ( int i=0; i<m_nRepeatEndJewel; i++) { - double jewelAngle = m_phiEndJewel + i * 360.*CLHEP::degree/m_nRepeatEndJewel; + double jewelAngle = m_phiEndJewel + i * 360.*GeoModelKernelUnits::degree/m_nRepeatEndJewel; // std::cout << "jewelAngle = " << jewelAngle << std::endl; - supportLayer->add(new GeoTransform(HepGeom::RotateZ3D(jewelAngle)*HepGeom::TranslateX3D(jewelRadius)*HepGeom::TranslateZ3D(m_zEndJewel))); + supportLayer->add(new GeoTransform(GeoTrf::RotateZ3D(jewelAngle)*GeoTrf::TranslateX3D(jewelRadius)*GeoTrf::TranslateZ3D(m_zEndJewel))); supportLayer->add(m_endJewel->getVolume()); - supportLayer->add(new GeoTransform(HepGeom::RotateZ3D(jewelAngle)*HepGeom::TranslateX3D(jewelRadius)*HepGeom::TranslateZ3D(-m_zEndJewel))); + supportLayer->add(new GeoTransform(GeoTrf::RotateZ3D(jewelAngle)*GeoTrf::TranslateX3D(jewelRadius)*GeoTrf::TranslateZ3D(-m_zEndJewel))); supportLayer->add(m_endJewel->getVolume()); } @@ -397,11 +391,11 @@ SCT_Layer::build(SCT_Identifier id) const double scorpionRadius = std::sqrt(m_supportCyl->innerRadius()*m_supportCyl->innerRadius() - 0.25 * m_scorpion->rPhiWidth()*m_scorpion->rPhiWidth()) - 0.5 * m_scorpion->radialWidth(); // std::cout << "scorpionRadius = " << scorpionRadius << std::endl; for ( int i=0; i<m_nRepeatScorpion; i++) { - double scorpionAngle = m_phiScorpion + i * 360.*CLHEP::degree/m_nRepeatScorpion; + double scorpionAngle = m_phiScorpion + i * 360.*GeoModelKernelUnits::degree/m_nRepeatScorpion; // std::cout << "scorpionAngle = " << scorpionAngle << std::endl; - supportLayer->add(new GeoTransform(HepGeom::RotateZ3D(scorpionAngle)*HepGeom::TranslateX3D(scorpionRadius)*HepGeom::TranslateZ3D(m_zScorpion))); + supportLayer->add(new GeoTransform(GeoTrf::RotateZ3D(scorpionAngle)*GeoTrf::TranslateX3D(scorpionRadius)*GeoTrf::TranslateZ3D(m_zScorpion))); supportLayer->add(m_scorpion->getVolume()); - supportLayer->add(new GeoTransform(HepGeom::RotateZ3D(scorpionAngle)*HepGeom::TranslateX3D(scorpionRadius)*HepGeom::TranslateZ3D(-m_zScorpion))); + supportLayer->add(new GeoTransform(GeoTrf::RotateZ3D(scorpionAngle)*GeoTrf::TranslateX3D(scorpionRadius)*GeoTrf::TranslateZ3D(-m_zScorpion))); supportLayer->add(m_scorpion->getVolume()); } } @@ -426,26 +420,26 @@ SCT_Layer::activeEnvelopeExtent(double & rmin, double & rmax) // These are the coordinates of the corners of the ski envelope. // x is in the radial direction and x is in the phi direction. - //CLHEP::Hep3Vector c0(); - CLHEP::Hep3Vector c1(-(m_ski->env1RefPointVector()->x()) - 0.5*(m_ski->env1Thickness()), + //GeoTrf::Vector3D c0(); + GeoTrf::Vector3D c1(-(m_ski->env1RefPointVector()->x()) - 0.5*(m_ski->env1Thickness()), -(m_ski->env1RefPointVector()->y()) + 0.5*(m_ski->env1Width()), 0.0); - CLHEP::Hep3Vector c2(-(m_ski->env2RefPointVector()->x()) - 0.5*(m_ski->env2Thickness()), + GeoTrf::Vector3D c2(-(m_ski->env2RefPointVector()->x()) - 0.5*(m_ski->env2Thickness()), -(m_ski->env2RefPointVector()->y()) + 0.5*(m_ski->env2Width()), 0.0); - //CLHEP::Hep3Vector c3(); - CLHEP::Hep3Vector c4(-(m_ski->env1RefPointVector()->x()) + 0.5*(m_ski->env1Thickness()), + //GeoTrf::Vector3D c3(); + GeoTrf::Vector3D c4(-(m_ski->env1RefPointVector()->x()) + 0.5*(m_ski->env1Thickness()), -(m_ski->env1RefPointVector()->y()) - 0.5*(m_ski->env1Width()), 0.0); //c0.rotateZ(m_tilt); - c1.rotateZ(m_tilt); - c2.rotateZ(m_tilt); + c1 = GeoTrf::RotateZ3D(m_tilt)*c1; + c2 = GeoTrf::RotateZ3D(m_tilt)*c2; //c3.rotateZ(m_tilt); - c4.rotateZ(m_tilt); + c4 = GeoTrf::RotateZ3D(m_tilt)*c4; - CLHEP::Hep3Vector vxmax = c4; - CLHEP::Hep3Vector vxmin; + GeoTrf::Vector3D vxmax = c4; + GeoTrf::Vector3D vxmin; if (c1.x() < c2.x()) { vxmin = c1; } @@ -471,7 +465,7 @@ SCT_Layer::calcSkiPhiOffset() // First calculated for abs(m_tilt). - double divisionAngle = 360 * CLHEP::degree / m_skisPerLayer; + double divisionAngle = 360 * GeoModelKernelUnits::degree / m_skisPerLayer; // double activeHalfWidth = 0.5 * m_skiAux->ski()->module()->activeWidth(); // double moduleHalfThickness = 0.5 * m_skiAux->ski()->module()->thickness(); @@ -501,7 +495,7 @@ SCT_Layer::calcSkiPhiOffset() //// std::cout << " Active width = " << m_skiAux->ski()->module()->activeWidth() << std::endl; //std::cout << " Module width = " << m_module->width() << std::endl; //std::cout << " Active width = " << m_module->activeWidth() << std::endl; - //std::cout << " Division angle = " << divisionAngle/CLHEP::degree << " CLHEP::deg" << std::endl; - //std::cout << " Ski phi offset = " << skiPhiOffset/CLHEP::degree << " CLHEP::deg" << std::endl; + //std::cout << " Division angle = " << divisionAngle/GeoModelKernelUnits::degree << " GeoModelKernelUnits::deg" << std::endl; + //std::cout << " Ski phi offset = " << skiPhiOffset/GeoModelKernelUnits::degree << " GeoModelKernelUnits::deg" << std::endl; return skiPhiOffset; } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_MaterialManager.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_MaterialManager.cxx index b7c66278b10..d5d85326135 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_MaterialManager.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_MaterialManager.cxx @@ -64,7 +64,7 @@ SCT_MaterialManager::loadMaterials() //const GeoMaterial *kapton = getMaterial("std::Kapton"); // 30th Aug 2005 D.Naito added. // CuKapton for Low Mass Tapes - //GeoMaterial * matCuKapton = new GeoMaterial("sct::CuKapton",2.94*gram/CLHEP::cm3); + //GeoMaterial * matCuKapton = new GeoMaterial("sct::CuKapton",2.94*gram/GeoModelKernelUnits::cm3); //matCuKapton->add(const_cast<GeoElement*>(copper), 0.6142); //matCuKapton->add(const_cast<GeoMaterial*>(kapton), 0.3858); //addMaterial(matCuKapton); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx index 487468c5c2a..dea79f0f86d 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Module.cxx @@ -32,14 +32,11 @@ #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" // 8th Aug 2005 S.Mima modified. #include "GeoModelKernel/GeoShapeSubtraction.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" - #include <cmath> SCT_Module::SCT_Module(const std::string & name) @@ -132,80 +129,80 @@ SCT_Module::preBuild() // Define constants for convenience. // for corner of outer side sensor. - CLHEP::Hep3Vector a(0.0, 0.5 * sensorWidth, 0.5 * sensorLength); - CLHEP::Hep3Vector b(0.0, -0.5 * sensorWidth, a.z()); - CLHEP::Hep3Vector c(0.0, b.y(),-0.5 * sensorLength); - CLHEP::Hep3Vector d(0.0, a.y(), c.z()); + GeoTrf::Vector3D a(0.0, 0.5 * sensorWidth, 0.5 * sensorLength); + GeoTrf::Vector3D b(0.0, -0.5 * sensorWidth, a.z()); + GeoTrf::Vector3D c(0.0, b.y(),-0.5 * sensorLength); + GeoTrf::Vector3D d(0.0, a.y(), c.z()); // for corner of inner side sensor. - CLHEP::Hep3Vector e(0.0, a.y(), a.z()); - CLHEP::Hep3Vector f(0.0, b.y(), b.z()); - CLHEP::Hep3Vector g(0.0, c.y(), c.z()); - CLHEP::Hep3Vector h(0.0, d.y(), d.z()); + GeoTrf::Vector3D e(0.0, a.y(), a.z()); + GeoTrf::Vector3D f(0.0, b.y(), b.z()); + GeoTrf::Vector3D g(0.0, c.y(), c.z()); + GeoTrf::Vector3D h(0.0, d.y(), d.z()); // for corner of base board. - CLHEP::Hep3Vector u(0.0, + GeoTrf::Vector3D u(0.0, m_baseBoardOffsetY + 0.5*baseBoardWidth, m_baseBoardOffsetZ + 0.5*baseBoardLength); - CLHEP::Hep3Vector v(0.0, m_baseBoardOffsetY - 0.5*baseBoardWidth, u.z()); - CLHEP::Hep3Vector w(0.0, v.y(), m_baseBoardOffsetZ - 0.5*baseBoardLength); - CLHEP::Hep3Vector x(0.0, u.y(),w.z()); + GeoTrf::Vector3D v(0.0, m_baseBoardOffsetY - 0.5*baseBoardWidth, u.z()); + GeoTrf::Vector3D w(0.0, v.y(), m_baseBoardOffsetZ - 0.5*baseBoardLength); + GeoTrf::Vector3D x(0.0, u.y(),w.z()); // for corner of hybrid, connectorouter and pigtail of outer side. - //CLHEP::Hep3Vector i(0.0, + //GeoTrf::Vector3D i(0.0, // 0.5*outerSideHybridWidth, // m_outerSide->hybridOffsetZ() + 0.5*outerSideHybridLength); - // CLHEP::Hep3Vector k(0.0, + // GeoTrf::Vector3D k(0.0, // -0.5*outerSideHybridWidth, // m_outerSide->hybridOffsetZ() + 0.5*outerSidePigtailLength); - //CLHEP::Hep3Vector l(0.0, + //GeoTrf::Vector3D l(0.0, // -0.5*outerSideHybridWidth - m_outerSide->pigtail()->width(), k.z()); - //CLHEP::Hep3Vector m(0.0, l.y(), + //GeoTrf::Vector3D m(0.0, l.y(), // m_outerSide->hybridOffsetZ() - 0.5*outerSidePigtailLength); - //CLHEP::Hep3Vector n(0.0, k.y(),m.z()); - //CLHEP::Hep3Vector p(0.0, i.y(), + //GeoTrf::Vector3D n(0.0, k.y(),m.z()); + //GeoTrf::Vector3D p(0.0, i.y(), // m_outerSide->hybridOffsetZ() - 0.5*outerSideHybridLength); - CLHEP::Hep3Vector i(0.0, + GeoTrf::Vector3D i(0.0, 0.5*outerSideHybridWidth, m_outerSide->hybridOffsetZ() + 0.5*outerSidePigtailLength); - CLHEP::Hep3Vector l(0.0, + GeoTrf::Vector3D l(0.0, -0.5*outerSideHybridWidth - m_outerSide->pigtail()->width(), i.z()); - CLHEP::Hep3Vector m(0.0, l.y(), + GeoTrf::Vector3D m(0.0, l.y(), m_outerSide->hybridOffsetZ() - 0.5*outerSidePigtailLength); - CLHEP::Hep3Vector p(0.0, i.y(), + GeoTrf::Vector3D p(0.0, i.y(), m.z()); // for corner of hybrid and interConnect of inner side. - CLHEP::Hep3Vector q(0.0, 0.5*outerSideHybridWidth, m_outerSide->hybridOffsetZ() + 0.5*outerSideHybridLength ); - CLHEP::Hep3Vector r(0.0, -0.5*innerSideHybridWidth, q.z()); - CLHEP::Hep3Vector s(0.0, r.y(), m_innerSide->hybridOffsetZ() - 0.5*innerSideHybridLength); - CLHEP::Hep3Vector t(0.0, q.y(), s.z()); - - // All points turn +-20 mCLHEP::rad around physical center of module. - a.rotateX(m_stereoOuter/CLHEP::radian); - b.rotateX(m_stereoOuter/CLHEP::radian); - c.rotateX(m_stereoOuter/CLHEP::radian); - d.rotateX(m_stereoOuter/CLHEP::radian); - - e.rotateX(m_stereoInner/CLHEP::radian); - f.rotateX(m_stereoInner/CLHEP::radian); - g.rotateX(m_stereoInner/CLHEP::radian); - h.rotateX(m_stereoInner/CLHEP::radian); - - i.rotateX(m_stereoOuter/CLHEP::radian); - //k.rotateX(m_stereoOuter/CLHEP::radian); - l.rotateX(m_stereoOuter/CLHEP::radian); - m.rotateX(m_stereoOuter/CLHEP::radian); - //n.rotateX(m_stereoOuter/CLHEP::radian); - p.rotateX(m_stereoOuter/CLHEP::radian); - - q.rotateX(m_stereoInner/CLHEP::radian); - r.rotateX(m_stereoInner/CLHEP::radian); - s.rotateX(m_stereoInner/CLHEP::radian); - t.rotateX(m_stereoInner/CLHEP::radian); + GeoTrf::Vector3D q(0.0, 0.5*outerSideHybridWidth, m_outerSide->hybridOffsetZ() + 0.5*outerSideHybridLength ); + GeoTrf::Vector3D r(0.0, -0.5*innerSideHybridWidth, q.z()); + GeoTrf::Vector3D s(0.0, r.y(), m_innerSide->hybridOffsetZ() - 0.5*innerSideHybridLength); + GeoTrf::Vector3D t(0.0, q.y(), s.z()); + + // All points turn +-20 mGeoModelKernelUnits::rad around physical center of module. + a = GeoTrf::RotateX3D(m_stereoOuter/GeoModelKernelUnits::radian)*a; + b = GeoTrf::RotateX3D(m_stereoOuter/GeoModelKernelUnits::radian)*b; + c = GeoTrf::RotateX3D(m_stereoOuter/GeoModelKernelUnits::radian)*c; + d = GeoTrf::RotateX3D(m_stereoOuter/GeoModelKernelUnits::radian)*d; + + e = GeoTrf::RotateX3D(m_stereoInner/GeoModelKernelUnits::radian)*e; + f = GeoTrf::RotateX3D(m_stereoInner/GeoModelKernelUnits::radian)*f; + g = GeoTrf::RotateX3D(m_stereoInner/GeoModelKernelUnits::radian)*g; + h = GeoTrf::RotateX3D(m_stereoInner/GeoModelKernelUnits::radian)*h; + + i = GeoTrf::RotateX3D(m_stereoOuter/GeoModelKernelUnits::radian)*i; + //k.rotateX(m_stereoOuter/GeoModelKernelUnits::radian); + l = GeoTrf::RotateX3D(m_stereoOuter/GeoModelKernelUnits::radian)*l; + m = GeoTrf::RotateX3D(m_stereoOuter/GeoModelKernelUnits::radian)*m; + //n.rotateX(m_stereoOuter/GeoModelKernelUnits::radian); + p = GeoTrf::RotateX3D(m_stereoOuter/GeoModelKernelUnits::radian)*p; + + q = GeoTrf::RotateX3D(m_stereoInner/GeoModelKernelUnits::radian)*q; + r = GeoTrf::RotateX3D(m_stereoInner/GeoModelKernelUnits::radian)*r; + s = GeoTrf::RotateX3D(m_stereoInner/GeoModelKernelUnits::radian)*s; + t = GeoTrf::RotateX3D(m_stereoInner/GeoModelKernelUnits::radian)*t; // Calculate demension of envelope1. const double z_ab = std::max(a.z(), b.z()); @@ -240,7 +237,7 @@ SCT_Module::preBuild() const double yCenterEnv1 = yminEnv1 + 0.5*widthEnv1; const double zCenterEnv1 = zmaxEnv1 - 0.5*lengthEnv1; - m_env1RefPointVector = new CLHEP::Hep3Vector(-xCenterEnv1, -yCenterEnv1, -zCenterEnv1); + m_env1RefPointVector = new GeoTrf::Vector3D(-xCenterEnv1, -yCenterEnv1, -zCenterEnv1); // Calculate demension of envelope2. const double z_ikl = std::max(i.z(), l.z()); @@ -271,7 +268,7 @@ SCT_Module::preBuild() const double yCenterEnv2 = ymaxEnv2 - 0.5*widthEnv2; const double zCenterEnv2 = zmaxEnv2 - 0.5*lengthEnv2; - m_env2RefPointVector = new CLHEP::Hep3Vector(-xCenterEnv2, -yCenterEnv2, -zCenterEnv2); + m_env2RefPointVector = new GeoTrf::Vector3D(-xCenterEnv2, -yCenterEnv2, -zCenterEnv2); // 8th Aug 2005 S.Mima modified. // Calculate dimension of subbox @@ -324,28 +321,23 @@ SCT_Module::preBuild() const GeoBox * subBox = new GeoBox(0.5*thicknessSubBox, 0.5*widthSubBox, 0.6*lengthSubBox); // In the following, envelope1 and envelope2 are added and SUBBOX is pulled. - const GeoShape & moduleEnvelope = (*envelope1 << HepGeom::Translate3D(xCenterEnv1, yCenterEnv1, zCenterEnv1)). - add(*envelope2 << HepGeom::Translate3D(xCenterEnv2, yCenterEnv2, zCenterEnv2)). - subtract(*subBox << HepGeom::Translate3D(xCenterSubBox, yCenterSubBox, zCenterSubBox)); + const GeoShape & moduleEnvelope = (*envelope1 << GeoTrf::Translate3D(xCenterEnv1, yCenterEnv1, zCenterEnv1)). + add(*envelope2 << GeoTrf::Translate3D(xCenterEnv2, yCenterEnv2, zCenterEnv2)). + subtract(*subBox << GeoTrf::Translate3D(xCenterSubBox, yCenterSubBox, zCenterSubBox)); const GeoLogVol * moduleLog = new GeoLogVol(getName(), &moduleEnvelope, materials.gasMaterial()); // // inner side // - CLHEP::HepRotation rotInner; - rotInner.rotateZ(180*CLHEP::deg); - rotInner.rotateX(m_stereoInner); - m_innerSidePos = new HepGeom::Transform3D(rotInner, - CLHEP::Hep3Vector(ISPosX, 0.0, 0.0)); + GeoTrf::Transform3D rotInner = GeoTrf::RotateX3D(m_stereoInner) * GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg); + m_innerSidePos = new GeoTrf::Transform3D(GeoTrf::Transform3D(GeoTrf::Translation3D(ISPosX, 0.0, 0.0)*rotInner)); // // outer side // - CLHEP::HepRotation rotOuter; - rotOuter.rotateX(m_stereoOuter); - m_outerSidePos = new HepGeom::Transform3D(rotOuter, - CLHEP::Hep3Vector(OSPosX, 0.0, 0.0)); + GeoTrf::RotateX3D rotOuter(m_stereoOuter); + m_outerSidePos = new GeoTrf::Transform3D(GeoTrf::Transform3D(GeoTrf::Translation3D(OSPosX, 0.0, 0.0)*rotOuter)); // // base board @@ -353,7 +345,7 @@ SCT_Module::preBuild() // const double baseBoardPosY = m_baseBoardOffsetY; const double baseBoardPosZ = m_baseBoardOffsetZ; - m_baseBoardPos = new HepGeom::Translate3D(CLHEP::Hep3Vector( 0.0, baseBoardPosY, baseBoardPosZ)); + m_baseBoardPos = new GeoTrf::Translate3D(0.0, baseBoardPosY, baseBoardPosZ); return moduleLog; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx index e0acd61372e..b9b9a7b6e92 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_OuterSide.cxx @@ -28,9 +28,9 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + #include <cmath> @@ -131,13 +131,13 @@ SCT_OuterSide::preBuild() // *** 16:30 Wed 15th Jun 2005 D.Naito modified. (02)********************************* // *** -->> (02)********************************* - m_env1RefPointVector = new CLHEP::Hep3Vector(0.0, 0.0, 0.0); - m_env2RefPointVector = new CLHEP::Hep3Vector(-ose2PosX, -ose2PosY, -ose2PosZ); + m_env1RefPointVector = new GeoTrf::Vector3D(0.0, 0.0, 0.0); + m_env2RefPointVector = new GeoTrf::Vector3D(-ose2PosX, -ose2PosY, -ose2PosZ); // *** End of modified lines. ------------------ (02)********************************* - m_hybridPos = new GeoTransform(HepGeom::Translate3D(hybridPosX, hybridPosY, hybridPosZ)); + m_hybridPos = new GeoTransform(GeoTrf::Translate3D(hybridPosX, hybridPosY, hybridPosZ)); m_hybridPos->ref(); - m_pigtailPos = new GeoTransform(HepGeom::Translate3D(pigtailPosX, pigtailPosY, pigtailPosZ)); + m_pigtailPos = new GeoTransform(GeoTrf::Translate3D(pigtailPosX, pigtailPosY, pigtailPosZ)); m_pigtailPos->ref(); // The depth axis goes from the backside to the implant side @@ -148,13 +148,13 @@ SCT_OuterSide::preBuild() // --- hybrid | // ------- sensor | x-axis // - // Shown is the outer side. The inner side is the same but with a rotation of 180 CLHEP::deg around the z-axis. + // Shown is the outer side. The inner side is the same but with a rotation of 180 GeoModelKernelUnits::deg around the z-axis. // - //CLHEP::HepRotation rotSensor; - //rotSensor.rotateZ(180*CLHEP::deg); - //m_outerSidePos = new HepGeom::Transform3D(rotOuter, CLHEP::Hep3Vector(0.5 * (m_sensorGap + sectThickness), 0., 0.)); - //m_sensorPos = new GeoTransform(HepGeom::Transform3D(rotSensor, CLHEP::Hep3Vector(sensorPosX, sensorPosY, sensorPosZ))); - m_sensorPos = new GeoTransform(HepGeom::Translate3D(sensorPosX, sensorPosY, sensorPosZ)); + //GeoModelKernelUnits::HepRotation rotSensor; + //rotSensor.rotateZ(180*GeoModelKernelUnits::deg); + //m_outerSidePos = new GeoTrf::Transform3D(rotOuter, GeoTrf::Vector3D(0.5 * (m_sensorGap + sectThickness), 0., 0.)); + //m_sensorPos = new GeoTransform(GeoTrf::Transform3D(rotSensor, GeoTrf::Vector3D(sensorPosX, sensorPosY, sensorPosZ))); + m_sensorPos = new GeoTransform(GeoTrf::Translate3D(sensorPosX, sensorPosY, sensorPosZ)); m_sensorPos->ref(); // @@ -168,7 +168,7 @@ SCT_OuterSide::preBuild() 0.5 * l_ose2); const GeoShape & OuterSideEnvelopeShape = (*ose1Shape). - add(*ose2Shape << HepGeom::Translate3D(ose2PosX, ose2PosY, ose2PosZ)); + add(*ose2Shape << GeoTrf::Translate3D(ose2PosX, ose2PosY, ose2PosZ)); const GeoLogVol * OuterSideEnvelopeLog = new GeoLogVol("OuterSideEnvelope", &OuterSideEnvelopeShape, diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Pigtail.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Pigtail.cxx index 76023859d3f..11ae5d4618b 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Pigtail.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Pigtail.cxx @@ -13,7 +13,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_Pigtail::SCT_Pigtail(const std::string & name) : SCT_SharedComponentFactory(name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PixelAttachment.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PixelAttachment.cxx index 0c0f0636034..3d3a11f4aba 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PixelAttachment.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PixelAttachment.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" // This is the SCT to Pixel attachment. This was originally defined in the // general indet services but it is in the SCT mother volume. diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PowerTape.cxx index c8a6db4f401..2449ed9c07c 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PowerTape.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_PowerTape.cxx @@ -13,7 +13,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_PowerTape::SCT_PowerTape(const std::string & name, double length) : SCT_SharedComponentFactory(name), m_length(length) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx index 46b3c688a90..6cc41f4ffb5 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Sensor.cxx @@ -21,7 +21,7 @@ #include "InDetReadoutGeometry/SiCommonItems.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" using namespace InDetDD; @@ -122,10 +122,10 @@ SCT_Sensor::makeDesign() // This is the default and no action is required. // Can force axes not to be swapped by setting to false. // - // bool phiSyCLHEP::mmetric = true; - // bool etaSyCLHEP::mmetric = true; - // bool depthSyCLHEP::mmetric = true; - // m_design->setSyCLHEP::mmetry(phiSyCLHEP::mmetric, etaSyCLHEP::mmetric, depthSyCLHEP::mmetric, + // bool phiSyGeoModelKernelUnits::mmetric = true; + // bool etaSyGeoModelKernelUnits::mmetric = true; + // bool depthSyGeoModelKernelUnits::mmetric = true; + // m_design->setSyGeoModelKernelUnits::mmetry(phiSyGeoModelKernelUnits::mmetric, etaSyGeoModelKernelUnits::mmetric, depthSyGeoModelKernelUnits::mmetric, // } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx index b7755133fa1..bae8c9ba459 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Ski.cxx @@ -28,10 +28,8 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include <sstream> #include <cmath> @@ -104,8 +102,8 @@ SCT_Ski::getParameters() const GeoLogVol * SCT_Ski::preBuild() { - const double rphiClearance = 0.5*CLHEP::mm; - const double radialClearance = 0.5*CLHEP::mm; + const double rphiClearance = 0.5*GeoModelKernelUnits::mm; + const double radialClearance = 0.5*GeoModelKernelUnits::mm; // Make components. @@ -136,26 +134,26 @@ SCT_Ski::preBuild() // *** 18:00 Fri 27th May 2005 D.Naito put some comments. // I need to calculate moduleYMax and moduleYMin for yModuleOffset, - // because the modules is asyCLHEP::mmetry in y direction. + // because the modules is asyGeoModelKernelUnits::mmetry in y direction. // // These are coordinates of corners of module's envelopes. // - //CLHEP::Hep3Vector c0(0.0, 0.5*(m_module->env1Width()), 0.5*(m_module->env1Length())); - //CLHEP::Hep3Vector c1(0.0, -0.5*(m_module->env1Width()), 0.5*(m_module->env1Length())); - //CLHEP::Hep3Vector c2(0.0, -0.5*(m_module->env1Width()), -0.5*(m_module->env1Length())); - //CLHEP::Hep3Vector c3(0.0, 0.5*(m_module->env1Width()), -0.5*(m_module->env1Length())); - //CLHEP::Hep3Vector c4(0.0, + //GeoTrf::Vector3D c0(0.0, 0.5*(m_module->env1Width()), 0.5*(m_module->env1Length())); + //GeoTrf::Vector3D c1(0.0, -0.5*(m_module->env1Width()), 0.5*(m_module->env1Length())); + //GeoTrf::Vector3D c2(0.0, -0.5*(m_module->env1Width()), -0.5*(m_module->env1Length())); + //GeoTrf::Vector3D c3(0.0, 0.5*(m_module->env1Width()), -0.5*(m_module->env1Length())); + //GeoTrf::Vector3D c4(0.0, // -(m_module->env2RefPointVector()->y()) + 0.5*(m_module->env2Width()), // -(m_module->env2RefPointVector()->z()) + 0.5*(m_module->env2Length())); - //CLHEP::Hep3Vector c5(0.0, + //GeoTrf::Vector3D c5(0.0, // -(m_module->env2RefPointVector()->y()) - 0.5*(m_module->env2Width()), // -(m_module->env2RefPointVector()->z()) + 0.5*(m_module->env2Length())); - //CLHEP::Hep3Vector c6(0.0, + //GeoTrf::Vector3D c6(0.0, // -(m_module->env2RefPointVector()->y()) - 0.5*(m_module->env2Width()), // -(m_module->env2RefPointVector()->z()) - 0.5*(m_module->env2Length())); - //CLHEP::Hep3Vector c7(0.0, + //GeoTrf::Vector3D c7(0.0, // -(m_module->env2RefPointVector()->y()) + 0.5*(m_module->env2Width()), // -(m_module->env2RefPointVector()->z()) - 0.5*(m_module->env2Length())); @@ -254,7 +252,7 @@ SCT_Ski::preBuild() double xCoolingPipePos = coolingPipeOffsetX() - m_coolingPipeRadialOffset; //double yCoolingPipePos = yCoolingBlockPosMin + m_coolingPipePhiOffset; double yCoolingPipePos = coolingPipeOffsetY() + m_coolingPipePhiOffset; - m_coolingPipePos = new GeoTransform(HepGeom::Translate3D(xCoolingPipePos, yCoolingPipePos, 0)); + m_coolingPipePos = new GeoTransform(GeoTrf::Translate3D(xCoolingPipePos, yCoolingPipePos, 0)); m_coolingPipePos->ref(); // // @@ -275,13 +273,12 @@ SCT_Ski::preBuild() double yModulePos = yModuleOffset; // *** End of modified lines. ------------------ (04)********************************* double zModulePos = m_zPos[iModule]; - CLHEP::HepRotation rot; - + // There is only one type of module and this is rotated one way or the other // to get the phi-v (-ve), u-phi (+ve) orientations - rot.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); - CLHEP::Hep3Vector pos(xModulePos, yModulePos, zModulePos); - m_modulePos.push_back(HepGeom::Transform3D(rot, pos)); + GeoTrf::RotateX3D rot(0.5 * m_stereoSign * m_module->stereoAngle()); + GeoTrf::Translation3D pos(xModulePos, yModulePos, zModulePos); + m_modulePos.push_back(GeoTrf::Transform3D(pos*rot)); // // Calculate position of cooling block @@ -290,7 +287,7 @@ SCT_Ski::preBuild() double xCoolingBlockPos = xCoolingBlockOffset + xModulePos; double yCoolingBlockPos = yCoolingBlockOffset + yModulePos; double zCoolingBlockPos = zCoolingBlockOffset + zModulePos; - m_coolingBlockPos.push_back(new GeoTransform(HepGeom::Translate3D(xCoolingBlockPos, yCoolingBlockPos, zCoolingBlockPos))); + m_coolingBlockPos.push_back(new GeoTransform(GeoTrf::Translate3D(xCoolingBlockPos, yCoolingBlockPos, zCoolingBlockPos))); // @@ -299,7 +296,7 @@ SCT_Ski::preBuild() double xDoglegPos = xDoglegOffset + xModulePos; double yDoglegPos = yDoglegOffset + yModulePos; double zDoglegPos = zDoglegOffset + zModulePos; - m_doglegPos.push_back(new GeoTransform(HepGeom::Translate3D(xDoglegPos, yDoglegPos, zDoglegPos))); + m_doglegPos.push_back(new GeoTransform(GeoTrf::Translate3D(xDoglegPos, yDoglegPos, zDoglegPos))); // alternate staggering stagger_sign = - stagger_sign; @@ -312,41 +309,41 @@ SCT_Ski::preBuild() // These are coordinates of corners of module's envelopes. // - CLHEP::Hep3Vector c0(0.0, + GeoTrf::Vector3D c0(0.0, -(m_module->env1RefPointVector()->y()) + 0.5*(m_module->env1Width()), -(m_module->env1RefPointVector()->z()) + 0.5*(m_module->env1Length())); - CLHEP::Hep3Vector c1(0.0, + GeoTrf::Vector3D c1(0.0, -(m_module->env1RefPointVector()->y()) - 0.5*(m_module->env1Width()), -(m_module->env1RefPointVector()->z()) + 0.5*(m_module->env1Length())); - CLHEP::Hep3Vector c2(0.0, + GeoTrf::Vector3D c2(0.0, -(m_module->env1RefPointVector()->y()) - 0.5*(m_module->env1Width()), -(m_module->env1RefPointVector()->z()) - 0.5*(m_module->env1Length())); - CLHEP::Hep3Vector c3(0.0, + GeoTrf::Vector3D c3(0.0, -(m_module->env1RefPointVector()->y()) + 0.5*(m_module->env1Width()), -(m_module->env1RefPointVector()->z()) - 0.5*(m_module->env1Length())); - CLHEP::Hep3Vector c4(0.0, + GeoTrf::Vector3D c4(0.0, -(m_module->env2RefPointVector()->y()) + 0.5*(m_module->env2Width()), -(m_module->env2RefPointVector()->z()) + 0.5*(m_module->env2Length())); - CLHEP::Hep3Vector c5(0.0, + GeoTrf::Vector3D c5(0.0, -(m_module->env2RefPointVector()->y()) - 0.5*(m_module->env2Width()), -(m_module->env2RefPointVector()->z()) + 0.5*(m_module->env2Length())); - CLHEP::Hep3Vector c6(0.0, + GeoTrf::Vector3D c6(0.0, -(m_module->env2RefPointVector()->y()) - 0.5*(m_module->env2Width()), -(m_module->env2RefPointVector()->z()) - 0.5*(m_module->env2Length())); - CLHEP::Hep3Vector c7(0.0, + GeoTrf::Vector3D c7(0.0, -(m_module->env2RefPointVector()->y()) + 0.5*(m_module->env2Width()), -(m_module->env2RefPointVector()->z()) - 0.5*(m_module->env2Length())); double moduleYMax = c4.y(); double moduleYMin = c5.y(); - c0.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); - c1.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); - c2.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); - c3.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); - c4.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); - c5.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); - c6.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); - c7.rotateX(0.5 * m_stereoSign * m_module->stereoAngle()); + c0 = GeoTrf::RotateX3D(0.5 * m_stereoSign * m_module->stereoAngle())*c0; + c1 = GeoTrf::RotateX3D(0.5 * m_stereoSign * m_module->stereoAngle())*c1; + c2 = GeoTrf::RotateX3D(0.5 * m_stereoSign * m_module->stereoAngle())*c2; + c3 = GeoTrf::RotateX3D(0.5 * m_stereoSign * m_module->stereoAngle())*c3; + c4 = GeoTrf::RotateX3D(0.5 * m_stereoSign * m_module->stereoAngle())*c4; + c5 = GeoTrf::RotateX3D(0.5 * m_stereoSign * m_module->stereoAngle())*c5; + c6 = GeoTrf::RotateX3D(0.5 * m_stereoSign * m_module->stereoAngle())*c6; + c7 = GeoTrf::RotateX3D(0.5 * m_stereoSign * m_module->stereoAngle())*c7; moduleYMax = std::max(std::max(c0.y(), c4.y()), std::max(c7.y(), c3.y())); moduleYMin = std::min(std::min(c1.y(), c5.y()), std::min(c6.y(), c2.y())); @@ -419,7 +416,7 @@ SCT_Ski::preBuild() //double xCoolingPipeShift = xCoolingPipePos - xCenter; //double yCoolingPipeShift = yCoolingPipePos - yCenter; - m_refPointTransform = new GeoTransform(HepGeom::Translate3D(-xCenter, -yCenter, 0)); + m_refPointTransform = new GeoTransform(GeoTrf::Translate3D(-xCenter, -yCenter, 0)); m_refPointTransform->ref(); // std::cout << "xCenter, yCenter = " << xCenter << " " << yCenter << std::endl; // std::cout << "xShift2, yShift2 = " << xShift2 << " " << yShift2 << std::endl; @@ -427,8 +424,8 @@ SCT_Ski::preBuild() // *** 10:00 Tue 31st May 2005 D.Naito modified. (14)********************************* // *** -->> (14)********************************* - m_env1RefPointVector = new CLHEP::Hep3Vector(-xCenter, -yCenter, 0.0); - m_env2RefPointVector = new CLHEP::Hep3Vector(-xShift2, -yShift2, 0.0); + m_env1RefPointVector = new GeoTrf::Vector3D(-xCenter, -yCenter, 0.0); + m_env2RefPointVector = new GeoTrf::Vector3D(-xShift2, -yShift2, 0.0); m_env1Thickness = xmax1-xmin1; m_env1Width = ymax1-ymin1; m_env2Thickness = xmax2-xmin2; @@ -441,7 +438,7 @@ SCT_Ski::preBuild() const GeoShape * skiEnvelopeShape = 0; const GeoShape & tmpShape = (*envelope1). - add(*envelope2 << HepGeom::Translate3D(xShift2, yShift2, 0)); + add(*envelope2 << GeoTrf::Translate3D(xShift2, yShift2, 0)); skiEnvelopeShape = &tmpShape; diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx index 67757c85e52..3c3d51e8e56 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiAux.cxx @@ -24,10 +24,8 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include <cmath> @@ -198,30 +196,27 @@ SCT_SkiAux::build() // 15th Aug 2005 S.Mima modified. // double baseBoardPosZ = m_ski->zPos(iModule) + m_ski->module()->baseBoardCenter(); double coolingCenterPosZ = m_ski->zPos(iModule) + m_ski->coolingBlockOffsetZ(); - CLHEP::Hep3Vector posBracket(xBracketPos, yBracketPos, coolingCenterPosZ); - CLHEP::HepRotation rotBracket; - rotBracket.rotateZ(m_bracketPhiOffset); - skiAux->add(new GeoTransform(HepGeom::Transform3D(rotBracket, posBracket))); + GeoTrf::Translation3D posBracket(xBracketPos, yBracketPos, coolingCenterPosZ); + GeoTrf::RotateZ3D rotBracket(m_bracketPhiOffset); + skiAux->add(new GeoTransform(GeoTrf::Transform3D(posBracket*rotBracket))); skiAux->add(m_bracket->getVolume()); } // Position the harness if(m_harness != 0) { - CLHEP::Hep3Vector posHarness(xHarnessPos, yHarnessPos, 0); - CLHEP::HepRotation rotHarness; - rotHarness.rotateZ(m_powerTapePhiOffset); - skiAux->add(new GeoTransform(HepGeom::Transform3D(rotHarness,posHarness))); + GeoTrf::Translation3D posHarness(xHarnessPos, yHarnessPos, 0); + GeoTrf::RotateZ3D rotHarness(m_powerTapePhiOffset); + skiAux->add(new GeoTransform(GeoTrf::Transform3D(posHarness*rotHarness))); skiAux->add(m_harness->getVolume()); } // // Position the power tapes // - CLHEP::Hep3Vector posTape(xTapePos, yTapePos, 0); - CLHEP::HepRotation rotTape; - rotTape.rotateZ(m_powerTapePhiOffset); + GeoTrf::Translation3D posTape(xTapePos, yTapePos, 0); + GeoTrf::RotateZ3D rotTape(m_powerTapePhiOffset); - skiAux->add(new GeoTransform(HepGeom::Transform3D(rotTape,posTape))); + skiAux->add(new GeoTransform(GeoTrf::Transform3D(posTape*rotTape))); skiAux->add(m_skiPowerTape->getVolume()); diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx index c968b66209e..9b11aeb79d5 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SkiPowerTape.cxx @@ -25,17 +25,13 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" - +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include <iostream> #include <sstream> #include <cmath> -#include "CLHEP/Units/SystemOfUnits.h" - - SCT_SkiPowerTape::SCT_SkiPowerTape(const std::string & name, const SCT_Ski * ski, @@ -98,7 +94,7 @@ SCT_SkiPowerTape::build() // nPos is used to stack the power tapes. Modules closest to interlink are // furthest from support. The positive and negative z positions are - // syCLHEP::mmetric. nPos = 5,4,3,2,1,0,0,1,2,3,4,5 for the 12 modules. + // syGeoModelKernelUnits::mmetric. nPos = 5,4,3,2,1,0,0,1,2,3,4,5 for the 12 modules. int nPos; // test sign of zpos to determine whether the tape runs to the @@ -159,9 +155,9 @@ SCT_SkiPowerTape::build() // Position the tape - skiPowerTape->add(new GeoTransform(HepGeom::Translate3D(xTapePos, yTapePos, tapeMid))); + skiPowerTape->add(new GeoTransform(GeoTrf::Translate3D(xTapePos, yTapePos, tapeMid))); skiPowerTape->add(powerTape.getVolume()); - mass += (powerTape.getVolume()->getLogVol()->getShape()->volume()/CLHEP::cm3)*(powerTape.material()->getDensity()/CLHEP::g/CLHEP::cm3); + mass += (powerTape.getVolume()->getLogVol()->getShape()->volume()/GeoModelKernelUnits::cm3)*(powerTape.material()->getDensity()/GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); ltot += tapeLength; } diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Spider.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Spider.cxx index 6ac7338c912..fc375224b9d 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Spider.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_Spider.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_Spider::SCT_Spider(const std::string & name) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SupportCyl.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SupportCyl.cxx index eee354f84df..a9a81399933 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SupportCyl.cxx +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_SupportCyl.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" SCT_SupportCyl::SCT_SupportCyl(const std::string & name, int iLayer, double length) diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/CMakeLists.txt index 85912db7009..24ba4ff5199 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/CMakeLists.txt @@ -18,27 +18,21 @@ atlas_depends_on_subdirs( PUBLIC Control/SGTools Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeometryDBSvc + DetectorDescription/GeoPrimitives InnerDetector/InDetConditions/InDetCondServices InnerDetector/InDetDetDescr/InDetIdentifier ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: -atlas_add_library( SCT_SLHC_GeoModelLib - src/*.cxx - PUBLIC_HEADERS SCT_SLHC_GeoModel - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities Identifier GaudiKernel InDetGeoModelUtils InDetReadoutGeometry StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES SGTools GeoModelKernel InDetCondServices InDetIdentifier ) - atlas_add_component( SCT_SLHC_GeoModel + src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities Identifier GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests GeoModelKernel InDetCondServices InDetIdentifier SCT_SLHC_GeoModelLib ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities Identifier GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests InDetCondServices InDetIdentifier ) diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_FwdRing.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_FwdRing.h index 4056b1a373e..b0f51bd76a9 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_FwdRing.h +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_FwdRing.h @@ -6,8 +6,8 @@ #define SCT_SLHC_GeoModel_SCT_FWDRING_H #include "SCT_SLHC_GeoModel/SCT_ComponentFactory.h" - -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <vector> class GeoNameTag; diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_GeneralParameters.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_GeneralParameters.h index 85f4b3d2c73..fbc29a90138 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_GeneralParameters.h +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_GeneralParameters.h @@ -5,7 +5,8 @@ #ifndef SCT_SLHC_GeoModel_SCT_GeneralParameters_H #define SCT_SLHC_GeoModel_SCT_GeneralParameters_H -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "SCT_SLHC_GeoModel/SCT_ParametersBase.h" #include <string> @@ -32,7 +33,7 @@ public: // General double safety() const; - const HepGeom::Transform3D & partTransform(const std::string & partName) const; + const GeoTrf::Transform3D & partTransform(const std::string & partName) const; bool partPresent(const std::string & partName) const; double envelopeRMin() const; diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_InnerSide.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_InnerSide.h index 3c521a7cd55..8ec86aea6a2 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_InnerSide.h +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_InnerSide.h @@ -14,7 +14,7 @@ class GeoMaterial; class GeoVPhysVol; class GeoLogVol; class GeoTransform; -#include "CLHEP/Vector/ThreeVector.h" + namespace InDetDDSLHC { diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_Module.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_Module.h index 44145db0a7b..c663fc6a59f 100755 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_Module.h +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_Module.h @@ -7,8 +7,9 @@ #include "SCT_SLHC_GeoModel/SCT_ComponentFactory.h" #include "SCT_SLHC_GeoModel/SCT_Identifier.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" + #include <string> class GeoMaterial; diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_OuterSide.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_OuterSide.h index ada173f1845..0a57bdcff7b 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_OuterSide.h +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_OuterSide.h @@ -14,7 +14,7 @@ class GeoMaterial; class GeoVPhysVol; class GeoLogVol; class GeoTransform; -#include "CLHEP/Vector/ThreeVector.h" + namespace InDetDDSLHC { diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_Ski.h b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_Ski.h index 80af0ab7213..90445eac049 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_Ski.h +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/SCT_SLHC_GeoModel/SCT_Ski.h @@ -7,8 +7,8 @@ #include "SCT_SLHC_GeoModel/SCT_ComponentFactory.h" #include "SCT_SLHC_GeoModel/SCT_Identifier.h" - -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <string> #include <vector> @@ -19,7 +19,7 @@ class GeoPhysVol; class GeoLogVol; class GeoNameTag; class GeoTransform; -#include "CLHEP/Vector/ThreeVector.h" + namespace InDetDDSLHC { diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Barrel.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Barrel.cxx index c318fe92b89..3788efffe3f 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Barrel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Barrel.cxx @@ -24,7 +24,7 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" namespace InDetDDSLHC { @@ -64,8 +64,8 @@ const GeoLogVol* SCT_Barrel::preBuild(){ const GeoTube* sct_barrel_2 = new GeoTube(m_intermediateRadius, m_outerRadius, 0.25*(m_length-m_intermediateLength)); //make a single envelope for sct barrel const GeoShape & barrelEnvelopeShape = (*sct_barrel_1). - add(*sct_barrel_2 << HepGeom::TranslateZ3D(0.25*(m_length+m_intermediateLength))). - add(*sct_barrel_2 << HepGeom::TranslateZ3D(-0.25*(m_length+m_intermediateLength))); + add(*sct_barrel_2 << GeoTrf::TranslateZ3D(0.25*(m_length+m_intermediateLength))). + add(*sct_barrel_2 << GeoTrf::TranslateZ3D(-0.25*(m_length+m_intermediateLength))); barrelLog = new GeoLogVol(getName(), &barrelEnvelopeShape, materials->gasMaterial()); }else if(layoutType == 2){//same length barrels const GeoTube* barrelEnvelopeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5*m_length); @@ -91,7 +91,7 @@ GeoVPhysVol* SCT_Barrel::build(SCT_Identifier id) const{ barrel->add(new GeoNameTag("Layer#"+intToString(iLayer))); barrel->add(new GeoIdentifierTag(iLayer)); // Identifier layer= iLayer id.setLayerDisk(iLayer); - GeoAlignableTransform* transform = new GeoAlignableTransform(HepGeom::Transform3D()); + GeoAlignableTransform* transform = new GeoAlignableTransform(GeoTrf::Transform3D()); barrel->add(transform); GeoVPhysVol* layerPV = layer.build(id); barrel->add(layerPV); diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelModuleParameters.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelModuleParameters.cxx index c8d43d9b13f..5fed24ed9d4 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelModuleParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelModuleParameters.cxx @@ -6,7 +6,7 @@ #include "SCT_SLHC_GeoModel/SCT_GeometryManager.h" #include "SCT_SLHC_GeoModel/SCT_DataBase.h" #include "GeometryDBSvc/IGeometryDBSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> @@ -36,7 +36,7 @@ SCT_BarrelModuleParameters::SCT_BarrelModuleParameters(const SCT_DataBase * sctd double SCT_BarrelModuleParameters::sensorThickness(int moduleType) const { - double thickness = db()->getDouble(m_SctBrlSensor, "THICKNESS", moduleType) * CLHEP::mm; + double thickness = db()->getDouble(m_SctBrlSensor, "THICKNESS", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "-----------2 sensorThickness mod_typ("<<moduleType<<") = "<< thickness << endmsg; return thickness; } @@ -44,7 +44,7 @@ SCT_BarrelModuleParameters::sensorThickness(int moduleType) const double SCT_BarrelModuleParameters::sensorWidth(int moduleType) const { - double width = db()->getDouble(m_SctBrlSensor, "WIDTH", moduleType) * CLHEP::mm; + double width = db()->getDouble(m_SctBrlSensor, "WIDTH", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"-----------2 DXYZ2 sensorWidth mod_typ("<<moduleType<<") = "<< width <<endmsg; return width; } @@ -52,7 +52,7 @@ SCT_BarrelModuleParameters::sensorWidth(int moduleType) const double SCT_BarrelModuleParameters::sensorLength(int moduleType) const { - double sensorLen = db()->getDouble(m_SctBrlSensor, "LENGTH", moduleType) * CLHEP::mm; + double sensorLen = db()->getDouble(m_SctBrlSensor, "LENGTH", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"-----------2 SensorLength DXYZ3 mod_typ("<<moduleType<<") = "<<sensorLen <<endmsg; return sensorLen; } @@ -81,7 +81,7 @@ double SCT_BarrelModuleParameters::baseBoardThickness(int moduleType) const { //sprintf(paraName, "BRL_M%d_BBTHICK", moduleType); - double bbthick = db()->getDouble(m_SctBrlModule, "BASEBOARDTHICKNESS", moduleType) * CLHEP::mm; + double bbthick = db()->getDouble(m_SctBrlModule, "BASEBOARDTHICKNESS", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"-----------2 baseBoardThickness BBTHICK mod_typ("<<moduleType<<") = "<< bbthick <<endmsg; return bbthick; } @@ -89,13 +89,13 @@ SCT_BarrelModuleParameters::baseBoardThickness(int moduleType) const double SCT_BarrelModuleParameters::baseBoardWidth(int moduleType) const { - double bbwidth = db()->getDouble(m_SctBrlModule, "BASEBOARDWIDTH", moduleType) * CLHEP::mm; + double bbwidth = db()->getDouble(m_SctBrlModule, "BASEBOARDWIDTH", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"-----------2 baseBoardWidth BBWID mod_typ("<<moduleType<<") = "<< bbwidth <<endmsg; return bbwidth; } double SCT_BarrelModuleParameters::baseBoardLength(int moduleType) const{ - double bblength = db()->getDouble(m_SctBrlModule, "BASEBOARDLENGTH", moduleType) * CLHEP::mm; + double bblength = db()->getDouble(m_SctBrlModule, "BASEBOARDLENGTH", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"-----------2 baseBoardLength BBLEN mod_typ("<<moduleType<<") = "<<bblength <<endmsg; return bblength; } @@ -109,16 +109,16 @@ SCT_BarrelModuleParameters::baseBoardMaterial(int moduleType) const } double SCT_BarrelModuleParameters::baseBoardOffsetY(int /*moduleType*/) const{ //if(moduleType == 1) - return -5.7*CLHEP::mm; + return -5.7*GeoModelKernelUnits::mm; //else - // return -5.7*CLHEP::mm; + // return -5.7*GeoModelKernelUnits::mm; } double SCT_BarrelModuleParameters::baseBoardOffsetZ(int moduleType) const{ if(moduleType == 1) - return -7.1*CLHEP::mm; + return -7.1*GeoModelKernelUnits::mm; else - return -1.9*CLHEP::mm; + return -1.9*GeoModelKernelUnits::mm; } // @@ -127,13 +127,13 @@ double SCT_BarrelModuleParameters::baseBoardOffsetZ(int moduleType) const{ double SCT_BarrelModuleParameters::moduleStereoAngle(int moduleType) const { - return db()->getDouble(m_SctBrlModule, "STEREOANGLE", moduleType) * CLHEP::mrad; + return db()->getDouble(m_SctBrlModule, "STEREOANGLE", moduleType) * GeoModelKernelUnits::mrad; } double SCT_BarrelModuleParameters::moduleInterSidesGap(int moduleType) const { - return db()->getDouble(m_SctBrlModule, "INTERSIDESGAP", moduleType) * CLHEP::mm; + return db()->getDouble(m_SctBrlModule, "INTERSIDESGAP", moduleType) * GeoModelKernelUnits::mm; } // Barrel Module Side Design @@ -141,7 +141,7 @@ SCT_BarrelModuleParameters::moduleInterSidesGap(int moduleType) const double SCT_BarrelModuleParameters::barrelModelSideStripPitch(int moduleType) const { - double pitch = db()->getDouble(m_SctBrlSensor, "STRIPPITCH", moduleType) * CLHEP::mm; + double pitch = db()->getDouble(m_SctBrlSensor, "STRIPPITCH", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"-----------2 barrelModelSideStripPitch PITCH mod_typ("<<moduleType<<") = "<<pitch <<endmsg; return pitch; } @@ -149,7 +149,7 @@ SCT_BarrelModuleParameters::barrelModelSideStripPitch(int moduleType) const double SCT_BarrelModuleParameters::barrelModelSideStripLength(int moduleType) const { - double stripLen = db()->getDouble(m_SctBrlSensor, "STRIPLENGTH", moduleType) * CLHEP::mm; + double stripLen = db()->getDouble(m_SctBrlSensor, "STRIPLENGTH", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"-----------2 barrelModelSideStripLength STRIPLEN mod_typ("<<moduleType<<") = "<<stripLen <<endmsg; return stripLen; } @@ -157,7 +157,7 @@ SCT_BarrelModuleParameters::barrelModelSideStripLength(int moduleType) const double SCT_BarrelModuleParameters::barrelModelSideTotalDeadLength(int moduleType) const { - double stripdeadLen = db()->getDouble(m_SctBrlSensor, "STRIPDEADLENGTH", moduleType) * CLHEP::mm; + double stripdeadLen = db()->getDouble(m_SctBrlSensor, "STRIPDEADLENGTH", moduleType) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"-----------2 barrelModelSideTotalDeadLength STRIPDEADLEN mod_typ("<<moduleType<<") = "<<stripdeadLen<<endmsg; return stripdeadLen; } @@ -177,7 +177,7 @@ double SCT_BarrelModuleParameters::barrelModelSideSegmentGap(int moduleType) const { if (m_SctBrlSensor) { - return db()->getDouble(m_SctBrlSensor, "SEGMENTGAP", moduleType) * CLHEP::mm; + return db()->getDouble(m_SctBrlSensor, "SEGMENTGAP", moduleType) * GeoModelKernelUnits::mm; } else { return 0; } diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelModuleParametersOld.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelModuleParametersOld.cxx index 912c04fdbae..e71ae56a28a 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelModuleParametersOld.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelModuleParametersOld.cxx @@ -9,7 +9,7 @@ #include "GaudiKernel/MsgStream.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> #include <cstring> @@ -41,12 +41,12 @@ void barrelModSplitString(const std::string& str, std::vector<std::string>& str_ // -const double PITCH = 80*CLHEP::micrometer; -const double HALF_ACTIVE_STRIP_LENGTH = 31*CLHEP::mm; -const double NOMINAL_WAFER_LENGTH = 63.960*CLHEP::mm; -const double REF_DISTANCE_BETWEEN_FIDUCIALS = 2.19*CLHEP::mm; -const double DISTANCE_CORNER_MARK_TO_CENTER = 31.750*CLHEP::mm; -const double DISTANCE_CORNER_MARK_TO_FIDUCIAL = 0.8*CLHEP::mm; +const double PITCH = 80*GeoModelKernelUnits::micrometer; +const double HALF_ACTIVE_STRIP_LENGTH = 31*GeoModelKernelUnits::mm; +const double NOMINAL_WAFER_LENGTH = 63.960*GeoModelKernelUnits::mm; +const double REF_DISTANCE_BETWEEN_FIDUCIALS = 2.19*GeoModelKernelUnits::mm; +const double DISTANCE_CORNER_MARK_TO_CENTER = 31.750*GeoModelKernelUnits::mm; +const double DISTANCE_CORNER_MARK_TO_FIDUCIAL = 0.8*GeoModelKernelUnits::mm; const double DISTANCE_CENTER_TO_CENTER = 2*(DISTANCE_CORNER_MARK_TO_CENTER - DISTANCE_CORNER_MARK_TO_FIDUCIAL) + REF_DISTANCE_BETWEEN_FIDUCIALS; @@ -131,7 +131,7 @@ SCT_BarrelModuleParametersOld::sensorThickness(int moduleType) const char paraName[50]; sprintf(paraName, "BRL_M%d_DXYZ1", moduleType); std::cout<<"-----------2 sensorThickness DXYZ1 mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second <<std::endl; - return (m_SCT_Modules->find(paraName))->second*CLHEP::cm; + return (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm; } double @@ -139,8 +139,8 @@ SCT_BarrelModuleParametersOld::sensorWidth(int moduleType) const { char paraName[50]; sprintf(paraName, "BRL_M%d_DXYZ2", moduleType); - std::cout<<"-----------2 DXYZ2 sensorWidth mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second*CLHEP::cm <<std::endl; - return (m_SCT_Modules->find(paraName))->second*CLHEP::cm; + std::cout<<"-----------2 DXYZ2 sensorWidth mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm <<std::endl; + return (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm; } double @@ -148,7 +148,7 @@ SCT_BarrelModuleParametersOld::sensorLength(int moduleType) const { char paraName[50]; sprintf(paraName, "BRL_M%d_DXYZ3", moduleType); - float sensorLen = (m_SCT_Modules->find(paraName))->second*CLHEP::cm; + float sensorLen = (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm; std::cout<<"-----------2 SensorLentgh DXYZ3 mod_typ("<<moduleType<<") = "<<sensorLen <<std::endl; return sensorLen; } @@ -171,8 +171,8 @@ SCT_BarrelModuleParametersOld::baseBoardThickness(int moduleType) const { char paraName[50]; sprintf(paraName, "BRL_M%d_BBTHICK", moduleType); - std::cout<<"-----------2 baseBoardThickness BBTHICK mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second*CLHEP::cm <<std::endl; - return (m_SCT_Modules->find(paraName))->second*CLHEP::cm; + std::cout<<"-----------2 baseBoardThickness BBTHICK mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm <<std::endl; + return (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm; } double @@ -180,15 +180,15 @@ SCT_BarrelModuleParametersOld::baseBoardWidth(int moduleType) const { char paraName[50]; sprintf(paraName, "BRL_M%d_BBWID", moduleType); - std::cout<<"-----------2 baseBoardWidth BBWID mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second*CLHEP::cm <<std::endl; - return (m_SCT_Modules->find(paraName))->second*CLHEP::cm; + std::cout<<"-----------2 baseBoardWidth BBWID mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm <<std::endl; + return (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm; } double SCT_BarrelModuleParametersOld::baseBoardLength(int moduleType) const{ char paraName[50]; sprintf(paraName, "BRL_M%d_BBLEN", moduleType); std::cout<<"-----------2 baseBoardLength BBLEN mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second <<std::endl; - return (m_SCT_Modules->find(paraName))->second*CLHEP::cm; + return (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm; } std::string @@ -202,16 +202,16 @@ SCT_BarrelModuleParametersOld::baseBoardMaterial(int moduleType) const } double SCT_BarrelModuleParametersOld::baseBoardOffsetY(int /*moduleType*/) const{ //if(moduleType == 1) - return -5.7*CLHEP::mm; + return -5.7*GeoModelKernelUnits::mm; //else - // return -5.7*CLHEP::mm; + // return -5.7*GeoModelKernelUnits::mm; } double SCT_BarrelModuleParametersOld::baseBoardOffsetZ(int moduleType) const{ if(moduleType == 1) - return -7.1*CLHEP::mm; + return -7.1*GeoModelKernelUnits::mm; else - return -1.9*CLHEP::mm; + return -1.9*GeoModelKernelUnits::mm; } // @@ -222,7 +222,7 @@ SCT_BarrelModuleParametersOld::moduleStereoAngle(int moduleType) const { char paraName[50]; sprintf(paraName, "BRL_M%d_STEREOANGLE", moduleType); - return (m_SCT_Modules->find(paraName))->second*CLHEP::milliradian; + return (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::milliradian; } double @@ -230,7 +230,7 @@ SCT_BarrelModuleParametersOld::moduleInterSidesGap(int moduleType) const { char paraName[50]; sprintf(paraName, "BRL_M%d_INTERSIDESGAP", moduleType); - return (double)(m_SCT_Modules->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::mm; } // Barrel Module Side Design @@ -240,8 +240,8 @@ SCT_BarrelModuleParametersOld::barrelModelSideStripPitch(int moduleType) const { char paraName[50]; sprintf(paraName, "BRL_M%d_PITCH", moduleType); - std::cout<<"-----------2 barrelModelSideStripPitch PITCH mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second*CLHEP::micrometer <<std::endl; - return (double)(m_SCT_Modules->find(paraName))->second*CLHEP::micrometer; + std::cout<<"-----------2 barrelModelSideStripPitch PITCH mod_typ("<<moduleType<<") = "<<(m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::micrometer <<std::endl; + return (double)(m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::micrometer; } double @@ -249,7 +249,7 @@ SCT_BarrelModuleParametersOld::barrelModelSideStripLength(int moduleType) const { char paraName[50]; sprintf(paraName, "BRL_M%d_STRIPLEN", moduleType); - double stripLen = (m_SCT_Modules->find(paraName))->second*CLHEP::cm; + double stripLen = (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm; std::cout<<"-----------2 barrelModelSideStripLength STRIPLEN mod_typ("<<moduleType<<") = "<<stripLen <<std::endl; return stripLen; } @@ -259,7 +259,7 @@ SCT_BarrelModuleParametersOld::barrelModelSideTotalDeadLength(int moduleType) co { char paraName[50]; sprintf(paraName, "BRL_M%d_STRIPDEADLEN", moduleType); - double stripdeadLen = (m_SCT_Modules->find(paraName))->second*CLHEP::cm; + double stripdeadLen = (m_SCT_Modules->find(paraName))->second*GeoModelKernelUnits::cm; std::cout<<"-----------2 barrelModelSideTotalDeadLength STRIPDEADLEN mod_typ("<<moduleType<<") = "<<stripdeadLen<<std::endl; return stripdeadLen; } @@ -300,7 +300,7 @@ SCT_BarrelModuleParametersOld::barrelDeadEdge(int moduleType) const char paraName2[50]; sprintf(paraName1, "BRL_M%d_DXYZ3", moduleType); sprintf(paraName2, "BRL_M%d_STRIPLEN", moduleType); - float deadEdge = 0.5*((m_SCT_Modules->find(paraName1))->second-(m_SCT_Modules->find(paraName2))->second)*CLHEP::mm; + float deadEdge = 0.5*((m_SCT_Modules->find(paraName1))->second-(m_SCT_Modules->find(paraName2))->second)*GeoModelKernelUnits::mm; std::cout<<"-----------2 barrelDeadEdge DEADED mod_typ("<<moduleType<<") = "<<deadEdge<<std::endl; return deadEdge; } diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelParameters.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelParameters.cxx index f49401d3009..75881f23f50 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelParameters.cxx @@ -6,7 +6,7 @@ #include "SCT_SLHC_GeoModel/SCT_DataBase.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "GeometryDBSvc/IGeometryDBSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> #include <cmath> @@ -56,7 +56,7 @@ SCT_BarrelParameters::SCT_BarrelParameters(const SCT_DataBase * sctdb, const SCT moduleIdVec = new std::vector<int>; m_moduleIdMap[type] = moduleIdVec; } - zposVec->push_back(db()->getDouble(m_SctBrlSkiZ,"ZPOSITION",i)*CLHEP::mm); + zposVec->push_back(db()->getDouble(m_SctBrlSkiZ,"ZPOSITION",i)*GeoModelKernelUnits::mm); moduleIdVec->push_back(db()->getInt(m_SctBrlSkiZ,"MODULEID",i)); } } @@ -100,9 +100,9 @@ SCT_BarrelParameters::skiFirstStagger() const{ double SCT_BarrelParameters::skiRadialSep(int ilayer) const{ - // return 2.8*CLHEP::mm;//CLHEP::mm + // return 2.8*GeoModelKernelUnits::mm;//GeoModelKernelUnits::mm int ladType = ladderType(ilayer); - return db()->getDouble(m_SctBrlLadder,"MODULESRADIALSEP",ladType) * CLHEP::mm; + return db()->getDouble(m_SctBrlLadder,"MODULESRADIALSEP",ladType) * GeoModelKernelUnits::mm; } @@ -145,17 +145,17 @@ SCT_BarrelParameters::skiZPosition(int ilayer, int module) const{ int break_mod = modulesPerSki(ilayer) / 2; double zsep = db()->getDouble(m_SctBrlLadder,"ZSEP",ladType); //CALCULATE NEGATIVE END POSITION FIRST, TO KEEP MODULE ORDERING THE SAME - double first_pos = (-cylInnerZMin(ilayer) - (break_mod - 0.5)*zsep) * CLHEP::mm; + double first_pos = (-cylInnerZMin(ilayer) - (break_mod - 0.5)*zsep) * GeoModelKernelUnits::mm; //PSOTION OF FIRST MODULE AFTER THE BREAK - double break_pos = cylInnerZMin(ilayer) * CLHEP::mm ; + double break_pos = cylInnerZMin(ilayer) * GeoModelKernelUnits::mm ; - if(module < break_mod ) zpos = first_pos + (zsep * module) * CLHEP::mm; - else zpos = (break_pos + (zsep * (module - break_mod + 0.5))) * CLHEP::mm; + if(module < break_mod ) zpos = first_pos + (zsep * module) * GeoModelKernelUnits::mm; + else zpos = (break_pos + (zsep * (module - break_mod + 0.5))) * GeoModelKernelUnits::mm; } else{ int ladType = ladderType(ilayer); - zpos = db()->getDouble(m_SctBrlLadder,"ZSEP",ladType) * (module - 0.5*(modulesPerSki(ilayer) - 1)) * CLHEP::mm; + zpos = db()->getDouble(m_SctBrlLadder,"ZSEP",ladType) * (module - 0.5*(modulesPerSki(ilayer) - 1)) * GeoModelKernelUnits::mm; } } else { std::map<int, std::vector<double> *>::const_iterator iter = m_zpositionMap.find(zpostype); @@ -208,25 +208,25 @@ SCT_BarrelParameters::skiModuleIdentifier(int ilayer, int module) const{ // double SCT_BarrelParameters::tilt(int ilayer) const{ - double tilt = db()->getDouble(m_SctBrlLayer,"TILT",ilayer) * CLHEP::degree; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 tilt layer TILT("<<ilayer<<") = "<< tilt/CLHEP::degree << endmsg; + double tilt = db()->getDouble(m_SctBrlLayer,"TILT",ilayer) * GeoModelKernelUnits::degree; + if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 tilt layer TILT("<<ilayer<<") = "<< tilt/GeoModelKernelUnits::degree << endmsg; return tilt; } double SCT_BarrelParameters::radius(int ilayer) const{ - double rlay = db()->getDouble(m_SctBrlLayer,"RADIUS",ilayer) * CLHEP::mm; + double rlay = db()->getDouble(m_SctBrlLayer,"RADIUS",ilayer) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 radius layer RLAY("<<ilayer<<") = "<<rlay<<endmsg; return rlay; } double SCT_BarrelParameters::cylLength(int ilayer) const{ - return db()->getDouble(m_SctBrlLayer,"CYLLENGTH",ilayer) * CLHEP::mm; + return db()->getDouble(m_SctBrlLayer,"CYLLENGTH",ilayer) * GeoModelKernelUnits::mm; } double SCT_BarrelParameters::cylInnerZMin(int ilayer) const{ - return db()->getDouble(m_SctBrlLayer,"CYLINNERZMIN",ilayer) * CLHEP::mm; + return db()->getDouble(m_SctBrlLayer,"CYLINNERZMIN",ilayer) * GeoModelKernelUnits::mm; } bool SCT_BarrelParameters::doubleSided(int ilayer) const{ @@ -257,7 +257,7 @@ SCT_BarrelParameters::staveLayout(int ilayer) const { double SCT_BarrelParameters::stereoOuter(int ilayer) const { if (m_SctBrlLayer) { - return db()->getDouble(m_SctBrlLayer,"STEREOOUTER",ilayer) * CLHEP::mrad; + return db()->getDouble(m_SctBrlLayer,"STEREOOUTER",ilayer) * GeoModelKernelUnits::mrad; } else { return 0; } @@ -266,7 +266,7 @@ SCT_BarrelParameters::stereoOuter(int ilayer) const { double SCT_BarrelParameters::stereoInner(int ilayer) const{ if (m_SctBrlLayer) { - return db()->getDouble(m_SctBrlLayer,"STEREOINNER",ilayer) * CLHEP::mrad; + return db()->getDouble(m_SctBrlLayer,"STEREOINNER",ilayer) * GeoModelKernelUnits::mrad; } else { return 0; } @@ -277,7 +277,7 @@ SCT_BarrelParameters::staveSupportWidth(int ilayer) const{ if (m_SctBrlLayer) { int ladType = ladderType(ilayer); if (db()->testField(m_SctBrlLadder,"SUPPORTWIDTH",ladType)) { - return db()->getDouble(m_SctBrlLadder,"SUPPORTWIDTH",ladType) * CLHEP::mm; + return db()->getDouble(m_SctBrlLadder,"SUPPORTWIDTH",ladType) * GeoModelKernelUnits::mm; } } return 0; @@ -289,7 +289,7 @@ SCT_BarrelParameters::staveSupportThickness(int ilayer) const{ if (m_SctBrlLayer) { int ladType = ladderType(ilayer); if (db()->testField(m_SctBrlLadder,"SUPPORTTHICK",ladType)) { - return db()->getDouble(m_SctBrlLadder,"SUPPORTTHICK",ladType) * CLHEP::mm; + return db()->getDouble(m_SctBrlLadder,"SUPPORTTHICK",ladType) * GeoModelKernelUnits::mm; } } return 0; @@ -308,14 +308,14 @@ SCT_BarrelParameters::staveSupportMaterial(int ilayer) const{ double SCT_BarrelParameters::supportCylInnerRadius(int ilayer) const{ - double risup = db()->getDouble(m_SctBrlServPerLayer,"SUPPORTCYLINNERRAD",ilayer) * CLHEP::mm; + double risup = db()->getDouble(m_SctBrlServPerLayer,"SUPPORTCYLINNERRAD",ilayer) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 supportCylInnerRadius RISUP("<<ilayer<<") = "<< risup <<endmsg; return risup; } double SCT_BarrelParameters::supportCylOuterRadius(int ilayer) const{ - double rosup = db()->getDouble(m_SctBrlServPerLayer,"SUPPORTCYLOUTERRAD",ilayer) * CLHEP::mm; + double rosup = db()->getDouble(m_SctBrlServPerLayer,"SUPPORTCYLOUTERRAD",ilayer) * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 supportCylOuterRadius ROSUP("<<ilayer<<") = "<<rosup<<endmsg; return rosup; } @@ -337,35 +337,35 @@ SCT_BarrelParameters::numLayers() const{ double SCT_BarrelParameters::barrelInnerRadius() const{ - double rmin = db()->getDouble(m_SctBrlGeneral,"INNERRADIUS") * CLHEP::mm; + double rmin = db()->getDouble(m_SctBrlGeneral,"INNERRADIUS") * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 barrelInnerRadius RMIN = "<<rmin<<endmsg; return rmin; } double SCT_BarrelParameters::barrelIntermediateRadius() const{ - double rinter = db()->getDouble(m_SctBrlGeneral,"RINTERMEDIATE") * CLHEP::mm; + double rinter = db()->getDouble(m_SctBrlGeneral,"RINTERMEDIATE") * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 barrelIntermediateRadius RINTERMEDIATE = "<<rinter<<endmsg; return rinter; } double SCT_BarrelParameters::barrelOuterRadius() const{ - double rmax = db()->getDouble(m_SctBrlGeneral,"OUTERRADIUS") * CLHEP::mm; + double rmax = db()->getDouble(m_SctBrlGeneral,"OUTERRADIUS") * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 barrelOuterRadius RMAX = "<<rmax<<endmsg; return rmax; } double SCT_BarrelParameters::barrelLength() const{ - double length = db()->getDouble(m_SctBrlGeneral,"LENGTH") * CLHEP::mm; + double length = db()->getDouble(m_SctBrlGeneral,"LENGTH") * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 barrelLength B_LEN = "<<length<<endmsg; return length; } double SCT_BarrelParameters::barrelIntermediateLength() const{ - double interlen = db()->getDouble(m_SctBrlGeneral,"INTERMEDIATELEN") * CLHEP::mm; + double interlen = db()->getDouble(m_SctBrlGeneral,"INTERMEDIATELEN") * GeoModelKernelUnits::mm; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"---------2 barrelIntermediateLength B_IntermediateLEN = " <<interlen<<endmsg; return interlen; @@ -373,7 +373,7 @@ SCT_BarrelParameters::barrelIntermediateLength() const{ double SCT_BarrelParameters::barrelServicesMaterialCylinderLength() const { - return db()->getDouble(m_SctBrlGeneral,"BRLSERVMATTHICK") * CLHEP::mm; + return db()->getDouble(m_SctBrlGeneral,"BRLSERVMATTHICK") * GeoModelKernelUnits::mm; } double diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelParametersOld.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelParametersOld.cxx index d4d52462db6..d45829122a2 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelParametersOld.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BarrelParametersOld.cxx @@ -5,7 +5,7 @@ #include "SCT_SLHC_GeoModel/SCT_BarrelParametersOld.h" #include "SCT_SLHC_GeoModel/SCT_GeometryManager.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> #include <cmath> #include <stdio.h> @@ -219,10 +219,10 @@ SCT_BarrelParametersOld::skiFirstStagger() const{ double SCT_BarrelParametersOld::skiRadialSep(int ilayer) const{ - // return 2.8*CLHEP::mm;//mm + // return 2.8*GeoModelKernelUnits::mm;//mm char paraName[50]; sprintf(paraName, "L%d_MODULESRADIALSEPARATION", ilayer); - return (m_SCT_Parameters->find(paraName))->second * CLHEP::mm; + return (m_SCT_Parameters->find(paraName))->second * GeoModelKernelUnits::mm; } int @@ -256,22 +256,22 @@ double SCT_BarrelParametersOld::tilt(int ilayer) const{ char paraName[50]; sprintf(paraName, "L%d_TILT", ilayer); - std::cout<<"---------2 tilt layer TILT("<<ilayer<<") = "<<(m_SCT_Parameters->find(paraName))->second*CLHEP::degree<<std::endl; - return (m_SCT_Parameters->find(paraName))->second * CLHEP::degree; + std::cout<<"---------2 tilt layer TILT("<<ilayer<<") = "<<(m_SCT_Parameters->find(paraName))->second*GeoModelKernelUnits::degree<<std::endl; + return (m_SCT_Parameters->find(paraName))->second * GeoModelKernelUnits::degree; } double SCT_BarrelParametersOld::radius(int ilayer) const{ char paraName[50]; sprintf(paraName, "L%d_RLAY", ilayer); - std::cout<<"---------2 radius layer RLAY("<<ilayer<<") = "<<(m_SCT_Parameters->find(paraName))->second*CLHEP::cm<<std::endl; - return (m_SCT_Parameters->find(paraName))->second * CLHEP::cm; + std::cout<<"---------2 radius layer RLAY("<<ilayer<<") = "<<(m_SCT_Parameters->find(paraName))->second*GeoModelKernelUnits::cm<<std::endl; + return (m_SCT_Parameters->find(paraName))->second * GeoModelKernelUnits::cm; } double SCT_BarrelParametersOld::cylLength(int ilayer) const{ char paraName[50]; sprintf(paraName, "L%d_CYLLENTGH", ilayer); - return (m_SCT_Parameters->find(paraName))->second * CLHEP::cm; + return (m_SCT_Parameters->find(paraName))->second * GeoModelKernelUnits::cm; } bool SCT_BarrelParametersOld::doubleSided(int ilayer) const{ @@ -302,16 +302,16 @@ double SCT_BarrelParametersOld::supportCylInnerRadius(int ilayer) const{ char paraName[50]; sprintf(paraName, "L%d_RISUP", ilayer); - std::cout<<"---------2 supportCylInnerRadius RISUP("<<ilayer<<") = "<<(m_SCT_Parameters->find(paraName))->second*CLHEP::cm<<std::endl; - return (m_SCT_Parameters->find(paraName))->second * CLHEP::cm; + std::cout<<"---------2 supportCylInnerRadius RISUP("<<ilayer<<") = "<<(m_SCT_Parameters->find(paraName))->second*GeoModelKernelUnits::cm<<std::endl; + return (m_SCT_Parameters->find(paraName))->second * GeoModelKernelUnits::cm; } double SCT_BarrelParametersOld::supportCylOuterRadius(int ilayer) const{ char paraName[50]; sprintf(paraName, "L%d_ROSUP", ilayer); - std::cout<<"---------2 supportCylOuterRadius ROSUP("<<ilayer<<") = "<<(m_SCT_Parameters->find(paraName))->second*CLHEP::cm<<std::endl; - return (m_SCT_Parameters->find(paraName))->second * CLHEP::cm; + std::cout<<"---------2 supportCylOuterRadius ROSUP("<<ilayer<<") = "<<(m_SCT_Parameters->find(paraName))->second*GeoModelKernelUnits::cm<<std::endl; + return (m_SCT_Parameters->find(paraName))->second * GeoModelKernelUnits::cm; } std::string SCT_BarrelParametersOld::supportCylMaterial(int ilayer) const{ @@ -331,45 +331,45 @@ SCT_BarrelParametersOld::numLayers() const{ double SCT_BarrelParametersOld::barrelInnerRadius() const{ - std::cout<<"---------2 barrelInnerRadius RMIN = "<<(m_SCT_Parameters->find("B_RMIN"))->second * CLHEP::cm<<std::endl; + std::cout<<"---------2 barrelInnerRadius RMIN = "<<(m_SCT_Parameters->find("B_RMIN"))->second * GeoModelKernelUnits::cm<<std::endl; - return (m_SCT_Parameters->find("B_RMIN"))->second * CLHEP::cm; + return (m_SCT_Parameters->find("B_RMIN"))->second * GeoModelKernelUnits::cm; } double SCT_BarrelParametersOld::barrelIntermediateRadius() const{ - std::cout<<"---------2 barrelIntermediateRadius RINTERMEDIATE = "<<(m_SCT_Parameters->find("B_RINTERMEDIATE"))->second * CLHEP::cm<<std::endl; + std::cout<<"---------2 barrelIntermediateRadius RINTERMEDIATE = "<<(m_SCT_Parameters->find("B_RINTERMEDIATE"))->second * GeoModelKernelUnits::cm<<std::endl; - return (m_SCT_Parameters->find("B_RINTERMEDIATE"))->second * CLHEP::cm; + return (m_SCT_Parameters->find("B_RINTERMEDIATE"))->second * GeoModelKernelUnits::cm; } double SCT_BarrelParametersOld::barrelOuterRadius() const{ - std::cout<<"---------2 barrelOuterRadius RMAX = "<<(m_SCT_Parameters->find("B_RMAX"))->second * CLHEP::cm<<std::endl; + std::cout<<"---------2 barrelOuterRadius RMAX = "<<(m_SCT_Parameters->find("B_RMAX"))->second * GeoModelKernelUnits::cm<<std::endl; - return (m_SCT_Parameters->find("B_RMAX"))->second * CLHEP::cm; + return (m_SCT_Parameters->find("B_RMAX"))->second * GeoModelKernelUnits::cm; } double SCT_BarrelParametersOld::barrelLength() const{ std::cout<<"---------2 barrelLength B_LEN = " - <<(m_SCT_Parameters->find("B_LEN"))->second * CLHEP::cm<<std::endl; + <<(m_SCT_Parameters->find("B_LEN"))->second * GeoModelKernelUnits::cm<<std::endl; - return (m_SCT_Parameters->find("B_LEN"))->second * CLHEP::cm; + return (m_SCT_Parameters->find("B_LEN"))->second * GeoModelKernelUnits::cm; } double SCT_BarrelParametersOld::barrelIntermediateLength() const{ std::cout<<"---------2 barrelIntermediateLength B_IntermediateLEN = " - <<(m_SCT_Parameters->find("B_INTERMEDIATELEN"))->second * CLHEP::cm<<std::endl; + <<(m_SCT_Parameters->find("B_INTERMEDIATELEN"))->second * GeoModelKernelUnits::cm<<std::endl; - return (m_SCT_Parameters->find("B_INTERMEDIATELEN"))->second * CLHEP::cm; + return (m_SCT_Parameters->find("B_INTERMEDIATELEN"))->second * GeoModelKernelUnits::cm; } double SCT_BarrelParametersOld::barrelServicesMaterialCylinderLength() const { char paraName[50]; sprintf(paraName, "BARRELSERVICESMATERIALCYLINDERLENGTH"); - return (double)(m_SCT_Parameters->find(paraName))->second * CLHEP::cm; + return (double)(m_SCT_Parameters->find(paraName))->second * GeoModelKernelUnits::cm; } double SCT_BarrelParametersOld::barrelServicesMaterialIncreaseFactor() const { diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BaseBoard.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BaseBoard.cxx index cf45d9b64da..b160d3404ec 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BaseBoard.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_BaseBoard.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" namespace InDetDDSLHC { diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ComponentFactory.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ComponentFactory.cxx index 015cc69105e..7b22c81779b 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ComponentFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ComponentFactory.cxx @@ -3,7 +3,7 @@ */ #include "SCT_SLHC_GeoModel/SCT_ComponentFactory.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <sstream> #include <string> @@ -15,7 +15,7 @@ namespace InDetDDSLHC { SCT_DetectorManager * SCT_ComponentFactory::s_detectorManager = 0; const SCT_GeometryManager * SCT_ComponentFactory::s_geometryManager = 0; -double SCT_ComponentFactory::s_epsilon = 1.0e-6 * CLHEP::mm; +double SCT_ComponentFactory::s_epsilon = 1.0e-6 * GeoModelKernelUnits::mm; SCT_ComponentFactory::SCT_ComponentFactory(const std::string & name) : m_name(name) diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx index 553563c259e..3010efc905c 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx @@ -44,9 +44,9 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/GeoDefinitions.h" + +#include "GeoModelKernel/Units.h" #include <iostream> #include <iomanip> @@ -156,8 +156,8 @@ void SCT_DetectorFactory::create(GeoPhysVol *world){ new GeoTube(sctForward.innerRadius(), sctForward.outerRadius(), 0.5*sctForward.length()); //make a single envelope (enveloping the barrel and endcaps) const GeoShape & sctEnvelopeTmp = (*sctBarrelEnvelop). - add(*sctForwardEnvelop << HepGeom::TranslateZ3D(sctForward.zCenter())). - add(*sctForwardEnvelop << HepGeom::TranslateZ3D(-sctForward.zCenter())); + add(*sctForwardEnvelop << GeoTrf::TranslateZ3D(sctForward.zCenter())). + add(*sctForwardEnvelop << GeoTrf::TranslateZ3D(-sctForward.zCenter())); sctEnvelope = &sctEnvelopeTmp; } else if (generalParameters->simpleEnvelope()) { @@ -169,7 +169,7 @@ void SCT_DetectorFactory::create(GeoPhysVol *world){ sctEnvelope = sctEnvelopeTmp; } else { // Build as PCon - GeoPcon* sctEnvelopeTmp = new GeoPcon(0.,2*CLHEP::pi); + GeoPcon* sctEnvelopeTmp = new GeoPcon(0.,2*GeoModelKernelUnits::pi); // table contains +ve z values only and envelope is assumed to be symmetric around z. int numPlanes = generalParameters->envelopeNumPlanes(); for (int i = 0; i < numPlanes * 2; i++) { @@ -203,7 +203,7 @@ void SCT_DetectorFactory::create(GeoPhysVol *world){ id.setBarrelEC(0); ///*--- GeoVPhysVol* barrel = sctBarrel.build(id); - GeoAlignableTransform* barrelTransform = new GeoAlignableTransform(HepGeom::Transform3D()); + GeoAlignableTransform* barrelTransform = new GeoAlignableTransform(GeoTrf::Transform3D()); sct->add(new GeoNameTag("Barrel")); sct->add(barrelTransform); sct->add(barrel); @@ -224,7 +224,7 @@ void SCT_DetectorFactory::create(GeoPhysVol *world){ SCT_Identifier idFwdPlus; idFwdPlus.setBarrelEC(2); GeoVPhysVol* forwardPlus = sctForward.build(idFwdPlus); - HepGeom::Transform3D fwdTransformPlus(HepGeom::TranslateZ3D(sctForward.zCenter())); + GeoTrf::Transform3D fwdTransformPlus(GeoTrf::TranslateZ3D(sctForward.zCenter())); GeoAlignableTransform* fwdGeoTransformPlus = new GeoAlignableTransform(fwdTransformPlus); sct->add(new GeoNameTag("ForwardPlus")); sct->add(fwdGeoTransformPlus); @@ -237,16 +237,16 @@ void SCT_DetectorFactory::create(GeoPhysVol *world){ SCT_Identifier idFwdMinus; idFwdMinus.setBarrelEC(-2); GeoVPhysVol* forwardMinus = sctForward.build(idFwdMinus); - HepGeom::Transform3D rot; - rot = HepGeom::RotateY3D(180*CLHEP::degree); - HepGeom::Transform3D fwdTransformMinus = rot*fwdTransformPlus; + GeoTrf::Transform3D rot; + rot = GeoTrf::RotateY3D(180*GeoModelKernelUnits::degree); + GeoTrf::Transform3D fwdTransformMinus = rot*fwdTransformPlus; GeoAlignableTransform* fwdGeoTransformMinus = new GeoAlignableTransform(fwdTransformMinus); sct->add(new GeoNameTag("ForwardMinus")); sct->add(fwdGeoTransformMinus); sct->add(forwardMinus); //services material between barrel and endcap - double safety = 1*CLHEP::mm;//1mm, just to avoid any clash + double safety = 1*GeoModelKernelUnits::mm;//1mm, just to avoid any clash double length = sctForward.zCenter()-0.5*sctForward.length()-0.5*sctBarrel.length()-safety;// double barrelServicesCylinderLength = barrelParameters->barrelServicesMaterialCylinderLength(); //use user lenght paramters only if small than the gap @@ -264,23 +264,23 @@ void SCT_DetectorFactory::create(GeoPhysVol *world){ double materialIncreaseFactor = barrelParameters->barrelServicesMaterialIncreaseFactor(); if (barrelServicesCylinderLength > 0 && materialIncreaseFactor > 0 && !barrelParameters->barrelServicesMaterial().empty()) { - //double cf_density = 0.189*materialIncreaseFactor*CLHEP::g/CLHEP::cm3; - //msg(MSG::INFO) <<"----length "<<barrelServicesCylinderLength<<" material "<<barrelParameters->barrelServicesMaterial()<<" IncreaseFactor "<<materialIncreaseFactor<<" cf_density (CLHEP::g/CLHEP::cm3) "<<cf_density/(CLHEP::g/CLHEP::cm3) << endmsg; + //double cf_density = 0.189*materialIncreaseFactor*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3; + //msg(MSG::INFO) <<"----length "<<barrelServicesCylinderLength<<" material "<<barrelParameters->barrelServicesMaterial()<<" IncreaseFactor "<<materialIncreaseFactor<<" cf_density (GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) "<<cf_density/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; //const GeoMaterial* barrel_serivesMaterial = materials->getMaterial(barrelParameters->barrelServicesMaterial(), cf_density, "UpgradeSCTBarrel_ServicesMaterial"); const GeoMaterial* barrel_serivesMaterial = materials->getMaterialScaled(barrelParameters->barrelServicesMaterial(), materialIncreaseFactor, "UpgradeSCTBarrel_ServicesMaterial"); - msg(MSG::INFO) <<"----length "<<barrelServicesCylinderLength<<" material "<<barrelParameters->barrelServicesMaterial()<<" IncreaseFactor "<<materialIncreaseFactor<<" density (CLHEP::g/CLHEP::cm3) "<< barrel_serivesMaterial->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + msg(MSG::INFO) <<"----length "<<barrelServicesCylinderLength<<" material "<<barrelParameters->barrelServicesMaterial()<<" IncreaseFactor "<<materialIncreaseFactor<<" density (GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) "<< barrel_serivesMaterial->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; const GeoTube* barrelPos_servicesMaterialShape = new GeoTube(inner_radius, outer_radius, 0.5*barrelServicesCylinderLength); const GeoLogVol* barrelPos_servicesMaterialtLog = new GeoLogVol("BarrelPos_ServicesMaterial", barrelPos_servicesMaterialShape, barrel_serivesMaterial); GeoPhysVol* barrelPos_servicesMaterial = new GeoPhysVol(barrelPos_servicesMaterialtLog); - sct->add(new GeoTransform(HepGeom::TranslateZ3D(material_position))); + sct->add(new GeoTransform(GeoTrf::TranslateZ3D(material_position))); sct->add(barrelPos_servicesMaterial); const GeoTube* barrelNeg_servicesMaterialShape = new GeoTube(inner_radius, outer_radius, 0.5*barrelServicesCylinderLength); const GeoLogVol* barrelNeg_servicesMaterialtLog = new GeoLogVol("BarrelNeg_ServicesMaterial", barrelNeg_servicesMaterialShape, barrel_serivesMaterial); GeoPhysVol* barrelNeg_servicesMaterial = new GeoPhysVol(barrelNeg_servicesMaterialtLog); - sct->add(new GeoTransform(HepGeom::TranslateZ3D(-material_position))); + sct->add(new GeoTransform(GeoTrf::TranslateZ3D(-material_position))); sct->add(barrelNeg_servicesMaterial); } //Store alignable transform diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Forward.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Forward.cxx index 8e0975b773b..dd2b8484b02 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Forward.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Forward.cxx @@ -23,7 +23,7 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <sstream> #include <cmath> @@ -74,8 +74,8 @@ const GeoLogVol* SCT_Forward::preBuild(){ double len_2 = m_zMax-m_zIntermediate; const GeoTube* sct_fwd_2 = new GeoTube(m_innerRadius, m_outerRadius, 0.5*len_2); //make a single envelope for sct fwd: shift the two parts so that the midle stays at Z=0 - const GeoShape & forwardEnvelopeShape = (*sct_fwd_1 << HepGeom::TranslateZ3D(-0.5*len_2)). - add(*sct_fwd_2 << HepGeom::TranslateZ3D(0.5*len_1)); + const GeoShape & forwardEnvelopeShape = (*sct_fwd_1 << GeoTrf::TranslateZ3D(-0.5*len_2)). + add(*sct_fwd_2 << GeoTrf::TranslateZ3D(0.5*len_1)); forwardLog = new GeoLogVol(getName(), &forwardEnvelopeShape, materials->gasMaterial()); }else if(layoutType == 2){//same length barrels const GeoTube* forwardEnvelopeShape = new GeoTube(m_innerRadius, m_outerRadius, 0.5*m_length); @@ -97,7 +97,7 @@ GeoVPhysVol* SCT_Forward::build(SCT_Identifier id) const{ //std::cerr<<"endcap "<<id.getBarrelEC()<<", wheel "<<iWheel; id.setLayerDisk(iWheel); double zpos = wheel.zPosition() - zCenter(); - GeoAlignableTransform* transform = new GeoAlignableTransform(HepGeom::TranslateZ3D(zpos)); + GeoAlignableTransform* transform = new GeoAlignableTransform(GeoTrf::TranslateZ3D(zpos)); forward->add(transform); GeoVPhysVol* wheelPV = wheel.build(id); forward->add(wheelPV); diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardModuleParameters.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardModuleParameters.cxx index 4a0f704475b..fde5723f681 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardModuleParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardModuleParameters.cxx @@ -7,7 +7,7 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "GeometryDBSvc/IGeometryDBSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> #include <iostream> @@ -42,55 +42,55 @@ SCT_ForwardModuleParameters::fwdSensorNumWafers(int iModuleType) const double SCT_ForwardModuleParameters::moduleInterSidesGap(int iModuleType) const { - return db()->getDouble(m_SctFwdModule,"INTERSIDESGAP",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdModule,"INTERSIDESGAP",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorThickness(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"THICKNESS",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"THICKNESS",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorLength(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"LENGTH",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"LENGTH",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorInnerWidth(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"INNERWIDTH",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"INNERWIDTH",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorOuterWidth(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"OUTERWIDTH",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"OUTERWIDTH",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorInnerRadius(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"INNERRADIUS",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"INNERRADIUS",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorOuterRadius(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"OUTERRADIUS",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"OUTERRADIUS",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorMiddleRadius(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"MIDDLERADIUS",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"MIDDLERADIUS",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorDeltaPhi(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"DELTAPHI",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"DELTAPHI",iModuleType) * GeoModelKernelUnits::mm; } std::string @@ -102,13 +102,13 @@ SCT_ForwardModuleParameters::fwdSensorMaterial(int iModuleType) const double SCT_ForwardModuleParameters::fwdSensorActiveHalfLength(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"ACTIVEHALFLENGTH",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSensor,"ACTIVEHALFLENGTH",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSensorAngularPitch(int iModuleType) const { - return db()->getDouble(m_SctFwdSensor,"ANGULARPITCH",iModuleType) * CLHEP::radian; + return db()->getDouble(m_SctFwdSensor,"ANGULARPITCH",iModuleType) * GeoModelKernelUnits::radian; } int @@ -120,7 +120,7 @@ SCT_ForwardModuleParameters::fwdSensorNumReadoutStrips(int iModuleType) const double SCT_ForwardModuleParameters::fwdModuleStereoAngle(int iModuleType) const { - return db()->getDouble(m_SctFwdModule,"STEREOANGLE",iModuleType) * CLHEP::milliradian; + return db()->getDouble(m_SctFwdModule,"STEREOANGLE",iModuleType) * GeoModelKernelUnits::milliradian; } int @@ -138,24 +138,24 @@ SCT_ForwardModuleParameters::fwdSensorChargeCarrier(int iModuleType) const double SCT_ForwardModuleParameters::fwdSpineThickness(int iModuleType) const { - return db()->getDouble(m_SctFwdSpine,"THICKNESS",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSpine,"THICKNESS",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSpineLength(int iModuleType) const { - return db()->getDouble(m_SctFwdSpine,"LENGTH",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSpine,"LENGTH",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSpineMiddleRadius(int iModuleType) const { - return db()->getDouble(m_SctFwdSpine,"MIDDLERADIUS",iModuleType) * CLHEP::mm; + return db()->getDouble(m_SctFwdSpine,"MIDDLERADIUS",iModuleType) * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParameters::fwdSpineDeltaPhi(int iModuleType) const{ - return db()->getDouble(m_SctFwdSpine,"DELTAPHI",iModuleType) * CLHEP::radian; + return db()->getDouble(m_SctFwdSpine,"DELTAPHI",iModuleType) * GeoModelKernelUnits::radian; } std::string diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardModuleParametersOld.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardModuleParametersOld.cxx index 0767086c1d2..07e4cc36fd2 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardModuleParametersOld.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardModuleParametersOld.cxx @@ -7,7 +7,7 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> #include <iostream> @@ -116,7 +116,7 @@ SCT_ForwardModuleParametersOld::moduleInterSidesGap(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_INTERSIDESGAP", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; } double @@ -124,9 +124,9 @@ SCT_ForwardModuleParametersOld::fwdSensorThickness(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SENSORTHICKNESS", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; - //---return 2.0 * m_rdb->zsmo()->getDouble("DZSC") * CLHEP::cm; - //---return m_rdb->fwdSensor(iModuleType)->getDouble("THICKNESS") * CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; + //---return 2.0 * m_rdb->zsmo()->getDouble("DZSC") * GeoModelKernelUnits::cm; + //---return m_rdb->fwdSensor(iModuleType)->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double @@ -134,23 +134,23 @@ SCT_ForwardModuleParametersOld::fwdSensorLength(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SENSORLENGTH", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; - //---return m_rdb->zsmi(iModuleType)->getDouble("RLF") * CLHEP::cm; -//---return m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHFAR") * CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->zsmi(iModuleType)->getDouble("RLF") * GeoModelKernelUnits::cm; +//---return m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHFAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParametersOld::fwdSensorInnerWidth(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SENSORINNERWIDTH", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; } double SCT_ForwardModuleParametersOld::fwdSensorOuterWidth(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SENSOROUTERWIDTH", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; } double @@ -158,9 +158,9 @@ SCT_ForwardModuleParametersOld::fwdSensorInnerRadius(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SENSORINNERRADIUS", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; - //---return m_rdb->zsmi(iModuleType)->getDouble("RINNERF") * CLHEP::cm; - //---return m_rdb->fwdSensor(iModuleType)->getDouble("INNERWIDTHFAR") * CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->zsmi(iModuleType)->getDouble("RINNERF") * GeoModelKernelUnits::cm; + //---return m_rdb->fwdSensor(iModuleType)->getDouble("INNERWIDTHFAR") * GeoModelKernelUnits::mm; } double @@ -168,9 +168,9 @@ SCT_ForwardModuleParametersOld::fwdSensorOuterRadius(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SENSOROUTERRADIUS", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; - //---return m_rdb->zsmi(iModuleType)->getDouble("ROUTERF") * CLHEP::cm; - //---return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHFAR") * CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->zsmi(iModuleType)->getDouble("ROUTERF") * GeoModelKernelUnits::cm; + //---return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHFAR") * GeoModelKernelUnits::mm; } double @@ -178,15 +178,15 @@ SCT_ForwardModuleParametersOld::fwdSensorMiddleRadius(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SENSORMIDDLERADIUS", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; - //---return m_rdb->zsmi(iModuleType)->getDouble("ROUTERF") * CLHEP::cm; -//---return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHFAR") * CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->zsmi(iModuleType)->getDouble("ROUTERF") * GeoModelKernelUnits::cm; +//---return m_rdb->fwdSensor(iModuleType)->getDouble("OUTERWIDTHFAR") * GeoModelKernelUnits::mm; } double SCT_ForwardModuleParametersOld::fwdSensorDeltaPhi(int iModuleType) const{ char paraName[50]; sprintf(paraName, "FWD_M%d_SENSORDELTAPHI", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::radian; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::radian; } std::string @@ -203,9 +203,9 @@ SCT_ForwardModuleParametersOld::fwdSensorActiveHalfLength(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_ACTIVEHALFLENGTH", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; - //---return m_rdb->zsmi(iModuleType)->getDouble("RSEF") * CLHEP::cm; - //---return m_rdb->fwdSensor(iModuleType)->getDouble("ACTIVEHALFLENGTHFAR") * CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->zsmi(iModuleType)->getDouble("RSEF") * GeoModelKernelUnits::cm; + //---return m_rdb->fwdSensor(iModuleType)->getDouble("ACTIVEHALFLENGTHFAR") * GeoModelKernelUnits::mm; } double @@ -213,9 +213,9 @@ SCT_ForwardModuleParametersOld::fwdSensorAngularPitch(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_ANGULARPITCH", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::radian; - //---return m_rdb->zsmi(iModuleType)->getDouble("PHISTR") * CLHEP::radian; - //---return m_rdb->fwdSensor(iModuleType)->getDouble("ANGULARPITCH") * CLHEP::radian; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::radian; + //---return m_rdb->zsmi(iModuleType)->getDouble("PHISTR") * GeoModelKernelUnits::radian; + //---return m_rdb->fwdSensor(iModuleType)->getDouble("ANGULARPITCH") * GeoModelKernelUnits::radian; } int @@ -233,9 +233,9 @@ SCT_ForwardModuleParametersOld::fwdModuleStereoAngle(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_STEREOANGLE", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::milliradian; - //---return 40 * CLHEP::milliradian; - //---return m_rdb->fwdModule(iModuleType)->getDouble("STEREOANGLE") * CLHEP::milliradian; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::milliradian; + //---return 40 * GeoModelKernelUnits::milliradian; + //---return m_rdb->fwdModule(iModuleType)->getDouble("STEREOANGLE") * GeoModelKernelUnits::milliradian; } // @@ -246,9 +246,9 @@ SCT_ForwardModuleParametersOld::fwdSpineThickness(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SPINETHICKNESS", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; - //---return 1*CLHEP::mm; - //---return m_rdb->fwdSpine(iModuleType)->getDouble("THICKNESS") * CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; + //---return 1*GeoModelKernelUnits::mm; + //---return m_rdb->fwdSpine(iModuleType)->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } double @@ -256,11 +256,11 @@ SCT_ForwardModuleParametersOld::fwdSpineLength(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SPINELENGTH", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; - //return 8*CLHEP::cm; - //--- return (m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHNEAR") * CLHEP::mm - //--- + m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHFAR") * CLHEP::mm + 2*CLHEP::cm); -//return m_rdb->fwdSpine(iModuleType)->getDouble("WIDTH") * CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; + //return 8*GeoModelKernelUnits::cm; + //--- return (m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHNEAR") * GeoModelKernelUnits::mm + //--- + m_rdb->fwdSensor(iModuleType)->getDouble("LENGTHFAR") * GeoModelKernelUnits::mm + 2*GeoModelKernelUnits::cm); +//return m_rdb->fwdSpine(iModuleType)->getDouble("WIDTH") * GeoModelKernelUnits::mm; } double @@ -268,13 +268,13 @@ SCT_ForwardModuleParametersOld::fwdSpineMiddleRadius(int iModuleType) const { char paraName[50]; sprintf(paraName, "FWD_M%d_SPINEMIDDLERADIUS", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::mm; } double SCT_ForwardModuleParametersOld::fwdSpineDeltaPhi(int iModuleType) const{ char paraName[50]; sprintf(paraName, "FWD_M%d_SPINEDELTAPHI", iModuleType); - return (double)(m_SCT_Fwd_Modules->find(paraName))->second*CLHEP::radian; + return (double)(m_SCT_Fwd_Modules->find(paraName))->second*GeoModelKernelUnits::radian; } std::string diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardParameters.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardParameters.cxx index 9c3a2bf2f16..7b9d76a7f0b 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardParameters.cxx @@ -9,7 +9,7 @@ #include "GeometryDBSvc/IGeometryDBSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> #include <cmath> @@ -72,7 +72,7 @@ SCT_ForwardParameters::fwdNumWheels() const double SCT_ForwardParameters::fwdWheelZPosition(int iWheel) const { - return db()->getDouble(m_SctFwdWheel,"ZPOSITION",iWheel) * CLHEP::mm; + return db()->getDouble(m_SctFwdWheel,"ZPOSITION",iWheel) * GeoModelKernelUnits::mm; } int @@ -107,19 +107,19 @@ SCT_ForwardParameters::getRingMapIndex(int iWheel, int iRingIndex) const double SCT_ForwardParameters::fwdDiscSupportInnerRadius(int iWheel) const { - return db()->getDouble(m_SctFwdDiscSupport,"INNERRADIUS",iWheel) * CLHEP::mm; + return db()->getDouble(m_SctFwdDiscSupport,"INNERRADIUS",iWheel) * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdDiscSupportOuterRadius(int iWheel) const { - return db()->getDouble(m_SctFwdDiscSupport,"OUTERRADIUS",iWheel) * CLHEP::mm; + return db()->getDouble(m_SctFwdDiscSupport,"OUTERRADIUS",iWheel) * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdDiscSupportThickness(int iWheel) const { - return db()->getDouble(m_SctFwdDiscSupport,"THICKNESS",iWheel) * CLHEP::mm; + return db()->getDouble(m_SctFwdDiscSupport,"THICKNESS",iWheel) * GeoModelKernelUnits::mm; } std::string @@ -142,37 +142,37 @@ SCT_ForwardParameters::fwdRingNumModules(int iRingType) const double SCT_ForwardParameters::fwdRingInnerRadius(int iRingType) const { - return db()->getDouble(m_SctFwdRing,"INNERRADIUS",iRingType) * CLHEP::mm; + return db()->getDouble(m_SctFwdRing,"INNERRADIUS",iRingType) * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdRingMiddleRadius(int iRingType) const { - return db()->getDouble(m_SctFwdRing,"MIDDLERADIUS",iRingType) * CLHEP::mm; + return db()->getDouble(m_SctFwdRing,"MIDDLERADIUS",iRingType) * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdRingOuterRadius(int iRingType) const { - return db()->getDouble(m_SctFwdRing,"OUTERRADIUS",iRingType) * CLHEP::mm; + return db()->getDouble(m_SctFwdRing,"OUTERRADIUS",iRingType) * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdRingOffset(int iRingType) const { - return db()->getDouble(m_SctFwdRing,"OFFSET",iRingType) * CLHEP::mm; + return db()->getDouble(m_SctFwdRing,"OFFSET",iRingType) * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdRingModuleStagger(int iRingType) const { - return db()->getDouble(m_SctFwdRing,"MODULESTAGGER",iRingType) * CLHEP::mm; + return db()->getDouble(m_SctFwdRing,"MODULESTAGGER",iRingType) * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdRingPhiOfRefModule(int iRingType) const { - return db()->getDouble(m_SctFwdRing,"PHIOFREFMODULE",iRingType) * CLHEP::radian; + return db()->getDouble(m_SctFwdRing,"PHIOFREFMODULE",iRingType) * GeoModelKernelUnits::radian; } int @@ -205,37 +205,37 @@ SCT_ForwardParameters::fwdWheelStereoType(m_iWheel, int iRing) const double SCT_ForwardParameters::fwdInnerRadius() const { - return db()->getDouble(m_SctFwdGeneral,"INNERRADIUS") * CLHEP::mm; + return db()->getDouble(m_SctFwdGeneral,"INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdIntermediateRadius() const { - return db()->getDouble(m_SctFwdGeneral,"RINTERMEDIATE") * CLHEP::mm; + return db()->getDouble(m_SctFwdGeneral,"RINTERMEDIATE") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdOuterRadius() const { - return db()->getDouble(m_SctFwdGeneral,"OUTERRADIUS") * CLHEP::mm; + return db()->getDouble(m_SctFwdGeneral,"OUTERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdZMin() const { - return db()->getDouble(m_SctFwdGeneral,"ZMIN") * CLHEP::mm; + return db()->getDouble(m_SctFwdGeneral,"ZMIN") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdZIntermediate() const { - return db()->getDouble(m_SctFwdGeneral,"ZINTERMEDIATE") * CLHEP::mm; + return db()->getDouble(m_SctFwdGeneral,"ZINTERMEDIATE") * GeoModelKernelUnits::mm; } double SCT_ForwardParameters::fwdZMax() const { - return db()->getDouble(m_SctFwdGeneral,"ZMAX") * CLHEP::mm; + return db()->getDouble(m_SctFwdGeneral,"ZMAX") * GeoModelKernelUnits::mm; } } diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardParametersOld.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardParametersOld.cxx index 7aa10b20def..71ee405b5f4 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardParametersOld.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_ForwardParametersOld.cxx @@ -10,7 +10,7 @@ #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <iostream> #include <cmath> @@ -190,8 +190,8 @@ SCT_ForwardParametersOld::fwdWheelZPosition(int iWheel) const { char paraName[50]; sprintf(paraName, "W%d_DISKZPOSITION", iWheel); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; - //return m_rdb->fwdWheel(iWheel)->getDouble("ZPOSITION") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; + //return m_rdb->fwdWheel(iWheel)->getDouble("ZPOSITION") * GeoModelKernelUnits::mm; } int @@ -217,8 +217,8 @@ SCT_ForwardParametersOld::fwdDiscSupportInnerRadius(int iWheel) const { char paraName[50]; sprintf(paraName, "W%d_DISKINNERRADIUS", iWheel); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; - //---return m_rdb->fwdDiscSupport()->getDouble("INNERRADIUS") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->fwdDiscSupport()->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double @@ -226,8 +226,8 @@ SCT_ForwardParametersOld::fwdDiscSupportOuterRadius(int iWheel) const { char paraName[50]; sprintf(paraName, "W%d_DISKOUTERRADIUS", iWheel); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; - //---return m_rdb->fwdDiscSupport()->getDouble("OUTERRADIUS") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->fwdDiscSupport()->getDouble("OUTERRADIUS") * GeoModelKernelUnits::mm; } double @@ -235,8 +235,8 @@ SCT_ForwardParametersOld::fwdDiscSupportThickness(int iWheel) const { char paraName[50]; sprintf(paraName, "W%d_DISKTHICKNESS", iWheel); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; - //---return m_rdb->fwdDiscSupport()->getDouble("THICKNESS") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->fwdDiscSupport()->getDouble("THICKNESS") * GeoModelKernelUnits::mm; } std::string @@ -267,7 +267,7 @@ SCT_ForwardParametersOld::fwdRingInnerRadius(int iRing) const { char paraName[50]; sprintf(paraName, "Ring_%d_INNERRADIUS", iRing); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; } double @@ -275,14 +275,14 @@ SCT_ForwardParametersOld::fwdRingMiddleRadius(int iRing) const { char paraName[50]; sprintf(paraName, "Ring_%d_MIDDLERADIUS", iRing); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; } double SCT_ForwardParametersOld::fwdRingOuterRadius(int iRing) const { char paraName[50]; sprintf(paraName, "Ring_%d_OUTERRADIUS", iRing); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; } double @@ -290,7 +290,7 @@ SCT_ForwardParametersOld::fwdRingOffset(int iRing) const { char paraName[50]; sprintf(paraName, "Ring_%d_OFFSET", iRing); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; } double @@ -298,8 +298,8 @@ SCT_ForwardParametersOld::fwdRingModuleStagger(int iRing) const { char paraName[50]; sprintf(paraName, "Ring_%d_MODULESTAGGER", iRing); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::mm; - //---return m_rdb->fwdRing(iRing)->getDouble("MODULESTAGGER") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::mm; + //---return m_rdb->fwdRing(iRing)->getDouble("MODULESTAGGER") * GeoModelKernelUnits::mm; } double @@ -307,8 +307,8 @@ SCT_ForwardParametersOld::fwdRingPhiOfRefModule(int iRing) const { char paraName[50]; sprintf(paraName, "Ring_%d_PHIOFREFMODULE", iRing); - return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*CLHEP::radian; - //---return m_rdb->fwdRing(iRing)->getDouble("PHIOFREFMODULE") * CLHEP::deg; + return (double)(m_SCT_Fwd_Parameters->find(paraName))->second*GeoModelKernelUnits::radian; + //---return m_rdb->fwdRing(iRing)->getDouble("PHIOFREFMODULE") * GeoModelKernelUnits::deg; } int @@ -348,22 +348,22 @@ SCT_ForwardParametersOld::fwdWheelStereoType(m_iWheel, int iRing) const double SCT_ForwardParametersOld::fwdInnerRadius() const { - return (double)(m_SCT_Fwd_Parameters->find("FWD_INNERRADIUS"))->second*CLHEP::mm; - // return m_rdb->fwdGeneral()->getDouble("INNERRADIUS") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find("FWD_INNERRADIUS"))->second*GeoModelKernelUnits::mm; + // return m_rdb->fwdGeneral()->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParametersOld::fwdIntermediateRadius() const { - return (double)(m_SCT_Fwd_Parameters->find("FWD_INTERMEDIATERADIUS"))->second*CLHEP::mm; - // return m_rdb->fwdGeneral()->getDouble("INNERRADIUS") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find("FWD_INTERMEDIATERADIUS"))->second*GeoModelKernelUnits::mm; + // return m_rdb->fwdGeneral()->getDouble("INNERRADIUS") * GeoModelKernelUnits::mm; } double SCT_ForwardParametersOld::fwdOuterRadius() const { - return (double)(m_SCT_Fwd_Parameters->find("FWD_OUTERRADIUS"))->second*CLHEP::mm; - // return m_rdb->fwdGeneral()->getDouble("OUTERRADIUS") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find("FWD_OUTERRADIUS"))->second*GeoModelKernelUnits::mm; + // return m_rdb->fwdGeneral()->getDouble("OUTERRADIUS") * GeoModelKernelUnits::mm; } @@ -372,22 +372,22 @@ SCT_ForwardParametersOld::fwdOuterRadius() const double SCT_ForwardParametersOld::fwdZMin() const { - return (double)(m_SCT_Fwd_Parameters->find("FWD_ZMIN"))->second*CLHEP::mm; - //return m_rdb->fwdGeneral()->getDouble("ZMIN") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find("FWD_ZMIN"))->second*GeoModelKernelUnits::mm; + //return m_rdb->fwdGeneral()->getDouble("ZMIN") * GeoModelKernelUnits::mm; } double SCT_ForwardParametersOld::fwdZIntermediate() const { - return (double)(m_SCT_Fwd_Parameters->find("FWD_ZINTERMEDIATE"))->second*CLHEP::mm; - //return m_rdb->fwdGeneral()->getDouble("ZMIN") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find("FWD_ZINTERMEDIATE"))->second*GeoModelKernelUnits::mm; + //return m_rdb->fwdGeneral()->getDouble("ZMIN") * GeoModelKernelUnits::mm; } double SCT_ForwardParametersOld::fwdZMax() const { - return (double)(m_SCT_Fwd_Parameters->find("FWD_ZMAX"))->second*CLHEP::mm; - //return m_rdb->fwdGeneral()->getDouble("ZMAX") * CLHEP::mm; + return (double)(m_SCT_Fwd_Parameters->find("FWD_ZMAX"))->second*GeoModelKernelUnits::mm; + //return m_rdb->fwdGeneral()->getDouble("ZMAX") * GeoModelKernelUnits::mm; } } diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdDiscSupport.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdDiscSupport.cxx index 14e838bfa42..7a409fbfa5b 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdDiscSupport.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdDiscSupport.cxx @@ -10,7 +10,7 @@ #include "GeoModelKernel/GeoTube.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" namespace InDetDDSLHC { @@ -31,7 +31,7 @@ void SCT_FwdDiscSupport::getParameters(){ //m_material = materials.getMaterial(parameters->fwdDiscSupportMaterial(m_iWheel)); //0.1265 is taken from oracle database (DiskSupport) double materialIncreaseFactor = parameters->materialIncreaseFactor(m_iWheel); - //double cf_density = 0.1265*materialIncreaseFactor*CLHEP::g/CLHEP::cm3; + //double cf_density = 0.1265*materialIncreaseFactor*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3; //m_material = materials->getMaterial(parameters->fwdDiscSupportMaterial(m_iWheel), cf_density); m_material = materials->getMaterialScaled(parameters->fwdDiscSupportMaterial(m_iWheel), materialIncreaseFactor); } diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdModule.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdModule.cxx index 02996975524..a6f5a6354ff 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdModule.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdModule.cxx @@ -24,10 +24,10 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <cmath> #include <sstream> @@ -71,23 +71,23 @@ const GeoLogVol * SCT_FwdModule::preBuild(){ m_sensor = new SCT_FwdSensor("ECSensor0", m_ring); //prepare the module envelope volume - m_length = std::max(m_sensor->length(), m_spine->length()) + 0.50*CLHEP::cm;//0.01mm safety necessary (for stereo angle) + m_length = std::max(m_sensor->length(), m_spine->length()) + 0.50*GeoModelKernelUnits::cm;//0.01mm safety necessary (for stereo angle) m_middleRadius = m_sensor->middleRadius(); m_innerRadius = m_middleRadius - 0.5*m_length; m_outerRadius = m_middleRadius + 0.5*m_length; m_deltaPhi = std::max(m_sensor->deltaPhi(), m_spine->deltaPhi()); if(m_doubleSided){ double interSidesGap = std::max(m_spine->thickness(), m_interSidesGap); - m_thickness = 2*m_sensor->thickness() + interSidesGap + 0.01*CLHEP::mm;//0.01mm safety necessary - //the term 10*CLHEP::degree*3.14/180, is to accommodate the stereo rotation - m_deltaPhi = m_deltaPhi + 10*CLHEP::degree*3.14/180.; + m_thickness = 2*m_sensor->thickness() + interSidesGap + 0.01*GeoModelKernelUnits::mm;//0.01mm safety necessary + //the term 10*GeoModelKernelUnits::degree*3.14/180, is to accommodate the stereo rotation + m_deltaPhi = m_deltaPhi + 10*GeoModelKernelUnits::degree*3.14/180.; //add 1cm, to accomodate for stereo rotation (to be dealt correctly with later) - //m_innerRadius = m_innerRadius - 0.5*CLHEP::cm; - //m_outerRadius = m_outerRadius + 0.5*CLHEP::cm; - m_innerWidth = std::max(m_sensor->innerWidth(), m_spine->innerWidth()) + 2*CLHEP::cm; - m_outerWidth = std::max(m_sensor->outerWidth(), m_spine->outerWidth()) + 2*CLHEP::cm; + //m_innerRadius = m_innerRadius - 0.5*GeoModelKernelUnits::cm; + //m_outerRadius = m_outerRadius + 0.5*GeoModelKernelUnits::cm; + m_innerWidth = std::max(m_sensor->innerWidth(), m_spine->innerWidth()) + 2*GeoModelKernelUnits::cm; + m_outerWidth = std::max(m_sensor->outerWidth(), m_spine->outerWidth()) + 2*GeoModelKernelUnits::cm; }else{ - m_thickness = m_sensor->thickness() + m_spine->thickness() + 0.01*CLHEP::mm;//0.01mm safety necessary + m_thickness = m_sensor->thickness() + m_spine->thickness() + 0.01*GeoModelKernelUnits::mm;//0.01mm safety necessary m_innerWidth = std::max(m_sensor->innerWidth(), m_spine->innerWidth()); m_outerWidth = std::max(m_sensor->outerWidth(), m_spine->outerWidth()); } @@ -105,13 +105,13 @@ GeoVPhysVol* SCT_FwdModule::build(SCT_Identifier id) const{ GeoFullPhysVol* module = new GeoFullPhysVol(m_logVolume); //first, calculate the module components positions - HepGeom::Transform3D innerSidePos, spinePos, outerSidePos; + GeoTrf::Transform3D innerSidePos(GeoTrf::Transform3D::Identity()); + GeoTrf::Transform3D spinePos(GeoTrf::Transform3D::Identity()); + GeoTrf::Transform3D outerSidePos(GeoTrf::Transform3D::Identity()); if(m_doubleSided){ //inner side position (shift this side towards the intreaction point, ie Z negative) //this is the thickness direction - CLHEP::HepRotation inner_Rot; - //inner_Rot.rotateZ(180*CLHEP::deg); - inner_Rot.rotateX(0.5*m_stereoAngle); + GeoTrf::RotateX3D inner_Rot(0.5*m_stereoAngle); double interSidesGap = std::max(m_spine->thickness(), m_interSidesGap); double Xpos = 0.5*( interSidesGap + m_sensor->thickness()); //protection @@ -122,14 +122,10 @@ GeoVPhysVol* SCT_FwdModule::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - CLHEP::Hep3Vector inner_Xpos = CLHEP::Hep3Vector(Xpos, 0.0, 0.0); - innerSidePos = HepGeom::Transform3D(inner_Rot, inner_Xpos); - //spine position (no shift) - spinePos = HepGeom::Translate3D(CLHEP::Hep3Vector( 0.0, 0.0, 0.0)); + GeoTrf::Translation3D inner_Xpos(Xpos, 0.0, 0.0); + innerSidePos = GeoTrf::Transform3D(inner_Xpos*inner_Rot); //outer side (shift towards X positive) - CLHEP::HepRotation outer_Rot; - outer_Rot.rotateZ(180*CLHEP::deg); - outer_Rot.rotateX(-0.5*m_stereoAngle); + GeoTrf::Transform3D outer_Rot = GeoTrf::RotateX3D(-0.5*m_stereoAngle)*GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg); Xpos = -0.5*(interSidesGap + m_sensor->thickness()); //protection if(fabs(Xpos)+0.5*m_sensor->thickness() > 0.5*m_thickness){ @@ -139,12 +135,10 @@ GeoVPhysVol* SCT_FwdModule::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - CLHEP::Hep3Vector outer_Xpos = CLHEP::Hep3Vector(Xpos, 0.0, 0.0); - outerSidePos = HepGeom::Transform3D(outer_Rot, outer_Xpos); + GeoTrf::Translation3D outer_Xpos(Xpos, 0.0, 0.0); + outerSidePos = GeoTrf::Transform3D(outer_Xpos*outer_Rot); }else{ //inner side position (shift this side towards the intreaction point, ie X negative) - CLHEP::HepRotation inner_Rot; - inner_Rot.rotateX(0);//don't rotate (only one side) double Xpos = 0.5*m_spine->thickness(); //protection if(fabs(Xpos)+0.5*m_sensor->thickness() > 0.5*m_thickness){ @@ -154,8 +148,7 @@ GeoVPhysVol* SCT_FwdModule::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - CLHEP::Hep3Vector inner_Xpos = CLHEP::Hep3Vector(Xpos, 0.0, 0.0); - innerSidePos = HepGeom::Transform3D(inner_Rot, inner_Xpos); + innerSidePos = GeoTrf::Translate3D(Xpos, 0.0, 0.0); //spine position (shift towards Z positive) Xpos = -0.5*m_sensor->thickness(); //protection! @@ -166,7 +159,7 @@ GeoVPhysVol* SCT_FwdModule::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - spinePos = HepGeom::Translate3D(CLHEP::Hep3Vector( Xpos, 0.0, 0.0)); + spinePos = GeoTrf::Translate3D(Xpos, 0.0, 0.0); } //add the physical inner side to the mdoule diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdRing.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdRing.cxx index a8721bc5584..e1f6a79ada4 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdRing.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdRing.cxx @@ -20,10 +20,10 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <sstream> #include <cmath> @@ -68,11 +68,11 @@ const GeoLogVol* SCT_FwdRing::preBuild(){ m_module = new SCT_FwdModule("FwdModule"+intToString(m_iRing), m_iRing, m_doubleSided); - //m_innerRadius = m_innerRadius - 0.51*CLHEP::cm;//0.01mm safety necessary - //m_outerRadius = m_outerRadius + 0.51*CLHEP::cm;//0.01mm safety necessary - m_innerRadius = m_innerRadius - 5*CLHEP::mm;//0.01mm safety necessary - m_outerRadius = m_outerRadius + 7*CLHEP::mm;//0.01mm safety necessary - m_thickness = m_module->thickness() + m_moduleStagger + 0.01*CLHEP::mm;//safety necessary + //m_innerRadius = m_innerRadius - 0.51*GeoModelKernelUnits::cm;//0.01mm safety necessary + //m_outerRadius = m_outerRadius + 0.51*GeoModelKernelUnits::cm;//0.01mm safety necessary + m_innerRadius = m_innerRadius - 5*GeoModelKernelUnits::mm;//0.01mm safety necessary + m_outerRadius = m_outerRadius + 7*GeoModelKernelUnits::mm;//0.01mm safety necessary + m_thickness = m_module->thickness() + m_moduleStagger + 0.01*GeoModelKernelUnits::mm;//safety necessary m_length = m_outerRadius - m_innerRadius; //protection along R! if(m_length<m_module->length()){ @@ -101,7 +101,7 @@ GeoVPhysVol* SCT_FwdRing::build(SCT_Identifier id) const{ // Physical volume for the half ring GeoPhysVol* ring = new GeoPhysVol(m_logVolume); - double divisionAngle = 360*CLHEP::degree/m_numModules; + double divisionAngle = 360*GeoModelKernelUnits::degree/m_numModules; bool negativeEndCap = (id.getBarrelEC() < 0); int staggerUpperLower = m_firstStagger; for(int imod=0; imod<m_numModules; imod++){ @@ -120,25 +120,18 @@ GeoVPhysVol* SCT_FwdRing::build(SCT_Identifier id) const{ double phi = m_refStartAngle + imod*divisionAngle; //std::cerr<<"endcap "<<id.getBarrelEC()<<", ring "<<m_iRing<<", startAngle"<<m_refStartAngle<<", phi "<<phi<<std::endl; - CLHEP::HepRotation rot; //put the module along the radius of the ring, along X for example (remeber, it is along Z) - rot.rotateY(90*CLHEP::degree); + GeoTrf::Transform3D rot = GeoTrf::RotateY3D(90*GeoModelKernelUnits::degree); if (negativeEndCap) { //rotate the module so that to keep the local frame orientation as in the positive end - //rot.rotateZ(180*CLHEP::degree); + //rot.rotateZ(180*GeoModelKernelUnits::degree); //start in the oppsite phi and turn in the oppsite direction - if(phi < CLHEP::pi) - phi = CLHEP::pi - phi; + if(phi < GeoModelKernelUnits::pi) + phi = GeoModelKernelUnits::pi - phi; else - phi = 3*CLHEP::pi - phi; - } - if(m_doubleSided){ - //rot.rotateZ(phi + 0.5*m_stereoSign*m_module->stereoAngle()); - // do not stereo angle since the wheel type is not given, may be need to change later(today: 05/09/08) - rot.rotateZ(phi); - }else{ - rot.rotateZ(phi); + phi = 3*GeoModelKernelUnits::pi - phi; } + rot = GeoTrf::RotateZ3D(phi) * rot; //std::cerr<<"endcap "<<id.getBarrelEC()<<", wheel "<<m_iWheel<<", ring "<<m_iRing<<", mod "<<imod<<", phi "<<phi<<", startAng "<<m_refStartAngle<<std::endl; //the module stagger is opposite for oposite rings?! double Zpos = staggerUpperLower*m_ringSide*0.5*m_moduleStagger; @@ -150,11 +143,11 @@ GeoVPhysVol* SCT_FwdRing::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - CLHEP::Hep3Vector xyz(m_middleRadius, 0, Zpos); - xyz.rotateZ(phi); - HepGeom::Transform3D modulePos(rot,xyz); + GeoTrf::Vector3D xyz(m_middleRadius, 0, Zpos); + xyz = GeoTrf::RotateZ3D(phi)*xyz; + GeoTrf::Transform3D modulePos = GeoTrf::Translate3D(xyz.x(),xyz.y(),xyz.z())*rot; //protection along R! - const double epsilon = 0.0001*CLHEP::mm; //beyound meansurment precision?! + const double epsilon = 0.0001*GeoModelKernelUnits::mm; //beyound meansurment precision?! if(m_innerRadius-epsilon>m_module->innerRadius() || m_outerRadius+epsilon<m_module->outerRadius()){ std::cout<<"SCT_FwdRing.cxx: problem with module position along R: " diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdSensor.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdSensor.cxx index fd3a852a5f0..4adf6c3db30 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdSensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdSensor.cxx @@ -19,11 +19,11 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" + +#include "GeoModelKernel/GeoDefinitions.h" + -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" #include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SCT_ForwardModuleSideDesign.h" diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdSpine.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdSpine.cxx index a454ba956c5..99953035a2a 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdSpine.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdSpine.cxx @@ -14,11 +14,11 @@ #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoShapeUnion.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" + +#include "GeoModelKernel/GeoDefinitions.h" + -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" #include <cmath> diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdWheel.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdWheel.cxx index d41a3831056..6ce2e2b6677 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdWheel.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_FwdWheel.cxx @@ -22,10 +22,10 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <sstream> @@ -65,7 +65,7 @@ void SCT_FwdWheel::getParameters(){ m_ringOffset.push_back(parameters->fwdRingOffset(ringType)); m_ringTypes.push_back(ringType); } - m_staggerGap = 0.001* CLHEP::mm; + m_staggerGap = 0.001* GeoModelKernelUnits::mm; // Set numerology detectorManager()->numerology().setNumRingsForDisk(m_iWheel,m_numRings); @@ -85,10 +85,10 @@ const GeoLogVol* SCT_FwdWheel::preBuild(){ } //Calculate the extent of the envelope //start the support disc - //m_outerRadius = m_discSupport->outerRadius() + 0.52*CLHEP::cm;//0.01mm safety necessary - //m_innerRadius = m_discSupport->innerRadius() - 0.52*CLHEP::cm;//0.01mm safety necessary - m_outerRadius = m_discSupport->outerRadius() + 9*CLHEP::mm;//0.01mm safety necessary - m_innerRadius = m_discSupport->innerRadius() - 9*CLHEP::mm;//0.01mm safety necessary + //m_outerRadius = m_discSupport->outerRadius() + 0.52*GeoModelKernelUnits::cm;//0.01mm safety necessary + //m_innerRadius = m_discSupport->innerRadius() - 0.52*GeoModelKernelUnits::cm;//0.01mm safety necessary + m_outerRadius = m_discSupport->outerRadius() + 9*GeoModelKernelUnits::mm;//0.01mm safety necessary + m_innerRadius = m_discSupport->innerRadius() - 9*GeoModelKernelUnits::mm;//0.01mm safety necessary //then comsider rings double wheelThickness_neg = -1.0;//negative value! see code below double wheelThickness_pos = -1.0; @@ -165,8 +165,7 @@ GeoVPhysVol* SCT_FwdWheel::build(SCT_Identifier id) const{ GeoFullPhysVol* wheel = new GeoFullPhysVol(m_logVolume); //support disc - CLHEP::Hep3Vector disc_pos(0, 0, m_discSupportZpos); - wheel->add(new GeoTransform(HepGeom::Translate3D(disc_pos))); + wheel->add(new GeoTransform(GeoTrf::Translate3D(0, 0, m_discSupportZpos))); wheel->add(m_discSupport->getVolume()); //rings @@ -226,7 +225,6 @@ GeoVPhysVol* SCT_FwdWheel::build(SCT_Identifier id) const{ <<std::endl; exit(1); } - CLHEP::Hep3Vector ring_pos(0, 0, ring_z_pos); //each wheel drops a ring, that's why ring_id (ie eta) is calculated in the following way //(ie the second ring from a wheel and the first ring from a following wheel in a region //(SS or LS) have the same eta. @@ -234,7 +232,7 @@ GeoVPhysVol* SCT_FwdWheel::build(SCT_Identifier id) const{ int ring_id = iRing; wheel->add(new GeoNameTag("Ring#" + intToString(ring_id))); wheel->add(new GeoIdentifierTag(ring_id)); - wheel->add(new GeoTransform(HepGeom::Translate3D(ring_pos))); + wheel->add(new GeoTransform(GeoTrf::Translate3D(0, 0, ring_z_pos))); //std::cerr<<", ring "<<ring_id; id.setEtaModule(ring_id); //--id.setEtaModule(iRing); diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_GeneralParameters.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_GeneralParameters.cxx index 4233afc1f7a..3a3a28a4f8e 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_GeneralParameters.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_GeneralParameters.cxx @@ -7,15 +7,15 @@ #include "SCT_SLHC_GeoModel/SCT_DataBase.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "GeometryDBSvc/IGeometryDBSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "InDetGeoModelUtils/TopLevelPlacements.h" #include <iostream> namespace InDetDDSLHC { -const double SCT_SAFETY = 0.01 * CLHEP::mm; // Used in some places to make envelopes slightly larger to ensure +const double SCT_SAFETY = 0.01 * GeoModelKernelUnits::mm; // Used in some places to make envelopes slightly larger to ensure // no overlaps due to rounding errors. SCT_GeneralParameters::SCT_GeneralParameters(const SCT_DataBase * sctdb, const SCT_GeoModelAthenaComps * athenaComps) @@ -32,7 +32,7 @@ SCT_GeneralParameters::~SCT_GeneralParameters() } -const HepGeom::Transform3D & +const GeoTrf::Transform3D & SCT_GeneralParameters::partTransform(const std::string & partName) const { return m_placements->transform(partName); @@ -124,19 +124,19 @@ unsigned int SCT_GeneralParameters::envelopeNumPlanes() const double SCT_GeneralParameters::envelopeZ(int i) const { - double zmin = db()->getDouble(m_SctEnvelope,"Z",i) * CLHEP::mm; + double zmin = db()->getDouble(m_SctEnvelope,"Z",i) * GeoModelKernelUnits::mm; if (zmin < 0) msg(MSG::ERROR) << "SctEnvelope table should only contain +ve z values" << endmsg; return std::abs(zmin); } double SCT_GeneralParameters::envelopeRMin(int i) const { - return db()->getDouble(m_SctEnvelope,"RMIN",i) * CLHEP::mm; + return db()->getDouble(m_SctEnvelope,"RMIN",i) * GeoModelKernelUnits::mm; } double SCT_GeneralParameters::envelopeRMax(int i) const { - return db()->getDouble(m_SctEnvelope,"RMAX",i) * CLHEP::mm; + return db()->getDouble(m_SctEnvelope,"RMAX",i) * GeoModelKernelUnits::mm; } diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_InnerSide.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_InnerSide.cxx index 6e55cab68b4..567f7cc9ff0 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_InnerSide.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_InnerSide.cxx @@ -22,9 +22,9 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + #include <cmath> @@ -82,7 +82,7 @@ const GeoLogVol* SCT_InnerSide::preBuild(){ //positions with respect to the center of the inner side box double innerSensorXPos = 0; //Position sensor - m_sensorPos = new GeoTransform(HepGeom::TranslateX3D(innerSensorXPos)); + m_sensorPos = new GeoTransform(GeoTrf::TranslateX3D(innerSensorXPos)); m_sensorPos->ref(); return InnerSideLogV; } diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Layer.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Layer.cxx index 5c6fbe5bf03..83c6076022c 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Layer.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Layer.cxx @@ -23,10 +23,10 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoShapeSubtraction.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <sstream> #include <cmath> @@ -72,7 +72,7 @@ void SCT_Layer::getParameters(){ //---m_supportMaterial = materials->getMaterial(parameters->supportCylMaterial(m_iLayer)); //0.189 is taken from oracle database (CFiberSupport) double materialIncreaseFactor = parameters->materialIncreaseFactor(m_iLayer); - //double cf_density = 0.189*materialIncreaseFactor*CLHEP::g/CLHEP::cm3; + //double cf_density = 0.189*materialIncreaseFactor*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3; //m_supportMaterial = materials->getMaterial(parameters->supportCylMaterial(m_iLayer), cf_density); m_supportMaterial = materials->getMaterialScaled(parameters->supportCylMaterial(m_iLayer), materialIncreaseFactor); @@ -93,7 +93,7 @@ const GeoLogVol* SCT_Layer::preBuild(){ //Create the logical volume: a sphape + material std::string layerNumStr = intToString(m_iLayer); //Calculations to make the ski(s) - double divisionAngle = 360*CLHEP::degree/m_skisPerLayer; + double divisionAngle = 360*GeoModelKernelUnits::degree/m_skisPerLayer; m_skiPhiStart = 0.5*divisionAngle; //Make the ski: this is made from modules m_ski = new SCT_Ski("Ski"+layerNumStr, m_modulesPerSki, m_iLayer, @@ -134,7 +134,7 @@ GeoVPhysVol* SCT_Layer::build(SCT_Identifier id) const{ SCT_MaterialManager * materials = geometryManager()->materialManager(); //We make this a fullPhysVol for alignment code. GeoFullPhysVol* layer = new GeoFullPhysVol(m_logVolume); - double divisionAngle = 360*CLHEP::degree/m_skisPerLayer; + double divisionAngle = 360*GeoModelKernelUnits::degree/m_skisPerLayer; //Make envelope for active layer const GeoTube* activeLayerEnvelope = new GeoTube(m_activeInnerRadius, m_activeOuterRadius, 0.5*m_cylLength); @@ -148,17 +148,15 @@ GeoVPhysVol* SCT_Layer::build(SCT_Identifier id) const{ //first, rotate the ski to have the right orientation (by default the ski is put in //the center of the layer cylinder with thickness along X, width along Y and length //along Z. the rotation is done along the cylinder Z axis. - CLHEP::HepRotation rot; - rot.rotateZ(phi); - rot.rotateZ(m_tilt); + GeoTrf::Transform3D rot = GeoTrf::RotateZ3D(m_tilt)*GeoTrf::RotateZ3D(phi); //then translate the ski to (R, Phi) position - CLHEP::Hep3Vector pos(m_radius, 0, 0); - pos.rotateZ(phi); + GeoTrf::Vector3D pos(m_radius, 0, 0); + pos = GeoTrf::RotateZ3D(phi)*pos; //Because the ski envelope center is not positioned at the rotation axis for the ski //we must first apply the inverse of refPointTransform() of the ski. - //---HepGeom::Transform3D trans(HepGeom::Transform3D(rot,pos)*m_ski->getRefPointTransform() + //---GeoTrf::Transform3D trans(GeoTrf::Transform3D(rot,pos)*m_ski->getRefPointTransform() //--- ->getTransform().inverse()); - HepGeom::Transform3D trans(HepGeom::Transform3D(rot,pos)); + GeoTrf::Transform3D trans = GeoTrf::Translate3D(pos.x(),pos.y(),pos.z())*rot; activeLayer->add(new GeoAlignableTransform(trans)); activeLayer->add(new GeoNameTag(name.str())); activeLayer->add(new GeoIdentifierTag(iSki)); @@ -198,9 +196,9 @@ void SCT_Layer::activeEnvelopeExtent(double & rmin, double & rmax){ double thickness = 0.5*m_ski->thickness(); double width = 0.5*m_ski->width(); double tilt = std::abs(m_tilt); - double width_rot = width * cos(tilt/CLHEP::radian) - thickness * sin(tilt/CLHEP::radian); + double width_rot = width * cos(tilt/GeoModelKernelUnits::radian) - thickness * sin(tilt/GeoModelKernelUnits::radian); - double thickness_rot = width * sin(tilt/CLHEP::radian) + thickness * cos(tilt/CLHEP::radian); + double thickness_rot = width * sin(tilt/GeoModelKernelUnits::radian) + thickness * cos(tilt/GeoModelKernelUnits::radian); rmax = sqrt(sqr(m_radius + thickness_rot) + sqr(width_rot)); rmin = sqrt(sqr(m_radius - thickness_rot) + sqr(width_rot)); diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_MaterialManager.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_MaterialManager.cxx index a0329a67620..ded6eb73203 100755 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_MaterialManager.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_MaterialManager.cxx @@ -35,7 +35,7 @@ SCT_MaterialManager::loadMaterials() //const GeoMaterial *kapton = getMaterial("std::Kapton"); // 30th Aug 2005 D.Naito added. // CuKapton for Low Mass Tapes - //GeoMaterial * matCuKapton = new GeoMaterial("sct::CuKapton",2.94*CLHEP::gram/CLHEP::cm3); + //GeoMaterial * matCuKapton = new GeoMaterial("sct::CuKapton",2.94*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); //matCuKapton->add(const_cast<GeoElement*>(copper), 0.6142); //matCuKapton->add(const_cast<GeoMaterial*>(kapton), 0.3858); //addMaterial(matCuKapton); diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Module.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Module.cxx index 73d5b0d9359..e08c43799a2 100755 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Module.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Module.cxx @@ -25,10 +25,10 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoShapeSubtraction.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <cmath> @@ -83,13 +83,13 @@ const GeoLogVol* SCT_Module::preBuild(){ // Sensor only if placing sensors directly on stave m_width = m_innerSide->width(); m_length = m_innerSide->length(); - m_thickness = m_innerSide->thickness() + 0.01*CLHEP::mm;// Not really necessary but doesn't hurt + m_thickness = m_innerSide->thickness() + 0.01*GeoModelKernelUnits::mm;// Not really necessary but doesn't hurt } else if(m_doubleSided){ sideWidth = std::max(m_innerSide->width(), m_outerSide->width()); sideLength = std::max(m_innerSide->length(), m_outerSide->length()); - m_width = std::max(sideWidth*cos(half_stereo/CLHEP::radian) + sideLength*sin(half_stereo/CLHEP::radian), + m_width = std::max(sideWidth*cos(half_stereo/GeoModelKernelUnits::radian) + sideLength*sin(half_stereo/GeoModelKernelUnits::radian), m_baseBoard->width()); - m_length = std::max(sideWidth*sin(half_stereo/CLHEP::radian) + sideLength*cos(half_stereo/CLHEP::radian), + m_length = std::max(sideWidth*sin(half_stereo/GeoModelKernelUnits::radian) + sideLength*cos(half_stereo/GeoModelKernelUnits::radian), m_baseBoard->length()); double interSidesGap = std::max(m_baseBoard->thickness(), m_interSidesGap); m_thickness = m_innerSide->thickness() + m_outerSide->thickness() + interSidesGap + 0.01;//0.01mm safety necessary @@ -122,12 +122,12 @@ GeoVPhysVol* SCT_Module::build(SCT_Identifier id) const{ } GeoFullPhysVol* module = new GeoFullPhysVol(m_logVolume); //first, calculate the module components position - HepGeom::Transform3D innerSidePos, baseBoardPos, outerSidePos; + GeoTrf::Transform3D innerSidePos(GeoTrf::Transform3D::Identity()); + GeoTrf::Transform3D baseBoardPos(GeoTrf::Transform3D::Identity()); + GeoTrf::Transform3D outerSidePos(GeoTrf::Transform3D::Identity()); if (m_doubleSided){ //inner side position (shift this side towards the intreaction point, ie X negative) - CLHEP::HepRotation inner_Rot; - inner_Rot.rotateZ(180*CLHEP::deg); - inner_Rot.rotateX(-0.5*m_stereoAngle); + GeoTrf::Transform3D inner_Rot = GeoTrf::RotateX3D(-0.5*m_stereoAngle)*GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg); double interSidesGap = std::max(m_baseBoard->thickness(), m_interSidesGap); double Xpos = -0.5*(interSidesGap + m_innerSide->thickness()); //std::cerr<<"inner Xpos "<<Xpos<<" thickness "<<m_innerSide->thickness()<<std::endl; @@ -139,13 +139,11 @@ GeoVPhysVol* SCT_Module::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - CLHEP::Hep3Vector inner_Xpos = CLHEP::Hep3Vector(Xpos, 0., 0.); - innerSidePos = HepGeom::Transform3D(inner_Rot, inner_Xpos); + GeoTrf::Translation3D inner_Xpos(Xpos, 0., 0.); + innerSidePos = GeoTrf::Transform3D(inner_Xpos*inner_Rot); //basebord position (no shift) - baseBoardPos = HepGeom::Translate3D(CLHEP::Hep3Vector( 0.0, 0.0, 0.0)); //outer side (shift towards X positive) - CLHEP::HepRotation outer_Rot; - outer_Rot.rotateX(+0.5*m_stereoAngle); + GeoTrf::RotateX3D outer_Rot(+0.5*m_stereoAngle); Xpos = 0.5*(interSidesGap + m_outerSide->thickness()); //std::cerr<<"inner Xpos "<<Xpos<<" thickness "<<m_outerSide->thickness()<<std::endl; //protection @@ -156,13 +154,11 @@ GeoVPhysVol* SCT_Module::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - CLHEP::Hep3Vector outer_Xpos = CLHEP::Hep3Vector(Xpos, 0., 0.); - outerSidePos = HepGeom::Transform3D(outer_Rot, outer_Xpos); + GeoTrf::Translation3D outer_Xpos(Xpos, 0., 0.); + outerSidePos = GeoTrf::Transform3D(outer_Xpos*outer_Rot); } else { //inner side position (shift this side towards the intreaction point, ie X negative) - CLHEP::HepRotation inner_Rot; - inner_Rot.rotateZ(180*CLHEP::deg); - inner_Rot.rotateX(0);//don't rotate (only one side) + GeoTrf::RotateZ3D inner_Rot(180*GeoModelKernelUnits::deg); double Xpos = -0.5*m_baseBoard->thickness(); //protection if(fabs(Xpos)+0.5*m_innerSide->thickness() > 0.5*m_thickness){ @@ -172,8 +168,8 @@ GeoVPhysVol* SCT_Module::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - CLHEP::Hep3Vector inner_Xpos = CLHEP::Hep3Vector(Xpos, 0., 0.); - innerSidePos = HepGeom::Transform3D(inner_Rot, inner_Xpos); + GeoTrf::Translation3D inner_Xpos(Xpos, 0., 0.); + innerSidePos = GeoTrf::Transform3D(inner_Xpos*inner_Rot); //basebord position (shift towards X positive) Xpos = 0.5*m_innerSide->thickness(); //protection! @@ -184,7 +180,7 @@ GeoVPhysVol* SCT_Module::build(SCT_Identifier id) const{ <<". exit athena!"<<std::endl; exit(1); } - baseBoardPos = HepGeom::Translate3D(CLHEP::Hep3Vector(Xpos, 0.0, 0.0)); + baseBoardPos = GeoTrf::Translate3D(Xpos, 0.0, 0.0); } //Add physical innerside to the module diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_OuterSide.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_OuterSide.cxx index d103326b333..bf6c162a238 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_OuterSide.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_OuterSide.cxx @@ -22,9 +22,9 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + #include <cmath> @@ -78,7 +78,7 @@ const GeoLogVol* SCT_OuterSide::preBuild(){ //positions with respect to the center of the outer side box double outerSensorXPos = 0; //Position sensor - m_sensorPos = new GeoTransform(HepGeom::TranslateX3D(outerSensorXPos)); + m_sensorPos = new GeoTransform(GeoTrf::TranslateX3D(outerSensorXPos)); m_sensorPos->ref(); return OuterSideLogV; diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Sensor.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Sensor.cxx index 49b6f575779..eeeec98686f 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Sensor.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Sensor.cxx @@ -23,7 +23,7 @@ #include "InDetReadoutGeometry/SiCommonItems.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" using namespace InDetDD; @@ -78,7 +78,7 @@ SCT_Sensor::preBuild() // Build the subsensor logical volume (same for all segments). // We reduce the size by a small amount to avoid touching volumes. - double epsilon = 1e-7*CLHEP::mm; + double epsilon = 1e-7*GeoModelKernelUnits::mm; const GeoBox * subSensorShape = new GeoBox(0.5*m_thickness-epsilon, 0.5*m_width-epsilon, 0.5*m_subSensorLength-epsilon); m_subSensorLog = new GeoLogVol(getName(), subSensorShape, m_material); m_subSensorLog->ref(); @@ -153,7 +153,7 @@ GeoVPhysVol* SCT_Sensor::build(SCT_Identifier id) const{ if (m_numSegments > 1) { double zpos = (iSegment - 0.5*(m_numSegments-1)) * m_subSensorLength; subSensor = new GeoFullPhysVol(m_subSensorLog); - GeoTransform * trans = new GeoTransform(HepGeom::TranslateZ3D(zpos)); + GeoTransform * trans = new GeoTransform(GeoTrf::TranslateZ3D(zpos)); GeoIdentifierTag * idTag = new GeoIdentifierTag(1200+iSegment); GeoNameTag * nameTag = new GeoNameTag("SubSensor#"+intToString(iSegment)); sensor->add(trans); diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Ski.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Ski.cxx index 5b4cb330ebf..d814453a02f 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Ski.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_Ski.cxx @@ -24,10 +24,10 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Units/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Vector/Rotation.h" +#include "GeoModelKernel/Units.h" +#include "GeoModelKernel/GeoDefinitions.h" + + #include <sstream> #include <cmath> @@ -172,9 +172,7 @@ GeoVPhysVol* SCT_Ski::build(SCT_Identifier id) const{ if ((m_staveLayout==2) && m_staveSupport_pos && m_staveSupport_pos->getVolume()) { // centered. - CLHEP::Hep3Vector pos_pos(0.0, 0.0, (m_length*0.5 - m_cylInnerZMin - m_safety)*0.5 + m_cylInnerZMin); - CLHEP::HepRotation pos_rot; - HepGeom::Transform3D modulePos_pos = HepGeom::Transform3D(pos_rot, pos_pos); + GeoTrf::Translate3D modulePos_pos(0.0, 0.0, (m_length*0.5 - m_cylInnerZMin - m_safety)*0.5 + m_cylInnerZMin); GeoTransform* supportTransform_pos = new GeoTransform(modulePos_pos); ski->add(supportTransform_pos); ski->add(m_staveSupport_pos->getVolume()); @@ -182,9 +180,7 @@ GeoVPhysVol* SCT_Ski::build(SCT_Identifier id) const{ if ((m_staveLayout==2) && m_staveSupport_neg && m_staveSupport_neg->getVolume()) { // centered. - CLHEP::Hep3Vector neg_pos(0.0, 0.0,-(m_length*0.5 - m_cylInnerZMin - m_safety)*0.5 - m_cylInnerZMin); - CLHEP::HepRotation neg_rot; - HepGeom::Transform3D modulePos_neg = HepGeom::Transform3D(neg_rot, neg_pos); + GeoTrf::Translate3D modulePos_neg(0.0, 0.0,-(m_length*0.5 - m_cylInnerZMin - m_safety)*0.5 - m_cylInnerZMin); GeoTransform* supportTransform_neg = new GeoTransform(modulePos_neg); ski->add(supportTransform_neg); ski->add(m_staveSupport_neg->getVolume()); @@ -221,12 +217,11 @@ SCT_Ski::placeModule(GeoPhysVol * ski, SCT_Identifier id, int iModule, int side, //Don't exit as this breaks some existing geometries. //exit(1); } - CLHEP::HepRotation rot; + GeoTrf::Transform3D rot = GeoTrf::RotateX3D(stereoAngle); //the module is rotated, around X axis, one way or the other (u or v) - if (flip) rot.rotateZ(180*CLHEP::deg); - rot.rotateX(stereoAngle); - CLHEP::Hep3Vector pos(xModulePos, 0.0, zModulePos); - HepGeom::Transform3D modulePos = HepGeom::Transform3D(rot, pos); + if (flip) rot = rot * GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg); + GeoTrf::Translation3D pos(xModulePos, 0.0, zModulePos); + GeoTrf::Transform3D modulePos = GeoTrf::Transform3D(pos*rot); //Add modules. GeoAlignableTransform* moduleTransform = new GeoAlignableTransform(modulePos); diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_StaveSupport.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_StaveSupport.cxx index 94968f717b1..52b9475c4e5 100644 --- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_StaveSupport.cxx +++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_StaveSupport.cxx @@ -12,7 +12,7 @@ #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" namespace InDetDDSLHC { diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt index 89c041c9aac..bb2815df1d4 100644 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/CMakeLists.txt @@ -20,7 +20,7 @@ atlas_depends_on_subdirs( PUBLIC Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/DetDescrCond/DetDescrConditions DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel + DetectorDescription/GeoPrimitives DetectorDescription/GeometryDBSvc DetectorDescription/IdDictDetDescr InnerDetector/InDetConditions/TRT_ConditionsData @@ -28,13 +28,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( TRT_GeoModel src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel TRT_ConditionsServicesLib InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions GeoModelKernel IdDictDetDescr TRT_ConditionsData InDetIdentifier ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel TRT_ConditionsServicesLib InDetGeoModelUtils InDetReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions IdDictDetDescr TRT_ConditionsData InDetIdentifier ) diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/ArrayFunction.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/ArrayFunction.cxx index fd18bacfeca..40e90d059c8 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/ArrayFunction.cxx +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/ArrayFunction.cxx @@ -4,7 +4,7 @@ #include "ArrayFunction.h" -namespace Genfun { +namespace GeoGenfun { FUNCTION_OBJECT_IMP(ArrayFunction) @@ -17,7 +17,7 @@ ArrayFunction::~ArrayFunction(){} // Copy constructor ArrayFunction::ArrayFunction(const ArrayFunction &right): - Genfun::AbsFunction(), m_values(right.m_values) {} + GeoGenfun::AbsFunction(), m_values(right.m_values) {} // Retrieve function value double ArrayFunction::operator ()(double argument) const { diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/ArrayFunction.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/ArrayFunction.h index a0f6f8cbd1b..3d556b84d57 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/ArrayFunction.h +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/ArrayFunction.h @@ -10,9 +10,9 @@ //-------------------------------------------------------// -#include "CLHEP/GenericFunctions/AbsFunction.hh" +#include "GeoGenericFunctions/AbsFunction.h" #include <vector> -namespace Genfun { +namespace GeoGenfun { class ArrayFunction : public AbsFunction { FUNCTION_OBJECT_DEF(ArrayFunction) diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx index 06181d15fe1..7cb171c6813 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx @@ -2,6 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ +#include "GeoPrimitives/GeoPrimitives.h" #include "TRTDetectorFactory_Full.h" #include "TRT_DetDescrDB_ParameterInterface.h" @@ -39,13 +40,13 @@ #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoElement.h" #include "GeoModelKernel/GeoMaterial.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" -#include "CLHEP/Vector/TwoVector.h" -#include "CLHEP/Vector/ThreeVector.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "AthenaPoolUtilities/CondAttrListCollection.h" #include "DetDescrConditions/AlignableTransformContainer.h" @@ -53,13 +54,33 @@ #include <vector> #include <sstream> +#include <cmath> -//TK: get rid of these and use Genfun:: and GeoXF:: instead -using namespace Genfun; +//TK: get rid of these and use GeoGenfun:: and GeoXF:: instead +using namespace GeoGenfun; using namespace GeoXF; +// Helper functions. Temporarily here (hopefully) +void rotate(double angler, GeoTrf::Vector2D& vector) +{ + double s1 = std::sin(angler); + double c = std::cos(angler); + double xx = vector.x(); + double yy = vector.y(); + vector.x() = c*xx - s1*yy; + vector.y() = s1*xx + c*yy; +} +double angle(const GeoTrf::Vector2D& a, const GeoTrf::Vector2D& b) +{ + double ptot2 = a.mag2()*b.mag2(); + return ptot2 <= 0.0 ? 0.0 : std::acos(a.dot(b)/std::sqrt(ptot2)); +} +double magn(GeoTrf::Vector2D& vector) +{ + return std::sqrt(vector.x()*vector.x() + vector.y()*vector.y()); +} /////////////////////////////////// Constructor ////////////////////////////////// // TRTDetectorFactory_Full::TRTDetectorFactory_Full(const InDetDD::AthenaComps * athenaComps, @@ -252,7 +273,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) bool endcapCPlusPresent = m_data->partPresent(endcapA_WheelC_Label); bool endcapCMinusPresent = m_data->partPresent(endcapC_WheelC_Label); // Overall transform (probably will always be identifty - but just in case) - HepGeom::Transform3D trtTransform = m_data->partTransform("TRT"); + GeoTrf::Transform3D trtTransform = m_data->partTransform("TRT"); // For old configurations we need to set which parts are present. // @@ -379,7 +400,6 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) //---------------------- Top level volumes ------------------------// - // This is used by HepVis. GeoNameTag * topLevelNameTag = new GeoNameTag("TRT"); topLevelNameTag->ref(); //(sar) Set this up for deletion if it never gets added // The top level volumes @@ -432,7 +452,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) m_data->outerRadiusOfEndCapVolumeAB, m_data->lengthOfEndCapVolumeAB/2.); const GeoShape & sEndCapVolumeAB - = ( *sEndCapVolumeAB_unshifted << HepGeom::TranslateZ3D(m_data->positionOfEndCapVolumeAB)); + = ( *sEndCapVolumeAB_unshifted << GeoTrf::TranslateZ3D(m_data->positionOfEndCapVolumeAB)); lEndCapVolumeAB = new GeoLogVol("TRTEndcapWheelAB", &sEndCapVolumeAB, m_materialManager->getMaterial("trt::CO2")); } @@ -456,7 +476,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) pEndCapABMinus = new GeoFullPhysVol(lEndCapVolumeAB); GeoAlignableTransform * transform = - new GeoAlignableTransform(trtTransform * m_data->partTransform(endcapC_WheelAB_Label) * HepGeom::RotateY3D(180*CLHEP::deg)); + new GeoAlignableTransform(trtTransform * m_data->partTransform(endcapC_WheelAB_Label) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg)); world->add(topLevelNameTag); world->add(transform); @@ -476,7 +496,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) m_data->outerRadiusOfEndCapVolumeC, m_data->lengthOfEndCapVolumeC/2.); const GeoShape & sEndCapVolumeC - = ( *sEndCapVolumeC_unshifted << HepGeom::TranslateZ3D(m_data->positionOfEndCapVolumeC)); + = ( *sEndCapVolumeC_unshifted << GeoTrf::TranslateZ3D(m_data->positionOfEndCapVolumeC)); lEndCapVolumeC = new GeoLogVol("TRTEndcapWheelC", &sEndCapVolumeC, m_materialManager->getMaterial("trt::CO2")); } @@ -498,7 +518,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) pEndCapCMinus = new GeoFullPhysVol(lEndCapVolumeC); GeoAlignableTransform * transform = - new GeoAlignableTransform(trtTransform * m_data->partTransform(endcapC_WheelC_Label) * HepGeom::RotateY3D(180*CLHEP::deg)); + new GeoAlignableTransform(trtTransform * m_data->partTransform(endcapC_WheelC_Label) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg)); world->add(topLevelNameTag); world->add(transform); @@ -611,8 +631,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) GeoPhysVol *pEndFlangeRegion = new GeoPhysVol(lEndFlangeRegion); double zPosEndFlange = (m_data->barFlangeZMin+m_data->barFlangeZMax)/2; - GeoTransform *xfEndFlangeRegionPlus = new GeoTransform(HepGeom::TranslateZ3D(zPosEndFlange)); - GeoTransform *xfEndFlangeRegionMinus = new GeoTransform(HepGeom::TranslateZ3D(-zPosEndFlange)); + GeoTransform *xfEndFlangeRegionPlus = new GeoTransform(GeoTrf::TranslateZ3D(zPosEndFlange)); + GeoTransform *xfEndFlangeRegionMinus = new GeoTransform(GeoTrf::TranslateZ3D(-zPosEndFlange)); pBarrelVol->add(xfEndFlangeRegionPlus); pBarrelVol->add(pEndFlangeRegion); @@ -634,8 +654,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) GeoPhysVol *pServices = new GeoPhysVol(lServices); double zPosServices = (m_data->barServicesZMin+m_data->barServicesZMax)/2; - GeoTransform *xfServicesPlus = new GeoTransform(HepGeom::TranslateZ3D(zPosServices)); - GeoTransform *xfServicesMinus = new GeoTransform(HepGeom::TranslateZ3D(-zPosServices)); + GeoTransform *xfServicesPlus = new GeoTransform(GeoTrf::TranslateZ3D(zPosServices)); + GeoTransform *xfServicesMinus = new GeoTransform(GeoTrf::TranslateZ3D(-zPosServices)); pBarrelVol->add(xfServicesPlus); pBarrelVol->add(pServices); @@ -701,15 +721,15 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // The shell volume: std::ostringstream shellstream; shellstream << "Shell" << iABC; - CLHEP::Hep2Vector shellCorner1(m_data->shellCornerXPosition[iABC][0],m_data->shellCornerYPosition[iABC][0]); - CLHEP::Hep2Vector shellCorner2(m_data->shellCornerXPosition[iABC][1],m_data->shellCornerYPosition[iABC][1]); - CLHEP::Hep2Vector shellCorner3(m_data->shellCornerXPosition[iABC][2],m_data->shellCornerYPosition[iABC][2]); - CLHEP::Hep2Vector shellCorner4(m_data->shellCornerXPosition[iABC][3],m_data->shellCornerYPosition[iABC][3]); - HepGeom::Transform3D shellPosition; - if ( shellCorner1 <= 0 ) { msg(MSG::DEBUG) << "shellCorner1 is <= 0 (" << shellCorner1 << ")" << endmsg; } - if ( shellCorner2 <= 0 ) { msg(MSG::DEBUG) << "shellCorner2 is <= 0 (" << shellCorner2 << ")" << endmsg; } - if ( shellCorner3 <= 0 ) { msg(MSG::DEBUG) << "shellCorner3 is <= 0 (" << shellCorner3 << ")" << endmsg; } - if ( shellCorner4 <= 0 ) { msg(MSG::DEBUG) << "shellCorner4 is <= 0 (" << shellCorner4 << ")" << endmsg; } + GeoTrf::Vector2D shellCorner1(m_data->shellCornerXPosition[iABC][0],m_data->shellCornerYPosition[iABC][0]); + GeoTrf::Vector2D shellCorner2(m_data->shellCornerXPosition[iABC][1],m_data->shellCornerYPosition[iABC][1]); + GeoTrf::Vector2D shellCorner3(m_data->shellCornerXPosition[iABC][2],m_data->shellCornerYPosition[iABC][2]); + GeoTrf::Vector2D shellCorner4(m_data->shellCornerXPosition[iABC][3],m_data->shellCornerYPosition[iABC][3]); + GeoTrf::Transform3D shellPosition(GeoTrf::Transform3D::Identity()); + if ( shellCorner1.y() <= 0 ) { msg(MSG::DEBUG) << "shellCorner1 is <= 0 (" << shellCorner1 << ")" << endmsg; } + if ( shellCorner2.y() <= 0 ) { msg(MSG::DEBUG) << "shellCorner2 is <= 0 (" << shellCorner2 << ")" << endmsg; } + if ( shellCorner3.y() <= 0 ) { msg(MSG::DEBUG) << "shellCorner3 is <= 0 (" << shellCorner3 << ")" << endmsg; } + if ( shellCorner4.y() <= 0 ) { msg(MSG::DEBUG) << "shellCorner4 is <= 0 (" << shellCorner4 << ")" << endmsg; } const GeoShape * sShell = makeModule(m_data->lengthOfBarrelVolume, shellCorner1,shellCorner2,shellCorner3,shellCorner4,shellPosition); @@ -728,7 +748,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Some shared stuff for all of the modules within a layer: // Make a Radiator - HepGeom::Transform3D radAbsolutePosition; + GeoTrf::Transform3D radAbsolutePosition(GeoTrf::Transform3D::Identity()); const GeoShape * sRad = makeModule(m_data->lengthOfBarrelVolume, shellCorner1,shellCorner2,shellCorner3,shellCorner4, radAbsolutePosition,m_data->barrelThicknessOfModuleWalls); @@ -752,9 +772,9 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Place the cooling tubes in the Radiator GeoTransform *xCool1 = new GeoTransform(shellPosition.inverse() - *HepGeom::Translate3D(m_data->barrelXOfCoolingTube[iABC][0],m_data->barrelYOfCoolingTube[iABC][0],0)); + *GeoTrf::Translate3D(m_data->barrelXOfCoolingTube[iABC][0],m_data->barrelYOfCoolingTube[iABC][0],0)); GeoTransform *xCool2 = new GeoTransform(shellPosition.inverse() - *HepGeom::Translate3D(m_data->barrelXOfCoolingTube[iABC][1],m_data->barrelYOfCoolingTube[iABC][1],0)); + *GeoTrf::Translate3D(m_data->barrelXOfCoolingTube[iABC][1],m_data->barrelYOfCoolingTube[iABC][1],0)); pRad->add(xCool1); pRad->add(pCoolingTube); @@ -787,8 +807,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) } // Generators: - HepGeom::TranslateX3D Xx(1.0); - HepGeom::TranslateY3D Xy(1.0); + GeoTrf::TranslateX3D Xx(1.0); + GeoTrf::TranslateY3D Xy(1.0); GENFUNCTION fx = ArrayFunction(&m_data->strawXPosition[iABC][0+nStrawsWithLargeDeadRegion], &m_data->strawXPosition[iABC][0]+m_data->barrelNumberOfStrawsInModule[iABC]); @@ -814,24 +834,26 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) //First get the global and local positions of the two alignment straws: //USE HEP2VECTORS!!! - CLHEP::Hep3Vector Align1Global(m_data->barrelXOfFirstGlobalAlignmentStraw[iABC], m_data->barrelYOfFirstGlobalAlignmentStraw[iABC], 0); - CLHEP::Hep3Vector Align2Global(m_data->barrelXOfSecondGlobalAlignmentStraw[iABC], m_data->barrelYOfSecondGlobalAlignmentStraw[iABC],0); - CLHEP::Hep3Vector Align1Local(m_data->strawXPosition[iABC][0],m_data->strawYPosition[iABC][0],0); - CLHEP::Hep3Vector Align2Local(m_data->strawXPosition[iABC][m_data->barrelIndexOfSecondGlobalAlignmentStraw[iABC]], - m_data->strawYPosition[iABC][m_data->barrelIndexOfSecondGlobalAlignmentStraw[iABC]],0); + GeoTrf::Vector3D Align1Global(m_data->barrelXOfFirstGlobalAlignmentStraw[iABC], m_data->barrelYOfFirstGlobalAlignmentStraw[iABC], 0); + GeoTrf::Vector3D Align2Global(m_data->barrelXOfSecondGlobalAlignmentStraw[iABC], m_data->barrelYOfSecondGlobalAlignmentStraw[iABC],0); + GeoTrf::Vector3D Align1Local(m_data->strawXPosition[iABC][0],m_data->strawYPosition[iABC][0],0); + GeoTrf::Vector3D Align2Local(m_data->strawXPosition[iABC][m_data->barrelIndexOfSecondGlobalAlignmentStraw[iABC]], + m_data->strawYPosition[iABC][m_data->barrelIndexOfSecondGlobalAlignmentStraw[iABC]],0); //We need to make first a translation which puts the first alignment straw into place: //And we need to make a rotation which puts the second one on its position: - CLHEP::Hep2Vector local12 = CLHEP::Hep2Vector( Align2Local - Align1Local ); - CLHEP::Hep2Vector global12 = CLHEP::Hep2Vector( Align2Global - Align1Global ); + GeoTrf::Vector2D local12((Align2Local - Align1Local).x(),(Align2Local - Align1Local).y()); + GeoTrf::Vector2D global12((Align2Global - Align1Global).x(),(Align2Global - Align1Global).y()); double zrotang = global12.phi()-local12.phi(); - //Here we combine these two into a HepGeom::Transform3D: + //Here we combine these two into a GeoTrf::Transform3D: + + GeoTrf::Transform3D absStrawXForm = GeoTrf::Translate3D(Align1Global.x(),Align1Global.y(),Align1Global.z()) + *GeoTrf::RotateZ3D( zrotang ) + *GeoTrf::Translate3D(-Align1Local.x(),-Align1Local.y(),-Align1Local.z()); - HepGeom::Transform3D absStrawXForm = HepGeom::Translate3D(Align1Global)*HepGeom::RotateZ3D( zrotang )*HepGeom::Translate3D((-Align1Local)); - // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -884,22 +906,22 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) if (m_doKrypton) pRadKR->add(serialTransformerKR); // Adds one straw from each layer (reformulate..) (should be done via m_data from database) - double oldx=-999*CLHEP::cm, oldz=-999*CLHEP::cm; + double oldx=-999*GeoModelKernelUnits::cm, oldz=-999*GeoModelKernelUnits::cm; unsigned int c=0; size_t iLayer=0; while (c< m_data->barrelNumberOfStrawsInModule[iABC] ) { - HepGeom::Point3D<double> p; + GeoTrf::Vector3D p(0,0,0); if (iABC==0) - p = tx2All(c)*HepGeom::Point3D<double>(0,0,0); + p = tx2All(c)*p; else - p = tx2(c)*HepGeom::Point3D<double>(0,0,0); + p = tx2(c)*p; double x = p.x(); double z = p.z(); //TK: use arrays!! update this... - if (sqrt((x-oldx)*(x-oldx)+ (z-oldz)*(z-oldz))> 5*CLHEP::cm) { + if (sqrt((x-oldx)*(x-oldx)+ (z-oldz)*(z-oldz))> 5*GeoModelKernelUnits::cm) { iLayer++; bDescriptor.push_back(new InDetDD::TRT_BarrelDescriptor()); bDescriptor.back()->setStrawTransformField(m_detectorManager->barrelTransformField(iABC),c); @@ -937,7 +959,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Now create m_data->nBarrelModulesUsed unique modules within each layer. pBarrelVol->add(new GeoSerialIdentifier(0)); for (size_t iMod = 0; iMod<m_data->nBarrelModulesUsed;iMod++) { - double delta = iMod*360*CLHEP::deg/m_data->nBarrelModules; + double delta = iMod*360*GeoModelKernelUnits::deg/m_data->nBarrelModules; @@ -945,8 +967,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) GeoFullPhysVol * pShell = new GeoFullPhysVol(lShell); // This is where the shell is pushed out to its place - //GeoTransform * xfx1 = new GeoTransform(HepGeom::RotateZ3D(delta)*shellPosition); - GeoAlignableTransform * xfx1 = new GeoAlignableTransform(HepGeom::RotateZ3D(delta)*shellPosition); + //GeoTransform * xfx1 = new GeoTransform(GeoTrf::RotateZ3D(delta)*shellPosition); + GeoAlignableTransform * xfx1 = new GeoAlignableTransform(GeoTrf::RotateZ3D(delta)*shellPosition); pBarrelVol->add(xfx1); pBarrelVol->add(pShell); @@ -1194,7 +1216,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) GeoLogVol* lWheelA = new GeoLogVol("WheelA", sWheelA, m_materialManager->getMaterial("trt::CO2")); // This is the straw pitch. - double deltaPhiForStrawsA = 360.*CLHEP::deg/m_data->endcapNumberOfStrawsInStrawLayer_AWheels; + double deltaPhiForStrawsA = 360.*GeoModelKernelUnits::deg/m_data->endcapNumberOfStrawsInStrawLayer_AWheels; // In reality the positive and negative endcaps are built identical, both in @@ -1257,7 +1279,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) if (iiPlane % 4 == 0) { // Register alignable node int barrel_ec = (iiSide) ? -2 : +2; - xfAlignableModule = new GeoAlignableTransform(HepGeom::Transform3D()); + xfAlignableModule = new GeoAlignableTransform(GeoTrf::Transform3D::Identity()); Identifier idSubModule = idHelper->layer_id(barrel_ec, 0, iiWheel, iiPlane); // We pass the parent volume as the local delta for this correction is the same as a local delta // on the transformation of the wheel. @@ -1305,7 +1327,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) } - xfPlane = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionA[iiPlane] - m_data->endCapLengthOfWheelsA/2)*HepGeom::RotateZ3D(phiPlane)); + xfPlane = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionA[iiPlane] - m_data->endCapLengthOfWheelsA/2)*GeoTrf::RotateZ3D(phiPlane)); if (xfAlignableModule) pWheelA->add(xfAlignableModule); pWheelA->add(xfPlane); @@ -1330,12 +1352,12 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // it then gets rotated 180 around y axis // phi -> pi - phi if (iiSide) { - startPhi = CLHEP::pi - (startPhi + pDescriptor->strawPitch() * (pDescriptor->nStraws() - 1)); + startPhi = GeoModelKernelUnits::pi - (startPhi + pDescriptor->strawPitch() * (pDescriptor->nStraws() - 1)); } // Make sure its between -pi and pi. - if (startPhi <= -CLHEP::pi) startPhi += 2*CLHEP::pi; - if (startPhi > CLHEP::pi) startPhi -= 2*CLHEP::pi; + if (startPhi <= -GeoModelKernelUnits::pi) startPhi += 2*GeoModelKernelUnits::pi; + if (startPhi > GeoModelKernelUnits::pi) startPhi -= 2*GeoModelKernelUnits::pi; pDescriptor->startPhi() = startPhi; @@ -1371,7 +1393,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) { if (counter % 4 == 1) { - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionA[counter-1] - m_data->endCapLengthOfWheelsA/2 + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionA[counter-1] - m_data->endCapLengthOfWheelsA/2 - m_data->outerRadiusOfStraw - m_data->endCapThinRadiatorThicknessA/2)); pWheelA->add(xfRadiator); pWheelA->add(pThinRadiatorA); @@ -1379,14 +1401,14 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) if (counter % 4 == 0) { - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionA[counter-1] - m_data->endCapLengthOfWheelsA/2 + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionA[counter-1] - m_data->endCapLengthOfWheelsA/2 + m_data->outerRadiusOfStraw + m_data->endCapThinRadiatorThicknessA/2)); pWheelA->add(xfRadiator); pWheelA->add(pThinRadiatorA); continue; } - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionA[counter-1] - m_data->endCapLengthOfWheelsA/2 + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionA[counter-1] - m_data->endCapLengthOfWheelsA/2 + m_data->outerRadiusOfStraw + m_data->endCapMainRadiatorThicknessA/2)); pWheelA->add(xfRadiator); pWheelA->add(pMainRadiatorA); @@ -1396,7 +1418,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) pWheelA->add(pOuterSupportA); // Place wheel in the Endcap Volume - GeoAlignableTransform * xfWheel = new GeoAlignableTransform( HepGeom::TranslateZ3D(WheelPlacerA) ); + GeoAlignableTransform * xfWheel = new GeoAlignableTransform( GeoTrf::TranslateZ3D(WheelPlacerA) ); pCommonEndcapAB[iiSide]->add(xfWheel); pCommonEndcapAB[iiSide]->add(new GeoIdentifierTag(iiWheel)); @@ -1441,10 +1463,10 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) if(iiWheel<=firstIndexOfB-1) { - xfFaradayFoilFront = new GeoTransform(HepGeom::TranslateZ3D(WheelPlacerA + xfFaradayFoilFront = new GeoTransform(GeoTrf::TranslateZ3D(WheelPlacerA - m_data->endCapLengthOfWheelsA/2 - m_data->endCapFaradayFoilThickness/2.0)); - xfFaradayFoilBack = new GeoTransform(HepGeom::TranslateZ3D(WheelPlacerA + xfFaradayFoilBack = new GeoTransform(GeoTrf::TranslateZ3D(WheelPlacerA + m_data->endCapLengthOfWheelsA/2 + m_data->endCapFaradayFoilThickness/2.0)); pCommonEndcapAB[iiSide]->add(xfFaradayFoilFront); @@ -1457,18 +1479,18 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Ditto for Inner/OuterSupportGapper if(iiWheel<firstIndexOfB-1) { - xfHeatExchanger = new GeoTransform(HepGeom::TranslateZ3D( WheelPlacerA + xfHeatExchanger = new GeoTransform(GeoTrf::TranslateZ3D( WheelPlacerA + m_data->endCapLengthOfWheelsA/2 + m_data->endCapFaradayFoilThickness + m_data->endCapHeatExchangerThicknessA/2)); pCommonEndcapAB[iiSide]->add(xfHeatExchanger); pCommonEndcapAB[iiSide]->add(pHeatExchangerA); - xfInnerSupportGapperA = new GeoTransform(HepGeom::TranslateZ3D( WheelPlacerA + xfInnerSupportGapperA = new GeoTransform(GeoTrf::TranslateZ3D( WheelPlacerA + m_data->endCapLengthOfWheelsA/2 + m_data->endCapFaradayFoilThickness + m_data->endCapHeatExchangerThicknessA/2)); - xfOuterSupportGapperA = new GeoTransform(HepGeom::TranslateZ3D( WheelPlacerA + xfOuterSupportGapperA = new GeoTransform(GeoTrf::TranslateZ3D( WheelPlacerA + m_data->endCapLengthOfWheelsA/2 + m_data->endCapFaradayFoilThickness + m_data->endCapHeatExchangerThicknessA/2)); @@ -1545,7 +1567,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) GeoLogVol* lWheelB = new GeoLogVol("WheelB", sWheelB, m_materialManager->getMaterial("trt::CO2")); // This is the straw pitch. - double deltaPhiForStrawsB = 360.*CLHEP::deg/m_data->endcapNumberOfStrawsInStrawLayer_BWheels; + double deltaPhiForStrawsB = 360.*GeoModelKernelUnits::deg/m_data->endcapNumberOfStrawsInStrawLayer_BWheels; for(iiSide=0; iiSide<nSides; iiSide++) { @@ -1573,7 +1595,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) if (iiPlane % 4 == 0) { // Register alignable node int barrel_ec = (iiSide) ? -2 : +2; - xfAlignableModule = new GeoAlignableTransform(HepGeom::Transform3D()); + xfAlignableModule = new GeoAlignableTransform(GeoTrf::Transform3D::Identity()); Identifier idSubModule = idHelper->layer_id(barrel_ec, 0, iiWheel, iiPlane); // We pass the parent volume as the local delta for this correction is the same as a local delta // on the transformation of the wheel. @@ -1622,8 +1644,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) phiPlane += deltaPhiForStrawsB; } - xfPlane = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionB[iiPlane] - - m_data->endCapLengthOfWheelsB/2)*HepGeom::RotateZ3D(phiPlane)); + xfPlane = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionB[iiPlane] + - m_data->endCapLengthOfWheelsB/2)*GeoTrf::RotateZ3D(phiPlane)); if (xfAlignableModule) pWheelB->add(xfAlignableModule); pWheelB->add(xfPlane); @@ -1656,7 +1678,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Main radiators if (counter % 4 != 0) { - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionB[counter-1] - m_data->endCapLengthOfWheelsB/2 + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionB[counter-1] - m_data->endCapLengthOfWheelsB/2 + m_data->outerRadiusOfStraw + m_data->endCapMainRadiatorThicknessB/2)); pWheelB->add(xfRadiator); pWheelB->add(pMainRadiatorB); @@ -1666,7 +1688,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) if (counter == 1 || counter == 8) { sign = counter == 1? -1 : 1; - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionB[counter-1] - m_data->endCapLengthOfWheelsB/2 + sign*(m_data->outerRadiusOfStraw + m_data->endCapThinRadiatorThicknessB/2))); + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionB[counter-1] - m_data->endCapLengthOfWheelsB/2 + sign*(m_data->outerRadiusOfStraw + m_data->endCapThinRadiatorThicknessB/2))); pWheelB->add(xfRadiator); pWheelB->add(pThinRadiatorB); } @@ -1675,7 +1697,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) if (counter == 4 || counter == 5) { sign = counter == 4 ? 1 : -1; - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionB[counter-1] - m_data->endCapLengthOfWheelsB/2 + sign*(m_data->outerRadiusOfStraw + m_data->endCapMiddleRadiatorThicknessB/2))); + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionB[counter-1] - m_data->endCapLengthOfWheelsB/2 + sign*(m_data->outerRadiusOfStraw + m_data->endCapMiddleRadiatorThicknessB/2))); pWheelB->add(xfRadiator); pWheelB->add(pMiddleRadiatorB); } @@ -1686,7 +1708,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) pWheelB->add(pOuterSupportB); // Place wheel in the Endcap Volume - GeoAlignableTransform * xfWheel = new GeoAlignableTransform(HepGeom::TranslateZ3D( WheelPlacerB )); + GeoAlignableTransform * xfWheel = new GeoAlignableTransform(GeoTrf::TranslateZ3D( WheelPlacerB )); pCommonEndcapAB[iiSide]->add(xfWheel); @@ -1736,10 +1758,10 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Place kapton foils on a wheel just like a sandwitch if(iiWheel-firstIndexOfB<firstIndexOfC-firstIndexOfB) { - xfFaradayFoilFront = new GeoTransform(HepGeom::TranslateZ3D(WheelPlacerB + xfFaradayFoilFront = new GeoTransform(GeoTrf::TranslateZ3D(WheelPlacerB - m_data->endCapLengthOfWheelsB/2 - m_data->endCapFaradayFoilThickness/2.0)); - xfFaradayFoilBack = new GeoTransform(HepGeom::TranslateZ3D(WheelPlacerB + xfFaradayFoilBack = new GeoTransform(GeoTrf::TranslateZ3D(WheelPlacerB + m_data->endCapLengthOfWheelsB/2 + m_data->endCapFaradayFoilThickness/2.0)); @@ -1753,19 +1775,19 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Ditto for Inner/OuterSupportGapper if(iiWheel-firstIndexOfB<firstIndexOfC-firstIndexOfB-1) { - xfHeatExchanger = new GeoTransform(HepGeom::TranslateZ3D( WheelPlacerB + xfHeatExchanger = new GeoTransform(GeoTrf::TranslateZ3D( WheelPlacerB + m_data->endCapLengthOfWheelsB/2 + m_data->endCapFaradayFoilThickness + m_data->endCapHeatExchangerThicknessB/2)); pCommonEndcapAB[iiSide]->add(xfHeatExchanger); pCommonEndcapAB[iiSide]->add(pHeatExchangerB); - xfInnerSupportGapperB = new GeoTransform(HepGeom::TranslateZ3D(WheelPlacerB + xfInnerSupportGapperB = new GeoTransform(GeoTrf::TranslateZ3D(WheelPlacerB + m_data->endCapLengthOfWheelsB/2 + m_data->endCapFaradayFoilThickness + m_data->endCapHeatExchangerThicknessB/2)); - xfOuterSupportGapperB = new GeoTransform(HepGeom::TranslateZ3D(WheelPlacerB + xfOuterSupportGapperB = new GeoTransform(GeoTrf::TranslateZ3D(WheelPlacerB + m_data->endCapLengthOfWheelsB/2 + m_data->endCapFaradayFoilThickness + m_data->endCapHeatExchangerThicknessB/2)); @@ -1801,10 +1823,10 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) GeoLogVol* lMbrane = new GeoLogVol("Membrane", sMbrane, m_materialManager->getMaterial("trt::EndCapMbrane")); GeoPhysVol* pMbrane = new GeoPhysVol(lMbrane); - GeoTransform *xfMbraneWheelA1 = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapZMinOfMbraneWheelA1 + m_data->endCapThicknessOfMbrane/2.0)); - GeoTransform *xfMbraneWheelA2 = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapZMinOfMbraneWheelA2 + m_data->endCapThicknessOfMbrane/2.0)); - GeoTransform *xfMbraneWheelB1 = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapZMinOfMbraneWheelB1 + m_data->endCapThicknessOfMbrane/2.0)); - GeoTransform *xfMbraneWheelB2 = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapZMinOfMbraneWheelB2 + m_data->endCapThicknessOfMbrane/2.0)); + GeoTransform *xfMbraneWheelA1 = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapZMinOfMbraneWheelA1 + m_data->endCapThicknessOfMbrane/2.0)); + GeoTransform *xfMbraneWheelA2 = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapZMinOfMbraneWheelA2 + m_data->endCapThicknessOfMbrane/2.0)); + GeoTransform *xfMbraneWheelB1 = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapZMinOfMbraneWheelB1 + m_data->endCapThicknessOfMbrane/2.0)); + GeoTransform *xfMbraneWheelB2 = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapZMinOfMbraneWheelB2 + m_data->endCapThicknessOfMbrane/2.0)); for(iiSide=0; iiSide<nSides; iiSide++) { pCommonEndcapAB[iiSide]->add(xfMbraneWheelA1); @@ -1856,7 +1878,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) GeoLogVol* lWheelC = new GeoLogVol("WheelC", sWheelC, m_materialManager->getMaterial("trt::CO2")); // This is the straw pitch. - double deltaPhiForStrawsC = 360.*CLHEP::deg/m_data->endcapNumberOfStrawsInStrawLayer_CWheels; + double deltaPhiForStrawsC = 360.*GeoModelKernelUnits::deg/m_data->endcapNumberOfStrawsInStrawLayer_CWheels; for(iiSide=0; iiSide<nSides; iiSide++) { // Wheel C @@ -1879,8 +1901,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) childPlane = pStrawPlaneC->clone(); - xfPlane = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionC[iiPlane] - - m_data->endCapLengthOfWheelsC/2)*HepGeom::RotateZ3D(phiPlane)); + xfPlane = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionC[iiPlane] + - m_data->endCapLengthOfWheelsC/2)*GeoTrf::RotateZ3D(phiPlane)); pWheelC->add(xfPlane); pWheelC->add(new GeoIdentifierTag(iiPlane)); pWheelC->add(childPlane); @@ -1901,12 +1923,12 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // For negative endcap the startPhi is the last straw in the physical sector, it then gets // rotated 180 around y axis (phi -> pi - phi) if (iiSide) { - startPhi = CLHEP::pi - (startPhi + pDescriptor->strawPitch() * (pDescriptor->nStraws() - 1)); + startPhi = GeoModelKernelUnits::pi - (startPhi + pDescriptor->strawPitch() * (pDescriptor->nStraws() - 1)); } // Make sure its between -pi and pi. - if (startPhi <= -CLHEP::pi) startPhi += 2*CLHEP::pi; - if (startPhi > CLHEP::pi) startPhi -= 2*CLHEP::pi; + if (startPhi <= -GeoModelKernelUnits::pi) startPhi += 2*GeoModelKernelUnits::pi; + if (startPhi > GeoModelKernelUnits::pi) startPhi -= 2*GeoModelKernelUnits::pi; pDescriptor->startPhi() = startPhi; @@ -1945,7 +1967,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) { if (counter % 4 == 1) { - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionC[counter-1] - m_data->endCapLengthOfWheelsC/2 + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionC[counter-1] - m_data->endCapLengthOfWheelsC/2 - m_data->lengthOfDeadRegion - m_data->endCapThinRadiatorThicknessC/2)); pWheelC->add(xfRadiator); pWheelC->add(pThinRadiatorC); @@ -1953,14 +1975,14 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) if (counter % 4 == 0) { - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionC[counter-1] - m_data->endCapLengthOfWheelsC/2 + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionC[counter-1] - m_data->endCapLengthOfWheelsC/2 + m_data->outerRadiusOfStraw + m_data->endCapThinRadiatorThicknessC/2)); pWheelC->add(xfRadiator); pWheelC->add(pThinRadiatorC); continue; } - xfRadiator = new GeoTransform(HepGeom::TranslateZ3D(m_data->endCapLayerZPositionC[counter-1] - m_data->endCapLengthOfWheelsC/2 + xfRadiator = new GeoTransform(GeoTrf::TranslateZ3D(m_data->endCapLayerZPositionC[counter-1] - m_data->endCapLengthOfWheelsC/2 + m_data->outerRadiusOfStraw + m_data->endCapMainRadiatorThicknessC/2)); pWheelC->add(xfRadiator); pWheelC->add(pMainRadiatorC); @@ -1972,7 +1994,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) // Place wheel in the Endcap Volume GeoAlignableTransform * xfWheel - = new GeoAlignableTransform(HepGeom::TranslateZ3D(m_data->endCapPositionOfFirstWheelC + = new GeoAlignableTransform(GeoTrf::TranslateZ3D(m_data->endCapPositionOfFirstWheelC + (iiWheel - firstIndexOfC)*m_data->endCapDistanceBetweenWheelCentersC)); pCommonEndcapC[iiSide]->add(xfWheel); @@ -2028,8 +2050,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world) /////////////////////////////////// makeModule /////////////////////////////////// // -const GeoShape * TRTDetectorFactory_Full::makeModule ( double length, CLHEP::Hep2Vector corner1, CLHEP::Hep2Vector corner2, - CLHEP::Hep2Vector corner3, CLHEP::Hep2Vector corner4, HepGeom::Transform3D & modulePosition, double shrinkDist/*=0*/) const { +const GeoShape * TRTDetectorFactory_Full::makeModule ( double length, GeoTrf::Vector2D corner1, GeoTrf::Vector2D corner2, + GeoTrf::Vector2D corner3, GeoTrf::Vector2D corner4, GeoTrf::Transform3D & modulePosition, double shrinkDist/*=0*/) const { // This method takes the absolute coordinates of the four corners, @@ -2046,25 +2068,25 @@ const GeoShape * TRTDetectorFactory_Full::makeModule ( double length, CLHEP::Hep // First we calculate the relative vectors of the edges: - CLHEP::Hep2Vector delta12 = corner1 - corner2; CLHEP::Hep2Vector delta23 = corner2 - corner3; - CLHEP::Hep2Vector delta34 = corner3 - corner4; CLHEP::Hep2Vector delta14 = corner1 - corner4; + GeoTrf::Vector2D delta12 = corner1 - corner2; GeoTrf::Vector2D delta23 = corner2 - corner3; + GeoTrf::Vector2D delta34 = corner3 - corner4; GeoTrf::Vector2D delta14 = corner1 - corner4; // We also need the diagonals. - CLHEP::Hep2Vector delta24 = corner2 - corner4; - CLHEP::Hep2Vector delta13 = corner1 - corner3; + GeoTrf::Vector2D delta24 = corner2 - corner4; + GeoTrf::Vector2D delta13 = corner1 - corner3; // Then we find out which way the module bends (NB: .angle returns the UNSIGNED angle!). - double openingAngleOfFirstCorner= delta12.angle(delta14); - int sign = ( openingAngleOfFirstCorner < 90*CLHEP::deg ? 1 : -1); + double openingAngleOfFirstCorner= angle(delta12,delta14); + int sign = ( openingAngleOfFirstCorner < 90*GeoModelKernelUnits::deg ? 1 : -1); // If our approximation with triangles were correct, three of the // lengths (of edges and diagonals) would be equal. We force this // instead. // // (Whether the involved diagonal is 2-4 or 1-3 depends on the sign). - double commonSide = (delta14.mag() + delta23.mag() + (sign==1?delta24.mag():delta13.mag()) ) / 3.; - double base1 = delta12.mag(); // Inner base - double base2 = delta34.mag(); // Outer base + double commonSide = (magn(delta14) + magn(delta23) + (sign==1?magn(delta24):magn(delta13)) ) / 3.; + double base1 = magn(delta12); // Inner base + double base2 = magn(delta34); // Outer base if (shrinkDist!=0) { // Since the moving corners bit above doesnt work, we do this instead: @@ -2077,13 +2099,13 @@ const GeoShape * TRTDetectorFactory_Full::makeModule ( double length, CLHEP::Hep double height1 = sqrt (commonSide*commonSide-0.25*base1*base1); double height2 = sqrt (commonSide*commonSide-0.25*base2*base2); double rot = atan(base2/height2/2)-atan(base1/height1/2); - double epsilon = 1*CLHEP::micrometer; // needed to ensure perfect overlaps. + double epsilon = 1*GeoModelKernelUnits::micrometer; // needed to ensure perfect overlaps. GeoTrd *trd1 = new GeoTrd(base1/2+epsilon, epsilon, length/2, length/2, height1/2); GeoTrd *trd2 = new GeoTrd(epsilon, base2/2+epsilon, length/2, length/2, height2/2); double gamma = atan((base2/2+epsilon)*2/height2); double r = sqrt((base2/2+epsilon)*(base2/2+epsilon) + height2*height2/4); - HepGeom::Transform3D xForm=HepGeom::Translate3D(r*sin(sign*(gamma-rot)),0,height1/2-r*cos(gamma-rot))*HepGeom::RotateY3D(sign*rot); + GeoTrf::Transform3D xForm=GeoTrf::Translate3D(r*sin(sign*(gamma-rot)),0,height1/2-r*cos(gamma-rot))*GeoTrf::RotateY3D(sign*rot); const GeoShape & sShell = (*trd1).add((*trd2)<<xForm); // We now have the shape we want. We only have left to transform @@ -2091,52 +2113,52 @@ const GeoShape * TRTDetectorFactory_Full::makeModule ( double length, CLHEP::Hep // // First, the actual positions of the four corners of // the constructed shape. - CLHEP::Hep2Vector actualCorner1, actualCorner2, actualCorner3, actualCorner4; + GeoTrf::Vector2D actualCorner1, actualCorner2, actualCorner3, actualCorner4; actualCorner1 = corner1; - actualCorner2 = corner1 + CLHEP::Hep2Vector(0,base1); + actualCorner2 = corner1 + GeoTrf::Vector2D(0,base1); if (sign==1) { - actualCorner4 = corner1 + CLHEP::Hep2Vector(height1,base1/2); - actualCorner3 = actualCorner4 + CLHEP::Hep2Vector(-base2*sin(rot),base2*cos(rot)); + actualCorner4 = corner1 + GeoTrf::Vector2D(height1,base1/2); + actualCorner3 = actualCorner4 + GeoTrf::Vector2D(-base2*sin(rot),base2*cos(rot)); } else { - actualCorner3 = corner1 + CLHEP::Hep2Vector(height1,base1/2); - actualCorner4 = actualCorner3 + CLHEP::Hep2Vector(-base2*sin(rot),-base2*cos(rot)); + actualCorner3 = corner1 + GeoTrf::Vector2D(height1,base1/2); + actualCorner4 = actualCorner3 + GeoTrf::Vector2D(-base2*sin(rot),-base2*cos(rot)); } // The center of our shape is at - CLHEP::Hep2Vector center= corner1 + CLHEP::Hep2Vector(height1/2,base1/2); + GeoTrf::Vector2D center= corner1 + GeoTrf::Vector2D(height1/2,base1/2); // Let us turn the whole module - double modRot = (-delta12).phi()-CLHEP::Hep2Vector(0,1).phi(); + double modRot = (-delta12).phi()-GeoTrf::Vector2D(0,1).phi(); - // std::cout << "TK: modRot : "<< modRot/CLHEP::degree<<" degrees"<<std::endl; - actualCorner1.rotate(modRot); - actualCorner2.rotate(modRot); - actualCorner3.rotate(modRot); - actualCorner4.rotate(modRot); - center.rotate(modRot); + // std::cout << "TK: modRot : "<< modRot/GeoModelKernelUnits::degree<<" degrees"<<std::endl; + rotate(modRot,actualCorner1); + rotate(modRot,actualCorner2); + rotate(modRot,actualCorner3); + rotate(modRot,actualCorner4); + rotate(modRot,center); // Finally, the shape is moved where it fits best with the original corner coordinates. - CLHEP::Hep2Vector displacement = 0.25*( (corner1+corner2+corner3+corner4) - (actualCorner1+actualCorner2+actualCorner3+actualCorner4) ); - // .. << ::DEBUG << std::cout << "TK: makeModule : moving a total of (micrometer) " << displacement.mag()/CLHEP::micrometer<< std::endl; - // std::cout << "TK: makeModule : moving due to 1 (micrometer) " << 0.25*(corner1-actualCorner1).mag()/CLHEP::micrometer<< std::endl; - // std::cout << "TK: makeModule : moving due to 2 (micrometer) " << 0.25*(corner2-actualCorner2).mag()/CLHEP::micrometer<< std::endl; - // std::cout << "TK: makeModule : moving due to 3 (micrometer) " << 0.25*(corner3-actualCorner3).mag()/CLHEP::micrometer<< std::endl; - // std::cout << "TK: makeModule : moving due to 4 (micrometer) " << 0.25*(corner4-actualCorner4).mag()/CLHEP::micrometer<< std::endl; + GeoTrf::Vector2D displacement = 0.25*( (corner1+corner2+corner3+corner4) - (actualCorner1+actualCorner2+actualCorner3+actualCorner4) ); + // .. << ::DEBUG << std::cout << "TK: makeModule : moving a total of (micrometer) " << displacement.mag()/GeoModelKernelUnits::micrometer<< std::endl; + // std::cout << "TK: makeModule : moving due to 1 (micrometer) " << 0.25*(corner1-actualCorner1).mag()/GeoModelKernelUnits::micrometer<< std::endl; + // std::cout << "TK: makeModule : moving due to 2 (micrometer) " << 0.25*(corner2-actualCorner2).mag()/GeoModelKernelUnits::micrometer<< std::endl; + // std::cout << "TK: makeModule : moving due to 3 (micrometer) " << 0.25*(corner3-actualCorner3).mag()/GeoModelKernelUnits::micrometer<< std::endl; + // std::cout << "TK: makeModule : moving due to 4 (micrometer) " << 0.25*(corner4-actualCorner4).mag()/GeoModelKernelUnits::micrometer<< std::endl; center += displacement; actualCorner1 += displacement; actualCorner2 += displacement; actualCorner3 += displacement; actualCorner4 += displacement; - CLHEP::Hep2Vector remainingOffset = -0.25*( (corner1+corner2+corner3+corner4) - (actualCorner1+actualCorner2+actualCorner3+actualCorner4) ); - // std::cout << "TK: makeModule : remaining total offset (should be zero) (micrometer) " << remainingOffset.mag()/CLHEP::micrometer<< std::endl; - // std::cout << "TK: makeModule : 1 remaining offset (micrometer) " << (corner1-actualCorner1).mag()/CLHEP::micrometer<< std::endl; - // std::cout << "TK: makeModule : 2 remaining offset (micrometer) " << (corner2-actualCorner2).mag()/CLHEP::micrometer<< std::endl; - // std::cout << "TK: makeModule : 3 remaining offset (micrometer) " << (corner3-actualCorner3).mag()/CLHEP::micrometer<< std::endl; - // std::cout << "TK: makeModule : 4 remaining offset (micrometer) " << (corner4-actualCorner4).mag()/CLHEP::micrometer<< std::endl; + // GeoTrf::Vector2D remainingOffset = -0.25*( (corner1+corner2+corner3+corner4) - (actualCorner1+actualCorner2+actualCorner3+actualCorner4) ); + // std::cout << "TK: makeModule : remaining total offset (should be zero) (micrometer) " << remainingOffset.mag()/GeoModelKernelUnits::micrometer<< std::endl; + // std::cout << "TK: makeModule : 1 remaining offset (micrometer) " << (corner1-actualCorner1).mag()/GeoModelKernelUnits::micrometer<< std::endl; + // std::cout << "TK: makeModule : 2 remaining offset (micrometer) " << (corner2-actualCorner2).mag()/GeoModelKernelUnits::micrometer<< std::endl; + // std::cout << "TK: makeModule : 3 remaining offset (micrometer) " << (corner3-actualCorner3).mag()/GeoModelKernelUnits::micrometer<< std::endl; + // std::cout << "TK: makeModule : 4 remaining offset (micrometer) " << (corner4-actualCorner4).mag()/GeoModelKernelUnits::micrometer<< std::endl; // The final positioning includes a few 90deg rotations because the axis's in the GeoTrd's are different from the actual axis's. - modulePosition = HepGeom::TranslateY3D(center.y())*HepGeom::TranslateX3D(center.x())*HepGeom::RotateZ3D(90.0*CLHEP::deg)*HepGeom::RotateX3D(90.0*CLHEP::deg)*HepGeom::RotateY3D(modRot); + modulePosition = GeoTrf::TranslateY3D(center.y())*GeoTrf::TranslateX3D(center.x())*GeoTrf::RotateZ3D(90.0*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(90.0*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(modRot); return &sShell; } @@ -2212,9 +2234,9 @@ GeoPhysVol * TRTDetectorFactory_Full::makeStraw( double& activeGasZPosition, boo else lGasMA = new GeoLogVol("GasMA", sGasMA, m_materialManager->getMaterial((m_useOldActiveGasMixture ? "trt:XeCO2CF4" : "trt::XeCO2O2"))); GeoNameTag *nGasMAPos = new GeoNameTag("GasMAPos"); - GeoTransform *xGasMAPos = new GeoTransform(HepGeom::RotateY3D(M_PI)*HepGeom::TranslateZ3D(-posA));//the rotation of pi is to... digitization (TK) + GeoTransform *xGasMAPos = new GeoTransform(GeoTrf::RotateY3D(M_PI)*GeoTrf::TranslateZ3D(-posA));//the rotation of pi is to... digitization (TK) GeoNameTag *nGasMANeg = new GeoNameTag("GasMANeg"); - GeoTransform *xGasMANeg = new GeoTransform(HepGeom::TranslateZ3D(-posA)); + GeoTransform *xGasMANeg = new GeoTransform(GeoTrf::TranslateZ3D(-posA)); GeoPhysVol *pGasMA = new GeoPhysVol(lGasMA); // Assemble gas within straws @@ -2229,8 +2251,8 @@ GeoPhysVol * TRTDetectorFactory_Full::makeStraw( double& activeGasZPosition, boo // Outer Dead region for mixed straws, part II: GeoSerialDenominator *nDeadMA = new GeoSerialDenominator("DeadRegionL"); - GeoTransform *xDeadPosMA = new GeoTransform(HepGeom::TranslateZ3D(+(m_data->barrelLengthOfStraw-m_data->lengthOfDeadRegion)/2.0)); - GeoTransform *xDeadNegMA = new GeoTransform(HepGeom::TranslateZ3D(-(m_data->barrelLengthOfStraw-m_data->lengthOfDeadRegion)/2.0)); + GeoTransform *xDeadPosMA = new GeoTransform(GeoTrf::TranslateZ3D(+(m_data->barrelLengthOfStraw-m_data->lengthOfDeadRegion)/2.0)); + GeoTransform *xDeadNegMA = new GeoTransform(GeoTrf::TranslateZ3D(-(m_data->barrelLengthOfStraw-m_data->lengthOfDeadRegion)/2.0)); // Assemble dead regions within straws: pStrawMixed->add(nDeadMA); @@ -2241,8 +2263,8 @@ GeoPhysVol * TRTDetectorFactory_Full::makeStraw( double& activeGasZPosition, boo // InnerDeadRegions, part III: GeoSerialDenominator *nInnerDeadMA = new GeoSerialDenominator("InnerDeadRegionL"); - GeoTransform *xInnerDeadPosMA = new GeoTransform(HepGeom::TranslateZ3D(+posInnerDeadRegion)); - GeoTransform *xInnerDeadNegMA = new GeoTransform(HepGeom::TranslateZ3D(-posInnerDeadRegion)); + GeoTransform *xInnerDeadPosMA = new GeoTransform(GeoTrf::TranslateZ3D(+posInnerDeadRegion)); + GeoTransform *xInnerDeadNegMA = new GeoTransform(GeoTrf::TranslateZ3D(-posInnerDeadRegion)); // add to mixedStraw: pStrawMixed->add(nInnerDeadMA); pStrawMixed->add(xInnerDeadPosMA); @@ -2341,13 +2363,13 @@ GeoFullPhysVol * TRTDetectorFactory_Full::makeStrawPlane(size_t w, ActiveGasMixt // Positioning of straws : double dphi = 2*M_PI/ nstraws; - HepGeom::RotateZ3D Rz(1.0);// Radians! - HepGeom::TranslateX3D Tx(1.0);// MM! TK: actually this doesnt need to be interpreted as mm? Just as a dimensionless 1. (i guess) - HepGeom::TranslateY3D Ty(1.0);// MM! + GeoTrf::RotateZ3D Rz(1.0);// Radians! + GeoTrf::TranslateX3D Tx(1.0);// MM! TK: actually this doesnt need to be interpreted as mm? Just as a dimensionless 1. (i guess) + GeoTrf::TranslateY3D Ty(1.0);// MM! Variable i; Sin sin; Cos cos; - TRANSFUNCTION tx = Pow(Tx,pos*cos(dphi*i))*Pow(Ty,pos*sin(dphi*i))*Pow(Rz,dphi*i)*HepGeom::RotateY3D(-90*CLHEP::deg); + TRANSFUNCTION tx = Pow(Tx,pos*cos(dphi*i))*Pow(Ty,pos*sin(dphi*i))*Pow(Rz,dphi*i)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *serialTransformer=new GeoSerialTransformer(pStraw, &tx, nstraws); pStrawPlane->add(new GeoSerialIdentifier(0)); pStrawPlane->add(serialTransformer); @@ -2385,8 +2407,8 @@ GeoFullPhysVol * TRTDetectorFactory_Full::makeStrawPlane(size_t w, ActiveGasMixt lDeadRegion = new GeoLogVol("DeadRegion",sDeadRegion,m_materialManager->getMaterial((m_useOldActiveGasMixture ? "trt::XeCO2CF4" : "trt::XeCO2O2"))); GeoPhysVol *pDeadRegion = new GeoPhysVol(lDeadRegion); - GeoTransform *xDeadPos = new GeoTransform(HepGeom::TranslateZ3D(+(Length/2-ldead/2))); - GeoTransform *xDeadNeg = new GeoTransform(HepGeom::TranslateZ3D(-(Length/2-ldead/2))); + GeoTransform *xDeadPos = new GeoTransform(GeoTrf::TranslateZ3D(+(Length/2-ldead/2))); + GeoTransform *xDeadNeg = new GeoTransform(GeoTrf::TranslateZ3D(-(Length/2-ldead/2))); pStraw->add(xDeadPos); pStraw->add(pDeadRegion); pStraw->add(xDeadNeg); diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h index dfc5d5326a4..3eca85be3c0 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h @@ -19,14 +19,13 @@ #include "TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h" //for Argon #include "GaudiKernel/ServiceHandle.h" - -#include "CLHEP/Vector/TwoVector.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <string> class GeoPhysVol; class GeoFullPhysVol; -//class CLHEP::Hep2Vector; class TRTParameterInterface; class InDetMaterialManager; @@ -84,8 +83,8 @@ class TRTDetectorFactory_Full : public InDetDD::DetectorFactoryBase { ActiveGasMixture DecideGasMixture(int strawStatusHT); // private helper methods: - const GeoShape * makeModule ( double length, CLHEP::Hep2Vector corner1 , CLHEP::Hep2Vector corner2, CLHEP::Hep2Vector corner3, - CLHEP::Hep2Vector corner4, HepGeom::Transform3D & absolutePosition, double shrinkDist=0 ) const; + const GeoShape * makeModule ( double length, GeoTrf::Vector2D corner1 , GeoTrf::Vector2D corner2, GeoTrf::Vector2D corner3, + GeoTrf::Vector2D corner4, GeoTrf::Transform3D & absolutePosition, double shrinkDist=0 ) const; //GeoPhysVol * makeStraw( double& activeGasZPosition, bool hasLargeDeadRegion=false ) const; GeoPhysVol * makeStraw( double& activeGasZPosition, bool hasLargeDeadRegion=false, ActiveGasMixture gasMixture = GM_XENON) const; //GeoFullPhysVol *makeStrawPlane( size_t w ) const; diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTParameterInterface.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTParameterInterface.h index 1f7d20eb3cb..b5e2e20eea3 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTParameterInterface.h +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTParameterInterface.h @@ -5,7 +5,8 @@ #ifndef TRT_GEOMODEL_TRTPARAMETERINTERFACE_H #define TRT_GEOMODEL_TRTPARAMETERINTERFACE_H -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" #include <string> namespace InDetDD { @@ -30,7 +31,7 @@ public: /////////////////////////////////////////////////////////// // Top Level Placements // /////////////////////////////////////////////////////////// - virtual const HepGeom::Transform3D & partTransform(const std::string & partName) const = 0; + virtual const GeoTrf::Transform3D & partTransform(const std::string & partName) const = 0; virtual bool partPresent(const std::string & partName) const = 0; /////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx index e45c8552f5a..1111e90d1ec 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx @@ -3,7 +3,7 @@ */ #include "TRT_DetDescrDB_ParameterInterface.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include "GeoModelInterfaces/IGeoDbTagSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -140,10 +140,10 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { IRDBRecordset_ptr RDB_CommonPars = iAccessSvc->getRecordsetPtr("TRTCommonPars",detectorKey,detectorNode); const IRDBRecord* RDBVars_CommonPars = (*RDB_CommonPars)[0]; - lengthOfDeadRegion = RDBVars_CommonPars->getFloat("LENGTHOFDEADREGION")*CLHEP::mm; - outerRadiusOfWire = RDBVars_CommonPars->getFloat("OUTERRADIUSOFWIRE")*CLHEP::mm; - innerRadiusOfStraw = RDBVars_CommonPars->getFloat("INNERRADIUSOFSTRAW")*CLHEP::mm; - outerRadiusOfStraw = RDBVars_CommonPars->getFloat("OUTERRADIUSOFSTRAW")*CLHEP::mm; + lengthOfDeadRegion = RDBVars_CommonPars->getFloat("LENGTHOFDEADREGION")*GeoModelKernelUnits::mm; + outerRadiusOfWire = RDBVars_CommonPars->getFloat("OUTERRADIUSOFWIRE")*GeoModelKernelUnits::mm; + innerRadiusOfStraw = RDBVars_CommonPars->getFloat("INNERRADIUSOFSTRAW")*GeoModelKernelUnits::mm; + outerRadiusOfStraw = RDBVars_CommonPars->getFloat("OUTERRADIUSOFSTRAW")*GeoModelKernelUnits::mm; ///////////////////////////////////////////////////////////////////////////////////////// // Variables related to the Barrel part // @@ -161,15 +161,15 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { if (includeBarServiceAndFlange) { const IRDBRecord* RDBVars_BarrelServices = (*RDB_BarrelServices)[0]; - barFlangeZMin = RDBVars_BarrelServices->getDouble("BARFLANGEZMIN")*CLHEP::mm; - barFlangeZMax = RDBVars_BarrelServices->getDouble("BARFLANGEZMAX")*CLHEP::mm; - barFlangeRMin = RDBVars_BarrelServices->getDouble("BARFLANGERMIN")*CLHEP::mm; - barFlangeRMax = RDBVars_BarrelServices->getDouble("BARFLANGERMAX")*CLHEP::mm; + barFlangeZMin = RDBVars_BarrelServices->getDouble("BARFLANGEZMIN")*GeoModelKernelUnits::mm; + barFlangeZMax = RDBVars_BarrelServices->getDouble("BARFLANGEZMAX")*GeoModelKernelUnits::mm; + barFlangeRMin = RDBVars_BarrelServices->getDouble("BARFLANGERMIN")*GeoModelKernelUnits::mm; + barFlangeRMax = RDBVars_BarrelServices->getDouble("BARFLANGERMAX")*GeoModelKernelUnits::mm; - barServicesZMin = RDBVars_BarrelServices->getDouble("BARSERVICESZMIN")*CLHEP::mm; - barServicesZMax = RDBVars_BarrelServices->getDouble("BARSERVICESZMAX")*CLHEP::mm; - barServicesRMin = RDBVars_BarrelServices->getDouble("BARSERVICESRMIN")*CLHEP::mm; - barServicesRMax = RDBVars_BarrelServices->getDouble("BARSERVICESRMAX")*CLHEP::mm; + barServicesZMin = RDBVars_BarrelServices->getDouble("BARSERVICESZMIN")*GeoModelKernelUnits::mm; + barServicesZMax = RDBVars_BarrelServices->getDouble("BARSERVICESZMAX")*GeoModelKernelUnits::mm; + barServicesRMin = RDBVars_BarrelServices->getDouble("BARSERVICESRMIN")*GeoModelKernelUnits::mm; + barServicesRMax = RDBVars_BarrelServices->getDouble("BARSERVICESRMAX")*GeoModelKernelUnits::mm; } else if (!includeBarServiceAndFlange) { @@ -185,25 +185,25 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { } if (!RDBVars_BarrelOverallPars->isFieldNull("BRLVIRTVOLZCLEARANCE")) { - barrelVirtualVolumeZClearance = RDBVars_BarrelOverallPars->getFloat("BRLVIRTVOLZCLEARANCE")*CLHEP::mm; - barrelVirtualVolumeRMinClearance = RDBVars_BarrelOverallPars->getFloat("BRLVIRTVOLRMINCLEAR")*CLHEP::mm; - barrelVirtualVolumeRMaxClearance = RDBVars_BarrelOverallPars->getFloat("BRLVIRTVOLRMAXCLEAR")*CLHEP::mm; + barrelVirtualVolumeZClearance = RDBVars_BarrelOverallPars->getFloat("BRLVIRTVOLZCLEARANCE")*GeoModelKernelUnits::mm; + barrelVirtualVolumeRMinClearance = RDBVars_BarrelOverallPars->getFloat("BRLVIRTVOLRMINCLEAR")*GeoModelKernelUnits::mm; + barrelVirtualVolumeRMaxClearance = RDBVars_BarrelOverallPars->getFloat("BRLVIRTVOLRMAXCLEAR")*GeoModelKernelUnits::mm; } else { - barrelVirtualVolumeZClearance = 0.001*CLHEP::micrometer;//fixme: use epsilon(?). - barrelVirtualVolumeRMinClearance = 0.001*CLHEP::micrometer; - barrelVirtualVolumeRMaxClearance = 0.001*CLHEP::micrometer; + barrelVirtualVolumeZClearance = 0.001*GeoModelKernelUnits::micrometer;//fixme: use epsilon(?). + barrelVirtualVolumeRMinClearance = 0.001*GeoModelKernelUnits::micrometer; + barrelVirtualVolumeRMaxClearance = 0.001*GeoModelKernelUnits::micrometer; } - innerRadiusOfBarrelVolume = RDBVars_BarrelOverallPars->getFloat("INNRADIUSOFBARRELVOL")*CLHEP::mm; - outerRadiusOfBarrelVolume = RDBVars_BarrelOverallPars->getFloat("OUTRADIUSOFBARRELVOL")*CLHEP::mm; - lengthOfBarrelVolume = RDBVars_BarrelOverallPars->getFloat("LENGTHOFBARRELVOLUME")*CLHEP::mm; - barrelOuterRadiusOfCoolingTube = RDBVars_BarrelOverallPars->getFloat("OUTRADIUSOFCOOLTUBE")*CLHEP::mm; - barrelInnerRadiusOfCoolingTube = RDBVars_BarrelOverallPars->getFloat("INNRADIUSOFCOOLTUBE")*CLHEP::mm; - barrelThicknessOfModuleWalls = RDBVars_BarrelOverallPars->getFloat("THICKOFMODULEWALLS")*CLHEP::mm; + innerRadiusOfBarrelVolume = RDBVars_BarrelOverallPars->getFloat("INNRADIUSOFBARRELVOL")*GeoModelKernelUnits::mm; + outerRadiusOfBarrelVolume = RDBVars_BarrelOverallPars->getFloat("OUTRADIUSOFBARRELVOL")*GeoModelKernelUnits::mm; + lengthOfBarrelVolume = RDBVars_BarrelOverallPars->getFloat("LENGTHOFBARRELVOLUME")*GeoModelKernelUnits::mm; + barrelOuterRadiusOfCoolingTube = RDBVars_BarrelOverallPars->getFloat("OUTRADIUSOFCOOLTUBE")*GeoModelKernelUnits::mm; + barrelInnerRadiusOfCoolingTube = RDBVars_BarrelOverallPars->getFloat("INNRADIUSOFCOOLTUBE")*GeoModelKernelUnits::mm; + barrelThicknessOfModuleWalls = RDBVars_BarrelOverallPars->getFloat("THICKOFMODULEWALLS")*GeoModelKernelUnits::mm; barrelNumberOfLayersWithLargeDeadRegion = RDBVars_BarrelOverallPars->getInt("NLAYWTHLRGDEADREGION"); - thicknessOfBarrelInnerSupport = RDBVars_BarrelOverallPars->getFloat("THICKOFBRLINNSUPPORT")*CLHEP::mm; - thicknessOfBarrelOuterSupport = RDBVars_BarrelOverallPars->getFloat("THICKOFBRLOUTSUPPORT")*CLHEP::mm; - barrelOuterRadiusOfStrawHole = RDBVars_BarrelOverallPars->getFloat("OUTRADIUSOFSTRAWHOLE")*CLHEP::mm; + thicknessOfBarrelInnerSupport = RDBVars_BarrelOverallPars->getFloat("THICKOFBRLINNSUPPORT")*GeoModelKernelUnits::mm; + thicknessOfBarrelOuterSupport = RDBVars_BarrelOverallPars->getFloat("THICKOFBRLOUTSUPPORT")*GeoModelKernelUnits::mm; + barrelOuterRadiusOfStrawHole = RDBVars_BarrelOverallPars->getFloat("OUTRADIUSOFSTRAWHOLE")*GeoModelKernelUnits::mm; virtualBarrelVolumeLength = std::max(std::max(barFlangeZMax,barServicesZMax),lengthOfBarrelVolume/2) + barrelVirtualVolumeZClearance; @@ -219,9 +219,9 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { nBarrelModulesUsed = nBarrelModules; //Hardwired to be all modules. Silly variable anyway. nBarrelPhi = RDBVars_BarrelOverallPars->getInt("NBARRELPHI"); - barrelLengthOfStraw = RDBVars_BarrelOverallPars->getFloat("LENGTHOFSTRAW")*CLHEP::mm; - barrelLengthOfTwister = RDBVars_BarrelOverallPars->getFloat("LENGTHOFTWISTER")*CLHEP::mm; - barrelLengthOfLargeDeadRegion = RDBVars_BarrelOverallPars->getFloat("LENLARGEDEADREGION")*CLHEP::mm; + barrelLengthOfStraw = RDBVars_BarrelOverallPars->getFloat("LENGTHOFSTRAW")*GeoModelKernelUnits::mm; + barrelLengthOfTwister = RDBVars_BarrelOverallPars->getFloat("LENGTHOFTWISTER")*GeoModelKernelUnits::mm; + barrelLengthOfLargeDeadRegion = RDBVars_BarrelOverallPars->getFloat("LENLARGEDEADREGION")*GeoModelKernelUnits::mm; barrelNumberOfStrawLayersInModule = new unsigned int[nBarrelRings]; for (unsigned int i=0; i<nBarrelRings; i++) { @@ -261,32 +261,32 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { for (unsigned int iRing = 0; iRing < nBarrelRings; iRing++) { const IRDBRecord* row = (*RDB_BarrelRingDepPars)[iRing]; - barrelXOfFirstGlobalAlignmentStraw[iRing] = row->getFloat("XOFGLOBALALIGNSTRW1")*CLHEP::mm; - barrelYOfFirstGlobalAlignmentStraw[iRing] = row->getFloat("YOFGLOBALALIGNSTRW1")*CLHEP::mm; - barrelXOfSecondGlobalAlignmentStraw[iRing] = row->getFloat("XOFGLOBALALIGNSTRW2")*CLHEP::mm; - barrelYOfSecondGlobalAlignmentStraw[iRing] = row->getFloat("YOFGLOBALALIGNSTRW2")*CLHEP::mm; + barrelXOfFirstGlobalAlignmentStraw[iRing] = row->getFloat("XOFGLOBALALIGNSTRW1")*GeoModelKernelUnits::mm; + barrelYOfFirstGlobalAlignmentStraw[iRing] = row->getFloat("YOFGLOBALALIGNSTRW1")*GeoModelKernelUnits::mm; + barrelXOfSecondGlobalAlignmentStraw[iRing] = row->getFloat("XOFGLOBALALIGNSTRW2")*GeoModelKernelUnits::mm; + barrelYOfSecondGlobalAlignmentStraw[iRing] = row->getFloat("YOFGLOBALALIGNSTRW2")*GeoModelKernelUnits::mm; barrelIndexOfSecondGlobalAlignmentStraw[iRing] = row->getInt("INDEX2NDGLBALGNSTRW"); barrelNumberOfStrawsInModule[iRing] = row->getInt("NSTRAWSINMODULE"); barrelXOfCoolingTube[iRing] = new double[nCoolingTubes]; - barrelXOfCoolingTube[iRing][0] = row->getFloat("XOFCOOLINGTUBE1")*CLHEP::mm; - barrelXOfCoolingTube[iRing][1] = row->getFloat("XOFCOOLINGTUBE2")*CLHEP::mm; + barrelXOfCoolingTube[iRing][0] = row->getFloat("XOFCOOLINGTUBE1")*GeoModelKernelUnits::mm; + barrelXOfCoolingTube[iRing][1] = row->getFloat("XOFCOOLINGTUBE2")*GeoModelKernelUnits::mm; barrelYOfCoolingTube[iRing] = new double[nCoolingTubes]; - barrelYOfCoolingTube[iRing][0] = row->getFloat("YOFCOOLINGTUBE1")*CLHEP::mm; - barrelYOfCoolingTube[iRing][1] = row->getFloat("YOFCOOLINGTUBE2")*CLHEP::mm; + barrelYOfCoolingTube[iRing][0] = row->getFloat("YOFCOOLINGTUBE1")*GeoModelKernelUnits::mm; + barrelYOfCoolingTube[iRing][1] = row->getFloat("YOFCOOLINGTUBE2")*GeoModelKernelUnits::mm; shellCornerXPosition[iRing] = new double[nShellCorners]; - shellCornerXPosition[iRing][0] = row->getFloat("SHELLCORNERXPOS1")*CLHEP::mm; - shellCornerXPosition[iRing][1] = row->getFloat("SHELLCORNERXPOS2")*CLHEP::mm; - shellCornerXPosition[iRing][2] = row->getFloat("SHELLCORNERXPOS3")*CLHEP::mm; - shellCornerXPosition[iRing][3] = row->getFloat("SHELLCORNERXPOS4")*CLHEP::mm; + shellCornerXPosition[iRing][0] = row->getFloat("SHELLCORNERXPOS1")*GeoModelKernelUnits::mm; + shellCornerXPosition[iRing][1] = row->getFloat("SHELLCORNERXPOS2")*GeoModelKernelUnits::mm; + shellCornerXPosition[iRing][2] = row->getFloat("SHELLCORNERXPOS3")*GeoModelKernelUnits::mm; + shellCornerXPosition[iRing][3] = row->getFloat("SHELLCORNERXPOS4")*GeoModelKernelUnits::mm; shellCornerYPosition[iRing] = new double[nShellCorners]; - shellCornerYPosition[iRing][0] = row->getFloat("SHELLCORNERYPOS1")*CLHEP::mm; - shellCornerYPosition[iRing][1] = row->getFloat("SHELLCORNERYPOS2")*CLHEP::mm; - shellCornerYPosition[iRing][2] = row->getFloat("SHELLCORNERYPOS3")*CLHEP::mm; - shellCornerYPosition[iRing][3] = row->getFloat("SHELLCORNERYPOS4")*CLHEP::mm; + shellCornerYPosition[iRing][0] = row->getFloat("SHELLCORNERYPOS1")*GeoModelKernelUnits::mm; + shellCornerYPosition[iRing][1] = row->getFloat("SHELLCORNERYPOS2")*GeoModelKernelUnits::mm; + shellCornerYPosition[iRing][2] = row->getFloat("SHELLCORNERYPOS3")*GeoModelKernelUnits::mm; + shellCornerYPosition[iRing][3] = row->getFloat("SHELLCORNERYPOS4")*GeoModelKernelUnits::mm; }; @@ -296,8 +296,8 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { strawYPosition[i] = new double[ barrelNumberOfStrawsInModule[i] ]; for (unsigned int j = 0; j < barrelNumberOfStrawsInModule[i]; j++) { const IRDBRecord* row = (*RDB_BarrelStrawCoord)[cumulativeStrawNumber++]; - strawXPosition[i][j]=row->getFloat("STRAWXPOSITION")*CLHEP::mm; - strawYPosition[i][j]=row->getFloat("STRAWYPOSITION")*CLHEP::mm; + strawXPosition[i][j]=row->getFloat("STRAWXPOSITION")*GeoModelKernelUnits::mm; + strawYPosition[i][j]=row->getFloat("STRAWYPOSITION")*GeoModelKernelUnits::mm; }; }; @@ -318,67 +318,67 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { IRDBRecordset_ptr RDB_ECWheelDepPars = iAccessSvc->getRecordsetPtr("TRTECWheelDepPars",detectorKey,detectorNode); IRDBRecordset_ptr RDB_ECEndCapDepPars = iAccessSvc->getRecordsetPtr("TRTECEndCapDepPars",detectorKey,detectorNode); - innerRadiusOfEndCapVolumeAB = RDBVars_EndCapOverallPars->getFloat("INNERRADIUSOFECVOLAB")*CLHEP::mm; - outerRadiusOfEndCapVolumeAB = RDBVars_EndCapOverallPars->getFloat("OUTERRADIUSOFECVOLAB")*CLHEP::mm; - innerRadiusOfEndCapVolumeC = RDBVars_EndCapOverallPars->getFloat("INNERRADIUSOFECVOLC")*CLHEP::mm; - outerRadiusOfEndCapVolumeC = RDBVars_EndCapOverallPars->getFloat("OUTERRADIUSOFECVOLC")*CLHEP::mm; - lengthOfEndCapVolumeAB = RDBVars_EndCapOverallPars->getFloat("LENGTHOFENDCAPVOLAB")*CLHEP::mm; - positionOfEndCapVolumeAB = RDBVars_EndCapOverallPars->getFloat("POSFORENDCAPVOLAB")*CLHEP::mm; - lengthOfEndCapVolumeC = RDBVars_EndCapOverallPars->getFloat("LENGTHOFENDCAPVOLC")*CLHEP::mm; - positionOfEndCapVolumeC = RDBVars_EndCapOverallPars->getFloat("POSITIONOFENDCAPVOLC")*CLHEP::mm;//rename!!! + innerRadiusOfEndCapVolumeAB = RDBVars_EndCapOverallPars->getFloat("INNERRADIUSOFECVOLAB")*GeoModelKernelUnits::mm; + outerRadiusOfEndCapVolumeAB = RDBVars_EndCapOverallPars->getFloat("OUTERRADIUSOFECVOLAB")*GeoModelKernelUnits::mm; + innerRadiusOfEndCapVolumeC = RDBVars_EndCapOverallPars->getFloat("INNERRADIUSOFECVOLC")*GeoModelKernelUnits::mm; + outerRadiusOfEndCapVolumeC = RDBVars_EndCapOverallPars->getFloat("OUTERRADIUSOFECVOLC")*GeoModelKernelUnits::mm; + lengthOfEndCapVolumeAB = RDBVars_EndCapOverallPars->getFloat("LENGTHOFENDCAPVOLAB")*GeoModelKernelUnits::mm; + positionOfEndCapVolumeAB = RDBVars_EndCapOverallPars->getFloat("POSFORENDCAPVOLAB")*GeoModelKernelUnits::mm; + lengthOfEndCapVolumeC = RDBVars_EndCapOverallPars->getFloat("LENGTHOFENDCAPVOLC")*GeoModelKernelUnits::mm; + positionOfEndCapVolumeC = RDBVars_EndCapOverallPars->getFloat("POSITIONOFENDCAPVOLC")*GeoModelKernelUnits::mm;//rename!!! if ( RDBVars_A_Wheel->getFloat("OUTERRADIUSOFINNERSUP") != RDBVars_B_Wheel->getFloat("OUTERRADIUSOFINNERSUP") ) msg(MSG::WARNING) << "DD Database indicates different outer radii of inner support for A and B wheels." << " The code assumes otherwise. Using value of A wheel for both!" << endmsg; if ( RDBVars_A_Wheel->getFloat("INNERRADIUSOFOUTERSUP") != RDBVars_B_Wheel->getFloat("INNERRADIUSOFOUTERSUP") ) msg(MSG::WARNING) << "DD Database indicates different inner radii of outer support for A and B wheels." << " The code assumes otherwise. Using value of A wheel for both!" << endmsg; - endcapOuterRadiusOfInnerSupport_wheelAB = RDBVars_A_Wheel->getFloat("OUTERRADIUSOFINNERSUP")*CLHEP::mm; - endcapInnerRadiusOfOuterSupport_wheelAB = RDBVars_A_Wheel->getFloat("INNERRADIUSOFOUTERSUP")*CLHEP::mm; - endcapOuterRadiusOfInnerSupport_wheelC = RDBVars_C_Wheel->getFloat("OUTERRADIUSOFINNERSUP")*CLHEP::mm; - endcapInnerRadiusOfOuterSupport_wheelC = RDBVars_C_Wheel->getFloat("INNERRADIUSOFOUTERSUP")*CLHEP::mm; + endcapOuterRadiusOfInnerSupport_wheelAB = RDBVars_A_Wheel->getFloat("OUTERRADIUSOFINNERSUP")*GeoModelKernelUnits::mm; + endcapInnerRadiusOfOuterSupport_wheelAB = RDBVars_A_Wheel->getFloat("INNERRADIUSOFOUTERSUP")*GeoModelKernelUnits::mm; + endcapOuterRadiusOfInnerSupport_wheelC = RDBVars_C_Wheel->getFloat("OUTERRADIUSOFINNERSUP")*GeoModelKernelUnits::mm; + endcapInnerRadiusOfOuterSupport_wheelC = RDBVars_C_Wheel->getFloat("INNERRADIUSOFOUTERSUP")*GeoModelKernelUnits::mm; - endCapShiftForEachRotation = RDBVars_EndCapOverallPars->getFloat("SHIFTFOREACHROTATION")*CLHEP::radian; + endCapShiftForEachRotation = RDBVars_EndCapOverallPars->getFloat("SHIFTFOREACHROTATION")*GeoModelKernelUnits::radian; endCapPhiOfFirstStraw = 0; // Temporary - endCapInnerRadiusOfSupportA = RDBVars_A_Wheel->getFloat("INNERRADIUSOFSUPPORT")*CLHEP::mm; - endCapInnerRadiusOfSupportB = RDBVars_B_Wheel->getFloat("INNERRADIUSOFSUPPORT")*CLHEP::mm; - endCapInnerRadiusOfSupportC = RDBVars_C_Wheel->getFloat("INNERRADIUSOFSUPPORT")*CLHEP::mm; + endCapInnerRadiusOfSupportA = RDBVars_A_Wheel->getFloat("INNERRADIUSOFSUPPORT")*GeoModelKernelUnits::mm; + endCapInnerRadiusOfSupportB = RDBVars_B_Wheel->getFloat("INNERRADIUSOFSUPPORT")*GeoModelKernelUnits::mm; + endCapInnerRadiusOfSupportC = RDBVars_C_Wheel->getFloat("INNERRADIUSOFSUPPORT")*GeoModelKernelUnits::mm; - endCapOuterRadiusOfSupportA = RDBVars_A_Wheel->getFloat("OUTERRADIUSOFSUPPORT")*CLHEP::mm; - endCapOuterRadiusOfSupportB = RDBVars_B_Wheel->getFloat("OUTERRADIUSOFSUPPORT")*CLHEP::mm; - endCapOuterRadiusOfSupportC = RDBVars_C_Wheel->getFloat("OUTERRADIUSOFSUPPORT")*CLHEP::mm; + endCapOuterRadiusOfSupportA = RDBVars_A_Wheel->getFloat("OUTERRADIUSOFSUPPORT")*GeoModelKernelUnits::mm; + endCapOuterRadiusOfSupportB = RDBVars_B_Wheel->getFloat("OUTERRADIUSOFSUPPORT")*GeoModelKernelUnits::mm; + endCapOuterRadiusOfSupportC = RDBVars_C_Wheel->getFloat("OUTERRADIUSOFSUPPORT")*GeoModelKernelUnits::mm; - endCapRadialThicknessOfInnerSupportA = RDBVars_A_Wheel->getFloat("RADIALTHICKOFINNERSUP")*CLHEP::mm; - endCapRadialThicknessOfInnerSupportB = RDBVars_B_Wheel->getFloat("RADIALTHICKOFINNERSUP")*CLHEP::mm; - endCapRadialThicknessOfInnerSupportC = RDBVars_C_Wheel->getFloat("RADIALTHICKOFINNERSUP")*CLHEP::mm; + endCapRadialThicknessOfInnerSupportA = RDBVars_A_Wheel->getFloat("RADIALTHICKOFINNERSUP")*GeoModelKernelUnits::mm; + endCapRadialThicknessOfInnerSupportB = RDBVars_B_Wheel->getFloat("RADIALTHICKOFINNERSUP")*GeoModelKernelUnits::mm; + endCapRadialThicknessOfInnerSupportC = RDBVars_C_Wheel->getFloat("RADIALTHICKOFINNERSUP")*GeoModelKernelUnits::mm; - endCapRadialThicknessOfOuterSupportA = RDBVars_A_Wheel->getFloat("RADIALTHICKOFOUTERSUP")*CLHEP::mm; - endCapRadialThicknessOfOuterSupportB = RDBVars_B_Wheel->getFloat("RADIALTHICKOFOUTERSUP")*CLHEP::mm; - endCapRadialThicknessOfOuterSupportC = RDBVars_C_Wheel->getFloat("RADIALTHICKOFOUTERSUP")*CLHEP::mm; + endCapRadialThicknessOfOuterSupportA = RDBVars_A_Wheel->getFloat("RADIALTHICKOFOUTERSUP")*GeoModelKernelUnits::mm; + endCapRadialThicknessOfOuterSupportB = RDBVars_B_Wheel->getFloat("RADIALTHICKOFOUTERSUP")*GeoModelKernelUnits::mm; + endCapRadialThicknessOfOuterSupportC = RDBVars_C_Wheel->getFloat("RADIALTHICKOFOUTERSUP")*GeoModelKernelUnits::mm; - endCapRadialDistFromRadToOuterSupportA = RDBVars_A_Wheel->getFloat("RADIALDISTRADTOOUTERSUP")*CLHEP::mm; - endCapRadialDistFromRadToOuterSupportB = RDBVars_B_Wheel->getFloat("RADIALDISTRADTOOUTERSUP")*CLHEP::mm; - endCapRadialDistFromRadToOuterSupportC = RDBVars_C_Wheel->getFloat("RADIALDISTRADTOOUTERSUP")*CLHEP::mm; + endCapRadialDistFromRadToOuterSupportA = RDBVars_A_Wheel->getFloat("RADIALDISTRADTOOUTERSUP")*GeoModelKernelUnits::mm; + endCapRadialDistFromRadToOuterSupportB = RDBVars_B_Wheel->getFloat("RADIALDISTRADTOOUTERSUP")*GeoModelKernelUnits::mm; + endCapRadialDistFromRadToOuterSupportC = RDBVars_C_Wheel->getFloat("RADIALDISTRADTOOUTERSUP")*GeoModelKernelUnits::mm; - endCapMainRadiatorThicknessA = RDBVars_A_Wheel->getFloat("MAINRADIATORTHICK")*CLHEP::mm; - endCapMainRadiatorThicknessB = RDBVars_B_Wheel->getFloat("MAINRADIATORTHICK")*CLHEP::mm; - endCapMainRadiatorThicknessC = RDBVars_C_Wheel->getFloat("MAINRADIATORTHICK")*CLHEP::mm; + endCapMainRadiatorThicknessA = RDBVars_A_Wheel->getFloat("MAINRADIATORTHICK")*GeoModelKernelUnits::mm; + endCapMainRadiatorThicknessB = RDBVars_B_Wheel->getFloat("MAINRADIATORTHICK")*GeoModelKernelUnits::mm; + endCapMainRadiatorThicknessC = RDBVars_C_Wheel->getFloat("MAINRADIATORTHICK")*GeoModelKernelUnits::mm; - endCapThinRadiatorThicknessA = RDBVars_A_Wheel->getFloat("THINRADIATORTHICK")*CLHEP::mm; - endCapThinRadiatorThicknessB = RDBVars_B_Wheel->getFloat("THINRADIATORTHICK")*CLHEP::mm; - endCapThinRadiatorThicknessC = RDBVars_C_Wheel->getFloat("THINRADIATORTHICK")*CLHEP::mm; + endCapThinRadiatorThicknessA = RDBVars_A_Wheel->getFloat("THINRADIATORTHICK")*GeoModelKernelUnits::mm; + endCapThinRadiatorThicknessB = RDBVars_B_Wheel->getFloat("THINRADIATORTHICK")*GeoModelKernelUnits::mm; + endCapThinRadiatorThicknessC = RDBVars_C_Wheel->getFloat("THINRADIATORTHICK")*GeoModelKernelUnits::mm; - endCapMiddleRadiatorThicknessB = RDBVars_B_Wheel->getFloat("MIDDLERADIATORTHICK")*CLHEP::mm; - if ( RDBVars_A_Wheel->getFloat("MIDDLERADIATORTHICK")*CLHEP::mm != 0 ) + endCapMiddleRadiatorThicknessB = RDBVars_B_Wheel->getFloat("MIDDLERADIATORTHICK")*GeoModelKernelUnits::mm; + if ( RDBVars_A_Wheel->getFloat("MIDDLERADIATORTHICK")*GeoModelKernelUnits::mm != 0 ) msg(MSG::WARNING) << "DD Database indicates a nonzero middle radiator thickness in the A wheel" << " where middle radiators doesn't exist. Ignoring parameter." << endmsg; - if ( RDBVars_C_Wheel->getFloat("MIDDLERADIATORTHICK")*CLHEP::mm != 0 ) + if ( RDBVars_C_Wheel->getFloat("MIDDLERADIATORTHICK")*GeoModelKernelUnits::mm != 0 ) msg(MSG::WARNING) << "DD Database indicates a nonzero middle radiator thickness in the C wheel" << " where middle radiators doesn't exist. Ignoring parameter." << endmsg; - endCapLengthOfWheelsA = RDBVars_A_Wheel->getFloat("LENGTHOFWHEELS")*CLHEP::mm; - endCapLengthOfWheelsB = RDBVars_B_Wheel->getFloat("LENGTHOFWHEELS")*CLHEP::mm; + endCapLengthOfWheelsA = RDBVars_A_Wheel->getFloat("LENGTHOFWHEELS")*GeoModelKernelUnits::mm; + endCapLengthOfWheelsB = RDBVars_B_Wheel->getFloat("LENGTHOFWHEELS")*GeoModelKernelUnits::mm; - endCapLengthOfWheelsC = RDBVars_C_Wheel->getFloat("LENGTHOFWHEELS")*CLHEP::mm; + endCapLengthOfWheelsC = RDBVars_C_Wheel->getFloat("LENGTHOFWHEELS")*GeoModelKernelUnits::mm; endCapNumberOfStrawLayersPerWheelA = RDBVars_A_Wheel->getInt("NSTRAWLAYERSPERWHEEL"); endCapNumberOfStrawLayersPerWheelB = RDBVars_B_Wheel->getInt("NSTRAWLAYERSPERWHEEL"); @@ -404,43 +404,43 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { - endCapPositionOfFirstWheelA[0] = RDBECEndCapDepPars_EndCap_A->getDouble("ZPOSOFFIRSTAWHEEL")*CLHEP::mm; - endCapPositionOfFirstWheelA[1] = RDBECEndCapDepPars_EndCap_C->getDouble("ZPOSOFFIRSTAWHEEL")*CLHEP::mm; - endCapPositionOfFirstWheelB[0] = RDBECEndCapDepPars_EndCap_A->getDouble("ZPOSOFFIRSTBWHEEL")*CLHEP::mm; - endCapPositionOfFirstWheelB[1] = RDBECEndCapDepPars_EndCap_C->getDouble("ZPOSOFFIRSTBWHEEL")*CLHEP::mm; + endCapPositionOfFirstWheelA[0] = RDBECEndCapDepPars_EndCap_A->getDouble("ZPOSOFFIRSTAWHEEL")*GeoModelKernelUnits::mm; + endCapPositionOfFirstWheelA[1] = RDBECEndCapDepPars_EndCap_C->getDouble("ZPOSOFFIRSTAWHEEL")*GeoModelKernelUnits::mm; + endCapPositionOfFirstWheelB[0] = RDBECEndCapDepPars_EndCap_A->getDouble("ZPOSOFFIRSTBWHEEL")*GeoModelKernelUnits::mm; + endCapPositionOfFirstWheelB[1] = RDBECEndCapDepPars_EndCap_C->getDouble("ZPOSOFFIRSTBWHEEL")*GeoModelKernelUnits::mm; for (unsigned int iiWheel = 0; iiWheel < endcapNumberOfAWheels; iiWheel++) { const IRDBRecord* row = (*RDB_ECWheelDepPars)[iiWheel]; - endCapDistanceBetweenWheelCentersA[0][iiWheel]=row->getDouble("DISTBETWWHEELCENTECC")*CLHEP::mm; - endCapDistanceBetweenWheelCentersA[1][iiWheel]=row->getDouble("DISTBETWWHEELCENTECA")*CLHEP::mm; + endCapDistanceBetweenWheelCentersA[0][iiWheel]=row->getDouble("DISTBETWWHEELCENTECC")*GeoModelKernelUnits::mm; + endCapDistanceBetweenWheelCentersA[1][iiWheel]=row->getDouble("DISTBETWWHEELCENTECA")*GeoModelKernelUnits::mm; }; for (unsigned int iiWheel = endcapNumberOfAWheels; iiWheel < (endcapNumberOfAWheels+endcapNumberOfBWheels); iiWheel++) { const IRDBRecord* row = (*RDB_ECWheelDepPars)[iiWheel]; - endCapDistanceBetweenWheelCentersB[0][iiWheel]=row->getDouble("DISTBETWWHEELCENTECC")*CLHEP::mm; - endCapDistanceBetweenWheelCentersB[1][iiWheel]=row->getDouble("DISTBETWWHEELCENTECA")*CLHEP::mm; + endCapDistanceBetweenWheelCentersB[0][iiWheel]=row->getDouble("DISTBETWWHEELCENTECC")*GeoModelKernelUnits::mm; + endCapDistanceBetweenWheelCentersB[1][iiWheel]=row->getDouble("DISTBETWWHEELCENTECA")*GeoModelKernelUnits::mm; }; } else { - endCapPositionOfFirstWheelA[0] = RDBVars_A_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*CLHEP::mm; - endCapPositionOfFirstWheelA[1] = RDBVars_A_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*CLHEP::mm; - endCapPositionOfFirstWheelB[0] = RDBVars_B_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*CLHEP::mm; - endCapPositionOfFirstWheelB[1] = RDBVars_B_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*CLHEP::mm; + endCapPositionOfFirstWheelA[0] = RDBVars_A_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*GeoModelKernelUnits::mm; + endCapPositionOfFirstWheelA[1] = RDBVars_A_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*GeoModelKernelUnits::mm; + endCapPositionOfFirstWheelB[0] = RDBVars_B_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*GeoModelKernelUnits::mm; + endCapPositionOfFirstWheelB[1] = RDBVars_B_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*GeoModelKernelUnits::mm; endCapDistanceBetweenWheelCentersA[0][0]=0.; endCapDistanceBetweenWheelCentersA[1][0]=0.; endCapDistanceBetweenWheelCentersB[0][endcapNumberOfAWheels]=0.; endCapDistanceBetweenWheelCentersB[1][endcapNumberOfAWheels]=0.; for (unsigned int iiWheel = 1; iiWheel < endcapNumberOfAWheels; iiWheel++) { - endCapDistanceBetweenWheelCentersA[0][iiWheel]=RDBVars_A_Wheel->getFloat("DISTBETWWHEELCENTERS")*CLHEP::mm; - endCapDistanceBetweenWheelCentersA[1][iiWheel]=RDBVars_A_Wheel->getFloat("DISTBETWWHEELCENTERS")*CLHEP::mm; + endCapDistanceBetweenWheelCentersA[0][iiWheel]=RDBVars_A_Wheel->getFloat("DISTBETWWHEELCENTERS")*GeoModelKernelUnits::mm; + endCapDistanceBetweenWheelCentersA[1][iiWheel]=RDBVars_A_Wheel->getFloat("DISTBETWWHEELCENTERS")*GeoModelKernelUnits::mm; }; for (unsigned int iiWheel = (endcapNumberOfAWheels+1); iiWheel < (endcapNumberOfAWheels+endcapNumberOfBWheels); iiWheel++) { - endCapDistanceBetweenWheelCentersB[0][iiWheel]=RDBVars_B_Wheel->getFloat("DISTBETWWHEELCENTERS")*CLHEP::mm; - endCapDistanceBetweenWheelCentersB[1][iiWheel]=RDBVars_B_Wheel->getFloat("DISTBETWWHEELCENTERS")*CLHEP::mm; + endCapDistanceBetweenWheelCentersB[0][iiWheel]=RDBVars_B_Wheel->getFloat("DISTBETWWHEELCENTERS")*GeoModelKernelUnits::mm; + endCapDistanceBetweenWheelCentersB[1][iiWheel]=RDBVars_B_Wheel->getFloat("DISTBETWWHEELCENTERS")*GeoModelKernelUnits::mm; }; }; - endCapDistanceBetweenWheelCentersC = RDBVars_C_Wheel->getFloat("DISTBETWWHEELCENTERS")*CLHEP::mm; - endCapPositionOfFirstWheelC = RDBVars_C_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*CLHEP::mm; + endCapDistanceBetweenWheelCentersC = RDBVars_C_Wheel->getFloat("DISTBETWWHEELCENTERS")*GeoModelKernelUnits::mm; + endCapPositionOfFirstWheelC = RDBVars_C_Wheel->getFloat("POSITIONOFFIRSTWHEEL")*GeoModelKernelUnits::mm; endCapLayerZPositionA = new double[endCapNumberOfStrawLayersPerWheelA]; @@ -449,15 +449,15 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { for (unsigned int iiPlane = 0; iiPlane < endCapNumberOfStrawLayersPerWheelA; iiPlane++) { const IRDBRecord* row = (*RDB_EndCapStrwLayZPos)[iiPlane]; - endCapLayerZPositionA[iiPlane] = row->getFloat("LAYERZPOSAWHEELS")*CLHEP::mm; + endCapLayerZPositionA[iiPlane] = row->getFloat("LAYERZPOSAWHEELS")*GeoModelKernelUnits::mm; }; for (unsigned int iiPlane = 0; iiPlane < endCapNumberOfStrawLayersPerWheelB; iiPlane++) { const IRDBRecord* row = (*RDB_EndCapStrwLayZPos)[iiPlane]; - endCapLayerZPositionB[iiPlane] = row->getFloat("LAYERZPOSBWHEELS")*CLHEP::mm; + endCapLayerZPositionB[iiPlane] = row->getFloat("LAYERZPOSBWHEELS")*GeoModelKernelUnits::mm; }; for (unsigned int iiPlane = 0; iiPlane < endCapNumberOfStrawLayersPerWheelC; iiPlane++) { const IRDBRecord* row = (*RDB_EndCapStrwLayZPos)[iiPlane]; - endCapLayerZPositionC[iiPlane] = row->getFloat("LAYERZPOSCWHEELS")*CLHEP::mm; + endCapLayerZPositionC[iiPlane] = row->getFloat("LAYERZPOSCWHEELS")*GeoModelKernelUnits::mm; }; @@ -467,27 +467,27 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() { const IRDBRecord* RDBVars_ECHeatExchAndFoil = (*RDB_ECHeatExchAndFoil)[0]; // Faraday foils kapton - endCapFaradayFoilThickness = RDBVars_ECHeatExchAndFoil->getDouble("ECFARADAYFOILTHICK")*CLHEP::mm; + endCapFaradayFoilThickness = RDBVars_ECHeatExchAndFoil->getDouble("ECFARADAYFOILTHICK")*GeoModelKernelUnits::mm; // Heat Exchanger - endCapRMinOfHeatExchanger = RDBVars_ECHeatExchAndFoil->getDouble("ECHEATEXCHANGERRMIN")*CLHEP::mm; - endCapRMaxOfHeatExchanger = RDBVars_ECHeatExchAndFoil->getDouble("ECHEATEXCHANGERRMAX")*CLHEP::mm; - endCapHeatExchangerThicknessA = RDBVars_ECHeatExchAndFoil->getDouble("ECHEATEXCHTHICKNESSA")*CLHEP::mm; - endCapHeatExchangerThicknessB = RDBVars_ECHeatExchAndFoil->getDouble("ECHEATEXCHTHICKNESSB")*CLHEP::mm; + endCapRMinOfHeatExchanger = RDBVars_ECHeatExchAndFoil->getDouble("ECHEATEXCHANGERRMIN")*GeoModelKernelUnits::mm; + endCapRMaxOfHeatExchanger = RDBVars_ECHeatExchAndFoil->getDouble("ECHEATEXCHANGERRMAX")*GeoModelKernelUnits::mm; + endCapHeatExchangerThicknessA = RDBVars_ECHeatExchAndFoil->getDouble("ECHEATEXCHTHICKNESSA")*GeoModelKernelUnits::mm; + endCapHeatExchangerThicknessB = RDBVars_ECHeatExchAndFoil->getDouble("ECHEATEXCHTHICKNESSB")*GeoModelKernelUnits::mm; // Membranes const IRDBRecord* RDBVars_ECMembranePars = (*RDB_ECMembranePars)[0]; - endCapRMinOfMbrane = RDBVars_ECMembranePars->getDouble("RMINOFENDCAPMBRANE")*CLHEP::mm; - endCapRMaxOfMbrane = RDBVars_ECMembranePars->getDouble("RMAXOFENDCAPMBRANE")*CLHEP::mm; - endCapZMinOfMbraneWheelA1 = RDBVars_ECMembranePars->getDouble("ZMINPOSMBRANEWHEELA1")*CLHEP::mm; - endCapZMaxOfMbraneWheelA1 = RDBVars_ECMembranePars->getDouble("ZMAXPOSMBRANEWHEELA1")*CLHEP::mm; - endCapZMinOfMbraneWheelA2 = RDBVars_ECMembranePars->getDouble("ZMINPOSMBRANEWHEELA2")*CLHEP::mm; - endCapZMaxOfMbraneWheelA2 = RDBVars_ECMembranePars->getDouble("ZMAXPOSMBRANEWHEELA2")*CLHEP::mm; - endCapZMinOfMbraneWheelB1 = RDBVars_ECMembranePars->getDouble("ZMINPOSMBRANEWHEELB1")*CLHEP::mm; - endCapZMaxOfMbraneWheelB1 = RDBVars_ECMembranePars->getDouble("ZMAXPOSMBRANEWHEELB1")*CLHEP::mm; - endCapZMinOfMbraneWheelB2 = RDBVars_ECMembranePars->getDouble("ZMINPOSMBRANEWHEELB2")*CLHEP::mm; - endCapZMaxOfMbraneWheelB2 = RDBVars_ECMembranePars->getDouble("ZMAXPOSMBRANEWHEELB2")*CLHEP::mm; + endCapRMinOfMbrane = RDBVars_ECMembranePars->getDouble("RMINOFENDCAPMBRANE")*GeoModelKernelUnits::mm; + endCapRMaxOfMbrane = RDBVars_ECMembranePars->getDouble("RMAXOFENDCAPMBRANE")*GeoModelKernelUnits::mm; + endCapZMinOfMbraneWheelA1 = RDBVars_ECMembranePars->getDouble("ZMINPOSMBRANEWHEELA1")*GeoModelKernelUnits::mm; + endCapZMaxOfMbraneWheelA1 = RDBVars_ECMembranePars->getDouble("ZMAXPOSMBRANEWHEELA1")*GeoModelKernelUnits::mm; + endCapZMinOfMbraneWheelA2 = RDBVars_ECMembranePars->getDouble("ZMINPOSMBRANEWHEELA2")*GeoModelKernelUnits::mm; + endCapZMaxOfMbraneWheelA2 = RDBVars_ECMembranePars->getDouble("ZMAXPOSMBRANEWHEELA2")*GeoModelKernelUnits::mm; + endCapZMinOfMbraneWheelB1 = RDBVars_ECMembranePars->getDouble("ZMINPOSMBRANEWHEELB1")*GeoModelKernelUnits::mm; + endCapZMaxOfMbraneWheelB1 = RDBVars_ECMembranePars->getDouble("ZMAXPOSMBRANEWHEELB1")*GeoModelKernelUnits::mm; + endCapZMinOfMbraneWheelB2 = RDBVars_ECMembranePars->getDouble("ZMINPOSMBRANEWHEELB2")*GeoModelKernelUnits::mm; + endCapZMaxOfMbraneWheelB2 = RDBVars_ECMembranePars->getDouble("ZMAXPOSMBRANEWHEELB2")*GeoModelKernelUnits::mm; endCapThicknessOfMbrane = endCapZMaxOfMbraneWheelA1 - endCapZMinOfMbraneWheelA1; @@ -499,11 +499,11 @@ TRT_DetDescrDB_ParameterInterface::distortedMatManager() const return m_distortedMatManager; } -const HepGeom::Transform3D & +const GeoTrf::Transform3D & TRT_DetDescrDB_ParameterInterface::partTransform(const std::string & partName) const { if (m_placements) return m_placements->transform(partName); - static HepGeom::Transform3D unitTransform = HepGeom::Transform3D(); + static GeoTrf::Transform3D unitTransform = GeoTrf::Transform3D::Identity(); return unitTransform; } diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.h index fa76e2f5ada..bf9e5a4aec3 100755 --- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.h +++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.h @@ -30,7 +30,7 @@ public: // delete assignment TRT_DetDescrDB_ParameterInterface & operator=(const TRT_DetDescrDB_ParameterInterface &) = delete; // - virtual const HepGeom::Transform3D & partTransform(const std::string & partName) const; + virtual const GeoTrf::Transform3D & partTransform(const std::string & partName) const; virtual bool partPresent(const std::string & partName) const; virtual const InDetDD::DistortedMaterialManager * distortedMatManager() const; diff --git a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx index 4afd4454b30..2d6e5d0a7be 100644 --- a/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx +++ b/InnerDetector/InDetDigitization/FastSiDigitization/src/SiSmearedDigitizationTool.cxx @@ -1090,7 +1090,7 @@ StatusCode SiSmearedDigitizationTool::digitize() } else { const Trk::Surface* hitSurface = &hitPlanarDetElement->surface(); const Amg::Transform3D& sTransform = hitSurface->transform().inverse(); - const Amg::Transform3D& hitTransform = Amg::CLHEPTransformToEigen(hitPlanarDetElement->transformHit()); + const Amg::Transform3D& hitTransform = hitPlanarDetElement->transformHit(); Amg::Vector3D localStartPosition(pix_localStartPosition.x(), pix_localStartPosition.y(), pix_localStartPosition.z()); Amg::Vector3D localEndPosition(pix_localEndPosition.x(), pix_localEndPosition.y(), pix_localEndPosition.z()); Amg::Vector3D localEntry(sTransform*(hitTransform*localStartPosition)); @@ -1124,7 +1124,7 @@ StatusCode SiSmearedDigitizationTool::digitize() } else { const Trk::Surface* hitSurface = &hitPlanarDetElement->surface(); const Amg::Transform3D& sTransform = hitSurface->transform().inverse(); - const Amg::Transform3D& hitTransform = Amg::CLHEPTransformToEigen( hitPlanarDetElement->transformHit()); + const Amg::Transform3D& hitTransform = hitPlanarDetElement->transformHit(); Amg::Vector3D localStartPosition(sct_localStartPosition.x(), sct_localStartPosition.y(), sct_localStartPosition.z()); ATH_MSG_DEBUG( "--- SiSmearedDigitizationTool: SCT local start position --- " << localStartPosition.x() << ", " << localStartPosition.y() << ", " << localStartPosition.z()); Amg::Vector3D localEndPosition(sct_localEndPosition.x(), sct_localEndPosition.y(), sct_localEndPosition.z()); diff --git a/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/CMakeLists.txt index c9dc1faa8e8..25d25e764a9 100644 --- a/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/CMakeLists.txt +++ b/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/CMakeLists.txt @@ -17,13 +17,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint RooFitCore RooFit Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( InDetDiMuonMonitoring src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib xAODMuon xAODTracking GaudiKernel StoreGateLib SGtests EventInfo ) + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaMonitoringLib xAODMuon xAODTracking GaudiKernel StoreGateLib SGtests EventInfo ) # Install files from the package: atlas_install_headers( InDetDiMuonMonitoring ) diff --git a/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx b/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx index 1b7d402ae8f..56e829944ba 100644 --- a/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx +++ b/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx @@ -6,6 +6,7 @@ #include "GaudiKernel/IJobOptionsSvc.h" #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/StatusCode.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "InDetDiMuonMonitoring/DiMuMon.h" @@ -102,10 +103,10 @@ StatusCode DiMuMon::initialize(){ //resonance independent // for eta these are filled as the histograms are declared due to the dependence between region and eta - m_varRanges["phi"] = std::make_pair(-CLHEP::pi,CLHEP::pi); - m_varRanges["phiAll"] = std::make_pair(-CLHEP::pi,CLHEP::pi); - m_varRanges["phiPos"] = std::make_pair(-CLHEP::pi,CLHEP::pi); - m_varRanges["phiNeg"] = std::make_pair(-CLHEP::pi,CLHEP::pi); + m_varRanges["phi"] = std::make_pair(-GeoModelKernelUnits::pi,GeoModelKernelUnits::pi); + m_varRanges["phiAll"] = std::make_pair(-GeoModelKernelUnits::pi,GeoModelKernelUnits::pi); + m_varRanges["phiPos"] = std::make_pair(-GeoModelKernelUnits::pi,GeoModelKernelUnits::pi); + m_varRanges["phiNeg"] = std::make_pair(-GeoModelKernelUnits::pi,GeoModelKernelUnits::pi); m_varRanges["etaSumm"] = std::make_pair(-5.,5.); //resonance dependent @@ -120,7 +121,7 @@ StatusCode DiMuMon::initialize(){ ptMax = 18.; } else if (m_resonName=="Zmumu") { m_varRanges["eta"] = std::make_pair(-5.,5.); - m_varRanges["phiDiff"] = std::make_pair(0.,CLHEP::pi); + m_varRanges["phiDiff"] = std::make_pair(0.,GeoModelKernelUnits::pi); m_varRanges["etaDiff"] = std::make_pair(-3.,3.); m_varRanges["crtDiff"] = std::make_pair(-0.03,0.03); m_varRanges["phiSumm"] = std::make_pair(-3.5,3.5); @@ -261,7 +262,7 @@ StatusCode DiMuMon::fillHistograms() // if (m_lumiBlockNum<402 || m_lumiBlockNum>1330) return StatusCode::SUCCESS; - double muonMass = 105.66*CLHEP::MeV; + double muonMass = 105.66*GeoModelKernelUnits::MeV; //retrieve all muons const xAOD::MuonContainer* muons(0); StatusCode sc = evtStore()->retrieve(muons, m_muonCollection); @@ -356,15 +357,15 @@ StatusCode DiMuMon::fillHistograms() double phiNeg = idNeg->phi(); m_varValues["phiNeg"] = phiNeg; m_varValues["pt"] = getPt(idPos,idNeg); - double ptPos = idPos->pt()/CLHEP::GeV; + double ptPos = idPos->pt()/GeoModelKernelUnits::GeV; m_varValues["ptPos"] = ptPos; - double ptNeg = idNeg->pt()/CLHEP::GeV; + double ptNeg = idNeg->pt()/GeoModelKernelUnits::GeV; m_varValues["ptNeg"] = ptNeg; m_varValues["crtDiff"] = getCrtDiff(idPos,idNeg); m_varValues["etaDiff"] = etaPos - etaNeg; double phiDiff = fabs(phiPos - phiNeg); - if (phiDiff>CLHEP::pi) phiDiff = 2*(CLHEP::pi) - phiDiff; + if (phiDiff>GeoModelKernelUnits::pi) phiDiff = 2*(GeoModelKernelUnits::pi) - phiDiff; m_varValues["phiDiff"] = phiDiff; m_varValues["etaSumm"] = etaPos + etaNeg; m_varValues["phiSumm"] = phiPos + phiNeg; @@ -661,7 +662,7 @@ double DiMuMon::getInvmass(const xAOD::TrackParticle* id1, const xAOD::TrackPart particle1.SetPtEtaPhiE(id1->pt(),id1->eta(),id1->phi(),sqrt(pow(Mass,2)+pow(id1->p4().Px(),2)+pow(id1->p4().Py(),2)+pow(id1->p4().Pz(),2))); particle2.SetPtEtaPhiE(id2->pt(),id2->eta(),id2->phi(),sqrt(pow(Mass,2)+pow(id2->p4().Px(),2)+pow(id2->p4().Py(),2)+pow(id2->p4().Pz(),2))); v=particle1+particle2; - double invmass = v.Mag()/CLHEP::GeV; + double invmass = v.Mag()/GeoModelKernelUnits::GeV; return invmass; } @@ -670,7 +671,7 @@ double DiMuMon::getPt(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* double px = id1->p4().Px()+id2->p4().Px(); double py = id1->p4().Py()+id2->p4().Py(); transmom=sqrt(px*px+py*py); - return transmom/CLHEP::GeV; //Gev + return transmom/GeoModelKernelUnits::GeV; //Gev } double DiMuMon::getEta(const xAOD::TrackParticle* id1, const xAOD::TrackParticle* id2 ) const { diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx index 3284a786125..17f6c041a0d 100644 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx @@ -22,6 +22,7 @@ // ATLAS headers #include "StoreGate/StoreGateSvc.h" #include "CLHEP/Random/RandFlat.h" +#include "CLHEP/Units/SystemOfUnits.h" #include "GaudiKernel/IToolSvc.h" diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx index b6c48e41003..6718df59a6b 100644 --- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx +++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/ZmumuEvent.cxx @@ -17,6 +17,7 @@ // ATLAS headers #include "StoreGate/StoreGateSvc.h" #include "CLHEP/Random/RandFlat.h" +#include "CLHEP/Units/SystemOfUnits.h" #include "xAODMuon/Muon.h" #include "xAODMuon/MuonContainer.h" diff --git a/InnerDetector/InDetRecAlgs/TRT_StandaloneTrackFinder/src/TRT_StandaloneTrackFinder.cxx b/InnerDetector/InDetRecAlgs/TRT_StandaloneTrackFinder/src/TRT_StandaloneTrackFinder.cxx index 531993710f0..73694907705 100644 --- a/InnerDetector/InDetRecAlgs/TRT_StandaloneTrackFinder/src/TRT_StandaloneTrackFinder.cxx +++ b/InnerDetector/InDetRecAlgs/TRT_StandaloneTrackFinder/src/TRT_StandaloneTrackFinder.cxx @@ -22,7 +22,8 @@ #include "InDetRecToolInterfaces/ITRT_SegmentToTrackTool.h" #include "CxxUtils/make_unique.h" -using CLHEP::GeV; +#include "GaudiKernel/SystemOfUnits.h" +using Gaudi::Units::GeV; /////////////////////////////////////////////////////////////////// // Constructor diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx index b2d7e42aa12..7fad1948199 100644 --- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx +++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx @@ -31,6 +31,7 @@ #include "xAODTracking/TrackParticle.h" #include "xAODTracking/VertexContainer.h" +#include "CLHEP/Geometry/Transform3D.h" using HepGeom::Transform3D; namespace InDet { diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/VertexPointEstimator.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/VertexPointEstimator.cxx index 473aaf47f6f..4f637ca66ec 100644 --- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/VertexPointEstimator.cxx +++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/VertexPointEstimator.cxx @@ -11,6 +11,7 @@ changes : M.ELSING ***************************************************************************/ #include "InDetConversionFinderTools/VertexPointEstimator.h" +#include "CLHEP/Units/SystemOfUnits.h" #include "TMath.h" //Do we need to replace this? diff --git a/InnerDetector/InDetRecTools/InDetDNASeparator/src/InDetDNASeparator.cxx b/InnerDetector/InDetRecTools/InDetDNASeparator/src/InDetDNASeparator.cxx index 2c5ca2a7a87..02693ea89f4 100644 --- a/InnerDetector/InDetRecTools/InDetDNASeparator/src/InDetDNASeparator.cxx +++ b/InnerDetector/InDetRecTools/InDetDNASeparator/src/InDetDNASeparator.cxx @@ -15,6 +15,7 @@ #include "TrkMeasurementBase/MeasurementBase.h" #include "TrkSurfaces/Surface.h" #include "TrkFitterUtils/DNA_MaterialEffects.h" +#include "GaudiKernel/SystemOfUnits.h"" //#include "TrkParameters/MeasuredTrackParameters.h" // #include "TrkFitterUtils/ProtoTrajectoryUtility.h" @@ -28,7 +29,7 @@ InDet::InDetDNASeparator::InDetDNASeparator(const std::string& t, : AthAlgTool(t,n,p), m_kutoff(4.50), - m_floorseparation_drr(4.00*CLHEP::mm), + m_floorseparation_drr(4.00*Gaudi::Units::mm), // Initialization of ID SCT helper m_SCT_Tool(nullptr), // Initialization of ID Pixel helper diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx index cfa203f2f25..c19de8a0767 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx @@ -23,6 +23,7 @@ // normal includes #include "CLHEP/GenericFunctions/CumulativeChiSquare.hh" +#include "CLHEP/Units/SystemOfUnits.h" #include "TrkSurfaces/PerigeeSurface.h" #include "GeoPrimitives/GeoPrimitives.h" #include "EventPrimitives/EventPrimitives.h" diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetIsoTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetIsoTrackSelectorTool.cxx index 006dbe6a78d..41ca00683ac 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetIsoTrackSelectorTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetIsoTrackSelectorTool.cxx @@ -9,6 +9,7 @@ #include "TrkTrack/Track.h" #include "TrkParticleBase/TrackParticleBase.h" #include "TrkSurfaces/StraightLineSurface.h" +#include "CLHEP/Units/SystemOfUnits.h" using CLHEP::mm; diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetTrackSelectorTool.cxx index 763e4e9a090..16362808754 100644 --- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetTrackSelectorTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetTrackSelectorTool.cxx @@ -12,6 +12,7 @@ // normal includes #include "TrkTrackSummary/TrackSummary.h" #include "CLHEP/Matrix/Vector.h" +#include "CLHEP/Units/SystemOfUnits.h" using CLHEP::mm; diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx index a47d7fa5d4b..40b34315b73 100755 --- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx +++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/SimpleTRT_SeededSpacePointFinder_ATL.cxx @@ -17,6 +17,7 @@ #include "GaudiKernel/MsgStream.h" //#include "StoreGate/StoreGateSvc.h" #include "CLHEP/Vector/ThreeVector.h" +#include "CLHEP/Units/SystemOfUnits.h" #include "TrkSpacePoint/SpacePointCLASS_DEF.h" #include "TRT_SeededSpacePointFinderTool/SimpleTRT_SeededSpacePointFinder_ATL.h" #include "InDetIdentifier/SCT_ID.h" diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx index 7de23e1600d..64cbe9f0ff7 100755 --- a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx +++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx @@ -33,6 +33,7 @@ #include <map> #include "AtlasDetDescr/AtlasDetectorID.h" #include "TrkToolInterfaces/ITrackSummaryTool.h" +#include "CLHEP/Geometry/Point3D.h" namespace Trk { diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/CMakeLists.txt b/InnerDetector/InDetValidation/InDetTrackValidation/CMakeLists.txt index 47f633e2902..f8a6ffa4401 100644 --- a/InnerDetector/InDetValidation/InDetTrackValidation/CMakeLists.txt +++ b/InnerDetector/InDetValidation/InDetTrackValidation/CMakeLists.txt @@ -34,7 +34,6 @@ atlas_depends_on_subdirs( InnerDetector/InDetConditions/TRT_ConditionsServices InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry - InnerDetector/InDetDetDescr/PixelGeoModel InnerDetector/InDetDetDescr/SCT_Cabling InnerDetector/InDetRecEvent/InDetRIO_OnTrack InnerDetector/InDetValidation/InDetTrackSplitterTool @@ -60,5 +59,4 @@ atlas_add_component( InDetTrackValidation EventPrimitives GeneratorObjects TRT_ConditionsData TRT_ConditionsServicesLib InDetIdentifier InDetReadoutGeometry SCT_CablingLib InDetRIO_OnTrack TrkSurfaces TrkEventPrimitives TrkMeasurementBase - TrkPrepRawData TrkRIO_OnTrack TrkToolInterfaces - PixelGeoModelLib ) + TrkPrepRawData TrkRIO_OnTrack TrkToolInterfaces ) diff --git a/LArCalorimeter/LArDetDescr/CMakeLists.txt b/LArCalorimeter/LArDetDescr/CMakeLists.txt index 173c20bf3e9..f08de4493a0 100644 --- a/LArCalorimeter/LArDetDescr/CMakeLists.txt +++ b/LArCalorimeter/LArDetDescr/CMakeLists.txt @@ -11,7 +11,6 @@ atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloGeoHelpers Control/AthenaBaseComps Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/Identifier GaudiKernel LArCalorimeter/LArGeoModel/LArReadoutGeometry @@ -28,13 +27,14 @@ find_package( Boost COMPONENTS filesystem thread system ) find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( LArDetDescr src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel CaloDetDescrLib CaloGeoHelpers AthenaBaseComps GeoModelKernel Identifier GaudiKernel LArReadoutGeometry CaloIdentifier StoreGateLib SGtests GeoModelUtilities GeoPrimitives ) + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel CaloDetDescrLib CaloGeoHelpers AthenaBaseComps Identifier GaudiKernel LArReadoutGeometry CaloIdentifier StoreGateLib SGtests GeoModelUtilities GeoPrimitives ) # Install files from the package: atlas_install_headers( LArDetDescr ) diff --git a/LArCalorimeter/LArDetDescr/LArDetDescr/FindVolAction.h b/LArCalorimeter/LArDetDescr/LArDetDescr/FindVolAction.h deleted file mode 100755 index 8736bfe7ccd..00000000000 --- a/LArCalorimeter/LArDetDescr/LArDetDescr/FindVolAction.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef FINDVOLACTION_H -#define FINDVOLACTION_H - -#include "GeoModelKernel/GeoVolumeAction.h" - -class FindVolAction :public GeoVolumeAction -{ - public: - //constructor - FindVolAction (PVConstLink startPV, - std::string volumeName, - int identifier); - - //desctructor - ~FindVolAction (); - - // volume with this name exists - bool volumeExists() const; - - // Returns the selected physical volume or NULL if not found - PVConstLink getVolume () const; - - // Returns the global transformation to the volume - HepGeom::Transform3D getGlobalTransform () const; - private: - - bool m_volumeExists; - std::string m_volumeName; - int m_identifier; - HepGeom::Transform3D m_globalTransform; - PVConstLink m_volume; - - void handleVPhysVol (const GeoVPhysVol *); - -}; - - -#endif diff --git a/LArCalorimeter/LArDetDescr/src/FindVolAction.cxx b/LArCalorimeter/LArDetDescr/src/FindVolAction.cxx deleted file mode 100755 index 9d7b5444879..00000000000 --- a/LArCalorimeter/LArDetDescr/src/FindVolAction.cxx +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "LArDetDescr/FindVolAction.h" - -FindVolAction::FindVolAction (PVConstLink startPV, - std::string volumeName, - int identifier) - :GeoVolumeAction (GeoVolumeAction::TOP_DOWN), - m_volumeExists(false), - m_volumeName(volumeName), - m_identifier(identifier), - m_volume(0) -{ - //std::cout << " ---> FindVolAction constructed\n"; - startPV->apply(this); -} - -FindVolAction::~FindVolAction () -{ -} - -PVConstLink FindVolAction::getVolume () const -{ - return m_volume; -} - -HepGeom::Transform3D FindVolAction::getGlobalTransform () const -{ - return m_globalTransform; -} - -bool FindVolAction::volumeExists() const -{ - return m_volumeExists; -} - -void FindVolAction::handleVPhysVol (const GeoVPhysVol *pv) -{ - GeoTraversalState* state = getState(); - Query<int> Qint = state->getId(); - std::string pvName = state->getName(); - std::string lvName = pv->getLogVol()->getName(); - - // Print out : - /* - std::cout << " VOL ACTION. Visiting = " << pvName - << " " << lvName << " "; - if(Qint.isValid()) - std::cout << Qint; - else - std::cout << "xxx"; - std::cout << "\n"; - */ - - // If there is a copy number use it : - if ( m_identifier >= 0 ) { - - if((pvName==m_volumeName || lvName==m_volumeName) && - Qint.isValid() && Qint == m_identifier) - { - //std::cout << " *** FOUND! " << "\n"; - m_volumeExists = true; - m_globalTransform = state->getAbsoluteTransform(); - m_volume = pv; - terminate(); - } - } - // If not : - else { - - if((pvName==m_volumeName || lvName==m_volumeName) ) { - //std::cout << " *** FOUND! " << "\n"; - m_volumeExists = true; - m_globalTransform = state->getAbsoluteTransform(); - m_volume = pv; - terminate(); - } - } -} - - diff --git a/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx b/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx index 62aea79b58c..b2df85629c4 100755 --- a/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx +++ b/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx @@ -16,7 +16,6 @@ #include "RDBAccessSvc/IRDBRecord.h" #include "CLHEP/Geometry/Point3D.h" -#include "CLHEP/Units/SystemOfUnits.h" #include "CaloIdentifier/CaloID.h" #include "CaloIdentifier/CaloIdManager.h" @@ -24,7 +23,7 @@ #include "LArDetDescr/LArCellVolumes.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" - +#include "GeoModelKernel/Units.h" LArNumberHelper::LArNumberHelper(const std::string geometry) : m_geometry(geometry), @@ -496,49 +495,49 @@ LArNumberHelper::db_nb_em() //std::cout << " ----- in db_nb_em tags are : " << m_tag << " " << m_node << std::endl; // PS - // m_emb_psin = 141.23*CLHEP::cm; // this is the TDR number 1385 mm + 27.3 mm + // m_emb_psin = 141.23*GeoModelKernelUnits::cm; // this is the TDR number 1385 mm + 27.3 mm // ----> overwritten m_lar = m_iAccessSvc->getRecordsetPtr("PresamplerGeometry","ATLAS-00","ATLAS"); if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_emb_psin = m_rec->getDouble("RACTIVE")*CLHEP::cm; + m_emb_psin = m_rec->getDouble("RACTIVE")*GeoModelKernelUnits::cm; } // ACCG : - // m_accg_rin_ac = 144.73*CLHEP::cm; // 1385mm + 27.3mm + 35mm - // m_accg_rout_ac = 200.35*CLHEP::cm; // end of active material + // m_accg_rin_ac = 144.73*GeoModelKernelUnits::cm; // 1385mm + 27.3mm + 35mm + // m_accg_rout_ac = 200.35*GeoModelKernelUnits::cm; // end of active material // ----> overwritten m_lar = m_iAccessSvc->getRecordsetPtr("BarrelGeometry",m_tag,m_node); if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_accg_rin_ac = m_rec->getDouble("RMIN") *CLHEP::cm; - m_accg_rout_ac = m_rec->getDouble("RMAX") *CLHEP::cm; + m_accg_rin_ac = m_rec->getDouble("RMIN") *GeoModelKernelUnits::cm; + m_accg_rout_ac = m_rec->getDouble("RMAX") *GeoModelKernelUnits::cm; } // ACCO : m_acco_rmx12.resize (8,(double) 0.); - // m_acco_rmx12[0] = 158.6*CLHEP::cm; - // m_acco_rmx12[1] = 158.6*CLHEP::cm; - // m_acco_rmx12[2] = 157.07*CLHEP::cm; - // m_acco_rmx12[3] = 157.07*CLHEP::cm; - // m_acco_rmx12[4] = 154.83*CLHEP::cm; - // m_acco_rmx12[5] = 154.83*CLHEP::cm; - // m_acco_rmx12[6] = 153.23*CLHEP::cm; - // m_acco_rmx12[7] = 153.23*CLHEP::cm; + // m_acco_rmx12[0] = 158.6*GeoModelKernelUnits::cm; + // m_acco_rmx12[1] = 158.6*GeoModelKernelUnits::cm; + // m_acco_rmx12[2] = 157.07*GeoModelKernelUnits::cm; + // m_acco_rmx12[3] = 157.07*GeoModelKernelUnits::cm; + // m_acco_rmx12[4] = 154.83*GeoModelKernelUnits::cm; + // m_acco_rmx12[5] = 154.83*GeoModelKernelUnits::cm; + // m_acco_rmx12[6] = 153.23*GeoModelKernelUnits::cm; + // m_acco_rmx12[7] = 153.23*GeoModelKernelUnits::cm; // ----> overwritten m_lar = m_iAccessSvc->getRecordsetPtr("BarrelLongDiv",m_tag,m_node); if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_acco_rmx12[0] = m_rec->getDouble("RMX12_0")*CLHEP::cm; - m_acco_rmx12[1] = m_rec->getDouble("RMX12_1")*CLHEP::cm; - m_acco_rmx12[2] = m_rec->getDouble("RMX12_2")*CLHEP::cm; - m_acco_rmx12[3] = m_rec->getDouble("RMX12_3")*CLHEP::cm; - m_acco_rmx12[4] = m_rec->getDouble("RMX12_4")*CLHEP::cm; - m_acco_rmx12[5] = m_rec->getDouble("RMX12_5")*CLHEP::cm; - m_acco_rmx12[6] = m_rec->getDouble("RMX12_6")*CLHEP::cm; - m_acco_rmx12[7] = m_rec->getDouble("RMX12_7")*CLHEP::cm; + m_acco_rmx12[0] = m_rec->getDouble("RMX12_0")*GeoModelKernelUnits::cm; + m_acco_rmx12[1] = m_rec->getDouble("RMX12_1")*GeoModelKernelUnits::cm; + m_acco_rmx12[2] = m_rec->getDouble("RMX12_2")*GeoModelKernelUnits::cm; + m_acco_rmx12[3] = m_rec->getDouble("RMX12_3")*GeoModelKernelUnits::cm; + m_acco_rmx12[4] = m_rec->getDouble("RMX12_4")*GeoModelKernelUnits::cm; + m_acco_rmx12[5] = m_rec->getDouble("RMX12_5")*GeoModelKernelUnits::cm; + m_acco_rmx12[6] = m_rec->getDouble("RMX12_6")*GeoModelKernelUnits::cm; + m_acco_rmx12[7] = m_rec->getDouble("RMX12_7")*GeoModelKernelUnits::cm; } m_acco_ee12.resize (8,(double) 0.); @@ -566,84 +565,84 @@ LArNumberHelper::db_nb_em() m_acco_rmx23.resize (53,(double) 0.); /* - m_acco_rmx23[0] = 192.83*CLHEP::cm; ... up to : - m_acco_rmx23[52] = 178.89*CLHEP::cm; + m_acco_rmx23[0] = 192.83*GeoModelKernelUnits::cm; ... up to : + m_acco_rmx23[52] = 178.89*GeoModelKernelUnits::cm; */ // ----> overwritten m_lar = m_iAccessSvc->getRecordsetPtr("BarrelLongDiv",m_tag,m_node); if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_acco_rmx23[0] = m_rec->getDouble("RMX23_0")*CLHEP::cm; - m_acco_rmx23[1] = m_rec->getDouble("RMX23_1")*CLHEP::cm; - m_acco_rmx23[2] = m_rec->getDouble("RMX23_2")*CLHEP::cm; - m_acco_rmx23[3] = m_rec->getDouble("RMX23_3")*CLHEP::cm; - m_acco_rmx23[4] = m_rec->getDouble("RMX23_4")*CLHEP::cm; - m_acco_rmx23[5] = m_rec->getDouble("RMX23_5")*CLHEP::cm; - m_acco_rmx23[6] = m_rec->getDouble("RMX23_6")*CLHEP::cm; - m_acco_rmx23[7] = m_rec->getDouble("RMX23_7")*CLHEP::cm; - m_acco_rmx23[8] = m_rec->getDouble("RMX23_8")*CLHEP::cm; - m_acco_rmx23[9] = m_rec->getDouble("RMX23_9")*CLHEP::cm; - m_acco_rmx23[10] = m_rec->getDouble("RMX23_10")*CLHEP::cm; - m_acco_rmx23[11] = m_rec->getDouble("RMX23_11")*CLHEP::cm; - m_acco_rmx23[12] = m_rec->getDouble("RMX23_12")*CLHEP::cm; - m_acco_rmx23[13] = m_rec->getDouble("RMX23_13")*CLHEP::cm; - m_acco_rmx23[14] = m_rec->getDouble("RMX23_14")*CLHEP::cm; - m_acco_rmx23[15] = m_rec->getDouble("RMX23_15")*CLHEP::cm; - m_acco_rmx23[16] = m_rec->getDouble("RMX23_16")*CLHEP::cm; - m_acco_rmx23[17] = m_rec->getDouble("RMX23_17")*CLHEP::cm; - m_acco_rmx23[18] = m_rec->getDouble("RMX23_18")*CLHEP::cm; - m_acco_rmx23[19] = m_rec->getDouble("RMX23_19")*CLHEP::cm; - m_acco_rmx23[20] = m_rec->getDouble("RMX23_20")*CLHEP::cm; - m_acco_rmx23[21] = m_rec->getDouble("RMX23_21")*CLHEP::cm; - m_acco_rmx23[22] = m_rec->getDouble("RMX23_22")*CLHEP::cm; - m_acco_rmx23[23] = m_rec->getDouble("RMX23_23")*CLHEP::cm; - m_acco_rmx23[24] = m_rec->getDouble("RMX23_24")*CLHEP::cm; - m_acco_rmx23[25] = m_rec->getDouble("RMX23_25")*CLHEP::cm; - m_acco_rmx23[26] = m_rec->getDouble("RMX23_26")*CLHEP::cm; - m_acco_rmx23[27] = m_rec->getDouble("RMX23_27")*CLHEP::cm; - m_acco_rmx23[28] = m_rec->getDouble("RMX23_28")*CLHEP::cm; - m_acco_rmx23[29] = m_rec->getDouble("RMX23_29")*CLHEP::cm; - m_acco_rmx23[30] = m_rec->getDouble("RMX23_30")*CLHEP::cm; - m_acco_rmx23[31] = m_rec->getDouble("RMX23_31")*CLHEP::cm; - m_acco_rmx23[32] = m_rec->getDouble("RMX23_32")*CLHEP::cm; - m_acco_rmx23[33] = m_rec->getDouble("RMX23_33")*CLHEP::cm; - m_acco_rmx23[34] = m_rec->getDouble("RMX23_34")*CLHEP::cm; - m_acco_rmx23[35] = m_rec->getDouble("RMX23_35")*CLHEP::cm; - m_acco_rmx23[36] = m_rec->getDouble("RMX23_36")*CLHEP::cm; - m_acco_rmx23[37] = m_rec->getDouble("RMX23_37")*CLHEP::cm; - m_acco_rmx23[38] = m_rec->getDouble("RMX23_38")*CLHEP::cm; - m_acco_rmx23[39] = m_rec->getDouble("RMX23_39")*CLHEP::cm; - m_acco_rmx23[40] = m_rec->getDouble("RMX23_40")*CLHEP::cm; - m_acco_rmx23[41] = m_rec->getDouble("RMX23_41")*CLHEP::cm; - m_acco_rmx23[42] = m_rec->getDouble("RMX23_42")*CLHEP::cm; - m_acco_rmx23[43] = m_rec->getDouble("RMX23_43")*CLHEP::cm; - m_acco_rmx23[44] = m_rec->getDouble("RMX23_44")*CLHEP::cm; - m_acco_rmx23[45] = m_rec->getDouble("RMX23_45")*CLHEP::cm; - m_acco_rmx23[46] = m_rec->getDouble("RMX23_46")*CLHEP::cm; - m_acco_rmx23[47] = m_rec->getDouble("RMX23_47")*CLHEP::cm; - m_acco_rmx23[48] = m_rec->getDouble("RMX23_48")*CLHEP::cm; - m_acco_rmx23[49] = m_rec->getDouble("RMX23_49")*CLHEP::cm; - m_acco_rmx23[50] = m_rec->getDouble("RMX23_50")*CLHEP::cm; - m_acco_rmx23[51] = m_rec->getDouble("RMX23_51")*CLHEP::cm; - m_acco_rmx23[52] = m_rec->getDouble("RMX23_52")*CLHEP::cm; + m_acco_rmx23[0] = m_rec->getDouble("RMX23_0")*GeoModelKernelUnits::cm; + m_acco_rmx23[1] = m_rec->getDouble("RMX23_1")*GeoModelKernelUnits::cm; + m_acco_rmx23[2] = m_rec->getDouble("RMX23_2")*GeoModelKernelUnits::cm; + m_acco_rmx23[3] = m_rec->getDouble("RMX23_3")*GeoModelKernelUnits::cm; + m_acco_rmx23[4] = m_rec->getDouble("RMX23_4")*GeoModelKernelUnits::cm; + m_acco_rmx23[5] = m_rec->getDouble("RMX23_5")*GeoModelKernelUnits::cm; + m_acco_rmx23[6] = m_rec->getDouble("RMX23_6")*GeoModelKernelUnits::cm; + m_acco_rmx23[7] = m_rec->getDouble("RMX23_7")*GeoModelKernelUnits::cm; + m_acco_rmx23[8] = m_rec->getDouble("RMX23_8")*GeoModelKernelUnits::cm; + m_acco_rmx23[9] = m_rec->getDouble("RMX23_9")*GeoModelKernelUnits::cm; + m_acco_rmx23[10] = m_rec->getDouble("RMX23_10")*GeoModelKernelUnits::cm; + m_acco_rmx23[11] = m_rec->getDouble("RMX23_11")*GeoModelKernelUnits::cm; + m_acco_rmx23[12] = m_rec->getDouble("RMX23_12")*GeoModelKernelUnits::cm; + m_acco_rmx23[13] = m_rec->getDouble("RMX23_13")*GeoModelKernelUnits::cm; + m_acco_rmx23[14] = m_rec->getDouble("RMX23_14")*GeoModelKernelUnits::cm; + m_acco_rmx23[15] = m_rec->getDouble("RMX23_15")*GeoModelKernelUnits::cm; + m_acco_rmx23[16] = m_rec->getDouble("RMX23_16")*GeoModelKernelUnits::cm; + m_acco_rmx23[17] = m_rec->getDouble("RMX23_17")*GeoModelKernelUnits::cm; + m_acco_rmx23[18] = m_rec->getDouble("RMX23_18")*GeoModelKernelUnits::cm; + m_acco_rmx23[19] = m_rec->getDouble("RMX23_19")*GeoModelKernelUnits::cm; + m_acco_rmx23[20] = m_rec->getDouble("RMX23_20")*GeoModelKernelUnits::cm; + m_acco_rmx23[21] = m_rec->getDouble("RMX23_21")*GeoModelKernelUnits::cm; + m_acco_rmx23[22] = m_rec->getDouble("RMX23_22")*GeoModelKernelUnits::cm; + m_acco_rmx23[23] = m_rec->getDouble("RMX23_23")*GeoModelKernelUnits::cm; + m_acco_rmx23[24] = m_rec->getDouble("RMX23_24")*GeoModelKernelUnits::cm; + m_acco_rmx23[25] = m_rec->getDouble("RMX23_25")*GeoModelKernelUnits::cm; + m_acco_rmx23[26] = m_rec->getDouble("RMX23_26")*GeoModelKernelUnits::cm; + m_acco_rmx23[27] = m_rec->getDouble("RMX23_27")*GeoModelKernelUnits::cm; + m_acco_rmx23[28] = m_rec->getDouble("RMX23_28")*GeoModelKernelUnits::cm; + m_acco_rmx23[29] = m_rec->getDouble("RMX23_29")*GeoModelKernelUnits::cm; + m_acco_rmx23[30] = m_rec->getDouble("RMX23_30")*GeoModelKernelUnits::cm; + m_acco_rmx23[31] = m_rec->getDouble("RMX23_31")*GeoModelKernelUnits::cm; + m_acco_rmx23[32] = m_rec->getDouble("RMX23_32")*GeoModelKernelUnits::cm; + m_acco_rmx23[33] = m_rec->getDouble("RMX23_33")*GeoModelKernelUnits::cm; + m_acco_rmx23[34] = m_rec->getDouble("RMX23_34")*GeoModelKernelUnits::cm; + m_acco_rmx23[35] = m_rec->getDouble("RMX23_35")*GeoModelKernelUnits::cm; + m_acco_rmx23[36] = m_rec->getDouble("RMX23_36")*GeoModelKernelUnits::cm; + m_acco_rmx23[37] = m_rec->getDouble("RMX23_37")*GeoModelKernelUnits::cm; + m_acco_rmx23[38] = m_rec->getDouble("RMX23_38")*GeoModelKernelUnits::cm; + m_acco_rmx23[39] = m_rec->getDouble("RMX23_39")*GeoModelKernelUnits::cm; + m_acco_rmx23[40] = m_rec->getDouble("RMX23_40")*GeoModelKernelUnits::cm; + m_acco_rmx23[41] = m_rec->getDouble("RMX23_41")*GeoModelKernelUnits::cm; + m_acco_rmx23[42] = m_rec->getDouble("RMX23_42")*GeoModelKernelUnits::cm; + m_acco_rmx23[43] = m_rec->getDouble("RMX23_43")*GeoModelKernelUnits::cm; + m_acco_rmx23[44] = m_rec->getDouble("RMX23_44")*GeoModelKernelUnits::cm; + m_acco_rmx23[45] = m_rec->getDouble("RMX23_45")*GeoModelKernelUnits::cm; + m_acco_rmx23[46] = m_rec->getDouble("RMX23_46")*GeoModelKernelUnits::cm; + m_acco_rmx23[47] = m_rec->getDouble("RMX23_47")*GeoModelKernelUnits::cm; + m_acco_rmx23[48] = m_rec->getDouble("RMX23_48")*GeoModelKernelUnits::cm; + m_acco_rmx23[49] = m_rec->getDouble("RMX23_49")*GeoModelKernelUnits::cm; + m_acco_rmx23[50] = m_rec->getDouble("RMX23_50")*GeoModelKernelUnits::cm; + m_acco_rmx23[51] = m_rec->getDouble("RMX23_51")*GeoModelKernelUnits::cm; + m_acco_rmx23[52] = m_rec->getDouble("RMX23_52")*GeoModelKernelUnits::cm; } // ENDG - // m_endg_zorig = 369.1*CLHEP::cm; // this is the NOVA/Oracle number - // m_emb_iwout = 422.7*CLHEP::cm; // 369.1*CLHEP::cm + 53.6*CLHEP::cm is the end of the active part - // m_emec_out = 422.7*CLHEP::cm; // 369.1*CLHEP::cm + 53.6*CLHEP::cm is the end of the active part + // m_endg_zorig = 369.1*GeoModelKernelUnits::cm; // this is the NOVA/Oracle number + // m_emb_iwout = 422.7*GeoModelKernelUnits::cm; // 369.1*GeoModelKernelUnits::cm + 53.6*GeoModelKernelUnits::cm is the end of the active part + // m_emec_out = 422.7*GeoModelKernelUnits::cm; // 369.1*GeoModelKernelUnits::cm + 53.6*GeoModelKernelUnits::cm is the end of the active part m_lar = m_iAccessSvc->getRecordsetPtr("EmecGeometry",m_tag,m_node); if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_endg_zorig = m_rec->getDouble("Z1")*CLHEP::cm; - double epaisseurTotale = m_rec->getDouble("ETOT")*CLHEP::cm; + m_endg_zorig = m_rec->getDouble("Z1")*GeoModelKernelUnits::cm; + double epaisseurTotale = m_rec->getDouble("ETOT")*GeoModelKernelUnits::cm; m_emb_iwout = m_endg_zorig + epaisseurTotale; m_emec_out = m_endg_zorig + epaisseurTotale; } // Cryostat - // m_emec_psin = 362.5*CLHEP::cm; // notch in cold wall of cryostat + // m_emec_psin = 362.5*GeoModelKernelUnits::cm; // notch in cold wall of cryostat if ( m_geometry == "Atlas" ) { DecodeVersionKey detectorKeyAtl = DecodeVersionKey(m_geoModelSvc, "ATLAS"); m_lar = m_iAccessSvc->getRecordsetPtr("PresamplerPosition",detectorKeyAtl.tag(),detectorKeyAtl.node()); @@ -653,74 +652,74 @@ LArNumberHelper::db_nb_em() } if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_emec_psin = m_rec->getDouble("ZPOS")*CLHEP::cm; + m_emec_psin = m_rec->getDouble("ZPOS")*GeoModelKernelUnits::cm; } // ESEP m_esep_iw23.resize(7, (double) 0.); - // m_esep_iw23[0] = 413.934*CLHEP::cm; - // m_esep_iw23[1] = 412.518*CLHEP::cm; - // m_esep_iw23[2] = 411.792*CLHEP::cm; - // m_esep_iw23[3] = 409.545*CLHEP::cm; - // m_esep_iw23[4] = 407.987*CLHEP::cm; - // m_esep_iw23[5] = 407.510*CLHEP::cm; - // m_esep_iw23[6] = 404.730*CLHEP::cm; + // m_esep_iw23[0] = 413.934*GeoModelKernelUnits::cm; + // m_esep_iw23[1] = 412.518*GeoModelKernelUnits::cm; + // m_esep_iw23[2] = 411.792*GeoModelKernelUnits::cm; + // m_esep_iw23[3] = 409.545*GeoModelKernelUnits::cm; + // m_esep_iw23[4] = 407.987*GeoModelKernelUnits::cm; + // m_esep_iw23[5] = 407.510*GeoModelKernelUnits::cm; + // m_esep_iw23[6] = 404.730*GeoModelKernelUnits::cm; // ----> overwritten m_lar = m_iAccessSvc->getRecordsetPtr("EmecSamplingSep",m_tag,m_node); if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_esep_iw23[0] = m_rec->getDouble("ZIW_0")*CLHEP::cm; - m_esep_iw23[1] = m_rec->getDouble("ZIW_1")*CLHEP::cm; - m_esep_iw23[2] = m_rec->getDouble("ZIW_2")*CLHEP::cm; - m_esep_iw23[3] = m_rec->getDouble("ZIW_3")*CLHEP::cm; - m_esep_iw23[4] = m_rec->getDouble("ZIW_4")*CLHEP::cm; - m_esep_iw23[5] = m_rec->getDouble("ZIW_5")*CLHEP::cm; - m_esep_iw23[6] = m_rec->getDouble("ZIW_6")*CLHEP::cm; + m_esep_iw23[0] = m_rec->getDouble("ZIW_0")*GeoModelKernelUnits::cm; + m_esep_iw23[1] = m_rec->getDouble("ZIW_1")*GeoModelKernelUnits::cm; + m_esep_iw23[2] = m_rec->getDouble("ZIW_2")*GeoModelKernelUnits::cm; + m_esep_iw23[3] = m_rec->getDouble("ZIW_3")*GeoModelKernelUnits::cm; + m_esep_iw23[4] = m_rec->getDouble("ZIW_4")*GeoModelKernelUnits::cm; + m_esep_iw23[5] = m_rec->getDouble("ZIW_5")*GeoModelKernelUnits::cm; + m_esep_iw23[6] = m_rec->getDouble("ZIW_6")*GeoModelKernelUnits::cm; } - // m_esep_zsep12 = 378.398*CLHEP::cm; + // m_esep_zsep12 = 378.398*GeoModelKernelUnits::cm; // Note that in the gometryDB this is an array, but // of very similar numbers -> Zebra was using 1rst value only // ----> overwritten m_lar = m_iAccessSvc->getRecordsetPtr("EmecSamplingSep",m_tag,m_node); if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_esep_zsep12 = m_rec->getDouble("ZSEP12_0")*CLHEP::cm; + m_esep_zsep12 = m_rec->getDouble("ZSEP12_0")*GeoModelKernelUnits::cm; } m_esep_zsep23.resize(22, (double) 0.); /* - m_esep_zsep23 [0] = 999.999*CLHEP::cm; // inheritance from Zebra. - m_esep_zsep23 [1] = 999.999*CLHEP::cm; // will be skipped in hard_em - m_esep_zsep23 [2] = 413.205*CLHEP::cm; ... up to : - m_esep_zsep23 [21] = 401.153*CLHEP::cm; + m_esep_zsep23 [0] = 999.999*GeoModelKernelUnits::cm; // inheritance from Zebra. + m_esep_zsep23 [1] = 999.999*GeoModelKernelUnits::cm; // will be skipped in hard_em + m_esep_zsep23 [2] = 413.205*GeoModelKernelUnits::cm; ... up to : + m_esep_zsep23 [21] = 401.153*GeoModelKernelUnits::cm; */ // ----> overwritten m_lar = m_iAccessSvc->getRecordsetPtr("EmecSamplingSep",m_tag,m_node); if (m_lar->size()) { m_rec = (*m_lar)[0]; - m_esep_zsep23 [0] = m_rec->getDouble("ZSEP23_0")*CLHEP::cm; - m_esep_zsep23 [1] = m_rec->getDouble("ZSEP23_1")*CLHEP::cm; - m_esep_zsep23 [2] = m_rec->getDouble("ZSEP23_2")*CLHEP::cm; - m_esep_zsep23 [3] = m_rec->getDouble("ZSEP23_3")*CLHEP::cm; - m_esep_zsep23 [4] = m_rec->getDouble("ZSEP23_4")*CLHEP::cm; - m_esep_zsep23 [5] = m_rec->getDouble("ZSEP23_5")*CLHEP::cm; - m_esep_zsep23 [6] = m_rec->getDouble("ZSEP23_6")*CLHEP::cm; - m_esep_zsep23 [7] = m_rec->getDouble("ZSEP23_7")*CLHEP::cm; - m_esep_zsep23 [8] = m_rec->getDouble("ZSEP23_8")*CLHEP::cm; - m_esep_zsep23 [9] = m_rec->getDouble("ZSEP23_9")*CLHEP::cm; - m_esep_zsep23 [10] = m_rec->getDouble("ZSEP23_10")*CLHEP::cm; - m_esep_zsep23 [11] = m_rec->getDouble("ZSEP23_11")*CLHEP::cm; - m_esep_zsep23 [12] = m_rec->getDouble("ZSEP23_12")*CLHEP::cm; - m_esep_zsep23 [13] = m_rec->getDouble("ZSEP23_13")*CLHEP::cm; - m_esep_zsep23 [14] = m_rec->getDouble("ZSEP23_14")*CLHEP::cm; - m_esep_zsep23 [15] = m_rec->getDouble("ZSEP23_15")*CLHEP::cm; - m_esep_zsep23 [16] = m_rec->getDouble("ZSEP23_16")*CLHEP::cm; - m_esep_zsep23 [17] = m_rec->getDouble("ZSEP23_17")*CLHEP::cm; - m_esep_zsep23 [18] = m_rec->getDouble("ZSEP23_18")*CLHEP::cm; - m_esep_zsep23 [19] = m_rec->getDouble("ZSEP23_19")*CLHEP::cm; - m_esep_zsep23 [20] = m_rec->getDouble("ZSEP23_20")*CLHEP::cm; - m_esep_zsep23 [21] = m_rec->getDouble("ZSEP23_21")*CLHEP::cm; + m_esep_zsep23 [0] = m_rec->getDouble("ZSEP23_0")*GeoModelKernelUnits::cm; + m_esep_zsep23 [1] = m_rec->getDouble("ZSEP23_1")*GeoModelKernelUnits::cm; + m_esep_zsep23 [2] = m_rec->getDouble("ZSEP23_2")*GeoModelKernelUnits::cm; + m_esep_zsep23 [3] = m_rec->getDouble("ZSEP23_3")*GeoModelKernelUnits::cm; + m_esep_zsep23 [4] = m_rec->getDouble("ZSEP23_4")*GeoModelKernelUnits::cm; + m_esep_zsep23 [5] = m_rec->getDouble("ZSEP23_5")*GeoModelKernelUnits::cm; + m_esep_zsep23 [6] = m_rec->getDouble("ZSEP23_6")*GeoModelKernelUnits::cm; + m_esep_zsep23 [7] = m_rec->getDouble("ZSEP23_7")*GeoModelKernelUnits::cm; + m_esep_zsep23 [8] = m_rec->getDouble("ZSEP23_8")*GeoModelKernelUnits::cm; + m_esep_zsep23 [9] = m_rec->getDouble("ZSEP23_9")*GeoModelKernelUnits::cm; + m_esep_zsep23 [10] = m_rec->getDouble("ZSEP23_10")*GeoModelKernelUnits::cm; + m_esep_zsep23 [11] = m_rec->getDouble("ZSEP23_11")*GeoModelKernelUnits::cm; + m_esep_zsep23 [12] = m_rec->getDouble("ZSEP23_12")*GeoModelKernelUnits::cm; + m_esep_zsep23 [13] = m_rec->getDouble("ZSEP23_13")*GeoModelKernelUnits::cm; + m_esep_zsep23 [14] = m_rec->getDouble("ZSEP23_14")*GeoModelKernelUnits::cm; + m_esep_zsep23 [15] = m_rec->getDouble("ZSEP23_15")*GeoModelKernelUnits::cm; + m_esep_zsep23 [16] = m_rec->getDouble("ZSEP23_16")*GeoModelKernelUnits::cm; + m_esep_zsep23 [17] = m_rec->getDouble("ZSEP23_17")*GeoModelKernelUnits::cm; + m_esep_zsep23 [18] = m_rec->getDouble("ZSEP23_18")*GeoModelKernelUnits::cm; + m_esep_zsep23 [19] = m_rec->getDouble("ZSEP23_19")*GeoModelKernelUnits::cm; + m_esep_zsep23 [20] = m_rec->getDouble("ZSEP23_20")*GeoModelKernelUnits::cm; + m_esep_zsep23 [21] = m_rec->getDouble("ZSEP23_21")*GeoModelKernelUnits::cm; } } @@ -731,17 +730,17 @@ LArNumberHelper::db_nb_hec() // ---- Set default : /* - m_hec_in0 = 427.70*CLHEP::cm; // z_start - m_hec_in1 = 455.75*CLHEP::cm; // z_start+ 28.05*CLHEP::cm - m_hec_in2 = 513.40*CLHEP::cm; // z_start + 28.05*CLHEP::cm + 26.8*CLHEP::cm + 26.8*CLHEP::cm + 4.05*CLHEP::cm - m_hec_in3 = 562.70*CLHEP::cm; // z_start + 28.05*CLHEP::cm + 26.8*CLHEP::cm + 26.8*CLHEP::cm + 4.05*CLHEP::cm - // + 25.9*CLHEP::cm + 23.4*CLHEP::cm - m_hec_gap = 4.05*CLHEP::cm; // gap between the two HEC wheels + m_hec_in0 = 427.70*GeoModelKernelUnits::cm; // z_start + m_hec_in1 = 455.75*GeoModelKernelUnits::cm; // z_start+ 28.05*GeoModelKernelUnits::cm + m_hec_in2 = 513.40*GeoModelKernelUnits::cm; // z_start + 28.05*GeoModelKernelUnits::cm + 26.8*GeoModelKernelUnits::cm + 26.8*GeoModelKernelUnits::cm + 4.05*GeoModelKernelUnits::cm + m_hec_in3 = 562.70*GeoModelKernelUnits::cm; // z_start + 28.05*GeoModelKernelUnits::cm + 26.8*GeoModelKernelUnits::cm + 26.8*GeoModelKernelUnits::cm + 4.05*GeoModelKernelUnits::cm + // + 25.9*GeoModelKernelUnits::cm + 23.4*GeoModelKernelUnits::cm + m_hec_gap = 4.05*GeoModelKernelUnits::cm; // gap between the two HEC wheels // Comment from Sven Menke : // I don't know why the the Nova Z_end is 2.5cm more, but the active // volume must be the sum of all blocks plus the gap - thus it's 609.5*cm - m_hec_out = 609.5*CLHEP::cm; // z_end - 2.5*CLHEP::cm (or z_orig + all blocks) + m_hec_out = 609.5*GeoModelKernelUnits::cm; // z_end - 2.5*GeoModelKernelUnits::cm (or z_orig + all blocks) */ //std::cout << " ----- in db_nb_hec tags are : " << m_tag << " " << m_node << std::endl; @@ -758,31 +757,31 @@ LArNumberHelper::db_nb_hec() // Block0 = 1.25 cm Front Plate + // 8 times (0.85 cm LAr gap + 2.50 cm Plate) = 28.05 cm double Block0 = ( m_rec->getDouble("PLATE_0")/2. - + 8*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_0")))*CLHEP::cm; + + 8*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_0")))*GeoModelKernelUnits::cm; // HEC1 is Block1 + Block2 // Block1 = 8 times (0.85 cm LAr gap + 2.50 cm Plate) // = 26.80 cm - double Block1 = 8*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_0"))*CLHEP::cm; + double Block1 = 8*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_0"))*GeoModelKernelUnits::cm; double Block2 = Block1 ; // Gap = 4.05 cm - m_hec_gap = m_rec->getDouble("GAPWHL") *CLHEP::cm; + m_hec_gap = m_rec->getDouble("GAPWHL") *GeoModelKernelUnits::cm; // HEC2 is Block 3 + Block 4 // Block3 = 2.5 cm Front Plate + // 4 times (0.85 cm LAr gap + 5.00 cm Plate) = 25.90 cm double Block3 = ( m_rec->getDouble("PLATE_1")/2. - + 4*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_1")))*CLHEP::cm; + + 4*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_1")))*GeoModelKernelUnits::cm; // Block4 = 4 times (0.85 cm LAr gap + 5.00 cm Plate) = 23.40 cm - double Block4 = 4*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_1"))*CLHEP::cm; + double Block4 = 4*(m_rec->getDouble("LARG") + m_rec->getDouble("PLATE_1"))*GeoModelKernelUnits::cm; // HEC3 is Block 5 + Block 6 double Block5 = Block4 ; double Block6 = Block4; - double zstart = m_rec->getDouble("ZSTART") *CLHEP::cm; + double zstart = m_rec->getDouble("ZSTART") *GeoModelKernelUnits::cm; m_hec_in0 = zstart; m_hec_in1 = m_hec_in0 + Block0 ; @@ -1057,10 +1056,10 @@ LArNumberHelper::hard_fcal() // x and y are taken from drawings in the TDR for ( unsigned int i=0; i < m_fcal_id->module_hash_max(); i++ ) { - m_x_min_fcal [i] = 8.6*CLHEP::cm; - m_x_max_fcal [i] = 47.5*CLHEP::cm; + m_x_min_fcal [i] = 8.6*GeoModelKernelUnits::cm; + m_x_max_fcal [i] = 47.5*GeoModelKernelUnits::cm; m_y_min_fcal [i] = 8.6; - m_y_max_fcal [i] = 47.5*CLHEP::cm; + m_y_max_fcal [i] = 47.5*GeoModelKernelUnits::cm; m_phi_min_fcal[i] = 0.; m_phi_max_fcal[i] = 6.28; // when too close to 2pi pb @@ -1070,35 +1069,35 @@ LArNumberHelper::hard_fcal() //int pos_neg = m_fcal_id->pos_neg (m_region_id_fcal[i]); if ( mod == 1 ) { - m_dx_fcal [i] = 3.*CLHEP::cm; - m_dy_fcal [i] = 2.598*CLHEP::cm; - z_loc_in [0] = 466.85*CLHEP::cm; - z_loc_out [0] = z_loc_in [0]+45.*CLHEP::cm; + m_dx_fcal [i] = 3.*GeoModelKernelUnits::cm; + m_dy_fcal [i] = 2.598*GeoModelKernelUnits::cm; + z_loc_in [0] = 466.85*GeoModelKernelUnits::cm; + z_loc_out [0] = z_loc_in [0]+45.*GeoModelKernelUnits::cm; } else if ( mod == 2 ) { - m_dx_fcal [i] = 3.272*CLHEP::cm; - m_dy_fcal [i] = 4.25*CLHEP::cm; - z_loc_in [0] = 512.3*CLHEP::cm; - z_loc_out [0] = z_loc_in [0]+45.*CLHEP::cm; + m_dx_fcal [i] = 3.272*GeoModelKernelUnits::cm; + m_dy_fcal [i] = 4.25*GeoModelKernelUnits::cm; + z_loc_in [0] = 512.3*GeoModelKernelUnits::cm; + z_loc_out [0] = z_loc_in [0]+45.*GeoModelKernelUnits::cm; } else if ( mod == 3 ) { - m_dx_fcal [i] = 5.4*CLHEP::cm; - m_dy_fcal [i] = 4.677*CLHEP::cm; - z_loc_in [0] = 559.75*CLHEP::cm; - z_loc_out [0] = z_loc_in [0]+45.*CLHEP::cm; + m_dx_fcal [i] = 5.4*GeoModelKernelUnits::cm; + m_dy_fcal [i] = 4.677*GeoModelKernelUnits::cm; + z_loc_in [0] = 559.75*GeoModelKernelUnits::cm; + z_loc_out [0] = z_loc_in [0]+45.*GeoModelKernelUnits::cm; } else { m_dx_fcal [i] = 0.; m_dy_fcal [i] = 0.; z_loc_in [0] = 0.; - z_loc_out [0] = z_loc_in [0]+45.*CLHEP::cm; + z_loc_out [0] = z_loc_in [0]+45.*GeoModelKernelUnits::cm; } m_z_min_fcal [i] = z_loc_in [0]; - m_z_max_fcal [i] = m_z_min_fcal [i] + 45.*CLHEP::cm ; + m_z_max_fcal [i] = m_z_min_fcal [i] + 45.*GeoModelKernelUnits::cm ; double z = m_z_min_fcal [i]; double r = m_x_max_fcal [i]; @@ -1125,21 +1124,21 @@ LArNumberHelper::sagging_param( std::vector<double>& Rhocen, std::vector<double> if (m_lar->size()) { m_rec = (*m_lar)[0]; - Rhocen.push_back(m_rec->getDouble("RHOCEN_0")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_1")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_2")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_3")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_4")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_5")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_6")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_7")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_8")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_9")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_10")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_11")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_12")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_13")*CLHEP::cm); - Rhocen.push_back(m_rec->getDouble("RHOCEN_14")*CLHEP::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_0")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_1")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_2")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_3")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_4")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_5")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_6")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_7")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_8")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_9")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_10")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_11")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_12")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_13")*GeoModelKernelUnits::cm); + Rhocen.push_back(m_rec->getDouble("RHOCEN_14")*GeoModelKernelUnits::cm); } m_lar = m_iAccessSvc->getRecordsetPtr("BarrelSagging",m_tag,m_node); @@ -1147,21 +1146,21 @@ LArNumberHelper::sagging_param( std::vector<double>& Rhocen, std::vector<double> if (m_lar->size()) { m_rec = (*m_lar)[0]; - Sag.push_back(m_rec->getDouble("SAG_0")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_1")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_2")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_3")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_4")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_5")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_6")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_7")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_8")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_9")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_10")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_11")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_12")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_13")*CLHEP::cm); - Sag.push_back(m_rec->getDouble("SAG_14")*CLHEP::cm); + Sag.push_back(m_rec->getDouble("SAG_0")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_1")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_2")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_3")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_4")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_5")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_6")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_7")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_8")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_9")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_10")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_11")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_12")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_13")*GeoModelKernelUnits::cm); + Sag.push_back(m_rec->getDouble("SAG_14")*GeoModelKernelUnits::cm); } diff --git a/LArCalorimeter/LArDetDescr/src/LArRecoMaterialTool.cxx b/LArCalorimeter/LArDetDescr/src/LArRecoMaterialTool.cxx index 4e6a5b1b37b..c2ce91bbfa0 100755 --- a/LArCalorimeter/LArDetDescr/src/LArRecoMaterialTool.cxx +++ b/LArCalorimeter/LArDetDescr/src/LArRecoMaterialTool.cxx @@ -19,6 +19,7 @@ #include "GeoModelUtilities/StoredPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" +#include "GeoModelKernel/Units.h" #include "CaloIdentifier/CaloIdManager.h" #include "CaloIdentifier/CaloCell_ID.h" @@ -342,7 +343,7 @@ LArRecoMaterialTool::ScanCRYO(CaloSubdetNames::ALIGNVOL alvol, childX0, childDeDx, childAverageA, childAverageZ, childRho ); - mass = childMass/CLHEP::gram; + mass = childMass/GeoModelKernelUnits::gram; x0 = childX0; dEdx = childDeDx; aveA = childAverageA; @@ -501,7 +502,7 @@ LArRecoMaterialTool::ScanPS(CaloSubdetNames::ALIGNVOL alvol, childX0, childDeDx, childAverageA, childAverageZ, childRho ); - mass = childMass*(1./CLHEP::gram); + mass = childMass*(1./GeoModelKernelUnits::gram); x0 = childX0; dEdx = childDeDx; aveA = childAverageA; @@ -656,7 +657,7 @@ LArRecoMaterialTool::ScanEMB(CaloSubdetNames::ALIGNVOL alvol, childX0, childDeDx, childAverageA, childAverageZ, childRho ); - mass = childMass*(1./CLHEP::gram); + mass = childMass*(1./GeoModelKernelUnits::gram); x0 = childX0; dEdx = childDeDx; aveA = childAverageA; @@ -852,7 +853,7 @@ LArRecoMaterialTool::ScanHEC(CaloSubdetNames::ALIGNVOL alvol, childX0, childDeDx, childAverageA, childAverageZ, childRho ); - mass = childMass*(1./CLHEP::gram); + mass = childMass*(1./GeoModelKernelUnits::gram); x0 = childX0; dEdx = childDeDx; aveA = childAverageA; @@ -1030,7 +1031,7 @@ LArRecoMaterialTool::ScanFCAL(CaloSubdetNames::ALIGNVOL alvol, childX0, childDeDx, childAverageA, childAverageZ, childRho ); - mass = childMass*(1./CLHEP::gram); + mass = childMass*(1./GeoModelKernelUnits::gram); x0 = childX0; dEdx = childDeDx; aveA = childAverageA; @@ -1096,13 +1097,13 @@ LArRecoMaterialTool::addMaterialFraction(const GeoLogVol& geoVol, double fraction = childMaterial->getFraction(iEl); ATH_MSG_DEBUG (" direct child : " << geoEl->getName() << " fraction = " << fraction - << " A= " << geoEl->getA()*(1./CLHEP::gram) << " Z= " << geoEl->getZ()); + << " A= " << geoEl->getA()*(1./GeoModelKernelUnits::gram) << " Z= " << geoEl->getZ()); volume.push_back(fraction*childVolume); mass.push_back(fraction*childVolume*childRho); x0.push_back(fraction*childX0); dEdX.push_back(fraction*childDeDx); - aveA.push_back(fraction*(geoEl->getA()*(1./CLHEP::gram))); + aveA.push_back(fraction*(geoEl->getA()*(1./GeoModelKernelUnits::gram))); aveZ.push_back(fraction*(geoEl->getZ())); } @@ -1145,12 +1146,12 @@ LArRecoMaterialTool::averageFraction (std::vector<double>& volumeFractions, childAverageZ += massfrac * averageZFractions[ivolfrac]; } - childRho = childMass/(CLHEP::gram*childVolume); + childRho = childMass/(GeoModelKernelUnits::gram*childVolume); ATH_MSG_DEBUG (""); ATH_MSG_DEBUG (" + averaged over " << parsedVolumes << " volumes "); ATH_MSG_DEBUG (" - volume [mm^3] : " << childVolume); - ATH_MSG_DEBUG (" - mass [gram] : " << childMass*(1./CLHEP::gram)); + ATH_MSG_DEBUG (" - mass [gram] : " << childMass*(1./GeoModelKernelUnits::gram)); ATH_MSG_DEBUG (" - rho [gram/mm^3] : " << childRho); ATH_MSG_DEBUG (" - X0 : " << childX0); ATH_MSG_DEBUG (" - DeDx : " << childDeDx); diff --git a/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx b/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx index 3ecf687c3a2..7019b56fcf5 100755 --- a/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx +++ b/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx @@ -20,8 +20,6 @@ #include "CaloDetDescr/CaloDetDescriptor.h" #include "CaloGeoHelpers/CaloPhiRange.h" -#include "CLHEP/Units/SystemOfUnits.h" - #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" @@ -29,6 +27,8 @@ #include "GeoModelUtilities/DecodeVersionKey.h" #include "GeoModelUtilities/StoredPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" @@ -155,9 +155,7 @@ LArRecoSimpleGeomTool::get_cylinder_surface (CaloSubdetNames::ALIGNVOL alvol, } GeoFullPhysVol* fullPV = storedPV->getPhysVol(); - //const AMG::Transform3D trf_eigen=fullPV->get - htrans = Amg::CLHEPTransformToEigen(fullPV->getAbsoluteTransform())* - Amg::CLHEPTransformToEigen(fullPV->getDefAbsoluteTransform()).inverse(); + htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse(); hphi = m_phi_range.twopi(); @@ -172,17 +170,17 @@ LArRecoSimpleGeomTool::get_cylinder_surface (CaloSubdetNames::ALIGNVOL alvol, if (lar->size()<14) return false; const IRDBRecord* rec = (*lar)[11]; - rad = rec->getDouble("RMIN")*CLHEP::cm; - len = rec->getDouble("DZ")*CLHEP::cm /2.; - dep = rec->getDouble("DR")*CLHEP::cm; + rad = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + len = rec->getDouble("DZ")*GeoModelKernelUnits::cm /2.; + dep = rec->getDouble("DR")*GeoModelKernelUnits::cm; rec = (*lar)[12]; - dep = dep +rec->getDouble("DR")*CLHEP::cm; + dep = dep +rec->getDouble("DR")*GeoModelKernelUnits::cm; rec = (*lar)[13]; - dep = dep +rec->getDouble("DR")*CLHEP::cm; + dep = dep +rec->getDouble("DR")*GeoModelKernelUnits::cm; - //rad = 124.18*CLHEP::cm; - //dep = (.305 + 1.38 + .47 )*CLHEP::cm; - //len = 270.*CLHEP::cm; + //rad = 124.18*GeoModelKernelUnits::cm; + //dep = (.305 + 1.38 + .47 )*GeoModelKernelUnits::cm; + //len = 270.*GeoModelKernelUnits::cm; radius.push_back( rad + dep/2.); depth.push_back( dep/2. ); @@ -199,13 +197,13 @@ LArRecoSimpleGeomTool::get_cylinder_surface (CaloSubdetNames::ALIGNVOL alvol, // CryoMother nb 10 const IRDBRecord* rec = (*lar)[10]; - rad = rec->getDouble("RMIN")*CLHEP::cm; - len = rec->getDouble("DZ")*CLHEP::cm /2.; - dep = rec->getDouble("DR")*CLHEP::cm; + rad = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + len = rec->getDouble("DZ")*GeoModelKernelUnits::cm /2.; + dep = rec->getDouble("DR")*GeoModelKernelUnits::cm; - //rad = 122.9*CLHEP::cm; - //dep = 1.28*CLHEP::cm; - //len = 270.*CLHEP::cm; + //rad = 122.9*GeoModelKernelUnits::cm; + //dep = 1.28*GeoModelKernelUnits::cm; + //len = 270.*GeoModelKernelUnits::cm; radius.push_back( rad + dep/2. ); depth.push_back( dep /2.); @@ -213,13 +211,13 @@ LArRecoSimpleGeomTool::get_cylinder_surface (CaloSubdetNames::ALIGNVOL alvol, // CryoMother nb 14 rec = (*lar)[14]; - rad = rec->getDouble("RMIN")*CLHEP::cm; - len = rec->getDouble("DZ")*CLHEP::cm /2.; - dep = rec->getDouble("DR")*CLHEP::cm; + rad = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + len = rec->getDouble("DZ")*GeoModelKernelUnits::cm /2.; + dep = rec->getDouble("DR")*GeoModelKernelUnits::cm; - //rad = 126.335*CLHEP::cm; - //dep = 1.2*CLHEP::cm; - //len = 284.*CLHEP::cm; + //rad = 126.335*GeoModelKernelUnits::cm; + //dep = 1.2*GeoModelKernelUnits::cm; + //len = 284.*GeoModelKernelUnits::cm; radius.push_back( rad + dep/2.); depth.push_back( dep /2.); @@ -227,13 +225,13 @@ LArRecoSimpleGeomTool::get_cylinder_surface (CaloSubdetNames::ALIGNVOL alvol, // CryoMother nb 0 rec = (*lar)[0]; - rad = rec->getDouble("RMIN")*CLHEP::cm; - len = rec->getDouble("DZ")*CLHEP::cm /2.; - dep = rec->getDouble("DR")*CLHEP::cm; + rad = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + len = rec->getDouble("DZ")*GeoModelKernelUnits::cm /2.; + dep = rec->getDouble("DR")*GeoModelKernelUnits::cm; //rad = 2140*mm; //dep = 30*mm; - //len = 299.6*CLHEP::cm; + //len = 299.6*GeoModelKernelUnits::cm; radius.push_back( rad + dep/2. ); depth.push_back( dep /2.); @@ -241,13 +239,13 @@ LArRecoSimpleGeomTool::get_cylinder_surface (CaloSubdetNames::ALIGNVOL alvol, // CryoMother nb 5 rec = (*lar)[5]; - rad = rec->getDouble("RMIN")*CLHEP::cm; - len = rec->getDouble("DZ")*CLHEP::cm /2.; - dep = rec->getDouble("DR")*CLHEP::cm; + rad = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + len = rec->getDouble("DZ")*GeoModelKernelUnits::cm /2.; + dep = rec->getDouble("DR")*GeoModelKernelUnits::cm; //rad = 2220*mm; //dep = 30*mm; - //len = 285*CLHEP::cm; + //len = 285*GeoModelKernelUnits::cm; radius.push_back( rad + dep/2. ); depth.push_back( dep /2.); @@ -264,18 +262,18 @@ LArRecoSimpleGeomTool::get_cylinder_surface (CaloSubdetNames::ALIGNVOL alvol, if (lar->size()==0) return false; const IRDBRecord* rec = (*lar)[0]; - rad = rec->getDouble("RMIN")*CLHEP::cm; - dep = rec->getDouble("RMAX")*CLHEP::cm - rad; + rad = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + dep = rec->getDouble("RMAX")*GeoModelKernelUnits::cm - rad; lar = m_recBarrGeo; if ( !lar || lar->size()==0) return false; rec = (*lar)[0]; - len = rec->getDouble("ZMAX")*CLHEP::cm; + len = rec->getDouble("ZMAX")*GeoModelKernelUnits::cm; - //rad = 138.5*CLHEP::cm; - //dep = (144.7 - 138.5)*CLHEP::cm; - //len = 316.5*CLHEP::cm; + //rad = 138.5*GeoModelKernelUnits::cm; + //dep = (144.7 - 138.5)*GeoModelKernelUnits::cm; + //len = 316.5*GeoModelKernelUnits::cm; radius.push_back( rad + dep/2.); depth.push_back( dep /2.); @@ -292,13 +290,13 @@ LArRecoSimpleGeomTool::get_cylinder_surface (CaloSubdetNames::ALIGNVOL alvol, if (lar->size()==0) return false; const IRDBRecord* rec = (*lar)[0]; - rad = rec->getDouble("RMIN")*CLHEP::cm; - dep = rec->getDouble("RMAX")*CLHEP::cm - rad; - len = rec->getDouble("ZMAX")*CLHEP::cm; + rad = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + dep = rec->getDouble("RMAX")*GeoModelKernelUnits::cm - rad; + len = rec->getDouble("ZMAX")*GeoModelKernelUnits::cm; - //rad = 1447.3*CLHEP::cm; - //dep = (2003.35 - 1447.3)*CLHEP::cm; - //len = 316.5*CLHEP::cm; + //rad = 1447.3*GeoModelKernelUnits::cm; + //dep = (2003.35 - 1447.3)*GeoModelKernelUnits::cm; + //len = 316.5*GeoModelKernelUnits::cm; radius.push_back( rad + dep/2.); depth.push_back( dep /2.); @@ -335,10 +333,7 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, } GeoFullPhysVol* fullPV = storedPV->getPhysVol(); - //htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse(); - htrans = Amg::CLHEPTransformToEigen(fullPV->getAbsoluteTransform())* - Amg::CLHEPTransformToEigen(fullPV->getDefAbsoluteTransform()).inverse(); - + htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse(); hphi = m_phi_range.twopi(); z.clear(); @@ -358,16 +353,16 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, const IRDBRecord* rec = (*lar)[49]; - ri = rec->getDouble("RMIN")*CLHEP::cm; - ra = ri + rec->getDouble("DR")*CLHEP::cm; - dep = rec->getDouble("DZ")*CLHEP::cm; - zcent = rec->getDouble("ZMIN")*CLHEP::cm + dep/2.; + ri = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + ra = ri + rec->getDouble("DR")*GeoModelKernelUnits::cm; + dep = rec->getDouble("DZ")*GeoModelKernelUnits::cm; + zcent = rec->getDouble("ZMIN")*GeoModelKernelUnits::cm + dep/2.; if (alvol == CaloSubdetNames::LARCRYO_EC_NEG) zcent = -1. * zcent; - //ri = 22.1*CLHEP::cm; - //ra = (22.1 + 194.4)*CLHEP::cm; - //dep = 6.5*CLHEP::cm; - //zcent = (356.1 + dep/2.)*CLHEP::cm; + //ri = 22.1*GeoModelKernelUnits::cm; + //ra = (22.1 + 194.4)*GeoModelKernelUnits::cm; + //dep = 6.5*GeoModelKernelUnits::cm; + //zcent = (356.1 + dep/2.)*GeoModelKernelUnits::cm; rmin.push_back( ri ); rmax.push_back( ra ); @@ -377,16 +372,16 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, // DDDb : LAr / CryoCylinders / Endcap nb 6 rec = (*lar)[44]; - ri = rec->getDouble("RMIN")*CLHEP::cm; - ra = ri + rec->getDouble("DR")*CLHEP::cm; - dep = rec->getDouble("DZ")*CLHEP::cm; - zcent = rec->getDouble("ZMIN")*CLHEP::cm + dep/2.; + ri = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + ra = ri + rec->getDouble("DR")*GeoModelKernelUnits::cm; + dep = rec->getDouble("DZ")*GeoModelKernelUnits::cm; + zcent = rec->getDouble("ZMIN")*GeoModelKernelUnits::cm + dep/2.; if (alvol == CaloSubdetNames::LARCRYO_EC_NEG) zcent = -1. * zcent; - //ri = 79.*CLHEP::cm; - //ra = (ri + 173.)*CLHEP::cm; - //dep = 6.*CLHEP::cm; - //zcent = (660.5 + dep/2.)*CLHEP::cm; + //ri = 79.*GeoModelKernelUnits::cm; + //ra = (ri + 173.)*GeoModelKernelUnits::cm; + //dep = 6.*GeoModelKernelUnits::cm; + //zcent = (660.5 + dep/2.)*GeoModelKernelUnits::cm; rmin.push_back( ri ); rmax.push_back( ra ); @@ -404,16 +399,16 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, const IRDBRecord* rec = (*lar)[0]; - ri = rec->getDouble("RMIN")*CLHEP::cm; - ra = rec->getDouble("RMAX")*CLHEP::cm; - dep = rec->getDouble("TCK")*CLHEP::cm; - zcent = rec->getDouble("ZPOS")*CLHEP::cm + dep/2.; + ri = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + ra = rec->getDouble("RMAX")*GeoModelKernelUnits::cm; + dep = rec->getDouble("TCK")*GeoModelKernelUnits::cm; + zcent = rec->getDouble("ZPOS")*GeoModelKernelUnits::cm + dep/2.; if (alvol == CaloSubdetNames::PRESAMPLER_EC_NEG) zcent = -1. * zcent; - //ri = 123.174*CLHEP::cm; - //ra = 170.2*CLHEP::cm; - //dep = 0.4*CLHEP::cm; - //zcent = (362.4 + dep/2.)*CLHEP::cm; + //ri = 123.174*GeoModelKernelUnits::cm; + //ra = 170.2*GeoModelKernelUnits::cm; + //dep = 0.4*GeoModelKernelUnits::cm; + //zcent = (362.4 + dep/2.)*GeoModelKernelUnits::cm; rmin.push_back( ri ); rmax.push_back( ra ); @@ -431,16 +426,16 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, const IRDBRecord* rec = (*lar)[0]; - ri = rec->getDouble("RMIN")*CLHEP::cm; - ra = rec->getDouble("RMAX")*CLHEP::cm; - dep = rec->getDouble("ETOT")*CLHEP::cm; - zcent = rec->getDouble("Z1")*CLHEP::cm + dep/2.; + ri = rec->getDouble("RMIN")*GeoModelKernelUnits::cm; + ra = rec->getDouble("RMAX")*GeoModelKernelUnits::cm; + dep = rec->getDouble("ETOT")*GeoModelKernelUnits::cm; + zcent = rec->getDouble("Z1")*GeoModelKernelUnits::cm + dep/2.; if (alvol == CaloSubdetNames::EMEC_NEG) zcent = -1. * zcent; - //ri = 29.*CLHEP::cm; - //ra = 210.*CLHEP::cm; - //dep = 53.6*CLHEP::cm; - //zcent = (369.1 + dep/2.)*CLHEP::cm; + //ri = 29.*GeoModelKernelUnits::cm; + //ra = 210.*GeoModelKernelUnits::cm; + //dep = 53.6*GeoModelKernelUnits::cm; + //zcent = (369.1 + dep/2.)*GeoModelKernelUnits::cm; rmin.push_back( ri ); rmax.push_back( ra ); @@ -459,19 +454,19 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, const IRDBRecord* rec = (*lar)[0]; - ri = rec->getDouble("ROORIG")*CLHEP::cm; - ra = rec->getDouble("REND")*CLHEP::cm; + ri = rec->getDouble("ROORIG")*GeoModelKernelUnits::cm; + ra = rec->getDouble("REND")*GeoModelKernelUnits::cm; // Block0+Block1+Block2 dep = rec->getDouble("PLATE_0")/2. + 3*8*(rec->getDouble("LARG") + rec->getDouble("PLATE_0")); - dep = dep*CLHEP::cm; - zcent = rec->getDouble("ZSTART")*CLHEP::cm + dep/2.; + dep = dep*GeoModelKernelUnits::cm; + zcent = rec->getDouble("ZSTART")*GeoModelKernelUnits::cm + dep/2.; if (alvol == CaloSubdetNames::HEC1_NEG) zcent = -1. * zcent; - //ri = 37.2*CLHEP::cm; - //ra = 213.0*CLHEP::cm; - //dep = (513.4 - 4.05 - 427.7)*CLHEP::cm; - //zcent = 427.7*CLHEP::cm; + //ri = 37.2*GeoModelKernelUnits::cm; + //ra = 213.0*GeoModelKernelUnits::cm; + //dep = (513.4 - 4.05 - 427.7)*GeoModelKernelUnits::cm; + //zcent = 427.7*GeoModelKernelUnits::cm; rmin.push_back( ri ); rmax.push_back( ra ); @@ -491,24 +486,24 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, const IRDBRecord* rec = (*lar)[0]; - ri = rec->getDouble("ROORIG")*CLHEP::cm; - ra = rec->getDouble("REND")*CLHEP::cm; + ri = rec->getDouble("ROORIG")*GeoModelKernelUnits::cm; + ra = rec->getDouble("REND")*GeoModelKernelUnits::cm; // Block 3 + Block 4 + Block 5 + Block 6 dep = rec->getDouble("PLATE_1")/2. + 4*4*(rec->getDouble("LARG") + rec->getDouble("PLATE_1")); - dep = dep*CLHEP::cm; + dep = dep*GeoModelKernelUnits::cm; // start+depth of HEC1 + gap zcent = rec->getDouble("ZSTART") + rec->getDouble("PLATE_0")/2. + 3*8*(rec->getDouble("LARG") + rec->getDouble("PLATE_0")) + rec->getDouble("GAPWHL") ; - zcent = zcent*CLHEP::cm + dep/2.; + zcent = zcent*GeoModelKernelUnits::cm + dep/2.; if (alvol == CaloSubdetNames::HEC2_NEG) zcent = -1. * zcent; - //ri = 37.2*CLHEP::cm; - //ra = 213.0*CLHEP::cm; - //dep = (609.5 - 513.4)*CLHEP::cm; - //zcent = (513.4 + dep/2.)*CLHEP::cm; + //ri = 37.2*GeoModelKernelUnits::cm; + //ra = 213.0*GeoModelKernelUnits::cm; + //dep = (609.5 - 513.4)*GeoModelKernelUnits::cm; + //zcent = (513.4 + dep/2.)*GeoModelKernelUnits::cm; rmin.push_back( ri ); rmax.push_back( ra ); @@ -522,15 +517,15 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, // see LArNumberHelper - nb = 8.6*CLHEP::cm; + nb = 8.6*GeoModelKernelUnits::cm; rmin.push_back( nb ); - nb = 47.5*CLHEP::cm; + nb = 47.5*GeoModelKernelUnits::cm; rmax.push_back( nb ); - nb = 45.*CLHEP::cm; + nb = 45.*GeoModelKernelUnits::cm; depth.push_back( nb/2. ); - nb = (466.85 + nb/2. )*CLHEP::cm; + nb = (466.85 + nb/2. )*GeoModelKernelUnits::cm; if (alvol == CaloSubdetNames::FCAL1_NEG) nb = -1. * nb; z.push_back( nb ); @@ -541,15 +536,15 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, // see LArNumberHelper - nb = 8.6*CLHEP::cm; + nb = 8.6*GeoModelKernelUnits::cm; rmin.push_back( nb ); - nb = 47.5*CLHEP::cm; + nb = 47.5*GeoModelKernelUnits::cm; rmax.push_back( nb ); - nb = 45.*CLHEP::cm; + nb = 45.*GeoModelKernelUnits::cm; depth.push_back( nb/2. ); - nb = (512.3 + nb/2. )*CLHEP::cm; + nb = (512.3 + nb/2. )*GeoModelKernelUnits::cm; if (alvol == CaloSubdetNames::FCAL2_NEG) nb = -1. * nb; z.push_back( nb ); @@ -560,15 +555,15 @@ LArRecoSimpleGeomTool::get_disk_surface (CaloSubdetNames::ALIGNVOL alvol, // see LArNumberHelper - nb = 8.6*CLHEP::cm; + nb = 8.6*GeoModelKernelUnits::cm; rmin.push_back( nb ); - nb = 47.5*CLHEP::cm; + nb = 47.5*GeoModelKernelUnits::cm; rmax.push_back( nb ); - nb = 45.*CLHEP::cm; + nb = 45.*GeoModelKernelUnits::cm; depth.push_back( nb/2. ); - nb = (559.75 + nb/2. )*CLHEP::cm; + nb = (559.75 + nb/2. )*GeoModelKernelUnits::cm; if (alvol == CaloSubdetNames::FCAL3_NEG) nb = -1. * nb; z.push_back( nb ); @@ -605,10 +600,7 @@ LArRecoSimpleGeomTool::ScanBarrelCryo(CaloSubdetNames::ALIGNVOL alvol, } GeoFullPhysVol* fullPV = storedPV->getPhysVol(); - htrans = Amg::CLHEPTransformToEigen(fullPV->getAbsoluteTransform())* - Amg::CLHEPTransformToEigen(fullPV->getDefAbsoluteTransform()).inverse(); - - //htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse(); + htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse(); hphi = m_phi_range.twopi(); radius.clear(); @@ -640,9 +632,7 @@ LArRecoSimpleGeomTool::ScanEMB(CaloSubdetNames::ALIGNVOL alvol, } GeoFullPhysVol* fullPV = storedPV->getPhysVol(); - //htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse(); - htrans = Amg::CLHEPTransformToEigen(fullPV->getAbsoluteTransform())* - Amg::CLHEPTransformToEigen(fullPV->getDefAbsoluteTransform()).inverse(); + htrans = fullPV->getAbsoluteTransform()*fullPV->getDefAbsoluteTransform().inverse(); hphi = m_phi_range.twopi(); radius.clear(); diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt index ad1415072a1..64fea221b12 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt @@ -10,8 +10,8 @@ atlas_depends_on_subdirs( PUBLIC GaudiKernel PRIVATE Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoSpecialShapes + DetectorDescription/GeoPrimitives LArCalorimeter/LArG4/LArG4Code LArCalorimeter/LArG4/LArG4ShowerLibSvc LArCalorimeter/LArGeoModel/LArReadoutGeometry @@ -24,6 +24,7 @@ find_package( Geant4 ) find_package( HepMC ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread Table MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 ) find_package( XercesC ) +find_package( GeoModel ) # tag ROOTBasicLibs was not recognized in automatic conversion in cmt2cmake @@ -33,8 +34,8 @@ find_package( XercesC ) atlas_add_component( LArG4FastSimulation src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} GaudiKernel StoreGateLib SGtests GeoModelKernel GeoSpecialShapes LArG4Code LArReadoutGeometry LArSimEvent G4AtlasToolsLib ) + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${GEOMODEL_LIBRARIES} GaudiKernel StoreGateLib SGtests GeoSpecialShapes LArG4Code LArReadoutGeometry LArSimEvent G4AtlasToolsLib GeoPrimitives ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/src/BarrelFastSimDedicatedSD.cxx b/LArCalorimeter/LArG4/LArG4FastSimulation/src/BarrelFastSimDedicatedSD.cxx index 8e424d99fc4..14e2c54e6c3 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimulation/src/BarrelFastSimDedicatedSD.cxx +++ b/LArCalorimeter/LArG4/LArG4FastSimulation/src/BarrelFastSimDedicatedSD.cxx @@ -11,6 +11,9 @@ #include "LArReadoutGeometry/GeoStraightAccSection.h" #include "LArG4Code/EnergySpot.h" #include "StoreGate/StoreGateSvc.h" +#include "CLHEP/Geometry/Point3D.h" +#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" using HepGeom::Point3D; using HepGeom::Transform3D; @@ -37,8 +40,8 @@ void BarrelFastSimDedicatedSD::ProcessSpot(const EnergySpot & spot){ // Fill the identifier. Point3D<double> globalPosition=spot.GetPosition(); - static Transform3D xfNeg = m_embManager->getDetectorRegion(0,0,0)->getAbsoluteTransform().inverse(); - static Transform3D xfPos = m_embManager->getDetectorRegion(1,0,0)->getAbsoluteTransform().inverse(); + static Transform3D xfNeg = Amg::EigenTransformToCLHEP(m_embManager->getDetectorRegion(0,0,0)->getAbsoluteTransform().inverse()); + static Transform3D xfPos = Amg::EigenTransformToCLHEP(m_embManager->getDetectorRegion(1,0,0)->getAbsoluteTransform().inverse()); Point3D<double> localPosition = globalPosition.z()<0 ? xfNeg*globalPosition : xfPos*globalPosition; int zIndex = globalPosition.z() <0 ? 0:1; diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/src/EndcapFastSimDedicatedSD.cxx b/LArCalorimeter/LArG4/LArG4FastSimulation/src/EndcapFastSimDedicatedSD.cxx index 4b8f0082eb0..f8d45b35822 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimulation/src/EndcapFastSimDedicatedSD.cxx +++ b/LArCalorimeter/LArG4/LArG4FastSimulation/src/EndcapFastSimDedicatedSD.cxx @@ -11,6 +11,9 @@ #include "LArSimEvent/LArHitContainer.h" #include "GeoSpecialShapes/LArWheelCalculator.h" #include "StoreGate/StoreGateSvc.h" +#include "CLHEP/Geometry/Point3D.h" +#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" using HepGeom::Point3D; using HepGeom::Transform3D; @@ -40,8 +43,8 @@ void EndcapFastSimDedicatedSD::ProcessSpot(const EnergySpot & spot){ // Fill the identifier. Point3D<double> globalPosition=spot.GetPosition(); - static Transform3D xfPos = m_emecManager->getDetectorRegion(1,1,0,0)->getAbsoluteTransform().inverse(); - static Transform3D xfNeg = m_emecManager->getDetectorRegion(0,1,0,0)->getAbsoluteTransform().inverse(); + static Transform3D xfPos = Amg::EigenTransformToCLHEP(m_emecManager->getDetectorRegion(1,1,0,0)->getAbsoluteTransform().inverse()); + static Transform3D xfNeg = Amg::EigenTransformToCLHEP(m_emecManager->getDetectorRegion(0,1,0,0)->getAbsoluteTransform().inverse()); Point3D<double> localPosition = globalPosition.z()<0 ? xfNeg*globalPosition : xfPos*globalPosition; diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/src/FCALFastSimDedicatedSD.cxx b/LArCalorimeter/LArG4/LArG4FastSimulation/src/FCALFastSimDedicatedSD.cxx index 9b3847a23f4..8bf38caf18f 100644 --- a/LArCalorimeter/LArG4/LArG4FastSimulation/src/FCALFastSimDedicatedSD.cxx +++ b/LArCalorimeter/LArG4/LArG4FastSimulation/src/FCALFastSimDedicatedSD.cxx @@ -11,6 +11,9 @@ #include "LArSimEvent/LArHitContainer.h" #include "GeoModelKernel/GeoTubs.h" #include "StoreGate/StoreGateSvc.h" +#include "CLHEP/Geometry/Transform3D.h" +#include "CLHEP/Geometry/Point3D.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" using HepGeom::Transform3D; using HepGeom::Point3D; @@ -31,14 +34,14 @@ void FCALFastSimDedicatedSD::ProcessSpot(const EnergySpot & spot){ // Fill the identifier. static Transform3D xfNeg[3] = { - m_fcalManager->getFCAL(FCALModule::Module(1),FCALModule::Endcap(0))->getAbsoluteTransform().inverse(), - m_fcalManager->getFCAL(FCALModule::Module(2),FCALModule::Endcap(0))->getAbsoluteTransform().inverse(), - m_fcalManager->getFCAL(FCALModule::Module(3),FCALModule::Endcap(0))->getAbsoluteTransform().inverse()}; + Amg::EigenTransformToCLHEP(m_fcalManager->getFCAL(FCALModule::Module(1),FCALModule::Endcap(0))->getAbsoluteTransform().inverse()), + Amg::EigenTransformToCLHEP(m_fcalManager->getFCAL(FCALModule::Module(2),FCALModule::Endcap(0))->getAbsoluteTransform().inverse()), + Amg::EigenTransformToCLHEP(m_fcalManager->getFCAL(FCALModule::Module(3),FCALModule::Endcap(0))->getAbsoluteTransform().inverse())}; static Transform3D xfPos[3] = { - m_fcalManager->getFCAL(FCALModule::Module(1),FCALModule::Endcap(1))->getAbsoluteTransform().inverse(), - m_fcalManager->getFCAL(FCALModule::Module(2),FCALModule::Endcap(1))->getAbsoluteTransform().inverse(), - m_fcalManager->getFCAL(FCALModule::Module(3),FCALModule::Endcap(1))->getAbsoluteTransform().inverse()}; + Amg::EigenTransformToCLHEP(m_fcalManager->getFCAL(FCALModule::Module(1),FCALModule::Endcap(1))->getAbsoluteTransform().inverse()), + Amg::EigenTransformToCLHEP(m_fcalManager->getFCAL(FCALModule::Module(2),FCALModule::Endcap(1))->getAbsoluteTransform().inverse()), + Amg::EigenTransformToCLHEP(m_fcalManager->getFCAL(FCALModule::Module(3),FCALModule::Endcap(1))->getAbsoluteTransform().inverse())}; static const GeoTubs * fcalTubs[3] = { (const GeoTubs *) m_fcalManager->getFCAL(FCALModule::Module(1),FCALModule::Endcap(0))->getMaterialGeom()->getLogVol()->getShape(), diff --git a/LArCalorimeter/LArG4/LArG4Validation/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4Validation/CMakeLists.txt index 9bc68503a7b..7195106ef90 100644 --- a/LArCalorimeter/LArG4/LArG4Validation/CMakeLists.txt +++ b/LArCalorimeter/LArG4/LArG4Validation/CMakeLists.txt @@ -15,7 +15,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Control/StoreGate DetectorDescription/GeoModel/GeoAdaptors - DetectorDescription/GeoModel/GeoModelKernel Event/EventInfo Generators/GeneratorObjects LArCalorimeter/LArSimEvent @@ -32,8 +31,8 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) atlas_add_component( LArG4Validation src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel CaloDetDescrLib CaloIdentifier AthenaBaseComps StoreGateLib SGtests GeoAdaptors GeoModelKernel EventInfo GeneratorObjects LArSimEvent MagFieldInterfaces egammaEvent ) + INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel CaloDetDescrLib CaloIdentifier AthenaBaseComps StoreGateLib SGtests GeoAdaptors EventInfo GeneratorObjects LArSimEvent MagFieldInterfaces egammaEvent ) # Install files from the package: atlas_install_headers( LArG4Validation ) diff --git a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoXPEngine.cxx b/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.cxx similarity index 98% rename from DetectorDescription/GeoModel/GeoModelKernel/src/GeoXPEngine.cxx rename to LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.cxx index ad32b1ecea5..7b4080386e9 100755 --- a/DetectorDescription/GeoModel/GeoModelKernel/src/GeoXPEngine.cxx +++ b/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#include "GeoModelKernel/GeoXPEngine.h" +#include "GeoXPEngine.h" #include "CLHEP/GenericFunctions/Variable.hh" #include "CLHEP/GenericFunctions/FixedConstant.hh" #include "CLHEP/GenericFunctions/RKIntegrator.hh" diff --git a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoXPEngine.h b/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.h similarity index 93% rename from DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoXPEngine.h rename to LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.h index 0056fb5ea4f..37b0468d4d3 100755 --- a/DetectorDescription/GeoModel/GeoModelKernel/GeoModelKernel/GeoXPEngine.h +++ b/LArCalorimeter/LArG4/LArG4Validation/src/GeoXPEngine.h @@ -9,17 +9,16 @@ // This class does a Runge-Kutta integration of a particle in a magnetic // // field, without any slowing due to interactions with matter. // // --------------------------------------------------------------------------// -#ifndef GEOMODELKERNEL_GEOXPENGINE_H -#define GEOMODELKERNEL_GEOXPENGINE_H + +#ifndef LARG4VALIDATION_GEOXPENGINE_H +#define LARG4VALIDATION_GEOXPENGINE_H #include <CLHEP/Geometry/Point3D.h> #include <CLHEP/Vector/LorentzVector.h> -////class HepGeom::Point3D<double>; -////class CLHEP::HepLorentzVector; + namespace Genfun { class AbsFunction; } - class GeoXPEngine { public: @@ -60,8 +59,6 @@ class GeoXPEngine { const Genfun::AbsFunction *m_py; const Genfun::AbsFunction *m_pz; - - }; #endif diff --git a/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.cxx b/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.cxx index f54fd7c9671..ca57b57ffb1 100755 --- a/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.cxx +++ b/LArCalorimeter/LArG4/LArG4Validation/src/SingleTrackValidation.cxx @@ -23,7 +23,7 @@ // To extrapolate: #include "AtlasBComponent.h" -#include "GeoModelKernel/GeoXPEngine.h" +#include "GeoXPEngine.h" // To interpret LAr Geometry information: #include "CaloDetDescr/CaloDetDescrManager.h" diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt index 581fc423983..70a9c43cde3 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( LArGeoAlgsNV ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/IOVSvc - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities LArCalorimeter/LArGeoModel/LArReadoutGeometry PRIVATE @@ -18,6 +17,7 @@ atlas_depends_on_subdirs( PUBLIC Database/RDBAccessSvc DetectorDescription/DetDescrCond/DetDescrConditions DetectorDescription/GeoModel/GeoModelInterfaces + DetectorDescription/GeoPrimitives GaudiKernel LArCalorimeter/LArGeoModel/LArGeoBarrel LArCalorimeter/LArGeoModel/LArGeoCode @@ -30,13 +30,15 @@ atlas_depends_on_subdirs( PUBLIC find_package( Boost COMPONENTS filesystem thread system ) find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( LArGeoAlgsNV src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} IOVSvcLib GeoModelKernel GeoModelUtilities LArReadoutGeometry SGTools StoreGateLib SGtests DetDescrConditions GaudiKernel LArGeoBarrel LArGeoCode LArGeoEndcap LArGeoRAL LArGeoTBBarrel LArHV ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} ${EIGEN_LIBRARIES} IOVSvcLib GeoModelUtilities LArReadoutGeometry SGTools StoreGateLib SGtests DetDescrConditions GaudiKernel LArGeoBarrel LArGeoCode LArGeoEndcap LArGeoRAL LArGeoTBBarrel LArHV ) # Install files from the package: atlas_install_headers( LArGeoAlgsNV ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx index a7084dbe852..3ff752ce74b 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx @@ -16,6 +16,8 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoShapeUnion.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "CLHEP/Geometry/Transform3D.h" @@ -181,7 +183,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) // --- Barrel const IRDBRecord *barrelRec = GeoDBUtils::getTransformRecord(larPosition,"LARCRYO_B"); if(!barrelRec) throw std::runtime_error("Error, no lar position record in the database"); - HepGeom::Transform3D xfBarrel = GeoDBUtils::getTransform(barrelRec); + GeoTrf::Transform3D xfBarrel = GeoDBUtils::getTransform(barrelRec); GeoAlignableTransform* barrelAlXf = new GeoAlignableTransform(xfBarrel); { @@ -201,7 +203,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) // --- Endcap Pos const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(larPosition, "LARCRYO_EC_POS"); if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); GeoAlignableTransform *xfEndcapPos = new GeoAlignableTransform(xfPos); { @@ -217,7 +219,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) // --- Endcap Neg const IRDBRecord *negRec = GeoDBUtils::getTransformRecord(larPosition, "LARCRYO_EC_NEG"); if (!negRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfNeg = GeoDBUtils::getTransform(negRec); + GeoTrf::Transform3D xfNeg = GeoDBUtils::getTransform(negRec); GeoAlignableTransform *xfEndcapNeg = new GeoAlignableTransform(xfNeg); { @@ -235,7 +237,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) a_container->add(endcapEnvelopePos); a_container->add( new GeoNameTag("LArEndcapNeg")); a_container->add(xfEndcapNeg); - a_container->add( new GeoTransform(HepGeom::RotateY3D(180.0*CLHEP::deg))); + a_container->add( new GeoTransform(GeoTrf::RotateY3D(180.0*GeoModelKernelUnits::deg))); a_container->add(endcapEnvelopeNeg); } else if(!m_buildEndcap) @@ -243,7 +245,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) // -- Build the Barrel only const IRDBRecord *barrelRec = GeoDBUtils::getTransformRecord(larPosition,"LARCRYO_B"); if(!barrelRec) throw std::runtime_error("Error, no lar position record in the database"); - HepGeom::Transform3D xfBarrel = GeoDBUtils::getTransform(barrelRec); + GeoTrf::Transform3D xfBarrel = GeoDBUtils::getTransform(barrelRec); GeoAlignableTransform* barrelAlXf = new GeoAlignableTransform(xfBarrel); { @@ -266,7 +268,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) // --- Endcap Pos const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(larPosition, "LARCRYO_EC_POS"); if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); GeoAlignableTransform *xfEndcapPos = new GeoAlignableTransform(xfPos); { @@ -282,7 +284,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) // --- Endcap Neg const IRDBRecord *negRec = GeoDBUtils::getTransformRecord(larPosition, "LARCRYO_EC_NEG"); if (!negRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfNeg = GeoDBUtils::getTransform(negRec); + GeoTrf::Transform3D xfNeg = GeoDBUtils::getTransform(negRec); GeoAlignableTransform *xfEndcapNeg = new GeoAlignableTransform(xfNeg); { @@ -300,7 +302,7 @@ void LArGeo::LArDetectorFactory::create( GeoPhysVol* a_container ) a_container->add(endcapEnvelopePos); a_container->add( new GeoNameTag("LArEndcapNeg")); a_container->add(xfEndcapNeg); - a_container->add( new GeoTransform(HepGeom::RotateY3D(180.0*CLHEP::deg))); + a_container->add( new GeoTransform(GeoTrf::RotateY3D(180.0*GeoModelKernelUnits::deg))); a_container->add(endcapEnvelopeNeg); } diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.h b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.h index 497b3e31760..78f814b3bc4 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.h +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.h @@ -10,8 +10,8 @@ * $Id: LArDetectorFactory.h,v 1.4 2009-02-10 16:43:17 tsulaia Exp $ */ -#ifndef LArGeo_LArDetectorFactory_h -#define LArGeo_LArDetectorFactory_h +#ifndef LARGEOALGSNV_LARDETECTORFACTORY_H +#define LARGEOALGSNV_LARDETECTORFACTORY_H #include "LArReadoutGeometry/LArDetectorManager.h" #include "GeoModelKernel/GeoVDetectorFactory.h" diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx index 3649ee77945..0d85ea1426c 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorTool.cxx @@ -21,6 +21,7 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoGraphNode.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" #include "DetDescrConditions/DetCondKeyTrans.h" @@ -41,17 +42,18 @@ #define LAR_ALIGN "/LAR/Align" -LArDetectorToolNV::LArDetectorToolNV(const std::string& type, - const std::string& name, - const IInterface* parent) - : GeoModelTool(type,name,parent), - m_barrelSaggingOn(false), - m_barrelVisLimit(-1), - m_fcalVisLimit(-1), - m_buildBarrel(true), - m_buildEndcap(true), - m_applyAlignments(false), - m_geometryConfig("FULL") +LArDetectorToolNV::LArDetectorToolNV(const std::string& type + , const std::string& name + , const IInterface* parent) + : GeoModelTool(type,name,parent) + , m_barrelSaggingOn(false) + , m_barrelVisLimit(-1) + , m_fcalVisLimit(-1) + , m_buildBarrel(true) + , m_buildEndcap(true) + , m_applyAlignments(false) + , m_manager{nullptr} + , m_geometryConfig("FULL") { declareProperty("SaggingBarrelAccordeon",m_barrelSaggingOn); declareProperty("BarrelCellVisLimit", m_barrelVisLimit); @@ -61,8 +63,6 @@ LArDetectorToolNV::LArDetectorToolNV(const std::string& type, declareProperty("BuildEndcap", m_buildEndcap); declareProperty("ApplyAlignments", m_applyAlignments); declareProperty("GeometryConfig", m_geometryConfig); - m_manager = 0; - } LArDetectorToolNV::~LArDetectorToolNV() @@ -73,13 +73,6 @@ LArDetectorToolNV::~LArDetectorToolNV() StatusCode LArDetectorToolNV::create() { - IMessageSvc* msgSvc; - if(StatusCode::FAILURE==service ("MessageSvc",msgSvc)) - { - std::cerr << "LArDetectorToolNV::create ERROR unable to get message service!\n"; - return StatusCode::FAILURE; - } - // Initialize the HV System: const EMBHVManager *embHV=new EMBHVManager(); const EMECHVManager *emecHVI= new EMECHVManager(EMECHVModule::INNER); @@ -89,80 +82,60 @@ StatusCode LArDetectorToolNV::create() const EMBPresamplerHVManager *embPSHV = new EMBPresamplerHVManager(); const EMECPresamplerHVManager *emecPSHV = new EMECPresamplerHVManager(); - LArHVManager *hvManager= new LArHVManager(embHV,emecHVI, emecHVO, hecHV, fcalHV,embPSHV, emecPSHV); - - MsgStream log(msgSvc, name()); - if (StatusCode::SUCCESS != detStore()->record(hvManager,"LArHVManager")) { - log << MSG::ERROR << "Unable to record LArHVManager in detector store " << endmsg; - return StatusCode::FAILURE; - } - + ATH_CHECK(detStore()->record(hvManager,"LArHVManager")); // Get the detector configuration. - IGeoDbTagSvc *geoDbTag; - if(StatusCode::FAILURE==service ("GeoDbTagSvc",geoDbTag)) - { - log << MSG::ERROR << "Unable to get GeoDbTag service" << endmsg; - return StatusCode::FAILURE; - } + ServiceHandle<IGeoDbTagSvc> geoDbTag("GeoDbTagSvc",name()); + ATH_CHECK(geoDbTag.retrieve()); std::string AtlasVersion = geoDbTag->atlasVersion(); std::string LArVersion = geoDbTag->LAr_VersionOverride(); - IRDBAccessSvc *accessSvc; - if(StatusCode::FAILURE==service("RDBAccessSvc",accessSvc)) - { - log << MSG::ERROR << "Unable to get RDBAccess service" << endmsg; - return StatusCode::FAILURE; - } + ServiceHandle<IRDBAccessSvc> accessSvc("RDBAccessSvc",name()); + ATH_CHECK(accessSvc.retrieve()); std::string detectorKey = LArVersion.empty() ? AtlasVersion : LArVersion; std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr"; - log << MSG::INFO << "Keys for LAr are " << detectorKey << " " << detectorNode << endmsg; - log << MSG::INFO << "Building LAr version " << geoDbTag->LAr_Version() - << " while ATLAS version is " << AtlasVersion << endmsg; - - if(LArVersion=="CUSTOM") - { - log << MSG::WARNING << "LArDetectorToolNV: Detector Information coming from a custom configuration!!" - << endmsg; + ATH_MSG_INFO("Keys for LAr are " << detectorKey << " " << detectorNode); + ATH_MSG_INFO("Building LAr version " << geoDbTag->LAr_Version() + << " while ATLAS version is " << AtlasVersion); + + if(LArVersion=="CUSTOM") { + ATH_MSG_WARNING("LArDetectorToolNV: Detector Information coming from a custom configuration!!"); } - else - { + else { IRDBRecordset_ptr switchSet = accessSvc->getRecordsetPtr("LArSwitches", detectorKey, detectorNode); - if ((*switchSet).size()==0) return StatusCode::FAILURE; + if ((*switchSet).size()==0) { + ATH_MSG_ERROR("Unable to retrieve LArSwitches from Geometry DB"); + return StatusCode::FAILURE; + } const IRDBRecord *switches = (*switchSet)[0]; - m_barrelSaggingOn = switches->getInt("SAGGING"); - try - { - if (!switches->isFieldNull("BARREL_ON")) + try { + if (!switches->isFieldNull("BARREL_ON")) { m_buildBarrel = switches->getInt("BARREL_ON"); + } - if (!switches->isFieldNull("ENDCAP_ON")) + if (!switches->isFieldNull("ENDCAP_ON")) { m_buildEndcap = switches->getInt("ENDCAP_ON"); + } } - catch(std::exception& e) - { - log << MSG::DEBUG << e.what() << endmsg; + catch(const std::exception& e) { + ATH_MSG_DEBUG(e.what()); } } - log << MSG::INFO << "LAr Geometry Options:" << endmsg; - log << MSG::INFO << " Sagging = " << (m_barrelSaggingOn ? "true" : "false") << endmsg; - log << MSG::INFO << " Barrel = " << (m_buildBarrel ? "ON" : "OFF") << endmsg; - log << MSG::INFO << " Endcap = " << (m_buildEndcap ? "ON" : "OFF") << endmsg; + ATH_MSG_INFO("LAr Geometry Options:" ); + ATH_MSG_INFO(" Sagging = " << (m_barrelSaggingOn ? "true" : "false")); + ATH_MSG_INFO(" Barrel = " << (m_buildBarrel ? "ON" : "OFF")); + ATH_MSG_INFO(" Endcap = " << (m_buildEndcap ? "ON" : "OFF")); // Locate the top level experiment node - GeoModelExperiment* theExpt = nullptr; - if (StatusCode::SUCCESS != detStore()->retrieve( theExpt, "ATLAS" )) - { - log << MSG::ERROR << "Could not find GeoModelExperiment ATLAS" << endmsg; - return (StatusCode::FAILURE); - } + DataHandle<GeoModelExperiment> theExpt; + ATH_CHECK(detStore()->retrieve(theExpt,"ATLAS")); // determine the geometry layout - Atlas/Testbeam std::string geometryLayout = "Atlas"; @@ -171,7 +144,6 @@ StatusCode LArDetectorToolNV::create() // testbeam=1 H8 test beam => build GeoModel in LArDetectorFactory // testbeam=2 H6 test beam => don't build GeoModel in LArDetectorFactory - std::string LArTag = accessSvc->getChildTag("LAr",detectorKey,detectorNode); if(LArTag.find("H8")!=std::string::npos) { @@ -182,8 +154,9 @@ StatusCode LArDetectorToolNV::create() geometryLayout = "H6"; testbeam = 2 ; } - else if(LArTag.find("G3")!=std::string::npos) + else if(LArTag.find("G3")!=std::string::npos) { geometryLayout = "G3"; + } LArGeo::LArDetectorFactory theLArFactory(testbeam,m_geometryConfig=="FULL"); @@ -193,30 +166,17 @@ StatusCode LArDetectorToolNV::create() theLArFactory.setBuildBarrel(m_buildBarrel); theLArFactory.setBuildEndcap(m_buildEndcap); - - - if (0 == m_detector) - { + if(m_detector==nullptr) { GeoPhysVol *world=&*theExpt->getPhysVol(); theLArFactory.create(world); m_manager = theLArFactory.getDetectorManager(); - if (StatusCode::SUCCESS != detStore()->record(theLArFactory.getDetectorManager(), - theLArFactory.getDetectorManager()->getName())) - { - log << MSG::ERROR << "Could not record" << endmsg; - return (StatusCode::FAILURE); - } - + ATH_CHECK(detStore()->record(theLArFactory.getDetectorManager(),theLArFactory.getDetectorManager()->getName())); theExpt->addManager(theLArFactory.getDetectorManager()); // Release RDB Recordsets if we are inside reco job - if(m_geometryConfig=="RECO") - LArGeo::VDetectorParameters::SetInstance(0); - + if(m_geometryConfig=="RECO") LArGeo::VDetectorParameters::SetInstance(0); return StatusCode::SUCCESS; } - - return StatusCode::FAILURE; } @@ -224,14 +184,14 @@ StatusCode LArDetectorToolNV::clear() { std::vector<std::string>::const_iterator itStored; - StoredPhysVol* storedPV(0); + StoredPhysVol* storedPV{nullptr}; StatusCode status(StatusCode::SUCCESS); std::vector<std::string> sgkeysFPV = detStore()->keys<StoredPhysVol>(); // First loop over all Full Physical volumes and initialize their global position informations for(itStored=sgkeysFPV.begin();itStored!=sgkeysFPV.end();itStored++) { status = detStore()->retrieve(storedPV,*itStored); if(status.isFailure()) { - storedPV = 0; + storedPV = nullptr; continue; } @@ -244,7 +204,7 @@ StatusCode LArDetectorToolNV::clear() for(itStored=sgkeysFPV.begin();itStored!=sgkeysFPV.end();itStored++) { status = detStore()->retrieve(storedPV,*itStored); if(status.isFailure()) { - storedPV = 0; + storedPV = nullptr; continue; } @@ -257,15 +217,14 @@ StatusCode LArDetectorToolNV::clear() std::vector<std::string> sgkeysAXF = detStore()->keys<StoredAlignX>(); for(itStored=sgkeysAXF.begin();itStored!=sgkeysAXF.end();itStored++) { SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<StoredAlignX>::ID(),*itStored); - if(proxy) - proxy->reset(); + if(proxy) proxy->reset(); } // Release manager from the detector store SG::DataProxy* proxy = detStore()->proxy(ClassID_traits<LArDetectorManager>::ID(),m_manager->getName()); if(proxy) { proxy->reset(); - m_manager = 0; + m_manager = nullptr; } return StatusCode::SUCCESS; @@ -274,224 +233,212 @@ StatusCode LArDetectorToolNV::clear() StatusCode LArDetectorToolNV::registerCallback() { // Return FAILURE if no callbacks have been registered - MsgStream log(msgSvc(), name()); - - if(!m_applyAlignments) - { - log << MSG::DEBUG << "LAr alignments switched OFF" << endmsg; + if(!m_applyAlignments) { + ATH_MSG_DEBUG("LAr alignments switched OFF"); return StatusCode::FAILURE; } std::string folderName = "/LAR/Align"; const DataHandle<DetCondKeyTrans> dckt; - log << MSG::DEBUG << "Registering callback on DetCondKeyTrans with folder " << folderName << endmsg; + ATH_MSG_DEBUG("Registering callback on DetCondKeyTrans with folder " << folderName); StatusCode sc = detStore()->regFcn(&IGeoModelTool::align, dynamic_cast<IGeoModelTool *>(this), dckt, folderName); - if(sc.isSuccess()) - log << MSG::DEBUG << " Successfully registered " << endmsg; - else - log << MSG::DEBUG << " Registration failed " << endmsg; + if(sc.isSuccess()) { + ATH_MSG_DEBUG(" Successfully registered "); + } + else { + ATH_MSG_DEBUG(" Registration failed "); + } return sc; } StatusCode LArDetectorToolNV::align(IOVSVC_CALLBACK_ARGS) { - MsgStream log(msgSvc(), name()); - - if(!m_applyAlignments) - { - log << MSG::DEBUG << "LAr alignments switched OFF" << endmsg; + if(!m_applyAlignments) { + ATH_MSG_DEBUG("LAr alignments switched OFF"); return StatusCode::SUCCESS; } - // !!! To Do ---> - // Find a better solution for this - - std::vector< std::string > alignNames; - alignNames.push_back("LARCRYO_B"); - alignNames.push_back("LARCRYO_EC_POS"); - alignNames.push_back("LARCRYO_EC_NEG"); - alignNames.push_back("PRESAMPLER_B_POS"); - alignNames.push_back("PRESAMPLER_B_NEG"); - alignNames.push_back("EMB_POS"); - alignNames.push_back("EMB_NEG"); - alignNames.push_back("PRESAMPLER_EC_POS"); - alignNames.push_back("PRESAMPLER_EC_NEG"); - alignNames.push_back("EMEC_POS"); - alignNames.push_back("EMEC_NEG"); - alignNames.push_back("HEC_POS"); // Policy: either HEC_POS is present or HEC1_POS and HEC2_POS - alignNames.push_back("HEC_NEG"); // Same with HEC_NEG. Now in recent releases if HEC_POS is found - alignNames.push_back("HEC1_POS"); // it will be applied to both HEC1 and HEC2... - alignNames.push_back("HEC1_NEG"); - alignNames.push_back("HEC2_POS"); - alignNames.push_back("HEC2_NEG"); - alignNames.push_back("FCAL1_POS"); - alignNames.push_back("FCAL1_NEG"); - alignNames.push_back("FCAL2_POS"); - alignNames.push_back("FCAL2_NEG"); - alignNames.push_back("FCAL3_POS"); - alignNames.push_back("FCAL3_NEG"); - alignNames.push_back("SOLENOID"); - - // <--- !!! To Do - - if(0 == m_manager) - { - log << MSG::WARNING << " LArDetDescrManager not created yet, cannot align !" << endmsg; + std::vector<std::string> alignNames { + "LARCRYO_B" + ,"LARCRYO_EC_POS" + ,"LARCRYO_EC_NEG" + ,"PRESAMPLER_B_POS" + ,"PRESAMPLER_B_NEG" + ,"EMB_POS" + ,"EMB_NEG" + ,"PRESAMPLER_EC_POS" + ,"PRESAMPLER_EC_NEG" + ,"EMEC_POS" + ,"EMEC_NEG" + ,"HEC_POS" // Policy: either HEC_POS is present or HEC1_POS and HEC2_POS + ,"HEC_NEG" // Same with HEC_NEG. Now in recent releases if HEC_POS is found + ,"HEC1_POS" // it will be applied to both HEC1 and HEC2... + ,"HEC1_NEG" + ,"HEC2_POS" + ,"HEC2_NEG" + ,"FCAL1_POS" + ,"FCAL1_NEG" + ,"FCAL2_POS" + ,"FCAL2_NEG" + ,"FCAL3_POS" + ,"FCAL3_NEG" + ,"SOLENOID" + }; + + if(m_manager==nullptr) { + ATH_MSG_ERROR(" LArDetDescrManager not created yet, cannot align !"); return StatusCode::FAILURE; } const DetCondKeyTrans* align=0; - if(detStore()->contains<DetCondKeyTrans>(LAR_ALIGN)) - { + if(detStore()->contains<DetCondKeyTrans>(LAR_ALIGN)) { StatusCode sc = detStore()->retrieve(align, LAR_ALIGN); - if(sc.isFailure()) - { - log << MSG::WARNING << " Could not retrieve LAr DetCondKeyTrans " << endmsg; + if(sc.isFailure()) { + ATH_MSG_ERROR(" Could not retrieve LAr DetCondKeyTrans "); return sc; } - if(0 == align) - { - log << MSG::WARNING <<" LAr DetCondKeyTrans ptr is 0" << endmsg; + if(0 == align) { + ATH_MSG_ERROR(" LAr DetCondKeyTrans ptr is 0"); return StatusCode::FAILURE; } - log << MSG::DEBUG << " LAr DetCondKeyTrans retrieved " << endmsg; + ATH_MSG_DEBUG(" LAr DetCondKeyTrans retrieved "); // Special treatment for the HEC: - StoredAlignX *hec1AlxPos=0; - StoredAlignX *hec2AlxPos=0; - StoredAlignX *hec1AlxNeg=0; - StoredAlignX *hec2AlxNeg=0; + StoredAlignX *hec1AlxPos{nullptr}; + StoredAlignX *hec2AlxPos{nullptr}; + StoredAlignX *hec1AlxNeg{nullptr}; + StoredAlignX *hec2AlxNeg{nullptr}; if (detStore()->contains<StoredAlignX> ("HEC1_POS")) { if (detStore()->retrieve(hec1AlxPos,"HEC1_POS")!=StatusCode::SUCCESS) { - log << MSG::WARNING << " Unable to retrieve StoredAlignX for the key HEC1_POS" << endmsg; + ATH_MSG_WARNING(" Unable to retrieve StoredAlignX for the key HEC1_POS"); } } if (detStore()->contains<StoredAlignX> ("HEC1_NEG")) { if (detStore()->retrieve(hec1AlxNeg,"HEC1_NEG")!=StatusCode::SUCCESS) { - log << MSG::WARNING << " Unable to retrieve StoredAlignX for the key HEC1_NEG" << endmsg; + ATH_MSG_WARNING(" Unable to retrieve StoredAlignX for the key HEC1_NEG"); } } if (detStore()->contains<StoredAlignX> ("HEC2_POS")) { if (detStore()->retrieve(hec2AlxPos,"HEC2_POS")!=StatusCode::SUCCESS) { - log << MSG::WARNING << " Unable to retrieve StoredAlignX for the key HEC2_POS" << endmsg; + ATH_MSG_WARNING(" Unable to retrieve StoredAlignX for the key HEC2_POS"); } } if (detStore()->contains<StoredAlignX> ("HEC2_NEG")) { if (detStore()->retrieve(hec2AlxNeg,"HEC2_NEG")!=StatusCode::SUCCESS) { - log << MSG::WARNING << " Unable to retrieve StoredAlignX for the key HEC2_NEG" << endmsg; + ATH_MSG_WARNING(" Unable to retrieve StoredAlignX for the key HEC2_NEG"); } } - GeoAlignableTransform *hec1GatPos = hec1AlxPos ? hec1AlxPos->getAlignX(): NULL; - GeoAlignableTransform *hec1GatNeg = hec1AlxPos ? hec1AlxNeg->getAlignX(): NULL; - GeoAlignableTransform *hec2GatPos = hec2AlxPos ? hec2AlxPos->getAlignX(): NULL; - GeoAlignableTransform *hec2GatNeg = hec2AlxPos ? hec2AlxNeg->getAlignX(): NULL; + GeoAlignableTransform *hec1GatPos = hec1AlxPos ? hec1AlxPos->getAlignX(): nullptr; + GeoAlignableTransform *hec1GatNeg = hec1AlxPos ? hec1AlxNeg->getAlignX(): nullptr; + GeoAlignableTransform *hec2GatPos = hec2AlxPos ? hec2AlxPos->getAlignX(): nullptr; + GeoAlignableTransform *hec2GatNeg = hec2AlxPos ? hec2AlxNeg->getAlignX(): nullptr; // loop over align names // if the transform presented alter its delta // if the transform is not presented clear its delta - for(unsigned int i=0; i<alignNames.size(); i++) - { + for(unsigned int i=0; i<alignNames.size(); i++) { std::string alignName = alignNames[i]; + HepGeom::Transform3D newDelta; // First try to retrieve StoredAlignX - if(detStore()->contains<StoredAlignX>(alignName)) - { - StoredAlignX* alignX = 0; + if(detStore()->contains<StoredAlignX>(alignName)) { + StoredAlignX* alignX{nullptr}; sc = detStore()->retrieve(alignX,alignName); - if(sc.isFailure()) - { - log << MSG::WARNING << " Unable to retrieve StoredAlignX for the key " << alignName << endmsg; + if(sc.isFailure()) { + ATH_MSG_ERROR(" Unable to retrieve StoredAlignX for the key " << alignName); return sc; } - if(!alignX) - { - log << MSG::WARNING << " 0 pointer to StoredAlignX for the key " << alignName << endmsg; + if(!alignX) { + ATH_MSG_ERROR(" 0 pointer to StoredAlignX for the key " << alignName); return StatusCode::FAILURE; } GeoAlignableTransform* gat = alignX->getAlignX(); - if(!gat) - { - log << MSG::WARNING << " 0 pointer to GeoAlignableTransform for the key " << alignName << endmsg; + if(!gat) { + ATH_MSG_ERROR(" 0 pointer to GeoAlignableTransform for the key " << alignName); return StatusCode::FAILURE; } // check existence of new delta in DetCondKeyTrans - HepGeom::Transform3D newDelta; - if(align->getTransform(alignName,newDelta)) - gat->setDelta(newDelta); - else + if(align->getTransform(alignName,newDelta)) { + gat->setDelta(Amg::CLHEPTransformToEigen(newDelta)); + } + else { gat->clearDelta(); + } } else if (alignName=="HEC_POS") { if (hec1GatPos) { - HepGeom::Transform3D newDelta; - if(align->getTransform(alignName,newDelta)) - hec1GatPos->setDelta(newDelta); - else + if(align->getTransform(alignName,newDelta)) { + hec1GatPos->setDelta(Amg::CLHEPTransformToEigen(newDelta)); + } + else { hec1GatPos->clearDelta(); + } } if (hec2GatPos) { - HepGeom::Transform3D newDelta; - if(align->getTransform(alignName,newDelta)) - hec2GatPos->setDelta(newDelta); - else + if(align->getTransform(alignName,newDelta)) { + hec2GatPos->setDelta(Amg::CLHEPTransformToEigen(newDelta)); + } + else { hec2GatPos->clearDelta(); + } } } else if (alignName=="HEC_NEG") { if (hec1GatNeg) { - HepGeom::Transform3D newDelta; - if(align->getTransform(alignName,newDelta)) - hec1GatNeg->setDelta(newDelta); - else + if(align->getTransform(alignName,newDelta)) { + hec1GatNeg->setDelta(Amg::CLHEPTransformToEigen(newDelta)); + } + else { hec1GatNeg->clearDelta(); + } } if (hec2GatNeg) { - HepGeom::Transform3D newDelta; - if(align->getTransform(alignName,newDelta)) - hec2GatNeg->setDelta(newDelta); - else + if(align->getTransform(alignName,newDelta)) { + hec2GatNeg->setDelta(Amg::CLHEPTransformToEigen(newDelta)); + } + else { hec2GatNeg->clearDelta(); + } } } - else - log << MSG::DEBUG << " No StoredAlignX for the key " << alignName << endmsg; + else { + ATH_MSG_DEBUG(" No StoredAlignX for the key " << alignName); + } } // for } - else - log << MSG::DEBUG << " No LAr DetCondKeyTrans in SG, skipping align() " << endmsg; - + else { + ATH_MSG_DEBUG(" No LAr DetCondKeyTrans in SG, skipping align() "); + } // debug printout of global positions: - for(unsigned int i=0; i<alignNames.size(); i++) - { - std::string alignName = alignNames[i]; - if(detStore()->contains<StoredPhysVol>(alignName)) - { - StoredPhysVol* storedPV = 0; - StatusCode sc = detStore()->retrieve(storedPV,alignName); - if(sc.isSuccess()) - { - const GeoFullPhysVol* fullPV = storedPV->getPhysVol(); - const HepGeom::Transform3D& xf = fullPV->getAbsoluteTransform(); - CLHEP::Hep3Vector trans=xf.getTranslation(); - CLHEP::HepRotation rot=xf.getRotation(); - log << MSG::DEBUG << "Dump Absolute Transform:" << endmsg; - log << MSG::DEBUG << "Key " << alignName << " transl [" << trans.x() - << "," << trans.y() << "," << trans.z() << "] rotation (" - << rot.phi() << "," << rot.theta() << "," << rot.psi() << ")" - << endmsg; - } +// for(unsigned int i=0; i<alignNames.size(); i++) + for(const std::string& alignName : alignNames) { + if(detStore()->contains<StoredPhysVol>(alignName)) { + StoredPhysVol* storedPV{nullptr}; + StatusCode sc = detStore()->retrieve(storedPV,alignName); + if(sc.isSuccess()) { + const GeoFullPhysVol* fullPV = storedPV->getPhysVol(); + const GeoTrf::Transform3D& xf = fullPV->getAbsoluteTransform(); + GeoTrf::Vector3D trans=xf.translation(); + GeoTrf::RotationMatrix3D rot=xf.rotation(); + ATH_MSG_DEBUG("Dump Absolute Transform:"); + ATH_MSG_DEBUG("Key " << alignName << " transl [" << trans.x() + << "," << trans.y() << "," << trans.z() << "] rotation \n(" + << rot(0,0) << "," << rot(0,1) << "," << rot(0,2) << "\n" + << rot(1,0) << "," << rot(1,1) << "," << rot(1,2) << "\n" + << rot(2,0) << "," << rot(2,1) << "," << rot(2,2) << ")"); + } } } - + return StatusCode::SUCCESS; } diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorToolNV.h b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorToolNV.h index 84ac7c84cd8..23cc4298ad1 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorToolNV.h +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorToolNV.h @@ -10,11 +10,12 @@ * $Id: LArDetectorToolNV.h,v 1.8 2009-05-13 15:47:48 tsulaia Exp $ */ -#ifndef LARGEOMODEL_LARDETECTORTOOL_H -#define LARGEOMODEL_LARDETECTORTOOL_H +#ifndef LARGEOALGSNV_LARDETECTORTOOLNV_H +#define LARGEOALGSNV_LARDETECTORTOOLNV_H #include "GeoModelUtilities/GeoModelTool.h" #include "IOVSvc/IOVSvc.h" + class LArDetectorManager; class StoreGateSvc; @@ -23,10 +24,9 @@ class StoreGateSvc; stores LArDetectorManager to the Detector Store and also registers a callback function align() which applies misalignments on top of the 'regular' geometry. */ -class LArDetectorToolNV : public GeoModelTool { - -public: +class LArDetectorToolNV : public GeoModelTool { + public: // Standard Constructor LArDetectorToolNV( const std::string& type, const std::string& name, const IInterface* parent ); @@ -46,7 +46,6 @@ public: virtual StatusCode align(IOVSVC_CALLBACK_ARGS) override final; private: - bool m_barrelSaggingOn; int m_barrelVisLimit; int m_fcalVisLimit; diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt index c3661e59011..1fc3b3e246c 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt @@ -7,7 +7,6 @@ atlas_subdir( LArGeoBarrel ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel LArCalorimeter/LArGeoModel/LArGeoCode PRIVATE Control/StoreGate @@ -19,16 +18,16 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArGeoBarrel src/*.cxx PUBLIC_HEADERS LArGeoBarrel - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelKernel LArGeoCode StoreGateLib SGtests + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} LArGeoCode StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} GeoModelUtilities GaudiKernel LArReadoutGeometry ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelConstruction.h index cc6f43bca74..6a4445778b1 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelConstruction.h @@ -11,7 +11,7 @@ #include "LArGeoCode/VDetectorParameters.h" #include "GeoModelKernel/GeoFullPhysVol.h" -#include "CLHEP/GenericFunctions/FunctionNoop.hh" +#include "GeoGenericFunctions/FunctionNoop.h" namespace LArGeo { @@ -48,25 +48,25 @@ namespace LArGeo { // Three auxiliary functions:------------------------------------// // // - Genfun::FunctionNoop Fx( double r, // - Genfun::GENFUNCTION G, // + GeoGenfun::FunctionNoop Fx( double r, // + GeoGenfun::GENFUNCTION G, // const double Cenx[], // const double Ceny[] ) const; // // // - Genfun::FunctionNoop Fy( double r, // - Genfun::GENFUNCTION G, // + GeoGenfun::FunctionNoop Fy( double r, // + GeoGenfun::GENFUNCTION G, // const double Cenx[], // const double Ceny[] ) const; // // // - Genfun::FunctionNoop Dely(Genfun::GENFUNCTION G ) const; // - Genfun::FunctionNoop Del1(Genfun::GENFUNCTION G ) const; // - Genfun::FunctionNoop Del2(Genfun::GENFUNCTION G ) const; // + GeoGenfun::FunctionNoop Dely(GeoGenfun::GENFUNCTION G ) const; // + GeoGenfun::FunctionNoop Del1(GeoGenfun::GENFUNCTION G ) const; // + GeoGenfun::FunctionNoop Del2(GeoGenfun::GENFUNCTION G ) const; // //-------------------------------------------------------------// // Atan2 for Generic Functions..:------------------------------// - Genfun::FunctionNoop ATan2(Genfun::GENFUNCTION y, // - Genfun::GENFUNCTION x) const; // + GeoGenfun::FunctionNoop ATan2(GeoGenfun::GENFUNCTION y, // + GeoGenfun::GENFUNCTION x) const; // //-------------------------------------------------------------// // Detector parameters ACCG, ACCA, ACMB, ACCO diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelPresamplerConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelPresamplerConstruction.h index 2e60c5fdce3..0e65a99eee9 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelPresamplerConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/LArGeoBarrel/BarrelPresamplerConstruction.h @@ -15,7 +15,7 @@ #include "LArGeoCode/VDetectorParameters.h" #include "GeoModelKernel/GeoFullPhysVol.h" -#include "CLHEP/GenericFunctions/FunctionNoop.hh" +#include "GeoGenericFunctions/FunctionNoop.h" // Forward declarations diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelConstruction.cxx index e44bc1b2430..25ca516e9cd 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelConstruction.cxx @@ -45,15 +45,15 @@ #include "CLHEP/Geometry/Transform3D.h" #include "CLHEP/Vector/Rotation.h" // For functions: -#include "CLHEP/GenericFunctions/Abs.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" -#include "CLHEP/GenericFunctions/Sqrt.hh" -#include "CLHEP/GenericFunctions/ATan.hh" -#include "CLHEP/GenericFunctions/Rectangular.hh" -#include "CLHEP/GenericFunctions/Mod.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/FixedConstant.hh" +#include "GeoGenericFunctions/Abs.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" +#include "GeoGenericFunctions/Sqrt.h" +#include "GeoGenericFunctions/ATan.h" +#include "GeoGenericFunctions/Rectangular.h" +#include "GeoGenericFunctions/Mod.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/FixedConstant.h" // For units: #include "CLHEP/Units/PhysicalConstants.h" #include "GaudiKernel/MsgStream.h" @@ -196,12 +196,12 @@ void LArGeo::BarrelConstruction::MakeEnvelope() log << MSG::INFO << " Use sagging in geometry ? " << m_A_SAGGING << endmsg; - Genfun::Cos Cos; - Genfun::Sin Sin; - Genfun::Sqrt Sqrt; - Genfun::ATan ATan; + GeoGenfun::Cos Cos; + GeoGenfun::Sin Sin; + GeoGenfun::Sqrt Sqrt; + GeoGenfun::ATan ATan; - double twopi64 = CLHEP::pi/32.; + double twopi64 = GeoModelKernelUnits::pi/32.; double twopi32 = 2.*twopi64; @@ -316,13 +316,13 @@ void LArGeo::BarrelConstruction::MakeEnvelope() double Moth_outer_radius = m_parameters->GetValue("LArEMBMotherRmax"); double Moth_Phi_Min = 0.; - double Moth_Phi_Max = m_parameters->GetValue("LArEMBphiMaxBarrel")*CLHEP::deg; + double Moth_Phi_Max = m_parameters->GetValue("LArEMBphiMaxBarrel")*GeoModelKernelUnits::deg; #ifdef DEBUGGEO std::cout << " *** Mother volume (Ecam) parameters " << std::endl; std::cout << " Rmin/Rmax " << Moth_inner_radius << " " << Moth_outer_radius << std::endl; std::cout << " Zmin/Zmax " << Moth_Z_min << " " << Moth_Z_max << std::endl; - std::cout << " phi1,Dphi (CLHEP::deg)" << Moth_Phi_Min/CLHEP::deg << " " << Moth_Phi_Max/CLHEP::deg << std::endl; + std::cout << " phi1,Dphi (GeoModelKernelUnits::deg)" << Moth_Phi_Min/GeoModelKernelUnits::deg << " " << Moth_Phi_Max/GeoModelKernelUnits::deg << std::endl; #endif // number of zigs for accordion @@ -371,9 +371,9 @@ void LArGeo::BarrelConstruction::MakeEnvelope() (double) (m_parameters->GetValue("LArEMBPhiAtCurvature",idat)); Delta[idat] = (double) (m_parameters->GetValue("LArEMBDeltaZigAngle",idat)); - if(idat == 14) Delta[idat] = (90.0) * CLHEP::deg; + if(idat == 14) Delta[idat] = (90.0) * GeoModelKernelUnits::deg; - // Maximum SAGGING displacement for each of the fifteen folds in CLHEP::mm + // Maximum SAGGING displacement for each of the fifteen folds in GeoModelKernelUnits::mm // (should be 0.0, 0.17, 0.30, 0.63, 0.78, 1.06, 1.09, 1.21, 1.07, 1.03, 0.74, 0.61, 0.27, 0.20, 0.0) //GUtmp sagging amplied by 10 if (m_A_SAGGING) { @@ -393,8 +393,8 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // #ifdef DEBUGGEO log << MSG::DEBUG << "idat " << idat << " Rhocen/Phice/Delta/deltay/deltax/etatrans " - << Rhocen[idat] << " " << Phicen[idat]*(1./CLHEP::deg) << " " - << Delta[idat]*(1./CLHEP::deg) << " " << deltay[idat] << " " << deltax[idat] + << Rhocen[idat] << " " << Phicen[idat]*(1./GeoModelKernelUnits::deg) << " " + << Delta[idat]*(1./GeoModelKernelUnits::deg) << " " << deltay[idat] << " " << deltax[idat] << " " << etaTrans << endmsg; // #endif @@ -452,10 +452,10 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // very confused at the common surface between ECAM and STAC) //-----------------ECAM---------------------------------------------------------// { // - double Moth_Phi_Min2 = (Ncell == 64) ? -1.555*CLHEP::deg : 0.; // - double Moth_Phi_Max2 = (Ncell == 64) ? 25.61*CLHEP::deg : 2*M_PI; // + double Moth_Phi_Min2 = (Ncell == 64) ? -1.555*GeoModelKernelUnits::deg : 0.; // + double Moth_Phi_Max2 = (Ncell == 64) ? 25.61*GeoModelKernelUnits::deg : 2*M_PI; // // - double safety_rhocen1 = 0.040*CLHEP::mm; // + double safety_rhocen1 = 0.040*GeoModelKernelUnits::mm; // double Zplan[] = {Bar_Z_min-Zp0,Bar_Z_cut-Zp0,Bar_Z_max-Zp0}; // double Riacc[] = {Moth_inner_radius,Moth_inner_radius, Rhocen1-safety_rhocen1}; // double Roacc[] = {Moth_outer_radius,Moth_outer_radius,Moth_outer_radius}; // @@ -465,7 +465,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::cout << " Zplan " << Zplan[0] << " " << Zplan[1] << " " << Zplan[2] << std::endl; std::cout << " Rin " << Riacc[0] << " " << Riacc[1] << " " << Riacc[2] << std::endl; std::cout << " Rout " << Roacc[0] << " " << Roacc[1] << " " << Roacc[2] << std::endl; - std::cout << " PhiMin,Dphi " << Moth_Phi_Min2/CLHEP::deg << " " << Moth_Phi_Max2/CLHEP::deg << std::endl; + std::cout << " PhiMin,Dphi " << Moth_Phi_Min2/GeoModelKernelUnits::deg << " " << Moth_Phi_Max2/GeoModelKernelUnits::deg << std::endl; #endif int ecamArraySize = sizeof(Zplan) / sizeof(double); // std::string name = baseName + "ECAM"; // @@ -510,19 +510,19 @@ void LArGeo::BarrelConstruction::MakeEnvelope() GeoPhysVol *Elnicsf_phys=NULL; double Xel1f; { - // WARNING : this "hard_coded" 0.010*CLHEP::mm is a "security" to avoid + // WARNING : this "hard_coded" 0.010*GeoModelKernelUnits::mm is a "security" to avoid // fake "overlapping" diagnostics with "DAVID" - Xel1f = m_parameters->GetValue("LArEMBInnerElectronics"); // 23.*CLHEP::mm + Xel1f = m_parameters->GetValue("LArEMBInnerElectronics"); // 23.*GeoModelKernelUnits::mm double DeltaZ = Zhalfc; double Zpos = Zhalfc+Bar_Z_min; - double Rmini = Moth_inner_radius + 0.010*CLHEP::mm; - double Rmaxi = Rmini+Xel1f - 0.010*CLHEP::mm; + double Rmini = Moth_inner_radius + 0.010*GeoModelKernelUnits::mm; + double Rmaxi = Rmini+Xel1f - 0.010*GeoModelKernelUnits::mm; std::string name = baseName + "TELF"; #ifdef DEBUGGEO std::cout << " *** parameters for TELF tubs " << std::endl; std::cout << " DeltaZ " << DeltaZ << std::endl; std::cout << " Rmin/Rmax " << Rmini << " " << Rmaxi << std::endl, - std::cout << " PhiMin,Dphi " << Moth_Phi_Min/CLHEP::deg << " " << Moth_Phi_Max/CLHEP::deg << std::endl; + std::cout << " PhiMin,Dphi " << Moth_Phi_Min/GeoModelKernelUnits::deg << " " << Moth_Phi_Max/GeoModelKernelUnits::deg << std::endl; std::cout << " Zpos in ECAM " << Zpos << std::endl; #endif GeoTubs* tubs = new GeoTubs(Rmini, // rmin @@ -532,9 +532,9 @@ void LArGeo::BarrelConstruction::MakeEnvelope() Moth_Phi_Max); // deltaphi const GeoLogVol* logVol = new GeoLogVol(name,tubs,LAr); Elnicsf_phys = new GeoPhysVol(logVol); - m_ecamPhysicalPos->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); + m_ecamPhysicalPos->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); m_ecamPhysicalPos->add(Elnicsf_phys); - m_ecamPhysicalNeg->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); + m_ecamPhysicalNeg->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); m_ecamPhysicalNeg->add(Elnicsf_phys); } //------------------------------------------------------------------------------// @@ -545,9 +545,9 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // (follow mixture described in Pascal Perrodo note GeoPhysVol *Sumb_phys=NULL; { - double ThickSum = 10.*CLHEP::mm; // FIXME should be in geometry database + double ThickSum = 10.*GeoModelKernelUnits::mm; // FIXME should be in geometry database double Rmini = Moth_inner_radius+Xel1f-ThickSum; - double Rmaxi = Moth_inner_radius+Xel1f -0.020*CLHEP::mm; // safety margin + double Rmaxi = Moth_inner_radius+Xel1f -0.020*GeoModelKernelUnits::mm; // safety margin double DeltaZ = Zhalfc; double Zpos=0.; std::string name = baseName + "SUMB"; @@ -555,14 +555,14 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::cout << " *** parameters for SUMB tubs " << std::endl; std::cout << " DeltaZ " << DeltaZ << std::endl; std::cout << " Rmin/Rmax " << Rmini << " " << Rmaxi << std::endl, - std::cout << " PhiMin,Dphi " << Moth_Phi_Min/CLHEP::deg << " " << Moth_Phi_Max/CLHEP::deg << std::endl; + std::cout << " PhiMin,Dphi " << Moth_Phi_Min/GeoModelKernelUnits::deg << " " << Moth_Phi_Max/GeoModelKernelUnits::deg << std::endl; std::cout << " Zpos in TELF " << Zpos << std::endl; #endif GeoTubs * tubs = new GeoTubs(Rmini,Rmaxi,DeltaZ,Moth_Phi_Min,Moth_Phi_Max); const GeoLogVol* logVol = new GeoLogVol(name,tubs,Sumb); Sumb_phys = new GeoPhysVol(logVol); - Elnicsf_phys->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); + Elnicsf_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); Elnicsf_phys->add(Sumb_phys); } @@ -571,9 +571,9 @@ void LArGeo::BarrelConstruction::MakeEnvelope() { double ClearancePS = m_parameters->GetValue("LArEMBMoBoclearfrPS"); double RhoPosB = Moth_inner_radius + ClearancePS; - double bdx = .5*(m_parameters->GetValue("LArEMBMoBoTchickness")); // 4.3/2.*CLHEP::mm - double bdy = .5*(m_parameters->GetValue("LArEMBMoBoHeight")); // 72.3/2.*CLHEP::mm; - double bdz = Zhalfc - 0.007*CLHEP::mm; + double bdx = .5*(m_parameters->GetValue("LArEMBMoBoTchickness")); // 4.3/2.*GeoModelKernelUnits::mm + double bdy = .5*(m_parameters->GetValue("LArEMBMoBoHeight")); // 72.3/2.*GeoModelKernelUnits::mm; + double bdz = Zhalfc - 0.007*GeoModelKernelUnits::mm; //------------------------MOTHERBOARDS--------------------------------------------// // JFB Make & Place the motherboards inside overall tube // @@ -587,18 +587,18 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::cout << " *** parameters for MotherBoard (box)" << std::endl; std::cout << " dx,dy,dz " << bdx << " " << bdy << " " << bdz << std::endl; std::cout << " Radius pos " << RhoPosB << std::endl; - std::cout << " Phi0,Dphi " << PhiPos0/CLHEP::deg << " " << twopi32/CLHEP::deg << std::endl; + std::cout << " Phi0,Dphi " << PhiPos0/GeoModelKernelUnits::deg << " " << twopi32/GeoModelKernelUnits::deg << std::endl; #endif GeoBox * box = new GeoBox(bdx,bdy,bdz); // const GeoLogVol * logVol = new GeoLogVol(name,box,Moth_elect); // GeoPhysVol * pV = new GeoPhysVol(logVol); // GeoSerialIdentifier * iD = new GeoSerialIdentifier(0); // - Genfun::Variable c; // - Genfun::GENFUNCTION PhiPos = PhiPos0 + twopi32*c; // + GeoGenfun::Variable c; // + GeoGenfun::GENFUNCTION PhiPos = PhiPos0 + twopi32*c; // GeoXF::TRANSFUNCTION TX = // - GeoXF::Pow(HepGeom::TranslateX3D(1.0),RhoPosB*Cos(PhiPos))* // - GeoXF::Pow(HepGeom::TranslateY3D(1.0),RhoPosB*Sin(PhiPos))* // - GeoXF::Pow(HepGeom::RotateZ3D(1.0),PhiPos); // + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),RhoPosB*Cos(PhiPos))* // + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),RhoPosB*Sin(PhiPos))* // + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),PhiPos); // GeoSerialTransformer *st = new GeoSerialTransformer(pV, &TX, NoOFboard); // Elnicsf_phys->add(iD); // Elnicsf_phys->add(st); // @@ -616,11 +616,11 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // JFB Place the cables // { // // // - double Dzc = Zhalfc - 0.007*CLHEP::mm; // - double Dx1 = .5*(m_parameters->GetValue("LArEMBCablethickat0")); // 1./2.*CLHEP::mm + double Dzc = Zhalfc - 0.007*GeoModelKernelUnits::mm; // + double Dx1 = .5*(m_parameters->GetValue("LArEMBCablethickat0")); // 1./2.*GeoModelKernelUnits::mm double Dx2 = .5*Bar_Eta_cut*(m_parameters->GetValue("LArEMBthickincrfac")); // - // Dx2 should be 5.17/2.*Bar_Eta_cut*CLHEP::mm Trapezoid's side linear with Eta // - double Dy1 = .5*(m_parameters->GetValue("LArEMBCableEtaheight")); // 70./2.*CLHEP::mm + // Dx2 should be 5.17/2.*Bar_Eta_cut*GeoModelKernelUnits::mm Trapezoid's side linear with Eta // + double Dy1 = .5*(m_parameters->GetValue("LArEMBCableEtaheight")); // 70./2.*GeoModelKernelUnits::mm double Dy2 = Dy1; // // // int NoOFcable = (int) m_parameters->GetValue("LArEMBnoOFcableBundle"); // 64 @@ -645,34 +645,34 @@ void LArGeo::BarrelConstruction::MakeEnvelope() #ifdef DEBUGGEO std::cout << " PhiPos0 " << PhiPos0 << std::endl; #endif - Genfun::Variable I; // + GeoGenfun::Variable I; // // // // -------------Make a Kronecker Delta Here--------// // - Genfun::Rectangular KDelta; // // + GeoGenfun::Rectangular KDelta; // // KDelta.baseline().setValue(0.0); // // KDelta.height().setValue(1.0); // // KDelta.x0().setValue(-0.5); // // KDelta.x1().setValue(0.5); // // //-------------------------------------------------// // // // - Genfun::Mod Mod1(1.0),Mod2(2.0),Mod4(4.0); // - Genfun::GENFUNCTION Int = I - Mod1; // - Genfun::GENFUNCTION Ccopy = Int(I + 0.5); // - Genfun::GENFUNCTION PhiOrig = 22.5*CLHEP::deg*Int(Ccopy/4); // - Genfun::GENFUNCTION PhiPos1 = PhiPos0 + PhiOrig; // - Genfun::GENFUNCTION PhiPos2 = twopi32 - PhiPos0 + PhiOrig; // - Genfun::GENFUNCTION PhiPos00 = // + GeoGenfun::Mod Mod1(1.0),Mod2(2.0),Mod4(4.0); // + GeoGenfun::GENFUNCTION Int = I - Mod1; // + GeoGenfun::GENFUNCTION Ccopy = Int(I + 0.5); // + GeoGenfun::GENFUNCTION PhiOrig = 22.5*GeoModelKernelUnits::deg*Int(Ccopy/4); // + GeoGenfun::GENFUNCTION PhiPos1 = PhiPos0 + PhiOrig; // + GeoGenfun::GENFUNCTION PhiPos2 = twopi32 - PhiPos0 + PhiOrig; // + GeoGenfun::GENFUNCTION PhiPos00 = // (KDelta(Mod4(Ccopy)-2) + KDelta(Mod4(Ccopy)-3))*PhiPos2 + // (1.0-KDelta(Mod4(Ccopy)-2)-KDelta(Mod4(Ccopy)-3))*PhiPos1; // - Genfun::GENFUNCTION PhiPos = PhiPos00 + Mod2(Ccopy)*twopi32; // + GeoGenfun::GENFUNCTION PhiPos = PhiPos00 + Mod2(Ccopy)*twopi32; // GeoXF::TRANSFUNCTION TX = // - GeoXF::Pow(HepGeom::TranslateX3D(1.0),RhoPosC*Cos(PhiPos))* // - GeoXF::Pow(HepGeom::TranslateY3D(1.0),RhoPosC*Sin(PhiPos))* // - GeoXF::Pow(HepGeom::RotateZ3D(1.0),PhiPos); // + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),RhoPosC*Cos(PhiPos))* // + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),RhoPosC*Sin(PhiPos))* // + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),PhiPos); // GeoSerialTransformer *st = new GeoSerialTransformer(pV, &TX, NoOFcable); // #ifdef DEBUGGEO for (int ii=0;ii<NoOFcable;ii++) { - std::cout << "copy, phi " << ii << " " << PhiPos(ii)/CLHEP::deg << std::endl; + std::cout << "copy, phi " << ii << " " << PhiPos(ii)/GeoModelKernelUnits::deg << std::endl; } #endif Elnicsf_phys->add(iD); // @@ -683,10 +683,10 @@ void LArGeo::BarrelConstruction::MakeEnvelope() } #endif // BUILD_FRONT_ELECTRONICS - // add 1.3 CLHEP::mm in z to allow cleareance for absorber with non // + // add 1.3 GeoModelKernelUnits::mm in z to allow cleareance for absorber with non // // 0 thickness, at eta=1.475, low r part of the barrel // // this affects STAC and TELB volumes // - double clearance = 1.3*CLHEP::mm; + double clearance = 1.3*GeoModelKernelUnits::mm; #ifdef BUILD_HIGHETA_ELECTRONICS @@ -702,29 +702,29 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // GU fix of TELB // double ze1= zmax1_Stac+clearance; // double ze2 = Bar_Z_max; // - double safety = 0.05*CLHEP::mm; + double safety = 0.05*GeoModelKernelUnits::mm; double DeltaZ = 0.5*(ze2-ze1)-safety; // 50 micron for safety. double Zpos = ze1+DeltaZ+0.5*safety; // - double Rmini1 = Rhocen[0] - .030*CLHEP::mm; // - double Rmaxi1 = Rhocen[0] - .020*CLHEP::mm; // - double Rmini2 = Rhocen[0] - .030*CLHEP::mm; // - double Rmaxi2 = Bar_Rcmx - clearance - .070*CLHEP::mm; // + double Rmini1 = Rhocen[0] - .030*GeoModelKernelUnits::mm; // + double Rmaxi1 = Rhocen[0] - .020*GeoModelKernelUnits::mm; // + double Rmini2 = Rhocen[0] - .030*GeoModelKernelUnits::mm; // + double Rmaxi2 = Bar_Rcmx - clearance - .070*GeoModelKernelUnits::mm; // std::string name = baseName + "TELB"; // #ifdef DEBUGGEO std::cout << " *** Parameters for high eta electronics (Cons) " <<std::endl; std::cout << " Rmini1,Rmini2,Rmaxi1,Rmaxi2 " << Rmini1 << " " << Rmini2 << " " << Rmaxi1 << " " << Rmaxi2 << std::endl, std::cout << " DeltaZ " << DeltaZ << std::endl; - std::cout << " Phi_Min,Dphi " << Moth_Phi_Min/CLHEP::deg << " " << Moth_Phi_Max/CLHEP::deg << std::endl; + std::cout << " Phi_Min,Dphi " << Moth_Phi_Min/GeoModelKernelUnits::deg << " " << Moth_Phi_Max/GeoModelKernelUnits::deg << std::endl; std::cout << " Zpos " << Zpos << std::endl; #endif GeoCons* cons = new GeoCons(Rmini1,Rmini2,Rmaxi1,Rmaxi2, // DeltaZ,Moth_Phi_Min,Moth_Phi_Max); // const GeoLogVol* logVol = new GeoLogVol(name,cons,Cable_elect); // GeoPhysVol* physVol = new GeoPhysVol(logVol); // - m_ecamPhysicalPos->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); // + m_ecamPhysicalPos->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); // m_ecamPhysicalPos->add(physVol); // - m_ecamPhysicalNeg->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); // + m_ecamPhysicalNeg->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); // m_ecamPhysicalNeg->add(physVol); // // // } // @@ -742,8 +742,8 @@ void LArGeo::BarrelConstruction::MakeEnvelope() //---------------------------------FRONT G10-------------------------------------// { // - double Xel1f = m_parameters->GetValue("LArEMBInnerElectronics"); // 23.*CLHEP::mm - double Xg10f = m_parameters->GetValue("LArEMBG10SupportBarsIn"); // 20.*CLHEP::mm + double Xel1f = m_parameters->GetValue("LArEMBInnerElectronics"); // 23.*GeoModelKernelUnits::mm + double Xg10f = m_parameters->GetValue("LArEMBG10SupportBarsIn"); // 20.*GeoModelKernelUnits::mm double DeltaZ = 0.5* m_parameters->GetValue("LArEMBG10FrontDeltaZ"); // double Zpos = DeltaZ+Bar_Z_min; // double Rmini = Moth_inner_radius + Xel1f; // @@ -753,15 +753,15 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::cout << " *** parameters for front G10 ring (tubs) " << std::endl; std::cout << " Rmini,Rmaxi " << Rmini << " " << Rmaxi << std::endl; std::cout << " DeltaZ " << DeltaZ << std::endl; - std::cout << " phimin,dphi " << Moth_Phi_Min/CLHEP::deg << " " << Moth_Phi_Max/CLHEP::deg << std::endl; + std::cout << " phimin,dphi " << Moth_Phi_Min/GeoModelKernelUnits::deg << " " << Moth_Phi_Max/GeoModelKernelUnits::deg << std::endl; std::cout << " Zpos " << Zpos << std::endl; #endif GeoTubs* tubs = new GeoTubs(Rmini,Rmaxi,DeltaZ,Moth_Phi_Min,Moth_Phi_Max); // const GeoLogVol* logVol = new GeoLogVol(name,tubs,G10_bar); // GeoPhysVol* physVol = new GeoPhysVol(logVol); // - m_ecamPhysicalPos->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); // + m_ecamPhysicalPos->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); // m_ecamPhysicalPos->add(physVol); // - m_ecamPhysicalNeg->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); // + m_ecamPhysicalNeg->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); // m_ecamPhysicalNeg->add(physVol); // IRDBRecordset_ptr extraCones = rdbAccess->getRecordsetPtr("LArCones", @@ -789,7 +789,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() extra_dz,extra_phi0,extra_dphi); const GeoLogVol* logVol = new GeoLogVol(name,cons,Lead); GeoPhysVol* physVol2 = new GeoPhysVol(logVol); - physVol->add(new GeoTransform(HepGeom::TranslateZ3D(extra_zpos))); + physVol->add(new GeoTransform(GeoTrf::TranslateZ3D(extra_zpos))); physVol->add(physVol2); } @@ -806,27 +806,27 @@ void LArGeo::BarrelConstruction::MakeEnvelope() { // double DeltaZ = Zhalf; // double Zpos = Zhalf+Bar_Z_min; // - double Xtal = m_parameters->GetValue("LArEMBLArGapTail")+ 0.1*CLHEP::mm; // 13.*CLHEP::mm + double Xtal = m_parameters->GetValue("LArEMBLArGapTail")+ 0.1*GeoModelKernelUnits::mm; // 13.*GeoModelKernelUnits::mm double Rmini = Rhocen[Nbrt]+Xtal; // // // GU to be sure that GTENB does not go outside mother ECAM volume // // Rmaxi = Rmini+Xg10b; // - double Rmaxi = Moth_outer_radius-0.01*CLHEP::mm; // 10 microns for more safety.. // + double Rmaxi = Moth_outer_radius-0.01*GeoModelKernelUnits::mm; // 10 microns for more safety.. // // // std::string name = baseName +"GTENB"; // #ifdef DEBUGGEO std::cout << " *** parameters for back G10 ring (tubs) " << std::endl; std::cout << " Rmini,Rmaxi " << Rmini << " " << Rmaxi << std::endl; std::cout << " DeltaZ " << DeltaZ << std::endl; - std::cout << " phimin,dphi " << Moth_Phi_Min/CLHEP::deg << " " << Moth_Phi_Max/CLHEP::deg << std::endl; + std::cout << " phimin,dphi " << Moth_Phi_Min/GeoModelKernelUnits::deg << " " << Moth_Phi_Max/GeoModelKernelUnits::deg << std::endl; std::cout << " Zpos " << Zpos << std::endl; #endif GeoTubs* tubs = new GeoTubs(Rmini,Rmaxi,DeltaZ,Moth_Phi_Min,Moth_Phi_Max); // const GeoLogVol* logVol = new GeoLogVol(name,tubs,G10_bar); // GeoPhysVol* physVol = new GeoPhysVol(logVol); // - m_ecamPhysicalPos->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); // + m_ecamPhysicalPos->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); // m_ecamPhysicalPos->add(physVol); // - m_ecamPhysicalNeg->add(new GeoTransform(HepGeom::TranslateZ3D(Zpos))); // + m_ecamPhysicalNeg->add(new GeoTransform(GeoTrf::TranslateZ3D(Zpos))); // m_ecamPhysicalNeg->add(physVol); // } // //------------------------------------------------------------------------------// @@ -841,8 +841,8 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // (i.e. a little bit wider than one calorimeter module) { // - double Moth_Phi_Min2 = (Ncell == 64) ? -1.055*CLHEP::deg : 0.; // - double Moth_Phi_Max2 = (Ncell == 64) ? 24.61*CLHEP::deg : 2*M_PI; // + double Moth_Phi_Min2 = (Ncell == 64) ? -1.055*GeoModelKernelUnits::deg : 0.; // + double Moth_Phi_Max2 = (Ncell == 64) ? 24.61*GeoModelKernelUnits::deg : 2*M_PI; // double Zplan1[] = {Bar_Z_min,zmax1_Stac+clearance,Bar_Z_max}; // double Riacc1[] = {Rhocen[0],Rhocen[0], Bar_Rcmx-clearance}; // @@ -854,16 +854,16 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::cout << " Zplan " << Zplan1[0] << " " << Zplan1[1] << " " << Zplan1[2] << std::endl; std::cout << " Rin " << Riacc1[0] << " " << Riacc1[1] << " " << Riacc1[2] << std::endl; std::cout << " Rout " << Roacc1[0] << " " << Roacc1[1] << " " << Roacc1[2] << std::endl; - std::cout << " PhiMin,Dphi " << Moth_Phi_Min2/CLHEP::deg << " " << Moth_Phi_Max2/CLHEP::deg << std::endl; + std::cout << " PhiMin,Dphi " << Moth_Phi_Min2/GeoModelKernelUnits::deg << " " << Moth_Phi_Max2/GeoModelKernelUnits::deg << std::endl; std::cout << " Zpos " << -Zp0 << std::endl; #endif GeoPcon* pCone = new GeoPcon(Moth_Phi_Min2,Moth_Phi_Max2); // for (int i=0; i<3; i++) pCone->addPlane(Zplan1[i],Riacc1[i],Roacc1[i]); // const GeoLogVol* logVol = new GeoLogVol(name,pCone,LAr); // stacPhysical = new GeoPhysVol(logVol); // - m_ecamPhysicalPos->add(new GeoTransform(HepGeom::TranslateZ3D(-Zp0))); // + m_ecamPhysicalPos->add(new GeoTransform(GeoTrf::TranslateZ3D(-Zp0))); // m_ecamPhysicalPos->add(stacPhysical); // - m_ecamPhysicalNeg->add(new GeoTransform(HepGeom::TranslateZ3D(-Zp0))); // + m_ecamPhysicalNeg->add(new GeoTransform(GeoTrf::TranslateZ3D(-Zp0))); // m_ecamPhysicalNeg->add(stacPhysical); // } // //----------------------------------------------------------------------------// @@ -882,7 +882,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() double Thpb_thin = m_parameters->GetValue("LArEMBThinAbsLead"); double Thcu = m_parameters->GetValue("LArEMBThickElecCopper"); double Thfg = m_parameters->GetValue("LArEMBThickElecKapton"); - double Psi = m_parameters->GetValue("LArEMBPhiGapAperture"); // 360.*CLHEP::deg/1024 + double Psi = m_parameters->GetValue("LArEMBPhiGapAperture"); // 360.*GeoModelKernelUnits::deg/1024 double Contract = m_parameters->GetValue("LArEMBAbsorberContraction"); double Thce = (Thpb+Thgl+Thfe)*Contract; @@ -906,7 +906,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() double Zcp1l[14],Zcp1h[14],Zcp2l[14],Zcp2h[14]; double Rhol[14],Rhoh[14]; - double safety_along = 0.007*CLHEP::mm; + double safety_along = 0.007*GeoModelKernelUnits::mm; // Compute centers of curvature coordinates in a local frame. @@ -979,9 +979,9 @@ void LArGeo::BarrelConstruction::MakeEnvelope() double Gama0 = m_parameters->GetValue("LArEMBAbsPhiFirst"); - Genfun::Variable icopy; - Genfun::GENFUNCTION Game = Gama0 + Psi/2 + Alfa*icopy; - Genfun::GENFUNCTION Gama = Gama0 + Alfa*icopy; + GeoGenfun::Variable icopy; + GeoGenfun::GENFUNCTION Game = Gama0 + Psi/2 + Alfa*icopy; + GeoGenfun::GENFUNCTION Gama = Gama0 + Alfa*icopy; // Creation of the straight absorber parts. Front (TIPB) & Back (TIPC) // Creation of the straight electrode parts. Front (TIPK) & Back (TIPL) @@ -999,7 +999,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // Absorber (thick, thin) { double radius = fb==FRONT ? Cenx[0] - Xtip_pb/2 : Cenx[Nbrt] + Xtipt/2; - double Xhalfb = fb==FRONT ? Xtip_pb/2 -0.002*CLHEP::mm : Xtipt/2 - .004*CLHEP::mm; + double Xhalfb = fb==FRONT ? Xtip_pb/2 -0.002*GeoModelKernelUnits::mm : Xtipt/2 - .004*GeoModelKernelUnits::mm; double Zhalfb = fb==FRONT ? (Bar_Z_cut-Zmin)/2. : (Zmax-Zmin)/2.; double dz01 = (std::min(Zcp1[irl],Zmax)-Zmin)/2.; // half lenght for thick lead @@ -1010,18 +1010,18 @@ void LArGeo::BarrelConstruction::MakeEnvelope() const GeoLogVol *logVol2 = new GeoLogVol(name,box2,Thick_abs); GeoPhysVol* physVol = new GeoPhysVol(logVol); GeoPhysVol* physVol2 = new GeoPhysVol(logVol2); - physVol->add(new GeoTransform(HepGeom::Translate3D(0.,0.,dz01-Zhalfb))); + physVol->add(new GeoTransform(GeoTrf::Translate3D(0.,0.,dz01-Zhalfb))); physVol->add(physVol2); - Genfun::GENFUNCTION Xcd = radius*Cos(Gama); - Genfun::GENFUNCTION Ycd = radius*Sin(Gama); - Genfun::GENFUNCTION Zcd = Genfun::FixedConstant(Zmin+Zhalfb); + GeoGenfun::GENFUNCTION Xcd = radius*Cos(Gama); + GeoGenfun::GENFUNCTION Ycd = radius*Sin(Gama); + GeoGenfun::GENFUNCTION Zcd = GeoGenfun::FixedConstant(Zmin+Zhalfb); GeoXF::TRANSFUNCTION TX = - GeoXF::Pow(HepGeom::TranslateX3D(1.0),Xcd) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),Ycd) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),Zcd) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),Gama); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),Xcd) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),Ycd) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),Zcd) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),Gama); GeoSerialTransformer *st = new GeoSerialTransformer(physVol, &TX, Nabsorber); m_ecamPhysicalPos->add(st); m_ecamPhysicalNeg->add(st); @@ -1032,14 +1032,14 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::cout << " Thick Abs Box " << Xhalfb << " " << Thce/2. << " " << dz01 << std::endl; std::cout << " Z position thick in thin " << dz01-Zhalfb << std::endl; std::cout << " Radial position " << radius << std::endl; - std::cout << " Phi0 (CLHEP::deg) " << Gama(0)/CLHEP::deg << std::endl; + std::cout << " Phi0 (GeoModelKernelUnits::deg) " << Gama(0)/GeoModelKernelUnits::deg << std::endl; std::cout << " Z position in ECAM " << Zmin+Zhalfb << std::endl; #endif } // G10 (only for front part) if (fb==FRONT) { - double Xhalfbg = Xtip_gt/2-0.002*CLHEP::mm; + double Xhalfbg = Xtip_gt/2-0.002*GeoModelKernelUnits::mm; double radiusg = Cenx[0]-Xtip_pb/2. - Xtips/2 ; double Zhalfbg = (Bar_Z_cut-Zmin)/2. ; std::string name = baseName + "FrontBack::G10"; @@ -1066,49 +1066,49 @@ void LArGeo::BarrelConstruction::MakeEnvelope() #ifdef DEBUGGEO std::cout << " Position Iron in G10 at y = +- " << 0.5*(+Thce-Tgfe/2.) << std::endl; #endif - physVol->add(new GeoTransform(HepGeom::Translate3D(0.,0.5*(-Thce+Tgfe/2.),0.))); + physVol->add(new GeoTransform(GeoTrf::Translate3D(0.,0.5*(-Thce+Tgfe/2.),0.))); physVol->add(physVol2); - physVol->add(new GeoTransform(HepGeom::Translate3D(0.,0.5*(+Thce-Tgfe/2.),0.))); + physVol->add(new GeoTransform(GeoTrf::Translate3D(0.,0.5*(+Thce-Tgfe/2.),0.))); physVol->add(physVol2); #endif // build_front_steel // position of G10+Steel inside LAr bath - Genfun::GENFUNCTION Xcd = radiusg*Cos(Gama); - Genfun::GENFUNCTION Ycd = radiusg*Sin(Gama); - Genfun::GENFUNCTION Zcd = Genfun::FixedConstant(Zhalfbg+Zmin); + GeoGenfun::GENFUNCTION Xcd = radiusg*Cos(Gama); + GeoGenfun::GENFUNCTION Ycd = radiusg*Sin(Gama); + GeoGenfun::GENFUNCTION Zcd = GeoGenfun::FixedConstant(Zhalfbg+Zmin); GeoXF::TRANSFUNCTION TX = - GeoXF::Pow(HepGeom::TranslateX3D(1.0),Xcd) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),Ycd) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),Zcd) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),Gama); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),Xcd) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),Ycd) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),Zcd) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),Gama); GeoSerialTransformer *st = new GeoSerialTransformer(physVol, &TX, Nabsorber); m_ecamPhysicalPos->add(st); m_ecamPhysicalNeg->add(st); #ifdef DEBUGGEO std::cout << " Radial position G10 tip " << radiusg << std::endl; - std::cout << " Phi0 (CLHEP::deg)" << Gama(0)/CLHEP::deg << std::endl; + std::cout << " Phi0 (GeoModelKernelUnits::deg)" << Gama(0)/GeoModelKernelUnits::deg << std::endl; std::cout << " Zposition in ECAM " << Zmin+Zhalfbg << std::endl; #endif } // Electrode { - double Xhalfbe = fb==FRONT ? Xtips/2 -0.002*CLHEP::mm : Xtipt/2 - .004*CLHEP::mm; + double Xhalfbe = fb==FRONT ? Xtips/2 -0.002*GeoModelKernelUnits::mm : Xtipt/2 - .004*GeoModelKernelUnits::mm; double Zhalfbe = fb==FRONT ? (Bar_Z_cut-Zmin)/2. : (Zmax - Zmin)/2; double radiuse = fb==FRONT ? Cenx[0] - Xtips/2 : Cenx[Nbrt] + Xtipt/2; std::string name = baseName + "FrontBack::Electrode"; GeoBox *box = new GeoBox(Xhalfbe,Thel/2,Zhalfbe); const GeoLogVol *logVol = new GeoLogVol(name,box,Kapton_Cu); GeoPhysVol* physVol = new GeoPhysVol(logVol); - Genfun::GENFUNCTION Xcd = radiuse*Cos(Game); - Genfun::GENFUNCTION Ycd = radiuse*Sin(Game); - Genfun::GENFUNCTION Zcd = Genfun::FixedConstant(Zmin+Zhalfbe); + GeoGenfun::GENFUNCTION Xcd = radiuse*Cos(Game); + GeoGenfun::GENFUNCTION Ycd = radiuse*Sin(Game); + GeoGenfun::GENFUNCTION Zcd = GeoGenfun::FixedConstant(Zmin+Zhalfbe); GeoXF::TRANSFUNCTION TX = - GeoXF::Pow(HepGeom::TranslateX3D(1.0),Xcd) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),Ycd) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),Zcd) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),Game); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),Xcd) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),Ycd) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),Zcd) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),Game); GeoSerialTransformer *st = new GeoSerialTransformer(physVol, &TX, Nelectrode); m_ecamPhysicalPos->add(st); @@ -1119,7 +1119,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() else std::cout << " *** Back tip electrode " << std::endl; std::cout << " Box " << Xhalfbe << " " << Thel/2. << " " << Zhalfbe << std::endl; std::cout << " Radial position " << radiuse << std::endl; - std::cout << " Phi0 (CLHEP::deg)" << Game(0)/CLHEP::deg << std::endl; + std::cout << " Phi0 (GeoModelKernelUnits::deg)" << Game(0)/GeoModelKernelUnits::deg << std::endl; std::cout << " Z position in ECAM " << Zmin+Zhalfbe << std::endl; #endif @@ -1136,7 +1136,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // // GU 09/06/2004 add some safety in z size - double safety_zlen=0.050*CLHEP::mm; + double safety_zlen=0.050*GeoModelKernelUnits::mm; for(int irl=0; irl<Nbrt; irl++) // loop over zig-zag in radius { @@ -1212,32 +1212,32 @@ void LArGeo::BarrelConstruction::MakeEnvelope() double Dz = Thce/2.; // For absorbers - Genfun::GENFUNCTION x1a = Fx(irl+0., Gama, Cenx, Ceny) + GeoGenfun::GENFUNCTION x1a = Fx(irl+0., Gama, Cenx, Ceny) +deltay[irl]*Del1(Gama) +deltax[irl]*Del2(Gama); - Genfun::GENFUNCTION x2a = Fx(irl+1., Gama, Cenx, Ceny) + GeoGenfun::GENFUNCTION x2a = Fx(irl+1., Gama, Cenx, Ceny) +deltay[irl+1]*Del1(Gama) +deltax[irl+1]*Del2(Gama); - Genfun::GENFUNCTION y1a = Fy(irl+0., Gama, Cenx, Ceny) + GeoGenfun::GENFUNCTION y1a = Fy(irl+0., Gama, Cenx, Ceny) -deltay[irl]*Del2(Gama) +deltax[irl]*Del1(Gama); - Genfun::GENFUNCTION y2a = Fy(irl+1., Gama, Cenx, Ceny) + GeoGenfun::GENFUNCTION y2a = Fy(irl+1., Gama, Cenx, Ceny) -deltay[irl+1]*Del2(Gama) +deltax[irl+1]*Del1(Gama); - Genfun::GENFUNCTION dx = x2a - x1a; - Genfun::GENFUNCTION dy = y2a - y1a; + GeoGenfun::GENFUNCTION dx = x2a - x1a; + GeoGenfun::GENFUNCTION dy = y2a - y1a; // Da the two fold centers distance, da straight part length - Genfun::GENFUNCTION Da = Sqrt ( dx*dx + dy*dy ); - Genfun::GENFUNCTION da = Sqrt ( (Da - 2.*Rint)*(Da + 2.*Rint) ); + GeoGenfun::GENFUNCTION Da = Sqrt ( dx*dx + dy*dy ); + GeoGenfun::GENFUNCTION da = Sqrt ( (Da - 2.*Rint)*(Da + 2.*Rint) ); // newalpha (slant angle) value of the rotation angle around Z_axis - Genfun::GENFUNCTION cosalfa = (da*dx -iparit*2.*Rint*dy)/Da/Da; - Genfun::GENFUNCTION sinalfa = (da*dy +iparit*2.*Rint*dx)/Da/Da; - Genfun::GENFUNCTION newalpha = ATan2(sinalfa,cosalfa); + GeoGenfun::GENFUNCTION cosalfa = (da*dx -iparit*2.*Rint*dy)/Da/Da; + GeoGenfun::GENFUNCTION sinalfa = (da*dy +iparit*2.*Rint*dx)/Da/Da; + GeoGenfun::GENFUNCTION newalpha = ATan2(sinalfa,cosalfa); - Genfun::GENFUNCTION h1 = da/2. * frac - .007*CLHEP::mm; + GeoGenfun::GENFUNCTION h1 = da/2. * frac - .007*GeoModelKernelUnits::mm; double Zx0 = (tl1+bl1)/2.; // thick absorber pieces @@ -1259,7 +1259,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() } } // translation in x to include thick absorber into thin absorber - double Xtrans = (Xb1+Xt1)/2.-Zx0 + .007*CLHEP::mm; + double Xtrans = (Xb1+Xt1)/2.-Zx0 + .007*GeoModelKernelUnits::mm; // lengths that remain to be covered with the thin absorber double Xt2 = tl1-Xt1; @@ -1267,12 +1267,12 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // trabslation that would be needed to include think absorber only into overall thin+thick volume double Xtrans2 = Zx0 - (Xb2+Xt2)/2.; - Xt2 = Xt2 -0.007*CLHEP::mm; - Xb2 = Xb2 -0.007*CLHEP::mm; + Xt2 = Xt2 -0.007*GeoModelKernelUnits::mm; + Xb2 = Xb2 -0.007*GeoModelKernelUnits::mm; - Genfun::GENFUNCTION alpha = ATan(0.5*(bl1-tl1)/h1); - Genfun::GENFUNCTION alpha_t = ATan(0.5*(Xb1-Xt1)/h1); + GeoGenfun::GENFUNCTION alpha = ATan(0.5*(bl1-tl1)/h1); + GeoGenfun::GENFUNCTION alpha_t = ATan(0.5*(Xb1-Xt1)/h1); // angle that would be needed for trap do describe only thin absorber // ------------------|---------X---------| @@ -1284,24 +1284,24 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // ---------------|--------X---------| // alpha = (-) angle between X's // tan(alpha) = delta X size / width, deltaX size = 2*tl1-Xt2-(2*bl1-Xb2), width = 2.*h1 - Genfun::GENFUNCTION alpha_2 = ATan((2.*bl1-Xb2-(2.*tl1-Xt2))/(2.*h1)); + GeoGenfun::GENFUNCTION alpha_2 = ATan((2.*bl1-Xb2-(2.*tl1-Xt2))/(2.*h1)); // .newalpha is already computed angle wrt z axis // P/2 rotation is to get absorber aligned along local x axis // instead of y, then rotate with angle newalpha - Genfun::GENFUNCTION alfrot = -M_PI/2. - newalpha; + GeoGenfun::GENFUNCTION alfrot = -M_PI/2. - newalpha; - Genfun::GENFUNCTION Xcd = (x1a + x2a)/2. + (2.*idivi-1.)*(1.-frac)*da/2.*cosalfa; - Genfun::GENFUNCTION Ycd = (y1a + y2a)/2. + (2.*idivi-1.)*(1.-frac)*da/2.*sinalfa; - Genfun::GENFUNCTION Zcd = Genfun::FixedConstant(Zmin+(tl1+bl1)/2.+safety_zlen); + GeoGenfun::GENFUNCTION Xcd = (x1a + x2a)/2. + (2.*idivi-1.)*(1.-frac)*da/2.*cosalfa; + GeoGenfun::GENFUNCTION Ycd = (y1a + y2a)/2. + (2.*idivi-1.)*(1.-frac)*da/2.*sinalfa; + GeoGenfun::GENFUNCTION Zcd = GeoGenfun::FixedConstant(Zmin+(tl1+bl1)/2.+safety_zlen); GeoXF::TRANSFUNCTION TX = - GeoXF::Pow(HepGeom::TranslateX3D(1.0),Xcd) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),Ycd) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),Zcd) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),-alfrot)* - HepGeom::RotateY3D(-90*CLHEP::deg); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),Xcd) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),Ycd) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),Zcd) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),-alfrot)* + GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); // @@ -1345,7 +1345,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() const GeoLogVol* thickLog = new GeoLogVol(thickName,thickTrap,Thick_abs); GeoPhysVol* thickPhys = new GeoPhysVol(thickLog); // put thick absorber in straight_phys - thinPhys->add(new GeoTransform(HepGeom::TranslateX3D(Xtrans))); + thinPhys->add(new GeoTransform(GeoTrf::TranslateX3D(Xtrans))); thinPhys->add(thickPhys); #ifdef DEBUGGEO @@ -1374,7 +1374,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::string thickGlueName = baseName + "ThickAbsGlue::Straight"; const GeoLogVol* thickTrapGlueLog = new GeoLogVol(thickGlueName,thickTrapGlue, Glue); GeoPhysVol * thickTrapGluePhys = new GeoPhysVol(thickTrapGlueLog); - thinPhys->add(new GeoTransform(HepGeom::Translate3D(0.,0.,0.))); + thinPhys->add(new GeoTransform(GeoTrf::Translate3D(0.,0.,0.))); thinPhys->add(thickTrapGluePhys); // inside glue put lead, Dz size = 0.5*Thpb*Contract, 2 separate volumes for eta<0.8 and eta>0.8 @@ -1388,7 +1388,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::string thickLeadName= baseName+"ThickAbsLead::Straight"; const GeoLogVol* thickTrapLeadLog = new GeoLogVol(thickLeadName,thickTrapLead, myLead); GeoPhysVol * thickTrapLeadPhys = new GeoPhysVol(thickTrapLeadLog); - thickTrapGluePhys->add(new GeoTransform(HepGeom::TranslateX3D(Xtrans))); + thickTrapGluePhys->add(new GeoTransform(GeoTrf::TranslateX3D(Xtrans))); thickTrapGluePhys->add(thickTrapLeadPhys); double dz_lead_thin = 0.5*Thpb_thin*Contract; @@ -1401,7 +1401,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::string thinLeadName = baseName+"ThinAbsLead::Straight"; const GeoLogVol* thinTrapLeadLog = new GeoLogVol(thinLeadName,thinTrapLead, myLead); GeoPhysVol * thinTrapLeadPhys = new GeoPhysVol(thinTrapLeadLog); - thickTrapGluePhys->add(new GeoTransform(HepGeom::TranslateX3D(Xtrans2))); + thickTrapGluePhys->add(new GeoTransform(GeoTrf::TranslateX3D(Xtrans2))); thickTrapGluePhys->add(thinTrapLeadPhys); @@ -1414,10 +1414,10 @@ void LArGeo::BarrelConstruction::MakeEnvelope() //------------------------------------------------------------------------ if (m_A_SAGGING) { if (!gStraightAbsorbers) gStraightAbsorbers = new GeoStraightAccSection(); - gStraightAbsorbers->XCent(instance,irl)=TX(instance).dx(); - gStraightAbsorbers->YCent(instance,irl)=TX(instance).dy(); - gStraightAbsorbers->Cosu(instance,irl) =-(TX(instance).xy()); - gStraightAbsorbers->Sinu(instance,irl) = (TX(instance).xz()); + gStraightAbsorbers->XCent(instance,irl)=TX(instance)(0,3); //dx + gStraightAbsorbers->YCent(instance,irl)=TX(instance)(1,3); //dy + gStraightAbsorbers->Cosu(instance,irl) =-(TX(instance)(0,1)); //xy + gStraightAbsorbers->Sinu(instance,irl) = (TX(instance)(0,2)); //xz gStraightAbsorbers->HalfLength(instance,irl) = thinTrap->getDydzn(); stacPhysical->add(new GeoTransform(TX(instance))); @@ -1453,21 +1453,21 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // get slant angle for the previous zig-zag int iirl=jrl-1; if (iirl<0) iirl=1; - Genfun::GENFUNCTION x0a = Fx(iirl, Gama, Cenx, Ceny) + GeoGenfun::GENFUNCTION x0a = Fx(iirl, Gama, Cenx, Ceny) +deltay[iirl]*Del1(Gama) +deltax[iirl]*Del2(Gama); - Genfun::GENFUNCTION y0a = Fy(iirl, Gama, Cenx, Ceny) + GeoGenfun::GENFUNCTION y0a = Fy(iirl, Gama, Cenx, Ceny) -deltay[iirl]*Del2(Gama) +deltax[iirl]*Del1(Gama); - Genfun::GENFUNCTION dx0 = x1a - x0a; - Genfun::GENFUNCTION dy0 = y1a - y0a; + GeoGenfun::GENFUNCTION dx0 = x1a - x0a; + GeoGenfun::GENFUNCTION dy0 = y1a - y0a; // Da the two fold centers distance, da straight part length - Genfun::GENFUNCTION Da0 = Sqrt ( dx0*dx0 + dy0*dy0 ); - Genfun::GENFUNCTION da0 = Sqrt ( (Da0 - 2.*Rint)*(Da0 + 2.*Rint) ); + GeoGenfun::GENFUNCTION Da0 = Sqrt ( dx0*dx0 + dy0*dy0 ); + GeoGenfun::GENFUNCTION da0 = Sqrt ( (Da0 - 2.*Rint)*(Da0 + 2.*Rint) ); // newalpha (slant angle) value of the rotation angle around Z_axis - Genfun::GENFUNCTION cosalfa0 = (da0*dx0 +iparit*2.*Rint*dy0)/Da0/Da0; - Genfun::GENFUNCTION sinalfa0 = (da0*dy0 -iparit*2.*Rint*dx0)/Da0/Da0; - Genfun::GENFUNCTION alpha_prev = ATan2(sinalfa0,cosalfa0); + GeoGenfun::GENFUNCTION cosalfa0 = (da0*dx0 +iparit*2.*Rint*dy0)/Da0/Da0; + GeoGenfun::GENFUNCTION sinalfa0 = (da0*dy0 -iparit*2.*Rint*dx0)/Da0/Da0; + GeoGenfun::GENFUNCTION alpha_prev = ATan2(sinalfa0,cosalfa0); #ifdef DEBUGGEO if (jrl>0 && jrl<Nbrt) { @@ -1477,26 +1477,26 @@ void LArGeo::BarrelConstruction::MakeEnvelope() << alpha_prev(0) << std::endl; } #endif - Genfun::Mod Mod2Pi(2*M_PI); + GeoGenfun::Mod Mod2Pi(2*M_PI); // down folds (add +M_PI and then rotate by -M_PI to follow same logic as old code) - Genfun::GENFUNCTION phi0_dfold_0 = - Genfun::FixedConstant(M_PI/2.+phi0_safety); - Genfun::GENFUNCTION dphi_dfold_0 = Mod2Pi(newalpha-phi0_safety - Gama); - Genfun::GENFUNCTION phi0_dfold_1 = Mod2Pi(M_PI/2.+ alpha_prev - Gama); - Genfun::GENFUNCTION dphi_dfold_1 = Mod2Pi(newalpha-alpha_prev); - Genfun::GENFUNCTION phi0_dfold_2 = Mod2Pi(M_PI/2.+ newalpha - Gama); - Genfun::GENFUNCTION dphi_dfold_2 = Mod2Pi(- newalpha + Gama); + GeoGenfun::GENFUNCTION phi0_dfold_0 = + GeoGenfun::FixedConstant(M_PI/2.+phi0_safety); + GeoGenfun::GENFUNCTION dphi_dfold_0 = Mod2Pi(newalpha-phi0_safety - Gama); + GeoGenfun::GENFUNCTION phi0_dfold_1 = Mod2Pi(M_PI/2.+ alpha_prev - Gama); + GeoGenfun::GENFUNCTION dphi_dfold_1 = Mod2Pi(newalpha-alpha_prev); + GeoGenfun::GENFUNCTION phi0_dfold_2 = Mod2Pi(M_PI/2.+ newalpha - Gama); + GeoGenfun::GENFUNCTION dphi_dfold_2 = Mod2Pi(- newalpha + Gama); // up folds - Genfun::GENFUNCTION phi0_ufold_0 = + GeoGenfun::GENFUNCTION phi0_ufold_0 = Mod2Pi(M_PI/2.+newalpha-Gama); - Genfun::GENFUNCTION dphi_ufold_0 = Mod2Pi(-newalpha+Gama-phi0_safety); - Genfun::GENFUNCTION phi0_ufold_1 = Mod2Pi(M_PI/2. + newalpha - Gama); - Genfun::GENFUNCTION dphi_ufold_1 = Mod2Pi(alpha_prev - newalpha); - Genfun::GENFUNCTION phi0_ufold_2 = Genfun::FixedConstant(M_PI/2.); - Genfun::GENFUNCTION dphi_ufold_2 = Mod2Pi(newalpha-Gama); - - const Genfun::AbsFunction* phi0_fold=0; - const Genfun::AbsFunction* dphi_fold=0; + GeoGenfun::GENFUNCTION dphi_ufold_0 = Mod2Pi(-newalpha+Gama-phi0_safety); + GeoGenfun::GENFUNCTION phi0_ufold_1 = Mod2Pi(M_PI/2. + newalpha - Gama); + GeoGenfun::GENFUNCTION dphi_ufold_1 = Mod2Pi(alpha_prev - newalpha); + GeoGenfun::GENFUNCTION phi0_ufold_2 = GeoGenfun::FixedConstant(M_PI/2.); + GeoGenfun::GENFUNCTION dphi_ufold_2 = Mod2Pi(newalpha-Gama); + + const GeoGenfun::AbsFunction* phi0_fold=0; + const GeoGenfun::AbsFunction* dphi_fold=0; const GeoXF::Function* TXfold=0; std::string thinName; @@ -1522,19 +1522,19 @@ void LArGeo::BarrelConstruction::MakeEnvelope() } - Genfun::GENFUNCTION zpos = Genfun::FixedConstant(Zmin+dz0); + GeoGenfun::GENFUNCTION zpos = GeoGenfun::FixedConstant(Zmin+dz0); double phirot=0; if (jrl%2==checkParity) phirot = -M_PI; GeoXF::TRANSFUNCTION TXfold1= - GeoXF::Pow(HepGeom::TranslateX3D(1.0),x1a) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),y1a) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),zpos) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),Gama+phirot); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),x1a) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),y1a) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),zpos) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),Gama+phirot); GeoXF::TRANSFUNCTION TXfold2 = - GeoXF::Pow(HepGeom::TranslateX3D(1.0),x2a) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),y2a) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),zpos) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),Gama+phirot); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),x2a) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),y2a) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),zpos) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),Gama+phirot); // first fown fold if (jrl==0 && checkParity==0) { @@ -1603,7 +1603,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() thinPhys = new GeoPhysVol(thinLog); GeoPhysVol* thickPhys = new GeoPhysVol(thickLog); - thinPhys->add(new GeoTransform(HepGeom::TranslateZ3D(ddz01-ddz0))); + thinPhys->add(new GeoTransform(GeoTrf::TranslateZ3D(ddz01-ddz0))); thinPhys->add(thickPhys); #ifdef DEBUGGEO std::cout << " Position Thick fold in Thin Z = " << ddz01-ddz0 << std::endl; @@ -1629,7 +1629,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::string foldGlueName = baseName+"Glue::Fold"; const GeoLogVol* glueTubsLog = new GeoLogVol(foldGlueName,glueTubs,Glue); GeoPhysVol* glueTubsPhys = new GeoPhysVol(glueTubsLog); - thinPhys->add(new GeoTransform(HepGeom::TranslateZ3D(0.))); + thinPhys->add(new GeoTransform(GeoTrf::TranslateZ3D(0.))); thinPhys->add(glueTubsPhys); #ifdef DEBUGGEO std::cout << " glue fold volume " << Rcmin+0.5*Thfe*Contract << " " << Rcmax-0.5*Thfe*Contract << " " << ddz0 << std::endl; @@ -1643,7 +1643,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::string foldThickLeadName = baseName+"ThickLead::Fold"; const GeoLogVol* thickLeadLog = new GeoLogVol(foldThickLeadName,thickLeadTubs,myLead); GeoPhysVol* thickLeadPhys = new GeoPhysVol(thickLeadLog); - glueTubsPhys->add(new GeoTransform(HepGeom::TranslateZ3D(ddz01-ddz0))); + glueTubsPhys->add(new GeoTransform(GeoTrf::TranslateZ3D(ddz01-ddz0))); glueTubsPhys->add(thickLeadPhys); #ifdef DEBUGGEO std::cout << " thick lead volume " << Rint-Thpb*Contract << " " << Rint+Thpb*Contract << " " << ddz01 << std::endl; @@ -1656,7 +1656,7 @@ void LArGeo::BarrelConstruction::MakeEnvelope() std::string foldThinLeadName = baseName+"ThinLead::Fold"; const GeoLogVol* thinLeadLog = new GeoLogVol(foldThinLeadName,thinLeadTubs,myLead); GeoPhysVol* thinLeadPhys = new GeoPhysVol(thinLeadLog); - glueTubsPhys->add(new GeoTransform(HepGeom::TranslateZ3D(ddz01))); + glueTubsPhys->add(new GeoTransform(GeoTrf::TranslateZ3D(ddz01))); glueTubsPhys->add(thinLeadPhys); #ifdef DEBUGGEO @@ -1705,50 +1705,50 @@ void LArGeo::BarrelConstruction::MakeEnvelope() double Dze = Thel/2.; // For electrodes - Genfun::GENFUNCTION x1e = Fx(irl+0., Game, Cenx, Ceny) + GeoGenfun::GENFUNCTION x1e = Fx(irl+0., Game, Cenx, Ceny) +deltay[irl]*Del1(Game) +deltax[irl]*Del2(Game); - Genfun::GENFUNCTION x2e = Fx(irl+1., Game, Cenx, Ceny) + GeoGenfun::GENFUNCTION x2e = Fx(irl+1., Game, Cenx, Ceny) +deltay[irl+1]*Del1(Game) +deltax[irl+1]*Del2(Game); - Genfun::GENFUNCTION y1e = Fy(irl+0., Game, Cenx, Ceny) + GeoGenfun::GENFUNCTION y1e = Fy(irl+0., Game, Cenx, Ceny) -deltay[irl]*Del2(Game) +deltax[irl]*Del1(Game); - Genfun::GENFUNCTION y2e = Fy(irl+1., Game, Cenx, Ceny) + GeoGenfun::GENFUNCTION y2e = Fy(irl+1., Game, Cenx, Ceny) -deltay[irl+1]*Del2(Game) +deltax[irl+1]*Del1(Game); - Genfun::GENFUNCTION dxe = x2e - x1e; - Genfun::GENFUNCTION dye = y2e - y1e; + GeoGenfun::GENFUNCTION dxe = x2e - x1e; + GeoGenfun::GENFUNCTION dye = y2e - y1e; // De the two fold centers distance, de straight part length - Genfun::GENFUNCTION De = Sqrt ( dxe*dxe + dye*dye ); - Genfun::GENFUNCTION de = Sqrt ( (De - 2.*Rint)*(De + 2.*Rint) ); + GeoGenfun::GENFUNCTION De = Sqrt ( dxe*dxe + dye*dye ); + GeoGenfun::GENFUNCTION de = Sqrt ( (De - 2.*Rint)*(De + 2.*Rint) ); //newalphe (slant angle) value of the rotation angle around Z_axis - Genfun::GENFUNCTION cosalfae = (de*dxe -iparit*2.*Rint*dye)/De/De; - Genfun::GENFUNCTION sinalfae = (de*dye +iparit*2.*Rint*dxe)/De/De; - Genfun::GENFUNCTION newalphe = ATan2(sinalfae,cosalfae); + GeoGenfun::GENFUNCTION cosalfae = (de*dxe -iparit*2.*Rint*dye)/De/De; + GeoGenfun::GENFUNCTION sinalfae = (de*dye +iparit*2.*Rint*dxe)/De/De; + GeoGenfun::GENFUNCTION newalphe = ATan2(sinalfae,cosalfae); // newalphae is already computed angle wrt z axis // P/2 rotation is to get absorber aligned along local x axis // instead of y, then rotate with angle newalpha - Genfun::GENFUNCTION alfrote = -M_PI/2. - newalphe; + GeoGenfun::GENFUNCTION alfrote = -M_PI/2. - newalphe; - Genfun::GENFUNCTION Xcde = (x1e + x2e)/2.+ (2.*idivi-1.)*(1.-frac)*de/2.*cosalfae; - Genfun::GENFUNCTION Ycde = (y1e + y2e)/2.+ (2.*idivi-1.)*(1.-frac)*de/2.*sinalfae; - Genfun::GENFUNCTION Zcde = Genfun::FixedConstant(Zmin+(tl1+bl1)/2.+safety_zlen); + GeoGenfun::GENFUNCTION Xcde = (x1e + x2e)/2.+ (2.*idivi-1.)*(1.-frac)*de/2.*cosalfae; + GeoGenfun::GENFUNCTION Ycde = (y1e + y2e)/2.+ (2.*idivi-1.)*(1.-frac)*de/2.*sinalfae; + GeoGenfun::GENFUNCTION Zcde = GeoGenfun::FixedConstant(Zmin+(tl1+bl1)/2.+safety_zlen); - Genfun::GENFUNCTION h1e = de/2.*frac - .007*CLHEP::mm; - Genfun::GENFUNCTION alpha_e = ATan(0.5*(bl1-tl1)/h1e); + GeoGenfun::GENFUNCTION h1e = de/2.*frac - .007*GeoModelKernelUnits::mm; + GeoGenfun::GENFUNCTION alpha_e = ATan(0.5*(bl1-tl1)/h1e); GeoXF::TRANSFUNCTION TXE = - GeoXF::Pow(HepGeom::TranslateX3D(1.0),Xcde) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),Ycde) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),Zcde) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),-alfrote)* - HepGeom::RotateY3D(-90*CLHEP::deg); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),Xcde) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),Ycde) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),Zcde) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),-alfrote)* + GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); for (int instance = 0; instance < Nelectrode; instance++) @@ -1778,10 +1778,10 @@ void LArGeo::BarrelConstruction::MakeEnvelope() //------------------------------------------------------------------------ if (m_A_SAGGING) { if (!gStraightElectrodes) gStraightElectrodes = new GeoStraightAccSection(); - gStraightElectrodes->XCent(instance,irl)=TXE(instance).dx(); - gStraightElectrodes->YCent(instance,irl)=TXE(instance).dy(); - gStraightElectrodes->Cosu(instance,irl) =-(TXE(instance).xy()); - gStraightElectrodes->Sinu(instance,irl) = (TXE(instance).xz()); + gStraightElectrodes->XCent(instance,irl)=TXE(instance)(0,3); //dx + gStraightElectrodes->YCent(instance,irl)=TXE(instance)(1,3); //dy + gStraightElectrodes->Cosu(instance,irl) =-(TXE(instance)(0,1)); //xy + gStraightElectrodes->Sinu(instance,irl) = (TXE(instance)(0,2)); //xz gStraightElectrodes->HalfLength(instance,irl) = trap->getDydzn(); stacPhysical->add(new GeoTransform(TXE(instance))); @@ -1818,21 +1818,21 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // get slant angle for the previous zig-zag int iirl=jrl-1; if (iirl<0) iirl=1; - Genfun::GENFUNCTION x0e = Fx(iirl, Game, Cenx, Ceny) + GeoGenfun::GENFUNCTION x0e = Fx(iirl, Game, Cenx, Ceny) +deltay[iirl]*Del1(Game) +deltax[iirl]*Del2(Game); - Genfun::GENFUNCTION y0e = Fy(iirl, Game, Cenx, Ceny) + GeoGenfun::GENFUNCTION y0e = Fy(iirl, Game, Cenx, Ceny) -deltay[iirl]*Del2(Game) +deltax[iirl]*Del1(Game); - Genfun::GENFUNCTION dx0 = x1e - x0e; - Genfun::GENFUNCTION dy0 = y1e - y0e; + GeoGenfun::GENFUNCTION dx0 = x1e - x0e; + GeoGenfun::GENFUNCTION dy0 = y1e - y0e; // Da the two fold centers distance, da straight part length - Genfun::GENFUNCTION Da0 = Sqrt ( dx0*dx0 + dy0*dy0 ); - Genfun::GENFUNCTION da0 = Sqrt ( (Da0 - 2.*Rint)*(Da0 + 2.*Rint) ); + GeoGenfun::GENFUNCTION Da0 = Sqrt ( dx0*dx0 + dy0*dy0 ); + GeoGenfun::GENFUNCTION da0 = Sqrt ( (Da0 - 2.*Rint)*(Da0 + 2.*Rint) ); // newalpha (slant angle) value of the rotation angle around Z_axis - Genfun::GENFUNCTION cosalfa0 = (da0*dx0 +iparit*2.*Rint*dy0)/Da0/Da0; - Genfun::GENFUNCTION sinalfa0 = (da0*dy0 -iparit*2.*Rint*dx0)/Da0/Da0; - Genfun::GENFUNCTION alphe_prev = ATan2(sinalfa0,cosalfa0); + GeoGenfun::GENFUNCTION cosalfa0 = (da0*dx0 +iparit*2.*Rint*dy0)/Da0/Da0; + GeoGenfun::GENFUNCTION sinalfa0 = (da0*dy0 -iparit*2.*Rint*dx0)/Da0/Da0; + GeoGenfun::GENFUNCTION alphe_prev = ATan2(sinalfa0,cosalfa0); #ifdef DEBUGGEO if (jrl>0 && jrl<Nbrt) { @@ -1842,25 +1842,25 @@ void LArGeo::BarrelConstruction::MakeEnvelope() #endif // down folds (add +M_PI and then rotate by -M_PI to follow same logic as old code) - Genfun::Mod Mod2Pi(2*M_PI); - Genfun::GENFUNCTION phi0_dfold_0 = - Genfun::FixedConstant(M_PI/2.+phi0_safety); - Genfun::GENFUNCTION dphi_dfold_0 = Mod2Pi(newalphe-phi0_safety-Game); - Genfun::GENFUNCTION phi0_dfold_1 = Mod2Pi(M_PI/2.+ alphe_prev - Game); - Genfun::GENFUNCTION dphi_dfold_1 = Mod2Pi(newalphe-alphe_prev); - Genfun::GENFUNCTION phi0_dfold_2 = Mod2Pi(M_PI/2.+ newalphe - Game); - Genfun::GENFUNCTION dphi_dfold_2 = Mod2Pi(- newalphe + Game); + GeoGenfun::Mod Mod2Pi(2*M_PI); + GeoGenfun::GENFUNCTION phi0_dfold_0 = + GeoGenfun::FixedConstant(M_PI/2.+phi0_safety); + GeoGenfun::GENFUNCTION dphi_dfold_0 = Mod2Pi(newalphe-phi0_safety-Game); + GeoGenfun::GENFUNCTION phi0_dfold_1 = Mod2Pi(M_PI/2.+ alphe_prev - Game); + GeoGenfun::GENFUNCTION dphi_dfold_1 = Mod2Pi(newalphe-alphe_prev); + GeoGenfun::GENFUNCTION phi0_dfold_2 = Mod2Pi(M_PI/2.+ newalphe - Game); + GeoGenfun::GENFUNCTION dphi_dfold_2 = Mod2Pi(- newalphe + Game); // up folds - Genfun::GENFUNCTION phi0_ufold_0 = + GeoGenfun::GENFUNCTION phi0_ufold_0 = Mod2Pi(M_PI/2.+newalphe-Game); - Genfun::GENFUNCTION dphi_ufold_0 = Mod2Pi(-newalphe+Game-phi0_safety); - Genfun::GENFUNCTION phi0_ufold_1 = Mod2Pi(M_PI/2. + newalphe - Game); - Genfun::GENFUNCTION dphi_ufold_1 = Mod2Pi(alphe_prev - newalphe); - Genfun::GENFUNCTION phi0_ufold_2 = Genfun::FixedConstant(M_PI/2.); - Genfun::GENFUNCTION dphi_ufold_2 = Mod2Pi(newalphe - Game); - - const Genfun::AbsFunction* phi0_fold=0; - const Genfun::AbsFunction* dphi_fold=0; + GeoGenfun::GENFUNCTION dphi_ufold_0 = Mod2Pi(-newalphe+Game-phi0_safety); + GeoGenfun::GENFUNCTION phi0_ufold_1 = Mod2Pi(M_PI/2. + newalphe - Game); + GeoGenfun::GENFUNCTION dphi_ufold_1 = Mod2Pi(alphe_prev - newalphe); + GeoGenfun::GENFUNCTION phi0_ufold_2 = GeoGenfun::FixedConstant(M_PI/2.); + GeoGenfun::GENFUNCTION dphi_ufold_2 = Mod2Pi(newalphe - Game); + + const GeoGenfun::AbsFunction* phi0_fold=0; + const GeoGenfun::AbsFunction* dphi_fold=0; const GeoXF::Function* TXfold=0; std::string eName; @@ -1880,19 +1880,19 @@ void LArGeo::BarrelConstruction::MakeEnvelope() ddz0 = dza - safety_zlen; } - Genfun::GENFUNCTION zpos = Genfun::FixedConstant(Zmin+dz0); + GeoGenfun::GENFUNCTION zpos = GeoGenfun::FixedConstant(Zmin+dz0); double phirot = 0; if (jrl%2==checkParity) phirot = -M_PI; GeoXF::TRANSFUNCTION TXfold1= - GeoXF::Pow(HepGeom::TranslateX3D(1.0),x1e) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),y1e) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),zpos) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),Game+phirot); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),x1e) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),y1e) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),zpos) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),Game+phirot); GeoXF::TRANSFUNCTION TXfold2 = - GeoXF::Pow(HepGeom::TranslateX3D(1.0),x2e) * - GeoXF::Pow(HepGeom::TranslateY3D(1.0),y2e) * - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),zpos) * - GeoXF::Pow(HepGeom::RotateZ3D(1.0),Game+phirot); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),x2e) * + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),y2e) * + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),zpos) * + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),Game+phirot); // first fown fold if (jrl==0 && checkParity==0) { @@ -2005,60 +2005,60 @@ void LArGeo::BarrelConstruction::MakeEnvelope() // Generic Function Versions -Genfun::FunctionNoop LArGeo::BarrelConstruction::Fx(double r, Genfun::GENFUNCTION G, const double Cenx[], const double Ceny[] ) const +GeoGenfun::FunctionNoop LArGeo::BarrelConstruction::Fx(double r, GeoGenfun::GENFUNCTION G, const double Cenx[], const double Ceny[] ) const { - Genfun::Cos Cos; - Genfun::Sin Sin; + GeoGenfun::Cos Cos; + GeoGenfun::Sin Sin; int i = (int)rint(r-.1), j = (int)rint(r+.1) ; - Genfun::GENFUNCTION result = (Cos(G)*(Cenx[i]+Cenx[j])/2-Sin(G)*(Ceny[i]+Ceny[j])/2) ; - return Genfun::FunctionNoop(&result); + GeoGenfun::GENFUNCTION result = (Cos(G)*(Cenx[i]+Cenx[j])/2-Sin(G)*(Ceny[i]+Ceny[j])/2) ; + return GeoGenfun::FunctionNoop(&result); } -Genfun::FunctionNoop LArGeo::BarrelConstruction::Fy(double r, Genfun::GENFUNCTION G, const double Cenx[], const double Ceny[] ) const +GeoGenfun::FunctionNoop LArGeo::BarrelConstruction::Fy(double r, GeoGenfun::GENFUNCTION G, const double Cenx[], const double Ceny[] ) const { - Genfun::Cos Cos; - Genfun::Sin Sin; + GeoGenfun::Cos Cos; + GeoGenfun::Sin Sin; int i = (int)rint(r-.1), j = (int)rint(r+.1) ; - Genfun::GENFUNCTION result = (Sin(G)*(Cenx[i]+Cenx[j])/2+Cos(G)*(Ceny[i]+Ceny[j])/2) ; - return Genfun::FunctionNoop(&result); + GeoGenfun::GENFUNCTION result = (Sin(G)*(Cenx[i]+Cenx[j])/2+Cos(G)*(Ceny[i]+Ceny[j])/2) ; + return GeoGenfun::FunctionNoop(&result); } -Genfun::FunctionNoop LArGeo::BarrelConstruction::Del1(Genfun::GENFUNCTION G) const +GeoGenfun::FunctionNoop LArGeo::BarrelConstruction::Del1(GeoGenfun::GENFUNCTION G) const { - Genfun::Cos Cos; - Genfun::Sin Sin; - Genfun::GENFUNCTION result = (Cos( G ) * Sin( G ) ); - return Genfun::FunctionNoop(&result); + GeoGenfun::Cos Cos; + GeoGenfun::Sin Sin; + GeoGenfun::GENFUNCTION result = (Cos( G ) * Sin( G ) ); + return GeoGenfun::FunctionNoop(&result); } -Genfun::FunctionNoop LArGeo::BarrelConstruction::Del2(Genfun::GENFUNCTION G) const +GeoGenfun::FunctionNoop LArGeo::BarrelConstruction::Del2(GeoGenfun::GENFUNCTION G) const { - Genfun::Cos Cos; - Genfun::GENFUNCTION result = (Cos( G ) * Cos( G ) ); - return Genfun::FunctionNoop(&result); + GeoGenfun::Cos Cos; + GeoGenfun::GENFUNCTION result = (Cos( G ) * Cos( G ) ); + return GeoGenfun::FunctionNoop(&result); } -Genfun::FunctionNoop LArGeo::BarrelConstruction::ATan2(Genfun::GENFUNCTION y, Genfun::GENFUNCTION x) const { +GeoGenfun::FunctionNoop LArGeo::BarrelConstruction::ATan2(GeoGenfun::GENFUNCTION y, GeoGenfun::GENFUNCTION x) const { // Manufacture a Theta Function: - Genfun::Rectangular Theta; + GeoGenfun::Rectangular Theta; Theta.x0().setValue(0.0); Theta.x1().setValue(DBL_MAX); Theta.baseline().setValue(0.0); Theta.height().setValue(1.0); // Manufacture an ATan function: - Genfun::ATan ATan; + GeoGenfun::ATan ATan; // Manufacture a Mod function, putting this on the range (0-2PI) - Genfun::Mod Mod2Pi(2*M_PI); + GeoGenfun::Mod Mod2Pi(2*M_PI); // Now take ATan if x is positive - Genfun::GENFUNCTION result = Theta(x)*ATan(y/x) + Theta(-x)*(Mod2Pi(ATan(y/x)+M_PI)); - return Genfun::FunctionNoop(&result); + GeoGenfun::GENFUNCTION result = Theta(x)*ATan(y/x) + Theta(-x)*(Mod2Pi(ATan(y/x)+M_PI)); + return GeoGenfun::FunctionNoop(&result); } @@ -2111,7 +2111,7 @@ void LArGeo::BarrelConstruction::printParams() m_parameters->GetValue("LArEMBphiMaxBarrel") << std::endl; std::cout << "Number of zigs " << m_parameters->GetValue("LArEMBnoOFAccZigs") << std::endl; - std::cout << "Fold CLHEP::rad of curvature " << + std::cout << "Fold GeoModelKernelUnits::rad of curvature " << m_parameters->GetValue("LArEMBNeutFiberRadius") << std::endl; for (int i=0;i<15;i++) { std::cout << "Fold " << i << " radius " << diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx index ba3a3b00172..9aeeec35266 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx @@ -51,13 +51,13 @@ // For units: #include "CLHEP/Units/PhysicalConstants.h" // For Transformation Fields: -#include "CLHEP/GenericFunctions/Abs.hh" -#include "CLHEP/GenericFunctions/Mod.hh" -#include "CLHEP/GenericFunctions/Rectangular.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/FixedConstant.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoGenericFunctions/Abs.h" +#include "GeoGenericFunctions/Mod.h" +#include "GeoGenericFunctions/Rectangular.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/FixedConstant.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include <string> #include <cmath> @@ -65,7 +65,7 @@ #include <climits> #include <stdexcept> using namespace GeoXF; -using namespace Genfun; +using namespace GeoGenfun; // The objects for mapping plane indexes in Pcon to the record index // in RDBRecordset @@ -169,7 +169,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(larPosition, names[n]); if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); xf[n] = new GeoAlignableTransform(xfPos); StoredAlignX *sAlignX = new StoredAlignX(xf[n]); @@ -243,9 +243,9 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() // (LArVDetectorParameters) and adjust the volume geometry // accordingly. - // double cryoMotherRin[] = {1149.8*CLHEP::mm, 1149.8*CLHEP::mm,1149.8*CLHEP::mm,1149.8*CLHEP::mm,1149.8*CLHEP::mm,1149.8*CLHEP::mm}; - // double cryoMotherRout[] = {2890. *CLHEP::mm, 2890. *CLHEP::mm,2250. *CLHEP::mm,2250. *CLHEP::mm,2890. *CLHEP::mm,2890. *CLHEP::mm}; - // double cryoMotherZplan[] = {-3490.*CLHEP::mm,-2850.*CLHEP::mm,-2849.*CLHEP::mm, 2849.*CLHEP::mm, 2850.*CLHEP::mm, 3490.*CLHEP::mm}; + // double cryoMotherRin[] = {1149.8*GeoModelKernelUnits::mm, 1149.8*GeoModelKernelUnits::mm,1149.8*GeoModelKernelUnits::mm,1149.8*GeoModelKernelUnits::mm,1149.8*GeoModelKernelUnits::mm,1149.8*GeoModelKernelUnits::mm}; + // double cryoMotherRout[] = {2890. *GeoModelKernelUnits::mm, 2890. *GeoModelKernelUnits::mm,2250. *GeoModelKernelUnits::mm,2250. *GeoModelKernelUnits::mm,2890. *GeoModelKernelUnits::mm,2890. *GeoModelKernelUnits::mm}; + // double cryoMotherZplan[] = {-3490.*GeoModelKernelUnits::mm,-2850.*GeoModelKernelUnits::mm,-2849.*GeoModelKernelUnits::mm, 2849.*GeoModelKernelUnits::mm, 2850.*GeoModelKernelUnits::mm, 3490.*GeoModelKernelUnits::mm}; // Access source of detector parameters. // VDetectorParameters* parameters = VDetectorParameters::GetInstance(); @@ -322,8 +322,8 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() std::string cylName= cylStream.str(); int cylNumber = currentRecord->getInt("CYL_NUMBER"); - double zMin = currentRecord->getDouble("ZMIN")*CLHEP::cm; - double dZ = currentRecord->getDouble("DZ")*CLHEP::cm; + double zMin = currentRecord->getDouble("ZMIN")*GeoModelKernelUnits::cm; + double dZ = currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm; double zInCryostat = zMin + dZ / 2.; if(m_fullGeo){ @@ -347,12 +347,12 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() m_cryoMotherPhysical->add(new GeoNameTag(std::string("CryostatEarForward"))); m_cryoMotherPhysical->add(new GeoIdentifierTag(cylNumber)); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zInCryostat))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zInCryostat))); m_cryoMotherPhysical->add(earPhysVol); m_cryoMotherPhysical->add(new GeoNameTag(cylName+std::string("CryostatEarBackward"))); m_cryoMotherPhysical->add(new GeoIdentifierTag(cylNumber)); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(-zInCryostat))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(-zInCryostat))); m_cryoMotherPhysical->add(earPhysVol); } @@ -370,7 +370,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() -angle*(M_PI/180.0), M_PI + 2*angle*(M_PI/180)); - HepGeom::TranslateY3D offset(rmax-yvert); + GeoTrf::TranslateY3D offset(rmax-yvert); GeoBox * box = new GeoBox(rmax,rmax, rmax); const GeoShape & shape = tubs->subtract((*box)<<offset); @@ -379,12 +379,12 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() m_cryoMotherPhysical->add(new GeoNameTag(std::string("CryostatLegForward"))); m_cryoMotherPhysical->add(new GeoIdentifierTag(cylNumber)); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zInCryostat+zthick))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zInCryostat+zthick))); m_cryoMotherPhysical->add(legPhysVol); m_cryoMotherPhysical->add(new GeoNameTag(cylName+std::string("CryostatLegBackward"))); m_cryoMotherPhysical->add(new GeoIdentifierTag(cylNumber)); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(-zInCryostat-zthick))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(-zInCryostat-zthick))); m_cryoMotherPhysical->add(legPhysVol); } } @@ -395,9 +395,9 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() // For Reco Geometry construct only solenoid cylinders if(m_fullGeo || (10<=cylID && cylID<=14)) { solidBarrelCylinder - = new GeoTubs(currentRecord->getDouble("RMIN")*CLHEP::cm, - currentRecord->getDouble("RMIN")*CLHEP::cm + currentRecord->getDouble("DR")*CLHEP::cm, - currentRecord->getDouble("DZ")*CLHEP::cm / 2., + = new GeoTubs(currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm, + currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DR")*GeoModelKernelUnits::cm, + currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2., (double) 0., dphi_all); @@ -418,7 +418,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() if(10<=cylID && cylID<=14) m_cryoMotherPhysical->add(xfSolenoid); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zInCryostat))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zInCryostat))); m_cryoMotherPhysical->add(physBarrelCylinder); @@ -436,12 +436,12 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() m_cryoMotherPhysical->add(new GeoNameTag(cylName+std::string("PhysForward"))); m_cryoMotherPhysical->add(new GeoIdentifierTag(cylNumber)); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zInCryostat))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zInCryostat))); m_cryoMotherPhysical->add(physBarrelCylinder); m_cryoMotherPhysical->add(new GeoNameTag(cylName+std::string("PhysBackward"))); m_cryoMotherPhysical->add(new GeoIdentifierTag(cylNumber)); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(-zInCryostat))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(-zInCryostat))); m_cryoMotherPhysical->add(physBarrelCylinder); } } @@ -532,17 +532,17 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() double xxVis=((double)(Nvis)); double ZposB=0.5*(z1+z2); double twopi128 = 2.*M_PI/xxVis; - Genfun::Variable i; - Genfun::Mod Mod1(1.0),Mod128(xxVis),Mod2(2.0); - Genfun::GENFUNCTION PhiPos = PhiPos0 + twopi128*Mod128(i); - Genfun::GENFUNCTION Int = i - Mod1; - Genfun::Cos Cos; - Genfun::Sin Sin; + GeoGenfun::Variable i; + GeoGenfun::Mod Mod1(1.0),Mod128(xxVis),Mod2(2.0); + GeoGenfun::GENFUNCTION PhiPos = PhiPos0 + twopi128*Mod128(i); + GeoGenfun::GENFUNCTION Int = i - Mod1; + GeoGenfun::Cos Cos; + GeoGenfun::Sin Sin; GeoXF::TRANSFUNCTION TX = - GeoXF::Pow(HepGeom::TranslateX3D(1.0),RhoPosB*Cos(PhiPos))* - GeoXF::Pow(HepGeom::TranslateY3D(1.0),RhoPosB*Sin(PhiPos))* - GeoXF::Pow(HepGeom::TranslateZ3D(2*ZposB),Int(i/128))* - HepGeom::TranslateZ3D(-ZposB); + GeoXF::Pow(GeoTrf::TranslateX3D(1.0),RhoPosB*Cos(PhiPos))* + GeoXF::Pow(GeoTrf::TranslateY3D(1.0),RhoPosB*Sin(PhiPos))* + GeoXF::Pow(GeoTrf::TranslateZ3D(2*ZposB),Int(i/128))* + GeoTrf::TranslateZ3D(-ZposB); GeoSerialTransformer *st = new GeoSerialTransformer(phys_vis, &TX, 2*Nvis); innerWallPhys->add(st); } @@ -588,7 +588,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() GeoLogVol* extraLog = new GeoLogVol(extraName,extraCons,Aluminium); GeoPhysVol* extraPhys = new GeoPhysVol(extraLog); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(extra_zpos))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(extra_zpos))); m_cryoMotherPhysical->add(extraPhys); } } @@ -649,31 +649,31 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() double pos = -z+width/2 + distFromRidge; // position of bumpers in new description if (newBlocks->size() >0) { - Genfun::Variable i; // - Genfun::Mod Mod1(1.0),Mod2(2.0); // - Genfun::GENFUNCTION Truncate = i - Mod1(i); // - Genfun::GENFUNCTION AngleZ = -angle/2.+angle*Truncate(Mod2(i/2))+ 2.*M_PI/(1.0*nPairTot)*Truncate(i/4) + 2*M_PI/(2.*nPairTot); - Genfun::GENFUNCTION TransZ = -pos + 2.*pos*Mod2(i); + GeoGenfun::Variable i; // + GeoGenfun::Mod Mod1(1.0),Mod2(2.0); // + GeoGenfun::GENFUNCTION Truncate = i - Mod1(i); // + GeoGenfun::GENFUNCTION AngleZ = -angle/2.+angle*Truncate(Mod2(i/2))+ 2.*M_PI/(1.0*nPairTot)*Truncate(i/4) + 2*M_PI/(2.*nPairTot); + GeoGenfun::GENFUNCTION TransZ = -pos + 2.*pos*Mod2(i); TRANSFUNCTION tx = - GeoXF::Pow(HepGeom::TranslateZ3D(1.0),TransZ)* - GeoXF::Pow(HepGeom::RotateZ3D(1.0),AngleZ)* - HepGeom::Translate3D(0.,r+height/2,0.); + GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),TransZ)* + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),AngleZ)* + GeoTrf::Translate3D(0.,r+height/2,0.); GeoSerialTransformer *t = new GeoSerialTransformer(physVol, &tx, nPairTot*4); m_cryoMotherPhysical->add(t); } // position of bumper in old description else { - Genfun::Variable i; // - Genfun::Mod Mod1(1.0),Mod2(2.0); // - Genfun::GENFUNCTION Truncate = i - Mod1(i); // + GeoGenfun::Variable i; // + GeoGenfun::Mod Mod1(1.0),Mod2(2.0); // + GeoGenfun::GENFUNCTION Truncate = i - Mod1(i); // TRANSFUNCTION tx = - Pow(HepGeom::RotateZ3D(2*M_PI/nPairTot),Truncate(i/4))* - Pow(HepGeom::RotateZ3D(angle),Mod2(i/2))* - HepGeom::RotateZ3D(-angle/2)* - Pow(HepGeom::TranslateZ3D(2*pos),Mod2(i))* - HepGeom::Translate3D(0,r+height/2, -pos); + Pow(GeoTrf::RotateZ3D(2*M_PI/nPairTot),Truncate(i/4))* + Pow(GeoTrf::RotateZ3D(angle),Mod2(i/2))* + GeoTrf::RotateZ3D(-angle/2)* + Pow(GeoTrf::TranslateZ3D(2*pos),Mod2(i))* + GeoTrf::Translate3D(0,r+height/2, -pos); GeoSerialTransformer *t = new GeoSerialTransformer(physVol, &tx, nPairTot*4); m_cryoMotherPhysical->add(t); } @@ -707,7 +707,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() m_cryoMotherPhysical->add(new GeoNameTag(std::string("Barrel Cryo InnerEndWall Phys"))); GeoPhysVol *innerEndWallPhys = new GeoPhysVol(innerEndWallLog); m_cryoMotherPhysical->add(innerEndWallPhys); - m_cryoMotherPhysical->add(new GeoTransform(HepGeom::RotateY3D(M_PI))); + m_cryoMotherPhysical->add(new GeoTransform(GeoTrf::RotateY3D(M_PI))); m_cryoMotherPhysical->add(innerEndWallPhys); } @@ -722,9 +722,9 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() // sub-divided into sensitive-detector regions in the detector // routine. - // double totalLArRin[] = { 1565.5*CLHEP::mm, 1385.*CLHEP::mm, 1385.*CLHEP::mm, 1565.5*CLHEP::mm }; - // double totalLArRout[] = { 2140. *CLHEP::mm, 2140.*CLHEP::mm, 2140.*CLHEP::mm, 2140. *CLHEP::mm }; - // double totalLArZplan[] = {-3267. *CLHEP::mm,-3101.*CLHEP::mm, 3101.*CLHEP::mm, 3267. *CLHEP::mm }; + // double totalLArRin[] = { 1565.5*GeoModelKernelUnits::mm, 1385.*GeoModelKernelUnits::mm, 1385.*GeoModelKernelUnits::mm, 1565.5*GeoModelKernelUnits::mm }; + // double totalLArRout[] = { 2140. *GeoModelKernelUnits::mm, 2140.*GeoModelKernelUnits::mm, 2140.*GeoModelKernelUnits::mm, 2140. *GeoModelKernelUnits::mm }; + // double totalLArZplan[] = {-3267. *GeoModelKernelUnits::mm,-3101.*GeoModelKernelUnits::mm, 3101.*GeoModelKernelUnits::mm, 3267. *GeoModelKernelUnits::mm }; GeoPcon* totalLArShape = new GeoPcon(0., // starting phi @@ -763,11 +763,11 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() // to this shape to allow for mis-alignments in other dimensions.) // increase internal radius to allow misalignments - // ----------------------------------------------- double rInShift = 0.*CLHEP::mm; + // ----------------------------------------------- double rInShift = 0.*GeoModelKernelUnits::mm; - // double halfLArZplan[] = { 3.0 *CLHEP::mm, 3101.*CLHEP::mm, 3267. *CLHEP::mm }; - // double halfLArRin[] = {1385.*CLHEP::mm + rInShift, 1385.*CLHEP::mm + rInShift, 1565.5*CLHEP::mm + rInShift}; - // double halfLArRout[] = {2140.*CLHEP::mm, 2140.*CLHEP::mm, 2140. *CLHEP::mm }; + // double halfLArZplan[] = { 3.0 *GeoModelKernelUnits::mm, 3101.*GeoModelKernelUnits::mm, 3267. *GeoModelKernelUnits::mm }; + // double halfLArRin[] = {1385.*GeoModelKernelUnits::mm + rInShift, 1385.*GeoModelKernelUnits::mm + rInShift, 1565.5*GeoModelKernelUnits::mm + rInShift}; + // double halfLArRout[] = {2140.*GeoModelKernelUnits::mm, 2140.*GeoModelKernelUnits::mm, 2140. *GeoModelKernelUnits::mm }; std::string halfLArName = "LAr::Barrel::Cryostat::HalfLAr"; GeoPcon* halfLArShape = @@ -810,7 +810,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() // add alignable transform totalLArPhysical->add(xfHalfLArNeg); - totalLArPhysical->add( new GeoTransform(HepGeom::RotateY3D(180.*CLHEP::deg)) ); + totalLArPhysical->add( new GeoTransform(GeoTrf::RotateY3D(180.*GeoModelKernelUnits::deg)) ); totalLArPhysical->add(halfLArPhysicalNeg); { @@ -865,9 +865,9 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() std::string cylName= cylStream.str(); GeoTubs* solidBarrelCylinder - = new GeoTubs(currentRecord->getDouble("RMIN")*CLHEP::cm, - currentRecord->getDouble("RMIN")*CLHEP::cm + currentRecord->getDouble("DR")*CLHEP::cm, - currentRecord->getDouble("DZ")*CLHEP::cm / 2., + = new GeoTubs(currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm, + currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DR")*GeoModelKernelUnits::cm, + currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2., (double) 0., dphi_all); @@ -876,7 +876,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() GeoPhysVol* physBarrelCylinder = new GeoPhysVol(logicBarrelCylinder); - double zInCryostat = currentRecord->getDouble("ZMIN")*CLHEP::cm + currentRecord->getDouble("DZ")*CLHEP::cm / 2.; + double zInCryostat = currentRecord->getDouble("ZMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2.; int cylNumber = currentRecord->getInt("CYL_NUMBER"); @@ -886,23 +886,23 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() halfLArPhysicalPos->add(new GeoNameTag(cylName+std::string("PhysForward"))); halfLArPhysicalPos->add(new GeoIdentifierTag(cylNumber)); // halfLArPhysicalPos->add(xfPos); - halfLArPhysicalPos->add(new GeoTransform(HepGeom::TranslateZ3D(zInCryostat))); + halfLArPhysicalPos->add(new GeoTransform(GeoTrf::TranslateZ3D(zInCryostat))); halfLArPhysicalPos->add(physBarrelCylinder); halfLArPhysicalNeg->add(new GeoNameTag(cylName+std::string("PhysBackward"))); halfLArPhysicalNeg->add(new GeoIdentifierTag(cylNumber)); // halfLArPhysicalNeg->add(xfNeg); - halfLArPhysicalNeg->add(new GeoTransform(HepGeom::TranslateZ3D(zInCryostat))); + halfLArPhysicalNeg->add(new GeoTransform(GeoTrf::TranslateZ3D(zInCryostat))); halfLArPhysicalNeg->add(physBarrelCylinder); } else { totalLArPhysical->add(new GeoNameTag(cylName+std::string("PhysForward"))); totalLArPhysical->add(new GeoIdentifierTag(cylNumber)); - totalLArPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zInCryostat))); + totalLArPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zInCryostat))); totalLArPhysical->add(physBarrelCylinder); totalLArPhysical->add(new GeoNameTag(cylName+std::string("PhysBackward"))); totalLArPhysical->add(new GeoIdentifierTag(cylNumber)); - totalLArPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(-zInCryostat))); + totalLArPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(-zInCryostat))); totalLArPhysical->add(physBarrelCylinder); } } @@ -913,13 +913,13 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() } { // ----- Presampler ------ - double PresamplerMother_length = 1549.0*CLHEP::mm; // Copied from PresParameterDef.icc - double presamplerShift = 3.*CLHEP::mm; + double PresamplerMother_length = 1549.0*GeoModelKernelUnits::mm; // Copied from PresParameterDef.icc + double presamplerShift = 3.*GeoModelKernelUnits::mm; BarrelPresamplerConstruction barrelPSConstruction(m_fullGeo); // The "envelope" determined by the EMB should be a GeoFullPhysVol. GeoFullPhysVol* barrelPSPosEnvelope = barrelPSConstruction.GetPositiveEnvelope(); - GeoTransform *xfPos = new GeoTransform(HepGeom::Transform3D(HepGeom::TranslateZ3D(PresamplerMother_length+presamplerShift))); + GeoTransform *xfPos = new GeoTransform(GeoTrf::Transform3D(GeoTrf::TranslateZ3D(PresamplerMother_length+presamplerShift))); { halfLArPhysicalPos->add(xfPos); //halfLArPhysicalPos->add(new GeoNameTag("PositivePSBarrel")); @@ -931,7 +931,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() } // The "envelope" determined by the EMB should be a GeoFullPhysVol. GeoFullPhysVol* barrelPSNegEnvelope = barrelPSConstruction.GetNegativeEnvelope(); - GeoTransform *xfNeg = new GeoTransform(HepGeom::Transform3D(HepGeom::TranslateZ3D(PresamplerMother_length+presamplerShift))); + GeoTransform *xfNeg = new GeoTransform(GeoTrf::Transform3D(GeoTrf::TranslateZ3D(PresamplerMother_length+presamplerShift))); { halfLArPhysicalNeg->add(xfNeg); //halfLArPhysicalPos->add(new GeoNameTag("NegativePSBarrel")); @@ -957,7 +957,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() throw std::runtime_error(message.c_str()); } - GeoPcon* pcon = new GeoPcon(startPhi*CLHEP::deg,dPhi*CLHEP::deg); + GeoPcon* pcon = new GeoPcon(startPhi*GeoModelKernelUnits::deg,dPhi*GeoModelKernelUnits::deg); for(unsigned int ii=0; ii<sctEcCoolingPlanes.size(); ii++) { iter = sctEcCoolingPlanes.find(ii); @@ -978,10 +978,10 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope() const GeoLogVol* sctCiCoolingLog = new GeoLogVol("LAr::Barrel::Cryostat::SctCiCooling",pcon,material); GeoPhysVol* sctCiCoolingPhys = new GeoPhysVol(sctCiCoolingLog); - GeoTransform* xfPos1 = new GeoTransform(HepGeom::Transform3D()); - GeoTransform* xfPos2 = new GeoTransform(HepGeom::RotateZ3D(180*CLHEP::deg)); - GeoTransform* xfNeg1 = new GeoTransform(HepGeom::RotateZ3D((180+2*centerPhi)*CLHEP::deg)*HepGeom::RotateY3D(180*CLHEP::deg)); - GeoTransform* xfNeg2 = new GeoTransform(HepGeom::RotateZ3D(2*centerPhi*CLHEP::deg)*HepGeom::RotateY3D(180*CLHEP::deg)); + GeoTransform* xfPos1 = new GeoTransform(GeoTrf::Transform3D::Identity()); + GeoTransform* xfPos2 = new GeoTransform(GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)); + GeoTransform* xfNeg1 = new GeoTransform(GeoTrf::RotateZ3D((180+2*centerPhi)*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg)); + GeoTransform* xfNeg2 = new GeoTransform(GeoTrf::RotateZ3D(2*centerPhi*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg)); m_cryoMotherPhysical->add(xfPos1); m_cryoMotherPhysical->add(sctCiCoolingPhys); diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelDMConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelDMConstruction.cxx index 04fc2df01cd..eb57b265ddd 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelDMConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelDMConstruction.cxx @@ -51,17 +51,17 @@ // For Functions: // For functions: -#include "CLHEP/GenericFunctions/Abs.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" -#include "CLHEP/GenericFunctions/Sqrt.hh" -#include "CLHEP/GenericFunctions/ATan.hh" -#include "CLHEP/GenericFunctions/Rectangular.hh" -#include "CLHEP/GenericFunctions/Mod.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/FixedConstant.hh" - -using namespace Genfun; +#include "GeoGenericFunctions/Abs.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" +#include "GeoGenericFunctions/Sqrt.h" +#include "GeoGenericFunctions/ATan.h" +#include "GeoGenericFunctions/Rectangular.h" +#include "GeoGenericFunctions/Mod.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/FixedConstant.h" + +using namespace GeoGenfun; using namespace GeoXF; @@ -71,7 +71,7 @@ namespace BarrelDM { static const unsigned int NCrates=16; -static const double Alfa=360*CLHEP::deg/NCrates; +static const double Alfa=360*GeoModelKernelUnits::deg/NCrates; static const double Enda=1155; static const double Endb=1695.2; static const double Endc=2771.6; @@ -169,24 +169,24 @@ createSectorEnvelopes2FromDB (GeoFullPhysVol* envelope, double Spb2ytr = BarrelDMTraps[recordIndex]->getDouble("YTR"); double Spb2ztr = BarrelDMTraps[recordIndex]->getDouble("ZTR"); - const GeoMaterial* matLArServices17 = materialManager.getMaterial("LAr::LArServices17");// 0.035*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices18 = materialManager.getMaterial("LAr::LArServices18");// 0.240*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices19 = materialManager.getMaterial("LAr::LArServices19");// 0.469*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices20 = materialManager.getMaterial("LAr::LArServices20");// 0.353*CLHEP::gram/CLHEP::cm3 - const GeoMaterial *alu = materialManager.getMaterial("std::Aluminium"); //2.7 CLHEP::g/CLHEP::cm3 - const GeoMaterial *air = materialManager.getMaterial("std::Air"); //0.001214 CLHEP::g/CLHEP::cm3 + const GeoMaterial* matLArServices17 = materialManager.getMaterial("LAr::LArServices17");// 0.035*gram/cm3 + const GeoMaterial* matLArServices18 = materialManager.getMaterial("LAr::LArServices18");// 0.240*gram/cm3 + const GeoMaterial* matLArServices19 = materialManager.getMaterial("LAr::LArServices19");// 0.469*gram/cm3 + const GeoMaterial* matLArServices20 = materialManager.getMaterial("LAr::LArServices20");// 0.353*gram/cm3 + const GeoMaterial *alu = materialManager.getMaterial("std::Aluminium"); //2.7 g/cm3 + const GeoMaterial *air = materialManager.getMaterial("std::Air"); //0.001214 g/cm3 - HepGeom::Transform3D Cut3Boxe = HepGeom::Translate3D(Boxxtr, Boxytr, Boxztr)*HepGeom::RotateX3D(-20*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - HepGeom::Transform3D Cut4Boxe = HepGeom::Translate3D(Boxxtr, -Boxytr,Boxztr)*HepGeom::RotateX3D(20*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + GeoTrf::Transform3D Cut3Boxe = GeoTrf::Translate3D(Boxxtr, Boxytr, Boxztr)*GeoTrf::RotateX3D(-20*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + GeoTrf::Transform3D Cut4Boxe = GeoTrf::Translate3D(Boxxtr, -Boxytr,Boxztr)*GeoTrf::RotateX3D(20*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); // build 5 instances of SectorEnvelopes1 with 3 different materials! GeoTrd *Trdair2 = new GeoTrd(SecE2xhlen1, SecE2xhlen2, DYb, DYc, (Endc-Endb)/2); const GeoShape & SectorEnvelope= ((*Trdair2). - subtract((*Box) <<HepGeom::Transform3D(Cut3Boxe)). - subtract((*Box) <<HepGeom::Transform3D(Cut4Boxe))); + subtract((*Box) <<GeoTrf::Transform3D(Cut3Boxe)). + subtract((*Box) <<GeoTrf::Transform3D(Cut4Boxe))); const GeoShape & SectorEnvelopes= ((SectorEnvelope). - add(SectorEnvelope << HepGeom::TranslateY3D(-(DYb+DYc)*cos(Alfa/2)*cos(Alfa/2))*HepGeom::TranslateZ3D(-(DYb+DYc)*0.5*sin(Alfa))*HepGeom::RotateX3D(Alfa))); + add(SectorEnvelope << GeoTrf::TranslateY3D(-(DYb+DYc)*cos(Alfa/2)*cos(Alfa/2))*GeoTrf::TranslateZ3D(-(DYb+DYc)*0.5*sin(Alfa))*GeoTrf::RotateX3D(Alfa))); GeoLogVol *lvse2r = new GeoLogVol("LAr::DM::SectorEnvelopes2r",&SectorEnvelopes,matLArServices20); GeoPhysVol *sectorenvelopes2r = new GeoPhysVol(lvse2r); // for right-handed splice boxes @@ -195,28 +195,28 @@ createSectorEnvelopes2FromDB (GeoFullPhysVol* envelope, GeoPhysVol *sectorenvelopes2l = new GeoPhysVol(lvse2l); // for left-handed splice boxes GeoLogVol *lvse2h = new GeoLogVol("LAr::DM::SectorEnvelopes2h",&SectorEnvelopes,matLArServices19); - GeoPhysVol *sectorenvelopes2h = new GeoPhysVol(lvse2h); // no splice boxes horizontal at 0 & 180 CLHEP::deg. + GeoPhysVol *sectorenvelopes2h = new GeoPhysVol(lvse2h); // no splice boxes horizontal at 0 & 180 GeoModelKernelUnits::deg. GeoLogVol *lvse2vup = new GeoLogVol("LAr::DM::SectorEnvelopes2vup",&SectorEnvelopes,matLArServices17); - GeoPhysVol *sectorenvelopes2vup = new GeoPhysVol(lvse2vup); // no splice boxes vertical up at 90 CLHEP::deg + GeoPhysVol *sectorenvelopes2vup = new GeoPhysVol(lvse2vup); // no splice boxes vertical up at 90 GeoModelKernelUnits::deg GeoLogVol *lvse2vd = new GeoLogVol("LAr::DM::SectorEnvelopes2Vd",&SectorEnvelopes,matLArServices18); - GeoPhysVol *sectorenvelopes2vd = new GeoPhysVol(lvse2vd); // no splice boxes vertical down at 270 CLHEP::deg + GeoPhysVol *sectorenvelopes2vd = new GeoPhysVol(lvse2vd); // no splice boxes vertical down at 270 GeoModelKernelUnits::deg //---------- Build Splice boxes for InDet optical fibers-------- GeoTrap *GeoTrap1 = new GeoTrap(Spb1zhlen, Spb1theta, Spb1phi, Spb1yzn, Spb1xynzn, Spb1xypzn, Spb1angn, Spb1yzp, Spb1xynzp, Spb1xypzp, Spb1angp); GeoBox *Box1 = new GeoBox(SplBoxhlen, SplBoxhwdt, SplBoxhhgt); const GeoShape & SpliceBox = ((*GeoTrap1). - subtract(*Box1 << HepGeom::TranslateZ3D(SplBoxztr)*HepGeom::TranslateY3D(-SplBoxytr)*HepGeom::RotateX3D(SplBoxxrot*CLHEP::deg))); + subtract(*Box1 << GeoTrf::TranslateZ3D(SplBoxztr)*GeoTrf::TranslateY3D(-SplBoxytr)*GeoTrf::RotateX3D(SplBoxxrot*GeoModelKernelUnits::deg))); - GeoTransform *xtr = new GeoTransform (HepGeom::TranslateZ3D(Spb1ztr)*HepGeom::TranslateY3D(-Spb1ytr)*HepGeom::TranslateX3D(Spb1xtr)*HepGeom::RotateX3D(Spb1xrot*CLHEP::deg)); + GeoTransform *xtr = new GeoTransform (GeoTrf::TranslateZ3D(Spb1ztr)*GeoTrf::TranslateY3D(-Spb1ytr)*GeoTrf::TranslateX3D(Spb1xtr)*GeoTrf::RotateX3D(Spb1xrot*GeoModelKernelUnits::deg)); sectorenvelopes2r->add(xtr); GeoLogVol *lvspbr = new GeoLogVol("LAr::DM::SPliceBoxr",&SpliceBox,alu); GeoPhysVol *spliceboxr = new GeoPhysVol(lvspbr); sectorenvelopes2r->add(spliceboxr); - GeoTransform *xtl = new GeoTransform (HepGeom::TranslateZ3D(Spb1ztr)*HepGeom::TranslateY3D(-Spb1ytr)*HepGeom::TranslateX3D(Spb1xtr)*HepGeom::RotateY3D(-180*CLHEP::deg)*HepGeom::RotateX3D(-(Alfa/2))); + GeoTransform *xtl = new GeoTransform (GeoTrf::TranslateZ3D(Spb1ztr)*GeoTrf::TranslateY3D(-Spb1ytr)*GeoTrf::TranslateX3D(Spb1xtr)*GeoTrf::RotateY3D(-180*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-(Alfa/2))); sectorenvelopes2l->add(xtl); GeoLogVol *lvspbl = new GeoLogVol("LAr::DM::SpliceBoxl",&SpliceBox,alu); GeoPhysVol *spliceboxl = new GeoPhysVol(lvspbl); @@ -227,7 +227,7 @@ createSectorEnvelopes2FromDB (GeoFullPhysVol* envelope, GeoTrap *GeoTrap2 = new GeoTrap(Spb2zhlen, Spb2theta, Spb2phi, Spb2yzn, Spb2xynzn, Spb2xypzn, Spb2angn, Spb2yzp, Spb2xynzp, Spb2xypzp, Spb2angp); GeoTrap *GeoTrap3 = new GeoTrap(Spb3zhlen, Spb3theta, Spb3phi, Spb3yzn, Spb3xynzn, Spb3xypzn, Spb3angn, Spb3yzp, Spb3xynzp, Spb3xypzp, Spb3angp); - GeoTransform *xt1 = new GeoTransform (HepGeom::TranslateY3D(-Spb0ytr)*HepGeom::RotateX3D(Spb0xrot*CLHEP::deg)); + GeoTransform *xt1 = new GeoTransform (GeoTrf::TranslateY3D(-Spb0ytr)*GeoTrf::RotateX3D(Spb0xrot*GeoModelKernelUnits::deg)); spliceboxr->add(xt1); spliceboxl->add(xt1); GeoLogVol *lt1 = new GeoLogVol("LAr::DM::TBox1",Trd1,air); @@ -235,7 +235,7 @@ createSectorEnvelopes2FromDB (GeoFullPhysVol* envelope, spliceboxr->add(tbox1); spliceboxl->add(tbox1); - GeoTransform *xt2 = new GeoTransform (HepGeom::TranslateZ3D(Spb2ztr)*HepGeom::TranslateY3D(Spb2ytr)); + GeoTransform *xt2 = new GeoTransform (GeoTrf::TranslateZ3D(Spb2ztr)*GeoTrf::TranslateY3D(Spb2ytr)); spliceboxr->add(xt2); spliceboxl->add(xt2); GeoLogVol *lt2 = new GeoLogVol("LAr::DM::TBox2",GeoTrap2,air); @@ -243,7 +243,7 @@ createSectorEnvelopes2FromDB (GeoFullPhysVol* envelope, spliceboxr->add(tbox2); spliceboxl->add(tbox2); - GeoTransform *xt3 = new GeoTransform (HepGeom::TranslateZ3D(-Spb3ztr)); + GeoTransform *xt3 = new GeoTransform (GeoTrf::TranslateZ3D(-Spb3ztr)); spliceboxr->add(xt3); spliceboxl->add(xt3); GeoLogVol *lt3 = new GeoLogVol("LAr::DM::TBox3",GeoTrap3,air); @@ -253,16 +253,16 @@ createSectorEnvelopes2FromDB (GeoFullPhysVol* envelope, //-------------- Place volumes in LAr Envelope ------------------- - TRANSFUNCTION seA2r = Pow(HepGeom::RotateZ3D(1.0),8*f-(3*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA2l = Pow(HepGeom::RotateZ3D(1.0),8*f+(5*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC2r = Pow(HepGeom::RotateZ3D(1.0),8*f-(3*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(-SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC2l = Pow(HepGeom::RotateZ3D(1.0),8*f+(5*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(-SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA2Vup = Pow(HepGeom::RotateZ3D(1.0),f+(9*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA2Vd = Pow(HepGeom::RotateZ3D(1.0),f-(7*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA2H = Pow(HepGeom::RotateZ3D(1.0),8*f+(Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC2Vup = Pow(HepGeom::RotateZ3D(1.0),f+(9*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(-SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC2Vd = Pow(HepGeom::RotateZ3D(1.0),f-(7*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(-SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC2H = Pow(HepGeom::RotateZ3D(1.0),8*f+(Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(-SecE2ztr)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION seA2r = Pow(GeoTrf::RotateZ3D(1.0),8*f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA2l = Pow(GeoTrf::RotateZ3D(1.0),8*f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC2r = Pow(GeoTrf::RotateZ3D(1.0),8*f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC2l = Pow(GeoTrf::RotateZ3D(1.0),8*f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA2Vup = Pow(GeoTrf::RotateZ3D(1.0),f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA2Vd = Pow(GeoTrf::RotateZ3D(1.0),f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA2H = Pow(GeoTrf::RotateZ3D(1.0),8*f+(Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC2Vup = Pow(GeoTrf::RotateZ3D(1.0),f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC2Vd = Pow(GeoTrf::RotateZ3D(1.0),f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC2H = Pow(GeoTrf::RotateZ3D(1.0),8*f+(Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-SecE2ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *setA2r = new GeoSerialTransformer(sectorenvelopes2r,&seA2r, 2); GeoSerialTransformer *setA2l = new GeoSerialTransformer(sectorenvelopes2l,&seA2l, 2); @@ -311,12 +311,12 @@ createBridgeEnvelopesFromDB (GeoFullPhysVol* envelope, double BridgeExtr = r->getDouble("XTR"); double BridgeEztr = r->getDouble("ZTR"); - GeoTrap *Trapair = new GeoTrap(BridgeEzhlen, BridgeEtheta*CLHEP::deg, BridgeEphi, BridgeEyzn, BridgeExynzn, BridgeExypzn, BridgeEangn, BridgeEyzp, BridgeExynzp, BridgeExypzp, BridgeEangp); + GeoTrap *Trapair = new GeoTrap(BridgeEzhlen, BridgeEtheta*GeoModelKernelUnits::deg, BridgeEphi, BridgeEyzn, BridgeExynzn, BridgeExypzn, BridgeEangn, BridgeEyzp, BridgeExynzp, BridgeExypzp, BridgeEangp); GeoLogVol *lvbre = new GeoLogVol("LAr::DM::BridgeEnvelopes",Trapair,matLArServices8);//In the end Density at least >= than SE1 because of Cryo Pipes GeoPhysVol *bridgeenvelopes = new GeoPhysVol(lvbre); - TRANSFUNCTION breA = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(BridgeExtr)*HepGeom::TranslateZ3D(BridgeEztr)*HepGeom::RotateZ3D(90*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg)*HepGeom::RotateX3D(90*CLHEP::deg); - TRANSFUNCTION breC = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(BridgeExtr)*HepGeom::TranslateZ3D(-BridgeEztr)*HepGeom::RotateZ3D(-90*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg)*HepGeom::RotateX3D(-90*CLHEP::deg); + TRANSFUNCTION breA = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(BridgeExtr)*GeoTrf::TranslateZ3D(BridgeEztr)*GeoTrf::RotateZ3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION breC = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(BridgeExtr)*GeoTrf::TranslateZ3D(-BridgeEztr)*GeoTrf::RotateZ3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *bretA = new GeoSerialTransformer(bridgeenvelopes,&breA, NCrates); GeoSerialTransformer *bretC = new GeoSerialTransformer(bridgeenvelopes,&breC, NCrates); envelope->add(bretA); @@ -345,8 +345,8 @@ createBaseEnvelopesFromDB (GeoFullPhysVol* envelope, GeoLogVol *lvbe = new GeoLogVol("LAr::DM::BaseEnvelopes",Trd1air,matLArServices8); //In the end Density at least >= than SE1 because of Cryo Pipes GeoPhysVol *baseenvelopes = new GeoPhysVol(lvbe); - TRANSFUNCTION beA = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(BaseExtr)*HepGeom::TranslateZ3D(BaseEztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION beC = Pow(HepGeom::RotateZ3D(1.0),f+(Alfa/2))*HepGeom::TranslateX3D(BaseExtr)*HepGeom::TranslateZ3D(-BaseEztr)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION beA = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(BaseExtr)*GeoTrf::TranslateZ3D(BaseEztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION beC = Pow(GeoTrf::RotateZ3D(1.0),f+(Alfa/2))*GeoTrf::TranslateX3D(BaseExtr)*GeoTrf::TranslateZ3D(-BaseEztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *betA = new GeoSerialTransformer(baseenvelopes,&beA, NCrates); GeoSerialTransformer *betC = new GeoSerialTransformer(baseenvelopes,&beC, NCrates); envelope->add(betA); @@ -394,24 +394,24 @@ void createFromDB (GeoFullPhysVol* envelope, unsigned int recordIndex; // Get materials - const GeoMaterial *alu = materialManager.getMaterial("std::Aluminium"); //2.7 CLHEP::g/CLHEP::cm3 - const GeoMaterial* matBoardsEnvelope = materialManager.getMaterial("LAr::BoardsEnvelope");// 0.932*CLHEP::gram/CLHEP::cm3); - const GeoMaterial* matLArServices1 = materialManager.getMaterial("LAr::LArServices1");// 1.020*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices2 = materialManager.getMaterial("LAr::LArServices2");// 0.955*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices3 = materialManager.getMaterial("LAr::LArServices3");// 1.005*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices4 = materialManager.getMaterial("LAr::LArServices4");// 0.460*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices5 = materialManager.getMaterial("LAr::LArServices5");// 0.480*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices6 = materialManager.getMaterial("LAr::LArServices6");// 1.000*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices7 = materialManager.getMaterial("LAr::LArServices7");// 0.935*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices8 = materialManager.getMaterial("LAr::LArServices8");// 1.070*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices9 = materialManager.getMaterial("LAr::LArServices9");// 1.020*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices10 = materialManager.getMaterial("LAr::LArServices10");// 0.995*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices11 = materialManager.getMaterial("LAr::LArServices11");// 0.835*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices12 = materialManager.getMaterial("LAr::LArServices12");// 0.640*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices13 = materialManager.getMaterial("LAr::LArServices13");// 0.690*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices14 = materialManager.getMaterial("LAr::LArServices14");// 0.825*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices15 = materialManager.getMaterial("LAr::LArServices15");// 0.875*CLHEP::gram/CLHEP::cm3 - const GeoMaterial* matLArServices16 = materialManager.getMaterial("LAr::LArServices16");// 1.035*CLHEP::gram/CLHEP::cm3 + const GeoMaterial *alu = materialManager.getMaterial("std::Aluminium"); //2.7 g/cm3 + const GeoMaterial* matBoardsEnvelope = materialManager.getMaterial("LAr::BoardsEnvelope");// 0.932*gram/cm3); + const GeoMaterial* matLArServices1 = materialManager.getMaterial("LAr::LArServices1");// 1.020*gram/cm3 + const GeoMaterial* matLArServices2 = materialManager.getMaterial("LAr::LArServices2");// 0.955*gram/cm3 + const GeoMaterial* matLArServices3 = materialManager.getMaterial("LAr::LArServices3");// 1.005*gram/cm3 + const GeoMaterial* matLArServices4 = materialManager.getMaterial("LAr::LArServices4");// 0.460*gram/cm3 + const GeoMaterial* matLArServices5 = materialManager.getMaterial("LAr::LArServices5");// 0.480*gram/cm3 + const GeoMaterial* matLArServices6 = materialManager.getMaterial("LAr::LArServices6");// 1.000*gram/cm3 + const GeoMaterial* matLArServices7 = materialManager.getMaterial("LAr::LArServices7");// 0.935*gram/cm3 + const GeoMaterial* matLArServices8 = materialManager.getMaterial("LAr::LArServices8");// 1.070*gram/cm3 + const GeoMaterial* matLArServices9 = materialManager.getMaterial("LAr::LArServices9");// 1.020*gram/cm3 + const GeoMaterial* matLArServices10 = materialManager.getMaterial("LAr::LArServices10");// 0.995*gram/cm3 + const GeoMaterial* matLArServices11 = materialManager.getMaterial("LAr::LArServices11");// 0.835*gram/cm3 + const GeoMaterial* matLArServices12 = materialManager.getMaterial("LAr::LArServices12");// 0.640*gram/cm3 + const GeoMaterial* matLArServices13 = materialManager.getMaterial("LAr::LArServices13");// 0.690*gram/cm3 + const GeoMaterial* matLArServices14 = materialManager.getMaterial("LAr::LArServices14");// 0.825*gram/cm3 + const GeoMaterial* matLArServices15 = materialManager.getMaterial("LAr::LArServices15");// 0.875*gram/cm3 + const GeoMaterial* matLArServices16 = materialManager.getMaterial("LAr::LArServices16");// 1.035*gram/cm3 const double inv_Endab = 1. / (Endb - Enda); Variable i; @@ -476,9 +476,9 @@ void createFromDB (GeoFullPhysVol* envelope, GeoTube *Ped2 = new GeoTube(ped2minr, ped2maxr, ped2zhlen); GeoTube *Ped3 = new GeoTube(ped3minr,ped3maxr , ped3zhlen); const GeoShape & CratePed=((*Pedestal).subtract(*Ped1). - subtract((*Ped2) <<HepGeom::TranslateY3D(-ped2ytr)*HepGeom::RotateY3D(90*CLHEP::deg)). - subtract((*Ped3) <<HepGeom::TranslateX3D(-ped3xtr)). - subtract((*Ped2) <<HepGeom::TranslateY3D(ped2ytr)*HepGeom::RotateY3D(90*CLHEP::deg))); + subtract((*Ped2) <<GeoTrf::TranslateY3D(-ped2ytr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)). + subtract((*Ped3) <<GeoTrf::TranslateX3D(-ped3xtr)). + subtract((*Ped2) <<GeoTrf::TranslateY3D(ped2ytr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg))); GeoLogVol *lvped = new GeoLogVol("LAr::DM::Ped",&CratePed,alu); GeoPhysVol *pedestal = new GeoPhysVol(lvped); @@ -487,7 +487,7 @@ void createFromDB (GeoFullPhysVol* envelope, GeoBox *Crate1 = new GeoBox(crate1hlen, crate1hwdt, crate1hhgt); GeoBox *Crate2 = new GeoBox(crate2hlen, crate2hwdt, crate2hhgt); GeoBox *Crate3 = new GeoBox(crate3hlen, crate3hwdt, crate3hhgt); - const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<HepGeom::TranslateX3D(-crate3xtr)); + const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<GeoTrf::TranslateX3D(-crate3xtr)); GeoLogVol *lvcrate = new GeoLogVol("LAr::DM::Crate",&FEBCrate,alu); GeoPhysVol *crate = new GeoPhysVol(lvcrate); @@ -500,26 +500,26 @@ void createFromDB (GeoFullPhysVol* envelope, //-------------- Place volumes in envelope ---------------------------- //Crates - TRANSFUNCTION crA = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(crate1xtr)*HepGeom::TranslateZ3D(crate1ztr); - TRANSFUNCTION crC = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(crate1xtr)*HepGeom::TranslateZ3D(-crate1ztr); + TRANSFUNCTION crA = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(crate1ztr); + TRANSFUNCTION crC = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(-crate1ztr); GeoSerialTransformer *crtA = new GeoSerialTransformer(crate,&crA, NCrates); GeoSerialTransformer *crtC = new GeoSerialTransformer(crate,&crC, NCrates); envelope->add(crtA); envelope->add(crtC); //Pedestals - TRANSFUNCTION pedA = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(pedestxtr)*HepGeom::TranslateZ3D(pedestztr); - TRANSFUNCTION pedC = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(pedestxtr)*HepGeom::TranslateZ3D(-pedestztr); + TRANSFUNCTION pedA = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(pedestztr); + TRANSFUNCTION pedC = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(-pedestztr); GeoSerialTransformer *pedtA = new GeoSerialTransformer(pedestal,&pedA, NCrates); GeoSerialTransformer *pedtC = new GeoSerialTransformer(pedestal,&pedC, NCrates); envelope->add(pedtA); envelope->add(pedtC); //FEBoards - TRANSFUNCTION feb1A = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(BoardEytr)*HepGeom::TranslateX3D(BoardExtr)*HepGeom::TranslateZ3D(BoardEztr); - TRANSFUNCTION feb2A = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(-BoardEytr)*HepGeom::TranslateX3D(BoardExtr)*HepGeom::TranslateZ3D(BoardEztr); - TRANSFUNCTION feb1C = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(BoardEytr)*HepGeom::TranslateX3D(BoardExtr)*HepGeom::TranslateZ3D(-BoardEztr); - TRANSFUNCTION feb2C = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(-BoardEytr)*HepGeom::TranslateX3D(BoardExtr)*HepGeom::TranslateZ3D(-BoardEztr); + TRANSFUNCTION feb1A = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr); + TRANSFUNCTION feb2A = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr); + TRANSFUNCTION feb1C = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(-BoardEztr); + TRANSFUNCTION feb2C = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(-BoardEztr); GeoSerialTransformer *febt1A = new GeoSerialTransformer(boardenvelope,&feb1A, NCrates); GeoSerialTransformer *febt1C = new GeoSerialTransformer(boardenvelope,&feb1C, NCrates); GeoSerialTransformer *febt2A = new GeoSerialTransformer(boardenvelope,&feb2A, NCrates); @@ -568,8 +568,8 @@ void createFromDB (GeoFullPhysVol* envelope, // transforms GeoBox *Box = new GeoBox(Boxhlen, Boxhwdt, Boxhhgt); - HepGeom::Transform3D Cut3Boxp = HepGeom::Translate3D(Boxxtr, Boxytr, Boxxrot)*HepGeom::RotateX3D(-20*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - HepGeom::Transform3D Cut4Boxp = HepGeom::Translate3D(Boxxtr, -Boxytr,Boxxrot)*HepGeom::RotateX3D(20*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + GeoTrf::Transform3D Cut3Boxp = GeoTrf::Translate3D(Boxxtr, Boxytr, Boxxrot)*GeoTrf::RotateX3D(-20*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + GeoTrf::Transform3D Cut4Boxp = GeoTrf::Translate3D(Boxxtr, -Boxytr,Boxxrot)*GeoTrf::RotateX3D(20*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); // ----- build sector envelopes ----- // build 16 instances of SectorEnvelopes1 each with its own material! @@ -668,7 +668,7 @@ void createFromDB (GeoFullPhysVol* envelope, GeoLogVol *extraMatLog = new GeoLogVol(ringName,extraMatTdr,matExtraTdr); GeoPhysVol *extraMatPhys = new GeoPhysVol(extraMatLog); for (unsigned int isect=0;isect<se1List.size();isect++) { - se1List[isect]->add(new GeoTransform(HepGeom::TranslateZ3D(zpos))); + se1List[isect]->add(new GeoTransform(GeoTrf::TranslateZ3D(zpos))); se1List[isect]->add(extraMatPhys); } } @@ -707,7 +707,7 @@ void createFromDB (GeoFullPhysVol* envelope, for (unsigned int isect=0;isect<se1List.size();isect++) { // no PPF1 box around phi=0 and phi=pi if (noHorizontal>0 && ((isect==7 && iphi==1) || (isect==8 && iphi==0) || (isect==15 && iphi==1) || (isect==0 && iphi==0) ) ) continue; - se1List[isect]->add(new GeoTransform(HepGeom::Translate3D(xpos,ypos,zpos))); + se1List[isect]->add(new GeoTransform(GeoTrf::Translate3D(xpos,ypos,zpos))); se1List[isect]->add(ppf1Phys); } } @@ -723,7 +723,7 @@ void createFromDB (GeoFullPhysVol* envelope, GeoPhysVol *baseplates = new GeoPhysVol(lvbp); // ----- build bridge plates ----- - GeoTrap *Trapalu = new GeoTrap(BridgePzhlen, BridgePtheta*CLHEP::deg, BridgePphi, BridgePyzn, BridgePxynzn, BridgePxypzn, BridgePangn, BridgePyzp, BridgePxynzp, BridgePxypzp, BridgePangp); + GeoTrap *Trapalu = new GeoTrap(BridgePzhlen, BridgePtheta*GeoModelKernelUnits::deg, BridgePphi, BridgePyzn, BridgePxynzn, BridgePxypzn, BridgePangn, BridgePyzp, BridgePxynzp, BridgePxypzp, BridgePangp); GeoLogVol *lvbrp = new GeoLogVol("LAr::DM::BridgePlates",Trapalu,alu); GeoPhysVol *bridgeplates = new GeoPhysVol(lvbrp); @@ -731,8 +731,8 @@ void createFromDB (GeoFullPhysVol* envelope, // ----- build sector plates ----- GeoTrd *Trd2alu = new GeoTrd(SecPxhlen1, SecPxhlen2, SecPyhlen1, SecPyhlen2, SecPzhlen );/// const GeoShape & SectorPlates= ((*Trd2alu). - subtract((*Box) <<HepGeom::Transform3D(Cut3Boxp)). - subtract((*Box) <<HepGeom::Transform3D(Cut4Boxp))); + subtract((*Box) <<GeoTrf::Transform3D(Cut3Boxp)). + subtract((*Box) <<GeoTrf::Transform3D(Cut4Boxp))); GeoLogVol *lvsp = new GeoLogVol("LAr::DM::SectorPlates",&SectorPlates,alu); GeoPhysVol *sectorplates = new GeoPhysVol(lvsp); @@ -740,18 +740,18 @@ void createFromDB (GeoFullPhysVol* envelope, //-------------- Place volumes in LAr Envelope ------------------- //sectorPlates - TRANSFUNCTION spA = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(SecPxtr)*HepGeom::TranslateZ3D(SecPztr)*HepGeom::RotateY3D(90*CLHEP::deg);/// - TRANSFUNCTION spC = Pow(HepGeom::RotateZ3D(1.0),f+(Alfa/2))*HepGeom::TranslateX3D(SecPxtr)*HepGeom::TranslateZ3D(-SecPztr)*HepGeom::RotateY3D(90*CLHEP::deg);/// + TRANSFUNCTION spA = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(SecPxtr)*GeoTrf::TranslateZ3D(SecPztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg);/// + TRANSFUNCTION spC = Pow(GeoTrf::RotateZ3D(1.0),f+(Alfa/2))*GeoTrf::TranslateX3D(SecPxtr)*GeoTrf::TranslateZ3D(-SecPztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg);/// GeoSerialTransformer *sptA = new GeoSerialTransformer(sectorplates,&spA, NCrates); GeoSerialTransformer *sptC = new GeoSerialTransformer(sectorplates,&spC, NCrates); envelope->add(sptA); envelope->add(sptC); //bridgePlates - TRANSFUNCTION brpA1 = Pow(HepGeom::RotateZ3D(1.0),f-(5*Alfa/2))*HepGeom::TranslateX3D(BridgePxtr)*HepGeom::TranslateZ3D(BridgePztr)*HepGeom::RotateZ3D(90*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg)*HepGeom::RotateX3D(90*CLHEP::deg); - TRANSFUNCTION brpA2 = Pow(HepGeom::RotateZ3D(1.0),f+(13*Alfa/2))*HepGeom::TranslateX3D(BridgePxtr)*HepGeom::TranslateZ3D(BridgePztr)*HepGeom::RotateZ3D(90*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg)*HepGeom::RotateX3D(90*CLHEP::deg); - TRANSFUNCTION brpC1 = Pow(HepGeom::RotateZ3D(1.0),f-(5*Alfa/2))*HepGeom::TranslateX3D(BridgePxtr)*HepGeom::TranslateZ3D(-BridgePztr)*HepGeom::RotateZ3D(-90*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg)*HepGeom::RotateX3D(-90*CLHEP::deg); - TRANSFUNCTION brpC2 = Pow(HepGeom::RotateZ3D(1.0),f+(13*Alfa/2))*HepGeom::TranslateX3D(BridgePxtr)*HepGeom::TranslateZ3D(-BridgePztr)*HepGeom::RotateZ3D(-90*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg)*HepGeom::RotateX3D(-90*CLHEP::deg); GeoSerialTransformer *brptA1 = new GeoSerialTransformer(bridgeplates,&brpA1, 5); + TRANSFUNCTION brpA1 = Pow(GeoTrf::RotateZ3D(1.0),f-(5*Alfa/2))*GeoTrf::TranslateX3D(BridgePxtr)*GeoTrf::TranslateZ3D(BridgePztr)*GeoTrf::RotateZ3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION brpA2 = Pow(GeoTrf::RotateZ3D(1.0),f+(13*Alfa/2))*GeoTrf::TranslateX3D(BridgePxtr)*GeoTrf::TranslateZ3D(BridgePztr)*GeoTrf::RotateZ3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION brpC1 = Pow(GeoTrf::RotateZ3D(1.0),f-(5*Alfa/2))*GeoTrf::TranslateX3D(BridgePxtr)*GeoTrf::TranslateZ3D(-BridgePztr)*GeoTrf::RotateZ3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-90*GeoModelKernelUnits::deg); + TRANSFUNCTION brpC2 = Pow(GeoTrf::RotateZ3D(1.0),f+(13*Alfa/2))*GeoTrf::TranslateX3D(BridgePxtr)*GeoTrf::TranslateZ3D(-BridgePztr)*GeoTrf::RotateZ3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *brptA1 = new GeoSerialTransformer(bridgeplates,&brpA1, 5); GeoSerialTransformer *brptA2 = new GeoSerialTransformer(bridgeplates,&brpA2, 5); GeoSerialTransformer *brptC1 = new GeoSerialTransformer(bridgeplates,&brpC1, 5); GeoSerialTransformer *brptC2 = new GeoSerialTransformer(bridgeplates,&brpC2, 5); @@ -761,8 +761,8 @@ void createFromDB (GeoFullPhysVol* envelope, envelope->add(brptC2); //basePlates - TRANSFUNCTION bpA = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(BasePxtr)*HepGeom::TranslateZ3D(BasePztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION bpC = Pow(HepGeom::RotateZ3D(1.0),f+(Alfa/2))*HepGeom::TranslateX3D(BasePxtr)*HepGeom::TranslateZ3D(-BasePztr)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION bpA = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(BasePxtr)*GeoTrf::TranslateZ3D(BasePztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION bpC = Pow(GeoTrf::RotateZ3D(1.0),f+(Alfa/2))*GeoTrf::TranslateX3D(BasePxtr)*GeoTrf::TranslateZ3D(-BasePztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *bptA = new GeoSerialTransformer(baseplates,&bpA, NCrates); GeoSerialTransformer *bptC = new GeoSerialTransformer(baseplates,&bpC, NCrates); envelope->add(bptA); @@ -770,39 +770,39 @@ void createFromDB (GeoFullPhysVol* envelope, //sectorEnvelopes1 //counter-clockwise from top if taking sideA for reference (clockwise for sideC) - TRANSFUNCTION seA1G5 = Pow(HepGeom::RotateZ3D(1.0),f+(9*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G5 = Pow(HepGeom::RotateZ3D(1.0),f+(9*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G6 = Pow(HepGeom::RotateZ3D(1.0),f+(11*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G6 = Pow(HepGeom::RotateZ3D(1.0),f+(11*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G7 = Pow(HepGeom::RotateZ3D(1.0),f+(13*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G7 = Pow(HepGeom::RotateZ3D(1.0),f+(13*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G8 = Pow(HepGeom::RotateZ3D(1.0),f+(15*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G8 = Pow(HepGeom::RotateZ3D(1.0),f+(15*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G9 = Pow(HepGeom::RotateZ3D(1.0),f+(17*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G9 = Pow(HepGeom::RotateZ3D(1.0),f+(17*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G10 = Pow(HepGeom::RotateZ3D(1.0),f+(19*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G10 = Pow(HepGeom::RotateZ3D(1.0),f+(19*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G11 = Pow(HepGeom::RotateZ3D(1.0),f+(21*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G11 = Pow(HepGeom::RotateZ3D(1.0),f+(21*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G12 = Pow(HepGeom::RotateZ3D(1.0),f+(23*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G12 = Pow(HepGeom::RotateZ3D(1.0),f+(23*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION seA1G5 = Pow(GeoTrf::RotateZ3D(1.0),f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G5 = Pow(GeoTrf::RotateZ3D(1.0),f+(9*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G6 = Pow(GeoTrf::RotateZ3D(1.0),f+(11*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G6 = Pow(GeoTrf::RotateZ3D(1.0),f+(11*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G7 = Pow(GeoTrf::RotateZ3D(1.0),f+(13*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G7 = Pow(GeoTrf::RotateZ3D(1.0),f+(13*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G8 = Pow(GeoTrf::RotateZ3D(1.0),f+(15*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G8 = Pow(GeoTrf::RotateZ3D(1.0),f+(15*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G9 = Pow(GeoTrf::RotateZ3D(1.0),f+(17*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G9 = Pow(GeoTrf::RotateZ3D(1.0),f+(17*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G10 = Pow(GeoTrf::RotateZ3D(1.0),f+(19*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G10 = Pow(GeoTrf::RotateZ3D(1.0),f+(19*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G11 = Pow(GeoTrf::RotateZ3D(1.0),f+(21*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G11 = Pow(GeoTrf::RotateZ3D(1.0),f+(21*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G12 = Pow(GeoTrf::RotateZ3D(1.0),f+(23*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G12 = Pow(GeoTrf::RotateZ3D(1.0),f+(23*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); //clockwise from top if taking sideA for reference (counter-clockwise for sideC) - TRANSFUNCTION seA1G4 = Pow(HepGeom::RotateZ3D(1.0),f+(7*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G4 = Pow(HepGeom::RotateZ3D(1.0),f+(7*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G3 = Pow(HepGeom::RotateZ3D(1.0),f+(5*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G3 = Pow(HepGeom::RotateZ3D(1.0),f+(5*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G2 = Pow(HepGeom::RotateZ3D(1.0),f+(3*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G2 = Pow(HepGeom::RotateZ3D(1.0),f+(3*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G1 = Pow(HepGeom::RotateZ3D(1.0),f+(1*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G1 = Pow(HepGeom::RotateZ3D(1.0),f+(1*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G16 = Pow(HepGeom::RotateZ3D(1.0),f-(1*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G16 = Pow(HepGeom::RotateZ3D(1.0),f-(1*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G15 = Pow(HepGeom::RotateZ3D(1.0),f-(3*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G15 = Pow(HepGeom::RotateZ3D(1.0),f-(3*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G14 = Pow(HepGeom::RotateZ3D(1.0),f-(5*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G14 = Pow(HepGeom::RotateZ3D(1.0),f-(5*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA1G13 = Pow(HepGeom::RotateZ3D(1.0),f-(7*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1G13 = Pow(HepGeom::RotateZ3D(1.0),f-(7*Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-SecE1ztr)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION seA1G4 = Pow(GeoTrf::RotateZ3D(1.0),f+(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G4 = Pow(GeoTrf::RotateZ3D(1.0),f+(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G3 = Pow(GeoTrf::RotateZ3D(1.0),f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G3 = Pow(GeoTrf::RotateZ3D(1.0),f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G2 = Pow(GeoTrf::RotateZ3D(1.0),f+(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G2 = Pow(GeoTrf::RotateZ3D(1.0),f+(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G1 = Pow(GeoTrf::RotateZ3D(1.0),f+(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G1 = Pow(GeoTrf::RotateZ3D(1.0),f+(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G16 = Pow(GeoTrf::RotateZ3D(1.0),f-(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G16 = Pow(GeoTrf::RotateZ3D(1.0),f-(1*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G15 = Pow(GeoTrf::RotateZ3D(1.0),f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G15 = Pow(GeoTrf::RotateZ3D(1.0),f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G14 = Pow(GeoTrf::RotateZ3D(1.0),f-(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G14 = Pow(GeoTrf::RotateZ3D(1.0),f-(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA1G13 = Pow(GeoTrf::RotateZ3D(1.0),f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1G13 = Pow(GeoTrf::RotateZ3D(1.0),f-(7*Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-SecE1ztr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *setA1G5 = new GeoSerialTransformer(sectorenvelopes1g5,&seA1G5, 1); GeoSerialTransformer *setC1G5 = new GeoSerialTransformer(sectorenvelopes1g5,&seC1G5, 1); @@ -976,13 +976,13 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) // Define some custom materials - That will move to the GeomDB //Fiberglass - GeoMaterial *matFiberglass = new GeoMaterial("SiO2",2.20*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matFiberglass = new GeoMaterial("SiO2",2.20*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matFiberglass->add(silicon,silicon->getA()/(silicon->getA()+2*oxygen->getA())); matFiberglass->add(oxygen,2*oxygen->getA()/(silicon->getA()+2*oxygen->getA())); matFiberglass->lock(); //Epoxy Resin - GeoMaterial *matEpoxyResin = new GeoMaterial("Epoxy", 1.9*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matEpoxyResin = new GeoMaterial("Epoxy", 1.9*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matEpoxyResin->add(hydrogen, 14*hydrogen->getA() / (14*hydrogen->getA() + 4*oxygen->getA()+ 8*carbon->getA())); matEpoxyResin->add(oxygen, 4*oxygen->getA() / (14*hydrogen->getA() + 4*oxygen->getA()+ 8*carbon->getA())); matEpoxyResin->add(carbon, 8*carbon->getA() / (14*hydrogen->getA() + 4*oxygen->getA()+ 8*carbon->getA())); @@ -990,7 +990,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) matEpoxyResin->lock(); //FEBBoards - GeoMaterial *matFEBBoards = new GeoMaterial("FEBBoards", 4.03*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matFEBBoards = new GeoMaterial("FEBBoards", 4.03*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matFEBBoards->add(matFiberglass, 0.52); matFEBBoards->add(copper, 0.28); matFEBBoards->add(matEpoxyResin, 0.20); @@ -999,13 +999,13 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) //SERVICES:CABLES, TUBES ETC...// //Water - GeoMaterial *matWater = new GeoMaterial("Water", 1*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matWater = new GeoMaterial("Water", 1*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matWater->add(hydrogen, 2*hydrogen->getA() / (2*hydrogen->getA() + 1*oxygen->getA())); matWater->add(oxygen, 1*oxygen->getA() / (2*hydrogen->getA() + 1*oxygen->getA())); matWater->lock(); //InDetServices - GeoMaterial* matLArServices = new GeoMaterial("LArServices", 4.03*CLHEP::gram/CLHEP::cm3); + GeoMaterial* matLArServices = new GeoMaterial("LArServices", 4.03*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matLArServices->add(shieldSteel, 0.20); matLArServices->add(copper, 0.60); matLArServices->add(matRubber, 0.10); @@ -1021,16 +1021,16 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoBox *Pedestal = new GeoBox(71, 400.05, 248.65); GeoBox *Ped1 = new GeoBox(67, 397.05, 245.65); GeoTube *Ped2 = new GeoTube(0, 150, 75); - GeoTube *Ped3 = new GeoTube(0, 2775, 300); //, -75*CLHEP::deg, 150*CLHEP::deg); // 0, 2775, 300, -8.2*CLHEP::deg, 16.4*CLHEP::deg) + GeoTube *Ped3 = new GeoTube(0, 2775, 300); //, -75*GeoModelKernelUnits::deg, 150*GeoModelKernelUnits::deg); // 0, 2775, 300, -8.2*GeoModelKernelUnits::deg, 16.4*GeoModelKernelUnits::deg) //GeoLogVol *lvped3 = new GeoLogVol("LAr::DM::PED3",Ped3,air); //GeoPhysVol *ped3 = new GeoPhysVol(lvped3); //envelope->add(ped3); const GeoShape & CratePed=((*Pedestal).subtract(*Ped1). - subtract((*Ped2) <<HepGeom::TranslateY3D(-200.025)*HepGeom::RotateY3D(90*CLHEP::deg)). - subtract((*Ped3) <<HepGeom::TranslateX3D(-2815)). - subtract((*Ped2) <<HepGeom::TranslateY3D(200.025)*HepGeom::RotateY3D(90*CLHEP::deg))); + subtract((*Ped2) <<GeoTrf::TranslateY3D(-200.025)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)). + subtract((*Ped3) <<GeoTrf::TranslateX3D(-2815)). + subtract((*Ped2) <<GeoTrf::TranslateY3D(200.025)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg))); GeoLogVol *lvped = new GeoLogVol("LAr::DM::PED",&CratePed,air); @@ -1040,7 +1040,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoBox *Crate1 = new GeoBox(244.5, 400.05, 255.05); GeoBox *Crate2 = new GeoBox(250, 396.87, 245.55); GeoBox *Crate3 = new GeoBox(186.5, 3.175, 245.55); - const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<HepGeom::TranslateX3D(-6.7)); + const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<GeoTrf::TranslateX3D(-6.7)); GeoLogVol *lvcrate = new GeoLogVol("LAr::DM::CRATE",&FEBCrate,alu); @@ -1072,9 +1072,9 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) const unsigned int NCrates=16; Variable i; - GENFUNCTION f = (360*CLHEP::deg/NCrates)*i; - GENFUNCTION f1 = (360*CLHEP::deg/NCrates)*i+315*CLHEP::deg; - GENFUNCTION f2 = (360*CLHEP::deg/NCrates)*i+157.5*CLHEP::deg; + GENFUNCTION f = (360*GeoModelKernelUnits::deg/NCrates)*i; + GENFUNCTION f1 = (360*GeoModelKernelUnits::deg/NCrates)*i+315*GeoModelKernelUnits::deg; + GENFUNCTION f2 = (360*GeoModelKernelUnits::deg/NCrates)*i+157.5*GeoModelKernelUnits::deg; GENFUNCTION g = i*19.685; //(f=22.5|| f=45|| f=67.5|| f=180|| f=203.5|| f=225|| f=247.5|| f=270|| f=337.5|| f=360) @@ -1082,48 +1082,48 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) //-------------- Place volumes in envelope ---------------------------- //boards - TRANSFUNCTION xfb1 = Pow(HepGeom::TranslateY3D(1.0),g)*HepGeom::TranslateY3D(19.685); - TRANSFUNCTION xfb2 = Pow(HepGeom::TranslateY3D(1.0),-g)*HepGeom::TranslateY3D(-19.685); + TRANSFUNCTION xfb1 = Pow(GeoTrf::TranslateY3D(1.0),g)*GeoTrf::TranslateY3D(19.685); + TRANSFUNCTION xfb2 = Pow(GeoTrf::TranslateY3D(1.0),-g)*GeoTrf::TranslateY3D(-19.685); GeoSerialTransformer *stb1 = new GeoSerialTransformer(board,&xfb1, (NCrates+3)); GeoSerialTransformer *stb2 = new GeoSerialTransformer(board,&xfb2, (NCrates+3)); boardenvelope->add(stb1); boardenvelope->add(stb2); //coolingplates - TRANSFUNCTION xfcp1 = Pow(HepGeom::TranslateY3D(1.0),g)*HepGeom::TranslateY3D(19.685); - TRANSFUNCTION xfcp2 = Pow(HepGeom::TranslateY3D(1.0),-g)*HepGeom::TranslateY3D(-19.685); + TRANSFUNCTION xfcp1 = Pow(GeoTrf::TranslateY3D(1.0),g)*GeoTrf::TranslateY3D(19.685); + TRANSFUNCTION xfcp2 = Pow(GeoTrf::TranslateY3D(1.0),-g)*GeoTrf::TranslateY3D(-19.685); GeoSerialTransformer *stcp1 = new GeoSerialTransformer(plate,&xfcp1, (NCrates+3)); GeoSerialTransformer *stcp2 = new GeoSerialTransformer(plate,&xfcp2, (NCrates+3)); boardenvelope->add(stcp1); boardenvelope->add(stcp2); //boardpannels - TRANSFUNCTION xfp1 = Pow(HepGeom::TranslateY3D(1.0),g)*HepGeom::TranslateY3D(19.685)*HepGeom::TranslateX3D(204.972); - TRANSFUNCTION xfp2 = Pow(HepGeom::TranslateY3D(1.0),-g)*HepGeom::TranslateY3D(-19.685)*HepGeom::TranslateX3D(204.972); + TRANSFUNCTION xfp1 = Pow(GeoTrf::TranslateY3D(1.0),g)*GeoTrf::TranslateY3D(19.685)*GeoTrf::TranslateX3D(204.972); + TRANSFUNCTION xfp2 = Pow(GeoTrf::TranslateY3D(1.0),-g)*GeoTrf::TranslateY3D(-19.685)*GeoTrf::TranslateX3D(204.972); GeoSerialTransformer *stp1 = new GeoSerialTransformer(pannel,&xfp1, (NCrates+3)); GeoSerialTransformer *stp2 = new GeoSerialTransformer(pannel,&xfp2, (NCrates+3)); boardenvelope->add(stp1); boardenvelope->add(stp2); //crates - TRANSFUNCTION xfc1 = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(3141.25)*HepGeom::TranslateZ3D(3135.05); - TRANSFUNCTION xfc2 = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(3141.25)*HepGeom::TranslateZ3D(-3135.05); + TRANSFUNCTION xfc1 = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(3141.25)*GeoTrf::TranslateZ3D(3135.05); + TRANSFUNCTION xfc2 = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(3141.25)*GeoTrf::TranslateZ3D(-3135.05); GeoSerialTransformer *stc1 = new GeoSerialTransformer(crate,&xfc1, NCrates); GeoSerialTransformer *stc2 = new GeoSerialTransformer(crate,&xfc2, NCrates); envelope->add(stc1); envelope->add(stc2); //pedestal - TRANSFUNCTION xfped1 = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(2825.75)*HepGeom::TranslateZ3D(3135.05); - TRANSFUNCTION xfped2 = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(2825.75)*HepGeom::TranslateZ3D(-3135.05); + TRANSFUNCTION xfped1 = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(2825.75)*GeoTrf::TranslateZ3D(3135.05); + TRANSFUNCTION xfped2 = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(2825.75)*GeoTrf::TranslateZ3D(-3135.05); GeoSerialTransformer *stped1 = new GeoSerialTransformer(pedestal,&xfped1, NCrates); GeoSerialTransformer *stped2 = new GeoSerialTransformer(pedestal,&xfped2, NCrates); envelope->add(stped1); envelope->add(stped2); //boardenvelopes - TRANSFUNCTION xfe1 = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(3180.278)*HepGeom::TranslateZ3D(3135.05); - TRANSFUNCTION xfe2 = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(3180.278)*HepGeom::TranslateZ3D(-3135.05); + TRANSFUNCTION xfe1 = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(3180.278)*GeoTrf::TranslateZ3D(3135.05); + TRANSFUNCTION xfe2 = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(3180.278)*GeoTrf::TranslateZ3D(-3135.05); GeoSerialTransformer *ste1 = new GeoSerialTransformer(boardenvelope,&xfe1, NCrates); GeoSerialTransformer *ste2 = new GeoSerialTransformer(boardenvelope,&xfe2, NCrates); envelope->add(ste1); @@ -1133,65 +1133,65 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) //----------- Building envelope for Cables and Tubes -------------- GeoTrd *Trd1air = new GeoTrd(123.5, 123.5, 167, 245.43, 117.65); - GeoTrap *Trapair = new GeoTrap(178.33, 39.596*CLHEP::deg, 0, 167, 53.5, 53.5, 0, 167, 123.5, 123.5, 0); + GeoTrap *Trapair = new GeoTrap(178.33, 39.596*GeoModelKernelUnits::deg, 0, 167, 53.5, 53.5, 0, 167, 123.5, 123.5, 0); GeoTrd *Trd2air = new GeoTrd(53.5, 53.5, 280, 548, 677.5); GeoBox *Box = new GeoBox(280, 280, 100); GeoTrd *Trd1alu = new GeoTrd(5, 5, 167, 245.43, 117.65); - GeoTrap *Trapalu = new GeoTrap(178.33, 45.5*CLHEP::deg, 0, 167, 5, 5, 0, 167, 5, 5, 0); + GeoTrap *Trapalu = new GeoTrap(178.33, 45.5*GeoModelKernelUnits::deg, 0, 167, 5, 5, 0, 167, 5, 5, 0); GeoTrd *Trd2alu = new GeoTrd(5, 5, 280, 548, 677.5); - HepGeom::Transform3D Cut1Box = HepGeom::Translate3D(-295.5, 500, -473.563)*HepGeom::RotateX3D(-20*CLHEP::deg); - HepGeom::Transform3D Cut2Box = HepGeom::Translate3D(-295.5, -500, -473.563)*HepGeom::RotateX3D(20*CLHEP::deg); + GeoTrf::Transform3D Cut1Box = GeoTrf::Translate3D(-295.5, 500, -473.563)*GeoTrf::RotateX3D(-20*GeoModelKernelUnits::deg); + GeoTrf::Transform3D Cut2Box = GeoTrf::Translate3D(-295.5, -500, -473.563)*GeoTrf::RotateX3D(20*GeoModelKernelUnits::deg); const GeoShape & Envelopes= (*Trd1air). - // add((*Trapair) <<HepGeom::Translate3D(-147.5, 0, -295.25)). - add((*Trd2air) <<HepGeom::Translate3D(-295.5, 0, -1151.063)). - subtract((*Box) <<HepGeom::Transform3D(Cut1Box)). - subtract((*Box) <<HepGeom::Transform3D(Cut2Box)). - add((*Trapair) <<HepGeom::Translate3D(-147.5, 0, -295.25)); + // add((*Trapair) <<GeoTrf::Translate3D(-147.5, 0, -295.25)). + add((*Trd2air) <<GeoTrf::Translate3D(-295.5, 0, -1151.063)). + subtract((*Box) <<GeoTrf::Transform3D(Cut1Box)). + subtract((*Box) <<GeoTrf::Transform3D(Cut2Box)). + add((*Trapair) <<GeoTrf::Translate3D(-147.5, 0, -295.25)); GeoLogVol *lv = new GeoLogVol("LAr::DM::Envelopes",&Envelopes,matLArServices); // Services material go here GeoPhysVol *envelopes = new GeoPhysVol(lv); - const GeoShape & Baseplates= (*Trd1alu).add((*Trapalu) <<HepGeom::Translate3D(-180.5, 0, -295.25)); + const GeoShape & Baseplates= (*Trd1alu).add((*Trapalu) <<GeoTrf::Translate3D(-180.5, 0, -295.25)); GeoLogVol *lvbis = new GeoLogVol("LAr::DM::Baseplates",&Baseplates,alu); GeoPhysVol *baseplates = new GeoPhysVol(lvbis); - const GeoShape & SectorPlates= ((*Trd2alu) <<HepGeom::Translate3D(-366, 0, -1151.063)). - subtract((*Box) <<HepGeom::Transform3D(Cut1Box)). - subtract((*Box) <<HepGeom::Transform3D(Cut2Box)); + const GeoShape & SectorPlates= ((*Trd2alu) <<GeoTrf::Translate3D(-366, 0, -1151.063)). + subtract((*Box) <<GeoTrf::Transform3D(Cut1Box)). + subtract((*Box) <<GeoTrf::Transform3D(Cut2Box)); GeoLogVol *lvbiss = new GeoLogVol("LAr::DM::Sectorplates",&SectorPlates,alu); GeoPhysVol *sectorplates = new GeoPhysVol(lvbiss); //envelopes - TRANSFUNCTION xf3a = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(-631.63)*HepGeom::TranslateX3D(3175.44)*HepGeom::TranslateZ3D(3165.5)*HepGeom::RotateZ3D(-11.25*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xf4a = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(631.63)*HepGeom::TranslateX3D(-3175.44)*HepGeom::TranslateZ3D(-3165.5)*HepGeom::RotateZ3D(-11.25*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg); + TRANSFUNCTION xf3a = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(-631.63)*GeoTrf::TranslateX3D(3175.44)*GeoTrf::TranslateZ3D(3165.5)*GeoTrf::RotateZ3D(-11.25*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xf4a = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(631.63)*GeoTrf::TranslateX3D(-3175.44)*GeoTrf::TranslateZ3D(-3165.5)*GeoTrf::RotateZ3D(-11.25*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *st3 = new GeoSerialTransformer(envelopes,&xf3a, NCrates); GeoSerialTransformer *st4 = new GeoSerialTransformer(envelopes,&xf4a, NCrates); envelope->add(st3); envelope->add(st4); //baseplates - TRANSFUNCTION xf3b = Pow(HepGeom::RotateZ3D(1.0),f1)*HepGeom::TranslateY3D(-631.63)*HepGeom::TranslateX3D(3175.44)*HepGeom::TranslateZ3D(3044.5)*HepGeom::RotateZ3D(-11.25*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xf4b = Pow(HepGeom::RotateZ3D(1.0),(f1+22.5*CLHEP::deg))*HepGeom::TranslateY3D(631.63)*HepGeom::TranslateX3D(-3175.44)*HepGeom::TranslateZ3D(-3044.5)*HepGeom::RotateZ3D(-11.25*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg); + TRANSFUNCTION xf3b = Pow(GeoTrf::RotateZ3D(1.0),f1)*GeoTrf::TranslateY3D(-631.63)*GeoTrf::TranslateX3D(3175.44)*GeoTrf::TranslateZ3D(3044.5)*GeoTrf::RotateZ3D(-11.25*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xf4b = Pow(GeoTrf::RotateZ3D(1.0),(f1+22.5*GeoModelKernelUnits::deg))*GeoTrf::TranslateY3D(631.63)*GeoTrf::TranslateX3D(-3175.44)*GeoTrf::TranslateZ3D(-3044.5)*GeoTrf::RotateZ3D(-11.25*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *st3bis = new GeoSerialTransformer(baseplates,&xf3b, (NCrates-11)); GeoSerialTransformer *st4bis = new GeoSerialTransformer(baseplates,&xf4b, (NCrates-11)); envelope->add(st3bis); envelope->add(st4bis); - TRANSFUNCTION xf5b = Pow(HepGeom::RotateZ3D(1.0),f2)*HepGeom::TranslateY3D(-631.63)*HepGeom::TranslateX3D(3175.44)*HepGeom::TranslateZ3D(3044.5)*HepGeom::RotateZ3D(-11.25*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xf6b = Pow(HepGeom::RotateZ3D(1.0),(f2-22.5*CLHEP::deg))*HepGeom::TranslateY3D(631.63)*HepGeom::TranslateX3D(-3175.44)*HepGeom::TranslateZ3D(-3044.5)*HepGeom::RotateZ3D(-11.25*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg); + TRANSFUNCTION xf5b = Pow(GeoTrf::RotateZ3D(1.0),f2)*GeoTrf::TranslateY3D(-631.63)*GeoTrf::TranslateX3D(3175.44)*GeoTrf::TranslateZ3D(3044.5)*GeoTrf::RotateZ3D(-11.25*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xf6b = Pow(GeoTrf::RotateZ3D(1.0),(f2-22.5*GeoModelKernelUnits::deg))*GeoTrf::TranslateY3D(631.63)*GeoTrf::TranslateX3D(-3175.44)*GeoTrf::TranslateZ3D(-3044.5)*GeoTrf::RotateZ3D(-11.25*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *st5bis = new GeoSerialTransformer(baseplates,&xf5b, (NCrates-11)); GeoSerialTransformer *st6bis = new GeoSerialTransformer(baseplates,&xf6b, (NCrates-11)); envelope->add(st5bis); envelope->add(st6bis); //sectorplates - TRANSFUNCTION xf3bb = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(-631.63)*HepGeom::TranslateX3D(3175.44)*HepGeom::TranslateZ3D(3044.5)*HepGeom::RotateZ3D(-11.25*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xf4bb = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(631.63)*HepGeom::TranslateX3D(-3175.44)*HepGeom::TranslateZ3D(-3044.5)*HepGeom::RotateZ3D(-11.25*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg); + TRANSFUNCTION xf3bb = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(-631.63)*GeoTrf::TranslateX3D(3175.44)*GeoTrf::TranslateZ3D(3044.5)*GeoTrf::RotateZ3D(-11.25*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xf4bb = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(631.63)*GeoTrf::TranslateX3D(-3175.44)*GeoTrf::TranslateZ3D(-3044.5)*GeoTrf::RotateZ3D(-11.25*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *st3biss = new GeoSerialTransformer(sectorplates,&xf3bb, NCrates); GeoSerialTransformer *st4biss = new GeoSerialTransformer(sectorplates,&xf4bb, NCrates); envelope->add(st3biss); @@ -1200,12 +1200,12 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) else if(strDMTopTag=="LArBarrelDM-01" || strDMTopTag=="LArBarrelDM-02") { // Get some standard materials - const GeoMaterial *air = materialManager->getMaterial("std::Air"); //0.001214 CLHEP::g/CLHEP::cm3 - const GeoMaterial *alu = materialManager->getMaterial("std::Aluminium"); //2.7 CLHEP::g/CLHEP::cm3 - const GeoMaterial *shieldSteel = materialManager->getMaterial("shield::ShieldSteel"); //8 CLHEP::g/CLHEP::cm3 - const GeoMaterial *matCO2 = materialManager->getMaterial("trt::CO2"); //0.001842 CLHEP::g/CLHEP::cm3 - const GeoMaterial *matKapton = materialManager->getMaterial("std::Kapton"); // 1.42*CLHEP::gram/CLHEP::cm3 - const GeoMaterial *matC3F8 = materialManager->getMaterial("std::C3F8"); //1.032*CLHEP::gram/CLHEP::cm3 + const GeoMaterial *air = materialManager->getMaterial("std::Air"); //0.001214 g/cm3 + const GeoMaterial *alu = materialManager->getMaterial("std::Aluminium"); //2.7 g/cm3 + const GeoMaterial *shieldSteel = materialManager->getMaterial("shield::ShieldSteel"); //8 g/cm3 + const GeoMaterial *matCO2 = materialManager->getMaterial("trt::CO2"); //0.001842 g/cm3 + const GeoMaterial *matKapton = materialManager->getMaterial("std::Kapton"); // 1.42*gram/cm3 + const GeoMaterial *matC3F8 = materialManager->getMaterial("std::C3F8"); //1.032*gram/cm3 // Get required elements const GeoElement* silicon = materialManager->getElement("Silicon"); @@ -1220,30 +1220,30 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) //C6F14 - GeoMaterial *matC6F14 = new GeoMaterial("C6F14",1.68*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matC6F14 = new GeoMaterial("C6F14",1.68*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matC6F14->add(carbon, 6*carbon->getA() / (6*carbon->getA() + 14*fluorine->getA())); matC6F14->add(fluorine, 14*fluorine->getA() / (6*carbon->getA() + 14*fluorine->getA())); matC6F14->lock(); //Water - GeoMaterial *matWater = new GeoMaterial("Water", 1*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matWater = new GeoMaterial("Water", 1*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matWater->add(hydrogen, 2*hydrogen->getA() / (2*hydrogen->getA() + 1*oxygen->getA())); matWater->add(oxygen, 1*oxygen->getA() / (2*hydrogen->getA() + 1*oxygen->getA())); matWater->lock(); //Nitrogen - GeoMaterial *matN2 = new GeoMaterial("N2", 0.0012506*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matN2 = new GeoMaterial("N2", 0.0012506*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matN2->add(nitrogen,1); matN2->lock(); //Fiberglass - GeoMaterial *matFiberglass = new GeoMaterial("SiO2",2.20*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matFiberglass = new GeoMaterial("SiO2",2.20*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matFiberglass->add(silicon,silicon->getA()/(silicon->getA()+2*oxygen->getA())); matFiberglass->add(oxygen,2*oxygen->getA()/(silicon->getA()+2*oxygen->getA())); matFiberglass->lock(); //Epoxy Resin - GeoMaterial *matEpoxyResin = new GeoMaterial("Epoxy:C8H14O4Si", 1.9*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matEpoxyResin = new GeoMaterial("Epoxy:C8H14O4Si", 1.9*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matEpoxyResin->add(hydrogen, 14*hydrogen->getA() / (14*hydrogen->getA() + 4*oxygen->getA()+ 8*carbon->getA()+ 1*silicon->getA())); matEpoxyResin->add(oxygen, 4*oxygen->getA() / (14*hydrogen->getA() + 4*oxygen->getA()+ 8*carbon->getA()+ 1*silicon->getA())); matEpoxyResin->add(carbon, 8*carbon->getA() / (14*hydrogen->getA() + 4*oxygen->getA()+ 8*carbon->getA()+ 1*silicon->getA())); @@ -1251,14 +1251,14 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) matEpoxyResin->lock(); //FEBoards - GeoMaterial *matFEBoards = new GeoMaterial("FEBoards", 4.03*CLHEP::gram/CLHEP::cm3); + GeoMaterial *matFEBoards = new GeoMaterial("FEBoards", 4.03*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matFEBoards->add(matFiberglass, 0.52); matFEBoards->add(copper, 0.28); matFEBoards->add(matEpoxyResin, 0.20); matFEBoards->lock(); //BoardsEnvelope (FEBoards + Cooling Plates + Water + Air) - GeoMaterial* matBoardsEnvelope = new GeoMaterial("BoardsEnvelope", 0.932*CLHEP::gram/CLHEP::cm3); + GeoMaterial* matBoardsEnvelope = new GeoMaterial("BoardsEnvelope", 0.932*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); matBoardsEnvelope->add(matFEBoards, 0.4147); matBoardsEnvelope->add(matWater, 0.0736); matBoardsEnvelope->add(air, 0.0008); @@ -1266,8 +1266,8 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) matBoardsEnvelope->lock(); //InDetServices !!! Provisoire !!! - double density1 = 1.*CLHEP::gram/CLHEP::cm3; - if (strDMTopTag=="LArBarrelDM-02") density1 = 1.7*CLHEP::gram/CLHEP::cm3; + double density1 = 1.*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3; + if (strDMTopTag=="LArBarrelDM-02") density1 = 1.7*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3; GeoMaterial* matLArServices1 = new GeoMaterial("LArServices1", density1); matLArServices1->add(copper, .60); matLArServices1->add(shieldSteel, .05); @@ -1280,8 +1280,8 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) matLArServices1->lock(); //InDetServices !!! Provisoire !!! - double density2 = 2.*CLHEP::gram/CLHEP::cm3; - if (strDMTopTag=="LArBarrelDM-02") density2 = 3.4*CLHEP::gram/CLHEP::cm3; + double density2 = 2.*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3; + if (strDMTopTag=="LArBarrelDM-02") density2 = 3.4*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3; GeoMaterial* matLArServices2 = new GeoMaterial("LArServices2", density2); matLArServices2->add(copper, .60); matLArServices2->add(shieldSteel, .05); @@ -1299,7 +1299,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) // << matLArServices2->getRadLength() << " " << matLArServices2->getIntLength() << std::endl; const unsigned int NCrates=16; - const double Alfa=360*CLHEP::deg/NCrates; + const double Alfa=360*GeoModelKernelUnits::deg/NCrates; const double Enda=1155; const double Endb=1695.2; const double Endc=2771.6; @@ -1318,9 +1318,9 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoTube *Ped2 = new GeoTube(0, 150, 75); GeoTube *Ped3 = new GeoTube(0, 2775, 300); const GeoShape & CratePed=((*Pedestal).subtract(*Ped1). - subtract((*Ped2) <<HepGeom::TranslateY3D(-200.025)*HepGeom::RotateY3D(90*CLHEP::deg)). - subtract((*Ped3) <<HepGeom::TranslateX3D(-2800)). - subtract((*Ped2) <<HepGeom::TranslateY3D(200.025)*HepGeom::RotateY3D(90*CLHEP::deg))); + subtract((*Ped2) <<GeoTrf::TranslateY3D(-200.025)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)). + subtract((*Ped3) <<GeoTrf::TranslateX3D(-2800)). + subtract((*Ped2) <<GeoTrf::TranslateY3D(200.025)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg))); GeoLogVol *lvped = new GeoLogVol("LAr::DM::Ped",&CratePed,alu); GeoPhysVol *pedestal = new GeoPhysVol(lvped); @@ -1329,7 +1329,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoBox *Crate1 = new GeoBox(244.5, 400.05, 255.05); GeoBox *Crate2 = new GeoBox(250, 396.87, 245.55); GeoBox *Crate3 = new GeoBox(186.5, 3.175, 245.55); - const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<HepGeom::TranslateX3D(-6.7)); + const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<GeoTrf::TranslateX3D(-6.7)); GeoLogVol *lvcrate = new GeoLogVol("LAr::DM::Crate",&FEBCrate,alu); GeoPhysVol *crate = new GeoPhysVol(lvcrate); @@ -1343,26 +1343,26 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) //-------------- Place volumes in envelope ---------------------------- //Crates - TRANSFUNCTION crA = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(3141.25)*HepGeom::TranslateZ3D(3135.05); - TRANSFUNCTION crC = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(3141.25)*HepGeom::TranslateZ3D(-3135.05); + TRANSFUNCTION crA = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(3141.25)*GeoTrf::TranslateZ3D(3135.05); + TRANSFUNCTION crC = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(3141.25)*GeoTrf::TranslateZ3D(-3135.05); GeoSerialTransformer *crtA = new GeoSerialTransformer(crate,&crA, NCrates); GeoSerialTransformer *crtC = new GeoSerialTransformer(crate,&crC, NCrates); envelope->add(crtA); envelope->add(crtC); //Pedestals - TRANSFUNCTION pedA = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(2825.75)*HepGeom::TranslateZ3D(3135.05); - TRANSFUNCTION pedC = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(2825.75)*HepGeom::TranslateZ3D(-3135.05); + TRANSFUNCTION pedA = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(2825.75)*GeoTrf::TranslateZ3D(3135.05); + TRANSFUNCTION pedC = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(2825.75)*GeoTrf::TranslateZ3D(-3135.05); GeoSerialTransformer *pedtA = new GeoSerialTransformer(pedestal,&pedA, NCrates); GeoSerialTransformer *pedtC = new GeoSerialTransformer(pedestal,&pedC, NCrates); envelope->add(pedtA); envelope->add(pedtC); //FEBoards - TRANSFUNCTION feb1A = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(200.25)*HepGeom::TranslateX3D(3181.25)*HepGeom::TranslateZ3D(3135.05); - TRANSFUNCTION feb2A = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(-200.25)*HepGeom::TranslateX3D(3181.25)*HepGeom::TranslateZ3D(3135.05); - TRANSFUNCTION feb1C = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(200.25)*HepGeom::TranslateX3D(3181.25)*HepGeom::TranslateZ3D(-3135.05); - TRANSFUNCTION feb2C = Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateY3D(-200.25)*HepGeom::TranslateX3D(3181.25)*HepGeom::TranslateZ3D(-3135.05); + TRANSFUNCTION feb1A = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(200.25)*GeoTrf::TranslateX3D(3181.25)*GeoTrf::TranslateZ3D(3135.05); + TRANSFUNCTION feb2A = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(-200.25)*GeoTrf::TranslateX3D(3181.25)*GeoTrf::TranslateZ3D(3135.05); + TRANSFUNCTION feb1C = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(200.25)*GeoTrf::TranslateX3D(3181.25)*GeoTrf::TranslateZ3D(-3135.05); + TRANSFUNCTION feb2C = Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateY3D(-200.25)*GeoTrf::TranslateX3D(3181.25)*GeoTrf::TranslateZ3D(-3135.05); GeoSerialTransformer *febt1A = new GeoSerialTransformer(boardenvelope,&feb1A, NCrates); GeoSerialTransformer *febt1C = new GeoSerialTransformer(boardenvelope,&feb1C, NCrates); GeoSerialTransformer *febt2A = new GeoSerialTransformer(boardenvelope,&feb2A, NCrates); @@ -1377,10 +1377,10 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) // transforms GeoBox *Box = new GeoBox(280, 280, 100); - HepGeom::Transform3D Cut3Boxe = HepGeom::Translate3D(0, 548, 711)*HepGeom::RotateX3D(-20*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - HepGeom::Transform3D Cut4Boxe = HepGeom::Translate3D(0, -548,711)*HepGeom::RotateX3D(20*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - HepGeom::Transform3D Cut3Boxp = HepGeom::Translate3D(0, 548, 850)*HepGeom::RotateX3D(-20*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - HepGeom::Transform3D Cut4Boxp = HepGeom::Translate3D(0, -548,850)*HepGeom::RotateX3D(20*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + GeoTrf::Transform3D Cut3Boxe = GeoTrf::Translate3D(0, 548, 711)*GeoTrf::RotateX3D(-20*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + GeoTrf::Transform3D Cut4Boxe = GeoTrf::Translate3D(0, -548,711)*GeoTrf::RotateX3D(20*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + GeoTrf::Transform3D Cut3Boxp = GeoTrf::Translate3D(0, 548, 850)*GeoTrf::RotateX3D(-20*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + GeoTrf::Transform3D Cut4Boxp = GeoTrf::Translate3D(0, -548,850)*GeoTrf::RotateX3D(20*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); // ----- build base envelopes ----- GeoTrd *Trd1air = new GeoTrd(123.5, 123.5, 167, 305, 287.5); @@ -1388,7 +1388,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoPhysVol *baseenvelopes = new GeoPhysVol(lvbe); // ----- build bridge envelopes ----- - GeoTrap *Trapair = new GeoTrap(201.70, 45.35*CLHEP::deg, 0, 160, 52.95, 52.95, 0, 160, 123.5, 123.5, 0); + GeoTrap *Trapair = new GeoTrap(201.70, 45.35*GeoModelKernelUnits::deg, 0, 160, 52.95, 52.95, 0, 160, 123.5, 123.5, 0); GeoLogVol *lvbre = new GeoLogVol("LAr::DM::BridgeEnvelopes",Trapair,matLArServices1); GeoPhysVol *bridgeenvelopes = new GeoPhysVol(lvbre); @@ -1400,11 +1400,11 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoTrd *Trdair2 = new GeoTrd(52.95, 52.95, DYb, DYc, (Endc-Endb)/2);//(52.95, 52.95, 335.83, 548.5, 538.2) const GeoShape & SectorEnvelope= ((*Trdair2). - subtract((*Box) <<HepGeom::Transform3D(Cut3Boxe)). - subtract((*Box) <<HepGeom::Transform3D(Cut4Boxe))); + subtract((*Box) <<GeoTrf::Transform3D(Cut3Boxe)). + subtract((*Box) <<GeoTrf::Transform3D(Cut4Boxe))); const GeoShape & SectorEnvelopes= ((SectorEnvelope). - add(SectorEnvelope << HepGeom::TranslateY3D(-(DYb+DYc)*cos(Alfa/2)*cos(Alfa/2))*HepGeom::TranslateZ3D(-(DYb+DYc)*0.5*sin(Alfa))*HepGeom::RotateX3D(Alfa))); + add(SectorEnvelope << GeoTrf::TranslateY3D(-(DYb+DYc)*cos(Alfa/2)*cos(Alfa/2))*GeoTrf::TranslateZ3D(-(DYb+DYc)*0.5*sin(Alfa))*GeoTrf::RotateX3D(Alfa))); GeoLogVol *lvse2r = new GeoLogVol("LAr::DM::SectorEnvelopes2r",&SectorEnvelopes,matLArServices1); GeoPhysVol *sectorenvelopes2r = new GeoPhysVol(lvse2r); // for right-handed splice boxes sideA @@ -1421,7 +1421,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoPhysVol *baseplates = new GeoPhysVol(lvbp); // ----- build bridge plates ----- - GeoTrap *Trapalu = new GeoTrap(201.70, 49.92*CLHEP::deg, 0, 160, 5, 5, 0, 160, 5, 5, 0); + GeoTrap *Trapalu = new GeoTrap(201.70, 49.92*GeoModelKernelUnits::deg, 0, 160, 5, 5, 0, 160, 5, 5, 0); GeoLogVol *lvbrp = new GeoLogVol("LAr::DM::BridgePlates",Trapalu,alu); GeoPhysVol *bridgeplates = new GeoPhysVol(lvbrp); @@ -1429,8 +1429,8 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) // ----- build sector plates ----- GeoTrd *Trd2alu = new GeoTrd(5, 5, 280, 548, 677.5); const GeoShape & SectorPlates= ((*Trd2alu). - subtract((*Box) <<HepGeom::Transform3D(Cut3Boxp)). - subtract((*Box) <<HepGeom::Transform3D(Cut4Boxp))); + subtract((*Box) <<GeoTrf::Transform3D(Cut3Boxp)). + subtract((*Box) <<GeoTrf::Transform3D(Cut4Boxp))); GeoLogVol *lvsp = new GeoLogVol("LAr::DM::SectorPlates",&SectorPlates,alu); GeoPhysVol *sectorplates = new GeoPhysVol(lvsp); @@ -1439,15 +1439,15 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoTrap *GeoTrap1 = new GeoTrap(237.5, 0, 0, 307, 47.5, 47.5, 0, 259.17, 47.5, 47.5, 0); GeoBox *Box1 = new GeoBox(50, 244.80, 150); const GeoShape & SpliceBox = ((*GeoTrap1). - subtract(*Box1 << HepGeom::TranslateZ3D(193.88)*HepGeom::TranslateY3D(-223.49)*HepGeom::RotateX3D(41.592*CLHEP::deg))); + subtract(*Box1 << GeoTrf::TranslateZ3D(193.88)*GeoTrf::TranslateY3D(-223.49)*GeoTrf::RotateX3D(41.592*GeoModelKernelUnits::deg))); - GeoTransform *xtr = new GeoTransform (HepGeom::TranslateZ3D(39.57)*HepGeom::TranslateY3D(-452.12)*HepGeom::TranslateX3D(5.40)*HepGeom::RotateX3D(191.25*CLHEP::deg)); + GeoTransform *xtr = new GeoTransform (GeoTrf::TranslateZ3D(39.57)*GeoTrf::TranslateY3D(-452.12)*GeoTrf::TranslateX3D(5.40)*GeoTrf::RotateX3D(191.25*GeoModelKernelUnits::deg)); sectorenvelopes2r->add(xtr); GeoLogVol *lvspbr = new GeoLogVol("LAr::DM::SPliceBoxr",&SpliceBox,alu); GeoPhysVol *spliceboxr = new GeoPhysVol(lvspbr); sectorenvelopes2r->add(spliceboxr); - GeoTransform *xtl = new GeoTransform (HepGeom::TranslateZ3D(39.57)*HepGeom::TranslateY3D(-452.12)*HepGeom::TranslateX3D(5.40)*HepGeom::RotateY3D(-180*CLHEP::deg)*HepGeom::RotateX3D(-(Alfa/2))); + GeoTransform *xtl = new GeoTransform (GeoTrf::TranslateZ3D(39.57)*GeoTrf::TranslateY3D(-452.12)*GeoTrf::TranslateX3D(5.40)*GeoTrf::RotateY3D(-180*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-(Alfa/2))); sectorenvelopes2l->add(xtl); GeoLogVol *lvspbl = new GeoLogVol("LAr::DM::SpliceBoxl",&SpliceBox,alu); GeoPhysVol *spliceboxl = new GeoPhysVol(lvspbl); @@ -1459,7 +1459,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) GeoTrap *GeoTrap2 = new GeoTrap(149, 0, 0, 126.215, 44.5, 44.5, 0, 95, 44.5, 44.5, 0); GeoTrap *GeoTrap3 = new GeoTrap(72, 0, 0, 294.5, 44.5, 44.5, 0, 279.396, 44.5, 44.5, 0); - GeoTransform *xt1 = new GeoTransform (HepGeom::TranslateY3D(-53)*HepGeom::RotateX3D(42.25*CLHEP::deg)); + GeoTransform *xt1 = new GeoTransform (GeoTrf::TranslateY3D(-53)*GeoTrf::RotateX3D(42.25*GeoModelKernelUnits::deg)); spliceboxr->add(xt1); spliceboxl->add(xt1); GeoLogVol *lt1 = new GeoLogVol("LAr::DM::TBox1",Trd1,air); @@ -1467,7 +1467,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) spliceboxr->add(tbox1); spliceboxl->add(tbox1); - GeoTransform *xt2 = new GeoTransform (HepGeom::TranslateZ3D(78)*HepGeom::TranslateY3D(154)); + GeoTransform *xt2 = new GeoTransform (GeoTrf::TranslateZ3D(78)*GeoTrf::TranslateY3D(154)); spliceboxr->add(xt2); spliceboxl->add(xt2); GeoLogVol *lt2 = new GeoLogVol("LAr::DM::TBox2",GeoTrap2,air); @@ -1475,7 +1475,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) spliceboxr->add(tbox2); spliceboxl->add(tbox2); - GeoTransform *xt3 = new GeoTransform (HepGeom::TranslateZ3D(-155.81)); + GeoTransform *xt3 = new GeoTransform (GeoTrf::TranslateZ3D(-155.81)); spliceboxr->add(xt3); spliceboxl->add(xt3); GeoLogVol *lt3 = new GeoLogVol("LAr::DM::TBox3",GeoTrap3,air); @@ -1487,18 +1487,18 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) //-------------- Place volumes in LAr Envelope ------------------- //sectorPlates - TRANSFUNCTION spA = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(2095)*HepGeom::TranslateZ3D(3410.1)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION spC = Pow(HepGeom::RotateZ3D(1.0),f+(Alfa/2))*HepGeom::TranslateX3D(2095)*HepGeom::TranslateZ3D(-3410.1)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION spA = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(2095)*GeoTrf::TranslateZ3D(3410.1)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION spC = Pow(GeoTrf::RotateZ3D(1.0),f+(Alfa/2))*GeoTrf::TranslateX3D(2095)*GeoTrf::TranslateZ3D(-3410.1)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *sptA = new GeoSerialTransformer(sectorplates,&spA, NCrates); GeoSerialTransformer *sptC = new GeoSerialTransformer(sectorplates,&spC, NCrates); envelope->add(sptA); envelope->add(sptC); //bridgePlates - TRANSFUNCTION brpA1 = Pow(HepGeom::RotateZ3D(1.0),f-(5*Alfa/2))*HepGeom::TranslateX3D(2974.5)*HepGeom::TranslateZ3D(3170.1)*HepGeom::RotateZ3D(90*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg)*HepGeom::RotateX3D(90*CLHEP::deg); - TRANSFUNCTION brpA2 = Pow(HepGeom::RotateZ3D(1.0),f+(13*Alfa/2))*HepGeom::TranslateX3D(2974.5)*HepGeom::TranslateZ3D(3170.1)*HepGeom::RotateZ3D(90*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg)*HepGeom::RotateX3D(90*CLHEP::deg); - TRANSFUNCTION brpC1 = Pow(HepGeom::RotateZ3D(1.0),f-(5*Alfa/2))*HepGeom::TranslateX3D(2974.5)*HepGeom::TranslateZ3D(-3170.1)*HepGeom::RotateZ3D(-90*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg)*HepGeom::RotateX3D(-90*CLHEP::deg); - TRANSFUNCTION brpC2 = Pow(HepGeom::RotateZ3D(1.0),f+(13*Alfa/2))*HepGeom::TranslateX3D(2974.5)*HepGeom::TranslateZ3D(-3170.1)*HepGeom::RotateZ3D(-90*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg)*HepGeom::RotateX3D(-90*CLHEP::deg); GeoSerialTransformer *brptA1 = new GeoSerialTransformer(bridgeplates,&brpA1, 5); + TRANSFUNCTION brpA1 = Pow(GeoTrf::RotateZ3D(1.0),f-(5*Alfa/2))*GeoTrf::TranslateX3D(2974.5)*GeoTrf::TranslateZ3D(3170.1)*GeoTrf::RotateZ3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION brpA2 = Pow(GeoTrf::RotateZ3D(1.0),f+(13*Alfa/2))*GeoTrf::TranslateX3D(2974.5)*GeoTrf::TranslateZ3D(3170.1)*GeoTrf::RotateZ3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION brpC1 = Pow(GeoTrf::RotateZ3D(1.0),f-(5*Alfa/2))*GeoTrf::TranslateX3D(2974.5)*GeoTrf::TranslateZ3D(-3170.1)*GeoTrf::RotateZ3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-90*GeoModelKernelUnits::deg); + TRANSFUNCTION brpC2 = Pow(GeoTrf::RotateZ3D(1.0),f+(13*Alfa/2))*GeoTrf::TranslateX3D(2974.5)*GeoTrf::TranslateZ3D(-3170.1)*GeoTrf::RotateZ3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *brptA1 = new GeoSerialTransformer(bridgeplates,&brpA1, 5); GeoSerialTransformer *brptA2 = new GeoSerialTransformer(bridgeplates,&brpA2, 5); GeoSerialTransformer *brptC1 = new GeoSerialTransformer(bridgeplates,&brpC1, 5); GeoSerialTransformer *brptC2 = new GeoSerialTransformer(bridgeplates,&brpC2, 5); @@ -1508,27 +1508,27 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) envelope->add(brptC2); //basePlates - TRANSFUNCTION bpA = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(3464)*HepGeom::TranslateZ3D(2930.6)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION bpC = Pow(HepGeom::RotateZ3D(1.0),f+(Alfa/2))*HepGeom::TranslateX3D(3464)*HepGeom::TranslateZ3D(-2930.6)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION bpA = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(3464)*GeoTrf::TranslateZ3D(2930.6)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION bpC = Pow(GeoTrf::RotateZ3D(1.0),f+(Alfa/2))*GeoTrf::TranslateX3D(3464)*GeoTrf::TranslateZ3D(-2930.6)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *bptA = new GeoSerialTransformer(baseplates,&bpA, NCrates); GeoSerialTransformer *bptC = new GeoSerialTransformer(baseplates,&bpC, NCrates); envelope->add(bptA); envelope->add(bptC); //sectorEnvelopes - TRANSFUNCTION seA1 = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(3468.05)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC1 = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D((Endb+Enda)/2)*HepGeom::TranslateZ3D(-3468.05)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION seA1 = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(3468.05)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC1 = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D((Endb+Enda)/2)*GeoTrf::TranslateZ3D(-3468.05)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *setA1 = new GeoSerialTransformer(sectorenvelopes1,&seA1, NCrates); GeoSerialTransformer *setC1 = new GeoSerialTransformer(sectorenvelopes1,&seC1, NCrates); envelope->add(setA1); envelope->add(setC1); - TRANSFUNCTION seA2r = Pow(HepGeom::RotateZ3D(1.0),8*f-(3*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(3468.05)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA2l = Pow(HepGeom::RotateZ3D(1.0),8*f+(5*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(3468.05)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seA2 = Pow(HepGeom::RotateZ3D(1.0),4*f+(Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(3468.05)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC2 = Pow(HepGeom::RotateZ3D(1.0),4*f+(Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(-3468.05)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC2r = Pow(HepGeom::RotateZ3D(1.0),8*f-(3*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(-3468.05)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION seC2l = Pow(HepGeom::RotateZ3D(1.0),8*f+(5*Alfa/2))*HepGeom::TranslateX3D((Endb+Endc)/2)*HepGeom::TranslateZ3D(-3468.05)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION seA2r = Pow(GeoTrf::RotateZ3D(1.0),8*f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(3468.05)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA2l = Pow(GeoTrf::RotateZ3D(1.0),8*f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(3468.05)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seA2 = Pow(GeoTrf::RotateZ3D(1.0),4*f+(Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(3468.05)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC2 = Pow(GeoTrf::RotateZ3D(1.0),4*f+(Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-3468.05)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC2r = Pow(GeoTrf::RotateZ3D(1.0),8*f-(3*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-3468.05)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION seC2l = Pow(GeoTrf::RotateZ3D(1.0),8*f+(5*Alfa/2))*GeoTrf::TranslateX3D((Endb+Endc)/2)*GeoTrf::TranslateZ3D(-3468.05)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *setA2r = new GeoSerialTransformer(sectorenvelopes2r,&seA2r, 2); GeoSerialTransformer *setA2l = new GeoSerialTransformer(sectorenvelopes2l,&seA2l, 2); GeoSerialTransformer *setA2 = new GeoSerialTransformer(sectorenvelopes2,&seA2, 4); @@ -1543,16 +1543,16 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope) envelope->add(setC2l); //bridgeEnvelopes - TRANSFUNCTION breA = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(2974.532)*HepGeom::TranslateZ3D(3263.65)*HepGeom::RotateZ3D(90*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg)*HepGeom::RotateX3D(90*CLHEP::deg); - TRANSFUNCTION breC = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(2974.532)*HepGeom::TranslateZ3D(-3263.65)*HepGeom::RotateZ3D(-90*CLHEP::deg)*HepGeom::RotateY3D(-90*CLHEP::deg)*HepGeom::RotateX3D(-90*CLHEP::deg); + TRANSFUNCTION breA = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(2974.532)*GeoTrf::TranslateZ3D(3263.65)*GeoTrf::RotateZ3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION breC = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(2974.532)*GeoTrf::TranslateZ3D(-3263.65)*GeoTrf::RotateZ3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(-90*GeoModelKernelUnits::deg); GeoSerialTransformer *bretA = new GeoSerialTransformer(bridgeenvelopes,&breA, NCrates); GeoSerialTransformer *bretC = new GeoSerialTransformer(bridgeenvelopes,&breC, NCrates); envelope->add(bretA); envelope->add(bretC); //baseEnvelopes - TRANSFUNCTION beA = Pow(HepGeom::RotateZ3D(1.0),f-(Alfa/2))*HepGeom::TranslateX3D(3464)*HepGeom::TranslateZ3D(3059.2)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION beC = Pow(HepGeom::RotateZ3D(1.0),f+(Alfa/2))*HepGeom::TranslateX3D(3464)*HepGeom::TranslateZ3D(-3059.2)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION beA = Pow(GeoTrf::RotateZ3D(1.0),f-(Alfa/2))*GeoTrf::TranslateX3D(3464)*GeoTrf::TranslateZ3D(3059.2)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION beC = Pow(GeoTrf::RotateZ3D(1.0),f+(Alfa/2))*GeoTrf::TranslateX3D(3464)*GeoTrf::TranslateZ3D(-3059.2)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *betA = new GeoSerialTransformer(baseenvelopes,&beA, NCrates); GeoSerialTransformer *betC = new GeoSerialTransformer(baseenvelopes,&beC, NCrates); envelope->add(betA); diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelPresamplerConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelPresamplerConstruction.cxx index c35aac31d91..8d31d8851e2 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelPresamplerConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelPresamplerConstruction.cxx @@ -41,15 +41,15 @@ // For Functions: // For functions: -#include "CLHEP/GenericFunctions/Abs.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" -#include "CLHEP/GenericFunctions/Sqrt.hh" -#include "CLHEP/GenericFunctions/ATan.hh" -#include "CLHEP/GenericFunctions/Rectangular.hh" -#include "CLHEP/GenericFunctions/Mod.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/FixedConstant.hh" +#include "GeoGenericFunctions/Abs.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" +#include "GeoGenericFunctions/Sqrt.h" +#include "GeoGenericFunctions/ATan.h" +#include "GeoGenericFunctions/Rectangular.h" +#include "GeoGenericFunctions/Mod.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/FixedConstant.h" // Constructor; LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo, int itb): @@ -123,17 +123,17 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo const GeoMaterial *ConnecMat = materialManager->getMaterial("LAr::ConnecMat"); if (!ConnecMat) throw std::runtime_error("Error in BarrelPresamplerConstruction, LAr::ConnecMat is not found."); - // double rMinPresamplerMother =1385*CLHEP::mm; - double rMinPresamplerMother =1410*CLHEP::mm; - double rMaxPresamplerMother =1447*CLHEP::mm-0.001*CLHEP::mm; - double presamplerMother_length=1549*CLHEP::mm; - double Phi_min=0.*CLHEP::deg; - double Phi_span=360.*CLHEP::deg; + // double rMinPresamplerMother =1385*GeoModelKernelUnits::mm; + double rMinPresamplerMother =1410*GeoModelKernelUnits::mm; + double rMaxPresamplerMother =1447*GeoModelKernelUnits::mm-0.001*GeoModelKernelUnits::mm; + double presamplerMother_length=1549*GeoModelKernelUnits::mm; + double Phi_min=0.*GeoModelKernelUnits::deg; + double Phi_span=360.*GeoModelKernelUnits::deg; int nbsectors=32; if (itb==1) { - Phi_min=-0.5*CLHEP::deg; - Phi_span=23.5*CLHEP::deg; + Phi_min=-0.5*GeoModelKernelUnits::deg; + Phi_span=23.5*GeoModelKernelUnits::deg; nbsectors=2; } @@ -209,42 +209,42 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo // Make a presampler sector: if(m_fullGeo){ // ? - double epsil = 0.007*CLHEP::mm; + double epsil = 0.007*GeoModelKernelUnits::mm; // contraction factor - double cmm = (1-0.0026)*CLHEP::mm; + double cmm = (1-0.0026)*GeoModelKernelUnits::mm; double mod_leng[8]; for(int ii=0; ii<8; ii++ ) mod_leng[ii]=mod[ii][0]*cmm+2*epsil; double mod_heig[8]; - double larheight = 13*CLHEP::mm; + double larheight = 13*GeoModelKernelUnits::mm; - double prep1_th = 1.*CLHEP::mm; // bottom prepreg layer - double prep2_th = 4.5*CLHEP::mm; - double smallLength = 275.6*CLHEP::mm; + double prep1_th = 1.*GeoModelKernelUnits::mm; // bottom prepreg layer + double prep2_th = 4.5*GeoModelKernelUnits::mm; + double smallLength = 275.6*GeoModelKernelUnits::mm; double bigLength = 277.5; double prep1_height = (smallLength/2+1.)*cmm; - double larheight2 = larheight*cos(-mod[1][3]*CLHEP::deg)*CLHEP::mm; + double larheight2 = larheight*cos(-mod[1][3]*GeoModelKernelUnits::deg)*GeoModelKernelUnits::mm; mod_heig[0]= (larheight+prep1_th+prep2_th)*cmm+4*epsil; mod_heig[1]= (larheight2+prep1_th+prep2_th)*cmm+5.*epsil; for(int i=2; i<8; i++ ) mod_heig[i] = mod_heig[0]; - double shell_th = 0.4*CLHEP::mm; - double rail_th = 8.6*CLHEP::mm; - double mech_clear = 0.5*CLHEP::mm; + double shell_th = 0.4*GeoModelKernelUnits::mm; + double rail_th = 8.6*GeoModelKernelUnits::mm; + double mech_clear = 0.5*GeoModelKernelUnits::mm; double mb_length = 3100.3; double sector_length = mb_length*cmm +9.*epsil; - double sector_height = mod_heig[0]+(shell_th+rail_th)*cmm+mech_clear*CLHEP::mm+3*epsil; + double sector_height = mod_heig[0]+(shell_th+rail_th)*cmm+mech_clear*GeoModelKernelUnits::mm+3*epsil; unsigned int nsectors=32; double mod_xm = prep1_height+epsil; - double mod_xp = (bigLength/2+1.+prep2_th*tan((360./(2*nsectors))*CLHEP::deg))*cmm; + double mod_xp = (bigLength/2+1.+prep2_th*tan((360./(2*nsectors))*GeoModelKernelUnits::deg))*cmm; double sect_xm = mod_xm+epsil; - double sect_xp = sect_xm+sector_height*tan((360./(2*nsectors))*CLHEP::deg); - double rpres = 1426.*CLHEP::mm; + double sect_xp = sect_xm+sector_height*tan((360./(2*nsectors))*GeoModelKernelUnits::deg); + double rpres = 1426.*GeoModelKernelUnits::mm; double zpres = -presamplerMother_length+sector_length/2+epsil; @@ -253,10 +253,10 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo GeoLogVol *logVol = new GeoLogVol (basename+"::Sector",trd,LAr); GeoPhysVol *sectorPhysVol = new GeoPhysVol(logVol); - Genfun::Variable I; - double dphiSector = (360.*CLHEP::deg)/nsectors; - Genfun::GENFUNCTION f = dphiSector*I+0.5*dphiSector; - GeoXF::TRANSFUNCTION t = GeoXF::Pow(HepGeom::RotateZ3D(1.0),f)*HepGeom::TranslateX3D(rpres)*HepGeom::TranslateZ3D(zpres)*HepGeom::RotateZ3D(90*CLHEP::deg)*HepGeom::RotateX3D(90*CLHEP::deg); + GeoGenfun::Variable I; + double dphiSector = (360.*GeoModelKernelUnits::deg)/nsectors; + GeoGenfun::GENFUNCTION f = dphiSector*I+0.5*dphiSector; + GeoXF::TRANSFUNCTION t = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),f)*GeoTrf::TranslateX3D(rpres)*GeoTrf::TranslateZ3D(zpres)*GeoTrf::RotateZ3D(90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer *st = new GeoSerialTransformer(sectorPhysVol,&t, nbsectors); m_psPhysicalPos->add(st); @@ -271,7 +271,7 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo // recompute length of module 0 and 1 to have avoid overshoorting of first cathode of module 1 // into module 0 => reduce module 0 length by 0.5*lar_height*tan(tilt angle) // and increase module 1 length by same amount - double delta01 = 0.5*larheight*tan(-mod[1][3]*CLHEP::deg); // delta01 is >0 + double delta01 = 0.5*larheight*tan(-mod[1][3]*GeoModelKernelUnits::deg); // delta01 is >0 mod_leng[0]=mod_leng[0]-delta01; mod_leng[1]=mod_leng[1]+delta01; GeoPhysVol* pvModule[8]; @@ -291,7 +291,7 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo GeoLogVol *logVol = new GeoLogVol(basename+"::Module",trd,LAr); pvModule[m] = new GeoPhysVol(logVol); - GeoTransform *xf = new GeoTransform(HepGeom::Translate3D(0.0, modY, modZ)); + GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(0.0, modY, modZ)); sectorPhysVol->add(xf); sectorPhysVol->add(pvModule[m]); @@ -303,7 +303,7 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo double shell_leng = mod[0][0]+mod[1][0]+mod[2][0]+mod[3][0]+mod[4][0]+mod[5][0]+mod[6][0]+mod[7][0]; double prot_y = (shell_leng/2)*cmm; - double glX = 0.*CLHEP::mm; + double glX = 0.*GeoModelKernelUnits::mm; double glY = -sector_length/2+prot_y+epsil; //-----------------------------A Protection Shell--------------------------// @@ -314,7 +314,7 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo double glZ = -sector_height/2+(shell_th/2)*cmm+epsil; - GeoTransform *xf = new GeoTransform(HepGeom::Translate3D(glX,glY, glZ)); + GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(glX,glY, glZ)); sectorPhysVol->add(xf); sectorPhysVol->add(physVol); } @@ -345,7 +345,7 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo GeoLogVol *logVol=new GeoLogVol(basename+"::MotherBoard",MB,MBMat); GeoPhysVol *physVol = new GeoPhysVol(logVol); - GeoTransform* xf = new GeoTransform(HepGeom::TranslateZ3D(mbZ)); + GeoTransform* xf = new GeoTransform(GeoTrf::TranslateZ3D(mbZ)); sectorPhysVol->add(xf); sectorPhysVol->add(physVol); } @@ -360,7 +360,7 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo GeoLogVol *logVol=new GeoLogVol(basename+"::ProtectionPlate",plate,FR4); GeoPhysVol *physVol = new GeoPhysVol(logVol); - GeoTransform* xf = new GeoTransform(HepGeom::Translate3D(glX,glY,mbZ+(mb_th/2+heightOut+prot_th/2)*cmm+2*epsil)); + GeoTransform* xf = new GeoTransform(GeoTrf::Translate3D(glX,glY,mbZ+(mb_th/2+heightOut+prot_th/2)*cmm+2*epsil)); sectorPhysVol->add(xf); sectorPhysVol->add(physVol); } @@ -378,8 +378,8 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo GeoPhysVol *physVol = new GeoPhysVol(logVol); double connZ = mbZ+(mb_th/2+heightOut/2)*cmm+epsil; - GeoTransform* xf1 = new GeoTransform(HepGeom::TranslateZ3D(connZ)); - GeoTransform* xf2 = new GeoTransform(HepGeom::RotateX3D(-90*CLHEP::deg)); + GeoTransform* xf1 = new GeoTransform(GeoTrf::TranslateZ3D(connZ)); + GeoTransform* xf2 = new GeoTransform(GeoTrf::RotateX3D(-90*GeoModelKernelUnits::deg)); sectorPhysVol->add(xf1); sectorPhysVol->add(xf2); @@ -395,8 +395,8 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo double railX = (bigLength/2+1-rail_pos-rail_width/2)*cmm+epsil; double railZ = modz[0]+mod_heig[0]/2+(rail_th/2)*cmm+epsil; - GeoTransform* xf1 = new GeoTransform(HepGeom::Translate3D(railX,glY,railZ)); - GeoTransform* xf2 = new GeoTransform(HepGeom::Translate3D(-railX,glY,railZ)); + GeoTransform* xf1 = new GeoTransform(GeoTrf::Translate3D(railX,glY,railZ)); + GeoTransform* xf2 = new GeoTransform(GeoTrf::Translate3D(-railX,glY,railZ)); sectorPhysVol->add(xf1); sectorPhysVol->add(physVol); @@ -413,8 +413,8 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo double anode_th = 0.330; double cathode_th = 0.270; - double heig_elec1 = (larheight/cos(-mod[0][3]*CLHEP::deg)-0.5*anode_th/cos(mod[0][3]*CLHEP::deg))*cmm; - double heig_elec3 = (larheight-0.5*cathode_th/cos(mod[1][3]*CLHEP::deg))*cmm; + double heig_elec1 = (larheight/cos(-mod[0][3]*GeoModelKernelUnits::deg)-0.5*anode_th/cos(mod[0][3]*GeoModelKernelUnits::deg))*cmm; + double heig_elec3 = (larheight-0.5*cathode_th/cos(mod[1][3]*GeoModelKernelUnits::deg))*cmm; GeoTrd* catho1 = new GeoTrd(smallLength/2*cmm,bigLength/2*cmm,cathode_th/2*cmm,cathode_th/2*cmm,heig_elec1/2*cmm); GeoLogVol* LV_catho1 = new GeoLogVol(basename+"::Cathode1",catho1,CathodeMat); @@ -477,8 +477,8 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo for(int i=0; i<8; i++) { - GeoTransform* xfPrep1 = new GeoTransform(HepGeom::TranslateZ3D(prep1_pos[i])); - GeoTransform* xfPrep2 = new GeoTransform(HepGeom::TranslateZ3D(prep2_pos[i])); + GeoTransform* xfPrep1 = new GeoTransform(GeoTrf::TranslateZ3D(prep1_pos[i])); + GeoTransform* xfPrep2 = new GeoTransform(GeoTrf::TranslateZ3D(prep2_pos[i])); pvModule[i]->add(xfPrep1); pvModule[i]->add(PV_Prep1[i]); @@ -488,12 +488,12 @@ LArGeo::BarrelPresamplerConstruction ::BarrelPresamplerConstruction(bool fullGeo // Parameterizations for electrodes - Genfun::Variable I; - Genfun::GENFUNCTION cathoGF = YStartC[i]+I*mod[i][4]*cmm; - Genfun::GENFUNCTION anoGF = YStartA[i]+I*mod[i][4]*cmm; + GeoGenfun::Variable I; + GeoGenfun::GENFUNCTION cathoGF = YStartC[i]+I*mod[i][4]*cmm; + GeoGenfun::GENFUNCTION anoGF = YStartA[i]+I*mod[i][4]*cmm; - GeoXF::TRANSFUNCTION cathoTF = GeoXF::Pow(HepGeom::TranslateY3D(1.),cathoGF)*HepGeom::TranslateZ3D(elec_trans)*HepGeom::RotateX3D(-mod[i][3]*CLHEP::deg); - GeoXF::TRANSFUNCTION anoTF = GeoXF::Pow(HepGeom::TranslateY3D(1.),anoGF)*HepGeom::TranslateZ3D(elec_trans)*HepGeom::RotateX3D(-mod[i][3]*CLHEP::deg); + GeoXF::TRANSFUNCTION cathoTF = GeoXF::Pow(GeoTrf::TranslateY3D(1.),cathoGF)*GeoTrf::TranslateZ3D(elec_trans)*GeoTrf::RotateX3D(-mod[i][3]*GeoModelKernelUnits::deg); + GeoXF::TRANSFUNCTION anoTF = GeoXF::Pow(GeoTrf::TranslateY3D(1.),anoGF)*GeoTrf::TranslateZ3D(elec_trans)*GeoTrf::RotateX3D(-mod[i][3]*GeoModelKernelUnits::deg); GeoSerialTransformer *cathoST,*anoST; diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt index 92304b5376c..04fc3d7f526 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt @@ -10,20 +10,18 @@ atlas_depends_on_subdirs( PRIVATE Control/StoreGate Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArGeoCode src/*.cxx PUBLIC_HEADERS LArGeoCode - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} LINK_LIBRARIES StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelKernel GaudiKernel ) + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} GaudiKernel ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/src/LArMaterialManager.cxx b/LArCalorimeter/LArGeoModel/LArGeoCode/src/LArMaterialManager.cxx index 7dd80173909..96713103297 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoCode/src/LArMaterialManager.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoCode/src/LArMaterialManager.cxx @@ -5,9 +5,9 @@ #include "LArGeoCode/LArMaterialManager.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoElement.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGate.h" #include "StoreGate/StoreGateSvc.h" -#include "CLHEP/Units/PhysicalConstants.h" #include "GaudiKernel/Bootstrap.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -49,7 +49,7 @@ void LArMaterialManager::buildMaterials() if (!Copper) throw std::runtime_error("Error in LArMaterialManager, std::Copper is not found."); #ifdef DEBUGGEO msg << "Copper radiation length " << Copper->getRadLength() << " " - << Copper->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + << Copper->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; #endif @@ -60,7 +60,7 @@ void LArMaterialManager::buildMaterials() if (!Lead) throw std::runtime_error("Error in LArMaterialManager, std::Lead is not found."); #ifdef DEBUGGEO msg << MSG::INFO<< "Lead radiation length " << Lead->getRadLength() << " " - << Lead->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + << Lead->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; #endif @@ -69,7 +69,7 @@ void LArMaterialManager::buildMaterials() #ifdef DEBUGGEO msg << MSG::INFO<< "LAr radiation length " << LAr->getRadLength() << " " - << LAr->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + << LAr->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; #endif const GeoMaterial *Air = m_storedManager->getMaterial("std::Air"); @@ -79,7 +79,7 @@ void LArMaterialManager::buildMaterials() if (!Kapton) throw std::runtime_error("Error in LArMaterialManager, std::Kapton is not found."); #ifdef DEBUGGEO msg << MSG::INFO<< "Kapton radiation length " << Kapton->getRadLength() << " " - << Kapton->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + << Kapton->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; for (size_t i = 0; i< Kapton->getNumElements();i++) { msg << MSG::INFO << int (Kapton->getFraction(i)*100) << "% \t" << Kapton->getElement(i)->getName() << endmsg; } @@ -91,7 +91,7 @@ void LArMaterialManager::buildMaterials() if (!Glue) throw std::runtime_error("Error in LArMaterialManager, LAr::Glue is not found."); #ifdef DEBUGGEO msg << MSG::INFO<< "Glue radiation length " << Glue->getRadLength() << " " - << Glue->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + << Glue->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; for (size_t i = 0; i< Glue->getNumElements();i++) { msg << MSG::INFO << int (Glue->getFraction(i)*100) << "% \t" << Glue->getElement(i)->getName() << endmsg; } @@ -102,7 +102,7 @@ void LArMaterialManager::buildMaterials() if (!G10) throw std::runtime_error("Error in LArMaterialManager, LAr::G10 is not found."); #ifdef DEBUGGEO msg << MSG::INFO<< "G10 radiation length " << G10->getRadLength() << " " - << G10->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + << G10->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; for (size_t i = 0; i< G10->getNumElements();i++) { msg << MSG::INFO << int (G10->getFraction(i)*100) << "% \t" << G10->getElement(i)->getName() << endmsg; } @@ -128,9 +128,9 @@ void LArMaterialManager::buildMaterials() double contract=dB.getDouble("ColdContraction","ColdContraction-00", "ABSORBERCONTRACTION"); // LArEMBAbsorberContraction // first thin absorbers - Tggl=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGGL")*CLHEP::cm*contract; // LArEMBThinAbsGlue - Tgfe=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGFE")*CLHEP::cm*contract; // LArEMBThinAbsIron - Tgpb=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGPB")*CLHEP::cm*contract; // LArEMBThinAbsLead + Tggl=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGGL")*GeoModelKernelUnits::cm*contract; // LArEMBThinAbsGlue + Tgfe=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGFE")*GeoModelKernelUnits::cm*contract; // LArEMBThinAbsIron + Tgpb=dB.getDouble("BarrelGeometry","BarrelGeometry-00","TGPB")*GeoModelKernelUnits::cm*contract; // LArEMBThinAbsLead Totalthick = Tggl+Tgfe+Tgpb; Totalmass = (Tgpb*Lead->getDensity()+Tgfe*Iron->getDensity()+Tggl*Glue->getDensity()); //***GU below are the fraction per mass @@ -143,7 +143,7 @@ void LArMaterialManager::buildMaterials() msg << MSG::DEBUG <<" Fraction pb,fe,gl: "<<Fracpb<<","<<Fracfe<<"," <<Fracgl<< endmsg; msg << MSG::DEBUG <<" Total mass, Thickness: "<<Totalmass<<" ," <<Totalthick<< endmsg; msg << MSG::DEBUG<<" Contraction " << contract << endmsg; - msg << MSG::DEBUG <<" Thinabs Density = "<< density*(CLHEP::cm3/CLHEP::g) << endmsg; + msg << MSG::DEBUG <<" Thinabs Density = "<< density*(GeoModelKernelUnits::cm3/GeoModelKernelUnits::g) << endmsg; GeoMaterial* Thin_abs = new GeoMaterial("Thinabs",density); Thin_abs->add(Lead,Fracpb); @@ -156,9 +156,9 @@ void LArMaterialManager::buildMaterials() #endif // then thick absorbers - Thgl=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THGL")*CLHEP::cm*contract; // LArEMBThickAbsGlue - Thfe=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THFE")*CLHEP::cm*contract; // LArEMBThickAbsIron - Thpb=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THPB")*CLHEP::cm*contract; // LArEMBThickAbsLead + Thgl=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THGL")*GeoModelKernelUnits::cm*contract; // LArEMBThickAbsGlue + Thfe=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THFE")*GeoModelKernelUnits::cm*contract; // LArEMBThickAbsIron + Thpb=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THPB")*GeoModelKernelUnits::cm*contract; // LArEMBThickAbsLead Totalthick = Thgl+Thfe+Thpb; Totalmass = (Thpb*Lead->getDensity()+Thfe*Iron->getDensity()+Thgl*Glue->getDensity()); @@ -171,7 +171,7 @@ void LArMaterialManager::buildMaterials() msg << MSG::DEBUG <<"---- THICK absorber characteristics: ----" << endmsg; msg << MSG::DEBUG <<" Fraction pb,fe,gl: "<<Fracpb<<","<<Fracfe<<","<<Fracgl << endmsg; msg << MSG::DEBUG <<" Total mass, Thickness: "<<Totalmass<<" ,"<<Totalthick << endmsg; - msg << MSG::DEBUG <<" Thickabs Density = " << density*(CLHEP::cm3/CLHEP::g) << endmsg; + msg << MSG::DEBUG <<" Thickabs Density = " << density*(GeoModelKernelUnits::cm3/GeoModelKernelUnits::g) << endmsg; GeoMaterial* Thick_abs = new GeoMaterial("Thickabs",density); Thick_abs->add(Lead,Fracpb); @@ -183,8 +183,8 @@ void LArMaterialManager::buildMaterials() #endif // electrode =mixture Kapton+Cu - Thcu=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THCU")*CLHEP::cm; // LArEMBThickElecCopper - Thfg=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THFG")*CLHEP::cm; // LArEMBThickElecKapton + Thcu=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THCU")*GeoModelKernelUnits::cm; // LArEMBThickElecCopper + Thfg=dB.getDouble("BarrelGeometry","BarrelGeometry-00","THFG")*GeoModelKernelUnits::cm; // LArEMBThickElecKapton Totalthicke = Thcu+Thfg; Totalmasse = (Thcu*Copper->getDensity()+Thfg*Kapton->getDensity()); //**GU below are the fractions per mass @@ -198,7 +198,7 @@ void LArMaterialManager::buildMaterials() msg << MSG::DEBUG <<"---- Electrode characteristics: ----" << endmsg; msg << MSG::DEBUG <<" Fraction Cu, Kapton: " << FracCu << ","<< FracKap << endmsg; msg << MSG::DEBUG <<" Total mass, Thickness:"<<Totalmasse<<" ,"<<Totalthicke<< endmsg; - msg << MSG::DEBUG <<" Electrode Density = " << density*(CLHEP::cm3/CLHEP::g) << endmsg; + msg << MSG::DEBUG <<" Electrode Density = " << density*(GeoModelKernelUnits::cm3/GeoModelKernelUnits::g) << endmsg; GeoMaterial* Kapton_Cu = new GeoMaterial("KaptonC",density); Kapton_Cu->add(Copper,FracCu); @@ -209,7 +209,7 @@ void LArMaterialManager::buildMaterials() #endif // material for Cables/electronics (mixture of Kapton and copper) - // density = 2.440*CLHEP::g/CLHEP::cm3; + // density = 2.440*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3; //**GU get fractions per mass double frmassCu = dB.getDouble("BarrelAccordionCables","BarrelAccordionCables-00","PERCU"); // LArEMBmasspercentCu double frmassKap= dB.getDouble("BarrelAccordionCables","BarrelAccordionCables-00","PERKAP"); // LArEMBmasspercentKap @@ -219,8 +219,8 @@ void LArMaterialManager::buildMaterials() /(1.+frmassKapOverCu*Copper->getDensity()/Kapton->getDensity()); GeoMaterial* Cable_elect = new GeoMaterial("Cables",density); double fractionmass; - Cable_elect->add(Copper, fractionmass=frmassCu*CLHEP::perCent); - Cable_elect->add(Kapton, fractionmass=frmassKap*CLHEP::perCent); + Cable_elect->add(Copper, fractionmass=frmassCu*GeoModelKernelUnits::perCent); + Cable_elect->add(Kapton, fractionmass=frmassKap*GeoModelKernelUnits::perCent); m_storedManager->addMaterial("LAr", Cable_elect); #ifdef DEBUGGEO msg << MSG::INFO<< "Cable radiation length " << Cable_elect->getRadLength() << endmsg; @@ -228,8 +228,8 @@ void LArMaterialManager::buildMaterials() // material for motherboard // Mother_board is defined as a mixture of epox_G10 (C8 H14 O4) and Copper - ThMBcu = dB.getDouble("BarrelMotherboards","BarrelMotherboards-00","THICU")*CLHEP::cm; // LArEMBCuThickness - ThMBG10 = dB.getDouble("BarrelMotherboards","BarrelMotherboards-00","THIG10")*CLHEP::cm; // LArEMBG10Thickness + ThMBcu = dB.getDouble("BarrelMotherboards","BarrelMotherboards-00","THICU")*GeoModelKernelUnits::cm; // LArEMBCuThickness + ThMBG10 = dB.getDouble("BarrelMotherboards","BarrelMotherboards-00","THIG10")*GeoModelKernelUnits::cm; // LArEMBG10Thickness double TotalthickMBe = ThMBcu+ThMBG10; double TotalmassMBe = (ThMBcu*Copper->getDensity()+ThMBG10*G10->getDensity()); double FracMBCu = (ThMBcu*Copper->getDensity())/TotalmassMBe; @@ -240,7 +240,7 @@ void LArMaterialManager::buildMaterials() << FracMBG10 << endmsg; msg << MSG::DEBUG <<" Total mass, Thickness:" << TotalmassMBe <<" ," <<TotalthickMBe<< endmsg; - msg << MSG::DEBUG <<" M_board Density = "<<density*(CLHEP::cm3/CLHEP::g) << endmsg; + msg << MSG::DEBUG <<" M_board Density = "<<density*(GeoModelKernelUnits::cm3/GeoModelKernelUnits::g) << endmsg; GeoMaterial* Moth_elect = new GeoMaterial("MBoards",density); // ****GU: use fraction per masses of G10 and Cu Moth_elect->add(G10,FracMBG10); @@ -255,7 +255,7 @@ void LArMaterialManager::buildMaterials() const GeoElement* Si = m_storedManager->getElement("Silicon"); const GeoElement *O = m_storedManager->getElement("Oxygen"); - density = dB.getDouble("BarrelMotherboards", "BarrelMotherboards-00", "DG10")*(CLHEP::g/CLHEP::cm3); //LArEMBEpoxyVolumicMass + density = dB.getDouble("BarrelMotherboards", "BarrelMotherboards-00", "DG10")*(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); //LArEMBEpoxyVolumicMass GeoMaterial* SiO2 = new GeoMaterial("SiO2",density); double fractionSi=28.09/(28.09+2*16.0); SiO2->add(Si,fractionSi); @@ -263,21 +263,21 @@ void LArMaterialManager::buildMaterials() SiO2->add(O,fractionO); SiO2->lock(); // Gten for the bars of the calorimeter= mixture of regular G10 and SiO2 - density=1.72*CLHEP::g/CLHEP::cm3; // should be replaced by number from database + density=1.72*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3; // should be replaced by number from database GeoMaterial* Gten_bar = new GeoMaterial("G10_bar",density); Gten_bar->add(G10,0.38); // should be replaced by number from database Gten_bar->add(SiO2,0.62); // should be replaced by number from database m_storedManager->addMaterial("LAr",Gten_bar); #ifdef DEBUGGEO msg << MSG::INFO<< "fracionSi,fracionO2 " << fractionSi << " " << fractionO << endmsg; - msg << MSG::INFO<< "SiO2 density " << SiO2->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + msg << MSG::INFO<< "SiO2 density " << SiO2->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; msg << MSG::INFO<< "SiO2 radiation length " << SiO2->getRadLength() << endmsg; msg << MSG::INFO<< "G10bar radiation length " << Gten_bar->getRadLength() << endmsg; #endif // material for the effective M_PIn+summing board effect - double ThSBCu = 0.28*CLHEP::mm; // should be replaced by number from database - double ThSBAr = 9.72*CLHEP::mm; // should be replaced by number from database + double ThSBCu = 0.28*GeoModelKernelUnits::mm; // should be replaced by number from database + double ThSBAr = 9.72*GeoModelKernelUnits::mm; // should be replaced by number from database double TotalThickSB = ThSBCu+ThSBAr; double dcu = Copper->getDensity(); double dar = LAr->getDensity(); @@ -312,12 +312,12 @@ void LArMaterialManager::buildMaterials() const GeoElement *H = m_storedManager->getElement( "Hydrogen" ); - GeoMaterial *Vacuum = new GeoMaterial( "Vacuum", CLHEP::universe_mean_density ); + GeoMaterial *Vacuum = new GeoMaterial( "Vacuum", GeoModelKernelUnits::universe_mean_density ); Vacuum->add( H, 1. ); m_storedManager->addMaterial("LAr", Vacuum ); #ifdef DEBUGGEO msg << MSG::INFO<< "Vacuum radiation length " << Vacuum->getRadLength() << " " - << Vacuum->getDensity()/(CLHEP::g/CLHEP::cm3) << endmsg; + << Vacuum->getDensity()/(GeoModelKernelUnits::g/GeoModelKernelUnits::cm3) << endmsg; #endif @@ -335,13 +335,13 @@ void LArMaterialManager::buildMaterials() // EMEC thin absorbers // -/* Tggl = 0.30 * CLHEP::mm; - Tgfe = 0.40 * CLHEP::mm; - Tgpb = 1.70 * CLHEP::mm; */ +/* Tggl = 0.30 * GeoModelKernelUnits::mm; + Tgfe = 0.40 * GeoModelKernelUnits::mm; + Tgpb = 1.70 * GeoModelKernelUnits::mm; */ - Tggl = 0.20 * CLHEP::mm; - Tgfe = 0.40 * CLHEP::mm; - Tgpb = 1.69 * CLHEP::mm; + Tggl = 0.20 * GeoModelKernelUnits::mm; + Tgfe = 0.40 * GeoModelKernelUnits::mm; + Tgpb = 1.69 * GeoModelKernelUnits::mm; Totalthick = Tggl+Tgfe+Tgpb; Totalmass = (Tgpb*Lead->getDensity()+Tgfe*Iron->getDensity()+Tggl*Glue->getDensity()); @@ -354,13 +354,13 @@ void LArMaterialManager::buildMaterials() msg << MSG::DEBUG <<" Thickness pb,fe,gl,[mm]="<<Tgpb<<" "<<Tgfe<<" "<<Tggl << endmsg; msg << MSG::DEBUG <<" Fraction pb,fe,gl ="<<Fracpb<<","<<Fracfe<<"," <<Fracgl << endmsg; msg << MSG::DEBUG <<" Total mass, Thickness ="<<Totalmass<<" ," <<Totalthick << endmsg; - msg << MSG::DEBUG <<" Thinabs Density ="<< density*(CLHEP::cm3/CLHEP::g) << endmsg; + msg << MSG::DEBUG <<" Thinabs Density ="<< density*(GeoModelKernelUnits::cm3/GeoModelKernelUnits::g) << endmsg; msg << MSG::DEBUG << "---- EMEC THIN absorber characteristics: ----" << endmsg; msg << MSG::DEBUG <<" Thickness pb,fe,gl,[mm]="<<Tgpb<<" "<<Tgfe<<" "<<Tggl << endmsg; msg << MSG::DEBUG <<" Fraction pb,fe,gl ="<<Fracpb<<","<<Fracfe<<"," <<Fracgl << endmsg; msg << MSG::DEBUG <<" Total mass, Thickness ="<<Totalmass<<" ," <<Totalthick << endmsg; - msg << MSG::DEBUG <<" Thinabs Density ="<< density*(CLHEP::cm3/CLHEP::g) << endmsg; + msg << MSG::DEBUG <<" Thinabs Density ="<< density*(GeoModelKernelUnits::cm3/GeoModelKernelUnits::g) << endmsg; GeoMaterial* Thin_abs = new GeoMaterial("EMEC_Thinabs",density); @@ -377,13 +377,13 @@ void LArMaterialManager::buildMaterials() // EMEC thick absorbers // -/* Thgl = 0.30 * CLHEP::mm; - Thfe = 0.40 * CLHEP::mm; - Thpb = 2.20 * CLHEP::mm; */ +/* Thgl = 0.30 * GeoModelKernelUnits::mm; + Thfe = 0.40 * GeoModelKernelUnits::mm; + Thpb = 2.20 * GeoModelKernelUnits::mm; */ - Thgl = 0.20 * CLHEP::mm; - Thfe = 0.40 * CLHEP::mm; - Thpb = 2.20 * CLHEP::mm; + Thgl = 0.20 * GeoModelKernelUnits::mm; + Thfe = 0.40 * GeoModelKernelUnits::mm; + Thpb = 2.20 * GeoModelKernelUnits::mm; Totalthick = Thgl+Thfe+Thpb; Totalmass = (Thpb*Lead->getDensity()+Thfe*Iron->getDensity()+Thgl*Glue->getDensity()); @@ -397,7 +397,7 @@ void LArMaterialManager::buildMaterials() msg << MSG::DEBUG <<" Thickness pb,fe,gl[mm]="<<Thpb<<" "<<Thfe<<" "<<Thgl<<endmsg; msg << MSG::DEBUG <<" Fraction pb,fe,gl: "<<Fracpb<<","<<Fracfe<<","<<Fracgl<<endmsg; msg << MSG::DEBUG <<" Total mass, Thickness: "<<Totalmass<<" ,"<<Totalthick<<endmsg; - msg << MSG::DEBUG <<" Thickabs Density = "<<density*(CLHEP::cm3/CLHEP::g) <<endmsg; + msg << MSG::DEBUG <<" Thickabs Density = "<<density*(GeoModelKernelUnits::cm3/GeoModelKernelUnits::g) <<endmsg; GeoMaterial* Thick_abs = new GeoMaterial("EMEC_Thickabs",density); Thick_abs->add(Lead,Fracpb); @@ -411,8 +411,8 @@ void LArMaterialManager::buildMaterials() // // EMEC shell = iron + glue, identical for inner and outer absorbers // - Thgl = 0.20 * CLHEP::mm; - Thfe = 0.40 * CLHEP::mm; + Thgl = 0.20 * GeoModelKernelUnits::mm; + Thfe = 0.40 * GeoModelKernelUnits::mm; Totalthick = Thgl+Thfe; Totalmass = (Thfe*Iron->getDensity()+Thgl*Glue->getDensity()); @@ -425,7 +425,7 @@ void LArMaterialManager::buildMaterials() msg << MSG::DEBUG <<" Thickness fe,gl[mm]="<<Thfe<<" "<<Thgl<<endmsg; msg << MSG::DEBUG <<" Fraction fe,gl: "<<Fracfe<<","<<Fracgl<<endmsg; msg << MSG::DEBUG <<" Total mass, Thickness: "<<Totalmass<<" ,"<<Totalthick<<endmsg; - msg << MSG::DEBUG <<" Thickabs Density = "<<density*(CLHEP::cm3/CLHEP::g) <<endmsg; + msg << MSG::DEBUG <<" Thickabs Density = "<<density*(GeoModelKernelUnits::cm3/GeoModelKernelUnits::g) <<endmsg; GeoMaterial* EMEC_shell = new GeoMaterial("EMEC_shell",density); EMEC_shell->add(Iron,Fracfe); @@ -446,13 +446,13 @@ void LArMaterialManager::buildMaterials() //!! Check whether G10 or G10_bar is to be used!!!! -/* Tggl = 0.30 * CLHEP::mm; - Tgfe = 0.40 * CLHEP::mm; - TgG10 =1.70 * CLHEP::mm;*/ +/* Tggl = 0.30 * GeoModelKernelUnits::mm; + Tgfe = 0.40 * GeoModelKernelUnits::mm; + TgG10 =1.70 * GeoModelKernelUnits::mm;*/ - Tggl = 0.20 * CLHEP::mm; - Tgfe = 0.40 * CLHEP::mm; - TgG10 =1.69 * CLHEP::mm; + Tggl = 0.20 * GeoModelKernelUnits::mm; + Tgfe = 0.40 * GeoModelKernelUnits::mm; + TgG10 =1.69 * GeoModelKernelUnits::mm; Totalthick = Tggl+Tgfe+TgG10; Totalmass = (TgG10*G10->getDensity()+Tgfe*Iron->getDensity()+Tggl*Glue->getDensity()); @@ -477,13 +477,13 @@ void LArMaterialManager::buildMaterials() // EMEC Inner Wheel barrette // -/* Thgl = 0.30 * CLHEP::mm; - Thfe = 0.40 * CLHEP::mm; - ThG10 =2.20 * CLHEP::mm;*/ +/* Thgl = 0.30 * GeoModelKernelUnits::mm; + Thfe = 0.40 * GeoModelKernelUnits::mm; + ThG10 =2.20 * GeoModelKernelUnits::mm;*/ - Thgl = 0.20 * CLHEP::mm; - Thfe = 0.40 * CLHEP::mm; - ThG10 =2.20 * CLHEP::mm; + Thgl = 0.20 * GeoModelKernelUnits::mm; + Thfe = 0.40 * GeoModelKernelUnits::mm; + ThG10 =2.20 * GeoModelKernelUnits::mm; Totalthick = Thgl+Thfe+ThG10; Totalmass = (ThG10*G10->getDensity()+Thfe*Iron->getDensity()+Thgl*Glue->getDensity()); diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt index 9821db9d1d7..c12d3f7581f 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( LArGeoEndcap ) atlas_depends_on_subdirs( PUBLIC Control/StoreGate Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelKernel LArCalorimeter/LArGeoModel/LArGeoFcal LArCalorimeter/LArGeoModel/LArGeoHec PRIVATE @@ -24,15 +23,15 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArGeoEndcap src/*.cxx PUBLIC_HEADERS LArGeoEndcap - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelKernel LArGeoFcal LArGeoHec StoreGateLib SGtests CaloDetDescrLib + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} LArGeoFcal LArGeoHec StoreGateLib SGtests CaloDetDescrLib PRIVATE_LINK_LIBRARIES CaloIdentifier GeoModelUtilities GeoSpecialShapes GaudiKernel LArGeoCode LArGeoMiniFcal ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EMECConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EMECConstruction.h index 941a7ff1219..4be8fc0f8a6 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EMECConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EMECConstruction.h @@ -10,8 +10,8 @@ * $Id: EMECConstruction.h,v 1.9 2009-02-10 16:50:53 tsulaia Exp $ */ -#ifndef __EMECConstruction_H__ -#define __EMECConstruction_H__ +#ifndef LARGEOENDCAP_EMECCONSTRUCTION_H +#define LARGEOENDCAP_EMECCONSTRUCTION_H class GeoFullPhysVol; diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EndcapPresamplerConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EndcapPresamplerConstruction.h index 4bc37b17296..f999cff27cc 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EndcapPresamplerConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EndcapPresamplerConstruction.h @@ -14,7 +14,7 @@ #define LARGEOENDCAP_ENDCAPPRESAMPLERCONSTRUCTION_H #include "GeoModelKernel/GeoFullPhysVol.h" -#include "CLHEP/GenericFunctions/FunctionNoop.hh" +#include "GeoGenericFunctions/FunctionNoop.h" // Forward declarations diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EndcapPresamplerGeometryHelper.h b/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EndcapPresamplerGeometryHelper.h index 8fec1ae90fb..e7da0ad2f4d 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EndcapPresamplerGeometryHelper.h +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/LArGeoEndcap/EndcapPresamplerGeometryHelper.h @@ -9,8 +9,8 @@ // It provides any separate calculations or constants for the endcap // presampler geometry. -#ifndef __EndcapPresamplerGeometryHelper_H__ -#define __EndcapPresamplerGeometryHelper_H__ +#ifndef LARGEOENDCAP_ENDCAPPRESAMPLERGEOMETRYHELPER_H +#define LARGEOENDCAP_ENDCAPPRESAMPLERGEOMETRYHELPER_H namespace LArGeo { @@ -24,7 +24,7 @@ namespace LArGeo { // Accessor for pointer to the singleton. static EndcapPresamplerGeometryHelper* GetInstance(); - // "zShift" is the z-distance (CLHEP::cm) that the EM endcap is shifted + // "zShift" is the z-distance (GeoModelKernelUnits::cm) that the EM endcap is shifted // (due to cabling, etc.) float zShift() const { return m_zShift; } diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECConstruction.cxx index 0c866b27039..3f4ea5cacf4 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECConstruction.cxx @@ -60,6 +60,8 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/StoredPhysVol.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -68,7 +70,6 @@ #include "GaudiKernel/IService.h" #include "GaudiKernel/ISvcLocator.h" -#include "CLHEP/Geometry/Transform3D.h" #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecord.h" @@ -218,19 +219,19 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) double phiPosition, phiSize; if(m_isTB) { - phiPosition = CLHEP::halfpi*CLHEP::rad; - phiSize = M_PI*CLHEP::rad / 8. + 0.065*CLHEP::rad; // half-angle of inner part of module + phiPosition = GeoModelKernelUnits::halfpi*GeoModelKernelUnits::rad; + phiSize = M_PI*GeoModelKernelUnits::rad / 8. + 0.065*GeoModelKernelUnits::rad; // half-angle of inner part of module } else { - phiPosition = M_PI*CLHEP::rad; - phiSize = M_PI*CLHEP::rad; // half-angle of a full wheel + phiPosition = M_PI*GeoModelKernelUnits::rad; + phiSize = M_PI*GeoModelKernelUnits::rad; // half-angle of a full wheel } // Define the mother volume for the emec. Everything // else in the emec (wheels,structure, etc.) should be // placed inside here. - //double emecMotherZplan[] = {3641.*CLHEP::mm,4273.*CLHEP::mm}; //warm + //double emecMotherZplan[] = {3641.*GeoModelKernelUnits::mm,4273.*GeoModelKernelUnits::mm}; //warm // 21-Jul-2005, C.S. : above line valid in warm, below is in cold. // The latter one should apply, othervise SupportMotherVolumes cross @@ -245,17 +246,17 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) cryoPcons = pAccessSvc->getRecordsetPtr("CryoPcons", "CryoPcons-EMEC-00"); } - //double emecMotherZplan[] = {3639.5*CLHEP::mm,3639.5*CLHEP::mm+630.*CLHEP::mm}; //cold (J.T) - // // Zplane[0]=endg_z0*CLHEP::cm-50*CLHEP::mm - // // Zplane[1]=Zplane[0]+endg_dzende*CLHEP::cm-2.CLHEP::mm - //double emecMotherRin[] = { 279.*CLHEP::mm, 324*CLHEP::mm}; //{ 302.*CLHEP::mm, 302.*CLHEP::mm }; - //double emecMotherRout[] = {(2077.-7)*CLHEP::mm,(2077.-7)*CLHEP::mm}; // -7 for cold + //double emecMotherZplan[] = {3639.5*GeoModelKernelUnits::mm,3639.5*GeoModelKernelUnits::mm+630.*GeoModelKernelUnits::mm}; //cold (J.T) + // // Zplane[0]=endg_z0*GeoModelKernelUnits::cm-50*GeoModelKernelUnits::mm + // // Zplane[1]=Zplane[0]+endg_dzende*GeoModelKernelUnits::cm-2.GeoModelKernelUnits::mm + //double emecMotherRin[] = { 279.*GeoModelKernelUnits::mm, 324*GeoModelKernelUnits::mm}; //{ 302.*GeoModelKernelUnits::mm, 302.*GeoModelKernelUnits::mm }; + //double emecMotherRout[] = {(2077.-7)*GeoModelKernelUnits::mm,(2077.-7)*GeoModelKernelUnits::mm}; // -7 for cold //int lastPlaneEmec = (sizeof(emecMotherZplan) / sizeof(double)); std::string emecMotherName = baseName + "::Mother"; //+ extension; GeoTransform *refSystemTransform = 0; - double zTrans = 0.*CLHEP::mm, zMSTrans = 0.*CLHEP::mm; + double zTrans = 0.*GeoModelKernelUnits::mm, zMSTrans = 0.*GeoModelKernelUnits::mm; GeoPcon* emecMotherShape = new GeoPcon(phiPosition - phiSize, 2.*phiSize); //start phi,total phi for(unsigned int i = 0; i < cryoPcons->size(); ++ i){ @@ -263,13 +264,13 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) if(currentRecord->getString("PCON") == "EMEC::Mother"){ if(!refSystemTransform){ if(m_isTB){ - zTrans = -3700.5*CLHEP::mm; + zTrans = -3700.5*GeoModelKernelUnits::mm; zMSTrans = zTrans; } else { - zTrans = currentRecord->getDouble("ZPLANE") - 3639.5*CLHEP::mm; - zMSTrans = 0.*CLHEP::mm; + zTrans = currentRecord->getDouble("ZPLANE") - 3639.5*GeoModelKernelUnits::mm; + zMSTrans = 0.*GeoModelKernelUnits::mm; } - refSystemTransform = new GeoTransform(HepGeom::TranslateZ3D(zTrans)); + refSystemTransform = new GeoTransform(GeoTrf::TranslateZ3D(zTrans)); } emecMotherShape->addPlane(currentRecord->getDouble("ZPLANE") + zMSTrans, currentRecord->getDouble("RMIN"), @@ -282,8 +283,8 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) if(DB_EmecGeometry->size() == 0){ DB_EmecGeometry = pAccessSvc->getRecordsetPtr("EmecGeometry", "EmecGeometry-00"); } - double zWheelRefPoint = (*DB_EmecGeometry)[0]->getDouble("Z0")*CLHEP::cm; - double LArTotalThickness = (*DB_EmecGeometry)[0]->getDouble("ETOT") *CLHEP::cm; + double zWheelRefPoint = (*DB_EmecGeometry)[0]->getDouble("Z0")*GeoModelKernelUnits::cm; + double LArTotalThickness = (*DB_EmecGeometry)[0]->getDouble("ETOT") *GeoModelKernelUnits::cm; const GeoLogVol* emecMotherLogical = new GeoLogVol(emecMotherName, emecMotherShape, LAr); @@ -310,7 +311,7 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) double zWheelFrontFace = zWheelRefPoint + lwc->GetdWRPtoFrontFace(); GeoPcon* innerShape= new GeoPcon(phiPosition - phiSize, 2.*phiSize); - innerShape->addPlane( 0.*CLHEP::mm, rMinInner[0], rMaxInner[0]); + innerShape->addPlane( 0.*GeoModelKernelUnits::mm, rMinInner[0], rMaxInner[0]); innerShape->addPlane(zBack , rMinInner[1], rMaxInner[1]); GeoLogVol* innerLogical = new GeoLogVol (innerName,innerShape, LAr); @@ -318,7 +319,7 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) emecMotherPhysical->add(new GeoIdentifierTag(1)); emecMotherPhysical->add(refSystemTransform); - emecMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zWheelFrontFace))); + emecMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zWheelFrontFace))); emecMotherPhysical->add(fullPV); StoredPhysVol *sPhysVol = new StoredPhysVol(fullPV); @@ -337,10 +338,10 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) GeoPhysVol* innerAbsorberPhysical = new GeoPhysVol(innerAbsorberLogical); GeoPhysVol* innerElectrodePhysical = new GeoPhysVol(innerElectrodeLogical); fullPV->add(new GeoIdentifierTag(1)); - fullPV->add(new GeoTransform(HepGeom::Transform3D())); + fullPV->add(new GeoTransform(GeoTrf::Transform3D::Identity())); fullPV->add(innerAbsorberPhysical); fullPV->add(new GeoIdentifierTag(1)); - fullPV->add(new GeoTransform(HepGeom::Transform3D())); + fullPV->add(new GeoTransform(GeoTrf::Transform3D::Identity())); fullPV->add(innerElectrodePhysical); if(mlabs > 0){ @@ -352,7 +353,7 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) new GeoLogVol(IGWname, innerGlueShape, Glue); innerGluePhysical = new GeoPhysVol(innerGlueLogical); innerAbsorberPhysical->add(new GeoIdentifierTag(1)); - innerAbsorberPhysical->add(new GeoTransform(HepGeom::Transform3D())); + innerAbsorberPhysical->add(new GeoTransform(GeoTrf::Transform3D::Identity())); innerAbsorberPhysical->add(innerGluePhysical); } @@ -362,7 +363,7 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) new GeoLogVol(ILWname, innerLeadShape, Lead); GeoPhysVol* innerLeadPhysical = new GeoPhysVol(innerLeadLogical); innerGluePhysical->add(new GeoIdentifierTag(1)); - innerGluePhysical->add(new GeoTransform(HepGeom::Transform3D())); + innerGluePhysical->add(new GeoTransform(GeoTrf::Transform3D::Identity())); innerGluePhysical->add(innerLeadPhysical); } @@ -386,7 +387,7 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) double zWheelFrontFace = zWheelRefPoint + lwc->GetdWRPtoFrontFace(); GeoPcon* outerShape= new GeoPcon(phiPosition - phiSize, 2.*phiSize); - outerShape->addPlane( 0.*CLHEP::mm, rMinOuter[0], rMaxOuter[0]); + outerShape->addPlane( 0.*GeoModelKernelUnits::mm, rMinOuter[0], rMaxOuter[0]); outerShape->addPlane( zMid , rMinOuter[1], rMaxOuter[1]); outerShape->addPlane(zBack , rMinOuter[2], rMaxOuter[2]); @@ -395,7 +396,7 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) emecMotherPhysical->add(new GeoIdentifierTag(1)); emecMotherPhysical->add(refSystemTransform); - emecMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zWheelFrontFace))); + emecMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zWheelFrontFace))); emecMotherPhysical->add(fullPV); StoredPhysVol *sPhysVol = new StoredPhysVol(fullPV); @@ -412,10 +413,10 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) GeoPhysVol* outerAbsorberPhysical = new GeoPhysVol(outerAbsorberLogical); GeoPhysVol* outerElectrodePhysical = new GeoPhysVol(outerElectrodeLogical); fullPV->add(new GeoIdentifierTag(1)); - fullPV->add(new GeoTransform(HepGeom::Transform3D())); + fullPV->add(new GeoTransform(GeoTrf::Transform3D::Identity())); fullPV->add(outerAbsorberPhysical); fullPV->add(new GeoIdentifierTag(1)); - fullPV->add(new GeoTransform(HepGeom::Transform3D())); + fullPV->add(new GeoTransform(GeoTrf::Transform3D::Identity())); fullPV->add(outerElectrodePhysical); if(mlabs > 0){ @@ -427,7 +428,7 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) new GeoLogVol(OGWname, outerGlueShape, Glue); outerGluePhysical = new GeoPhysVol(outerGlueLogical); outerAbsorberPhysical->add(new GeoIdentifierTag(1)); - outerAbsorberPhysical->add(new GeoTransform(HepGeom::Transform3D())); + outerAbsorberPhysical->add(new GeoTransform(GeoTrf::Transform3D::Identity())); outerAbsorberPhysical->add(outerGluePhysical); } @@ -437,7 +438,7 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) new GeoLogVol(OLWname, outerLeadShape, Lead); GeoPhysVol* outerLeadPhysical = new GeoPhysVol(outerLeadLogical); outerGluePhysical->add(new GeoIdentifierTag(1)); - outerGluePhysical->add(new GeoTransform(HepGeom::Transform3D())); + outerGluePhysical->add(new GeoTransform(GeoTrf::Transform3D::Identity())); outerGluePhysical->add(outerLeadPhysical); } @@ -470,85 +471,84 @@ GeoFullPhysVol* LArGeo::EMECConstruction::GetEnvelope(bool bPos) if(DB_EMECmn->size() == 0) DB_EMECmn = pAccessSvc->getRecordsetPtr("EmecMagicNumbers","EMECMagigNumbers-00"); - double front_shift = 0.*CLHEP::mm, back_shift = 0.*CLHEP::mm; + double front_shift = 0.*GeoModelKernelUnits::mm, back_shift = 0.*GeoModelKernelUnits::mm; try { for(unsigned int i = 0; i < DMpcons->size(); ++ i){ std::string object = (*DMpcons)[i]->getString("PCONNAME"); if(object == "FrontSupportMother"){ int zplane = (*DMpcons)[i]->getInt("NZPLANE"); - if(zplane == 0) front_shift += (*DMpcons)[i]->getDouble("ZPOS")*CLHEP::mm; - else if(zplane == 1) front_shift -= (*DMpcons)[i]->getDouble("ZPOS")*CLHEP::mm; + if(zplane == 0) front_shift += (*DMpcons)[i]->getDouble("ZPOS")*GeoModelKernelUnits::mm; + else if(zplane == 1) front_shift -= (*DMpcons)[i]->getDouble("ZPOS")*GeoModelKernelUnits::mm; else continue; } else if(object == "BackSupportMother"){ int zplane = (*DMpcons)[i]->getInt("NZPLANE"); - if(zplane == 0) back_shift -= 0.;//(*DMpcons)[i]->getDouble("ZPOS")*CLHEP::mm; - else if(zplane == 1) back_shift += (*DMpcons)[i]->getDouble("ZPOS")*CLHEP::mm; + if(zplane == 0) back_shift -= 0.;//(*DMpcons)[i]->getDouble("ZPOS")*GeoModelKernelUnits::mm; + else if(zplane == 1) back_shift += (*DMpcons)[i]->getDouble("ZPOS")*GeoModelKernelUnits::mm; else continue; } } - double reftoactive = (*DB_EMECmn)[0]->getDouble("REFTOACTIVE")*CLHEP::mm; + double reftoactive = (*DB_EMECmn)[0]->getDouble("REFTOACTIVE")*GeoModelKernelUnits::mm; front_shift += reftoactive; back_shift += LArTotalThickness - reftoactive; } catch (...){ - front_shift = -50.*CLHEP::mm; // start of EMEC envelop in the cryo.(length of env=630.) - back_shift = 580.*CLHEP::mm; + front_shift = -50.*GeoModelKernelUnits::mm; // start of EMEC envelop in the cryo.(length of env=630.) + back_shift = 580.*GeoModelKernelUnits::mm; std::cout << "EMECConstruction: WARNING: cannot get front|back_shift from DB" << std::endl; } //std::cout << "EMECConstruction : " << front_shift << " " << back_shift << std::endl; z0 = zWheelRefPoint + front_shift; EMECSupportConstruction *fsc = 0; - if(m_isTB) fsc = new EMECSupportConstruction(FrontIndx, true, "LAr::EMEC::", CLHEP::halfpi*CLHEP::rad); + if(m_isTB) fsc = new EMECSupportConstruction(FrontIndx, true, "LAr::EMEC::", GeoModelKernelUnits::halfpi*GeoModelKernelUnits::rad); else fsc = new EMECSupportConstruction(FrontIndx); GeoPhysVol* physicalFSM = fsc->GetEnvelope(); - emecMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + emecMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); emecMotherPhysical->add(refSystemTransform); emecMotherPhysical->add(physicalFSM); delete fsc; z0 = zWheelRefPoint + back_shift; // end of EMEC envelop in the cryo. EMECSupportConstruction *bsc = 0; - if(m_isTB) bsc = new EMECSupportConstruction(BackIndx, true, "LAr::EMEC::", CLHEP::halfpi*CLHEP::rad); + if(m_isTB) bsc = new EMECSupportConstruction(BackIndx, true, "LAr::EMEC::", GeoModelKernelUnits::halfpi*GeoModelKernelUnits::rad); else bsc = new EMECSupportConstruction(BackIndx); GeoPhysVol *physicalBSM = bsc->GetEnvelope(); - CLHEP::HepRotation rotBSM; - rotBSM.rotateX(-M_PI); - if(m_isTB) rotBSM.rotateZ(M_PI); // there is an additional rotation for TB, back support only + GeoTrf::Transform3D rotBSM(GeoTrf::RotateX3D(-M_PI)); + if(m_isTB) rotBSM = GeoTrf::RotateZ3D(M_PI)*rotBSM; emecMotherPhysical->add(refSystemTransform); - emecMotherPhysical->add(new GeoTransform(HepGeom::Transform3D(rotBSM,CLHEP::Hep3Vector(0., 0., z0)))); + emecMotherPhysical->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z0)*rotBSM))); emecMotherPhysical->add(physicalBSM); delete bsc; z0 = zWheelRefPoint + LArTotalThickness * 0.5; //dist. to middle of sens vol. along z from WRP EMECSupportConstruction *osc = 0; - if(m_isTB) osc = new EMECSupportConstruction(2, true, "LAr::EMEC::", CLHEP::halfpi*CLHEP::rad); + if(m_isTB) osc = new EMECSupportConstruction(2, true, "LAr::EMEC::", GeoModelKernelUnits::halfpi*GeoModelKernelUnits::rad); else osc = new EMECSupportConstruction(2); GeoPhysVol *physicalOSM = osc->GetEnvelope(); emecMotherPhysical->add(refSystemTransform); - emecMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + emecMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); emecMotherPhysical->add(physicalOSM); delete osc; z0 = zWheelRefPoint + LArTotalThickness * 0.5; EMECSupportConstruction *isc = 0; - if(m_isTB) isc = new EMECSupportConstruction(3, true, "LAr::EMEC::", CLHEP::halfpi*CLHEP::rad); + if(m_isTB) isc = new EMECSupportConstruction(3, true, "LAr::EMEC::", GeoModelKernelUnits::halfpi*GeoModelKernelUnits::rad); else isc = new EMECSupportConstruction(3); GeoPhysVol *physicalISM = isc->GetEnvelope(); emecMotherPhysical->add(refSystemTransform); - emecMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + emecMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); emecMotherPhysical->add(physicalISM); delete isc; z0 = zWheelRefPoint + LArTotalThickness * 0.5; EMECSupportConstruction *msc = 0; - if(m_isTB) msc = new EMECSupportConstruction(4, true, "LAr::EMEC::", CLHEP::halfpi*CLHEP::rad); + if(m_isTB) msc = new EMECSupportConstruction(4, true, "LAr::EMEC::", GeoModelKernelUnits::halfpi*GeoModelKernelUnits::rad); else msc = new EMECSupportConstruction(4); GeoPhysVol *physicalMSM = msc->GetEnvelope(); emecMotherPhysical->add(refSystemTransform); - emecMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + emecMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); emecMotherPhysical->add(physicalMSM); delete msc; } diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECSupportConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECSupportConstruction.cxx index 537bf556ce4..23ebc8306eb 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECSupportConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EMECSupportConstruction.cxx @@ -71,6 +71,8 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -83,8 +85,6 @@ #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" -#include "CLHEP/Geometry/Transform3D.h" - #include "GeoSpecialShapes/LArWheelCalculator.h" #include "LArGeoEndcap/EMECConstruction.h" @@ -110,11 +110,11 @@ EMECSupportConstruction::EMECSupportConstruction } m_PhiStart = 0.; - m_PhiSize = CLHEP::twopi*CLHEP::rad; + m_PhiSize = GeoModelKernelUnits::twopi*GeoModelKernelUnits::rad; if(m_isModule){ - m_PhiStart = m_Position - M_PI*CLHEP::rad / 8.; - m_PhiSize = M_PI*CLHEP::rad / 4.; + m_PhiStart = m_Position - M_PI*GeoModelKernelUnits::rad / 8.; + m_PhiSize = M_PI*GeoModelKernelUnits::rad / 4.; } // Get the materials from the manager @@ -338,24 +338,24 @@ GeoPcon* EMECSupportConstruction::getPcon(std::string id) const } pcone[key] = i; if(key >= 0) ++ nzplanes; - else R0 = (*m_DB_pcons)[i]->getDouble("RMIN")*CLHEP::mm; + else R0 = (*m_DB_pcons)[i]->getDouble("RMIN")*GeoModelKernelUnits::mm; } } if(nzplanes > 0){ zplane.resize(nzplanes); rmin.resize(nzplanes); rmax.resize(nzplanes); for(int n = 0; n < nzplanes; ++ n){ - zplane[n] = (*m_DB_pcons)[pcone[n]]->getDouble("ZPOS")*CLHEP::mm; - rmin[n] = R0 + (*m_DB_pcons)[pcone[n]]->getDouble("RMIN")*CLHEP::mm; - rmax[n] = R0 + (*m_DB_pcons)[pcone[n]]->getDouble("RMAX")*CLHEP::mm; + zplane[n] = (*m_DB_pcons)[pcone[n]]->getDouble("ZPOS")*GeoModelKernelUnits::mm; + rmin[n] = R0 + (*m_DB_pcons)[pcone[n]]->getDouble("RMIN")*GeoModelKernelUnits::mm; + rmax[n] = R0 + (*m_DB_pcons)[pcone[n]]->getDouble("RMAX")*GeoModelKernelUnits::mm; } if(id1 == "FrontSupportMother"){ if(id.find("Inner") != std::string::npos){ zplane.resize(2); rmin.resize(2); rmax.resize(2); - double rlim = getNumber(m_DB_numbers, id, "Inner", 614.)*CLHEP::mm; + double rlim = getNumber(m_DB_numbers, id, "Inner", 614.)*GeoModelKernelUnits::mm; rmax[0] = rlim; rmax[1] = rlim; } else if(id.find("Outer") != std::string::npos){ - double rlim = getNumber(m_DB_numbers, id, "Outer", 603.-1.)*CLHEP::mm; + double rlim = getNumber(m_DB_numbers, id, "Outer", 603.-1.)*GeoModelKernelUnits::mm; rmin[0] = rlim; rmin[1] = rlim; } @@ -363,24 +363,24 @@ GeoPcon* EMECSupportConstruction::getPcon(std::string id) const if(id1 == "BackSupportMother"){ if(id.find("Inner") != std::string::npos){ zplane.resize(2); rmin.resize(2); rmax.resize(2); - double rlim = getNumber(m_DB_numbers, id, "Inner", 699.)*CLHEP::mm; + double rlim = getNumber(m_DB_numbers, id, "Inner", 699.)*GeoModelKernelUnits::mm; rmax[0] = rlim; rmax[1] = rlim; } else if(id.find("Outer") != std::string::npos){ - double rlim = getNumber(m_DB_numbers, id, "Outer", 687.-1.)*CLHEP::mm; + double rlim = getNumber(m_DB_numbers, id, "Outer", 687.-1.)*GeoModelKernelUnits::mm; rmin[0] = rlim; rmin[1] = rlim; } } if(id1 == "Stretchers"){ if(id == "WideStretchers"){ - double dfiWS = 360./3./256.*24.*CLHEP::deg; //this is the design variable for WS + double dfiWS = 360./3./256.*24.*GeoModelKernelUnits::deg; //this is the design variable for WS phi_start = m_Position - dfiWS*0.5; phi_size = dfiWS; } if(id == "NarrowStretchers"){ - double lengthNS = getNumber(m_DB_numbers, id, "Width", 200.)*CLHEP::mm; // transversal length of NS - double dfiNS = lengthNS / rmax[0] * CLHEP::rad; + double lengthNS = getNumber(m_DB_numbers, id, "Width", 200.)*GeoModelKernelUnits::mm; // transversal length of NS + double dfiNS = lengthNS / rmax[0] * GeoModelKernelUnits::rad; phi_start = m_Position - dfiNS*0.5; phi_size = dfiNS; } @@ -395,42 +395,42 @@ for(int i = 0; i < nzplanes; ++ i){ } else { if(id.find("FrontSupportMother") == 0){ zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 0. *CLHEP::mm; rmin[0] = 292.*CLHEP::mm-1.*CLHEP::mm; rmax[0] = 2077.*CLHEP::mm-7.*CLHEP::mm; - zplane[1] = 61. *CLHEP::mm; rmin[1] = 292.*CLHEP::mm-1.*CLHEP::mm; rmax[1] = 2077.*CLHEP::mm-7.*CLHEP::mm; - zplane[2] = 61. *CLHEP::mm; rmin[2] = 2023.*CLHEP::mm-7.*CLHEP::mm; rmax[2] = 2077.*CLHEP::mm-7.*CLHEP::mm; - zplane[3] = 72.3*CLHEP::mm; rmin[3] = 2023.*CLHEP::mm-7.*CLHEP::mm; rmax[3] = 2077.*CLHEP::mm-7.*CLHEP::mm; - zplane[4] = 124.2*CLHEP::mm; rmin[4] = 2051.*CLHEP::mm-7.*CLHEP::mm; rmax[4] = 2077.*CLHEP::mm-7.*CLHEP::mm; - zplane[5] = 153. *CLHEP::mm; rmin[5] = 2051.*CLHEP::mm-7.*CLHEP::mm; rmax[5] = 2077.*CLHEP::mm-7.*CLHEP::mm; + zplane[0] = 0. *GeoModelKernelUnits::mm; rmin[0] = 292.*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; rmax[0] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; + zplane[1] = 61. *GeoModelKernelUnits::mm; rmin[1] = 292.*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; rmax[1] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; + zplane[2] = 61. *GeoModelKernelUnits::mm; rmin[2] = 2023.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; rmax[2] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; + zplane[3] = 72.3*GeoModelKernelUnits::mm; rmin[3] = 2023.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; rmax[3] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; + zplane[4] = 124.2*GeoModelKernelUnits::mm; rmin[4] = 2051.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; rmax[4] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; + zplane[5] = 153. *GeoModelKernelUnits::mm; rmin[5] = 2051.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; rmax[5] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; if(id == "FrontSupportMother::Outer"){ - rmin[0] = 603.*CLHEP::mm-1.*CLHEP::mm; - rmin[1] = 603.*CLHEP::mm-1.*CLHEP::mm; + rmin[0] = 603.*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; + rmin[1] = 603.*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; } if(id == "FrontSupportMother::Inner"){ zplane.resize(2); rmin.resize(2); rmax.resize(2); - rmax[0] = 614.*CLHEP::mm; - rmax[1] = 614.*CLHEP::mm; + rmax[0] = 614.*GeoModelKernelUnits::mm; + rmax[1] = 614.*GeoModelKernelUnits::mm; } } else if(id.find("BackSupportMother") == 0){ zplane.resize(4); rmin.resize(4); rmax.resize(4); - zplane[0] = 0.001*CLHEP::mm; rmin[0] = 333.*CLHEP::mm-1.*CLHEP::mm; rmax[0] = 2077.*CLHEP::mm-7.*CLHEP::mm; - zplane[1] = 55. *CLHEP::mm; rmin[1] = 333.*CLHEP::mm-1.*CLHEP::mm; rmax[1] = 2077.*CLHEP::mm-7.*CLHEP::mm; - zplane[2] = 55. *CLHEP::mm; rmin[2] = 2051.*CLHEP::mm-7.*CLHEP::mm; rmax[2] = 2077.*CLHEP::mm-7.*CLHEP::mm; - zplane[3] = 147. *CLHEP::mm; rmin[3] = 2051.*CLHEP::mm-7.*CLHEP::mm; rmax[3] = 2077.*CLHEP::mm-7.*CLHEP::mm; + zplane[0] = 0.001*GeoModelKernelUnits::mm; rmin[0] = 333.*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; rmax[0] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; + zplane[1] = 55. *GeoModelKernelUnits::mm; rmin[1] = 333.*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; rmax[1] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; + zplane[2] = 55. *GeoModelKernelUnits::mm; rmin[2] = 2051.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; rmax[2] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; + zplane[3] = 147. *GeoModelKernelUnits::mm; rmin[3] = 2051.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; rmax[3] = 2077.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; if(id == "BackSupportMother::Outer"){ - rmin[0] = 687.*CLHEP::mm-1.*CLHEP::mm; - rmin[1] = 687.*CLHEP::mm-1.*CLHEP::mm; + rmin[0] = 687.*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; + rmin[1] = 687.*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; } if(id == "BackSupportMother::Inner"){ zplane.resize(2); rmin.resize(2); rmax.resize(2); - rmax[0] = 699.*CLHEP::mm; - rmax[1] = 699.*CLHEP::mm; + rmax[0] = 699.*GeoModelKernelUnits::mm; + rmax[1] = 699.*GeoModelKernelUnits::mm; } } else if(id == "WideStretchers" || id == "NarrowStretchers"){ - double dzS = 165.*CLHEP::mm; - double dznotch = 10.*CLHEP::mm; // half z extent of the notch - double drnotch = 6.5*CLHEP::mm; // deepness of the noth in radial direction - double rmaxS = (2077. - 7.)*CLHEP::mm;//ROuter+116. // -7 for cold - double rminS = rmaxS - 26.*CLHEP::mm; + double dzS = 165.*GeoModelKernelUnits::mm; + double dznotch = 10.*GeoModelKernelUnits::mm; // half z extent of the notch + double drnotch = 6.5*GeoModelKernelUnits::mm; // deepness of the noth in radial direction + double rmaxS = (2077. - 7.)*GeoModelKernelUnits::mm;//ROuter+116. // -7 for cold + double rminS = rmaxS - 26.*GeoModelKernelUnits::mm; double rmidS = rminS + drnotch; zplane.resize(6); rmin.resize(6); rmax.resize(6); zplane[0] = -dzS ; rmin[0] = rminS; rmax[0] = rmaxS; @@ -440,22 +440,22 @@ for(int i = 0; i < nzplanes; ++ i){ zplane[4] = dznotch; rmin[4] = rminS; rmax[4] = rmaxS; zplane[5] = dzS ; rmin[5] = rminS; rmax[5] = rmaxS; if(id == "WideStretchers"){ - double dfiWS = 360./3./256.*24.*CLHEP::deg; //this is the design variable for WS + double dfiWS = 360./3./256.*24.*GeoModelKernelUnits::deg; //this is the design variable for WS phi_start = m_Position - dfiWS*0.5; phi_size = dfiWS; } if(id == "NarrowStretchers"){ - double lengthNS = 200.*CLHEP::mm; // transversal length of NS - double dfiNS = lengthNS / rmaxS * CLHEP::rad; + double lengthNS = 200.*GeoModelKernelUnits::mm; // transversal length of NS + double dfiNS = lengthNS / rmaxS * GeoModelKernelUnits::rad; phi_start = m_Position - dfiNS*0.5; phi_size = dfiNS; } } else if(id == "OuterSupportMother"){ - double dzS = 165.*CLHEP::mm; - double rmaxS = (2077. - 7.)*CLHEP::mm;//ROuter+116. // -7 for cold - double rminOTB = (2034. + 2.)*CLHEP::mm; - double rmaxOTB = rminOTB + 3.*CLHEP::mm; - double dzOTB = 201.*CLHEP::mm; + double dzS = 165.*GeoModelKernelUnits::mm; + double rmaxS = (2077. - 7.)*GeoModelKernelUnits::mm;//ROuter+116. // -7 for cold + double rminOTB = (2034. + 2.)*GeoModelKernelUnits::mm; + double rmaxOTB = rminOTB + 3.*GeoModelKernelUnits::mm; + double dzOTB = 201.*GeoModelKernelUnits::mm; zplane.resize(6); rmin.resize(6); rmax.resize(6); zplane[0] = -dzOTB ; rmin[0] = rminOTB; rmax[0] = rmaxOTB; zplane[1] = -dzS; rmin[1] = rminOTB; rmax[1] = rmaxOTB; @@ -464,176 +464,176 @@ for(int i = 0; i < nzplanes; ++ i){ zplane[4] = dzS; rmin[4] = rminOTB; rmax[4] = rmaxOTB; zplane[5] = dzOTB ; rmin[5] = rminOTB; rmax[5] = rmaxOTB; } else if(id == "FrontMiddleRing"){ - double r0 =614.*CLHEP::mm-2.*CLHEP::mm ; // RMiddle=middle radius of the ring + double r0 =614.*GeoModelKernelUnits::mm-2.*GeoModelKernelUnits::mm ; // RMiddle=middle radius of the ring zplane.resize(4); rmin.resize(4); rmax.resize(4); - zplane[0] = 0. *CLHEP::mm; rmin[0] = r0 - 57.*CLHEP::mm; rmax[0] = r0 + 57.*CLHEP::mm; - zplane[1] = 27.5*CLHEP::mm; rmin[1] = r0 - 57.*CLHEP::mm; rmax[1] = r0 + 57.*CLHEP::mm; - zplane[2] = 27.5*CLHEP::mm; rmin[2] = r0 - 40.*CLHEP::mm; rmax[2] = r0 + 40.*CLHEP::mm; - zplane[3] = 59. *CLHEP::mm; rmin[3] = r0 - 40.*CLHEP::mm; rmax[3] = r0 + 40.*CLHEP::mm; + zplane[0] = 0. *GeoModelKernelUnits::mm; rmin[0] = r0 - 57.*GeoModelKernelUnits::mm; rmax[0] = r0 + 57.*GeoModelKernelUnits::mm; + zplane[1] = 27.5*GeoModelKernelUnits::mm; rmin[1] = r0 - 57.*GeoModelKernelUnits::mm; rmax[1] = r0 + 57.*GeoModelKernelUnits::mm; + zplane[2] = 27.5*GeoModelKernelUnits::mm; rmin[2] = r0 - 40.*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.*GeoModelKernelUnits::mm; + zplane[3] = 59. *GeoModelKernelUnits::mm; rmin[3] = r0 - 40.*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.*GeoModelKernelUnits::mm; } else if(id == "FrontMiddleRing::LowerHole"){ - double r0 = 614.*CLHEP::mm-2.*CLHEP::mm; // RMiddle=middle radius of the ring + double r0 = 614.*GeoModelKernelUnits::mm-2.*GeoModelKernelUnits::mm; // RMiddle=middle radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 23. *CLHEP::mm; rmin[0] = r0 - 28.3*CLHEP::mm; rmax[0] = r0 - 8.*CLHEP::mm; - zplane[1] = 27.5*CLHEP::mm; rmin[1] = r0 - 28.3*CLHEP::mm; rmax[1] = r0 - 8.*CLHEP::mm; - zplane[2] = 27.5*CLHEP::mm; rmin[2] = r0 - 40. *CLHEP::mm; rmax[2] = r0 - 8.*CLHEP::mm; - zplane[3] = 48.5*CLHEP::mm; rmin[3] = r0 - 40. *CLHEP::mm; rmax[3] = r0 - 8.*CLHEP::mm; - zplane[4] = 48.5*CLHEP::mm; rmin[4] = r0 - 28.3*CLHEP::mm; rmax[4] = r0 - 8.*CLHEP::mm; - zplane[5] = 53. *CLHEP::mm; rmin[5] = r0 - 28.3*CLHEP::mm; rmax[5] = r0 - 8.*CLHEP::mm; + zplane[0] = 23. *GeoModelKernelUnits::mm; rmin[0] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[0] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[1] = 27.5*GeoModelKernelUnits::mm; rmin[1] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[1] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[2] = 27.5*GeoModelKernelUnits::mm; rmin[2] = r0 - 40. *GeoModelKernelUnits::mm; rmax[2] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[3] = 48.5*GeoModelKernelUnits::mm; rmin[3] = r0 - 40. *GeoModelKernelUnits::mm; rmax[3] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[4] = 48.5*GeoModelKernelUnits::mm; rmin[4] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[4] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[5] = 53. *GeoModelKernelUnits::mm; rmin[5] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[5] = r0 - 8.*GeoModelKernelUnits::mm; } else if(id == "FrontMiddleRing::LowerGTen"){ - double r0 = 614.*CLHEP::mm - 2.*CLHEP::mm; // RMiddle=middle radius of the ring + double r0 = 614.*GeoModelKernelUnits::mm - 2.*GeoModelKernelUnits::mm; // RMiddle=middle radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 23.*CLHEP::mm; rmin[0] = r0 - 28.*CLHEP::mm; rmax[0] = r0 - 8.*CLHEP::mm; - zplane[1] = 28.*CLHEP::mm; rmin[1] = r0 - 28.*CLHEP::mm; rmax[1] = r0 - 8.*CLHEP::mm; - zplane[2] = 28.*CLHEP::mm; rmin[2] = r0 - 40.*CLHEP::mm; rmax[2] = r0 - 8.*CLHEP::mm; - zplane[3] = 48.*CLHEP::mm; rmin[3] = r0 - 40.*CLHEP::mm; rmax[3] = r0 - 8.*CLHEP::mm; - zplane[4] = 48.*CLHEP::mm; rmin[4] = r0 - 28.*CLHEP::mm; rmax[4] = r0 - 8.*CLHEP::mm; - zplane[5] = 53.*CLHEP::mm; rmin[5] = r0 - 28.*CLHEP::mm; rmax[5] = r0 - 8.*CLHEP::mm; + zplane[0] = 23.*GeoModelKernelUnits::mm; rmin[0] = r0 - 28.*GeoModelKernelUnits::mm; rmax[0] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[1] = 28.*GeoModelKernelUnits::mm; rmin[1] = r0 - 28.*GeoModelKernelUnits::mm; rmax[1] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[2] = 28.*GeoModelKernelUnits::mm; rmin[2] = r0 - 40.*GeoModelKernelUnits::mm; rmax[2] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[3] = 48.*GeoModelKernelUnits::mm; rmin[3] = r0 - 40.*GeoModelKernelUnits::mm; rmax[3] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[4] = 48.*GeoModelKernelUnits::mm; rmin[4] = r0 - 28.*GeoModelKernelUnits::mm; rmax[4] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[5] = 53.*GeoModelKernelUnits::mm; rmin[5] = r0 - 28.*GeoModelKernelUnits::mm; rmax[5] = r0 - 8.*GeoModelKernelUnits::mm; } else if(id == "FrontMiddleRing::UpperHole"){ - double r0 =614.*CLHEP::mm-2.*CLHEP::mm ; // RMiddle=middle radius of the ring + double r0 =614.*GeoModelKernelUnits::mm-2.*GeoModelKernelUnits::mm ; // RMiddle=middle radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 23. *CLHEP::mm; rmin[0] = r0 + 8.*CLHEP::mm; rmax[0] = r0 + 28.3*CLHEP::mm; - zplane[1] = 27.5*CLHEP::mm; rmin[1] = r0 + 8.*CLHEP::mm; rmax[1] = r0 + 28.3*CLHEP::mm; - zplane[2] = 27.5*CLHEP::mm; rmin[2] = r0 + 8.*CLHEP::mm; rmax[2] = r0 + 40. *CLHEP::mm; - zplane[3] = 48.5*CLHEP::mm; rmin[3] = r0 + 8.*CLHEP::mm; rmax[3] = r0 + 40. *CLHEP::mm; - zplane[4] = 48.5*CLHEP::mm; rmin[4] = r0 + 8.*CLHEP::mm; rmax[4] = r0 + 28.3*CLHEP::mm; - zplane[5] = 53. *CLHEP::mm; rmin[5] = r0 + 8.*CLHEP::mm; rmax[5] = r0 + 28.3*CLHEP::mm; + zplane[0] = 23. *GeoModelKernelUnits::mm; rmin[0] = r0 + 8.*GeoModelKernelUnits::mm; rmax[0] = r0 + 28.3*GeoModelKernelUnits::mm; + zplane[1] = 27.5*GeoModelKernelUnits::mm; rmin[1] = r0 + 8.*GeoModelKernelUnits::mm; rmax[1] = r0 + 28.3*GeoModelKernelUnits::mm; + zplane[2] = 27.5*GeoModelKernelUnits::mm; rmin[2] = r0 + 8.*GeoModelKernelUnits::mm; rmax[2] = r0 + 40. *GeoModelKernelUnits::mm; + zplane[3] = 48.5*GeoModelKernelUnits::mm; rmin[3] = r0 + 8.*GeoModelKernelUnits::mm; rmax[3] = r0 + 40. *GeoModelKernelUnits::mm; + zplane[4] = 48.5*GeoModelKernelUnits::mm; rmin[4] = r0 + 8.*GeoModelKernelUnits::mm; rmax[4] = r0 + 28.3*GeoModelKernelUnits::mm; + zplane[5] = 53. *GeoModelKernelUnits::mm; rmin[5] = r0 + 8.*GeoModelKernelUnits::mm; rmax[5] = r0 + 28.3*GeoModelKernelUnits::mm; } else if(id == "FrontMiddleRing::UpperGTen"){ - double r0 =614.*CLHEP::mm-2.*CLHEP::mm ; // RMiddle=middle radius of the ring + double r0 =614.*GeoModelKernelUnits::mm-2.*GeoModelKernelUnits::mm ; // RMiddle=middle radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 23.*CLHEP::mm; rmin[0] = r0 + 8.*CLHEP::mm; rmax[0] = r0 + 28.*CLHEP::mm; - zplane[1] = 28.*CLHEP::mm; rmin[1] = r0 + 8.*CLHEP::mm; rmax[1] = r0 + 28.*CLHEP::mm; - zplane[2] = 28.*CLHEP::mm; rmin[2] = r0 + 8.*CLHEP::mm; rmax[2] = r0 + 40.*CLHEP::mm; - zplane[3] = 48.*CLHEP::mm; rmin[3] = r0 + 8.*CLHEP::mm; rmax[3] = r0 + 40.*CLHEP::mm; - zplane[4] = 48.*CLHEP::mm; rmin[4] = r0 + 8.*CLHEP::mm; rmax[4] = r0 + 28.*CLHEP::mm; - zplane[5] = 53.*CLHEP::mm; rmin[5] = r0 + 8.*CLHEP::mm; rmax[5] = r0 + 28.*CLHEP::mm; + zplane[0] = 23.*GeoModelKernelUnits::mm; rmin[0] = r0 + 8.*GeoModelKernelUnits::mm; rmax[0] = r0 + 28.*GeoModelKernelUnits::mm; + zplane[1] = 28.*GeoModelKernelUnits::mm; rmin[1] = r0 + 8.*GeoModelKernelUnits::mm; rmax[1] = r0 + 28.*GeoModelKernelUnits::mm; + zplane[2] = 28.*GeoModelKernelUnits::mm; rmin[2] = r0 + 8.*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.*GeoModelKernelUnits::mm; + zplane[3] = 48.*GeoModelKernelUnits::mm; rmin[3] = r0 + 8.*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.*GeoModelKernelUnits::mm; + zplane[4] = 48.*GeoModelKernelUnits::mm; rmin[4] = r0 + 8.*GeoModelKernelUnits::mm; rmax[4] = r0 + 28.*GeoModelKernelUnits::mm; + zplane[5] = 53.*GeoModelKernelUnits::mm; rmin[5] = r0 + 8.*GeoModelKernelUnits::mm; rmax[5] = r0 + 28.*GeoModelKernelUnits::mm; } else if(id == "FrontInnerRing"){ - double r0 = 335.5*CLHEP::mm-1.*CLHEP::mm; // RInner = reference radius of the inner ring + double r0 = 335.5*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; // RInner = reference radius of the inner ring zplane.resize(5); rmin.resize(5); rmax.resize(5); - zplane[0] = 0. *CLHEP::mm; rmin[0] = r0 - 22.5*CLHEP::mm; rmax[0] = r0 + 51.5*CLHEP::mm; - zplane[1] = 6. *CLHEP::mm; rmin[1] = r0 - 28.5*CLHEP::mm; rmax[1] = r0 + 51.5*CLHEP::mm; - zplane[2] = 27.5*CLHEP::mm; rmin[2] = r0 - 28.5*CLHEP::mm; rmax[2] = r0 + 51.5*CLHEP::mm; - zplane[3] = 27.5*CLHEP::mm; rmin[3] = r0 - 43.5*CLHEP::mm; rmax[3] = r0 + 40.5*CLHEP::mm; - zplane[4] = 59. *CLHEP::mm; rmin[4] = r0 - 43.5*CLHEP::mm; rmax[4] = r0 + 40.5*CLHEP::mm; + zplane[0] = 0. *GeoModelKernelUnits::mm; rmin[0] = r0 - 22.5*GeoModelKernelUnits::mm; rmax[0] = r0 + 51.5*GeoModelKernelUnits::mm; + zplane[1] = 6. *GeoModelKernelUnits::mm; rmin[1] = r0 - 28.5*GeoModelKernelUnits::mm; rmax[1] = r0 + 51.5*GeoModelKernelUnits::mm; + zplane[2] = 27.5*GeoModelKernelUnits::mm; rmin[2] = r0 - 28.5*GeoModelKernelUnits::mm; rmax[2] = r0 + 51.5*GeoModelKernelUnits::mm; + zplane[3] = 27.5*GeoModelKernelUnits::mm; rmin[3] = r0 - 43.5*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[4] = 59. *GeoModelKernelUnits::mm; rmin[4] = r0 - 43.5*GeoModelKernelUnits::mm; rmax[4] = r0 + 40.5*GeoModelKernelUnits::mm; } else if(id == "FrontInnerRing::Hole"){ - double r0 = 335.5*CLHEP::mm-1.*CLHEP::mm; // RInner = reference radius of the inner ring + double r0 = 335.5*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; // RInner = reference radius of the inner ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 23. *CLHEP::mm; rmin[0] = r0 + 6.5*CLHEP::mm; rmax[0] = r0 + 29.5*CLHEP::mm; - zplane[1] = 27.5*CLHEP::mm; rmin[1] = r0 + 6.5*CLHEP::mm; rmax[1] = r0 + 29.5*CLHEP::mm; - zplane[2] = 27.5*CLHEP::mm; rmin[2] = r0 + 6.5*CLHEP::mm; rmax[2] = r0 + 40.5*CLHEP::mm; - zplane[3] = 48.5*CLHEP::mm; rmin[3] = r0 + 6.5*CLHEP::mm; rmax[3] = r0 + 40.5*CLHEP::mm; - zplane[4] = 48.5*CLHEP::mm; rmin[4] = r0 + 6.5*CLHEP::mm; rmax[4] = r0 + 29.5*CLHEP::mm; - zplane[5] = 53. *CLHEP::mm; rmin[5] = r0 + 6.5*CLHEP::mm; rmax[5] = r0 + 29.5*CLHEP::mm; + zplane[0] = 23. *GeoModelKernelUnits::mm; rmin[0] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[0] = r0 + 29.5*GeoModelKernelUnits::mm; + zplane[1] = 27.5*GeoModelKernelUnits::mm; rmin[1] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[1] = r0 + 29.5*GeoModelKernelUnits::mm; + zplane[2] = 27.5*GeoModelKernelUnits::mm; rmin[2] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[3] = 48.5*GeoModelKernelUnits::mm; rmin[3] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[4] = 48.5*GeoModelKernelUnits::mm; rmin[4] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[4] = r0 + 29.5*GeoModelKernelUnits::mm; + zplane[5] = 53. *GeoModelKernelUnits::mm; rmin[5] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[5] = r0 + 29.5*GeoModelKernelUnits::mm; } else if(id == "FrontInnerRing::GTen"){ - double r0 = 335.5*CLHEP::mm-1.*CLHEP::mm; // RInner = reference radius of the inner ring + double r0 = 335.5*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; // RInner = reference radius of the inner ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 23.*CLHEP::mm; rmin[0] = r0 + 8.5*CLHEP::mm; rmax[0] = r0 + 28.5*CLHEP::mm; - zplane[1] = 28.*CLHEP::mm; rmin[1] = r0 + 8.5*CLHEP::mm; rmax[1] = r0 + 28.5*CLHEP::mm; - zplane[2] = 28.*CLHEP::mm; rmin[2] = r0 + 8.5*CLHEP::mm; rmax[2] = r0 + 40.5*CLHEP::mm; - zplane[3] = 48.*CLHEP::mm; rmin[3] = r0 + 8.5*CLHEP::mm; rmax[3] = r0 + 40.5*CLHEP::mm; - zplane[4] = 48.*CLHEP::mm; rmin[4] = r0 + 8.5*CLHEP::mm; rmax[4] = r0 + 28.5*CLHEP::mm; - zplane[5] = 53.*CLHEP::mm; rmin[5] = r0 + 8.5*CLHEP::mm; rmax[5] = r0 + 28.5*CLHEP::mm; + zplane[0] = 23.*GeoModelKernelUnits::mm; rmin[0] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[0] = r0 + 28.5*GeoModelKernelUnits::mm; + zplane[1] = 28.*GeoModelKernelUnits::mm; rmin[1] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[1] = r0 + 28.5*GeoModelKernelUnits::mm; + zplane[2] = 28.*GeoModelKernelUnits::mm; rmin[2] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[3] = 48.*GeoModelKernelUnits::mm; rmin[3] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[4] = 48.*GeoModelKernelUnits::mm; rmin[4] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[4] = r0 + 28.5*GeoModelKernelUnits::mm; + zplane[5] = 53.*GeoModelKernelUnits::mm; rmin[5] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[5] = r0 + 28.5*GeoModelKernelUnits::mm; } else if(id == "BackMiddleRing"){ - double r0 = 699.*CLHEP::mm-2.5*CLHEP::mm; // RMiddle radius of the ring + double r0 = 699.*GeoModelKernelUnits::mm-2.5*GeoModelKernelUnits::mm; // RMiddle radius of the ring zplane.resize(4); rmin.resize(4); rmax.resize(4); - zplane[0] = 0. *CLHEP::mm; rmin[0] = r0 - 57.*CLHEP::mm; rmax[0] = r0 + 57.*CLHEP::mm; - zplane[1] = 21. *CLHEP::mm; rmin[1] = r0 - 57.*CLHEP::mm; rmax[1] = r0 + 57.*CLHEP::mm; - zplane[2] = 21. *CLHEP::mm; rmin[2] = r0 - 40.*CLHEP::mm; rmax[2] = r0 + 40.*CLHEP::mm; - zplane[3] = 52.5*CLHEP::mm; rmin[3] = r0 - 40.*CLHEP::mm; rmax[3] = r0 + 40.*CLHEP::mm; + zplane[0] = 0. *GeoModelKernelUnits::mm; rmin[0] = r0 - 57.*GeoModelKernelUnits::mm; rmax[0] = r0 + 57.*GeoModelKernelUnits::mm; + zplane[1] = 21. *GeoModelKernelUnits::mm; rmin[1] = r0 - 57.*GeoModelKernelUnits::mm; rmax[1] = r0 + 57.*GeoModelKernelUnits::mm; + zplane[2] = 21. *GeoModelKernelUnits::mm; rmin[2] = r0 - 40.*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.*GeoModelKernelUnits::mm; + zplane[3] = 52.5*GeoModelKernelUnits::mm; rmin[3] = r0 - 40.*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.*GeoModelKernelUnits::mm; } else if(id == "BackMiddleRing::LowerHole"){ - double r0 = 699.*CLHEP::mm-2.5*CLHEP::mm; // RMiddle radius of the ring + double r0 = 699.*GeoModelKernelUnits::mm-2.5*GeoModelKernelUnits::mm; // RMiddle radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 16.5*CLHEP::mm; rmin[0] = r0 - 28.3*CLHEP::mm; rmax[0] = r0 - 8.*CLHEP::mm; - zplane[1] = 21. *CLHEP::mm; rmin[1] = r0 - 28.3*CLHEP::mm; rmax[1] = r0 - 8.*CLHEP::mm; - zplane[2] = 21. *CLHEP::mm; rmin[2] = r0 - 40. *CLHEP::mm; rmax[2] = r0 - 8.*CLHEP::mm; - zplane[3] = 42. *CLHEP::mm; rmin[3] = r0 - 40. *CLHEP::mm; rmax[3] = r0 - 8.*CLHEP::mm; - zplane[4] = 42. *CLHEP::mm; rmin[4] = r0 - 28.3*CLHEP::mm; rmax[4] = r0 - 8.*CLHEP::mm; -// zplane[5] = 56.5*CLHEP::mm; rmin[5] = r0 - 28.3*CLHEP::mm; rmax[5] = r0 - 8.*CLHEP::mm; - zplane[5] = 46.5*CLHEP::mm; rmin[5] = r0 - 28.3*CLHEP::mm; rmax[5] = r0 - 8.*CLHEP::mm; + zplane[0] = 16.5*GeoModelKernelUnits::mm; rmin[0] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[0] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[1] = 21. *GeoModelKernelUnits::mm; rmin[1] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[1] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[2] = 21. *GeoModelKernelUnits::mm; rmin[2] = r0 - 40. *GeoModelKernelUnits::mm; rmax[2] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[3] = 42. *GeoModelKernelUnits::mm; rmin[3] = r0 - 40. *GeoModelKernelUnits::mm; rmax[3] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[4] = 42. *GeoModelKernelUnits::mm; rmin[4] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[4] = r0 - 8.*GeoModelKernelUnits::mm; +// zplane[5] = 56.5*GeoModelKernelUnits::mm; rmin[5] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[5] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[5] = 46.5*GeoModelKernelUnits::mm; rmin[5] = r0 - 28.3*GeoModelKernelUnits::mm; rmax[5] = r0 - 8.*GeoModelKernelUnits::mm; } else if(id == "BackMiddleRing::LowerGTen"){ - double r0 = 699.*CLHEP::mm-2.5*CLHEP::mm; // RMiddle radius of the ring + double r0 = 699.*GeoModelKernelUnits::mm-2.5*GeoModelKernelUnits::mm; // RMiddle radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 16.5*CLHEP::mm; rmin[0] = r0 - 28.*CLHEP::mm; rmax[0] = r0 - 8.*CLHEP::mm; - zplane[1] = 21.5*CLHEP::mm; rmin[1] = r0 - 28.*CLHEP::mm; rmax[1] = r0 - 8.*CLHEP::mm; - zplane[2] = 21.5*CLHEP::mm; rmin[2] = r0 - 40.*CLHEP::mm; rmax[2] = r0 - 8.*CLHEP::mm; - zplane[3] = 41.5*CLHEP::mm; rmin[3] = r0 - 40.*CLHEP::mm; rmax[3] = r0 - 8.*CLHEP::mm; - zplane[4] = 41.5*CLHEP::mm; rmin[4] = r0 - 28.*CLHEP::mm; rmax[4] = r0 - 8.*CLHEP::mm; - zplane[5] = 46.5*CLHEP::mm; rmin[5] = r0 - 28.*CLHEP::mm; rmax[5] = r0 - 8.*CLHEP::mm; + zplane[0] = 16.5*GeoModelKernelUnits::mm; rmin[0] = r0 - 28.*GeoModelKernelUnits::mm; rmax[0] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[1] = 21.5*GeoModelKernelUnits::mm; rmin[1] = r0 - 28.*GeoModelKernelUnits::mm; rmax[1] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[2] = 21.5*GeoModelKernelUnits::mm; rmin[2] = r0 - 40.*GeoModelKernelUnits::mm; rmax[2] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[3] = 41.5*GeoModelKernelUnits::mm; rmin[3] = r0 - 40.*GeoModelKernelUnits::mm; rmax[3] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[4] = 41.5*GeoModelKernelUnits::mm; rmin[4] = r0 - 28.*GeoModelKernelUnits::mm; rmax[4] = r0 - 8.*GeoModelKernelUnits::mm; + zplane[5] = 46.5*GeoModelKernelUnits::mm; rmin[5] = r0 - 28.*GeoModelKernelUnits::mm; rmax[5] = r0 - 8.*GeoModelKernelUnits::mm; } else if(id == "BackMiddleRing::UpperHole"){ - double r0 = 699.*CLHEP::mm-2.5*CLHEP::mm; // RMiddle radius of the ring + double r0 = 699.*GeoModelKernelUnits::mm-2.5*GeoModelKernelUnits::mm; // RMiddle radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 16.5*CLHEP::mm; rmin[0] = r0 + 8.*CLHEP::mm; rmax[0] = r0 + 28.3*CLHEP::mm; - zplane[1] = 21. *CLHEP::mm; rmin[1] = r0 + 8.*CLHEP::mm; rmax[1] = r0 + 28.3*CLHEP::mm; - zplane[2] = 21. *CLHEP::mm; rmin[2] = r0 + 8.*CLHEP::mm; rmax[2] = r0 + 40. *CLHEP::mm; - zplane[3] = 42. *CLHEP::mm; rmin[3] = r0 + 8.*CLHEP::mm; rmax[3] = r0 + 40. *CLHEP::mm; - zplane[4] = 42. *CLHEP::mm; rmin[4] = r0 + 8.*CLHEP::mm; rmax[4] = r0 + 28.3*CLHEP::mm; - zplane[5] = 46.5*CLHEP::mm; rmin[5] = r0 + 8.*CLHEP::mm; rmax[5] = r0 + 28.3*CLHEP::mm; + zplane[0] = 16.5*GeoModelKernelUnits::mm; rmin[0] = r0 + 8.*GeoModelKernelUnits::mm; rmax[0] = r0 + 28.3*GeoModelKernelUnits::mm; + zplane[1] = 21. *GeoModelKernelUnits::mm; rmin[1] = r0 + 8.*GeoModelKernelUnits::mm; rmax[1] = r0 + 28.3*GeoModelKernelUnits::mm; + zplane[2] = 21. *GeoModelKernelUnits::mm; rmin[2] = r0 + 8.*GeoModelKernelUnits::mm; rmax[2] = r0 + 40. *GeoModelKernelUnits::mm; + zplane[3] = 42. *GeoModelKernelUnits::mm; rmin[3] = r0 + 8.*GeoModelKernelUnits::mm; rmax[3] = r0 + 40. *GeoModelKernelUnits::mm; + zplane[4] = 42. *GeoModelKernelUnits::mm; rmin[4] = r0 + 8.*GeoModelKernelUnits::mm; rmax[4] = r0 + 28.3*GeoModelKernelUnits::mm; + zplane[5] = 46.5*GeoModelKernelUnits::mm; rmin[5] = r0 + 8.*GeoModelKernelUnits::mm; rmax[5] = r0 + 28.3*GeoModelKernelUnits::mm; } else if(id == "BackMiddleRing::UpperGTen"){ - double r0 = 699.*CLHEP::mm-2.5*CLHEP::mm; // RMiddle radius of the ring + double r0 = 699.*GeoModelKernelUnits::mm-2.5*GeoModelKernelUnits::mm; // RMiddle radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 16.5*CLHEP::mm; rmin[0] = r0 + 8.*CLHEP::mm; rmax[0] = r0 + 28.*CLHEP::mm; - zplane[1] = 21.5*CLHEP::mm; rmin[1] = r0 + 8.*CLHEP::mm; rmax[1] = r0 + 28.*CLHEP::mm; - zplane[2] = 21.5*CLHEP::mm; rmin[2] = r0 + 8.*CLHEP::mm; rmax[2] = r0 + 40.*CLHEP::mm; - zplane[3] = 41.5*CLHEP::mm; rmin[3] = r0 + 8.*CLHEP::mm; rmax[3] = r0 + 40.*CLHEP::mm; - zplane[4] = 41.5*CLHEP::mm; rmin[4] = r0 + 8.*CLHEP::mm; rmax[4] = r0 + 28.*CLHEP::mm; - zplane[5] = 46.5*CLHEP::mm; rmin[5] = r0 + 8.*CLHEP::mm; rmax[5] = r0 + 28.*CLHEP::mm; + zplane[0] = 16.5*GeoModelKernelUnits::mm; rmin[0] = r0 + 8.*GeoModelKernelUnits::mm; rmax[0] = r0 + 28.*GeoModelKernelUnits::mm; + zplane[1] = 21.5*GeoModelKernelUnits::mm; rmin[1] = r0 + 8.*GeoModelKernelUnits::mm; rmax[1] = r0 + 28.*GeoModelKernelUnits::mm; + zplane[2] = 21.5*GeoModelKernelUnits::mm; rmin[2] = r0 + 8.*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.*GeoModelKernelUnits::mm; + zplane[3] = 41.5*GeoModelKernelUnits::mm; rmin[3] = r0 + 8.*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.*GeoModelKernelUnits::mm; + zplane[4] = 41.5*GeoModelKernelUnits::mm; rmin[4] = r0 + 8.*GeoModelKernelUnits::mm; rmax[4] = r0 + 28.*GeoModelKernelUnits::mm; + zplane[5] = 46.5*GeoModelKernelUnits::mm; rmin[5] = r0 + 8.*GeoModelKernelUnits::mm; rmax[5] = r0 + 28.*GeoModelKernelUnits::mm; } else if(id == "BackInnerRing"){ - double r0 =357.5*CLHEP::mm-1.*CLHEP::mm; // RInner = reference radius of the ring + double r0 =357.5*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; // RInner = reference radius of the ring zplane.resize(4); rmin.resize(4); rmax.resize(4); - zplane[0] = 0. *CLHEP::mm; rmin[0] = r0 - 22.5*CLHEP::mm; rmax[0] = r0 + 53.5*CLHEP::mm; - zplane[1] = 22.5*CLHEP::mm; rmin[1] = r0 - 22.5*CLHEP::mm; rmax[1] = r0 + 53.5*CLHEP::mm; - zplane[2] = 22.5*CLHEP::mm; rmin[2] = r0 - 24.5*CLHEP::mm; rmax[2] = r0 + 40.5*CLHEP::mm; - zplane[3] = 54. *CLHEP::mm; rmin[3] = r0 - 24.5*CLHEP::mm; rmax[3] = r0 + 40.5*CLHEP::mm; + zplane[0] = 0. *GeoModelKernelUnits::mm; rmin[0] = r0 - 22.5*GeoModelKernelUnits::mm; rmax[0] = r0 + 53.5*GeoModelKernelUnits::mm; + zplane[1] = 22.5*GeoModelKernelUnits::mm; rmin[1] = r0 - 22.5*GeoModelKernelUnits::mm; rmax[1] = r0 + 53.5*GeoModelKernelUnits::mm; + zplane[2] = 22.5*GeoModelKernelUnits::mm; rmin[2] = r0 - 24.5*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[3] = 54. *GeoModelKernelUnits::mm; rmin[3] = r0 - 24.5*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.5*GeoModelKernelUnits::mm; } else if(id == "BackInnerRing::Hole"){ - double r0 =357.5*CLHEP::mm-1.*CLHEP::mm; // RInner = reference radius of the ring + double r0 =357.5*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; // RInner = reference radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 18. *CLHEP::mm; rmin[0] = r0 + 6.5*CLHEP::mm; rmax[0] = r0 + 29.5*CLHEP::mm; - zplane[1] = 22.5*CLHEP::mm; rmin[1] = r0 + 6.5*CLHEP::mm; rmax[1] = r0 + 29.5*CLHEP::mm; - zplane[2] = 22.5*CLHEP::mm; rmin[2] = r0 + 6.5*CLHEP::mm; rmax[2] = r0 + 40.5*CLHEP::mm; - zplane[3] = 43.5*CLHEP::mm; rmin[3] = r0 + 6.5*CLHEP::mm; rmax[3] = r0 + 40.5*CLHEP::mm; - zplane[4] = 43.5*CLHEP::mm; rmin[4] = r0 + 6.5*CLHEP::mm; rmax[4] = r0 + 29.5*CLHEP::mm; - zplane[5] = 48. *CLHEP::mm; rmin[5] = r0 + 6.5*CLHEP::mm; rmax[5] = r0 + 29.5*CLHEP::mm; + zplane[0] = 18. *GeoModelKernelUnits::mm; rmin[0] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[0] = r0 + 29.5*GeoModelKernelUnits::mm; + zplane[1] = 22.5*GeoModelKernelUnits::mm; rmin[1] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[1] = r0 + 29.5*GeoModelKernelUnits::mm; + zplane[2] = 22.5*GeoModelKernelUnits::mm; rmin[2] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[3] = 43.5*GeoModelKernelUnits::mm; rmin[3] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[4] = 43.5*GeoModelKernelUnits::mm; rmin[4] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[4] = r0 + 29.5*GeoModelKernelUnits::mm; + zplane[5] = 48. *GeoModelKernelUnits::mm; rmin[5] = r0 + 6.5*GeoModelKernelUnits::mm; rmax[5] = r0 + 29.5*GeoModelKernelUnits::mm; } else if(id == "BackInnerRing::GTen"){ - double r0 =357.5*CLHEP::mm-1.*CLHEP::mm; // RInner = reference radius of the ring + double r0 =357.5*GeoModelKernelUnits::mm-1.*GeoModelKernelUnits::mm; // RInner = reference radius of the ring zplane.resize(6); rmin.resize(6); rmax.resize(6); - zplane[0] = 18.*CLHEP::mm; rmin[0] = r0 + 8.5*CLHEP::mm; rmax[0] = r0 + 28.5*CLHEP::mm; - zplane[1] = 23.*CLHEP::mm; rmin[1] = r0 + 8.5*CLHEP::mm; rmax[1] = r0 + 28.5*CLHEP::mm; - zplane[2] = 23.*CLHEP::mm; rmin[2] = r0 + 8.5*CLHEP::mm; rmax[2] = r0 + 40.5*CLHEP::mm; - zplane[3] = 43.*CLHEP::mm; rmin[3] = r0 + 8.5*CLHEP::mm; rmax[3] = r0 + 40.5*CLHEP::mm; - zplane[4] = 43.*CLHEP::mm; rmin[4] = r0 + 8.5*CLHEP::mm; rmax[4] = r0 + 28.5*CLHEP::mm; - zplane[5] = 48.*CLHEP::mm; rmin[5] = r0 + 8.5*CLHEP::mm; rmax[5] = r0 + 28.5*CLHEP::mm; + zplane[0] = 18.*GeoModelKernelUnits::mm; rmin[0] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[0] = r0 + 28.5*GeoModelKernelUnits::mm; + zplane[1] = 23.*GeoModelKernelUnits::mm; rmin[1] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[1] = r0 + 28.5*GeoModelKernelUnits::mm; + zplane[2] = 23.*GeoModelKernelUnits::mm; rmin[2] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[2] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[3] = 43.*GeoModelKernelUnits::mm; rmin[3] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[3] = r0 + 40.5*GeoModelKernelUnits::mm; + zplane[4] = 43.*GeoModelKernelUnits::mm; rmin[4] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[4] = r0 + 28.5*GeoModelKernelUnits::mm; + zplane[5] = 48.*GeoModelKernelUnits::mm; rmin[5] = r0 + 8.5*GeoModelKernelUnits::mm; rmax[5] = r0 + 28.5*GeoModelKernelUnits::mm; } else if(id == "FrontOuterRing"){ - double r0 = 1961.*CLHEP::mm-7.*CLHEP::mm; // ROuter = inner radius of the outer ring + double r0 = 1961.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; // ROuter = inner radius of the outer ring zplane.resize(7); rmin.resize(7); rmax.resize(7); - zplane[0] = 0. *CLHEP::mm; rmin[0] = r0 + 0.*CLHEP::mm; rmax[0] = r0 + 111.*CLHEP::mm; - zplane[1] = 5. *CLHEP::mm; rmin[1] = r0 + 0.*CLHEP::mm; rmax[1] = r0 + 116.*CLHEP::mm; - zplane[2] = 20. *CLHEP::mm; rmin[2] = r0 + 0.*CLHEP::mm; rmax[2] = r0 + 116.*CLHEP::mm; - zplane[3] = 20. *CLHEP::mm; rmin[3] = r0 + 62.*CLHEP::mm; rmax[3] = r0 + 116.*CLHEP::mm; - zplane[4] = 63.3*CLHEP::mm; rmin[4] = r0 + 62.*CLHEP::mm; rmax[4] = r0 + 116.*CLHEP::mm; - zplane[5] = 115.2*CLHEP::mm; rmin[5] = r0 + 90.*CLHEP::mm; rmax[5] = r0 + 116.*CLHEP::mm; - zplane[6] = 144. *CLHEP::mm; rmin[6] = r0 + 90.*CLHEP::mm; rmax[6] = r0 + 116.*CLHEP::mm; + zplane[0] = 0. *GeoModelKernelUnits::mm; rmin[0] = r0 + 0.*GeoModelKernelUnits::mm; rmax[0] = r0 + 111.*GeoModelKernelUnits::mm; + zplane[1] = 5. *GeoModelKernelUnits::mm; rmin[1] = r0 + 0.*GeoModelKernelUnits::mm; rmax[1] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[2] = 20. *GeoModelKernelUnits::mm; rmin[2] = r0 + 0.*GeoModelKernelUnits::mm; rmax[2] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[3] = 20. *GeoModelKernelUnits::mm; rmin[3] = r0 + 62.*GeoModelKernelUnits::mm; rmax[3] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[4] = 63.3*GeoModelKernelUnits::mm; rmin[4] = r0 + 62.*GeoModelKernelUnits::mm; rmax[4] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[5] = 115.2*GeoModelKernelUnits::mm; rmin[5] = r0 + 90.*GeoModelKernelUnits::mm; rmax[5] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[6] = 144. *GeoModelKernelUnits::mm; rmin[6] = r0 + 90.*GeoModelKernelUnits::mm; rmax[6] = r0 + 116.*GeoModelKernelUnits::mm; } else if(id == "FrontOuterLongBar"){ zplane.resize(4); rmin.resize(4); rmax.resize(4); - zplane[0] = 0.*CLHEP::mm; rmin[0] = 1969.7*CLHEP::mm; rmax[0] = 2016.*CLHEP::mm; - zplane[1] = 1.*CLHEP::mm; rmin[1] = 1969.7*CLHEP::mm; rmax[1] = 2016.*CLHEP::mm; - zplane[2] = 1.*CLHEP::mm; rmin[2] = 652. *CLHEP::mm; rmax[2] = 2016.*CLHEP::mm; - zplane[3] = 21.*CLHEP::mm; rmin[3] = 652. *CLHEP::mm; rmax[3] = 2016.*CLHEP::mm; + zplane[0] = 0.*GeoModelKernelUnits::mm; rmin[0] = 1969.7*GeoModelKernelUnits::mm; rmax[0] = 2016.*GeoModelKernelUnits::mm; + zplane[1] = 1.*GeoModelKernelUnits::mm; rmin[1] = 1969.7*GeoModelKernelUnits::mm; rmax[1] = 2016.*GeoModelKernelUnits::mm; + zplane[2] = 1.*GeoModelKernelUnits::mm; rmin[2] = 652. *GeoModelKernelUnits::mm; rmax[2] = 2016.*GeoModelKernelUnits::mm; + zplane[3] = 21.*GeoModelKernelUnits::mm; rmin[3] = 652. *GeoModelKernelUnits::mm; rmax[3] = 2016.*GeoModelKernelUnits::mm; //2020-46.3 ; RMiddle+40.//RMiddle+8+(lengthofbar=1398) } else if(id == "BackOuterRing"){ - double r0 = 1961.*CLHEP::mm-7.*CLHEP::mm; + double r0 = 1961.*GeoModelKernelUnits::mm-7.*GeoModelKernelUnits::mm; zplane.resize(7); rmin.resize(7); rmax.resize(7); - zplane[0] = 0.*CLHEP::mm; rmin[0] = r0 + 0.*CLHEP::mm; rmax[0] = r0 + 111.*CLHEP::mm; - zplane[1] = 5.*CLHEP::mm; rmin[1] = r0 + 0.*CLHEP::mm; rmax[1] = r0 + 116.*CLHEP::mm; - zplane[2] = 15.*CLHEP::mm; rmin[2] = r0 + 0.*CLHEP::mm; rmax[2] = r0 + 116.*CLHEP::mm; - zplane[3] = 15.*CLHEP::mm; rmin[3] = r0 + 62.*CLHEP::mm; rmax[3] = r0 + 116.*CLHEP::mm; - zplane[4] = 41.*CLHEP::mm; rmin[4] = r0 + 62.*CLHEP::mm; rmax[4] = r0 + 116.*CLHEP::mm; - zplane[5] = 41.*CLHEP::mm; rmin[5] = r0 + 90.*CLHEP::mm; rmax[5] = r0 + 116.*CLHEP::mm; - zplane[6] = 139.*CLHEP::mm; rmin[6] = r0 + 90.*CLHEP::mm; rmax[6] = r0 + 116.*CLHEP::mm; + zplane[0] = 0.*GeoModelKernelUnits::mm; rmin[0] = r0 + 0.*GeoModelKernelUnits::mm; rmax[0] = r0 + 111.*GeoModelKernelUnits::mm; + zplane[1] = 5.*GeoModelKernelUnits::mm; rmin[1] = r0 + 0.*GeoModelKernelUnits::mm; rmax[1] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[2] = 15.*GeoModelKernelUnits::mm; rmin[2] = r0 + 0.*GeoModelKernelUnits::mm; rmax[2] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[3] = 15.*GeoModelKernelUnits::mm; rmin[3] = r0 + 62.*GeoModelKernelUnits::mm; rmax[3] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[4] = 41.*GeoModelKernelUnits::mm; rmin[4] = r0 + 62.*GeoModelKernelUnits::mm; rmax[4] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[5] = 41.*GeoModelKernelUnits::mm; rmin[5] = r0 + 90.*GeoModelKernelUnits::mm; rmax[5] = r0 + 116.*GeoModelKernelUnits::mm; + zplane[6] = 139.*GeoModelKernelUnits::mm; rmin[6] = r0 + 90.*GeoModelKernelUnits::mm; rmax[6] = r0 + 116.*GeoModelKernelUnits::mm; } else if(id == "BackOuterLongBar"){ zplane.resize(4); rmin.resize(4); rmax.resize(4); - zplane[0] = 0.*CLHEP::mm; rmin[0] = 1969.7*CLHEP::mm; rmax[0] = 2016.*CLHEP::mm; - zplane[1] = 1.*CLHEP::mm; rmin[1] = 1969.7*CLHEP::mm; rmax[1] = 2016.*CLHEP::mm; - zplane[2] = 1.*CLHEP::mm; rmin[2] = 736.5*CLHEP::mm; rmax[2] = 2016.*CLHEP::mm; - zplane[3] = 21.*CLHEP::mm; rmin[3] = 736.5*CLHEP::mm; rmax[3] = 2016.*CLHEP::mm; + zplane[0] = 0.*GeoModelKernelUnits::mm; rmin[0] = 1969.7*GeoModelKernelUnits::mm; rmax[0] = 2016.*GeoModelKernelUnits::mm; + zplane[1] = 1.*GeoModelKernelUnits::mm; rmin[1] = 1969.7*GeoModelKernelUnits::mm; rmax[1] = 2016.*GeoModelKernelUnits::mm; + zplane[2] = 1.*GeoModelKernelUnits::mm; rmin[2] = 736.5*GeoModelKernelUnits::mm; rmax[2] = 2016.*GeoModelKernelUnits::mm; + zplane[3] = 21.*GeoModelKernelUnits::mm; rmin[3] = 736.5*GeoModelKernelUnits::mm; rmax[3] = 2016.*GeoModelKernelUnits::mm; } else { throw std::runtime_error("EMECSupportConstruction: wrong Pcone id"); } @@ -706,14 +706,14 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica GeoTubs *shapeFOB = new GeoTubs(rminFOB, rmaxFOB, dzFOB, m_PhiStart, m_PhiSize); GeoLogVol *logicalFOB = new GeoLogVol(name, shapeFOB, m_LAr); GeoPhysVol *physFOB = new GeoPhysVol(logicalFOB); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zposFOB))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposFOB))); motherPhysical->add(physFOB); const int number_of_modules = 8; - const double moduldfi = CLHEP::twopi / number_of_modules; + const double moduldfi = GeoModelKernelUnits::twopi / number_of_modules; const int nofabs = (*m_DB_EmecWheelParameters)[1]->getInt("NABS"); const int nofdiv = nofabs / number_of_modules; - const double dfi = CLHEP::twopi / nofabs; + const double dfi = GeoModelKernelUnits::twopi / nofabs; //define a fi section including one absorber and electrode name = m_BaseName + "FrontOuterBarrette::Module::Phidiv"; GeoTubs *shapeFOBMP = new GeoTubs(rminFOB, rmaxFOB, dzFOB, -dfi/4., dfi); @@ -731,7 +731,7 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica GeoBox *shapeFOBA = new GeoBox(dx, dy, dzFOB); GeoLogVol *logicalFOBA = new GeoLogVol(name, shapeFOBA, m_G10FeOuter); GeoPhysVol *physFOBA = new GeoPhysVol(logicalFOBA); - physFOBMP->add(new GeoTransform(HepGeom::TranslateX3D(r0A))); + physFOBMP->add(new GeoTransform(GeoTrf::TranslateX3D(r0A))); physFOBMP->add(physFOBA); name = m_BaseName + "FrontOuterBarrette::Ele"; // piece of electrode @@ -745,7 +745,7 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica GeoBox *shapeFOBE = new GeoBox(dx, dy, dzFOB); GeoLogVol *logicalFOBE = new GeoLogVol(name, shapeFOBE, m_Kapton_Cu); GeoPhysVol *physFOBE = new GeoPhysVol(logicalFOBE); - physFOBMP->add(new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotationZ(dfi/2.), CLHEP::Hep3Vector(x0,y0,0.)))); + physFOBMP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.)))); physFOBMP->add(physFOBE); if(m_isModule){ @@ -753,7 +753,7 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica for(int i = 0; i < nofdiv - 1; ++ i){ double fi = m_PhiStart + dfi/2. + i * dfi; physFOB->add(new GeoIdentifierTag(i)); - physFOB->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physFOB->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physFOB->add(physFOBMP); } name = m_BaseName + "FrontOuterBarrette::Abs"; @@ -761,7 +761,7 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica x0 = r0A*cos(fi); y0 = r0A*sin(fi); physFOB->add(new GeoIdentifierTag(nofdiv-1)); - physFOB->add(new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotationZ(fi), CLHEP::Hep3Vector(x0,y0,0.)))); + physFOB->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi)))); physFOB->add(physFOBA); } else { // in case one wants to build the whole wheel: @@ -775,7 +775,7 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica for(int i = 0; i < nofdiv; ++ i){ double fi = i * dfi; physFOBM->add(new GeoIdentifierTag(i)); - physFOBM->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physFOBM->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physFOBM->add(physFOBMP); } //position modules into Barrette mother to create the full wheel @@ -783,7 +783,7 @@ void EMECSupportConstruction::put_front_outer_barettes(GeoPhysVol *motherPhysica for(int i = 0; i < number_of_modules; ++ i){ double fi = dfi/2.+ i * moduldfi; physFOB->add(new GeoIdentifierTag(i)); - physFOB->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physFOB->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physFOB->add(physFOBM); } } @@ -804,14 +804,14 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica GeoTubs *shapeFIB = new GeoTubs(rminFIB, rmaxFIB, dzFIB, m_PhiStart, m_PhiSize); GeoLogVol *logicalFIB = new GeoLogVol(name, shapeFIB, m_LAr); GeoPhysVol *physFIB = new GeoPhysVol(logicalFIB); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zposFIB))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposFIB))); motherPhysical->add(physFIB); const int number_of_modules = 8; - const double moduldfi = CLHEP::twopi / number_of_modules; + const double moduldfi = GeoModelKernelUnits::twopi / number_of_modules; const int nofabs = (*m_DB_EmecWheelParameters)[0]->getInt("NABS"); const int nofdiv = nofabs / number_of_modules; - const double dfi = CLHEP::twopi / nofabs; + const double dfi = GeoModelKernelUnits::twopi / nofabs; name = m_BaseName + "FrontInnerBarrette::Module::Phidiv"; GeoTubs *shapeFIBMP = new GeoTubs(rminFIB,rmaxFIB,dzFIB, -dfi/4., dfi); @@ -828,7 +828,7 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica GeoBox *shapeFIBA = new GeoBox(dx, dy, dzFIB); GeoLogVol *logicalFIBA = new GeoLogVol(name, shapeFIBA, m_G10FeInner); GeoPhysVol *physFIBA = new GeoPhysVol(logicalFIBA); - physFIBMP->add(new GeoTransform(HepGeom::TranslateX3D(r0A))); + physFIBMP->add(new GeoTransform(GeoTrf::TranslateX3D(r0A))); physFIBMP->add(physFIBA); name = m_BaseName + "FrontInnerBarrette::Ele"; // piece of electrode @@ -842,7 +842,7 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica GeoBox *shapeFIBE = new GeoBox(dx, dy, dzFIB); GeoLogVol *logicalFIBE = new GeoLogVol(name, shapeFIBE, m_Kapton_Cu); GeoPhysVol *physFIBE = new GeoPhysVol(logicalFIBE); - physFIBMP->add(new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotationZ(dfi/2.), CLHEP::Hep3Vector(x0,y0,0.)))); + physFIBMP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.)))); physFIBMP->add(physFIBE); if(m_isModule){ @@ -850,7 +850,7 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica for(int i = 0; i < nofdiv - 1; ++ i){ double fi = m_PhiStart + dfi/2. + i * dfi; physFIB->add(new GeoIdentifierTag(i)); - physFIB->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physFIB->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physFIB->add(physFIBMP); } name = m_BaseName + "FrontInnerBarrette::Abs"; @@ -858,7 +858,7 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica x0 = r0A * cos(fi); y0 = r0A * sin(fi); physFIB->add(new GeoIdentifierTag(nofdiv-1)); - physFIB->add(new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotationZ(fi), CLHEP::Hep3Vector(x0,y0,0.)))); + physFIB->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi)))); physFIB->add(physFIBA); } else { // in case one wants to build the whole wheel: @@ -871,7 +871,7 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica for(int i = 0; i < nofdiv; ++ i){ double fi = i * dfi; physFIBM->add(new GeoIdentifierTag(i)); - physFIBM->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physFIBM->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physFIBM->add(physFIBMP); } //position modules into Barrette mother to create the full wheel @@ -879,7 +879,7 @@ void EMECSupportConstruction::put_front_inner_barettes(GeoPhysVol *motherPhysica for(int i = 0; i < number_of_modules; ++ i){ double fi = dfi/2.+ i * moduldfi; physFIB->add(new GeoIdentifierTag(i)); - physFIB->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physFIB->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physFIB->add(physFIBM); } } @@ -901,14 +901,14 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical GeoTubs *shapeBOB = new GeoTubs(rminBOB, rmaxBOB, dzBOB, m_PhiStart, m_PhiSize); GeoLogVol *logicalBOB = new GeoLogVol(name, shapeBOB, m_LAr); GeoPhysVol *physBOB = new GeoPhysVol(logicalBOB); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zposBOB))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposBOB))); motherPhysical->add(physBOB); const int number_of_modules = 8; - const double moduldfi = CLHEP::twopi / number_of_modules; + const double moduldfi = GeoModelKernelUnits::twopi / number_of_modules; int nofabs = (*m_DB_EmecWheelParameters)[1]->getInt("NABS"); int nofdiv = nofabs / number_of_modules; - double dfi = CLHEP::twopi / nofabs; + double dfi = GeoModelKernelUnits::twopi / nofabs; name = m_BaseName + "BackOuterBarrette::Module::Phidiv"; GeoTubs *shapeBOBMP = new GeoTubs(rminBOB, rmaxBOB, dzBOB, -dfi/4., dfi); @@ -925,7 +925,7 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical GeoBox *shapeBOBA = new GeoBox(dx, dy, dzBOB); GeoLogVol *logicalBOBA = new GeoLogVol(name, shapeBOBA, m_G10FeOuter); GeoPhysVol *physBOBA = new GeoPhysVol(logicalBOBA); - physBOBMP->add(new GeoTransform(HepGeom::TranslateX3D(r0A))); + physBOBMP->add(new GeoTransform(GeoTrf::TranslateX3D(r0A))); physBOBMP->add(physBOBA); name = m_BaseName + "BackOuterBarrette::Ele"; // piece of electrode @@ -939,7 +939,7 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical GeoBox *shapeBOBE = new GeoBox(dx, dy, dzBOB); GeoLogVol *logicalBOBE = new GeoLogVol(name, shapeBOBE, m_Kapton_Cu); GeoPhysVol *physBOBE = new GeoPhysVol(logicalBOBE); - physBOBMP->add(new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotationZ(dfi/2.), CLHEP::Hep3Vector(x0,y0,0.)))); + physBOBMP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(dfi/2.)))); physBOBMP->add(physBOBE); if(m_isModule){ @@ -948,7 +948,7 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical for(int i = 0; i < nofdiv - 1; ++ i){ double fi = m_PhiStart + dfi/2. + i * dfi; physBOB->add(new GeoIdentifierTag(i)); - physBOB->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physBOB->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physBOB->add(physBOBMP); } name = m_BaseName + "BackOuterBarrette::Abs"; @@ -956,7 +956,7 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical x0 = r0A * cos(fi); y0 = r0A * sin(fi); physBOB->add(new GeoIdentifierTag(nofdiv - 1)); - physBOB->add(new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotationZ(fi), CLHEP::Hep3Vector(x0,y0,0.)))); + physBOB->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0,y0,0.)*GeoTrf::RotateZ3D(fi)))); physBOB->add(physBOBA); } else { // in case one wants to build the whole wheel: @@ -970,7 +970,7 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical for(int i = 0; i < nofdiv; ++ i){ double fi = dfi * i; physBOBM->add(new GeoIdentifierTag(i)); - physBOBM->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physBOBM->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physBOBM->add(physBOBMP); } //position modules into Barrette mother to create the full wheel @@ -978,7 +978,7 @@ void EMECSupportConstruction::put_back_outer_barettes(GeoPhysVol *motherPhysical for(int i = 0; i < number_of_modules; ++ i){ double fi = dfi/2.+ i * moduldfi; physBOB->add(new GeoIdentifierTag(i)); - physBOB->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physBOB->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physBOB->add(physBOBM); } } @@ -992,21 +992,21 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical map_t numbers = getNumbersMap(m_DB_numbers, id); std::string name = m_BaseName + id; - double rminBIB = getNumber(m_DB_tubes, tubes, id, "RMIN", 357.5-1.+40.5); //RInner +40.5// -1.CLHEP::mm for cold + double rminBIB = getNumber(m_DB_tubes, tubes, id, "RMIN", 357.5-1.+40.5); //RInner +40.5// -1.GeoModelKernelUnits::mm for cold double rmaxBIB = getNumber(m_DB_tubes, tubes, id, "RMAX", 699.-2.5-40.); //RMiddle-40 //-2.5mm for cold double dzBIB = getNumber(m_DB_tubes, tubes, id, "DZ", 11. / 2); double zposBIB = getNumber(m_DB_numbers, numbers, "Z0", "PARVALUE", 44.) + dzBIB; GeoTubs *shapeBIB = new GeoTubs(rminBIB, rmaxBIB, dzBIB, m_PhiStart, m_PhiSize); GeoLogVol *logicalBIB = new GeoLogVol(name, shapeBIB, m_LAr); GeoPhysVol *physBIB = new GeoPhysVol(logicalBIB); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zposBIB))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposBIB))); motherPhysical->add(physBIB); const int number_of_modules = 8; - const double moduldfi = CLHEP::twopi / number_of_modules; + const double moduldfi = GeoModelKernelUnits::twopi / number_of_modules; const int nofabs = (*m_DB_EmecWheelParameters)[0]->getInt("NABS"); const int nofdiv = nofabs / number_of_modules; - const double dfi = CLHEP::twopi / nofabs; + const double dfi = GeoModelKernelUnits::twopi / nofabs; name = m_BaseName + "BackInnerBarrette::Module::Phidiv"; GeoTubs *shapeBIBMP = new GeoTubs(rminBIB, rmaxBIB, dzBIB, -dfi/4., dfi); @@ -1025,7 +1025,7 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical GeoBox *shapeBIBA = new GeoBox(dx, dy, dzBIB); GeoLogVol *logicalBIBA = new GeoLogVol(name, shapeBIBA, m_G10FeInner); GeoPhysVol *physBIBA = new GeoPhysVol(logicalBIBA); - physBIBMP->add(new GeoTransform(HepGeom::TranslateX3D(r0A))); + physBIBMP->add(new GeoTransform(GeoTrf::TranslateX3D(r0A))); physBIBMP->add(physBIBA); id = "BackInnerBarrette::Ele"; // piece of electrode @@ -1040,7 +1040,7 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical GeoBox *shapeBIBE = new GeoBox(dx, dy, dzBIB); GeoLogVol *logicalBIBE = new GeoLogVol(name, shapeBIBE, m_Kapton_Cu); GeoPhysVol *physBIBE = new GeoPhysVol(logicalBIBE); - physBIBMP->add(new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotationZ(dfi*0.5), CLHEP::Hep3Vector(x0, y0, 0.)))); + physBIBMP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0, y0, 0.)*GeoTrf::RotateZ3D(dfi*0.5)))); physBIBMP->add(physBIBE); if(m_isModule){ @@ -1060,7 +1060,7 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical for(int i = 0; i < nofdiv - 1; ++ i){ double fi = m_PhiStart + dfi/2. + i * dfi; physBIB->add(new GeoIdentifierTag(i)); - physBIB->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physBIB->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physBIB->add(physBIBMP); } name = m_BaseName + "BackInnerBarrette::Abs"; @@ -1068,7 +1068,7 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical x0 = r0A*cos(fi); y0 = r0A*sin(fi); physBIB->add(new GeoIdentifierTag(nofdiv - 1)); - physBIB->add(new GeoTransform(HepGeom::Transform3D(CLHEP::HepRotationZ(fi),CLHEP::Hep3Vector(x0, y0, 0.)))); + physBIB->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(x0, y0, 0.)*GeoTrf::RotateZ3D(fi)))); physBIB->add(physBIBA); } else { // in case one wants to build the whole wheel: @@ -1082,7 +1082,7 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical for(int i = 0; i < nofdiv; ++ i){ double fi = dfi * i; physBIBM->add(new GeoIdentifierTag(i)); - physBIBM->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physBIBM->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physBIBM->add(physBIBMP); } //position modules into Barrette mother to create the full wheel @@ -1090,7 +1090,7 @@ void EMECSupportConstruction::put_back_inner_barettes(GeoPhysVol *motherPhysical for(int i = 0; i < number_of_modules; ++ i){ double fi = dfi*0.5 + i * moduldfi; physBIB->add(new GeoIdentifierTag(i)); - physBIB->add(new GeoTransform(HepGeom::RotateZ3D(fi))); + physBIB->add(new GeoTransform(GeoTrf::RotateZ3D(fi))); physBIB->add(physBIBM); } } @@ -1101,9 +1101,9 @@ GeoPhysVol* EMECSupportConstruction::outer_envelope(void) const map_t tubes = getMap(m_DB_tubes, "TUBENAME"); std::string id = "OuterTransversalBars"; std::string name = m_BaseName + id; - double rminOTB = getNumber(m_DB_tubes, tubes, id, "RMIN", (2034. + 2.)*CLHEP::mm); - double rmaxOTB = getNumber(m_DB_tubes, tubes, id, "RMAX", rminOTB + 3.*CLHEP::mm); - double dzOTB = getNumber(m_DB_tubes, tubes, id, "DZ", 201.*CLHEP::mm); + double rminOTB = getNumber(m_DB_tubes, tubes, id, "RMIN", (2034. + 2.)*GeoModelKernelUnits::mm); + double rmaxOTB = getNumber(m_DB_tubes, tubes, id, "RMAX", rminOTB + 3.*GeoModelKernelUnits::mm); + double dzOTB = getNumber(m_DB_tubes, tubes, id, "DZ", 201.*GeoModelKernelUnits::mm); GeoTubs* shapeOTB = new GeoTubs(rminOTB, rmaxOTB, dzOTB, m_PhiStart, m_PhiSize); GeoLogVol* logicalOTB = new GeoLogVol(name, shapeOTB, m_Gten); GeoPhysVol* physOTB = new GeoPhysVol(logicalOTB); @@ -1111,16 +1111,16 @@ GeoPhysVol* EMECSupportConstruction::outer_envelope(void) const id = "TopIndexingRing"; name = m_BaseName + id; double rminTIR = getNumber(m_DB_tubes, tubes, id, "RMIN", rmaxOTB); - double rmaxTIR = getNumber(m_DB_tubes, tubes, id, "RMAX", rminTIR + 9.*CLHEP::mm); - double dzTIR = getNumber(m_DB_tubes, tubes, id, "DZ", 10.*CLHEP::mm); + double rmaxTIR = getNumber(m_DB_tubes, tubes, id, "RMAX", rminTIR + 9.*GeoModelKernelUnits::mm); + double dzTIR = getNumber(m_DB_tubes, tubes, id, "DZ", 10.*GeoModelKernelUnits::mm); GeoTubs* shapeTIR = new GeoTubs(rminTIR, rmaxTIR, dzTIR, m_PhiStart, m_PhiSize); GeoLogVol* logicalTIR = new GeoLogVol(name, shapeTIR, m_Alu); GeoPhysVol* physTIR = new GeoPhysVol(logicalTIR); id += "::Hole"; name = m_BaseName + id; - double dzTIRH = getNumber(m_DB_tubes, tubes, id, "DZ", 4.5*CLHEP::mm); + double dzTIRH = getNumber(m_DB_tubes, tubes, id, "DZ", 4.5*GeoModelKernelUnits::mm); double rmaxTIRH = getNumber(m_DB_tubes, tubes, id, "RMAX", rmaxTIR); - double rminTIRH = getNumber(m_DB_tubes, tubes, id, "RMIN", rmaxTIRH - 2.*CLHEP::mm); + double rminTIRH = getNumber(m_DB_tubes, tubes, id, "RMIN", rmaxTIRH - 2.*GeoModelKernelUnits::mm); GeoTubs* shapeTIRH = new GeoTubs(rminTIRH, rmaxTIRH, dzTIRH, m_PhiStart, m_PhiSize); GeoLogVol* logicalTIRH = new GeoLogVol(name, shapeTIRH, m_LAr); GeoPhysVol* physTIRH = new GeoPhysVol(logicalTIRH); @@ -1155,22 +1155,22 @@ GeoPhysVol* EMECSupportConstruction::outer_envelope(void) const double dfi = M_PI / number_of_stretchers; double dfiNS = shapeNS->getDPhi(); motherPhysical->add(new GeoIdentifierTag(1)); - motherPhysical->add(new GeoTransform(HepGeom::RotateZ3D(dfi - dfiNS*0.5))); + motherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(dfi - dfiNS*0.5))); motherPhysical->add(physNS); motherPhysical->add(new GeoIdentifierTag(2)); - motherPhysical->add(new GeoTransform(HepGeom::RotateZ3D(-dfi + dfiNS*0.5))); + motherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(-dfi + dfiNS*0.5))); motherPhysical->add(physNS); } else { - double dfi = CLHEP::twopi / number_of_stretchers; + double dfi = GeoModelKernelUnits::twopi / number_of_stretchers; int copyno = 0; for(int i = 0; i < number_of_stretchers; ++ i, ++ copyno){ double fiW = i * dfi; motherPhysical->add(new GeoIdentifierTag(copyno)); - motherPhysical->add(new GeoTransform(HepGeom::RotateZ3D(fiW))); + motherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(fiW))); motherPhysical->add(physWS); double fiN = (i + 0.5) * dfi; motherPhysical->add(new GeoIdentifierTag(copyno)); - motherPhysical->add(new GeoTransform(HepGeom::RotateZ3D(fiN))); + motherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(fiN))); motherPhysical->add(physNS); } } @@ -1184,26 +1184,26 @@ GeoPhysVol* EMECSupportConstruction::inner_envelope(void) const map_t numbers = getNumbersMap(m_DB_numbers, id); std::string name0 = m_BaseName + id; -// double dz = LArWheelCalculator::GetWheelThickness() * 0.5; //257.*CLHEP::mm; //zWheelThickness/2. - double dz = 0.5 * (*m_DB_mn)[0]->getDouble("ACTIVELENGTH")*CLHEP::mm; +// double dz = LArWheelCalculator::GetWheelThickness() * 0.5; //257.*GeoModelKernelUnits::mm; //zWheelThickness/2. + double dz = 0.5 * (*m_DB_mn)[0]->getDouble("ACTIVELENGTH")*GeoModelKernelUnits::mm; try { - dz += (*m_DB_mn)[0]->getDouble("STRAIGHTSTARTSECTION")*CLHEP::mm; + dz += (*m_DB_mn)[0]->getDouble("STRAIGHTSTARTSECTION")*GeoModelKernelUnits::mm; } catch(...){ - dz += 2.*CLHEP::mm; + dz += 2.*GeoModelKernelUnits::mm; std::ostringstream tmp("cannot get STRAIGHTSTARTSECTION from DB"); printWarning(tmp); } - double r1min = getNumber(m_DB_numbers, numbers, "R1MIN", "PARVALUE", (292.-1.)*CLHEP::mm); //lower radius of front inner ring, -1mm for cold - double r2min = getNumber(m_DB_numbers, numbers, "R2MIN", "PARVALUE", (333.-1.)*CLHEP::mm); //lower radius of back inner ring, -1mm for cold + double r1min = getNumber(m_DB_numbers, numbers, "R1MIN", "PARVALUE", (292.-1.)*GeoModelKernelUnits::mm); //lower radius of front inner ring, -1mm for cold + double r2min = getNumber(m_DB_numbers, numbers, "R2MIN", "PARVALUE", (333.-1.)*GeoModelKernelUnits::mm); //lower radius of back inner ring, -1mm for cold //RInnerFront-43.5;RInnerBack-24.5 const double talpha = (r2min - r1min)*0.5/dz; const double calpha = 2.*dz/sqrt(pow(2.*dz,2.)+pow(r2min-r1min,2.)); const double inv_calpha = 1. / calpha; const double alpha = atan(talpha); - double surfthick = getNumber(m_DB_numbers, numbers, "surfthick", "PARVALUE", 1.*CLHEP::mm); // thickness of the cone shell - double barthick = getNumber(m_DB_numbers, numbers, "barthick", "PARVALUE", 5.*CLHEP::mm); // thickness of the Alu bars + double surfthick = getNumber(m_DB_numbers, numbers, "surfthick", "PARVALUE", 1.*GeoModelKernelUnits::mm); // thickness of the cone shell + double barthick = getNumber(m_DB_numbers, numbers, "barthick", "PARVALUE", 5.*GeoModelKernelUnits::mm); // thickness of the Alu bars double r1max = pow(barthick/2.,2.)+ pow(r1min+(surfthick+barthick)*inv_calpha,2.); r1max = sqrt(r1max)+surfthick*inv_calpha; double r2max = r2min+(r1max-r1min); @@ -1243,7 +1243,7 @@ GeoPhysVol* EMECSupportConstruction::inner_envelope(void) const //-------------------------/ const int nofmodul = 8; - const double moduldphi = CLHEP::twopi / nofmodul; + const double moduldphi = GeoModelKernelUnits::twopi / nofmodul; GeoCons* shapeIACP = new GeoCons( r1min+surfthick*inv_calpha,r2min+surfthick*inv_calpha, r1max-surfthick*inv_calpha,r2max-surfthick*inv_calpha, @@ -1260,7 +1260,7 @@ GeoPhysVol* EMECSupportConstruction::inner_envelope(void) const GeoLogVol* logicalIACAB= new GeoLogVol (name,shapeIACAB, m_Alu); GeoPhysVol* physIACAB= new GeoPhysVol(logicalIACAB); - const double dphi = CLHEP::twopi / 256.; + const double dphi = GeoModelKernelUnits::twopi / 256.; const int nbar = 9; const double phi[9]={-15.,-11.,-7.5,-4.,0.,4.,7.5,11.,15.}; // phipos of the bars const double r0=r1min+(surfthick+barthick/2.)*inv_calpha+dz*talpha; @@ -1269,9 +1269,7 @@ GeoPhysVol* EMECSupportConstruction::inner_envelope(void) const double fi=phi[i]*dphi; double cfi=cos(fi); double sfi=sin(fi); - physIACP->add(new GeoTransform(HepGeom::Transform3D( - CLHEP::HepRotationZ(fi), - CLHEP::Hep3Vector(r0*cfi,r0*sfi,0.)))); + physIACP->add(new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(r0*cfi,r0*sfi,0.)*GeoTrf::RotateZ3D(fi)))); physIACP->add(physIACAB); } @@ -1279,7 +1277,7 @@ GeoPhysVol* EMECSupportConstruction::inner_envelope(void) const for(int i=0;i<nofmodul;i++){ // put modules into wheel double fi=(i+0.5)*moduldphi; physIAC->add( new GeoIdentifierTag(i)); - physIAC->add( new GeoTransform(HepGeom::RotateZ3D(fi))); + physIAC->add( new GeoTransform(GeoTrf::RotateZ3D(fi))); physIAC->add(physIACP); } @@ -1289,9 +1287,9 @@ GeoPhysVol* EMECSupportConstruction::inner_envelope(void) const //!!!! GeoPhysVol* EMECSupportConstruction::middle_envelope(void) const { - double dMechFocaltoWRP = (*m_DB_EmecGeometry)[0]->getDouble("Z1") *CLHEP::cm; - double LArEMECHalfCrack = (*m_DB_EmecGeometry)[0]->getDouble("DCRACK") *CLHEP::cm; - double LArTotalThickness = (*m_DB_EmecGeometry)[0]->getDouble("ETOT") *CLHEP::cm; + double dMechFocaltoWRP = (*m_DB_EmecGeometry)[0]->getDouble("Z1") *GeoModelKernelUnits::cm; + double LArEMECHalfCrack = (*m_DB_EmecGeometry)[0]->getDouble("DCRACK") *GeoModelKernelUnits::cm; + double LArTotalThickness = (*m_DB_EmecGeometry)[0]->getDouble("ETOT") *GeoModelKernelUnits::cm; double eta_mid = (*m_DB_EmecWheelParameters)[0]->getDouble("ETAEXT"); @@ -1300,8 +1298,8 @@ GeoPhysVol* EMECSupportConstruction::middle_envelope(void) const const double inv_cosThetaMid = 1. / cosThetaMid; double z0 = LArTotalThickness * 0.5 + dMechFocaltoWRP; - double length = 462.*CLHEP::mm; - double rthickness = 1.5*CLHEP::mm * inv_cosThetaMid; + double length = 462.*GeoModelKernelUnits::mm; + double rthickness = 1.5*GeoModelKernelUnits::mm * inv_cosThetaMid; std::string name = m_BaseName + "InnerTransversalBars"; double dz = length * cosThetaMid * 0.5; @@ -1327,7 +1325,7 @@ void EMECSupportConstruction::put_front_middle_ring(GeoPhysVol *motherPhysical) GeoPcon *shapeFMR = getPcon(id); GeoLogVol *logicalFMR = new GeoLogVol(name, shapeFMR, m_PermaliE730); GeoPhysVol *physFMR = new GeoPhysVol(logicalFMR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physFMR); id = "FrontMiddleRing::LowerHole"; @@ -1369,7 +1367,7 @@ void EMECSupportConstruction::put_front_inner_ring(GeoPhysVol *motherPhysical) c GeoPcon *shapeFIR = getPcon(id); GeoLogVol *logicalFIR = new GeoLogVol(name, shapeFIR, m_Alu); GeoPhysVol *physFIR = new GeoPhysVol(logicalFIR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physFIR); id = "FrontInnerRing::Hole"; @@ -1402,7 +1400,7 @@ void EMECSupportConstruction::put_front_inner_longbar(GeoPhysVol *motherPhysical GeoTubs *shapeFILB = new GeoTubs(rmin, rmax, dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalFILB = new GeoLogVol(name,shapeFILB,m_Gten); GeoPhysVol *physFILB = new GeoPhysVol(logicalFILB); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physFILB); } @@ -1414,7 +1412,7 @@ void EMECSupportConstruction::put_back_middle_ring(GeoPhysVol *motherPhysical) c GeoPcon *shapeBMR = getPcon(id); GeoLogVol *logicalBMR = new GeoLogVol(name, shapeBMR, m_Alu); GeoPhysVol *physBMR = new GeoPhysVol(logicalBMR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physBMR); id = "BackMiddleRing::LowerHole"; @@ -1456,7 +1454,7 @@ void EMECSupportConstruction::put_back_inner_ring(GeoPhysVol *motherPhysical) co GeoPcon *shapeBIR = getPcon(id); GeoLogVol *logicalBIR = new GeoLogVol(name, shapeBIR, m_Alu); GeoPhysVol *physBIR = new GeoPhysVol(logicalBIR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physBIR); id = "BackInnerRing::Hole"; @@ -1488,7 +1486,7 @@ void EMECSupportConstruction::put_back_inner_longbar(GeoPhysVol *motherPhysical) GeoTubs *shapeBILB = new GeoTubs(rmin, rmax, dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalBILB = new GeoLogVol(name, shapeBILB, m_Gten); GeoPhysVol *physBILB = new GeoPhysVol(logicalBILB); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physBILB); } @@ -1500,7 +1498,7 @@ void EMECSupportConstruction::put_front_outer_ring(GeoPhysVol *motherPhysical) c GeoPcon *shapeFOR = getPcon(id); GeoLogVol *logicalFOR = new GeoLogVol(name, shapeFOR, m_Alu); GeoPhysVol *physFOR = new GeoPhysVol(logicalFOR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physFOR); } @@ -1512,7 +1510,7 @@ void EMECSupportConstruction::put_front_outer_longbar(GeoPhysVol *motherPhysical GeoPcon *shapeFOLB = getPcon(id); GeoLogVol *logicalFOLB = new GeoLogVol(name, shapeFOLB, m_Gten); GeoPhysVol *physFOLB = new GeoPhysVol(logicalFOLB); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physFOLB); } @@ -1539,14 +1537,14 @@ void EMECSupportConstruction::put_front_indexing_rings(GeoPhysVol *motherPhysica GeoTubs *shapeFHIR = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalFHIR = new GeoLogVol(name, shapeFHIR, m_Alu); GeoPhysVol *physFHIR = new GeoPhysVol(logicalFHIR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physFHIR); name = m_BaseName + "FrontHighRIndexingRing::Hole"; GeoTubs *shapeFHIRH = new GeoTubs(r0 + hole_rmin, r0 + hole_rmax, hole_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalFHIRH = new GeoLogVol(name, shapeFHIRH, m_LAr); GeoPhysVol *physFHIRH = new GeoPhysVol(logicalFHIRH); - physFHIR->add(new GeoTransform(HepGeom::TranslateZ3D(z_hole + hole_dz))); + physFHIR->add(new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz))); physFHIR->add(physFHIRH); // the piece of long.bar on which indexing alu ring is sitting @@ -1555,21 +1553,21 @@ void EMECSupportConstruction::put_front_indexing_rings(GeoPhysVol *motherPhysica GeoTubs *shapeFHIRG = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, gten_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalFHIRG = new GeoLogVol(name, shapeFHIRG, m_Gten); GeoPhysVol *physFHIRG = new GeoPhysVol(logicalFHIRG); - physFHIR->add(new GeoTransform(HepGeom::TranslateZ3D(ring_dz - gten_dz))); + physFHIR->add(new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz))); physFHIR->add(physFHIRG); name = m_BaseName + "FrontLowRIndexingRing"; GeoTubs *shapeFLIR = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalFLIR = new GeoLogVol(name, shapeFLIR, m_Alu); GeoPhysVol *physFLIR = new GeoPhysVol(logicalFLIR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physFLIR); name = m_BaseName + "FrontLowRIndexingRing::Hole"; GeoTubs *shapeFLIRH = new GeoTubs(r1 + hole_rmin, r1 + hole_rmax, hole_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalFLIRH = new GeoLogVol(name, shapeFLIRH, m_LAr); GeoPhysVol *physFLIRH = new GeoPhysVol(logicalFLIRH); - physFLIR->add(new GeoTransform(HepGeom::TranslateZ3D(z_hole + hole_dz))); + physFLIR->add(new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz))); physFLIR->add(physFLIRH); name = m_BaseName + "FrontLowRIndexingRing::GTen"; //piece of long.bar @@ -1577,7 +1575,7 @@ void EMECSupportConstruction::put_front_indexing_rings(GeoPhysVol *motherPhysica GeoTubs *shapeFLIRG = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, gten_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalFLIRG = new GeoLogVol(name, shapeFLIRG, m_Gten); GeoPhysVol *physFLIRG = new GeoPhysVol(logicalFLIRG); - physFLIR->add(new GeoTransform(HepGeom::TranslateZ3D(ring_dz - gten_dz))); + physFLIR->add(new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz))); physFLIR->add(physFLIRG); } @@ -1604,7 +1602,7 @@ void EMECSupportConstruction::put_back_indexing_rings(GeoPhysVol *motherPhysical GeoTubs *shapeBHIR = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalBHIR = new GeoLogVol(name, shapeBHIR, m_Alu); GeoPhysVol *physBHIR = new GeoPhysVol(logicalBHIR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physBHIR); // the piece of long.bar on which indexing alu ring is sitting @@ -1613,21 +1611,21 @@ void EMECSupportConstruction::put_back_indexing_rings(GeoPhysVol *motherPhysical GeoTubs *shapeBHIRG = new GeoTubs(r0 + ring_rmin, r0 + ring_rmax, gten_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalBHIRG = new GeoLogVol(name, shapeBHIRG, m_Gten); GeoPhysVol *physBHIRG = new GeoPhysVol(logicalBHIRG); - physBHIR->add(new GeoTransform(HepGeom::TranslateZ3D(ring_dz - gten_dz))); + physBHIR->add(new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz))); physBHIR->add(physBHIRG); name = m_BaseName + "BackHighRIndexingRing::Hole"; GeoTubs* shapeBHIRH = new GeoTubs(r0 + hole_rmin, r0 + hole_rmax, hole_dz, m_PhiStart, m_PhiSize); GeoLogVol* logicalBHIRH = new GeoLogVol(name, shapeBHIRH, m_LAr); GeoPhysVol* physBHIRH = new GeoPhysVol(logicalBHIRH); - physBHIR->add(new GeoTransform(HepGeom::TranslateZ3D(z_hole + hole_dz))); + physBHIR->add(new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz))); physBHIR->add(physBHIRH); name = m_BaseName + "BackLowRIndexingRing"; GeoTubs *shapeBLIR = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, ring_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalBLIR = new GeoLogVol(name, shapeBLIR, m_Alu); GeoPhysVol *physBLIR = new GeoPhysVol(logicalBLIR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physBLIR); name += "::GTen"; @@ -1635,14 +1633,14 @@ void EMECSupportConstruction::put_back_indexing_rings(GeoPhysVol *motherPhysical GeoTubs *shapeBLIRG = new GeoTubs(r1 + ring_rmin, r1 + ring_rmax, gten_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalBLIRG = new GeoLogVol(name, shapeBLIRG, m_Gten); GeoPhysVol *physBLIRG = new GeoPhysVol(logicalBLIRG); - physBLIR->add(new GeoTransform(HepGeom::TranslateZ3D(ring_dz - gten_dz))); + physBLIR->add(new GeoTransform(GeoTrf::TranslateZ3D(ring_dz - gten_dz))); physBLIR->add(physBLIRG); name = m_BaseName + "BackLowRIndexingRing::Hole"; GeoTubs *shapeBLIRH = new GeoTubs(r1 + hole_rmin, r1 + hole_rmax, hole_dz, m_PhiStart, m_PhiSize); GeoLogVol *logicalBLIRH = new GeoLogVol(name, shapeBLIRH, m_LAr); GeoPhysVol *physBLIRH = new GeoPhysVol(logicalBLIRH); - physBLIR->add(new GeoTransform(HepGeom::TranslateZ3D(z_hole + hole_dz))); + physBLIR->add(new GeoTransform(GeoTrf::TranslateZ3D(z_hole + hole_dz))); physBLIR->add(physBLIRH); } @@ -1654,7 +1652,7 @@ void EMECSupportConstruction::put_back_outer_ring(GeoPhysVol *motherPhysical) co GeoPcon *shapeBOR = getPcon(id); GeoLogVol *logicalBOR = new GeoLogVol(name, shapeBOR, m_Alu); GeoPhysVol *physBOR = new GeoPhysVol(logicalBOR); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physBOR); } @@ -1666,7 +1664,7 @@ void EMECSupportConstruction::put_back_outer_longbar(GeoPhysVol *motherPhysical) GeoPcon *shapeBOLB = getPcon(id); GeoLogVol *logicalBOLB = new GeoLogVol(name, shapeBOLB, m_Gten); GeoPhysVol *physBOLB = new GeoPhysVol(logicalBOLB); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(z0))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(z0))); motherPhysical->add(physBOLB); } @@ -1709,7 +1707,7 @@ void EMECSupportConstruction::put_front_outer_extracyl(GeoPhysVol *motherPhysica GeoLogVol *logicCyl = new GeoLogVol(name, solidCyl, mat); GeoPhysVol *physCyl = new GeoPhysVol(logicCyl); - motherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(dz/2.))); + motherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(dz/2.))); motherPhysical->add(physCyl); std::cout<<"******************************************************"<<std::endl; @@ -1799,7 +1797,7 @@ void EMECSupportConstruction::put_front_outer_electronics(GeoPhysVol *motherPhys GeoBox *cu = new GeoBox(dx, dy, dz1); GeoLogVol *cul = new GeoLogVol(name, cu, m_Copper); GeoPhysVol *cup = new GeoPhysVol(cul); - mb_p[i]->add(new GeoTransform(HepGeom::TranslateZ3D(dz1 - mb_dz[i]))); + mb_p[i]->add(new GeoTransform(GeoTrf::TranslateZ3D(dz1 - mb_dz[i]))); mb_p[i]->add(cup); tmp.str(""); @@ -1837,10 +1835,8 @@ void EMECSupportConstruction::put_front_outer_electronics(GeoPhysVol *motherPhys double phi = m_Position + (i - 2) * phi_size - phi_start; GeoIdentifierTag* iTag = new GeoIdentifierTag(i); - GeoTransform* xf = new GeoTransform( - HepGeom::Transform3D(CLHEP::HepRotationZ(phi),CLHEP::Hep3Vector(0., 0., z_boards))); - GeoTransform* xf1 = new GeoTransform( - HepGeom::Transform3D(CLHEP::HepRotationZ(phi),CLHEP::Hep3Vector(0., 0., z_oc))); + GeoTransform* xf = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_boards)*GeoTrf::Transform3D(GeoTrf::RotateZ3D(phi)))); + GeoTransform* xf1 = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_oc)*GeoTrf::RotateZ3D(phi))); motherPhysical->add(iTag); motherPhysical->add(xf); @@ -1860,19 +1856,15 @@ void EMECSupportConstruction::put_front_outer_electronics(GeoPhysVol *motherPhys for(int j = 0; j < 5; ++ j){ GeoTransform* xf2 = new GeoTransform( - HepGeom::Transform3D(HepGeom::RotateZ3D(phi)*HepGeom::Translate3D(mb_r[j], 0., z_mb - mb_dz[j]))); + GeoTrf::Transform3D(GeoTrf::RotateZ3D(phi)*GeoTrf::Translate3D(mb_r[j], 0., z_mb - mb_dz[j]))); motherPhysical->add(iTag); motherPhysical->add(xf2); motherPhysical->add(mb_p[j]); } - GeoTransform* xf3 = new GeoTransform( - HepGeom::Transform3D(CLHEP::HepRotationZ(m_Position + (i - 2) * phi_size + 0.5 * dphi_sc), - CLHEP::Hep3Vector(0., 0., z_soc))); + GeoTransform* xf3 = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_soc)*GeoTrf::RotateZ3D(m_Position + (i - 2) * phi_size + 0.5 * dphi_sc)));; - GeoTransform* xf4 = new GeoTransform( - HepGeom::Transform3D(CLHEP::HepRotationZ(m_Position + (i - 1) * phi_size - 0.5 * dphi_sc), - CLHEP::Hep3Vector(0., 0., z_soc))); + GeoTransform* xf4 = new GeoTransform(GeoTrf::Transform3D(GeoTrf::Translate3D(0., 0., z_soc)*GeoTrf::RotateZ3D(m_Position + (i - 1) * phi_size - 0.5 * dphi_sc))); motherPhysical->add(new GeoIdentifierTag(i * 2)); motherPhysical->add(xf3); diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapCryostatConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapCryostatConstruction.cxx index 36e803b82e2..50a89f47d88 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapCryostatConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapCryostatConstruction.cxx @@ -32,6 +32,8 @@ #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoXF.h" #include "GeoModelKernel/GeoSerialTransformer.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -41,17 +43,10 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" - -// For transforms: - -#include "CLHEP/Geometry/Transform3D.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" // For the database: - #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" @@ -75,7 +70,7 @@ #include "LArGeoMiniFcal/MiniFcalConstruction.h" -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; @@ -304,18 +299,18 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) if(currentRecord->getString("CYL_LOCATION")=="Endcap"){ if(cylNumber == 3 ) { - rmin_warm=currentRecord->getDouble("RMIN")*CLHEP::cm; - rmax_warm=currentRecord->getDouble("RMIN")*CLHEP::cm + currentRecord->getDouble("DR")*CLHEP::cm; - dz_warm=currentRecord->getDouble("DZ")*CLHEP::cm / 2.; - zInCryostat_warm = currentRecord->getDouble("ZMIN")*CLHEP::cm + currentRecord->getDouble("DZ")*CLHEP::cm / 2.; + rmin_warm=currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm; + rmax_warm=currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DR")*GeoModelKernelUnits::cm; + dz_warm=currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2.; + zInCryostat_warm = currentRecord->getDouble("ZMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2.; wallfind=wallfind+1; } if(cylNumber == 14 ) { - rmin_cold=currentRecord->getDouble("RMIN")*CLHEP::cm; - rmax_cold=currentRecord->getDouble("RMIN")*CLHEP::cm + currentRecord->getDouble("DR")*CLHEP::cm; - dz_cold=currentRecord->getDouble("DZ")*CLHEP::cm / 2.; - zInCryostat_cold = currentRecord->getDouble("ZMIN")*CLHEP::cm + currentRecord->getDouble("DZ")*CLHEP::cm / 2.; + rmin_cold=currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm; + rmax_cold=currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DR")*GeoModelKernelUnits::cm; + dz_cold=currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2.; + zInCryostat_cold = currentRecord->getDouble("ZMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2.; wallfind=wallfind+1; } } @@ -343,7 +338,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) const GeoLogVol *logicCyl = new GeoLogVol(cylName,solidCyl,mat); GeoPhysVol *physCyl = new GeoPhysVol(logicCyl); - cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zpos))); + cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zpos))); cryoMotherPhysical->add(physCyl); std::cout<<"**************************************************"<<std::endl; @@ -393,11 +388,11 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) } GeoTubs* solidCyl - = new GeoTubs(currentRecord->getDouble("RMIN")*CLHEP::cm, - currentRecord->getDouble("RMIN")*CLHEP::cm + currentRecord->getDouble("DR")*CLHEP::cm, - currentRecord->getDouble("DZ")*CLHEP::cm / 2., + = new GeoTubs(currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm, + currentRecord->getDouble("RMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DR")*GeoModelKernelUnits::cm, + currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2., (double) 0., - (double) 2.*M_PI*CLHEP::rad); + (double) 2.*M_PI*GeoModelKernelUnits::rad); const GeoMaterial *material = materialManager->getMaterial(currentRecord->getString("MATERIAL")); if (!material) { @@ -412,7 +407,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) GeoPhysVol* physCyl = new GeoPhysVol(logicCyl); - double zInCryostat = currentRecord->getDouble("ZMIN")*CLHEP::cm + currentRecord->getDouble("DZ")*CLHEP::cm / 2.; + double zInCryostat = currentRecord->getDouble("ZMIN")*GeoModelKernelUnits::cm + currentRecord->getDouble("DZ")*GeoModelKernelUnits::cm / 2.; // Don't move the pump even if the rest of the cryostat moves. //if ( cylNumber == 33 ) zInCryostat -= zEmec; @@ -420,7 +415,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) // Place each cylinder. cryoMotherPhysical->add(new GeoIdentifierTag(cylNumber)); - cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zInCryostat))); + cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zInCryostat))); // Front cold wall of Cryostat is a mother for Endcap Presampler if ( cylNumber == 14 ) { @@ -432,13 +427,13 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) GeoFullPhysVol* emecPSEnvelope = endcapPresamplerConstruction.Envelope(); if ( emecPSEnvelope != 0 ) { // Get the position of the presampler from the geometry helper. - double Zpos = 30.5*CLHEP::mm; + double Zpos = 30.5*GeoModelKernelUnits::mm; // It is highly debateable whether the endcap presampler is // alignable, but in any case we shall not align it here because // we need to completely redo it, anyway, since it does not // even live "in" this volume, not in real life anyway. - GeoTransform *xfPs = new GeoTransform(HepGeom::TranslateZ3D(Zpos)); + GeoTransform *xfPs = new GeoTransform(GeoTrf::TranslateZ3D(Zpos)); physCyl->add(xfPs); physCyl->add( emecPSEnvelope ); @@ -553,7 +548,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) //=> const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(larPosition, bPos ? "EMEC_POS":"EMEC_NEG"); if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); GeoAlignableTransform *xfEmec = new GeoAlignableTransform(xfPos); std::string tag = bPos? std::string("EMEC_POS") : std::string("EMEC_NEG"); @@ -586,7 +581,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) //--- Make the Front Wheel alignable: const IRDBRecord *posHec1 = GeoDBUtils::getTransformRecord(larPosition, bPos ? "HEC1_POS":"HEC1_NEG"); - HepGeom::Transform3D xfPosHec1 = posHec1 ? GeoDBUtils::getTransform(posHec1) : HepGeom::Translate3D(0.,0.,-2423.0); + GeoTrf::Transform3D xfPosHec1 = posHec1 ? GeoDBUtils::getTransform(posHec1) : GeoTrf::Translate3D(0.,0.,-2423.0); GeoAlignableTransform *xfHec1 = new GeoAlignableTransform(xfPosHec1); std::string tag1 = bPos? std::string("HEC1_POS") : std::string("HEC1_NEG"); @@ -611,7 +606,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) GeoFullPhysVol* EnvelopeR = rearHEC.GetEnvelope(); const IRDBRecord *posHec2 = GeoDBUtils::getTransformRecord(larPosition, bPos ? "HEC2_POS":"HEC2_NEG"); - HepGeom::Transform3D xfPosHec2 = posHec2 ? GeoDBUtils::getTransform(posHec2) : HepGeom::Translate3D(0.,0.,-1566.0); + GeoTrf::Transform3D xfPosHec2 = posHec2 ? GeoDBUtils::getTransform(posHec2) : GeoTrf::Translate3D(0.,0.,-1566.0); GeoAlignableTransform *xfHec2 = new GeoAlignableTransform(xfPosHec2); std::string tag2 = bPos? std::string("HEC2_POS") : std::string("HEC2_NEG"); @@ -655,7 +650,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) // Get default values for alignable transform deltas from SubdetPosHelper const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(larPosition, tag); if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); GeoAlignableTransform *fcalXF = new GeoAlignableTransform(xfPos); StatusCode status; @@ -674,7 +669,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) // Place the FCAL modules. cryoMotherPhysical->add(fcalXF); - cryoMotherPhysical->add( new GeoTransform( HepGeom::TranslateZ3D(tubs->getZHalfLength()) ) ); + cryoMotherPhysical->add( new GeoTransform( GeoTrf::TranslateZ3D(tubs->getZHalfLength()) ) ); cryoMotherPhysical->add( fcalEnvelope ); @@ -732,10 +727,10 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) } // Build mother volume - double rminMM = (*itMother)->getDouble("RMIN")*CLHEP::mm; - double rmaxMM = (*itMother)->getDouble("RMAX")*CLHEP::mm; - double dzMM = (*itMother)->getDouble("DZ")*CLHEP::mm; - zposMM = (*itMother)->getDouble("ZPOS")*CLHEP::mm; + double rminMM = (*itMother)->getDouble("RMIN")*GeoModelKernelUnits::mm; + double rmaxMM = (*itMother)->getDouble("RMAX")*GeoModelKernelUnits::mm; + double dzMM = (*itMother)->getDouble("DZ")*GeoModelKernelUnits::mm; + zposMM = (*itMother)->getDouble("ZPOS")*GeoModelKernelUnits::mm; const GeoMaterial *matMM = materialManager->getMaterial((*itMother)->getString("MATERIAL")); @@ -744,8 +739,8 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) GeoTube *tubeJM=NULL; const GeoShape *solidMM=NULL; if (itTube!=mbtsTubs->end()) { - double dzMod = (*itTube)->getDouble("DZ")*CLHEP::mm; - double rMaxMod = (*itTube)->getDouble("RMAX")*CLHEP::mm; + double dzMod = (*itTube)->getDouble("DZ")*GeoModelKernelUnits::mm; + double rMaxMod = (*itTube)->getDouble("RMAX")*GeoModelKernelUnits::mm; GeoPcon *pcon = new GeoPcon(0,2*M_PI); pcon->addPlane(-dzMM,rminMM,rmaxMM); @@ -761,14 +756,14 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) GeoLogVol* lvMM = new GeoLogVol("MBTS_mother",solidMM,matMM); pvMM = new GeoPhysVol(lvMM); - cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zposMM))); + cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposMM))); cryoMotherPhysical->add(pvMM); // Moderator cylinder - //double rminMod = (*itModerator)->getDouble("RMIN")*CLHEP::mm; - //double rmaxMod = (*itModerator)->getDouble("RMAX")*CLHEP::mm; - double dzMod = (*itModerator)->getDouble("DZ")*CLHEP::mm; - double zposMod = (*itModerator)->getDouble("ZPOS")*CLHEP::mm; + //double rminMod = (*itModerator)->getDouble("RMIN")*GeoModelKernelUnits::mm; + //double rmaxMod = (*itModerator)->getDouble("RMAX")*GeoModelKernelUnits::mm; + double dzMod = (*itModerator)->getDouble("DZ")*GeoModelKernelUnits::mm; + double zposMod = (*itModerator)->getDouble("ZPOS")*GeoModelKernelUnits::mm; const GeoMaterial *matMod = materialManager->getMaterial((*itModerator)->getString("MATERIAL")); @@ -776,14 +771,14 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) GeoLogVol* lvMod = new GeoLogVol("Moderator",solidMod, matMod); GeoPhysVol* pvMod = new GeoPhysVol(lvMod); - pvMM->add(new GeoTransform(HepGeom::TranslateZ3D(zposMod))); + pvMM->add(new GeoTransform(GeoTrf::TranslateZ3D(zposMod))); pvMM->add(pvMod); if (tubeJM) { GeoLogVol* lvMod = new GeoLogVol("ModeratorTube",tubeJM, matMod); GeoPhysVol* pvMod = new GeoPhysVol(lvMod); - pvMM->add(new GeoTransform(HepGeom::TranslateZ3D(tubeMM->getZHalfLength()+tubeJM->getZHalfLength()))); + pvMM->add(new GeoTransform(GeoTrf::TranslateZ3D(tubeMM->getZHalfLength()+tubeJM->getZHalfLength()))); pvMM->add(pvMod); } tubeMM->ref(); tubeMM->unref(); @@ -845,7 +840,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) pvMM = new GeoPhysVol(lvMM); zposMM = zStartCryoMother - zStartMM; - cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zposMM))); + cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zposMM))); cryoMotherPhysical->add(pvMM); // Extra tube for the moderator: @@ -858,7 +853,7 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) GeoLogVol* lvJM = new GeoLogVol("ModeratorJMTube",tubeJM, matJM); GeoPhysVol* pvJM = new GeoPhysVol(lvJM); - pvMM->add(new GeoTransform(HepGeom::TranslateZ3D((*mbtsTubs)[0]->getDouble("ZPOS")))); + pvMM->add(new GeoTransform(GeoTrf::TranslateZ3D((*mbtsTubs)[0]->getDouble("ZPOS")))); pvMM->add(pvJM); // Moderator+JM polycone @@ -875,13 +870,13 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) const IRDBRecord* curScin = (*mbtsScin)[scinId]; int nScin = curScin->getInt("SCINNUM"); - double dx1Scin = curScin->getDouble("DX1")*CLHEP::mm; - double dx2Scin = curScin->getDouble("DX2")*CLHEP::mm; - double dy1Scin = curScin->getDouble("DY1")*CLHEP::mm; - double dy2Scin = curScin->getDouble("DY2")*CLHEP::mm; - double dzScin = curScin->getDouble("DZ")*CLHEP::mm; - double zposScin = curScin->getDouble("ZPOS")*CLHEP::mm; - double rposScin = curScin->getDouble("RPOS")*CLHEP::mm; + double dx1Scin = curScin->getDouble("DX1")*GeoModelKernelUnits::mm; + double dx2Scin = curScin->getDouble("DX2")*GeoModelKernelUnits::mm; + double dy1Scin = curScin->getDouble("DY1")*GeoModelKernelUnits::mm; + double dy2Scin = curScin->getDouble("DY2")*GeoModelKernelUnits::mm; + double dzScin = curScin->getDouble("DZ")*GeoModelKernelUnits::mm; + double zposScin = curScin->getDouble("ZPOS")*GeoModelKernelUnits::mm; + double rposScin = curScin->getDouble("RPOS")*GeoModelKernelUnits::mm; double startPhi = 0.; try { @@ -906,12 +901,12 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) GeoSerialTransformer* stScin = 0; if(bPos) { - GENFUNCTION phiInd = deltaPhi*(varInd + startPhi)*CLHEP::deg; - TRANSFUNCTION xfScin = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateZ3D(zposScin)*HepGeom::TranslateX3D(rposScin)*HepGeom::RotateY3D(90*CLHEP::deg); + GENFUNCTION phiInd = deltaPhi*(varInd + startPhi)*GeoModelKernelUnits::deg; + TRANSFUNCTION xfScin = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateZ3D(zposScin)*GeoTrf::TranslateX3D(rposScin)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); stScin = new GeoSerialTransformer(pvScin,&xfScin,nScin); } else { - GENFUNCTION phiInd = (180 - deltaPhi*(varInd + startPhi))*CLHEP::deg; - TRANSFUNCTION xfScin = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateZ3D(zposScin)*HepGeom::TranslateX3D(rposScin)*HepGeom::RotateY3D(90*CLHEP::deg); + GENFUNCTION phiInd = (180 - deltaPhi*(varInd + startPhi))*GeoModelKernelUnits::deg; + TRANSFUNCTION xfScin = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateZ3D(zposScin)*GeoTrf::TranslateX3D(rposScin)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); stScin = new GeoSerialTransformer(pvScin,&xfScin,nScin); } @@ -971,12 +966,12 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) Variable varInd; GeoSerialTransformer* stAirEnv = 0; if(bPos) { - GENFUNCTION phiInd = deltaPhi*(varInd + startPhi)*CLHEP::deg; - TRANSFUNCTION xfAirEnv = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateZ3D(zposAirEnv)*HepGeom::TranslateX3D(rposAirEnv)*HepGeom::RotateY3D(90*CLHEP::deg); + GENFUNCTION phiInd = deltaPhi*(varInd + startPhi)*GeoModelKernelUnits::deg; + TRANSFUNCTION xfAirEnv = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateZ3D(zposAirEnv)*GeoTrf::TranslateX3D(rposAirEnv)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); stAirEnv = new GeoSerialTransformer(pvAirEnv,&xfAirEnv,nAirEnv); } else { - GENFUNCTION phiInd = (180 - deltaPhi*(varInd + startPhi))*CLHEP::deg; - TRANSFUNCTION xfAirEnv = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateZ3D(zposAirEnv)*HepGeom::TranslateX3D(rposAirEnv)*HepGeom::RotateY3D(90*CLHEP::deg); + GENFUNCTION phiInd = (180 - deltaPhi*(varInd + startPhi))*GeoModelKernelUnits::deg; + TRANSFUNCTION xfAirEnv = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateZ3D(zposAirEnv)*GeoTrf::TranslateX3D(rposAirEnv)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); stAirEnv = new GeoSerialTransformer(pvAirEnv,&xfAirEnv,nAirEnv); } @@ -1000,8 +995,8 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) IRDBRecordset_ptr larPosition = m_pAccessSvc->getRecordsetPtr("LArPosition",detectorKey, detectorNode); const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(larPosition, "LARCRYO_EC_POS"); if(!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); - double globalZMM = xfPos.getTranslation().z() + zposMM; + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + double globalZMM = xfPos.translation().z() + zposMM; // Create MBTS manager MbtsDetDescrManager* mbtsManager = new MbtsDetDescrManager(); @@ -1020,15 +1015,15 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) nScin = curScin->getInt("SCINNUM"); eta = curScin->getInt("SCIN_ID")-1; - dx1Scin = curScin->getDouble("DX1")*CLHEP::mm; - dzScin = curScin->getDouble("DZ")*CLHEP::mm; - zposScin = curScin->getDouble("ZPOS")*CLHEP::mm; - rposScin = curScin->getDouble("RPOS")*CLHEP::mm; + dx1Scin = curScin->getDouble("DX1")*GeoModelKernelUnits::mm; + dzScin = curScin->getDouble("DZ")*GeoModelKernelUnits::mm; + zposScin = curScin->getDouble("ZPOS")*GeoModelKernelUnits::mm; + rposScin = curScin->getDouble("RPOS")*GeoModelKernelUnits::mm; if(!curScin->isFieldNull("ETA")) scineta = curScin->getDouble("ETA"); if(!curScin->isFieldNull("DETA")) scindeta = curScin->getDouble("DETA"); - deltaPhi = 360.*CLHEP::deg/nScin; + deltaPhi = 360.*GeoModelKernelUnits::deg/nScin; try { if(!curScin->isFieldNull("STARTPHI")) startPhi = curScin->getDouble("STARTPHI"); @@ -1041,14 +1036,14 @@ GeoFullPhysVol* LArGeo::EndcapCryostatConstruction::createEnvelope(bool bPos) const IRDBRecord* curScin = (*mbtsTrds)[trdMap[scinName]]; nScin = (*mbtsGen)[0]->getInt("NSCIN"); eta = curScin->getInt("SCIN_ID")-1; - dx1Scin = curScin->getDouble("DX1")*CLHEP::mm; - dzScin = curScin->getDouble("DZ")*CLHEP::mm; - zposScin = (*mbtsGen)[0]->getDouble("ZPOSENV")*CLHEP::mm; - rposScin = ((*mbtsGen)[0]->getDouble("RPOSENV")+curScin->getDouble("ZPOS"))*CLHEP::mm; + dx1Scin = curScin->getDouble("DX1")*GeoModelKernelUnits::mm; + dzScin = curScin->getDouble("DZ")*GeoModelKernelUnits::mm; + zposScin = (*mbtsGen)[0]->getDouble("ZPOSENV")*GeoModelKernelUnits::mm; + rposScin = ((*mbtsGen)[0]->getDouble("RPOSENV")+curScin->getDouble("ZPOS"))*GeoModelKernelUnits::mm; scineta = curScin->getDouble("ETA"); scindeta = curScin->getDouble("DETA"); startPhi = (*mbtsGen)[0]->getDouble("STARTPHI"); - deltaPhi = 360.*CLHEP::deg/nScin; + deltaPhi = 360.*GeoModelKernelUnits::deg/nScin; } for(int phi=0; phi<nScin; phi++) { @@ -1104,7 +1099,7 @@ GeoPhysVol* LArGeo::EndcapCryostatConstruction::buildMbtsTrd(const IRDBRecord* r double xpos = rec->getDouble("XPOS"); double ypos = rec->getDouble("YPOS"); double zpos = rec->getDouble("ZPOS"); - parent->add(new GeoTransform(HepGeom::TranslateZ3D(zpos)*HepGeom::TranslateY3D(ypos)*HepGeom::TranslateX3D(xpos))); + parent->add(new GeoTransform(GeoTrf::TranslateZ3D(zpos)*GeoTrf::TranslateY3D(ypos)*GeoTrf::TranslateX3D(xpos))); parent->add(pv); } return pv; diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapDMConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapDMConstruction.cxx index 75f1f7af961..768040c298b 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapDMConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapDMConstruction.cxx @@ -22,6 +22,8 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoShapeSubtraction.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelUtilities/DecodeVersionKey.h" @@ -30,10 +32,7 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBRecord.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoGenericFunctions/Variable.h" // *********************************************************************** // @@ -108,8 +107,8 @@ void LArGeo::EndcapDMConstruction::create(GeoFullPhysVol* envelope) unsigned int recordIndex; // Get materials - const GeoMaterial *alu = materialManager->getMaterial("std::Aluminium"); //2.7 CLHEP::g/CLHEP::cm3 - const GeoMaterial* matBoardsEnvelope = materialManager->getMaterial("LAr::BoardsEnvelope");// 0.932*CLHEP::gram/CLHEP::cm3); + const GeoMaterial *alu = materialManager->getMaterial("std::Aluminium"); //2.7 GeoModelKernelUnits::g/GeoModelKernelUnits::cm3 + const GeoMaterial* matBoardsEnvelope = materialManager->getMaterial("LAr::BoardsEnvelope");// 0.932*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); ////----------- Building Front-end crates -------------------- recordIndex = tubeMap["Ped2"]; @@ -186,9 +185,9 @@ void LArGeo::EndcapDMConstruction::create(GeoFullPhysVol* envelope) GeoTube *Ped2 = new GeoTube(ped2minr, ped2maxr, ped2zhlen); GeoTube *Ped3 = new GeoTube(ped3minr,ped3maxr , ped3zhlen); const GeoShape & CratePed=((*Pedestal).subtract(*Ped1). - subtract((*Ped2) <<HepGeom::TranslateY3D(-ped2ytr)*HepGeom::RotateY3D(90*CLHEP::deg)). - subtract((*Ped3) <<HepGeom::TranslateX3D(-ped3xtr)). - subtract((*Ped2) <<HepGeom::TranslateY3D(ped2ytr)*HepGeom::RotateY3D(90*CLHEP::deg))); + subtract((*Ped2) <<GeoTrf::TranslateY3D(-ped2ytr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)). + subtract((*Ped3) <<GeoTrf::TranslateX3D(-ped3xtr)). + subtract((*Ped2) <<GeoTrf::TranslateY3D(ped2ytr)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg))); GeoLogVol *lvped = new GeoLogVol("LAr::DM::Ped",&CratePed,alu); GeoPhysVol *pedestal = new GeoPhysVol(lvped); @@ -197,7 +196,7 @@ void LArGeo::EndcapDMConstruction::create(GeoFullPhysVol* envelope) GeoBox *Crate1 = new GeoBox(crate1hlen, crate1hwdt, crate1hhgt-epsilon); GeoBox *Crate2 = new GeoBox(crate2hlen, crate2hwdt, crate2hhgt-epsilon); GeoBox *Crate3 = new GeoBox(crate3hlen, crate3hwdt, crate3hhgt-epsilon); - const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<HepGeom::TranslateX3D(-crate3xtr)); + const GeoShape & FEBCrate=(*Crate1).subtract(*Crate2).add((*Crate3) <<GeoTrf::TranslateX3D(-crate3xtr)); GeoLogVol *lvcrate = new GeoLogVol("LAr::DM::Crate",&FEBCrate,alu); GeoPhysVol *crate = new GeoPhysVol(lvcrate); @@ -208,14 +207,14 @@ void LArGeo::EndcapDMConstruction::create(GeoFullPhysVol* envelope) GeoPhysVol *boardenvelope = new GeoPhysVol(lvbenv); //-------------- Place volumes in envelope ---------------------------- - GeoTransform* xfCrateBase(new GeoTransform(HepGeom::TranslateX3D(crate1xtr)*HepGeom::TranslateZ3D(crate1ztr))); - GeoTransform* xfPedestBase(new GeoTransform(HepGeom::TranslateX3D(pedestxtr)*HepGeom::TranslateZ3D(pedestztr))); - GeoTransform* xfBoardEBase1(new GeoTransform(HepGeom::TranslateY3D(BoardEytr)*HepGeom::TranslateX3D(BoardExtr)*HepGeom::TranslateZ3D(BoardEztr))); - GeoTransform* xfBoardEBase2(new GeoTransform(HepGeom::TranslateY3D(-BoardEytr)*HepGeom::TranslateX3D(BoardExtr)*HepGeom::TranslateZ3D(BoardEztr))); + GeoTransform* xfCrateBase(new GeoTransform(GeoTrf::TranslateX3D(crate1xtr)*GeoTrf::TranslateZ3D(crate1ztr))); + GeoTransform* xfPedestBase(new GeoTransform(GeoTrf::TranslateX3D(pedestxtr)*GeoTrf::TranslateZ3D(pedestztr))); + GeoTransform* xfBoardEBase1(new GeoTransform(GeoTrf::TranslateY3D(BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr))); + GeoTransform* xfBoardEBase2(new GeoTransform(GeoTrf::TranslateY3D(-BoardEytr)*GeoTrf::TranslateX3D(BoardExtr)*GeoTrf::TranslateZ3D(BoardEztr))); for(unsigned i(0); i<LArEndcapCratePhiPos->size(); ++i) { - double phiPos = (*LArEndcapCratePhiPos)[i]->getDouble("PHIPOS")*CLHEP::deg; - GeoTransform* xfPhiPos(new GeoTransform(HepGeom::RotateZ3D(phiPos))); + double phiPos = (*LArEndcapCratePhiPos)[i]->getDouble("PHIPOS")*GeoModelKernelUnits::deg; + GeoTransform* xfPhiPos(new GeoTransform(GeoTrf::RotateZ3D(phiPos))); envelope->add(xfPhiPos); envelope->add(xfCrateBase); @@ -242,7 +241,7 @@ void LArGeo::EndcapDMConstruction::create(GeoFullPhysVol* envelope) GeoTube* endcapTube = new GeoTube((*EndcapDMTubes)[i]->getDouble("RMIN"),(*EndcapDMTubes)[i]->getDouble("RMAX"),(*EndcapDMTubes)[i]->getDouble("DZ")); GeoLogVol* endcapTubeLv = new GeoLogVol((*EndcapDMTubes)[i]->getString("TUBENAME"),endcapTube,matECServices); GeoPhysVol* endcapTubePv = new GeoPhysVol(endcapTubeLv); - envelope->add(new GeoTransform(HepGeom::TranslateZ3D((*EndcapDMTubes)[i]->getDouble("ZPOS")))); + envelope->add(new GeoTransform(GeoTrf::TranslateZ3D((*EndcapDMTubes)[i]->getDouble("ZPOS")))); envelope->add(endcapTubePv); } } diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapDMConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapDMConstruction.h index 307de66ecf9..cb82f1a8801 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapDMConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapDMConstruction.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef __EndcapDMConstruction_H__ -#define __EndcapDMConstruction_H__ +#ifndef LARGEOENDCAP_ENDCAPDMCONSTRUCTION_H +#define LARGEOENDCAP_ENDCAPDMCONSTRUCTION_H class GeoFullPhysVol; diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapPresamplerConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapPresamplerConstruction.cxx index 727960b3b20..b89f9c4d31c 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapPresamplerConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapPresamplerConstruction.cxx @@ -12,18 +12,14 @@ #include "GeoModelKernel/GeoTubs.h" #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -// For transforms: - -#include "CLHEP/Geometry/Transform3D.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" - #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/Bootstrap.h" @@ -107,14 +103,14 @@ GeoFullPhysVol* EndcapPresamplerConstruction::Envelope() /////////////////////////////////////////////////////////////////// // LAr Endcap Presampler GEOMETRY /////////////////////////////////////////////////////////////////// - double Rmin = 1231.74*CLHEP::mm; - double Rmax = 1701.98*CLHEP::mm; - double HalfZ = ((*presamplerPosition)[0]->getDouble("TCK")/2.)*CLHEP::cm; + double Rmin = 1231.74*GeoModelKernelUnits::mm; + double Rmax = 1701.98*GeoModelKernelUnits::mm; + double HalfZ = ((*presamplerPosition)[0]->getDouble("TCK")/2.)*GeoModelKernelUnits::cm; std::string name = "LAr::Endcap::Presampler::LiquidArgon"; - double phi_size = 360.*CLHEP::deg; + double phi_size = 360.*GeoModelKernelUnits::deg; double start_phi = 0.; if( m_isModule ){ diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapPresamplerGeometryHelper.cxx b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapPresamplerGeometryHelper.cxx index 835dbcc6e26..df188ef3622 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapPresamplerGeometryHelper.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/src/EndcapPresamplerGeometryHelper.cxx @@ -11,12 +11,10 @@ // 2-July-2003 Mikhail Leltchouk: local coordinates for determination // of etaBin, phiBin at any Endcap Presamplerposition. +#include "GeoModelKernel/Units.h" #include "LArGeoEndcap/EndcapPresamplerGeometryHelper.h" #include "LArGeoCode/VDetectorParameters.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" - #include <cmath> #include <string> #include <iostream> @@ -50,22 +48,22 @@ double LArGeo::EndcapPresamplerGeometryHelper::GetValue(const kValue a_valueType switch (a_valueType) { case rMinEndcapPresampler: - //return 1231.74 * CLHEP::mm; + //return 1231.74 * GeoModelKernelUnits::mm; return m_parameters->GetValue("LArEMECPreMinRadius"); break; case rMaxEndcapPresampler: - //return 1701.98 * CLHEP::mm; + //return 1701.98 * GeoModelKernelUnits::mm; return m_parameters->GetValue("LArEMECPreMaxRadius"); break; // At nominal (zShift=0) endcap position absolute z-coordinates: // of the faces of the EndcapPresampler case zEndcapPresamplerFrontFace: - //return 3622. * CLHEP::mm; + //return 3622. * GeoModelKernelUnits::mm; return (m_parameters->GetValue("LArEMECPreNomPos") - GetValue(EndcapPresamplerHalfThickness)); break; case zEndcapPresamplerBackFace: - //return 3626. * CLHEP::mm; + //return 3626. * GeoModelKernelUnits::mm; return (m_parameters->GetValue("LArEMECPreNomPos") + GetValue(EndcapPresamplerHalfThickness)); break; @@ -75,8 +73,8 @@ double LArGeo::EndcapPresamplerGeometryHelper::GetValue(const kValue a_valueType break; case EndcapPresamplerZpositionInMother: // between cold wall center and presampler center which is at - // 3624 CLHEP::mm nominal (zShift=0) absolute position - return 30.5 * CLHEP::mm; + // 3624 GeoModelKernelUnits::mm nominal (zShift=0) absolute position + return 30.5 * GeoModelKernelUnits::mm; break; default: std::cerr << "EndcapPresamplerGeometryHelper::GetValue -- type '" diff --git a/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt index 0a00338f74c..f94aca8be35 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( LArGeoFcal ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelKernel PRIVATE Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces @@ -18,8 +17,9 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # tag NEEDS_CORAL_BASE was not recognized in automatic conversion in cmt2cmake @@ -27,9 +27,8 @@ find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) atlas_add_library( LArGeoFcal src/*.cxx PUBLIC_HEADERS LArGeoFcal - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} GeoModelKernel StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel LArReadoutGeometry ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${GEOMODEL_NCLUDE_DIR} + PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} StoreGateLib SGtests + PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoModelUtilities GaudiKernel LArReadoutGeometry ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoFcal/src/FCALConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoFcal/src/FCALConstruction.cxx index a5cea07bfc3..90b09c85679 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoFcal/src/FCALConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoFcal/src/FCALConstruction.cxx @@ -22,6 +22,8 @@ #include "GeoModelKernel/GeoCons.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTrap.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -30,20 +32,15 @@ #include "GeoModelUtilities/StoredAlignX.h" #include "GeoModelUtilities/GeoDBUtils.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" // For functions: -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/ArrayFunction.hh" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/ArrayFunction.h" #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBQuery.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/Bootstrap.h" @@ -166,9 +163,9 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) std::string baseName = "LAr::FCAL::"; - double startZFCal1 = (*m_fcalMod)[0]->getDouble("STARTPOSITION"); //466.85 * CLHEP::cm; - //double startZFCal2 = (*m_fcalMod)[1]->getDouble("STARTPOSITION"); //512.83 * CLHEP::cm; - double startZFCal3 = (*m_fcalMod)[2]->getDouble("STARTPOSITION"); //560.28 * CLHEP::cm; + double startZFCal1 = (*m_fcalMod)[0]->getDouble("STARTPOSITION"); //466.85 * GeoModelKernelUnits::cm; + //double startZFCal2 = (*m_fcalMod)[1]->getDouble("STARTPOSITION"); //512.83 * GeoModelKernelUnits::cm; + double startZFCal3 = (*m_fcalMod)[2]->getDouble("STARTPOSITION"); //560.28 * GeoModelKernelUnits::cm; double outerModuleRadius1=(*m_fcalMod)[0]->getDouble("OUTERMODULERADIUS"); double outerModuleRadius2=(*m_fcalMod)[1]->getDouble("OUTERMODULERADIUS"); @@ -202,7 +199,7 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) double halfDepth = totalDepth/2.; std::string name = baseName + "LiquidArgonC"; - GeoTubs *tubs = new GeoTubs(innerRadius,outerRadius,halfDepth,0,360*CLHEP::deg); + GeoTubs *tubs = new GeoTubs(innerRadius,outerRadius,halfDepth,0,360*GeoModelKernelUnits::deg); GeoLogVol *logVol= new GeoLogVol(name, tubs, LAr); fcalPhysical = new GeoFullPhysVol(logVol); } @@ -233,11 +230,11 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(m_LArPosition, bPos ? "FCAL1_POS":"FCAL1_NEG"); if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); GeoAlignableTransform *xfAbs1 = new GeoAlignableTransform(xfPos); fcalPhysical->add(xfAbs1); - if (!bPos) fcalPhysical->add(new GeoTransform(HepGeom::RotateY3D(180*CLHEP::deg))); + if (!bPos) fcalPhysical->add(new GeoTransform(GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg))); fcalPhysical->add(physVol); modPhysical = physVol; @@ -256,18 +253,18 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) // 16 Troughs representing Cable Harnesses: if(m_fullGeo) if(m_absPhysical1==0) { - double troughDepth = 1.0 * CLHEP::cm; + double troughDepth = 1.0 * GeoModelKernelUnits::cm; double outerRadius = outerModuleRadius1; double innerRadius = outerRadius - troughDepth; double halfLength = fullModuleDepth1/ 2.0; - double deltaPhi = 5.625 * CLHEP::deg; - double startPhi = 11.25 * CLHEP::deg - deltaPhi/2.0; + double deltaPhi = 5.625 * GeoModelKernelUnits::deg; + double startPhi = 11.25 * GeoModelKernelUnits::deg - deltaPhi/2.0; GeoTubs * tubs = new GeoTubs(innerRadius,outerRadius,halfLength,startPhi,deltaPhi ); GeoLogVol *logVol = new GeoLogVol(baseName+"Module1::CableTrough",tubs,FCalCableHarness); GeoPhysVol *physVol = new GeoPhysVol(logVol); - Genfun::Variable i; - Genfun::GENFUNCTION rotationAngle = 22.5*CLHEP::deg*i; - GeoXF::TRANSFUNCTION xf = GeoXF::Pow(HepGeom::RotateZ3D(1.0),rotationAngle); + GeoGenfun::Variable i; + GeoGenfun::GENFUNCTION rotationAngle = 22.5*GeoModelKernelUnits::deg*i; + GeoXF::TRANSFUNCTION xf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),rotationAngle); GeoSerialTransformer *st = new GeoSerialTransformer(physVol,&xf,16); modPhysical->add(st); } @@ -332,7 +329,7 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) if (m_VisLimit != -1 && (counter++ > m_VisLimit)) continue; if(m_fullGeo) { - GeoTransform *xf = new GeoTransform(HepGeom::Translate3D(thisTubeX*CLHEP::cm, thisTubeY*CLHEP::cm,0)); + GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(thisTubeX*GeoModelKernelUnits::cm, thisTubeY*GeoModelKernelUnits::cm,0)); modPhysical->add(xf); modPhysical->add(physVol); } @@ -365,11 +362,11 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(m_LArPosition, bPos ? "FCAL2_POS":"FCAL2_NEG"); if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); GeoAlignableTransform *xfAbs2 = new GeoAlignableTransform(xfPos); fcalPhysical->add(xfAbs2); - if (!bPos) fcalPhysical->add(new GeoTransform(HepGeom::RotateY3D(180*CLHEP::deg))); + if (!bPos) fcalPhysical->add(new GeoTransform(GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg))); fcalPhysical->add(physVol); modPhysical = physVol; @@ -388,18 +385,18 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) // 16 Troughs representing Cable Harnesses: if(m_fullGeo) if(m_absPhysical2==0) { - double troughDepth = 1.0 * CLHEP::cm; + double troughDepth = 1.0 * GeoModelKernelUnits::cm; double outerRadius = outerModuleRadius2; double innerRadius = outerRadius - troughDepth; double halfLength = fullModuleDepth2/ 2.0; - double deltaPhi = 5.625 * CLHEP::deg; - double startPhi = 11.25 * CLHEP::deg - deltaPhi/2.0; + double deltaPhi = 5.625 * GeoModelKernelUnits::deg; + double startPhi = 11.25 * GeoModelKernelUnits::deg - deltaPhi/2.0; GeoTubs * tubs = new GeoTubs(innerRadius,outerRadius,halfLength,startPhi,deltaPhi ); GeoLogVol *logVol = new GeoLogVol(baseName+"Module2::CableTrough",tubs,FCalCableHarness); GeoPhysVol *physVol = new GeoPhysVol(logVol); - Genfun::Variable i; - Genfun::GENFUNCTION rotationAngle = 22.5*CLHEP::deg*i; - GeoXF::TRANSFUNCTION xf = GeoXF::Pow(HepGeom::RotateZ3D(1.0),rotationAngle); + GeoGenfun::Variable i; + GeoGenfun::GENFUNCTION rotationAngle = 22.5*GeoModelKernelUnits::deg*i; + GeoXF::TRANSFUNCTION xf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),rotationAngle); GeoSerialTransformer *st = new GeoSerialTransformer(physVol,&xf,16); modPhysical->add(st); } @@ -472,7 +469,7 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) if (m_VisLimit != -1 && (counter++ > m_VisLimit)) continue; if(m_fullGeo) { - GeoTransform *xf = new GeoTransform(HepGeom::Translate3D(thisTubeX*CLHEP::cm, thisTubeY*CLHEP::cm,0)); + GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(thisTubeX*GeoModelKernelUnits::cm, thisTubeY*GeoModelKernelUnits::cm,0)); modPhysical->add(xf); modPhysical->add(gapPhys); } @@ -505,11 +502,11 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) // Alignable transform const IRDBRecord *posRec = GeoDBUtils::getTransformRecord(m_LArPosition, bPos ? "FCAL3_POS":"FCAL3_NEG"); if (!posRec) throw std::runtime_error("Error, no lar position record in the database") ; - HepGeom::Transform3D xfPos = GeoDBUtils::getTransform(posRec); + GeoTrf::Transform3D xfPos = GeoDBUtils::getTransform(posRec); GeoAlignableTransform *xfAbs3 = new GeoAlignableTransform(xfPos); fcalPhysical->add(xfAbs3); - if (!bPos) fcalPhysical->add(new GeoTransform(HepGeom::RotateY3D(180*CLHEP::deg))); + if (!bPos) fcalPhysical->add(new GeoTransform(GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg))); fcalPhysical->add(physVol); modPhysical = physVol; @@ -530,42 +527,42 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) if(m_fullGeo) if(m_absPhysical3==0) { static double rotAngles[] = - { 11.25 * CLHEP::deg, - 22.50 * CLHEP::deg, - 45.00 * CLHEP::deg, - 56.25 * CLHEP::deg, - 67.50 * CLHEP::deg, - 90.00 * CLHEP::deg, // first quarter - 101.25 * CLHEP::deg, - 112.50 * CLHEP::deg, - 135.00 * CLHEP::deg, - 146.25 * CLHEP::deg, - 157.50 * CLHEP::deg, - 180.00 * CLHEP::deg, // second quarter - 191.25 * CLHEP::deg, - 202.50 * CLHEP::deg, - 225.00 * CLHEP::deg, - 236.25 * CLHEP::deg, - 247.50 * CLHEP::deg, - 270.00 * CLHEP::deg, // third quarter - 281.25 * CLHEP::deg, - 292.50 * CLHEP::deg, - 315.00 * CLHEP::deg, - 326.25 * CLHEP::deg, - 337.50 * CLHEP::deg, - 360.00 * CLHEP::deg }; + { 11.25 * GeoModelKernelUnits::deg, + 22.50 * GeoModelKernelUnits::deg, + 45.00 * GeoModelKernelUnits::deg, + 56.25 * GeoModelKernelUnits::deg, + 67.50 * GeoModelKernelUnits::deg, + 90.00 * GeoModelKernelUnits::deg, // first quarter + 101.25 * GeoModelKernelUnits::deg, + 112.50 * GeoModelKernelUnits::deg, + 135.00 * GeoModelKernelUnits::deg, + 146.25 * GeoModelKernelUnits::deg, + 157.50 * GeoModelKernelUnits::deg, + 180.00 * GeoModelKernelUnits::deg, // second quarter + 191.25 * GeoModelKernelUnits::deg, + 202.50 * GeoModelKernelUnits::deg, + 225.00 * GeoModelKernelUnits::deg, + 236.25 * GeoModelKernelUnits::deg, + 247.50 * GeoModelKernelUnits::deg, + 270.00 * GeoModelKernelUnits::deg, // third quarter + 281.25 * GeoModelKernelUnits::deg, + 292.50 * GeoModelKernelUnits::deg, + 315.00 * GeoModelKernelUnits::deg, + 326.25 * GeoModelKernelUnits::deg, + 337.50 * GeoModelKernelUnits::deg, + 360.00 * GeoModelKernelUnits::deg }; - Genfun::ArrayFunction rotationAngle(rotAngles,rotAngles+24); - double troughDepth = 1.0 * CLHEP::cm; + GeoGenfun::ArrayFunction rotationAngle(rotAngles,rotAngles+24); + double troughDepth = 1.0 * GeoModelKernelUnits::cm; double outerRadius = outerModuleRadius3; double innerRadius = outerRadius - troughDepth; double halfLength = fullModuleDepth3/ 2.0; - double deltaPhi = 5.625 * CLHEP::deg; - double startPhi = 11.25 * CLHEP::deg - deltaPhi/2.0; + double deltaPhi = 5.625 * GeoModelKernelUnits::deg; + double startPhi = 11.25 * GeoModelKernelUnits::deg - deltaPhi/2.0; GeoTubs * tubs = new GeoTubs(innerRadius,outerRadius,halfLength,startPhi,deltaPhi ); GeoLogVol *logVol = new GeoLogVol(baseName+"Module3::CableTrough",tubs,FCalCableHarness); GeoPhysVol *physVol = new GeoPhysVol(logVol); - GeoXF::TRANSFUNCTION xf = GeoXF::Pow(HepGeom::RotateZ3D(1.0),rotationAngle); + GeoXF::TRANSFUNCTION xf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),rotationAngle); GeoSerialTransformer *st = new GeoSerialTransformer(physVol,&xf,24); modPhysical->add(st); } @@ -640,7 +637,7 @@ GeoVFullPhysVol* LArGeo::FCALConstruction::GetEnvelope(bool bPos) if (m_VisLimit != -1 && (counter++ > m_VisLimit)) continue; if(m_fullGeo) { - GeoTransform *xf = new GeoTransform(HepGeom::Translate3D(thisTubeX*CLHEP::cm, thisTubeY*CLHEP::cm,0)); + GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(thisTubeX*GeoModelKernelUnits::cm, thisTubeY*GeoModelKernelUnits::cm,0)); modPhysical->add(xf); modPhysical->add(gapPhys); } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/CMakeLists.txt index 47df10bf735..2fbaaf6df58 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/CMakeLists.txt @@ -7,7 +7,6 @@ atlas_subdir( LArGeoH62002Algs ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities LArCalorimeter/LArGeoModel/LArReadoutGeometry PRIVATE @@ -22,15 +21,16 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( LArGeoH62002Algs src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelKernel GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoH6Cryostats ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoH6Cryostats ) # Install files from the package: atlas_install_headers( LArGeoH62002Algs ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/ExcluderConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/ExcluderConstruction.cxx index 03d858974b3..6786c4e35f3 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/ExcluderConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/ExcluderConstruction.cxx @@ -23,18 +23,14 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -// For transforms: - -#include "CLHEP/Geometry/Transform3D.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" - // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -92,7 +88,7 @@ GeoPhysVol* LArGeo::ExcluderConstruction::GetEnvelope() const GeoElement* H=materialManager->getElement("Hydrogen"); const GeoElement* O=materialManager->getElement("Oxygen"); const GeoElement* N=materialManager->getElement("Nitrogen"); - GeoMaterial* Rohacell = new GeoMaterial(name="Rohacell", density=0.11*CLHEP::g/CLHEP::cm3); + GeoMaterial* Rohacell = new GeoMaterial(name="Rohacell", density=0.11*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Rohacell->add(C,0.6465); Rohacell->add(H,0.07836); Rohacell->add(O,0.19137); @@ -115,25 +111,25 @@ GeoPhysVol* LArGeo::ExcluderConstruction::GetEnvelope() // It is a Union out of a GeoBox and a GeoTubs. // Box Dimensions: - double xbox = 300.0 *CLHEP::mm; - double ybox = 160.0 *CLHEP::mm; - double zbox = 300.7 *CLHEP::mm; + double xbox = 300.0 *GeoModelKernelUnits::mm; + double ybox = 160.0 *GeoModelKernelUnits::mm; + double zbox = 300.7 *GeoModelKernelUnits::mm; // // Tubs Dimensions: - double ztubs = 300.0 *CLHEP::mm; - double phitubs= 76.2 *CLHEP::deg; - double delphi = 27.6 *CLHEP::deg; - double rcold = 1249.5 *CLHEP::mm; - double rmin = 1220.0 *CLHEP::mm; + double ztubs = 300.0 *GeoModelKernelUnits::mm; + double phitubs= 76.2 *GeoModelKernelUnits::deg; + double delphi = 27.6 *GeoModelKernelUnits::deg; + double rcold = 1249.5 *GeoModelKernelUnits::mm; + double rmin = 1220.0 *GeoModelKernelUnits::mm; - // The radius of the cryostat cold wall is: 1250 CLHEP::mm + // The radius of the cryostat cold wall is: 1250 GeoModelKernelUnits::mm // Before we make the union, we have to shift the box in y (that actually along the beam axis) // and there, positive y goes from the cryostat centre towards the beam window. std::string ExcluderName = "LAr::H6::Cryostat::Excluder"; GeoBox* rohaBox = new GeoBox(xbox, ybox, zbox); // The rectangular part of the excluder - const GeoShapeShift & rohaBoxShift = (*rohaBox << HepGeom::TranslateY3D(1062.85*CLHEP::mm) ); + const GeoShapeShift & rohaBoxShift = (*rohaBox << GeoTrf::TranslateY3D(1062.85*GeoModelKernelUnits::mm) ); GeoTubs* rohaTubs = new GeoTubs(rmin, rcold, ztubs, phitubs, delphi); // The round part of the excluder // Combine the two parts to make one excluder of the correct shape: diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/FrontBeamConstructionH62002.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/FrontBeamConstructionH62002.cxx index e72c0ca7869..bd3ac799fc9 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/FrontBeamConstructionH62002.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/FrontBeamConstructionH62002.cxx @@ -23,17 +23,14 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" -#include "GeoModelKernel/GeoShapeShift.h" - -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoModelKernel/GeoShapeShift.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -143,8 +140,8 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62002::GetEnvelope() std::string baseName = "LAr::TBH62002"; std::string H62002FrontBeamName = baseName + "::FrontBeam"; - const double H62002FrontBeamXY = 2000.*CLHEP::mm; - const double H62002FrontBeamZ = 350.*CLHEP::mm; + const double H62002FrontBeamXY = 2000.*GeoModelKernelUnits::mm; + const double H62002FrontBeamZ = 350.*GeoModelKernelUnits::mm; GeoBox* H62002FrontBeamShape = new GeoBox( H62002FrontBeamXY, H62002FrontBeamXY, H62002FrontBeamZ ); @@ -161,27 +158,27 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62002::GetEnvelope() // In the old stand-alone code, all three were round with a radius of 5cm // and 7.5mm thickness. // Logbooks in the control-room say that their xyz sizes are: - // B1 : 30 x 30 x 10 CLHEP::mm - // W1,2 : 150 x 150 x 10 CLHEP::mm + // B1 : 30 x 30 x 10 GeoModelKernelUnits::mm + // W1,2 : 150 x 150 x 10 GeoModelKernelUnits::mm // They are certainly not round, so stick with the logbook values // The beam sees the instrumentation in the following order: // W1, W2, B1, MWPC5 log << "Create Front Scintillators ..." << std::endl; - const double Wxy= 75.0*CLHEP::mm; - const double Wz = 5.0*CLHEP::mm; - const double Bxy= 15.0*CLHEP::mm; - const double Bz = 5.0*CLHEP::mm; + const double Wxy= 75.0*GeoModelKernelUnits::mm; + const double Wz = 5.0*GeoModelKernelUnits::mm; + const double Bxy= 15.0*GeoModelKernelUnits::mm; + const double Bz = 5.0*GeoModelKernelUnits::mm; std::vector<double> v_ScintXY; std::vector<double> v_ScintZ; v_ScintXY.push_back(Wxy); v_ScintXY.push_back(Wxy); v_ScintXY.push_back(Bxy); - v_ScintZ.push_back(170.*CLHEP::mm); - v_ScintZ.push_back(200.*CLHEP::mm); - v_ScintZ.push_back(340.*CLHEP::mm); + v_ScintZ.push_back(170.*GeoModelKernelUnits::mm); + v_ScintZ.push_back(200.*GeoModelKernelUnits::mm); + v_ScintZ.push_back(340.*GeoModelKernelUnits::mm); // Create one Scintillator and place it twice along z: @@ -196,7 +193,7 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62002::GetEnvelope() //BScintPhysical->add( new GeoNameTag(ScintName) ); for ( unsigned int i = 0; i < v_ScintZ.size(); i++ ) { m_H62002FrontBeamPhysical->add( new GeoIdentifierTag(i) ); - m_H62002FrontBeamPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (v_ScintZ[ i ]-H62002FrontBeamZ) ) ) ) ; m_H62002FrontBeamPhysical->add( new GeoNameTag(ScintName) ); + m_H62002FrontBeamPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (v_ScintZ[ i ]-H62002FrontBeamZ) ) ) ) ; m_H62002FrontBeamPhysical->add( new GeoNameTag(ScintName) ); switch(i) { case 0: case 1: { m_H62002FrontBeamPhysical->add( WScintPhysical ); break; } @@ -211,12 +208,12 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62002::GetEnvelope() //------ Get MWPC number 5 from LArGeoH6Cryostats - const double MwpcPos = 605.*CLHEP::mm; - double WireStep = 2.*CLHEP::mm; + const double MwpcPos = 605.*GeoModelKernelUnits::mm; + double WireStep = 2.*GeoModelKernelUnits::mm; MWPCConstruction mwpcXConstruction (WireStep); GeoVPhysVol* mwpcEnvelope = mwpcXConstruction.GetEnvelope(); m_H62002FrontBeamPhysical->add(new GeoIdentifierTag(5)); - m_H62002FrontBeamPhysical->add( new GeoTransform(HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (MwpcPos-H62002FrontBeamZ) ) ) ); + m_H62002FrontBeamPhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (MwpcPos-H62002FrontBeamZ) ) ) ); m_H62002FrontBeamPhysical->add(mwpcEnvelope); //------ Done with creating an MWPC from LArGeoH6Cryostats diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/HECConstructionH62002.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/HECConstructionH62002.cxx index e4a629bcac3..44c6937ad57 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/HECConstructionH62002.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/HECConstructionH62002.cxx @@ -22,10 +22,12 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoShapeUnion.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -44,7 +46,7 @@ -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; @@ -149,7 +151,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() int lastPlaneHEC = ( sizeof(HECMotherZplan) / sizeof(double) ); - double moduleDeltaPhi = 2.*M_PI/32. ; // = 11.25*CLHEP::deg; + double moduleDeltaPhi = 2.*M_PI/32. ; // = 11.25*GeoModelKernelUnits::deg; double phiStart [] = {-19. , -18. } ; double hecPhistart[] = { phiStart[0]*M_PI/32 , phiStart[1]*M_PI/32 } ; double modulePhistart[] = { (phiStart[0]+2.)*M_PI/32 , (phiStart[1]+2.)*M_PI/32 } ; @@ -210,9 +212,9 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() double spacerDiameter[2]; double ztie[2]; // This is the +/- z length of the tie rod in the LAr gap - ztie[0]=-0.227825*CLHEP::cm; - ztie[1]= 0.227825*CLHEP::cm; - double rodSize = 0.39435*CLHEP::cm; + ztie[0]=-0.227825*GeoModelKernelUnits::cm; + ztie[1]= 0.227825*GeoModelKernelUnits::cm; + double rodSize = 0.39435*GeoModelKernelUnits::cm; @@ -223,7 +225,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() const GeoLogVol* logiSlice[3]; GeoPhysVol* physiSlice[3]; // Absorber - double radialShift = 1.02*CLHEP::cm; // absorbers are adjusted by this amount + double radialShift = 1.02*GeoModelKernelUnits::cm; // absorbers are adjusted by this amount GeoTubs* solidFrontAbsorber[2]; const GeoLogVol* logiFrontAbsorber[2]; GeoPhysVol* physiFrontAbsorber[2]; @@ -270,19 +272,19 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() int moduleNumberFront = 3; int moduleNumberRear = 2; // radial dimensions of the modules: - double moduleRinner1 = (*hecLongitudinalBlock)[0]->getDouble("BLRMN")*CLHEP::cm; - double moduleRinner2 = (*hecLongitudinalBlock)[1]->getDouble("BLRMN")*CLHEP::cm; - double moduleRouter = (*hecLongitudinalBlock)[0]->getDouble("BLRMX")*CLHEP::cm; + double moduleRinner1 = (*hecLongitudinalBlock)[0]->getDouble("BLRMN")*GeoModelKernelUnits::cm; + double moduleRinner2 = (*hecLongitudinalBlock)[1]->getDouble("BLRMN")*GeoModelKernelUnits::cm; + double moduleRouter = (*hecLongitudinalBlock)[0]->getDouble("BLRMX")*GeoModelKernelUnits::cm; // thickness of Cu pads, LAr gaps and inter-wheel gap: - double copperPad = (*hadronicEndcap)[0]->getDouble("COPPER")*CLHEP::cm; - double gapSize = (*hadronicEndcap)[0]->getDouble("LARG")*CLHEP::cm; - double betweenWheel = (*hadronicEndcap)[0]->getDouble("GAPWHL")*CLHEP::cm; + double copperPad = (*hadronicEndcap)[0]->getDouble("COPPER")*GeoModelKernelUnits::cm; + double gapSize = (*hadronicEndcap)[0]->getDouble("LARG")*GeoModelKernelUnits::cm; + double betweenWheel = (*hadronicEndcap)[0]->getDouble("GAPWHL")*GeoModelKernelUnits::cm; for (int idepth=0; idepth < depthNumber; ++idepth) { - depthSize[idepth] = (*hecLongitudinalBlock)[idepth]->getDouble("BLDPTH")*CLHEP::cm; - firstAbsorber[idepth]= (*hecLongitudinalBlock)[idepth]->getDouble("PLATE0")*CLHEP::cm; + depthSize[idepth] = (*hecLongitudinalBlock)[idepth]->getDouble("BLDPTH")*GeoModelKernelUnits::cm; + firstAbsorber[idepth]= (*hecLongitudinalBlock)[idepth]->getDouble("PLATE0")*GeoModelKernelUnits::cm; gapNumber[idepth] = (int) (*hecLongitudinalBlock)[idepth]->getDouble("BLMOD"); } @@ -291,8 +293,8 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() std::ostringstream A0STR; A0STR << "_" << ikapton; const std::string A0 = A0STR.str(); - kaptonPosition[ikapton] = (*hadronicEndcap)[0]->getDouble("KPTPOS"+A0)*CLHEP::cm; - kaptonWidth[ikapton] = (*hadronicEndcap)[0]->getDouble("KPTWID"+A0)*CLHEP::cm; + kaptonPosition[ikapton] = (*hadronicEndcap)[0]->getDouble("KPTPOS"+A0)*GeoModelKernelUnits::cm; + kaptonWidth[ikapton] = (*hadronicEndcap)[0]->getDouble("KPTWID"+A0)*GeoModelKernelUnits::cm; } for (int itie=0; itie < 4; ++itie) @@ -300,8 +302,8 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() std::ostringstream A0STR; A0STR << "_" << itie; const std::string A0 = A0STR.str(); - tieRodPositionX[itie] = (*hadronicEndcap)[0]->getDouble("RODPOSX"+A0)*CLHEP::cm; - tieRodPositionY[itie] = (*hadronicEndcap)[0]->getDouble("RODPOSR"+A0)*CLHEP::cm; + tieRodPositionX[itie] = (*hadronicEndcap)[0]->getDouble("RODPOSX"+A0)*GeoModelKernelUnits::cm; + tieRodPositionY[itie] = (*hadronicEndcap)[0]->getDouble("RODPOSR"+A0)*GeoModelKernelUnits::cm; } for (int i=0; i < 2; ++i) @@ -309,16 +311,16 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() std::ostringstream A0STR; A0STR << "_" << i; const std::string A0 = A0STR.str(); - tieRodDiameter[i] = (*hadronicEndcap)[0]->getDouble("RODDIM"+A0)*CLHEP::cm; - spacerDiameter[i] = (*hadronicEndcap)[0]->getDouble("SPCDIM"+A0)*CLHEP::cm; + tieRodDiameter[i] = (*hadronicEndcap)[0]->getDouble("RODDIM"+A0)*GeoModelKernelUnits::cm; + spacerDiameter[i] = (*hadronicEndcap)[0]->getDouble("SPCDIM"+A0)*GeoModelKernelUnits::cm; } - double frontAbsThickness = (*hadronicEndcap)[0]->getDouble("PLATE_0")*CLHEP::cm; - double rearAbsThickness = (*hadronicEndcap)[0]->getDouble("PLATE_1")*CLHEP::cm; + double frontAbsThickness = (*hadronicEndcap)[0]->getDouble("PLATE_0")*GeoModelKernelUnits::cm; + double rearAbsThickness = (*hadronicEndcap)[0]->getDouble("PLATE_1")*GeoModelKernelUnits::cm; // Radial dimensions and z-plane locations - double zCoordinate[] = {0.0*CLHEP::cm, depthSize[0], depthSize[0], 816.51*CLHEP::mm, 816.51*CLHEP::mm, 1350.*CLHEP::mm }; + double zCoordinate[] = {0.0*GeoModelKernelUnits::cm, depthSize[0], depthSize[0], 816.51*GeoModelKernelUnits::mm, 816.51*GeoModelKernelUnits::mm, 1350.*GeoModelKernelUnits::mm }; double innerRadius[] = {moduleRinner1,moduleRinner1, moduleRinner2,moduleRinner2,moduleRinner2,moduleRinner2,}; @@ -439,9 +441,9 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() //---------------------------------------------------------------- // Place FrontModules into FrontHEC wheel and RearModule into RearHEC wheel //---------------------------------------------------------------- - Genfun::Variable Index; - Genfun::GENFUNCTION ModuleRotationAngle = -moduleDeltaPhi + moduleDeltaPhi*Index; - GeoXF::TRANSFUNCTION tf = GeoXF::Pow(HepGeom::RotateZ3D(1.0),ModuleRotationAngle); + GeoGenfun::Variable Index; + GeoGenfun::GENFUNCTION ModuleRotationAngle = -moduleDeltaPhi + moduleDeltaPhi*Index; + GeoXF::TRANSFUNCTION tf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),ModuleRotationAngle); GeoSerialIdentifier *sIF = new GeoSerialIdentifier(1); @@ -449,8 +451,8 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() physiFrontHEC->add(sIF); physiFrontHEC->add(sTF); - Genfun::GENFUNCTION ModuleRotationAngleR = -moduleDeltaPhi/2. + moduleDeltaPhi*Index; - GeoXF::TRANSFUNCTION tr = GeoXF::Pow(HepGeom::RotateZ3D(1.0),ModuleRotationAngleR); + GeoGenfun::GENFUNCTION ModuleRotationAngleR = -moduleDeltaPhi/2. + moduleDeltaPhi*Index; + GeoXF::TRANSFUNCTION tr = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),ModuleRotationAngleR); GeoSerialIdentifier *sIR = new GeoSerialIdentifier(2); GeoSerialTransformer *sTR = new GeoSerialTransformer (physiRearModule,&tr, moduleNumberRear); @@ -488,7 +490,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() //---------------------------------------------------------------- // Absorbers , the inner and outer Radius are smaller by radialShift // but positionned in the center of depth. this alows - // to have 2 CLHEP::mm gap between the copper plates of neighbor FrontModules + // to have 2 GeoModelKernelUnits::mm gap between the copper plates of neighbor FrontModules //---------------------------------------------------------------- // Two different Absorbers for the front depths: @@ -553,7 +555,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() // Placement of the actual depth: depthPositionZ +=depthSize[idepth]/2.; physiFrontModule->add(new GeoIdentifierTag(100+idepth)); - physiFrontModule->add(new GeoTransform(HepGeom::Translate3D(0,0,depthPositionZ))); + physiFrontModule->add(new GeoTransform(GeoTrf::Translate3D(0,0,depthPositionZ))); physiFrontModule->add(physiDepth[idepth]); @@ -572,9 +574,9 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() else { islice=2; frontabsorberNo=1; } double slicePositionZ=firstAbsorber[idepth]+ gapSize/2.0 -depthSize[idepth]/2.0; - Genfun::Variable Index; - GeoXF::TRANSFUNCTION TS = GeoXF::Pow(HepGeom::TranslateZ3D(1.0),slicePositionZ + (frontAbsThickness+gapSize)*Index); - GeoXF::TRANSFUNCTION TA = HepGeom::TranslateY3D(-radialShift)*GeoXF::Pow(HepGeom::TranslateZ3D(1.0), + GeoGenfun::Variable Index; + GeoXF::TRANSFUNCTION TS = GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),slicePositionZ + (frontAbsThickness+gapSize)*Index); + GeoXF::TRANSFUNCTION TA = GeoTrf::TranslateY3D(-radialShift)*GeoXF::Pow(GeoTrf::TranslateZ3D(1.0), absorberPositionZ[idepth] + (frontAbsThickness+gapSize)*Index); GeoSerialIdentifier *sI = new GeoSerialIdentifier(sliceCopyNo[idepth]); GeoSerialTransformer *sTS = new GeoSerialTransformer(physiSlice[islice], &TS, gapNumber[idepth]); @@ -602,7 +604,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() physiDepth[idepth] = new GeoPhysVol(logiDepth[idepth]); physiRearModule->add(new GeoIdentifierTag(100+idepth)); - physiRearModule->add(new GeoTransform(HepGeom::Translate3D(0,0,depthPositionZ))); + physiRearModule->add(new GeoTransform(GeoTrf::Translate3D(0,0,depthPositionZ))); physiRearModule->add(physiDepth[idepth]); @@ -612,9 +614,9 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() // Position 4 sensitive gaps and rear absorbers in 2 depths of a Rear Module: int islice=2; double slicePositionZ=firstAbsorber[idepth]+ gapSize/2.0 -depthSize[idepth]/2.0; - Genfun::Variable Index; - GeoXF::TRANSFUNCTION TS = GeoXF::Pow(HepGeom::TranslateZ3D(1.0),slicePositionZ + (rearAbsThickness+gapSize)*Index); - GeoXF::TRANSFUNCTION TA = HepGeom::TranslateY3D(-radialShift)*GeoXF::Pow(HepGeom::TranslateZ3D(1.0), + GeoGenfun::Variable Index; + GeoXF::TRANSFUNCTION TS = GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),slicePositionZ + (rearAbsThickness+gapSize)*Index); + GeoXF::TRANSFUNCTION TA = GeoTrf::TranslateY3D(-radialShift)*GeoXF::Pow(GeoTrf::TranslateZ3D(1.0), absorberPositionZ[idepth] + (rearAbsThickness+gapSize)*Index); GeoSerialIdentifier *sI = new GeoSerialIdentifier(sliceCopyNo[idepth]); GeoSerialTransformer *sTS = new GeoSerialTransformer(physiSlice[islice], &TS, gapNumber[idepth]); @@ -632,13 +634,13 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() double firstAbsorberPositionZ = firstAbsorber[0]/2.- depthSize[0]/2.0; physiDepth[0]->add(new GeoIdentifierTag(50)); - physiDepth[0]->add(new GeoTransform(HepGeom::Translate3D(0,-radialShift,firstAbsorberPositionZ))); + physiDepth[0]->add(new GeoTransform(GeoTrf::Translate3D(0,-radialShift,firstAbsorberPositionZ))); physiDepth[0]->add(physiFirstAbsorber[0]); firstAbsorberPositionZ = firstAbsorber[3]/2.- depthSize[3]/2.0; physiDepth[3]->add(new GeoIdentifierTag(51)); - physiDepth[3]->add(new GeoTransform(HepGeom::Translate3D(0,-radialShift,firstAbsorberPositionZ))); + physiDepth[3]->add(new GeoTransform(GeoTrf::Translate3D(0,-radialShift,firstAbsorberPositionZ))); physiDepth[3]->add(physiFirstAbsorber[1]); @@ -685,13 +687,13 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() physiEstBoard = new GeoPhysVol(logiEstBoard); physiSlice[islice]->add(new GeoIdentifierTag(indexKapton)); - physiSlice[islice]->add(new GeoTransform(HepGeom::Translate3D(0,0,kaptonPositionZ))); + physiSlice[islice]->add(new GeoTransform(GeoTrf::Translate3D(0,0,kaptonPositionZ))); physiSlice[islice]->add(physiEstBoard); physiPadBoard = new GeoPhysVol(logiPadBoard); physiEstBoard->add(new GeoIdentifierTag(indexKapton)); - physiEstBoard->add(new GeoTransform(HepGeom::Translate3D(0,0,0))); + physiEstBoard->add(new GeoTransform(GeoTrf::Translate3D(0,0,0))); physiEstBoard->add(physiPadBoard); }//for islice @@ -701,10 +703,10 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() // Tie rods in Slice //---------------------------------------------------------------- - // double rodSize = 0.85*CLHEP::cm; + // double rodSize = 0.85*GeoModelKernelUnits::cm; for (int iwheel=0; iwheel<2; iwheel++) { - solidTieRod[iwheel] = new GeoTubs(0.*CLHEP::cm,spacerDiameter[iwheel]/2.,rodSize/2., 0.*CLHEP::deg,360.*CLHEP::deg); + solidTieRod[iwheel] = new GeoTubs(0.*GeoModelKernelUnits::cm,spacerDiameter[iwheel]/2.,rodSize/2., 0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); logiTieRod[iwheel] = new GeoLogVol(tieRodName, solidTieRod[iwheel], Iron); } @@ -718,14 +720,14 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() physiTieRod[numberTie] = new GeoPhysVol(logiTieRod[numberTie]); physiSlice[islice]->add(new GeoIdentifierTag(indexRod)); - physiSlice[islice]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionX[indexRod], + physiSlice[islice]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionX[indexRod], -tieRodPositionY[indexRod],ztie[iz]))); physiSlice[islice]->add(physiTieRod[numberTie]); physiTieRod[numberTie] = new GeoPhysVol(logiTieRod[numberTie]); physiSlice[islice]->add(new GeoIdentifierTag(indexRod)); - physiSlice[islice]->add(new GeoTransform(HepGeom::Translate3D(-tieRodPositionX[indexRod], + physiSlice[islice]->add(new GeoTransform(GeoTrf::Translate3D(-tieRodPositionX[indexRod], -tieRodPositionY[indexRod],ztie[iz]))); physiSlice[islice]->add(physiTieRod[numberTie]); @@ -736,7 +738,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() physiTieRod[numberTie] = new GeoPhysVol(logiTieRod[numberTie]); physiSlice[islice]->add(new GeoIdentifierTag(indexRod)); - physiSlice[islice]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionX[0],-tieRodPositionY[0],ztie[iz1]))); + physiSlice[islice]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionX[0],-tieRodPositionY[0],ztie[iz1]))); physiSlice[islice]->add(physiTieRod[numberTie]); }//for iz1 (this dealt with the one last un-paired rod at the module's narrow end) @@ -745,12 +747,12 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() //---------------------------------------------------------------- // Tie rods in Absorbers //---------------------------------------------------------------- - solidAbsorberTieRod[0] = new GeoTubs(0.*CLHEP::cm,tieRodDiameter[0]/2.,frontAbsThickness/2.,0.*CLHEP::deg,360.*CLHEP::deg); - solidAbsorberTieRod[1] = new GeoTubs(0.*CLHEP::cm,tieRodDiameter[1]/2.,rearAbsThickness/2.,0.*CLHEP::deg,360.*CLHEP::deg); + solidAbsorberTieRod[0] = new GeoTubs(0.*GeoModelKernelUnits::cm,tieRodDiameter[0]/2.,frontAbsThickness/2.,0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); + solidAbsorberTieRod[1] = new GeoTubs(0.*GeoModelKernelUnits::cm,tieRodDiameter[1]/2.,rearAbsThickness/2.,0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); logiAbsorberTieRod[0] = new GeoLogVol(tieRodName,solidAbsorberTieRod[0],Iron); //,0,0,0); logiAbsorberTieRod[1] = new GeoLogVol(tieRodName,solidAbsorberTieRod[1],Iron); //,0,0,0); - solidAbsorberTieRodRear[0] = new GeoTubs(0.*CLHEP::cm,tieRodDiameter[0]/2.,frontAbsThickness/2.,0.*CLHEP::deg,360.*CLHEP::deg); - solidAbsorberTieRodRear[1] = new GeoTubs(0.*CLHEP::cm,tieRodDiameter[1]/2.,rearAbsThickness/2.,0.*CLHEP::deg,360.*CLHEP::deg); + solidAbsorberTieRodRear[0] = new GeoTubs(0.*GeoModelKernelUnits::cm,tieRodDiameter[0]/2.,frontAbsThickness/2.,0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); + solidAbsorberTieRodRear[1] = new GeoTubs(0.*GeoModelKernelUnits::cm,tieRodDiameter[1]/2.,rearAbsThickness/2.,0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); logiAbsorberTieRodRear[0] = new GeoLogVol(tieRodRearName,solidAbsorberTieRodRear[0],Iron); //,0,0,0); logiAbsorberTieRodRear[1] = new GeoLogVol(tieRodRearName,solidAbsorberTieRodRear[1],Iron); //,0,0,0); @@ -764,18 +766,18 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() { physiAbsorberTieRod[indexR] = new GeoPhysVol(logiAbsorberTieRod[indexR]); physiFrontAbsorber[islice]->add(new GeoIdentifierTag(indexRod)); - physiFrontAbsorber[islice]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionX[indexRod], + physiFrontAbsorber[islice]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionX[indexRod], -(tieRodPositionY[indexRod]-radialShift), 0))); physiFrontAbsorber[islice]->add(physiAbsorberTieRod[indexR]); physiAbsorberTieRod[indexR] = new GeoPhysVol(logiAbsorberTieRod[indexR]); physiFrontAbsorber[islice]->add(new GeoIdentifierTag(indexRod)); - physiFrontAbsorber[islice]->add(new GeoTransform(HepGeom::Translate3D(-tieRodPositionX[indexRod], + physiFrontAbsorber[islice]->add(new GeoTransform(GeoTrf::Translate3D(-tieRodPositionX[indexRod], -(tieRodPositionY[indexRod]-radialShift), 0))); physiFrontAbsorber[islice]->add(physiAbsorberTieRod[indexR]); } physiAbsorberTieRod[indexR] = new GeoPhysVol(logiAbsorberTieRod[indexR]); physiFrontAbsorber[islice]->add(new GeoIdentifierTag(indexRod)); - physiFrontAbsorber[islice]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionX[0], + physiFrontAbsorber[islice]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionX[0], -(tieRodPositionY[0]-radialShift),0))); @@ -789,13 +791,13 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() { physiAbsorberTieRodRear[1] = new GeoPhysVol(logiAbsorberTieRodRear[1]); physiRearAbsorber->add(new GeoIdentifierTag(indexRod)); - physiRearAbsorber->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionX[indexRod], + physiRearAbsorber->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionX[indexRod], -(tieRodPositionY[indexRod]-radialShift), 0))); physiRearAbsorber->add(physiAbsorberTieRodRear[1]); physiAbsorberTieRodRear[1] = new GeoPhysVol(logiAbsorberTieRodRear[1]); physiRearAbsorber->add(new GeoIdentifierTag(indexRod)); - physiRearAbsorber->add(new GeoTransform(HepGeom::Translate3D(-tieRodPositionX[indexRod], + physiRearAbsorber->add(new GeoTransform(GeoTrf::Translate3D(-tieRodPositionX[indexRod], -(tieRodPositionY[indexRod]-radialShift), 0))); @@ -806,7 +808,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62002::GetEnvelope() //now the single tie rod at the narrow end: physiAbsorberTieRodRear[1] = new GeoPhysVol(logiAbsorberTieRodRear[1]); physiRearAbsorber->add(new GeoIdentifierTag(indexRod)); - physiRearAbsorber->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionX[0], + physiRearAbsorber->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionX[0], -(tieRodPositionY[0]-radialShift),0))); diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/LArDetectorFactoryH62002.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/LArDetectorFactoryH62002.cxx index c6810a9ad3c..64849d9ef75 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/LArDetectorFactoryH62002.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/LArDetectorFactoryH62002.cxx @@ -26,10 +26,12 @@ #include "GeoModelKernel/GeoSerialDenominator.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoSerialTransformer.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "StoreGate/StoreGateSvc.h" // need if we want to use EMEC from LArGeoEndcap: @@ -60,7 +62,7 @@ #include "LArGeoCode/LArMaterialManager.h" // -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; @@ -126,8 +128,8 @@ void LArGeo::LArDetectorFactoryH62002::getSimulationParameters() } (*log)<< MSG::INFO<< endmsg; - (*log)<< MSG::INFO << " Use cryo X : " << m_cryoXpos << " CLHEP::mm" << endmsg; - (*log)<< MSG::INFO << " Use table Y : " << m_tableYpos << " CLHEP::mm" << endmsg; + (*log)<< MSG::INFO << " Use cryo X : " << m_cryoXpos << " GeoModelKernelUnits::mm" << endmsg; + (*log)<< MSG::INFO << " Use table Y : " << m_tableYpos << " GeoModelKernelUnits::mm" << endmsg; } @@ -160,13 +162,13 @@ void LArGeo::LArDetectorFactoryH62002::create(GeoPhysVol *world) // 4databa : // numbers taken from LArCalorimeter/LArG4TB/LArG4TBExpHall/src/LArG4TBEmecHecDetectorConstruction.cc // (That's a mighty big hall.....) - double expHallX = 14000.*CLHEP::mm; - double expHallY = 14000.*CLHEP::mm; - double expHallZ = 50000.*CLHEP::mm; - //double cryoZpos = 12250.*CLHEP::mm; - //double cryoXrot = -90.*CLHEP::deg; - //double cryoXpos = m_cryoXpos * CLHEP::mm ; - //double cryoXpos = 0.*CLHEP::mm; // <-- Should be made available in RunOptions! (Perhaps default in DB...) + double expHallX = 14000.*GeoModelKernelUnits::mm; + double expHallY = 14000.*GeoModelKernelUnits::mm; + double expHallZ = 50000.*GeoModelKernelUnits::mm; + //double cryoZpos = 12250.*GeoModelKernelUnits::mm; + //double cryoXrot = -90.*GeoModelKernelUnits::deg; + //double cryoXpos = m_cryoXpos * GeoModelKernelUnits::mm ; + //double cryoXpos = 0.*GeoModelKernelUnits::mm; // <-- Should be made available in RunOptions! (Perhaps default in DB...) //-----------------------------------------------------------------------------------// // Next make the box that describes the shape of the expHall volume: // @@ -191,32 +193,30 @@ void LArGeo::LArDetectorFactoryH62002::create(GeoPhysVol *world) // the element we want to position in the following order: - double Theta = -90. * CLHEP::deg; - double Phi = 0. * CLHEP::deg; + double Theta = -90. * GeoModelKernelUnits::deg; + double Phi = 0. * GeoModelKernelUnits::deg; - CLHEP::HepRotation Mrot ; - Mrot.rotateX(Theta); - Mrot.rotateZ(Phi); - CLHEP::Hep3Vector pos3Vector( m_cryoXpos*CLHEP::mm, 0.*CLHEP::mm, 12250.*CLHEP::mm ); + GeoTrf::Transform3D Mrot(GeoTrf::RotateZ3D(Phi)*GeoTrf::RotateX3D(Theta)); + GeoTrf::Translate3D pos3Vector( m_cryoXpos*GeoModelKernelUnits::mm, 0.*GeoModelKernelUnits::mm, 12250.*GeoModelKernelUnits::mm ); H6CryostatConstruction H6CryoCons; GeoVPhysVol* Envelope = 0; Envelope = H6CryoCons.GetEnvelope(); expHallPhys->add(new GeoNameTag("LAr")); - //expHallPhys->add( new GeoTransform( HepGeom::Translate3D(pos3Vector)*HepGeom::RotateX3D(Theta)*HepGeom::RotateZ3D(Phi) )); - expHallPhys->add( new GeoTransform( HepGeom::Transform3D(Mrot, pos3Vector) ) ); + //expHallPhys->add( new GeoTransform( GeoTrf::Translate3D(pos3Vector)*GeoTrf::RotateX3D(Theta)*GeoTrf::RotateZ3D(Phi) )); + expHallPhys->add( new GeoTransform( GeoTrf::Transform3D(pos3Vector*Mrot) ) ); expHallPhys->add(Envelope); //Add the walls in front of the cryostat: { - const double H62002WallsPos = 10182.*CLHEP::mm; // A wild guess at the moment..... + const double H62002WallsPos = 10182.*GeoModelKernelUnits::mm; // A wild guess at the moment..... WallsConstruction WallsConstruction2002; GeoVPhysVol* frontwalls = WallsConstruction2002.GetEnvelope(); if(frontwalls !=0 && expHallPhys !=0){ expHallPhys->add( new GeoNameTag("LAr")); - expHallPhys->add( new GeoTransform( HepGeom::TranslateZ3D(H62002WallsPos) ) ); + expHallPhys->add( new GeoTransform( GeoTrf::TranslateZ3D(H62002WallsPos) ) ); expHallPhys->add(frontwalls); } } @@ -224,12 +224,12 @@ void LArGeo::LArDetectorFactoryH62002::create(GeoPhysVol *world) //Add the table instrumentation: { - const double H62002TablePos = 8320.*CLHEP::mm; + const double H62002TablePos = 8320.*GeoModelKernelUnits::mm; TableConstructionH62002 TableConstruction; GeoVPhysVol* table = TableConstruction.GetEnvelope(); if(table !=0 && expHallPhys !=0){ expHallPhys->add( new GeoNameTag("LAr")); - expHallPhys->add( new GeoTransform( HepGeom::TranslateZ3D(H62002TablePos) ) ); + expHallPhys->add( new GeoTransform( GeoTrf::TranslateZ3D(H62002TablePos) ) ); expHallPhys->add(table); } } @@ -237,14 +237,14 @@ void LArGeo::LArDetectorFactoryH62002::create(GeoPhysVol *world) //Add the front beam instrumentation: { - const double H62002FrontBeamPos = -20215.5*CLHEP::mm; // (Use this to get the Front dets. in Peter Schacht's position) - //const double H62002FrontBeamPos = -20439.*CLHEP::mm; // (according to old code: [-21600+801+350]*CLHEP::mm) + const double H62002FrontBeamPos = -20215.5*GeoModelKernelUnits::mm; // (Use this to get the Front dets. in Peter Schacht's position) + //const double H62002FrontBeamPos = -20439.*GeoModelKernelUnits::mm; // (according to old code: [-21600+801+350]*GeoModelKernelUnits::mm) // (with 350=1/2 length of FrontBeam volume) FrontBeamConstructionH62002 FrontBeamConstruction; GeoVPhysVol* front = FrontBeamConstruction.GetEnvelope(); if(front !=0 && expHallPhys !=0){ expHallPhys->add( new GeoNameTag("LAr")); - expHallPhys->add( new GeoTransform( HepGeom::TranslateZ3D(H62002FrontBeamPos) ) ); + expHallPhys->add( new GeoTransform( GeoTrf::TranslateZ3D(H62002FrontBeamPos) ) ); expHallPhys->add(front); } } @@ -263,12 +263,10 @@ void LArGeo::LArDetectorFactoryH62002::create(GeoPhysVol *world) // For the moment it is still commented out until I have // its true geometry confirmed; But really it is ready to go: // Add Rohacell Excluder - double ThetaRoha = 0. * CLHEP::deg; - double PhiRoha = 0. * CLHEP::deg; - CLHEP::HepRotation MrotRoha ; - MrotRoha.rotateX(ThetaRoha); - MrotRoha.rotateZ(PhiRoha); - CLHEP::Hep3Vector pos3Roha( 0*CLHEP::mm, 0.0*CLHEP::mm , 0.*CLHEP::mm); + // double ThetaRoha = 0. * GeoModelKernelUnits::deg; + // double PhiRoha = 0. * GeoModelKernelUnits::deg; + // GeoTrf::Transform3D MrotRoha(GeoTrf::RotateZ3D(PhiRoha)*GeoTrf::RotateX3D(ThetaRoha)); + // GeoTrf::Translate3D pos3Roha( 0*GeoModelKernelUnits::mm, 0.0*GeoModelKernelUnits::mm , 0.*GeoModelKernelUnits::mm); { ExcluderConstruction excluderConstruction; @@ -288,21 +286,19 @@ void LArGeo::LArDetectorFactoryH62002::create(GeoPhysVol *world) EMECDetectorManager *emecDetectorManager = new EMECDetectorManager(); - double ThetaEmec = -90. * CLHEP::deg; - double PhiEmec = 180. * CLHEP::deg; + double ThetaEmec = -90. * GeoModelKernelUnits::deg; + double PhiEmec = 180. * GeoModelKernelUnits::deg; - CLHEP::HepRotation MrotEmec ; - MrotEmec.rotateX(ThetaEmec); - MrotEmec.rotateZ(PhiEmec); - // CLHEP::Hep3Vector pos3Emec( 0*CLHEP::mm, 869.0*CLHEP::mm , 1720.*CLHEP::mm); - CLHEP::Hep3Vector pos3Emec( 0*CLHEP::mm, 808.0*CLHEP::mm , 1720.*CLHEP::mm); + GeoTrf::Transform3D MrotEmec(GeoTrf::RotateZ3D(PhiEmec)*GeoTrf::RotateX3D(ThetaEmec)); + // GeoTrf::Vector3D pos3Emec( 0*GeoModelKernelUnits::mm, 869.0*GeoModelKernelUnits::mm , 1720.*GeoModelKernelUnits::mm); + GeoTrf::Translate3D pos3Emec( 0*GeoModelKernelUnits::mm, 808.0*GeoModelKernelUnits::mm , 1720.*GeoModelKernelUnits::mm); //use this line for physical construction of the EMEC outer wheel only: EMECConstruction emecConstruction(true, true, true); GeoVFullPhysVol* emecEnvelope = emecConstruction.GetEnvelope(); LArPhysical->add(new GeoNameTag("LAr")); - LArPhysical->add( new GeoTransform( HepGeom::Transform3D(MrotEmec, pos3Emec) ) ); + LArPhysical->add( new GeoTransform( GeoTrf::Transform3D(pos3Emec*MrotEmec) ) ); LArPhysical->add(emecEnvelope); { StoredPhysVol *sEmecOuterWheel; @@ -396,21 +392,19 @@ void LArGeo::LArDetectorFactoryH62002::create(GeoPhysVol *world) } - double ThetaPS = -90. * CLHEP::deg; - double PhiPS = 180. * CLHEP::deg; - CLHEP::HepRotation MrotPS ; - MrotPS.rotateX(ThetaPS); - MrotPS.rotateZ(PhiPS); - //CLHEP::Hep3Vector pos3PS( 0*CLHEP::mm, 945.5*CLHEP::mm , 1720.*CLHEP::mm); - CLHEP::Hep3Vector pos3PS( 0*CLHEP::mm, 888.5*CLHEP::mm , 1720.*CLHEP::mm); + double ThetaPS = -90. * GeoModelKernelUnits::deg; + double PhiPS = 180. * GeoModelKernelUnits::deg; + GeoTrf::Transform3D MrotPS(GeoTrf::RotateZ3D(PhiPS)*GeoTrf::RotateX3D(ThetaPS)); + //GeoTrf::Vector3D pos3PS( 0*GeoModelKernelUnits::mm, 945.5*GeoModelKernelUnits::mm , 1720.*GeoModelKernelUnits::mm); + GeoTrf::Translate3D pos3PS( 0*GeoModelKernelUnits::mm, 888.5*GeoModelKernelUnits::mm , 1720.*GeoModelKernelUnits::mm); //double zPSpos = -869. -(61. +2. +13.5); //std::string PresamplerName = baseName + "::Presampler::"; EndcapPresamplerConstruction PresamplerConstruction(true); GeoFullPhysVol* PresamplerEnvelope = PresamplerConstruction.Envelope(); if ( PresamplerEnvelope != 0 && LArPhysical != 0 ) { - //LArPhysical->add( new GeoTransform( HepGeom::Translate3D(pos3PS)*HepGeom::RotateX3D(ThetaPS)*HepGeom::RotateZ3D(PhiPS) )); - LArPhysical->add( new GeoTransform( HepGeom::Transform3D(MrotPS, pos3PS) ) ); + //LArPhysical->add( new GeoTransform( GeoTrf::Translate3D(pos3PS)*GeoTrf::RotateX3D(ThetaPS)*GeoTrf::RotateZ3D(PhiPS) )); + LArPhysical->add( new GeoTransform( GeoTrf::Transform3D(pos3PS*MrotPS) ) ); LArPhysical->add( PresamplerEnvelope ); } { @@ -426,20 +420,18 @@ void LArGeo::LArDetectorFactoryH62002::create(GeoPhysVol *world) // Add HEC - double ThetaHec = 90. * CLHEP::deg; - double PhiHec = 0. * CLHEP::deg; - CLHEP::HepRotation MrotHec ; - MrotHec.rotateX(ThetaHec); - MrotHec.rotateZ(PhiHec); - CLHEP::Hep3Vector pos3Hec( 0*CLHEP::mm, 233.0*CLHEP::mm , 1720.*CLHEP::mm); + double ThetaHec = 90. * GeoModelKernelUnits::deg; + double PhiHec = 0. * GeoModelKernelUnits::deg; + GeoTrf::Transform3D MrotHec(GeoTrf::RotateZ3D(PhiHec)*GeoTrf::RotateX3D(ThetaHec)); + GeoTrf::Translate3D pos3Hec( 0*GeoModelKernelUnits::mm, 233.0*GeoModelKernelUnits::mm , 1720.*GeoModelKernelUnits::mm); { HECConstructionH62002 hecConstruction; GeoVFullPhysVol* hecEnvelope = hecConstruction.GetEnvelope(); if(hecEnvelope !=0 && LArPhysical !=0){ LArPhysical->add( new GeoNameTag("LAr")); - //LArPhysical->add( new GeoTransform( HepGeom::Translate3D(pos3Hec)*HepGeom::RotateX3D(ThetaHec)*HepGeom::RotateZ3D(PhiHec) )); - LArPhysical->add( new GeoTransform( HepGeom::Transform3D(MrotHec, pos3Hec) ) ); + //LArPhysical->add( new GeoTransform( GeoTrf::Translate3D(pos3Hec)*GeoTrf::RotateX3D(ThetaHec)*GeoTrf::RotateZ3D(PhiHec) )); + LArPhysical->add( new GeoTransform( GeoTrf::Transform3D(pos3Hec*MrotHec) ) ); LArPhysical->add(hecEnvelope); } } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/TableConstructionH62002.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/TableConstructionH62002.cxx index 1ee8391944d..8b2d56e9cbf 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/TableConstructionH62002.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62002Algs/src/TableConstructionH62002.cxx @@ -23,17 +23,14 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" - -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -141,8 +138,8 @@ GeoVPhysVol* LArGeo::TableConstructionH62002::GetEnvelope() std::string baseName = "LAr::TBH62002"; std::string H62002TableName = baseName + "::Table"; - const double H62002TableXY = 150.*CLHEP::mm; - const double H62002TableZ = 1200.*CLHEP::mm; + const double H62002TableXY = 150.*GeoModelKernelUnits::mm; + const double H62002TableZ = 1200.*GeoModelKernelUnits::mm; GeoBox* H62002TableShape = new GeoBox( H62002TableXY, H62002TableXY, H62002TableZ ); @@ -159,13 +156,13 @@ GeoVPhysVol* LArGeo::TableConstructionH62002::GetEnvelope() log << "Create F1/F2 Scintillators ..." << std::endl; // Universal size: - const double Fx = 10.0*CLHEP::mm; - const double Fy = 10.0*CLHEP::mm; - const double Fz = 10.0*CLHEP::mm; + const double Fx = 10.0*GeoModelKernelUnits::mm; + const double Fy = 10.0*GeoModelKernelUnits::mm; + const double Fz = 10.0*GeoModelKernelUnits::mm; std::vector<double> v_ScintZ; - v_ScintZ.push_back(2195.*CLHEP::mm); // <-- = btas_pos - v_ScintZ.push_back(2320.*CLHEP::mm); + v_ScintZ.push_back(2195.*GeoModelKernelUnits::mm); // <-- = btas_pos + v_ScintZ.push_back(2320.*GeoModelKernelUnits::mm); const double ScintDx = Fx; const double ScintDy = Fy; const double ScintDz = Fz; @@ -178,7 +175,7 @@ GeoVPhysVol* LArGeo::TableConstructionH62002::GetEnvelope() GeoPhysVol* ScintPhysical = new GeoPhysVol( ScintLogical ); for ( unsigned int i = 0; i < v_ScintZ.size(); i++ ) { m_H62002TablePhysical->add( new GeoIdentifierTag(i) ); - m_H62002TablePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (v_ScintZ[ i ]-H62002TableZ) ) ) ); + m_H62002TablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (v_ScintZ[ i ]-H62002TableZ) ) ) ); log << MSG::INFO << " Position the F Scintillator at: " << v_ScintZ[ i ] << endmsg ; m_H62002TablePhysical->add( ScintPhysical ); } @@ -193,16 +190,16 @@ GeoVPhysVol* LArGeo::TableConstructionH62002::GetEnvelope() //------ Get the MWPCs from LArGeoH6Cryostats const int MwpcNumber = 3; std::vector<double> v_MwpcPos; - v_MwpcPos.push_back(105.*CLHEP::mm); - v_MwpcPos.push_back(825.*CLHEP::mm); - v_MwpcPos.push_back(1815.*CLHEP::mm); - double WireStep = 1.*CLHEP::mm; + v_MwpcPos.push_back(105.*GeoModelKernelUnits::mm); + v_MwpcPos.push_back(825.*GeoModelKernelUnits::mm); + v_MwpcPos.push_back(1815.*GeoModelKernelUnits::mm); + double WireStep = 1.*GeoModelKernelUnits::mm; MWPCConstruction mwpcXConstruction (WireStep); GeoVPhysVol* mwpcEnvelope = mwpcXConstruction.GetEnvelope(); for ( int imwpc = 0; imwpc<MwpcNumber ; imwpc++) { m_H62002TablePhysical->add(new GeoIdentifierTag(imwpc+2)); - m_H62002TablePhysical->add( new GeoTransform(HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (v_MwpcPos[imwpc]-H62002TableZ) ) ) ); + m_H62002TablePhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (v_MwpcPos[imwpc]-H62002TableZ) ) ) ); m_H62002TablePhysical->add(mwpcEnvelope); } //------ Done with creating an MWPC from LArGeoH6Cryostats diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/CMakeLists.txt index e038e2c3005..a94c6ab0203 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/CMakeLists.txt @@ -7,7 +7,6 @@ atlas_subdir( LArGeoH62003Algs ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities LArCalorimeter/LArGeoModel/LArReadoutGeometry PRIVATE @@ -21,15 +20,16 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( LArGeoH62003Algs src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelKernel GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests GaudiKernel LArG4RunControl LArGeoFcal LArGeoH6Cryostats ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests GaudiKernel LArG4RunControl LArGeoFcal LArGeoH6Cryostats ) # Install files from the package: atlas_install_headers( LArGeoH62003Algs ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/src/LArDetectorConstructionH62003.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/src/LArDetectorConstructionH62003.cxx index d5f875ce089..e613b8c86a7 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/src/LArDetectorConstructionH62003.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62003Algs/src/LArDetectorConstructionH62003.cxx @@ -25,6 +25,8 @@ #include "GeoModelKernel/GeoSerialDenominator.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoSerialTransformer.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelKernel/GeoXF.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" @@ -35,13 +37,7 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" #include "LArG4RunControl/LArG4TBPosOptions.h" - -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" - -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -58,30 +54,32 @@ #include <cmath> #include <iostream> -using CLHEP::g; -using CLHEP::cm3; -using CLHEP::mm; -using CLHEP::cm; -using CLHEP::m; -using CLHEP::deg; -using CLHEP::Hep3Vector; -using CLHEP::HepRotationX; -using CLHEP::HepRotationY; -using HepGeom::Transform3D; -using HepGeom::Translate3D; -using HepGeom::TranslateZ3D; -using HepGeom::RotateX3D; -using HepGeom::RotateY3D; -using HepGeom::RotateZ3D; - - -LArGeo::LArDetectorConstructionH62003::LArDetectorConstructionH62003(): -m_H62003EnvelopePhysical(NULL), -m_fcalVisLimit(-1), -m_axisVisState(false), -m_pAccessSvc(NULL){} - -LArGeo::LArDetectorConstructionH62003::~LArDetectorConstructionH62003() {} +using GeoModelKernelUnits::g; +using GeoModelKernelUnits::cm3; +using GeoModelKernelUnits::mm; +using GeoModelKernelUnits::cm; +using GeoModelKernelUnits::m; +using GeoModelKernelUnits::deg; +using GeoTrf::Vector3D; +using GeoTrf::Transform3D; +using GeoTrf::Translate3D; +using GeoTrf::TranslateZ3D; +using GeoTrf::RotateX3D; +using GeoTrf::RotateY3D; +using GeoTrf::RotateZ3D; + + +LArGeo::LArDetectorConstructionH62003::LArDetectorConstructionH62003() + : m_H62003EnvelopePhysical(NULL) + , m_fcalVisLimit(-1) + , m_axisVisState(false) + , m_pAccessSvc(nullptr) +{ +} + +LArGeo::LArDetectorConstructionH62003::~LArDetectorConstructionH62003() +{ +} GeoVPhysVol* LArGeo::LArDetectorConstructionH62003::GetEnvelope() { @@ -862,13 +860,13 @@ GeoVPhysVol* LArGeo::LArDetectorConstructionH62003::GetEnvelope() << " is located at: " << "\n" << "x = " - << m_H62003EnvelopePhysical->getXToChildVol(i).getTranslation().x() + << m_H62003EnvelopePhysical->getXToChildVol(i).translation().x() << "\n" << "y = " - << m_H62003EnvelopePhysical->getXToChildVol(i).getTranslation().y() + << m_H62003EnvelopePhysical->getXToChildVol(i).translation().y() << "\n" << "z = " - << m_H62003EnvelopePhysical->getXToChildVol(i).getTranslation().z() + << m_H62003EnvelopePhysical->getXToChildVol(i).translation().z() << "\n" << endmsg; } @@ -894,11 +892,7 @@ void LArGeo::LArDetectorConstructionH62003::createAxis(GeoFullPhysVol* H62003Env const GeoLogVol* XAxisLogical = new GeoLogVol(XAxisName,XYaxisShape,mat); GeoPhysVol* XAxisPhysVol = new GeoPhysVol(XAxisLogical); - H62003EnvelopePhysical-> - add(new GeoTransform(Transform3D(HepRotationY( 90.*deg ), - Hep3Vector(axisXYHalfLength, - 0.*m, - 0.*m)))); + H62003EnvelopePhysical->add(new GeoTransform(Transform3D(GeoTrf::Translate3D(axisXYHalfLength,0.*m,0.*m)*GeoTrf::RotateY3D(90.*deg)))); H62003EnvelopePhysical->add(XAxisPhysVol); // y-axis @@ -906,12 +900,7 @@ void LArGeo::LArDetectorConstructionH62003::createAxis(GeoFullPhysVol* H62003Env const GeoLogVol* YAxisLogical = new GeoLogVol(YAxisName,XYaxisShape,mat); GeoPhysVol* YAxisPhysVol = new GeoPhysVol( YAxisLogical ); - H62003EnvelopePhysical-> - add(new GeoTransform(Transform3D(HepRotationX( -90.*deg ), - Hep3Vector( - 0.*m, - axisXYHalfLength, - 0.*m)))); + H62003EnvelopePhysical->add(new GeoTransform(Transform3D(GeoTrf::Translate3D(0.*m,axisXYHalfLength,0.*m)*GeoTrf::RotateX3D(-90.*deg)))); H62003EnvelopePhysical->add(YAxisPhysVol); //z-axis diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/CMakeLists.txt index 785d0034c2b..2ddf8989d3b 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( LArGeoH62004Algs ) atlas_depends_on_subdirs( PUBLIC Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities LArCalorimeter/LArGeoModel/LArReadoutGeometry PRIVATE @@ -25,15 +24,16 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( LArGeoH62004Algs src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GeoModelKernel GeoModelUtilities LArReadoutGeometry CaloDetDescrLib AthContainers GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoH6Cryostats LArGeoTBECLib ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} StoreGateLib SGtests GeoModelUtilities LArReadoutGeometry CaloDetDescrLib AthContainers GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoH6Cryostats LArGeoTBECLib ) # Install files from the package: atlas_install_headers( LArGeoH62004Algs ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ExcluderConstructionH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ExcluderConstructionH62004.cxx index a35a7aec222..5320788f5ff 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ExcluderConstructionH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ExcluderConstructionH62004.cxx @@ -27,6 +27,8 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoShapeUnion.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -97,7 +99,7 @@ GeoVFullPhysVol* LArGeo::ExcluderConstructionH62004::GetEnvelope() { const GeoElement* H=materialManager->getElement("Hydrogen"); const GeoElement* O=materialManager->getElement("Oxygen"); const GeoElement* N=materialManager->getElement("Nitrogen"); - GeoMaterial* Rohacell = new GeoMaterial(name="Rohacell", density=0.112*CLHEP::g/CLHEP::cm3); + GeoMaterial* Rohacell = new GeoMaterial(name="Rohacell", density=0.112*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Rohacell->add(C,0.6465); Rohacell->add(H,0.07836); Rohacell->add(O,0.19137); @@ -105,7 +107,7 @@ GeoVFullPhysVol* LArGeo::ExcluderConstructionH62004::GetEnvelope() { Rohacell->lock(); /* - a = 12.957*CLHEP::g/CLHEP::mole; + a = 12.957*GeoModelKernelUnits::g/GeoModelKernelUnits::mole; density = 0.112*g/cm3; z = 6.18; G4Material* Rohacell = new G4Material(name="Rohacell",z, a, density); @@ -136,20 +138,20 @@ GeoVFullPhysVol* LArGeo::ExcluderConstructionH62004::GetEnvelope() { switch(m_which) { case 0: { // EMEC excluder // DB values - double Rmin = 725.*CLHEP::mm; - double Rmin_2 = 780.*CLHEP::mm; - double Rmax = 980.*CLHEP::mm; + double Rmin = 725.*GeoModelKernelUnits::mm; + double Rmin_2 = 780.*GeoModelKernelUnits::mm; + double Rmax = 980.*GeoModelKernelUnits::mm; - double Zall = 626*CLHEP::mm; - double Zback = 91*CLHEP::mm; - double Zfront = 60*CLHEP::mm; + double Zall = 626*GeoModelKernelUnits::mm; + double Zback = 91*GeoModelKernelUnits::mm; + double Zfront = 60*GeoModelKernelUnits::mm; - double alpha = 22.5*CLHEP::degree; - double beta = 6.375*CLHEP::degree; + double alpha = 22.5*GeoModelKernelUnits::degree; + double beta = 6.375*GeoModelKernelUnits::degree; // double gamma = 8.589*degree; - double delta = 2.720*CLHEP::degree; + double delta = 2.720*GeoModelKernelUnits::degree; // solidEx = new GeoTubs("MotherEx",Rmin,Rmax,Zall/2.,-(alpha+gamma), 2*(alpha+gamma)); // GeoTubs* solidEx = new GeoTubs(Rmin,Rmax,Zall/2.,-(alpha+beta), 2*(alpha+beta)); @@ -163,7 +165,7 @@ GeoVFullPhysVol* LArGeo::ExcluderConstructionH62004::GetEnvelope() { const double rmax[zplanes] = {Rmax,Rmax}; const double zcoord[2*zplanes] = {-Zall/2., -Zall/2.+Zfront, Zall/2.-Zback, Zall/2.}; - HepGeom::Transform3D rot; + GeoTrf::Transform3D rot(GeoTrf::Transform3D::Identity()); fEx = new GeoPcon(-(alpha-delta),2*(alpha-delta)); for(int i=0; i<zplanes; ++i) { @@ -207,35 +209,31 @@ GeoVFullPhysVol* LArGeo::ExcluderConstructionH62004::GetEnvelope() { } case 1 : { // FCAL excluder - double Rmax = 335.*CLHEP::mm; -// double Rmax_1 = 253.*CLHEP::mm; - double bepo_Beta = 4.668*CLHEP::degree; // DB !!! - double bepo_ty = 90.0*CLHEP::degree; // DB !! - -// double Zall = (1021.4/2.)*CLHEP::mm; - double Zall = (912./2.)*CLHEP::mm; -// double Zpara = (168.47/2.)*CLHEP::mm; -// double Zpara = (247.87/2.)*CLHEP::mm; - double Xall = (171./2.)*CLHEP::mm; - double Yall = (300./2.)*CLHEP::mm; + double Rmax = 335.*GeoModelKernelUnits::mm; +// double Rmax_1 = 253.*GeoModelKernelUnits::mm; + double bepo_Beta = 4.668*GeoModelKernelUnits::degree; // DB !!! + double bepo_ty = 90.0*GeoModelKernelUnits::degree; // DB !! + +// double Zall = (1021.4/2.)*GeoModelKernelUnits::mm; + double Zall = (912./2.)*GeoModelKernelUnits::mm; +// double Zpara = (168.47/2.)*GeoModelKernelUnits::mm; +// double Zpara = (247.87/2.)*GeoModelKernelUnits::mm; + double Xall = (171./2.)*GeoModelKernelUnits::mm; + double Yall = (300./2.)*GeoModelKernelUnits::mm; double Rmax_1 = Rmax - 2.*Zall*tan(bepo_Beta); - GeoPara *pEx = new GeoPara(Zall,Yall,Xall,0*CLHEP::degree,bepo_Beta,0.*CLHEP::degree); + GeoPara *pEx = new GeoPara(Zall,Yall,Xall,0*GeoModelKernelUnits::degree,bepo_Beta,0.*GeoModelKernelUnits::degree); GeoCons *tEx = new GeoCons(0.,0.,Rmax,Rmax_1,Zall,0.,M_PI); GeoBox *box = new GeoBox(Yall,Xall,Zall); - CLHEP::HepRotation Rot; - Rot.rotateX(bepo_Beta); - CLHEP::Hep3Vector trans1(0., sqrt(Rmax_1*Rmax_1 - Yall*Yall) + Xall + Zall*tan(bepo_Beta), 0*CLHEP::mm); - HepGeom::Transform3D offset(Rot, trans1); + GeoTrf::RotateX3D Rot(bepo_Beta); + GeoTrf::Translation3D trans1(0., sqrt(Rmax_1*Rmax_1 - Yall*Yall) + Xall + Zall*tan(bepo_Beta), 0*GeoModelKernelUnits::mm); + GeoTrf::Transform3D offset = trans1 * Rot; const GeoShapeIntersection &is = (*tEx).intersect(*box<<offset); - CLHEP::HepRotation Rot1; - Rot1.rotateY(bepo_ty); - Rot1.rotateZ(bepo_ty); - Rot1.rotateX(bepo_Beta); -// G4ThreeVector translation(0., (203.74-168.47/2.)*CLHEP::mm, 0.*CLHEP::mm); - CLHEP::Hep3Vector translation(0., sqrt(Rmax_1*Rmax_1 - Yall*Yall)-Xall+Zall*tan(bepo_Beta),0.*CLHEP::mm); - HepGeom::Transform3D offset1(Rot1, translation); + GeoTrf::Transform3D Rot1 = GeoTrf::RotateX3D(bepo_Beta) * GeoTrf::RotateZ3D(bepo_ty) * GeoTrf::RotateY3D(bepo_ty); +// G4ThreeVector translation(0., (203.74-168.47/2.)*GeoModelKernelUnits::mm, 0.*GeoModelKernelUnits::mm); + GeoTrf::Translation3D translation(0., sqrt(Rmax_1*Rmax_1 - Yall*Yall)-Xall+Zall*tan(bepo_Beta),0.*GeoModelKernelUnits::mm); + GeoTrf::Transform3D offset1 = translation * Rot1; const GeoShapeUnion &us = is.add(*pEx<<offset1); std::string bExName = "LArGeoTB::FCAL::Excluder"; logicEx = new GeoLogVol(bExName, &us,Rohacell); @@ -247,21 +245,19 @@ GeoVFullPhysVol* LArGeo::ExcluderConstructionH62004::GetEnvelope() { // double Rmax = bcry_rlar; - double Rmax = 125.5*CLHEP::cm; // DB !!! - double bepo_Beta = 4.668*CLHEP::degree; // DB !!! + double Rmax = 125.5*GeoModelKernelUnits::cm; // DB !!! + double bepo_Beta = 4.668*GeoModelKernelUnits::degree; // DB !!! - double Zall = (1200./2.)*CLHEP::mm; - double angle = 32.*CLHEP::degree; -// double Xall = 119.35*CLHEP::cm; + double Zall = (1200./2.)*GeoModelKernelUnits::mm; + double angle = 32.*GeoModelKernelUnits::degree; +// double Xall = 119.35*GeoModelKernelUnits::cm; double Xall = Rmax*cos(angle/2); double Yall = Rmax*sin(angle/2); GeoTubs *tEx = new GeoTubs(0.,Rmax,Zall,-angle/2.,angle); GeoPara *box = new GeoPara(Xall,Yall,1.1*Zall,0.,-bepo_Beta,0.); - CLHEP::HepRotation Rot; -// Rot->rotateZ(-angle/2.); - CLHEP::Hep3Vector trans1(0., 0.*CLHEP::mm, 0*CLHEP::mm); - HepGeom::Transform3D offset(Rot, trans1); + + GeoTrf::Translate3D offset(0., 0.*GeoModelKernelUnits::mm, 0*GeoModelKernelUnits::mm); const GeoShapeSubtraction &is = (*tEx).subtract((*box)<<(offset)); // G4UnionSolid *is = new G4UnionSolid("isEx",tEx,box,Rot,trans1); std::string FrontExName = "LArGeoTB::Front::Excluder"; @@ -272,20 +268,19 @@ GeoVFullPhysVol* LArGeo::ExcluderConstructionH62004::GetEnvelope() { case 3 : { // Back excluder // double Rmax = bcry_rlar; - double Rmax = 125.5*CLHEP::cm; // DB !!! + double Rmax = 125.5*GeoModelKernelUnits::cm; // DB !!! - double Zall = (1600./2.)*CLHEP::mm; - double angle = 58.*CLHEP::degree; + double Zall = (1600./2.)*GeoModelKernelUnits::mm; + double angle = 58.*GeoModelKernelUnits::degree; double Xall = Rmax*cos(angle/2.); double Yall = Rmax*sin(angle/2.); GeoTubs *tEx = new GeoTubs(0.,Rmax,Zall,0.,angle); GeoBox *box = new GeoBox(Xall,Yall,1.1*Zall); - CLHEP::HepRotation Rot; - Rot.rotateZ(angle/2.); - CLHEP::Hep3Vector trans1(0., 0.*CLHEP::mm, 0*CLHEP::mm); - HepGeom::Transform3D offset(Rot, trans1); + GeoTrf::RotateZ3D Rot(angle/2.); + GeoTrf::Translation3D trans1(0., 0.*GeoModelKernelUnits::mm, 0*GeoModelKernelUnits::mm); + GeoTrf::Transform3D offset = trans1 * Rot; const GeoShapeSubtraction &is = (*tEx).subtract((*box)<<(offset)); std::string BackExName = "LArGeoTB::Back::Excluder"; logicEx = new GeoLogVol(BackExName,&is,Rohacell); diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/FCALConstructionH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/FCALConstructionH62004.cxx index e879edac6af..3413f1c2bab 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/FCALConstructionH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/FCALConstructionH62004.cxx @@ -19,6 +19,8 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoXF.h" #include "GeoModelKernel/GeoPerfUtils.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" // volumes used: Pcon, Tubs, Cons, Box, Trap #include "GeoModelKernel/GeoPcon.h" @@ -34,27 +36,23 @@ #include "GeoModelUtilities/StoredAlignX.h" #include "GeoModelUtilities/GeoDBUtils.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" // For functions: -#include "CLHEP/GenericFunctions/Abs.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" -#include "CLHEP/GenericFunctions/Sqrt.hh" -#include "CLHEP/GenericFunctions/ATan.hh" -#include "CLHEP/GenericFunctions/Rectangular.hh" -#include "CLHEP/GenericFunctions/Mod.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/FixedConstant.hh" -#include "CLHEP/GenericFunctions/ArrayFunction.hh" +#include "GeoGenericFunctions/Abs.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" +#include "GeoGenericFunctions/Sqrt.h" +#include "GeoGenericFunctions/ATan.h" +#include "GeoGenericFunctions/Rectangular.h" +#include "GeoGenericFunctions/Mod.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/FixedConstant.h" +#include "GeoGenericFunctions/ArrayFunction.h" #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBAccessSvc.h" // For units: -#include "CLHEP/Units/PhysicalConstants.h" #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/Bootstrap.h" #include <string> @@ -216,13 +214,13 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() std::string baseName = "LAr::FCAL::"; double fcalHalfDepth=0; - double startZFCal1 = (*m_fcalMod)[0]->getDouble("STARTPOSITION"); //466.85 * CLHEP::cm; - double startZFCal2 = (*m_fcalMod)[1]->getDouble("STARTPOSITION"); //512.83 * CLHEP::cm; - double startZFCal3 = (*m_fcalMod)[2]->getDouble("STARTPOSITION"); //560.28 * CLHEP::cm; + double startZFCal1 = (*m_fcalMod)[0]->getDouble("STARTPOSITION"); //466.85 * GeoModelKernelUnits::cm; + double startZFCal2 = (*m_fcalMod)[1]->getDouble("STARTPOSITION"); //512.83 * GeoModelKernelUnits::cm; + double startZFCal3 = (*m_fcalMod)[2]->getDouble("STARTPOSITION"); //560.28 * GeoModelKernelUnits::cm; // Should go to Db (change FCalNominals ????) - double fcalstartPhi = 90.*CLHEP::deg; - double fcaldeltaPhi = 90.*CLHEP::deg; + double fcalstartPhi = 90.*GeoModelKernelUnits::deg; + double fcaldeltaPhi = 90.*GeoModelKernelUnits::deg; // FCAL VOLUME. IT DOES NOT INCLUDE THE COPPER PLUG, ONLY THE LAR AND MODS 1-3 { @@ -243,8 +241,6 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() } - CLHEP::HepRotation NoRot; - if (F1) { // Module 1 @@ -264,7 +260,7 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() physVol = new GeoFullPhysVol(logVol); } - fcalPhysical->add(new GeoTransform(HepGeom::Transform3D(NoRot,CLHEP::Hep3Vector(0.,0.,-(fcalHalfDepth-halfDepth))))); + fcalPhysical->add(new GeoTransform(GeoTrf::Translate3D(0.,0.,-(fcalHalfDepth-halfDepth)))); fcalPhysical->add(physVol); modPhysical = physVol; @@ -279,18 +275,18 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() // 16 Troughs representing Cable Harnesses: if(m_absPhysical1==0) { - double troughDepth = 0.9999 * CLHEP::cm; + double troughDepth = 0.9999 * GeoModelKernelUnits::cm; double outerRadius = fcalData[0].outerModuleRadius; double innerRadius = outerRadius - troughDepth; double halfLength = fcalData[0].fullModuleDepth/ 2.0; - double deltaPhi = 5.625 * CLHEP::deg; - double startPhi = 11.25 * CLHEP::deg - deltaPhi/2.0; + double deltaPhi = 5.625 * GeoModelKernelUnits::deg; + double startPhi = 11.25 * GeoModelKernelUnits::deg - deltaPhi/2.0; GeoTubs * tubs = new GeoTubs(innerRadius,outerRadius,halfLength,startPhi,deltaPhi ); GeoLogVol *logVol = new GeoLogVol(baseName+"Module1::CableTrough",tubs,FCalCableHarness); GeoPhysVol *physVol = new GeoPhysVol(logVol); - Genfun::Variable i; - Genfun::GENFUNCTION rotationAngle = fcalstartPhi + 22.5*CLHEP::deg*i; - GeoXF::TRANSFUNCTION xf = GeoXF::Pow(HepGeom::RotateZ3D(1.0),rotationAngle); + GeoGenfun::Variable i; + GeoGenfun::GENFUNCTION rotationAngle = fcalstartPhi + 22.5*GeoModelKernelUnits::deg*i; + GeoXF::TRANSFUNCTION xf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),rotationAngle); GeoSerialTransformer *st = new GeoSerialTransformer(physVol,&xf,4); modPhysical->add(st); } @@ -300,7 +296,7 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() double halfDepth = fcalData[0].fullGapDepth/2.0; double innerRadius = fcalData[0].innerGapRadius; double outerRadius = fcalData[0].outerGapRadius; - GeoTubs *tubs = new GeoTubs(innerRadius,outerRadius,halfDepth, 0.*CLHEP::deg, 360.*CLHEP::deg); + GeoTubs *tubs = new GeoTubs(innerRadius,outerRadius,halfDepth, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg); GeoLogVol *logVol = new GeoLogVol(baseName + "Module1::Gap",tubs, LAr); GeoPhysVol *physVol = new GeoPhysVol(logVol); @@ -331,7 +327,7 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() if (m_VisLimit != -1 && (counter++ > m_VisLimit)) continue; //std::cout<<thisTileStr<<" "<<thisTubeX<<" "<<thisTubeY<<std::endl; - GeoTransform *xf = new GeoTransform(HepGeom::Translate3D(thisTubeX*CLHEP::cm, thisTubeY*CLHEP::cm,0)); + GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(thisTubeX*GeoModelKernelUnits::cm, thisTubeY*GeoModelKernelUnits::cm,0)); modPhysical->add(xf); modPhysical->add(physVol); } @@ -360,7 +356,7 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() physVol = new GeoFullPhysVol(logVol); } - fcalPhysical->add(new GeoTransform(HepGeom::Transform3D(NoRot,CLHEP::Hep3Vector(0.,0.,-(fcalHalfDepth-(startZFCal2-startZFCal1)-halfDepth))))); + fcalPhysical->add(new GeoTransform(GeoTrf::Translate3D(0.,0.,-(fcalHalfDepth-(startZFCal2-startZFCal1)-halfDepth)))); fcalPhysical->add(physVol); modPhysical = physVol; @@ -375,18 +371,18 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() // 16 Troughs representing Cable Harnesses: if(m_absPhysical2==0) { - double troughDepth = 1.0 * CLHEP::cm; + double troughDepth = 1.0 * GeoModelKernelUnits::cm; double outerRadius = fcalData[1].outerModuleRadius; double innerRadius = outerRadius - troughDepth; double halfLength = fcalData[1].fullModuleDepth/ 2.0; - double deltaPhi = 5.625 * CLHEP::deg; - double startPhi = 11.25 * CLHEP::deg - deltaPhi/2.0; + double deltaPhi = 5.625 * GeoModelKernelUnits::deg; + double startPhi = 11.25 * GeoModelKernelUnits::deg - deltaPhi/2.0; GeoTubs * tubs = new GeoTubs(innerRadius,outerRadius,halfLength,startPhi,deltaPhi ); GeoLogVol *logVol = new GeoLogVol(baseName+"Module2::CableTrough",tubs,FCalCableHarness); GeoPhysVol *physVol = new GeoPhysVol(logVol); - Genfun::Variable i; - Genfun::GENFUNCTION rotationAngle = fcalstartPhi + 22.5*CLHEP::deg*i; - GeoXF::TRANSFUNCTION xf = GeoXF::Pow(HepGeom::RotateZ3D(1.0),rotationAngle); + GeoGenfun::Variable i; + GeoGenfun::GENFUNCTION rotationAngle = fcalstartPhi + 22.5*GeoModelKernelUnits::deg*i; + GeoXF::TRANSFUNCTION xf = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),rotationAngle); GeoSerialTransformer *st = new GeoSerialTransformer(physVol,&xf,4); modPhysical->add(st); } @@ -435,7 +431,7 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() if (m_VisLimit!=-1 && (counter++ > m_VisLimit)) continue; - GeoTransform *xf = new GeoTransform(HepGeom::Translate3D(thisTubeX*CLHEP::cm, thisTubeY*CLHEP::cm,0)); + GeoTransform *xf = new GeoTransform(GeoTrf::Translate3D(thisTubeX*GeoModelKernelUnits::cm, thisTubeY*GeoModelKernelUnits::cm,0)); modPhysical->add(xf); modPhysical->add(gapPhys); } @@ -456,7 +452,7 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() // We need few more materials // ColdTC effective absorber: Cu with a little bit of inactive argon - GeoMaterial *thisAbsorber = new GeoMaterial("ColdTCAbsorber",8.701*CLHEP::g/CLHEP::cm3); + GeoMaterial *thisAbsorber = new GeoMaterial("ColdTCAbsorber",8.701*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); thisAbsorber->add(Copper,0.994); thisAbsorber->add(LAr,0.006); thisAbsorber->lock(); @@ -472,7 +468,7 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() } - fcalPhysical->add(new GeoTransform(HepGeom::Transform3D(NoRot,CLHEP::Hep3Vector(0.,0.,fcalHalfDepth-halfDepth)))); + fcalPhysical->add(new GeoTransform(GeoTrf::Translate3D(0.,0.,fcalHalfDepth-halfDepth))); fcalPhysical->add(physVol); modPhysical = physVol; @@ -491,8 +487,8 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() double outerRadius = fcalData[2].outerGapRadius; // Where in DB should go this ? - double ElectrodeDepth = 0.85*CLHEP::cm; - double ActiveDepth = 0.2*CLHEP::cm; + double ElectrodeDepth = 0.85*GeoModelKernelUnits::cm; + double ActiveDepth = 0.2*GeoModelKernelUnits::cm; // big argon gap solid GeoTubs *gapSolid = new GeoTubs(innerRadius,outerRadius,halfDepth, fcalstartPhi, fcaldeltaPhi); @@ -510,29 +506,29 @@ GeoVFullPhysVol* LArGeo::FCALConstructionH62004::GetEnvelope() // active gaps in electrode int iCopy = 1; - double zPos = -ElectrodeDepth/2. + 1.5 * CLHEP::mm + ActiveDepth/2.; - GeoTransform *t1 = new GeoTransform(HepGeom::Translate3D(0.,0.,zPos)); + double zPos = -ElectrodeDepth/2. + 1.5 * GeoModelKernelUnits::mm + ActiveDepth/2.; + GeoTransform *t1 = new GeoTransform(GeoTrf::Translate3D(0.,0.,zPos)); electrodePhys->add(new GeoSerialIdentifier(iCopy)); electrodePhys->add(t1); electrodePhys->add(activePhys); ++iCopy; - zPos += 3.5 * CLHEP::mm; + zPos += 3.5 * GeoModelKernelUnits::mm; electrodePhys->add(new GeoSerialIdentifier(iCopy)); electrodePhys->add(t1); electrodePhys->add(activePhys); // electrode in inactive argon zPos = -halfDepth + ElectrodeDepth/2.; - GeoTransform *t2 = new GeoTransform(HepGeom::Translate3D(0.,0.,zPos)); + GeoTransform *t2 = new GeoTransform(GeoTrf::Translate3D(0.,0.,zPos)); gapPhys->add(new GeoSerialIdentifier(1)); gapPhys->add(t2); gapPhys->add(electrodePhys); // big gaps in copper block - zPos = -fcalData[2].fullModuleDepth/2. + 2.2 * CLHEP::cm + halfDepth; + zPos = -fcalData[2].fullModuleDepth/2. + 2.2 * GeoModelKernelUnits::cm + halfDepth; for ( iCopy = 1; iCopy < 9; ++iCopy ){ modPhysical->add(new GeoSerialIdentifier(iCopy)); - modPhysical->add(new GeoTransform(HepGeom::Translate3D(0.,0.,zPos))); + modPhysical->add(new GeoTransform(GeoTrf::Translate3D(0.,0.,zPos))); modPhysical->add(gapPhys); - zPos += 3.5*CLHEP::cm; + zPos += 3.5*GeoModelKernelUnits::cm; } m_absPhysical3 = modPhysical; } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/FrontBeamConstructionH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/FrontBeamConstructionH62004.cxx index bcc64891756..fa4dba728df 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/FrontBeamConstructionH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/FrontBeamConstructionH62004.cxx @@ -23,18 +23,15 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" -#include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -126,14 +123,14 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62004::GetEnvelope() // Define dimension of Front part & position of Front part // // DB ? - const double bard_x = 20.0*CLHEP::cm; - const double bard_y = 20.0*CLHEP::cm; - //const double bard_z = 35.0*CLHEP::cm; - const double bard_z = 100.0*CLHEP::cm; - const double fbpc_z[2] = {60.4*CLHEP::cm,112.7*CLHEP::cm}; + const double bard_x = 20.0*GeoModelKernelUnits::cm; + const double bard_y = 20.0*GeoModelKernelUnits::cm; + //const double bard_z = 35.0*GeoModelKernelUnits::cm; + const double bard_z = 100.0*GeoModelKernelUnits::cm; + const double fbpc_z[2] = {60.4*GeoModelKernelUnits::cm,112.7*GeoModelKernelUnits::cm}; // Position in exp_hall - //const double z_bard=-2160.0*CLHEP::cm+80.1*CLHEP::cm+16.*CLHEP::cm+bard_z; - //const double z_bardm=-2160.0*CLHEP::cm+1362.3*CLHEP::cm; + //const double z_bard=-2160.0*GeoModelKernelUnits::cm+80.1*GeoModelKernelUnits::cm+16.*GeoModelKernelUnits::cm+bard_z; + //const double z_bardm=-2160.0*GeoModelKernelUnits::cm+1362.3*GeoModelKernelUnits::cm; @@ -147,27 +144,27 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62004::GetEnvelope() // In the old stand-alone code, all three were round with a radius of 5cm // and 7.5mm thickness. // Logbooks in the control-room say that their xyz sizes are: - // B1 : 30 x 30 x 10 CLHEP::mm - // W1,2 : 150 x 150 x 10 CLHEP::mm + // B1 : 30 x 30 x 10 GeoModelKernelUnits::mm + // W1,2 : 150 x 150 x 10 GeoModelKernelUnits::mm // They are certainly not round, so stick with the logbook values // The beam sees the instrumentation in the following order: // W1, W2, B1, MWPC5 log << MSG::INFO << "Create Front Scintillators ..." << endmsg; - const double Wxy= 75.0*CLHEP::mm; - const double Wz = 5.0*CLHEP::mm; - const double Bxy= 15.0*CLHEP::mm; - const double Bz = 5.0*CLHEP::mm; + const double Wxy= 75.0*GeoModelKernelUnits::mm; + const double Wz = 5.0*GeoModelKernelUnits::mm; + const double Bxy= 15.0*GeoModelKernelUnits::mm; + const double Bz = 5.0*GeoModelKernelUnits::mm; std::vector<double> v_ScintXY; std::vector<double> v_ScintZ; v_ScintXY.push_back(Wxy); v_ScintXY.push_back(Wxy); v_ScintXY.push_back(Bxy); - v_ScintZ.push_back(10.*CLHEP::mm); - v_ScintZ.push_back(40.*CLHEP::mm); - v_ScintZ.push_back(180.*CLHEP::mm); + v_ScintZ.push_back(10.*GeoModelKernelUnits::mm); + v_ScintZ.push_back(40.*GeoModelKernelUnits::mm); + v_ScintZ.push_back(180.*GeoModelKernelUnits::mm); // Create one Scintillator and place it twice along z: @@ -182,7 +179,7 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62004::GetEnvelope() //BScintPhysical->add( new GeoNameTag(ScintName) ); for ( unsigned int i = 0; i < v_ScintZ.size(); i++ ) { m_H62004FrontBeamPhysical->add( new GeoIdentifierTag(i+1) ); - m_H62004FrontBeamPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (v_ScintZ[ i ]-bard_z) ) ) ) ; m_H62004FrontBeamPhysical->add( new GeoNameTag(ScintName) ); + m_H62004FrontBeamPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (v_ScintZ[ i ]-bard_z) ) ) ) ; m_H62004FrontBeamPhysical->add( new GeoNameTag(ScintName) ); switch(i) { case 0: case 1: { m_H62004FrontBeamPhysical->add( WScintPhysical ); break; } @@ -198,13 +195,13 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62004::GetEnvelope() //------ Now create MWPC5 log << MSG::INFO << " Create MWPC5 " << endmsg; - MWPCConstruction MWPC5 (2.*CLHEP::mm); + MWPCConstruction MWPC5 (2.*GeoModelKernelUnits::mm); GeoVPhysVol* MwpcPhysical = MWPC5.GetEnvelope(); - const double MwpcPos = 445.*CLHEP::mm; + const double MwpcPos = 445.*GeoModelKernelUnits::mm; m_H62004FrontBeamPhysical->add( new GeoIdentifierTag(5) ); - m_H62004FrontBeamPhysical->add( new GeoTransform(HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (MwpcPos-bard_z) ) ) ); + m_H62004FrontBeamPhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (MwpcPos-bard_z) ) ) ); m_H62004FrontBeamPhysical->add( MwpcPhysical ); //----- Done with the MWPC @@ -216,7 +213,7 @@ GeoVPhysVol* LArGeo::FrontBeamConstructionH62004::GetEnvelope() GeoVPhysVol* BPCPhysical = BPC.GetEnvelope(); for(int i=1; i<3; ++i) { m_H62004FrontBeamPhysical->add( new GeoIdentifierTag(i) ); - m_H62004FrontBeamPhysical->add( new GeoTransform(HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (MwpcPos-bard_z) + fbpc_z[i-1]) ) ); + m_H62004FrontBeamPhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (MwpcPos-bard_z) + fbpc_z[i-1]) ) ); m_H62004FrontBeamPhysical->add(BPCPhysical); } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/HECConstructionH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/HECConstructionH62004.cxx index 198105e38e1..d1c4ba5bb72 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/HECConstructionH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/HECConstructionH62004.cxx @@ -22,10 +22,12 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoShapeUnion.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -43,7 +45,7 @@ -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; @@ -144,57 +146,57 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() double zCoordinate[6],innerRadius[6],outerRadius[6]; - double absorberPosY = 1.02*CLHEP::cm; - double PosYcorr = 0.005*CLHEP::cm; + double absorberPosY = 1.02*GeoModelKernelUnits::cm; + double PosYcorr = 0.005*GeoModelKernelUnits::cm; const double moduleNumber = (*hadronicEndcap)[0]->getInt("NSCT"); // 32 Modules unsigned int TBmoduleNumber = 8; - double moduleRinner1 = (*hecLongitudinalBlock)[0]->getDouble("BLRMN")*CLHEP::cm; // 37.2*CLHEP::cm Inner Radius - double moduleRinner2 = (*hecLongitudinalBlock)[1]->getDouble("BLRMN")*CLHEP::cm; // 47.5*CLHEP::cm - //double moduleRouter = (*hecLongitudinalBlock)[0]->getDouble("BLRMX")*CLHEP::cm; //203.*CLHEP::cm Outer Radius - double copperPad = (*hadronicEndcap)[0]->getDouble("COPPER")*CLHEP::cm; // 0.003.*CLHEP::cm - double gapSize = (*hadronicEndcap)[0]->getDouble("LARG")*CLHEP::cm; // 8.5*CLHEP::mm - double betweenWheel = (*hadronicEndcap)[0]->getDouble("GAPWHL")*CLHEP::cm-0.001*CLHEP::cm; //40.5*CLHEP::mm + double moduleRinner1 = (*hecLongitudinalBlock)[0]->getDouble("BLRMN")*GeoModelKernelUnits::cm; // 37.2*GeoModelKernelUnits::cm Inner Radius + double moduleRinner2 = (*hecLongitudinalBlock)[1]->getDouble("BLRMN")*GeoModelKernelUnits::cm; // 47.5*GeoModelKernelUnits::cm + //double moduleRouter = (*hecLongitudinalBlock)[0]->getDouble("BLRMX")*GeoModelKernelUnits::cm; //203.*GeoModelKernelUnits::cm Outer Radius + double copperPad = (*hadronicEndcap)[0]->getDouble("COPPER")*GeoModelKernelUnits::cm; // 0.003.*GeoModelKernelUnits::cm + double gapSize = (*hadronicEndcap)[0]->getDouble("LARG")*GeoModelKernelUnits::cm; // 8.5*GeoModelKernelUnits::mm + double betweenWheel = (*hadronicEndcap)[0]->getDouble("GAPWHL")*GeoModelKernelUnits::cm-0.001*GeoModelKernelUnits::cm; //40.5*GeoModelKernelUnits::mm int indexloop,index; for (indexloop=0; indexloop < depthNumber; ++indexloop){ - depthSize[indexloop] = (*hecLongitudinalBlock)[indexloop]->getDouble("BLDPTH")*CLHEP::cm; - firstAbsorber[indexloop]= (*hecLongitudinalBlock)[indexloop]->getDouble("PLATE0")*CLHEP::cm; + depthSize[indexloop] = (*hecLongitudinalBlock)[indexloop]->getDouble("BLDPTH")*GeoModelKernelUnits::cm; + firstAbsorber[indexloop]= (*hecLongitudinalBlock)[indexloop]->getDouble("PLATE0")*GeoModelKernelUnits::cm; gapNumber[indexloop] = (int) (*hecLongitudinalBlock)[indexloop]->getDouble("BLMOD"); // 4 or 8 } std::string sidx[4]={"_0","_1","_2","_3"}; for (indexloop=0; indexloop < 3; ++indexloop){ - kaptonPosition[indexloop] = (*hadronicEndcap)[0]->getDouble("KPTPOS" + sidx[indexloop])*CLHEP::cm; - kaptonWidth[indexloop] = (*hadronicEndcap)[0]->getDouble("KPTWID" + sidx[indexloop])*CLHEP::cm; + kaptonPosition[indexloop] = (*hadronicEndcap)[0]->getDouble("KPTPOS" + sidx[indexloop])*GeoModelKernelUnits::cm; + kaptonWidth[indexloop] = (*hadronicEndcap)[0]->getDouble("KPTWID" + sidx[indexloop])*GeoModelKernelUnits::cm; } for (indexloop=0; indexloop < 4; ++indexloop){ - tieRodPositionX[indexloop] = (*hadronicEndcap)[0]->getDouble("RODPOSX" + sidx[indexloop])*CLHEP::cm; - tieRodPositionY[indexloop] = (*hadronicEndcap)[0]->getDouble("RODPOSR" + sidx[indexloop])*CLHEP::cm; + tieRodPositionX[indexloop] = (*hadronicEndcap)[0]->getDouble("RODPOSX" + sidx[indexloop])*GeoModelKernelUnits::cm; + tieRodPositionY[indexloop] = (*hadronicEndcap)[0]->getDouble("RODPOSR" + sidx[indexloop])*GeoModelKernelUnits::cm; } for (indexloop=0; indexloop < 2; ++indexloop){ - tieRodDiameter[indexloop] = (*hadronicEndcap)[0]->getDouble("RODDIM" + sidx[indexloop])*CLHEP::cm; - spacerDiameter[indexloop] = (*hadronicEndcap)[0]->getDouble("SPCDIM" + sidx[indexloop])*CLHEP::cm; + tieRodDiameter[indexloop] = (*hadronicEndcap)[0]->getDouble("RODDIM" + sidx[indexloop])*GeoModelKernelUnits::cm; + spacerDiameter[indexloop] = (*hadronicEndcap)[0]->getDouble("SPCDIM" + sidx[indexloop])*GeoModelKernelUnits::cm; } - double absorberZ1 = (*hadronicEndcap)[0]->getDouble("PLATE_0")*CLHEP::cm; // 2.5*CLHEP::cm; - double absorberZ2 = (*hadronicEndcap)[0]->getDouble("PLATE_1")*CLHEP::cm; //5.0*CLHEP::cm; + double absorberZ1 = (*hadronicEndcap)[0]->getDouble("PLATE_0")*GeoModelKernelUnits::cm; // 2.5*GeoModelKernelUnits::cm; + double absorberZ2 = (*hadronicEndcap)[0]->getDouble("PLATE_1")*GeoModelKernelUnits::cm; //5.0*GeoModelKernelUnits::cm; - const double moduleDeltaPhi = 2*M_PI/moduleNumber; //11.25*CLHEP::deg; + const double moduleDeltaPhi = 2*M_PI/moduleNumber; //11.25*GeoModelKernelUnits::deg; double modulePhistart = -moduleDeltaPhi/2.; - //double modulePhistart = 0.0*CLHEP::deg; - zCoordinate[0]=0.0*CLHEP::cm; - zCoordinate[1]=depthSize[0]; //28.05*CLHEP::cm; - zCoordinate[2]=depthSize[0]+0.001*CLHEP::cm; //28.051*CLHEP::cm; + //double modulePhistart = 0.0*GeoModelKernelUnits::deg; + zCoordinate[0]=0.0*GeoModelKernelUnits::cm; + zCoordinate[1]=depthSize[0]; //28.05*GeoModelKernelUnits::cm; + zCoordinate[2]=depthSize[0]+0.001*GeoModelKernelUnits::cm; //28.051*GeoModelKernelUnits::cm; zCoordinate[3]=zCoordinate[2]+depthSize[1]+depthSize[2]+betweenWheel/2; zCoordinate[4]=zCoordinate[3]+depthSize[3]+depthSize[4]+betweenWheel/2; - zCoordinate[5]=181.8*CLHEP::cm; + zCoordinate[5]=181.8*GeoModelKernelUnits::cm; innerRadius[0]=moduleRinner1; innerRadius[1]=moduleRinner1; for (index=2; index<numberZplane;++index) {innerRadius[index]=moduleRinner2;} - for (index=0; index<numberZplane;++index) {outerRadius[index]=innerRadius[0] + 78.7*CLHEP::cm; } + for (index=0; index<numberZplane;++index) {outerRadius[index]=innerRadius[0] + 78.7*GeoModelKernelUnits::cm; } //---------------------------------------------------------------- @@ -273,9 +275,9 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() // Place Module in HEC mother //---------------------------------------------------------------- GeoSerialIdentifier *sI = new GeoSerialIdentifier(9); - Genfun::Variable Index; - Genfun::GENFUNCTION ModuleRotationAngle = M_PI/2. + moduleDeltaPhi/2. + moduleDeltaPhi*Index; - GeoXF::TRANSFUNCTION t = GeoXF::Pow(HepGeom::RotateZ3D(1.0),ModuleRotationAngle); + GeoGenfun::Variable Index; + GeoGenfun::GENFUNCTION ModuleRotationAngle = M_PI/2. + moduleDeltaPhi/2. + moduleDeltaPhi*Index; + GeoXF::TRANSFUNCTION t = GeoXF::Pow(GeoTrf::RotateZ3D(1.0),ModuleRotationAngle); GeoSerialTransformer *sT = new GeoSerialTransformer (physiModule,&t,TBmoduleNumber); m_h6Phys->add(sI); m_h6Phys->add(sT); @@ -297,9 +299,9 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() } //---------------------------------------------------------------- -// Absorbers , the inner and outer Radius are smaller on 1.02*CLHEP::cm +// Absorbers , the inner and outer Radius are smaller on 1.02*GeoModelKernelUnits::cm // but positionned in the center of depth. this alows -// to have 2 CLHEP::mm gap between the copper plates of neighbor Modules +// to have 2 GeoModelKernelUnits::mm gap between the copper plates of neighbor Modules //---------------------------------------------------------------- std::string absorberName = depthName + "::Absorber"; double absorberRinner1 = moduleRinner1-absorberPosY; @@ -332,7 +334,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() double depthPositionZ = 0.; for(int indexDepth=0; indexDepth<5; indexDepth++){ depthPositionZ +=depthSize[indexDepth]/2.; - if (indexDepth==1) depthPositionZ +=0.001*CLHEP::cm; + if (indexDepth==1) depthPositionZ +=0.001*GeoModelKernelUnits::cm; moduleRinner = moduleRinner2; if (indexDepth==0) moduleRinner = moduleRinner1; //for first depth //Absorber size and position @@ -349,7 +351,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() physiDepth[indexDepth] = new GeoPhysVol(logiDepth[indexDepth]); physiModule->add(new GeoIdentifierTag(100+indexDepth)); - physiModule->add(new GeoTransform(HepGeom::Translate3D(0,0,depthPositionZ))); + physiModule->add(new GeoTransform(GeoTrf::Translate3D(0,0,depthPositionZ))); physiModule->add(physiDepth[indexDepth]); depthPositionZ +=depthSize[indexDepth]/2.; if (indexDepth==2) depthPositionZ +=betweenWheel; @@ -368,9 +370,9 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() absorberNo=2; } - Genfun::Variable Index; - GeoXF::TRANSFUNCTION TS = GeoXF::Pow(HepGeom::TranslateZ3D(1.0),slicePositionZ + (absorberSize+gapSize)*Index); - GeoXF::TRANSFUNCTION TA = HepGeom::TranslateX3D(absorberPosY) * GeoXF::Pow(HepGeom::TranslateZ3D(1.0),absorberPositionZ + (absorberSize+gapSize)*Index); + GeoGenfun::Variable Index; + GeoXF::TRANSFUNCTION TS = GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),slicePositionZ + (absorberSize+gapSize)*Index); + GeoXF::TRANSFUNCTION TA = GeoTrf::TranslateX3D(absorberPosY) * GeoXF::Pow(GeoTrf::TranslateZ3D(1.0),absorberPositionZ + (absorberSize+gapSize)*Index); GeoSerialIdentifier *sI = new GeoSerialIdentifier(sliceCopyNo); GeoSerialTransformer *sTS = new GeoSerialTransformer(physiSlice[sliceNo], &TS, gapNumber[indexDepth]); @@ -383,14 +385,14 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() double firstAbsorberPositionZ = firstAbsorber[0]/2.- depthSize[0]/2.0; physiDepth[0]->add(new GeoIdentifierTag(50)); - physiDepth[0]->add(new GeoTransform(HepGeom::Translate3D(absorberPosY,0,firstAbsorberPositionZ))); + physiDepth[0]->add(new GeoTransform(GeoTrf::Translate3D(absorberPosY,0,firstAbsorberPositionZ))); physiDepth[0]->add(physiFirstAbsorber); firstAbsorberPositionZ = firstAbsorber[3]/2.- depthSize[3]/2.0; physiAbsorber[1] = new GeoPhysVol(logiAbsorber[1]); physiDepth[3]->add(new GeoIdentifierTag(51)); - physiDepth[3]->add(new GeoTransform(HepGeom::Translate3D(absorberPosY,0,firstAbsorberPositionZ))); + physiDepth[3]->add(new GeoTransform(GeoTrf::Translate3D(absorberPosY,0,firstAbsorberPositionZ))); physiDepth[3]->add(physiAbsorber[1]); @@ -414,13 +416,13 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() physiEstBoard = new GeoPhysVol(logiEstBoard); physiSlice[indexBoard]->add(new GeoIdentifierTag(indexKapton)); - physiSlice[indexBoard]->add(new GeoTransform(HepGeom::Translate3D(0,0,kaptonPositionZ))); + physiSlice[indexBoard]->add(new GeoTransform(GeoTrf::Translate3D(0,0,kaptonPositionZ))); physiSlice[indexBoard]->add(physiEstBoard); if(indexKapton==1) { physiPadBoard = new GeoPhysVol(logiPadBoard); physiEstBoard->add(new GeoIdentifierTag(indexKapton)); - physiEstBoard->add(new GeoTransform(HepGeom::Translate3D(0,0,0))); + physiEstBoard->add(new GeoTransform(GeoTrf::Translate3D(0,0,0))); physiEstBoard->add(physiPadBoard); } }//for indexBoard @@ -430,12 +432,12 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() std::string tieRodName = sliceName + "::TieRod"; double ztie[2]; - ztie[0]=-0.227825*CLHEP::cm; - ztie[1]= 0.227825*CLHEP::cm; - double rodSize = 0.39435*CLHEP::cm; + ztie[0]=-0.227825*GeoModelKernelUnits::cm; + ztie[1]= 0.227825*GeoModelKernelUnits::cm; + double rodSize = 0.39435*GeoModelKernelUnits::cm; for (int indexWheel=0; indexWheel<2; indexWheel++) { - solidTieRod[indexWheel] = new GeoTubs(0.*CLHEP::cm,spacerDiameter[indexWheel]/2.,rodSize/2., - 0.*CLHEP::deg,360.*CLHEP::deg); //size + solidTieRod[indexWheel] = new GeoTubs(0.*GeoModelKernelUnits::cm,spacerDiameter[indexWheel]/2.,rodSize/2., + 0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); //size logiTieRod[indexWheel] = new GeoLogVol(tieRodName,solidTieRod[indexWheel], Iron); } for(int numberSlice=0; numberSlice<3; numberSlice++){ @@ -446,13 +448,13 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() for(int iz=0;iz<2;iz++){ physiTieRod[numberTie] = new GeoPhysVol(logiTieRod[numberTie]); physiSlice[numberSlice]->add(new GeoIdentifierTag(indexRod)); - physiSlice[numberSlice]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionY[indexRod], + physiSlice[numberSlice]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionY[indexRod], tieRodPositionX[indexRod],ztie[iz]))); physiSlice[numberSlice]->add(physiTieRod[numberTie]); physiTieRod[numberTie] = new GeoPhysVol(logiTieRod[numberTie]); physiSlice[numberSlice]->add(new GeoIdentifierTag(indexRod)); - physiSlice[numberSlice]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionY[indexRod], + physiSlice[numberSlice]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionY[indexRod], -tieRodPositionX[indexRod],ztie[iz]))); physiSlice[numberSlice]->add(physiTieRod[numberTie]); }//for iz @@ -460,7 +462,7 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() for( int iz1=0;iz1<2;iz1++){ physiTieRod[numberTie] = new GeoPhysVol(logiTieRod[numberTie]); physiSlice[numberSlice]->add(new GeoIdentifierTag(indexRod)); - physiSlice[numberSlice]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionY[0],tieRodPositionX[0],ztie[iz1]))); + physiSlice[numberSlice]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionY[0],tieRodPositionX[0],ztie[iz1]))); physiSlice[numberSlice]->add(physiTieRod[numberTie]); }//for iz1 } @@ -469,8 +471,8 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() // Tie rods in Absorbers //---------------------------------------------------------------- - solidAbsorberTieRod[0] = new GeoTubs(0.*CLHEP::cm,tieRodDiameter[0]/2.,absorberZ1/2.,0.*CLHEP::deg,360.*CLHEP::deg); - solidAbsorberTieRod[1] = new GeoTubs(0.*CLHEP::cm,tieRodDiameter[1]/2.,absorberZ2/2.,0.*CLHEP::deg,360.*CLHEP::deg); + solidAbsorberTieRod[0] = new GeoTubs(0.*GeoModelKernelUnits::cm,tieRodDiameter[0]/2.,absorberZ1/2.,0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); + solidAbsorberTieRod[1] = new GeoTubs(0.*GeoModelKernelUnits::cm,tieRodDiameter[1]/2.,absorberZ2/2.,0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); logiAbsorberTieRod[0] = new GeoLogVol(tieRodName, solidAbsorberTieRod[0], Iron); logiAbsorberTieRod[1] = new GeoLogVol(tieRodName, solidAbsorberTieRod[1], Iron); for(int indexA=0; indexA<3; indexA++){ @@ -480,19 +482,19 @@ GeoVFullPhysVol* LArGeo::HECConstructionH62004::GetEnvelope() for(indexRod=1; indexRod<2; indexRod++){ physiAbsorberTieRod[indexR] = new GeoPhysVol(logiAbsorberTieRod[indexR]); physiAbsorber[indexA]->add(new GeoIdentifierTag(indexRod)); - physiAbsorber[indexA]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionY[indexRod]+absorberPosY, + physiAbsorber[indexA]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionY[indexRod]+absorberPosY, tieRodPositionX[indexRod], 0))); physiAbsorber[indexA]->add(physiAbsorberTieRod[indexR]); physiAbsorberTieRod[indexR] = new GeoPhysVol(logiAbsorberTieRod[indexR]); physiAbsorber[indexA]->add(new GeoIdentifierTag(indexRod)); - physiAbsorber[indexA]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionY[indexRod]+absorberPosY, + physiAbsorber[indexA]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionY[indexRod]+absorberPosY, -tieRodPositionX[indexRod], 0))); physiAbsorber[indexA]->add(physiAbsorberTieRod[indexR]); } physiAbsorberTieRod[indexR] = new GeoPhysVol(logiAbsorberTieRod[indexR]); physiAbsorber[indexA]->add(new GeoIdentifierTag(indexRod)); - physiAbsorber[indexA]->add(new GeoTransform(HepGeom::Translate3D(tieRodPositionY[0]+absorberPosY, + physiAbsorber[indexA]->add(new GeoTransform(GeoTrf::Translate3D(tieRodPositionY[0]+absorberPosY, tieRodPositionX[0],0))); physiAbsorber[indexA]->add(physiAbsorberTieRod[indexR]); } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/LArDetectorFactoryH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/LArDetectorFactoryH62004.cxx index 89945c3451b..0fafefd9cfd 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/LArDetectorFactoryH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/LArDetectorFactoryH62004.cxx @@ -25,10 +25,12 @@ #include "GeoModelKernel/GeoSerialDenominator.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoSerialTransformer.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "StoreGate/StoreGateSvc.h" #include "AthContainers/DataVector.h" @@ -67,7 +69,7 @@ //#include "LArGeoRAL/RAL.h" //#include "LArGeoCode/VDetectorParameters.h" -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; @@ -115,8 +117,8 @@ void LArGeo::LArDetectorFactoryH62004::getSimulationParameters() m_tableYpos = 70.; } - std::cout << " Use cryo X : " << m_cryoXpos << " CLHEP::mm" << std::endl; - std::cout << " Use table Y : " << m_tableYpos << " CLHEP::mm" << std::endl; + std::cout << " Use cryo X : " << m_cryoXpos << " GeoModelKernelUnits::mm" << std::endl; + std::cout << " Use table Y : " << m_tableYpos << " GeoModelKernelUnits::mm" << std::endl; const_cast<LArGeoTB2004Options*>(largeoTB2004Options)->printMe(); @@ -154,9 +156,9 @@ void LArGeo::LArDetectorFactoryH62004::create(GeoPhysVol *world) const GeoMaterial *air = materialManager->getMaterial("std::Air"); - double expHallX = 14000.*CLHEP::mm; - double expHallY = 14000.*CLHEP::mm; - double expHallZ = 50000.*CLHEP::mm; + double expHallX = 14000.*GeoModelKernelUnits::mm; + double expHallY = 14000.*GeoModelKernelUnits::mm; + double expHallZ = 50000.*GeoModelKernelUnits::mm; //-----------------------------------------------------------------------------------// // Next make the box that describes the shape of the expHall volume: // @@ -181,20 +183,20 @@ void LArGeo::LArDetectorFactoryH62004::create(GeoPhysVol *world) // the element we want to position in the following order: - double Theta = -90. * CLHEP::deg; - double Phi = 0. * CLHEP::deg; + double Theta = -90. * GeoModelKernelUnits::deg; + double Phi = 0. * GeoModelKernelUnits::deg; - CLHEP::HepRotation Mrot ; - Mrot.rotateX(Theta); - Mrot.rotateZ(Phi); - CLHEP::Hep3Vector pos3Vector( - m_cryoXpos*CLHEP::mm, 0.*CLHEP::mm, 12250.*CLHEP::mm ); + GeoTrf::Transform3D Mrot = GeoTrf::RotateZ3D(Phi) * GeoTrf::RotateX3D(Theta); + GeoTrf::Translation3D pos3Vector(- m_cryoXpos*GeoModelKernelUnits::mm + , 0.*GeoModelKernelUnits::mm + , 12250.*GeoModelKernelUnits::mm ); H6CryostatConstruction H6CryoCons; GeoVPhysVol* CryoEnvelope = 0; CryoEnvelope = H6CryoCons.GetEnvelope(); expHallPhys->add(new GeoNameTag("LAr")); - //expHallPhys->add( new GeoTransform( HepGeom::Translate3D(pos3Vector)*HepGeom::RotateX3D(Theta)*HepGeom::RotateZ3D(Phi) )); - expHallPhys->add( new GeoTransform( HepGeom::Transform3D(Mrot, pos3Vector) ) ); + //expHallPhys->add( new GeoTransform( GeoTrf::Translate3D(pos3Vector)*GeoTrf::RotateX3D(Theta)*GeoTrf::RotateZ3D(Phi) )); + expHallPhys->add(new GeoTransform(pos3Vector*Mrot));// GeoTrf::Transform3D(Mrot, pos3Vector) ) ); expHallPhys->add(CryoEnvelope); @@ -205,28 +207,28 @@ void LArGeo::LArDetectorFactoryH62004::create(GeoPhysVol *world) // Add the front beam instrumentation: FrontBeamConstructionH62004 FrontBeamConstruction; // DB ? - const double bard_z = 100.0*CLHEP::cm; - const double z_bard=-2160.0*CLHEP::cm+80.1*CLHEP::cm+16.*CLHEP::cm+bard_z; + const double bard_z = 100.0*GeoModelKernelUnits::cm; + const double z_bard=-2160.0*GeoModelKernelUnits::cm+80.1*GeoModelKernelUnits::cm+16.*GeoModelKernelUnits::cm+bard_z; { // (with 350=1/2 length of FrontBeam volume) GeoVPhysVol* front = 0; front = FrontBeamConstruction.GetEnvelope(); if(front !=0 && expHallPhys !=0){ expHallPhys->add( new GeoNameTag("H62004::Front")); - expHallPhys->add( new GeoTransform( HepGeom::TranslateZ3D(z_bard) ) ); + expHallPhys->add( new GeoTransform( GeoTrf::TranslateZ3D(z_bard) ) ); expHallPhys->add(front); } } // Add middle chambers MiddleBeamConstructionH62004 MiddleBeamConstruction; - const double z_bardm=-2160.0*CLHEP::cm+1362.3*CLHEP::cm; - const double bttb_pos = 833.5*CLHEP::cm; + const double z_bardm=-2160.0*GeoModelKernelUnits::cm+1362.3*GeoModelKernelUnits::cm; + const double bttb_pos = 833.5*GeoModelKernelUnits::cm; { GeoVPhysVol* middle = 0; middle = MiddleBeamConstruction.GetEnvelope(); if(middle != 0 && expHallPhys !=0){ - double ym_pos = m_tableYpos * (z_bardm + 2160*CLHEP::cm) * (1./(bttb_pos + 2160*CLHEP::cm)); + double ym_pos = m_tableYpos * (z_bardm + 2160*GeoModelKernelUnits::cm) * (1./(bttb_pos + 2160*GeoModelKernelUnits::cm)); expHallPhys->add( new GeoNameTag("H62004::Middle")); - expHallPhys->add( new GeoTransform( HepGeom::TranslateY3D(ym_pos) * HepGeom::TranslateZ3D(z_bardm) ) ); + expHallPhys->add( new GeoTransform( GeoTrf::TranslateY3D(ym_pos) * GeoTrf::TranslateZ3D(z_bardm) ) ); expHallPhys->add(middle); } } @@ -237,24 +239,24 @@ void LArGeo::LArDetectorFactoryH62004::create(GeoPhysVol *world) mov = MovableTable.GetEnvelope(); if(mov != 0 && expHallPhys !=0){ expHallPhys->add( new GeoNameTag("H62004::Movable")); - expHallPhys->add( new GeoTransform( HepGeom::TranslateY3D(m_tableYpos) * HepGeom::TranslateZ3D(bttb_pos) ) ); + expHallPhys->add( new GeoTransform( GeoTrf::TranslateY3D(m_tableYpos) * GeoTrf::TranslateZ3D(bttb_pos) ) ); expHallPhys->add(mov); } } // WarmTC after the cryostat - double WTC_tild = -1.1*CLHEP::deg; // 24 CLHEP::mm tild on 1250 CLHEP::mm length !! should go to DB ? - double WTC_len = 591.5*CLHEP::mm; - double WTC_sci_z = 12.7*CLHEP::mm; - double Muon_dist = 120.0*CLHEP::mm; - double Muon_z = 1.0*CLHEP::cm; - double bcry_zpos = 1225.0*CLHEP::cm; - double bcry_rwarm = 129.55*CLHEP::cm; - double WTC_x = 0.0*CLHEP::mm; - double WTC_y = 0.0*CLHEP::mm; - double WTC_z = 460.0*CLHEP::mm - 120.*CLHEP::mm - 10.*CLHEP::mm; - double z_m = (86.0*CLHEP::mm + WTC_len + WTC_sci_z + Muon_dist + Muon_z) / 2; + double WTC_tild = -1.1*GeoModelKernelUnits::deg; // 24 GeoModelKernelUnits::mm tild on 1250 GeoModelKernelUnits::mm length !! should go to DB ? + double WTC_len = 591.5*GeoModelKernelUnits::mm; + double WTC_sci_z = 12.7*GeoModelKernelUnits::mm; + double Muon_dist = 120.0*GeoModelKernelUnits::mm; + double Muon_z = 1.0*GeoModelKernelUnits::cm; + double bcry_zpos = 1225.0*GeoModelKernelUnits::cm; + double bcry_rwarm = 129.55*GeoModelKernelUnits::cm; + double WTC_x = 0.0*GeoModelKernelUnits::mm; + double WTC_y = 0.0*GeoModelKernelUnits::mm; + double WTC_z = 460.0*GeoModelKernelUnits::mm - 120.*GeoModelKernelUnits::mm - 10.*GeoModelKernelUnits::mm; + double z_m = (86.0*GeoModelKernelUnits::mm + WTC_len + WTC_sci_z + Muon_dist + Muon_z) / 2; WarmTCConstructionH62004 wtcConstruction; { @@ -264,10 +266,8 @@ void LArGeo::LArDetectorFactoryH62004::create(GeoPhysVol *world) std::cout<<"WTC envelope: "<<wtc<<"/"<<expHallPhys<<std::endl; if(wtc !=0 && expHallPhys !=0){ expHallPhys->add( new GeoNameTag("LAr")); - CLHEP::HepRotation rotTC; - rotTC.rotateX(WTC_tild); - expHallPhys->add( new GeoTransform( HepGeom::Transform3D( rotTC, - CLHEP::Hep3Vector(WTC_x, WTC_y, bcry_zpos + bcry_rwarm + WTC_z + z_m)))); + GeoTrf::RotateX3D rotTC(WTC_tild); + expHallPhys->add( new GeoTransform( GeoTrf::Translation3D(WTC_x, WTC_y, bcry_zpos + bcry_rwarm + WTC_z + z_m) * rotTC)); expHallPhys->add(wtc); } } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/MiddleBeamConstructionH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/MiddleBeamConstructionH62004.cxx index 24653ca45cd..8101631899d 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/MiddleBeamConstructionH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/MiddleBeamConstructionH62004.cxx @@ -23,6 +23,8 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -30,11 +32,7 @@ #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelUtilities/DecodeVersionKey.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -116,13 +114,13 @@ GeoVPhysVol* LArGeo::MiddleBeamConstructionH62004::GetEnvelope() // // Define dimension of Middle part & position of Front part // - double bmtb_x = 12.0*CLHEP::cm; - double bmtb_y = 12.0*CLHEP::cm; - double bmtb_z = 25.0*CLHEP::cm; - //double bmtb_pos = 10.0*CLHEP::cm; - double bpco_pos[4] = {1.*CLHEP::cm, 1.*CLHEP::cm, 15.3*CLHEP::cm, 15.3*CLHEP::cm}; - double bpco_shift[4] = {0.*CLHEP::cm, 7.8*CLHEP::cm, 0.*CLHEP::cm, 7.5*CLHEP::cm}; - double bpc_old_z = (5.100/2)*CLHEP::cm; + double bmtb_x = 12.0*GeoModelKernelUnits::cm; + double bmtb_y = 12.0*GeoModelKernelUnits::cm; + double bmtb_z = 25.0*GeoModelKernelUnits::cm; + //double bmtb_pos = 10.0*GeoModelKernelUnits::cm; + double bpco_pos[4] = {1.*GeoModelKernelUnits::cm, 1.*GeoModelKernelUnits::cm, 15.3*GeoModelKernelUnits::cm, 15.3*GeoModelKernelUnits::cm}; + double bpco_shift[4] = {0.*GeoModelKernelUnits::cm, 7.8*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 7.5*GeoModelKernelUnits::cm}; + double bpc_old_z = (5.100/2)*GeoModelKernelUnits::cm; GeoBox* H62004MiddleBeamShape = new GeoBox( bmtb_x, bmtb_y, bmtb_z ); const GeoLogVol* H62004MiddleBeamLogical = new GeoLogVol( H62004MiddleBeamName, H62004MiddleBeamShape, Air ); @@ -139,11 +137,11 @@ GeoVPhysVol* LArGeo::MiddleBeamConstructionH62004::GetEnvelope() m_H62004MiddleBeamPhysical->add( new GeoIdentifierTag((3+i/2)*10+i) ); switch(i) { case 0: case 2: { - m_H62004MiddleBeamPhysical->add( new GeoTransform(HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, bpco_pos[i]+bpco_shift[i]+bpc_old_z-bmtb_z) ) ); + m_H62004MiddleBeamPhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, bpco_pos[i]+bpco_shift[i]+bpc_old_z-bmtb_z) ) ); m_H62004MiddleBeamPhysical->add(BPCPhysical); break;} case 1: case 3: { - m_H62004MiddleBeamPhysical->add( new GeoTransform(HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, bpco_pos[i]+bpco_shift[i]+bpc_old_z-bmtb_z) ) ); + m_H62004MiddleBeamPhysical->add( new GeoTransform(GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, bpco_pos[i]+bpco_shift[i]+bpc_old_z-bmtb_z) ) ); m_H62004MiddleBeamPhysical->add(BPCPhysical); break;} } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ModulesConstructionH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ModulesConstructionH62004.cxx index 41620b77871..f2ffab36b2b 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ModulesConstructionH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ModulesConstructionH62004.cxx @@ -36,10 +36,12 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoShapeUnion.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -70,7 +72,7 @@ LArGeo::ModulesConstructionH62004::ModulesConstructionH62004():m_ModulesPhys(0), { // fill the static arrays, if called first time // - //const double thick = 1.*CLHEP::cm; + //const double thick = 1.*GeoModelKernelUnits::cm; static bool first = true; if(first){ first = false; @@ -80,65 +82,65 @@ LArGeo::ModulesConstructionH62004::ModulesConstructionH62004():m_ModulesPhys(0), s_angleX[i] = s_angleY[i] = s_angleZ[i] = 0.; } - s_dX[0] = s_dX[1] = 1.*CLHEP::cm; s_dY[0]= s_dY[1] = 31.6*CLHEP::cm; s_dZ[0] = s_dZ[1] = 50.*CLHEP::cm; - s_shiftX[0] = -26.*CLHEP::cm; s_shiftX[1] = -s_shiftX[0]; - s_shiftY[0] = s_shiftY[1] = 85.1*CLHEP::cm; s_shiftZ[0] = s_shiftZ[1] = -3.*CLHEP::cm; - s_angleX[0] = s_angleX[1] = 4.668*CLHEP::deg; s_angleZ[0] = s_angleZ[1] = 0.*CLHEP::deg; - s_angleY[0] = -30.*CLHEP::deg; s_angleY[1] = -s_angleY[0]; - s_dX[2] = 98.1*CLHEP::cm; s_dY[2] = 98.2*CLHEP::cm; s_dZ[2] = 30.6*CLHEP::cm; - s_shiftX[2] = 0.*CLHEP::cm; s_shiftY[2] = 89.7*CLHEP::cm; s_shiftZ[2] = -42.*CLHEP::cm; - s_angleX[2] = 94.668*CLHEP::deg; s_angleY[2] = 0.; s_angleZ[2] = 90.*CLHEP::degree; + s_dX[0] = s_dX[1] = 1.*GeoModelKernelUnits::cm; s_dY[0]= s_dY[1] = 31.6*GeoModelKernelUnits::cm; s_dZ[0] = s_dZ[1] = 50.*GeoModelKernelUnits::cm; + s_shiftX[0] = -26.*GeoModelKernelUnits::cm; s_shiftX[1] = -s_shiftX[0]; + s_shiftY[0] = s_shiftY[1] = 85.1*GeoModelKernelUnits::cm; s_shiftZ[0] = s_shiftZ[1] = -3.*GeoModelKernelUnits::cm; + s_angleX[0] = s_angleX[1] = 4.668*GeoModelKernelUnits::deg; s_angleZ[0] = s_angleZ[1] = 0.*GeoModelKernelUnits::deg; + s_angleY[0] = -30.*GeoModelKernelUnits::deg; s_angleY[1] = -s_angleY[0]; + s_dX[2] = 98.1*GeoModelKernelUnits::cm; s_dY[2] = 98.2*GeoModelKernelUnits::cm; s_dZ[2] = 30.6*GeoModelKernelUnits::cm; + s_shiftX[2] = 0.*GeoModelKernelUnits::cm; s_shiftY[2] = 89.7*GeoModelKernelUnits::cm; s_shiftZ[2] = -42.*GeoModelKernelUnits::cm; + s_angleX[2] = 94.668*GeoModelKernelUnits::deg; s_angleY[2] = 0.; s_angleZ[2] = 90.*GeoModelKernelUnits::degree; - s_dX[3] = 1.*CLHEP::cm; s_dY[3] = 43.*CLHEP::cm; s_dZ[3] = 40.*CLHEP::cm; + s_dX[3] = 1.*GeoModelKernelUnits::cm; s_dY[3] = 43.*GeoModelKernelUnits::cm; s_dZ[3] = 40.*GeoModelKernelUnits::cm; s_dX[4] = s_dX[3]; s_dY[4] = s_dY[3]; s_dZ[4] = s_dZ[3]; - s_shiftX[3] = -58.5*CLHEP::cm; s_shiftY[3] = 12.2*CLHEP::cm; s_shiftZ[3] = 5.*CLHEP::cm; + s_shiftX[3] = -58.5*GeoModelKernelUnits::cm; s_shiftY[3] = 12.2*GeoModelKernelUnits::cm; s_shiftZ[3] = 5.*GeoModelKernelUnits::cm; s_shiftX[4] = -s_shiftX[3]; s_shiftY[4] = s_shiftY[3]; s_shiftZ[4] = s_shiftZ[3]; - s_angleX[3] = s_angleX[4] = 4.668*CLHEP::deg; s_angleY[3] = -45.*CLHEP::deg; + s_angleX[3] = s_angleX[4] = 4.668*GeoModelKernelUnits::deg; s_angleY[3] = -45.*GeoModelKernelUnits::deg; s_angleY[4] = -s_angleY[3]; - s_angleZ[3] = 0.*CLHEP::deg; + s_angleZ[3] = 0.*GeoModelKernelUnits::deg; s_angleZ[4] = -s_angleZ[3]; - s_dX[5] = 130.*CLHEP::cm; s_dY[5] = 131.*CLHEP::cm; s_dZ[5] = 43.*CLHEP::cm; - s_shiftX[5] = 0.*CLHEP::cm; s_shiftY[5] = 18.1*CLHEP::cm; s_shiftZ[5] = -62.*CLHEP::cm; - s_angleX[5] = 94.668*CLHEP::deg; s_angleY[5] = 0.*CLHEP::deg; - s_angleZ[5] = 90.*CLHEP::deg; + s_dX[5] = 130.*GeoModelKernelUnits::cm; s_dY[5] = 131.*GeoModelKernelUnits::cm; s_dZ[5] = 43.*GeoModelKernelUnits::cm; + s_shiftX[5] = 0.*GeoModelKernelUnits::cm; s_shiftY[5] = 18.1*GeoModelKernelUnits::cm; s_shiftZ[5] = -62.*GeoModelKernelUnits::cm; + s_angleX[5] = 94.668*GeoModelKernelUnits::deg; s_angleY[5] = 0.*GeoModelKernelUnits::deg; + s_angleZ[5] = 90.*GeoModelKernelUnits::deg; - s_dX[6] = s_dX[7] = 1.*CLHEP::cm; s_dY[6] = s_dY[7] = 27.*CLHEP::cm; s_dZ[6] = s_dZ[7] = 40.*CLHEP::cm; - s_shiftX[6] = -58.*CLHEP::cm; s_shiftY[6] = s_shiftY[7] = -57.85*CLHEP::cm; s_shiftZ[6] = s_shiftZ[7] = -1.*CLHEP::cm; + s_dX[6] = s_dX[7] = 1.*GeoModelKernelUnits::cm; s_dY[6] = s_dY[7] = 27.*GeoModelKernelUnits::cm; s_dZ[6] = s_dZ[7] = 40.*GeoModelKernelUnits::cm; + s_shiftX[6] = -58.*GeoModelKernelUnits::cm; s_shiftY[6] = s_shiftY[7] = -57.85*GeoModelKernelUnits::cm; s_shiftZ[6] = s_shiftZ[7] = -1.*GeoModelKernelUnits::cm; s_shiftX[7] = - s_shiftX[6]; - s_angleX[6] = s_angleX[7] = 4.668*CLHEP::deg; s_angleY[6] = -45.*CLHEP::deg; s_angleZ[6] = s_angleZ[7] = 0.*CLHEP::deg; + s_angleX[6] = s_angleX[7] = 4.668*GeoModelKernelUnits::deg; s_angleY[6] = -45.*GeoModelKernelUnits::deg; s_angleZ[6] = s_angleZ[7] = 0.*GeoModelKernelUnits::deg; s_angleY[7] = -s_angleY[6]; - s_dX[8] = 130.*CLHEP::cm; s_dY[8] = 131.*CLHEP::cm; s_dZ[8] = 27.*CLHEP::cm; - s_shiftX[8] = 0.*CLHEP::cm; s_shiftY[8] = -51.9*CLHEP::cm; s_shiftZ[8] = -67.*CLHEP::cm; - s_angleX[8] = 94.668*CLHEP::degree; s_angleY[8] = 0.*CLHEP::degree; s_angleZ[8] = 90.*CLHEP::degree; - s_dX[9] = 1.*CLHEP::cm; s_dY[9] = 82.*CLHEP::cm; s_dZ[9] = 44.5*CLHEP::cm; - s_shiftX[9] = 0.*CLHEP::cm; s_shiftY[9] = -89.0*CLHEP::cm; s_shiftZ[9] = 32.5*CLHEP::cm; - s_angleX[9] = 4.668*CLHEP::degree; s_angleY[9] = 0.*CLHEP::degree; s_angleZ[9] = 90.*CLHEP::degree; + s_dX[8] = 130.*GeoModelKernelUnits::cm; s_dY[8] = 131.*GeoModelKernelUnits::cm; s_dZ[8] = 27.*GeoModelKernelUnits::cm; + s_shiftX[8] = 0.*GeoModelKernelUnits::cm; s_shiftY[8] = -51.9*GeoModelKernelUnits::cm; s_shiftZ[8] = -67.*GeoModelKernelUnits::cm; + s_angleX[8] = 94.668*GeoModelKernelUnits::degree; s_angleY[8] = 0.*GeoModelKernelUnits::degree; s_angleZ[8] = 90.*GeoModelKernelUnits::degree; + s_dX[9] = 1.*GeoModelKernelUnits::cm; s_dY[9] = 82.*GeoModelKernelUnits::cm; s_dZ[9] = 44.5*GeoModelKernelUnits::cm; + s_shiftX[9] = 0.*GeoModelKernelUnits::cm; s_shiftY[9] = -89.0*GeoModelKernelUnits::cm; s_shiftZ[9] = 32.5*GeoModelKernelUnits::cm; + s_angleX[9] = 4.668*GeoModelKernelUnits::degree; s_angleY[9] = 0.*GeoModelKernelUnits::degree; s_angleZ[9] = 90.*GeoModelKernelUnits::degree; - s_dX[10] = s_dX[11] = 1.*CLHEP::cm; s_dY[10] = s_dY[11] = 41.5*CLHEP::cm; s_dZ[10] = s_dZ[11] = 20.3*CLHEP::cm; - s_shiftX[10] = -15.4*CLHEP::cm; s_shiftY[10] = s_shiftY[11] = 14.50*CLHEP::cm; s_shiftZ[10] = s_shiftZ[11] = -39.*CLHEP::cm; + s_dX[10] = s_dX[11] = 1.*GeoModelKernelUnits::cm; s_dY[10] = s_dY[11] = 41.5*GeoModelKernelUnits::cm; s_dZ[10] = s_dZ[11] = 20.3*GeoModelKernelUnits::cm; + s_shiftX[10] = -15.4*GeoModelKernelUnits::cm; s_shiftY[10] = s_shiftY[11] = 14.50*GeoModelKernelUnits::cm; s_shiftZ[10] = s_shiftZ[11] = -39.*GeoModelKernelUnits::cm; s_shiftX[11] = - s_shiftX[10]; - s_angleX[10] = s_angleX[11] = 4.668*CLHEP::degree; s_angleY[10] = -45.*CLHEP::degree; s_angleZ[10] = 0.*CLHEP::degree; + s_angleX[10] = s_angleX[11] = 4.668*GeoModelKernelUnits::degree; s_angleY[10] = -45.*GeoModelKernelUnits::degree; s_angleZ[10] = 0.*GeoModelKernelUnits::degree; s_angleY[11] = -s_angleY[10]; s_angleZ[11] = -s_angleZ[10]; - s_dX[12] = s_dX[13] = 1.*CLHEP::cm; s_dY[12] = s_dY[13] = 27.*CLHEP::cm; s_dZ[12] = s_dZ[13] = 20.3*CLHEP::cm; - s_shiftX[12] = -15.4*CLHEP::cm; s_shiftY[12] = s_shiftY[13] = -54.4*CLHEP::cm; s_shiftZ[12] = s_shiftZ[13] = -43.8*CLHEP::cm; + s_dX[12] = s_dX[13] = 1.*GeoModelKernelUnits::cm; s_dY[12] = s_dY[13] = 27.*GeoModelKernelUnits::cm; s_dZ[12] = s_dZ[13] = 20.3*GeoModelKernelUnits::cm; + s_shiftX[12] = -15.4*GeoModelKernelUnits::cm; s_shiftY[12] = s_shiftY[13] = -54.4*GeoModelKernelUnits::cm; s_shiftZ[12] = s_shiftZ[13] = -43.8*GeoModelKernelUnits::cm; s_shiftX[13] = -s_shiftX[12]; - s_angleX[12] = s_angleX[13] = 4.668*CLHEP::degree; s_angleY[12] = -45.*CLHEP::degree; s_angleZ[12] = 0.*CLHEP::degree; + s_angleX[12] = s_angleX[13] = 4.668*GeoModelKernelUnits::degree; s_angleY[12] = -45.*GeoModelKernelUnits::degree; s_angleZ[12] = 0.*GeoModelKernelUnits::degree; s_angleY[13] = -s_angleY[12]; s_angleZ[13] = -s_angleZ[12]; - s_dX[14] = s_dX[15] = 1.*CLHEP::cm; s_dY[14] = s_dY[15] = 12.*CLHEP::cm; s_dZ[14] = s_dZ[15] = 25.3*CLHEP::cm; - s_shiftX[14] = -19.5*CLHEP::cm; s_shiftY[14] = s_shiftY[15] = -93.5*CLHEP::cm; s_shiftZ[14] = s_shiftZ[15] = -46.5*CLHEP::cm; + s_dX[14] = s_dX[15] = 1.*GeoModelKernelUnits::cm; s_dY[14] = s_dY[15] = 12.*GeoModelKernelUnits::cm; s_dZ[14] = s_dZ[15] = 25.3*GeoModelKernelUnits::cm; + s_shiftX[14] = -19.5*GeoModelKernelUnits::cm; s_shiftY[14] = s_shiftY[15] = -93.5*GeoModelKernelUnits::cm; s_shiftZ[14] = s_shiftZ[15] = -46.5*GeoModelKernelUnits::cm; s_shiftX[15] = -s_shiftX[14]; - s_angleX[14] = s_angleX[15] = 4.668*CLHEP::degree; s_angleY[14] = -45.*CLHEP::degree; s_angleZ[14] = s_angleZ[15] = 0.*CLHEP::degree; + s_angleX[14] = s_angleX[15] = 4.668*GeoModelKernelUnits::degree; s_angleY[14] = -45.*GeoModelKernelUnits::degree; s_angleZ[14] = s_angleZ[15] = 0.*GeoModelKernelUnits::degree; s_angleY[15] = -s_angleY[14]; - s_dX[16] = 59.5*CLHEP::cm; s_dY[16] = 60.0*CLHEP::cm; s_dZ[16] = 12.0*CLHEP::cm; - s_shiftX[16] = 0.*CLHEP::cm; s_shiftY[16] = -91.5*CLHEP::cm; s_shiftZ[16] = -73.5*CLHEP::cm; - s_angleX[16] = 94.668*CLHEP::degree; s_angleY[16] = 0.*CLHEP::degree; s_angleZ[16] = 90.*CLHEP::degree; - s_dX[17] = 0.3*CLHEP::cm; s_dY[17] = 35.*CLHEP::cm; s_dZ[17] = 25.*CLHEP::cm; - s_shiftX[17] = 0.*CLHEP::cm; s_shiftY[17] = -107.0*CLHEP::cm; s_shiftZ[17] = -40.*CLHEP::cm; - s_angleX[17] = 4.668*CLHEP::degree; s_angleY[17] = 0.*CLHEP::degree; s_angleZ[17] = 90.*CLHEP::degree; + s_dX[16] = 59.5*GeoModelKernelUnits::cm; s_dY[16] = 60.0*GeoModelKernelUnits::cm; s_dZ[16] = 12.0*GeoModelKernelUnits::cm; + s_shiftX[16] = 0.*GeoModelKernelUnits::cm; s_shiftY[16] = -91.5*GeoModelKernelUnits::cm; s_shiftZ[16] = -73.5*GeoModelKernelUnits::cm; + s_angleX[16] = 94.668*GeoModelKernelUnits::degree; s_angleY[16] = 0.*GeoModelKernelUnits::degree; s_angleZ[16] = 90.*GeoModelKernelUnits::degree; + s_dX[17] = 0.3*GeoModelKernelUnits::cm; s_dY[17] = 35.*GeoModelKernelUnits::cm; s_dZ[17] = 25.*GeoModelKernelUnits::cm; + s_shiftX[17] = 0.*GeoModelKernelUnits::cm; s_shiftY[17] = -107.0*GeoModelKernelUnits::cm; s_shiftZ[17] = -40.*GeoModelKernelUnits::cm; + s_angleX[17] = 4.668*GeoModelKernelUnits::degree; s_angleY[17] = 0.*GeoModelKernelUnits::degree; s_angleZ[17] = 90.*GeoModelKernelUnits::degree; } //StoreGateSvc* detStore; @@ -188,11 +190,12 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() // Rohacell foam has density: 0.11g/cm3 std::string name; double density; + const GeoElement* C=materialManager->getElement("Carbon"); const GeoElement* H=materialManager->getElement("Hydrogen"); const GeoElement* O=materialManager->getElement("Oxygen"); const GeoElement* N=materialManager->getElement("Nitrogen"); - GeoMaterial* Rohacell = new GeoMaterial(name="Rohacell", density=0.112*CLHEP::g/CLHEP::cm3); + GeoMaterial* Rohacell = new GeoMaterial(name="Rohacell", density=0.112*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Rohacell->add(C,0.6465); Rohacell->add(H,0.07836); Rohacell->add(O,0.19137); @@ -200,7 +203,7 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() Rohacell->lock(); /* - a = 12.957*CLHEP::g/CLHEP::mole; + a = 12.957*GeoModelKernelUnits::g/GeoModelKernelUnits::mole; density = 0.112*g/cm3; z = 6.18; G4Material* Rohacell = new G4Material(name="Rohacell",z, a, density); @@ -210,35 +213,35 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() if (!Alu) throw std::runtime_error("Error in ModulesConstruction, std::Aluminium is not found."); // DB numbers: - double bryr_y = 200.0*CLHEP::cm; - double bcry_rlar = 125.5*CLHEP::cm; - double bcry_phistart = 0.*CLHEP::degree; - double bcry_phiend = 360.*CLHEP::degree; - //double EMECdzende = 63.2*CLHEP::cm; // Can not get from parameters + double bryr_y = 200.0*GeoModelKernelUnits::cm; + double bcry_rlar = 125.5*GeoModelKernelUnits::cm; + double bcry_phistart = 0.*GeoModelKernelUnits::degree; + double bcry_phiend = 360.*GeoModelKernelUnits::degree; + //double EMECdzende = 63.2*GeoModelKernelUnits::cm; // Can not get from parameters //double Zall = 62.6*cm; // Excluder dimension - double bepo_tx = 180.0*CLHEP::degree; - double bepo_tz = 90.0*CLHEP::degree; - double bepo_tz_e = ( M_PI / 4 )*CLHEP::rad; - double bepo_ty = 90.0*CLHEP::degree; - double bepo_Beta = 4.668*CLHEP::degree; - double bepo_z_e = -42.86*CLHEP::cm; // 43 CLHEP::cm * cos(4.668) - double bepo_emec_shift = 2.5*CLHEP::cm; - double bepo_excluder_shift = 34.4*CLHEP::cm; - //double bepo_hec_shift = 63.6*CLHEP::cm; // relative position of HEC versus EMEC + double bepo_tx = 180.0*GeoModelKernelUnits::degree; + double bepo_tz = 90.0*GeoModelKernelUnits::degree; + double bepo_tz_e = ( M_PI / 4 )*GeoModelKernelUnits::rad; + double bepo_ty = 90.0*GeoModelKernelUnits::degree; + double bepo_Beta = 4.668*GeoModelKernelUnits::degree; + double bepo_z_e = -42.86*GeoModelKernelUnits::cm; // 43 GeoModelKernelUnits::cm * cos(4.668) + double bepo_emec_shift = 2.5*GeoModelKernelUnits::cm; + double bepo_excluder_shift = 34.4*GeoModelKernelUnits::cm; + //double bepo_hec_shift = 63.6*GeoModelKernelUnits::cm; // relative position of HEC versus EMEC //double bepo_y_a = bcry_rlar-bepo_emec_shift-bepo_hec_shift; double bepo_y_ex = bcry_rlar-bepo_excluder_shift; - double bepo_y_hecshift = 6.*CLHEP::mm; - double bepo_y_emecshift = 11.*CLHEP::mm; - double bepo_x = -2.75*CLHEP::mm; - double bepo_x_e = -17.*CLHEP::mm; -// double bepo_x = 13.25*CLHEP::mm; -// double bepo_x_e = -3.*CLHEP::mm; -// double bepo_x = 17.25*CLHEP::mm; -// double bepo_x_e = -3.*CLHEP::mm; - //double bepo_z = -48.24*CLHEP::cm; // 48.4 CLHEP::cm * cos(4.668) + double bepo_y_hecshift = 6.*GeoModelKernelUnits::mm; + double bepo_y_emecshift = 11.*GeoModelKernelUnits::mm; + double bepo_x = -2.75*GeoModelKernelUnits::mm; + double bepo_x_e = -17.*GeoModelKernelUnits::mm; +// double bepo_x = 13.25*GeoModelKernelUnits::mm; +// double bepo_x_e = -3.*GeoModelKernelUnits::mm; +// double bepo_x = 17.25*GeoModelKernelUnits::mm; +// double bepo_x_e = -3.*GeoModelKernelUnits::mm; + //double bepo_z = -48.24*GeoModelKernelUnits::cm; // 48.4 GeoModelKernelUnits::cm * cos(4.668) double bepo_y_e = bcry_rlar-bepo_emec_shift; - double bepo_pz = 45.0*CLHEP::degree; + double bepo_pz = 45.0*GeoModelKernelUnits::degree; std::string baseName = "LArGeoTB::LeakageDet::"; @@ -246,9 +249,9 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() if(m_Options && m_Options->isRun1()) { ylen = bryr_y; } else { - ylen = bryr_y - 200.*CLHEP::mm; + ylen = bryr_y - 200.*GeoModelKernelUnits::mm; } - GeoTubs *shapeMother = new GeoTubs( 0.0*CLHEP::cm, bcry_rlar, ylen, bcry_phistart,bcry_phiend); + GeoTubs *shapeMother = new GeoTubs( 0.0*GeoModelKernelUnits::cm, bcry_rlar, ylen, bcry_phistart,bcry_phiend); GeoLogVol *logMother = new GeoLogVol(baseName + "LAr", shapeMother, LAr); m_ModulesPhys = new GeoFullPhysVol(logMother); @@ -269,7 +272,7 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() leak_log->SetSensitiveDetector(LeakSDdetector); leak_log->SetVisAttributes(G4VisAttributes::Invisible); // leak_log->SetVisAttributes(new G4VisAttributes(G4Color(0.7,0.1,0.7))); - HepGeom::Transform3D leak_pos = position(sid, dir, cal); + GeoTrf::Transform3D leak_pos = position(sid, dir, cal); G4VPhysicalVolume *leak_phys = new G4PVPlacement(leak_pos, leak_log, @@ -289,13 +292,9 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() // std::cout<<"ModulesConstructionH62004::GetEnvelope positioning Excluder"<<std::endl; GeoVFullPhysVol* excluderEnvelope = excluder.GetEnvelope(); /*if(excluderEnvelope != 0)*/{ - CLHEP::HepRotation rot2; -// rot2.rotateZ(bepo_tz+bepo_tz_e); - rot2.rotateZ(bepo_tz); - rot2.rotateX(bepo_ty); - rot2.rotateX(bepo_Beta); + GeoTrf::Transform3D rot2 = GeoTrf::RotateX3D(bepo_Beta) * GeoTrf::RotateX3D(bepo_ty) * GeoTrf::RotateZ3D(bepo_tz); m_ModulesPhys->add(new GeoSerialIdentifier(0)); - m_ModulesPhys->add(new GeoTransform(HepGeom::Transform3D(rot2,CLHEP::Hep3Vector(0.,bepo_y_ex,bepo_z_e+42.*CLHEP::mm)))); + m_ModulesPhys->add(new GeoTransform(GeoTrf::Translation3D(0.,bepo_y_ex,bepo_z_e+42.*GeoModelKernelUnits::mm) * rot2)); m_ModulesPhys->add(excluderEnvelope); } } @@ -309,13 +308,10 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() // std::cout<<"ModulesConstructionH62004::GetEnvelope positioning Excluder"<<std::endl; GeoVFullPhysVol* fcexcluderEnvelope = fcexcluder.GetEnvelope(); if(fcexcluderEnvelope != 0){ - CLHEP::HepRotation rot2; - rot2.rotateZ(bepo_tx); - rot2.rotateX(-bepo_ty); - rot2.rotateX(0.8*bepo_Beta); + GeoTrf::Transform3D rot2 = GeoTrf::RotateX3D(0.8*bepo_Beta) * GeoTrf::RotateX3D(-bepo_ty) * GeoTrf::RotateZ3D(bepo_tx); m_ModulesPhys->add(new GeoSerialIdentifier(0)); -// m_ModulesPhys->add(new GeoTransform(HepGeom::Transform3D(rot2,CLHEP::Hep3Vector(0.,bepo_y_ex-138.*CLHEP::mm,-477.3*CLHEP::mm)))); - m_ModulesPhys->add(new GeoTransform(HepGeom::Transform3D(rot2,CLHEP::Hep3Vector(0.,bepo_y_ex-146.*CLHEP::mm,-412.0*CLHEP::mm)))); +// m_ModulesPhys->add(new GeoTransform(GeoTrf::Transform3D(rot2,GeoTrf::Vector3D(0.,bepo_y_ex-138.*GeoModelKernelUnits::mm,-477.3*GeoModelKernelUnits::mm)))); + m_ModulesPhys->add(new GeoTransform(GeoTrf::Translation3D(0.,bepo_y_ex-146.*GeoModelKernelUnits::mm,-412.0*GeoModelKernelUnits::mm) * rot2)); m_ModulesPhys->add(fcexcluderEnvelope); } } @@ -328,16 +324,14 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() /*if(frontexcluder != 0)*/{ GeoVFullPhysVol* frontexcluderEnvelope = frontexcluder.GetEnvelope(); if(frontexcluderEnvelope != 0){ - CLHEP::HepRotation rot2; -// rot2.rotateZ((90.-18.)*CLHEP::degree); - rot2.rotateZ((90.)*CLHEP::degree); + GeoTrf::RotateZ3D rot2((90.)*GeoModelKernelUnits::degree); m_ModulesPhys->add(new GeoSerialIdentifier(0)); - m_ModulesPhys->add(new GeoTransform(HepGeom::Transform3D(rot2,CLHEP::Hep3Vector(0.,0.,20.*CLHEP::mm)))); + m_ModulesPhys->add(new GeoTransform(GeoTrf::Translation3D(0.,0.,20.*GeoModelKernelUnits::mm) * rot2)); m_ModulesPhys->add(frontexcluderEnvelope); /* G4VPhysicalVolume* frontexcluderPhysical = -// new G4PVPlacement(HepGeom::Transform3D(rot2,CLHEP::Hep3Vector(0.,0.,220.*CLHEP::mm)), // Translation - new G4PVPlacement(HepGeom::Transform3D(rot2,CLHEP::Hep3Vector(0.,0.,20.*CLHEP::mm)), // Translation +// new G4PVPlacement(GeoTrf::Transform3D(rot2,GeoTrf::Vector3D(0.,0.,220.*GeoModelKernelUnits::mm)), // Translation + new G4PVPlacement(GeoTrf::Transform3D(rot2,GeoTrf::Vector3D(0.,0.,20.*GeoModelKernelUnits::mm)), // Translation frontexcluderEnvelope, // Logical volume frontexcluderEnvelope->GetName(), // Name logMother, // Mother volume @@ -355,14 +349,13 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() /*if(backexcluder != 0)*/{ GeoVFullPhysVol* backexcluderEnvelope = backexcluder.GetEnvelope(); if(backexcluderEnvelope != 0){ - CLHEP::HepRotation rot2; - rot2.rotateZ((-90.-29.)*CLHEP::degree); + GeoTrf::RotateZ3D rot2((-90.-29.)*GeoModelKernelUnits::degree); m_ModulesPhys->add(new GeoSerialIdentifier(0)); - m_ModulesPhys->add(new GeoTransform(HepGeom::Transform3D(rot2,CLHEP::Hep3Vector(0.,0.,0.*CLHEP::mm)))); + m_ModulesPhys->add(new GeoTransform(GeoTrf::Translation3D(0.,0.,0.*GeoModelKernelUnits::mm) * rot2)); m_ModulesPhys->add(backexcluderEnvelope); /* G4VPhysicalVolume* backexcluderPhysical = - new G4PVPlacement(HepGeom::Transform3D(rot2,CLHEP::Hep3Vector(0.,0.,0.*CLHEP::mm)), // Translation + new G4PVPlacement(GeoTrf::Transform3D(rot2,GeoTrf::Vector3D(0.,0.,0.*GeoModelKernelUnits::mm)), // Translation backexcluderEnvelope, // Logical volume backexcluderEnvelope->GetName(), // Name logMother, // Mother volume @@ -379,32 +372,28 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() // G4AssemblyVolume* assemblyMother = new G4AssemblyVolume(); // Transformation for assembly - should be putted to each piece now. - CLHEP::HepRotation rota; - rota.rotateZ(-bepo_pz); - rota.rotateX(bepo_ty); - rota.rotateX(bepo_Beta); - -// HepGeom::Transform3D trans(rota, CLHEP::Hep3Vector(0.,bepo_y_e,bepo_z_e)); - HepGeom::Transform3D trans(rota, CLHEP::Hep3Vector(0.,bepo_y_e,bepo_z_e+65.*CLHEP::mm)); + GeoTrf::Transform3D rota = GeoTrf::RotateX3D(bepo_Beta) * GeoTrf::RotateX3D(bepo_ty) * GeoTrf::RotateZ3D(-bepo_pz); + GeoTrf::Transform3D trans = GeoTrf::Translation3D(0.,bepo_y_e,bepo_z_e+65.*GeoModelKernelUnits::mm) * rota; //positions emec // Z-positions DB values !!!! - double HECzStart = 427.7*CLHEP::cm; - double EMECzStart = 364.1*CLHEP::cm; - double FCALzStart = 466.85*CLHEP::cm; - double FCALzEnd = 588.28*CLHEP::cm; + double HECzStart = 427.7*GeoModelKernelUnits::cm; + double EMECzStart = 364.1*GeoModelKernelUnits::cm; + double FCALzStart = 466.85*GeoModelKernelUnits::cm; + double FCALzEnd = 588.28*GeoModelKernelUnits::cm; if((!m_Options) || m_Options->isEmec()){ - CLHEP::HepRotation MrotEmec ; - MrotEmec.rotateZ(bepo_tz_e); + GeoTrf::RotateZ3D MrotEmec(bepo_tz_e); // original value: -// CLHEP::Hep3Vector pos3Emec( 0*CLHEP::mm, 9.0*CLHEP::mm , 55.9*CLHEP::mm); -// CLHEP::Hep3Vector pos3Emec( 3.636*CLHEP::mm, 9.0*CLHEP::mm , 55.9*CLHEP::mm); -// CLHEP::Hep3Vector pos3Emec( bepo_x_e, 9.*CLHEP::mm , 61.*CLHEP::mm); - CLHEP::Hep3Vector pos3Emec( (bepo_x_e - bepo_y_emecshift )/2./sin(bepo_tz_e), (bepo_x_e + bepo_y_emecshift )/2./sin(bepo_tz_e), 61.*CLHEP::mm); -// CLHEP::Hep3Vector pos3Emec( 0.*CLHEP::mm, bepo_x_e, 61.*CLHEP::mm); +// GeoTrf::Vector3D pos3Emec( 0*GeoModelKernelUnits::mm, 9.0*GeoModelKernelUnits::mm , 55.9*GeoModelKernelUnits::mm); +// GeoTrf::Vector3D pos3Emec( 3.636*GeoModelKernelUnits::mm, 9.0*GeoModelKernelUnits::mm , 55.9*GeoModelKernelUnits::mm); +// GeoTrf::Vector3D pos3Emec( bepo_x_e, 9.*GeoModelKernelUnits::mm , 61.*GeoModelKernelUnits::mm); + GeoTrf::Translation3D pos3Emec((bepo_x_e - bepo_y_emecshift )/2./sin(bepo_tz_e) + , (bepo_x_e + bepo_y_emecshift )/2./sin(bepo_tz_e) + , 61.*GeoModelKernelUnits::mm); +// GeoTrf::Vector3D pos3Emec( 0.*GeoModelKernelUnits::mm, bepo_x_e, 61.*GeoModelKernelUnits::mm); // std::cout<<"ModulesConstructionH62004 calling EMECModuleConstruction....."<<std::endl; //use this line for physical construction of the EMEC inner wheel only: @@ -414,7 +403,7 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() GeoVFullPhysVol* emecEnvelope = emecConstruction.GetEnvelope(); m_ModulesPhys->add(new GeoNameTag("LAr")); m_ModulesPhys->add( new GeoTransform(trans) ); - m_ModulesPhys->add( new GeoTransform( HepGeom::Transform3D(MrotEmec, pos3Emec) ) ); + m_ModulesPhys->add( new GeoTransform( pos3Emec * MrotEmec )); m_ModulesPhys->add(emecEnvelope); // std::cout<<"ModulesConstructionH62004 EMECModuleConstruction done...."<<std::endl; } @@ -427,21 +416,21 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() /*if(hec != 0)*/{ GeoVPhysVol* hecEnvelope = hec.GetEnvelope(); if(hecEnvelope != 0){ - CLHEP::HepRotation rot; // rot.rotateZ(-bepo_pz); // rot.rotateX(bepo_ty); // rot.rotateX(bepo_Beta); -// HepGeom::Transform3D hpos = HepGeom::Transform3D(rot,CLHEP::Hep3Vector(bepo_x,bepo_y_a,bepo_z)); -// CLHEP::Hep3Vector hecshift(0.,6.*CLHEP::mm,HECzStart-EMECzStart); - CLHEP::Hep3Vector hecshift((bepo_x - bepo_y_hecshift)/2./sin(bepo_tz_e), (bepo_x + bepo_y_hecshift)/2./sin(bepo_tz_e), HECzStart-EMECzStart); -// CLHEP::Hep3Vector hecshift(-21.*CLHEP::mm, bepo_x, HECzStart-EMECzStart); -// CLHEP::Hep3Vector hecshift(-5.*CLHEP::mm, bepo_x, HECzStart-EMECzStart); -// CLHEP::Hep3Vector hecshift(0.*CLHEP::mm, bepo_x, HECzStart-EMECzStart); -// CLHEP::HepRotation norot; - HepGeom::Transform3D hectrans(rot,hecshift); - m_ModulesPhys->add( new GeoTransform(trans) ); - m_ModulesPhys->add(new GeoTransform(hectrans)); +// GeoTrf::Transform3D hpos = GeoTrf::Transform3D(rot,GeoTrf::Vector3D(bepo_x,bepo_y_a,bepo_z)); +// GeoTrf::Vector3D hecshift(0.,6.*GeoModelKernelUnits::mm,HECzStart-EMECzStart); +// GeoTrf::Vector3D hecshift((bepo_x - bepo_y_hecshift)/2./sin(bepo_tz_e), (bepo_x + bepo_y_hecshift)/2./sin(bepo_tz_e), HECzStart-EMECzStart); +// GeoTrf::Vector3D hecshift(-21.*GeoModelKernelUnits::mm, bepo_x, HECzStart-EMECzStart); +// GeoTrf::Vector3D hecshift(-5.*GeoModelKernelUnits::mm, bepo_x, HECzStart-EMECzStart); +// GeoTrf::Vector3D hecshift(0.*GeoModelKernelUnits::mm, bepo_x, HECzStart-EMECzStart); +// GeoModelKernelUnits::HepRotation norot; + m_ModulesPhys->add(new GeoTransform(trans)); + m_ModulesPhys->add( new GeoTransform(GeoTrf::Translate3D((bepo_x - bepo_y_hecshift)/2./sin(bepo_tz_e) + , (bepo_x + bepo_y_hecshift)/2./sin(bepo_tz_e) + , HECzStart-EMECzStart)) ); m_ModulesPhys->add(hecEnvelope); // assemblyMother->AddPlacedVolume( hecEnvelope, hectrans ); @@ -455,16 +444,16 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() fcal.setFCALVisLimit(m_fcalVisLimit); GeoVPhysVol* fcalEnvelope = fcal.GetEnvelope(); if(fcalEnvelope != 0){ - CLHEP::HepRotation rotFCal; - // rotFCal.rotateY(0.*CLHEP::deg); +// GeoModelKernelUnits::HepRotation rotFCal; + // rotFCal.rotateY(0.*GeoModelKernelUnits::deg); // rotFCal.rotateZ(-bepo_pz); // rotFCal.rotateX(bepo_ty); // rotFCal.rotateX(bepo_Beta); -// CLHEP::Hep3Vector fcalshift(0.,-7.*CLHEP::mm,FCALzStart-EMECzStart+(FCALzEnd-FCALzStart)/2.); - CLHEP::Hep3Vector fcalshift(9.*CLHEP::mm,0.*CLHEP::mm,FCALzStart-EMECzStart+(FCALzEnd-FCALzStart)/2.); - HepGeom::Transform3D fcaltrans(rotFCal,fcalshift); - m_ModulesPhys->add( new GeoTransform(trans) ); - m_ModulesPhys->add(new GeoTransform(fcaltrans)); +// GeoTrf::Vector3D fcalshift(0.,-7.*GeoModelKernelUnits::mm,FCALzStart-EMECzStart+(FCALzEnd-FCALzStart)/2.); + m_ModulesPhys->add(new GeoTransform(trans)); + m_ModulesPhys->add( new GeoTransform(GeoTrf::Translate3D(9.*GeoModelKernelUnits::mm + ,0.*GeoModelKernelUnits::mm + ,FCALzStart-EMECzStart+(FCALzEnd-FCALzStart)/2.)) ); m_ModulesPhys->add(fcalEnvelope); } } @@ -474,89 +463,78 @@ GeoVFullPhysVol* LArGeo::ModulesConstructionH62004::GetEnvelope() // Position a cold nose // - double box_x = (650./2.)*CLHEP::mm; - double box_y = (356./2.)*CLHEP::mm; - double box_z = (50.8/2.)*CLHEP::mm; - double btot = 494.*CLHEP::mm; - double tub_r = 452.*CLHEP::mm; - double tub1_dr = 8.*CLHEP::mm; - double tub1_z = (1320./2.)*CLHEP::mm; - double cyl_dr = 10.*CLHEP::mm; - double cyl_r1 = 262.*CLHEP::mm; - double cyl_r2 = 336.5*CLHEP::mm; - double cyl_z = (912./2.)*CLHEP::mm; - double cyl_shift = (10. + 25.)*CLHEP::mm; -// double NoseZshift = -360.*CLHEP::mm; - double NoseZshift = -63.1*CLHEP::mm; -// double NoseYshift = 94.4*CLHEP::mm; -// double NoseYshift = 96.4*CLHEP::mm; - double NoseYshift = 98.4*CLHEP::mm; -// double NoseXshift = -195.*CLHEP::mm; - double NoseXshift = -94.4*CLHEP::mm; + double box_x = (650./2.)*GeoModelKernelUnits::mm; + double box_y = (356./2.)*GeoModelKernelUnits::mm; + double box_z = (50.8/2.)*GeoModelKernelUnits::mm; + double btot = 494.*GeoModelKernelUnits::mm; + double tub_r = 452.*GeoModelKernelUnits::mm; + double tub1_dr = 8.*GeoModelKernelUnits::mm; + double tub1_z = (1320./2.)*GeoModelKernelUnits::mm; + double cyl_dr = 10.*GeoModelKernelUnits::mm; + double cyl_r1 = 262.*GeoModelKernelUnits::mm; + double cyl_r2 = 336.5*GeoModelKernelUnits::mm; + double cyl_z = (912./2.)*GeoModelKernelUnits::mm; + double cyl_shift = (10. + 25.)*GeoModelKernelUnits::mm; +// double NoseZshift = -360.*GeoModelKernelUnits::mm; + double NoseZshift = -63.1*GeoModelKernelUnits::mm; +// double NoseYshift = 94.4*GeoModelKernelUnits::mm; +// double NoseYshift = 96.4*GeoModelKernelUnits::mm; + double NoseYshift = 98.4*GeoModelKernelUnits::mm; +// double NoseXshift = -195.*GeoModelKernelUnits::mm; + double NoseXshift = -94.4*GeoModelKernelUnits::mm; GeoBox* Box1 = new GeoBox(box_x, box_y, box_z); double alpha = acos(box_x/tub_r); double ax = M_PI - 2*alpha; GeoTubs* Tub= new GeoTubs(0., tub_r, box_z, alpha, ax); - CLHEP::HepRotation tRot; -// tRot.rotateX(90*CLHEP::degree); - CLHEP::Hep3Vector TubShift(0.,btot-box_y-tub_r,0.); - HepGeom::Transform3D TubTrans(tRot,TubShift); +// tRot.rotateX(90*GeoModelKernelUnits::degree); + GeoTrf::Translate3D TubTrans(0.,btot-box_y-tub_r,0.); const GeoShapeUnion &uSolid = (*Box1).add((*Tub)<<TubTrans); GeoTubs* Tub1 = new GeoTubs(tub_r, tub_r+tub1_dr, tub1_z, alpha, ax); -// CLHEP::Hep3Vector TubShift2(0.,btot-box_y-tub_r,-tub1_z+box_z); - CLHEP::Hep3Vector TubShift2(0.,-135.5*CLHEP::mm,-tub1_z+box_z); -// CLHEP::Hep3Vector TubShift2(0.,0.,0.); -// tRot.rotateX(90*CLHEP::degree); - HepGeom::Transform3D UnTrans(tRot,TubShift2); +// GeoTrf::Vector3D TubShift2(0.,btot-box_y-tub_r,-tub1_z+box_z); +// GeoTrf::Vector3D TubShift2(0.,0.,0.); +// tRot.rotateX(90*GeoModelKernelUnits::degree); + GeoTrf::Translate3D UnTrans(0.,-135.5*GeoModelKernelUnits::mm,-tub1_z+box_z); const GeoShapeUnion &uSolid2 = uSolid.add((*Tub1)<<UnTrans); GeoCons* Cone = new GeoCons(cyl_r2, cyl_r1, cyl_r2+cyl_dr, cyl_r1+cyl_dr, cyl_z, M_PI/4.,M_PI/2.); -// CLHEP::Hep3Vector CylShift(0.,-box_y+cyl_shift,cyl_z+box_z-3.*CLHEP::mm); - CLHEP::Hep3Vector CylShift(0.,-box_y+cyl_shift,cyl_z+box_z-5.*CLHEP::mm); -// CLHEP::Hep3Vector CylShift(0.,0.,cyl_z+box_z); - tRot.rotateX(1.*CLHEP::degree); -// tRot.rotateZ(-90*CLHEP::degree); - HepGeom::Transform3D CylTrans(tRot,CylShift); +// GeoTrf::Vector3D CylShift(0.,-box_y+cyl_shift,cyl_z+box_z-3.*GeoModelKernelUnits::mm); + GeoTrf::Translation3D CylShift(0.,-box_y+cyl_shift,cyl_z+box_z-5.*GeoModelKernelUnits::mm); +// GeoTrf::Vector3D CylShift(0.,0.,cyl_z+box_z); + GeoTrf::RotateX3D tRot(1.*GeoModelKernelUnits::degree); +// tRot.rotateZ(-90*GeoModelKernelUnits::degree); + GeoTrf::Transform3D CylTrans = CylShift * tRot; const GeoShapeUnion &uSolid3 = uSolid2.add((*Cone)<<CylTrans); GeoLogVol* Cnose = new GeoLogVol("LArGeoTB::LeakageDet::ColdNose", &uSolid3 , Alu); GeoPhysVol *PhysCnose = new GeoPhysVol(Cnose); // cnose->SetVisAttributes(G4VisAttributes::Invisible); - CLHEP::HepRotation CRotation; -// CRotation.rotateZ(-bepo_pz); - /* - CRotation.rotateX(bepo_ty); - CRotation.rotateZ(bepo_tx); - CRotation.rotateX(bepo_Beta); - */ - CRotation.rotateX(M_PI); - CRotation.rotateZ(-3*M_PI/4.); -// CLHEP::Hep3Vector tShift(NoseXshift,0.,FCALzStart-EMECzStart+NoseZshift); - CLHEP::Hep3Vector tShift(NoseXshift,NoseYshift,FCALzStart-EMECzStart+NoseZshift); -// CLHEP::Hep3Vector tShift(0.,NoseYshift,NoseZshift); - HepGeom::Transform3D CTrans(CRotation,tShift); + GeoTrf::Transform3D CRotation = GeoTrf::RotateZ3D(-3*M_PI/4.) * GeoTrf::RotateX3D(M_PI); +// GeoTrf::Vector3D tShift(NoseXshift,0.,FCALzStart-EMECzStart+NoseZshift); + GeoTrf::Translation3D tShift(NoseXshift,NoseYshift,FCALzStart-EMECzStart+NoseZshift); +// GeoTrf::Vector3D tShift(0.,NoseYshift,NoseZshift); + GeoTrf::Transform3D CTrans = tShift * CRotation; m_ModulesPhys->add( new GeoTransform(trans) ) ; m_ModulesPhys->add(new GeoTransform(CTrans)); m_ModulesPhys->add(PhysCnose); // assemblyMother->AddPlacedVolume( cnose, CTrans ); /* G4VPhysicalVolume* nosePhysical = new - G4PVPlacement(HepGeom::Transform3D(CRotation,tShift), + G4PVPlacement(GeoTrf::Transform3D(CRotation,tShift), cnose, cnose->GetName(),logMother, false, 0); */ // Do an imprint of assembly: /* - CLHEP::HepRotation rota; + GeoModelKernelUnits::HepRotation rota; rota.rotateZ(-bepo_pz); rota.rotateX(bepo_ty); rota.rotateX(bepo_Beta); - HepGeom::Transform3D trans(rota, CLHEP::Hep3Vector(0.,bepo_y_e,bepo_z_e)); + GeoTrf::Transform3D trans(rota, GeoTrf::Vector3D(0.,bepo_y_e,bepo_z_e)); assemblyMother->MakeImprint( logMother, trans ); */ @@ -604,7 +582,7 @@ LArGeo::ModulesConstructionH62004::construct(const StoredMaterialManager* materi //density = universe_mean_density; //from PhysicalConstants.h //pressure = 3.e-18*pascal; - //temperature = 2.73*CLHEP::kelvin; + //temperature = 2.73*kelvin; const GeoMaterial* Vacuum = materialManager->getMaterial("std::Vacuum"); if (!Vacuum) throw std::runtime_error("Error in ModulesConstruction, std::Vacuum is not found."); @@ -669,14 +647,14 @@ LArGeo::ModulesConstructionH62004::construct(const StoredMaterialManager* materi //------------------ now construct shape and logical volume --------------- GeoLogVol *volume_log; if(myID == 6 || myID == 9 || myID == 17) { - GeoTubs *tub = new GeoTubs(s_dX[myID-1],s_dY[myID-1],s_dZ[myID-1],-43.*CLHEP::degree,86.*CLHEP::degree); + GeoTubs *tub = new GeoTubs(s_dX[myID-1],s_dY[myID-1],s_dZ[myID-1],-43.*GeoModelKernelUnits::degree,86.*GeoModelKernelUnits::degree); volume_log = new GeoLogVol(name,tub,Vacuum); } else if(myID == 3) { - GeoTubs *tub = new GeoTubs(s_dX[myID-1],s_dY[myID-1],s_dZ[myID-1],-32.*CLHEP::degree,64.*CLHEP::degree); + GeoTubs *tub = new GeoTubs(s_dX[myID-1],s_dY[myID-1],s_dZ[myID-1],-32.*GeoModelKernelUnits::degree,64.*GeoModelKernelUnits::degree); volume_log = new GeoLogVol(name,tub,Vacuum); #if 0 // impossible case... } else if(myID == 19) { - GeoTrd *trd = new GeoTrd(s_dX[myID-1]-16.*CLHEP::cm,s_dX[myID-1],s_dY[myID-1],s_dY[myID-1],s_dZ[myID-1]); + GeoTrd *trd = new GeoTrd(s_dX[myID-1]-16.*GeoModelKernelUnits::cm,s_dX[myID-1],s_dY[myID-1],s_dY[myID-1],s_dZ[myID-1]); volume_log = new GeoLogVol(name,trd,Vacuum); #endif } else { @@ -686,9 +664,9 @@ LArGeo::ModulesConstructionH62004::construct(const StoredMaterialManager* materi return volume_log; } -HepGeom::Transform3D LArGeo::ModulesConstructionH62004::position(int side, int dir, int calo) +GeoTrf::Transform3D LArGeo::ModulesConstructionH62004::position(int side, int dir, int calo) { - HepGeom::Transform3D leak_position; + GeoTrf::Transform3D leak_position(GeoTrf::Transform3D::Identity()); int myID = GetID(side,dir,calo); if(myID == 0) { @@ -697,12 +675,9 @@ HepGeom::Transform3D LArGeo::ModulesConstructionH62004::position(int side, int d assert(myID>0 && myID <= NUM_LEAK); if(myID > NUM_LEAK) return leak_position; - CLHEP::HepRotation rotM; - rotM.rotateZ(s_angleZ[myID-1]); - rotM.rotateY(s_angleY[myID-1]); - rotM.rotateX(s_angleX[myID-1]); + GeoTrf::Transform3D rotM = GeoTrf::RotateX3D(s_angleX[myID-1]) * GeoTrf::RotateY3D(s_angleY[myID-1]) * GeoTrf::RotateZ3D(s_angleZ[myID-1]); - leak_position = HepGeom::Transform3D(rotM,CLHEP::Hep3Vector(s_shiftX[myID-1],s_shiftY[myID-1],s_shiftZ[myID-1])); + leak_position = GeoTrf::Transform3D(GeoTrf::Translation3D(s_shiftX[myID-1],s_shiftY[myID-1],s_shiftZ[myID-1]) * rotM); return leak_position; } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ModulesConstructionH62004.h b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ModulesConstructionH62004.h index 3ad9a74d9d9..f03c007e68b 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ModulesConstructionH62004.h +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/ModulesConstructionH62004.h @@ -30,7 +30,7 @@ namespace LArGeo { int GetID(int side, int dir, int calo); GeoLogVol* construct(const StoredMaterialManager* materialManager, int side, int dir, int calo); - HepGeom::Transform3D position(int side, int dir, int calo); + GeoTrf::Transform3D position(int side, int dir, int calo); // side = 0 - left, 1 - right // dir = 0 - side, 1 - up, 2 - back // calo = 0 - EMEC, 1 - HEC1, 2 - HEC2, 3 - FCAL1 diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/MovableTableConstructionH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/MovableTableConstructionH62004.cxx index a2b11328faf..814b178f239 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/MovableTableConstructionH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/MovableTableConstructionH62004.cxx @@ -24,17 +24,15 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeSubtraction.h" #include "GeoModelKernel/GeoShapeShift.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -124,25 +122,25 @@ GeoVPhysVol* LArGeo::MovableTableConstructionH62004::GetEnvelope() // // Define dimension of Movable part & position of Front part // - double bttb_x = 15.0*CLHEP::cm; - double bttb_y = 15.0*CLHEP::cm; - double bttb_z = 120.0*CLHEP::cm; - //double bttb_pos = 833.5*CLHEP::cm; + double bttb_x = 15.0*GeoModelKernelUnits::cm; + double bttb_y = 15.0*GeoModelKernelUnits::cm; + double bttb_z = 120.0*GeoModelKernelUnits::cm; + //double bttb_pos = 833.5*GeoModelKernelUnits::cm; // // Define S scintilator dimension and positions // - double btas_x = 7.5*CLHEP::cm; - double btas_y = 7.5*CLHEP::cm; - double btas_z = 1.0*CLHEP::cm; - double bb2_x = 3.0*CLHEP::cm; - double btas_pos[3] = {100.*CLHEP::cm, 219.5*CLHEP::cm, 232.0*CLHEP::cm}; - double bh_x = 30.0*CLHEP::cm; - double bh_d = 6.0*CLHEP::cm; - double bh_shift = 12.0*CLHEP::cm; - double bb_shift = 2.5*CLHEP::cm; - - double mwpc_pos[4] = {44.5*CLHEP::cm, 12.5*CLHEP::cm, 87.0*CLHEP::cm, 185.3*CLHEP::cm}; - double bpc_pos[2] = {140.5*CLHEP::cm, 130.5*CLHEP::cm}; + double btas_x = 7.5*GeoModelKernelUnits::cm; + double btas_y = 7.5*GeoModelKernelUnits::cm; + double btas_z = 1.0*GeoModelKernelUnits::cm; + double bb2_x = 3.0*GeoModelKernelUnits::cm; + double btas_pos[3] = {100.*GeoModelKernelUnits::cm, 219.5*GeoModelKernelUnits::cm, 232.0*GeoModelKernelUnits::cm}; + double bh_x = 30.0*GeoModelKernelUnits::cm; + double bh_d = 6.0*GeoModelKernelUnits::cm; + double bh_shift = 12.0*GeoModelKernelUnits::cm; + double bb_shift = 2.5*GeoModelKernelUnits::cm; + + double mwpc_pos[4] = {44.5*GeoModelKernelUnits::cm, 12.5*GeoModelKernelUnits::cm, 87.0*GeoModelKernelUnits::cm, 185.3*GeoModelKernelUnits::cm}; + double bpc_pos[2] = {140.5*GeoModelKernelUnits::cm, 130.5*GeoModelKernelUnits::cm}; GeoBox* H62004MovableShape = new GeoBox( bttb_x, bttb_y, bttb_z ); const GeoLogVol* H62004FrontBeamLogical = new GeoLogVol( H62004MovableName, H62004MovableShape, Air ); @@ -154,8 +152,8 @@ GeoVPhysVol* LArGeo::MovableTableConstructionH62004::GetEnvelope() // In the old stand-alone code, all three were round with a radius of 5cm // and 7.5mm thickness. // Logbooks in the control-room say that their xyz sizes are: - // B1 : 30 x 30 x 10 CLHEP::mm - // W1,2 : 150 x 150 x 10 CLHEP::mm + // B1 : 30 x 30 x 10 GeoModelKernelUnits::mm + // W1,2 : 150 x 150 x 10 GeoModelKernelUnits::mm // They are certainly not round, so stick with the logbook values // The beam sees the instrumentation in the following order: // W1, W2, B1, MWPC5 @@ -164,7 +162,7 @@ GeoVPhysVol* LArGeo::MovableTableConstructionH62004::GetEnvelope() // Create scintillator S1(num=4),S2,S3(num= 6,7) - GeoBox* ScintShapeS1 = new GeoBox((btas_x-1.*CLHEP::cm)/2., (btas_y-1.*CLHEP::cm)/2., btas_z/2.); + GeoBox* ScintShapeS1 = new GeoBox((btas_x-1.*GeoModelKernelUnits::cm)/2., (btas_y-1.*GeoModelKernelUnits::cm)/2., btas_z/2.); GeoBox* ScintShapeS23 = new GeoBox(btas_x/2., btas_y/2., btas_z/2.); std::string ScintName = H62004MovableName + "::Scintillator"; GeoLogVol* S1ScintLogical = new GeoLogVol( ScintName, ScintShapeS1, Scint ); @@ -173,11 +171,11 @@ GeoVPhysVol* LArGeo::MovableTableConstructionH62004::GetEnvelope() GeoPhysVol* S2ScintPhysical = new GeoPhysVol( S23ScintLogical ); m_H62004MovableTablePhysical->add( new GeoIdentifierTag(4) ); - m_H62004MovableTablePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, btas_pos[0]-bttb_z ) ) ) ; + m_H62004MovableTablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, btas_pos[0]-bttb_z ) ) ) ; m_H62004MovableTablePhysical->add(S1ScintPhysical); for ( unsigned int i = 1; i <3; ++i ) { m_H62004MovableTablePhysical->add( new GeoIdentifierTag(i+5) ); - m_H62004MovableTablePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, btas_pos[i]-bttb_z ) ) ) ; + m_H62004MovableTablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, btas_pos[i]-bttb_z ) ) ) ; m_H62004MovableTablePhysical->add( S2ScintPhysical ); } // Create scintilators H (copy num 5) and B2 (copy num 8) @@ -187,14 +185,14 @@ GeoVPhysVol* LArGeo::MovableTableConstructionH62004::GetEnvelope() GeoLogVol* logHSc = new GeoLogVol( ScintName, &shapeHSc, Scint); GeoPhysVol* physHSc = new GeoPhysVol(logHSc); m_H62004MovableTablePhysical->add( new GeoIdentifierTag(5) ); - m_H62004MovableTablePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (btas_pos[0]-bttb_z) + bh_shift) ) ) ; + m_H62004MovableTablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (btas_pos[0]-bttb_z) + bh_shift) ) ) ; m_H62004MovableTablePhysical->add(physHSc); - GeoBox* boxB = new GeoBox(bb2_x/2., bb2_x/2., (btas_z+2.5*CLHEP::cm)/2.); + GeoBox* boxB = new GeoBox(bb2_x/2., bb2_x/2., (btas_z+2.5*GeoModelKernelUnits::cm)/2.); GeoLogVol* logBSc = new GeoLogVol( ScintName, boxB, Scint); GeoPhysVol* physBSc = new GeoPhysVol(logBSc); m_H62004MovableTablePhysical->add( new GeoIdentifierTag(8) ); - m_H62004MovableTablePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (btas_pos[2]-bttb_z) + bb_shift ) ) ) ; + m_H62004MovableTablePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (btas_pos[2]-bttb_z) + bb_shift ) ) ) ; m_H62004MovableTablePhysical->add(physBSc); //----- Done with Scintillators @@ -202,12 +200,12 @@ GeoVPhysVol* LArGeo::MovableTableConstructionH62004::GetEnvelope() //------ Now create MWPC N2 & N3 & N4 log << MSG::INFO << " Create MWPC's " << endmsg; - MWPCConstruction MWPC(1.*CLHEP::mm); + MWPCConstruction MWPC(1.*GeoModelKernelUnits::mm); GeoVPhysVol* MwpcPhysical = MWPC.GetEnvelope(); for(int i = 1; i < 4; ++i){ m_H62004MovableTablePhysical->add( new GeoIdentifierTag(i+1) ); - m_H62004MovableTablePhysical->add( new GeoTransform(HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, mwpc_pos[i]-bttb_z ) ) ); + m_H62004MovableTablePhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, mwpc_pos[i]-bttb_z ) ) ); m_H62004MovableTablePhysical->add( MwpcPhysical ); } //----- Done with the MWPC @@ -219,7 +217,7 @@ GeoVPhysVol* LArGeo::MovableTableConstructionH62004::GetEnvelope() GeoVPhysVol* BPCPhysical = BPC.GetEnvelope(); for(int i=1; i<3; ++i) { m_H62004MovableTablePhysical->add( new GeoIdentifierTag(7-i) ); - m_H62004MovableTablePhysical->add( new GeoTransform(HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, bpc_pos[i-1]-bttb_z) ) ); + m_H62004MovableTablePhysical->add( new GeoTransform(GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, bpc_pos[i-1]-bttb_z) ) ); m_H62004MovableTablePhysical->add(BPCPhysical); } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/WarmTCConstructionH62004.cxx b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/WarmTCConstructionH62004.cxx index d3f0dd4f2b4..272988e0d7a 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/WarmTCConstructionH62004.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH62004Algs/src/WarmTCConstructionH62004.cxx @@ -28,10 +28,12 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoShapeUnion.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" -#include "CLHEP/GenericFunctions/Sin.hh" -#include "CLHEP/GenericFunctions/Cos.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" +#include "GeoGenericFunctions/Sin.h" +#include "GeoGenericFunctions/Cos.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -78,30 +80,30 @@ GeoVFullPhysVol* LArGeo::WarmTCConstructionH62004::GetEnvelope() // SHOULD GO INTO DB !!!! // Muon scintilators are the first one: -double Muon_x = 20.0*CLHEP::cm; -double Muon_y = 120.0*CLHEP::cm; -double Muon_z = 1.0*CLHEP::cm; +double Muon_x = 20.0*GeoModelKernelUnits::cm; +double Muon_y = 120.0*GeoModelKernelUnits::cm; +double Muon_z = 1.0*GeoModelKernelUnits::cm; // The extra space to accumulate muon sci. into mother: -double Muon_dist = 120.0*CLHEP::mm; +double Muon_dist = 120.0*GeoModelKernelUnits::mm; // // WTC dimensions -double WTC_len = 591.5*CLHEP::mm; -double WTC_high = 1250.0*CLHEP::mm; -double WTC_sci_z = 12.7*CLHEP::mm; -double WTC_sci_x = 190.0*CLHEP::mm; -double WTC_sci_y = 1160.0*CLHEP::mm; +double WTC_len = 591.5*GeoModelKernelUnits::mm; +double WTC_high = 1250.0*GeoModelKernelUnits::mm; +double WTC_sci_z = 12.7*GeoModelKernelUnits::mm; +double WTC_sci_x = 190.0*GeoModelKernelUnits::mm; +double WTC_sci_y = 1160.0*GeoModelKernelUnits::mm; // Define dimension WTC mother // double x_m = WTC_high / 2; double y_m = WTC_high / 2; -double z_m = (86.0*CLHEP::mm + WTC_len + WTC_sci_z + Muon_dist + Muon_z) / 2; +double z_m = (86.0*GeoModelKernelUnits::mm + WTC_len + WTC_sci_z + Muon_dist + Muon_z) / 2; // // Define dimension of Fe absorber // double Fe_x = WTC_high / 2; double Fe_y = WTC_high / 2; -double Fe_z = (99.0 / 2)*CLHEP::mm; +double Fe_z = (99.0 / 2)*GeoModelKernelUnits::mm; // // Define dimension of X scintilator // @@ -122,24 +124,24 @@ double z_s = WTC_sci_z / 2; // double z_x[3], z_y[3], z_Fe[4]; z_x[0] = -z_m + Muon_dist + Muon_z + z_s; // X scin. Layer 1 - z_y[0] = z_x[0] + 54*CLHEP::mm; // Y scin. Layer 2 - z_Fe[0] = z_x[0] + 86.0*CLHEP::mm + Fe_z; // 1st Fe abs. - z_y[1] = z_Fe[0] + 125.5*CLHEP::mm - Fe_z; // Y scin. Layer 3 - z_Fe[1] = z_Fe[0] + 2 * Fe_z + 53.0*CLHEP::mm; // 2nd Fe abs. - z_x[1] = z_Fe[0] - Fe_z + 278.5*CLHEP::mm; // X scin. Layer 4 - z_Fe[2] = z_Fe[1] + 2 *Fe_z + 52.5*CLHEP::mm; // 3rd Fe abs. - z_y[2] = z_Fe[0] - Fe_z + 433.0*CLHEP::mm; // Y scin. Layer 5 - z_Fe[3] = z_Fe[2] + 2 *Fe_z + 61.5*CLHEP::mm; // 4rd Fe abs. + z_y[0] = z_x[0] + 54*GeoModelKernelUnits::mm; // Y scin. Layer 2 + z_Fe[0] = z_x[0] + 86.0*GeoModelKernelUnits::mm + Fe_z; // 1st Fe abs. + z_y[1] = z_Fe[0] + 125.5*GeoModelKernelUnits::mm - Fe_z; // Y scin. Layer 3 + z_Fe[1] = z_Fe[0] + 2 * Fe_z + 53.0*GeoModelKernelUnits::mm; // 2nd Fe abs. + z_x[1] = z_Fe[0] - Fe_z + 278.5*GeoModelKernelUnits::mm; // X scin. Layer 4 + z_Fe[2] = z_Fe[1] + 2 *Fe_z + 52.5*GeoModelKernelUnits::mm; // 3rd Fe abs. + z_y[2] = z_Fe[0] - Fe_z + 433.0*GeoModelKernelUnits::mm; // Y scin. Layer 5 + z_Fe[3] = z_Fe[2] + 2 *Fe_z + 61.5*GeoModelKernelUnits::mm; // 4rd Fe abs. z_x[2] = z_Fe[0] - Fe_z + WTC_len; // X scin. Layer 6 // // Tilding of the TC -//double WTC_tild = -1.1*CLHEP::deg; // 24 CLHEP::mm tild on 1250 CLHEP::mm length -//double WTC_tild = 0.*CLHEP::deg; // 24 CLHEP::mm tild on 1250 CLHEP::mm length +//double WTC_tild = -1.1*GeoModelKernelUnits::deg; // 24 GeoModelKernelUnits::mm tild on 1250 GeoModelKernelUnits::mm length +//double WTC_tild = 0.*GeoModelKernelUnits::deg; // 24 GeoModelKernelUnits::mm tild on 1250 GeoModelKernelUnits::mm length // Define position in test beam line.... // -//double WTC_x = 0.0*CLHEP::mm; -//double WTC_y = 0.0*CLHEP::mm; -//double WTC_z = 460.0*CLHEP::mm - 120.*CLHEP::mm - 10.*CLHEP::mm; +//double WTC_x = 0.0*GeoModelKernelUnits::mm; +//double WTC_y = 0.0*GeoModelKernelUnits::mm; +//double WTC_z = 460.0*GeoModelKernelUnits::mm - 120.*GeoModelKernelUnits::mm - 10.*GeoModelKernelUnits::mm; // Some elements @@ -150,7 +152,7 @@ double z_x[3], z_y[3], z_Fe[4]; const GeoMaterial* Iron = materialManager->getMaterial("std::Iron"); const GeoMaterial *Air = materialManager->getMaterial("std::Air"); // Scintillator - double density = 1.032*CLHEP::g/CLHEP::cm3; + double density = 1.032*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3; GeoMaterial* Scintillator=new GeoMaterial("Scintillator",density); Scintillator->add(elC,0.9147); Scintillator->add(elH,0.0853); @@ -171,8 +173,6 @@ double z_x[3], z_y[3], z_Fe[4]; status=m_detectorStore->record(sPhysVol,tag); if(!status.isSuccess()) throw std::runtime_error ((std::string("Cannot store ")+tag).c_str()); - CLHEP::HepRotation NoRot; - // // Create the muon scintilator and position double a,n; @@ -181,16 +181,16 @@ double z_x[3], z_y[3], z_Fe[4]; GeoLogVol *mu_log = new GeoLogVol(muname, mu_box, Scintillator); GeoPhysVol *mu_phys = new GeoPhysVol(mu_log); for(int i=1; i<=3; ++i) { - a = -5.*i*CLHEP::mm + (2*i-1)*Muon_x/2; + a = -5.*i*GeoModelKernelUnits::mm + (2*i-1)*Muon_x/2; n = pow(-1,i) * Muon_z/2 - z_m + Muon_z; - CLHEP::Hep3Vector posShift(a,0.0*CLHEP::mm,n); + GeoTrf::Vector3D posShift(a,0.0*GeoModelKernelUnits::mm,n); m_WarmTCPhys->add(new GeoSerialIdentifier(6-i)); - m_WarmTCPhys->add(new GeoTransform(HepGeom::Transform3D(NoRot,CLHEP::Hep3Vector(a,0.0*CLHEP::mm,n)))); + m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(a,0.0*GeoModelKernelUnits::mm,n))); m_WarmTCPhys->add(mu_phys); n = pow(-1,i+1) * Muon_z/2 - z_m + Muon_z; m_WarmTCPhys->add(new GeoSerialIdentifier(5+i)); - m_WarmTCPhys->add(new GeoTransform(HepGeom::Transform3D(NoRot,CLHEP::Hep3Vector(-a,0.0*CLHEP::mm,n)))); + m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(-a,0.0*GeoModelKernelUnits::mm,n))); m_WarmTCPhys->add(mu_phys); } @@ -205,7 +205,7 @@ double z_x[3], z_y[3], z_Fe[4]; for(int i=0; i<4; i++) { m_WarmTCPhys->add(new GeoSerialIdentifier(i+1)); - m_WarmTCPhys->add(new GeoTransform(HepGeom::Transform3D(NoRot,CLHEP::Hep3Vector(0.0*CLHEP::mm,0.0*CLHEP::mm,z_Fe[i])))); + m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(0.0*GeoModelKernelUnits::mm,0.0*GeoModelKernelUnits::mm,z_Fe[i]))); m_WarmTCPhys->add(Fe_phys); } @@ -219,7 +219,7 @@ double z_x[3], z_y[3], z_Fe[4]; for(int i=0; i<3; i++) { m_WarmTCPhys->add(new GeoSerialIdentifier(i+1)); - m_WarmTCPhys->add(new GeoTransform(HepGeom::Transform3D(NoRot,CLHEP::Hep3Vector(0.0*CLHEP::mm,0.0*CLHEP::mm,z_x[i])))); + m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(0.0*GeoModelKernelUnits::mm,0.0*GeoModelKernelUnits::mm,z_x[i]))); m_WarmTCPhys->add(X_phys); } @@ -233,7 +233,7 @@ double z_x[3], z_y[3], z_Fe[4]; for(int i=0; i<3; i++) { m_WarmTCPhys->add(new GeoSerialIdentifier(i+1)); - m_WarmTCPhys->add(new GeoTransform(HepGeom::Transform3D(NoRot,CLHEP::Hep3Vector(0.0*CLHEP::mm,0.0*CLHEP::mm,z_y[i])))); + m_WarmTCPhys->add(new GeoTransform(GeoTrf::Translate3D(0.0*GeoModelKernelUnits::mm,0.0*GeoModelKernelUnits::mm,z_y[i]))); m_WarmTCPhys->add(Y_phys); } diff --git a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/CMakeLists.txt index f2148b5f9b7..c6e66c68ce0 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/CMakeLists.txt @@ -6,9 +6,7 @@ atlas_subdir( LArGeoH6Cryostats ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel - PRIVATE +atlas_depends_on_subdirs( PRIVATE Control/CxxUtils Control/StoreGate Database/RDBAccessSvc @@ -17,15 +15,15 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArGeoH6Cryostats src/*.cxx PUBLIC_HEADERS LArGeoH6Cryostats - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES GeoModelKernel StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CxxUtils GaudiKernel ) + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} StoreGateLib SGtests + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} CxxUtils GaudiKernel ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/LArGeoH6Cryostats/MWPCConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/LArGeoH6Cryostats/MWPCConstruction.h index 291ce05334e..14f6658bd47 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/LArGeoH6Cryostats/MWPCConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/LArGeoH6Cryostats/MWPCConstruction.h @@ -11,6 +11,7 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoFullPhysVol.h" +#include "GeoModelKernel/Units.h" #include <memory> class IRDBAccessSvc; @@ -23,7 +24,7 @@ namespace LArGeo { { public: - MWPCConstruction(double Step = 1.*CLHEP::mm); + MWPCConstruction(double Step = 1.*GeoModelKernelUnits::mm); virtual ~MWPCConstruction(); diff --git a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/BPCConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/BPCConstruction.cxx index c9a794ea4a1..043e1e5d224 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/BPCConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/BPCConstruction.cxx @@ -24,17 +24,14 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" - -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -107,7 +104,7 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() std::string name; double density; const GeoElement* W=materialManager->getElement("Wolfram"); - GeoMaterial* Tungsten = new GeoMaterial(name="Tungsten", density=19.3*CLHEP::g/CLHEP::cm3); + GeoMaterial* Tungsten = new GeoMaterial(name="Tungsten", density=19.3*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Tungsten->add(W,1.); Tungsten->lock(); @@ -117,21 +114,21 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() const GeoElement* O=materialManager->getElement("Oxygen"); const GeoElement* H=materialManager->getElement("Hydrogen"); const GeoElement* Al=materialManager->getElement("Aluminium"); - GeoMaterial* CO2 = new GeoMaterial(name="CO2", density=1.84E-03*CLHEP::g/CLHEP::cm3); + GeoMaterial* CO2 = new GeoMaterial(name="CO2", density=1.84E-03*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); CO2->add(C,0.273); CO2->add(O,0.727); CO2->lock(); - GeoMaterial* ArCO2_1 = new GeoMaterial(name="ArCO2_1", density=(0.8*1.782e-03 + 0.2*1.84E-03)*CLHEP::g/CLHEP::cm3); + GeoMaterial* ArCO2_1 = new GeoMaterial(name="ArCO2_1", density=(0.8*1.782e-03 + 0.2*1.84E-03)*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); ArCO2_1->add(Ar,0.8); ArCO2_1->add(CO2,0.2); ArCO2_1->lock(); - GeoMaterial* ArCO2_2 = new GeoMaterial(name="ArCO2_2", density=(0.9*1.782e-03 + 0.1*1.84E-03)*CLHEP::g/CLHEP::cm3); + GeoMaterial* ArCO2_2 = new GeoMaterial(name="ArCO2_2", density=(0.9*1.782e-03 + 0.1*1.84E-03)*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); ArCO2_2->add(Ar,0.9); ArCO2_2->add(CO2,0.1); ArCO2_2->lock(); // AlMylar AlC5H4O2 ?????? - density = 1.39*CLHEP::g/CLHEP::cm3; - GeoMaterial* AlMylar=new GeoMaterial(name="AlMylar",density=1.39*CLHEP::g/CLHEP::cm3); + density = 1.39*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3; + GeoMaterial* AlMylar=new GeoMaterial(name="AlMylar",density=1.39*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); AlMylar->add(C,0.487980); AlMylar->add(O,0.260014); AlMylar->add(H,0.032761); @@ -162,36 +159,36 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() ////////////////////////////////////////////////////////////////// // Define geometry ////////////////////////////////////////////////////////////////// - double bpc_x = 15.0*CLHEP::cm; - double bpc_y = 15.0*CLHEP::cm; - double bpc_z = (8.684/2)*CLHEP::cm; - double bpc_send = (1.14/2)*CLHEP::cm; - double bpc_sen = (1.06)*CLHEP::cm; - double bpc_div = 5.06*CLHEP::mm; - //double bpc_space = 2.6*CLHEP::mm; - double bpc_ml = 0.0010*CLHEP::cm; - double bpc_alml = 0.0012*CLHEP::cm; - double bpc_frame = 12.1*CLHEP::mm; - double bpc_alframe = 8.*CLHEP::mm; - double bpc_step = 0.6*CLHEP::cm; - double bpc_cstep = 0.3*CLHEP::cm; - double bpc_wd = 0.0020*CLHEP::cm; - double bpc_cwd = 0.0100*CLHEP::cm; + double bpc_x = 15.0*GeoModelKernelUnits::cm; + double bpc_y = 15.0*GeoModelKernelUnits::cm; + double bpc_z = (8.684/2)*GeoModelKernelUnits::cm; + double bpc_send = (1.14/2)*GeoModelKernelUnits::cm; + double bpc_sen = (1.06)*GeoModelKernelUnits::cm; + double bpc_div = 5.06*GeoModelKernelUnits::mm; + //double bpc_space = 2.6*GeoModelKernelUnits::mm; + double bpc_ml = 0.0010*GeoModelKernelUnits::cm; + double bpc_alml = 0.0012*GeoModelKernelUnits::cm; + double bpc_frame = 12.1*GeoModelKernelUnits::mm; + double bpc_alframe = 8.*GeoModelKernelUnits::mm; + double bpc_step = 0.6*GeoModelKernelUnits::cm; + double bpc_cstep = 0.3*GeoModelKernelUnits::cm; + double bpc_wd = 0.0020*GeoModelKernelUnits::cm; + double bpc_cwd = 0.0100*GeoModelKernelUnits::cm; - double bpc_old_x = 12.0*CLHEP::cm; - double bpc_old_y = 12.0*CLHEP::cm; - double bpc_old_z = (5.100/2)*CLHEP::cm; - double bpc_old_div = 7.6*CLHEP::mm; - double bpc_old_alml = 0.0020*CLHEP::cm; - double bpc_old_ml = 0.0050*CLHEP::cm; - double bpc_old_frame = 10.*CLHEP::mm; - double bpc_old_alframe = 2.*CLHEP::mm; - double bpc_old_alframe1 = 12.*CLHEP::mm; - double bpc_old_send = (1.7/2)*CLHEP::cm; - double bpc_old_sen = 0.5*CLHEP::cm; - double bpc_old_space = 1.*CLHEP::mm; - double bpc_old_step = 0.6*CLHEP::cm; - double bpc_old_cstep = 0.3*CLHEP::cm; + double bpc_old_x = 12.0*GeoModelKernelUnits::cm; + double bpc_old_y = 12.0*GeoModelKernelUnits::cm; + double bpc_old_z = (5.100/2)*GeoModelKernelUnits::cm; + double bpc_old_div = 7.6*GeoModelKernelUnits::mm; + double bpc_old_alml = 0.0020*GeoModelKernelUnits::cm; + double bpc_old_ml = 0.0050*GeoModelKernelUnits::cm; + double bpc_old_frame = 10.*GeoModelKernelUnits::mm; + double bpc_old_alframe = 2.*GeoModelKernelUnits::mm; + double bpc_old_alframe1 = 12.*GeoModelKernelUnits::mm; + double bpc_old_send = (1.7/2)*GeoModelKernelUnits::cm; + double bpc_old_sen = 0.5*GeoModelKernelUnits::cm; + double bpc_old_space = 1.*GeoModelKernelUnits::mm; + double bpc_old_step = 0.6*GeoModelKernelUnits::cm; + double bpc_old_cstep = 0.3*GeoModelKernelUnits::cm; // Here we creat the envelope for the Moveable FrontBeam Instrumentation. This code is repeated @@ -230,7 +227,7 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() if(i == 1) mylar_pos = bpc_alml - bpc_z; } m_BPCPhysical->add( new GeoIdentifierTag( i ) ); - m_BPCPhysical->add( new GeoTransform( HepGeom::Translate3D(0., 0., mylar_pos) ) ); + m_BPCPhysical->add( new GeoTransform( GeoTrf::Translate3D(0., 0., mylar_pos) ) ); m_BPCPhysical->add( phys_bpc_almylar ); } @@ -252,7 +249,7 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() if(i == 1) mylar_pos = bpc_alml - bpc_z + bpc_frame + bpc_alframe; } m_BPCPhysical->add( new GeoIdentifierTag( i ) ); - m_BPCPhysical->add( new GeoTransform( HepGeom::Translate3D(0., 0., mylar_pos) ) ); + m_BPCPhysical->add( new GeoTransform( GeoTrf::Translate3D(0., 0., mylar_pos) ) ); m_BPCPhysical->add( phys_bpc_mylar ); } @@ -266,8 +263,8 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() else log_bpc_xplane = new GeoLogVol(BPCName + "::bpc_xplane", shape_bpc_xplane, ArCO2_1); GeoPhysVol* phys_bpc_xplane = new GeoPhysVol(log_bpc_xplane); m_BPCPhysical->add( new GeoIdentifierTag( 0 ) ); - if(m_oldType) m_BPCPhysical->add( new GeoTransform( HepGeom::Translate3D(0., 0., bpc_old_sen) ) ); - else m_BPCPhysical->add( new GeoTransform( HepGeom::Translate3D(0., 0., -bpc_sen-bpc_send) ) ); + if(m_oldType) m_BPCPhysical->add( new GeoTransform( GeoTrf::Translate3D(0., 0., bpc_old_sen) ) ); + else m_BPCPhysical->add( new GeoTransform( GeoTrf::Translate3D(0., 0., -bpc_sen-bpc_send) ) ); m_BPCPhysical->add(phys_bpc_xplane); // division of X plane @@ -281,9 +278,9 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() if(m_oldType) log_bpc_xdiv = new GeoLogVol(BPCName + "::bpco_div", shape_bpc_xdiv, ArCO2_2); else log_bpc_xdiv = new GeoLogVol(BPCName + "::bpc_xdiv", shape_bpc_xdiv, ArCO2_1); GeoPhysVol* phys_bpc_xdiv = new GeoPhysVol(log_bpc_xdiv); - Genfun::Variable Index; - GeoXF::TRANSFUNCTION TXO = GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_step/2.); - GeoXF::TRANSFUNCTION TX = GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_step/2.); + GeoGenfun::Variable Index; + GeoXF::TRANSFUNCTION TXO = GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_step/2.); + GeoXF::TRANSFUNCTION TX = GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_step/2.); phys_bpc_xplane->add( new GeoSerialIdentifier(0) ); if(m_oldType) phys_bpc_xplane->add( new GeoSerialTransformer(phys_bpc_xdiv, &TXO, Ndiv ) ); else phys_bpc_xplane->add( new GeoSerialTransformer(phys_bpc_xdiv, &TX, Ndiv ) ); @@ -296,32 +293,32 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() GeoLogVol* log_bpc_yplane = new GeoLogVol(BPCName + "::bpc_yplane",shape_bpc_yplane, ArCO2_1); phys_bpc_yplane = new GeoPhysVol(log_bpc_yplane); m_BPCPhysical->add( new GeoIdentifierTag( 0 ) ); - m_BPCPhysical->add( new GeoTransform( HepGeom::Translate3D(0., 0., bpc_sen+bpc_send) ) ); + m_BPCPhysical->add( new GeoTransform( GeoTrf::Translate3D(0., 0., bpc_sen+bpc_send) ) ); m_BPCPhysical->add( phys_bpc_yplane ); // division of Y plane GeoBox* shape_bpc_ydiv = new GeoBox(bpc_x, bpc_step/2.,bpc_div); GeoLogVol* log_bpc_ydiv = new GeoLogVol(BPCName + "::bpc_ydiv", shape_bpc_ydiv, ArCO2_1); phys_bpc_ydiv = new GeoPhysVol(log_bpc_ydiv); - GeoXF::TRANSFUNCTION TY = GeoXF::Pow(HepGeom::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_step/2); + GeoXF::TRANSFUNCTION TY = GeoXF::Pow(GeoTrf::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_step/2); phys_bpc_yplane->add( new GeoSerialIdentifier(0) ); phys_bpc_yplane->add( new GeoSerialTransformer(phys_bpc_ydiv, &TY, Ndiv ) ); } // wires in each division GeoTubs* shape_bpc_wire; - if(m_oldType) shape_bpc_wire = new GeoTubs(0., bpc_wd, bpc_old_x, 0.*CLHEP::deg, 360.*CLHEP::deg); - else shape_bpc_wire = new GeoTubs(0., bpc_wd, bpc_x, 0.*CLHEP::deg, 360.*CLHEP::deg); + if(m_oldType) shape_bpc_wire = new GeoTubs(0., bpc_wd, bpc_old_x, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg); + else shape_bpc_wire = new GeoTubs(0., bpc_wd, bpc_x, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg); GeoLogVol* log_bpc_wire; if(m_oldType) log_bpc_wire = new GeoLogVol(BPCName + "::bpco_wire", shape_bpc_wire, Tungsten); else log_bpc_wire = new GeoLogVol(BPCName + "::bpc_wire", shape_bpc_wire, Tungsten); GeoPhysVol* phys_bpc_wire = new GeoPhysVol(log_bpc_wire); phys_bpc_xdiv->add( new GeoIdentifierTag( 1 ) ); - phys_bpc_xdiv->add( new GeoTransform( HepGeom::RotateX3D( 90.*CLHEP::deg ) ) ); + phys_bpc_xdiv->add( new GeoTransform( GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ) ) ); phys_bpc_xdiv->add(phys_bpc_wire); if(!m_oldType) { phys_bpc_ydiv->add( new GeoIdentifierTag( 1 ) ); - phys_bpc_ydiv->add( new GeoTransform( HepGeom::RotateY3D( 90.*CLHEP::deg ) ) ); + phys_bpc_ydiv->add( new GeoTransform( GeoTrf::RotateY3D( 90.*GeoModelKernelUnits::deg ) ) ); phys_bpc_ydiv->add(phys_bpc_wire); } @@ -329,20 +326,20 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() if(m_oldType) Ndiv = int(2.0*bpc_old_x/bpc_cstep); else Ndiv = int(2.0*bpc_x/bpc_cstep); GeoTubs* shape_bpc_cwire; - if(m_oldType) shape_bpc_cwire = new GeoTubs(0., bpc_cwd, bpc_old_x, 0.*CLHEP::deg, 360.*CLHEP::deg); - else shape_bpc_cwire = new GeoTubs( 0., bpc_cwd, bpc_x, 0.*CLHEP::deg, 360.*CLHEP::deg); + if(m_oldType) shape_bpc_cwire = new GeoTubs(0., bpc_cwd, bpc_old_x, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg); + else shape_bpc_cwire = new GeoTubs( 0., bpc_cwd, bpc_x, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg); GeoLogVol* log_bpc_cwire; if(m_oldType) log_bpc_cwire = new GeoLogVol(BPCName + "::bpco_cwire",shape_bpc_cwire, Tungsten); else log_bpc_cwire = new GeoLogVol(BPCName + "::bpc_cwire",shape_bpc_cwire, Tungsten); GeoPhysVol* phys_bpc_cwire = new GeoPhysVol(log_bpc_cwire); -// GeoXF::TRANSFUNCTION TXXMO = HepGeom::RotateX3D( 90.*CLHEP::deg ) * GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_cstep/2.) * HepGeom::TranslateZ3D(-bpc_old_send-bpc_cwd+bpc_old_space); -// GeoXF::TRANSFUNCTION TXXPO = HepGeom::RotateX3D( 90.*CLHEP::deg ) * GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_cstep/2.) * HepGeom::TranslateZ3D(bpc_old_send-bpc_old_space+bpc_cwd); - GeoXF::TRANSFUNCTION TXXMO = GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_cstep/2.) * HepGeom::TranslateZ3D(-bpc_old_send-2.*bpc_cwd+bpc_old_space) * HepGeom::RotateX3D( 90.*CLHEP::deg ); - GeoXF::TRANSFUNCTION TXXPO = GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_cstep/2.) * HepGeom::TranslateZ3D(bpc_old_send-bpc_old_space+2.*bpc_cwd) * HepGeom::RotateX3D( 90.*CLHEP::deg ); -// GeoXF::TRANSFUNCTION TXXM = HepGeom::RotateX3D( 90.*CLHEP::deg ) * GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_cstep/2.) * HepGeom::TranslateZ3D(-bpc_div-bpc_cwd); -// GeoXF::TRANSFUNCTION TXXP = HepGeom::RotateX3D( 90.*CLHEP::deg ) * GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_cstep/2.) * HepGeom::TranslateZ3D(bpc_div+bpc_cwd); - GeoXF::TRANSFUNCTION TXXM = GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_cstep/2.) * HepGeom::TranslateZ3D(-bpc_div-bpc_cwd) * HepGeom::RotateX3D( 90.*CLHEP::deg ); - GeoXF::TRANSFUNCTION TXXP = GeoXF::Pow(HepGeom::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_cstep/2.) * HepGeom::TranslateZ3D(bpc_div+bpc_cwd) * HepGeom::RotateX3D( 90.*CLHEP::deg ); +// GeoXF::TRANSFUNCTION TXXMO = GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ) * GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_cstep/2.) * GeoTrf::TranslateZ3D(-bpc_old_send-bpc_cwd+bpc_old_space); +// GeoXF::TRANSFUNCTION TXXPO = GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ) * GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_cstep/2.) * GeoTrf::TranslateZ3D(bpc_old_send-bpc_old_space+bpc_cwd); + GeoXF::TRANSFUNCTION TXXMO = GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_cstep/2.) * GeoTrf::TranslateZ3D(-bpc_old_send-2.*bpc_cwd+bpc_old_space) * GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ); + GeoXF::TRANSFUNCTION TXXPO = GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_old_x+(2*Index+1)*bpc_old_cstep/2.) * GeoTrf::TranslateZ3D(bpc_old_send-bpc_old_space+2.*bpc_cwd) * GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ); +// GeoXF::TRANSFUNCTION TXXM = GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ) * GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_cstep/2.) * GeoTrf::TranslateZ3D(-bpc_div-bpc_cwd); +// GeoXF::TRANSFUNCTION TXXP = GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ) * GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_cstep/2.) * GeoTrf::TranslateZ3D(bpc_div+bpc_cwd); + GeoXF::TRANSFUNCTION TXXM = GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_cstep/2.) * GeoTrf::TranslateZ3D(-bpc_div-bpc_cwd) * GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ); + GeoXF::TRANSFUNCTION TXXP = GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -bpc_x+(2*Index+1)*bpc_cstep/2.) * GeoTrf::TranslateZ3D(bpc_div+bpc_cwd) * GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ); phys_bpc_xplane->add( new GeoSerialIdentifier(0) ); if(m_oldType) phys_bpc_xplane->add( new GeoSerialTransformer(phys_bpc_cwire, &TXXMO, Ndiv) ); else phys_bpc_xplane->add( new GeoSerialTransformer(phys_bpc_cwire, &TXXM, Ndiv) ); @@ -350,10 +347,10 @@ GeoVPhysVol* LArGeo::BPCConstruction::GetEnvelope() if(m_oldType) phys_bpc_xplane->add( new GeoSerialTransformer(phys_bpc_cwire, &TXXPO, Ndiv) ); else phys_bpc_xplane->add( new GeoSerialTransformer(phys_bpc_cwire, &TXXP, Ndiv) ); if(!m_oldType) { -// GeoXF::TRANSFUNCTION TYYM = HepGeom::RotateY3D( 90.*CLHEP::deg ) * GeoXF::Pow(HepGeom::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_cstep/2.) * HepGeom::TranslateZ3D(-bpc_div-bpc_cwd); -// GeoXF::TRANSFUNCTION TYYP = HepGeom::RotateY3D( 90.*CLHEP::deg ) * GeoXF::Pow(HepGeom::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_cstep/2.) * HepGeom::TranslateZ3D(bpc_div+bpc_cwd); - GeoXF::TRANSFUNCTION TYYM = GeoXF::Pow(HepGeom::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_cstep/2.) * HepGeom::TranslateZ3D(-bpc_div-bpc_cwd) * HepGeom::RotateY3D( 90.*CLHEP::deg ); - GeoXF::TRANSFUNCTION TYYP = GeoXF::Pow(HepGeom::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_cstep/2.) * HepGeom::TranslateZ3D(bpc_div+bpc_cwd) * HepGeom::RotateY3D( 90.*CLHEP::deg ); +// GeoXF::TRANSFUNCTION TYYM = GeoTrf::RotateY3D( 90.*GeoModelKernelUnits::deg ) * GeoXF::Pow(GeoTrf::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_cstep/2.) * GeoTrf::TranslateZ3D(-bpc_div-bpc_cwd); +// GeoXF::TRANSFUNCTION TYYP = GeoTrf::RotateY3D( 90.*GeoModelKernelUnits::deg ) * GeoXF::Pow(GeoTrf::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_cstep/2.) * GeoTrf::TranslateZ3D(bpc_div+bpc_cwd); + GeoXF::TRANSFUNCTION TYYM = GeoXF::Pow(GeoTrf::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_cstep/2.) * GeoTrf::TranslateZ3D(-bpc_div-bpc_cwd) * GeoTrf::RotateY3D( 90.*GeoModelKernelUnits::deg ); + GeoXF::TRANSFUNCTION TYYP = GeoXF::Pow(GeoTrf::TranslateY3D(1.0), -bpc_y+(2*Index+1)*bpc_cstep/2.) * GeoTrf::TranslateZ3D(bpc_div+bpc_cwd) * GeoTrf::RotateY3D( 90.*GeoModelKernelUnits::deg ); phys_bpc_yplane->add( new GeoSerialIdentifier(0) ); phys_bpc_yplane->add( new GeoSerialTransformer(phys_bpc_cwire, &TYYM, Ndiv) ); phys_bpc_yplane->add( new GeoSerialIdentifier(Ndiv) ); diff --git a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/H6CryostatConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/H6CryostatConstruction.cxx index 6ea8ebae309..a43ee7e780c 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/H6CryostatConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/H6CryostatConstruction.cxx @@ -22,18 +22,14 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -// For transforms: - -#include "CLHEP/Geometry/Transform3D.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" - // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -104,23 +100,23 @@ GeoVFullPhysVol* LArGeo::H6CryostatConstruction::GetEnvelope() // First attempt at creating the H6 cryostat: // (values taken from HECCommonDetectorParamDef) // - // A cylinder of half-height: zcryo = 2000.0 *CLHEP::mm - // outer radius of warm-wall: rwarm = 1295.5 *CLHEP::mm - // outer radius of vacuum: rvac = 1293.0 *CLHEP::mm - // outer radius of cold wall: rcold = 1258.0 *CLHEP::mm - // outer radius of LAr: rlar = 1255.0 *CLHEP::mm + // A cylinder of half-height: zcryo = 2000.0 *GeoModelKernelUnits::mm + // outer radius of warm-wall: rwarm = 1295.5 *GeoModelKernelUnits::mm + // outer radius of vacuum: rvac = 1293.0 *GeoModelKernelUnits::mm + // outer radius of cold wall: rcold = 1258.0 *GeoModelKernelUnits::mm + // outer radius of LAr: rlar = 1255.0 *GeoModelKernelUnits::mm // needs to go into database: --- 4databa - double zcryo = 2000.0 *CLHEP::mm; - double rwarm = 1295.5 *CLHEP::mm; - double rvac = 1293.0 *CLHEP::mm; - double rcold = 1258.0 *CLHEP::mm; - double rlar = 1255.0 *CLHEP::mm; + double zcryo = 2000.0 *GeoModelKernelUnits::mm; + double rwarm = 1295.5 *GeoModelKernelUnits::mm; + double rvac = 1293.0 *GeoModelKernelUnits::mm; + double rcold = 1258.0 *GeoModelKernelUnits::mm; + double rlar = 1255.0 *GeoModelKernelUnits::mm; std::string cryoMotherName = "LAr::H6::Cryostat::MotherVolume"; // mother volume; cylinder of radius rwarm = outside of the cryostat warm wall - GeoTube* cryoMotherShape = new GeoTube(0.0 , rwarm+10.0, zcryo+10.0*CLHEP::mm); // mother is a little bigger than warm wall + GeoTube* cryoMotherShape = new GeoTube(0.0 , rwarm+10.0, zcryo+10.0*GeoModelKernelUnits::mm); // mother is a little bigger than warm wall const GeoLogVol* cryoMotherLogical = new GeoLogVol(cryoMotherName, cryoMotherShape, Air); m_cryoMotherPhysical = new GeoFullPhysVol(cryoMotherLogical); @@ -146,13 +142,13 @@ GeoVFullPhysVol* LArGeo::H6CryostatConstruction::GetEnvelope() m_cryoMotherPhysical->add(cryoWarmWallPhys); // "Vacuum" gap (filled with air...) - GeoTube* cryoVacuumGapShape = new GeoTube(0. , rvac, zcryo-2.0*CLHEP::mm); // an arbitrary 2mm shorter to avoid confilct + GeoTube* cryoVacuumGapShape = new GeoTube(0. , rvac, zcryo-2.0*GeoModelKernelUnits::mm); // an arbitrary 2mm shorter to avoid confilct const GeoLogVol* cryoVacuumGapLog = new GeoLogVol(cryoVacuumGapName, cryoVacuumGapShape, Air); GeoPhysVol* cryoVacuumGapPhys = new GeoPhysVol(cryoVacuumGapLog); cryoWarmWallPhys->add(cryoVacuumGapPhys); // Cold Wall - GeoTube* cryoColdWallShape = new GeoTube(0. , rcold, zcryo-4.0*CLHEP::mm); // an arbitrary 4mm shorter to avoid confilct + GeoTube* cryoColdWallShape = new GeoTube(0. , rcold, zcryo-4.0*GeoModelKernelUnits::mm); // an arbitrary 4mm shorter to avoid confilct const GeoLogVol* cryoColdWallLog = new GeoLogVol(cryoColdWallName, cryoColdWallShape, Iron); GeoPhysVol* cryoColdWallPhys = new GeoPhysVol(cryoColdWallLog); cryoVacuumGapPhys->add(cryoColdWallPhys); @@ -164,7 +160,7 @@ GeoVFullPhysVol* LArGeo::H6CryostatConstruction::GetEnvelope() // And the FCal the embedded in the LAr instead of the cryoMother! // Liquid Argon - GeoTube* cryoLArShape = new GeoTube(0. , rlar, zcryo-6.0*CLHEP::mm); // an arbitrary 2mm shorter to avoid confilct + GeoTube* cryoLArShape = new GeoTube(0. , rlar, zcryo-6.0*GeoModelKernelUnits::mm); // an arbitrary 2mm shorter to avoid confilct const GeoLogVol* cryoLArLog = new GeoLogVol(cryoLArName, cryoLArShape, LAr); m_cryoMotherPhysical->add(new GeoNameTag(std::string("Cryostat LAr Physical"))); // m_cryoLArPhys is a class member so that we can place Detectors inside. diff --git a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/MWPCConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/MWPCConstruction.cxx index a47752d86c0..2506edd5257 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/MWPCConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/MWPCConstruction.cxx @@ -27,17 +27,13 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" - -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -110,7 +106,7 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() std::string name; double density; const GeoElement* W=materialManager->getElement("Wolfram"); - GeoMaterial* Tungsten = new GeoMaterial(name="Tungsten", density=19.3*CLHEP::g/CLHEP::cm3); + GeoMaterial* Tungsten = new GeoMaterial(name="Tungsten", density=19.3*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Tungsten->add(W,1.); Tungsten->lock(); @@ -118,11 +114,11 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() const GeoElement* Ar=materialManager->getElement("Argon"); const GeoElement* C=materialManager->getElement("Carbon"); const GeoElement* H=materialManager->getElement("Hydrogen"); - GeoMaterial* Isobutane = new GeoMaterial(name="Isobutane", density=2.67*CLHEP::g/CLHEP::cm3); + GeoMaterial* Isobutane = new GeoMaterial(name="Isobutane", density=2.67*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Isobutane->add(C,0.8266); Isobutane->add(H,0.1734); Isobutane->lock(); - GeoMaterial* ArIso = new GeoMaterial(name="ArIso", density=0.0025*CLHEP::g/CLHEP::cm3); + GeoMaterial* ArIso = new GeoMaterial(name="ArIso", density=0.0025*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); ArIso->add(Ar,0.61); ArIso->add(Isobutane,0.39); ArIso->lock(); @@ -173,8 +169,8 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() std::string MWPCName = baseName + "::MWPC"; // This creates a square wire-chamber: - const double MWPCDxy = 64.0*CLHEP::mm; - const double MWPCDz = 16.586*CLHEP::mm; + const double MWPCDxy = 64.0*GeoModelKernelUnits::mm; + const double MWPCDz = 16.586*GeoModelKernelUnits::mm; GeoBox* MWPCShape = new GeoBox(MWPCDxy, MWPCDxy, MWPCDz); // A generic WWPC @@ -184,7 +180,7 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() //..... Add Mylar to MWPC: - const double MylarDz = 0.015*CLHEP::mm; + const double MylarDz = 0.015*GeoModelKernelUnits::mm; GeoBox* MylarShape = new GeoBox(MWPCDxy, MWPCDxy, MylarDz); // Mylar fits across the MWPC in x,y @@ -197,7 +193,7 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() GeoLogVol* MylarLogical = new GeoLogVol( MylarName, MylarShape, Mylar ); GeoPhysVol* MylarPhysical = new GeoPhysVol( MylarLogical ); m_MWPCPhysical->add( new GeoIdentifierTag( side ) ); - m_MWPCPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (MylarPos) ) ) ); + m_MWPCPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (MylarPos) ) ) ); m_MWPCPhysical->add( MylarPhysical ); } // Done with the Mylar Foils @@ -205,10 +201,10 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() //..... Add Al walls to MWPC5: - const double Aluz = 0.014*CLHEP::mm; + const double Aluz = 0.014*GeoModelKernelUnits::mm; const double AluDz = Aluz; - const double Alu_f = 7.*CLHEP::mm; - const double Alu_s = 15.*CLHEP::mm; + const double Alu_f = 7.*GeoModelKernelUnits::mm; + const double Alu_s = 15.*GeoModelKernelUnits::mm; GeoBox* AluShape = new GeoBox(MWPCDxy, MWPCDxy, AluDz); // Al foil fits across the MWPC in x,y for ( int pos = 0; pos<4 ; pos++) @@ -226,17 +222,17 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() GeoLogVol* AluLogical = new GeoLogVol( AluName, AluShape, Aluminium ); GeoPhysVol* AluPhysical = new GeoPhysVol( AluLogical ); m_MWPCPhysical->add( new GeoIdentifierTag( pos ) ); - m_MWPCPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (AluPos) ) ) ); + m_MWPCPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (AluPos) ) ) ); m_MWPCPhysical->add( AluPhysical ); } //..... Add a sensitive X and Y plane to MWPC5: - const double Senz = 4.0*CLHEP::mm; + const double Senz = 4.0*GeoModelKernelUnits::mm; const double SenDz = Senz; // z-Thickness of sensitive volume - const double SenPos = 11.*CLHEP::mm; // z-Position of sensitive volume - //const double Step = 2.*CLHEP::mm; // wire-step size for MWPC5 + const double SenPos = 11.*GeoModelKernelUnits::mm; // z-Position of sensitive volume + //const double Step = 2.*GeoModelKernelUnits::mm; // wire-step size for MWPC5 GeoBox* SenPlaneShape = new GeoBox(MWPCDxy, MWPCDxy, SenDz); // Sensitive Volume fits across the MWPC in x,y @@ -247,20 +243,20 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() GeoPhysVol* XPlanePhysical = new GeoPhysVol( XPlaneLogical ); GeoPhysVol* YPlanePhysical = new GeoPhysVol( YPlaneLogical ); m_MWPCPhysical->add( new GeoIdentifierTag( 0 ) ); - m_MWPCPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (-SenPos) ) ) ); + m_MWPCPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (-SenPos) ) ) ); m_MWPCPhysical->add( XPlanePhysical ); m_MWPCPhysical->add( new GeoIdentifierTag( 0 ) ); - m_MWPCPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, (SenPos) ) ) ); + m_MWPCPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, (SenPos) ) ) ); m_MWPCPhysical->add( YPlanePhysical ); //.... The X and Y planes have "divisions" // These divisions will eventually be the sensitive volumes - Genfun::Variable Index; + GeoGenfun::Variable Index; int NDiv= int ( 2*MWPCDxy / m_wireStep ) ; - GeoXF::TRANSFUNCTION TX = GeoXF::Pow(HepGeom::TranslateX3D(1.0), -MWPCDxy + m_wireStep/2. + m_wireStep*Index); - GeoXF::TRANSFUNCTION TY = GeoXF::Pow(HepGeom::TranslateY3D(1.0), -MWPCDxy + m_wireStep/2. + m_wireStep*Index); + GeoXF::TRANSFUNCTION TX = GeoXF::Pow(GeoTrf::TranslateX3D(1.0), -MWPCDxy + m_wireStep/2. + m_wireStep*Index); + GeoXF::TRANSFUNCTION TY = GeoXF::Pow(GeoTrf::TranslateY3D(1.0), -MWPCDxy + m_wireStep/2. + m_wireStep*Index); GeoBox* XPlaneDiv = new GeoBox(m_wireStep/2., MWPCDxy , SenDz); GeoBox* YPlaneDiv = new GeoBox(MWPCDxy , m_wireStep/2., SenDz); std::string XDivName = MWPCName + "::XDiv"; @@ -280,15 +276,15 @@ GeoVPhysVol* LArGeo::MWPCConstruction::GetEnvelope() YPlanePhysical->add(sTSY); //.... Put wires into the X/Y "divisions" - const double WireDiam = 0.006*CLHEP::mm; + const double WireDiam = 0.006*GeoModelKernelUnits::mm; const double WireLen = MWPCDxy; - GeoTubs* WireShape = new GeoTubs(0.*CLHEP::cm, WireDiam/2., WireLen , 0.*CLHEP::deg,360.*CLHEP::deg); + GeoTubs* WireShape = new GeoTubs(0.*GeoModelKernelUnits::cm, WireDiam/2., WireLen , 0.*GeoModelKernelUnits::deg,360.*GeoModelKernelUnits::deg); std::string WireName = MWPCName + "::Wire"; GeoLogVol* WireLogical = new GeoLogVol(WireName, WireShape, Tungsten); GeoPhysVol* WirePhysical = new GeoPhysVol( WireLogical ); - XDivPhysical->add(new GeoTransform(HepGeom::RotateX3D( 90.*CLHEP::deg ))); + XDivPhysical->add(new GeoTransform(GeoTrf::RotateX3D( 90.*GeoModelKernelUnits::deg ))); XDivPhysical->add(WirePhysical); - YDivPhysical->add(new GeoTransform(HepGeom::RotateY3D( 90.*CLHEP::deg ))); + YDivPhysical->add(new GeoTransform(GeoTrf::RotateY3D( 90.*GeoModelKernelUnits::deg ))); YDivPhysical->add(WirePhysical); diff --git a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/WallsConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/WallsConstruction.cxx index 196408deb70..a8f7cb567be 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/WallsConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoH6Cryostats/src/WallsConstruction.cxx @@ -22,18 +22,15 @@ #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoSerialDenominator.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CxxUtils/make_unique.h" - -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" +#include "CxxUtils/make_unique.h" +#include "GeoGenericFunctions/Variable.h" // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -120,7 +117,7 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() // Is this ok for the Scintillator? // I don't really know for sure what kind of a scintillator we have. - // Lots of Scintillators are PMMA (Plexiglas), which has a composition of C5 H8 O2 and density 1.18 CLHEP::g/CLHEP::cm3 + // Lots of Scintillators are PMMA (Plexiglas), which has a composition of C5 H8 O2 and density 1.18 GeoModelKernelUnits::g/GeoModelKernelUnits::cm3 // The Tile uses a composition of C H (density 1.032) // The old Walls testbeam code uses a composition of C9 H10 (density 1.032) // ... because it's easiest at the moment and not all that different from the fractional @@ -160,9 +157,9 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() std::string baseName = "LAr::TBH6"; std::string WallsName = baseName + "::Walls"; - const double WallsX = 1500.*CLHEP::mm; - const double WallsY = 2000.*CLHEP::mm; - const double WallsZ = 560.5*CLHEP::mm; + const double WallsX = 1500.*GeoModelKernelUnits::mm; + const double WallsY = 2000.*GeoModelKernelUnits::mm; + const double WallsZ = 560.5*GeoModelKernelUnits::mm; GeoBox* WallsShape = new GeoBox( WallsX, WallsY, WallsZ ); @@ -179,13 +176,13 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() (*m_msg) << "Create Iron Wall " << endmsg; - const double IronX = 1499.*CLHEP::mm; - const double IronY = 1999.*CLHEP::mm; - const double IronZ = 200.0*CLHEP::mm; - const double IronHoleX = 51.5*CLHEP::mm; - const double IronHoleY = 1999.*CLHEP::mm; - const double IronHoleZ = 200.*CLHEP::mm; - const double IronPosZ = 270.*CLHEP::mm; + const double IronX = 1499.*GeoModelKernelUnits::mm; + const double IronY = 1999.*GeoModelKernelUnits::mm; + const double IronZ = 200.0*GeoModelKernelUnits::mm; + const double IronHoleX = 51.5*GeoModelKernelUnits::mm; + const double IronHoleY = 1999.*GeoModelKernelUnits::mm; + const double IronHoleZ = 200.*GeoModelKernelUnits::mm; + const double IronPosZ = 270.*GeoModelKernelUnits::mm; // The wall itself: GeoBox* IronWallShape = new GeoBox(IronX, IronY, IronZ); @@ -201,7 +198,7 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() IronWallPhysical->add(IronHolePhysical); // Add the iron wall to the Wall mother: - m_WallsPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::mm, 0.*CLHEP::mm, (WallsZ-IronPosZ) ) ) ) ; + m_WallsPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::mm, 0.*GeoModelKernelUnits::mm, (WallsZ-IronPosZ) ) ) ) ; m_WallsPhysical->add( new GeoNameTag(IronWallName) ); m_WallsPhysical->add( IronWallPhysical ); @@ -213,13 +210,13 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() (*m_msg) << "Create Lead Wall " << endmsg; - const double LeadX = 1499.*CLHEP::mm; - const double LeadY = 1999.*CLHEP::mm; - const double LeadZ = 6.*CLHEP::mm; - const double LeadHoleX = 23.5*CLHEP::mm; - const double LeadHoleY = 1999.*CLHEP::mm; - const double LeadHoleZ = 6.*CLHEP::mm; - const double LeadPosZ = 1045.*CLHEP::mm; + const double LeadX = 1499.*GeoModelKernelUnits::mm; + const double LeadY = 1999.*GeoModelKernelUnits::mm; + const double LeadZ = 6.*GeoModelKernelUnits::mm; + const double LeadHoleX = 23.5*GeoModelKernelUnits::mm; + const double LeadHoleY = 1999.*GeoModelKernelUnits::mm; + const double LeadHoleZ = 6.*GeoModelKernelUnits::mm; + const double LeadPosZ = 1045.*GeoModelKernelUnits::mm; // The wall itself: GeoBox* LeadWallShape = new GeoBox(LeadX, LeadY, LeadZ); @@ -235,7 +232,7 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() LeadWallPhysical->add(LeadHolePhysical); // Add the lead wall to the Wall mother: - m_WallsPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::mm, 0.*CLHEP::mm, (WallsZ-LeadPosZ) ) ) ) ; + m_WallsPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::mm, 0.*GeoModelKernelUnits::mm, (WallsZ-LeadPosZ) ) ) ) ; m_WallsPhysical->add( new GeoNameTag(LeadWallName) ); m_WallsPhysical->add( LeadWallPhysical ); @@ -246,13 +243,13 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() (*m_msg) << "Create Scint Wall " << endmsg; - const double ScintX = 1499.*CLHEP::mm; - const double ScintY = 1999.*CLHEP::mm; - const double ScintZ = 6.5*CLHEP::mm; - const double ScintHoleX = 92.5*CLHEP::mm; - const double ScintHoleY = 1999.*CLHEP::mm; - const double ScintHoleZ = 6.5*CLHEP::mm; - const double ScintPosZ = 625.*CLHEP::mm; + const double ScintX = 1499.*GeoModelKernelUnits::mm; + const double ScintY = 1999.*GeoModelKernelUnits::mm; + const double ScintZ = 6.5*GeoModelKernelUnits::mm; + const double ScintHoleX = 92.5*GeoModelKernelUnits::mm; + const double ScintHoleY = 1999.*GeoModelKernelUnits::mm; + const double ScintHoleZ = 6.5*GeoModelKernelUnits::mm; + const double ScintPosZ = 625.*GeoModelKernelUnits::mm; // The wall itself: GeoBox* ScintWallShape = new GeoBox(ScintX, ScintY, ScintZ); @@ -268,7 +265,7 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() ScintWallPhysical->add(ScintHolePhysical); // Add the scintillator wall to the Wall mother: - m_WallsPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::mm, 0.*CLHEP::mm, (WallsZ-ScintPosZ) ) ) ) ; + m_WallsPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::mm, 0.*GeoModelKernelUnits::mm, (WallsZ-ScintPosZ) ) ) ) ; m_WallsPhysical->add( new GeoNameTag(ScintWallName) ); m_WallsPhysical->add( ScintWallPhysical ); @@ -280,10 +277,10 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() //(*m_msg) << "Create Iron Plate " << endmsg; - const double IronPlateX = 50.*CLHEP::mm; - const double IronPlateY = 150.*CLHEP::mm; - const double IronPlateZ = 4.*CLHEP::mm; - const double IronPlatePosZ = 493.*CLHEP::mm; + const double IronPlateX = 50.*GeoModelKernelUnits::mm; + const double IronPlateY = 150.*GeoModelKernelUnits::mm; + const double IronPlateZ = 4.*GeoModelKernelUnits::mm; + const double IronPlatePosZ = 493.*GeoModelKernelUnits::mm; const int nPlate = 0 ; const int PlatePlace = 1 ; // There were two locations used for these plates - unclear which one when and exactly // where they were....! For the moment, sort of copy the standalone code @@ -312,7 +309,7 @@ GeoVPhysVol* LArGeo::WallsConstruction::GetEnvelope() // Add the iron plate to the Plate mother: for (int iz=0; iz<(nPlate); iz++) { m_WallsPhysical->add( new GeoIdentifierTag(iz) ); - m_WallsPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::mm, 0.*CLHEP::mm, double(PlatePlace)*(v_PlateZ[iz]) ) ) ) ; + m_WallsPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::mm, 0.*GeoModelKernelUnits::mm, double(PlatePlace)*(v_PlateZ[iz]) ) ) ) ; m_WallsPhysical->add( new GeoNameTag(IronPlateName) ); m_WallsPhysical->add( IronPlatePhysical ); } diff --git a/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt index 4579a38e611..a718835838a 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt @@ -11,21 +11,20 @@ atlas_depends_on_subdirs( PRIVATE Control/StoreGate Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities GaudiKernel ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArGeoHec src/*.cxx PUBLIC_HEADERS LArGeoHec - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} LINK_LIBRARIES StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel ) + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoHec/src/HEC2WheelConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoHec/src/HEC2WheelConstruction.cxx index aa539968940..1f205323582 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoHec/src/HEC2WheelConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoHec/src/HEC2WheelConstruction.cxx @@ -43,10 +43,9 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoXF.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/Variable.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -67,11 +66,11 @@ #include <iostream> -using CLHEP::cm; -using CLHEP::mm; -using CLHEP::deg; -using HepGeom::Transform3D; -using HepGeom::Translate3D; +using GeoModelKernelUnits::cm; +using GeoModelKernelUnits::mm; +using GeoModelKernelUnits::deg; +using GeoTrf::Transform3D; +using GeoTrf::Translate3D; //Constructor diff --git a/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECClampConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECClampConstruction.cxx index cb45fec5977..200c46eb62d 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECClampConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECClampConstruction.cxx @@ -31,10 +31,9 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoXF.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/Variable.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -52,12 +51,12 @@ #include <cmath> #include <iostream> -using CLHEP::cm; -using CLHEP::mm; -using CLHEP::deg; -using HepGeom::RotateZ3D; -using HepGeom::Translate3D; -using HepGeom::TranslateZ3D; +using GeoModelKernelUnits::cm; +using GeoModelKernelUnits::mm; +using GeoModelKernelUnits::deg; +using GeoTrf::RotateZ3D; +using GeoTrf::Translate3D; +using GeoTrf::TranslateZ3D; //Constructor @@ -383,11 +382,11 @@ void LArGeo::HECClampConstruction::AddClamps(GeoFullPhysVol* physiHECWheel) physiHECWheel->add(xt); GeoSerialIdentifier *sIC = new GeoSerialIdentifier(0); - Genfun::Variable IndexC; + GeoGenfun::Variable IndexC; if (m_posZSide) { - Genfun::GENFUNCTION ModuleRotationAngleC = -m_modulePhistart+m_moduleDeltaPhi + m_moduleDeltaPhi*IndexC; + GeoGenfun::GENFUNCTION ModuleRotationAngleC = -m_modulePhistart+m_moduleDeltaPhi + m_moduleDeltaPhi*IndexC; GeoXF::TRANSFUNCTION tC = GeoXF::Pow(RotateZ3D(1.0),ModuleRotationAngleC); GeoSerialTransformer *sTC = new GeoSerialTransformer (clampingBar,&tC,((m_moduleNumber/2)-1)); physiHECWheel->add(sIC); @@ -396,7 +395,7 @@ void LArGeo::HECClampConstruction::AddClamps(GeoFullPhysVol* physiHECWheel) } else { - Genfun::GENFUNCTION ModuleRotationAngleC = -m_modulePhistart-m_moduleDeltaPhi+180*deg - m_moduleDeltaPhi*IndexC; + GeoGenfun::GENFUNCTION ModuleRotationAngleC = -m_modulePhistart-m_moduleDeltaPhi+180*deg - m_moduleDeltaPhi*IndexC; GeoXF::TRANSFUNCTION tC = GeoXF::Pow(RotateZ3D(1.0),ModuleRotationAngleC); GeoSerialTransformer *sTC = new GeoSerialTransformer (clampingBar,&tC,((m_moduleNumber/2)-1)); physiHECWheel->add(sIC); @@ -418,11 +417,11 @@ void LArGeo::HECClampConstruction::AddClamps(GeoFullPhysVol* physiHECWheel) physiHECWheel->add(xt); - Genfun::Variable IndexC2; + GeoGenfun::Variable IndexC2; if (m_posZSide) { - Genfun::GENFUNCTION ModuleRotationAngleC2 = -m_modulePhistart+m_moduleDeltaPhi-(180.*deg) + m_moduleDeltaPhi*IndexC2; + GeoGenfun::GENFUNCTION ModuleRotationAngleC2 = -m_modulePhistart+m_moduleDeltaPhi-(180.*deg) + m_moduleDeltaPhi*IndexC2; GeoXF::TRANSFUNCTION tC2 = GeoXF::Pow(RotateZ3D(1.0),ModuleRotationAngleC2); GeoSerialTransformer *sTC2 = new GeoSerialTransformer (clampingBar,&tC2,((m_moduleNumber/2)-1)); physiHECWheel->add(sTC2); @@ -430,7 +429,7 @@ void LArGeo::HECClampConstruction::AddClamps(GeoFullPhysVol* physiHECWheel) } else { - Genfun::GENFUNCTION ModuleRotationAngleC2 = -m_modulePhistart-m_moduleDeltaPhi - m_moduleDeltaPhi*IndexC2; + GeoGenfun::GENFUNCTION ModuleRotationAngleC2 = -m_modulePhistart-m_moduleDeltaPhi - m_moduleDeltaPhi*IndexC2; GeoXF::TRANSFUNCTION tC2 = GeoXF::Pow(RotateZ3D(1.0),ModuleRotationAngleC2); GeoSerialTransformer *sTC2 = new GeoSerialTransformer (clampingBar,&tC2,((m_moduleNumber/2)-1)); physiHECWheel->add(sTC2); diff --git a/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECModuleConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECModuleConstruction.cxx index d7164e3d4d0..00319637749 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECModuleConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECModuleConstruction.cxx @@ -22,10 +22,9 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoXF.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/Variable.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -42,12 +41,12 @@ #include <iostream> -using CLHEP::cm; -using CLHEP::mm; -using CLHEP::deg; -using HepGeom::Translate3D; -using HepGeom::TranslateY3D; -using HepGeom::TranslateZ3D; +using GeoModelKernelUnits::cm; +using GeoModelKernelUnits::mm; +using GeoModelKernelUnits::deg; +using GeoTrf::Translate3D; +using GeoTrf::TranslateY3D; +using GeoTrf::TranslateZ3D; //Constructor @@ -599,7 +598,7 @@ GeoFullPhysVol* LArGeo::HECModuleConstruction::GetEnvelope() } // Serially install all slices and _regular_ absorbers into the depths - Genfun::Variable Index; + GeoGenfun::Variable Index; GeoXF::TRANSFUNCTION TS = TranslateY3D(-larShift)*GeoXF::Pow(TranslateZ3D(1.0),slicePositionZ + (absThickness+gapSize)*Index); GeoXF::TRANSFUNCTION TA = diff --git a/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECWheelConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECWheelConstruction.cxx index 5f961a8126c..ee64b7541b0 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECWheelConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoHec/src/HECWheelConstruction.cxx @@ -32,10 +32,9 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoXF.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Vector/Rotation.h" -#include "CLHEP/Units/PhysicalConstants.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/Variable.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -54,10 +53,10 @@ #include <iostream> -using CLHEP::cm; -using CLHEP::mm; -using CLHEP::deg; -using HepGeom::RotateZ3D; +using GeoModelKernelUnits::cm; +using GeoModelKernelUnits::mm; +using GeoModelKernelUnits::deg; +using GeoTrf::RotateZ3D; //Constructor @@ -251,17 +250,17 @@ GeoFullPhysVol* LArGeo::HECWheelConstruction::GetEnvelope() // Modules are numbered mirror-symmetric in pos/neg z-side! GeoSerialIdentifier *sIF = new GeoSerialIdentifier(0); - Genfun::Variable Index; + GeoGenfun::Variable Index; if (m_posZSide) { - Genfun::GENFUNCTION ModuleRotationAngle = -modulePhistart + moduleDeltaPhi*Index; + GeoGenfun::GENFUNCTION ModuleRotationAngle = -modulePhistart + moduleDeltaPhi*Index; GeoXF::TRANSFUNCTION t = GeoXF::Pow(RotateZ3D(1.0),ModuleRotationAngle); GeoSerialTransformer *sTF = new GeoSerialTransformer (moduleEnvelope,&t,moduleNumber); physiHECWheel->add(sIF); physiHECWheel->add(sTF); } else { //For the neg z-side have to build everything in the opposite sense from pos-z wheel. - Genfun::GENFUNCTION ModuleRotationAngle1 = -modulePhistart+180*deg-moduleDeltaPhi - moduleDeltaPhi*Index; + GeoGenfun::GENFUNCTION ModuleRotationAngle1 = -modulePhistart+180*deg-moduleDeltaPhi - moduleDeltaPhi*Index; GeoXF::TRANSFUNCTION t1 = GeoXF::Pow(RotateZ3D(1.0),ModuleRotationAngle1); GeoSerialTransformer *sTF1 = new GeoSerialTransformer (moduleEnvelope,&t1,moduleNumber); physiHECWheel->add(sIF); diff --git a/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/CMakeLists.txt index 13ef3387f2a..81a472885ca 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/CMakeLists.txt @@ -10,21 +10,20 @@ atlas_depends_on_subdirs( PRIVATE Control/StoreGate Database/RDBAccessSvc DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArGeoMiniFcal src/*.cxx PUBLIC_HEADERS LArGeoMiniFcal - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${CLHEP_LIBRARIES} StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} GeoModelKernel GaudiKernel ) + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} GaudiKernel ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/LArGeoMiniFcal/MiniFcalConstruction.h b/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/LArGeoMiniFcal/MiniFcalConstruction.h index dededec39f8..4e9fcbaa9b0 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/LArGeoMiniFcal/MiniFcalConstruction.h +++ b/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/LArGeoMiniFcal/MiniFcalConstruction.h @@ -2,10 +2,10 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef __MiniFcalConstruction_H__ -#define __MiniFcalConstruction_H__ +#ifndef LARGEOMINIFCAL_MINIFCALCONSTRUCTION_H +#define LARGEOMINIFCAL_MINIFCALCONSTRUCTION_H -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/GeoDefinitions.h" class GeoFullPhysVol; namespace LArGeo { @@ -18,16 +18,16 @@ namespace LArGeo { ~MiniFcalConstruction(); GeoFullPhysVol* GetEnvelope(); - const HepGeom::Transform3D& GetTopTransform(); + const GeoTrf::Transform3D& GetTopTransform(); private: - GeoFullPhysVol* m_physiMiniFcal; - HepGeom::Transform3D m_transform; - bool m_posZSide; + GeoFullPhysVol* m_physiMiniFcal; + GeoTrf::Transform3D m_transform; + bool m_posZSide; }; } // namespace LArGeo -#endif // __MiniFcalConstruction_H__ +#endif diff --git a/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/src/MiniFcalConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/src/MiniFcalConstruction.cxx index 8b346065986..ce0332a805d 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/src/MiniFcalConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoMiniFcal/src/MiniFcalConstruction.cxx @@ -19,7 +19,8 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoIdentifierTag.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/Variable.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -39,8 +40,8 @@ typedef std::map<int,int> MapNumToIndex; LArGeo::MiniFcalConstruction::MiniFcalConstruction(bool posZSide) - : m_physiMiniFcal(0) - , m_transform() + : m_physiMiniFcal(nullptr) + , m_transform(GeoTrf::Transform3D::Identity()) , m_posZSide(posZSide) { } @@ -53,7 +54,7 @@ GeoFullPhysVol* LArGeo::MiniFcalConstruction::GetEnvelope() { // Get message service, GeoModelSvc and RDBAccessSvc ISvcLocator* svcLocator = Gaudi::svcLocator(); - IMessageSvc* msgSvc(0); + IMessageSvc* msgSvc{nullptr}; StatusCode sc = svcLocator->service("MessageSvc", msgSvc, true); if(sc!=StatusCode::SUCCESS) @@ -62,21 +63,21 @@ GeoFullPhysVol* LArGeo::MiniFcalConstruction::GetEnvelope() MsgStream log(msgSvc, "LArGeo::MiniFcalConstruction"); log << MSG::DEBUG << "In MiniFcalConstruction GetEnvelope" << endmsg; - IRDBAccessSvc* pAccessSvc(0); + IRDBAccessSvc* pAccessSvc{nullptr}; sc=svcLocator->service("RDBAccessSvc",pAccessSvc); if(sc != StatusCode::SUCCESS) { log << MSG::ERROR <<"Cannot locate RDBAccessSvc!!" << endmsg; return 0; } - IGeoModelSvc* geoModelSvc(0); + IGeoModelSvc* geoModelSvc{nullptr}; sc = svcLocator->service ("GeoModelSvc",geoModelSvc); if (sc != StatusCode::SUCCESS) { log << MSG::ERROR <<"Cannot locate GeoModelSvc!!" << endmsg; return 0; } - StoreGateSvc* detStore(0); + StoreGateSvc* detStore{nullptr}; sc = svcLocator->service("DetectorStore", detStore, false); if(sc!=StatusCode::SUCCESS) { log << MSG::ERROR <<"Error in MiniFcalConstruction, cannot access DetectorStore" << endmsg; @@ -126,9 +127,9 @@ GeoFullPhysVol* LArGeo::MiniFcalConstruction::GetEnvelope() //_________ Define geometry __________________________ //__Copper envelope - double halfLength = envParameters->getDouble("DZ")*CLHEP::mm; - double Router = envParameters->getDouble("RMAX")*CLHEP::mm; - double Rinner = envParameters->getDouble("RMIN")*CLHEP::mm; + double halfLength = envParameters->getDouble("DZ")*GeoModelKernelUnits::mm; + double Router = envParameters->getDouble("RMAX")*GeoModelKernelUnits::mm; + double Rinner = envParameters->getDouble("RMIN")*GeoModelKernelUnits::mm; // Buld a Cu block and place layers into that... GeoTubs *solidMiniFcal = new GeoTubs(Rinner, Router, halfLength, 0., 2.*M_PI); // Big outer radius @@ -164,15 +165,15 @@ GeoFullPhysVol* LArGeo::MiniFcalConstruction::GetEnvelope() for(unsigned i=0; i<recRings->size(); ++i) ringIndexes[(*recRings)[i]->getInt("RINGNUM")] = i; - double L1 = (*recCommon)[0]->getDouble("ABSORBERTHICKNESS")*CLHEP::mm; // Cu plates of fixed thickness - double LayerThick = (*recCommon)[0]->getDouble("LAYERTHICKNESS")*CLHEP::mm; // Layers between the Cu plates - double WaferThick = (*recCommon)[0]->getDouble("WAFERTHICKNESS")*CLHEP::mm; // Diamond wafers - thickness - double WaferSize = (*recCommon)[0]->getDouble("WAFERSIZEX")*CLHEP::mm; // Square Daimond wafers + double L1 = (*recCommon)[0]->getDouble("ABSORBERTHICKNESS")*GeoModelKernelUnits::mm; // Cu plates of fixed thickness + double LayerThick = (*recCommon)[0]->getDouble("LAYERTHICKNESS")*GeoModelKernelUnits::mm; // Layers between the Cu plates + double WaferThick = (*recCommon)[0]->getDouble("WAFERTHICKNESS")*GeoModelKernelUnits::mm; // Diamond wafers - thickness + double WaferSize = (*recCommon)[0]->getDouble("WAFERSIZEX")*GeoModelKernelUnits::mm; // Square Daimond wafers int NLayers = (*recCommon)[0]->getInt("NLAYERS"); // Have 11 gaps and 12 Cu plates - log << MSG::DEBUG << "=====> Build a Mini FCal of length " << 2.*halfLength << " CLHEP::mm and " - << NLayers << " layers of " << LayerThick << " CLHEP::mm thickness each; place them every " - << L1 << " CLHEP::mm " << endmsg; + log << MSG::DEBUG << "=====> Build a Mini FCal of length " << 2.*halfLength << " GeoModelKernelUnits::mm and " + << NLayers << " layers of " << LayerThick << " GeoModelKernelUnits::mm thickness each; place them every " + << L1 << " GeoModelKernelUnits::mm " << endmsg; // Make the Layers (all the same) - out of Feldspar (perhaps close to ceramics) std::string layerName = moduleName + "::Layer" ; @@ -181,7 +182,7 @@ GeoFullPhysVol* LArGeo::MiniFcalConstruction::GetEnvelope() //-- Construct wafers and arrange them in rings inside the ceramic layers. std::string waferName = moduleName + "::Wafer" ; - GeoBox* solidWafer = new GeoBox( (WaferSize/2.)*CLHEP::mm, (WaferSize/2.)*CLHEP::mm, (WaferThick/2.)*CLHEP::mm); + GeoBox* solidWafer = new GeoBox( (WaferSize/2.)*GeoModelKernelUnits::mm, (WaferSize/2.)*GeoModelKernelUnits::mm, (WaferThick/2.)*GeoModelKernelUnits::mm); GeoLogVol* logiWafer = new GeoLogVol(waferName,solidWafer,Diamond); GeoPhysVol* physiWafer = new GeoPhysVol(logiWafer); @@ -204,12 +205,12 @@ GeoFullPhysVol* LArGeo::MiniFcalConstruction::GetEnvelope() GeoPhysVol* physiLayer = new GeoPhysVol(logiLayer); // Construct layer contents - Genfun::Variable Index; + GeoGenfun::Variable Index; double rwafer(0.); int nwafers(0); double phishift = (*recLayers)[layerIndexes[j]]->getDouble("PHISHIFT"); - double rshift = (*recLayers)[layerIndexes[j]]->getDouble("RSHIFT")*CLHEP::mm; + double rshift = (*recLayers)[layerIndexes[j]]->getDouble("RSHIFT")*GeoModelKernelUnits::mm; for (unsigned int i=0; i<recRings->size(); i++){ // loop over the number of wafer rings if(ringIndexes.find(i)==ringIndexes.end()) { @@ -228,18 +229,18 @@ GeoFullPhysVol* LArGeo::MiniFcalConstruction::GetEnvelope() double wAngle = 2.*M_PI/nwafers; // for the negative z-side have to add pi to get things right: - Genfun::GENFUNCTION RotationAngle = activate*(M_PI) + phisense * (phishift + wAngle/2. + wAngle*Index) ; + GeoGenfun::GENFUNCTION RotationAngle = activate*(M_PI) + phisense * (phishift + wAngle/2. + wAngle*Index) ; GeoXF::TRANSFUNCTION t = - GeoXF::Pow(HepGeom::RotateZ3D(1.0),RotationAngle) * HepGeom::TranslateX3D(rshift+rwafer+5.*CLHEP::mm) * HepGeom::TranslateZ3D(-LayerThick/2.+ WaferThick/2.) ; + GeoXF::Pow(GeoTrf::RotateZ3D(1.0),RotationAngle) * GeoTrf::TranslateX3D(rshift+rwafer+5.*GeoModelKernelUnits::mm) * GeoTrf::TranslateZ3D(-LayerThick/2.+ WaferThick/2.) ; GeoSerialTransformer *sTF = new GeoSerialTransformer (physiWafer,&t,nwafers); physiLayer->add(sIF); physiLayer->add(sTF); } log << MSG::DEBUG << "- Working on layer " << j << " now. Place it at " - << ( -halfLength + L1 + double(j)*( L1 + LayerThick) + LayerThick/2. ) << " CLHEP::mm " << endmsg; + << ( -halfLength + L1 + double(j)*( L1 + LayerThick) + LayerThick/2. ) << " GeoModelKernelUnits::mm " << endmsg; m_physiMiniFcal->add(new GeoIdentifierTag(j)); - GeoTransform *xf = new GeoTransform(HepGeom::TranslateZ3D( -halfLength + L1 + double(j)*( L1 + LayerThick) + LayerThick/2. )); + GeoTransform *xf = new GeoTransform(GeoTrf::TranslateZ3D( -halfLength + L1 + double(j)*( L1 + LayerThick) + LayerThick/2. )); m_physiMiniFcal->add(xf); m_physiMiniFcal->add(physiLayer); } @@ -247,14 +248,14 @@ GeoFullPhysVol* LArGeo::MiniFcalConstruction::GetEnvelope() //________ Construct top transform object _____________ - m_transform = HepGeom::TranslateZ3D(envParameters->getDouble("ZPOS")*CLHEP::mm); + m_transform = GeoTrf::TranslateZ3D(envParameters->getDouble("ZPOS")*GeoModelKernelUnits::mm); // Layers should be fully equipeed now. Put them into MiniFcal return m_physiMiniFcal; } -const HepGeom::Transform3D& LArGeo::MiniFcalConstruction::GetTopTransform() +const GeoTrf::Transform3D& LArGeo::MiniFcalConstruction::GetTopTransform() { return m_transform; } diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/CMakeLists.txt index 5e5578b02c6..14045bc7846 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/CMakeLists.txt @@ -6,9 +6,7 @@ atlas_subdir( LArGeoTBBarrel ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel - PRIVATE +atlas_depends_on_subdirs( PRIVATE Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeoModel/GeoModelUtilities @@ -16,14 +14,14 @@ atlas_depends_on_subdirs( PUBLIC LArCalorimeter/LArGeoModel/LArGeoBarrel ) # External dependencies: -find_package( CLHEP ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArGeoTBBarrel src/*.cxx PUBLIC_HEADERS LArGeoTBBarrel - PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES GeoModelKernel StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel LArGeoBarrel ) + PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} StoreGateLib SGtests + PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoModelUtilities GaudiKernel LArGeoBarrel ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/src/TBBarrelCryostatConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/src/TBBarrelCryostatConstruction.cxx index 5a169e4ee32..38752f5b5b5 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/src/TBBarrelCryostatConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoTBBarrel/src/TBBarrelCryostatConstruction.cxx @@ -20,6 +20,8 @@ #include "GeoModelKernel/GeoPcon.h" #include "GeoModelKernel/GeoTubs.h" #include "GeoModelKernel/GeoTransform.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "StoreGate/StoreGateSvc.h" @@ -28,10 +30,6 @@ #include "GeoModelUtilities/StoredPhysVol.h" #include "GeoModelUtilities/StoredAlignX.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" #include <string> #include <cmath> @@ -126,14 +124,14 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() throw std::runtime_error("Error in TBBarrelCryostatConstruction, oxygen not found."); } - GeoMaterial *Vacuum = new GeoMaterial("Vacuum",CLHEP::universe_mean_density ); + GeoMaterial *Vacuum = new GeoMaterial("Vacuum",GeoModelKernelUnits::universe_mean_density ); Vacuum->add(Hydrogen,1.); Vacuum->lock(); // define material for FOAM (C5H8O2) // latest density value from P.Puzo (october 2003) // - double density = 0.058*CLHEP::g/CLHEP::cm3; + double density = 0.058*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3; GeoMaterial* Foam = new GeoMaterial("Foam", density); double fraction=8*1.01/(5*12.01+8*1.01+2.*16.0); Foam->add(Hydrogen,fraction); @@ -166,7 +164,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() std::cout << " Plane zp/ri/ro " << zp[i] << " " << ri[i] << " " << ro[i] << std::endl; } #endif - GeoPcon* Em_pcone = new GeoPcon(-25.*CLHEP::deg,50.*CLHEP::deg); + GeoPcon* Em_pcone = new GeoPcon(-25.*GeoModelKernelUnits::deg,50.*GeoModelKernelUnits::deg); for (int i=0; i < 3; i++) Em_pcone->addPlane(zp[i],ri[i],ro[i]); const GeoLogVol* cryoMotherLogical = @@ -177,20 +175,20 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() // Cryostat geometry - double Cryo_Distz = 483.5*CLHEP::cm; // total size in z - double Cryo_z0 = 103.0*CLHEP::cm; // eta=0 position wrt cryosta edge at z<0 + double Cryo_Distz = 483.5*GeoModelKernelUnits::cm; // total size in z + double Cryo_z0 = 103.0*GeoModelKernelUnits::cm; // eta=0 position wrt cryosta edge at z<0 - double DeltaR_cold = 4.1*CLHEP::cm; // thickness cold vessel before calo - double DeltaRout_cold = 5.0*CLHEP::cm; // thickness cold vessel after calo + double DeltaR_cold = 4.1*GeoModelKernelUnits::cm; // thickness cold vessel before calo + double DeltaRout_cold = 5.0*GeoModelKernelUnits::cm; // thickness cold vessel after calo - double DeltaR_warm= 3.86*CLHEP::cm; // thickness warm vessel before calo - double DeltaRout_warm = 4.0*CLHEP::cm; // thickness warm vessel after calo + double DeltaR_warm= 3.86*GeoModelKernelUnits::cm; // thickness warm vessel before calo + double DeltaRout_warm = 4.0*GeoModelKernelUnits::cm; // thickness warm vessel after calo - double DeltaRout_vac = 3.0*CLHEP::cm; // vacuum space cryo after calo + double DeltaRout_vac = 3.0*GeoModelKernelUnits::cm; // vacuum space cryo after calo - double Dz_end_warm = 7.0*CLHEP::cm; // thickness of end plate at high z - double Dz_end_vac = 8.0*CLHEP::cm; - double Dz_end_cold = 7.0*CLHEP::cm; + double Dz_end_warm = 7.0*GeoModelKernelUnits::cm; // thickness of end plate at high z + double Dz_end_vac = 8.0*GeoModelKernelUnits::cm; + double Dz_end_cold = 7.0*GeoModelKernelUnits::cm; double Dz_end_tot = Dz_end_warm + Dz_end_vac + Dz_end_cold; @@ -209,13 +207,13 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() double Rmin_mother = Cryo_Xcent-Cryo_Rmax_W; double Rmax_mother = 2270.; - double Phi_Min = -5.0 * CLHEP::deg; - double Phi_Span = 32.5 * CLHEP::deg; + double Phi_Min = -5.0 * GeoModelKernelUnits::deg; + double Phi_Span = 32.5 * GeoModelKernelUnits::deg; // GU 10/09/2004 // For cryostat mother volume, sligthly larger phi range // to avoid clash with front cryostat - double Phi_Min_Moth=-9.0*CLHEP::deg; - double Phi_Span_Moth=38.5*CLHEP::deg; + double Phi_Min_Moth=-9.0*GeoModelKernelUnits::deg; + double Phi_Span_Moth=38.5*GeoModelKernelUnits::deg; // ----------------------------------------------------------------- // Mother volume for Cryostat, filled with foam @@ -227,8 +225,8 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() std::cout << " (matter = foam) " << std::endl; std::cout << " Rmin/Rmax " << Rmin_mother << " " << Rmax_mother << std::endl; std::cout << " Dz/2 " << Cryo_Distz/2. << std::endl; - std::cout << " PhiMin, Span " << Phi_Min_Moth*(1./CLHEP::deg) << " " - << Phi_Span_Moth*(1./CLHEP::deg) << std::endl; + std::cout << " PhiMin, Span " << Phi_Min_Moth*(1./GeoModelKernelUnits::deg) << " " + << Phi_Span_Moth*(1./GeoModelKernelUnits::deg) << std::endl; #endif GeoTubs* Cent_tube = new GeoTubs(Rmin_mother, @@ -239,11 +237,11 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() GeoLogVol* Cent_log = new GeoLogVol(baseName+"Mother",Cent_tube,Foam); // position in Pcon mother envelope (which has Atlas reference frame) double zpos = Cryo_Distz/2.-Cryo_z0; - double phi = -1.*360.*CLHEP::deg/16/2.; // to have x axis in middle of volume + double phi = -1.*360.*GeoModelKernelUnits::deg/16/2.; // to have x axis in middle of volume GeoPhysVol* Cent_phys = new GeoPhysVol(Cent_log); - cryoMotherPhysical->add(new GeoTransform(HepGeom::RotateZ3D(phi))); - cryoMotherPhysical->add(new GeoTransform(HepGeom::TranslateZ3D(zpos))); + cryoMotherPhysical->add(new GeoTransform(GeoTrf::RotateZ3D(phi))); + cryoMotherPhysical->add(new GeoTransform(GeoTrf::TranslateZ3D(zpos))); cryoMotherPhysical->add(Cent_phys); // ---------------------------------------------------------------------- @@ -257,7 +255,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() std::cout << " " << std::endl; std::cout << " ** Cryostat before LAr (shape=Tubs)" << std::endl; std::cout << " center in x = " << Cryo_Xcent << std::endl; - std::cout << " angle 180-11 CLHEP::deg, span = 14 CLHEP::deg" << std::endl; + std::cout << " angle 180-11 GeoModelKernelUnits::deg, span = 14 GeoModelKernelUnits::deg" << std::endl; std::cout << " R warm vessel " << Cryo_Rmin_W << " " << Cryo_Rmax_W << std::endl; std::cout << " R vacuum " << Cryo_Rmax_C << " " @@ -272,15 +270,15 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() Cryo_Rmin_W, Cryo_Rmax_W, (Cryo_Distz-Dz_end_tot)/2., - (180.-11.)*CLHEP::deg, - 14.*CLHEP::deg); + (180.-11.)*GeoModelKernelUnits::deg, + 14.*GeoModelKernelUnits::deg); GeoLogVol* CryoW_log = new GeoLogVol(baseName+"WarmTube", CryoW_tube, Aluminium); GeoPhysVol* CryoW_phys = new GeoPhysVol(CryoW_log); - Cent_phys->add(new GeoTransform(HepGeom::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.))); + Cent_phys->add(new GeoTransform(GeoTrf::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.))); Cent_phys->add(CryoW_phys); // Waccum between warm and cold vessels @@ -289,15 +287,15 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() Cryo_Rmax_C, Cryo_Rmin_W, (Cryo_Distz-Dz_end_tot)/2., - (180.-11.)*CLHEP::deg, - 14.*CLHEP::deg); + (180.-11.)*GeoModelKernelUnits::deg, + 14.*GeoModelKernelUnits::deg); GeoLogVol *CryoV_log = new GeoLogVol(baseName+"VacTube", CryoV_tube, Vacuum); GeoPhysVol* CryoV_phys = new GeoPhysVol(CryoV_log); - Cent_phys->add(new GeoTransform(HepGeom::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.))); + Cent_phys->add(new GeoTransform(GeoTrf::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.))); Cent_phys->add(CryoV_phys); // Cold vessel @@ -306,15 +304,15 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() Cryo_Rmin_C, Cryo_Rmax_C, (Cryo_Distz-Dz_end_tot)/2., - (180.-11.)*CLHEP::deg, - 14.*CLHEP::deg); + (180.-11.)*GeoModelKernelUnits::deg, + 14.*GeoModelKernelUnits::deg); GeoLogVol *CryoC_log = new GeoLogVol(baseName+"ColdTube", CryoC_tube, Aluminium); GeoPhysVol* CryoC_phys = new GeoPhysVol(CryoC_log); - Cent_phys->add(new GeoTransform(HepGeom::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.))); + Cent_phys->add(new GeoTransform(GeoTrf::Translate3D(Cryo_Xcent, 0., -Dz_end_tot/2.))); Cent_phys->add(CryoC_phys); #endif @@ -326,7 +324,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() // cold vessel of the cryostat after calo //----------------------------------------------------------------------- - double LAr_inner_radius=141.00*CLHEP::cm; // min radius of PS + double LAr_inner_radius=141.00*GeoModelKernelUnits::cm; // min radius of PS double LAr_outer_radius=Rmax_mother-DeltaRout_warm-DeltaRout_cold -DeltaRout_vac; @@ -337,8 +335,8 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() std::cout << " *** LAr volume (tubs put in foam)" << std::endl; std::cout << "Rmin/Rmax " << LAr_inner_radius << " " << LAr_outer_radius << std::endl; - std::cout << "PhiMin,Span " << Phi_Min*(1./CLHEP::deg) << " " - << Phi_Span*(1./CLHEP::deg) << std::endl; + std::cout << "PhiMin,Span " << Phi_Min*(1./GeoModelKernelUnits::deg) << " " + << Phi_Span*(1./GeoModelKernelUnits::deg) << std::endl; std::cout << "DeltaZ/2 " << LAr_z_max/2. << std::endl; std::cout << "Position in z in mother " << (LAr_z_max-Cryo_Distz)/2. << std::endl; #endif @@ -355,7 +353,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() GeoPhysVol* moth_phys = new GeoPhysVol(moth_log); - Cent_phys->add(new GeoTransform(HepGeom::TranslateZ3D((LAr_z_max-Cryo_Distz)/2.))); + Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D((LAr_z_max-Cryo_Distz)/2.))); Cent_phys->add(moth_phys); // Adjust LAR volumes at the end of foam, such as to have @@ -371,27 +369,27 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() // 5.5mm at mid bottom and 0.5 mm at bottom // modified 17-Aug-05 -// the measured thickness are at 0, 22.5/4, 22.5/2, 3*22.5/4 and 22.5 CLHEP::deg +// the measured thickness are at 0, 22.5/4, 22.5/2, 3*22.5/4 and 22.5 GeoModelKernelUnits::deg // so define the regions in phi to be better centered on the measurements // and to cover: // - 0 to 22.5/8 deg = bottom thickness => need 9.5 - 9mm = 0.5mm Ar // - 22.5/8 to 3*22.5/8 deg = mid bottom => need 7.5-2mm = 5.5mm Ar -// - 3*22.5/8 to 5*22.5/8 CLHEP::deg = mid => need 14.5-9 = 5.5 CLHEP::mm Ar +// - 3*22.5/8 to 5*22.5/8 GeoModelKernelUnits::deg = mid => need 14.5-9 = 5.5 GeoModelKernelUnits::mm Ar // - 5*22.5/8 to 7*22.5/8 deg = mid top => need 12.5-2mm = 10.5mm Ar -// - 7*22.5/8 to 22.5/8 CLHEP::deg = top => need 18.5-9 = 9.5 CLHEP::mm Ar +// - 7*22.5/8 to 22.5/8 GeoModelKernelUnits::deg = top => need 18.5-9 = 9.5 GeoModelKernelUnits::mm Ar #ifdef BUILD_LARFOAM - double delta_LAr[5]={0.5*CLHEP::mm,5.5*CLHEP::mm,5.5*CLHEP::mm,10.5*CLHEP::mm,9.5*CLHEP::mm}; - double Phi1[5]={0.*CLHEP::deg,22.5/8.*CLHEP::deg,3.*22.5/8*CLHEP::deg,5.*22.5/8*CLHEP::deg,7.*22.5/8*CLHEP::deg}; - double Delta_phi[5]={22.5/8*CLHEP::deg, 2.*22.5/8.*CLHEP::deg,2.*22.5/8.*CLHEP::deg,2.*22.5/8.*CLHEP::deg,22.5/8.*CLHEP::deg}; + double delta_LAr[5]={0.5*GeoModelKernelUnits::mm,5.5*GeoModelKernelUnits::mm,5.5*GeoModelKernelUnits::mm,10.5*GeoModelKernelUnits::mm,9.5*GeoModelKernelUnits::mm}; + double Phi1[5]={0.*GeoModelKernelUnits::deg,22.5/8.*GeoModelKernelUnits::deg,3.*22.5/8*GeoModelKernelUnits::deg,5.*22.5/8*GeoModelKernelUnits::deg,7.*22.5/8*GeoModelKernelUnits::deg}; + double Delta_phi[5]={22.5/8*GeoModelKernelUnits::deg, 2.*22.5/8.*GeoModelKernelUnits::deg,2.*22.5/8.*GeoModelKernelUnits::deg,2.*22.5/8.*GeoModelKernelUnits::deg,22.5/8.*GeoModelKernelUnits::deg}; // GU 08-dec-2005 // additionnal LAr fudged before presampler to get better agreement // waiting for Rhoacell measurement to know if this is reasonnable or not // this should be now considered as a systematics // 25mm LAr ~ 0.18 X0 -// double fudge_lar_gap = 25.*CLHEP::mm; +// double fudge_lar_gap = 25.*GeoModelKernelUnits::mm; // GU 28--feb-2006 removed this fudge 25mm, not supported by measurements of Rohacell for (int ilar=0;ilar<5;ilar++) { @@ -400,7 +398,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() #ifdef DEBUG_GEO std::cout << " Ar additionnal volume before PS " << r1 << " " - << r2 << " " << Phi1[ilar]*(1./CLHEP::deg) << " " << Delta_phi[ilar]*(1./CLHEP::deg) << std::endl; + << r2 << " " << Phi1[ilar]*(1./GeoModelKernelUnits::deg) << " " << Delta_phi[ilar]*(1./GeoModelKernelUnits::deg) << std::endl; #endif GeoTubs* lar_tube = new GeoTubs(r1, @@ -412,7 +410,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() GeoLogVol* lar_log = new GeoLogVol(baseName+"LAr2",lar_tube,LAr); GeoPhysVol* lar_phys = new GeoPhysVol(lar_log); - Cent_phys->add(new GeoTransform(HepGeom::TranslateZ3D((LAr_z_max-Cryo_Distz)/2.))); + Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D((LAr_z_max-Cryo_Distz)/2.))); Cent_phys->add(lar_phys); } @@ -421,7 +419,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() // Outer support rings: 6 steel rings, starting just // after Barrel volume (G10 bars) (r=2003.6) // DZ=80mm for DR=12mm, then DZ=10mm for DR=757mm then DZ=80mm for DR=12mm -// at locations z=397,805,1255,1750,2316,2868 CLHEP::mm +// at locations z=397,805,1255,1750,2316,2868 GeoModelKernelUnits::mm #ifdef BUILD_SUPPORTRING double R_ring = 2003.6; @@ -478,11 +476,11 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() std::cout << " Position ring in LAr mother volume at z = " << Zcd << " (z atlas= " << zring[iring] << std::endl; #endif - moth_phys->add(new GeoTransform(HepGeom::TranslateZ3D(Zcd))); + moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd))); moth_phys->add(ring1_phys); - moth_phys->add(new GeoTransform(HepGeom::TranslateZ3D(Zcd))); + moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd))); moth_phys->add(ring2_phys); - moth_phys->add(new GeoTransform(HepGeom::TranslateZ3D(Zcd))); + moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd))); moth_phys->add(ring3_phys); } #endif @@ -510,7 +508,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() Phi_Span); GeoLogVol* CryoC2_log = new GeoLogVol(baseName+"ColdTube2",CryoC2_tube,Aluminium); GeoPhysVol* CryoC2_phys = new GeoPhysVol(CryoC2_log); - Cent_phys->add(new GeoTransform(HepGeom::TranslateZ3D(-Dz_end_tot/2.))); + Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(-Dz_end_tot/2.))); Cent_phys->add(CryoC2_phys); // vacuum between warn and cold vessel @@ -527,7 +525,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() Phi_Span); GeoLogVol* CryoV2_log = new GeoLogVol(baseName+"VacTube2",CryoV2_tube,Vacuum); GeoPhysVol* CryoV2_phys = new GeoPhysVol(CryoV2_log); - Cent_phys->add(new GeoTransform(HepGeom::TranslateZ3D(-Dz_end_tot/2.))); + Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(-Dz_end_tot/2.))); Cent_phys->add(CryoV2_phys); // warm vessel @@ -544,7 +542,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() Phi_Span); GeoLogVol* CryoW2_log = new GeoLogVol(baseName+"WarmTube2",CryoW2_tube,Aluminium); GeoPhysVol* CryoW2_phys = new GeoPhysVol(CryoW2_log); - Cent_phys->add(new GeoTransform(HepGeom::TranslateZ3D(-Dz_end_tot/2.))); + Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(-Dz_end_tot/2.))); Cent_phys->add(CryoW2_phys); #endif @@ -570,7 +568,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() #ifdef DEBUG_GEO std::cout << " position in mother at z " << zwarm << std::endl; #endif - Cent_phys->add(new GeoTransform(HepGeom::TranslateZ3D(zwarm))); + Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(zwarm))); Cent_phys->add(CryoEndW_phys); // vaccum part @@ -591,7 +589,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() #ifdef DEBUG_GEO std::cout << " position in mother at z " << zvac << std::endl; #endif - Cent_phys->add(new GeoTransform(HepGeom::TranslateZ3D(zvac))); + Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(zvac))); Cent_phys->add(CryoEndV_phys); // cold vessel @@ -612,7 +610,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() #ifdef DEBUG_GEO std::cout << " position in mother at z " << zcold << std::endl; #endif - Cent_phys->add(new GeoTransform(HepGeom::TranslateZ3D(zcold))); + Cent_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(zcold))); Cent_phys->add(CryoEndC_phys); #endif @@ -638,7 +636,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() #endif if (barrelEnvelope !=0) { - moth_phys->add(new GeoTransform(HepGeom::TranslateZ3D(Zcd))); + moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd))); moth_phys->add(barrelEnvelope); } #endif @@ -655,10 +653,10 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() // Zcd = 1582.5-LAr_z_max/2.+Cryo_z0; // new value of PS mother lenght -// Zcd = 1550.0*CLHEP::mm-LAr_z_max/2.+Cryo_z0; +// Zcd = 1550.0*GeoModelKernelUnits::mm-LAr_z_max/2.+Cryo_z0; // also the PS is shifted by 3mm to start at z=3mm in Atlas equivalent frame - double PresamplerMother_length=1549.*CLHEP::mm; - double presamplerShift = 3.*CLHEP::mm; + double PresamplerMother_length=1549.*GeoModelKernelUnits::mm; + double presamplerShift = 3.*GeoModelKernelUnits::mm; Zcd = presamplerShift+PresamplerMother_length-LAr_z_max/2.+Cryo_z0; #ifdef DEBUG_GEO @@ -667,7 +665,7 @@ GeoFullPhysVol* LArGeo::TBBarrelCryostatConstruction::GetEnvelope() #endif if (barrelPSEnvelope !=0) { - moth_phys->add(new GeoTransform(HepGeom::TranslateZ3D(Zcd))); + moth_phys->add(new GeoTransform(GeoTrf::TranslateZ3D(Zcd))); moth_phys->add(barrelPSEnvelope); StoredPhysVol *sPhysVol = new StoredPhysVol(barrelPSEnvelope); StatusCode status=detStore->record(sPhysVol,"PRESAMPLER_B_POS"); diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBEC/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoTBEC/CMakeLists.txt index 67d9e242c93..4be01f44827 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoTBEC/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoTBEC/CMakeLists.txt @@ -7,7 +7,6 @@ atlas_subdir( LArGeoTBEC ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities LArCalorimeter/LArGeoModel/LArReadoutGeometry PRIVATE @@ -23,20 +22,20 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArGeoTBECLib src/*.cxx PUBLIC_HEADERS LArGeoTBEC - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES GeoModelKernel GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} GeoModelUtilities LArReadoutGeometry StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoSpecialShapes GaudiKernel LArG4RunControl LArGeoCode LArGeoEndcap LArGeoRAL ) atlas_add_component( LArGeoTBEC src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} LINK_LIBRARIES LArGeoTBECLib ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/CryostatConstructionTBEC.cxx b/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/CryostatConstructionTBEC.cxx index c916c395c39..693d4358da9 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/CryostatConstructionTBEC.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/CryostatConstructionTBEC.cxx @@ -22,17 +22,14 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" - #include "StoreGate/StoreGateSvc.h" #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/Bootstrap.h" @@ -118,7 +115,7 @@ GeoVFullPhysVol* LArGeo::CryostatConstructionTBEC::GetEnvelope() // accordingly. std::string cryoMotherName = baseName + "::MotherVolume"; - GeoBox* cryoMotherShape = new GeoBox( 152.*CLHEP::cm, 195.*CLHEP::cm, 60.09*CLHEP::cm ); + GeoBox* cryoMotherShape = new GeoBox( 152.*GeoModelKernelUnits::cm, 195.*GeoModelKernelUnits::cm, 60.09*GeoModelKernelUnits::cm ); const GeoLogVol* cryoMotherLogical = new GeoLogVol( cryoMotherName, cryoMotherShape, Air ); //GeoFullPhysVol* m_cryoEnvelopePhysical = new GeoFullPhysVol( cryoMotherLogical ); m_cryoEnvelopePhysical = new GeoFullPhysVol( cryoMotherLogical ); @@ -126,126 +123,126 @@ GeoVFullPhysVol* LArGeo::CryostatConstructionTBEC::GetEnvelope() // Cryostat walls std::string ExtWallName = baseName + "::ExternalWarmWall"; - GeoBox* ExtWallShape = new GeoBox( 152.*CLHEP::cm, 195.*CLHEP::cm, 60.09*CLHEP::cm ); + GeoBox* ExtWallShape = new GeoBox( 152.*GeoModelKernelUnits::cm, 195.*GeoModelKernelUnits::cm, 60.09*GeoModelKernelUnits::cm ); const GeoLogVol* ExtWallLogical = new GeoLogVol( ExtWallName, ExtWallShape, Al ); GeoPhysVol* ExtWallPhysical = new GeoPhysVol( ExtWallLogical ); std::string WallName = baseName + "::WarmWallInterval"; - GeoBox* WallShape = new GeoBox( ( 152. - 0.8 )*CLHEP::cm, ( 195. - 0.8 )*CLHEP::cm, ( 60.09 - 0.8 )*CLHEP::cm ); + GeoBox* WallShape = new GeoBox( ( 152. - 0.8 )*GeoModelKernelUnits::cm, ( 195. - 0.8 )*GeoModelKernelUnits::cm, ( 60.09 - 0.8 )*GeoModelKernelUnits::cm ); const GeoLogVol* WallLogical = new GeoLogVol( WallName, WallShape, Vacuum ); GeoPhysVol* WallPhysical = new GeoPhysVol( WallLogical ); std::string IntWallName = baseName + "::InternalWarmWall"; - GeoBox* IntWallShape = new GeoBox( 148.4*CLHEP::cm, 191.6*CLHEP::cm, 46.8*CLHEP::cm ); + GeoBox* IntWallShape = new GeoBox( 148.4*GeoModelKernelUnits::cm, 191.6*GeoModelKernelUnits::cm, 46.8*GeoModelKernelUnits::cm ); const GeoLogVol* IntWallLogical = new GeoLogVol( IntWallName, IntWallShape, Al ); GeoPhysVol* IntWallPhysical = new GeoPhysVol( IntWallLogical ); std::string VacuumName = baseName + "::Vacuum"; - GeoBox* VacuumShape = new GeoBox( ( 148.4 - 0.8 )*CLHEP::cm, ( 191.6 - 0.8 )*CLHEP::cm, ( 46.8 - 0.8 )*CLHEP::cm ); + GeoBox* VacuumShape = new GeoBox( ( 148.4 - 0.8 )*GeoModelKernelUnits::cm, ( 191.6 - 0.8 )*GeoModelKernelUnits::cm, ( 46.8 - 0.8 )*GeoModelKernelUnits::cm ); const GeoLogVol* VacuumLogical = new GeoLogVol( VacuumName, VacuumShape, Vacuum ); GeoPhysVol* VacuumPhysical = new GeoPhysVol( VacuumLogical ); std::string ColdWallName = baseName + "::ColdWall"; - GeoBox* ColdWallShape = new GeoBox( 142.5*CLHEP::cm, 184.85*CLHEP::cm, 38.*CLHEP::cm ); + GeoBox* ColdWallShape = new GeoBox( 142.5*GeoModelKernelUnits::cm, 184.85*GeoModelKernelUnits::cm, 38.*GeoModelKernelUnits::cm ); const GeoLogVol* ColdWallLogical = new GeoLogVol( ColdWallName, ColdWallShape, Iron ); GeoPhysVol* ColdWallPhysical = new GeoPhysVol( ColdWallLogical ); std::string LArName = baseName + "::LiquidArgon"; - GeoBox* LArShape = new GeoBox( ( 142.5 - .5 )*CLHEP::cm, ( 184.85 - .5 )*CLHEP::cm, ( 38. - .5 )*CLHEP::cm ); + GeoBox* LArShape = new GeoBox( ( 142.5 - .5 )*GeoModelKernelUnits::cm, ( 184.85 - .5 )*GeoModelKernelUnits::cm, ( 38. - .5 )*GeoModelKernelUnits::cm ); const GeoLogVol* LArLogical = new GeoLogVol( LArName, LArShape, LAr ); // GeoPhysVol* m_LArPhysical = new GeoPhysVol( LArLogical ); m_LArPhysical = new GeoPhysVol( LArLogical ); ColdWallPhysical->add( new GeoIdentifierTag( 1 ) ); - ColdWallPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, 0.*CLHEP::cm ) ) ); + ColdWallPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm ) ) ); ColdWallPhysical->add( m_LArPhysical ); VacuumPhysical->add( new GeoIdentifierTag( 1 ) ); - VacuumPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, 0.*CLHEP::cm ) ) ); + VacuumPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm ) ) ); VacuumPhysical->add( ColdWallPhysical ); IntWallPhysical->add( new GeoIdentifierTag( 1 ) ); - IntWallPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, 0.*CLHEP::cm ) ) ); + IntWallPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm ) ) ); IntWallPhysical->add( VacuumPhysical ); WallPhysical->add( new GeoIdentifierTag( 1 ) ); - WallPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, 0.*CLHEP::cm ) ) ); + WallPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm ) ) ); WallPhysical->add( IntWallPhysical ); ExtWallPhysical->add( new GeoIdentifierTag( 1 ) ); - ExtWallPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, 0.*CLHEP::cm ) ) ); + ExtWallPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm ) ) ); ExtWallPhysical->add( WallPhysical ); m_cryoEnvelopePhysical->add( new GeoIdentifierTag( 1 ) ); - m_cryoEnvelopePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, 0.*CLHEP::cm ) ) ); + m_cryoEnvelopePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm ) ) ); m_cryoEnvelopePhysical->add( ExtWallPhysical ); // Pressure cone std::string PConeName = baseName + "::PressureCone::Mother"; - GeoTubs* PConeShape = new GeoTubs( 0.*CLHEP::cm, 6.5*CLHEP::cm, 4.*CLHEP::cm, 0.*CLHEP::deg, 360.*CLHEP::deg ); + GeoTubs* PConeShape = new GeoTubs( 0.*GeoModelKernelUnits::cm, 6.5*GeoModelKernelUnits::cm, 4.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg ); const GeoLogVol* PConeLogical = new GeoLogVol( PConeName, PConeShape, Vacuum ); GeoPhysVol* PConePhysical = new GeoPhysVol( PConeLogical ); std::string IntFlangeName = baseName + "::PressureCone::InternalFlange"; - GeoTubs* IntFlangeShape = new GeoTubs( 0.*CLHEP::cm, 4.9*CLHEP::cm, 0.4*CLHEP::cm, 0.*CLHEP::deg, 360.*CLHEP::deg ); + GeoTubs* IntFlangeShape = new GeoTubs( 0.*GeoModelKernelUnits::cm, 4.9*GeoModelKernelUnits::cm, 0.4*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg ); const GeoLogVol* IntFlangeLogical = new GeoLogVol( IntFlangeName, IntFlangeShape, Gten ); GeoPhysVol* IntFlangePhysical = new GeoPhysVol( IntFlangeLogical ); std::string ExtFlangeName = baseName + "::PressureCone::ExternalFlange"; - GeoTubs* ExtFlangeShape = new GeoTubs( 5.*CLHEP::cm, 6.5*CLHEP::cm, 0.4*CLHEP::cm, 0.*CLHEP::deg, 360.*CLHEP::deg ); + GeoTubs* ExtFlangeShape = new GeoTubs( 5.*GeoModelKernelUnits::cm, 6.5*GeoModelKernelUnits::cm, 0.4*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg ); const GeoLogVol* ExtFlangeLogical = new GeoLogVol( ExtFlangeName, ExtFlangeShape, Gten ); GeoPhysVol* ExtFlangePhysical = new GeoPhysVol( ExtFlangeLogical ); std::string ConeName = baseName + "::PressureCone::Cone"; - GeoCons* ConeShape = new GeoCons( 5.4*CLHEP::cm, 4.5*CLHEP::cm, 5.5*CLHEP::cm, 4.6*CLHEP::cm, 3.2*CLHEP::cm, 0.*CLHEP::deg, 360.*CLHEP::deg ); + GeoCons* ConeShape = new GeoCons( 5.4*GeoModelKernelUnits::cm, 4.5*GeoModelKernelUnits::cm, 5.5*GeoModelKernelUnits::cm, 4.6*GeoModelKernelUnits::cm, 3.2*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::deg, 360.*GeoModelKernelUnits::deg ); const GeoLogVol* ConeLogical = new GeoLogVol( ConeName, ConeShape, Gten ); GeoPhysVol* ConePhysical = new GeoPhysVol( ConeLogical ); PConePhysical->add( new GeoIdentifierTag( 1 ) ); - PConePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, 3.6*CLHEP::cm ) ) ); + PConePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 3.6*GeoModelKernelUnits::cm ) ) ); PConePhysical->add( IntFlangePhysical ); PConePhysical->add( new GeoIdentifierTag( 1 ) ); - PConePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, -3.6*CLHEP::cm ) ) ); + PConePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, -3.6*GeoModelKernelUnits::cm ) ) ); PConePhysical->add( ExtFlangePhysical ); PConePhysical->add( new GeoIdentifierTag( 1 ) ); - PConePhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, 0.*CLHEP::cm ) ) ); + PConePhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm ) ) ); PConePhysical->add( ConePhysical ); for ( int i = 0; i < 3; i++ ) for ( int j = 0; j < 13; j++ ) { - double x = 135.1*CLHEP::cm - 19.3*( j + 1 )*CLHEP::cm; - double y = 19.3*( i - 1 )*CLHEP::cm; + double x = 135.1*GeoModelKernelUnits::cm - 19.3*( j + 1 )*GeoModelKernelUnits::cm; + double y = 19.3*( i - 1 )*GeoModelKernelUnits::cm; VacuumPhysical->add( new GeoIdentifierTag( 1 + i*13 + j ) ); - VacuumPhysical->add( new GeoTransform( HepGeom::Translate3D( x, y, -42.*CLHEP::cm ) ) ); + VacuumPhysical->add( new GeoTransform( GeoTrf::Translate3D( x, y, -42.*GeoModelKernelUnits::cm ) ) ); VacuumPhysical->add( PConePhysical ); } // Zig-zag structure std::string ZigZagMotherName = baseName + "::ZigZag::Mother"; - GeoBox* ZigZagMotherShape = new GeoBox( 130.*CLHEP::cm, 15.*CLHEP::cm, 6.45*CLHEP::cm ); + GeoBox* ZigZagMotherShape = new GeoBox( 130.*GeoModelKernelUnits::cm, 15.*GeoModelKernelUnits::cm, 6.45*GeoModelKernelUnits::cm ); const GeoLogVol* ZigZagMotherLogical = new GeoLogVol( ZigZagMotherName, ZigZagMotherShape, Vacuum ); GeoPhysVol* ZigZagMotherPhysical = new GeoPhysVol( ZigZagMotherLogical ); std::string ZigZagStrAName = baseName + "::ZigZag::StrA"; - GeoBox* ZigZagStrAShape = new GeoBox( 2.45*CLHEP::cm, 5.*CLHEP::cm, .4*CLHEP::cm ); + GeoBox* ZigZagStrAShape = new GeoBox( 2.45*GeoModelKernelUnits::cm, 5.*GeoModelKernelUnits::cm, .4*GeoModelKernelUnits::cm ); const GeoLogVol* ZigZagStrALogical = new GeoLogVol( ZigZagStrAName, ZigZagStrAShape, Al ); GeoPhysVol* ZigZagStrAPhysical = new GeoPhysVol( ZigZagStrALogical ); std::string ZigZagStrBName = baseName + "::ZigZag::StrB"; - GeoBox* ZigZagStrBShape = new GeoBox( 8.53*CLHEP::cm, 5.*CLHEP::cm, .4*CLHEP::cm ); + GeoBox* ZigZagStrBShape = new GeoBox( 8.53*GeoModelKernelUnits::cm, 5.*GeoModelKernelUnits::cm, .4*GeoModelKernelUnits::cm ); const GeoLogVol* ZigZagStrBLogical = new GeoLogVol( ZigZagStrBName, ZigZagStrBShape, Al ); GeoPhysVol* ZigZagStrBPhysical = new GeoPhysVol( ZigZagStrBLogical ); std::string ZigZagStrCName = baseName + "::ZigZag::StrC"; - GeoTrd* ZigZagStrCShape = new GeoTrd( 1.03*CLHEP::cm, .453*CLHEP::cm, 5.*CLHEP::cm, 5.*CLHEP::cm, .283*CLHEP::cm ); + GeoTrd* ZigZagStrCShape = new GeoTrd( 1.03*GeoModelKernelUnits::cm, .453*GeoModelKernelUnits::cm, 5.*GeoModelKernelUnits::cm, 5.*GeoModelKernelUnits::cm, .283*GeoModelKernelUnits::cm ); const GeoLogVol* ZigZagStrCLogical = new GeoLogVol( ZigZagStrCName, ZigZagStrCShape, Al ); GeoPhysVol* ZigZagStrCPhysical = new GeoPhysVol( ZigZagStrCLogical ); std::string ZigZagStrDName = baseName + "::ZigZag::StrD"; - GeoTrd* ZigZagStrDShape = new GeoTrd( .005*CLHEP::cm, .31*CLHEP::cm, 5.*CLHEP::cm, 5.*CLHEP::cm, .365*CLHEP::cm ); + GeoTrd* ZigZagStrDShape = new GeoTrd( .005*GeoModelKernelUnits::cm, .31*GeoModelKernelUnits::cm, 5.*GeoModelKernelUnits::cm, 5.*GeoModelKernelUnits::cm, .365*GeoModelKernelUnits::cm ); const GeoLogVol* ZigZagStrDLogical = new GeoLogVol( ZigZagStrDName, ZigZagStrDShape, Al ); GeoPhysVol* ZigZagStrDPhysical = new GeoPhysVol( ZigZagStrDLogical ); @@ -253,33 +250,31 @@ GeoVFullPhysVol* LArGeo::CryostatConstructionTBEC::GetEnvelope() for ( int i = 0; i < 9; i++ ) { ZigZagMotherPhysical->add( new GeoIdentifierTag( StrAIdTag ) ); - ZigZagMotherPhysical->add( new GeoTransform( HepGeom::Translate3D( ( 124.4 - 31.1*i )*CLHEP::cm, 0.*CLHEP::cm, 6.05*CLHEP::cm ) ) ); + ZigZagMotherPhysical->add( new GeoTransform( GeoTrf::Translate3D( ( 124.4 - 31.1*i )*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 6.05*GeoModelKernelUnits::cm ) ) ); ZigZagMotherPhysical->add( ZigZagStrAPhysical ); StrAIdTag++; } for ( int j = 0; j < 2; j++ ) for ( int i = 0; i < 8; i++ ) { ZigZagMotherPhysical->add( new GeoIdentifierTag( StrAIdTag ) ); - ZigZagMotherPhysical->add( new GeoTransform( HepGeom::Translate3D( ( 108.85 - 31.1*i )*CLHEP::cm, ( 2*j - 1 )*10.*CLHEP::cm, 6.05*CLHEP::cm ) ) ); + ZigZagMotherPhysical->add( new GeoTransform( GeoTrf::Translate3D( ( 108.85 - 31.1*i )*GeoModelKernelUnits::cm, ( 2*j - 1 )*10.*GeoModelKernelUnits::cm, 6.05*GeoModelKernelUnits::cm ) ) ); ZigZagMotherPhysical->add( ZigZagStrAPhysical ); StrAIdTag++; } int StrBIdTag = 1; - const double xB1[ 2 ] = { ( -6.77 + 108.85 )*CLHEP::cm, ( 6.77 + 108.85 )*CLHEP::cm }; - const double xB2[ 2 ] = { ( -6.77 + 124.4 )*CLHEP::cm, ( 6.77 + 93.3 )*CLHEP::cm }; - const double alpha[ 2 ] = { 45.*CLHEP::deg, -45.*CLHEP::deg }; + const double xB1[ 2 ] = { ( -6.77 + 108.85 )*GeoModelKernelUnits::cm, ( 6.77 + 108.85 )*GeoModelKernelUnits::cm }; + const double xB2[ 2 ] = { ( -6.77 + 124.4 )*GeoModelKernelUnits::cm, ( 6.77 + 93.3 )*GeoModelKernelUnits::cm }; + const double alpha[ 2 ] = { 45.*GeoModelKernelUnits::deg, -45.*GeoModelKernelUnits::deg }; for ( int k = 0; k < 2; k++ ) for ( int i = 0; i < 8; i++ ) { ZigZagMotherPhysical->add( new GeoIdentifierTag( StrBIdTag ) ); - ZigZagMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( CLHEP::HepRotationY( alpha[ k ] ), - CLHEP::Hep3Vector( xB1[ k ] - 31.1*i*CLHEP::cm, 0.*CLHEP::cm, -.1*CLHEP::cm ) ) ) ); + ZigZagMotherPhysical->add( new GeoTransform( GeoTrf::Transform3D(GeoTrf::Translate3D( xB1[ k ] - 31.1*i*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, -.1*GeoModelKernelUnits::cm )*GeoTrf::RotateY3D( alpha[ k ] ) ) ) ); ZigZagMotherPhysical->add( ZigZagStrBPhysical ); StrBIdTag++; for ( int j = 0; j < 2; j++ ) { ZigZagMotherPhysical->add( new GeoIdentifierTag( StrBIdTag ) ); - ZigZagMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( CLHEP::HepRotationY( alpha[ k ] ), - CLHEP::Hep3Vector( xB2[ k ] - 31.1*i*CLHEP::cm, ( -10. + 20.*j )*CLHEP::cm, -.1*CLHEP::cm ) ) ) ); + ZigZagMotherPhysical->add( new GeoTransform( GeoTrf::Transform3D( GeoTrf::Translate3D( xB2[ k ] - 31.1*i*GeoModelKernelUnits::cm, ( -10. + 20.*j )*GeoModelKernelUnits::cm, -.1*GeoModelKernelUnits::cm ) *GeoTrf::RotateY3D( alpha[ k ] )) ) ); ZigZagMotherPhysical->add( ZigZagStrBPhysical ); StrBIdTag++; } @@ -290,41 +285,39 @@ GeoVFullPhysVol* LArGeo::CryostatConstructionTBEC::GetEnvelope() for ( int i = 0; i < 9; i++ ) { if ( i < 8 ) { ZigZagMotherPhysical->add( new GeoIdentifierTag( StrCIdTag ) ); - ZigZagMotherPhysical->add( new GeoTransform( HepGeom::Translate3D( ( 108.85 - 31.1*i )*CLHEP::cm, 0.*CLHEP::cm, -6.15*CLHEP::cm ) ) ); + ZigZagMotherPhysical->add( new GeoTransform( GeoTrf::Translate3D( ( 108.85 - 31.1*i )*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, -6.15*GeoModelKernelUnits::cm ) ) ); ZigZagMotherPhysical->add( ZigZagStrCPhysical ); StrCIdTag++; } for ( int j = 0; j < 2; j++ ) { ZigZagMotherPhysical->add( new GeoIdentifierTag( StrCIdTag ) ); - ZigZagMotherPhysical->add( new GeoTransform( HepGeom::Translate3D( ( 124.4 - 31.1*i )*CLHEP::cm, ( -10. + 20.*j )*CLHEP::cm, -6.15*CLHEP::cm ) ) ); + ZigZagMotherPhysical->add( new GeoTransform( GeoTrf::Translate3D( ( 124.4 - 31.1*i )*GeoModelKernelUnits::cm, ( -10. + 20.*j )*GeoModelKernelUnits::cm, -6.15*GeoModelKernelUnits::cm ) ) ); ZigZagMotherPhysical->add( ZigZagStrCPhysical ); StrCIdTag++; } } int StrDIdTag = 1; - const double xD1[ 2 ] = { ( -2.598 + 124.4 )*CLHEP::cm, ( 2.598 + 124.4 )*CLHEP::cm }; - const double xD2[ 2 ] = { ( -2.598 + 108.85 )*CLHEP::cm, ( 2.598 + 108.85 )*CLHEP::cm }; - const double beta[ 2 ] = { -22.5*CLHEP::deg, 22.5*CLHEP::deg }; + const double xD1[ 2 ] = { ( -2.598 + 124.4 )*GeoModelKernelUnits::cm, ( 2.598 + 124.4 )*GeoModelKernelUnits::cm }; + const double xD2[ 2 ] = { ( -2.598 + 108.85 )*GeoModelKernelUnits::cm, ( 2.598 + 108.85 )*GeoModelKernelUnits::cm }; + const double beta[ 2 ] = { -22.5*GeoModelKernelUnits::deg, 22.5*GeoModelKernelUnits::deg }; for ( int k = 0; k < 2; k++ ) for ( int i = 0; i < 9; i++ ) { ZigZagMotherPhysical->add( new GeoIdentifierTag( StrDIdTag ) ); - ZigZagMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( CLHEP::HepRotationY( beta[ k ] ), - CLHEP::Hep3Vector( xD1[ k ] - 31.1*i*CLHEP::cm, 0.*CLHEP::cm, 5.995*CLHEP::cm ) ) ) ); + ZigZagMotherPhysical->add( new GeoTransform( GeoTrf::Transform3D( GeoTrf::Translate3D( xD1[ k ] - 31.1*i*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, 5.995*GeoModelKernelUnits::cm ) *GeoTrf::RotateY3D( beta[ k ] )) ) ); ZigZagMotherPhysical->add( ZigZagStrDPhysical ); StrDIdTag++; if ( i < 8 ) for ( int j = 0; j < 2; j++ ) { ZigZagMotherPhysical->add( new GeoIdentifierTag( StrDIdTag ) ); - ZigZagMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( CLHEP::HepRotationY( beta[ k ] ), - CLHEP::Hep3Vector( xD2[ k ] - 31.1*i*CLHEP::cm, ( -10. +20.*j )*CLHEP::cm, 5.995*CLHEP::cm ) ) ) ); + ZigZagMotherPhysical->add( new GeoTransform( GeoTrf::Transform3D( GeoTrf::Translate3D( xD2[ k ] - 31.1*i*GeoModelKernelUnits::cm, ( -10. +20.*j )*GeoModelKernelUnits::cm, 5.995*GeoModelKernelUnits::cm ) *GeoTrf::RotateY3D( beta[ k ] )) ) ); ZigZagMotherPhysical->add( ZigZagStrDPhysical ); StrDIdTag++; } } WallPhysical->add( new GeoIdentifierTag( 1 ) ); - WallPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, -53.2*CLHEP::cm ) ) ); + WallPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, -53.2*GeoModelKernelUnits::cm ) ) ); WallPhysical->add( ZigZagMotherPhysical ); return m_cryoEnvelopePhysical; diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/EMECModuleConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/EMECModuleConstruction.cxx index 80c3992eb2a..8027190c6ed 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/EMECModuleConstruction.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/EMECModuleConstruction.cxx @@ -39,6 +39,8 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelUtilities/StoredPhysVol.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -48,11 +50,6 @@ #include "GaudiKernel/IService.h" #include "GaudiKernel/ISvcLocator.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" - #include <string> #include <cmath> #include <iostream> @@ -115,37 +112,37 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() //LAr - GeoMaterial* LAr = new GeoMaterial(name="LiquidArgon", density=1.396*CLHEP::g/CLHEP::cm3); + GeoMaterial* LAr = new GeoMaterial(name="LiquidArgon", density=1.396*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); LAr->add(Ar,1.); LAr->lock(); //Alu - GeoMaterial* Alu = new GeoMaterial(name="Alu", density=2.7*CLHEP::g/CLHEP::cm3); + GeoMaterial* Alu = new GeoMaterial(name="Alu", density=2.7*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Alu->add(Al,1.); Alu->lock(); //Iron - GeoMaterial* Iron = new GeoMaterial(name="Iron", density=7.87*CLHEP::g/CLHEP::cm3); + GeoMaterial* Iron = new GeoMaterial(name="Iron", density=7.87*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Iron->add(Fe,1.); Iron->lock(); //Copper - GeoMaterial* Copper = new GeoMaterial(name="Copper", density=8.96*CLHEP::g/CLHEP::cm3); + GeoMaterial* Copper = new GeoMaterial(name="Copper", density=8.96*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Copper->add(Cu,1.); Copper->lock(); //Lead - GeoMaterial* Lead = new GeoMaterial(name="Lead", density=11.35*CLHEP::g/CLHEP::cm3); + GeoMaterial* Lead = new GeoMaterial(name="Lead", density=11.35*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Lead->add(Pb,1.); Lead->lock(); // Air , at 20 deg C, 1 atm density=1.2931*mg/cm3 - GeoMaterial* Air=new GeoMaterial(name="Air", density=1.290*CLHEP::mg/CLHEP::cm3); + GeoMaterial* Air=new GeoMaterial(name="Air", density=1.290*GeoModelKernelUnits::mg/GeoModelKernelUnits::cm3); Air->add(N, .8); Air->add(O, .2); Air->lock(); @@ -153,7 +150,7 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() //Prepreg glue for absorbers, composition to be checked! //ref:STR.CAL.01.CRB.6,(23-Jan-2003,J.T.) - GeoMaterial* Glue=new GeoMaterial(name="Glue", density=1.8*CLHEP::g/CLHEP::cm3); + GeoMaterial* Glue=new GeoMaterial(name="Glue", density=1.8*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); aH=8.*H->getA(); aO=2.*O->getA(); aC=5.*C->getA(); @@ -172,7 +169,7 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() //PermaliE730 for Front middle ring, composition to be checked! // ref.: STR.CAL.01.CRB.6,(23-Jan-2003,J.T.) - GeoMaterial* PermaliE730=new GeoMaterial(name="PermaliE730",density=1.83*CLHEP::g/CLHEP::cm3); + GeoMaterial* PermaliE730=new GeoMaterial(name="PermaliE730",density=1.83*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); aH=8.*H->getA(); aO=2.*O->getA(); aC=5.*C->getA(); @@ -190,7 +187,7 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // Gten ( C8 H14 O4 ), alias glass epoxy for long.&transv.bars - GeoMaterial* Gten = new GeoMaterial(name="Gten", density=1.8*CLHEP::g/CLHEP::cm3); + GeoMaterial* Gten = new GeoMaterial(name="Gten", density=1.8*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); aH=14.*H->getA(); aO= 4.*O->getA(); aC= 8.*C->getA(); @@ -209,7 +206,7 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // Kapton 11-Jan-2002 ML from accbgeo.age: the Kapton_E density is 1.46g/cm3 // one assumes it is the same as for the Kapton_H -> C22 H10 O5 N2 - GeoMaterial* Kapton= new GeoMaterial(name="Kapton",density=1.46*CLHEP::g/CLHEP::cm3); + GeoMaterial* Kapton= new GeoMaterial(name="Kapton",density=1.46*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); aH=10.*H->getA(); aO= 5.*O->getA(); aC=22.*C->getA(); @@ -230,9 +227,9 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // THIN absorber: outer wheel // 11-Jan-2002 ML source: endegeo.age and Fig.7-3 of TDR - Tggl = 0.3*CLHEP::mm; - Tgfe = 0.4*CLHEP::mm; - Tgpb = 1.7*CLHEP::mm; + Tggl = 0.3*GeoModelKernelUnits::mm; + Tgfe = 0.4*GeoModelKernelUnits::mm; + Tgpb = 1.7*GeoModelKernelUnits::mm; Totalthick=Tggl+Tgfe+Tgpb; m1=Tggl*Glue->getDensity(); m2=Tgfe*Iron->getDensity(); @@ -253,9 +250,9 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // THICK absorber: inner wheel // 11-Jan-2002 ML source: endegeo.age and Fig.7-3 of TDR - Thgl = 0.3*CLHEP::mm; - Thfe = 0.4*CLHEP::mm; - Thpb = 2.2*CLHEP::mm; + Thgl = 0.3*GeoModelKernelUnits::mm; + Thfe = 0.4*GeoModelKernelUnits::mm; + Thpb = 2.2*GeoModelKernelUnits::mm; Totalthick=Thgl+Thfe+Thpb; m1=Thgl*Glue->getDensity(); m2=Thfe*Iron->getDensity(); @@ -276,8 +273,8 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // Electrode, as a mixture Kapton+Cu, 11-Jan-2002 ML - Thcu = 0.105*CLHEP::mm; - Thka = 0.170*CLHEP::mm; //together with glue J.T. + Thcu = 0.105*GeoModelKernelUnits::mm; + Thka = 0.170*GeoModelKernelUnits::mm; //together with glue J.T. Totalthicke = Thcu+Thka; m1=Thcu*Copper->getDensity(); m2=Thka*Kapton->getDensity(); @@ -306,7 +303,7 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() FracC =aC*inv_Atot; FracAr=aAr*inv_Atot; } - GeoMaterial* Elect_LAr= new GeoMaterial(name="Elnics",density=1.28*CLHEP::g/CLHEP::cm3); + GeoMaterial* Elect_LAr= new GeoMaterial(name="Elnics",density=1.28*GeoModelKernelUnits::g/GeoModelKernelUnits::cm3); Elect_LAr->add(H ,FracH); Elect_LAr->add(C ,FracC); Elect_LAr->add(Ar,FracAr); @@ -319,9 +316,9 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // G10FeInner for barrette in the inner wheel(J.T.08.01.2003) - Thfe =0.4*CLHEP::mm; - Thgl =0.3*CLHEP::mm; - Thpb =2.2*CLHEP::mm; + Thfe =0.4*GeoModelKernelUnits::mm; + Thgl =0.3*GeoModelKernelUnits::mm; + Thpb =2.2*GeoModelKernelUnits::mm; ThGten=Thpb; Totalthick =Thfe+Thgl+ThGten; //Totalthicki=Totalthick; @@ -346,9 +343,9 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // G10FeOuter for barrette in the outer wheel(J.T.08.01.2003) - Thfe =0.4*CLHEP::mm; - Thgl =0.3*CLHEP::mm; - Thpb =1.7*CLHEP::mm; + Thfe =0.4*GeoModelKernelUnits::mm; + Thgl =0.3*GeoModelKernelUnits::mm; + Thpb =1.7*GeoModelKernelUnits::mm; ThGten=Thpb; Totalthick =Thfe+Thgl+ThGten; //Totalthicko=Totalthick; @@ -384,13 +381,13 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // V.N: From LarWheelSolid, to get bounding polycone. Previoulsy G4 routine. No GeoModel equivalent so far ... // - double zWheelFrontFace = 3689.5*CLHEP::mm; + double zWheelFrontFace = 3689.5*GeoModelKernelUnits::mm; - double dWRPtoFrontFace = 11.*CLHEP::mm; + double dWRPtoFrontFace = 11.*GeoModelKernelUnits::mm; - double dMechFocaltoWRP = 3691. *CLHEP::mm; //=endg_z1*CLHEP::cm + double dMechFocaltoWRP = 3691. *GeoModelKernelUnits::mm; //=endg_z1*GeoModelKernelUnits::cm //"LArEMECNomLarOrig" - double rOuterCutoff = 2034. *CLHEP::mm; //=endg_rlimit*CLHEP::cm + double rOuterCutoff = 2034. *GeoModelKernelUnits::mm; //=endg_rlimit*GeoModelKernelUnits::cm //"LArEMECMaxRadiusActivePart //***************** @@ -402,32 +399,32 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() double Rin1, Rin2, Rout1, Rout2; if ( m_isInnerWheel ) { - Rin1 = 279.*CLHEP::mm; - Rin2 = 324.*CLHEP::mm; + Rin1 = 279.*GeoModelKernelUnits::mm; + Rin2 = 324.*GeoModelKernelUnits::mm; } else { - Rin1 = 590.*CLHEP::mm; - Rin2 = 678.*CLHEP::mm; + Rin1 = 590.*GeoModelKernelUnits::mm; + Rin2 = 678.*GeoModelKernelUnits::mm; } if ( m_isOuterWheel ) { - Rout1 = 2070.*CLHEP::mm; - Rout2 = 2070.*CLHEP::mm; + Rout1 = 2070.*GeoModelKernelUnits::mm; + Rout2 = 2070.*GeoModelKernelUnits::mm; } else { - Rout1 = 647.*CLHEP::mm; - Rout2 = 732.*CLHEP::mm; + Rout1 = 647.*GeoModelKernelUnits::mm; + Rout2 = 732.*GeoModelKernelUnits::mm; } // --> EndOfRadiiSelection <-- - double emecMotherZplan[] = { 3639.5*CLHEP::mm, 3639.5*CLHEP::mm + 630.*CLHEP::mm }; //cold (J.T) + double emecMotherZplan[] = { 3639.5*GeoModelKernelUnits::mm, 3639.5*GeoModelKernelUnits::mm + 630.*GeoModelKernelUnits::mm }; //cold (J.T) double emecMotherRin[] = { Rin1, Rin2 }; double emecMotherRout[] = { Rout1, Rout2 }; int lastPlaneEmec = ( sizeof( emecMotherZplan )/sizeof( double ) ); if ( m_isTB ) { for ( int i = 0; i < lastPlaneEmec; i++ ) emecMotherZplan[ i ] -= zWheelFrontFace; - zWheelFrontFace = 0.*CLHEP::mm; + zWheelFrontFace = 0.*GeoModelKernelUnits::mm; } double phiPosition = M_PI/2; @@ -452,8 +449,8 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() double tanThetaMid = 2. * exp(-eta_mid) / (1. - exp(2.*-eta_mid)); double tanThetaOuter = 2. * exp(-eta_low) / (1. - exp(2.*-eta_low)); - double zWheelThickness = 514.*CLHEP::mm; // endg_etot-2.*(endg_sabl*CLHEP::cm-2.*CLHEP::mm) - double gapBetweenWheels= 1.5*CLHEP::mm*2.; // "LArEMECHalfCrack"*2. + double zWheelThickness = 514.*GeoModelKernelUnits::mm; // endg_etot-2.*(endg_sabl*GeoModelKernelUnits::cm-2.*GeoModelKernelUnits::mm) + double gapBetweenWheels= 1.5*GeoModelKernelUnits::mm*2.; // "LArEMECHalfCrack"*2. //J.T************ // zWheelFrontFace for mechanical design @@ -559,7 +556,7 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() GeoLogVol* innerLogical = new GeoLogVol ( innerName, innerShape, LAr ); GeoFullPhysVol* innerPhysical = new GeoFullPhysVol( innerLogical ); emecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - emecMotherPhysical->add( new GeoTransform( HepGeom::TranslateZ3D( zWheelFrontFace ) ) ); + emecMotherPhysical->add( new GeoTransform( GeoTrf::TranslateZ3D( zWheelFrontFace ) ) ); emecMotherPhysical->add( innerPhysical ); // Place the custom accordion volumes in the liquid argon. @@ -578,10 +575,8 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() GeoFullPhysVol* innerAbsorberPhysical = new GeoFullPhysVol( innerAbsorberLogical ); GeoPhysVol* innerElectrodePhysical = new GeoPhysVol( innerElectrodeLogical ); innerPhysical->add( new GeoIdentifierTag( 1 ) ); - innerPhysical->add( new GeoTransform( HepGeom::Transform3D() ) ); innerPhysical->add( innerAbsorberPhysical ); innerPhysical->add( new GeoIdentifierTag( 1 ) ); - innerPhysical->add( new GeoTransform( HepGeom::Transform3D() ) ); innerPhysical->add( innerElectrodePhysical ); { StoredPhysVol *sPhysVol = new StoredPhysVol(innerPhysical); @@ -599,7 +594,7 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() GeoLogVol* outerLogical = new GeoLogVol ( outerName, outerShape, LAr ); GeoFullPhysVol* outerPhysical = new GeoFullPhysVol(outerLogical); emecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - emecMotherPhysical->add( new GeoTransform( HepGeom::TranslateZ3D( zWheelFrontFace ) ) ); + emecMotherPhysical->add( new GeoTransform( GeoTrf::TranslateZ3D( zWheelFrontFace ) ) ); emecMotherPhysical->add( outerPhysical ); // Place the custom accordion volumes in the liquid argon. @@ -618,10 +613,8 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() GeoPhysVol* outerAbsorberPhysical = new GeoPhysVol( outerAbsorberLogical ); GeoPhysVol* outerElectrodePhysical = new GeoPhysVol( outerElectrodeLogical ); outerPhysical->add( new GeoIdentifierTag( 1 ) ); - outerPhysical->add( new GeoTransform( HepGeom::Transform3D() ) ); outerPhysical->add( outerAbsorberPhysical); outerPhysical->add( new GeoIdentifierTag( 1 ) ); - outerPhysical->add( new GeoTransform( HepGeom::Transform3D() ) ); outerPhysical->add( outerElectrodePhysical ); { StoredPhysVol *sPhysVol = new StoredPhysVol(outerPhysical); @@ -661,47 +654,44 @@ GeoVFullPhysVol* LArGeo::EMECModuleConstruction::GetEnvelope() // V.N. --> Support selected - z0 = zWheelFrontFace - 61.*CLHEP::mm; + z0 = zWheelFrontFace - 61.*GeoModelKernelUnits::mm; EMECSupportConstruction *fsc = new EMECSupportConstruction( FrontIndx, true, "LAr::EMEC::", M_PI/2 ); GeoPhysVol* physicalFSM = fsc->GetEnvelope(); emecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - emecMotherPhysical->add( new GeoTransform( HepGeom::TranslateZ3D( z0 ) ) ); + emecMotherPhysical->add( new GeoTransform( GeoTrf::TranslateZ3D( z0 ) ) ); emecMotherPhysical->add( physicalFSM ); - z0 = zWheelFrontFace + 514.*CLHEP::mm + 55.*CLHEP::mm; + z0 = zWheelFrontFace + 514.*GeoModelKernelUnits::mm + 55.*GeoModelKernelUnits::mm; EMECSupportConstruction *bsc = new EMECSupportConstruction( BackIndx, true, "LAr::EMEC::", M_PI/2 ); GeoPhysVol *physicalBSM = bsc->GetEnvelope(); emecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - CLHEP::HepRotation rotBSM; - rotBSM.rotateX( -M_PI ); - rotBSM.rotateZ( 2*M_PI/2 ); // != EMECConstruction ??? - emecMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( rotBSM, - CLHEP::Hep3Vector( 0., 0., z0 ) ) ) ); + GeoTrf::Transform3D rotBSM(GeoTrf::RotateZ3D(2*M_PI/2)*GeoTrf::RotateX3D(-M_PI)); + emecMotherPhysical->add( new GeoTransform( GeoTrf::Transform3D(GeoTrf::Translate3D( 0., 0., z0 )*rotBSM ) ) ); emecMotherPhysical->add( physicalBSM ); if ( m_isOuterWheel ) { - z0 = zWheelFrontFace + 514.*CLHEP::mm/2; + z0 = zWheelFrontFace + 514.*GeoModelKernelUnits::mm/2; EMECSupportConstruction *osc = new EMECSupportConstruction( 2, true, "LAr::EMEC::", M_PI/2 ); GeoPhysVol *physicalOSM = osc->GetEnvelope(); emecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - emecMotherPhysical->add( new GeoTransform( HepGeom::TranslateZ3D( z0 ) ) ); + emecMotherPhysical->add( new GeoTransform( GeoTrf::TranslateZ3D( z0 ) ) ); emecMotherPhysical->add( physicalOSM ); } if ( m_isInnerWheel ) { - z0 = zWheelFrontFace + 514.*CLHEP::mm/2; + z0 = zWheelFrontFace + 514.*GeoModelKernelUnits::mm/2; EMECSupportConstruction *isc = new EMECSupportConstruction( 3, true, "LAr::EMEC::", M_PI/2 ); GeoPhysVol *physicalISM = isc->GetEnvelope(); emecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - emecMotherPhysical->add(new GeoTransform( HepGeom::TranslateZ3D( z0 ) ) ) ; + emecMotherPhysical->add(new GeoTransform( GeoTrf::TranslateZ3D( z0 ) ) ) ; emecMotherPhysical->add( physicalISM ); } - z0 = zWheelFrontFace + 514.*CLHEP::mm/2; + z0 = zWheelFrontFace + 514.*GeoModelKernelUnits::mm/2; EMECSupportConstruction *msc = new EMECSupportConstruction( 4, true, "LAr::EMEC::", M_PI/2 ); GeoPhysVol *physicalMSM = msc->GetEnvelope(); emecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - emecMotherPhysical->add(new GeoTransform( HepGeom::TranslateZ3D( z0 ) ) ) ; + emecMotherPhysical->add(new GeoTransform( GeoTrf::TranslateZ3D( z0 ) ) ) ; emecMotherPhysical->add( physicalMSM ); return emecMotherPhysical; diff --git a/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/LArDetectorConstructionTBEC.cxx b/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/LArDetectorConstructionTBEC.cxx index f455798a780..f0b5264d749 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/LArDetectorConstructionTBEC.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoTBEC/src/LArDetectorConstructionTBEC.cxx @@ -21,6 +21,8 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "StoreGate/StoreGateSvc.h" #include "GeoModelInterfaces/AbsMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" @@ -29,11 +31,6 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" -// For transforms: -#include "CLHEP/Geometry/Transform3D.h" -// For units: -#include "CLHEP/Units/PhysicalConstants.h" - // For the database: #include "RDBAccessSvc/IRDBAccessSvc.h" #include "RDBAccessSvc/IRDBRecord.h" @@ -113,20 +110,20 @@ StoreGate interface"); else if ( m_eta_cell > 43.5 ) m_eta_pos = 0.1*( m_eta_cell - 43.5 ) + 2.5; // Inner Wheel else m_eta_pos = 0.025*( m_eta_cell - 0.5 ) + 1.425; // Outer Wheel - if ( m_eta_cell <= 43.5 ) m_phi_pos = -( ( m_phi_cell - 16. )*1.40625 + 0.46875 )*CLHEP::deg; // Outer Wheel - else m_phi_pos = -( 4*( m_phi_cell - 4. )*1.40625 + 0.46875 )*CLHEP::deg; // Inner Wheel + if ( m_eta_cell <= 43.5 ) m_phi_pos = -( ( m_phi_cell - 16. )*1.40625 + 0.46875 )*GeoModelKernelUnits::deg; // Outer Wheel + else m_phi_pos = -( 4*( m_phi_cell - 4. )*1.40625 + 0.46875 )*GeoModelKernelUnits::deg; // Inner Wheel /* printf( "LArDetectorConstructionTBEC\teta_cell = %6.2lf ( eta = %6.2lf )\n", m_eta_cell, m_eta_pos ); - printf( "LArDetectorConstructionTBEC\tphi_cell = %6.2lf ( phi = %6.2lf CLHEP::deg )\n", m_phi_cell, -m_phi_pos/CLHEP::deg ); + printf( "LArDetectorConstructionTBEC\tphi_cell = %6.2lf ( phi = %6.2lf GeoModelKernelUnits::deg )\n", m_phi_cell, +m_phi_pos/GeoModelKernelUnits::deg ); */ /* - printf( "LArDetectorConstructionTBEC\tModuleRotation = %6.2lf CLHEP::deg\n", m_ModuleRotation/CLHEP::deg ); - printf( "LArDetectorConstructionTBEC\tYShift = %6.1lf CLHEP::mm\n", m_YShift/CLHEP::mm ); + printf( "LArDetectorConstructionTBEC\tModuleRotation = %6.2lf GeoModelKernelUnits::deg\n", m_ModuleRotation/GeoModelKernelUnits::deg ); + printf( "LArDetectorConstructionTBEC\tYShift = %6.1lf GeoModelKernelUnits::mm\n", m_YShift/GeoModelKernelUnits::mm ); */ } @@ -169,8 +166,8 @@ GeoVPhysVol* LArGeo::LArDetectorConstructionTBEC::GetEnvelope() // Default values.... m_hasLeadCompensator = false; m_hasPresampler = false; - m_ModuleRotation = 0.*CLHEP::deg; - m_YShift = 0.*CLHEP::mm; + m_ModuleRotation = 0.*GeoModelKernelUnits::deg; + m_YShift = 0.*GeoModelKernelUnits::mm; IRDBRecordset_ptr tbecGeometry = m_pAccessSvc->getRecordsetPtr("TBECGeometry",detectorKey, detectorNode); if ((*tbecGeometry).size()!=0) { @@ -195,7 +192,7 @@ GeoVPhysVol* LArGeo::LArDetectorConstructionTBEC::GetEnvelope() std::string baseName = "LAr::TBEC::MotherVolume"; - GeoBox* tbecMotherShape = new GeoBox( 5.*CLHEP::m, 5.*CLHEP::m, 15.*CLHEP::m ); + GeoBox* tbecMotherShape = new GeoBox( 5.*GeoModelKernelUnits::m, 5.*GeoModelKernelUnits::m, 15.*GeoModelKernelUnits::m ); const GeoLogVol* tbecMotherLogical = new GeoLogVol(baseName, tbecMotherShape, Air); @@ -262,25 +259,25 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() // accordingly. std::string tbecMotherName = baseName + "::MotherVolume"; - GeoBox* tbecMotherShape = new GeoBox( 5.*CLHEP::m, 5.*CLHEP::m, 15.*CLHEP::m ); + GeoBox* tbecMotherShape = new GeoBox( 5.*GeoModelKernelUnits::m, 5.*GeoModelKernelUnits::m, 15.*GeoModelKernelUnits::m ); const GeoLogVol* tbecMotherLogical = new GeoLogVol( tbecMotherName, tbecMotherShape, Air ); GeoFullPhysVol* tbecMotherPhysical = new GeoFullPhysVol( tbecMotherLogical ); - double xcent = -120.*CLHEP::cm, zcent = 395.7*CLHEP::cm; - double zfface = zcent - 60.09*CLHEP::cm; + double xcent = -120.*GeoModelKernelUnits::cm, zcent = 395.7*GeoModelKernelUnits::cm; + double zfface = zcent - 60.09*GeoModelKernelUnits::cm; log << MSG::DEBUG << "eta = " << m_eta_pos; if ( m_eta_pos > 5. ) m_eta_pos = 0.; else m_eta_pos = 2*atan( exp( -m_eta_pos ) ); - log << ", positioning cryostat with angle " << m_eta_pos*(1./CLHEP::deg) << " CLHEP::deg"; + log << ", positioning cryostat with angle " << m_eta_pos*(1./GeoModelKernelUnits::deg) << " GeoModelKernelUnits::deg"; log << endmsg; // Tubular axis, dummy if ( AXIS_ON ) { - double axisZHalfLength = 5*CLHEP::m; + double axisZHalfLength = 5*GeoModelKernelUnits::m; - GeoTube* axisShape = new GeoTube( 0.*CLHEP::cm, 1.*CLHEP::cm, axisZHalfLength ); + GeoTube* axisShape = new GeoTube( 0.*GeoModelKernelUnits::cm, 1.*GeoModelKernelUnits::cm, axisZHalfLength ); // x-axis std::string XAxisName = baseName + "::XAxis"; @@ -288,8 +285,7 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() GeoPhysVol* XAxisPhysVol = new GeoPhysVol( XAxisLogical ); tbecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - tbecMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( CLHEP::HepRotationY( 90.*CLHEP::deg ), - CLHEP::Hep3Vector( axisZHalfLength, 0.*CLHEP::m, 0.*CLHEP::m ) ) ) ); + tbecMotherPhysical->add( new GeoTransform( GeoTrf::Transform3D( GeoTrf::Translation3D( axisZHalfLength, 0.*GeoModelKernelUnits::m, 0.*GeoModelKernelUnits::m ) *GeoTrf::RotateY3D( 90.*GeoModelKernelUnits::deg )) ) ); tbecMotherPhysical->add( XAxisPhysVol ); // y-axis @@ -298,8 +294,7 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() GeoPhysVol* YAxisPhysVol = new GeoPhysVol( YAxisLogical ); tbecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - tbecMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( CLHEP::HepRotationX( -90.*CLHEP::deg ), - CLHEP::Hep3Vector( 0.*CLHEP::m, axisZHalfLength, 0.*CLHEP::m ) ) ) ); + tbecMotherPhysical->add( new GeoTransform( GeoTrf::Transform3D( GeoTrf::Translation3D( 0.*GeoModelKernelUnits::m, axisZHalfLength, 0.*GeoModelKernelUnits::m )*GeoTrf::RotateX3D( -90.*GeoModelKernelUnits::deg ) ) ) ); tbecMotherPhysical->add( YAxisPhysVol ); //z-axis @@ -308,7 +303,7 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() GeoPhysVol* ZAxisPhysVol = new GeoPhysVol( ZAxisLogical ); tbecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - tbecMotherPhysical->add( new GeoTransform( HepGeom::TranslateZ3D( axisZHalfLength ) ) ); + tbecMotherPhysical->add( new GeoTransform( GeoTrf::TranslateZ3D( axisZHalfLength ) ) ); tbecMotherPhysical->add( ZAxisPhysVol ); } @@ -316,13 +311,16 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() if ( m_hasLeadCompensator ) { std::string CompensatorName = baseName + "::LeadCompensator"; - GeoBox* CompensatorShape = new GeoBox( 152.*CLHEP::cm, 195.*CLHEP::cm, 0.56*CLHEP::cm ); + GeoBox* CompensatorShape = new GeoBox( 152.*GeoModelKernelUnits::cm, 195.*GeoModelKernelUnits::cm, 0.56*GeoModelKernelUnits::cm ); const GeoLogVol* CompensatorLogical = new GeoLogVol( CompensatorName, CompensatorShape, Lead ); GeoPhysVol* CompensatorPhysical = new GeoPhysVol( CompensatorLogical ); tbecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - tbecMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( CLHEP::HepRotationY( m_eta_pos ), - CLHEP::Hep3Vector( xcent, 0.*CLHEP::cm, 300.*CLHEP::cm ).rotateY( m_eta_pos ) ) ) ); + + GeoTrf::Vector3D tmpvec1(xcent, 0., 300.*GeoModelKernelUnits::cm); + GeoTrf::Vector3D tmpvec1Rotated = GeoTrf::RotateY3D(m_eta_pos)*tmpvec1; + GeoTrf::Translate3D tmpxf1(tmpvec1Rotated.x(),tmpvec1Rotated.y(),tmpvec1Rotated.z()); + tbecMotherPhysical->add(new GeoTransform( tmpxf1 * GeoTrf::RotateY3D(m_eta_pos))); tbecMotherPhysical->add( CompensatorPhysical ); } @@ -333,16 +331,18 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() GeoPhysVol* LArPhysical = cryoConstruction.GetLArPhysical(); tbecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - tbecMotherPhysical->add( new GeoTransform( HepGeom::Transform3D( CLHEP::HepRotationY( m_eta_pos ), - CLHEP::Hep3Vector( xcent, 0.*CLHEP::cm, zcent ).rotateY( m_eta_pos ) ) ) ); + GeoTrf::Vector3D tmpvec2(xcent, 0., zcent); + GeoTrf::Vector3D tmpvec2Rotated = GeoTrf::RotateY3D(m_eta_pos)*tmpvec2; + GeoTrf::Translate3D tmpxf2(tmpvec2Rotated.x(),tmpvec2Rotated.y(),tmpvec2Rotated.z()); + tbecMotherPhysical->add(new GeoTransform( tmpxf2 * GeoTrf::RotateY3D(m_eta_pos))); tbecMotherPhysical->add( cryoPhys ); // Beam chambers log << MSG::VERBOSE << "Creating beam chambers ..." << std::endl; - const double beamCZ[ 4 ] = { 17.9*CLHEP::m, 7.673*CLHEP::m, 1.352*CLHEP::m, .256*CLHEP::m }; - const double beamCSize = 11.*CLHEP::cm, beamCTh = 28*CLHEP::mm; // divided by 2, for half-length + const double beamCZ[ 4 ] = { 17.9*GeoModelKernelUnits::m, 7.673*GeoModelKernelUnits::m, 1.352*GeoModelKernelUnits::m, .256*GeoModelKernelUnits::m }; + const double beamCSize = 11.*GeoModelKernelUnits::cm, beamCTh = 28*GeoModelKernelUnits::mm; // divided by 2, for half-length GeoBox* BeamCShape = new GeoBox( beamCSize, beamCSize, beamCTh ); for ( int i = 0; i < 4; i++ ) { @@ -352,15 +352,15 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() GeoPhysVol* BeamCPhysical = new GeoPhysVol( BeamCLogical ); tbecMotherPhysical->add( new GeoIdentifierTag( 1 ) ); - tbecMotherPhysical->add( new GeoTransform( HepGeom::Translate3D( 0.*CLHEP::cm, 0.*CLHEP::cm, zfface - beamCZ[ i ] ) ) ); + tbecMotherPhysical->add( new GeoTransform( GeoTrf::Translate3D( 0.*GeoModelKernelUnits::cm, 0.*GeoModelKernelUnits::cm, zfface - beamCZ[ i ] ) ) ); tbecMotherPhysical->add( BeamCPhysical ); } // End cap module log << MSG::DEBUG << std::endl - << "Module deviation: " << m_ModuleRotation * (1./CLHEP::deg) << " CLHEP::deg" << std::endl - << "Phi position: " << m_phi_pos * (1./CLHEP::deg) << " CLHEP::deg" << std::endl - << "Y shift: " << m_YShift * (1./CLHEP::mm) << " CLHEP::mm" + << "Module deviation: " << m_ModuleRotation * (1./GeoModelKernelUnits::deg) << " GeoModelKernelUnits::deg" << std::endl + << "Phi position: " << m_phi_pos * (1./GeoModelKernelUnits::deg) << " GeoModelKernelUnits::deg" << std::endl + << "Y shift: " << m_YShift * (1./GeoModelKernelUnits::mm) << " GeoModelKernelUnits::mm" << endmsg; // z = 0 in emecMother is at active region's front face @@ -371,20 +371,17 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() StatusCode status=detStore->record(sPhysVol,"EMEC_POS"); if(!status.isSuccess()) throw std::runtime_error ("Cannot store EMEC_POS"); - - CLHEP::HepRotation Mrot; - Mrot.rotateY( m_ModuleRotation ); - Mrot.rotateZ( m_phi_pos + 90*CLHEP::deg ); - CLHEP::Hep3Vector pos( -xcent, m_YShift, -51.4/2*CLHEP::cm ); + GeoTrf::Transform3D Mrot(GeoTrf::RotateZ3D( m_phi_pos + 90*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(m_ModuleRotation)); + GeoTrf::Vector3D pos( -xcent, m_YShift, -51.4/2*GeoModelKernelUnits::cm ); if ( LArPhysical != 0 ) { LArPhysical->add( new GeoIdentifierTag( 1 ) ); - LArPhysical->add( new GeoTransform( HepGeom::Transform3D( Mrot, pos ) ) ); + LArPhysical->add( new GeoTransform( GeoTrf::Transform3D( GeoTrf::Translation3D(pos(0),pos(1),pos(2)))*Mrot ) ); LArPhysical->add( emecEnvelope ); } - pos-= CLHEP::Hep3Vector( 0.*CLHEP::mm, 0.*CLHEP::mm, 61.*CLHEP::mm +2.*CLHEP::mm +13.5*CLHEP::mm ); + pos-= GeoTrf::Vector3D( 0.*GeoModelKernelUnits::mm, 0.*GeoModelKernelUnits::mm, 61.*GeoModelKernelUnits::mm +2.*GeoModelKernelUnits::mm +13.5*GeoModelKernelUnits::mm ); if ( m_hasPresampler ) { @@ -398,7 +395,7 @@ GeoFullPhysVol* LArGeo::LArDetectorConstructionTBEC::createEnvelope() if ( LArPhysical != 0 ) { LArPhysical->add( new GeoIdentifierTag( 1 ) ); - LArPhysical->add( new GeoTransform( HepGeom::Transform3D( Mrot, pos ) ) ); + LArPhysical->add( new GeoTransform( GeoTrf::Transform3D( GeoTrf::Translation3D(pos(0),pos(1),pos(2)))*Mrot ) ); LArPhysical->add( PresamplerEnvelope ); } } diff --git a/LArCalorimeter/LArGeoModel/LArHV/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArHV/CMakeLists.txt index edbe76fe6d7..9253cd50cee 100644 --- a/LArCalorimeter/LArGeoModel/LArHV/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArHV/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Control/IOVSvc Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel PRIVATE Database/AthenaPOOL/AthenaPoolUtilities DetectorDescription/Identifier @@ -18,10 +17,14 @@ atlas_depends_on_subdirs( PUBLIC LArCalorimeter/LArCabling LArCalorimeter/LArIdentifier ) +# External dependencies: +find_package( GeoModel ) + # Component(s) in the package: atlas_add_library( LArHV src/*.cpp PUBLIC_HEADERS LArHV - LINK_LIBRARIES AthenaKernel GeoModelKernel IOVSvcLib StoreGateLib SGtests LArCablingLib + INCLUDE_DIRS ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AthenaKernel IOVSvcLib StoreGateLib SGtests LArCablingLib PRIVATE_LINK_LIBRARIES AthenaPoolUtilities Identifier GaudiKernel LArIdentifier ) diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt index c8973510949..e1965408a20 100644 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( LArReadoutGeometry ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoPrimitives DetectorDescription/Identifier LArCalorimeter/LArGeoModel/LArHV @@ -24,6 +23,7 @@ find_package( Boost COMPONENTS filesystem thread system ) find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( LArReadoutGeometry @@ -32,6 +32,6 @@ atlas_add_library( LArReadoutGeometry INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaKernel GeoModelKernel GeoPrimitives Identifier LArHV StoreGateLib SGtests + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoPrimitives Identifier LArHV StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel ) diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBAccordionDetails.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBAccordionDetails.h index 2d22c71dec5..dbf38f1934e 100644 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBAccordionDetails.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBAccordionDetails.h @@ -2,8 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMBAccordionDetails_h -#define EMBAccordionDetails_h +#ifndef LARREADOUTGEOMETRY_EMBACCORDIONDETAILS_H +#define LARREADOUTGEOMETRY_EMBACCORDIONDETAILS_H + class GeoStraightAccSection; class EMBAccordionDetails { diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBBasicReadoutNumbers.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBBasicReadoutNumbers.h index fa0ea1e7907..c99dc411027 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBBasicReadoutNumbers.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBBasicReadoutNumbers.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMBBasicReadoutNumbers_h -#define EMBBasicReadoutNumbers_h 1 +#ifndef LARREADOUTGEOMETRY_EMBBASICREADOUTNUMBERS_H +#define LARREADOUTGEOMETRY_EMBBASICREADOUTNUMBERS_H #include <vector> /** * @brief This is a collection of numbers used to create the cell diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBCell.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBCell.h index bffb44e0c51..d0c206b15a5 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBCell.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBCell.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMBCell_h -#define EMBCell_h 1 +#ifndef LARREADOUTGEOMETRY_EMBCELL_H +#define LARREADOUTGEOMETRY_EMBCELL_H #include "LArReadoutGeometry/EMBDetDescr.h" #include "LArReadoutGeometry/EMBHVPathologies.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBCellConstLink.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBCellConstLink.h index 30cc8560f96..3945cd2167b 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBCellConstLink.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBCellConstLink.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMBCellConstLink_h -#define EMBCellConstLink_h 1 +#ifndef LARREADOUTGEOMETRY_EMBCELLCONSTLINK_H +#define LARREADOUTGEOMETRY_EMBCELLCONSTLINK_H #include "GeoModelKernel/ConstLink.h" #include "LArReadoutGeometry/EMBCell.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetDescr.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetDescr.h index 3ab4e848410..24af8e170e6 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetDescr.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetDescr.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMBDetDescr_h -#define EMBDetDescr_h 1 +#ifndef LARREADOUTGEOMETRY_EMBDETDESCR_H +#define LARREADOUTGEOMETRY_EMBDETDESCR_H #include <vector> #include "GeoModelKernel/CellBinning.h" #include "GeoModelKernel/RCBase.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorManager.h index 24a63de1ff7..36d6281efbe 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorManager.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorManager.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMBDetectorManager_h -#define EMBDetectorManager_h 1 +#ifndef LARREADOUTGEOMETRY_EMBDETECTORMANAGER_H +#define LARREADOUTGEOMETRY_EMBDETECTORMANAGER_H #include "AthenaKernel/CLASS_DEF.h" #include <vector> #include "GeoModelKernel/GeoVDetectorManager.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorRegion.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorRegion.h index b937471a153..b21080241a3 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorRegion.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBDetectorRegion.h @@ -2,20 +2,20 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMBDetectorRegion_h -#define EMBDetectorRegion_h 1 +#ifndef LARREADOUTGEOMETRY_EMBDETECTORREGION_H +#define LARREADOUTGEOMETRY_EMBDETECTORREGION_H #include "LArReadoutGeometry/EMBCellConstLink.h" #include "LArReadoutGeometry/EMBDetDescr.h" #include "GeoModelKernel/GeoVDetectorElement.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoPrimitives/GeoPrimitives.h" -#include "GeoPrimitives/CLHEPtoEigenConverter.h" -/** +/** + * @class EMBDetectorRegion + * * @brief Description of a region of homogenous granularity in the * electromagnetic barrel calorimeter - */ - -/** + * * This class combines a description of the cell * granularity with a physical volume to create a * description of an EMB region positioned within ATLAS. @@ -92,12 +92,12 @@ class EMBDetectorRegion : public GeoVDetectorElement /** * @brief Returns the absolute transform of this element. */ - const HepGeom::Transform3D & getAbsoluteTransform () const; + const GeoTrf::Transform3D & getAbsoluteTransform () const; /** * @brief Returns the absolute transform of this element. */ - const HepGeom::Transform3D & getDefAbsoluteTransform () const; + const GeoTrf::Transform3D & getDefAbsoluteTransform () const; /** * @brief The endcap index. 0=negative, 1=positive. diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBHVPathologies.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBHVPathologies.h index a81deb08a18..bda7875fba2 100644 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBHVPathologies.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMBHVPathologies.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef _EMBHVPathologies_h_ -#define _EMBHVPathologies_h_ +#ifndef LARREADOUTGEOMETRY_EMBHVPATHOLOGIES_H +#define LARREADOUTGEOMETRY_EMBHVPATHOLOGIES_H #include "GeoModelKernel/RCBase.h" #include "GeoModelKernel/ConstLink.h" // -------------------------------------------------------- diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCell.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCell.h index d3a37620ee8..b6ff15020e8 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCell.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCell.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMECCell_h -#define EMECCell_h 1 +#ifndef LARREADOUTGEOMETRY_EMECCELL_H +#define LARREADOUTGEOMETRY_EMECCELL_H #include <iostream> #include "LArReadoutGeometry/EMECDetDescr.h" #include "LArReadoutGeometry/EMECDetectorManager.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCellConstLink.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCellConstLink.h index b9ea953e2cc..3b8865fc7c6 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCellConstLink.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCellConstLink.h @@ -2,57 +2,20 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version +#ifndef LARREADOUTGEOMETRY_EMECCELLCONSTLINK_H +#define LARREADOUTGEOMETRY_EMECCELLCONSTLINK_H -//## begin module%44662CA903B1.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%44662CA903B1.CLHEP::cm - -//## begin module%44662CA903B1.cp preserve=no -//## end module%44662CA903B1.cp - -//## Module: EMECCellConstLink%44662CA903B1; Pseudo Package specification -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECCellConstLink.h - -#ifndef EMECCellConstLink_h -#define EMECCellConstLink_h 1 - -//## begin module%44662CA903B1.additionalIncludes preserve=no -//## end module%44662CA903B1.additionalIncludes - -//## begin module%44662CA903B1.includes preserve=yes #include "LArReadoutGeometry/EMECCell.h" -//## end module%44662CA903B1.includes - -// ConstLink #include "GeoModelKernel/ConstLink.h" -//## begin module%44662CA903B1.additionalDeclarations preserve=yes -//## end module%44662CA903B1.additionalDeclarations - - -//## begin EMECCellConstLink%44662CA903B1.preface preserve=yes -//## end EMECCellConstLink%44662CA903B1.preface - -//## Class: EMECCellConstLink%44662CA903B1; Instantiated Class -// Smart Pointer to EMEC Cells. This reference counted -// link allocates on demand. It audits the total pointer -// count and collects the garbage when nobody's looking. -//## Category: LArReadoutGeometry%445002CB020C -//## Persistence: Transient -//## Cardinality/Multiplicity: n - - - -typedef ConstLink< EMECCell > EMECCellConstLink; - -//## begin EMECCellConstLink%44662CA903B1.postscript preserve=yes -//## end EMECCellConstLink%44662CA903B1.postscript -//## begin module%44662CA903B1.epilog preserve=yes -//## end module%44662CA903B1.epilog +/** + * @class EMECCellConstLink + * + * @brief Smart Pointer to EMEC Cells. This reference counted + * link allocates on demand. It audits the total pointer + * count and collects the garbage when nobody's looking. + */ +typedef ConstLink<EMECCell> EMECCellConstLink; #endif diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetDescr.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetDescr.h index e8eeb8ed29c..79b215df8f8 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetDescr.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetDescr.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMECDetDescr_h -#define EMECDetDescr_h 1 +#ifndef LARREADOUTGEOMETRY_EMECDETDESCR_H +#define LARREADOUTGEOMETRY_EMECDETDESCR_H #include "GeoModelKernel/CellBinning.h" #include <vector> #include "GeoModelKernel/RCBase.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorManager.h index b69b7c16459..1b3a1118a55 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorManager.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorManager.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMECDetectorManager_h -#define EMECDetectorManager_h 1 +#ifndef LARREADOUTGEOMETRY_EMECDETECTORMANAGER_H +#define LARREADOUTGEOMETRY_EMECDETECTORMANAGER_H #include "AthenaKernel/CLASS_DEF.h" #include "GeoModelKernel/GeoVDetectorManager.h" #include "LArHV/EMECHVManager.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorRegion.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorRegion.h index eedcfc70f59..36764678130 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorRegion.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/EMECDetectorRegion.h @@ -2,20 +2,22 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef EMECDetectorRegion_h -#define EMECDetectorRegion_h 1 +#ifndef LARREADOUTGEOMETRY_EMECDETECTORREGION_H +#define LARREADOUTGEOMETRY_EMECDETECTORREGION_H #include "LArReadoutGeometry/EMECCellConstLink.h" #include "LArReadoutGeometry/EMECDetDescr.h" #include "GeoModelKernel/GeoVDetectorElement.h" - +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoPrimitives/GeoPrimitives.h" -#include "GeoPrimitives/CLHEPtoEigenConverter.h" -/** - * @brief Description of a region of homogenous granularity in the - * electromagnetic endcap calorimeter - */ +#include "CLHEP/Geometry/Point3D.h" /** + * @class EMECDetectorRegion + * + * @brief Description of a region of homogenous granularity in the + * electromagnetic endcap calorimeter + * * This class combines a description of the cell * granularity with a physical volume to create a * description of an EMEC region positioned within ATLAS. @@ -23,7 +25,6 @@ */ - class EMECDetectorRegion : public GeoVDetectorElement { @@ -35,7 +36,10 @@ class EMECDetectorRegion : public GeoVDetectorElement /** * @brief Constructor. */ - EMECDetectorRegion (const GeoVFullPhysVol *physVol, const EMECDetDescr *emecDescriptor, DetectorSide endcap, double projectivityDisplacement = 4*CLHEP::cm); + EMECDetectorRegion(const GeoVFullPhysVol *physVol + , const EMECDetDescr *emecDescriptor + , DetectorSide endcap + , double projectivityDisplacement = 4*GeoModelKernelUnits::cm); /** * @brief Destructor @@ -90,12 +94,12 @@ class EMECDetectorRegion : public GeoVDetectorElement /** * @brief Returns the absolute transform of this element. */ - const HepGeom::Transform3D & getAbsoluteTransform () const; + const GeoTrf::Transform3D & getAbsoluteTransform () const; /** * @brief Returns the absolute transform of this element. */ - const HepGeom::Transform3D & getDefAbsoluteTransform () const; + const GeoTrf::Transform3D & getDefAbsoluteTransform () const; /** * @brief Returns the position of the center of the reference diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALDetectorManager.h index 70901e31b5f..e8002d41a3f 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALDetectorManager.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALDetectorManager.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#ifndef FCALDetectorManager_h -#define FCALDetectorManager_h 1 +#ifndef LARREADOUTGEOMETRY_FCALDETECTORMANAGER_H +#define LARREADOUTGEOMETRY_FCALDETECTORMANAGER_H #include "LArReadoutGeometry/FCAL_ChannelMap.h" #include "LArReadoutGeometry/FCALModule.h" #include "AthenaKernel/CLASS_DEF.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALModule.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALModule.h index 57c2be06ea0..b86a754eadb 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALModule.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALModule.h @@ -2,20 +2,24 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef FCALModule_h -#define FCALModule_h 1 +#ifndef LARREADOUTGEOMETRY_FCALMODULE_H +#define LARREADOUTGEOMETRY_FCALMODULE_H #include <vector> #include "Identifier/Identifier.h" #include "LArReadoutGeometry/FCALTile.h" #include "GeoModelKernel/GeoVDetectorElement.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoPrimitives/GeoPrimitives.h" + class FCALDetectorManager; /** + * @class FCALModule + * * @brief Description of an FCAL Module - */ - -/** This class combines a description of the cell + * + * This class combines a description of the cell * granularity with a physical volume to create a * description of an FCAL module positioned within ATLAS. * It provides access to the FCAL Tiles. @@ -38,7 +42,10 @@ class FCALModule : public GeoVDetectorElement /** * @brief Constructor */ - FCALModule (const GeoVFullPhysVol *physVol, Module module, Endcap endcap, double projectivityDisplacement = 4*CLHEP::cm); + FCALModule (const GeoVFullPhysVol *physVol + , Module module + , Endcap endcap + , double projectivityDisplacement = 4*GeoModelKernelUnits::cm); /** * @brief Desctructor @@ -93,12 +100,12 @@ class FCALModule : public GeoVDetectorElement /** * @brief Returns the absolute transform of this element. */ - const HepGeom::Transform3D & getAbsoluteTransform () const; + const GeoTrf::Transform3D & getAbsoluteTransform () const; /** * @brief Returns the absolute transform of this element. */ - const HepGeom::Transform3D & getDefAbsoluteTransform () const; + const GeoTrf::Transform3D & getDefAbsoluteTransform () const; /** * @brief Returns the absolute transform of this element. diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTile.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTile.h index eb9fb30a26c..23a227be49c 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTile.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTile.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef FCALTile_h -#define FCALTile_h 1 +#ifndef LARREADOUTGEOMETRY_FCALTILE_H +#define LARREADOUTGEOMETRY_FCALTILE_H #include "LArReadoutGeometry/FCAL_ChannelMap.h" #include "LArHV/FCALHVModule.h" #include "LArReadoutGeometry/FCALTubeConstLink.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTube.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTube.h index 40032f7600c..719f0cbdc3b 100644 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTube.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTube.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef _FCALTube_h_ -#define _FCALTube_h_ +#ifndef LARREADOUTGEOMETRY_FCALTUBE_H +#define LARREADOUTGEOMETRY_FCALTUBE_H #include "GeoModelKernel/RCBase.h" // diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTubeConstLink.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTubeConstLink.h index bfdb9042330..d5f74eb68a9 100644 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTubeConstLink.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCALTubeConstLink.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef _FCALTubeConstLink_h_ -#define _FCALTubeConstLink_h_ +#ifndef LARREADOUTGEOMETRY_FCALTUBECONSTLINK_H +#define LARREADOUTGEOMETRY_FCALTUBECONSTLINK_H #include "LArReadoutGeometry/FCALTube.h" #include "GeoModelKernel/ConstLink.h" typedef ConstLink<FCALTube> FCALTubeConstLink; diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h index 93b5a565431..5193bc525e4 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/FCAL_ChannelMap.h @@ -12,8 +12,8 @@ // Feb-2002 R.Sobie Use same FCAL geometry files as simulation // *************************************************************************** -#ifndef LARDETDESCR_FCAL_CHANNELMAP_H -#define LARDETDESCR_FCAL_CHANNELMAP_H +#ifndef LARREADOUTGEOMETRY_FCAL_CHANNELMAP_H +#define LARREADOUTGEOMETRY_FCAL_CHANNELMAP_H //<<<<<< INCLUDES >>>>>> diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCell.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCell.h index 2c84b67fcee..f5a02ad5e82 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCell.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCell.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef HECCell_h -#define HECCell_h 1 +#ifndef LARREADOUTGEOMETRY_HECCELL_H +#define LARREADOUTGEOMETRY_HECCELL_H #include "LArReadoutGeometry/HECDetDescr.h" #include "GeoModelKernel/CellBinning.h" #include "GeoModelKernel/RCBase.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCellConstLink.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCellConstLink.h index 251a60a1f37..ead96ae5a6f 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCellConstLink.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCellConstLink.h @@ -2,57 +2,20 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version +#ifndef LARREADOUTGEOMETRY_HECCELLCONSTLINK_H +#define LARREADOUTGEOMETRY_HECCELLCONSTLINK_H -//## begin module%445D13DC008E.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%445D13DC008E.CLHEP::cm - -//## begin module%445D13DC008E.cp preserve=no -//## end module%445D13DC008E.cp - -//## Module: HECCellConstLink%445D13DC008E; Pseudo Package specification -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECCellConstLink.h - -#ifndef HECCellConstLink_h -#define HECCellConstLink_h 1 - -//## begin module%445D13DC008E.additionalIncludes preserve=no -//## end module%445D13DC008E.additionalIncludes - -//## begin module%445D13DC008E.includes preserve=yes #include "LArReadoutGeometry/HECCell.h" -//## end module%445D13DC008E.includes - -// ConstLink #include "GeoModelKernel/ConstLink.h" -//## begin module%445D13DC008E.additionalDeclarations preserve=yes -//## end module%445D13DC008E.additionalDeclarations - - -//## begin HECCellConstLink%445D13DC008E.preface preserve=yes -//## end HECCellConstLink%445D13DC008E.preface - -//## Class: HECCellConstLink%445D13DC008E; Instantiated Class -// Smart Pointer to HEC Cells. This reference counted link -// allocates on demand. It audits the total pointer count -// and collects the garbage when nobody's looking. -//## Category: LArReadoutGeometry%445002CB020C -//## Persistence: Transient -//## Cardinality/Multiplicity: n - - - -typedef ConstLink< HECCell > HECCellConstLink; - -//## begin HECCellConstLink%445D13DC008E.postscript preserve=yes -//## end HECCellConstLink%445D13DC008E.postscript -//## begin module%445D13DC008E.epilog preserve=yes -//## end module%445D13DC008E.epilog +/** + * @Class: HECCellConstLink + * + * Smart Pointer to HEC Cells. This reference counted link + * allocates on demand. It audits the total pointer count + * and collects the garbage when nobody's looking. + */ +typedef ConstLink<HECCell> HECCellConstLink; #endif diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetDescr.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetDescr.h index 13f38ffae5a..2955c2fdc70 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetDescr.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetDescr.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef HECDetDescr_h -#define HECDetDescr_h 1 +#ifndef LARREADOUTGEOMETRY_HECDETDESCR_H +#define LARREADOUTGEOMETRY_HECDETDESCR_H #include "LArReadoutGeometry/HECDetectorManager.h" #include "GeoModelKernel/CellBinning.h" #include "GeoModelKernel/RCBase.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorManager.h index 364fc91e78b..62d552a2d42 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorManager.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorManager.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#ifndef HECDetectorManager_h -#define HECDetectorManager_h 1 +#ifndef LARREADOUTGEOMETRY_HECDETECTORMANAGER_H +#define LARREADOUTGEOMETRY_HECDETECTORMANAGER_H #include "AthenaKernel/CLASS_DEF.h" #include "LArReadoutGeometry/HECLongBlock.h" #include "GeoModelKernel/GeoVDetectorManager.h" diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorRegion.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorRegion.h index c50e9d30102..8be83da82bd 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorRegion.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECDetectorRegion.h @@ -2,20 +2,22 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef HECDetectorRegion_h -#define HECDetectorRegion_h 1 +#ifndef LARREADOUTGEOMETRY_HECDETECTORREGION_H +#define LARREADOUTGEOMETRY_HECDETECTORREGION_H #include "LArReadoutGeometry/HECDetDescr.h" #include "LArReadoutGeometry/HECCellConstLink.h" #include "GeoModelKernel/GeoVDetectorElement.h" - +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoPrimitives/GeoPrimitives.h" -#include "GeoPrimitives/CLHEPtoEigenConverter.h" -/** - * @brief Description of a region of homogenous granularity in the - * hadronic endcap calorimeter - */ +#include "CLHEP/Geometry/Point3D.h" /** + * @class HECDetectorRegion + * + * @brief Description of a region of homogenous granularity in the + * hadronic endcap calorimeter + * * This class combines a description of the cell * granularity with a physical volume to create a * description of a HEC region positioned within ATLAS. It @@ -37,7 +39,10 @@ class HECDetectorRegion : public GeoVDetectorElement /** * @brief Constructor. */ - HECDetectorRegion (const GeoVFullPhysVol *physVol, const HECDetDescr *hecDescriptor, DetectorSide endcap, double projectivityDisplacement = 4*CLHEP::cm); + HECDetectorRegion (const GeoVFullPhysVol *physVol + , const HECDetDescr *hecDescriptor + , DetectorSide endcap + , double projectivityDisplacement = 4*GeoModelKernelUnits::cm); /** * @brief Destructor @@ -87,12 +92,12 @@ class HECDetectorRegion : public GeoVDetectorElement /** * @brief Returns the absolute transform of this element. */ - const HepGeom::Transform3D & getAbsoluteTransform () const; + const GeoTrf::Transform3D & getAbsoluteTransform () const; /** * @brief Returns the absolute transform of this element. */ - const HepGeom::Transform3D & getDefAbsoluteTransform () const; + const GeoTrf::Transform3D & getDefAbsoluteTransform () const; /** * @brief Returns the absolute transform of this element. diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECLongBlock.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECLongBlock.h index 4d8a304463f..281f8cd0a4d 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECLongBlock.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECLongBlock.h @@ -2,16 +2,16 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef HECLongBlock_h -#define HECLongBlock_h 1 +#ifndef LARREADOUTGEOMETRY_HECLONGBLOCK_H +#define LARREADOUTGEOMETRY_HECLONGBLOCK_H #include <vector> #include "LArReadoutGeometry/HECRadialSegment.h" /** + * @class HECLongBlock + * * @brief Description of HEC Longitudinal Block. - */ - -/** + * * The HEC has longitudinal segments known as blocks. Each * block is sliced radially. For a good picture of this, * go here: @@ -43,7 +43,14 @@ class HECLongBlock /** * @brief Constructor. */ - HECLongBlock (unsigned int blockNum, double innerRad, double outerRad, double totalDepth, unsigned int nLarGaps, double frontPlateThick, double backPlateThick, const double etaRange[15]); + HECLongBlock (unsigned int blockNum + , double innerRad + , double outerRad + , double totalDepth + , unsigned int nLarGaps + , double frontPlateThick + , double backPlateThick + , const double etaRange[15]); /** * @brief Destructor diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECRadialSegment.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECRadialSegment.h index bc358b4bf33..2afb32d67cf 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECRadialSegment.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/HECRadialSegment.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -#ifndef HECRadialSegment_h -#define HECRadialSegment_h 1 +#ifndef LARREADOUTGEOMETRY_HECRADIALSEGMENT_H +#define LARREADOUTGEOMETRY_HECRADIALSEGMENT_H /** * @brief Description of a radial segment of a HEC module. diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/LArDetectorManager.h b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/LArDetectorManager.h index 49bf4d5411e..afb574c8f47 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/LArDetectorManager.h +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/LArReadoutGeometry/LArDetectorManager.h @@ -2,8 +2,8 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#ifndef LArDetectorManager_h -#define LArDetectorManager_h 1 +#ifndef LARREADOUTGEOMETRY_LARDETECTORMANAGER_H +#define LARREADOUTGEOMETRY_LARDETECTORMANAGER_H #include "AthenaKernel/CLASS_DEF.h" #include "GeoModelKernel/GeoVDetectorManager.h" class EMBDetectorManager; diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBAccordionDetails.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBAccordionDetails.cxx index 85098c19b38..fe74f2b8f29 100644 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBAccordionDetails.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBAccordionDetails.cxx @@ -11,7 +11,7 @@ #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include <cmath> class EMBAccordionDetails::Clockwork { @@ -187,7 +187,7 @@ void EMBAccordionDetails::Clockwork::getRPhi() // accordion geometry int EMBAccordionDetails::Clockwork::phiGap(double radius, double xhit, const double yhit) { - const double m2pi = 2.0*CLHEP::pi; + const double m2pi = 2.0*GeoModelKernelUnits::pi; double phi_0=phi0(radius)+gam0; // from -M_PI to M_PI double phi_hit=atan2(yhit,xhit); // from -M_PI to M_PI double dphi=phi_hit-phi_0; @@ -244,23 +244,23 @@ EMBAccordionDetails::EMBAccordionDetails():m_c(new Clockwork()) { // phi of first absorber m_c->gam0 = (*barrelGeometry)[0]->getDouble("PHIFIRST"); // radius of curvature of neutral fiber in the folds - m_c->rint_eleFib = (*barrelGeometry)[0]->getDouble("RINT")*CLHEP::cm; + m_c->rint_eleFib = (*barrelGeometry)[0]->getDouble("RINT")*GeoModelKernelUnits::cm; // r,phi positions of the centre of the folds (nominal geometry) for (int idat = 0; idat < m_c->Nbrt1 ; idat++) { - m_c->rc[idat] = (*barrelGeometry)[0]->getDouble("RHOCEN",idat)*CLHEP::cm; - m_c->phic[idat] = (*barrelGeometry)[0]->getDouble("PHICEN",idat)*CLHEP::deg; - m_c->delta[idat] = (*barrelGeometry)[0]->getDouble("DELTA",idat)*CLHEP::deg; + m_c->rc[idat] = (*barrelGeometry)[0]->getDouble("RHOCEN",idat)*GeoModelKernelUnits::cm; + m_c->phic[idat] = (*barrelGeometry)[0]->getDouble("PHICEN",idat)*GeoModelKernelUnits::deg; + m_c->delta[idat] = (*barrelGeometry)[0]->getDouble("DELTA",idat)*GeoModelKernelUnits::deg; m_c->xc[idat] = m_c->rc[idat]*cos(m_c->phic[idat]); m_c->yc[idat] = m_c->rc[idat]*sin(m_c->phic[idat]); } // - m_c->rMinAccordion = (*barrelGeometry)[0]->getDouble("RIN_AC")*CLHEP::cm; - m_c->rMaxAccordion = (*barrelGeometry)[0]->getDouble("ROUT_AC")*CLHEP::cm; + m_c->rMinAccordion = (*barrelGeometry)[0]->getDouble("RIN_AC")*GeoModelKernelUnits::cm; + m_c->rMaxAccordion = (*barrelGeometry)[0]->getDouble("ROUT_AC")*GeoModelKernelUnits::cm; m_c->etaMaxBarrel = (*barrelGeometry)[0]->getDouble("ETACUT"); - m_c->zMinBarrel = (*barrelLongDiv)[0]->getDouble("ZMAXACT")*CLHEP::cm; - m_c->zMaxBarrel = (*barrelLongDiv)[0]->getDouble("ZMINACT")*CLHEP::cm; + m_c->zMinBarrel = (*barrelLongDiv)[0]->getDouble("ZMAXACT")*GeoModelKernelUnits::cm; + m_c->zMaxBarrel = (*barrelLongDiv)[0]->getDouble("ZMINACT")*GeoModelKernelUnits::cm; // === GU 11/06/2003 total number of cells in phi // to distinguish 1 module (testbeam case) from full Atlas m_c->NCellTot = (*barrelGeometry)[0]->getInt("NCELMX"); diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBBasicReadoutNumbers.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBBasicReadoutNumbers.cxx index e9e195ba9db..74c7e745950 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBBasicReadoutNumbers.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBBasicReadoutNumbers.cxx @@ -13,7 +13,7 @@ #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include "LArReadoutGeometry/EMBBasicReadoutNumbers.h" EMBBasicReadoutNumbers::EMBBasicReadoutNumbers() @@ -56,12 +56,12 @@ EMBBasicReadoutNumbers::EMBBasicReadoutNumbers() - m_presamplerRadius = (*presamplerGeometry)[0]->getDouble("RACTIVE")*CLHEP::cm; - m_rInAc = (*barrelGeometry)[0]->getDouble("RIN_AC")*CLHEP::cm; - m_rOutAc = (*barrelGeometry)[0]->getDouble("ROUT_AC")*CLHEP::cm; + m_presamplerRadius = (*presamplerGeometry)[0]->getDouble("RACTIVE")*GeoModelKernelUnits::cm; + m_rInAc = (*barrelGeometry)[0]->getDouble("RIN_AC")*GeoModelKernelUnits::cm; + m_rOutAc = (*barrelGeometry)[0]->getDouble("ROUT_AC")*GeoModelKernelUnits::cm; for (int i=0;i<8;i++) m_EE.push_back((*barrelLongDiv)[0]->getDouble("EE",i)); - for (int i=0;i<8;i++) m_RMX12.push_back((*barrelLongDiv)[0]->getDouble("RMX12",i)*CLHEP::cm); - for (int i=0;i<53;i++) m_RMX23.push_back((*barrelLongDiv)[0]->getDouble("RMX23",i)*CLHEP::cm); + for (int i=0;i<8;i++) m_RMX12.push_back((*barrelLongDiv)[0]->getDouble("RMX12",i)*GeoModelKernelUnits::cm); + for (int i=0;i<53;i++) m_RMX23.push_back((*barrelLongDiv)[0]->getDouble("RMX23",i)*GeoModelKernelUnits::cm); for (int i=0;i<448;i++) m_EMBSamplingSepInnerRMax.push_back((*embSamplingSepInner)[0]->getDouble("RMAX",i)); // } diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBCellConstLink.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBCellConstLink.cxx index b3e0277b071..5c3703b20bb 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBCellConstLink.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBCellConstLink.cxx @@ -2,32 +2,4 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%4495834701D3.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%4495834701D3.CLHEP::cm - -//## begin module%4495834701D3.cp preserve=no -//## end module%4495834701D3.cp - -//## Module: EMBCellConstLink%4495834701D3; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBCellConstLink.cxx - -//## begin module%4495834701D3.additionalIncludes preserve=no -//## end module%4495834701D3.additionalIncludes - -//## begin module%4495834701D3.includes preserve=yes -//## end module%4495834701D3.includes - -// EMBCellConstLink #include "LArReadoutGeometry/EMBCellConstLink.h" -//## begin module%4495834701D3.additionalDeclarations preserve=yes -//## end module%4495834701D3.additionalDeclarations - - -//## begin module%4495834701D3.epilog preserve=yes -//## end module%4495834701D3.epilog diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorRegion.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorRegion.cxx index 461879f423b..1fd7744415b 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorRegion.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorRegion.cxx @@ -2,102 +2,51 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%44957D640109.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%44957D640109.CLHEP::cm - -//## begin module%44957D640109.cp preserve=no -//## end module%44957D640109.cp - -//## Module: EMBDetectorRegion%44957D640109; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBDetectorRegion.cxx - -//## begin module%44957D640109.additionalIncludes preserve=no -//## end module%44957D640109.additionalIncludes - -//## begin module%44957D640109.includes preserve=yes #include "GeoModelKernel/GeoVFullPhysVol.h" -//## end module%44957D640109.includes -// EMBDetectorRegion #include "LArReadoutGeometry/EMBDetectorRegion.h" -//## begin module%44957D640109.additionalDeclarations preserve=yes -//## end module%44957D640109.additionalDeclarations - #include "GeoPrimitives/GeoPrimitives.h" -// Class EMBDetectorRegion - -EMBDetectorRegion::EMBDetectorRegion (const GeoVFullPhysVol *physVol, const EMBDetDescr *embDescriptor, DetectorSide endcap) - //## begin EMBDetectorRegion::EMBDetectorRegion%4495802702A2.hasinit preserve=no - //## end EMBDetectorRegion::EMBDetectorRegion%4495802702A2.hasinit - //## begin EMBDetectorRegion::EMBDetectorRegion%4495802702A2.initialization preserve=yes - :GeoVDetectorElement(physVol),m_descriptor(embDescriptor),m_endcapIndex(endcap) - //## end EMBDetectorRegion::EMBDetectorRegion%4495802702A2.initialization +EMBDetectorRegion::EMBDetectorRegion (const GeoVFullPhysVol *physVol + , const EMBDetDescr *embDescriptor + , DetectorSide endcap) + : GeoVDetectorElement(physVol) + , m_descriptor(embDescriptor) + , m_endcapIndex(endcap) { - //## begin EMBDetectorRegion::EMBDetectorRegion%4495802702A2.body preserve=yes m_descriptor->ref(); - //## end EMBDetectorRegion::EMBDetectorRegion%4495802702A2.body } EMBDetectorRegion::~EMBDetectorRegion() { - //## begin EMBDetectorRegion::~EMBDetectorRegion%44957D640109_dest.body preserve=yes m_descriptor->unref(); - //## end EMBDetectorRegion::~EMBDetectorRegion%44957D640109_dest.body } - - -//## Other Operations (implementation) EMBCellConstLink EMBDetectorRegion::getEMBCell (unsigned int ieta, unsigned int iphi) const { - //## begin EMBDetectorRegion::getEMBCell%449580270257.body preserve=yes - return EMBCellConstLink(new EMBCell(m_endcapIndex,m_descriptor,ieta,iphi)); - //## end EMBDetectorRegion::getEMBCell%449580270257.body + return EMBCellConstLink(new EMBCell(m_endcapIndex,m_descriptor,ieta,iphi)); } const Amg::Transform3D EMBDetectorRegion::getAbsoluteTransformAmg () const { - //## begin EMBDetectorRegion::getAbsoluteTransform%449580270293.body preserve=yes const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); - return Amg::CLHEPTransformToEigen(fullPhysVol->getAbsoluteTransform()); - //## end EMBDetectorRegion::getAbsoluteTransform%449580270293.body + return fullPhysVol->getAbsoluteTransform(); } const Amg::Transform3D EMBDetectorRegion::getDefAbsoluteTransformAmg () const { - //## begin EMBDetectorRegion::getDefAbsoluteTransform%44958027029A.body preserve=yes const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); - return Amg::CLHEPTransformToEigen(fullPhysVol->getDefAbsoluteTransform()); - //## end EMBDetectorRegion::getDefAbsoluteTransform%44958027029A.body + return fullPhysVol->getDefAbsoluteTransform(); } -const HepGeom::Transform3D & EMBDetectorRegion::getAbsoluteTransform () const +const GeoTrf::Transform3D & EMBDetectorRegion::getAbsoluteTransform () const { - //## begin EMBDetectorRegion::getAbsoluteTransform%449580270293.body preserve=yes const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); return fullPhysVol->getAbsoluteTransform(); - //## end EMBDetectorRegion::getAbsoluteTransform%449580270293.body } -const HepGeom::Transform3D & EMBDetectorRegion::getDefAbsoluteTransform () const +const GeoTrf::Transform3D & EMBDetectorRegion::getDefAbsoluteTransform () const { - //## begin EMBDetectorRegion::getDefAbsoluteTransform%44958027029A.body preserve=yes const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); return fullPhysVol->getDefAbsoluteTransform(); - //## end EMBDetectorRegion::getDefAbsoluteTransform%44958027029A.body } - - -// Additional Declarations - //## begin EMBDetectorRegion%44957D640109.declarations preserve=yes - //## end EMBDetectorRegion%44957D640109.declarations - -//## begin module%44957D640109.epilog preserve=yes -//## end module%44957D640109.epilog diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetDescr.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetDescr.cxx index 2b7055ceaed..8ed210b57c1 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetDescr.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetDescr.cxx @@ -2,31 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%446626F5033F.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%446626F5033F.CLHEP::cm - -//## begin module%446626F5033F.cp preserve=no -//## end module%446626F5033F.cp - -//## Module: EMECDetDescr%446626F5033F; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetDescr.cxx - -//## begin module%446626F5033F.additionalIncludes preserve=no -//## end module%446626F5033F.additionalIncludes - -//## begin module%446626F5033F.includes preserve=yes #include "LArReadoutGeometry/EMECDetectorManager.h" -//## end module%446626F5033F.includes - -// EMECDetDescr #include "LArReadoutGeometry/EMECDetDescr.h" -//## begin module%446626F5033F.additionalDeclarations preserve=yes + /** * @brief An internal class which is none of your business **/ @@ -44,24 +22,20 @@ struct Boundary { {{{1.500, 2.500, 20},{0.000, 0.000, 0},{0.000, 0.000, 0},{0.000, 0.000, 0},{0.000, 0.000, 0},{0.000, 0.000, 0}}, // sample 3 outer {{0.000, 0.000, 0},{0.000, 0.000, 0},{0.000, 0.000, 0},{0.000, 0.000, 0},{0.000, 0.000, 0},{0.000, 0.000, 0}}}}; // sample 3 inner -//## end module%446626F5033F.additionalDeclarations - - -// Class EMECDetDescr - -EMECDetDescr::EMECDetDescr (const EMECDetectorManager *detManager, unsigned int sampling, unsigned int region, unsigned int radialPart, const CellBinning &phiBinning) - //## begin EMECDetDescr::EMECDetDescr%446A2DDF00D2.hasinit preserve=no - //## end EMECDetDescr::EMECDetDescr%446A2DDF00D2.hasinit - //## begin EMECDetDescr::EMECDetDescr%446A2DDF00D2.initialization preserve=yes - :m_manager(detManager),m_samplingIndex(sampling),m_regionIndex(region),m_radialIndex(radialPart),m_phiBinning(phiBinning),m_etaBinning(etaBoundariesEndcap[sampling][radialPart][region].min, - etaBoundariesEndcap[sampling][radialPart][region].max, - etaBoundariesEndcap[sampling][radialPart][region].nDiv) - //## end EMECDetDescr::EMECDetDescr%446A2DDF00D2.initialization +EMECDetDescr::EMECDetDescr (const EMECDetectorManager *detManager + , unsigned int sampling + , unsigned int region + , unsigned int radialPart + , const CellBinning &phiBinning) + : m_manager(detManager) + , m_samplingIndex(sampling) + , m_regionIndex(region) + , m_radialIndex(radialPart) + , m_phiBinning(phiBinning) + , m_etaBinning(etaBoundariesEndcap[sampling][radialPart][region].min + ,etaBoundariesEndcap[sampling][radialPart][region].max + ,etaBoundariesEndcap[sampling][radialPart][region].nDiv) { - //## begin EMECDetDescr::EMECDetDescr%446A2DDF00D2.body preserve=yes - - - // This contains some logic for decoding the sampling separation arrays: if (sampling==0) { m_halfLength.push_back(m_manager->getPresamplerFullLength()/2.0); @@ -129,20 +103,9 @@ EMECDetDescr::EMECDetDescr (const EMECDetectorManager *detManager, unsigned int m_offset.push_back((front+back)/2.); m_halfLength.push_back((back-front)/2.); } - //## end EMECDetDescr::EMECDetDescr%446A2DDF00D2.body } EMECDetDescr::~EMECDetDescr() { - //## begin EMECDetDescr::~EMECDetDescr%446626F5033F_dest.body preserve=yes - //## end EMECDetDescr::~EMECDetDescr%446626F5033F_dest.body } - - -// Additional Declarations - //## begin EMECDetDescr%446626F5033F.declarations preserve=yes - //## end EMECDetDescr%446626F5033F.declarations - -//## begin module%446626F5033F.epilog preserve=yes -//## end module%446626F5033F.epilog diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorManager.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorManager.cxx index eb4f5668fec..a1e3a425bbf 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorManager.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorManager.cxx @@ -12,6 +12,7 @@ #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" +#include "GeoModelKernel/Units.h" #include "LArReadoutGeometry/EMECDetectorManager.h" #include "LArReadoutGeometry/EMECDetectorRegion.h" @@ -55,20 +56,20 @@ EMECDetectorManager::EMECDetectorManager() if (emecSamplingSep->size()==0) throw std::runtime_error("Error getting EmecSamplingSep table"); const IRDBRecord *ess = (*emecSamplingSep)[0]; - for (int j=0;j<7;j++) m_ziw.push_back(ess->getDouble("ZIW",j)*CLHEP::cm); - for (int j=0;j<44;j++) m_zsep12.push_back(ess->getDouble("ZSEP12",j)*CLHEP::cm); - for (int j=0;j<22;j++) m_zsep23.push_back(ess->getDouble("ZSEP23",j)*CLHEP::cm); + for (int j=0;j<7;j++) m_ziw.push_back(ess->getDouble("ZIW",j)*GeoModelKernelUnits::cm); + for (int j=0;j<44;j++) m_zsep12.push_back(ess->getDouble("ZSEP12",j)*GeoModelKernelUnits::cm); + for (int j=0;j<22;j++) m_zsep23.push_back(ess->getDouble("ZSEP23",j)*GeoModelKernelUnits::cm); IRDBRecordset_ptr emecMagicNumbers = rdbAccess->getRecordsetPtr("EmecMagicNumbers", larVersionKey.tag(),larVersionKey.node()); if (emecMagicNumbers->size()==0) { emecMagicNumbers = rdbAccess->getRecordsetPtr("EmecMagicNumbers", "EmecMagicNumbers-00"); if (emecMagicNumbers->size()==0) throw std::runtime_error("Error getting EmecMagicNumbers table"); } - m_MagicNumbers->focalToRef =(*emecMagicNumbers)[0]->getDouble("FOCALTOREF")*CLHEP::mm; - m_MagicNumbers->refToActive =(*emecMagicNumbers)[0]->getDouble("REFTOACTIVE")*CLHEP::mm; - m_MagicNumbers->activeLength =(*emecMagicNumbers)[0]->getDouble("ACTIVELENGTH")*CLHEP::mm; - m_MagicNumbers->refToPresampler =(*emecMagicNumbers)[0]->getDouble("REFTOPRESAMPLER")*CLHEP::mm; - m_MagicNumbers->presamplerLength =(*emecMagicNumbers)[0]->getDouble("PRESAMPLERLENGTH")*CLHEP::mm; + m_MagicNumbers->focalToRef =(*emecMagicNumbers)[0]->getDouble("FOCALTOREF")*GeoModelKernelUnits::mm; + m_MagicNumbers->refToActive =(*emecMagicNumbers)[0]->getDouble("REFTOACTIVE")*GeoModelKernelUnits::mm; + m_MagicNumbers->activeLength =(*emecMagicNumbers)[0]->getDouble("ACTIVELENGTH")*GeoModelKernelUnits::mm; + m_MagicNumbers->refToPresampler =(*emecMagicNumbers)[0]->getDouble("REFTOPRESAMPLER")*GeoModelKernelUnits::mm; + m_MagicNumbers->presamplerLength =(*emecMagicNumbers)[0]->getDouble("PRESAMPLERLENGTH")*GeoModelKernelUnits::mm; } diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorRegion.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorRegion.cxx index 18e11c2c63e..b2587ffbec7 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorRegion.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorRegion.cxx @@ -2,87 +2,49 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%446626240261.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%446626240261.CLHEP::cm - -//## begin module%446626240261.cp preserve=no -//## end module%446626240261.cp - -//## Module: EMECDetectorRegion%446626240261; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMECDetectorRegion.cxx - -//## begin module%446626240261.additionalIncludes preserve=no -//## end module%446626240261.additionalIncludes - -//## begin module%446626240261.includes preserve=yes #include "GeoModelKernel/GeoVFullPhysVol.h" -//## end module%446626240261.includes -// EMECDetectorRegion #include "LArReadoutGeometry/EMECDetectorRegion.h" -//## begin module%446626240261.additionalDeclarations preserve=yes #include "GeoModelKernel/GeoVFullPhysVol.h" #include "GeoModelKernel/GeoPcon.h" -//## end module%446626240261.additionalDeclarations - - -// Class EMECDetectorRegion - -EMECDetectorRegion::EMECDetectorRegion (const GeoVFullPhysVol *physVol, const EMECDetDescr *emecDescriptor, DetectorSide endcap, double projectivityDisplacement) - //## begin EMECDetectorRegion::EMECDetectorRegion%4466280603B3.hasinit preserve=no - //## end EMECDetectorRegion::EMECDetectorRegion%4466280603B3.hasinit - //## begin EMECDetectorRegion::EMECDetectorRegion%4466280603B3.initialization preserve=yes - :GeoVDetectorElement(physVol),m_descriptor(emecDescriptor),m_endcapIndex(endcap),m_projectivityDisplacement(projectivityDisplacement) - //## end EMECDetectorRegion::EMECDetectorRegion%4466280603B3.initialization +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + +EMECDetectorRegion::EMECDetectorRegion (const GeoVFullPhysVol *physVol + , const EMECDetDescr *emecDescriptor + , DetectorSide endcap + , double projectivityDisplacement) + : GeoVDetectorElement(physVol) + , m_descriptor(emecDescriptor) + , m_endcapIndex(endcap) + , m_projectivityDisplacement(projectivityDisplacement) { - //## begin EMECDetectorRegion::EMECDetectorRegion%4466280603B3.body preserve=yes emecDescriptor->ref(); - //## end EMECDetectorRegion::EMECDetectorRegion%4466280603B3.body } - EMECDetectorRegion::~EMECDetectorRegion() { - //## begin EMECDetectorRegion::~EMECDetectorRegion%446626240261_dest.body preserve=yes m_descriptor->unref(); - //## end EMECDetectorRegion::~EMECDetectorRegion%446626240261_dest.body } - - -//## Other Operations (implementation) EMECCellConstLink EMECDetectorRegion::getEMECCell (unsigned int ieta, unsigned int iphi) const { - //## begin EMECDetectorRegion::getEMECCell%446629070190.body preserve=yes return EMECCellConstLink(new EMECCell(m_endcapIndex,m_descriptor,ieta,iphi)); - //## end EMECDetectorRegion::getEMECCell%446629070190.body } -const HepGeom::Transform3D & EMECDetectorRegion::getAbsoluteTransform () const +const GeoTrf::Transform3D & EMECDetectorRegion::getAbsoluteTransform () const { - //## begin EMECDetectorRegion::getAbsoluteTransform%446E079E0373.body preserve=yes const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); return fullPhysVol->getAbsoluteTransform(); - //## end EMECDetectorRegion::getAbsoluteTransform%446E079E0373.body } -const HepGeom::Transform3D & EMECDetectorRegion::getDefAbsoluteTransform () const +const GeoTrf::Transform3D & EMECDetectorRegion::getDefAbsoluteTransform () const { - //## begin EMECDetectorRegion::getDefAbsoluteTransform%446E079E037D.body preserve=yes const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); return fullPhysVol->getDefAbsoluteTransform(); - //## end EMECDetectorRegion::getDefAbsoluteTransform%446E079E037D.body } HepGeom::Point3D<double> EMECDetectorRegion::getRefPlanePos () const { - //## begin EMECDetectorRegion::getRefPlanePos%45432A27024F.body preserve=yes const GeoVFullPhysVol *physVol = getMaterialGeom(); const GeoLogVol *logVol = physVol->getLogVol(); const GeoShape *shape = logVol->getShape(); @@ -91,28 +53,25 @@ HepGeom::Point3D<double> EMECDetectorRegion::getRefPlanePos () const } GeoPcon *pcon = (GeoPcon *) shape; HepGeom::Point3D<double> center(0,0,pcon->getZPlane(0)-m_descriptor->getManager()->getRefToActive()); - return (physVol->getAbsoluteTransform()*center); - //## end EMECDetectorRegion::getRefPlanePos%45432A27024F.body + return (Amg::EigenTransformToCLHEP(physVol->getAbsoluteTransform())*center); } HepGeom::Point3D<double> EMECDetectorRegion::getFocalPointPos () const { - //## begin EMECDetectorRegion::getFocalPointPos%45432A270254.body preserve=yes HepGeom::Point3D<double> zRef = getRefPlanePos(); int sgn = m_endcapIndex==0 ? -1 : +1; HepGeom::Point3D<double> focalPos = HepGeom::Point3D<double>(0,0,sgn*m_descriptor->getManager()->getFocalToRef()); return zRef - focalPos; - //## end EMECDetectorRegion::getFocalPointPos%45432A270254.body } const Amg::Transform3D EMECDetectorRegion::getAbsoluteTransformAmg () const { - return Amg::CLHEPTransformToEigen(getAbsoluteTransform()); + return getAbsoluteTransform(); } const Amg::Transform3D EMECDetectorRegion::getDefAbsoluteTransformAmg () const { - return Amg::CLHEPTransformToEigen(getDefAbsoluteTransform()); + return getDefAbsoluteTransform(); } Amg::Vector3D EMECDetectorRegion::getRefPlanePosAmg () const diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALModule.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALModule.cxx index 9203e27804f..ab5f93bdbb3 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALModule.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCALModule.cxx @@ -9,8 +9,6 @@ #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoTubs.h" -#include "GeoPrimitives/CLHEPtoEigenConverter.h" - // FCALModule #include "LArReadoutGeometry/FCALModule.h" @@ -121,13 +119,13 @@ double FCALModule::getFullDepthZ (const FCALTile& ) const return m_dz; } -const HepGeom::Transform3D & FCALModule::getAbsoluteTransform () const +const GeoTrf::Transform3D & FCALModule::getAbsoluteTransform () const { const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); return fullPhysVol->getAbsoluteTransform(); } -const HepGeom::Transform3D & FCALModule::getDefAbsoluteTransform () const +const GeoTrf::Transform3D & FCALModule::getDefAbsoluteTransform () const { const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); return fullPhysVol->getDefAbsoluteTransform(); @@ -135,12 +133,12 @@ const HepGeom::Transform3D & FCALModule::getDefAbsoluteTransform () const const Amg::Transform3D FCALModule::getAbsoluteTransformAmg () const { - return Amg::CLHEPTransformToEigen(getAbsoluteTransform()); + return getAbsoluteTransform(); } const Amg::Transform3D FCALModule::getDefAbsoluteTransformAmg () const { - return Amg::CLHEPTransformToEigen(getDefAbsoluteTransform()); + return getDefAbsoluteTransform(); } void FCALModule::setManager (FCALDetectorManager* fcalManager) diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx index 109d17096df..5cb3662d79d 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/FCAL_ChannelMap.cxx @@ -13,7 +13,7 @@ //**************************************************************************** #include "LArReadoutGeometry/FCAL_ChannelMap.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include "boost/io/ios_state.hpp" #include <sstream> #include <iostream> @@ -21,7 +21,7 @@ #include <stdio.h> /* === Geometrical parameters === */ -const double FCAL_ChannelMap::m_tubeSpacing[] = {0.75*CLHEP::cm, 0.8179*CLHEP::cm, 0.90*CLHEP::cm}; +const double FCAL_ChannelMap::m_tubeSpacing[] = {0.75*GeoModelKernelUnits::cm, 0.8179*GeoModelKernelUnits::cm, 0.90*GeoModelKernelUnits::cm}; FCAL_ChannelMap::FCAL_ChannelMap( int flag) { @@ -78,7 +78,7 @@ void FCAL_ChannelMap::add_tube(const std::string & tileName, int mod, int /*id*/ tileName_t tilename = (a3 << 16) + a2; - TubePosition tb(tilename, x*CLHEP::cm, y*CLHEP::cm,""); + TubePosition tb(tilename, x*GeoModelKernelUnits::cm, y*GeoModelKernelUnits::cm,""); // Add offsets, becaues iy and ix can be negative HMA i = i+200; @@ -104,7 +104,7 @@ void FCAL_ChannelMap::add_tube(const std::string & tileName, int mod, int /*id*/ tileName_t tilename = (a3 << 16) + a2; - TubePosition tb(tilename, x*CLHEP::cm, y*CLHEP::cm, hvFT); + TubePosition tb(tilename, x*GeoModelKernelUnits::cm, y*GeoModelKernelUnits::cm, hvFT); // Add offsets, becaues iy and ix can be negative HMA i = i+200; diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/GeoStraightAccSection.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/GeoStraightAccSection.cxx index ef21f9c64ba..2ba99e25d80 100644 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/GeoStraightAccSection.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/GeoStraightAccSection.cxx @@ -19,11 +19,11 @@ void GeoStraightAccSection::Clockwork::fillFastCache() { if (!r1) buildFastCache(); for (int i=0;i<1024;i++) { for (int j=0;j<14; j++) { - HepGeom::Transform3D XF = (*r2->transfunction[j])(i); - r1->xcent[i][j] = XF.dx(); - r1->ycent[i][j] = XF.dy(); - r1->cosu [i][j] = -XF.xy(); - r1->sinu [i][j] = XF.xz(); + GeoTrf::Transform3D XF = (*r2->transfunction[j])(i); + r1->xcent[i][j] = XF(0,3); //dx + r1->ycent[i][j] = XF(1,3); //dy + r1->cosu [i][j] = -XF(0,1);//xy + r1->sinu [i][j] = XF(0,2);//xz r1->halfLength[i][j]= r2->halfLength[j]; } } diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCellConstLink.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCellConstLink.cxx index 46055d56776..470eeef52a1 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCellConstLink.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCellConstLink.cxx @@ -2,32 +2,4 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%445D13DC008E.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%445D13DC008E.CLHEP::cm - -//## begin module%445D13DC008E.cp preserve=no -//## end module%445D13DC008E.cp - -//## Module: HECCellConstLink%445D13DC008E; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECCellConstLink.cxx - -//## begin module%445D13DC008E.additionalIncludes preserve=no -//## end module%445D13DC008E.additionalIncludes - -//## begin module%445D13DC008E.includes preserve=yes -//## end module%445D13DC008E.includes - -// HECCellConstLink #include "LArReadoutGeometry/HECCellConstLink.h" -//## begin module%445D13DC008E.additionalDeclarations preserve=yes -//## end module%445D13DC008E.additionalDeclarations - - -//## begin module%445D13DC008E.epilog preserve=yes -//## end module%445D13DC008E.epilog diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetDescr.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetDescr.cxx index 0daac9b1711..e44269da848 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetDescr.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetDescr.cxx @@ -2,30 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%4457CB630376.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%4457CB630376.CLHEP::cm - -//## begin module%4457CB630376.cp preserve=no -//## end module%4457CB630376.cp - -//## Module: HECDetDescr%4457CB630376; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetDescr.cxx - -//## begin module%4457CB630376.additionalIncludes preserve=no -//## end module%4457CB630376.additionalIncludes - -//## begin module%4457CB630376.includes preserve=yes -//## end module%4457CB630376.includes - -// HECDetDescr #include "LArReadoutGeometry/HECDetDescr.h" -//## begin module%4457CB630376.additionalDeclarations preserve=yes #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/Bootstrap.h" #include "StoreGate/StoreGateSvc.h" @@ -34,30 +11,21 @@ #include "RDBAccessSvc/IRDBAccessSvc.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" -//## end module%4457CB630376.additionalDeclarations - -// Class HECDetDescr - -HECDetDescr::HECDetDescr (const HECDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning, bool isTestBeam) - //## begin HECDetDescr::HECDetDescr%445A11A300C0.hasinit preserve=no - //## end HECDetDescr::HECDetDescr%445A11A300C0.hasinit - //## begin HECDetDescr::HECDetDescr%445A11A300C0.initialization preserve=yes - // We use here cell width to disambiguate inner HEC and Outer HEC. Inner HEC has wider cells (0.2) than Outer hec (0.1) - : - m_manager(detManager), - m_samplingIndex(sampling), - m_regionIndex(region), - m_phiBinning(phiBinning), - m_outerRadSegNumber(region==0 ? 9: 3), - m_etaBinning(0,0,1,0), - m_numBlocks(sampling==0 ? 1:2), - m_firstBlock(sampling==0 ? 0 : 2*sampling-1) - - //## end HECDetDescr::HECDetDescr%445A11A300C0.initialization +HECDetDescr::HECDetDescr (const HECDetectorManager *detManager + , unsigned int sampling + , unsigned int region + , const CellBinning &phiBinning + , bool isTestBeam) + : m_manager(detManager) + , m_samplingIndex(sampling) + , m_regionIndex(region) + , m_phiBinning(phiBinning) + , m_outerRadSegNumber(region==0 ? 9: 3) + , m_etaBinning(0,0,1,0) + , m_numBlocks(sampling==0 ? 1:2) + , m_firstBlock(sampling==0 ? 0 : 2*sampling-1) { - //## begin HECDetDescr::HECDetDescr%445A11A300C0.body preserve=yes - // This will soon be unnecessary (when the wheels are divided! ISvcLocator *svcLocator = Gaudi::svcLocator(); IRDBAccessSvc* rdbAccess; @@ -100,23 +68,13 @@ HECDetDescr::HECDetDescr (const HECDetectorManager *detManager, unsigned int sam m_zMax.push_back(back); } pos += m_manager->getBlock(b)->getDepth(); - if(isTestBeam && b==2) pos += (*hadronicEndcap)[0]->getDouble("GAPWHL")*CLHEP::cm; + if(isTestBeam && b==2) pos += (*hadronicEndcap)[0]->getDouble("GAPWHL")*GeoModelKernelUnits::cm; } } - //## end HECDetDescr::HECDetDescr%445A11A300C0.body } HECDetDescr::~HECDetDescr() { - //## begin HECDetDescr::~HECDetDescr%4457CB630376_dest.body preserve=yes - //## end HECDetDescr::~HECDetDescr%4457CB630376_dest.body } - -// Additional Declarations - //## begin HECDetDescr%4457CB630376.declarations preserve=yes - //## end HECDetDescr%4457CB630376.declarations - -//## begin module%4457CB630376.epilog preserve=yes -//## end module%4457CB630376.epilog diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx index ea7d7346027..d270dcd4fd3 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorManager.cxx @@ -12,6 +12,7 @@ #include "RDBAccessSvc/IRDBAccessSvc.h" #include "GeoModelInterfaces/IGeoModelSvc.h" #include "GeoModelUtilities/DecodeVersionKey.h" +#include "GeoModelKernel/Units.h" #include "LArReadoutGeometry/HECDetectorManager.h" #include "LArHV/LArHVManager.h" #include "StoreGate/StoreGate.h" @@ -59,21 +60,21 @@ HECDetectorManager::HECDetectorManager(bool isTestBeam) if (hecPad->size()!=hecLongBlock->size()) throw std::runtime_error("Error. Hec[LongitudinalBlock,Pad] size discrepancy"); // Get the focal length: - m_focalToRef1 = (*hadronicEndcap)[0]->getDouble("ZORIG")*CLHEP::cm; + m_focalToRef1 = (*hadronicEndcap)[0]->getDouble("ZORIG")*GeoModelKernelUnits::cm; m_focalToRef2 = m_focalToRef1; - double betweenWheel=(*hadronicEndcap)[0]->getDouble("GAPWHL")*CLHEP::cm; + double betweenWheel=(*hadronicEndcap)[0]->getDouble("GAPWHL")*GeoModelKernelUnits::cm; if(!m_isTestBeam) m_focalToRef2 += betweenWheel; for (unsigned int b=0;b<hecLongBlock->size();b++) { double etaBoundary[15]; const IRDBRecord *block = (*hecLongBlock)[b]; unsigned int blockNumber= (unsigned int) (block->getDouble("IBLC")+0.01); // will truncate down. - double innerRadius= block->getDouble("BLRMN")*CLHEP::cm; - double outerRadius= block->getDouble("BLRMX")*CLHEP::cm; - double depth= block->getDouble("BLDPTH")*CLHEP::cm; + double innerRadius= block->getDouble("BLRMN")*GeoModelKernelUnits::cm; + double outerRadius= block->getDouble("BLRMX")*GeoModelKernelUnits::cm; + double depth= block->getDouble("BLDPTH")*GeoModelKernelUnits::cm; unsigned int numLArGaps= (unsigned int) (block->getDouble("BLMOD") + 0.01); // will truncate down. - double frontPlateThickness= block->getDouble("PLATE0")*CLHEP::cm; - double backPlateThickness= block->getDouble("PLATEE")*CLHEP::cm; + double frontPlateThickness= block->getDouble("PLATE0")*GeoModelKernelUnits::cm; + double backPlateThickness= block->getDouble("PLATEE")*GeoModelKernelUnits::cm; const IRDBRecord *pad = (*hecPad)[b]; for (int j=0;j<15;j++) etaBoundary[j]=pad->getDouble("ETA",j); diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorRegion.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorRegion.cxx index 5d84c1e1c50..e1d196f4820 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorRegion.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECDetectorRegion.cxx @@ -5,8 +5,16 @@ #include "LArReadoutGeometry/HECDetectorRegion.h" #include "GeoModelKernel/GeoVFullPhysVol.h" #include "GeoModelKernel/GeoPcon.h" -HECDetectorRegion::HECDetectorRegion (const GeoVFullPhysVol *physVol, const HECDetDescr *hecDescriptor, DetectorSide endcap, double projectivityDisplacement) - :GeoVDetectorElement(physVol),m_descriptor(hecDescriptor),m_endcapIndex(endcap),m_projectivityDisplacement(projectivityDisplacement) +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + +HECDetectorRegion::HECDetectorRegion (const GeoVFullPhysVol *physVol + , const HECDetDescr *hecDescriptor + , DetectorSide endcap + , double projectivityDisplacement) + : GeoVDetectorElement(physVol) + , m_descriptor(hecDescriptor) + , m_endcapIndex(endcap) + , m_projectivityDisplacement(projectivityDisplacement) { hecDescriptor->ref(); } @@ -17,21 +25,19 @@ HECDetectorRegion::~HECDetectorRegion() m_descriptor->unref(); } - - HECCellConstLink HECDetectorRegion::getHECCell (unsigned int ieta, unsigned int iphi) const { HECCell *cell = new HECCell(m_endcapIndex,m_descriptor,ieta,iphi); return HECCellConstLink(cell); } -const HepGeom::Transform3D & HECDetectorRegion::getAbsoluteTransform () const +const GeoTrf::Transform3D & HECDetectorRegion::getAbsoluteTransform () const { const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); return fullPhysVol->getAbsoluteTransform(); } -const HepGeom::Transform3D & HECDetectorRegion::getDefAbsoluteTransform () const +const GeoTrf::Transform3D & HECDetectorRegion::getDefAbsoluteTransform () const { const GeoVFullPhysVol *fullPhysVol = getMaterialGeom(); return fullPhysVol->getDefAbsoluteTransform(); @@ -44,12 +50,12 @@ Amg::Vector3D HECDetectorRegion::getRefPlanePosAmg () const } const Amg::Transform3D HECDetectorRegion::getAbsoluteTransformAmg () const { - return Amg::CLHEPTransformToEigen(getAbsoluteTransform()); + return getAbsoluteTransform(); } const Amg::Transform3D HECDetectorRegion::getDefAbsoluteTransformAmg () const { - return Amg::CLHEPTransformToEigen(getDefAbsoluteTransform()); + return getDefAbsoluteTransform(); } Amg::Vector3D HECDetectorRegion::getFocalPointPosAmg () const @@ -72,7 +78,7 @@ HepGeom::Point3D<double> HECDetectorRegion::getRefPlanePos () const } GeoPcon *pcon = (GeoPcon *) shape; HepGeom::Point3D<double> center(0,0,pcon->getZPlane(0)); - return (physVol->getAbsoluteTransform()*center); + return (Amg::EigenTransformToCLHEP(physVol->getAbsoluteTransform())*center); } HepGeom::Point3D<double> HECDetectorRegion::getFocalPointPos () const diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECLongBlock.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECLongBlock.cxx index 426bdec982a..d6b6e4c14e2 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECLongBlock.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECLongBlock.cxx @@ -2,41 +2,9 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%4457C98D0025.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%4457C98D0025.CLHEP::cm - -//## begin module%4457C98D0025.cp preserve=no -//## end module%4457C98D0025.cp - -//## Module: HECLongBlock%4457C98D0025; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECLongBlock.cxx - -//## begin module%4457C98D0025.additionalIncludes preserve=no -//## end module%4457C98D0025.additionalIncludes - -//## begin module%4457C98D0025.includes preserve=yes -//## end module%4457C98D0025.includes - -// HECLongBlock #include "LArReadoutGeometry/HECLongBlock.h" -//## begin module%4457C98D0025.additionalDeclarations preserve=yes -//## end module%4457C98D0025.additionalDeclarations - -#include <cstdlib> // For NULL - - -// Class HECLongBlock HECLongBlock::HECLongBlock(const HECLongBlock &right) - //## begin HECLongBlock::HECLongBlock%4457C98D0025_copy.hasinit preserve=no - //## end HECLongBlock::HECLongBlock%4457C98D0025_copy.hasinit - //## begin HECLongBlock::HECLongBlock%4457C98D0025_copy.initialization preserve=yes : m_blockNumber(right.m_blockNumber), m_innerRadius(right.m_innerRadius), m_outerRadius(right.m_outerRadius), @@ -44,17 +12,18 @@ HECLongBlock::HECLongBlock(const HECLongBlock &right) m_numLArGaps(right.m_numLArGaps), m_frontPlateThickness(right.m_frontPlateThickness), m_backPlateThickness(right.m_backPlateThickness) - //## end HECLongBlock::HECLongBlock%4457C98D0025_copy.initialization { - //## begin HECLongBlock::HECLongBlock%4457C98D0025_copy.body preserve=yes for (int i=0;i<14;i++) m_RadialSeg.push_back( right.m_RadialSeg[i] ? (HECRadialSegment *) 0 : new HECRadialSegment(*right.m_RadialSeg[i])); - //## end HECLongBlock::HECLongBlock%4457C98D0025_copy.body } -HECLongBlock::HECLongBlock (unsigned int blockNum, double innerRad, double outerRad, double totalDepth, unsigned int nLarGaps, double frontPlateThick, double backPlateThick, const double etaRange[15]) - //## begin HECLongBlock::HECLongBlock%4457DF0A0112.hasinit preserve=no - //## end HECLongBlock::HECLongBlock%4457DF0A0112.hasinit - //## begin HECLongBlock::HECLongBlock%4457DF0A0112.initialization preserve=yes +HECLongBlock::HECLongBlock (unsigned int blockNum + , double innerRad + , double outerRad + , double totalDepth + , unsigned int nLarGaps + , double frontPlateThick + , double backPlateThick + , const double etaRange[15]) : m_blockNumber(blockNum), m_innerRadius(innerRad), m_outerRadius(outerRad), @@ -62,11 +31,8 @@ HECLongBlock::HECLongBlock (unsigned int blockNum, double innerRad, double outer m_numLArGaps(nLarGaps), m_frontPlateThickness(frontPlateThick), m_backPlateThickness(backPlateThick) - - //## end HECLongBlock::HECLongBlock%4457DF0A0112.initialization { - //## begin HECLongBlock::HECLongBlock%4457DF0A0112.body preserve=yes - for (int i=0;i<14;i++) m_RadialSeg.push_back(NULL); + for (int i=0;i<14;i++) m_RadialSeg.push_back(nullptr); bool started=false; for (int i=0;i<14;i++) { if (etaRange[i]!=etaRange[i+1]) { @@ -77,21 +43,16 @@ HECLongBlock::HECLongBlock (unsigned int blockNum, double innerRad, double outer if (started) break; } } - //## end HECLongBlock::HECLongBlock%4457DF0A0112.body } HECLongBlock::~HECLongBlock() { - //## begin HECLongBlock::~HECLongBlock%4457C98D0025_dest.body preserve=yes for (int i=0;i<14;i++) delete m_RadialSeg[i]; - //## end HECLongBlock::~HECLongBlock%4457C98D0025_dest.body } - HECLongBlock & HECLongBlock::operator=(const HECLongBlock &right) { - //## begin HECLongBlock::operator=%4457C98D0025_assign.body preserve=yes if (this != & right) { m_blockNumber=right.m_blockNumber; m_innerRadius=right.m_innerRadius; @@ -105,13 +66,4 @@ HECLongBlock & HECLongBlock::operator=(const HECLongBlock &right) } return *this; - //## end HECLongBlock::operator=%4457C98D0025_assign.body } - - -// Additional Declarations - //## begin HECLongBlock%4457C98D0025.declarations preserve=yes - //## end HECLongBlock%4457C98D0025.declarations - -//## begin module%4457C98D0025.epilog preserve=yes -//## end module%4457C98D0025.epilog diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECRadialSegment.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECRadialSegment.cxx index d6e53cacbaa..7d42f68578a 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECRadialSegment.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECRadialSegment.cxx @@ -2,38 +2,4 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%4457F4A6038D.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%4457F4A6038D.CLHEP::cm - -//## begin module%4457F4A6038D.cp preserve=no -//## end module%4457F4A6038D.cp - -//## Module: HECRadialSegment%4457F4A6038D; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/HECRadialSegment.cxx - -//## begin module%4457F4A6038D.additionalIncludes preserve=no -//## end module%4457F4A6038D.additionalIncludes - -//## begin module%4457F4A6038D.includes preserve=yes -//## end module%4457F4A6038D.includes - -// HECRadialSegment #include "LArReadoutGeometry/HECRadialSegment.h" -//## begin module%4457F4A6038D.additionalDeclarations preserve=yes -//## end module%4457F4A6038D.additionalDeclarations - - -// Class HECRadialSegment - -// Additional Declarations - //## begin HECRadialSegment%4457F4A6038D.declarations preserve=yes - //## end HECRadialSegment%4457F4A6038D.declarations - -//## begin module%4457F4A6038D.epilog preserve=yes -//## end module%4457F4A6038D.epilog diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/LArDetectorManager.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/LArDetectorManager.cxx index 677441118a8..547b7aa8d2e 100755 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/LArDetectorManager.cxx +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/LArDetectorManager.cxx @@ -2,101 +2,50 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -//## begin module%1.7%.codegen_version preserve=yes -// Read the documentation to learn more about C++ code generator -// versioning. -//## end module%1.7%.codegen_version - -//## begin module%4466058E0231.CLHEP::cm preserve=no -// %X% %Q% %Z% %W% -//## end module%4466058E0231.CLHEP::cm - -//## begin module%4466058E0231.cp preserve=no -//## end module%4466058E0231.cp - -//## Module: LArDetectorManager%4466058E0231; Pseudo Package body -//## Source file: /home/atlas/TEST-12.0.2-00/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/LArDetectorManager.cxx - -//## begin module%4466058E0231.additionalIncludes preserve=no -//## end module%4466058E0231.additionalIncludes - -//## begin module%4466058E0231.includes preserve=yes -//## end module%4466058E0231.includes - -// LArDetectorManager #include "LArReadoutGeometry/LArDetectorManager.h" -//## begin module%4466058E0231.additionalDeclarations preserve=yes -//## end module%4466058E0231.additionalDeclarations - #include <algorithm> - -// Class LArDetectorManager - LArDetectorManager::LArDetectorManager() : m_embManager (0), m_emecManager (0), m_hecManager (0), m_fcalManager (0), m_isTestBeam(false) - //## begin LArDetectorManager::LArDetectorManager%4466058E0231_const.hasinit preserve=no - //## end LArDetectorManager::LArDetectorManager%4466058E0231_const.hasinit - //## begin LArDetectorManager::LArDetectorManager%4466058E0231_const.initialization preserve=yes - //## end LArDetectorManager::LArDetectorManager%4466058E0231_const.initialization { - //## begin LArDetectorManager::LArDetectorManager%4466058E0231_const.body preserve=yes - //## end LArDetectorManager::LArDetectorManager%4466058E0231_const.body } -LArDetectorManager::LArDetectorManager (const EMBDetectorManager* emb, const EMECDetectorManager* emec, const HECDetectorManager* hec, const FCALDetectorManager* fcal) - //## begin LArDetectorManager::LArDetectorManager%446607D90148.hasinit preserve=no - //## end LArDetectorManager::LArDetectorManager%446607D90148.hasinit - //## begin LArDetectorManager::LArDetectorManager%446607D90148.initialization preserve=yes - :m_embManager(emb),m_emecManager(emec),m_hecManager(hec),m_fcalManager(fcal),m_isTestBeam(true) - //## end LArDetectorManager::LArDetectorManager%446607D90148.initialization +LArDetectorManager::LArDetectorManager (const EMBDetectorManager* emb + , const EMECDetectorManager* emec + , const HECDetectorManager* hec + , const FCALDetectorManager* fcal) + : m_embManager(emb) + , m_emecManager(emec) + , m_hecManager(hec) + , m_fcalManager(fcal) + , m_isTestBeam(true) { - //## begin LArDetectorManager::LArDetectorManager%446607D90148.body preserve=yes setName("LArMgr"); - //## end LArDetectorManager::LArDetectorManager%446607D90148.body } - LArDetectorManager::~LArDetectorManager() { - //## begin LArDetectorManager::~LArDetectorManager%4466058E0231_dest.body preserve=yes for (unsigned int i=0;i<getNumTreeTops();i++) getTreeTop(i)->unref(); - //## end LArDetectorManager::~LArDetectorManager%4466058E0231_dest.body } - - -//## Other Operations (implementation) PVConstLink LArDetectorManager::getTreeTop (unsigned int i) const { - //## begin LArDetectorManager::getTreeTop%446607D300E0.body preserve=yes return m_treeTop[i]; - //## end LArDetectorManager::getTreeTop%446607D300E0.body } unsigned int LArDetectorManager::getNumTreeTops () const { - //## begin LArDetectorManager::getNumTreeTops%446607D300E7.body preserve=yes return m_treeTop.size(); - //## end LArDetectorManager::getNumTreeTops%446607D300E7.body } void LArDetectorManager::addTreeTop (PVLink treeTop) { - //## begin LArDetectorManager::addTreeTop%446608BE02DD.body preserve=yes if (std::find(m_treeTop.begin(),m_treeTop.end(),treeTop)!=m_treeTop.end()) return; m_treeTop.push_back(treeTop); treeTop->ref(); - //## end LArDetectorManager::addTreeTop%446608BE02DD.body } -// Additional Declarations - //## begin LArDetectorManager%4466058E0231.declarations preserve=yes - //## end LArDetectorManager%4466058E0231.declarations - -//## begin module%4466058E0231.epilog preserve=yes -//## end module%4466058E0231.epilog diff --git a/LArCalorimeter/LArTrackingGeometry/CMakeLists.txt b/LArCalorimeter/LArTrackingGeometry/CMakeLists.txt index 42e780db286..55befff2937 100644 --- a/LArCalorimeter/LArTrackingGeometry/CMakeLists.txt +++ b/LArCalorimeter/LArTrackingGeometry/CMakeLists.txt @@ -14,9 +14,7 @@ atlas_depends_on_subdirs( PUBLIC PRIVATE Calorimeter/CaloDetDescr Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities - DetectorDescription/GeoPrimitives LArCalorimeter/LArGeoModel/LArReadoutGeometry Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv Tracking/TrkDetDescr/TrkDetDescrUtils @@ -27,13 +25,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( LArTrackingGeometry src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GaudiKernel TrkDetDescrInterfaces CaloDetDescrLib StoreGateLib SGtests GeoModelKernel GeoModelUtilities GeoPrimitives LArReadoutGeometry TrkDetDescrGeoModelCnv TrkDetDescrUtils TrkGeometry TrkGeometrySurfaces TrkSurfaces TrkVolumes ) + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps GaudiKernel TrkDetDescrInterfaces CaloDetDescrLib StoreGateLib SGtests GeoModelUtilities LArReadoutGeometry TrkDetDescrGeoModelCnv TrkDetDescrUtils TrkGeometry TrkGeometrySurfaces TrkSurfaces TrkVolumes ) # Install files from the package: atlas_install_headers( LArTrackingGeometry ) diff --git a/LArCalorimeter/LArTrackingGeometry/src/LArVolumeBuilder.cxx b/LArCalorimeter/LArTrackingGeometry/src/LArVolumeBuilder.cxx index 9bbb751949e..89cb49713f7 100755 --- a/LArCalorimeter/LArTrackingGeometry/src/LArVolumeBuilder.cxx +++ b/LArCalorimeter/LArTrackingGeometry/src/LArVolumeBuilder.cxx @@ -22,6 +22,7 @@ #include "GeoModelKernel/GeoTrd.h" #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoPVConstLink.h" +#include "GeoModelKernel/Units.h" #include "GeoModelUtilities/StoredPhysVol.h" // Trk #include "TrkDetDescrInterfaces/ITrackingVolumeHelper.h" @@ -46,12 +47,10 @@ #include "TrkSurfaces/DiscBounds.h" #include "TrkGeometrySurfaces/SlidingCylinderSurface.h" #include "TrkGeometrySurfaces/SlidingDiscSurface.h" -// Amg -#include "GeoPrimitives/CLHEPtoEigenConverter.h" // StoreGate #include "StoreGate/StoreGateSvc.h" -using CLHEP::mm; +using GeoModelKernelUnits::mm; // constructor LAr::LArVolumeBuilder::LArVolumeBuilder(const std::string& t, const std::string& n, const IInterface* p) : @@ -170,7 +169,7 @@ const std::vector<const Trk::TrackingVolume*>* LAr::LArVolumeBuilder::trackingVo unsigned int currentChilds = currentVPhysVolLink->getNChildVols(); ATH_MSG_DEBUG( "Processing " << currentLogVol->getName() << "... has " - << currentChilds << " childs, position " << currentVPhysVolLink->getX().getTranslation()); + << currentChilds << " childs, position " << currentVPhysVolLink->getX().translation()); //printInfo( currentVPhysVolLink,2); } @@ -677,7 +676,7 @@ const std::vector<const Trk::TrackingVolume*>* LAr::LArVolumeBuilder::trackingVo const GeoShape* lArNegativeEndcapShape = lArNegativeEndcapLogVol->getShape(); // get the transforms - const Amg::Transform3D& lArPositiveEndcapTransform = Amg::CLHEPTransformToEigen(lArPositiveEndcapPhysVol->getAbsoluteTransform()); + const Amg::Transform3D& lArPositiveEndcapTransform = lArPositiveEndcapPhysVol->getAbsoluteTransform(); //const Amg::Transform3D& lArNegativeEndcapTransform = Amg::CLHEPTransformToEigen(lArNegativeEndcapPhysVol->getAbsoluteTransform()); Amg::Vector3D lArPositiveEndcapNomPosition = lArPositiveEndcapTransform.translation(); //Amg::Vector3D lArNegativeEndcapNomPosition = lArNegativeEndcapTransform.translation(); @@ -980,7 +979,7 @@ const std::vector<const Trk::TrackingVolume*>* LAr::LArVolumeBuilder::trackingVo if ( lArECPresamplerLogVol ) { const GeoShape* lArECPresamplerShape = lArECPresamplerLogVol->getShape(); - const Amg::Transform3D& lArECPresamplerTransform = Amg::CLHEPTransformToEigen(lArECPresamplerPhysVol->getAbsoluteTransform()); + const Amg::Transform3D& lArECPresamplerTransform = lArECPresamplerPhysVol->getAbsoluteTransform(); // dynamic cast to 'Tubs' shape const GeoTubs* psTubs = dynamic_cast<const GeoTubs*>(lArECPresamplerShape); @@ -1130,10 +1129,10 @@ const std::vector<const Trk::TrackingVolume*>* LAr::LArVolumeBuilder::trackingVo const GeoShape* lArNegativeHec2Shape = lArNegativeHec2LogVol->getShape(); // get the transforms - const Amg::Transform3D& lArPositiveHec1Transform = Amg::CLHEPTransformToEigen(lArPositiveHec1PhysVol->getAbsoluteTransform()); - const Amg::Transform3D& lArPositiveHec2Transform = Amg::CLHEPTransformToEigen(lArPositiveHec2PhysVol->getAbsoluteTransform()); - const Amg::Transform3D& lArNegativeHec1Transform = Amg::CLHEPTransformToEigen(lArNegativeHec1PhysVol->getAbsoluteTransform()); - const Amg::Transform3D& lArNegativeHec2Transform = Amg::CLHEPTransformToEigen(lArNegativeHec2PhysVol->getAbsoluteTransform()); + const Amg::Transform3D& lArPositiveHec1Transform = lArPositiveHec1PhysVol->getAbsoluteTransform(); + const Amg::Transform3D& lArPositiveHec2Transform = lArPositiveHec2PhysVol->getAbsoluteTransform(); + const Amg::Transform3D& lArNegativeHec1Transform = lArNegativeHec1PhysVol->getAbsoluteTransform(); + const Amg::Transform3D& lArNegativeHec2Transform = lArNegativeHec2PhysVol->getAbsoluteTransform(); Amg::Vector3D lArPositiveHec1NomPosition = lArPositiveHec1Transform.translation(); Amg::Vector3D lArPositiveHec2NomPosition = lArPositiveHec2Transform.translation(); @@ -1327,13 +1326,13 @@ const std::vector<const Trk::TrackingVolume*>* LAr::LArVolumeBuilder::trackingVo // get the transforms - const Amg::Transform3D& lArPositiveFcal1Transform = Amg::CLHEPTransformToEigen(lArPositiveFcal1PhysVol->getAbsoluteTransform()); - const Amg::Transform3D& lArPositiveFcal2Transform = Amg::CLHEPTransformToEigen(lArPositiveFcal2PhysVol->getAbsoluteTransform()); - const Amg::Transform3D& lArPositiveFcal3Transform = Amg::CLHEPTransformToEigen(lArPositiveFcal3PhysVol->getAbsoluteTransform()); + const Amg::Transform3D& lArPositiveFcal1Transform = lArPositiveFcal1PhysVol->getAbsoluteTransform(); + const Amg::Transform3D& lArPositiveFcal2Transform = lArPositiveFcal2PhysVol->getAbsoluteTransform(); + const Amg::Transform3D& lArPositiveFcal3Transform = lArPositiveFcal3PhysVol->getAbsoluteTransform(); - const Amg::Transform3D& lArNegativeFcal1Transform = Amg::CLHEPTransformToEigen(lArNegativeFcal1PhysVol->getAbsoluteTransform()); - const Amg::Transform3D& lArNegativeFcal2Transform = Amg::CLHEPTransformToEigen(lArNegativeFcal2PhysVol->getAbsoluteTransform()); - const Amg::Transform3D& lArNegativeFcal3Transform = Amg::CLHEPTransformToEigen(lArNegativeFcal3PhysVol->getAbsoluteTransform()); + const Amg::Transform3D& lArNegativeFcal1Transform = lArNegativeFcal1PhysVol->getAbsoluteTransform(); + const Amg::Transform3D& lArNegativeFcal2Transform = lArNegativeFcal2PhysVol->getAbsoluteTransform(); + const Amg::Transform3D& lArNegativeFcal3Transform = lArNegativeFcal3PhysVol->getAbsoluteTransform(); Amg::Vector3D lArPositiveFcal1NomPosition = lArPositiveFcal1Transform.translation(); Amg::Vector3D lArPositiveFcal2NomPosition = lArPositiveFcal2Transform.translation(); @@ -1707,7 +1706,7 @@ const std::vector<const Trk::TrackingVolume*>* LAr::LArVolumeBuilder::trackingVo // pass MBTS info to CaloTG // MBTS const PVConstLink topEC = m_lArMgr->getTreeTop(1U); - Amg::Transform3D trIn= Amg::CLHEPTransformToEigen(topEC->getX()); + Amg::Transform3D trIn= topEC->getX(); Amg::Transform3D tr2(trIn); const PVConstLink mbts= getChild(topEC,"MBTS_mother",trIn); if (mbts) { @@ -2001,7 +2000,7 @@ void LAr::LArVolumeBuilder::printInfo(const PVConstLink pv, int gen) const std::cout<<"polycone:"<<i<<":"<< con->getRMinPlane(i)<<","<<con->getRMaxPlane(i)<<","<<con->getZPlane(i)<< std::endl; } } - Amg::Transform3D transf = Amg::CLHEPTransformToEigen(pv->getX()); + Amg::Transform3D transf = pv->getX(); std::cout << "position:"<< "R:"<<transf.translation().perp()<<",phi:"<< transf.translation().phi()<<",x:"<<transf.translation().x()<<",y:"<<transf.translation().y()<<",z:"<<transf.translation().z()<<std::endl; int igen = 0; @@ -2016,7 +2015,7 @@ void LAr::LArVolumeBuilder::printChildren(const PVConstLink pv,int gen, int igen if (gen>-1 && igen>gen) return; std::string cname; for (unsigned int ic=0; ic<nc; ic++) { - Amg::Transform3D transf = trIn*Amg::CLHEPTransformToEigen(pv->getXToChildVol(ic)); + Amg::Transform3D transf = trIn*pv->getXToChildVol(ic); // //std::cout << " dumping transform to subcomponent" << std::endl; @@ -2059,7 +2058,7 @@ GeoPVConstLink LAr::LArVolumeBuilder::getChild(GeoPVConstLink mother, std::strin // subcomponents unsigned int nc = mother->getNChildVols(); for (unsigned int ic=0; ic<nc; ic++) { - Amg::Transform3D transf = trIn*Amg::CLHEPTransformToEigen(mother->getXToChildVol(ic)); + Amg::Transform3D transf = trIn*mother->getXToChildVol(ic); GeoPVConstLink cv = mother->getChildVol(ic); const GeoLogVol* clv = cv->getLogVol(); if (clv->getName().substr(0,name.size())==name) { trIn = transf; return cv; } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/CMakeLists.txt index 6c888a1fb43..0366a8b6bda 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/CMakeLists.txt +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/CMakeLists.txt @@ -38,7 +38,6 @@ atlas_depends_on_subdirs( Database/TPTools DetectorDescription/AGDD/AGDDKernel DetectorDescription/AtlasDetDescr - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoPrimitives DetectorDescription/IdDict DetectorDescription/IdDictDetDescr @@ -53,6 +52,8 @@ atlas_depends_on_subdirs( Tracking/TrkEvent/TrkMeasurementBase Tracking/TrkEvent/TrkPseudoMeasurementOnTrack ) +find_package( GeoModel ) + # Component(s) in the package: atlas_add_tpcnv_library( MuonEventTPCnv MuonEventTPCnv/*.h src/*.cxx @@ -122,8 +123,8 @@ foreach( name CscMcDataCnv_p1_test CscSimDataCnv_p1_test atlas_add_test( ${name} SOURCES test/${name}.cxx - LINK_LIBRARIES GaudiKernel TrkSurfaces TrkEventTPCnv TestTools - CxxUtils StoreGateLib TPTools AGDDKernel AtlasDetDescr GeoModelKernel + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} GaudiKernel TrkSurfaces TrkEventTPCnv TestTools + CxxUtils StoreGateLib TPTools AGDDKernel AtlasDetDescr IdDict IdDictDetDescr IdDictParser InDetIdentifier InDetReadoutGeometry MuonAGDDDescription MuonReadoutGeometry MuonIdHelpersLib TrkEventPrimitives TrkPseudoMeasurementOnTrack MuonEventTPCnv diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx index 5f521c42b94..df0bc158a34 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx @@ -4,6 +4,11 @@ #include "MuonAGDD/MuonAGDDToolHelper.h" +#include "MuonReadoutGeometry/MuonDetectorManager.h" +#include "MuonReadoutGeometry/MuonReadoutElement.h" +#include "MuonReadoutGeometry/MMReadoutElement.h" +#include "MuonReadoutGeometry/sTgcReadoutElement.h" + #include "GaudiKernel/ISvcLocator.h" #include "GaudiKernel/IToolSvc.h" #include "GaudiKernel/IConversionSvc.h" @@ -24,10 +29,6 @@ #include "RDBAccessSvc/IRDBRecord.h" #include "RDBAccessSvc/IRDBRecordset.h" #include "GeoModelInterfaces/IGeoModelSvc.h" -#include "MuonReadoutGeometry/MuonDetectorManager.h" -#include "MuonReadoutGeometry/MuonReadoutElement.h" -#include "MuonReadoutGeometry/MMReadoutElement.h" -#include "MuonReadoutGeometry/sTgcReadoutElement.h" #include "StoreGate/DataHandle.h" #include "StoreGate/StoreGateSvc.h" diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/CMakeLists.txt b/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/CMakeLists.txt index b1bfb46c974..de6de38d780 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/CMakeLists.txt +++ b/MuonSpectrometer/MuonDetDescr/MuonAGDDBase/CMakeLists.txt @@ -15,13 +15,14 @@ atlas_depends_on_subdirs( PUBLIC Control/StoreGate DetectorDescription/AGDD/AGDDModel DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel MuonSpectrometer/MuonGeoModel ) +find_package( GeoModel ) + # Component(s) in the package: atlas_add_library( MuonAGDDBase src/*.cxx PUBLIC_HEADERS MuonAGDDBase LINK_LIBRARIES AGDDControl AGDDKernel GaudiKernel MuonAGDDDescription StoreGateLib SGtests MuonGeoModelLib - PRIVATE_LINK_LIBRARIES AGDDModel GeoModelKernel ) + PRIVATE_LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AGDDModel ) diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/CMakeLists.txt b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/CMakeLists.txt index 86f379f0de4..f650896851b 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/CMakeLists.txt +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( MuonReadoutGeometry ) atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoPrimitives DetectorDescription/Identifier GaudiKernel @@ -25,12 +24,13 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( MuonReadoutGeometry src/*.c* PUBLIC_HEADERS MuonReadoutGeometry - INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel GeoModelKernel GeoPrimitives Identifier GaudiKernel MuonAlignmentData TrkDetElementBase TrkDistortedSurfaces TrkSurfaces MuonIdHelpersLib StoreGateLib SGtests + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives Identifier GaudiKernel MuonAlignmentData TrkDetElementBase TrkDistortedSurfaces TrkSurfaces MuonIdHelpersLib StoreGateLib SGtests PRIVATE_LINK_LIBRARIES AGDDModel MuonAGDDDescription ) diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h index b170efc64c2..3aaa5428679 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h @@ -8,8 +8,8 @@ #include "GaudiKernel/StatusCode.h" #include "GaudiKernel/MsgStream.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoVDetectorManager.h" -#include "GeoModelKernel/GeoAlignableTransform.h" #include "MuonIdHelpers/CscIdHelper.h" #include "MuonIdHelpers/RpcIdHelper.h" #include "MuonIdHelpers/TgcIdHelper.h" diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h index 5881534508a..0053447576a 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h @@ -210,8 +210,8 @@ private: const MuonStation* m_parentMuonStation; MuonDetectorManager* m_muon_mgr; - mutable const Amg::Transform3D* m_absTransform; - mutable const Amg::Transform3D* m_defTransform; + mutable const HepGeom::Transform3D* m_absTransform; + mutable const HepGeom::Transform3D* m_defTransform; }; MsgStream& MuonReadoutElement::reLog() const {return *m_MsgStream;} @@ -279,23 +279,23 @@ void MuonReadoutElement::setCachingFlag(int value) inline const Amg::Transform3D & MuonReadoutElement::absTransform() const { - if( !m_absTransform ) m_absTransform = new Amg::Transform3D(Amg::CLHEPTransformToEigen(absTransformCLHEP())); - return *m_absTransform; + return getMaterialGeom()->getAbsoluteTransform(); } inline const Amg::Transform3D & MuonReadoutElement::defTransform() const { - if( !m_defTransform ) m_defTransform = new Amg::Transform3D(Amg::CLHEPTransformToEigen(defTransformCLHEP())); - return *m_defTransform; + return getMaterialGeom()->getDefAbsoluteTransform(); } inline const HepGeom::Transform3D & MuonReadoutElement::absTransformCLHEP() const { - return getMaterialGeom()->getAbsoluteTransform(); + if( !m_absTransform ) m_absTransform = new HepGeom::Transform3D(Amg::EigenTransformToCLHEP(getMaterialGeom()->getAbsoluteTransform())); + return *m_absTransform; } inline const HepGeom::Transform3D & MuonReadoutElement::defTransformCLHEP() const { - return getMaterialGeom()->getDefAbsoluteTransform(); + if( !m_defTransform ) m_defTransform = new HepGeom::Transform3D(Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform())); + return *m_defTransform; } } // namespace MuonGM diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonStation.h b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonStation.h index a9ae3a9a65d..1de091d048b 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonStation.h +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonStation.h @@ -6,6 +6,7 @@ #define MuonStation_H #include "MuonReadoutGeometry/GlobalUtilities.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" #include "GeoModelKernel/GeoAlignableTransform.h" #include <map> @@ -188,7 +189,7 @@ MuonStation::getGeoTransform() const HepGeom::Transform3D MuonStation::getTransform() const - {return m_transform->getTransform();} + {return Amg::EigenTransformToCLHEP(m_transform->getTransform());} std::string MuonStation::getKey() { diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx index e0a53c8b799..dd33094a70d 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/CscReadoutElement.cxx @@ -80,8 +80,8 @@ CscReadoutElement::CscReadoutElement(GeoVFullPhysVol* pv, std::string stName, // <<tname<<" child " // <<ngv<<" is a gas volume with tag " // <<lgg<<std::endl; - const CLHEP::Hep3Vector trans = - (pvc->getXToChildVol(ich)*pc->getXToChildVol(ngv)).getTranslation(); + const GeoTrf::Vector3D trans = + (pvc->getXToChildVol(ich)*pc->getXToChildVol(ngv)).translation(); m_wireplanez[lgg] = trans.x(); //std::cerr<<lgg<<" gg - depth is at "<< m_wireplanez[lgg]<<std::endl; lgg --; diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MMReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MMReadoutElement.cxx index cc34eaebf8f..bc0a595f580 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MMReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MMReadoutElement.cxx @@ -80,7 +80,7 @@ namespace MuonGM { //std::cerr<<" navigating MM named " // <<childname<<" child " // <<ich<<" is a layer with tag "<<llay<<std::endl; - m_Xlg[llay-1] = Amg::CLHEPTransformToEigen(pvc->getXToChildVol(ich)); + m_Xlg[llay-1] = pvc->getXToChildVol(ich); // save layer dimensions if (llay==1) { if (pc->getLogVol()->getShape()->type()=="Trd") { diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx index 7ea7670ae5a..fddb2b17691 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx @@ -21,9 +21,9 @@ #include "TrkSurfaces/TrapezoidBounds.h" #include "TrkSurfaces/PlaneSurface.h" #include "GeoModelKernel/GeoTube.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoPrimitives/CLHEPtoEigenConverter.h" - #include "MuonAlignmentData/BLinePar.h" #include "GaudiKernel/MsgStream.h" @@ -585,18 +585,18 @@ MdtReadoutElement::nodeform_localTubePos(int multilayer, int tubelayer, int tube } } } - HepGeom::Transform3D tubeTrans = cv->getXToChildVol(ii); + GeoTrf::Transform3D tubeTrans = cv->getXToChildVol(ii); PVConstLink tv = cv->getChildVol(ii); double maxtol = 0.0000001; - if (std::abs(xtube - tubeTrans[0][3]) > maxtol || + if (std::abs(xtube - tubeTrans(0,3)) > maxtol || //std::abs(ytube - tubeTrans[1][3]) > maxtol && std::abs(tubeTrans[1][3]) > maxtol || - std::abs(ztube - tubeTrans[2][3]) > maxtol) { + std::abs(ztube - tubeTrans(2,3)) > maxtol) { reLog()<<MSG::ERROR << "taking localTubepos from RAW geoModel!!! MISMATCH IN local Y-Z (amdb) for a MDT with cutouts " << endmsg << ": from tube-id and pitch, tube pos = " << xtube << ", " << ytube << ", " << ztube - << " but geoModel gives " << tubeTrans[0][3] - << ", " << tubeTrans[1][3] << ", " << tubeTrans[2][3] + << " but geoModel gives " << tubeTrans(0,3) + << ", " << tubeTrans(1,3) << ", " << tubeTrans(2,3) << endmsg << " for tube " << tube << " tube layer " << tubelayer << " multilayer " << multilayer << endmsg @@ -606,18 +606,18 @@ MdtReadoutElement::nodeform_localTubePos(int multilayer, int tubelayer, int tube << m_ntubesperlayer << " tubes per layer." <<endmsg; } - if (tubeTrans[1][3]> maxtol) + if (tubeTrans(1,3)> maxtol) { if ( reLog().level() <= MSG::DEBUG ) reLog()<<MSG::DEBUG << "This a tube with cutout stName/Eta/Phi/ml/tl/t = "<<getStationName()<<"/"<<getStationEta()<<"/"<<getStationPhi()<<"/" <<getMultilayer()<<"/"<<tubelayer<<"/"<<tube<<endmsg; - if (std::abs(m_cutoutShift - tubeTrans[1][3]) > maxtol) // check only for tubes actually shifted + if (std::abs(m_cutoutShift - tubeTrans(1,3)) > maxtol) // check only for tubes actually shifted { reLog()<<MSG::ERROR << "taking localTubepos from RAW geoModel!!! MISMATCH IN local X (amdb) for a MDT with cutouts " << endmsg << ": from tube-id/pitch/cutout tube pos = " << xtube << ", " << m_cutoutShift << ", " << ztube - << " but geoModel gives " << tubeTrans[0][3] - << ", " << tubeTrans[1][3] << ", " << tubeTrans[2][3] + << " but geoModel gives " << tubeTrans(0,3) + << ", " << tubeTrans(1,3) << ", " << tubeTrans(2,3) << endmsg << " for tube " << tube << " tube layer " << tubelayer << " multilayer " << multilayer << endmsg @@ -629,7 +629,7 @@ MdtReadoutElement::nodeform_localTubePos(int multilayer, int tubelayer, int tube } } - Amg::Vector3D x(tubeTrans[0][3],tubeTrans[1][3],tubeTrans[2][3]); + Amg::Vector3D x=tubeTrans.translation(); if (tube > m_ntubesperlayer || tubelayer > m_nlayers) { x = Amg::Vector3D(xtube,ytube,ztube); } diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorElement.cxx index 8e65f8847d4..2295f253d90 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorElement.cxx @@ -8,9 +8,6 @@ #include "MuonReadoutGeometry/MuonDetectorElement.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" -#include "GeoModelKernel/GeoPhysVol.h" - -#include "GaudiKernel/MsgStream.h" namespace MuonGM { diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx index 17beb47cc1a..20c2154685f 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx @@ -13,13 +13,17 @@ #include "MuonReadoutGeometry/MuonReadoutElement.h" #include "MuonReadoutGeometry/MuonDetectorManager.h" #include "MuonReadoutGeometry/MuonStation.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoPhysVol.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "AthenaKernel/getMessageSvc.h" #include "TrkSurfaces/CylinderBounds.h" #include "TrkSurfaces/StraightLineSurface.h" +// Test + namespace MuonGM { MuonReadoutElement::MuonReadoutElement(GeoVFullPhysVol* pv, @@ -28,7 +32,7 @@ namespace MuonGM { : TrkDetElementBase(pv), m_Ssize(-9999.), m_Rsize(-9999.), m_Zsize(-9999.), m_LongSsize(-9999.), m_LongRsize(-9999.), m_LongZsize(-9999.), m_caching(-1), m_MsgStream(NULL), - m_eta(-1), m_phi(-1), m_id_max_init_field(-1), m_absTransform(NULL),m_defTransform(NULL) + m_eta(-1), m_phi(-1), m_id_max_init_field(-1), m_absTransform(nullptr),m_defTransform(nullptr) { //m_msgSvc = Athena::getMessageSvc(); m_stationS = 0.; @@ -57,8 +61,8 @@ namespace MuonGM { } void MuonReadoutElement::clear() const { - delete m_absTransform; m_absTransform = 0; - delete m_defTransform; m_defTransform = 0; + delete m_absTransform; m_absTransform = nullptr; + delete m_defTransform; m_defTransform = nullptr; } const Amg::Vector3D MuonReadoutElement::globalPosition() const @@ -189,15 +193,13 @@ namespace MuonGM { Amg::Transform3D MuonReadoutElement::toParentStation() const { - HepGeom::Transform3D xf = HepGeom::Transform3D::Identity; - PVConstLink par = parentStationPV(); if (par == PVConstLink(0)) { std::cerr<<"MuonReadoutElement::parentStationPos() *** parent not found"<<std::endl; throw; } - HepGeom::Transform3D par_to_child = HepGeom::Transform3D::Identity; + GeoTrf::Transform3D par_to_child = GeoTrf::Transform3D::Identity(); if ( m_indexOfREinMuonStation >=0 ) par_to_child = par->getXToChildVol( (unsigned int)m_indexOfREinMuonStation ); #ifndef NDEBUG @@ -206,7 +208,7 @@ namespace MuonGM { reLog()<<MSG::ERROR<<"No index to REinMuonStation computed/found until now"<<endmsg; } #endif - return Amg::CLHEPTransformToEigen(par_to_child); + return par_to_child; } void diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx index a418eb2439d..4af8364de6b 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/MuonStation.cxx @@ -215,7 +215,7 @@ void MuonStation::setDeltaAmdbLRS(HepGeom::Transform3D xf) } - m_transform->setDelta( m_native_to_amdbl->inverse() * (*m_delta_amdb_frame) * (*m_native_to_amdbl) ); + m_transform->setDelta(Amg::CLHEPTransformToEigen( m_native_to_amdbl->inverse() * (*m_delta_amdb_frame) * (*m_native_to_amdbl) )); } void @@ -319,7 +319,7 @@ MuonStation::setDelta_fromAline_forComp(int jobindex, //////////////////// this is what happens for a full station : m_transform->setDelta( m_native_to_amdbl->inverse() * (*m_delta_amdb_frame) * (*m_native_to_amdbl) ); - HepGeom::Transform3D parentToChildT = parentToChild->getTransform(); + HepGeom::Transform3D parentToChildT = Amg::EigenTransformToCLHEP(parentToChild->getTransform()); HepGeom::Transform3D delta_amdb = HepGeom::TranslateX3D(tras)*HepGeom::TranslateY3D(traz)*HepGeom::TranslateZ3D(trat)* HepGeom::RotateX3D(rots)*HepGeom::RotateY3D(rotz)*HepGeom::RotateZ3D(rott); //The station to component transform is static and must be computed in terms of "nominal geometry parameters"; fixing here bug 87693 - SS 9/11/2011 @@ -331,7 +331,7 @@ MuonStation::setDelta_fromAline_forComp(int jobindex, double DZcomp = fabs(thisREnominalCenter.z())-fabs(((*m_amdbl_to_global)*HepGeom::Point3D<double>(0.,0.,0)).z())-fabs((getMuonReadoutElement(jobindex)->getZsize())/2.); HepGeom::Transform3D childToLocAmdbComponent; - HepGeom::Transform3D childToLocAmdbStation = HepGeom::Transform3D(*m_native_to_amdbl)*HepGeom::Transform3D(parentToChildT); + HepGeom::Transform3D childToLocAmdbStation = HepGeom::Transform3D(*m_native_to_amdbl)*parentToChildT; HepGeom::Transform3D locAmdbStatToLocAmdbComp = HepGeom::Transform3D::Identity; // the following line is needed to go for scenario B in last slide of http://www.fisica.unisalento.it/~spagnolo/allow_listing/TGC_Alines/TGC-ALines_2011_03_01.pdf // COMMENT next line to go for scenario A in last slide of http://www.fisica.unisalento.it/~spagnolo/allow_listing/TGC_Alines/TGC-ALines_2011_03_01.pdf @@ -342,7 +342,7 @@ MuonStation::setDelta_fromAline_forComp(int jobindex, <<"setDelta_fromAline_forComp: stationName/Jff/Jzz "<<getStationType()<<" "<<getPhiIndex()<<" "<<getEtaIndex()<<" Job "<<jobindex <<" Origin of component/station AmdbLocalFrame= "<<(*m_amdbl_to_global)*locAmdbStatToLocAmdbComp.inverse()*HepGeom::Point3D<double>(0.,0.,0.) <<" / "<<(*m_amdbl_to_global)*HepGeom::Point3D<double>(0.,0.,0.)<<endmsg; - parentToChild->setDelta(childToLocAmdbComponent.inverse() * delta_amdb * childToLocAmdbComponent); + parentToChild->setDelta(Amg::CLHEPTransformToEigen(childToLocAmdbComponent.inverse() * delta_amdb * childToLocAmdbComponent)); if ( reLog().level() <= MSG::DEBUG ) reLog()<<MSG::DEBUG <<"setDelta_fromAline_forComp2:stationName/Jff/Jzz "<<getStationType()<<" "<<getPhiIndex()<<" "<<getEtaIndex()<<" Job "<<jobindex <<" Origin of component/station AmdbLocalFrame= "<<(*m_amdbl_to_global)*locAmdbStatToLocAmdbComp.inverse()*HepGeom::Point3D<double>(0.,0.,0.) diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx index 3a693b2cf06..d7c74e4fcff 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx @@ -75,8 +75,8 @@ namespace MuonGM { // <<tname<<" child " // <<ngv<<" is a gas volume with tag "<<lgg<<std::endl; PVConstLink pcgg = pcgv->getChildVol(0); - HepGeom::Transform3D trans = pvc->getXToChildVol(ich)*pc->getXToChildVol(ngv)*pcgv->getXToChildVol(0); - m_Xlg[llay-1][lgg-1] = Amg::CLHEPTransformToEigen(trans); + GeoTrf::Transform3D trans = pvc->getXToChildVol(ich)*pc->getXToChildVol(ngv)*pcgv->getXToChildVol(0); + m_Xlg[llay-1][lgg-1] = trans; } } } diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/sTgcReadoutElement.cxx b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/sTgcReadoutElement.cxx index fcd5a390833..d6303e24d60 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/sTgcReadoutElement.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/src/sTgcReadoutElement.cxx @@ -99,7 +99,7 @@ namespace MuonGM { reLog() << MSG::WARNING << "number of sTGC layers > 4: increase transform array size"<< endmsg; continue; } - m_Xlg[llay-1] = Amg::CLHEPTransformToEigen(pvc->getXToChildVol(ich)); + m_Xlg[llay-1] = pvc->getXToChildVol(ich); /*if (llay==1 || abs(zi)<3 ) { if (pc->getLogVol()->getShape()->type()=="Shift") { const GeoShapeShift* myshift = dynamic_cast<const GeoShapeShift*> (pc->getLogVol()->getShape()); diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/CMakeLists.txt b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/CMakeLists.txt index 0b37649e667..59224e27c33 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/CMakeLists.txt +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( MuonTrackingGeometry ) atlas_depends_on_subdirs( PUBLIC AtlasGeometryCommon/SubDetectorEnvelopes Control/AthenaBaseComps - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv Tracking/TrkDetDescr/TrkDetDescrInterfaces @@ -26,13 +25,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( MuonTrackingGeometry src/*.cxx src/components/*.cxx INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoModelKernel GaudiKernel TrkDetDescrGeoModelCnv TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry TrkVolumes StoreGateLib SGtests GeoPrimitives MuonReadoutGeometry MuonIdHelpersLib TrkGeometrySurfaces TrkSurfaces ) + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps GaudiKernel TrkDetDescrGeoModelCnv TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry TrkVolumes StoreGateLib SGtests GeoPrimitives MuonReadoutGeometry MuonIdHelpersLib TrkGeometrySurfaces TrkSurfaces ) # Install files from the package: atlas_install_headers( MuonTrackingGeometry ) diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonInertMaterialBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonInertMaterialBuilder.cxx index 18e24450ecf..9c25415cf5f 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonInertMaterialBuilder.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonInertMaterialBuilder.cxx @@ -277,7 +277,7 @@ const std::vector<std::pair<const Trk::DetachedTrackingVolume*,std::vector<Amg:: bool simpleTree = false; if ( !cv->getNChildVols() ) { std::vector<Amg::Transform3D > volTr; - volTr.push_back(Amg::CLHEPTransformToEigen(vol.getTransform())); + volTr.push_back(vol.getTransform()); vols.push_back(std::pair<const GeoLogVol*,std::vector<Amg::Transform3D> > (clv,volTr) ); simpleTree = true; } else { @@ -299,7 +299,7 @@ const std::vector<std::pair<const Trk::DetachedTrackingVolume*,std::vector<Amg:: for (unsigned int ip=0; ip<objs.size();ip++) { if (protoName==objs[ip].first->name()) { found = true; - if (simpleTree) objs[ip].second.push_back(Amg::CLHEPTransformToEigen(vol.getTransform())); + if (simpleTree) objs[ip].second.push_back(vol.getTransform()); //else objs[ip].second.insert(objs[ip].second.end(),vols[ish].second.begin(),vols[ish].second.end()); } } @@ -402,7 +402,7 @@ void Muon::MuonInertMaterialBuilder::printChildren(const GeoVPhysVol* pv) const // subcomponents unsigned int nc = pv->getNChildVols(); for (unsigned int ic=0; ic<nc; ic++) { - Amg::Transform3D transf = Amg::CLHEPTransformToEigen(pv->getXToChildVol(ic)); + Amg::Transform3D transf = pv->getXToChildVol(ic); // //std::cout << " dumping transform to subcomponent" << std::endl; @@ -580,7 +580,7 @@ void Muon::MuonInertMaterialBuilder::getObjsForTranslation(const GeoVPhysVol* pv unsigned int nc = pv->getNChildVols(); ATH_MSG_VERBOSE( " INERT getObjsForTranslation from:"<< pv->getLogVol()->getName()<<","<<pv->getLogVol()->getMaterial()->getName()<<", looping over "<< nc << " children" ); for (unsigned int ic=0; ic<nc; ic++) { - Amg::Transform3D transf = Amg::CLHEPTransformToEigen(pv->getXToChildVol(ic)); + Amg::Transform3D transf = pv->getXToChildVol(ic); const GeoVPhysVol* cv = &(*(pv->getChildVol(ic))); const GeoLogVol* clv = cv->getLogVol(); if (!cv->getNChildVols()) { diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx index 85ed4948eb5..2349553f740 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationBuilder.cxx @@ -186,7 +186,7 @@ const std::vector<const Trk::DetachedTrackingVolume*>* Muon::MuonStationBuilder: bool simpleTree = false; if ( !cv->getNChildVols() ) { std::vector<Amg::Transform3D > volTr; - volTr.push_back(Amg::CLHEPTransformToEigen(vol.getTransform())); + volTr.push_back(vol.getTransform()); std::pair<const GeoLogVol*,Trk::MaterialProperties*> cpair(clv,0); vols.push_back(std::pair<std::pair<const GeoLogVol*,Trk::MaterialProperties*>,std::vector<Amg::Transform3D> > (cpair,volTr) ); volNames.push_back(vname); @@ -1422,7 +1422,7 @@ void Muon::MuonStationBuilder::getNSWStationsForTranslation(const GeoVPhysVol* p ATH_MSG_DEBUG("getNSWStationsForTranslation from:"<< pv->getLogVol()->getName()<<","<<pv->getLogVol()->getMaterial()->getName()<<", looping over "<< nc << " children"); for (unsigned int ic=0; ic<nc; ic++) { - Amg::Transform3D transf = Amg::CLHEPTransformToEigen( pv->getXToChildVol(ic)); + Amg::Transform3D transf = pv->getXToChildVol(ic); const GeoVPhysVol* cv = &(*(pv->getChildVol(ic))); const GeoLogVol* clv = cv->getLogVol(); std::string childName = clv->getName(); diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationTypeBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationTypeBuilder.cxx index de1b40e0abd..108acd94ba3 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationTypeBuilder.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonStationTypeBuilder.cxx @@ -152,7 +152,7 @@ const Trk::TrackingVolumeArray* Muon::MuonStationTypeBuilder::processBoxStationC { const GeoVPhysVol* cv = &(*(mv->getChildVol(ich))); const GeoLogVol* clv = cv->getLogVol(); - Amg::Transform3D transf = Amg::CLHEPTransformToEigen(mv->getXToChildVol(ich)); + Amg::Transform3D transf = mv->getXToChildVol(ich); // TEMPORARY CORRECTION //if ( (mv->getLogVol()->getName()).substr(0,3)=="BMF" && (clv->getName()).substr(0,2)=="LB" ) { // ATH_MSG_DEBUG( "TEMPORARY MANUAL CORRECTION OF BMF SPACER LONG BEAM POSITION"); @@ -448,7 +448,7 @@ const Trk::TrackingVolumeArray* Muon::MuonStationTypeBuilder::processTrdStationC //std::cout << "next component:"<< ich << std::endl; const GeoVPhysVol* cv = &(*(mv->getChildVol(ich))); const GeoLogVol* clv = cv->getLogVol(); - Amg::Transform3D transf = Amg::CLHEPTransformToEigen(mv->getXToChildVol(ich)); + Amg::Transform3D transf = mv->getXToChildVol(ich); //std::cout << "component:"<<ich<<":" << clv->getName() <<", made of "<<clv->getMaterial()->getName()<<","<<clv->getShape()->type()<<"," <<transf.getTranslation()<<std::endl; // retrieve volumes for components Trk::VolumeBounds* volBounds=0; @@ -721,7 +721,7 @@ const Trk::TrackingVolume* Muon::MuonStationTypeBuilder::processMdtBox(Trk::Volu for (unsigned int ich =0; ich< gv->getNChildVols(); ++ich) { const GeoVPhysVol* cv = &(*(gv->getChildVol(ich))); const GeoLogVol* clv = cv->getLogVol(); - Amg::Transform3D transfc = Amg::CLHEPTransformToEigen(gv->getXToChildVol(ich)); + Amg::Transform3D transfc = gv->getXToChildVol(ich); //std::cout << "MDT component:"<<ich<<":" << clv->getName() <<", made of "<<clv->getMaterial()->getName()<<","<<clv->getShape()->type()<<","<<transfc.getTranslation()<<std::endl; // printChildren(cv); Trk::MaterialProperties* mdtMat=0; @@ -887,7 +887,7 @@ const Trk::TrackingVolume* Muon::MuonStationTypeBuilder::processMdtTrd(Trk::Volu for (unsigned int ich =0; ich< gv->getNChildVols(); ++ich) { const GeoVPhysVol* cv = &(*(gv->getChildVol(ich))); const GeoLogVol* clv = cv->getLogVol(); - Amg::Transform3D transfc = Amg::CLHEPTransformToEigen(gv->getXToChildVol(ich)); + Amg::Transform3D transfc = gv->getXToChildVol(ich); //std::cout << "MDT component:"<<ich<<":" << clv->getName() <<", made of "<<clv->getMaterial()->getName()<<","<<clv->getShape()->type()<<","<<transfc.translation()<<std::endl; double xv = 0.; int active = 0; @@ -1152,8 +1152,8 @@ const Trk::TrackingVolume* Muon::MuonStationTypeBuilder::processRpc(Trk::Volume* unsigned int ngc = gv[ic]->getNChildVols(); for (unsigned int igc=0; igc<ngc; igc++) { Amg::Transform3D trgc(Trk::s_idTransform); - if (transfc[ic].rotation().isIdentity()) trgc = Amg::CLHEPTransformToEigen(gv[ic]->getXToChildVol(igc)); - else trgc = Amg::AngleAxis3D(M_PI,Amg::Vector3D(0.,0.,1.))*Amg::CLHEPTransformToEigen(gv[ic]->getXToChildVol(igc)); + if (transfc[ic].rotation().isIdentity()) trgc = gv[ic]->getXToChildVol(igc); + else trgc = Amg::AngleAxis3D(M_PI,Amg::Vector3D(0.,0.,1.))*gv[ic]->getXToChildVol(igc); const GeoVPhysVol* gcv = &(*(gv[ic]->getChildVol(igc))); const GeoLogVol* gclv = gcv->getLogVol(); @@ -1241,7 +1241,7 @@ const Trk::TrackingVolume* Muon::MuonStationTypeBuilder::processSpacer(Trk::Volu if ((*vIter)->getNChildVols()) { for (unsigned int ich=0; ich<(*vIter)->getNChildVols();++ich) { gv.push_back(&(*((*vIter)->getChildVol(ich)))); - transf.push_back(Amg::Transform3D( (*tIter)*Amg::CLHEPTransformToEigen((*vIter)->getXToChildVol(ich)))); + transf.push_back(Amg::Transform3D( (*tIter)*(*vIter)->getXToChildVol(ich))); } vIter=gv.erase(vIter); tIter=transf.erase(tIter); } else { vIter++; tIter++; } @@ -1358,12 +1358,12 @@ const Trk::TrackingVolume* Muon::MuonStationTypeBuilder::processSpacer(Trk::Volu } else if (sub) { std::vector<std::pair<const GeoShape*,Amg::Transform3D> > subVs; const GeoShapeShift* shift = dynamic_cast<const GeoShapeShift*> (sub->getOpB()); - if (shift) subVs.push_back(std::pair<const GeoShape*,Amg::Transform3D>(shift->getOp(),Amg::CLHEPTransformToEigen(shift->getX()))); + if (shift) subVs.push_back(std::pair<const GeoShape*,Amg::Transform3D>(shift->getOp(),shift->getX())); const GeoShape* shape = sub->getOpA(); while (shape->type()=="Subtraction") { const GeoShapeSubtraction* subtr = dynamic_cast<const GeoShapeSubtraction*> (shape); const GeoShapeShift* shift = dynamic_cast<const GeoShapeShift*> (subtr->getOpB()); - if (shift) subVs.push_back(std::pair<const GeoShape*,Amg::Transform3D>(shift->getOp(),Amg::CLHEPTransformToEigen(shift->getX()))); + if (shift) subVs.push_back(std::pair<const GeoShape*,Amg::Transform3D>(shift->getOp(),shift->getX())); shape = subtr->getOpA(); } const GeoBox* box = dynamic_cast<const GeoBox*> (shape); @@ -1621,7 +1621,7 @@ const Trk::TrackingVolume* Muon::MuonStationTypeBuilder::processCscStation(const for (unsigned int ich =0; ich< mv->getNChildVols(); ++ich) { const GeoVPhysVol* cv = &(*(mv->getChildVol(ich))); const GeoLogVol* clv = cv->getLogVol(); - Amg::Transform3D transform = Amg::CLHEPTransformToEigen(mv->getXToChildVol(ich)); + Amg::Transform3D transform = mv->getXToChildVol(ich); compTransf.push_back(transform); compName.push_back(clv->getName()); compGeoVol.push_back(cv); @@ -1637,7 +1637,7 @@ const Trk::TrackingVolume* Muon::MuonStationTypeBuilder::processCscStation(const if (xSizes.size()>0) xSizes.push_back((fabs(transform.translation()[0]-compTransf[ich-1].translation()[0]) -xSizes.back())); else xSizes.push_back(xSize); - double xpos = (transform*Amg::CLHEPTransformToEigen(shift->getX())).translation()[0]; + double xpos = (transform*shift->getX()).translation()[0]; if ( xpos-xSize < xmn ) xmn = xpos-xSizes.back(); if ( xpos+xSize > xmx ) xmx = xpos+xSizes.back(); } @@ -1781,7 +1781,7 @@ std::vector<const Trk::TrackingVolume*> Muon::MuonStationTypeBuilder::processTgc const GeoLogVol* clv = cv->getLogVol(); std::string tgc_name = clv->getName(); //std::cout << "tgc name:" << tgc_name << std::endl; - Amg::Transform3D transform = Amg::CLHEPTransformToEigen(mv->getXToChildVol(ich)); + Amg::Transform3D transform = mv->getXToChildVol(ich); //std::cout << "TGC component:"<<ich<<":" << clv->getName() <<", made of "<<clv->getMaterial()->getName()<<","<<clv->getShape()->type()<<","<<transform.translation()<<std::endl; const GeoShape* baseShape = clv->getShape(); if (baseShape->type()=="Subtraction") { @@ -1825,7 +1825,7 @@ void Muon::MuonStationTypeBuilder::printChildren(const GeoVPhysVol* pv) const // subcomponents unsigned int nc = pv->getNChildVols(); for (unsigned int ic=0; ic<nc; ic++) { - Amg::Transform3D transf = Amg::CLHEPTransformToEigen(pv->getXToChildVol(ic)); + Amg::Transform3D transf = pv->getXToChildVol(ic); // /* @@ -1896,7 +1896,7 @@ double Muon::MuonStationTypeBuilder::get_x_size(const GeoVPhysVol* pv) const } for (unsigned int ic=0; ic<nc; ic++) { - Amg::Transform3D transf = Amg::CLHEPTransformToEigen(pv->getXToChildVol(ic)); + Amg::Transform3D transf = pv->getXToChildVol(ic); const GeoVPhysVol* cv = &(*(pv->getChildVol(ic))); const GeoLogVol* clv = cv->getLogVol(); double xh=0; @@ -2056,7 +2056,7 @@ const Trk::LayerArray* Muon::MuonStationTypeBuilder::processCSCTrdComponent(cons // step 1 level below const GeoVPhysVol* cv1 = &(*(pv->getChildVol(0))); for (unsigned int ic=0; ic < cv1->getNChildVols(); ic++) { - Amg::Transform3D transfc = Amg::CLHEPTransformToEigen(cv1->getXToChildVol(ic)); + Amg::Transform3D transfc = cv1->getXToChildVol(ic); const GeoVPhysVol* cv = &(*(cv1->getChildVol(ic))); const GeoLogVol* clv = cv->getLogVol(); if ( clv->getName() == "CscArCO2" ) { @@ -2188,7 +2188,7 @@ const Trk::LayerArray* Muon::MuonStationTypeBuilder::processCSCDiamondComponent( // step 1 level below const GeoVPhysVol* cv1 = &(*(pv->getChildVol(0))); for (unsigned int ic=0; ic < cv1->getNChildVols(); ic++) { - Amg::Transform3D transfc = Amg::CLHEPTransformToEigen(cv1->getXToChildVol(ic)); + Amg::Transform3D transfc = cv1->getXToChildVol(ic); const GeoVPhysVol* cv = &(*(cv1->getChildVol(ic))); const GeoLogVol* clv = cv->getLogVol(); if ( clv->getName() == "CscArCO2" ) { @@ -2322,7 +2322,7 @@ const Trk::LayerArray* Muon::MuonStationTypeBuilder::processTGCComponent(const G } for (unsigned int ic=0; ic < pv->getNChildVols(); ic++) { - Amg::Transform3D transfc = Amg::CLHEPTransformToEigen(pv->getXToChildVol(ic)); + Amg::Transform3D transfc = pv->getXToChildVol(ic); const GeoVPhysVol* cv = &(*(pv->getChildVol(ic))); const GeoLogVol* clv = cv->getLogVol(); if ( clv->getName() == "muo::TGCGas" ) { @@ -2459,7 +2459,7 @@ double Muon::MuonStationTypeBuilder::decodeX(const GeoShape* sh) const if (shift) { // std::cout << " decoding shift:" << shift->getOp()->type() <<"," << shift->getX().translation() << std::endl; double xA = decodeX( shift->getOp() ); - double xB = shift->getX().getTranslation()[0]; + double xB = shift->getX().translation()[0]; xHalf = xA + fabs(xB); } diff --git a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonTrackingGeometryBuilder.cxx b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonTrackingGeometryBuilder.cxx index c5464dae6da..3ca351d08f0 100644 --- a/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonTrackingGeometryBuilder.cxx +++ b/MuonSpectrometer/MuonDetDescr/MuonTrackingGeometry/src/MuonTrackingGeometryBuilder.cxx @@ -13,6 +13,8 @@ #include "SubDetectorEnvelopes/IEnvelopeDefSvc.h" // Amg #include "GeoPrimitives/GeoPrimitives.h" +// Units +#include "GeoModelKernel/Units.h" // Trk #include "TrkDetDescrInterfaces/ITrackingVolumeArrayCreator.h" #include "TrkDetDescrInterfaces/ITrackingVolumeHelper.h" @@ -220,7 +222,7 @@ const Trk::TrackingGeometry* Muon::MuonTrackingGeometryBuilder::trackingGeometry } // find object's span with tolerance for the alignment - if (!m_stationSpan) m_stationSpan = findVolumesSpan(m_stations, 100.*m_alignTolerance, m_alignTolerance*CLHEP::deg); + if (!m_stationSpan) m_stationSpan = findVolumesSpan(m_stations, 100.*m_alignTolerance, m_alignTolerance*GeoModelKernelUnits::deg); if (!m_inertSpan) m_inertSpan = findVolumesSpan(m_inertObjs,0.,0.); // 0) Preparation ////////////////////////////////////////////////////////////////////////////////////// diff --git a/MuonSpectrometer/MuonGeoModel/CMakeLists.txt b/MuonSpectrometer/MuonGeoModel/CMakeLists.txt index 9ded36db091..f3110b921c8 100644 --- a/MuonSpectrometer/MuonGeoModel/CMakeLists.txt +++ b/MuonSpectrometer/MuonGeoModel/CMakeLists.txt @@ -10,8 +10,8 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoPrimitives GaudiKernel MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry @@ -27,23 +27,22 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( MuonGeoModelLib src/*.cxx PUBLIC_HEADERS MuonGeoModel - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel MuonCondInterface MuonReadoutGeometry MuonGMdbObjects StoreGateLib SGtests MuonIdHelpersLib + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel MuonCondInterface MuonReadoutGeometry MuonGMdbObjects StoreGateLib SGtests MuonIdHelpersLib PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaPoolUtilities AGDDKernel IdDictDetDescr MuonAGDDDescription MuonDetDescrUtils ) atlas_add_component( MuonGeoModel src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel StoreGateLib SGtests GeoModelKernel GeoModelUtilities GaudiKernel MuonCondInterface MuonReadoutGeometry MuonGMdbObjects AthenaPoolUtilities AGDDKernel IdDictDetDescr MuonAGDDDescription MuonDetDescrUtils MuonIdHelpersLib MuonGeoModelLib ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel StoreGateLib SGtests GeoModelUtilities GaudiKernel MuonCondInterface MuonReadoutGeometry MuonGMdbObjects AthenaPoolUtilities AGDDKernel IdDictDetDescr MuonAGDDDescription MuonDetDescrUtils MuonIdHelpersLib MuonGeoModelLib ) # Install files from the package: atlas_install_joboptions( share/*.py ) diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/DBReader.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/DBReader.h index 67d960ac1f4..fa27ec620fe 100755 --- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/DBReader.h +++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/DBReader.h @@ -15,7 +15,7 @@ //<<<<<< INCLUDES >>>>>> #include "StoreGate/StoreGateSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include "AthenaKernel/getMessageSvc.h" #include <string> #include <iostream> @@ -176,19 +176,19 @@ namespace MuonGM { //std::cout<<" ProcessMDT "<<s<<" index "<<i<<" jsta ="<<wmdt[i].iw<<std::endl; mdt->numOfLayers=wmdt[i].laymdt; - mdt->innerRadius=wmdt[i].tubrad*CLHEP::cm; - mdt->totalThickness=wmdt[i].tubsta*CLHEP::cm; - mdt->pitch=wmdt[i].tubpit*CLHEP::cm; + mdt->innerRadius=wmdt[i].tubrad*GeoModelKernelUnits::cm; + mdt->totalThickness=wmdt[i].tubsta*GeoModelKernelUnits::cm; + mdt->pitch=wmdt[i].tubpit*GeoModelKernelUnits::cm; mdt->thickness=mdt->totalThickness; mdt->tubeDeadLength = 0; // cannot be defined here (it depends on chamber size) //mdt->endPlugLength is not OK in p03 - //mdt->endPlugLength = wmdt[i].tubdea*CLHEP::cm; - mdt->tubeEndPlugLength = wmdt[i].tubdea*CLHEP::cm; + //mdt->endPlugLength = wmdt[i].tubdea*GeoModelKernelUnits::cm; + mdt->tubeEndPlugLength = wmdt[i].tubdea*GeoModelKernelUnits::cm; - mdt->tubeWallThickness = wmdt[i].tubwal*CLHEP::cm; + mdt->tubeWallThickness = wmdt[i].tubwal*GeoModelKernelUnits::cm; - for(unsigned int k=0; k<4;k++) mdt->y[k]=wmdt[i].tubyco[k]*CLHEP::cm; - for(unsigned int j=0; j<4;j++) mdt->x[j]=wmdt[i].tubxco[j]*CLHEP::cm; + for(unsigned int k=0; k<4;k++) mdt->y[k]=wmdt[i].tubyco[k]*GeoModelKernelUnits::cm; + for(unsigned int j=0; j<4;j++) mdt->x[j]=wmdt[i].tubxco[j]*GeoModelKernelUnits::cm; //std::cout << mdt->numOfLayers << std::endl; } //std::cout<<" nstruct in processMDT "<< nStruct<<" at iter "<<i<<std::endl; @@ -214,17 +214,17 @@ namespace MuonGM { //std::cout << " TECH. A new RPC named " <<s<<" nrpc = "<<nrpc<<std::endl; //std::cout<<" Creating a RPC at "<<rpc<<" named "<<s<<std::endl; - rpc->centralSupPanelThickness = (wrpcall->tckfsp)*CLHEP::cm; - rpc->centralAlSupPanelThickness = (wrpcall->ackfsp)*CLHEP::cm; + rpc->centralSupPanelThickness = (wrpcall->tckfsp)*GeoModelKernelUnits::cm; + rpc->centralAlSupPanelThickness = (wrpcall->ackfsp)*GeoModelKernelUnits::cm; if (RPCprint) std::cout<<"ProcessRPC:: RPC central sup panel: tot & Al "<<rpc->centralSupPanelThickness<<" " <<rpc->centralAlSupPanelThickness<<std::endl; - rpc->bakeliteThickness =(wrpcall->tckbak)*CLHEP::cm; - rpc->bakeliteframesize =0.5*(wrpcall->sdedmi)*CLHEP::cm; - rpc->gasThickness =(wrpcall->tckgas)*CLHEP::cm; - rpc->bakelitePetThickness =0.190*CLHEP::mm; // TBM same as Amdb, why hardwired? Not in DblQ00Wrpc! - rpc->totalAirThickness = 0.52*CLHEP::mm; // TBM added + rpc->bakeliteThickness =(wrpcall->tckbak)*GeoModelKernelUnits::cm; + rpc->bakeliteframesize =0.5*(wrpcall->sdedmi)*GeoModelKernelUnits::cm; + rpc->gasThickness =(wrpcall->tckgas)*GeoModelKernelUnits::cm; + rpc->bakelitePetThickness =0.190*GeoModelKernelUnits::mm; // TBM same as Amdb, why hardwired? Not in DblQ00Wrpc! + rpc->totalAirThickness = 0.52*GeoModelKernelUnits::mm; // TBM added rpc->GasGapThickness=2.*rpc->bakeliteThickness+ rpc->gasThickness + 2.*rpc->bakelitePetThickness + @@ -242,26 +242,26 @@ namespace MuonGM { if (RPCprint) std::cout<<"ProcessRPC::WARNING redefining RPC::bakeliteThickness to include pet " <<rpc->bakeliteThickness<<std::endl; - rpc->spacerDiameter =(wrpcall->spdiam)*CLHEP::cm; - rpc->spacerPitch =(wrpcall->sppitc)*CLHEP::cm; + rpc->spacerDiameter =(wrpcall->spdiam)*GeoModelKernelUnits::cm; + rpc->spacerPitch =(wrpcall->sppitc)*GeoModelKernelUnits::cm; rpc->MidChamberDeadRegion_in_s =2.*rpc->bakeliteframesize; - rpc->MidChamberDeadRegion_in_z =(wrpcall->zdedmi)*CLHEP::cm; + rpc->MidChamberDeadRegion_in_z =(wrpcall->zdedmi)*GeoModelKernelUnits::cm; if (RPCprint) std::cout<<" ProcessRPC:: spacerDiam, pitch, MidChamberDeadRegion_in_s, MidChamberDeadRegion_in_z " <<rpc->spacerDiameter<<" "<<rpc->spacerPitch<<" " <<rpc->MidChamberDeadRegion_in_s<<" "<<rpc->MidChamberDeadRegion_in_z<<std::endl; - rpc->petFoilThickness =0.190*CLHEP::mm; //TBM this is the same as bakelite PET thickness? + rpc->petFoilThickness =0.190*GeoModelKernelUnits::mm; //TBM this is the same as bakelite PET thickness? if (RPCprint) std::cout <<"ProcessRPC:: defining RPC::petfoilThickness = "<<rpc->petFoilThickness <<std::endl; - rpc->stripPanelFoamThickness =(wrpcall->tckssu)*CLHEP::cm; - rpc->stripPanelCopperSkinThickness =(wrpcall->tckstr)*CLHEP::cm; - rpc->stripPanelStripSidePetThickness =0.25*CLHEP::mm; //missing in AmdbNova - rpc->stripPanelGroundSidePetThickness =0.07*CLHEP::mm; //missing in AmdbNova - rpc->frontendBoardWidth = 36.*CLHEP::mm; - rpc->backendBoardWidth = 21.*CLHEP::mm; + rpc->stripPanelFoamThickness =(wrpcall->tckssu)*GeoModelKernelUnits::cm; + rpc->stripPanelCopperSkinThickness =(wrpcall->tckstr)*GeoModelKernelUnits::cm; + rpc->stripPanelStripSidePetThickness =0.25*GeoModelKernelUnits::mm; //missing in AmdbNova + rpc->stripPanelGroundSidePetThickness =0.07*GeoModelKernelUnits::mm; //missing in AmdbNova + rpc->frontendBoardWidth = 36.*GeoModelKernelUnits::mm; + rpc->backendBoardWidth = 21.*GeoModelKernelUnits::mm; if (RPCprint) std::cout <<"ProcessRPC:: stp panel: foam, 2*copper, petg, pets, fe, be " <<rpc->stripPanelFoamThickness<<" " @@ -283,7 +283,7 @@ namespace MuonGM { <<"ProcessRPC::WARNING redefining RPC::stripPanelFoamThickness to include pet on both sides " <<rpc->stripPanelFoamThickness <<std::endl; - rpc->rpcLayerThickness =(wrpcall->tckrla)*CLHEP::cm; + rpc->rpcLayerThickness =(wrpcall->tckrla)*GeoModelKernelUnits::cm; double rpcLayerComputedTck = rpc->GasGapThickness + 2*rpc->stripPanelThickness + rpc->petFoilThickness; if (RPCprint) std::cout<<"ProcessRPC:: rpcLayerComputedTck = "<<rpcLayerComputedTck @@ -308,8 +308,8 @@ namespace MuonGM { done = true; //std::cout<<" done for jtech, wrpc[i].jsta = "<<jtech<<" "<<wrpc[i].jsta<<std::endl; - rpc->externalSupPanelThickness =(wrpcall->tlohcb)*CLHEP::cm; //TBM - rpc->externalAlSupPanelThickness =(wrpcall->alohcb)*CLHEP::cm; //TBM + rpc->externalSupPanelThickness =(wrpcall->tlohcb)*GeoModelKernelUnits::cm; //TBM + rpc->externalAlSupPanelThickness =(wrpcall->alohcb)*GeoModelKernelUnits::cm; //TBM if (RPCprint) std::cout<<"ProcessRPC:: RPC external sup panel: tot & Al " <<rpc->centralSupPanelThickness<<" " <<rpc->centralAlSupPanelThickness<<std::endl; @@ -323,13 +323,13 @@ namespace MuonGM { rpc->externalSupPanelThickness; if (RPCprint) std::cout<<"ProcessRPC:: (computed) Total RPC thickness = " <<rpc->TotalThickness<<std::endl; - rpc->maxThickness = 46.*CLHEP::mm; // TBM same as (wrpcall->tottck)*CLHEP::cm; + rpc->maxThickness = 46.*GeoModelKernelUnits::mm; // TBM same as (wrpcall->tottck)*GeoModelKernelUnits::cm; rpc->thickness = rpc->maxThickness; if (RPCprint) std::cout<<"ProcessRPC:: RPC max thickness "<<rpc->maxThickness <<std::endl; - rpc->stripPitchS =(wrpc[i].spitch)*CLHEP::cm; - rpc->stripPitchZ =(wrpc[i].zpitch)*CLHEP::cm; - rpc->stripSeparation =(wrpc[i].dedstr)*CLHEP::cm; + rpc->stripPitchS =(wrpc[i].spitch)*GeoModelKernelUnits::cm; + rpc->stripPitchZ =(wrpc[i].zpitch)*GeoModelKernelUnits::cm; + rpc->stripSeparation =(wrpc[i].dedstr)*GeoModelKernelUnits::cm; if (RPCprint) std::cout<<"ProcessRPC:: s_pitch, z_pitch " <<rpc->stripPitchS <<" "<<rpc->stripPitchZ<<std::endl; @@ -375,11 +375,11 @@ namespace MuonGM { if( s.substr(3,s.size()-3) == MuonGM::buildString(wtgcall[i].jsta,2) ) { tgc->nlayers =wtgcall[i].nbevol; - tgc->thickness=wtgcall[i].widchb*CLHEP::cm; + tgc->thickness=wtgcall[i].widchb*GeoModelKernelUnits::cm; //std::cout<<" ProcessTGC accepted "<<s<<" index "<<i<<" jsta ="<<wtgcall[i].jsta // <<" internal struct has "<<tgc->nlayers<<" layers; thickness is "<<tgc->thickness<<std::endl; - tgc->frame_h =wtgcall[i].fwirch*CLHEP::cm; - tgc->frame_ab =wtgcall[i].fwixch*CLHEP::cm; + tgc->frame_h =wtgcall[i].fwirch*GeoModelKernelUnits::cm; + tgc->frame_ab =wtgcall[i].fwixch*GeoModelKernelUnits::cm; //int subtype = wtgcall[i].jsta; // std::cout<<" thick, frame_h, frame_ab "<< tgc->thickness // <<" "<<tgc->frame_h<<" "<<tgc->frame_ab<<std::endl; @@ -394,8 +394,8 @@ namespace MuonGM { n++; //std::cout<<" select this by jsta = "<<wtgc[j].jsta<<" until now "<<n<<" selected"<<std::endl; mat=(int)wtgc[j].icovol; - p=wtgc[j].zpovol*CLHEP::cm; - t=wtgc[j].widvol*CLHEP::cm; + p=wtgc[j].zpovol*GeoModelKernelUnits::cm; + t=wtgc[j].widvol*GeoModelKernelUnits::cm; tgc->materials.push_back(v[mat-1]); //std::cerr<<" Processing TGC iw = "<<s<<" mat = "<<mat<<" v[mat-1] "<<v[mat-1]<<std::endl; tgc->positions.push_back(p); @@ -454,25 +454,25 @@ namespace MuonGM { // std::cout<<" ProcessCSC "<<s<<" index "<<i<<" jsta ="<<wcsc[i].jsta<<std::endl; csc->numOfLayers=wcsc[i].laycsc; - csc->totalThickness=wcsc[i].ttotal*CLHEP::cm; + csc->totalThickness=wcsc[i].ttotal*GeoModelKernelUnits::cm; csc->thickness=csc->totalThickness; - csc->honeycombthick=wcsc[i].tnomex*CLHEP::cm; + csc->honeycombthick=wcsc[i].tnomex*GeoModelKernelUnits::cm; - csc->g10thick=wcsc[i].tlag10*CLHEP::cm; //csc->g10thick=0.0820*CLHEP::cm; + csc->g10thick=wcsc[i].tlag10*GeoModelKernelUnits::cm; //csc->g10thick=0.0820*GeoModelKernelUnits::cm; // wire spacing - csc->wirespacing =wcsc[i].wispa*CLHEP::cm; + csc->wirespacing =wcsc[i].wispa*GeoModelKernelUnits::cm; // anode-cathode distance - csc->anocathodist=wcsc[i].dancat*CLHEP::cm; + csc->anocathodist=wcsc[i].dancat*GeoModelKernelUnits::cm; // gapbetwcathstrips - csc->gapbetwcathstrips=wcsc[i].gstrip*CLHEP::cm; + csc->gapbetwcathstrips=wcsc[i].gstrip*GeoModelKernelUnits::cm; // precision (Radial) strip pitch - csc->cathreadoutpitch=wcsc[i].pcatre*CLHEP::cm; // it was not used before but set by hand in CscReadoutEl. + csc->cathreadoutpitch=wcsc[i].pcatre*GeoModelKernelUnits::cm; // it was not used before but set by hand in CscReadoutEl. // Azimuthal strip pitch - //csc->phireadoutpitch = wcsc[i].psndco*CLHEP::cm; - csc->phireadoutpitch = wcsc[i].azcat*CLHEP::cm; + //csc->phireadoutpitch = wcsc[i].psndco*GeoModelKernelUnits::cm; + csc->phireadoutpitch = wcsc[i].azcat*GeoModelKernelUnits::cm; //std::cerr<<" do we come here ??? csc->phireadoutpitch = "<<csc->phireadoutpitch<<std::endl; //std::cerr<<" csc->phireadoutpitch = "<<csc->phireadoutpitch<<" csc->cathreadoutpitch "<< csc->cathreadoutpitch<<std::endl; @@ -485,20 +485,20 @@ namespace MuonGM { csc->nPhistrips = 48; // precision (Radial) strip width - csc->readoutstripswidth=wcsc[i].wrestr*CLHEP::cm; + csc->readoutstripswidth=wcsc[i].wrestr*GeoModelKernelUnits::cm; // Azimuthal strip width csc->floatingstripswidth =0.; - csc->phistripwidth = wcsc[i].wflstr*CLHEP::cm; // CTB and layout Q interpretation + csc->phistripwidth = wcsc[i].wflstr*GeoModelKernelUnits::cm; // CTB and layout Q interpretation // dead materials - csc->rectwasherthick=wcsc[i].trrwas*CLHEP::cm; - csc->roxacellwith = 54.96*CLHEP::mm; // CTB, layout Q, R, etc: must be computed - csc->roxwirebargap=wcsc[i].groxwi*CLHEP::cm; - csc->fullgasgapwirewidth=wcsc[i].wgasba*CLHEP::cm; - csc->fullwirefixbarwidth=wcsc[i].wfixwi*CLHEP::cm; - csc->wirebarposx=wcsc[i].pba1wi*CLHEP::cm; - csc->wirebarposy=wcsc[i].pba2wi*CLHEP::cm; - csc->wirebarposz=wcsc[i].pba3wi*CLHEP::cm; + csc->rectwasherthick=wcsc[i].trrwas*GeoModelKernelUnits::cm; + csc->roxacellwith = 54.96*GeoModelKernelUnits::mm; // CTB, layout Q, R, etc: must be computed + csc->roxwirebargap=wcsc[i].groxwi*GeoModelKernelUnits::cm; + csc->fullgasgapwirewidth=wcsc[i].wgasba*GeoModelKernelUnits::cm; + csc->fullwirefixbarwidth=wcsc[i].wfixwi*GeoModelKernelUnits::cm; + csc->wirebarposx=wcsc[i].pba1wi*GeoModelKernelUnits::cm; + csc->wirebarposy=wcsc[i].pba2wi*GeoModelKernelUnits::cm; + csc->wirebarposz=wcsc[i].pba3wi*GeoModelKernelUnits::cm; // std::cerr<<"A) tname, s, csc->numOfLayers "<<tname<<" "<<s<<" "<<csc->numOfLayers<<std::endl; if (tname == s) return; @@ -524,14 +524,14 @@ namespace MuonGM { log<<MSG::WARNING<<" update by hand a few numbers for the current technology sub-type "<<s <<" // Layout = "<<mysql->getGeometryVersion()<<" OK if layout is Q02, Q02_initial"<<endmsg; // precision (Radial) strip pitch - csc->cathreadoutpitch =5.31*CLHEP::mm; + csc->cathreadoutpitch =5.31*GeoModelKernelUnits::mm; // Azimuthal strip pitch - csc->phireadoutpitch =21.0*CLHEP::mm; + csc->phireadoutpitch =21.0*GeoModelKernelUnits::mm; // precision (Radial) strip width - csc->readoutstripswidth=1.52*CLHEP::mm; + csc->readoutstripswidth=1.52*GeoModelKernelUnits::mm; // Azimuthal strip width csc->floatingstripswidth = 0; // layout P interpretation - csc->phistripwidth =20.60*CLHEP::mm; + csc->phistripwidth =20.60*GeoModelKernelUnits::mm; return; } } @@ -552,9 +552,9 @@ namespace MuonGM { //std::cerr << " TECH. A new SPA named " <<s<<" nspa = "<<nspa<<std::endl; for (unsigned int i=0; i<dhwspa->size(); i++) { // sprintf(ind,"%i",wspa[i].type); - //if(s[3]==ind[0]) spa->thickness=wspa[i].tckspa*CLHEP::cm; + //if(s[3]==ind[0]) spa->thickness=wspa[i].tckspa*GeoModelKernelUnits::cm; if( s.substr(3,s.size()-3) == MuonGM::buildString(wspa[i].jsta,2) ) - spa->thickness=wspa[i].tckspa*CLHEP::cm; + spa->thickness=wspa[i].tckspa*GeoModelKernelUnits::cm; } } // end of ProcessSPA @@ -576,17 +576,17 @@ namespace MuonGM { // sprintf(ind,"%i",wsup[i].type); if( s.substr(3,s.size()-3) == MuonGM::buildString(wsup[i].jsta,2) ) { - sup->alFlangeThickness=wsup[i].xxsup[0]*CLHEP::cm; + sup->alFlangeThickness=wsup[i].xxsup[0]*GeoModelKernelUnits::cm; //if (s[3]=='3') //SUP3 if( s.substr(3,s.size()-3) == "03" ) { - sup->alHorFlangeLength=(fabs)(wsup[i].zzsup[1])*CLHEP::cm; - sup->alVerFlangeLength=wsup[i].xxsup[1]*CLHEP::cm - wsup[i].xxsup[0]*CLHEP::cm; - sup->alVerProfileThickness=wsup[i].zzsup[3]*CLHEP::cm; - sup->alHorProfileThickness=wsup[i].xxsup[3]*CLHEP::cm - wsup[i].xxsup[2]*CLHEP::cm; - sup->largeVerClearance=wsup[i].xxsup[3]*CLHEP::cm; - sup->smallVerClearance=wsup[i].xxsup[2]*CLHEP::cm; - sup->HorClearance=wsup[i].zzsup[2]*CLHEP::cm; + sup->alHorFlangeLength=(fabs)(wsup[i].zzsup[1])*GeoModelKernelUnits::cm; + sup->alVerFlangeLength=wsup[i].xxsup[1]*GeoModelKernelUnits::cm - wsup[i].xxsup[0]*GeoModelKernelUnits::cm; + sup->alVerProfileThickness=wsup[i].zzsup[3]*GeoModelKernelUnits::cm; + sup->alHorProfileThickness=wsup[i].xxsup[3]*GeoModelKernelUnits::cm - wsup[i].xxsup[2]*GeoModelKernelUnits::cm; + sup->largeVerClearance=wsup[i].xxsup[3]*GeoModelKernelUnits::cm; + sup->smallVerClearance=wsup[i].xxsup[2]*GeoModelKernelUnits::cm; + sup->HorClearance=wsup[i].zzsup[2]*GeoModelKernelUnits::cm; sup->xAMDB0 = -sup->largeVerClearance -sup->alHorProfileThickness/2.; sup->yAMDB0 = 0.; sup->zAMDB0 = - sup->alVerProfileThickness @@ -596,11 +596,11 @@ namespace MuonGM { } else //SUP1 and SUP2 { - sup->alHorFlangeLength=wsup[i].zzsup[0]*CLHEP::cm; + sup->alHorFlangeLength=wsup[i].zzsup[0]*GeoModelKernelUnits::cm; sup->alVerFlangeLength=0.; - sup->alVerProfileThickness=wsup[i].xxsup[0]*CLHEP::cm; + sup->alVerProfileThickness=wsup[i].xxsup[0]*GeoModelKernelUnits::cm; sup->alHorProfileThickness=0.; - sup->largeVerClearance=wsup[i].xxsup[1]*CLHEP::cm; + sup->largeVerClearance=wsup[i].xxsup[1]*GeoModelKernelUnits::cm; sup->smallVerClearance=0.; sup->HorClearance=0.; double totzgm = 2.*sup->alHorFlangeLength+sup->alVerProfileThickness+sup->HorClearance; @@ -643,11 +643,11 @@ namespace MuonGM { for (unsigned int i=0; i<dhwded->size(); i++) { if( s.substr(3,s.size()-3) == MuonGM::buildString(wded[i].jsta,2) ) { -// ded->AlThickness=(wded[i].tckded)*CLHEP::cm; -// ded->AlThickness = ded->AlThickness * CLHEP::cm; +// ded->AlThickness=(wded[i].tckded)*GeoModelKernelUnits::cm; +// ded->AlThickness = ded->AlThickness * GeoModelKernelUnits::cm; // a lot of confusion in the various versions of the geometry in nova - ded->AlThickness=0.3*CLHEP::mm; - ded->thickness=(wded[i].auphcb)*CLHEP::cm; + ded->AlThickness=0.3*GeoModelKernelUnits::mm; + ded->thickness=(wded[i].auphcb)*GeoModelKernelUnits::cm; ded->HoneyCombThickness=ded->thickness-2.*ded->AlThickness; break; } @@ -670,9 +670,9 @@ namespace MuonGM { for (int i=0; i<nStruct; i++) { if( s.substr(3,s.size()-3) == MuonGM::buildString(wchv[i].jsta,2) ) { - chv->thickness=wchv[i].thickness*CLHEP::cm; - chv->largeness=wchv[i].largeness*CLHEP::cm; - chv->height=wchv[i].heightness*CLHEP::cm; + chv->thickness=wchv[i].thickness*GeoModelKernelUnits::cm; + chv->largeness=wchv[i].largeness*GeoModelKernelUnits::cm; + chv->height=wchv[i].heightness*GeoModelKernelUnits::cm; } } }// end of ProcessCHV @@ -694,9 +694,9 @@ namespace MuonGM { for (int i=0; i<nStruct; i++) { if( s.substr(3,s.size()-3) == MuonGM::buildString(wcro[i].jsta,2) ) { - cro->thickness=wcro[i].thickness*CLHEP::cm; - cro->largeness=wcro[i].largeness*CLHEP::cm; - cro->height=wcro[i].heightness*CLHEP::cm; + cro->thickness=wcro[i].thickness*GeoModelKernelUnits::cm; + cro->largeness=wcro[i].largeness*GeoModelKernelUnits::cm; + cro->height=wcro[i].heightness*GeoModelKernelUnits::cm; //std::cerr<<" thick, width, height "<<cro->thickness<<" "<<cro->largeness<<" "<<cro->height<<std::endl; } } @@ -719,9 +719,9 @@ namespace MuonGM { for (int i=0; i<nStruct; i++) { if( s.substr(3,s.size()-3) == MuonGM::buildString(wcmi[i].jsta,2) ) { - cmi->thickness=wcmi[i].thickness*CLHEP::cm; - cmi->largeness=wcmi[i].largeness*CLHEP::cm; - cmi->height=wcmi[i].heightness*CLHEP::cm; + cmi->thickness=wcmi[i].thickness*GeoModelKernelUnits::cm; + cmi->largeness=wcmi[i].largeness*GeoModelKernelUnits::cm; + cmi->height=wcmi[i].heightness*GeoModelKernelUnits::cm; } } }// end of ProcessCMI @@ -743,10 +743,10 @@ namespace MuonGM { for (int i=0; i<nStruct; i++) { if( s.substr(2,s.size()-2) == MuonGM::buildString(wlbi[i].jsta,2) ) { - lbi->thickness=wlbi[i].thickness*CLHEP::cm; - lbi->height=wlbi[i].height*CLHEP::cm; - lbi->lowerThickness=wlbi[i].lowerThickness*CLHEP::cm; - lbi->yShift=wlbi[i].yShift*CLHEP::cm; + lbi->thickness=wlbi[i].thickness*GeoModelKernelUnits::cm; + lbi->height=wlbi[i].height*GeoModelKernelUnits::cm; + lbi->lowerThickness=wlbi[i].lowerThickness*GeoModelKernelUnits::cm; + lbi->yShift=wlbi[i].yShift*GeoModelKernelUnits::cm; } } } // end of ProcessLBI @@ -860,13 +860,13 @@ namespace MuonGM { //std::cout<<" ---- iz,fi "<<p.zindex<<", "<<p.phiindex; p.phi = aptp[ipos].dphi+double(phiindex)*45.; //std::cout<<" phi is "<<p.phi; - p.radius = aptp[ipos].r*CLHEP::cm; + p.radius = aptp[ipos].r*GeoModelKernelUnits::cm; //std::cout<<" r is "<<p.radius<<std::endl; - p.z = aptp[ipos].z*CLHEP::cm; + p.z = aptp[ipos].z*GeoModelKernelUnits::cm; if (p.zindex<0 && name.substr(0,1) == "B" && hasMdts) p.z = p.z-halfpitch; //std::cout<<" z is "<<p.z<<std::endl; - p.shift = aptp[ipos].s*CLHEP::cm; + p.shift = aptp[ipos].s*GeoModelKernelUnits::cm; if (verbose_posmap) std::cout<<"p.zindex,p.phi "<<p.zindex<<" "<<p.phiindex<<" shift is "<<p.shift<<std::endl; // amdb seems to follow the opposite convention about the sign // of rotation around the azimuthal axis (foro them it is a rotation @@ -1045,9 +1045,9 @@ namespace MuonGM { // std::cout << "FindPosition found the match for " << stname // << std::endl; AlignPos ap; - ap.tras=0.*CLHEP::cm; // in cm from NOVA... - ap.traz=0.*CLHEP::cm; // in cm - ap.trat=0.*CLHEP::cm; // in cm + ap.tras=0.*GeoModelKernelUnits::cm; // in cm from NOVA... + ap.traz=0.*GeoModelKernelUnits::cm; // in cm + ap.trat=0.*GeoModelKernelUnits::cm; // in cm ap.rots=0.; // in radians ap.rotz=0.; // in radians ap.rott=0.; // in radians @@ -1055,9 +1055,9 @@ namespace MuonGM { if (controlAlines >= 111111) { - ap.tras=aszt[ipos].tras*CLHEP::cm; // in cm from NOVA... - ap.traz=aszt[ipos].traz*CLHEP::cm; // in cm - ap.trat=aszt[ipos].trat*CLHEP::cm; // in cm + ap.tras=aszt[ipos].tras*GeoModelKernelUnits::cm; // in cm from NOVA... + ap.traz=aszt[ipos].traz*GeoModelKernelUnits::cm; // in cm + ap.trat=aszt[ipos].trat*GeoModelKernelUnits::cm; // in cm ap.rots=aszt[ipos].rots; // in radians ap.rotz=aszt[ipos].rotz; // in radians ap.rott=aszt[ipos].rott; // in radians @@ -1083,17 +1083,17 @@ namespace MuonGM { } if (int(controlAlines/1000)%10 != 0) { - ap.trat=aszt[ipos].trat*CLHEP::cm; + ap.trat=aszt[ipos].trat*GeoModelKernelUnits::cm; //std::cout<<" setting up t-translation "<<ap.trat<<endl; } if (int(controlAlines/10000)%10 != 0) { - ap.traz=aszt[ipos].traz*CLHEP::cm; + ap.traz=aszt[ipos].traz*GeoModelKernelUnits::cm; //std::cout<<" setting up z-translation "<<ap.traz<<endl; } if (int(controlAlines/100000)%10 != 0) { - ap.tras=aszt[ipos].tras*CLHEP::cm; + ap.tras=aszt[ipos].tras*GeoModelKernelUnits::cm; //std::cout<<" setting up s-translation "<<ap.tras<<endl; } } @@ -1153,7 +1153,7 @@ namespace MuonGM { // that doesn't seem right for BME/BMG chambers - no idea if has an impact at the end // in any case it was wrong since every and would have been wrong also in previous code - double default_halfpitch = 15.0175*CLHEP::mm; + double default_halfpitch = 15.0175*GeoModelKernelUnits::mm; double halfpitch = default_halfpitch; // loop over the banks of station components: ALMN @@ -1220,7 +1220,7 @@ namespace MuonGM { << " for " << name << std::endl; continue; } - halfpitch = 0.5*wmdt[jtech-1].tubpit*CLHEP::cm; + halfpitch = 0.5*wmdt[jtech-1].tubpit*GeoModelKernelUnits::cm; log << MSG::DEBUG << "Found new halfpitch: " << halfpitch << " for " << name << std::endl; @@ -1268,19 +1268,19 @@ namespace MuonGM { } // define here common properties - c->posx=almn[icomp].dx*CLHEP::cm; - c->posy=almn[icomp].dy*CLHEP::cm; - c->posz=almn[icomp].dz*CLHEP::cm; + c->posx=almn[icomp].dx*GeoModelKernelUnits::cm; + c->posy=almn[icomp].dy*GeoModelKernelUnits::cm; + c->posz=almn[icomp].dz*GeoModelKernelUnits::cm; c->index=almn[icomp].job; c->name=cartec+MuonGM::buildString(almn[icomp].iw, 2); c->iswap=almn[icomp].ishape; - c->dx1=almn[icomp].width_xs*CLHEP::cm; - c->dx2=almn[icomp].width_xl*CLHEP::cm; - c->dy=almn[icomp].length_y*CLHEP::cm; - c->excent=almn[icomp].excent*CLHEP::cm; - c->deadx=almn[icomp].dead1*CLHEP::cm; - c->deady=almn[icomp].dead2*CLHEP::cm; - c->dead3=almn[icomp].dead3*CLHEP::cm; + c->dx1=almn[icomp].width_xs*GeoModelKernelUnits::cm; + c->dx2=almn[icomp].width_xl*GeoModelKernelUnits::cm; + c->dy=almn[icomp].length_y*GeoModelKernelUnits::cm; + c->excent=almn[icomp].excent*GeoModelKernelUnits::cm; + c->deadx=almn[icomp].dead1*GeoModelKernelUnits::cm; + c->deady=almn[icomp].dead2*GeoModelKernelUnits::cm; + c->dead3=almn[icomp].dead3*GeoModelKernelUnits::cm; //std::cout<<" This component of station "<<name<<" is a "<<c->name<<std::endl; if (cartec == "CSC") @@ -1289,10 +1289,10 @@ namespace MuonGM { if (derc == NULL) std::cout<<" There is a problem"<<std::endl; if (name[2] == 'L'){ //std::cout<<" here is a CSL ..."<<std::endl; - derc->dy = 1129.20*CLHEP::mm; // AMDB-Q and CTB + derc->dy = 1129.20*GeoModelKernelUnits::mm; // AMDB-Q and CTB // DHW: fix values from AMDB - //else derc->dy = 1111.5*CLHEP::mm; - derc->maxwdy = almn[icomp].length_y*CLHEP::cm; + //else derc->dy = 1111.5*GeoModelKernelUnits::mm; + derc->maxwdy = almn[icomp].length_y*GeoModelKernelUnits::cm; } else derc->maxwdy = c->dy; //ProcessCSC(derc->name); @@ -1302,7 +1302,7 @@ namespace MuonGM { derc->maxwdy = derc->dy; if (jtech == 6 && name.substr(0,3) == "CSL") { - derc->dy = 1129.20*CLHEP::mm; // AMDB-Q and CTB + derc->dy = 1129.20*GeoModelKernelUnits::mm; // AMDB-Q and CTB } //ProcessSPA(derc->name); } @@ -1409,10 +1409,10 @@ template <class TYPEdnacut, class TYPEacut, class TYPEdnalin, class TYPEalin, << " component with subcut i="<<alin[ialin].i << endmsg; Cutout *c = new Cutout(); - c->dx = alin[ialin].dx*CLHEP::cm; - c->dy = alin[ialin].dy*CLHEP::cm; - c->widthXs = alin[ialin].width_xs*CLHEP::cm; - c->widthXl = alin[ialin].width_xl*CLHEP::cm; + c->dx = alin[ialin].dx*GeoModelKernelUnits::cm; + c->dy = alin[ialin].dy*GeoModelKernelUnits::cm; + c->widthXs = alin[ialin].width_xs*GeoModelKernelUnits::cm; + c->widthXl = alin[ialin].width_xl*GeoModelKernelUnits::cm; //std::string::size_type locmystr = mysql->get_DBMuonVersion().find("Egg"); //if ( locmystr != std::string::npos ) //{ @@ -1425,19 +1425,19 @@ template <class TYPEdnacut, class TYPEacut, class TYPEdnalin, class TYPEalin, // if (alin[ialin].jtyp == 11 && c->dy>0.1) // { // std::cout<<"DBREADER redefining dy of the cutout from "<<c->dy; - // c->dy = 1021.2000*CLHEP::mm; + // c->dy = 1021.2000*GeoModelKernelUnits::mm; // std::cout<<" to "<<c->dy<<std::endl; // } // else if (alin[ialin].jtyp == 11 && c->dy>0.0001) if (alin[ialin].jtyp == 11 && (c->dy>0.0001 && c->dy<1.)) { std::cout<<"DBREADER redefining dy of the cutout from "<<c->dy; - c->dy = 0.000*CLHEP::mm; + c->dy = 0.000*GeoModelKernelUnits::mm; std::cout<<" to "<<c->dy<<std::endl; } //} - c->lengthY = alin[ialin].length_y*CLHEP::cm; - c->excent = alin[ialin].excent*CLHEP::cm; + c->lengthY = alin[ialin].length_y*GeoModelKernelUnits::cm; + c->excent = alin[ialin].excent*GeoModelKernelUnits::cm; c->dead1 = alin[ialin].dead1; // temporary fix for bug in Nova/Oracle: 18/05/2006 I don't think this is needed anymore // c->dead1 = 10.*alin[ialin].dead1; diff --git a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/Station.h b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/Station.h index 1154694845d..a2034bb6a1f 100755 --- a/MuonSpectrometer/MuonGeoModel/MuonGeoModel/Station.h +++ b/MuonSpectrometer/MuonGeoModel/MuonGeoModel/Station.h @@ -12,7 +12,8 @@ #include "MuonGeoModel/Cutout.h" #include "MuonGeoModel/Position.h" #include "MuonGeoModel/AlignPos.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" /* This class holds an std::map of Position, AlignPos and an std::vector of @@ -67,14 +68,14 @@ public: // apit = station->FindAlignPos(zi,fi); // Delta = station->getDeltaTransform( ap, (*pit).second ); // xf->setDelta( Delta ); - HepGeom::Transform3D native_to_tsz_frame( const Position & p ) const; - HepGeom::Transform3D tsz_to_native_frame( const Position & p ) const; - HepGeom::Transform3D tsz_to_global_frame( const Position & p ) const; - HepGeom::Transform3D global_to_tsz_frame( const Position & p ) const; - HepGeom::Transform3D getNominalTransform( const Position & p ) const; - HepGeom::Transform3D getDeltaTransform_tszFrame( const AlignPos & ap ) const; - HepGeom::Transform3D getDeltaTransform( const AlignPos & ap, const Position & p ) const; - HepGeom::Transform3D getAlignedTransform( const AlignPos & ap, const Position & p ) const; + GeoTrf::Transform3D native_to_tsz_frame( const Position & p ) const; + GeoTrf::Transform3D tsz_to_native_frame( const Position & p ) const; + GeoTrf::Transform3D tsz_to_global_frame( const Position & p ) const; + GeoTrf::Transform3D global_to_tsz_frame( const Position & p ) const; + GeoTrf::Transform3D getNominalTransform( const Position & p ) const; + GeoTrf::Transform3D getDeltaTransform_tszFrame( const AlignPos & ap ) const; + GeoTrf::Transform3D getDeltaTransform( const AlignPos & ap, const Position & p ) const; + GeoTrf::Transform3D getAlignedTransform( const AlignPos & ap, const Position & p ) const; //HepGeom::Transform3D getAmdbOrgTrans(const Position & p) const; //} diff --git a/MuonSpectrometer/MuonGeoModel/src/Csc.cxx b/MuonSpectrometer/MuonGeoModel/src/Csc.cxx index 67ba7bec96c..930de752ce4 100755 --- a/MuonSpectrometer/MuonGeoModel/src/Csc.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/Csc.cxx @@ -93,8 +93,8 @@ Csc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) GeoTrd* upTrd = new GeoTrd(thickness/2., thickness/2., longWidth/2., upWidth/2., (physicalLength-maxwLength)/2.); const GeoShape* sCSL = - & ( (downTrd->add( (*upTrd) << HepGeom::TranslateZ3D(physicalLength/2.) ) ) - << HepGeom::TranslateZ3D((maxwLength - physicalLength)/2.) ); + & ( (downTrd->add( (*upTrd) << GeoTrf::TranslateZ3D(physicalLength/2.) ) ) + << GeoTrf::TranslateZ3D((maxwLength - physicalLength)/2.) ); lcsc = new GeoLogVol(logVolName, sCSL, mcsc); } diff --git a/MuonSpectrometer/MuonGeoModel/src/CscMultilayer.cxx b/MuonSpectrometer/MuonGeoModel/src/CscMultilayer.cxx index eeba6d8e279..25c98f7d809 100755 --- a/MuonSpectrometer/MuonGeoModel/src/CscMultilayer.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/CscMultilayer.cxx @@ -11,6 +11,7 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "MuonGeoModel/MYSQL.h" #include "MuonGeoModel/Csc.h" #include "MuonGeoModel/CSC_Technology.h" @@ -79,8 +80,8 @@ CscMultiLayer::build(int /*cutoutson*/, std::vector<Cutout*> /*vcutdef*/) if (excent != length) { const GeoShape* smlt = new GeoTrd(thickness/2., thickness/2., longWidth/2., upWidth/2., (physicalLength-maxwLength)/2.); - sml = & ( (sml->add( (*smlt) << HepGeom::TranslateZ3D(physicalLength/2.) ) ) - << HepGeom::TranslateZ3D((maxwLength - physicalLength)/2.) ); + sml = & ( (sml->add( (*smlt) << GeoTrf::TranslateZ3D(physicalLength/2.) ) ) + << GeoTrf::TranslateZ3D((maxwLength - physicalLength)/2.) ); } // const GeoMaterial* mair = matManager->getMaterial("std::Air"); const GeoMaterial* mhon = matManager->getMaterial("muo::Honeycomb"); @@ -95,12 +96,12 @@ CscMultiLayer::build(int /*cutoutson*/, std::vector<Cutout*> /*vcutdef*/) if (excent != length) { const GeoShape* shont = new GeoTrd(hon_thick/2., hon_thick/2., longWidth/2., upWidth/2., (physicalLength-maxwLength)/2.); - shon = &( (shon->add( (*shont) << HepGeom::TranslateZ3D(physicalLength/2.) ) ) - << HepGeom::TranslateZ3D((maxwLength - physicalLength)/2.) ); + shon = &( (shon->add( (*shont) << GeoTrf::TranslateZ3D(physicalLength/2.) ) ) + << GeoTrf::TranslateZ3D((maxwLength - physicalLength)/2.) ); const GeoShape* sg10hont = new GeoTrd(g10thi/2., g10thi/2., longWidth/2., upWidth/2., (physicalLength-maxwLength)/2.); - sg10hon = &( (sg10hon->add( (*sg10hont) << HepGeom::TranslateZ3D(physicalLength/2.) ) ) - << HepGeom::TranslateZ3D((maxwLength - physicalLength)/2.) ); + sg10hon = &( (sg10hon->add( (*sg10hont) << GeoTrf::TranslateZ3D(physicalLength/2.) ) ) + << GeoTrf::TranslateZ3D((maxwLength - physicalLength)/2.) ); } // const GeoMaterial* mhon = matManager->getMaterial("muo::Honeycomb"); const GeoLogVol* lhon = new GeoLogVol("Honeycomb",shon,mhon); @@ -134,8 +135,8 @@ CscMultiLayer::build(int /*cutoutson*/, std::vector<Cutout*> /*vcutdef*/) gShortWidth/2., gLongWidth/2., gmaxwLength/2.); const GeoShape* sgast = new GeoTrd(gasThickness/2.,gasThickness/2., gLongWidth/2., gupWidth/2., (gLength-gmaxwLength)/2.); - sgas = &( (sgas->add( (*sgast) << HepGeom::TranslateZ3D(gLength/2.) ) ) - << HepGeom::TranslateZ3D((gmaxwLength - gLength)/2.) ); + sgas = &( (sgas->add( (*sgast) << GeoTrf::TranslateZ3D(gLength/2.) ) ) + << GeoTrf::TranslateZ3D((gmaxwLength - gLength)/2.) ); } const GeoMaterial* mgas = matManager->getMaterial("muo::CscArCO2"); const GeoLogVol* lgas = NULL; @@ -145,7 +146,7 @@ CscMultiLayer::build(int /*cutoutson*/, std::vector<Cutout*> /*vcutdef*/) for (int i = 0; i < nrOfLayers+1; i++) { GeoNameTag* np = new GeoNameTag("panel"); - GeoTransform* xp = new GeoTransform(HepGeom::TranslateX3D(newpos-g10thi/2.)); + GeoTransform* xp = new GeoTransform(GeoTrf::TranslateX3D(newpos-g10thi/2.)); pml->add(new GeoIdentifierTag(i)); pml->add(np); pml->add(xp); @@ -158,7 +159,7 @@ CscMultiLayer::build(int /*cutoutson*/, std::vector<Cutout*> /*vcutdef*/) // the gas Gap // correct the position within the chamber GeoNameTag* ng = new GeoNameTag("CscArCO2"); - GeoTransform* xg = new GeoTransform(HepGeom::TranslateX3D(newpos-gasThickness/2.)); + GeoTransform* xg = new GeoTransform(GeoTrf::TranslateX3D(newpos-gasThickness/2.)); pml->add(new GeoIdentifierTag(i)); pml->add(ng); pml->add(xg); diff --git a/MuonSpectrometer/MuonGeoModel/src/Cutout.cxx b/MuonSpectrometer/MuonGeoModel/src/Cutout.cxx index e69b18e0714..cc232c57233 100755 --- a/MuonSpectrometer/MuonGeoModel/src/Cutout.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/Cutout.cxx @@ -9,8 +9,8 @@ #include "GeoModelKernel/GeoTrap.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoShapeShift.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" namespace MuonGM { @@ -51,7 +51,7 @@ const GeoShape* Cutout::build() // std::cout << "translate 0, "<<dx<<", "<<zpos<<std::endl; // std::cout << "widthXl="<<widthXl<<" widthXs="<<widthXs<<" lengthY=" // <<lengthY<<" excent="<<excent<<" dead1="<<dead1<<std::endl; - HepGeom::Transform3D xfTemp = HepGeom::Translate3D(0.,dx,zpos); + GeoTrf::Transform3D xfTemp = GeoTrf::Translate3D(0.,dx,zpos); const GeoShape *sCutout; /* // This is just to make sure we are putting stuff in the right place: @@ -79,15 +79,15 @@ const GeoShape* Cutout::build() double alpha = atan(2.*excent/lengthY); // polar and azimuthal angles of vector describing offset of // cutout planes: - double theta = -dead1*CLHEP::degree; - double phi = -90.*CLHEP::degree; + double theta = -dead1*GeoModelKernelUnits::degree; + double phi = -90.*GeoModelKernelUnits::degree; // GeoPara requires the +/- z faces be parallel to the x-y plane, // so choose x = width, y=length, z=thickness: GeoPara *cutoutpara = new GeoPara(widthXs/2.,lengthY/2.,thickness/2., alpha,theta,phi); // now rotate it so thickness is x-axis, width is y-axis, length z-axis: - HepGeom::Transform3D xRot = HepGeom::RotateX3D(-90.*CLHEP::degree)* - HepGeom::RotateY3D(-90.*CLHEP::degree); + GeoTrf::Transform3D xRot = GeoTrf::RotateX3D(-90.*GeoModelKernelUnits::degree)* + GeoTrf::RotateY3D(-90.*GeoModelKernelUnits::degree); xfTemp = xfTemp * xRot; sCutout = & ( (*cutoutpara) <<xfTemp); cutoutpara->ref(); @@ -95,7 +95,7 @@ const GeoShape* Cutout::build() } else { - GeoTrap *cutouttrap = new GeoTrap(thickness/2.,dead1*CLHEP::degree,90.*CLHEP::degree, + GeoTrap *cutouttrap = new GeoTrap(thickness/2.,dead1*GeoModelKernelUnits::degree,90.*GeoModelKernelUnits::degree, excent,widthXs/2.,widthXl/2., atan((2.*excent+(widthXl-widthXs)/2.)/ lengthY), @@ -104,8 +104,8 @@ const GeoShape* Cutout::build() lengthY) ); // now rotate it so thickness is x-axis, width is y-axis, length z-axis: - HepGeom::Transform3D xRot = HepGeom::RotateX3D(-90.*CLHEP::degree)* - HepGeom::RotateY3D(-90.*CLHEP::degree); + GeoTrf::Transform3D xRot = GeoTrf::RotateX3D(-90.*GeoModelKernelUnits::degree)* + GeoTrf::RotateY3D(-90.*GeoModelKernelUnits::degree); xfTemp = xfTemp * xRot; sCutout = & ( (*cutouttrap) <<xfTemp); cutouttrap->ref(); diff --git a/MuonSpectrometer/MuonGeoModel/src/DBReader.cxx b/MuonSpectrometer/MuonGeoModel/src/DBReader.cxx index 4e845660f79..b8d4ca5d410 100755 --- a/MuonSpectrometer/MuonGeoModel/src/DBReader.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/DBReader.cxx @@ -4,7 +4,6 @@ #include "MuonGeoModel/DBReader.h" #include "StoreGate/StoreGateSvc.h" -#include "CLHEP/Units/SystemOfUnits.h" // #include "MuonGeoModel/TgcReadoutParams.h" diff --git a/MuonSpectrometer/MuonGeoModel/src/Ded.cxx b/MuonSpectrometer/MuonGeoModel/src/Ded.cxx index 09134318072..51821178ca2 100755 --- a/MuonSpectrometer/MuonGeoModel/src/Ded.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/Ded.cxx @@ -15,6 +15,7 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoShapeSubtraction.h" #include "GeoModelKernel/GeoShapeIntersection.h" +#include "GeoModelKernel/GeoDefinitions.h" #define skip_ded false @@ -77,12 +78,12 @@ GeoVPhysVol* Ded::build(int cutoutson, GeoPhysVol* tempPhys = 0; Cutout* cut = 0; GeoShape* cutoutShape = 0; - HepGeom::Transform3D cutTrans; + GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()}; for (unsigned i = 0; i < vcutdef.size(); i++) { cut = vcutdef[i]; cutoutShape = new GeoTrd(thickness/2.+1., thickness/2.+1., cut->widthXs/2., cut->widthXl/2., cut->lengthY/2.); - cutTrans = HepGeom::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); + cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); GeoCutVolAction cutAction(*cutoutShape, cutTrans); pded->apply(&cutAction); diff --git a/MuonSpectrometer/MuonGeoModel/src/DriftTube.cxx b/MuonSpectrometer/MuonGeoModel/src/DriftTube.cxx index faf46ffe51f..f891c497394 100755 --- a/MuonSpectrometer/MuonGeoModel/src/DriftTube.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/DriftTube.cxx @@ -10,6 +10,7 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoSerialDenominator.h" #include "GeoModelKernel/GeoNameTag.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "MuonGeoModel/MYSQL.h" #include "MuonGeoModel/MDT_Technology.h" #include <iostream> @@ -32,9 +33,9 @@ DriftTube::DriftTube(std::string n): DetectorElement(n), plugLength = md->tubeEndPlugLength; // std::cout<<" drift tube gasR, outerR, plugL "<<gasRadius<<" "<<outerRadius<<" "<<plugLength<<std::endl; -// outerRadius=1.5*CLHEP::cm; -// gasRadius=1.46*CLHEP::cm; -// plugLength=7*CLHEP::cm; +// outerRadius=1.5*GeoModelKernelUnits::cm; +// gasRadius=1.46*GeoModelKernelUnits::cm; +// plugLength=7*GeoModelKernelUnits::cm; } GeoVPhysVol *DriftTube::build() @@ -55,8 +56,8 @@ GeoVPhysVol *DriftTube::build() GeoPhysVol *pgas = new GeoPhysVol(lgas); GeoSerialDenominator *plugDenominator= new GeoSerialDenominator("Tube Endplug"); - GeoTransform *ec0X = new GeoTransform(HepGeom::TranslateZ3D(+(length-plugLength)/2)); - GeoTransform *ec1X = new GeoTransform(HepGeom::TranslateZ3D(-(length-plugLength)/2)); + GeoTransform *ec0X = new GeoTransform(GeoTrf::TranslateZ3D(+(length-plugLength)/2)); + GeoTransform *ec1X = new GeoTransform(GeoTrf::TranslateZ3D(-(length-plugLength)/2)); std::string sGasName = "SensitiveGas"; GeoNameTag *gasDenominator = new GeoNameTag(sGasName); @@ -79,7 +80,7 @@ void DriftTube::print() std::cout << " Tube material : " << tubeMaterial.c_str() << std::endl; std::cout << " Radius : " << outerRadius << std::endl; std::cout << " Length : " << length; - std::cout << " Thickness : " << outerRadius-gasRadius << " CLHEP::mm" << std::endl; + std::cout << " Thickness : " << outerRadius-gasRadius << " mm" << std::endl; std::cout << " Gas material : " << gasMaterial.c_str() << std::endl; std::cout << " EP length : " << plugLength << std::endl; } diff --git a/MuonSpectrometer/MuonGeoModel/src/MMSpacer.cxx b/MuonSpectrometer/MuonGeoModel/src/MMSpacer.cxx index d6f767dba96..8c863fbc34a 100755 --- a/MuonSpectrometer/MuonGeoModel/src/MMSpacer.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/MMSpacer.cxx @@ -20,6 +20,7 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" // for cutouts: #include "GeoModelKernel/GeoShapeSubtraction.h" #include "GeoModelKernel/GeoShapeIntersection.h" @@ -68,9 +69,8 @@ MMSpacer::build(int minimalgeo, int , std::vector<Cutout*> ) double dy=t->lowZCutOutWidth; double dz=t->lowZCutOutDZ; const GeoShape* sbox = new GeoTrd(thickness,thickness,dy,dy,dz); - HepGeom::Transform3D cut1,cut2; - cut1=HepGeom::Translate3D(0.0, -width/2., -length/2.); - cut2=HepGeom::Translate3D(0.0, width/2., -length/2.); + GeoTrf::Translate3D cut1(0.0, -width/2., -length/2.); + GeoTrf::Translate3D cut2(0.0, width/2., -length/2.); strd= &(strd->subtract( (*sbox) << cut1 )); strd= &(strd->subtract( (*sbox) << cut2 )); } @@ -79,9 +79,8 @@ MMSpacer::build(int minimalgeo, int , std::vector<Cutout*> ) double dy=t->highZCutOutWidth; double dz=t->highZCutOutDZ; const GeoShape* sbox = new GeoTrd(thickness,thickness,dy,dy,dz); - HepGeom::Transform3D cut1,cut2; - cut1=HepGeom::Translate3D(0.0, -longWidth/2., length/2.); - cut2=HepGeom::Translate3D(0.0, longWidth/2., length/2.); + GeoTrf::Translate3D cut1(0.0, -longWidth/2., length/2.); + GeoTrf::Translate3D cut2(0.0, longWidth/2., length/2.); strd= &(strd->subtract( (*sbox) << cut1 )); strd= &(strd->subtract( (*sbox) << cut2 )); } diff --git a/MuonSpectrometer/MuonGeoModel/src/Micromegas.cxx b/MuonSpectrometer/MuonGeoModel/src/Micromegas.cxx index ee45d1536be..e87668f7c33 100755 --- a/MuonSpectrometer/MuonGeoModel/src/Micromegas.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/Micromegas.cxx @@ -21,6 +21,7 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" // for cutouts: #include "GeoModelKernel/GeoShapeSubtraction.h" #include "GeoModelKernel/GeoShapeIntersection.h" @@ -78,9 +79,6 @@ Micromegas::build(int minimalgeo, int , std::vector<Cutout*> ) longWidth/2, length/2); - HepGeom::Transform3D cut1,cut2,cut3,cut4; - - logVolName=name; if (!(m_component->subType).empty()) logVolName+=("-"+m_component->subType); const GeoMaterial* mtrd = matManager->getMaterial("sct::PCB"); @@ -118,7 +116,7 @@ Micromegas::build(int minimalgeo, int , std::vector<Cutout*> ) double newXPos=newpos; const GeoShape* sGasVolume = new GeoTrd(gasTck/2, gasTck/2, widthActive/2, - longWidthActive/2, lengthActive/2); + longWidthActive/2, lengthActive/2); @@ -126,36 +124,35 @@ Micromegas::build(int minimalgeo, int , std::vector<Cutout*> ) matManager->getMaterial("muo::ArCO2")); GeoPhysVol* ptrdtmp = new GeoPhysVol(ltrdtmp); GeoNameTag* ntrdtmp = new GeoNameTag(name+"muo::ArCO2"); - GeoTransform* ttrdtmp = new GeoTransform(HepGeom::TranslateX3D(newXPos)); + GeoTransform* ttrdtmp = new GeoTransform(GeoTrf::TranslateX3D(newXPos)); // Place gas volume inside G10 mother volume so that // subtractions from gas volume now become G10 - + ptrd->add(ntrdtmp); ptrd->add(ttrdtmp); ptrd->add(ptrdtmp); - - double lW=longWidth/2.-((longWidth-width)/2.)*f1/length; - double W=width/2.+((longWidth-width)/2.)*f2/length; - const GeoShape* trd1 = new GeoTrd(gasTck/2,gasTck/2, width/2, - longWidth/2, length/2); - const GeoShape* trd2 = new GeoTrd(gasTck,gasTck, W-f3, - lW-f3, length/2-(f1+f2)/2.); - HepGeom::Transform3D c; - c=HepGeom::Translate3D(0,0,(f2-f1)/2.); - trd1= &(trd1->subtract( (*trd2) << c )); - GeoLogVol* ltrdframe = new GeoLogVol("MM_Frame", trd1, - matManager->getMaterial("std::Aluminium")); - GeoPhysVol* ptrdframe = new GeoPhysVol(ltrdframe); - - ptrdtmp->add(ptrdframe); - - + + double lW=longWidth/2.-((longWidth-width)/2.)*f1/length; + double W=width/2.+((longWidth-width)/2.)*f2/length; + const GeoShape* trd1 = new GeoTrd(gasTck/2,gasTck/2, width/2, + longWidth/2, length/2); + const GeoShape* trd2 = new GeoTrd(gasTck,gasTck, W-f3, + lW-f3, length/2-(f1+f2)/2.); + GeoTrf::Translate3D c(0,0,(f2-f1)/2.); + trd1= &(trd1->subtract( (*trd2) << c )); + GeoLogVol* ltrdframe = new GeoLogVol("MM_Frame", trd1, + matManager->getMaterial("std::Aluminium")); + GeoPhysVol* ptrdframe = new GeoPhysVol(ltrdframe); + + ptrdtmp->add(ptrdframe); + + iSenLyr++; - + } // Loop over tgc layers - + return ptrd; } diff --git a/MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx b/MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx index faa950aa33b..d928e6b937b 100755 --- a/MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/MultiLayer.cxx @@ -19,8 +19,9 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoSerialIdentifier.h" -#include "CLHEP/Geometry/Transform3D.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoGenericFunctions/Variable.h" // for cutouts #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoShapeShift.h" @@ -87,11 +88,11 @@ GeoFullPhysVol* MultiLayer::build() if (foamthicknessup > foamthicknesslow) { foamthicknesslow = 0.; - if (fabs(foamthicknessup - 15*CLHEP::mm) < 0.1) foamthicknessup = 15*CLHEP::mm; - else if (fabs(foamthicknessup - 30.75*CLHEP::mm) < 0.1) foamthicknessup = 30.75*CLHEP::mm; - else if (fabs(foamthicknessup - 30.00*CLHEP::mm) < 0.1) foamthicknessup = 30.00*CLHEP::mm; - else if (fabs(foamthicknessup - 10.00*CLHEP::mm) < 0.1 - && logVolName.find("BMG") != std::string::npos ) foamthicknessup = 10.00*CLHEP::mm; + if (fabs(foamthicknessup - 15*GeoModelKernelUnits::mm) < 0.1) foamthicknessup = 15*GeoModelKernelUnits::mm; + else if (fabs(foamthicknessup - 30.75*GeoModelKernelUnits::mm) < 0.1) foamthicknessup = 30.75*GeoModelKernelUnits::mm; + else if (fabs(foamthicknessup - 30.00*GeoModelKernelUnits::mm) < 0.1) foamthicknessup = 30.00*GeoModelKernelUnits::mm; + else if (fabs(foamthicknessup - 10.00*GeoModelKernelUnits::mm) < 0.1 + && logVolName.find("BMG") != std::string::npos ) foamthicknessup = 10.00*GeoModelKernelUnits::mm; else if ( logVolName == "BME1MDT09" || logVolName == "BME2MDT09" ) { //@@ foamthicknesslow = 0.; foamthicknessup = 0.; @@ -102,11 +103,11 @@ GeoFullPhysVol* MultiLayer::build() } else { foamthicknessup = 0.; - if (fabs(foamthicknesslow - 15*CLHEP::mm) < 0.1) foamthicknesslow = 15*CLHEP::mm; - else if (fabs(foamthicknesslow - 30.75*CLHEP::mm) < 0.1) foamthicknesslow = 30.75*CLHEP::mm; - else if (fabs(foamthicknesslow - 30.00*CLHEP::mm) < 0.1) foamthicknesslow = 30.00*CLHEP::mm; - else if (fabs(foamthicknesslow - 10.00*CLHEP::mm) < 0.1 - && logVolName.find("BMG") != std::string::npos ) foamthicknesslow = 10.00*CLHEP::mm; + if (fabs(foamthicknesslow - 15*GeoModelKernelUnits::mm) < 0.1) foamthicknesslow = 15*GeoModelKernelUnits::mm; + else if (fabs(foamthicknesslow - 30.75*GeoModelKernelUnits::mm) < 0.1) foamthicknesslow = 30.75*GeoModelKernelUnits::mm; + else if (fabs(foamthicknesslow - 30.00*GeoModelKernelUnits::mm) < 0.1) foamthicknesslow = 30.00*GeoModelKernelUnits::mm; + else if (fabs(foamthicknesslow - 10.00*GeoModelKernelUnits::mm) < 0.1 + && logVolName.find("BMG") != std::string::npos ) foamthicknesslow = 10.00*GeoModelKernelUnits::mm; else if ( logVolName == "BME1MDT09" || logVolName == "BME2MDT09" ) { //@@ foamthicknesslow = 0.; foamthicknessup = 0.; @@ -147,7 +148,7 @@ GeoFullPhysVol* MultiLayer::build() lengthPos = -length/2. + sum_len + submllength; sum_len += 2.*submllength; double widthPos = cutoutXtubes[isub]; - HepGeom::Transform3D submlpos = HepGeom::Translate3D(0.,widthPos,lengthPos); + GeoTrf::Transform3D submlpos = GeoTrf::Translate3D(0.,widthPos,lengthPos); const GeoTrd* tempSLay = NULL; const GeoShape* tempSLay1 = NULL; @@ -238,41 +239,41 @@ GeoFullPhysVol* MultiLayer::build() const GeoShape* stube = NULL; double tL = longWidth/2.0 - (tubePitch/2.)*TrdDwoverL; stube = new GeoTube(0.0, tubePitch/2., tL); - stube = & ( (*stube) << HepGeom::RotateX3D(90.*CLHEP::deg) ); + stube = & ( (*stube) << GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) ); const GeoShape* stubewithcut = NULL; if (cutoutNsteps > 1) { double toptubelength = cutoutTubeLength[cutoutNsteps-1]; if (cutoutFullLength[cutoutNsteps-1]) toptubelength = longWidth; stubewithcut = new GeoTube(0.0, tubePitch/2., toptubelength/2.0); - stubewithcut = & ( (*stubewithcut) << HepGeom::RotateX3D(90.*CLHEP::deg) ); + stubewithcut = & ( (*stubewithcut) << GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) ); } GeoShape* sbox = new GeoTrd(mdtthickness, mdtthickness, longWidth, longWidth, tubePitch/2.); GeoShape* sboxf = new GeoTrd(mdtthickness, mdtthickness, longWidth, - longWidth, tubePitch/4.+1*CLHEP::mm); - slay = &(slay->subtract( (*sbox)<<HepGeom::Translate3D(0.,0.,length/2.))); + longWidth, tubePitch/4.+1*GeoModelKernelUnits::mm); + slay = &(slay->subtract( (*sbox)<<GeoTrf::Translate3D(0.,0.,length/2.))); for (int i = 0; i < nrOfLayers; i++) { - if (xx[i] > tubePitch/2. + 10.*CLHEP::mm) { + if (xx[i] > tubePitch/2. + 10.*GeoModelKernelUnits::mm) { // subtract tube at the start if (verbose_multilayer) std::cout << " Cutting tube at xx = " << yy[i] << " z = " << -length/2. << std::endl; - slay = &(slay->subtract( (*stube)<<HepGeom::Translate3D(-mdtthickness/2.+yy[i],0.,-length/2.) )); + slay = &(slay->subtract( (*stube)<<GeoTrf::Translate3D(-mdtthickness/2.+yy[i],0.,-length/2.) )); // add tube at the end // distinguish stations with/without cutouts if (cutoutNsteps == 1) { // no cutouts if (verbose_multilayer) std::cout << " Adding tube at xx = " << yy[i] << " z = " << length/2. << std::endl; - slay = &(slay->add( (*stube)<<HepGeom::Translate3D(-mdtthickness/2.+yy[i],0.,length/2.-tubePitch/2.) )); + slay = &(slay->add( (*stube)<<GeoTrf::Translate3D(-mdtthickness/2.+yy[i],0.,length/2.-tubePitch/2.) )); } else { // there are cutouts if (verbose_multilayer) std::cout << " Adding tube at xx = " << yy[i] << " y(cutout!) = " << cutoutXtubes[cutoutNsteps-1] << " z = " << length/2. << std::endl; slay = &(slay->add( (*stubewithcut) - <<HepGeom::Translate3D(-mdtthickness/2.+yy[i], + <<GeoTrf::Translate3D(-mdtthickness/2.+yy[i], cutoutXtubes[cutoutNsteps-1], length/2.-tubePitch/2.) )); } @@ -297,7 +298,7 @@ GeoFullPhysVol* MultiLayer::build() sfoam = new GeoTrd(foamthicknesslow/2.-eps, foamthicknesslow/2.-eps, width/2.-eps, longWidth/2.-eps, length/2.); } - sfoam = &(sfoam->subtract( (*sboxf)<<HepGeom::Translate3D(0.,0.,length/2.-tubePitch/4.))); + sfoam = &(sfoam->subtract( (*sboxf)<<GeoTrf::Translate3D(0.,0.,length/2.-tubePitch/4.))); mfoam = matManager->getMaterial("muo::Foam"); lfoam = new GeoLogVol("MultiLayerFoam", sfoam, mfoam); @@ -309,7 +310,7 @@ GeoFullPhysVol* MultiLayer::build() sfoam = new GeoTrd(foamthicknessup/2.-eps, foamthicknessup/2.-eps, width/2.-eps, longWidth/2.-eps, length/2.); } - sfoam = &(sfoam->subtract( (*sboxf)<<HepGeom::Translate3D(0.,0.,length/2.-tubePitch/4.))); + sfoam = &(sfoam->subtract( (*sboxf)<<GeoTrf::Translate3D(0.,0.,length/2.-tubePitch/4.))); mfoam = matManager->getMaterial("muo::Foam"); lfoam = new GeoLogVol("MultiLayerFoam", sfoam, mfoam); @@ -322,7 +323,7 @@ GeoFullPhysVol* MultiLayer::build() if ( logVolName != "BME1MDT09" && logVolName != "BME2MDT09" ) { //@@ pfoam = new GeoPhysVol(lfoam); - GeoTransform* xf = new GeoTransform (HepGeom::TranslateX3D(foamposition)); + GeoTransform* xf = new GeoTransform (GeoTrf::TranslateX3D(foamposition)); GeoNameTag* nt = new GeoNameTag(name+" MultiLayerFoam"); play->add(new GeoIdentifierTag(0)); play->add(nt); @@ -530,10 +531,10 @@ GeoFullPhysVol* MultiLayer::build() if (nt > 0 && !internalCutoutBMG[j]) { loffset = nttot*tubePitch; lstart = loffset - length/2. + xx[i]; - Genfun::Variable K; - Genfun::GENFUNCTION f = tubePitch*K + lstart; - TRANSFUNCTION t = HepGeom::TranslateY3D(0.)*HepGeom::RotateX3D(90*CLHEP::deg)* - HepGeom::TranslateX3D(tstart)*Pow(HepGeom::TranslateY3D(1.0),f); + GeoGenfun::Variable K; + GeoGenfun::GENFUNCTION f = tubePitch*K + lstart; + TRANSFUNCTION t = GeoTrf::TranslateY3D(0.)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg)* + GeoTrf::TranslateX3D(tstart)*Pow(GeoTrf::TranslateY3D(1.0),f); GeoSerialTransformer* s = new GeoSerialTransformer(tV,&t,nt); play->add(new GeoSerialIdentifier(100*(i+1)+nttot + 1)); play->add(s); @@ -592,10 +593,10 @@ GeoFullPhysVol* MultiLayer::build() if (nt > 0) { loffset = nttot*tubePitch; lstart = loffset - length/2. + xx[i]; - Genfun::Variable K; - Genfun::GENFUNCTION f = tubePitch*K + lstart; - TRANSFUNCTION t = HepGeom::TranslateY3D(dy)*HepGeom::RotateX3D(90*CLHEP::deg)* - HepGeom::TranslateX3D(tstart)*Pow(HepGeom::TranslateY3D(1.0),f); + GeoGenfun::Variable K; + GeoGenfun::GENFUNCTION f = tubePitch*K + lstart; + TRANSFUNCTION t = GeoTrf::TranslateY3D(dy)*GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg)* + GeoTrf::TranslateX3D(tstart)*Pow(GeoTrf::TranslateY3D(1.0),f); GeoSerialTransformer* s = new GeoSerialTransformer(tV,&t,nt); play->add(new GeoSerialIdentifier(100*(i+1)+nttot + 1)); play->add(s); @@ -617,10 +618,10 @@ GeoFullPhysVol* MultiLayer::build() lstart = -length/2. + xx[i]; // std::cout << " Tubes starting at t = " << tstart << " , y = " << lstart // << std::endl; - Genfun::Variable K; - Genfun::GENFUNCTION f = tubePitch*K + lstart; - TRANSFUNCTION t = HepGeom::RotateX3D(90*CLHEP::deg)*HepGeom::TranslateX3D(tstart)* - Pow(HepGeom::TranslateY3D(1.0),f); + GeoGenfun::Variable K; + GeoGenfun::GENFUNCTION f = tubePitch*K + lstart; + TRANSFUNCTION t = GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg)*GeoTrf::TranslateX3D(tstart)* + Pow(GeoTrf::TranslateY3D(1.0),f); GeoVPhysVol* tV = tubeVector[0]; GeoSerialTransformer* s = new GeoSerialTransformer(tV,&t,nrOfTubes); play->add(new GeoSerialIdentifier(100*(i+1)+1)); @@ -636,10 +637,10 @@ GeoFullPhysVol* MultiLayer::build() GeoVPhysVol* tV = tubeVector[j]; loffset = j*nrTubesPerStep*tubePitch; lstart = loffset - length/2. + xx[i]; - Genfun::Variable K; - Genfun::GENFUNCTION f = tubePitch*K + lstart; - TRANSFUNCTION t = HepGeom::RotateX3D(90*CLHEP::deg)*HepGeom::TranslateX3D(tstart)* - Pow(HepGeom::TranslateY3D(1.0),f); + GeoGenfun::Variable K; + GeoGenfun::GENFUNCTION f = tubePitch*K + lstart; + TRANSFUNCTION t = GeoTrf::RotateX3D(90*GeoModelKernelUnits::deg)*GeoTrf::TranslateX3D(tstart)* + Pow(GeoTrf::TranslateY3D(1.0),f); GeoSerialTransformer* s = new GeoSerialTransformer(tV,&t,nrTubesPerStep); play->add(new GeoSerialIdentifier(100*(i+1)+j*nrTubesPerStep + 1)); play->add(s); diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonChamber.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonChamber.cxx index 653b06bdddc..9b7ed80bb26 100755 --- a/MuonSpectrometer/MuonGeoModel/src/MuonChamber.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/MuonChamber.cxx @@ -5,6 +5,7 @@ #include "GaudiKernel/MsgStream.h" #include "AthenaKernel/getMessageSvc.h" // +#include "GeoPrimitives/GeoPrimitives.h" #include "MuonGeoModel/MuonChamber.h" #include "MuonGeoModel/Position.h" #include "MuonReadoutGeometry/MuonStation.h" @@ -62,7 +63,8 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeIntersection.h" #include "GeoModelKernel/GeoIdentifierTag.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include <vector> #include <fstream> #include <iomanip> @@ -136,7 +138,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, dx = extratop/2. - extrabottom/2.; if (verbose) log<<MSG::VERBOSE<<" m_station name "<<m_station->GetName()<<" extra top, bottom, dx = " <<extratop<<" "<<extrabottom<<endmsg; - strd = & ( (*maintrd) << HepGeom::Translate3D(dx, 0., 0.) ); + strd = & ( (*maintrd) << GeoTrf::Translate3D(dx, 0., 0.) ); } else { strd = maintrd; } @@ -163,7 +165,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, } GeoShape* box = new GeoBox(cthick/2., longWidth/2., (length-clen)/2.); box->ref(); - strd = &(strd->subtract( (*box) << HepGeom::Translate3D(cxpos, 0., cypos) ) ); + strd = &(strd->subtract( (*box) << GeoTrf::Translate3D(cxpos, 0., cypos) ) ); box->unref(); } @@ -188,7 +190,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, } GeoShape* box1 = new GeoBox(cutthick/2., (longWidth+2.)/2., cutlen); box1->ref(); - strd = &(strd->subtract( (*box1) << HepGeom::Translate3D( (totthick-cutthick)/2., 0., length/2.) ) ); + strd = &(strd->subtract( (*box1) << GeoTrf::Translate3D( (totthick-cutthick)/2., 0., length/2.) ) ); box1->unref(); } } @@ -225,15 +227,15 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, GeoShape* box = new GeoBox((totthick+2.)/2., (longWidth+2.)/2., halfpitch); box->ref(); const GeoShape* frontcyl = new GeoTube(0.0, halfpitch+0.001, longWidth/2.); - frontcyl = &( (*frontcyl) << HepGeom::RotateX3D(90.*CLHEP::deg) ); + frontcyl = &( (*frontcyl) << GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) ); frontcyl->ref(); const GeoShape* backcyl = new GeoTube(0.0, halfpitch-0.001, (longWidth+2.)/2.); - backcyl = &( (*backcyl) << HepGeom::RotateX3D(90.*CLHEP::deg) ); + backcyl = &( (*backcyl) << GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) ); backcyl->ref(); if (index > 0) { // If chamber has MDTs, shorten length by halfpitch (remove what was added in DBReader.h) - strd = &(strd->subtract( (*box) << HepGeom::Translate3D(0., 0., length/2.) ) ); + strd = &(strd->subtract( (*box) << GeoTrf::Translate3D(0., 0., length/2.) ) ); double sign = 1.; for (int i = 0; i < index; i++) { comp = (StandardComponent*)m_station->GetComponent(mdt_index[i]); @@ -242,19 +244,19 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, mdt_pos += amdbOrigine_along_thickness; xtube1 = sign*(mdt_half_thick - (root3 + 1.)*halfpitch); xtube2 = sign*(mdt_half_thick - (3*root3 + 1.)*halfpitch); - strd = &(strd->add( (*frontcyl) << HepGeom::Translate3D(mdt_pos+xtube1, 0., length/2.-halfpitch) ) ); - strd = &(strd->subtract( (*backcyl) << HepGeom::Translate3D(mdt_pos+xtube1, 0., -length/2.) ) ); + strd = &(strd->add( (*frontcyl) << GeoTrf::Translate3D(mdt_pos+xtube1, 0., length/2.-halfpitch) ) ); + strd = &(strd->subtract( (*backcyl) << GeoTrf::Translate3D(mdt_pos+xtube1, 0., -length/2.) ) ); if (stname == "BIL" || (stname == "BIS" && std::abs(zi) != 8) || testEIL) { - strd = &(strd->add( (*frontcyl) << HepGeom::Translate3D(mdt_pos+xtube2, 0., length/2.-halfpitch) ) ); - strd = &(strd->subtract( (*backcyl) << HepGeom::Translate3D(mdt_pos+xtube2, 0., -length/2.) ) ); + strd = &(strd->add( (*frontcyl) << GeoTrf::Translate3D(mdt_pos+xtube2, 0., length/2.-halfpitch) ) ); + strd = &(strd->subtract( (*backcyl) << GeoTrf::Translate3D(mdt_pos+xtube2, 0., -length/2.) ) ); } sign *= -1.; } } if (stname != "EIL") { - if (zi < 0 && !is_mirrored) strd = &( (*strd) << HepGeom::RotateX3D(180.*CLHEP::deg) ); + if (zi < 0 && !is_mirrored) strd = &( (*strd) << GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg) ); } box->unref(); @@ -317,21 +319,21 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, // of the cutouts wrt mother volume: if ( fabs(cut->dx-600.7)<0.1 ) { - cut->dx = cut->dx + 10.*CLHEP::mm; - cut->widthXs = cut->widthXs + 20.*CLHEP::mm; - cut->widthXl = cut->widthXl + 20.*CLHEP::mm; + cut->dx = cut->dx + 10.*GeoModelKernelUnits::mm; + cut->widthXs = cut->widthXs + 20.*GeoModelKernelUnits::mm; + cut->widthXl = cut->widthXl + 20.*GeoModelKernelUnits::mm; //std::cout<<" redefining par.s for BOG1 cutouts " //<<std::endl; } if ( fabs(cut->dx+600.7)<0.1 ) { - cut->dx = cut->dx - 10.*CLHEP::mm; - cut->widthXs = cut->widthXs + 20.*CLHEP::mm; - cut->widthXl = cut->widthXl + 20.*CLHEP::mm; + cut->dx = cut->dx - 10.*GeoModelKernelUnits::mm; + cut->widthXs = cut->widthXs + 20.*GeoModelKernelUnits::mm; + cut->widthXl = cut->widthXl + 20.*GeoModelKernelUnits::mm; } if (fabs(cut->lengthY-180.2)<0.001) { - cut->lengthY = cut->lengthY+(0.010)*CLHEP::mm; + cut->lengthY = cut->lengthY+(0.010)*GeoModelKernelUnits::mm; //imt std::cout<<"Redefining "<<stName<<" cut lengthY to " //imt <<cut->lengthY //imt <<std::endl; @@ -362,7 +364,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, if (stName.substr(0,1) == "T" && stName.substr(2,1) == "E" && stName.substr(1,1) != "4") { GeoTrd* strdoverlap = new GeoTrd(totthick/4, totthick/4, width/2, longWidth/2, 400./2); - strd = &(strd->subtract((*strdoverlap) << HepGeom::Translate3D(-totthick/4., 0., -length/2+400./2.) )); + strd = &(strd->subtract((*strdoverlap) << GeoTrf::Translate3D(-totthick/4., 0., -length/2+400./2.) )); } const GeoMaterial* mtrd = 0; @@ -557,7 +559,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, cut->dx = tempdx; cut->dy = tempdy; - if (fabs(cut->dead1) > 1. && techname=="MDT03") cut->dy = cut->dy+15.0*cos(cut->dead1*CLHEP::deg); + if (fabs(cut->dead1) > 1. && techname=="MDT03") cut->dy = cut->dy+15.0*cos(cut->dead1*GeoModelKernelUnits::deg); // should compensate for the dy position defined in amdb at the bottom of the foam in ML 1 of EMS1,3 and BOS 6 // can be applied only for layout >=r.04.04 in rel 15.6.X.Y due to the frozen Tier0 policy @@ -607,7 +609,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, if (stName.substr(0,3) == "BOS" && zi == -6 && type == "MDT") { cut->dy = c->dy - cut->dy - cut->lengthY - halfpitch; cut->dead1 = 30.; // why this is not 30. or -30. already ????? - if (techname=="MDT03") cut->dy = cut->dy + 30.0; // *cos(cut->dead1*CLHEP::deg); + if (techname=="MDT03") cut->dy = cut->dy + 30.0; // *cos(cut->dead1*GeoModelKernelUnits::deg); if (verbose) log <<MSG::VERBOSE <<"Cut dead1 for BOS 6 on C side is "<< cut->dead1<<endmsg; } @@ -621,7 +623,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, // reverse the position (x amdb) of the cutout if the m_station is mirrored Cutout* cutmirr = new Cutout(*cut); cutmirr->dx = - cutmirr->dx; - // this way, after the rotation by 180 CLHEP::deg, the cut will be at the same global phi + // this way, after the rotation by 180 GeoModelKernelUnits::deg, the cut will be at the same global phi // it has for the m_station at z>0 vcutdef.push_back(cutmirr); vcutdef_todel.push_back(cutmirr); @@ -672,9 +674,9 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, << endmsg; // define here the total transform that will be applied to component: - HepGeom::Transform3D htcomponent; - GeoTransform* xfcomponent = NULL; - GeoAlignableTransform * xfaligncomponent = NULL; + GeoTrf::Transform3D htcomponent(GeoTrf::Transform3D::Identity()); + GeoTransform* xfcomponent{nullptr}; + GeoAlignableTransform * xfaligncomponent{nullptr}; // // for RPCs we need a vector of transforms for M28 geometry... // std::vector<GeoTransform*> xfrpccomponent; @@ -684,22 +686,22 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, } if (type == "MDT") { - htcomponent = HepGeom::TranslateX3D(ypos)*HepGeom::TranslateZ3D(zpos)*HepGeom::TranslateY3D(xpos); + htcomponent = GeoTrf::TranslateX3D(ypos)*GeoTrf::TranslateZ3D(zpos)*GeoTrf::TranslateY3D(xpos); if (zi < 0 && !is_mirrored && stName[0] == 'B') { // this (rotation + shift of halfpitch) will mirror the tube structure w.r.t. the chamber at z>0 - htcomponent = htcomponent*HepGeom::RotateX3D(180.*CLHEP::deg); - htcomponent = htcomponent*HepGeom::TranslateZ3D(halfpitch); + htcomponent = htcomponent*GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); + htcomponent = htcomponent*GeoTrf::TranslateZ3D(halfpitch); } // ss - 24-05-2006 I don't really understand if this is needed at all // it was introduced by Isabel T. if (zi < 0 && stName.substr(0,3) == "BOG" && is_mirrored) { - // htcomponent = htcomponent*HepGeom::RotateX3D(180.*CLHEP::deg); + // htcomponent = htcomponent*GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); // tubes OK but chambers wrong - // htcomponent = HepGeom::RotateX3D(180.*CLHEP::deg)*htcomponent; + // htcomponent = GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg)*htcomponent; // chambers OK but tubes wrong - htcomponent = HepGeom::RotateX3D(180.*CLHEP::deg)*htcomponent* - HepGeom::RotateX3D(180.*CLHEP::deg); // turn chambers but go back for tubes + htcomponent = GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg)*htcomponent* + GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); // turn chambers but go back for tubes } // ss - 24-05-2006 I don't really understand if this is needed at all xfaligncomponent = new GeoAlignableTransform(htcomponent); @@ -763,7 +765,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, continue; } - htcomponent = HepGeom::TranslateX3D(ypos)*HepGeom::TranslateZ3D(zpos); + htcomponent = GeoTrf::TranslateX3D(ypos)*GeoTrf::TranslateZ3D(zpos); xfcomponent = new GeoTransform(htcomponent); std::string key = stName+techname; if ((manager->IncludeCutoutsFlag()|| @@ -830,9 +832,9 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, } // if (!is_mirrored) { - htcomponent = HepGeom::Translate3D(xpos,ypos,zpos)*HepGeom::RotateX3D(angle); + htcomponent = GeoTrf::Translate3D(xpos,ypos,zpos)*GeoTrf::RotateX3D(angle); } else { - htcomponent = HepGeom::Translate3D(xpos,-ypos,zpos)*HepGeom::RotateX3D(-angle); + htcomponent = GeoTrf::Translate3D(xpos,-ypos,zpos)*GeoTrf::RotateX3D(-angle); } xfcomponent = new GeoTransform(htcomponent); std::string key = stName+techname; @@ -897,8 +899,8 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, // for (int j = 0; j < ndivz; j++) { // double yposi = (ndivy-1)*rwidth/2.; // for (int i = 0; i < ndivy; i++) { -// htcomponent = HepGeom::TranslateX3D(ypos )*HepGeom::TranslateY3D(yposi)* -// HepGeom::TranslateZ3D(zposi); +// htcomponent = GeoTrf::TranslateX3D(ypos )*GeoTrf::TranslateY3D(yposi)* +// GeoTrf::TranslateZ3D(zposi); // xfcomponent = new GeoTransform(htcomponent); // //xfrpccomponent.push_back(xfcomponent); // yposi -= rwidth; @@ -920,11 +922,11 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, << " ypos, zpos " << ypos << " " << zpos << " " << endmsg; - htcomponent = HepGeom::TranslateX3D(ypos)* - HepGeom::TranslateY3D(xpos)*HepGeom::TranslateZ3D(zpos); + htcomponent = GeoTrf::TranslateX3D(ypos)* + GeoTrf::TranslateY3D(xpos)*GeoTrf::TranslateZ3D(zpos); if (rp->iswap == -1) // this is like amdb iswap { - htcomponent = htcomponent*HepGeom::RotateY3D(180*CLHEP::deg); + htcomponent = htcomponent*GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg); } xfaligncomponent = new GeoAlignableTransform(htcomponent); //xfrpccomponent.push_back(xfcomponent); @@ -982,9 +984,9 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, } else if (type=="DED" && manager->MinimalGeoFlag() == 0) { double xpos = c->posx; if (is_mirrored) xpos = -xpos; - htcomponent = HepGeom::TranslateX3D(ypos)*HepGeom::TranslateY3D(xpos)*HepGeom::TranslateZ3D(zpos); + htcomponent = GeoTrf::TranslateX3D(ypos)*GeoTrf::TranslateY3D(xpos)*GeoTrf::TranslateZ3D(zpos); //if (stname == "BMS" && (zi == -2 || zi == -4) && c->name == "DED03") - // htcomponent = htcomponent*HepGeom::RotateY3D(180*CLHEP::deg); + // htcomponent = htcomponent*GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg); xfcomponent = new GeoTransform(htcomponent); bool dedCutoutFlag = (stname == "BOS" && std::abs(zi) == 6) || @@ -1045,8 +1047,8 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, // log<<MSG::DEBUG<<" its centre x-translated by "<<ypos; // log<<" y-translated by "<<xpos; // log<<" z-translated by "<<zpos<<endmsg; - htcomponent = HepGeom::TranslateX3D(ypos)*HepGeom::TranslateY3D(xpos)* - HepGeom::TranslateZ3D(zpos); + htcomponent = GeoTrf::TranslateX3D(ypos)*GeoTrf::TranslateY3D(xpos)* + GeoTrf::TranslateZ3D(zpos); std::string key = stName+techname; if ((manager->IncludeCutoutsFlag() || (manager->IncludeCutoutsBogFlag() && stName.substr(0,3)=="BOG")) @@ -1082,7 +1084,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, double orad = tgOuter->posy + tgOuter->dy; double start = -(orad-irad)/2. + (tg->posy-irad) + tg->dy/2; double xstart = -thickness/2. + tg->GetThickness()/2.; - htcomponent = HepGeom::TranslateX3D(xstart + tg->posz)*HepGeom::TranslateZ3D(start); + htcomponent = GeoTrf::TranslateX3D(xstart + tg->posz)*GeoTrf::TranslateZ3D(start); xfaligncomponent = new GeoAlignableTransform(htcomponent); // Define key for this TGC component @@ -1121,7 +1123,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, } } else if (type=="CSC") { - htcomponent = HepGeom::TranslateX3D(ypos)*HepGeom::TranslateZ3D(zpos); + htcomponent = GeoTrf::TranslateX3D(ypos)*GeoTrf::TranslateZ3D(zpos); xfaligncomponent = new GeoAlignableTransform(htcomponent); // Here define the key for this CSC component std::string key = stName+techname; @@ -1195,7 +1197,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, (xfcomponent->getTransform())[2][2] << " " << (xfcomponent->getTransform())[2][3] << " " << std::endl; */ - xfaligncomponent->setDelta(HepGeom::Transform3D::Identity); + xfaligncomponent->setDelta(GeoTrf::Transform3D::Identity()); //delete xfcomponent; ptrd->add(xfaligncomponent); ptrd->add(lvm); @@ -1243,7 +1245,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, // std::cout << "(" << dumv.x() << ", " << dumv.y() << ", " << dumv.z() // << ")" << std::endl; // std::cout << " Mdtreadoutelement transform = " << std::endl; - // HepGeom::Transform3D dummy=det->transform(id); + // GeoTrf::Transform3D dummy=det->transform(id); // std::cout << dummy[0][0] << " " << dummy[0][1] << " " // << dummy[0][2] << " " << dummy[0][3] << std::endl // << dummy[1][0] << " " << dummy[1][1] << " " @@ -1287,7 +1289,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, (xfcomponent->getTransform())[2][2] << " " << (xfcomponent->getTransform())[2][3] << " " << std::endl; */ - xfaligncomponent->setDelta(HepGeom::Transform3D::Identity); + xfaligncomponent->setDelta(GeoTrf::Transform3D::Identity()); //delete xfcomponent; ptrd->add(xfaligncomponent); ptrd->add(lvc); @@ -1357,7 +1359,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, } ptrd->add(new GeoIdentifierTag(geoid)); ptrd->add(nm); - xfaligncomponent->setDelta(HepGeom::Transform3D::Identity); + xfaligncomponent->setDelta(GeoTrf::Transform3D::Identity()); //delete xfcomponent; ptrd->add(xfaligncomponent); ptrd->add(lvt); @@ -1427,8 +1429,8 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, // <<"ypos, zpos, ndivz, ndivy " // <<ypos<<" "<<zpos<<" " // <<ndivz << " " << ndivy <<endmsg; - //htcomponent = HepGeom::TranslateX3D(ypos)*HepGeom::TranslateY3D(xpos) - // *HepGeom::TranslateZ3D(zpos); + //htcomponent = GeoTrf::TranslateX3D(ypos)*GeoTrf::TranslateY3D(xpos) + // *GeoTrf::TranslateZ3D(zpos); // xfcomponent = new GeoTransform(htcomponent); const RpcIdHelper* rpc_id = manager->rpcIdHelper(); @@ -1448,25 +1450,25 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, if (zi <= 0 && !is_mirrored) { // the special cases doubletZ = 1; - if (zpos<-zdivision*CLHEP::mm) doubletZ=2; - if (fabs(xpos) > 100.*CLHEP::mm && ndbz[doubletR-1] > 2) { + if (zpos<-zdivision*GeoModelKernelUnits::mm) doubletZ=2; + if (fabs(xpos) > 100.*GeoModelKernelUnits::mm && ndbz[doubletR-1] > 2) { doubletZ = 3; nfields++; } - if (fabs(xpos) > 100.*CLHEP::mm ) ndbz[doubletR-1]--; + if (fabs(xpos) > 100.*GeoModelKernelUnits::mm ) ndbz[doubletR-1]--; } else { doubletZ = 1; - if (zpos > zdivision*CLHEP::mm) doubletZ=2; - if (fabs(xpos) > 100.*CLHEP::mm && ndbz[doubletR-1] > 2) { + if (zpos > zdivision*GeoModelKernelUnits::mm) doubletZ=2; + if (fabs(xpos) > 100.*GeoModelKernelUnits::mm && ndbz[doubletR-1] > 2) { doubletZ = 3; nfields++; } - if (fabs(xpos) > 100.*CLHEP::mm ) ndbz[doubletR-1]--; + if (fabs(xpos) > 100.*GeoModelKernelUnits::mm ) ndbz[doubletR-1]--; } int dbphi = 1; //std::cout<<stName<<" ----------------------------------- dbphi = "<<dbphi<<std::endl; - if (xpos > 400.*CLHEP::mm) dbphi = 2; // this special patch is needed for BMS in the ribs where xpos is ~950mm; the theshold to 100mm (too low) caused a bug + if (xpos > 400.*GeoModelKernelUnits::mm) dbphi = 2; // this special patch is needed for BMS in the ribs where xpos is ~950mm; the theshold to 100mm (too low) caused a bug // in BOG at eta +/-4 and stationEta 7 (not 6) ==>> 28 Jan 2016 raising the threshold to 400.mm // doublet phi not aware of pos. in space !!! //std::cout<<" dbphi reset to "<<dbphi<<" due to xpos "<< xpos <<" >10cm "<<std::endl; @@ -1521,7 +1523,7 @@ MuonChamber::build(MuonDetectorManager* manager, int zi, (xfcomponent->getTransform())[2][2] << " " << (xfcomponent->getTransform())[2][3] << " " << std::endl; */ - xfaligncomponent->setDelta(HepGeom::Transform3D::Identity); + xfaligncomponent->setDelta(GeoTrf::Transform3D::Identity()); //delete xfcomponent; ptrd->add(xfaligncomponent); ptrd->add(lvr); diff --git a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx index eef65f7fbcb..5748ed1644d 100755 --- a/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/MuonDetectorFactory001.cxx @@ -51,11 +51,14 @@ #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoIdentifierTag.h" #include "GeoModelKernel/GeoPerfUtils.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "StoreGate/StoreGateSvc.h" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoGenericFunctions/Variable.h" #include "MuonGeoModel/DBReader.h" #include "MuonGeoModel/RDBReaderAtlas.h" @@ -71,7 +74,7 @@ typedef std::ostringstream my_osstream; // The objects for mapping plane indexes in MuonSystem to the record index in RDBRecordset typedef std::map<int, unsigned int, std::less<int> > muonsysIndMap; -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; #define skip_chambers false @@ -92,15 +95,15 @@ namespace MuonGM { { MsgStream log(Athena::getMessageSvc(), "MuonGeoModel"); m_muon = new MuonSystemDescription( "MuonSystem" ); - m_muon->barrelInnerRadius = 4.30*CLHEP::m; - m_muon->innerRadius = 0.07*CLHEP::m; - m_muon->outerRadius = 13.00*CLHEP::m; - m_muon->endcapFrontFace = 6.74*CLHEP::m; - m_muon->length = 22.03*CLHEP::m; - m_muon->barreLength = 6.53*CLHEP::m; - m_muon->barrelInterRadius = 3.83*CLHEP::m; - m_muon->extraZ = 12.9*CLHEP::m; - m_muon->extraR = 12.5*CLHEP::m; + m_muon->barrelInnerRadius = 4.30*GeoModelKernelUnits::m; + m_muon->innerRadius = 0.07*GeoModelKernelUnits::m; + m_muon->outerRadius = 13.00*GeoModelKernelUnits::m; + m_muon->endcapFrontFace = 6.74*GeoModelKernelUnits::m; + m_muon->length = 22.03*GeoModelKernelUnits::m; + m_muon->barreLength = 6.53*GeoModelKernelUnits::m; + m_muon->barrelInterRadius = 3.83*GeoModelKernelUnits::m; + m_muon->extraZ = 12.9*GeoModelKernelUnits::m; + m_muon->extraR = 12.5*GeoModelKernelUnits::m; m_selectedStations = std::vector<std::string>(0); m_selectedStEta = std::vector<int>(0); @@ -467,7 +470,7 @@ namespace MuonGM { const GeoMaterial* m4 = theMaterialManager->getMaterial( "std::Air" ); GeoLogVol* l4; - GeoPcon* c4 = new GeoPcon( 0, 360*CLHEP::deg ); + GeoPcon* c4 = new GeoPcon( 0, 360*GeoModelKernelUnits::deg ); //--- --- --- CREATE ENVELOPE --- --- --- // First try to get data from the GeomDB IRDBRecordset_ptr muonSysRec = m_pRDBAccess->getRecordsetPtr("MuonSystem",OracleTag,OracleNode); @@ -549,7 +552,7 @@ namespace MuonGM { // Cannot (yet) cope with this: // G4UserLimits *ul=new G4UserLimits; - // ul->SetMaxAllowedStep(5*CLHEP::cm); + // ul->SetMaxAllowedStep(5*GeoModelKernelUnits::cm); // lv->GetLogicalVolume()->SetUserLimits(ul); m_manager->addTreeTop(p4); // This is the top! @@ -681,7 +684,7 @@ namespace MuonGM { // here define the GeoAlignableTransform associated to the chamber // nominal transform first - GeoAlignableTransform *xf = new GeoAlignableTransform( station->getNominalTransform( (*pit).second) ); + GeoAlignableTransform *xf = new GeoAlignableTransform(station->getNominalTransform( (*pit).second) ); // add tag, transform and physicalvolume associated to the chamber to the mother-volume p4->add(nm); @@ -697,19 +700,15 @@ namespace MuonGM { continue; } mst->setTransform(xf); - HepGeom::Transform3D tsz_to_szt = HepGeom::Transform3D(HepGeom::Point3D<double>(1.,0.,0.),HepGeom::Point3D<double>(0.,1.,0.), - HepGeom::Point3D<double>(0.,0.,1.),HepGeom::Point3D<double>(0.,0.,1.), - HepGeom::Point3D<double>(1.,0.,0.),HepGeom::Point3D<double>(0.,1.,0.)); - mst->setNativeToAmdbLRS( tsz_to_szt * station->native_to_tsz_frame( (*pit).second ) ); - mst->setNominalAmdbLRSToGlobal( station->tsz_to_global_frame( (*pit).second ) * tsz_to_szt.inverse() ); + GeoTrf::Transform3D tsz_to_szt = GeoTrf::RotateZ3D(-90*CLHEP::deg)*GeoTrf::RotateY3D(-90*CLHEP::deg); + mst->setNativeToAmdbLRS( Amg::EigenTransformToCLHEP(tsz_to_szt * station->native_to_tsz_frame( (*pit).second )) ); + mst->setNominalAmdbLRSToGlobal( Amg::EigenTransformToCLHEP(station->tsz_to_global_frame( (*pit).second ) * tsz_to_szt.inverse()) ); - HepGeom::Transform3D DummyAline = HepGeom::Transform3D::Identity; // find correct alignment information for this position // xf->setDelta(DummyAline); // just in case we don't find one // apit = station->FindAlignPos(zi,fi); // number of A-lines for this station - HepGeom::Transform3D Delta = HepGeom::Transform3D::Identity; int nAlines = station->CountAlignPos(zi,fi); //nAlines=-1; if (nAlines==0) @@ -782,7 +781,7 @@ namespace MuonGM { // MuonStation* mst = m_manager->getMuonStation (station->GetName(), zi, fi+1); // if (mst != NULL) { // mst->setTransform(xf); - // HepGeom::Transform3D tsz_to_szt = HepGeom::Transform3D(HepGeom::Point3D<double>(1.,0.,0.),HepGeom::Point3D<double>(0.,1.,0.), + // GeoTrf::Transform3D tsz_to_szt = GeoTrf::Transform3D(HepGeom::Point3D<double>(1.,0.,0.),HepGeom::Point3D<double>(0.,1.,0.), // HepGeom::Point3D<double>(0.,0.,1.),HepGeom::Point3D<double>(0.,0.,1.), // HepGeom::Point3D<double>(1.,0.,0.),HepGeom::Point3D<double>(0.,1.,0.)); // mst->setNativeToAmdbLRS( tsz_to_szt * station->native_to_tsz_frame( (*pit).second ) ); @@ -801,7 +800,7 @@ namespace MuonGM { // (xf->getTransform())[2][1] << " " << // (xf->getTransform())[2][2] << " " << // (xf->getTransform())[2][3] << " " << endmsg; - // HepGeom::Transform3D Delta_amdb_frame = tsz_to_szt*station->getDeltaTransform_tszFrame(ap)*tsz_to_szt.inverse(); + // GeoTrf::Transform3D Delta_amdb_frame = tsz_to_szt*station->getDeltaTransform_tszFrame(ap)*tsz_to_szt.inverse(); // mst->setDeltaAmdbLRS( Delta_amdb_frame ); // if (log.level()<=MSG::VERBOSE) log<<MSG::VERBOSE << "From the Factory:: Delta(amdb) transformation for " << stname << ":" // << endmsg << diff --git a/MuonSpectrometer/MuonGeoModel/src/RDBReaderAtlas.cxx b/MuonSpectrometer/MuonGeoModel/src/RDBReaderAtlas.cxx index 489839b94cf..4597fc40b03 100755 --- a/MuonSpectrometer/MuonGeoModel/src/RDBReaderAtlas.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/RDBReaderAtlas.cxx @@ -13,7 +13,7 @@ #include "RDBAccessSvc/IRDBRecordset.h" #include "RDBAccessSvc/IRDBQuery.h" #include "MuonReadoutGeometry/TgcReadoutParams.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include "MuonGeoModel/TGC_Technology.h" @@ -421,7 +421,7 @@ void RDBReaderAtlas::ProcessTGCreadout () { int version = (int) (*ggsd)[0]->getDouble("VERS"); - float wirespacing = (*ggsd)[0]->getDouble("WIRESP")*CLHEP::cm; + float wirespacing = (*ggsd)[0]->getDouble("WIRESP")*GeoModelKernelUnits::cm; log<<MSG::INFO <<" ProcessTGCreadout - version "<<version<<" wirespacing "<<wirespacing<<endmsg; @@ -519,7 +519,7 @@ void RDBReaderAtlas::ProcessTGCreadout () { IRDBRecordset_ptr ggln = m_pRDBAccess->getRecordsetPtr("GGLN",m_geoTag,m_geoNode); int version = (int) (*ggln)[0]->getInt("VERS"); - float wirespacing = (*ggln)[0]->getFloat("WIRESP")*CLHEP::mm; + float wirespacing = (*ggln)[0]->getFloat("WIRESP")*GeoModelKernelUnits::mm; log<<MSG::INFO <<" ProcessTGCreadout - version "<<version<<" wirespacing "<<wirespacing<<endmsg; @@ -618,11 +618,11 @@ void RDBReaderAtlas::ProcessTGCreadout () { tgc->offsetWireSupport[0] = (*ggln)[ich]->getFloat("SP1WI"); tgc->offsetWireSupport[1] = (*ggln)[ich]->getFloat("SP2WI"); tgc->offsetWireSupport[2] = (*ggln)[ich]->getFloat("SP3WI"); - tgc->angleTilt = (*ggln)[ich]->getFloat("TILT")*CLHEP::deg; + tgc->angleTilt = (*ggln)[ich]->getFloat("TILT")*GeoModelKernelUnits::deg; tgc->radiusButton = (*ggln)[ich]->getFloat("SP1BU"); tgc->pitchButton[0] = (*ggln)[ich]->getFloat("SP2BU"); tgc->pitchButton[1] = (*ggln)[ich]->getFloat("SP3BU"); - tgc->angleButton = (*ggln)[ich]->getFloat("SP4BU")*CLHEP::deg; + tgc->angleButton = (*ggln)[ich]->getFloat("SP4BU")*GeoModelKernelUnits::deg; } } diff --git a/MuonSpectrometer/MuonGeoModel/src/Rpc.cxx b/MuonSpectrometer/MuonGeoModel/src/Rpc.cxx index 3350f04925f..d447b0c9037 100755 --- a/MuonSpectrometer/MuonGeoModel/src/Rpc.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/Rpc.cxx @@ -17,10 +17,13 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoIdentifierTag.h" -#include <iomanip> -#include <cassert> #include "GeoModelKernel/GeoShapeSubtraction.h" #include "GeoModelKernel/GeoShapeIntersection.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" + +#include <iomanip> +#include <cassert> #define skip_rpc false @@ -75,12 +78,12 @@ GeoFullPhysVol* Rpc::build(int minimalgeo, int cutoutson, if (cutoutson && vcutdef.size() > 0) { Cutout* cut = 0; GeoShape* cutoutShape = 0; - HepGeom::Transform3D cutTrans; + GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()}; for (unsigned i = 0; i < vcutdef.size(); i++) { cut = vcutdef[i]; cutoutShape = new GeoTrd(thickness/2.+1., thickness/2.+1., cut->widthXs/2., cut->widthXl/2., cut->lengthY/2.); - cutTrans = HepGeom::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); + cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); srpc = &(srpc->subtract( (*cutoutShape) << cutTrans) ); } // std::cout << " Cutouts for Rpc " << std::endl; @@ -132,12 +135,12 @@ GeoFullPhysVol* Rpc::build(int minimalgeo, int cutoutson, GeoPhysVol* tempPhys = 0; Cutout* cut = 0; GeoShape* cutoutShape = 0; - HepGeom::Transform3D cutTrans; + GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()}; for (unsigned i = 0; i < vcutdef.size(); i++) { cut = vcutdef[i]; cutoutShape = new GeoTrd(thickness/2.+1., thickness/2.+1., cut->widthXs/2., cut->widthXl/2., cut->lengthY/2.); - cutTrans = HepGeom::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); + cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); GeoCutVolAction cutAction(*cutoutShape, cutTrans); pallpan->apply(&cutAction); @@ -148,7 +151,7 @@ GeoFullPhysVol* Rpc::build(int minimalgeo, int cutoutson, } newpos += r->externalSupPanelThickness/2.; - GeoTransform* tlpan = new GeoTransform(HepGeom::TranslateX3D( newpos )); + GeoTransform* tlpan = new GeoTransform(GeoTrf::TranslateX3D( newpos )); if (RPCprint) std::cout << " Rpc:: put ext.sup panel at " << newpos << " from centre" << std::endl; if (!skip_rpc) { @@ -167,7 +170,7 @@ GeoFullPhysVol* Rpc::build(int minimalgeo, int cutoutson, } newpos += r->rpcLayerThickness/2.; - GeoTransform* tlgg = new GeoTransform(HepGeom::TranslateX3D( newpos )); + GeoTransform* tlgg = new GeoTransform(GeoTrf::TranslateX3D( newpos )); if (RPCprint) std::cout << " Rpc:: put lower RPC layer at " << newpos << " from centre " << std::endl; if (!skip_rpc) { @@ -202,12 +205,12 @@ GeoFullPhysVol* Rpc::build(int minimalgeo, int cutoutson, GeoPhysVol* tempPhys = 0; Cutout* cut = 0; GeoShape* cutoutShape = 0; - HepGeom::Transform3D cutTrans; + GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()}; for (unsigned i = 0; i < vcutdef.size(); i++) { cut = vcutdef[i]; cutoutShape = new GeoTrd(thickness/2.+1., thickness/2.+1., cut->widthXs/2., cut->widthXl/2., cut->lengthY/2.); - cutTrans = HepGeom::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); + cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); GeoCutVolAction cutAction(*cutoutShape, cutTrans); palcpan->apply(&cutAction); @@ -218,7 +221,7 @@ GeoFullPhysVol* Rpc::build(int minimalgeo, int cutoutson, } newpos += r->centralSupPanelThickness/2.; - GeoTransform* tcpan = new GeoTransform(HepGeom::TranslateX3D( newpos )); + GeoTransform* tcpan = new GeoTransform(GeoTrf::TranslateX3D( newpos )); if (RPCprint) std::cout << " Rpc:: put central sup panel at " << newpos << " from centre" << std::endl; if (!skip_rpc) { @@ -275,10 +278,10 @@ GeoFullPhysVol* Rpc::build(int minimalgeo, int cutoutson, } newpos += r->rpcLayerThickness/2.; - GeoTransform* tugg = new GeoTransform(HepGeom::TranslateX3D(newpos) ); + GeoTransform* tugg = new GeoTransform(GeoTrf::TranslateX3D(newpos) ); if (RPCprint) std::cout<< " Rpc:: put upper RPC layer at " << newpos << " from centre " << std::endl; - GeoTransform* rugg = new GeoTransform(HepGeom::RotateY3D(180*CLHEP::deg) ); + GeoTransform* rugg = new GeoTransform(GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) ); if (!skip_rpc) { prpc->add(new GeoIdentifierTag(2)); prpc->add(tugg); diff --git a/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx b/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx index d3453019478..572957a751f 100755 --- a/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/RpcLayer.cxx @@ -16,6 +16,7 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "MuonReadoutGeometry/GlobalUtilities.h" #include <iomanip> // for cutouts: @@ -94,7 +95,7 @@ RpcLayer::build(int cutoutson, std::vector<Cutout*> vcutdef) newpos += strpanThickness/2. + tol/2.; GeoPhysVol* pcustrpan11 = new GeoPhysVol(lcustrpan); GeoPhysVol* pfoamstrpan11 = new GeoPhysVol(lfoamstrpan); - GeoTransform* tx = new GeoTransform(HepGeom::TranslateX3D(newpos) ); + GeoTransform* tx = new GeoTransform(GeoTrf::TranslateX3D(newpos) ); GeoTransform* ty1; GeoTransform* ty2; @@ -102,8 +103,8 @@ RpcLayer::build(int cutoutson, std::vector<Cutout*> vcutdef) if (RPCprint) std::cout << " RpcLayer::NstripPanels_in_s == 2 " << std::endl; GeoPhysVol* pcustrpan12 = new GeoPhysVol(lcustrpan); GeoPhysVol* pfoamstrpan12 = new GeoPhysVol(lfoamstrpan); - ty1 = new GeoTransform(HepGeom::TranslateY3D(-width/4.)); - ty2 = new GeoTransform(HepGeom::TranslateY3D( width/4.)); + ty1 = new GeoTransform(GeoTrf::TranslateY3D(-width/4.)); + ty2 = new GeoTransform(GeoTrf::TranslateY3D( width/4.)); prpcl->add(tx); prpcl->add(ty1); if (RPCprint) std::cout<<"RpcLayer:: Locating the 1st phi strip panel at x, y " @@ -161,13 +162,13 @@ RpcLayer::build(int cutoutson, std::vector<Cutout*> vcutdef) matManager->getMaterial("muo::RPCgas")); GeoPhysVol *pbak1 = new GeoPhysVol (lbak); GeoPhysVol *pgas1 = new GeoPhysVol (lgas); - tx = new GeoTransform(HepGeom::TranslateX3D(newpos)); + tx = new GeoTransform(GeoTrf::TranslateX3D(newpos)); if (r->NGasGaps_in_s == 2) { GeoPhysVol *pbak2 = new GeoPhysVol (lbak); GeoPhysVol *pgas2 = new GeoPhysVol (lgas); - ty1 = new GeoTransform(HepGeom::TranslateY3D(-width/4.)); - ty2 = new GeoTransform(HepGeom::TranslateY3D(width/4.)); + ty1 = new GeoTransform(GeoTrf::TranslateY3D(-width/4.)); + ty2 = new GeoTransform(GeoTrf::TranslateY3D(width/4.)); prpcl->add(tx); prpcl->add(ty1); if (RPCprint) std::cout<<"RpcLayer:: put 1st gas gap centre at depth, s "<<newpos<<" "<<-width/4.<<std::endl; @@ -200,13 +201,13 @@ RpcLayer::build(int cutoutson, std::vector<Cutout*> vcutdef) GeoPhysVol *pcustrpan21 = new GeoPhysVol(lcustrpan); GeoPhysVol *pfoamstrpan21 = new GeoPhysVol(lfoamstrpan); - tx = new GeoTransform(HepGeom::TranslateX3D(newpos)); + tx = new GeoTransform(GeoTrf::TranslateX3D(newpos)); if (r->NstripPanels_in_s == 2) { GeoPhysVol *pcustrpan22 = new GeoPhysVol(lcustrpan); GeoPhysVol *pfoamstrpan22 = new GeoPhysVol(lfoamstrpan); - ty1 = new GeoTransform(HepGeom::TranslateY3D(-width/4.)); - ty2 = new GeoTransform(HepGeom::TranslateY3D( width/4.)); + ty1 = new GeoTransform(GeoTrf::TranslateY3D(-width/4.)); + ty2 = new GeoTransform(GeoTrf::TranslateY3D( width/4.)); prpcl->add(tx); prpcl->add(ty1); if (RPCprint) std::cout<<"RpcLayer:: Locating the 1st eta panel at x, y " @@ -239,12 +240,12 @@ RpcLayer::build(int cutoutson, std::vector<Cutout*> vcutdef) GeoPhysVol* tempPhys = 0; Cutout* cut = 0; GeoShape* cutoutShape = 0; - HepGeom::Transform3D cutTrans; + GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()}; for (unsigned i = 0; i < vcutdef.size(); i++) { cut = vcutdef[i]; cutoutShape = new GeoTrd(thickness/2.+1., thickness/2.+1., cut->widthXs/2.+0.5, cut->widthXl/2.+0.5, cut->lengthY/2.+tol); - cutTrans = HepGeom::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); + cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); GeoCutVolAction cutAction(*cutoutShape, cutTrans); prpcl->apply(&cutAction); diff --git a/MuonSpectrometer/MuonGeoModel/src/SimpleVolAction.cxx b/MuonSpectrometer/MuonGeoModel/src/SimpleVolAction.cxx index a46f1fd0e29..e53a148be7c 100755 --- a/MuonSpectrometer/MuonGeoModel/src/SimpleVolAction.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/SimpleVolAction.cxx @@ -11,6 +11,7 @@ //<version> $Name: not supported by cvs2svn $ #include "MuonGeoModel/SimpleVolAction.h" +#include <iostream> namespace MuonGM { diff --git a/MuonSpectrometer/MuonGeoModel/src/Spacer.cxx b/MuonSpectrometer/MuonGeoModel/src/Spacer.cxx index 2bfd146e9a8..df585ef7796 100755 --- a/MuonSpectrometer/MuonGeoModel/src/Spacer.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/Spacer.cxx @@ -19,7 +19,8 @@ #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoSerialIdentifier.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" // for cutouts: #include "GeoModelKernel/GeoShapeSubtraction.h" @@ -65,8 +66,8 @@ GeoVPhysVol * Spacer::build(int /*cutoutson*/) // <<excent<<" length = "<<length<<std::endl; GeoTrd* upTrd = new GeoTrd(thickness/2.,thickness/2., longWidth/2., upWidth/2., (length-maxwLength)/2.); - strd = & ( (strd->add( (*upTrd) << HepGeom::TranslateZ3D( length/2. )) ) - << HepGeom::TranslateZ3D( (maxwLength - length)/2.) ); + strd = & ( (strd->add( (*upTrd) << GeoTrf::TranslateZ3D( length/2. )) ) + << GeoTrf::TranslateZ3D( (maxwLength - length)/2.) ); } const GeoMaterial* mtrd = matManager->getMaterial("std::Aluminium"); @@ -112,7 +113,7 @@ GeoVPhysVol * Spacer::build(int /*cutoutson*/) ptrdtemp = ptrd2; tckibeam = dy; } - GeoTransform* xf = new GeoTransform(HepGeom::Translate3D(wherepos + tckibeam/2, wherewidth+dy/2, 0)); + GeoTransform* xf = new GeoTransform(GeoTrf::Translate3D(wherepos + tckibeam/2, wherewidth+dy/2, 0)); if (!skip_spacer) { ptrd->add(xf); ptrd->add(ptrdtemp); @@ -134,7 +135,7 @@ GeoVPhysVol * Spacer::build(int /*cutoutson*/) for (int k1 = 0; k1 < 2; k1++){ for (int k = 0; k < 2; k++){ - GeoTransform* ttube = new GeoTransform(HepGeom::RotateX3D(-90*CLHEP::deg)* HepGeom::Translate3D( + GeoTransform* ttube = new GeoTransform(GeoTrf::RotateX3D(-90*GeoModelKernelUnits::deg)* GeoTrf::Translate3D( 0., -(vtubl+tckibeam)/2.-(k-1)*(vtubl+tckibeam), -length/4.-(k1-1)*length/2)); diff --git a/MuonSpectrometer/MuonGeoModel/src/SpacerBeam.cxx b/MuonSpectrometer/MuonGeoModel/src/SpacerBeam.cxx index 4d77c86df63..3c594de7773 100755 --- a/MuonSpectrometer/MuonGeoModel/src/SpacerBeam.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/SpacerBeam.cxx @@ -14,10 +14,9 @@ #include "GeoModelKernel/GeoPhysVol.h" #include "GeoModelKernel/GeoLogVol.h" #include "GeoModelKernel/GeoMaterial.h" -#include "GeoModelKernel/GeoTransform.h" -#include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeSubtraction.h" #include "GeoModelKernel/GeoShapeShift.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "MuonGeoModel/CHV_Technology.h" #include "MuonGeoModel/CRO_Technology.h" #include "MuonGeoModel/CMI_Technology.h" @@ -110,15 +109,15 @@ SpacerBeam::build(int /*cutoutson*/, bool is_barrel) const GeoShape* IBeamShape = new GeoBox(height/2, volumelargeness/2, length/2); GeoBox* sideBox = new GeoBox(height/2. - thickness, volumelargeness/4., length/2 + 1.); double yshift = volumelargeness/4. + thickness/2.; - IBeamShape = &(IBeamShape->subtract( (*sideBox) << HepGeom::TranslateY3D(yshift) ) ); - IBeamShape = &(IBeamShape->subtract( (*sideBox) << HepGeom::TranslateY3D(-yshift) ) ); + IBeamShape = &(IBeamShape->subtract( (*sideBox) << GeoTrf::TranslateY3D(yshift) ) ); + IBeamShape = &(IBeamShape->subtract( (*sideBox) << GeoTrf::TranslateY3D(-yshift) ) ); // Cut holes for LB GeoBox* holeBox = new GeoBox(m_lb_height/2.+1., thickness/2.+1., m_lb_width/cosexc/2.+thickness*sinexc/cosexc+6.); - IBeamShape = &(IBeamShape->subtract( (*holeBox) << HepGeom::TranslateZ3D(m_hole_pos1/cosexc) ) ); - IBeamShape = &(IBeamShape->subtract( (*holeBox) << HepGeom::TranslateZ3D(m_hole_pos2/cosexc) ) ); + IBeamShape = &(IBeamShape->subtract( (*holeBox) << GeoTrf::TranslateZ3D(m_hole_pos1/cosexc) ) ); + IBeamShape = &(IBeamShape->subtract( (*holeBox) << GeoTrf::TranslateZ3D(m_hole_pos2/cosexc) ) ); lvol = new GeoLogVol(name, IBeamShape, mat); pvol = new GeoPhysVol(lvol); diff --git a/MuonSpectrometer/MuonGeoModel/src/Station.cxx b/MuonSpectrometer/MuonGeoModel/src/Station.cxx index 9ded49a740c..aa0fcdba811 100755 --- a/MuonSpectrometer/MuonGeoModel/src/Station.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/Station.cxx @@ -8,8 +8,7 @@ #include "MuonGeoModel/StandardComponent.h" #include "MuonGeoModel/SupComponent.h" #include "MuonGeoModel/TgcComponent.h" -#include "CLHEP/Vector/ThreeVector.h" -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" #include "GaudiKernel/MsgStream.h" #include "AthenaKernel/getMessageSvc.h" #include <iostream> @@ -669,7 +668,7 @@ double Station::mdtHalfPitch() const { //this is really needed -HepGeom::Transform3D Station::native_to_tsz_frame( const Position & p ) const { +GeoTrf::Transform3D Station::native_to_tsz_frame( const Position & p ) const { MsgStream log(m_msgSvc, "MGM-native_to_tsz"); const bool dLvl = log.level()<=MSG::DEBUG; @@ -682,20 +681,20 @@ HepGeom::Transform3D Station::native_to_tsz_frame( const Position & p ) const { << " for endcap side A so be very careful." << endmsg; - HepGeom::Transform3D nominalTransf; + GeoTrf::Transform3D nominalTransf{GeoTrf::Transform3D::Identity()}; // first apply here the mirror symmetry: (we, in fact, apply a rotation) - HepGeom::Transform3D mirrsym=HepGeom::Transform3D::Identity; + GeoTrf::Transform3D mirrsym=GeoTrf::Transform3D::Identity(); if (p.isMirrored) { if (m_name[0]=='B' ) { - mirrsym = HepGeom::RotateX3D(180.*CLHEP::deg); + mirrsym = GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); } } // define the translation to position the chamber in the tzs frame - HepGeom::Translate3D AMDBorgTranslation; + GeoTrf::Translate3D AMDBorgTranslation(0,0,0); if ( (m_name[0]=='B' || p.isBarrelLike) && p.zindex<0 && (!p.isMirrored) && hasMdts()) { //MYSQL* mysql=MYSQL::GetPointer(); @@ -703,7 +702,7 @@ HepGeom::Transform3D Station::native_to_tsz_frame( const Position & p ) const { //double halfpitch = (mdtobj->pitch)/2.; double halfpitch = mdtHalfPitch(); AMDBorgTranslation = - HepGeom::Translate3D(GetThickness()/2.-getAmdbOrigine_along_thickness(), + GeoTrf::Translate3D(GetThickness()/2.-getAmdbOrigine_along_thickness(), 0., GetLength()/2.-(getAmdbOrigine_along_length()+halfpitch)); //GetLength()/2.-(halfpitch)); @@ -718,12 +717,12 @@ HepGeom::Transform3D Station::native_to_tsz_frame( const Position & p ) const { { if (m_name[0]=='T') AMDBorgTranslation = - HepGeom::Translate3D(GetThickness()/2.-getAmdbOrigine_along_thickness(), + GeoTrf::Translate3D(GetThickness()/2.-getAmdbOrigine_along_thickness(), 0., GetLength()/2.-getAmdbOrigine_along_length()+((TgcComponent *)GetComponent(0))->posy); else AMDBorgTranslation = - HepGeom::Translate3D(GetThickness()/2.-getAmdbOrigine_along_thickness(), + GeoTrf::Translate3D(GetThickness()/2.-getAmdbOrigine_along_thickness(), 0., GetLength()/2.-getAmdbOrigine_along_length()); if (vLvl) @@ -735,34 +734,34 @@ HepGeom::Transform3D Station::native_to_tsz_frame( const Position & p ) const { } // // define the rotations by alpha, beta, gamma - // HepGeom::Rotate3D ralpha = HepGeom::RotateX3D(p.alpha*CLHEP::deg); - // HepGeom::Rotate3D rbeta = HepGeom::RotateZ3D(p.beta*CLHEP::deg); - // HepGeom::Rotate3D rgamma; - // rgamma = HepGeom::RotateY3D(p.gamma*CLHEP::deg); + // GeoTrf::Rotate3D ralpha = GeoTrf::RotateX3D(p.alpha*GeoModelKernelUnits::deg); + // GeoTrf::Rotate3D rbeta = GeoTrf::RotateZ3D(p.beta*GeoModelKernelUnits::deg); + // GeoTrf::Rotate3D rgamma; + // rgamma = GeoTrf::RotateY3D(p.gamma*GeoModelKernelUnits::deg); // log<<MSG::VERBOSE<<" gamma is not changing sign - original "<<p.gamma<<" new one "<<p.gamma<<endmsg; // log<<MSG::VERBOSE<<" alpha / beta "<<p.alpha<<" "<<p.beta<<endmsg; // // apply all transform in sequence - // // HepGeom::Transform3D to_tsz = rgamma*rbeta*ralpha*AMDBorgTranslation*mirrsym; // works for barrel and barrel-like + // // GeoTrf::Transform3D to_tsz = rgamma*rbeta*ralpha*AMDBorgTranslation*mirrsym; // works for barrel and barrel-like // // imt: tested for CTB2004, seems to work for all amdb versions... - // HepGeom::Transform3D to_tsz = rgamma*rbeta*ralpha*AMDBorgTranslation*mirrsym; - HepGeom::Transform3D to_tsz = AMDBorgTranslation*mirrsym; + // GeoTrf::Transform3D to_tsz = rgamma*rbeta*ralpha*AMDBorgTranslation*mirrsym; + GeoTrf::Transform3D to_tsz = AMDBorgTranslation*mirrsym; return to_tsz; } -HepGeom::Transform3D Station::tsz_to_native_frame( const Position & p ) const { +GeoTrf::Transform3D Station::tsz_to_native_frame( const Position & p ) const { return (native_to_tsz_frame( p )).inverse(); } // this is really needed -HepGeom::Transform3D Station::tsz_to_global_frame( const Position & p ) const { +GeoTrf::Transform3D Station::tsz_to_global_frame( const Position & p ) const { - MsgStream log(m_msgSvc, "MGM tsz_to_global_frame"); - const bool pLvl=log.level()<=MSG::VERBOSE; + MsgStream log(m_msgSvc, "MGM tsz_to_global_frame"); + const bool pLvl=log.level()<=MSG::VERBOSE; + + GeoTrf::Transform3D nominalTransf= GeoTrf::Transform3D::Identity(); - HepGeom::Transform3D nominalTransf= HepGeom::Transform3D::Identity; - - CLHEP::Hep3Vector vec; + GeoTrf::Vector3D vec; double RAD; if (m_name[0]=='T') { @@ -771,22 +770,22 @@ HepGeom::Transform3D Station::tsz_to_global_frame( const Position & p ) const { } else RAD=p.radius; - vec.setX(RAD*cos(p.phi*CLHEP::deg)); - vec.setX(vec.x()-p.shift*sin((p.phi)*CLHEP::deg)); - vec.setY(RAD*sin(p.phi*CLHEP::deg)); - vec.setY(vec.y()+p.shift*cos((p.phi)*CLHEP::deg)); + vec.x() = RAD*cos(p.phi*GeoModelKernelUnits::deg); + vec.x() = vec.x()-p.shift*sin((p.phi)*GeoModelKernelUnits::deg); + vec.y() = RAD*sin(p.phi*GeoModelKernelUnits::deg); + vec.y() = vec.y()+p.shift*cos((p.phi)*GeoModelKernelUnits::deg); // if (p.isMirrored) if ( (p.isBarrelLike) || (m_name[0]=='B') ) { // correct the z location (=-p.z-m_length) for possible m_amdbOrigine_along_length - vec.setZ(p.z + getAmdbOrigine_along_length()); + vec.z() = p.z + getAmdbOrigine_along_length(); // std::cout<<" tsz_to_global for station "<<m_name<<" at fi/zi "<<p.phiindex+1<<"/"<<p.zindex<<" isMirr. "<<p.isMirrored // <<" transl. to "<<vec<<" p.z = "<<p.z<<" length "<<GetLength()<<" AmdbOrigine_along_length "<<getAmdbOrigine_along_length()<<std::endl; } else { - vec.setZ(p.z + GetThickness()); // re-establish the amdb z location (with a - sign) + vec.z() = p.z + GetThickness(); // re-establish the amdb z location (with a - sign) } else { @@ -797,10 +796,10 @@ HepGeom::Transform3D Station::tsz_to_global_frame( const Position & p ) const { //double halfpitch = (mdtobj->pitch)/2.; double halfpitch = mdtHalfPitch(); //vec.setZ(p.z + (-getAmdbOrigine_along_length()+halfpitch)); - vec.setZ(p.z + halfpitch); + vec.z() = p.z + halfpitch; } else - vec.setZ(p.z); + vec.z() = p.z; } if (pLvl) @@ -808,19 +807,18 @@ HepGeom::Transform3D Station::tsz_to_global_frame( const Position & p ) const { /////// NEWEWEWWEWEWEWEWEWEWEWEWEW // // define the rotations by alpha, beta, gamma - HepGeom::Rotate3D ralpha = HepGeom::RotateX3D(p.alpha*CLHEP::deg); - HepGeom::Rotate3D rbeta = HepGeom::RotateZ3D(p.beta*CLHEP::deg); - HepGeom::Rotate3D rgamma; - rgamma = HepGeom::RotateY3D(p.gamma*CLHEP::deg); - if (pLvl) + GeoTrf::RotateX3D ralpha(p.alpha*GeoModelKernelUnits::deg); + GeoTrf::RotateZ3D rbeta(p.beta*GeoModelKernelUnits::deg); + GeoTrf::RotateY3D rgamma(p.gamma*GeoModelKernelUnits::deg); + if (pLvl) { log<<MSG::VERBOSE<<" gamma is not changing sign - original "<<p.gamma<<" new one "<<p.gamma<<endmsg; - if (pLvl) - log<<MSG::VERBOSE<<" alpha / beta "<<p.alpha<<" "<<p.beta<<endmsg; + log<<MSG::VERBOSE<<" alpha / beta "<<p.alpha<<" "<<p.beta<<endmsg; + } // // apply all transform in sequence - // // HepGeom::Transform3D to_tsz = rgamma*rbeta*ralpha*AMDBorgTranslation*mirrsym; // works for barrel and barrel-like + // // GeoTrf::Transform3D to_tsz = rgamma*rbeta*ralpha*AMDBorgTranslation*mirrsym; // works for barrel and barrel-like // // imt: tested for CTB2004, seems to work for all amdb versions... - HepGeom::Transform3D abgRot = rgamma*rbeta*ralpha; + GeoTrf::Transform3D abgRot = rgamma*rbeta*ralpha; /////// NEWEWEWWEWEWEWEWEWEWEWEWEW @@ -828,51 +826,51 @@ HepGeom::Transform3D Station::tsz_to_global_frame( const Position & p ) const { if ( m_name[0]=='B' || p.isBarrelLike ) { // here all Barrel chambers - nominalTransf = HepGeom::RotateZ3D(p.phi*CLHEP::deg); + nominalTransf = GeoTrf::RotateZ3D(p.phi*GeoModelKernelUnits::deg); } else { // replace this with the folowing lines 8/06/2006 SS because, EC not mirrored chambers have anyway to be rotated // by 180deg around z to mov ecoherently their local reference frame and the tube-layer numbering // if ( p.z>=0 || ( p.z<0 && !(p.isMirrored) ) ){ -// nominalTransf = HepGeom::Transform3D(HepGeom::RotateY3D(-90*CLHEP::deg)* -// HepGeom::RotateX3D(p.phi*CLHEP::deg-180*CLHEP::deg)); +// nominalTransf = GeoTrf::Transform3D(GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)* +// GeoTrf::RotateX3D(p.phi*GeoModelKernelUnits::deg-180*GeoModelKernelUnits::deg)); // } // else if (p.z<0 && p.isMirrored){ -// nominalTransf = HepGeom::Transform3D(HepGeom::RotateY3D(-90*CLHEP::deg)* -// HepGeom::RotateX3D(p.phi*CLHEP::deg-180*CLHEP::deg)* -// HepGeom::RotateZ3D(180*CLHEP::deg)); +// nominalTransf = GeoTrf::Transform3D(GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)* +// GeoTrf::RotateX3D(p.phi*GeoModelKernelUnits::deg-180*GeoModelKernelUnits::deg)* +// GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)); // } if ( p.z>=0 ){ - nominalTransf = HepGeom::Transform3D(HepGeom::RotateY3D(-90*CLHEP::deg)* - HepGeom::RotateX3D(p.phi*CLHEP::deg-180*CLHEP::deg)); + nominalTransf = GeoTrf::Transform3D(GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)* + GeoTrf::RotateX3D(p.phi*GeoModelKernelUnits::deg-180*GeoModelKernelUnits::deg)); } else if ( p.z<0 ){ - nominalTransf = HepGeom::Transform3D(HepGeom::RotateY3D(-90*CLHEP::deg)* - HepGeom::RotateX3D(p.phi*CLHEP::deg-180*CLHEP::deg)* - HepGeom::RotateZ3D(180*CLHEP::deg)); + nominalTransf = GeoTrf::Transform3D(GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)* + GeoTrf::RotateX3D(p.phi*GeoModelKernelUnits::deg-180*GeoModelKernelUnits::deg)* + GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)); } else log << MSG::WARNING<<" AAAAAA problem here p.z, mirrored " <<p.z<<" "<<p.isMirrored<<endmsg; } - return HepGeom::Translate3D(vec)*nominalTransf*abgRot; + return GeoTrf::Translate3D(vec.x(),vec.y(),vec.z())*nominalTransf*abgRot; } -HepGeom::Transform3D Station::global_to_tsz_frame( const Position & p ) const { +GeoTrf::Transform3D Station::global_to_tsz_frame( const Position & p ) const { return (tsz_to_global_frame( p )).inverse(); } -HepGeom::Transform3D Station::getNominalTransform(const Position & p) const +GeoTrf::Transform3D Station::getNominalTransform(const Position & p) const { // std::cout<<"Station::getNominalTransform for Position P defined below *********"<<std::endl; // std::cout<<p<<std::endl; return tsz_to_global_frame( p ) * native_to_tsz_frame( p ); } -HepGeom::Transform3D Station::getAlignedTransform(const AlignPos & ap, const Position & p) const +GeoTrf::Transform3D Station::getAlignedTransform(const AlignPos & ap, const Position & p) const { return tsz_to_global_frame( p ) * getDeltaTransform_tszFrame( ap ) * native_to_tsz_frame( p ); } -HepGeom::Transform3D Station::getDeltaTransform_tszFrame(const AlignPos & ap) const +GeoTrf::Transform3D Station::getDeltaTransform_tszFrame(const AlignPos & ap) const { MsgStream log(m_msgSvc, "MGM getDeltaTransform_tszFrame"); if (ap.tras!=0 ||ap.trat!= 0 ||ap.traz!=0 || @@ -890,37 +888,37 @@ HepGeom::Transform3D Station::getDeltaTransform_tszFrame(const AlignPos & ap) co } } - HepGeom::Rotate3D rott = HepGeom::RotateX3D(ap.rott); - HepGeom::Rotate3D rotz = HepGeom::RotateZ3D(ap.rotz); - HepGeom::Rotate3D rots = HepGeom::RotateY3D(ap.rots); - HepGeom::Transform3D trans = HepGeom::TranslateY3D(ap.tras)* - HepGeom::TranslateZ3D(ap.traz)*HepGeom::TranslateX3D(ap.trat); + GeoTrf::RotateX3D rott(ap.rott); + GeoTrf::RotateZ3D rotz(ap.rotz); + GeoTrf::RotateY3D rots(ap.rots); + GeoTrf::Transform3D trans = GeoTrf::TranslateY3D(ap.tras)* + GeoTrf::TranslateZ3D(ap.traz)*GeoTrf::TranslateX3D(ap.trat); - HepGeom::Transform3D delta = trans*rots*rotz*rott; + GeoTrf::Transform3D delta = trans*rots*rotz*rott; if (log.level()<=MSG::VERBOSE) log << MSG::VERBOSE<<" delta transform in the tsz frame --------------"<<endmsg - << - (delta)[0][0] << " " << - (delta)[0][1] << " " << - (delta)[0][2] << " " << - (delta)[0][3] << " " << endmsg << - (delta)[1][0] << " " << - (delta)[1][1] << " " << - (delta)[1][2] << " " << - (delta)[1][3] << " " << endmsg << - (delta)[2][0] << " " << - (delta)[2][1] << " " << - (delta)[2][2] << " " << - (delta)[2][3] << " " << endmsg; + << + delta(0,0) << " " << + delta(0,1) << " " << + delta(0,2) << " " << + delta(0,3) << " " << endmsg << + delta(1,0) << " " << + delta(1,1) << " " << + delta(1,2) << " " << + delta(1,3) << " " << endmsg << + delta(2,0) << " " << + delta(2,1) << " " << + delta(2,2) << " " << + delta(2,3) << " " << endmsg; // our delta transform must be applied in the tsz frame: return delta; } -HepGeom::Transform3D Station::getDeltaTransform(const AlignPos & ap, const Position & p) const +GeoTrf::Transform3D Station::getDeltaTransform(const AlignPos & ap, const Position & p) const { // GM applies Delta transform like transform*delta - HepGeom::Transform3D deltaGM = tsz_to_native_frame(p) * + GeoTrf::Transform3D deltaGM = tsz_to_native_frame(p) * getDeltaTransform_tszFrame( ap ) * native_to_tsz_frame(p); return deltaGM; } @@ -950,10 +948,10 @@ double Station::getAmdbOrigine_along_thickness() const // /* 17/06/2008 This is not needed anywhere -// HepGeom::Transform3D Station::getTransform( const AlignPos & ap) const { +// GeoTrf::Transform3D Station::getTransform( const AlignPos & ap) const { // MsgStream log(m_msgSvc, "MuonGeoModel"); -// HepGeom::Translate3D theTranslation, AMDBorgTranslation; -// HepGeom::Transform3D theRotation; +// GeoTrf::Translate3D theTranslation, AMDBorgTranslation; +// GeoTrf::Transform3D theRotation; // float tras=0, traz=0, trat=0, rots=0, rotz=0, rott=0; // bool isBarrel = false; // isBarrel = ap.isBarrel; @@ -977,35 +975,35 @@ double Station::getAmdbOrigine_along_thickness() const // if (ap.isBarrel && !(ap.isTrapezoid)) // { // rectangular barrel chambers // // AMDB org is at z=0, t=0 (not z=m_length/2, t=m_thickness/2) -// AMDBorgTranslation = HepGeom::Translate3D(GetThickness()/2.,0.,GetLength()/2.); +// AMDBorgTranslation = GeoTrf::Translate3D(GetThickness()/2.,0.,GetLength()/2.); // // RSZ = tsz -// theTranslation = HepGeom::Translate3D(trat,tras,traz); +// theTranslation = GeoTrf::Translate3D(trat,tras,traz); // // SZR = szt -// theRotation = HepGeom::RotateY3D(rots)*HepGeom::RotateZ3D(rotz)* -// HepGeom::RotateX3D(rott); +// theRotation = GeoTrf::RotateY3D(rots)*GeoTrf::RotateZ3D(rotz)* +// GeoTrf::RotateX3D(rott); // } // else if (ap.isBarrel && ap.isTrapezoid) // { // we can get rid of isTrapezoid after AMDB version 7. -// theTranslation = HepGeom::Translate3D(trat,-tras,traz); -// theRotation = HepGeom::RotateY3D(-rots)*HepGeom::RotateZ3D(rotz)* -// HepGeom::RotateX3D(rott); -// AMDBorgTranslation = HepGeom::Translate3D(GetThickness()/2.,0.,GetLength()/2.); +// theTranslation = GeoTrf::Translate3D(trat,-tras,traz); +// theRotation = GeoTrf::RotateY3D(-rots)*GeoTrf::RotateZ3D(rotz)* +// GeoTrf::RotateX3D(rott); +// AMDBorgTranslation = GeoTrf::Translate3D(GetThickness()/2.,0.,GetLength()/2.); // } // else // { // assumed to be trapezoidal endcap chambers // // // // // RSZ = zst -// // theTranslation = HepGeom::Translate3D(traz,tras,trat); +// // theTranslation = GeoTrf::Translate3D(traz,tras,trat); // // // SZR = stz so you would expect: -// // theRotation = HepGeom::RotateY3D(rots)*HepGeom::RotateZ3D(rott)* -// // HepGeom::RotateX3D(rotz); +// // theRotation = GeoTrf::RotateY3D(rots)*GeoTrf::RotateZ3D(rott)* +// // GeoTrf::RotateX3D(rotz); // // // // but in fact the s-axis is flipped in MuonGM wrt AMDB, // // and the z and t axes are exchanged: -// theTranslation = HepGeom::Translate3D(trat,-tras,traz); -// theRotation = HepGeom::RotateY3D(-rots)*HepGeom::RotateZ3D(rotz)* -// HepGeom::RotateX3D(rott); -// AMDBorgTranslation = HepGeom::Translate3D(GetLength()/2.,0.,GetThickness()/2.); +// theTranslation = GeoTrf::Translate3D(trat,-tras,traz); +// theRotation = GeoTrf::RotateY3D(-rots)*GeoTrf::RotateZ3D(rotz)* +// GeoTrf::RotateX3D(rott); +// AMDBorgTranslation = GeoTrf::Translate3D(GetLength()/2.,0.,GetThickness()/2.); // } // // return theTranslation*theRotation; // // put it in AMDB coordinates for the transformation, then go back to MuonGM @@ -1014,19 +1012,19 @@ double Station::getAmdbOrigine_along_thickness() const // } // */ // not needed 17/06/2008 -// HepGeom::Transform3D Station::getAmdbOrgTrans(const Position & p) const +// GeoTrf::Transform3D Station::getAmdbOrgTrans(const Position & p) const // { // in tsz coordinates: // //MsgStream log(m_msgSvc, "MGM getAmdbOrgTrans"); -// HepGeom::Translate3D AMDBorgTranslation; +// GeoTrf::Translate3D AMDBorgTranslation; // if (m_name[0]=='B' || p.isBarrelLike ) // { // AMDBorgTranslation = -// HepGeom::Translate3D(GetThickness()/2.,0.,GetLength()/2.); +// GeoTrf::Translate3D(GetThickness()/2.,0.,GetLength()/2.); // } // else // { // AMDBorgTranslation = -// HepGeom::Translate3D(GetThickness()/2.,0.,GetLength()/2.); +// GeoTrf::Translate3D(GetThickness()/2.,0.,GetLength()/2.); // } // //log << MSG::VERBOSE<< "length = "<<GetLength()<<" m_thickness="<<GetThickness() // // << endmsg; @@ -1034,21 +1032,21 @@ double Station::getAmdbOrigine_along_thickness() const // } // 17/06/2008 not needed anywhere -// HepGeom::Transform3D Station::getTransform( const Position & p) const { +// GeoTrf::Transform3D Station::getTransform( const Position & p) const { // MsgStream log(m_msgSvc, "MuonGeoModel"); -// HepGeom::Transform3D nominalTransf; -// HepGeom::Transform3D AMDBorgTranslation = HepGeom::Transform3D::Identity; -// static CLHEP::Hep3Vector vec; +// GeoTrf::Transform3D nominalTransf; +// GeoTrf::Transform3D AMDBorgTranslation = GeoTrf::Transform3D::Identity; +// static GeoTrf::Vector3D vec; // if (m_name[0]=='B') { // // defining the position of the centre of any station // // here using the stations in DBSC (described in amdb + the ones at z<0) -// vec.setX((p.radius+GetThickness()/2.)*cos(p.phi*CLHEP::deg)); -// vec.setX(vec.x()-p.shift*sin((p.phi)*CLHEP::deg)); -// vec.setY((p.radius+GetThickness()/2.)*sin(p.phi*CLHEP::deg)); -// vec.setY(vec.y()+p.shift*cos((p.phi)*CLHEP::deg)); +// vec.setX((p.radius+GetThickness()/2.)*cos(p.phi*GeoModelKernelUnits::deg)); +// vec.setX(vec.x()-p.shift*sin((p.phi)*GeoModelKernelUnits::deg)); +// vec.setY((p.radius+GetThickness()/2.)*sin(p.phi*GeoModelKernelUnits::deg)); +// vec.setY(vec.y()+p.shift*cos((p.phi)*GeoModelKernelUnits::deg)); // vec.setZ(p.z+GetLength()/2.); -// AMDBorgTranslation = HepGeom::Translate3D(GetThickness()*cos(p.phi*CLHEP::deg)/2., -// GetThickness()*sin(p.phi*CLHEP::deg)/2., +// AMDBorgTranslation = GeoTrf::Translate3D(GetThickness()*cos(p.phi*GeoModelKernelUnits::deg)/2., +// GetThickness()*sin(p.phi*GeoModelKernelUnits::deg)/2., // GetLength()/2.); // } // else { // if (m_name[0]=='T') @@ -1061,65 +1059,65 @@ double Station::getAmdbOrigine_along_thickness() const // RAD=p.radius; // if (m_name[0]!='C') // { -// vec.setX((RAD+GetLength()/2.)*cos(p.phi*CLHEP::deg)); -// vec.setX(vec.x()-p.shift*sin((p.phi)*CLHEP::deg)); -// vec.setY((RAD+GetLength()/2.)*sin(p.phi*CLHEP::deg)); -// vec.setY(vec.y()+p.shift*cos((p.phi)*CLHEP::deg)); +// vec.setX((RAD+GetLength()/2.)*cos(p.phi*GeoModelKernelUnits::deg)); +// vec.setX(vec.x()-p.shift*sin((p.phi)*GeoModelKernelUnits::deg)); +// vec.setY((RAD+GetLength()/2.)*sin(p.phi*GeoModelKernelUnits::deg)); +// vec.setY(vec.y()+p.shift*cos((p.phi)*GeoModelKernelUnits::deg)); // vec.setZ(p.z+GetThickness()/2.); // } // else // { -// vec.setX(RAD*cos(p.phi*CLHEP::deg)); -// vec.setX(vec.x()-p.shift*sin((p.phi)*CLHEP::deg)); -// vec.setY(RAD*sin(p.phi*CLHEP::deg)); -// vec.setY(vec.y()+p.shift*cos((p.phi)*CLHEP::deg)); +// vec.setX(RAD*cos(p.phi*GeoModelKernelUnits::deg)); +// vec.setX(vec.x()-p.shift*sin((p.phi)*GeoModelKernelUnits::deg)); +// vec.setY(RAD*sin(p.phi*GeoModelKernelUnits::deg)); +// vec.setY(vec.y()+p.shift*cos((p.phi)*GeoModelKernelUnits::deg)); // if (p.z>0) vec.setZ(p.z); // else vec.setZ(p.z+GetThickness()); // } // } -// // HepGeom::Transform3D AMDBorgTranslation = HepGeom::Transform3D::Identity; -// // AMDBorgTranslation = HepGeom::Translate3D(GetThickness()/2., +// // GeoTrf::Transform3D AMDBorgTranslation = GeoTrf::Transform3D::Identity; +// // AMDBorgTranslation = GeoTrf::Translate3D(GetThickness()/2., // // 0., // // GetLength()/2.); // const HepVector3D zaxis = HepVector3D(0.,0.,1.); // const HepVector3D raxis = HepVector3D(vec.x(), vec.y(), 0.); // const HepVector3D phiaxis = HepVector3D(-raxis.y(), raxis.x(), 0.); // phi = z cross r // // order of extra rotations is alpha(r), then beta(z), then gamma(phi) -// HepGeom::Rotate3D ralpha, rbeta, rgamma; -// ralpha = HepGeom::Rotate3D(p.alpha*CLHEP::deg, raxis); -// rbeta = HepGeom::Rotate3D(p.beta*CLHEP::deg, zaxis); +// GeoTrf::Rotate3D ralpha, rbeta, rgamma; +// ralpha = GeoTrf::Rotate3D(p.alpha*GeoModelKernelUnits::deg, raxis); +// rbeta = GeoTrf::Rotate3D(p.beta*GeoModelKernelUnits::deg, zaxis); // if ( p.zindex<0 && !(m_name[0] == 'B') ) { -// rgamma = HepGeom::Rotate3D(p.gamma*CLHEP::deg, phiaxis); +// rgamma = GeoTrf::Rotate3D(p.gamma*GeoModelKernelUnits::deg, phiaxis); // // if (m_name[0]=='C') log << MSG::DEBUG <<"zi,fi gamma applied "<<m_name<<" "<<p.zindex<<" "<<p.phiindex<<" "<<p.gamma<<endmsg; // } // else { -// rgamma = HepGeom::Rotate3D(-p.gamma*CLHEP::deg, phiaxis); +// rgamma = GeoTrf::Rotate3D(-p.gamma*GeoModelKernelUnits::deg, phiaxis); // // if (m_name[0]=='C') log << MSG::DEBUG<<"zi,fi gamma applied "<<m_name<<" "<<p.zindex<<" "<<p.phiindex<<" "<<-p.gamma<<endmsg; // } // if (m_name[0]=='B' || p.isBarrelLike) // { // // here all Barrel chambers -// if (p.isMirrored) nominalTransf = HepGeom::RotateZ3D(p.phi*CLHEP::deg)*HepGeom::RotateX3D(180.*CLHEP::deg); -// else nominalTransf = HepGeom::RotateZ3D(p.phi*CLHEP::deg); +// if (p.isMirrored) nominalTransf = GeoTrf::RotateZ3D(p.phi*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(180.*GeoModelKernelUnits::deg); +// else nominalTransf = GeoTrf::RotateZ3D(p.phi*GeoModelKernelUnits::deg); // } // else // { // if ( p.z>=0 || ( p.z<0 && !(p.isMirrored) ) ){ -// nominalTransf = HepGeom::Transform3D(HepGeom::RotateY3D(-90*CLHEP::deg)*HepGeom::RotateX3D(p.phi*CLHEP::deg-180*CLHEP::deg)); +// nominalTransf = GeoTrf::Transform3D(GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)*GeoTrf::RotateX3D(p.phi*GeoModelKernelUnits::deg-180*GeoModelKernelUnits::deg)); // } // else if (p.z<0 && p.isMirrored){ -// nominalTransf = HepGeom::Transform3D(HepGeom::RotateY3D(-90*CLHEP::deg)* -// HepGeom::RotateX3D(p.phi*CLHEP::deg-180*CLHEP::deg)* -// HepGeom::RotateZ3D(180*CLHEP::deg)); +// nominalTransf = GeoTrf::Transform3D(GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)* +// GeoTrf::RotateX3D(p.phi*GeoModelKernelUnits::deg-180*GeoModelKernelUnits::deg)* +// GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)); // } // else log << MSG::WARNING<<" AAAAAA problem here p.z, mirrored " // <<p.z<<" "<<p.isMirrored<<endmsg; // } -// HepGeom::Transform3D transf; -// if (m_name[0]!='C') transf = HepGeom::Translate3D(vec)*rgamma*rbeta*ralpha*nominalTransf; -// else transf = HepGeom::Translate3D(vec)*nominalTransf* -// HepGeom::RotateY3D(p.gamma*CLHEP::deg)* -// HepGeom::Translate3D(GetThickness()/2.,0.,GetLength()/2.); +// GeoTrf::Transform3D transf; +// if (m_name[0]!='C') transf = GeoTrf::Translate3D(vec)*rgamma*rbeta*ralpha*nominalTransf; +// else transf = GeoTrf::Translate3D(vec)*nominalTransf* +// GeoTrf::RotateY3D(p.gamma*GeoModelKernelUnits::deg)* +// GeoTrf::Translate3D(GetThickness()/2.,0.,GetLength()/2.); // return transf; // } diff --git a/MuonSpectrometer/MuonGeoModel/src/Tgc.cxx b/MuonSpectrometer/MuonGeoModel/src/Tgc.cxx index 6306aa9313c..3abfde6a635 100755 --- a/MuonSpectrometer/MuonGeoModel/src/Tgc.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/Tgc.cxx @@ -63,12 +63,12 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) if (cutoutson && vcutdef.size() > 0) { Cutout* cut = 0; GeoShape* cutoutShape = 0; - HepGeom::Transform3D cutTrans; + GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()}; for (unsigned i = 0; i < vcutdef.size(); i++) { cut = vcutdef[i]; cutoutShape = new GeoTrd(thickness/2.+1., thickness/2.+1., cut->widthXs/2., cut->widthXl/2., cut->lengthY/2.); - cutTrans = HepGeom::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); + cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); strd = &(strd->subtract( (*cutoutShape) << cutTrans) ); } // std::cout << " Tgc cutouts" << std::endl; @@ -119,12 +119,11 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) // wire supports GeoTrd* strdsup = new GeoTrd(t->tck[i]/2, t->tck[i]/2, t->widthWireSupport/2, - t->widthWireSupport/2, lengthActive/2-0.1*CLHEP::mm); + t->widthWireSupport/2, lengthActive/2-0.1*GeoModelKernelUnits::mm); // button supports GeoTube* stubesup = new GeoTube(0., t->radiusButton, - t->tck[i]/2.+0.005*CLHEP::mm); - CLHEP::HepRotation rotY; - rotY.set(CLHEP::HepRotationY(3.14159264/2.*CLHEP::rad)); + t->tck[i]/2.+0.005*GeoModelKernelUnits::mm); + GeoTrf::RotateY3D rotY(3.14159264/2.*GeoModelKernelUnits::rad); int iymin = int( -(widthActive/2. + lengthActive*tan(t->angleTilt) - t->widthWireSupport/2. + t->offsetWireSupport[iSenLyr])/t->distanceWireSupport ); @@ -139,15 +138,12 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) } else if (t->offsetWireSupport[iSenLyr]+t->distanceWireSupport*isup == 0.){ sign = 0; } - CLHEP::HepRotation rotX; - rotX.set(CLHEP::HepRotationX(sign*t->angleTilt)); - CLHEP::Hep3Vector vtransWS; - vtransWS.set(0., - t->offsetWireSupport[iSenLyr] + t->distanceWireSupport*isup - + lengthActive/2.*tan(sign*t->angleTilt), - 0.); + GeoTrf::RotateX3D rotX(sign*t->angleTilt); + GeoTrf::Translate3D vtransWS(0., + t->offsetWireSupport[iSenLyr] + t->distanceWireSupport*isup + lengthActive/2.*tan(sign*t->angleTilt), + 0.); - sGasVolume = &(sGasVolume->subtract((*strdsup) << HepGeom::Transform3D(rotX,vtransWS))); + sGasVolume = &(sGasVolume->subtract((*strdsup) << GeoTrf::Transform3D(vtransWS*rotX))); // place button supports int izmin, izmax; @@ -192,14 +188,12 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) GeoTrd* strdsupex = new GeoTrd(t->tck[i]/2, t->tck[i]/2, t->widthWireSupport/2, t->widthWireSupport/2, - lengthWireSupportEx/2-0.1*CLHEP::mm); - CLHEP::Hep3Vector vtrans; - vtrans.set(0., - t->offsetWireSupport[iSenLyr]+t->distanceWireSupport*isupy - + lengthActive/2.*tan(sign*t->angleTilt), - (lengthActive-lengthWireSupportEx)/2.); - - sGasVolume = &(sGasVolume->subtract((*strdsupex) << HepGeom::Transform3D(rotX,vtrans))); + lengthWireSupportEx/2-0.1*GeoModelKernelUnits::mm); + GeoTrf::Translate3D vtrans(0., + t->offsetWireSupport[iSenLyr]+t->distanceWireSupport*isupy + lengthActive/2.*tan(sign*t->angleTilt), + (lengthActive-lengthWireSupportEx)/2.); + + sGasVolume = &(sGasVolume->subtract((*strdsupex) << GeoTrf::Transform3D(vtrans * rotX))); } } // End special case for TGC01, 06, 12 @@ -208,7 +202,7 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) + t->offsetWireSupport[iSenLyr] +lengthActive*tan( t->angleTilt)) -(-widthActive/2.); - if (widthLeftTrd > 8.*CLHEP::cm) { + if (widthLeftTrd > 8.*GeoModelKernelUnits::cm) { double yLongBase; if ((name == "TGC01" || name == "TGC06" || name == "TGC12") && t->distanceWireSupport*(iymin-1)+t->offsetWireSupport[iSenLyr] @@ -236,7 +230,7 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) +t->offsetWireSupport[iSenLyr] +lengthActive*tan(-t->angleTilt)); - if (widthRightTrd > 8.*CLHEP::cm) { + if (widthRightTrd > 8.*GeoModelKernelUnits::cm) { double yLongBase; if ((name == "TGC01" || name == "TGC06" || name == "TGC12") && t->distanceWireSupport*(iymax+1)+t->offsetWireSupport[iSenLyr] @@ -269,10 +263,9 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) totNBS += nBS; double yposleft = yposCentre[iBS] - t->pitchButton[0]/2. + (lengthActive/2.-t->pitchButton[1]/2.*isupz)*tan(angleTiltButton[iBS]); - CLHEP::Hep3Vector vtransBS; - vtransBS.set(0., yposleft + t->pitchButton[0]*std::abs(isupz%2), - t->pitchButton[1]/2.*isupz); - sGasVolume = &(sGasVolume->subtract( (*stubesup) << HepGeom::Transform3D(rotY,vtransBS))); + GeoTrf::Translate3D vtransBS(0., yposleft + t->pitchButton[0]*std::abs(isupz%2), + t->pitchButton[1]/2.*isupz); + sGasVolume = &(sGasVolume->subtract( (*stubesup) << GeoTrf::Transform3D(vtransBS*rotY))); } } } // loop over wire supports @@ -283,14 +276,14 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) // makes a gas boundary Cutout* cut = 0; GeoShape* cutoutShape = 0; - HepGeom::Transform3D cutTrans; + GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()}; for (unsigned i = 0; i < vcutdef.size(); i++) { cut = vcutdef[i]; cutoutShape = new GeoTrd(thickness/2.+1., thickness/2.+1., cut->widthXs/2. + t->frame_ab/2., cut->widthXl/2. + t->frame_ab/2., cut->lengthY/2. + t->frame_h/2.); - cutTrans = HepGeom::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); + cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); sGasVolume = &(sGasVolume->subtract( (*cutoutShape) << cutTrans) ); } } @@ -299,7 +292,7 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) matManager->getMaterial(t->materials[i])); GeoPhysVol* ptrdtmp = new GeoPhysVol(ltrdtmp); GeoNameTag* ntrdtmp = new GeoNameTag(name+t->materials[i]); - GeoTransform* ttrdtmp = new GeoTransform(HepGeom::TranslateX3D(newpos + (t->tck[i]/2))); + GeoTransform* ttrdtmp = new GeoTransform(GeoTrf::TranslateX3D(newpos + (t->tck[i]/2))); // Place gas volume inside G10 mother volume so that // subtractions from gas volume now become G10 @@ -319,12 +312,12 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) if (cutoutson && vcutdef.size() > 0) { Cutout* cut = 0; GeoShape* cutoutShape = 0; - HepGeom::Transform3D cutTrans; + GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()}; for (unsigned i = 0; i < vcutdef.size(); i++) { cut = vcutdef[i]; cutoutShape = new GeoTrd(thickness/2.+1., thickness/2.+1., cut->widthXs/2., cut->widthXl/2., cut->lengthY/2.); - cutTrans = HepGeom::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); + cutTrans = GeoTrf::Translate3D(0.0, cut->dx, -length/2 + cut->dy + cut->lengthY/2.); strdtmp = &(strdtmp->subtract( (*cutoutShape) << cutTrans) ); } } @@ -332,7 +325,7 @@ Tgc::build(int minimalgeo, int cutoutson, std::vector<Cutout*> vcutdef) matManager->getMaterial(t->materials[i])); GeoPhysVol* ptrdtmp = new GeoPhysVol(ltrdtmp); GeoNameTag* ntrdtmp = new GeoNameTag(name+t->materials[i]); - GeoTransform* ttrdtmp = new GeoTransform(HepGeom::TranslateX3D(newpos+ (t->tck[i]/2))); + GeoTransform* ttrdtmp = new GeoTransform(GeoTrf::TranslateX3D(newpos+ (t->tck[i]/2))); if (!skip_tgc) { ptrd->add(ntrdtmp); diff --git a/MuonSpectrometer/MuonGeoModel/src/sTGC.cxx b/MuonSpectrometer/MuonGeoModel/src/sTGC.cxx index d105b6c0f03..e9dd01b9b52 100755 --- a/MuonSpectrometer/MuonGeoModel/src/sTGC.cxx +++ b/MuonSpectrometer/MuonGeoModel/src/sTGC.cxx @@ -85,12 +85,8 @@ GeoFullPhysVol* sTGC::build(int minimalgeo, int , std::vector<Cutout*> ) if (yCutout) solid->addVertex(longWidth/2.,length/2.-yCutout); //Transform the mother volume to the correct position - CLHEP::Hep3Vector v(0,0,0); - CLHEP::HepRotation rot; - rot.rotateX(M_PI/2.); - rot.rotateZ(M_PI/2.); - HepGeom::Transform3D transf(rot,v); - const GeoShape *strd=new GeoShapeShift(solid,transf); + GeoTrf::Transform3D rot = GeoTrf::RotateZ3D(M_PI/2.)*GeoTrf::RotateX3D(M_PI/2.); + const GeoShape *strd=new GeoShapeShift(solid,rot); logVolName=name; if (!(m_component->subType).empty()) logVolName+=("-"+m_component->subType); @@ -135,16 +131,12 @@ GeoFullPhysVol* sTGC::build(int minimalgeo, int , std::vector<Cutout*> ) if (yCutout) sGasVolume->addVertex(longWidthActive/2.,lengthActive/2.-yCutout); //Transform gas volume - CLHEP::Hep3Vector v(0,0,0); - CLHEP::HepRotation rot; - rot.rotateX(M_PI/2.); - rot.rotateZ(M_PI/2.); - HepGeom::Transform3D transf(rot,v); - const GeoShape *sGasVolume1=new GeoShapeShift(sGasVolume,transf); + GeoTrf::Transform3D rot = GeoTrf::RotateZ3D(M_PI/2.)*GeoTrf::RotateX3D(M_PI/2.); + const GeoShape *sGasVolume1=new GeoShapeShift(sGasVolume,rot); GeoLogVol* ltrdgas = new GeoLogVol("sTGC_Sensitive", sGasVolume1, matManager->getMaterial("muo::TGCGas")); GeoPhysVol* ptrdgas = new GeoPhysVol(ltrdgas); GeoNameTag* gastag = new GeoNameTag(name+"muo::TGCGas"); - GeoTransform* chamberpos = new GeoTransform(HepGeom::TranslateX3D(newXPos)); + GeoTransform* chamberpos = new GeoTransform(GeoTrf::TranslateX3D(newXPos)); //Build two pcb volumes and add them to the gas at -chamberTck/2 and at +chamberTck/2 for(int i = 0; i < 2; i++){ @@ -161,19 +153,15 @@ GeoFullPhysVol* sTGC::build(int minimalgeo, int , std::vector<Cutout*> ) if (yCutout) sPcbVolume->addVertex(longWidthActive/2.,lengthActive/2.-yCutout); //Transform PCB volume - CLHEP::Hep3Vector vv(0,0,0); - CLHEP::HepRotation rott; - rott.rotateX(M_PI/2.); - rott.rotateZ(M_PI/2.); - HepGeom::Transform3D transff(rott,vv); - const GeoShape *sPcbVolume1=new GeoShapeShift(sPcbVolume,transff); + GeoTrf::Transform3D rott = GeoTrf::RotateZ3D(M_PI/2.)*GeoTrf::RotateX3D(M_PI/2.); + const GeoShape *sPcbVolume1=new GeoShapeShift(sPcbVolume,rott); const GeoMaterial* mtrdC = matManager->getMaterial("std::G10"); GeoLogVol* ltrdC = new GeoLogVol(logVolName, sPcbVolume1, mtrdC); GeoPhysVol* ptrdPcb = new GeoPhysVol(ltrdC); GeoNameTag* ntrdtmpC = new GeoNameTag(name+"std::G10"); - GeoTransform* ttrdtmpC = new GeoTransform(HepGeom::TranslateX3D(pcbpos)); + GeoTransform* ttrdtmpC = new GeoTransform(GeoTrf::TranslateX3D(pcbpos)); // Place pcb volume inside chamber volume @@ -196,8 +184,7 @@ GeoFullPhysVol* sTGC::build(int minimalgeo, int , std::vector<Cutout*> ) longWidth/2, length/2); const GeoShape* trd2 = new GeoTrd(gasTck,gasTck, W-f6, lW-f6, length/2-(f4+f5)/2.); - HepGeom::Transform3D c; - c=HepGeom::Translate3D(0,0,(f5-f4)/2.); + GeoTrf::Translate3D c(0,0,(f5-f4)/2.); trd1= &(trd1->subtract( (*trd2) << c )); GeoLogVol* ltrdframe = new GeoLogVol("sTGC_Frame", trd1, matManager->getMaterial("std::Aluminium")); @@ -217,7 +204,7 @@ GeoFullPhysVol* sTGC::build(int minimalgeo, int , std::vector<Cutout*> ) sGasV->addVertex(W-f6,-lengthActive/2.+f5); sGasV->addVertex(longWidthActive/2.-f6,lengthActive/2.-yCutout); - const GeoShape *sGasV1=new GeoShapeShift(sGasV,transf); + const GeoShape *sGasV1=new GeoShapeShift(sGasV,rot); const GeoShape* sGasV2=&(sGasVolume1->subtract(*sGasV1)); diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonTGMeasAssocAlg/src/MuonTGMeasAssocAlg.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonTGMeasAssocAlg/src/MuonTGMeasAssocAlg.cxx index e41d3bd697a..03f62cae69f 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonTGMeasAssocAlg/src/MuonTGMeasAssocAlg.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonTGMeasAssocAlg/src/MuonTGMeasAssocAlg.cxx @@ -997,7 +997,7 @@ void Muon::MuonTGMeasAssocAlg::reAlignStations() const unsigned int moved = 0; for ( ;iter!=m_stationMap.end();iter++) { - const Amg::Transform3D transfMS = Amg::CLHEPTransformToEigen(iter->second.first->getGeoTransform()->getTransform()); + const Amg::Transform3D transfMS = iter->second.first->getGeoTransform()->getTransform(); const Amg::Transform3D transfTV = iter->second.second->trackingVolume()->transform(); if ( !transfMS.isApprox(transfTV, 1e-3) ) { Amg::Transform3D shift = transfMS*transfTV.inverse(); diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/CMakeLists.txt index 69365ab14c1..d863e754a5a 100644 --- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/CMakeLists.txt +++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/CMakeLists.txt @@ -35,12 +35,13 @@ atlas_depends_on_subdirs( PRIVATE # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) find_package( HepMC ) +find_package( CLHEP ) # Component(s) in the package: atlas_add_component( JetTagD3PDMaker src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps AthenaKernel AthContainers EventKernel EventPrimitives GaudiKernel GeneratorObjects InDetIdentifier InDetReadoutGeometry D3PDMakerUtils JetTagEvent JetTagInfo MuonIDEvent McParticleEvent JetEvent muonEvent Particle egammaEvent TrkParticleBase VxJetVertex VxSecVertex VxVertex TrkVertexFitterInterfaces ) # Install files from the package: diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagTwoTrackVertexFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagTwoTrackVertexFillerTool.cxx index ebf4b80afe4..661d2942566 100644 --- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagTwoTrackVertexFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagTwoTrackVertexFillerTool.cxx @@ -12,7 +12,8 @@ #include "EventPrimitives/EventPrimitivesHelpers.h" - +#include "CLHEP/Vector/LorentzVector.h" +#include "CLHEP/Vector/ThreeVector.h" using CLHEP::HepLorentzVector; using CLHEP::Hep3Vector; diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagVxOnJetAxisTrackAssociationTool.cxx b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagVxOnJetAxisTrackAssociationTool.cxx index fc7c29be7d7..ef0b2de108d 100644 --- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagVxOnJetAxisTrackAssociationTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/src/JetTagVxOnJetAxisTrackAssociationTool.cxx @@ -11,8 +11,7 @@ #include "Particle/TrackParticle.h" #include "TrkParticleBase/LinkToTrackParticleBase.h" - -using HepGeom::Vector3D; +#include "CLHEP/Vector/ThreeVector.h" using CLHEP::Hep3Vector; diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/CMakeLists.txt index daf696c5358..a9f5b7960c9 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/CMakeLists.txt +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/CMakeLists.txt @@ -18,6 +18,7 @@ atlas_depends_on_subdirs( PRIVATE DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/GeoModel/GeoModelUtilities DetectorDescription/Identifier + DetectorDescription/GeoPrimitives Event/EventInfo Event/xAOD/xAODCaloEvent Event/xAOD/xAODEventInfo diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCellFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCellFillerTool.cxx index c0c6a7068fa..dccaae84fa7 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCellFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCellFillerTool.cxx @@ -11,6 +11,7 @@ */ // INCLUDE HEADER +#include "GeoPrimitives/GeoPrimitives.h" #include "TileCellFillerTool.h" // xAOD tools diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCellFillerTool.h b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCellFillerTool.h index 4617a812f59..3c4e1b865f4 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCellFillerTool.h +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCellFillerTool.h @@ -20,6 +20,8 @@ #ifndef TILEMUONCALOD3PDMAKER_CELLFILLERTOOL_H #define TILEMUONCALOD3PDMAKER_CELLFILLERTOOL_H +#include "GeoPrimitives/GeoPrimitives.h" + /// D3PD INCLUDES #include "D3PDMakerUtils/BlockFillerTool.h" diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileClusterFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileClusterFillerTool.cxx index 0211bcf1481..09821d43d08 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileClusterFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileClusterFillerTool.cxx @@ -10,6 +10,7 @@ */ // INCLUDE HEADER FILE +#include "GeoPrimitives/GeoPrimitives.h" #include "TileClusterFillerTool.h" using namespace D3PD; diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileClusterFilterAlg.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileClusterFilterAlg.cxx index 4e2df09da6f..7fce1fc645e 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileClusterFilterAlg.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileClusterFilterAlg.cxx @@ -7,6 +7,7 @@ * Author: Carlos.Solans@cern.ch */ +#include "GeoPrimitives/GeoPrimitives.h" #include "TileClusterFilterAlg.h" TileClusterFilterAlg::TileClusterFilterAlg( const std::string& name, ISvcLocator* pSvcLocator ): diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCosmicMuonFilterAlg.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCosmicMuonFilterAlg.cxx index 0ae775ed6b1..36ee9db3e21 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCosmicMuonFilterAlg.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileCosmicMuonFilterAlg.cxx @@ -8,6 +8,7 @@ * Author: Archil.Durglishvili@cern.ch */ +#include "GeoPrimitives/GeoPrimitives.h" #include "TileCosmicMuonFilterAlg.h" #include "CaloGeoHelpers/CaloSampling.h" #include "AthContainers/ConstDataVector.h" diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileEopFilterAlg.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileEopFilterAlg.cxx index a41a2a0f18f..e795cf2676a 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileEopFilterAlg.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileEopFilterAlg.cxx @@ -7,6 +7,7 @@ * Author: Carlos.Solans@cern.ch */ +#include "GeoPrimitives/GeoPrimitives.h" #include "TileEopFilterAlg.h" #include "CaloGeoHelpers/CaloSampling.h" #include "AthContainers/ConstDataVector.h" diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFillerTool.cxx index d9dde1d7f49..c4d4952895f 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFillerTool.cxx @@ -12,6 +12,7 @@ */ // INCLUDE HEADER FILE +#include "GeoPrimitives/GeoPrimitives.h" #include "TileMuonFillerTool.h" // CALORIMETER INCLUDES diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFilterAlg.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFilterAlg.cxx index 8b2011515a2..3c5fcf91e2e 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFilterAlg.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFilterAlg.cxx @@ -8,6 +8,7 @@ * Author: Archil.Durglishvili@cern.ch */ +#include "GeoPrimitives/GeoPrimitives.h" #include "TileMuonFilterAlg.h" #include "CaloGeoHelpers/CaloSampling.h" #include "AthContainers/ConstDataVector.h" diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFillerTool.cxx index 6dd03a08463..64deebb2cb3 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFillerTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFillerTool.cxx @@ -10,6 +10,7 @@ */ // INCLUDE HEADER FILE +#include "GeoPrimitives/GeoPrimitives.h" #include "TileTrackFillerTool.h" //xAOD tools diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFilterAlg.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFilterAlg.cxx index 5cd4424ccbd..d0ae019d437 100644 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFilterAlg.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFilterAlg.cxx @@ -10,6 +10,7 @@ */ // INCLUDE HEADER +#include "GeoPrimitives/GeoPrimitives.h" #include "TileTrackFilterAlg.h" //=============================================================================================== diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TrackTools.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TrackTools.cxx index 1c0591fd1a2..2ea25a322d4 100755 --- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TrackTools.cxx +++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TrackTools.cxx @@ -10,6 +10,7 @@ * Created in February 2013. * Updated in November 2014 */ +#include "GeoPrimitives/GeoPrimitives.h" #include "TrackTools.h" //============================================= diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/PhotonTruthTool.cxx b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/PhotonTruthTool.cxx index 7e017c2bc7b..4911f172afa 100644 --- a/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/PhotonTruthTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDAnalysis/src/PhotonTruthTool.cxx @@ -17,10 +17,6 @@ #include <vector> #include <cmath> - -using HepGeom::Point3D; - - namespace D3PD { diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx index 15dc4f12770..a7a60216946 100755 --- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx +++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/src/EgammaTagTool.cxx @@ -13,6 +13,7 @@ Purpose : create a collection of EgammaTag #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/Property.h" +#include "GaudiKernel/SystemOfUnits.h" #include "ElectronPhotonTagTools/EgammaTagTool.h" #include "TagEvent/EgammaAttributeNames.h" #include "xAODEgamma/EgammaContainer.h" @@ -31,15 +32,15 @@ EgammaTagTool::EgammaTagTool (const std::string& type, const std::string& name, declareProperty("ElectronContainer", m_electronContainer = "ElectronCollection"); declareProperty("PhotonContainer", m_photonContainer = "PhotonCollection"); /** selection cut of Pt */ - declareProperty("ElectronPtCut", m_electronPtCut = 20.0*CLHEP::GeV); - declareProperty("PhotonPtCut", m_photonPtCut = 10.0*CLHEP::GeV); + declareProperty("ElectronPtCut", m_electronPtCut = 20.0*Gaudi::Units::GeV); + declareProperty("PhotonPtCut", m_photonPtCut = 10.0*Gaudi::Units::GeV); /** mass cut for Z */ - declareProperty("MassZLow", m_massZLow = 45.*CLHEP::GeV ); - declareProperty("MassZHigh", m_massZHigh = 180.*CLHEP::GeV); + declareProperty("MassZLow", m_massZLow = 45.*Gaudi::Units::GeV ); + declareProperty("MassZHigh", m_massZHigh = 180.*Gaudi::Units::GeV); /** missing Et cut */ declareProperty("MissingEtObject", m_missingEtObject = "MET_RefFinal"); - declareProperty("MissingEtCut", m_missingEtCut = 25.*CLHEP::GeV ); - declareProperty("WElectronPtCut", m_welectronPtCut = 15.*CLHEP::GeV ); + declareProperty("MissingEtCut", m_missingEtCut = 25.*Gaudi::Units::GeV ); + declareProperty("WElectronPtCut", m_welectronPtCut = 15.*Gaudi::Units::GeV ); declareProperty("MissingEtTerm", m_missingEtTerm = "Final"); declareInterface<EgammaTagTool>( this ); diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx index 1003047e27d..fb678a5f084 100755 --- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx @@ -30,6 +30,8 @@ #include "LWHists/TH1F_LW.h" #include "LWHists/TH2F_LW.h" +#include "GaudiKernel/SystemOfUnits.h" + #include "TH1F.h" #include "TH2F.h" #include "TMath.h" @@ -781,13 +783,13 @@ bool JetTagMonitoring::passKinematicCuts(const xAOD::Jet *jet) { //* get jet basic kinematics *// m_jet_eta->Fill(jet->eta()); m_jet_phi->Fill(jet->phi()); - m_jet_et->Fill(jet->pt() / CLHEP::GeV); + m_jet_et->Fill(jet->pt() / Gaudi::Units::GeV); - ATH_MSG_DEBUG("Jet kinematics: eta = " << jet->eta() << ", phi= " << jet->phi() << ", pT= " << jet->pt() / CLHEP::GeV); + ATH_MSG_DEBUG("Jet kinematics: eta = " << jet->eta() << ", phi= " << jet->phi() << ", pT= " << jet->pt() / Gaudi::Units::GeV); // kinematic cuts defined as properties - if ( jet->pt() / CLHEP::GeV < m_jet_pt_cut || fabs(jet->eta()) > m_jet_eta_cut ) + if ( jet->pt() / Gaudi::Units::GeV < m_jet_pt_cut || fabs(jet->eta()) > m_jet_eta_cut ) return false; return true; @@ -905,7 +907,7 @@ bool JetTagMonitoring::isTopEvent() { // added by SARA for 2017 data taking for ( ; electronItr != electronEnd; electronItr++) { //select electrons which passed author and pT cut if (!(*electronItr)->author(xAOD::EgammaParameters::AuthorElectron)) continue; - if ((*electronItr) -> pt() / CLHEP::GeV < m_ElectronPtCut) continue; + if ((*electronItr) -> pt() / Gaudi::Units::GeV < m_ElectronPtCut) continue; bool inAcceptance = (TMath::Abs((*electronItr) -> eta()) > m_ElectronEtaCrackHighCut || TMath::Abs((*electronItr) -> eta()) < m_ElectronEtaCrackLowCut) && TMath::Abs((*electronItr) -> eta()) < m_ElectronEtaCut; if (!inAcceptance) continue; @@ -931,7 +933,7 @@ bool JetTagMonitoring::isTopEvent() { // added by SARA for 2017 data taking int n_isoMuons = 0; for ( ; muonItr != muonEnd; muonItr++) { //select muons which passed pT cut - if ((*muonItr) -> pt() / CLHEP::GeV < m_MuonPtCut) continue; + if ((*muonItr) -> pt() / Gaudi::Units::GeV < m_MuonPtCut) continue; bool inAcceptance = TMath::Abs((*muonItr) -> eta()) < m_MuonEtaCut; if (!inAcceptance) continue; // medium muons @@ -1110,10 +1112,10 @@ void JetTagMonitoring::fillJetHistograms() { if (is_top_event && n_jets_kinematic >= 2) { // added by SARA - I have at least 2 kinematic jets, so want to fill top histograms m_jet_top->Fill(0., 1.); // added by SARA - m_jet_pt_top->Fill((*jetItr)->pt() / CLHEP::GeV, 1.); // added by SARA + m_jet_pt_top->Fill((*jetItr)->pt() / Gaudi::Units::GeV, 1.); // added by SARA if (n_jets_kinematic == 2) { // added by SARA - now I know I have (at least) two kinematic jets, so I want to fill also for 1st kinematic jet m_jet_top->Fill(0., 1.); // added by SARA - m_jet_pt_top->Fill((*firstKinematicjetItr)->pt() / CLHEP::GeV, 1.); // added by SARA + m_jet_pt_top->Fill((*firstKinematicjetItr)->pt() / Gaudi::Units::GeV, 1.); // added by SARA } } @@ -1178,7 +1180,7 @@ void JetTagMonitoring::fillTrackInJetHistograms(const xAOD::Jet *jet) { uint8_t nPixHits = 0; uint8_t nSCTHits = 0; - m_jet_tracks_pt->Fill(trackPart->pt() / CLHEP::GeV); + m_jet_tracks_pt->Fill(trackPart->pt() / Gaudi::Units::GeV); m_jet_tracks_eta->Fill(trackPart->eta()); m_jet_tracks_phi->Fill(trackPart->phi()); m_jet_tracks_d0->Fill(trackPart->d0()); @@ -1214,7 +1216,7 @@ void JetTagMonitoring::fillBtagHistograms(const xAOD::Jet *jet, bool fill_top_hi m_jet_mv_w_top->Fill(mv); // added by SARA if (mv > m_mv_70_weight_cut) { m_jet_top_tagged->Fill(0., 1.); // added by SARA - m_jet_pt_top_tagged->Fill(jet->pt() / CLHEP::GeV, 1.); // added by SARA + m_jet_pt_top_tagged->Fill(jet->pt() / Gaudi::Units::GeV, 1.); // added by SARA } } else { // added by SARA - fill non-top histograms @@ -1400,17 +1402,17 @@ void JetTagMonitoring::fillGoodJetHistos(const xAOD::Jet *jet) { m_tag_mv_w->Fill(mv); m_tag_mv_w_LS->Fill(mv); - if ( jet->pt() / CLHEP::GeV > 200. ) m_tag_mv_w_pT200->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 100. ) m_tag_mv_w_pT100_200->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 50. ) m_tag_mv_w_pT50_100->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 20. ) m_tag_mv_w_pT20_50->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 10. ) m_tag_mv_w_pT10_20->Fill(mv); + if ( jet->pt() / Gaudi::Units::GeV > 200. ) m_tag_mv_w_pT200->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 100. ) m_tag_mv_w_pT100_200->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 50. ) m_tag_mv_w_pT50_100->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 20. ) m_tag_mv_w_pT20_50->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 10. ) m_tag_mv_w_pT10_20->Fill(mv); - if ( jet->pt() / CLHEP::GeV > 200. ) m_tag_mv_w_pT200_LS->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 100. ) m_tag_mv_w_pT100_200_LS->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 50. ) m_tag_mv_w_pT50_100_LS->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 20. ) m_tag_mv_w_pT20_50_LS->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 10. ) m_tag_mv_w_pT10_20_LS->Fill(mv); + if ( jet->pt() / Gaudi::Units::GeV > 200. ) m_tag_mv_w_pT200_LS->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 100. ) m_tag_mv_w_pT100_200_LS->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 50. ) m_tag_mv_w_pT50_100_LS->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 20. ) m_tag_mv_w_pT20_50_LS->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 10. ) m_tag_mv_w_pT10_20_LS->Fill(mv); if ( fabs(jet->eta()) > 2.0 ) m_tag_mv_w_eta20_25->Fill(mv); @@ -1475,7 +1477,7 @@ bool JetTagMonitoring::passJetQualityCuts(const xAOD::Jet *jet){ if ( !( - (hecf>0.5 && fabs(hecq)>0.5) || (fabs(negE) > 60*CLHEP::GeV) || + (hecf>0.5 && fabs(hecq)>0.5) || (fabs(negE) > 60*Gaudi::Units::GeV) || (emf>0.95 && fabs(jetQuality)>0.8 && fabs(jet->eta()) < 2.8) || //(n90<=5 && hecf>0.8) || (hecf>0.5 && fabs(jetQuality)>0.5) || (emf<0.05) || (fabs(jetTime)>25) || @@ -1508,11 +1510,11 @@ void JetTagMonitoring::fillSuspectJetHistos(const xAOD::Jet *jet) { m_tag_sv1ip3d_w_sj->Fill(sv1ip3d); m_tag_mv_w_sj->Fill(mv); - if ( jet->pt() / CLHEP::GeV > 200. ) m_tag_mv_w_sj_pT200->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 100. ) m_tag_mv_w_sj_pT100_200->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 50. ) m_tag_mv_w_sj_pT50_100->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 20. ) m_tag_mv_w_sj_pT20_50->Fill(mv); - else if ( jet->pt() / CLHEP::GeV > 10. ) m_tag_mv_w_sj_pT10_20->Fill(mv); + if ( jet->pt() / Gaudi::Units::GeV > 200. ) m_tag_mv_w_sj_pT200->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 100. ) m_tag_mv_w_sj_pT100_200->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 50. ) m_tag_mv_w_sj_pT50_100->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 20. ) m_tag_mv_w_sj_pT20_50->Fill(mv); + else if ( jet->pt() / Gaudi::Units::GeV > 10. ) m_tag_mv_w_sj_pT10_20->Fill(mv); if ( fabs(jet->eta()) > 2.0 ) m_tag_mv_w_sj_eta20_25->Fill(mv); else if ( fabs(jet->eta()) > 1.5 ) m_tag_mv_w_sj_eta15_20->Fill(mv); diff --git a/Projects/Athena/build_externals.sh b/Projects/Athena/build_externals.sh index 9683078b6b6..efbf77369ce 100755 --- a/Projects/Athena/build_externals.sh +++ b/Projects/Athena/build_externals.sh @@ -139,9 +139,9 @@ fi AthenaExternalsVersion=$(awk '/^AthenaExternalsVersion/{print $3}' ${thisdir}/externals.txt) # Check out AthenaExternals from the right branch/tag: -${scriptsdir}/checkout_atlasexternals.sh \ - -t ${AthenaExternalsVersion} \ - -s ${BUILDDIR}/src/AthenaExternals 2>&1 | tee ${BUILDDIR}/src/checkout.AthenaExternals.log +#${scriptsdir}/checkout_atlasexternals.sh \ +# -t ${AthenaExternalsVersion} \ +# -s ${BUILDDIR}/src/AthenaExternals 2>&1 | tee ${BUILDDIR}/src/checkout.AthenaExternals.log # log analyzer never affects return status in the parent shell: { @@ -162,7 +162,7 @@ ${scriptsdir}/checkout_atlasexternals.sh \ ## Build AthenaExternals: export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AthenaExternals ${scriptsdir}/build_atlasexternals.sh \ - -s ${BUILDDIR}/src/AthenaExternals \ + -s /build1/tsulaia/athena-devel/atlasexternals/src \ -b ${BUILDDIR}/build/AthenaExternals \ -i ${BUILDDIR}/install/AthenaExternals/${NICOS_PROJECT_VERSION} \ -p AthenaExternals ${RPMOPTIONS} -t ${BUILDTYPE} \ diff --git a/Reconstruction/MuonIdentification/CaloTrkMuIdTools/src/TrackDepositInCaloTool.cxx b/Reconstruction/MuonIdentification/CaloTrkMuIdTools/src/TrackDepositInCaloTool.cxx index 66207b4c831..94f8f33d00c 100755 --- a/Reconstruction/MuonIdentification/CaloTrkMuIdTools/src/TrackDepositInCaloTool.cxx +++ b/Reconstruction/MuonIdentification/CaloTrkMuIdTools/src/TrackDepositInCaloTool.cxx @@ -33,6 +33,8 @@ #include "TH1F.h" #include "TH2F.h" +#include "CLHEP/Units/SystemOfUnits.h" + /////////////////////////////////////////////////////////////////////////////// // Constructor /////////////////////////////////////////////////////////////////////////////// diff --git a/Reconstruction/MuonIdentification/MuidCaloEnergyTools/src/MuidCaloEnergyTool.cxx b/Reconstruction/MuonIdentification/MuidCaloEnergyTools/src/MuidCaloEnergyTool.cxx index cc4cedfd1b8..69ac978678f 100755 --- a/Reconstruction/MuonIdentification/MuidCaloEnergyTools/src/MuidCaloEnergyTool.cxx +++ b/Reconstruction/MuonIdentification/MuidCaloEnergyTools/src/MuidCaloEnergyTool.cxx @@ -525,7 +525,7 @@ MuidCaloEnergyTool::measurement(double trackMomentum, const double EmIso = caloMeas->LArEM_Isolation(); const double Theta = 2.*atan(exp(-eta)); - const double pT = trackMomentum*sin(Theta)*CLHEP::MeV; + const double pT = trackMomentum*sin(Theta)*Units::MeV; const double EmCut = m_emMinEnergy + (3.-2.)/(100.-15.)*(pT/Units::GeV-15.)*Units::GeV; const double HECCut = m_hecMinEnergy; const double pTCut = m_minMuonPt; diff --git a/Reconstruction/MuonIdentification/MuonCombinedEvaluationTools/src/MuonMomentumBalanceSignificanceTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedEvaluationTools/src/MuonMomentumBalanceSignificanceTool.cxx index b26498a2cec..a955d201f95 100644 --- a/Reconstruction/MuonIdentification/MuonCombinedEvaluationTools/src/MuonMomentumBalanceSignificanceTool.cxx +++ b/Reconstruction/MuonIdentification/MuonCombinedEvaluationTools/src/MuonMomentumBalanceSignificanceTool.cxx @@ -17,10 +17,11 @@ #include "TrkTrack/Track.h" #include "TrkTrack/TrackStateOnSurface.h" #include "TrkMeasurementBase/MeasurementBase.h" +#include "GaudiKernel/SystemOfUnits.h" //#include "TrkGeometry/TrackingVolume.h" //#include "TrkDetDescrInterfaces/ITrackingVolumesSvc.h" -using CLHEP::GeV; +using Gaudi::Units::GeV; namespace Rec { diff --git a/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.cxx b/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.cxx index ad930bb86b9..493367ce8c3 100644 --- a/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.cxx +++ b/Reconstruction/RecoTools/TrackToCalo/src/MuonCaloEnergyTool.cxx @@ -17,6 +17,8 @@ #include "xAODTracking/TrackParticle.h" #include "xAODTracking/TrackingPrimitives.h" +#include "GaudiKernel/SystemOfUnits.h" + #include <math.h> namespace Rec { @@ -28,7 +30,7 @@ namespace Rec { m_particleCreator("Trk::TrackParticleCreatorTool/MuonCaloParticleCreator"), m_caloNoiseTool("CaloNoiseToolDefault"), m_sigmasAboveNoise(4.), - m_emEtCut(2.5*CLHEP::GeV), + m_emEtCut(2.5*Gaudi::Units::GeV), m_emF1Cut(0.15), m_emipEM(0.42), // 0.42 m_emipTile(0.86), // 0.86 diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx index 90fa7d47e6f..b432633df7d 100644 --- a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx +++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx @@ -23,6 +23,7 @@ // Gaudi #include "GaudiKernel/ITHistSvc.h" +#include "GaudiKernel/SystemOfUnits.h" // Root #include "TTree.h" @@ -31,7 +32,7 @@ #include <vector> -using CLHEP::GeV; +using Gaudi::Units::GeV; CalibrationNtupleMakerTool::CalibrationNtupleMakerTool(const std::string& name, ISvcLocator* pSvcLocator) : AthAlgorithm(name, pSvcLocator), diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h index f9611b9a039..9afb5d5a921 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaBuilder.h @@ -48,6 +48,8 @@ #include "egammaInterfaces/IEMTrackMatchBuilder.h" #include "egammaInterfaces/IEMConversionBuilder.h" +#include "GaudiKernel/SystemOfUnits.h" + class egammaRec; class egammaBuilder : public AthAlgorithm @@ -179,7 +181,7 @@ class egammaBuilder : public AthAlgorithm // /** @brief Discard clusters with energy less than this after corrections. */ Gaudi::Property<float> m_clusterEnergyCut {this, - "clusterEnergyCut", 10 * CLHEP::MeV, + "clusterEnergyCut", 10 * Gaudi::Units::MeV, "Discard clusters with energies below this after corrections"}; // @brief Minimum deltaEta to check if clusters overlap @@ -191,11 +193,11 @@ class egammaBuilder : public AthAlgorithm "Minimum deltaPhi to check if clusters overlap"}; // @brief Minimum transverse energy to accept topo-seeded clusters - Gaudi::Property<float> m_minEtTopo {this, "minEtTopo", 1.5 * CLHEP::GeV, + Gaudi::Property<float> m_minEtTopo {this, "minEtTopo", 1.5 * Gaudi::Units::GeV, "Minimum transverse energy to accept topo-seeded clusters"}; // @brief Maximum transverse energy to accept topo-seeded clusters - Gaudi::Property<float> m_maxEtTopo {this, "maxEtTopo", 8 * CLHEP::GeV, + Gaudi::Property<float> m_maxEtTopo {this, "maxEtTopo", 8 * Gaudi::Units::GeV, "Maximum transverse energy to accept topo-seeded clusters"}; // others: diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h index 9af4efff34b..80bbccbaf1c 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaForwardBuilder.h @@ -43,6 +43,8 @@ #include "egammaInterfaces/IEMFourMomBuilder.h" #include "EgammaAnalysisInterfaces/IAsgForwardElectronIsEMSelector.h" +#include "GaudiKernel/SystemOfUnits.h" + #include <string> class egammaForwardBuilder : public AthReentrantAlgorithm @@ -95,7 +97,7 @@ class egammaForwardBuilder : public AthReentrantAlgorithm SG::WriteHandleKey<CaloClusterCellLinkContainer> m_outClusterContainerCellLinkKey; /** @brief ET cut */ - Gaudi::Property<double> m_ETcut {this, "EtCut", 5.*CLHEP::GeV, "ET cut"}; + Gaudi::Property<double> m_ETcut {this, "EtCut", 5.*Gaudi::Units::GeV, "ET cut"}; /** @brief eta cut */ Gaudi::Property<double> m_etacut {this, "EtaCut", 2.5, "eta cut"}; diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx index 0b86124a21d..fbb5cd22ee6 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/egammaRecBuilder.cxx @@ -25,9 +25,6 @@ #include <algorithm> #include <cmath> -using CLHEP::MeV; -using CLHEP::GeV; - egammaRecBuilder::egammaRecBuilder(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator), diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx index 27583796e4c..4de501fad70 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.cxx @@ -23,8 +23,6 @@ #include <vector> -using CLHEP::GeV; - namespace { /** * Duplicate code diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h index 4261b3ae00f..2fc404678df 100644 --- a/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h +++ b/Reconstruction/egamma/egammaAlgs/src/egammaSuperClusterBuilder.h @@ -8,6 +8,7 @@ // INCLUDE HEADER FILES: #include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/SystemOfUnits.h" #include "AthenaBaseComps/AthAlgorithm.h" //Fwd declarations @@ -47,7 +48,7 @@ protected: /** @brief Seed selection requirements */ Gaudi::Property<float> m_EtThresholdCut {this, - "EtThresholdCut", 1.5*CLHEP::GeV, + "EtThresholdCut", 1.5*Gaudi::Units::GeV, "The minimum EM Et required of SEED clusters (not applied to secondaries)"}; // these are calculated search window values diff --git a/Reconstruction/egamma/egammaAlgs/src/electronSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/electronSuperClusterBuilder.cxx index 390aa1e4f48..0085e48572b 100644 --- a/Reconstruction/egamma/egammaAlgs/src/electronSuperClusterBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/electronSuperClusterBuilder.cxx @@ -22,8 +22,6 @@ #include <memory> -using CLHEP::GeV; - ////////////////////////////////////////////////////////////////////////////// //Athena interfaces. ////////////////////////////////////////////////////////////////////////////// diff --git a/Reconstruction/egamma/egammaAlgs/src/photonSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaAlgs/src/photonSuperClusterBuilder.cxx index e2479e8785c..419a6fda55d 100644 --- a/Reconstruction/egamma/egammaAlgs/src/photonSuperClusterBuilder.cxx +++ b/Reconstruction/egamma/egammaAlgs/src/photonSuperClusterBuilder.cxx @@ -22,8 +22,6 @@ // #include <vector> -using CLHEP::GeV; - ////////////////////////////////////////////////////////////////////////////// //Athena interfaces. ////////////////////////////////////////////////////////////////////////////// diff --git a/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx b/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx index ca6ecece0b1..cd282cb1bc9 100755 --- a/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx +++ b/Reconstruction/egamma/egammaEvent/src/EMConvert.cxx @@ -33,7 +33,7 @@ UPDATED: Jul 30, 2010 (JM) Add ambiguity result #include "AthenaKernel/BaseInfo.h" -using CLHEP::Hep3Vector; +//using CLHEP::Hep3Vector; // END OF HEADER FILES INCLUDE diff --git a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx index 238957c9276..e0dc5ba248a 100644 --- a/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx +++ b/Reconstruction/egamma/egammaMVACalib/Root/egammaMVAFunctions.cxx @@ -5,6 +5,13 @@ #include "egammaMVACalib/egammaMVAFunctions.h" +#ifndef XAOD_ANALYSIS +#include "GaudiKernel/SystemOfUnits.h" +using Gaudi::Units::GeV; +#else +#define GeV 1000 +#endif + /** * These functions are for building the maps of functions **/ @@ -73,7 +80,7 @@ namespace egammaMVAFunctions funcLibrary["convR"] = [](const xAOD::Egamma* eg, const xAOD::CaloCluster*)->float { auto ph = static_cast<const xAOD::Photon*>(eg); - if (compute_ptconv(ph) > 3*CLHEP::GeV) { + if (compute_ptconv(ph) > 3*GeV) { return xAOD::EgammaHelpers::conversionRadius(ph); } else { return 799.0; diff --git a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx index 913e682b639..956ec9ac3ad 100644 --- a/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx +++ b/Reconstruction/egamma/egammaMVACalib/src/egammaMVACalibTool.cxx @@ -11,6 +11,12 @@ #include <cmath> +#ifndef XAOD_ANALYSIS +#include "GaudiKernel/SystemOfUnits.h" +using Gaudi::Units::GeV; +#else +#define GeV 1000 +#endif egammaMVACalibTool::egammaMVACalibTool(const std::string& type, const std::string& name, const IInterface* parent) : base_class(type, name, parent) @@ -209,7 +215,7 @@ float egammaMVACalibTool::getEnergy(const xAOD::CaloCluster& clus, egammaMVAFunctions::compute_correctedcl_Eacc(clus) : egammaMVAFunctions::compute_rawcl_Eacc(clus)); - const auto energyVarGeV = (initEnergy / std::cosh(clus.eta())) / CLHEP::GeV; + const auto energyVarGeV = (initEnergy / std::cosh(clus.eta())) / GeV; const auto etaVar = std::abs(clus.eta()); ATH_MSG_DEBUG("Looking at object with initEnergy = " << initEnergy @@ -268,7 +274,7 @@ float egammaMVACalibTool::getEnergy(const xAOD::CaloCluster& clus, } // have to do a shift if here. It's based on the corrected Et in GeV - const auto etGeV = (energy / std::cosh(clus.eta())) / CLHEP::GeV; + const auto etGeV = (energy / std::cosh(clus.eta())) / GeV; // evaluate the TFormula associated with the bin const auto shift = m_shifts[bin].Eval(etGeV); diff --git a/Reconstruction/egamma/egammaPerformance/src/ZeeTaPMonTool.cxx b/Reconstruction/egamma/egammaPerformance/src/ZeeTaPMonTool.cxx index 10f4a5281af..8f025246dfa 100755 --- a/Reconstruction/egamma/egammaPerformance/src/ZeeTaPMonTool.cxx +++ b/Reconstruction/egamma/egammaPerformance/src/ZeeTaPMonTool.cxx @@ -25,7 +25,8 @@ #include "xAODEgamma/ElectronContainer.h" #include "TH1F.h" -using CLHEP::GeV; +#include "GaudiKernel/SystemOfUnits.h" +using Gaudi::Units::GeV; ZeeTaPMonTool::ZeeTaPMonTool(const std::string & type, const std::string & name, const IInterface* parent) : egammaMonToolBase(type,name,parent), diff --git a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h index cb93ecac762..3f6a5cc5ba4 100644 --- a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h +++ b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h @@ -28,6 +28,7 @@ // INCLUDE HEADER FILES: #include "GaudiKernel/ToolHandle.h" #include "GaudiKernel/EventContext.h" +#include "GaudiKernel/SystemOfUnits.h" #include "AthenaBaseComps/AthAlgTool.h" #include "egammaInterfaces/IEMConversionBuilder.h" #include "egammaInterfaces/IEMExtrapolationTools.h" @@ -88,27 +89,27 @@ private: /** @brief minimum pT for single-track conversion vertices */ Gaudi::Property<float> m_minPt_singleTrack {this, - "minPt_singleTrack", 0*CLHEP::GeV, + "minPt_singleTrack", 0*Gaudi::Units::GeV, "minimum pT for single-track conversion vertices"}; /** @brief minimum pT for TRT-only single-track conversion vertices */ Gaudi::Property<float> m_minPt_singleTRT {this, - "minPt_singleTRT", 2*CLHEP::GeV, + "minPt_singleTRT", 2*Gaudi::Units::GeV, "minimum pT for TRT-only single-track conversion vertices"}; /** @brief minimum pT for each track in TRT-only double-track conversion vertices */ Gaudi::Property<float> m_minTRTonlyTrackPt {this, - "minTRTonlyTrackPt", 0*CLHEP::GeV, + "minTRTonlyTrackPt", 0*Gaudi::Units::GeV, "minimum pT for each track in TRT-only double-track conversion vertices"}; /** @brief minimum sum pT for double track conversion vertices */ Gaudi::Property<float> m_minSumPt_double {this, - "minSumPt_double", 0*CLHEP::GeV, + "minSumPt_double", 0*Gaudi::Units::GeV, "minimum sum pT for double track conversion vertices"}; /** @brief minimum sum pT for double TRT track conversion vertices */ Gaudi::Property<float> m_minSumPt_doubleTRT {this, - "minSumPt_doubleTRT", 2*CLHEP::GeV, + "minSumPt_doubleTRT", 2*Gaudi::Units::GeV, "minimum sum pT for double TRT track conversion vertices"}; /** @brief maximum E/p for single track conversion vertices (E is not calibrated) */ diff --git a/Reconstruction/iPat/iPatGeometryTools/src/LayerNumberAllocator.cxx b/Reconstruction/iPat/iPatGeometryTools/src/LayerNumberAllocator.cxx index 0d0c880464b..590d8e4cdb5 100755 --- a/Reconstruction/iPat/iPatGeometryTools/src/LayerNumberAllocator.cxx +++ b/Reconstruction/iPat/iPatGeometryTools/src/LayerNumberAllocator.cxx @@ -29,7 +29,7 @@ LayerNumberAllocator::LayerNumberAllocator (const std::string& type, // pixel layout independent - always start SCT as if 3 preceding layers ! m_pixel_layers (3), m_pixel_sct_boundary (0.), - m_vertex_spread (112.0*CLHEP::mm) // TODO: make configurable + m_vertex_spread (112.0*Gaudi::Units::mm) // TODO: make configurable { declareInterface<ILayerNumberAllocator>(this); declareProperty("LayerAllocator", m_layerAllocator); diff --git a/Reconstruction/tauMonitoring/src/tauMonTool.cxx b/Reconstruction/tauMonitoring/src/tauMonTool.cxx index 89f3eb686ee..fa1431585dd 100644 --- a/Reconstruction/tauMonitoring/src/tauMonTool.cxx +++ b/Reconstruction/tauMonitoring/src/tauMonTool.cxx @@ -15,9 +15,10 @@ #include "xAODEventInfo/EventInfo.h" #include "xAODTracking/TrackParticle.h" #include "TrigDecisionTool/TrigDecisionTool.h" +#include "GaudiKernel/SystemOfUnits.h" using xAOD::EventInfo; -using CLHEP::GeV; +using Gaudi::Units::GeV; #define CRACK_MIN 1.3 #define CRACK_MAX 1.7 diff --git a/Reconstruction/tauRecTools/Root/TauSubstructureVariables.cxx b/Reconstruction/tauRecTools/Root/TauSubstructureVariables.cxx index cbfce175b1b..0d620f4b943 100644 --- a/Reconstruction/tauRecTools/Root/TauSubstructureVariables.cxx +++ b/Reconstruction/tauRecTools/Root/TauSubstructureVariables.cxx @@ -29,7 +29,8 @@ //#include "CaloEvent/CaloVertexedCluster.h" #ifndef XAOD_ANALYSIS -using CLHEP::GeV; +#include "GaudiKernel/SystemOfUnits.h" +using Gaudi::Units::GeV; #else #define GeV 1000 #endif diff --git a/Reconstruction/tauRecTools/src/TauCalibrateEM.cxx b/Reconstruction/tauRecTools/src/TauCalibrateEM.cxx index 34b305bb237..544e438572a 100644 --- a/Reconstruction/tauRecTools/src/TauCalibrateEM.cxx +++ b/Reconstruction/tauRecTools/src/TauCalibrateEM.cxx @@ -15,7 +15,8 @@ #include "tauRecTools/ITauToolBase.h" #include "TauCalibrateEM.h" -using CLHEP::GeV; +#include "GaudiKernel/SystemOfUnits.h" +using Gaudi::Units::GeV; //------------------------------------------------------------------------- // Constructor diff --git a/Reconstruction/tauRecTools/src/TauCellVariables.cxx b/Reconstruction/tauRecTools/src/TauCellVariables.cxx index f6cf367dd5e..7ecf764c2a3 100644 --- a/Reconstruction/tauRecTools/src/TauCellVariables.cxx +++ b/Reconstruction/tauRecTools/src/TauCellVariables.cxx @@ -62,7 +62,7 @@ Jan 2012 - (FF) add cellEnergyRing variables #include "tauRecTools/KineUtils.h" #include "TauCellVariables.h" -using CLHEP::GeV; +using Gaudi::Units::GeV; TauCellVariables::TauCellVariables(const std::string& name) : TauRecToolBase(name), diff --git a/Reconstruction/tauRecTools/src/TauElectronVetoVariables.cxx b/Reconstruction/tauRecTools/src/TauElectronVetoVariables.cxx index e048895da97..e51669343a3 100644 --- a/Reconstruction/tauRecTools/src/TauElectronVetoVariables.cxx +++ b/Reconstruction/tauRecTools/src/TauElectronVetoVariables.cxx @@ -33,7 +33,7 @@ //#include "GaudiKernel/ListItem.h" //#include "GaudiKernel/IToolSvc.h" -//#include "GaudiKernel/Property.h" +#include "GaudiKernel/SystemOfUnits.h" //#include "CaloUtils/CaloCellList.h" //#include "CaloEvent/CaloCluster.h" @@ -52,7 +52,7 @@ #include "RecoToolInterfaces/IParticleCaloExtensionTool.h" #include "TauElectronVetoVariables.h" -using CLHEP::GeV; +using Gaudi::Units::GeV; //------------------------------------------------------------------------- // Constructor diff --git a/Simulation/G4Atlas/G4AtlasTests/src/MDTHitsTestTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/MDTHitsTestTool.cxx index eadb8758b72..86f4359a4e0 100644 --- a/Simulation/G4Atlas/G4AtlasTests/src/MDTHitsTestTool.cxx +++ b/Simulation/G4Atlas/G4AtlasTests/src/MDTHitsTestTool.cxx @@ -75,7 +75,7 @@ StatusCode MDTHitsTestTool::checkIdentifier(Identifier offid) { // double mdt_tube_perp = mdt_gPos.perp(); // double mdt_tube_z = mdt_gPos.z(); // double mdt_tube_cot = 1./tan(mdt_gPos.theta()); - HepGeom::Transform3D xf = descriptor->getMaterialGeom()->getAbsoluteTransform(); //FIXME in the future?? + //Amg::Transform3D xf = descriptor->getMaterialGeom()->getAbsoluteTransform(); //FIXME in the future?? //*AS* Amg::Vector3D xU = xf*Amg::Vector3D((*i_hit).localPosition().x(),-(*i_hit).localPosition().z(), (*i_hit).localPosition().y()); //*AS*Amg::Vector3D gx = mdt_gPos + xU; diff --git a/Simulation/G4Utilities/Geo2G4/CMakeLists.txt b/Simulation/G4Utilities/Geo2G4/CMakeLists.txt index 111033d9286..8d114f69a15 100644 --- a/Simulation/G4Utilities/Geo2G4/CMakeLists.txt +++ b/Simulation/G4Utilities/Geo2G4/CMakeLists.txt @@ -14,9 +14,9 @@ atlas_depends_on_subdirs( PUBLIC Control/SGTools Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoSpecialShapes DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoPrimitives Simulation/G4Atlas/G4AtlasInterfaces Simulation/G4Atlas/G4AtlasTools Simulation/G4Sim/SimHelpers @@ -28,25 +28,26 @@ find_package( CLHEP ) find_package( Geant4 ) find_package( ROOT COMPONENTS MathCore RIO Core Tree Hist pthread ) find_package( XercesC ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( Geo2G4Lib src/*.cxx PUBLIC_HEADERS Geo2G4 INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} GaudiKernel - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps SGTools GeoSpecialShapes G4AtlasToolsLib SimHelpers GeoMaterial2G4 AthenaKernel GeoModelKernel GeoModelUtilities StoreGateLib SGtests ) + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps SGTools GeoSpecialShapes G4AtlasToolsLib SimHelpers GeoMaterial2G4 AthenaKernel GeoModelUtilities StoreGateLib SGtests ) atlas_add_component( Geo2G4 src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests GeoSpecialShapes G4AtlasToolsLib SimHelpers GeoMaterial2G4 Geo2G4Lib ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests GeoSpecialShapes G4AtlasToolsLib SimHelpers GeoMaterial2G4 Geo2G4Lib ) atlas_add_dictionary( LArWheelSolidCheckerDict src/LArWheelSolidDDProxy.h src/lcg_dict/selection.xml - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoModelKernel GeoModelUtilities GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests GeoSpecialShapes SimHelpers GeoMaterial2G4 Geo2G4Lib ) + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel AthenaBaseComps SGTools StoreGateLib SGtests GeoSpecialShapes SimHelpers GeoMaterial2G4 Geo2G4Lib ) diff --git a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx index a7b781076cd..68be419d764 100644 --- a/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/ExtParameterisedVolumeBuilder.cxx @@ -28,6 +28,8 @@ #include "StoreGate/StoreGateSvc.h" #include <iostream> +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + ExtParameterisedVolumeBuilder::ExtParameterisedVolumeBuilder(std::string n): VolumeBuilder(n), m_getMatEther(true), @@ -123,7 +125,7 @@ G4LogicalVolume* ExtParameterisedVolumeBuilder::Build(const PVConstLink theGeoPh // Get child phys volume theGeoPhysChild = av.getVolume(); // Get its transform - G4Transform3D theG4Position(av.getTransform()); + G4Transform3D theG4Position(Amg::EigenTransformToCLHEP(av.getTransform())); Query<int> Qint = av.getId(); if(Qint.isValid()) id = Qint; @@ -212,7 +214,7 @@ Geo2G4AssemblyVolume* ExtParameterisedVolumeBuilder::BuildAssembly(PVConstLink p if(!(theG4AssemblyChild = BuildAssembly(theGeoPhysChild))) return 0; // Get its transform - G4Transform3D theG4Position(av.getTransform()); + G4Transform3D theG4Position(Amg::EigenTransformToCLHEP(av.getTransform())); assemblyVolume->AddPlacedAssembly(theG4AssemblyChild,theG4Position); } @@ -224,7 +226,7 @@ Geo2G4AssemblyVolume* ExtParameterisedVolumeBuilder::BuildAssembly(PVConstLink p if(!(theG4LogChild = Build(theGeoPhysChild))) return 0; // Get its transform - G4Transform3D theG4Position(av.getTransform()); + G4Transform3D theG4Position(Amg::EigenTransformToCLHEP(av.getTransform())); int placedID = 0; if(Qint.isValid()) placedID = Qint; diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx index efac761918d..2dccb755aeb 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.cxx @@ -32,11 +32,12 @@ #include <map> #include <iostream> -Geo2G4Builder::Geo2G4Builder(std::string detectorName): - m_detectorName(detectorName), - m_matAir(0), - m_pDetStore(0), - m_msg("Geo2G4Builder") +Geo2G4Builder::Geo2G4Builder(std::string detectorName) + : m_detectorName(detectorName) + , m_motherTransform(GeoTrf::Transform3D::Identity()) + , m_matAir(nullptr) + , m_pDetStore(nullptr) + , m_msg("Geo2G4Builder") { ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap StatusCode sc=svcLocator->service("DetectorStore",m_pDetStore); @@ -126,7 +127,7 @@ G4LogicalVolume* Geo2G4Builder::BuildTree() Query<unsigned int> childIndx = world->indexOf(pv); // Tree Top transformation - G4Transform3D theG4Position(world->getXToChildVol(childIndx)); + G4Transform3D theG4Position(Amg::EigenTransformToCLHEP(world->getXToChildVol(childIndx))); // Copy number int id = 16969; diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h index f1ad88526e1..3aa785ebb5e 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4Builder.h @@ -10,6 +10,7 @@ // GeoVPhysVol #include "VolumeBuilder.h" #include "GeoModelKernel/GeoVPhysVol.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "G4LogicalVolume.hh" //#include "Geo2G4/GenericVolumeBuilder.h" @@ -18,6 +19,8 @@ #include "AthenaKernel/MsgStreamMember.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + // STL includes #include <string> #include <vector> @@ -43,7 +46,7 @@ public: // Access volume builder: VolumeBuilder* GetVolumeBuilder(std::string); - HepGeom::Transform3D& GetDetectorTransform() {return m_motherTransform;} + HepGeom::Transform3D GetDetectorTransform() {return Amg::EigenTransformToCLHEP(m_motherTransform);} /// Log a message using the Athena controlled logging system MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; } /// Check whether the logging system is active at the provided verbosity level @@ -53,7 +56,7 @@ private: // GeoVDetectorManager* theDetectorElement; std::string m_detectorName; - HepGeom::Transform3D m_motherTransform; + GeoTrf::Transform3D m_motherTransform; std::vector<PVConstLink> m_treeTops; VolumeBuilder *m_theBuilder; diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4STParameterisation.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4STParameterisation.cxx index 79cc9fd5310..65ab76da77c 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4STParameterisation.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4STParameterisation.cxx @@ -4,7 +4,7 @@ #include "Geo2G4STParameterisation.h" #include "G4VPhysicalVolume.hh" - +#include "GeoPrimitives/CLHEPtoEigenConverter.h" #include "CLHEP/Geometry/Transform3D.h" Geo2G4STParameterisation::Geo2G4STParameterisation(const GeoXF::Function* func, @@ -23,7 +23,7 @@ Geo2G4STParameterisation::~Geo2G4STParameterisation() void Geo2G4STParameterisation::ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const { - HepGeom::Transform3D transform = (*m_function)(copyNo); + HepGeom::Transform3D transform = Amg::EigenTransformToCLHEP((*m_function)(copyNo)); G4ThreeVector translation = transform.getTranslation(); *m_rotation = transform.getRotation().inverse(); diff --git a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx index 366f2435193..3e52caad89e 100644 --- a/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx +++ b/Simulation/G4Utilities/Geo2G4/src/Geo2G4SolidFactory.cxx @@ -54,6 +54,8 @@ #include <map> #include <cmath> +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + typedef std::map<const GeoShape*, G4VSolid*, std::less<const GeoShape*> > shapesMap; typedef std::map<std::string, G4VSolid*,std::less<std::string> > customSolidMap; @@ -375,15 +377,15 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) G4FacetVertexType vertexType = (geoFacet->getVertexType()==GeoFacet::ABSOLUTE? ABSOLUTE : RELATIVE); G4VFacet* g4Facet(nullptr); if(geoFacet->getNumberOfVertices()==3) - g4Facet = new G4TriangularFacet(geoFacet->getVertex(0), - geoFacet->getVertex(1), - geoFacet->getVertex(2), + g4Facet = new G4TriangularFacet(Amg::EigenToHep3Vector(geoFacet->getVertex(0)), + Amg::EigenToHep3Vector(geoFacet->getVertex(1)), + Amg::EigenToHep3Vector(geoFacet->getVertex(2)), vertexType); else - g4Facet = new G4QuadrangularFacet(geoFacet->getVertex(0), - geoFacet->getVertex(1), - geoFacet->getVertex(2), - geoFacet->getVertex(3), + g4Facet = new G4QuadrangularFacet(Amg::EigenToHep3Vector(geoFacet->getVertex(0)), + Amg::EigenToHep3Vector(geoFacet->getVertex(1)), + Amg::EigenToHep3Vector(geoFacet->getVertex(2)), + Amg::EigenToHep3Vector(geoFacet->getVertex(3)), vertexType); g4Tessellated->AddFacet(g4Facet); @@ -432,9 +434,17 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) if (nullptr==theGenTrap) throw std::runtime_error("TypeID did not match cast for generic trap"); if (n.empty()) n="G4GenericTrap"; if (theGenTrap->getZHalfLength()<=0.){ ATH_MSG_WARNING("GenTrap " << n << " has an z side of " << theGenTrap->getZHalfLength() <<" - using std::abs.");} + + // Translate vector of vertices from Eigen to CLHEP + std::vector<CLHEP::Hep2Vector> clhepVertices; + clhepVertices.reserve(theGenTrap->getVertices().size()); + for(const GeoTrf::Vector2D& geoVertex : theGenTrap->getVertices()) { + clhepVertices.push_back(CLHEP::Hep2Vector(geoVertex.x(),geoVertex.y())); + } + G4GenericTrap* g4GenTrap = new G4GenericTrap(n ,std::abs(theGenTrap->getZHalfLength()) - ,theGenTrap->getVertices()); + ,clhepVertices); theSolid = g4GenTrap; } // @@ -450,7 +460,7 @@ G4VSolid *Geo2G4SolidFactory::Build(const GeoShape* geoShape, std::string name) if (nullptr==theShapeShift) throw std::runtime_error("TypeID did not match cast for shape shift"); if (n.empty()) n="DisplacedSolid"; G4VSolid * undisplacedSolid = Build(theShapeShift->getOp()); - theSolid = new G4DisplacedSolid(n, undisplacedSolid, theShapeShift->getX()); + theSolid = new G4DisplacedSolid(n, undisplacedSolid, Amg::EigenTransformToCLHEP(theShapeShift->getX())); } // // GeoShapeUnion diff --git a/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt b/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt index 50eaded856a..49c77585532 100644 --- a/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt +++ b/Simulation/G4Utilities/GeoMaterial2G4/CMakeLists.txt @@ -8,7 +8,6 @@ atlas_subdir( GeoMaterial2G4 ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel PRIVATE Control/AthenaBaseComps @@ -16,11 +15,13 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Geant4 ) +find_package( CLHEP ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( GeoMaterial2G4 src/*.cxx PUBLIC_HEADERS GeoMaterial2G4 - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} AthenaKernel GeoModelKernel GaudiKernel + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaKernel GaudiKernel PRIVATE_LINK_LIBRARIES AthenaBaseComps GeoModelUtilities ) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx index fe5bdab772c..265acf4ca9d 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcV2.cxx @@ -35,6 +35,8 @@ #include "PathResolver/PathResolver.h" +#include "CLHEP/Units/SystemOfUnits.h" + #include "TFile.h" #include <fstream> diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/CMakeLists.txt index 76d5e7e4862..5dd3d35395b 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/CMakeLists.txt @@ -26,13 +26,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Eigen ) +find_package( CLHEP ) find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) # Component(s) in the package: atlas_add_library( ISF_FatrasDetDescrModel src/*.cxx PUBLIC_HEADERS ISF_FatrasDetDescrModel - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaKernel GeoPrimitives Identifier EventPrimitives InDetIdentifier InDetReadoutGeometry ISF_FatrasDetDescrInterfaces TrkDetDescrUtils TrkDetElementBase TrkGeometry TrkSurfaces TrkEventPrimitives TrkParameters StoreGateLib SGtests + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel GeoPrimitives Identifier EventPrimitives InDetIdentifier InDetReadoutGeometry ISF_FatrasDetDescrInterfaces TrkDetDescrUtils TrkDetElementBase TrkGeometry TrkSurfaces TrkEventPrimitives TrkParameters StoreGateLib SGtests PRIVATE_LINK_LIBRARIES GaudiKernel ) diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/PlanarDetElement.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/PlanarDetElement.h index c2340d80584..c88e8dbb498 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/PlanarDetElement.h +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/PlanarDetElement.h @@ -28,6 +28,8 @@ #include "ISF_FatrasDetDescrInterfaces/ISegmentation.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" +#include "CLHEP/Geometry/Transform3D.h" + namespace iFatras { /** @@ -107,7 +109,7 @@ namespace iFatras { /// Local (simulation/hit frame) to global transform const Amg::Transform3D & HitTransform() const { return m_hitTransform;}; - const HepGeom::Transform3D & transformHit() const { return m_hitTransformCLHEP;}; + const Amg::Transform3D & transformHit() const { return m_hitTransform;}; /// Center in global coordinates const Amg::Vector3D & center() const {return m_center;}; diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/PlanarDetLayerBuilder.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/PlanarDetLayerBuilder.cxx index 90b30c1912b..8c5e52aa2c5 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/PlanarDetLayerBuilder.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/src/PlanarDetLayerBuilder.cxx @@ -910,7 +910,7 @@ const std::vector< const Trk::CylinderLayer* >* iFatras::PlanarDetLayerBuilder:: if(m_pixelCase){ ATH_MSG_VERBOSE("Surface " << (*moduleSurface)); - ATH_MSG_VERBOSE("TransformHit = " << Amg::toString(Amg::CLHEPTransformToEigen((*Elem_Iter)->transformHit()))); + ATH_MSG_VERBOSE("TransformHit = " << Amg::toString((*Elem_Iter)->transformHit())); if (m_checkGeo) { @@ -933,7 +933,7 @@ const std::vector< const Trk::CylinderLayer* >* iFatras::PlanarDetLayerBuilder:: ATH_MSG_VERBOSE("Phi = " << moduleSurface->center().phi() << " Eta = " << moduleSurface->center().eta()); } else { ATH_MSG_VERBOSE("Surface " << (*moduleSurface)); - ATH_MSG_VERBOSE("TransformHit = " << Amg::toString(Amg::CLHEPTransformToEigen((*Elem_Iter)->transformHit()))); + ATH_MSG_VERBOSE("TransformHit = " << Amg::toString((*Elem_Iter)->transformHit())); if (m_checkGeo) { Amg::Vector3D glopos = (*moduleSurface).center(); @@ -1165,7 +1165,7 @@ const std::vector< const Trk::DiscLayer* >* iFatras::PlanarDetLayerBuilder::disc if(m_pixelCase){ ATH_MSG_VERBOSE("Surface " << (*moduleSurface)); - ATH_MSG_VERBOSE("TransformHit = " << Amg::toString(Amg::CLHEPTransformToEigen((*Elem_Iter)->transformHit()))); + ATH_MSG_VERBOSE("TransformHit = " << Amg::toString((*Elem_Iter)->transformHit())); Identifier hitId = moduleSurface->associatedDetectorElementIdentifier(); IdentifierHash hitIdHash = m_pixIdHelper->wafer_hash(hitId); ATH_MSG_VERBOSE("ID " << hitId << ", hash " << hitIdHash ); @@ -1174,7 +1174,7 @@ const std::vector< const Trk::DiscLayer* >* iFatras::PlanarDetLayerBuilder::disc } else { ATH_MSG_VERBOSE("Surface " << (*moduleSurface)); - ATH_MSG_VERBOSE("TransformHit = " << Amg::toString(Amg::CLHEPTransformToEigen((*Elem_Iter)->transformHit()))); + ATH_MSG_VERBOSE("TransformHit = " << Amg::toString((*Elem_Iter)->transformHit())); Identifier hitId = moduleSurface->associatedDetectorElementIdentifier(); IdentifierHash hitIdHash = m_sctIdHelper->wafer_hash(hitId); ATH_MSG_VERBOSE("ID " << hitId << ", hash " << hitIdHash ); diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx index 5231ca399fb..6e9490eff33 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/HadIntProcessorParametric.cxx @@ -26,6 +26,7 @@ #include "CLHEP/Matrix/Vector.h" #include "CLHEP/Random/RandFlat.h" #include "CLHEP/Random/RandGauss.h" +#include "CLHEP/Geometry/Transform3D.h" // Validation mode - TTree includes #include "TTree.h" #include "GaudiKernel/ITHistSvc.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.cxx index 0538b7f0e23..42b3e85623d 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhotonConversionTool.cxx @@ -38,6 +38,7 @@ #include "CLHEP/Units/SystemOfUnits.h" #include "CLHEP/Matrix/Vector.h" #include "CLHEP/Random/RandFlat.h" +#include "CLHEP/Vector/LorentzVector.h" // Validation mode - TTree includes #include "TTree.h" #include "GaudiKernel/ITHistSvc.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx index 18ffc3801b1..29be483a236 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/PhysicsValidationTool.cxx @@ -16,6 +16,7 @@ #include "ISF_Event/ParticleUserInformation.h" // CLHEP #include "CLHEP/Units/SystemOfUnits.h" +#include "CLHEP/Units/PhysicalConstants.h" // // ROOT includes #include "TTree.h" diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx index 4cf9e151bff..982c6283e11 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportEngine.cxx @@ -32,6 +32,7 @@ // CLHEP #include "CLHEP/Units/SystemOfUnits.h" +#include "CLHEP/Units/PhysicalConstants.h" #include "CLHEP/Random/RandFlat.h" // AtlasDetDescr diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx index fcfdeeaf37a..bfcbdec9400 100755 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/TransportTool.cxx @@ -26,6 +26,7 @@ #include "ISF_Interfaces/IParticleHelper.h" // CLHEP #include "CLHEP/Units/SystemOfUnits.h" +#include "CLHEP/Units/PhysicalConstants.h" #include "CLHEP/Random/RandFlat.h" // // ROOT includes diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt index 8fc1f042a41..af2dca5955d 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/CMakeLists.txt @@ -16,6 +16,7 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/AtlasDetDescr DetectorDescription/IdDictDetDescr DetectorDescription/Identifier + DetectorDescription/GeoPrimitives InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/TRT_ConditionsServices InnerDetector/InDetDetDescr/InDetIdentifier diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx index 60a60761571..e28ab75cb83 100644 --- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx +++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/src/HitCreatorSilicon.cxx @@ -38,6 +38,7 @@ #include "InDetConditionsSummaryService/IInDetConditionsTool.h" #include "InDetSimEvent/SiHit.h" // CLHEP +#include "GeoPrimitives/CLHEPtoEigenConverter.h" #include "CLHEP/Units/SystemOfUnits.h" #include "CLHEP/Random/RandFlat.h" #include "CLHEP/Random/RandGauss.h" @@ -447,7 +448,7 @@ void iFatras::HitCreatorSilicon::createSimHit(const ISF::ISFParticle& isp, const double localExitY = interY+0.5*distY; double energyDeposit=0; //!< @todo : fix edge effects - const Amg::Transform3D &hitTransform = Amg::CLHEPTransformToEigen( hitSiDetElement->transformHit().inverse() ); + const Amg::Transform3D &hitTransform = hitSiDetElement->transformHit().inverse(); // transform into the hit frame Amg::Vector3D localEntry(hitTransform*(sTransform*Amg::Vector3D(localEntryX,localEntryY,-0.5*movingDirection*thickness))); Amg::Vector3D localExit(hitTransform*(sTransform*Amg::Vector3D(localExitX,localExitY,0.5*movingDirection*thickness))); diff --git a/TestBeam/TBRec/src/TBTrackToCaloAlg.cxx b/TestBeam/TBRec/src/TBTrackToCaloAlg.cxx index 24600bfffc9..dc98ace338d 100644 --- a/TestBeam/TBRec/src/TBTrackToCaloAlg.cxx +++ b/TestBeam/TBRec/src/TBTrackToCaloAlg.cxx @@ -38,9 +38,6 @@ #include "ImpactInCaloCollection.h" #include "AthenaKernel/Units.h" - -using HepGeom::Point3D; -using HepGeom::Vector3D; using Athena::Units::GeV; diff --git a/TileCalorimeter/TileCosmicAlgs/src/TileMuonFitter.cxx b/TileCalorimeter/TileCosmicAlgs/src/TileMuonFitter.cxx index 870d41d3da7..bcb193fbbb5 100755 --- a/TileCalorimeter/TileCosmicAlgs/src/TileMuonFitter.cxx +++ b/TileCalorimeter/TileCosmicAlgs/src/TileMuonFitter.cxx @@ -57,6 +57,8 @@ // ROOT includes #include "CLHEP/Vector/ThreeVector.h" +#include "CLHEP/Units/SystemOfUnits.h" +#include "CLHEP/Units/PhysicalConstants.h" #include <cmath> #ifndef __APPLE__ diff --git a/TileCalorimeter/TileDetDescr/CMakeLists.txt b/TileCalorimeter/TileDetDescr/CMakeLists.txt index 6dd11c28a45..f642c956a78 100644 --- a/TileCalorimeter/TileDetDescr/CMakeLists.txt +++ b/TileCalorimeter/TileDetDescr/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloIdentifier Control/AthenaKernel Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/Identifier PRIVATE Calorimeter/CaloDetDescr @@ -21,12 +20,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( TileDetDescr src/Tile*.cxx PUBLIC_HEADERS TileDetDescr - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaKernel GeoModelKernel Identifier CaloDetDescrLib + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} CaloIdentifier AthenaKernel Identifier CaloDetDescrLib PRIVATE_LINK_LIBRARIES AtlasDetDescr GaudiKernel TileIdentifier ) diff --git a/TileCalorimeter/TileDetDescr/src/CellVolumes.h b/TileCalorimeter/TileDetDescr/src/CellVolumes.h index c1fe739091c..e8f75d433ef 100755 --- a/TileCalorimeter/TileDetDescr/src/CellVolumes.h +++ b/TileCalorimeter/TileDetDescr/src/CellVolumes.h @@ -1,47 +1,48 @@ /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ +#include "GeoModelKernel/Units.h" -const double TileDetDescrManager::vBarrelCells[23] = {17799.76*CLHEP::cm3, //A1 - 17799.76*CLHEP::cm3, //A2 - 18459.01*CLHEP::cm3, //A3 - 18459.01*CLHEP::cm3, //A4 - 19777.51*CLHEP::cm3, //A5 - 20436.76*CLHEP::cm3, //A6 - 21096.01*CLHEP::cm3, //A7 - 23073.76*CLHEP::cm3, //A8 - 24392.26*CLHEP::cm3, //A9 - 21096.01*CLHEP::cm3, //A10 - 75726.60*CLHEP::cm3, //BC1 - 77024.24*CLHEP::cm3, //BC2 - 77024.24*CLHEP::cm3, //BC3 - 81574.95*CLHEP::cm3, //BC4 - 81574.95*CLHEP::cm3, //BC5 - 88401.02*CLHEP::cm3, //BC6 - 91974.02*CLHEP::cm3, //BC7 - 91014.21*CLHEP::cm3, //BC8 - 34219.80*CLHEP::cm3, //B9 - 110000.61*CLHEP::cm3, //D0 - 111375.62*CLHEP::cm3, //D1 - 118250.66*CLHEP::cm3, //D2 - 137500.77*CLHEP::cm3}; //D3 +const double TileDetDescrManager::vBarrelCells[23] = {17799.76*GeoModelKernelUnits::cm3, //A1 + 17799.76*GeoModelKernelUnits::cm3, //A2 + 18459.01*GeoModelKernelUnits::cm3, //A3 + 18459.01*GeoModelKernelUnits::cm3, //A4 + 19777.51*GeoModelKernelUnits::cm3, //A5 + 20436.76*GeoModelKernelUnits::cm3, //A6 + 21096.01*GeoModelKernelUnits::cm3, //A7 + 23073.76*GeoModelKernelUnits::cm3, //A8 + 24392.26*GeoModelKernelUnits::cm3, //A9 + 21096.01*GeoModelKernelUnits::cm3, //A10 + 75726.60*GeoModelKernelUnits::cm3, //BC1 + 77024.24*GeoModelKernelUnits::cm3, //BC2 + 77024.24*GeoModelKernelUnits::cm3, //BC3 + 81574.95*GeoModelKernelUnits::cm3, //BC4 + 81574.95*GeoModelKernelUnits::cm3, //BC5 + 88401.02*GeoModelKernelUnits::cm3, //BC6 + 91974.02*GeoModelKernelUnits::cm3, //BC7 + 91014.21*GeoModelKernelUnits::cm3, //BC8 + 34219.80*GeoModelKernelUnits::cm3, //B9 + 110000.61*GeoModelKernelUnits::cm3, //D0 + 111375.62*GeoModelKernelUnits::cm3, //D1 + 118250.66*GeoModelKernelUnits::cm3, //D2 + 137500.77*GeoModelKernelUnits::cm3}; //D3 -const double TileDetDescrManager::vExtendedCells[12] = {11863.88*CLHEP::cm3, //A12 - 32955.21*CLHEP::cm3, //A13 - 36909.84*CLHEP::cm3, //A14 - 39546.25*CLHEP::cm3, //A15 - 63274.01*CLHEP::cm3, //A16 - 44472.59*CLHEP::cm3, //B11 - 75047.49*CLHEP::cm3, //B12 - 83386.10*CLHEP::cm3, //B13 - 88945.18*CLHEP::cm3, //B14 - 97283.79*CLHEP::cm3, //B15 - 293772.18*CLHEP::cm3, //D5 - 338967.89*CLHEP::cm3}; //D6 +const double TileDetDescrManager::vExtendedCells[12] = {11863.88*GeoModelKernelUnits::cm3, //A12 + 32955.21*GeoModelKernelUnits::cm3, //A13 + 36909.84*GeoModelKernelUnits::cm3, //A14 + 39546.25*GeoModelKernelUnits::cm3, //A15 + 63274.01*GeoModelKernelUnits::cm3, //A16 + 44472.59*GeoModelKernelUnits::cm3, //B11 + 75047.49*GeoModelKernelUnits::cm3, //B12 + 83386.10*GeoModelKernelUnits::cm3, //B13 + 88945.18*GeoModelKernelUnits::cm3, //B14 + 97283.79*GeoModelKernelUnits::cm3, //B15 + 293772.18*GeoModelKernelUnits::cm3, //D5 + 338967.89*GeoModelKernelUnits::cm3}; //D6 -const double TileDetDescrManager::vItcGapCells[6] = {13461.47*CLHEP::cm3, //C10 - 46542.48*CLHEP::cm3, //D4 - 1292.80*CLHEP::cm3, //E1 - 1244.11*CLHEP::cm3, //E2 - 776.24*CLHEP::cm3, //E3 - 468.36*CLHEP::cm3}; //E4 +const double TileDetDescrManager::vItcGapCells[6] = {13461.47*GeoModelKernelUnits::cm3, //C10 + 46542.48*GeoModelKernelUnits::cm3, //D4 + 1292.80*GeoModelKernelUnits::cm3, //E1 + 1244.11*GeoModelKernelUnits::cm3, //E2 + 776.24*GeoModelKernelUnits::cm3, //E3 + 468.36*GeoModelKernelUnits::cm3}; //E4 diff --git a/TileCalorimeter/TileDetDescr/src/TileDetDescrManager.cxx b/TileCalorimeter/TileDetDescr/src/TileDetDescrManager.cxx index e5a23993e0b..b16acb26272 100755 --- a/TileCalorimeter/TileDetDescr/src/TileDetDescrManager.cxx +++ b/TileCalorimeter/TileDetDescr/src/TileDetDescrManager.cxx @@ -5,6 +5,7 @@ #include "TileDetDescr/TileDetDescrManager.h" #include "TileDetDescr/TileDddbManager.h" #include "TileDetDescr/TileCellDim.h" +#include "GeoModelKernel/Units.h" #include "CaloDetDescr/CaloDetDescriptor.h" #include "CaloDetDescr/CaloDetectorElements.h" @@ -488,7 +489,7 @@ void TileDetDescrManager::create_elements() // come out to ~ 1e-14, the exact value varying depending // on platform. For reproducibility, force very small // numbers to 0. - if (std::abs(z) < 1e-8 * CLHEP::mm) z = 0; + if (std::abs(z) < 1e-8 * GeoModelKernelUnits::mm) z = 0; double dz = 0.5 * fabs(cell_dim->getZMax(0) // special -cell_dim->getZMin(0) // calculations @@ -569,7 +570,7 @@ void TileDetDescrManager::create_elements() m_dbManager->SetCurrentSection(TileID::EXTBAR); double epThickness = 0.0; // only used for tower == 15 double epVolume = 0.0; // only used for tower == 15 - if ( tower == 15 ) epThickness = m_dbManager->TILBdzend2() * CLHEP::cm; + if ( tower == 15 ) epThickness = m_dbManager->TILBdzend2() * GeoModelKernelUnits::cm; double volumeInRow[5]; // book large array for (int iRow = 0; iRow < 5; iRow++) volumeInRow[iRow] = 0.; @@ -647,12 +648,12 @@ void TileDetDescrManager::create_elements() { rowVolume = radMax + radMin; rowVolume *= (radMax - radMin); - rowVolume -= 0.5*radMin*(27*CLHEP::mm); + rowVolume -= 0.5*radMin*(27*GeoModelKernelUnits::mm); rowVolume *= Radius2HL * ( deltaZ + epThickness ); // adding volume of cutted endplate } else { - rowVolume = radMax - radMin - 35*CLHEP::mm; + rowVolume = radMax - radMin - 35*GeoModelKernelUnits::mm; rowVolume *= (radMax + radMin); rowVolume *= Radius2HL * deltaZ; } @@ -665,8 +666,8 @@ void TileDetDescrManager::create_elements() if ( (ModuleNcp == 60) || (ModuleNcp == 37) ) { - double deltax = 38.7*std::cos(25.3125*CLHEP::deg); - double pstan = std::tan(25.3125*CLHEP::deg); + double deltax = 38.7*std::cos(25.3125*GeoModelKernelUnits::deg); + double pstan = std::tan(25.3125*GeoModelKernelUnits::deg); double inv_pstan = 1. / pstan; if ( ( 15 == tower ) ) { @@ -733,7 +734,7 @@ void TileDetDescrManager::create_elements() m_dbManager->SetCurrentSection(Id4); double standardD4dz = elt->dz(); - double specialD4dz = m_dbManager->TILBdzmodul()*CLHEP::cm; + double specialD4dz = m_dbManager->TILBdzmodul()*GeoModelKernelUnits::cm; if ( Id4 == 8 ) specialD4dz = 0.; elt->set_dz(specialD4dz); @@ -811,7 +812,7 @@ void TileDetDescrManager::create_elements() if ( Id4 == 8 ) { double standardD5dz = elt->dz(); - double specialD4dz = m_dbManager->TILBdzmodul()*CLHEP::cm; + double specialD4dz = m_dbManager->TILBdzmodul()*GeoModelKernelUnits::cm; elt->set_dz(specialD4dz + standardD5dz); elt->set_volume(elt->volume()* (1. + specialD4dz/standardD5dz)); diff --git a/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx b/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx index b07f7c10428..22e8c09f06f 100644 --- a/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx +++ b/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx @@ -42,6 +42,7 @@ // ISF_FCS_Parametrization includes #include "ISF_FastCaloSimEvent/FCS_StepInfoCollection.h" +#include "CLHEP/Units/PhysicalConstants.h" //**************************************************************************** //* Constructor diff --git a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/CMakeLists.txt index fd2184fe8f4..a0c23421567 100644 --- a/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/CombinedScintillator/CMakeLists.txt @@ -6,14 +6,11 @@ atlas_subdir( CombinedScintillator ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - - PRIVATE +atlas_depends_on_subdirs( PRIVATE Calorimeter/CaloIdentifier Control/CxxUtils Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools Simulation/G4Utilities/GeoMaterial2G4 @@ -23,13 +20,14 @@ atlas_depends_on_subdirs( PUBLIC find_package( CLHEP ) find_package( Geant4 ) find_package( XercesC ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( CombinedScintillator src/*.cc src/components/*.cxx - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/CMakeLists.txt index c5268484ada..47ecdc25bf5 100644 --- a/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/DeadMaterial/CMakeLists.txt @@ -6,12 +6,9 @@ atlas_subdir( DeadMaterial ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - - PRIVATE +atlas_depends_on_subdirs( PRIVATE Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools Simulation/G4Utilities/GeoMaterial2G4 ) @@ -20,13 +17,14 @@ atlas_depends_on_subdirs( PUBLIC find_package( CLHEP ) find_package( Geant4 ) find_package( XercesC ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( DeadMaterial src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 ) + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} StoreGateLib SGtests GaudiKernel G4AtlasToolsLib GeoMaterial2G4 ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/LarCrate/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/LarCrate/CMakeLists.txt index 12c900232dd..766720a412c 100644 --- a/TileCalorimeter/TileG4/TileAncillary/LarCrate/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/LarCrate/CMakeLists.txt @@ -6,12 +6,9 @@ atlas_subdir( LarCrate ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - - PRIVATE +atlas_depends_on_subdirs( PRIVATE Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools Simulation/G4Utilities/GeoMaterial2G4 ) @@ -20,13 +17,14 @@ atlas_depends_on_subdirs( PUBLIC find_package( CLHEP ) find_package( Geant4 ) find_package( XercesC ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( LarCrate src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 ) + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} StoreGateLib SGtests GaudiKernel G4AtlasToolsLib GeoMaterial2G4 ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/MuonWall/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/MuonWall/CMakeLists.txt index 61baaab34bd..e8ad05c8183 100644 --- a/TileCalorimeter/TileG4/TileAncillary/MuonWall/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/MuonWall/CMakeLists.txt @@ -6,14 +6,11 @@ atlas_subdir( MuonWall ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - - PRIVATE +atlas_depends_on_subdirs( PRIVATE Calorimeter/CaloIdentifier Control/CxxUtils Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools Simulation/G4Utilities/GeoMaterial2G4 @@ -23,13 +20,14 @@ atlas_depends_on_subdirs( PUBLIC find_package( CLHEP ) find_package( Geant4 ) find_package( XercesC ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( MuonWall src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/CMakeLists.txt b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/CMakeLists.txt index 15ae2c982ce..e2d25967e8a 100644 --- a/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/CMakeLists.txt +++ b/TileCalorimeter/TileG4/TileAncillary/PhantomCalorimeter/CMakeLists.txt @@ -6,14 +6,11 @@ atlas_subdir( PhantomCalorimeter ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - - PRIVATE +atlas_depends_on_subdirs( PRIVATE Calorimeter/CaloIdentifier Control/CxxUtils Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel Simulation/G4Atlas/G4AtlasTools Simulation/G4Utilities/GeoMaterial2G4 @@ -23,13 +20,14 @@ atlas_depends_on_subdirs( PUBLIC find_package( CLHEP ) find_package( Geant4 ) find_package( XercesC ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( PhantomCalorimeter src/*.cc src/components/*.cxx - INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GeoModelKernel GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) + INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} CaloIdentifier CxxUtils StoreGateLib SGtests GaudiKernel G4AtlasToolsLib GeoMaterial2G4 TileSimEvent ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.cc index 3eed38ebd4c..eceab515f85 100644 --- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.cc +++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.cc @@ -37,6 +37,7 @@ #include "GeoModelInterfaces/IGeoModelSvc.h" #include "G4ios.hh" +#include "CLHEP/Units/SystemOfUnits.h" /////////// C O N S T R U C T O R diff --git a/TileCalorimeter/TileGeoModel/CMakeLists.txt b/TileCalorimeter/TileGeoModel/CMakeLists.txt index 06634042e09..dc2579f6f3f 100644 --- a/TileCalorimeter/TileGeoModel/CMakeLists.txt +++ b/TileCalorimeter/TileGeoModel/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( TileGeoModel ) atlas_depends_on_subdirs( PUBLIC Control/StoreGate DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities TileCalorimeter/TileDetDescr PRIVATE @@ -24,21 +23,21 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) +find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( TileGeoModelLib src/*.cxx PUBLIC_HEADERS TileGeoModel - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES GeoModelKernel GeoModelUtilities TileDetDescr StoreGateLib SGtests CaloDetDescrLib TileConditionsLib - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier SGTools GaudiKernel TileIdentifier ) + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} GeoModelUtilities TileDetDescr StoreGateLib SGtests CaloDetDescrLib TileConditionsLib + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} CaloIdentifier SGTools GaudiKernel TileIdentifier ) atlas_add_component( TileGeoModel src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} LINK_LIBRARIES TileGeoModelLib ) diff --git a/TileCalorimeter/TileGeoModel/src/TileAtlasFactory.cxx b/TileCalorimeter/TileGeoModel/src/TileAtlasFactory.cxx index 181b7eec90f..474e4683170 100755 --- a/TileCalorimeter/TileGeoModel/src/TileAtlasFactory.cxx +++ b/TileCalorimeter/TileGeoModel/src/TileAtlasFactory.cxx @@ -25,12 +25,14 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" //#include "GeoModelKernel/GeoCutVolAction.h" //#include "GeoModelKernel/GeoSimplePolygonBrep.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" #include "GeoModelKernel/GeoXF.h" #include "GeoModelKernel/GeoSerialTransformer.h" @@ -46,7 +48,7 @@ #include <cmath> #include <string> -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; // Constructor: @@ -85,13 +87,13 @@ void TileAtlasFactory::create(GeoPhysVol *world) //int NcpFrom = 34, NcpPlus = 29; // ext.barrel, special double deltaPhi = 360./64; // we know apriory that 64 modules makes full cylinder - double AnglMin = (NcpFrom-1)*deltaPhi*CLHEP::deg, AnglMax = (NcpPlus+1)*deltaPhi*CLHEP::deg; + double AnglMin = (NcpFrom-1)*deltaPhi*GeoModelKernelUnits::deg, AnglMax = (NcpPlus+1)*deltaPhi*GeoModelKernelUnits::deg; // phi range of modules with special C10 - // double AnglMin1 = 38. * deltaPhi*CLHEP::deg; - // double AnglMax1 = 42. * deltaPhi*CLHEP::deg; - // double AnglMin2 = 54. * deltaPhi*CLHEP::deg; - // double AnglMax2 = 58. * deltaPhi*CLHEP::deg; + // double AnglMin1 = 38. * deltaPhi*GeoModelKernelUnits::deg; + // double AnglMax1 = 42. * deltaPhi*GeoModelKernelUnits::deg; + // double AnglMin2 = 54. * deltaPhi*GeoModelKernelUnits::deg; + // double AnglMax2 = 58. * deltaPhi*GeoModelKernelUnits::deg; (*m_log) << MSG::INFO <<" Entering TileAtlasFactory::create()" << endmsg; @@ -116,8 +118,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSaddle(0); - DzSaddleSupport = dbManager->DzSaddleSupport()*CLHEP::cm; - RadiusSaddle = dbManager->RadiusSaddle()*CLHEP::cm; + DzSaddleSupport = dbManager->DzSaddleSupport()*GeoModelKernelUnits::cm; + RadiusSaddle = dbManager->RadiusSaddle()*GeoModelKernelUnits::cm; if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " DzSaddleSupport()= "<<DzSaddleSupport<<" RadiusSaddle= "<<RadiusSaddle << endmsg; @@ -166,7 +168,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) // Barrel finger dbManager->SetCurrentTifg(1); - BFingerLength = BFingerLengthNeg = BFingerLengthPos = dbManager->TIFGdz()*CLHEP::cm; + BFingerLength = BFingerLengthNeg = BFingerLengthPos = dbManager->TIFGdz()*GeoModelKernelUnits::cm; double EBFingerLength =0; double EBFingerLengthNeg =0; @@ -174,7 +176,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) // EBarrel finger dbManager->SetCurrentTifg(2); - EBFingerLength = EBFingerLengthNeg = EBFingerLengthPos = dbManager->TIFGdz()*CLHEP::cm; + EBFingerLength = EBFingerLengthNeg = EBFingerLengthPos = dbManager->TIFGdz()*GeoModelKernelUnits::cm; int n_env = dbManager->GetNumberOfEnv(); @@ -194,13 +196,13 @@ void TileAtlasFactory::create(GeoPhysVol *world) if (Type == 3) EBA = true; */ - ZLength [Type] = dbManager->GetEnvZLength()*CLHEP::cm; - EnvDZPos [Type] = dbManager->GetEnvDZ()*CLHEP::cm; + ZLength [Type] = dbManager->GetEnvZLength()*GeoModelKernelUnits::cm; + EnvDZPos [Type] = dbManager->GetEnvDZ()*GeoModelKernelUnits::cm; PhiMin [Type] = std::min(PhiMin[Type], dbManager->GetEnvDPhi()); PhiMax [Type] = std::max(PhiMax[Type], dbManager->GetEnvNModules()*deltaPhi + dbManager->GetEnvDPhi()); - RInMin [Type] = std::min(RInMin[Type], dbManager->GetEnvRin()*CLHEP::cm); - ROutMax [Type] = std::max(ROutMax[Type],dbManager->GetEnvRout()*CLHEP::cm); - FingerRmax = std::max(FingerRmax,dbManager->GetEnvRout()*CLHEP::cm); + RInMin [Type] = std::min(RInMin[Type], dbManager->GetEnvRin()*GeoModelKernelUnits::cm); + ROutMax [Type] = std::max(ROutMax[Type],dbManager->GetEnvRout()*GeoModelKernelUnits::cm); + FingerRmax = std::max(FingerRmax,dbManager->GetEnvRout()*GeoModelKernelUnits::cm); //std::cout << "# Type " <<Type<< " ZLength " <<ZLength [Type]<< " EnvDZPos "<<EnvDZPos [Type]<< "\n"; } @@ -271,9 +273,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) /** setfinger length */ double BFingerRmin=0, EFingerRmin=0; dbManager->SetCurrentSection(TileDddbManager::TILE_BARREL); - BFingerRmin = dbManager->TILBrmax()*CLHEP::cm; + BFingerRmin = dbManager->TILBrmax()*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_EBARREL); - EFingerRmin = dbManager->TILBrmax()*CLHEP::cm; + EFingerRmin = dbManager->TILBrmax()*GeoModelKernelUnits::cm; /** calculation PosEnvThickness enlarge mother volume by extra distance between barrel and positive ext.barrel */ dbManager->SetCurrentEnvByType(3); @@ -299,7 +301,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) // R maximal double rmaxTotal = ROutMax[1]; - GeoPcon* tileEnvPconeBarrel = new GeoPcon(PhiMin[1]*CLHEP::deg, PhiMax[1]*CLHEP::deg); + GeoPcon* tileEnvPconeBarrel = new GeoPcon(PhiMin[1]*GeoModelKernelUnits::deg, PhiMax[1]*GeoModelKernelUnits::deg); tileEnvPconeBarrel->addPlane(-endEnvelopeNeg, BFingerRmin, rmaxTotal); tileEnvPconeBarrel->addPlane(-endCentralBarrel-DzSaddleSupport, BFingerRmin, rmaxTotal); @@ -342,7 +344,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) } dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - double PosEndITC1 = (dbManager->TILBzoffset() + dbManager->TILEzshift() + dbManager->TILBdzmodul()/2)*CLHEP::cm; + double PosEndITC1 = (dbManager->TILBzoffset() + dbManager->TILEzshift() + dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; double corr = PosEndITC - PosEndITC1; if (fabs(corr)>0.01) { (*m_log) << MSG::WARNING @@ -351,19 +353,19 @@ void TileAtlasFactory::create(GeoPhysVol *world) <<endmsg; } - //double beginITC1 = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*CLHEP::cm; + //double beginITC1 = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - double PosBeginITC2 = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*CLHEP::cm; + double PosBeginITC2 = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG3); - double PosBeginGap = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*CLHEP::cm; - double PosEndGap = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()+dbManager->TILBdzmodul()/2)*CLHEP::cm; + double PosBeginGap = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; + double PosEndGap = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()+dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); - double PosBeginCrack = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*CLHEP::cm; - double PosEndCrack = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()+dbManager->TILBdzmodul()/2)*CLHEP::cm; + double PosBeginCrack = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; + double PosEndCrack = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()+dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; if (!spC10) { // recovering old (wrong) positioning of gap scintillators double GapWidth = PosEndGap - PosBeginGap; - PosBeginGap = PosBeginCrack + 0.9 * CLHEP::cm; + PosBeginGap = PosBeginCrack + 0.9 * GeoModelKernelUnits::cm; PosEndGap = PosBeginGap + GapWidth; } @@ -377,11 +379,11 @@ void TileAtlasFactory::create(GeoPhysVol *world) // R minimals dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - double PosRminITC1 = dbManager->TILBrminimal()*CLHEP::cm; + double PosRminITC1 = dbManager->TILBrminimal()*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - double PosRminITC = rMinC10 /* dbManager->TILBrminimal() */ *CLHEP::cm; + double PosRminITC = rMinC10 /* dbManager->TILBrminimal() */ *GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); - double PosRminCrack = rMinE4pos*CLHEP::cm; + double PosRminCrack = rMinE4pos*GeoModelKernelUnits::cm; double PosRminExt = RInMin[3]; @@ -397,7 +399,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) << " PosRmaxTotal = " << PosRmaxTotal << endmsg; - GeoPcon* tileEnvPconePosEndcap = new GeoPcon(PhiMin[3]*CLHEP::deg, PhiMax[3]*CLHEP::deg); + GeoPcon* tileEnvPconePosEndcap = new GeoPcon(PhiMin[3]*GeoModelKernelUnits::deg, PhiMax[3]*GeoModelKernelUnits::deg); // Positive Endcap tileEnvPconePosEndcap->addPlane(PosEndBarrelFinger, PosRminITC1, PosRmaxTotal); @@ -442,7 +444,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) } dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - double NegEndITC1 = (dbManager->TILBzoffset() + dbManager->TILEzshift() + dbManager->TILBdzmodul()/2)*CLHEP::cm; + double NegEndITC1 = (dbManager->TILBzoffset() + dbManager->TILEzshift() + dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; corr = NegEndITC - NegEndITC1; if (fabs(corr)>0.01) { (*m_log) << MSG::WARNING @@ -450,19 +452,19 @@ void TileAtlasFactory::create(GeoPhysVol *world) << NegEndITC << " != " << NegEndITC1 << "; take this into account" << endmsg; } - //double NegBeginITC1 = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*CLHEP::cm; + //double NegBeginITC1 = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - double NegBeginITC2 = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*CLHEP::cm; + double NegBeginITC2 = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG3); - double NegBeginGap = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*CLHEP::cm; - double NegEndGap = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()+dbManager->TILBdzmodul()/2)*CLHEP::cm; + double NegBeginGap = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; + double NegEndGap = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()+dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); - double NegBeginCrack = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*CLHEP::cm; - double NegEndCrack = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()+dbManager->TILBdzmodul()/2)*CLHEP::cm; + double NegBeginCrack = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()-dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; + double NegEndCrack = corr + (dbManager->TILBzoffset() + dbManager->TILEzshift()+dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; if (!spC10) { // recovering old (wrong) positioning of gap scintillators double GapWidth = NegEndGap - NegBeginGap; - NegBeginGap = NegBeginCrack + 0.9 * CLHEP::cm; + NegBeginGap = NegBeginCrack + 0.9 * GeoModelKernelUnits::cm; NegEndGap = NegBeginGap + GapWidth; } @@ -476,11 +478,11 @@ void TileAtlasFactory::create(GeoPhysVol *world) // R minimals dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - double NegRminITC1 = dbManager->TILBrminimal()*CLHEP::cm; + double NegRminITC1 = dbManager->TILBrminimal()*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - double NegRminITC = rMinC10 /* dbManager->TILBrminimal() */ *CLHEP::cm; + double NegRminITC = rMinC10 /* dbManager->TILBrminimal() */ *GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); - double NegRminCrack = rMinE4neg*CLHEP::cm; + double NegRminCrack = rMinE4neg*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_EBARREL); double NegRminExt = RInMin[2]; @@ -497,7 +499,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) << " NegRmaxTotal = " << NegRmaxTotal << endmsg; - GeoPcon* tileEnvPconeNegEndcap = new GeoPcon(PhiMin[2]*CLHEP::deg, PhiMax[2]*CLHEP::deg); + GeoPcon* tileEnvPconeNegEndcap = new GeoPcon(PhiMin[2]*GeoModelKernelUnits::deg, PhiMax[2]*GeoModelKernelUnits::deg); // Negative Endcap tileEnvPconeNegEndcap->addPlane(-NegEndExtBarrelFinger, EFingerRmin, NegRmaxTotal); @@ -527,8 +529,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) - (dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()) - dbManager->TILBdzmast()))/(2.*(2.*dbManager->TILBnperiod() - 1)); - sectionBuilder->setBarrelPeriodThickness(2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac() + 2.*dzGlue)*CLHEP::cm); - sectionBuilder->setBarrelGlue(dzGlue*CLHEP::cm); + sectionBuilder->setBarrelPeriodThickness(2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac() + 2.*dzGlue)*GeoModelKernelUnits::cm); + sectionBuilder->setBarrelGlue(dzGlue*GeoModelKernelUnits::cm); // Ext barrel part dbManager->SetCurrentSectionByNumber(2); @@ -536,20 +538,20 @@ void TileAtlasFactory::create(GeoPhysVol *world) dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.*dbManager->TILBnperiod()); - sectionBuilder->setExtendedPeriodThickness(2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac() + 2.*dzGlue)*CLHEP::cm); + sectionBuilder->setExtendedPeriodThickness(2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac() + 2.*dzGlue)*GeoModelKernelUnits::cm); } - GeoPhysVol *pvBarrelMother =NULL, *pvFingerMotherNeg =NULL, *pvFingerMotherPos =NULL, - *pvSaddleMotherNeg =NULL, *pvSaddleMotherPos =NULL; - GeoPhysVol *pvEBarrelMotherNeg =NULL, *pvEBarrelMotherPos =NULL; - GeoPhysVol *pvEFingerMotherNeg =NULL, *pvEFingerMotherPos =NULL, - *pvESaddleMotherNeg =NULL, *pvESaddleMotherPos =NULL; - GeoPhysVol *pvITCMotherNeg =NULL, *pvITCMotherPos =NULL; - GeoPhysVol *pvGapMotherNeg =NULL, *pvGapMotherPos =NULL; - GeoPhysVol *pvCrackMotherNeg =NULL, *pvCrackMotherPos =NULL; + GeoPhysVol *pvBarrelMother{nullptr}, *pvFingerMotherNeg{nullptr}, *pvFingerMotherPos{nullptr}, + *pvSaddleMotherNeg{nullptr}, *pvSaddleMotherPos{nullptr}; + GeoPhysVol *pvEBarrelMotherNeg{nullptr}, *pvEBarrelMotherPos{nullptr}; + GeoPhysVol *pvEFingerMotherNeg{nullptr}, *pvEFingerMotherPos{nullptr}, + *pvESaddleMotherNeg{nullptr}, *pvESaddleMotherPos{nullptr}; + GeoPhysVol *pvITCMotherNeg{nullptr}, *pvITCMotherPos{nullptr}; + GeoPhysVol *pvGapMotherNeg{nullptr}, *pvGapMotherPos{nullptr}; + GeoPhysVol *pvCrackMotherNeg{nullptr}, *pvCrackMotherPos{nullptr}; - GeoLogVol *lvEBarrelModuleMotherPos =NULL, *lvEBarrelModuleMotherNeg =NULL; - GeoPhysVol *pvEBarrelModuleMotherPos =NULL, *pvEBarrelModuleMotherNeg =NULL; + GeoLogVol *lvEBarrelModuleMotherPos{nullptr}, *lvEBarrelModuleMotherNeg{nullptr}; + GeoPhysVol *pvEBarrelModuleMotherPos{nullptr}, *pvEBarrelModuleMotherNeg{nullptr}; /* GeoPhysVol *pvTmp_EBarrelModuleMotherPos =0,*pvTmL_EBarrelModuleMotherPos =0,*pvTmR_EBarrelModuleMotherPos =0; @@ -651,7 +653,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) checking("Cut2down", false, 1, dX1,dX2,dY1,dY2,dZ2); GeoTrd* Cut1down = new GeoTrd(dX1,dX2,dY1,dY2,dZ2); - HepGeom::Translate3D yPosA(0.,0.,-dZ1-dZ2); + GeoTrf::Translate3D yPosA(0.,0.,-dZ1-dZ2); const GeoShapeUnion& CutA1 = Cut1up->add(*Cut1down<<yPosA); CutA = &CutA1; @@ -772,8 +774,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) // nominal position of end plate zEndSection = ZLength[1]/2 - BFingerLength; - GeoTubs* GeneralMother = new GeoTubs(dbManager->GetEnvRin()*CLHEP::cm, - dbManager->GetEnvRout()*CLHEP::cm, + GeoTubs* GeneralMother = new GeoTubs(dbManager->GetEnvRin()*GeoModelKernelUnits::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, zEndSection, AnglMin, AnglMax); @@ -784,13 +786,13 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << "Barrel envelope parameters: " << " Length=" << zEndSection - << " Rmin=" << dbManager->GetEnvRin()*CLHEP::cm - << " Rmax=" << dbManager->GetEnvRout()*CLHEP::cm + << " Rmin=" << dbManager->GetEnvRin()*GeoModelKernelUnits::cm + << " Rmax=" << dbManager->GetEnvRout()*GeoModelKernelUnits::cm << endmsg; // Envelopes for two barrel fingers, positive finger GeoTubs* fingerMotherPos = new GeoTubs(BFingerRmin, - dbManager->GetEnvRout()*CLHEP::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, BFingerLengthPos/2, AnglMin, AnglMax); @@ -810,7 +812,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) // Negative finger GeoTubs* fingerMotherNeg = new GeoTubs(BFingerRmin, - dbManager->GetEnvRout()*CLHEP::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, BFingerLengthNeg/2, AnglMin, AnglMax); @@ -820,7 +822,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << "Barrel finger envelope parameters: " << " length Pos/Neg=" << BFingerLengthPos << "/" << BFingerLengthNeg - << " Rmin=" << BFingerRmin << " Rmax=" << dbManager->GetEnvRout()*CLHEP::cm + << " Rmin=" << BFingerRmin << " Rmax=" << dbManager->GetEnvRout()*GeoModelKernelUnits::cm << endmsg; // Envelopes for two barrel saddle supports, positive @@ -838,15 +840,15 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(EnvType == 3) { if(m_log->level()<=MSG::DEBUG) - (*m_log) << MSG::DEBUG <<" EBarrelPos DZ "<<(dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthPos)/2<< endmsg; + (*m_log) << MSG::DEBUG <<" EBarrelPos DZ "<<(dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthPos)/2<< endmsg; checking("EBarrel (+)", false, 0, - dbManager->GetEnvRin()*CLHEP::cm,dbManager->GetEnvRout()*CLHEP::cm, - AnglMin,AnglMax,(dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthPos)/2); + dbManager->GetEnvRin()*GeoModelKernelUnits::cm,dbManager->GetEnvRout()*GeoModelKernelUnits::cm, + AnglMin,AnglMax,(dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthPos)/2); - GeoTubs* GeneralMother = new GeoTubs(dbManager->GetEnvRin()*CLHEP::cm, - dbManager->GetEnvRout()*CLHEP::cm, - (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthPos)/2, + GeoTubs* GeneralMother = new GeoTubs(dbManager->GetEnvRin()*GeoModelKernelUnits::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, + (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthPos)/2, AnglMin, AnglMax); GeoTubs* ebarrelMotherPos = GeneralMother; @@ -855,18 +857,18 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << "Positive ext.barrel envelope parameters: " - << " length=" << (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLength) - << " Rmin=" << dbManager->GetEnvRin()*CLHEP::cm - << " Rmax=" << dbManager->GetEnvRout()*CLHEP::cm + << " length=" << (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLength) + << " Rmin=" << dbManager->GetEnvRin()*GeoModelKernelUnits::cm + << " Rmax=" << dbManager->GetEnvRout()*GeoModelKernelUnits::cm << endmsg; // Envelope for finger separately checking("EBarrel (+)", false, 0, - EFingerRmin,dbManager->GetEnvRout()*CLHEP::cm, + EFingerRmin,dbManager->GetEnvRout()*GeoModelKernelUnits::cm, AnglMin,AnglMax, EBFingerLength/2); GeoTubs* fingerMother = new GeoTubs(EFingerRmin, - dbManager->GetEnvRout()*CLHEP::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, EBFingerLength/2, AnglMin, AnglMax); @@ -877,7 +879,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) (*m_log) << MSG::DEBUG << "Positive ext.barrel finger envelope parameters: " << " length=" << EBFingerLength << " Rmin=" << EFingerRmin - << " Rmax=" << (dbManager->GetEnvRout())*CLHEP::cm + << " Rmax=" << (dbManager->GetEnvRout())*GeoModelKernelUnits::cm << endmsg; if (dbManager->BoolSaddle()) @@ -898,11 +900,11 @@ void TileAtlasFactory::create(GeoPhysVol *world) // Negative Ext.Barrel if(EnvType == 2) { if(m_log->level()<=MSG::DEBUG) - (*m_log) << MSG::DEBUG <<" EBarrelNeg DZ "<<(dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthNeg)/2<< endmsg; + (*m_log) << MSG::DEBUG <<" EBarrelNeg DZ "<<(dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthNeg)/2<< endmsg; - GeoTubs* GeneralMother = new GeoTubs(dbManager->GetEnvRin()*CLHEP::cm, - dbManager->GetEnvRout()*CLHEP::cm, - (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthNeg)/2, + GeoTubs* GeneralMother = new GeoTubs(dbManager->GetEnvRin()*GeoModelKernelUnits::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, + (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthNeg)/2, AnglMin, AnglMax); GeoTubs* ebarrelMotherNeg = GeneralMother; @@ -911,14 +913,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << "Nevative ext.barrel envelope parameters: " - << " length=" << (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLength) - << " Rmin=" << dbManager->GetEnvRin()*CLHEP::cm - << " Rmax=" << dbManager->GetEnvRout()*CLHEP::cm + << " length=" << (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLength) + << " Rmin=" << dbManager->GetEnvRin()*GeoModelKernelUnits::cm + << " Rmax=" << dbManager->GetEnvRout()*GeoModelKernelUnits::cm << endmsg; // Envelope for finger separately GeoTubs* fingerMother = new GeoTubs(EFingerRmin, - dbManager->GetEnvRout()*CLHEP::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, EBFingerLengthNeg/2, AnglMin, AnglMax); @@ -929,7 +931,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) (*m_log) << MSG::DEBUG <<"Negative ext.barrel finger envelope parameters: " << " length=" << EBFingerLengthNeg << " Rmin=" << EFingerRmin - << " Rmax=" << dbManager->GetEnvRout()*CLHEP::cm + << " Rmax=" << dbManager->GetEnvRout()*GeoModelKernelUnits::cm << endmsg; if (dbManager->BoolSaddle()) @@ -963,28 +965,28 @@ void TileAtlasFactory::create(GeoPhysVol *world) dzITC1 = dbManager->TILBdzmodul(); (*m_log) << MSG::INFO << " Positive ITC envelope parameters: PLUG1 " - <<" Rmin= "<<rMinITC1*CLHEP::cm<<" Rmax= "<<rMaxITC1*CLHEP::cm<<" dzITC1= "<<dzITC1/2*CLHEP::cm<< endmsg; + <<" Rmin= "<<rMinITC1*GeoModelKernelUnits::cm<<" Rmax= "<<rMaxITC1*GeoModelKernelUnits::cm<<" dzITC1= "<<dzITC1/2*GeoModelKernelUnits::cm<< endmsg; (*m_log) << MSG::INFO << " PLUG2 " - <<" Rmin= "<<rMinITC2*CLHEP::cm<<" Rmax= "<<rMaxITC2*CLHEP::cm<<" dzITC2= "<<dzITC2/2*CLHEP::cm<< endmsg; + <<" Rmin= "<<rMinITC2*GeoModelKernelUnits::cm<<" Rmax= "<<rMaxITC2*GeoModelKernelUnits::cm<<" dzITC2= "<<dzITC2/2*GeoModelKernelUnits::cm<< endmsg; checking("ITC itcWheel1 (+)", false, 0, - rMinITC1*CLHEP::cm,rMaxITC1*CLHEP::cm, AnglMin,AnglMax, dzITC1/2*CLHEP::cm); + rMinITC1*GeoModelKernelUnits::cm,rMaxITC1*GeoModelKernelUnits::cm, AnglMin,AnglMax, dzITC1/2*GeoModelKernelUnits::cm); - GeoTubs* itcWheel1 = new GeoTubs(rMinITC1*CLHEP::cm, - rMaxITC1*CLHEP::cm, - dzITC1/2*CLHEP::cm, + GeoTubs* itcWheel1 = new GeoTubs(rMinITC1*GeoModelKernelUnits::cm, + rMaxITC1*GeoModelKernelUnits::cm, + dzITC1/2*GeoModelKernelUnits::cm, AnglMin, AnglMax); checking("ITC itcWheel2 (+)", false, 0, - rMinITC2*CLHEP::cm,rMaxITC2*CLHEP::cm, AnglMin,AnglMax, dzITC2/2*CLHEP::cm); + rMinITC2*GeoModelKernelUnits::cm,rMaxITC2*GeoModelKernelUnits::cm, AnglMin,AnglMax, dzITC2/2*GeoModelKernelUnits::cm); - GeoTubs* itcWheel2 = new GeoTubs(rMinITC2*CLHEP::cm, - rMaxITC2*CLHEP::cm, - dzITC2/2*CLHEP::cm, + GeoTubs* itcWheel2 = new GeoTubs(rMinITC2*GeoModelKernelUnits::cm, + rMaxITC2*GeoModelKernelUnits::cm, + dzITC2/2*GeoModelKernelUnits::cm, AnglMin, AnglMax); - Z = ( dzITC1 - dzITC2)/2*CLHEP::cm; - HepGeom::Translate3D itcWheel2OffsetPos(0.,0., Z); + Z = ( dzITC1 - dzITC2)/2*GeoModelKernelUnits::cm; + GeoTrf::Translate3D itcWheel2OffsetPos(0.,0., Z); zITCStandard = Z; @@ -997,13 +999,13 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG3); checking("Gap (+)", false, 0, - dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2*CLHEP::deg), - AnglMin,AnglMax, dbManager->TILBdzmodul()/2*CLHEP::cm); + dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2*GeoModelKernelUnits::deg), + AnglMin,AnglMax, dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm); - GeoTubs* GapMotherPos = new GeoTubs(dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2*CLHEP::deg), - dbManager->TILBdzmodul()/2*CLHEP::cm, + GeoTubs* GapMotherPos = new GeoTubs(dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2*GeoModelKernelUnits::deg), + dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm, AnglMin, AnglMax); GeoLogVol* lvGapMotherPos = new GeoLogVol("Gap",GapMotherPos,matAir); @@ -1013,13 +1015,13 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); checking("Crack (+)", spE4, 0, - rMinE4pos*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2*CLHEP::deg), - AnglMin,AnglMax, dbManager->TILBdzmodul()/2*CLHEP::cm); + rMinE4pos*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2*GeoModelKernelUnits::deg), + AnglMin,AnglMax, dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm); - GeoTubs* crackMotherPos = new GeoTubs(rMinE4pos*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2*CLHEP::deg), - dbManager->TILBdzmodul()/2*CLHEP::cm, + GeoTubs* crackMotherPos = new GeoTubs(rMinE4pos*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2*GeoModelKernelUnits::deg), + dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm, AnglMin, AnglMax); GeoLogVol* lvCrackMotherPos = new GeoLogVol("Crack",crackMotherPos,matAir); @@ -1042,28 +1044,28 @@ void TileAtlasFactory::create(GeoPhysVol *world) dzITC1 = dbManager->TILBdzmodul(); (*m_log) << MSG::INFO << " Negative ITC envelope parameters: PLUG1 " - <<" Rmin= "<<rMinITC1*CLHEP::cm<<" Rmax= "<<rMaxITC1*CLHEP::cm<<" dzITC1= "<<dzITC1/2*CLHEP::cm<<endmsg; + <<" Rmin= "<<rMinITC1*GeoModelKernelUnits::cm<<" Rmax= "<<rMaxITC1*GeoModelKernelUnits::cm<<" dzITC1= "<<dzITC1/2*GeoModelKernelUnits::cm<<endmsg; (*m_log) << MSG::INFO << " PLUG2 " - <<" Rmin= "<<rMinITC2*CLHEP::cm<<" Rmax= "<<rMaxITC2*CLHEP::cm<<" dzITC2= "<<dzITC2/2*CLHEP::cm<<endmsg; + <<" Rmin= "<<rMinITC2*GeoModelKernelUnits::cm<<" Rmax= "<<rMaxITC2*GeoModelKernelUnits::cm<<" dzITC2= "<<dzITC2/2*GeoModelKernelUnits::cm<<endmsg; checking("ITC itcWheel1 (-)", false, 0, - rMinITC1*CLHEP::cm,rMaxITC1*CLHEP::cm, AnglMin,AnglMax, dzITC1/2*CLHEP::cm); + rMinITC1*GeoModelKernelUnits::cm,rMaxITC1*GeoModelKernelUnits::cm, AnglMin,AnglMax, dzITC1/2*GeoModelKernelUnits::cm); - GeoTubs* itcWheel1 = new GeoTubs(rMinITC1*CLHEP::cm, - rMaxITC1*CLHEP::cm, - dzITC1/2*CLHEP::cm, + GeoTubs* itcWheel1 = new GeoTubs(rMinITC1*GeoModelKernelUnits::cm, + rMaxITC1*GeoModelKernelUnits::cm, + dzITC1/2*GeoModelKernelUnits::cm, AnglMin, AnglMax); checking("ITC itcWheel2 (-)", false, 0, - rMinITC2*CLHEP::cm,rMaxITC2*CLHEP::cm, AnglMin,AnglMax, dzITC2/2*CLHEP::cm); + rMinITC2*GeoModelKernelUnits::cm,rMaxITC2*GeoModelKernelUnits::cm, AnglMin,AnglMax, dzITC2/2*GeoModelKernelUnits::cm); - GeoTubs* itcWheel2 = new GeoTubs(rMinITC2*CLHEP::cm, - rMaxITC2*CLHEP::cm, - dzITC2/2*CLHEP::cm, + GeoTubs* itcWheel2 = new GeoTubs(rMinITC2*GeoModelKernelUnits::cm, + rMaxITC2*GeoModelKernelUnits::cm, + dzITC2/2*GeoModelKernelUnits::cm, AnglMin, AnglMax); - Z = (-dzITC1 + dzITC2)/2*CLHEP::cm; - HepGeom::Translate3D itcWheel2OffsetNeg(0.,0., Z); + Z = (-dzITC1 + dzITC2)/2*GeoModelKernelUnits::cm; + GeoTrf::Translate3D itcWheel2OffsetNeg(0.,0., Z); zITCStandard = Z; @@ -1076,13 +1078,13 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG3); checking("Gap (-)", false, 1, - dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2*CLHEP::deg), - AnglMin,AnglMax, dbManager->TILBdzmodul()/2*CLHEP::cm); + dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2*GeoModelKernelUnits::deg), + AnglMin,AnglMax, dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm); - GeoTubs* GapMotherNeg = new GeoTubs(dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2*CLHEP::deg), - dbManager->TILBdzmodul()/2*CLHEP::cm, + GeoTubs* GapMotherNeg = new GeoTubs(dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2*GeoModelKernelUnits::deg), + dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm, AnglMin, AnglMax); GeoLogVol* lvGapMotherNeg = new GeoLogVol("Gap",GapMotherNeg,matAir); @@ -1092,13 +1094,13 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); checking("Crack (-)", spE4, 0, - rMinE4neg*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2*CLHEP::deg), - AnglMin,AnglMax, dbManager->TILBdzmodul()/2*CLHEP::cm); + rMinE4neg*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2*GeoModelKernelUnits::deg), + AnglMin,AnglMax, dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm); - GeoTubs* crackMotherNeg = new GeoTubs(rMinE4neg*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2*CLHEP::deg), - dbManager->TILBdzmodul()/2*CLHEP::cm, + GeoTubs* crackMotherNeg = new GeoTubs(rMinE4neg*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2*GeoModelKernelUnits::deg), + dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm, AnglMin, AnglMax); GeoLogVol* lvCrackMotherNeg = new GeoLogVol("Crack",crackMotherNeg,matAir); @@ -1117,9 +1119,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) // the main loop around all phi modules position int ModuleNcp =0; - GeoTransform* yrotMod = new GeoTransform(HepGeom::RotateY3D(90*CLHEP::deg)); + GeoTransform* yrotMod = new GeoTransform(GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)); yrotMod->ref(); - GeoTransform* XYrtMod = new GeoTransform(HepGeom::RotateX3D(180*CLHEP::deg) * HepGeom::RotateY3D(90*CLHEP::deg)); + GeoTransform* XYrtMod = new GeoTransform(GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)); XYrtMod->ref(); for(int ModCounter = 0; ModCounter < NumberOfMod; ModCounter++){ @@ -1130,9 +1132,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) double phi = (double(ModuleNcp-1) + 0.5)*deltaPhi; double ph1 = (double(ModuleNcp-1))*deltaPhi; - GeoTransform* zrotMod = new GeoTransform(HepGeom::RotateZ3D(phi*CLHEP::deg)); + GeoTransform* zrotMod = new GeoTransform(GeoTrf::RotateZ3D(phi*GeoModelKernelUnits::deg)); zrotMod->ref(); - GeoTransform* zrotSaddle = new GeoTransform(HepGeom::RotateZ3D(ph1*CLHEP::deg)); + GeoTransform* zrotSaddle = new GeoTransform(GeoTrf::RotateZ3D(ph1*GeoModelKernelUnits::deg)); zrotSaddle->ref(); dbManager->SetCurrentModuleByIndex(ModuleNcp-1); @@ -1159,10 +1161,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSectionByNumber(ModType); - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - (dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()) @@ -1186,8 +1188,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) deltaPhi); } - GeoTransform* xtraMod = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2 * CLHEP::cm)); + GeoTransform* xtraMod = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2 * GeoModelKernelUnits::cm)); pvBarrelMother->add(zrotMod); pvBarrelMother->add(xtraMod); @@ -1201,9 +1203,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentTifg(1); // Barrel finger zEndSection = dbManager->TILBzoffset() + dbManager->TILBdzmodul()/2; - heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax())*CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2*CLHEP::deg)*CLHEP::cm; - dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2*CLHEP::deg)*CLHEP::cm; + heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax())*GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2*GeoModelKernelUnits::deg)*GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2*GeoModelKernelUnits::deg)*GeoModelKernelUnits::cm; // Finger Positive, positioning (only Left ModFingpattern == 10) if ( ModFingpattern != 10 ) { @@ -1223,9 +1225,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) deltaPhi, m_testbeamGeometry, ModuleNcp, - BFingerLengthPos*(1./CLHEP::cm)); + BFingerLengthPos*(1./GeoModelKernelUnits::cm)); - GeoTransform* xtraModFingerPos = new GeoTransform(HepGeom::TranslateX3D((dbManager->TILErmax() + dbManager->TILBrmax())/2*CLHEP::cm)); + GeoTransform* xtraModFingerPos = new GeoTransform(GeoTrf::TranslateX3D((dbManager->TILErmax() + dbManager->TILBrmax())/2*GeoModelKernelUnits::cm)); //(*m_log) << MSG::DEBUG << "R Index " << ModuleNcp << " Fingpattern "<< ModFingpattern << endmsg; @@ -1256,9 +1258,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) deltaPhi, m_testbeamGeometry, ModuleNcp*100, - BFingerLengthNeg*(1./CLHEP::cm)); + BFingerLengthNeg*(1./GeoModelKernelUnits::cm)); - GeoTransform* xtraModFingerNeg = new GeoTransform(HepGeom::TranslateX3D((dbManager->TILErmax() + dbManager->TILBrmax())/2*CLHEP::cm)); + GeoTransform* xtraModFingerNeg = new GeoTransform(GeoTrf::TranslateX3D((dbManager->TILErmax() + dbManager->TILBrmax())/2*GeoModelKernelUnits::cm)); // (*m_log) << MSG::DEBUG << "L Index " << ModuleNcp << " Fingpattern "<< ModFingpattern << endmsg; @@ -1277,7 +1279,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) GeoTubs* SaddleModule = new GeoTubs(BFingerRmin-RadiusSaddle, BFingerRmin, DzSaddleSupport/2, - 0.,deltaPhi*CLHEP::deg); + 0.,deltaPhi*GeoModelKernelUnits::deg); GeoLogVol* lvSaddleModule = new GeoLogVol("SaddleModule",SaddleModule,matIron); GeoPhysVol* pvSaddleModule = new GeoPhysVol(lvSaddleModule); @@ -1300,16 +1302,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSectionByNumber(ModType); // Mother module - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.* dbManager->TILBnperiod()); - double Radius = (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2 * CLHEP::cm; + double Radius = (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2 * GeoModelKernelUnits::cm; checking("EBarrelModule (+)", false, 1, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -1334,19 +1336,19 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " BoolCuts YES "<< dbManager->BoolCuts() << endmsg; - double PoZ2 =0, PoZ1 =0, thicknessEndPlate =dbManager->TILBdzend1()*CLHEP::cm; + double PoZ2 =0, PoZ1 =0, thicknessEndPlate =dbManager->TILBdzend1()*GeoModelKernelUnits::cm; - PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthPos)/2; + PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthPos)/2; PoZ2 = PoZ1 + modl_length/4; if ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) - { HepGeom::Transform3D TransCut2 = HepGeom::TranslateZ3D(-Radius) * HepGeom::RotateX3D((90-phi)*CLHEP::deg) * HepGeom::RotateY3D(180*CLHEP::deg) - * HepGeom::Translate3D(-PoZ2,0.,-PosY); + { GeoTrf::Transform3D TransCut2 = GeoTrf::TranslateZ3D(-Radius) * GeoTrf::RotateX3D((90-phi)*GeoModelKernelUnits::deg) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(-PoZ2,0.,-PosY); if (ModuleNcp>=60 && ModuleNcp<=62) - { HepGeom::Transform3D TransCutL = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(phi*CLHEP::deg) - * HepGeom::Translate3D(PoZ1,PosYcut,-PosXcut); + { GeoTrf::Transform3D TransCutL = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(PoZ1,PosYcut,-PosXcut); // Cuting of module (Left) const GeoShape& TmL_EBarrelModuleMotherPos = ebarrelModuleMotherPos->subtract((*CutA)<<TransCut2). @@ -1355,9 +1357,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) lvEBarrelModuleMotherPos = new GeoLogVol("EBarrelModule",&TmL_EBarrelModuleMotherPos,matAir); } else if (ModuleNcp>=35 && ModuleNcp<=37) - { HepGeom::Transform3D TransCutR = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(phi*CLHEP::deg) - * HepGeom::Translate3D(PoZ1,PosYcut,PosXcut) * HepGeom::RotateY3D(180*CLHEP::deg); + { GeoTrf::Transform3D TransCutR = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(PoZ1,PosYcut,PosXcut) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg); // Cuting of module (Right) const GeoShape& TmR_EBarrelModuleMotherPos = ebarrelModuleMotherPos->subtract((*CutA)<<TransCut2). @@ -1384,7 +1386,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) ModuleNcp); } - GeoTransform* xtraModPos = new GeoTransform(HepGeom::TranslateX3D(Radius)); + GeoTransform* xtraModPos = new GeoTransform(GeoTrf::TranslateX3D(Radius)); pvEBarrelMotherPos->add(zrotMod); pvEBarrelMotherPos->add(xtraModPos); @@ -1403,14 +1405,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) (*m_log) << MSG::DEBUG << " BoolCuts YES "<< dbManager->BoolCuts() << endmsg; double PoZ2 =0, PoZ1 =0; - double thicknessEndPlate = dbManager->TILBdzend1()*CLHEP::cm; + double thicknessEndPlate = dbManager->TILBdzend1()*GeoModelKernelUnits::cm; - PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthPos)/2; + PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthPos)/2; PoZ2 = modl_length/4 + PoZ1; if ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) - { HepGeom::Transform3D TransCut2 = HepGeom::TranslateZ3D(-Radius) * HepGeom::RotateX3D((90-phi)*CLHEP::deg) * HepGeom::RotateY3D(180*CLHEP::deg) - * HepGeom::Translate3D(-PoZ2,0.,-PosY); + { GeoTrf::Transform3D TransCut2 = GeoTrf::TranslateZ3D(-Radius) * GeoTrf::RotateX3D((90-phi)*GeoModelKernelUnits::deg) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(-PoZ2,0.,-PosY); // Cuting of pvEBarrelModuleMotherPos (-) GeoCutVolAction action1(*CutA, TransCut2); @@ -1419,9 +1421,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) pvEBarrelModuleMotherPos->unref(); // Cleaning useless volume if (ModuleNcp>=60 && ModuleNcp<=62) - { HepGeom::Transform3D TransCutL = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(phi*CLHEP::deg) - * HepGeom::Translate3D(PoZ1,PosYcut,-PosXcut); + { GeoTrf::Transform3D TransCutL = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(PoZ1,PosYcut,-PosXcut); // Cuting of pvEBarrelModuleMotherPos (Left) GeoCutVolAction action2(*CutB, TransCutL); @@ -1432,9 +1434,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) pvEBarrelMotherPos->add(pvTmL_EBarrelModuleMotherPos); } else if (ModuleNcp>=35 && ModuleNcp<=37) - { HepGeom::Transform3D TransCutR = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(phi*CLHEP::deg) - * HepGeom::Translate3D(PoZ1,PosYcut,PosXcut) * HepGeom::RotateY3D(180*CLHEP::deg); + { GeoTrf::Transform3D TransCutR = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(PoZ1,PosYcut,PosXcut) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg); // Cuting of pvEBarrelModuleMotherPos (Right) GeoCutVolAction action3(*CutB, TransCutR); @@ -1457,10 +1459,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentTifg(2); //barrel efinger (small) // Trd - one finger mother - thicknessWedgeMother = dbManager->TIFGdz() * CLHEP::cm; - heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TIFGdz() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; checking("EFingerModule (+)", false, 1, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -1483,8 +1485,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) m_testbeamGeometry, ModuleNcp); } - GeoTransform* xtraModFingerPos = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILErmax() + dbManager->TILBrmax())/2*CLHEP::cm)); + GeoTransform* xtraModFingerPos = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILErmax() + dbManager->TILBrmax())/2*GeoModelKernelUnits::cm)); pvEFingerMotherPos->add(zrotMod); pvEFingerMotherPos->add(xtraModFingerPos); pvEFingerMotherPos->add(XYrtMod); @@ -1499,7 +1501,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) GeoTubs* SaddleModule = new GeoTubs(BFingerRmin-RadiusSaddle, BFingerRmin, DzSaddleSupport/2, - 0.,deltaPhi*CLHEP::deg); + 0.,deltaPhi*GeoModelKernelUnits::deg); GeoLogVol* lvSaddleModule = new GeoLogVol("SaddleModule",SaddleModule,matIron); GeoPhysVol* pvSaddleModule = new GeoPhysVol(lvSaddleModule); @@ -1519,16 +1521,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSectionByNumber(ModType); // Mother module - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.*dbManager->TILBnperiod()); - double Radius = (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2 * CLHEP::cm; + double Radius = (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2 * GeoModelKernelUnits::cm; checking("EBarrelModule (-)", false, 1, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -1553,20 +1555,20 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " BoolCuts YES "<< dbManager->BoolCuts() << endmsg; - double PoZ2 =0, PoZ1 =0, thicknessEndPlate = dbManager->TILBdzend1()*CLHEP::cm; + double PoZ2 =0, PoZ1 =0, thicknessEndPlate = dbManager->TILBdzend1()*GeoModelKernelUnits::cm; - PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthNeg)/2; + PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthNeg)/2; PoZ2 = PoZ1 + modl_length/4; if ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) - { HepGeom::Transform3D TransCut2 = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateX3D((phi-90)*CLHEP::deg) * HepGeom::RotateY3D(180*CLHEP::deg) - * HepGeom::Translate3D(-PoZ2,0,-PosY); + { GeoTrf::Transform3D TransCut2 = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateX3D((phi-90)*GeoModelKernelUnits::deg) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(-PoZ2,0,-PosY); if (ModuleNcp>=60 && ModuleNcp<=62) - { HepGeom::Transform3D TransCutL = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(-phi*CLHEP::deg) - * HepGeom::Translate3D(PoZ1,-PosYcut,-PosXcut); + { GeoTrf::Transform3D TransCutL = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(-phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(PoZ1,-PosYcut,-PosXcut); // Cuting of module (Left) const GeoShape& TmL_EBarrelModuleMotherNeg = ebarrelModuleMotherNeg->subtract((*CutA)<<TransCut2). @@ -1575,9 +1577,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) lvEBarrelModuleMotherNeg = new GeoLogVol("EBarrelModule",&TmL_EBarrelModuleMotherNeg,matAir); } else if (ModuleNcp>=35 && ModuleNcp<=37) - { HepGeom::Transform3D TransCutR = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(-phi*CLHEP::deg) - * HepGeom::Translate3D(PoZ1,-PosYcut,PosXcut) * HepGeom::RotateY3D(180*CLHEP::deg); + { GeoTrf::Transform3D TransCutR = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(-phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(PoZ1,-PosYcut,PosXcut) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg); // Cuting of module (Right) const GeoShape& TmR_EBarrelModuleMotherNeg = ebarrelModuleMotherNeg->subtract((*CutA)<<TransCut2). @@ -1605,7 +1607,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) 0.,true); } - GeoTransform* xtraModNeg = new GeoTransform(HepGeom::TranslateX3D(Radius)); + GeoTransform* xtraModNeg = new GeoTransform(GeoTrf::TranslateX3D(Radius)); pvEBarrelMotherNeg->add(zrotMod); pvEBarrelMotherNeg->add(xtraModNeg); @@ -1623,15 +1625,15 @@ void TileAtlasFactory::create(GeoPhysVol *world) (*m_log) << MSG::DEBUG << " BoolCuts YES "<< dbManager->BoolCuts() << endmsg; double PoZ2 =0, PoZ1 =0; - double thicknessEndPlate = dbManager->TILBdzend1()*CLHEP::cm; + double thicknessEndPlate = dbManager->TILBdzend1()*GeoModelKernelUnits::cm; - PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthPos)/2; + PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthPos)/2; PoZ2 = modl_length/4 + PoZ1; if ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) - { HepGeom::Transform3D TransCut2 = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateX3D((phi-90)*CLHEP::deg) * HepGeom::RotateY3D(180*CLHEP::deg) - * HepGeom::Translate3D(-PoZ2,0.,-PosY); + { GeoTrf::Transform3D TransCut2 = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateX3D((phi-90)*GeoModelKernelUnits::deg) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(-PoZ2,0.,-PosY); // Cuting of pvEBarrelModuleMotherNeg (-) GeoCutVolAction action1(*CutA, TransCut2); @@ -1640,9 +1642,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) pvEBarrelModuleMotherNeg->unref(); // Cleaning useless volume if (ModuleNcp>=60 && ModuleNcp<=62) - { HepGeom::Transform3D TransCutL = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(-phi*CLHEP::deg) - * HepGeom::Translate3D(PoZ1,-PosYcut,-PosXcut); + { GeoTrf::Transform3D TransCutL = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(-phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(PoZ1,-PosYcut,-PosXcut); // Cuting of pvEBarrelModuleMotherNeg (Left) GeoCutVolAction action2(*CutB, TransCutL); @@ -1653,9 +1655,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) pvEBarrelMotherNeg->add(pvTmL_EBarrelModuleMotherNeg); } else if (ModuleNcp>=35 && ModuleNcp<=37) - { HepGeom::Transform3D TransCutR = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(-phi*CLHEP::deg) - * HepGeom::Translate3D(PoZ1,-PosYcut,PosXcut) * HepGeom::RotateY3D(180*CLHEP::deg); + { GeoTrf::Transform3D TransCutR = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(-phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(PoZ1,-PosYcut,PosXcut) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg); // Cuting of pvEBarrelModuleMotherNeg (Right) GeoCutVolAction action3(*CutB, TransCutR); @@ -1679,10 +1681,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) //zEndSection = extOffset + dbManager->TILBdzmodul()/2 + dbManager->TILEzshift(); // Trd - one finger mother - thicknessWedgeMother = dbManager->TIFGdz() * CLHEP::cm; - heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TIFGdz() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; checking("EFingerModule (-)", false, 1, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -1705,8 +1707,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) m_testbeamGeometry, ModuleNcp*100); } - GeoTransform* xtraModFingerNeg = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILErmax() + dbManager->TILBrmax())/2*CLHEP::cm)); + GeoTransform* xtraModFingerNeg = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILErmax() + dbManager->TILBrmax())/2*GeoModelKernelUnits::cm)); pvEFingerMotherNeg->add(zrotMod); pvEFingerMotherNeg->add(xtraModFingerNeg); pvEFingerMotherNeg->add(yrotMod); @@ -1721,7 +1723,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) GeoTubs* SaddleModule = new GeoTubs(BFingerRmin-RadiusSaddle, BFingerRmin, DzSaddleSupport/2, - 0.,deltaPhi*CLHEP::deg); + 0.,deltaPhi*GeoModelKernelUnits::deg); GeoLogVol* lvSaddleModule = new GeoLogVol("SaddleModule",SaddleModule,matIron); GeoPhysVol* pvSaddleModule = new GeoPhysVol(lvSaddleModule); @@ -1777,7 +1779,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) } } else { (*m_log) << MSG::INFO <<" D4 unavailable "<<endmsg; - dzITC1 = 9.485; //sb [CLHEP::cm] + dzITC1 = 9.485; //sb [GeoModelKernelUnits::cm] } bool specialC10 = (Ifd4 && Ifc10 && rMaxITC2 < rMinITC1); @@ -1792,10 +1794,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) if (Ifd4 || Ifc10) { // The first sub shape - thicknessWedgeMother = dzITC1 * CLHEP::cm; - heightWedgeMother = (rMaxITC1 - rMinITC1) * CLHEP::cm; - dy1WedgeMother = rMinITC1 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = rMaxITC1 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dzITC1 * GeoModelKernelUnits::cm; + heightWedgeMother = (rMaxITC1 - rMinITC1) * GeoModelKernelUnits::cm; + dy1WedgeMother = rMinITC1 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = rMaxITC1 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; checking("ITCModule tcModuleSub1Neg (-) ", false, 1, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -1806,10 +1808,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) dy2WedgeMother, heightWedgeMother/2); // The second sub shape - thicknessWedgeMother = dzITC2 * CLHEP::cm; - heightWedgeMother = (rMaxITC2 - rMinITC2) * CLHEP::cm; - dy1WedgeMother = rMinITC2 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = rMaxITC2 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dzITC2 * GeoModelKernelUnits::cm; + heightWedgeMother = (rMaxITC2 - rMinITC2) * GeoModelKernelUnits::cm; + dy1WedgeMother = rMinITC2 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = rMaxITC2 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; checking("ITCModule itcModuleSub2Neg (-)", false, 1, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -1820,15 +1822,15 @@ void TileAtlasFactory::create(GeoPhysVol *world) dy2WedgeMother, heightWedgeMother/2 ); - X = (dzITC1 - dzITC2)/2*CLHEP::cm; - Z = ((rMinITC2+rMaxITC2)-(rMaxITC1 + rMinITC1))/2*CLHEP::cm; + X = (dzITC1 - dzITC2)/2*GeoModelKernelUnits::cm; + Z = ((rMinITC2+rMaxITC2)-(rMaxITC1 + rMinITC1))/2*GeoModelKernelUnits::cm; if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG <<" ITCModule Negative, position X= "<<X<<" Z= "<<Z<< endmsg; - HepGeom::Translate3D itcModule_SubShiftNeg(X, 0., Z); + GeoTrf::Translate3D itcModule_SubShiftNeg(X, 0., Z); const GeoShapeUnion& itcModuleMotherNeg = itcModuleSub1Neg->add(*itcModuleSub2Neg<<itcModule_SubShiftNeg); - HepGeom::Translate3D itcModuleSubShiftNeg(X, 0., Z); + GeoTrf::Translate3D itcModuleSubShiftNeg(X, 0., Z); GeoLogVol* lvITCModuleMotherNeg = new GeoLogVol("ITCModule",&itcModuleMotherNeg,matAir); GeoPhysVol* pvITCModuleMotherNeg = new GeoPhysVol(lvITCModuleMotherNeg); @@ -1841,10 +1843,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) // The D4, PLUG1 dbManager->SetCurrentSectionByNumber(Id4); - thicknessWedgeMother = dzITC1 * CLHEP::cm; - heightWedgeMother = (rMaxITC1 - dbManager->TILBrmin()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = rMaxITC1 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dzITC1 * GeoModelKernelUnits::cm; + heightWedgeMother = (rMaxITC1 - dbManager->TILBrmin()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = rMaxITC1 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; // ps changes dzITC1 -> dzmodul Glue = dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2(); NbPeriod = dbManager->TILBnperiod(); @@ -1881,7 +1883,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) heightWedgeMother/2); //Second submother for frontplate double dzITC2Bis = (specialC10) ? 0.0 : dzITC2; // for special C10 D4 and C10 do not overlap - thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2Bis) * CLHEP::cm; + thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2Bis) * GeoModelKernelUnits::cm; if(m_log->level()<=MSG::DEBUG) if (specialC10) (*m_log) << MSG::DEBUG <<" Separate C10 and D4 in module " << ModuleNcp << endmsg; @@ -1889,9 +1891,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) GeoLogVol *lvPlug1ModuleMotherNeg=0; if (thicknessWedgeMother > rless) { - heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; checking("Plug1Module plug2SubMotherNeg (-)", false, 2, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -1902,8 +1904,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) dy2WedgeMother, heightWedgeMother/2); - HepGeom::Translate3D plug1SubOffsetNeg(-dzITC2Bis*CLHEP::cm/2, 0., - (dbManager->TILBrminimal()-dbManager->TILBrmaximal())*CLHEP::cm/2); + GeoTrf::Translate3D plug1SubOffsetNeg(-dzITC2Bis*GeoModelKernelUnits::cm/2, 0., + (dbManager->TILBrminimal()-dbManager->TILBrmaximal())*GeoModelKernelUnits::cm/2); const GeoShapeUnion& plug1ModuleMotherNeg = plug1SubMotherNeg->add(*plug2SubMotherNeg<<plug1SubOffsetNeg); @@ -1926,8 +1928,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) dzITC2Bis); } - Z = (dbManager->TILBrmin()-dbManager->TILBrminimal())*CLHEP::cm/2; - GeoTransform* tfPlug1ModuleMotherNeg = new GeoTransform(HepGeom::Translate3D(0.,0.,Z)); + Z = (dbManager->TILBrmin()-dbManager->TILBrminimal())*GeoModelKernelUnits::cm/2; + GeoTransform* tfPlug1ModuleMotherNeg = new GeoTransform(GeoTrf::Translate3D(0.,0.,Z)); pvITCModuleMotherNeg->add(tfPlug1ModuleMotherNeg); pvITCModuleMotherNeg->add(pvPlug1ModuleMotherNeg); @@ -1938,10 +1940,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) // TILE_PLUG2 dbManager->SetCurrentSectionByNumber(Ic10); - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; if (dbManager->TILBnperiod() > 1) { dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() @@ -1984,21 +1986,21 @@ void TileAtlasFactory::create(GeoPhysVol *world) double zShift = 0; NbPeriod = dbManager->TILBnperiod(); - // Z = (dbManager->TILBdzmodul()-dzITC2)/2*CLHEP::cm; + // Z = (dbManager->TILBdzmodul()-dzITC2)/2*GeoModelKernelUnits::cm; // ps Zshift calculated from length of volumes rather than modules (account for special modules) // - Z = (dzITC1 - dzITC2)/2*CLHEP::cm; + Z = (dzITC1 - dzITC2)/2*GeoModelKernelUnits::cm; - if (NbPeriod == 6 && !Ifspecialgirder && fabs(Z) < fabs(zITCStandard)) zShift = zITCStandard*(1./CLHEP::cm); + if (NbPeriod == 6 && !Ifspecialgirder && fabs(Z) < fabs(zITCStandard)) zShift = zITCStandard*(1./GeoModelKernelUnits::cm); if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG <<" ITCModule Negative, position X= "<<X<<" Z= "<<Z <<" zStandard= "<<zITCStandard<< " zShift= " <<zShift <<endmsg; - GeoTransform* xtraITCNeg = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*CLHEP::cm)); - GeoTransform* ztraITCNeg = new GeoTransform(HepGeom::TranslateZ3D(zShift*CLHEP::cm)); + GeoTransform* xtraITCNeg = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*GeoModelKernelUnits::cm)); + GeoTransform* ztraITCNeg = new GeoTransform(GeoTrf::TranslateZ3D(zShift*GeoModelKernelUnits::cm)); pvITCMotherNeg->add(zrotMod); pvITCMotherNeg->add(xtraITCNeg); @@ -2017,10 +2019,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSectionByNumber(Igap); // Trd - module mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = 0.; @@ -2046,8 +2048,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) } // Module position inside mother - GeoTransform* xtraGapNeg = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*CLHEP::cm)); + GeoTransform* xtraGapNeg = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*GeoModelKernelUnits::cm)); pvGapMotherNeg->add(zrotMod); pvGapMotherNeg->add(xtraGapNeg); pvGapMotherNeg->add(yrotMod); @@ -2063,10 +2065,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSectionByNumber(Icrack); // mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = 0.; @@ -2091,8 +2093,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) deltaPhi); } // Module position inside mother - GeoTransform* xtraCrackNeg = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*CLHEP::cm)); + GeoTransform* xtraCrackNeg = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*GeoModelKernelUnits::cm)); pvCrackMotherNeg->add(zrotMod); pvCrackMotherNeg->add(xtraCrackNeg); pvCrackMotherNeg->add(yrotMod); @@ -2110,10 +2112,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(Ifd4 || Ifc10) { // The first sub shape - thicknessWedgeMother = dzITC1 * CLHEP::cm; - heightWedgeMother = (rMaxITC1 - rMinITC1) * CLHEP::cm; - dy1WedgeMother = rMinITC1 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = rMaxITC1 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dzITC1 * GeoModelKernelUnits::cm; + heightWedgeMother = (rMaxITC1 - rMinITC1) * GeoModelKernelUnits::cm; + dy1WedgeMother = rMinITC1 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = rMaxITC1 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; checking("ITCModule itcModuleSub2Pos (+)", false, 1, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -2124,10 +2126,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) dy2WedgeMother , heightWedgeMother/2 ); // The second sub shape - thicknessWedgeMother = dzITC2 * CLHEP::cm; - heightWedgeMother = (rMaxITC2 - rMinITC2) * CLHEP::cm; - dy1WedgeMother = rMinITC2 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = rMaxITC2 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dzITC2 * GeoModelKernelUnits::cm; + heightWedgeMother = (rMaxITC2 - rMinITC2) * GeoModelKernelUnits::cm; + dy1WedgeMother = rMinITC2 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = rMaxITC2 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; checking("ITCModule itcModuleSub2Pos (+)", false, 1, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -2138,15 +2140,15 @@ void TileAtlasFactory::create(GeoPhysVol *world) dy2WedgeMother , heightWedgeMother/2 ); - X = (dzITC1 - dzITC2)/2*CLHEP::cm; - Z = ((rMinITC2+rMaxITC2)-(rMaxITC1 + rMinITC1))/2*CLHEP::cm; + X = (dzITC1 - dzITC2)/2*GeoModelKernelUnits::cm; + Z = ((rMinITC2+rMaxITC2)-(rMaxITC1 + rMinITC1))/2*GeoModelKernelUnits::cm; if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG <<" ITCModule Positive, position X= "<<X<<" Z= "<<Z<< endmsg; - HepGeom::Translate3D itcModule_SubShiftPos(X, 0., Z); + GeoTrf::Translate3D itcModule_SubShiftPos(X, 0., Z); const GeoShapeUnion& itcModuleMotherPos = itcModuleSub1Pos->add(*itcModuleSub2Pos<<itcModule_SubShiftPos); - HepGeom::Translate3D itcModuleSubShiftPos(X, 0., Z); + GeoTrf::Translate3D itcModuleSubShiftPos(X, 0., Z); GeoLogVol* lvITCModuleMotherPos = new GeoLogVol("ITCModule",&itcModuleMotherPos,matAir); GeoPhysVol* pvITCModuleMotherPos = new GeoPhysVol(lvITCModuleMotherPos); @@ -2159,10 +2161,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) // The D4, PLUG1 dbManager->SetCurrentSectionByNumber(Id4); - thicknessWedgeMother = dzITC1 * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = rMaxITC1 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - heightWedgeMother = (rMaxITC1 - dbManager->TILBrmin()) * CLHEP::cm; + thicknessWedgeMother = dzITC1 * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = rMaxITC1 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + heightWedgeMother = (rMaxITC1 - dbManager->TILBrmin()) * GeoModelKernelUnits::cm; // ps changes dzITC1 -> dzmodul Glue = dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2(); @@ -2202,7 +2204,7 @@ void TileAtlasFactory::create(GeoPhysVol *world) //Second submother C10, PLUG2 double dzITC2Bis = (specialC10) ? 0.0 : dzITC2; // for special C10 D4 and C10 do not overlap - thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2Bis) * CLHEP::cm; + thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2Bis) * GeoModelKernelUnits::cm; if(m_log->level()<=MSG::DEBUG) if (specialC10) (*m_log) << MSG::DEBUG <<" Separate C10 and D4 in module " << ModuleNcp << endmsg; @@ -2210,9 +2212,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) GeoLogVol *lvPlug1ModuleMotherPos=0; if (thicknessWedgeMother > rless) { - heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; checking("Plug1Module plug2SubMotherPos (+)", false, 2, thicknessWedgeMother/2,thicknessWedgeMother/2,dy1WedgeMother,dy2WedgeMother,heightWedgeMother/2); @@ -2223,8 +2225,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) dy2WedgeMother , heightWedgeMother/2 ); - HepGeom::Translate3D plug1SubOffsetPos(-dzITC2Bis/2*CLHEP::cm, 0., - (dbManager->TILBrminimal()-dbManager->TILBrmaximal())/2*CLHEP::cm); + GeoTrf::Translate3D plug1SubOffsetPos(-dzITC2Bis/2*GeoModelKernelUnits::cm, 0., + (dbManager->TILBrminimal()-dbManager->TILBrmaximal())/2*GeoModelKernelUnits::cm); const GeoShapeUnion& plug1ModuleMotherPos = plug1SubMotherPos->add(*plug2SubMotherPos<<plug1SubOffsetPos); @@ -2246,8 +2248,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) dzITC2Bis); } - Z = (dbManager->TILBrmin()-dbManager->TILBrminimal())*CLHEP::cm/2; - GeoTransform* tfPlug1ModuleMotherPos = new GeoTransform(HepGeom::Translate3D(0.,0.,Z)); + Z = (dbManager->TILBrmin()-dbManager->TILBrminimal())*GeoModelKernelUnits::cm/2; + GeoTransform* tfPlug1ModuleMotherPos = new GeoTransform(GeoTrf::Translate3D(0.,0.,Z)); pvITCModuleMotherPos->add(tfPlug1ModuleMotherPos); pvITCModuleMotherPos->add(pvPlug1ModuleMotherPos); @@ -2258,10 +2260,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) // TILE_PLUG2, C10 dbManager->SetCurrentSectionByNumber(Ic10); - thicknessWedgeMother = dzITC2 * CLHEP::cm; - heightWedgeMother = (rMaxITC2 - rMinITC2) * CLHEP::cm; - dy1WedgeMother = rMinITC2 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = rMaxITC2 * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dzITC2 * GeoModelKernelUnits::cm; + heightWedgeMother = (rMaxITC2 - rMinITC2) * GeoModelKernelUnits::cm; + dy1WedgeMother = rMinITC2 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = rMaxITC2 * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; if (dbManager->TILBnperiod() > 1) { dzGlue = (dzITC2 - dbManager->TILBdzend1() - dbManager->TILBdzend2() @@ -2304,19 +2306,19 @@ void TileAtlasFactory::create(GeoPhysVol *world) double zShift = 0; NbPeriod = dbManager->TILBnperiod(); - //ps Z = (dbManager->TILBdzmodul()-dzITC2)/2*CLHEP::cm; - Z = (dzITC1 - dzITC2)/2*CLHEP::cm; + //ps Z = (dbManager->TILBdzmodul()-dzITC2)/2*GeoModelKernelUnits::cm; + Z = (dzITC1 - dzITC2)/2*GeoModelKernelUnits::cm; - if (NbPeriod == 6 && !Ifspecialgirder && fabs(Z) < fabs(zITCStandard)) zShift = zITCStandard*(1./CLHEP::cm); + if (NbPeriod == 6 && !Ifspecialgirder && fabs(Z) < fabs(zITCStandard)) zShift = zITCStandard*(1./GeoModelKernelUnits::cm); if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG <<" ITCModule Positive, position X= "<<X<<" Z= "<<Z <<" zStandard= "<<zITCStandard<< " zShift= " <<zShift <<endmsg; - GeoTransform* xtraITCPos = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*CLHEP::cm)); - GeoTransform* ztraITCPos = new GeoTransform(HepGeom::TranslateZ3D(zShift*CLHEP::cm)); + GeoTransform* xtraITCPos = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*GeoModelKernelUnits::cm)); + GeoTransform* ztraITCPos = new GeoTransform(GeoTrf::TranslateZ3D(zShift*GeoModelKernelUnits::cm)); pvITCMotherPos->add(zrotMod); pvITCMotherPos->add(xtraITCPos); @@ -2336,10 +2338,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSectionByNumber(Igap); // Mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = 0; @@ -2365,8 +2367,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) } // Module position inside mother - GeoTransform* xtraGapPos = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*CLHEP::cm)); + GeoTransform* xtraGapPos = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*GeoModelKernelUnits::cm)); pvGapMotherPos->add(zrotMod); pvGapMotherPos->add(xtraGapPos); pvGapMotherPos->add(XYrtMod); @@ -2382,10 +2384,10 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSectionByNumber(Icrack); // Trd - module mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = 0.; @@ -2411,8 +2413,8 @@ void TileAtlasFactory::create(GeoPhysVol *world) } // Module position inside mother - GeoTransform* xtraCrackPos = new GeoTransform(HepGeom::TranslateX3D( - (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*CLHEP::cm)); + GeoTransform* xtraCrackPos = new GeoTransform(GeoTrf::TranslateX3D( + (dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2*GeoModelKernelUnits::cm)); pvCrackMotherPos->add(zrotMod); pvCrackMotherPos->add(xtraCrackPos); pvCrackMotherPos->add(XYrtMod); @@ -2454,9 +2456,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) // consider 3 options - with/without ext.barrels and take into account DZ correction ztrans = 0; - tfBarrelMother = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D((dbManager->GetEnvDPhi())*CLHEP::deg)); + tfBarrelMother = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D((dbManager->GetEnvDPhi())*GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning barrel with translation "<<ztrans*CLHEP::cm<< endmsg; + (*m_log) << MSG::INFO <<" Positioning barrel with translation "<<ztrans*GeoModelKernelUnits::cm<< endmsg; GeoNameTag* ntBarrelModuleMother = new GeoNameTag("Barrel"); @@ -2466,11 +2468,11 @@ void TileAtlasFactory::create(GeoPhysVol *world) GeoTransform* tfFingerMotherPos; - ztrans = (dbManager->GetEnvZLength()*CLHEP::cm/2 - BFingerLengthPos/2 + PosDelta)*(1./CLHEP::cm); + ztrans = (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm/2 - BFingerLengthPos/2 + PosDelta)*(1./GeoModelKernelUnits::cm); - tfFingerMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)*HepGeom::RotateZ3D((dbManager->GetEnvDPhi())*CLHEP::deg)); + tfFingerMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)*GeoTrf::RotateZ3D((dbManager->GetEnvDPhi())*GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning positive barrel finger with translation "<<ztrans*CLHEP::cm<< endmsg; + (*m_log) << MSG::INFO <<" Positioning positive barrel finger with translation "<<ztrans*GeoModelKernelUnits::cm<< endmsg; GeoNameTag* ntFingerMotherPos = new GeoNameTag("TileFingerPos"); @@ -2481,9 +2483,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) if (dbManager->BoolSaddle()) { GeoTransform* tfSaddleMotherPos; - ztrans = (dbManager->GetEnvZLength()*CLHEP::cm/2 - BFingerLengthPos + DzSaddleSupport/2 + PosDelta)*(1./CLHEP::cm); + ztrans = (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm/2 - BFingerLengthPos + DzSaddleSupport/2 + PosDelta)*(1./GeoModelKernelUnits::cm); - tfSaddleMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)*HepGeom::RotateZ3D((dbManager->GetEnvDPhi())*CLHEP::deg)); + tfSaddleMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)*GeoTrf::RotateZ3D((dbManager->GetEnvDPhi())*GeoModelKernelUnits::deg)); GeoNameTag* ntSaddleMotherPos = new GeoNameTag("TileSaddlePos"); @@ -2496,11 +2498,11 @@ void TileAtlasFactory::create(GeoPhysVol *world) GeoTransform* tfFingerMotherNeg; - ztrans = (-dbManager->GetEnvZLength()*CLHEP::cm/2 + BFingerLengthNeg/2 - NegDelta)*(1./CLHEP::cm); + ztrans = (-dbManager->GetEnvZLength()*GeoModelKernelUnits::cm/2 + BFingerLengthNeg/2 - NegDelta)*(1./GeoModelKernelUnits::cm); - tfFingerMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)*HepGeom::RotateZ3D((dbManager->GetEnvDPhi())*CLHEP::deg)); + tfFingerMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)*GeoTrf::RotateZ3D((dbManager->GetEnvDPhi())*GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning negative barrel finger with translation "<<ztrans*CLHEP::cm<< endmsg; + (*m_log) << MSG::INFO <<" Positioning negative barrel finger with translation "<<ztrans*GeoModelKernelUnits::cm<< endmsg; GeoNameTag* ntFingerMotherNeg = new GeoNameTag("TileFingerNeg"); pvTileEnvelopeBarrel->add(tfFingerMotherNeg); @@ -2510,9 +2512,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) if (dbManager->BoolSaddle()) { GeoTransform* tfSaddleMotherNeg; - ztrans = (-dbManager->GetEnvZLength()*CLHEP::cm/2 + BFingerLengthNeg - DzSaddleSupport/2 - NegDelta)*(1./CLHEP::cm); + ztrans = (-dbManager->GetEnvZLength()*GeoModelKernelUnits::cm/2 + BFingerLengthNeg - DzSaddleSupport/2 - NegDelta)*(1./GeoModelKernelUnits::cm); - tfSaddleMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)*HepGeom::RotateZ3D((dbManager->GetEnvDPhi())*CLHEP::deg)); + tfSaddleMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)*GeoTrf::RotateZ3D((dbManager->GetEnvDPhi())*GeoModelKernelUnits::deg)); GeoNameTag* ntSaddleMotherNeg = new GeoNameTag("TileSaddleNeg"); @@ -2528,9 +2530,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(EnvType == 3) { // positive ext.barrel is always at positive boundary, after finger dbManager->SetCurrentSection(TileDddbManager::TILE_EBARREL); - double thicknessEndPlate = dbManager->TILBdzend1()*CLHEP::cm; + double thicknessEndPlate = dbManager->TILBdzend1()*GeoModelKernelUnits::cm; - double PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthPos)/2; + double PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthPos)/2; double PoZ2 = modl_length/4 + PoZ1; //-------------------------------------------------------------------------------------------------------------- @@ -2545,14 +2547,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " Iron1: " << dxIron << " " << dyIron << endmsg; - GeoTransform* tfIron1 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(dxIron,PosY-dyIron,PoZ2) - * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIron1 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(dxIron,PosY-dyIron,PoZ2) + * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherPos->add(tfIron1); pvEBarrelMotherPos->add(new GeoIdentifierTag(1)); pvEBarrelMotherPos->add(pvIron1); - tfIron1 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(-dxIron,PosY-dyIron,PoZ2) - * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Right + tfIron1 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(-dxIron,PosY-dyIron,PoZ2) + * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Right pvEBarrelMotherPos->add(tfIron1); pvEBarrelMotherPos->add(pvIron1); @@ -2563,14 +2565,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " Iron2: " << dxIron << " " << dyIron << endmsg; - GeoTransform* tfIron2 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(dxIron,PosY+dyIron,PoZ2) - * HepGeom::RotateZ3D(-84.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIron2 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(dxIron,PosY+dyIron,PoZ2) + * GeoTrf::RotateZ3D(-84.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherPos->add(tfIron2); pvEBarrelMotherPos->add(new GeoIdentifierTag(2)); pvEBarrelMotherPos->add(pvIron2); - tfIron2 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(-dxIron,PosY+dyIron,PoZ2) - * HepGeom::RotateZ3D(84.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + tfIron2 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(-dxIron,PosY+dyIron,PoZ2) + * GeoTrf::RotateZ3D(84.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherPos->add(tfIron2); pvEBarrelMotherPos->add(pvIron2); @@ -2581,14 +2583,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " Iron3: " << dxIron << " " << dyIron << endmsg; - GeoTransform* tfIron3 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(dxIron,PosY+dyIron,PoZ2) - * HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIron3 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(dxIron,PosY+dyIron,PoZ2) + * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherPos->add(tfIron3); pvEBarrelMotherPos->add(new GeoIdentifierTag(3)); pvEBarrelMotherPos->add(pvIron3); - tfIron3 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(-dxIron,PosY+dyIron,PoZ2) - * HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Right + tfIron3 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(-dxIron,PosY+dyIron,PoZ2) + * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Right pvEBarrelMotherPos->add(tfIron3); pvEBarrelMotherPos->add(pvIron3); @@ -2597,14 +2599,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) dxIron = dbManager->CutsXpos(); dyIron = dbManager->CutsYpos(); - GeoTransform* tfIrBoxL = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(dxIron,PosY-dyIron,PoZ2) - * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIrBoxL = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(dxIron,PosY-dyIron,PoZ2) + * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherPos->add(tfIrBoxL); pvEBarrelMotherPos->add(new GeoIdentifierTag(4)); pvEBarrelMotherPos->add(pvIrBox); - GeoTransform* tfIrBoxR = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(-dxIron,PosY-dyIron,PoZ2) - * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Right + GeoTransform* tfIrBoxR = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(-dxIron,PosY-dyIron,PoZ2) + * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Right pvEBarrelMotherPos->add(tfIrBoxR); pvEBarrelMotherPos->add(pvIrBox); @@ -2615,16 +2617,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " IrUp: " <<dxIr<< " " <<dyIr<< endmsg; - GeoTransform* tfIrUp = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) - * HepGeom::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,-PoZ1) - * HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIrUp = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) + * GeoTrf::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,-PoZ1) + * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherPos->add(tfIrUp); pvEBarrelMotherPos->add(new GeoIdentifierTag(5)); pvEBarrelMotherPos->add(pvIrUp); - tfIrUp = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) - * HepGeom::Translate3D(-PosXcut-dxIr,-PosYcut+dyIr,-PoZ1) - * HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Right + tfIrUp = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) + * GeoTrf::Translate3D(-PosXcut-dxIr,-PosYcut+dyIr,-PoZ1) + * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Right pvEBarrelMotherPos->add(tfIrUp); pvEBarrelMotherPos->add(pvIrUp); @@ -2635,16 +2637,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " IrDw: " <<dxIr<< " " <<dyIr<< endmsg; - GeoTransform* tfIrDw = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) - * HepGeom::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,-PoZ1) - * HepGeom::RotateZ3D(70.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIrDw = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) + * GeoTrf::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,-PoZ1) + * GeoTrf::RotateZ3D(70.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherPos->add(tfIrDw); pvEBarrelMotherPos->add(new GeoIdentifierTag(6)); pvEBarrelMotherPos->add(pvIrDw); - tfIrDw = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) - * HepGeom::Translate3D(-PosXcut+dxIr,-PosYcut+dyIr,-PoZ1) - * HepGeom::RotateZ3D(-70.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + tfIrDw = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) + * GeoTrf::Translate3D(-PosXcut+dxIr,-PosYcut+dyIr,-PoZ1) + * GeoTrf::RotateZ3D(-70.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherPos->add(tfIrDw); pvEBarrelMotherPos->add(pvIrDw); @@ -2652,12 +2654,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) } //-------------------------------------------------------------------------------------------------------------- // Ext.Barrel - ztrans = (PosEndCrack + (dbManager->GetEnvZLength()*CLHEP::cm - EBFingerLengthPos)/2 + 19.5)*(1./CLHEP::cm); + ztrans = (PosEndCrack + (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm - EBFingerLengthPos)/2 + 19.5)*(1./GeoModelKernelUnits::cm); - GeoTransform* tfEBarrelMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * - HepGeom::RotateZ3D(dbManager->GetEnvDPhi()*CLHEP::deg)); + GeoTransform* tfEBarrelMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()*GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning positive ext.barrel with translation "<< ztrans*CLHEP::cm << endmsg; + (*m_log) << MSG::INFO <<" Positioning positive ext.barrel with translation "<< ztrans*GeoModelKernelUnits::cm << endmsg; // GeoNameTag* ntEBarrelMotherPos = new GeoNameTag("EBarrelPos"); @@ -2669,12 +2671,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) //-------------------------------------------------------------------------------------------------------------- // Finger - ztrans = (PosEndExBarrel + EBFingerLengthPos/2)*(1./CLHEP::cm); + ztrans = (PosEndExBarrel + EBFingerLengthPos/2)*(1./GeoModelKernelUnits::cm); - GeoTransform* tfEFingerMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * - HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfEFingerMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning positive ext.barrel finger with translation ztrans= "<<ztrans*CLHEP::cm<<endmsg; + (*m_log) << MSG::INFO <<" Positioning positive ext.barrel finger with translation ztrans= "<<ztrans*GeoModelKernelUnits::cm<<endmsg; GeoNameTag* ntEFingerMotherPos = new GeoNameTag("TileEFingerPos"); @@ -2685,12 +2687,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) //-------------------------------------------------------------------------------------------------------------- // Ext. Saddle Support if (dbManager->BoolSaddle()) - { ztrans = (PosEndExBarrel + DzSaddleSupport/2)*(1./CLHEP::cm); + { ztrans = (PosEndExBarrel + DzSaddleSupport/2)*(1./GeoModelKernelUnits::cm); - GeoTransform* tfESaddleMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * - HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfESaddleMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning positive ext.barrel saddle with translation ztrans= "<<ztrans*CLHEP::cm + (*m_log) << MSG::INFO <<" Positioning positive ext.barrel saddle with translation ztrans= "<<ztrans*GeoModelKernelUnits::cm << endmsg; GeoNameTag* ntESaddleMotherPos = new GeoNameTag("TileESaddlePos"); @@ -2708,9 +2710,9 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(EnvType == 2) { // negative ext.barrel is always at negative boundary, after finger dbManager->SetCurrentSection(TileDddbManager::TILE_EBARREL); - double thicknessEndPlate = dbManager->TILBdzend1()*CLHEP::cm; + double thicknessEndPlate = dbManager->TILBdzend1()*GeoModelKernelUnits::cm; - double PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*CLHEP::cm- EBFingerLengthNeg)/2; + double PoZ1 = thicknessEndPlate + modl_length/4 - (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm- EBFingerLengthNeg)/2; double PoZ2 = modl_length/4 + PoZ1; //*>------------------------------------------------------------------------------------------------------ @@ -2722,14 +2724,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) dxIron = dbManager->CutsXpos(); dyIron = dbManager->CutsYpos(); - GeoTransform* tfIron1 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(dxIron,PosY-dyIron,-PoZ2) - * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIron1 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(dxIron,PosY-dyIron,-PoZ2) + * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherNeg->add(tfIron1); pvEBarrelMotherNeg->add(new GeoIdentifierTag(1)); pvEBarrelMotherNeg->add(pvIron1); - tfIron1 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(-dxIron,PosY-dyIron,-PoZ2) - * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Right + tfIron1 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(-dxIron,PosY-dyIron,-PoZ2) + * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Right pvEBarrelMotherNeg->add(tfIron1); pvEBarrelMotherNeg->add(new GeoIdentifierTag(2)); pvEBarrelMotherNeg->add(pvIron1); @@ -2739,14 +2741,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) dxIron = dbManager->CutsXpos(); dyIron = dbManager->CutsYpos(); - GeoTransform* tfIron2 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(dxIron,PosY+dyIron,-PoZ2) - * HepGeom::RotateZ3D(-84.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIron2 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(dxIron,PosY+dyIron,-PoZ2) + * GeoTrf::RotateZ3D(-84.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherNeg->add(tfIron2); pvEBarrelMotherNeg->add(new GeoIdentifierTag(2)); pvEBarrelMotherNeg->add(pvIron2); - tfIron2 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(-dxIron,PosY+dyIron,-PoZ2) - * HepGeom::RotateZ3D(84.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + tfIron2 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(-dxIron,PosY+dyIron,-PoZ2) + * GeoTrf::RotateZ3D(84.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherNeg->add(tfIron2); pvEBarrelMotherNeg->add(pvIron2); @@ -2755,14 +2757,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) dxIron = dbManager->CutsXpos(); dyIron = dbManager->CutsYpos(); - GeoTransform* tfIron3 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(dxIron,PosY+dyIron,-PoZ2) - * HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIron3 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(dxIron,PosY+dyIron,-PoZ2) + * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherNeg->add(tfIron3); pvEBarrelMotherNeg->add(new GeoIdentifierTag(3)); pvEBarrelMotherNeg->add(pvIron3); - tfIron3 = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(-dxIron,PosY+dyIron,-PoZ2) - * HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Right + tfIron3 = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(-dxIron,PosY+dyIron,-PoZ2) + * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Right pvEBarrelMotherNeg->add(tfIron3); pvEBarrelMotherNeg->add(pvIron3); @@ -2770,14 +2772,14 @@ void TileAtlasFactory::create(GeoPhysVol *world) volname = "IrBox"; dbManager->SetCurrentCuts(volname); //>> dxIron = dbManager->CutsXpos(); dyIron = dbManager->CutsYpos(); - GeoTransform* tfIrBoxL = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::Translate3D(dxIron,PosY-dyIron,-PoZ2) - * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIrBoxL = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::Translate3D(dxIron,PosY-dyIron,-PoZ2) + * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherNeg->add(tfIrBoxL); pvEBarrelMotherNeg->add(new GeoIdentifierTag(4)); pvEBarrelMotherNeg->add(pvIrBox); - GeoTransform* tfIrBoxR = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) *HepGeom::Translate3D(-dxIron,PosY-dyIron,-PoZ2) - * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Right + GeoTransform* tfIrBoxR = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) *GeoTrf::Translate3D(-dxIron,PosY-dyIron,-PoZ2) + * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Right pvEBarrelMotherNeg->add(tfIrBoxR); pvEBarrelMotherNeg->add(pvIrBox); @@ -2786,16 +2788,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) dxIr = dbManager->CutsXpos(); dyIr = dbManager->CutsYpos(); - GeoTransform* tfIrUp = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) - * HepGeom::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,PoZ1) - * HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIrUp = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) + * GeoTrf::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,PoZ1) + * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherNeg->add(tfIrUp); pvEBarrelMotherNeg->add(new GeoIdentifierTag(5)); pvEBarrelMotherNeg->add(pvIrUp); - tfIrUp = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) - * HepGeom::Translate3D(-PosXcut-dxIr,-PosYcut+dyIr,PoZ1) - * HepGeom::RotateZ3D(90.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Right + tfIrUp = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) + * GeoTrf::Translate3D(-PosXcut-dxIr,-PosYcut+dyIr,PoZ1) + * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Right pvEBarrelMotherNeg->add(tfIrUp); pvEBarrelMotherNeg->add(pvIrUp); @@ -2804,16 +2806,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) dxIr = dbManager->CutsXpos(); dyIr = dbManager->CutsYpos(); - GeoTransform* tfIrDw = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) - * HepGeom::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,PoZ1) - * HepGeom::RotateZ3D(70.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + GeoTransform* tfIrDw = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) + * GeoTrf::Translate3D(PosXcut+dxIr,-PosYcut+dyIr,PoZ1) + * GeoTrf::RotateZ3D(70.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherNeg->add(tfIrDw); pvEBarrelMotherNeg->add(new GeoIdentifierTag(6)); pvEBarrelMotherNeg->add(pvIrDw); - tfIrDw = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) - * HepGeom::Translate3D(-PosXcut+dxIr,-PosYcut+dyIr,PoZ1) - * HepGeom::RotateZ3D(-70.*CLHEP::deg) * HepGeom::RotateX3D(90.*CLHEP::deg) * HepGeom::RotateZ3D(90.*CLHEP::deg)); // Left + tfIrDw = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) + * GeoTrf::Translate3D(-PosXcut+dxIr,-PosYcut+dyIr,PoZ1) + * GeoTrf::RotateZ3D(-70.*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(90.*GeoModelKernelUnits::deg) * GeoTrf::RotateZ3D(90.*GeoModelKernelUnits::deg)); // Left pvEBarrelMotherNeg->add(tfIrDw); pvEBarrelMotherNeg->add(pvIrDw); @@ -2822,12 +2824,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) // //*>------------------------------------------------------------------------------------------------------ // Ext.Barrel - ztrans = (-NegEndCrack - (dbManager->GetEnvZLength()*CLHEP::cm - EBFingerLengthNeg)/2 - 19.5)*(1./CLHEP::cm); + ztrans = (-NegEndCrack - (dbManager->GetEnvZLength()*GeoModelKernelUnits::cm - EBFingerLengthNeg)/2 - 19.5)*(1./GeoModelKernelUnits::cm); - GeoTransform* tfEBarrelMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * - HepGeom::RotateZ3D(dbManager->GetEnvDPhi()*CLHEP::deg)); + GeoTransform* tfEBarrelMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()*GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning negative ext.barrel with translation ztrans "<<ztrans*CLHEP::cm<<endmsg; + (*m_log) << MSG::INFO <<" Positioning negative ext.barrel with translation ztrans "<<ztrans*GeoModelKernelUnits::cm<<endmsg; GeoNameTag* ntEBarrelMotherNeg = new GeoNameTag("EBarrelNeg"); @@ -2838,12 +2840,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) //*>------------------------------------------------------------------------------------------------------ // Finger - ztrans = (-NegEndExBarrel - EBFingerLengthPos/2)*(1./CLHEP::cm); + ztrans = (-NegEndExBarrel - EBFingerLengthPos/2)*(1./GeoModelKernelUnits::cm); - GeoTransform* tfEFingerMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * - HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfEFingerMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning negative ext.barrel finger with translation ztrans= "<<ztrans*CLHEP::cm<< endmsg; + (*m_log) << MSG::INFO <<" Positioning negative ext.barrel finger with translation ztrans= "<<ztrans*GeoModelKernelUnits::cm<< endmsg; GeoNameTag* ntEFingerMotherNeg = new GeoNameTag("TileEFingerNeg"); @@ -2854,12 +2856,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) //*>------------------------------------------------------------------------------------------------------ // Ext. Saddle Support if (dbManager->BoolSaddle()) - { ztrans = (-NegEndExBarrel - DzSaddleSupport/2)*(1./CLHEP::cm); + { ztrans = (-NegEndExBarrel - DzSaddleSupport/2)*(1./GeoModelKernelUnits::cm); - GeoTransform* tfESaddleMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * - HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfESaddleMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); - (*m_log) << MSG::INFO <<" Positioning negative ext.barrel saddle with translation ztrans= "<<ztrans*CLHEP::cm + (*m_log) << MSG::INFO <<" Positioning negative ext.barrel saddle with translation ztrans= "<<ztrans*GeoModelKernelUnits::cm << endmsg; GeoNameTag* ntESaddleMotherNeg = new GeoNameTag("TileESaddleNeg"); @@ -2878,15 +2880,15 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - ztrans = PosEndBarrelFinger*(1./CLHEP::cm) + dbManager->TILBdzmodul()/2; + ztrans = PosEndBarrelFinger*(1./GeoModelKernelUnits::cm) + dbManager->TILBdzmodul()/2; - //std::cout <<" ztrans "<<ztrans<<" PosEndBarrelFinger/CLHEP::cm "<<PosEndBarrelFinger/CLHEP::cm - // <<" dbManager->TILBdzmodul()/2*CLHEP::cm"<<dbManager->TILBdzmodul()/2<<"\n"; + //std::cout <<" ztrans "<<ztrans<<" PosEndBarrelFinger/GeoModelKernelUnits::cm "<<PosEndBarrelFinger/GeoModelKernelUnits::cm + // <<" dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm"<<dbManager->TILBdzmodul()/2<<"\n"; - (*m_log) << MSG::INFO <<" Positioning positive ITC with translation "<<ztrans*CLHEP::cm<< endmsg; + (*m_log) << MSG::INFO <<" Positioning positive ITC with translation "<<ztrans*GeoModelKernelUnits::cm<< endmsg; - GeoTransform* tfITCMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * - HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfITCMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); GeoNameTag* ntITCMotherPos = new GeoNameTag("ITCPos"); @@ -2895,12 +2897,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) pvTileEnvelopePosEndcap->add(pvITCMotherPos); dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG3); - ztrans = PosBeginGap*(1./CLHEP::cm) + dbManager->TILBdzmodul()/2; + ztrans = PosBeginGap*(1./GeoModelKernelUnits::cm) + dbManager->TILBdzmodul()/2; - (*m_log) << MSG::INFO <<" Positioning positive Gap with translation "<<ztrans*CLHEP::cm<<endmsg; + (*m_log) << MSG::INFO <<" Positioning positive Gap with translation "<<ztrans*GeoModelKernelUnits::cm<<endmsg; - GeoTransform* tfGapMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)* - HepGeom::RotateZ3D(dbManager->GetEnvDPhi()*CLHEP::deg)); + GeoTransform* tfGapMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)* + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()*GeoModelKernelUnits::deg)); GeoNameTag* ntGapMotherPos = new GeoNameTag("GapPos"); @@ -2910,12 +2912,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) // Crack dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); - ztrans = PosBeginCrack*(1./CLHEP::cm) + dbManager->TILBdzmodul()/2; + ztrans = PosBeginCrack*(1./GeoModelKernelUnits::cm) + dbManager->TILBdzmodul()/2; - (*m_log) << MSG::INFO <<" Positioning positive Crack with translation "<<ztrans*CLHEP::cm<<endmsg; + (*m_log) << MSG::INFO <<" Positioning positive Crack with translation "<<ztrans*GeoModelKernelUnits::cm<<endmsg; - GeoTransform* tfCrackMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)* - HepGeom::RotateZ3D(dbManager->GetEnvDPhi()*CLHEP::deg)); + GeoTransform* tfCrackMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)* + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()*GeoModelKernelUnits::deg)); GeoNameTag* ntCrackMotherPos = new GeoNameTag("CrackPos"); @@ -2932,12 +2934,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) if(EnvType == 4) { dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - ztrans = -NegEndBarrelFinger*(1./CLHEP::cm) - dbManager->TILBdzmodul()/2; + ztrans = -NegEndBarrelFinger*(1./GeoModelKernelUnits::cm) - dbManager->TILBdzmodul()/2; - (*m_log) << MSG::INFO <<" Positioning negative ITC with translation "<<ztrans*CLHEP::cm<<endmsg; + (*m_log) << MSG::INFO <<" Positioning negative ITC with translation "<<ztrans*GeoModelKernelUnits::cm<<endmsg; - GeoTransform* tfITCMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)* - HepGeom::RotateZ3D(dbManager->GetEnvDPhi()*CLHEP::deg)); + GeoTransform* tfITCMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)* + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()*GeoModelKernelUnits::deg)); GeoNameTag* ntITCMotherNeg = new GeoNameTag("ITCNeg"); @@ -2946,12 +2948,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) pvTileEnvelopeNegEndcap->add(pvITCMotherNeg); dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG3); - ztrans = -NegBeginGap*(1./CLHEP::cm) - dbManager->TILBdzmodul()/2; + ztrans = -NegBeginGap*(1./GeoModelKernelUnits::cm) - dbManager->TILBdzmodul()/2; - (*m_log) << MSG::INFO <<" Positioning negative Gap with translation "<<ztrans*CLHEP::cm<<endmsg; + (*m_log) << MSG::INFO <<" Positioning negative Gap with translation "<<ztrans*GeoModelKernelUnits::cm<<endmsg; - GeoTransform* tfGapMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)* - HepGeom::RotateZ3D(dbManager->GetEnvDPhi()*CLHEP::deg)); + GeoTransform* tfGapMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)* + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()*GeoModelKernelUnits::deg)); GeoNameTag* ntGapMotherNeg = new GeoNameTag("GapNeg"); @@ -2961,12 +2963,12 @@ void TileAtlasFactory::create(GeoPhysVol *world) // Crack dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); - ztrans = -NegBeginCrack*(1./CLHEP::cm) - dbManager->TILBdzmodul()/2; + ztrans = -NegBeginCrack*(1./GeoModelKernelUnits::cm) - dbManager->TILBdzmodul()/2; - (*m_log) << MSG::INFO <<" Positioning negative Crack with translation "<<ztrans*CLHEP::cm<<endmsg; + (*m_log) << MSG::INFO <<" Positioning negative Crack with translation "<<ztrans*GeoModelKernelUnits::cm<<endmsg; - GeoTransform* tfCrackMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm)* - HepGeom::RotateZ3D(dbManager->GetEnvDPhi()*CLHEP::deg)); + GeoTransform* tfCrackMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm)* + GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()*GeoModelKernelUnits::deg)); GeoNameTag* ntCrackMotherNeg = new GeoNameTag("CrackNeg"); @@ -2992,13 +2994,13 @@ void TileAtlasFactory::create(GeoPhysVol *world) dbManager->SetCurrentEnvByIndex(EnvCounter); int EnvType = dbManager->GetEnvType(); int NumberOfMod = dbManager->GetEnvNModules(); - double Zshift = dbManager->GetEnvZShift()*CLHEP::cm; + double Zshift = dbManager->GetEnvZShift()*GeoModelKernelUnits::cm; if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " EnvCounter is " << EnvCounter << " EnvType is " << EnvType - << " Zshift is " << Zshift*(1./CLHEP::cm) << " cm" + << " Zshift is " << Zshift*(1./GeoModelKernelUnits::cm) << " cm" << endmsg; // Central barrel @@ -3047,16 +3049,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) // Top transform for the Central barrel dbManager->SetCurrentEnvByType(1); - HepGeom::Transform3D mz = HepGeom::RotateZ3D(dbManager->GetEnvDPhi()); - HepGeom::Transform3D my = HepGeom::RotateY3D(dbManager->GetEnvDTheta()); - HepGeom::Transform3D mx = HepGeom::RotateZ3D(dbManager->GetEnvDPsi()); - HepGeom::Transform3D vpos = HepGeom::Translate3D(dbManager->GetEnvDX()*CLHEP::cm,dbManager->GetEnvDY()*CLHEP::cm,dbManager->GetEnvDZ()*CLHEP::cm); - GeoTransform* barrelTT = new GeoTransform(HepGeom::Transform3D(vpos*(mx*(my*(mz))))); + GeoTrf::Transform3D mz = GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()); + GeoTrf::Transform3D my = GeoTrf::RotateY3D(dbManager->GetEnvDTheta()); + GeoTrf::Transform3D mx = GeoTrf::RotateZ3D(dbManager->GetEnvDPsi()); + GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->GetEnvDX()*GeoModelKernelUnits::cm,dbManager->GetEnvDY()*GeoModelKernelUnits::cm,dbManager->GetEnvDZ()*GeoModelKernelUnits::cm); + GeoTransform* barrelTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz))))); (*m_log) << MSG::INFO << " Global positioning of barrel with rotation (" << dbManager->GetEnvDPhi() << "," << dbManager->GetEnvDTheta() << "," << dbManager->GetEnvDPsi() << ")" << ") and translation (" << dbManager->GetEnvDX() << "," << dbManager->GetEnvDY() << "," << dbManager->GetEnvDZ() - << ") CLHEP::cm" << endmsg; + << ") GeoModelKernelUnits::cm" << endmsg; world->add(barrelTT); world->add(pvTileEnvelopeBarrel); @@ -3069,16 +3071,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) // Top transform for the Positive endcap dbManager->SetCurrentEnvByType(3); - HepGeom::Transform3D mz = HepGeom::RotateZ3D(dbManager->GetEnvDPhi()); - HepGeom::Transform3D my = HepGeom::RotateY3D(dbManager->GetEnvDTheta()); - HepGeom::Transform3D mx = HepGeom::RotateZ3D(dbManager->GetEnvDPsi()); - HepGeom::Transform3D vpos = HepGeom::Translate3D(dbManager->GetEnvDX()*CLHEP::cm,dbManager->GetEnvDY()*CLHEP::cm,dbManager->GetEnvDZ()*CLHEP::cm); - GeoTransform* posEcTT = new GeoTransform(HepGeom::Transform3D(vpos*(mx*(my*(mz))))); + GeoTrf::Transform3D mz = GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()); + GeoTrf::Transform3D my = GeoTrf::RotateY3D(dbManager->GetEnvDTheta()); + GeoTrf::Transform3D mx = GeoTrf::RotateZ3D(dbManager->GetEnvDPsi()); + GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->GetEnvDX()*GeoModelKernelUnits::cm,dbManager->GetEnvDY()*GeoModelKernelUnits::cm,dbManager->GetEnvDZ()*GeoModelKernelUnits::cm); + GeoTransform* posEcTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz))))); (*m_log) << MSG::INFO << " Global positioning of positive ext.barrel with rotation (" << dbManager->GetEnvDPhi() << "," << dbManager->GetEnvDTheta() << "," << dbManager->GetEnvDPsi() << ")" << ") and translation (" << dbManager->GetEnvDX() << "," << dbManager->GetEnvDY() << "," << dbManager->GetEnvDZ() - << ") CLHEP::cm" << endmsg; + << ") GeoModelKernelUnits::cm" << endmsg; world->add(posEcTT); world->add(pvTileEnvelopePosEndcap); @@ -3091,16 +3093,16 @@ void TileAtlasFactory::create(GeoPhysVol *world) // Top transform for the Negative endcap dbManager->SetCurrentEnvByType(2); - HepGeom::Transform3D mz = HepGeom::RotateZ3D(dbManager->GetEnvDPhi()); - HepGeom::Transform3D my = HepGeom::RotateY3D(dbManager->GetEnvDTheta()); - HepGeom::Transform3D mx = HepGeom::RotateZ3D(dbManager->GetEnvDPsi()); - HepGeom::Transform3D vpos = HepGeom::Translate3D(dbManager->GetEnvDX()*CLHEP::cm,dbManager->GetEnvDY()*CLHEP::cm,dbManager->GetEnvDZ()*CLHEP::cm); - GeoTransform* negEcTT = new GeoTransform(HepGeom::Transform3D(vpos*(mx*(my*(mz))))); + GeoTrf::Transform3D mz = GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()); + GeoTrf::Transform3D my = GeoTrf::RotateY3D(dbManager->GetEnvDTheta()); + GeoTrf::Transform3D mx = GeoTrf::RotateZ3D(dbManager->GetEnvDPsi()); + GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->GetEnvDX()*GeoModelKernelUnits::cm,dbManager->GetEnvDY()*GeoModelKernelUnits::cm,dbManager->GetEnvDZ()*GeoModelKernelUnits::cm); + GeoTransform* negEcTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz))))); (*m_log) << MSG::INFO << " Global positioning of negative ext.barrel with rotation (" << dbManager->GetEnvDPhi() << "," << dbManager->GetEnvDTheta() << "," << dbManager->GetEnvDPsi() << ")" << ") and translation (" << dbManager->GetEnvDX() << "," << dbManager->GetEnvDY() << "," << dbManager->GetEnvDZ() - << ") CLHEP::cm" << endmsg; + << ") GeoModelKernelUnits::cm" << endmsg; world->add(negEcTT); world->add(pvTileEnvelopeNegEndcap); diff --git a/TileCalorimeter/TileGeoModel/src/TileDetectorFactory.cxx b/TileCalorimeter/TileGeoModel/src/TileDetectorFactory.cxx index ba6ed22153b..4764c9b6e23 100755 --- a/TileCalorimeter/TileGeoModel/src/TileDetectorFactory.cxx +++ b/TileCalorimeter/TileGeoModel/src/TileDetectorFactory.cxx @@ -21,9 +21,11 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoSerialIdentifier.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" #include "GeoModelKernel/GeoXF.h" #include "GeoModelKernel/GeoSerialTransformer.h" @@ -35,7 +37,7 @@ #include <stdexcept> #include <iostream> -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; @@ -105,20 +107,20 @@ void TileDetectorFactory::create(GeoPhysVol *world) { // Z planes dbManager->SetCurrentSection(TileDddbManager::TILE_BARREL); - double endCentralBarrel = dbManager->TILBdzmodul()/2.*CLHEP::cm; + double endCentralBarrel = dbManager->TILBdzmodul()/2.*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - //sb double beginITC1 = (dbManager->TILBzoffset() + dbManager->TILEzshift() - dbManager->TILBdzmodul()/2.)*CLHEP::cm; + //sb double beginITC1 = (dbManager->TILBzoffset() + dbManager->TILEzshift() - dbManager->TILBdzmodul()/2.)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - double beginITC2 = (dbManager->TILBzoffset() + dbManager->TILEzshift() - dbManager->TILBdzmodul()/2.)*CLHEP::cm; + double beginITC2 = (dbManager->TILBzoffset() + dbManager->TILEzshift() - dbManager->TILBdzmodul()/2.)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); - double beginCrack = (dbManager->TILBzoffset() + dbManager->TILEzshift() - dbManager->TILBdzmodul()/2.)*CLHEP::cm; - double endCrack = (dbManager->TILBzoffset() + dbManager->TILEzshift() + dbManager->TILBdzmodul()/2.)*CLHEP::cm; + double beginCrack = (dbManager->TILBzoffset() + dbManager->TILEzshift() - dbManager->TILBdzmodul()/2.)*GeoModelKernelUnits::cm; + double endCrack = (dbManager->TILBzoffset() + dbManager->TILEzshift() + dbManager->TILBdzmodul()/2.)*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_EBARREL); - double endExtendedBarrel = (dbManager->TILBzoffset() + dbManager->TILEzshift() + dbManager->TILBdzmodul()/2.)*CLHEP::cm; - double endTile = dbManager->TILEzmam()*CLHEP::cm; + double endExtendedBarrel = (dbManager->TILBzoffset() + dbManager->TILEzshift() + dbManager->TILBdzmodul()/2.)*GeoModelKernelUnits::cm; + double endTile = dbManager->TILEzmam()*GeoModelKernelUnits::cm; dbManager->SetCurrentTifg(1); - double endBarrelFinger = endCentralBarrel + dbManager->TIFGdz()*CLHEP::cm; + double endBarrelFinger = endCentralBarrel + dbManager->TIFGdz()*GeoModelKernelUnits::cm; // Offsets /* sb @@ -130,23 +132,23 @@ void TileDetectorFactory::create(GeoPhysVol *world) // R minimals dbManager->SetCurrentSection(TileDddbManager::TILE_BARREL); - double rminBarrel = dbManager->TILBrminimal()*CLHEP::cm; + double rminBarrel = dbManager->TILBrminimal()*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - double rminITC1 = dbManager->TILBrminimal()*CLHEP::cm; + double rminITC1 = dbManager->TILBrminimal()*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - double rminITC = dbManager->TILBrminimal()*CLHEP::cm; + double rminITC = dbManager->TILBrminimal()*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4); - double rminCrack = dbManager->TILBrminimal()*CLHEP::cm; + double rminCrack = dbManager->TILBrminimal()*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_EBARREL); - double rminExtended = dbManager->TILBrminimal()*CLHEP::cm; - double rminFinger = dbManager->TILBrmax()*CLHEP::cm; + double rminExtended = dbManager->TILBrminimal()*GeoModelKernelUnits::cm; + double rminFinger = dbManager->TILBrmax()*GeoModelKernelUnits::cm; // R maximal - double rmaxTotal = dbManager->TILErmam()*CLHEP::cm; + double rmaxTotal = dbManager->TILErmam()*GeoModelKernelUnits::cm; - GeoPcon* tileEnvPconeBarrel = new GeoPcon(0, 360*CLHEP::deg); - GeoPcon* tileEnvPconePosEndcap = new GeoPcon(0, 360*CLHEP::deg); - GeoPcon* tileEnvPconeNegEndcap = new GeoPcon(0, 360*CLHEP::deg); + GeoPcon* tileEnvPconeBarrel = new GeoPcon(0, 360*GeoModelKernelUnits::deg); + GeoPcon* tileEnvPconePosEndcap = new GeoPcon(0, 360*GeoModelKernelUnits::deg); + GeoPcon* tileEnvPconeNegEndcap = new GeoPcon(0, 360*GeoModelKernelUnits::deg); // Negative Endcap tileEnvPconeNegEndcap->addPlane(-endTile,rminFinger,rmaxTotal); @@ -189,13 +191,13 @@ void TileDetectorFactory::create(GeoPhysVol *world) pvTileEnvelopeNegEndcap = new GeoPhysVol(lvTileEnvelopeNegEndcap); /* - const GeoShape& bbqEnvelope = ((*tileEnvPconeBarrel)<<HepGeom::TranslateX3D(1000.)). - add(((*tileEnvPconePosEndcap)<<HepGeom::TranslateZ3D(0.))). - add(((*tileEnvPconeNegEndcap)<<HepGeom::TranslateZ3D(0.))); + const GeoShape& bbqEnvelope = ((*tileEnvPconeBarrel)<<GeoTrf::TranslateX3D(1000.)). + add(((*tileEnvPconePosEndcap)<<GeoTrf::TranslateZ3D(0.))). + add(((*tileEnvPconeNegEndcap)<<GeoTrf::TranslateZ3D(0.))); lvTileEnvelope = new GeoLogVol("Tile",&bbqEnvelope,matAir); pvTileEnvelope = new GeoPhysVol(lvTileEnvelope); - pvTileEnvelope->add(new GeoTransform(HepGeom::TranslateX3D(1000.))); + pvTileEnvelope->add(new GeoTransform(GeoTrf::TranslateX3D(1000.))); pvTileEnvelope->add(pvTileEnvelopeBarrel); pvTileEnvelope->add(pvTileEnvelopePosEndcap); pvTileEnvelope->add(pvTileEnvelopeNegEndcap); @@ -207,17 +209,17 @@ void TileDetectorFactory::create(GeoPhysVol *world) dbManager->SetCurrentTifg(1); // Z planes - double endCentralBarrel = dbManager->TILBdzmodul()/2.*CLHEP::cm; - double endEnvelope = endCentralBarrel + dbManager->TIFGdz()*CLHEP::cm; + double endCentralBarrel = dbManager->TILBdzmodul()/2.*GeoModelKernelUnits::cm; + double endEnvelope = endCentralBarrel + dbManager->TIFGdz()*GeoModelKernelUnits::cm; // R minimals - double rminBarrel = dbManager->TILBrminimal()*CLHEP::cm; - double rminFinger = dbManager->TILBrmax()*CLHEP::cm; + double rminBarrel = dbManager->TILBrminimal()*GeoModelKernelUnits::cm; + double rminFinger = dbManager->TILBrmax()*GeoModelKernelUnits::cm; // R maximal - double rmaxTotal = dbManager->TILErmam()*CLHEP::cm; + double rmaxTotal = dbManager->TILErmam()*GeoModelKernelUnits::cm; - GeoPcon* tileEnvPconeBarrel = new GeoPcon(0, 360*CLHEP::deg); + GeoPcon* tileEnvPconeBarrel = new GeoPcon(0, 360*GeoModelKernelUnits::deg); tileEnvPconeBarrel->addPlane(-endEnvelope,rminFinger,rmaxTotal); tileEnvPconeBarrel->addPlane(-endCentralBarrel,rminFinger,rmaxTotal); tileEnvPconeBarrel->addPlane(-endCentralBarrel,rminBarrel,rmaxTotal); @@ -235,7 +237,7 @@ void TileDetectorFactory::create(GeoPhysVol *world) double deltaPhi = 360./dbManager->TILEnmodul(); Variable varInd; - GENFUNCTION phiInd = deltaPhi*(varInd+0.5)*CLHEP::deg; + GENFUNCTION phiInd = deltaPhi*(varInd+0.5)*GeoModelKernelUnits::deg; //------------------------------- B A R R E L -------------------------------------- // Tube - barrel mother @@ -243,18 +245,18 @@ void TileDetectorFactory::create(GeoPhysVol *world) if(dbManager->SetCurrentSection(TileDddbManager::TILE_BARREL)) { - GeoTube* barrelMother = new GeoTube(dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILErmam()*CLHEP::cm, - dbManager->TILBdzmodul()/2.*CLHEP::cm); + GeoTube* barrelMother = new GeoTube(dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILErmam()*GeoModelKernelUnits::cm, + dbManager->TILBdzmodul()/2.*GeoModelKernelUnits::cm); GeoLogVol* lvBarrelMother = new GeoLogVol("Barrel",barrelMother,matAir); GeoFullPhysVol* pvBarrelMother = new GeoFullPhysVol(lvBarrelMother); // Trd - module mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - (dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()) - dbManager->TILBdzmast()))/(2.*(2.*dbManager->TILBnperiod() - 1)); @@ -280,9 +282,9 @@ void TileDetectorFactory::create(GeoPhysVol *world) { phi = j*deltaPhi; - GeoTransform* zrotateMod = new GeoTransform(HepGeom::RotateZ3D(phi*CLHEP::deg)); - GeoTransform* xtransMod = new GeoTransform(HepGeom::TranslateX3D((dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2. * cm)); - GeoTransform* yrotateMod = new GeoTransform(HepGeom::RotateY3D(90*CLHEP::deg)); + GeoTransform* zrotateMod = new GeoTransform(GeoTrf::RotateZ3D(phi*GeoModelKernelUnits::deg)); + GeoTransform* xtransMod = new GeoTransform(GeoTrf::TranslateX3D((dbManager->TILBrmaximal() + dbManager->TILBrminimal())/2. * cm)); + GeoTransform* yrotateMod = new GeoTransform(GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)); pvBarrelMother->add(zrotateMod); pvBarrelMother->add(xtransMod); @@ -292,7 +294,7 @@ void TileDetectorFactory::create(GeoPhysVol *world) */ // --- Using the parameterization ----- - TRANSFUNCTION xfBarrelModuleMother = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfBarrelModuleMother = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stBarrelModuleMother = new GeoSerialTransformer(pvBarrelModuleMother, &xfBarrelModuleMother, dbManager->TILEnmodul()); @@ -312,7 +314,7 @@ void TileDetectorFactory::create(GeoPhysVol *world) { dbManager->SetCurrentEnvByType(1); nModules=dbManager->GetEnvNModules(); - zShift=dbManager->GetEnvZShift()*CLHEP::cm; + zShift=dbManager->GetEnvZShift()*GeoModelKernelUnits::cm; sectionBuilder->computeCellDim(m_detectorManager, TILE_REGION_CENTRAL, @@ -367,19 +369,19 @@ void TileDetectorFactory::create(GeoPhysVol *world) if(dbManager->SetCurrentSection(TileDddbManager::TILE_EBARREL)) { - GeoTube* ebarrelMother = new GeoTube(dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILErmam()*CLHEP::cm, - dbManager->TILBdzmodul()/2.*CLHEP::cm); + GeoTube* ebarrelMother = new GeoTube(dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILErmam()*GeoModelKernelUnits::cm, + dbManager->TILBdzmodul()/2.*GeoModelKernelUnits::cm); GeoLogVol* lvEBarrelMother = new GeoLogVol("EBarrel",ebarrelMother,matAir); GeoFullPhysVol* pvEBarrelMotherPos = new GeoFullPhysVol(lvEBarrelMother); GeoFullPhysVol* pvEBarrelMotherNeg = new GeoFullPhysVol(lvEBarrelMother); // Trd - module mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.*dbManager->TILBnperiod()); @@ -401,8 +403,8 @@ void TileDetectorFactory::create(GeoPhysVol *world) deltaPhi); // --- Position N modules inside mother (positive/negative) ----- - TRANSFUNCTION xfEBarrelModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xfEBarrelModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfEBarrelModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xfEBarrelModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stEBarrelModuleMotherPos = new GeoSerialTransformer(pvEBarrelModuleMother, &xfEBarrelModuleMotherPos, @@ -420,14 +422,14 @@ void TileDetectorFactory::create(GeoPhysVol *world) pvEBarrelMotherNeg->add(stEBarrelModuleMotherNeg); - GeoTransform* tfEBarrelMotherPos = new GeoTransform(HepGeom::TranslateZ3D((dbManager->TILBzoffset()+dbManager->TILEzshift())*CLHEP::cm)); + GeoTransform* tfEBarrelMotherPos = new GeoTransform(GeoTrf::TranslateZ3D((dbManager->TILBzoffset()+dbManager->TILEzshift())*GeoModelKernelUnits::cm)); GeoNameTag* ntEBarrelMotherPos = new GeoNameTag("TileEBarrelPos"); pvTileEnvelopePosEndcap->add(tfEBarrelMotherPos); pvTileEnvelopePosEndcap->add(ntEBarrelMotherPos); pvTileEnvelopePosEndcap->add(pvEBarrelMotherPos); - GeoTransform* tfEBarrelMotherNeg = new GeoTransform(HepGeom::TranslateZ3D((-dbManager->TILBzoffset()-dbManager->TILEzshift())*CLHEP::cm)); + GeoTransform* tfEBarrelMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D((-dbManager->TILBzoffset()-dbManager->TILEzshift())*GeoModelKernelUnits::cm)); GeoNameTag* ntEBarrelMotherNeg = new GeoNameTag("TileEBarrelNeg"); pvTileEnvelopeNegEndcap->add(tfEBarrelMotherNeg); pvTileEnvelopeNegEndcap->add(ntEBarrelMotherNeg); @@ -441,10 +443,10 @@ void TileDetectorFactory::create(GeoPhysVol *world) { dbManager->SetCurrentEnvByType(2); nModulesNeg=dbManager->GetEnvNModules(); - zShiftNeg=dbManager->GetEnvZShift()*CLHEP::cm; + zShiftNeg=dbManager->GetEnvZShift()*GeoModelKernelUnits::cm; dbManager->SetCurrentEnvByType(3); nModulesPos=dbManager->GetEnvNModules(); - zShiftPos=dbManager->GetEnvZShift()*CLHEP::cm; + zShiftPos=dbManager->GetEnvZShift()*GeoModelKernelUnits::cm; sectionBuilder->computeCellDim(m_detectorManager, TILE_REGION_EXTENDED, @@ -454,7 +456,7 @@ void TileDetectorFactory::create(GeoPhysVol *world) } else { nModulesPos=nModulesNeg=dbManager->TILEnmodul(); - zShiftPos=zShiftNeg=dbManager->TILEzshift()*CLHEP::cm; + zShiftPos=zShiftNeg=dbManager->TILEzshift()*GeoModelKernelUnits::cm; // do not compute cell volumes for old setups (before DC3), // because cell-size table might be missing in DB } @@ -505,13 +507,13 @@ void TileDetectorFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - GeoTube* itcWheel1 = new GeoTube(dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILErmam()*CLHEP::cm, - dbManager->TILBdzmodul()/2.*CLHEP::cm); + GeoTube* itcWheel1 = new GeoTube(dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILErmam()*GeoModelKernelUnits::cm, + dbManager->TILBdzmodul()/2.*GeoModelKernelUnits::cm); - GeoTube* itcWheel2 = new GeoTube(rMinITC2*CLHEP::cm,rMaxITC2*CLHEP::cm,dzITC2/2.*CLHEP::cm); - HepGeom::Translate3D itcWheel2OffsetPos(0.,0.,(dbManager->TILBdzmodul()-dzITC2)/2*CLHEP::cm); - HepGeom::Translate3D itcWheel2OffsetNeg(0.,0.,(-dbManager->TILBdzmodul()+dzITC2)/2*CLHEP::cm); + GeoTube* itcWheel2 = new GeoTube(rMinITC2*GeoModelKernelUnits::cm,rMaxITC2*GeoModelKernelUnits::cm,dzITC2/2.*GeoModelKernelUnits::cm); + GeoTrf::Translate3D itcWheel2OffsetPos(0.,0.,(dbManager->TILBdzmodul()-dzITC2)/2*GeoModelKernelUnits::cm); + GeoTrf::Translate3D itcWheel2OffsetNeg(0.,0.,(-dbManager->TILBdzmodul()+dzITC2)/2*GeoModelKernelUnits::cm); const GeoShapeUnion& itcMotherPos = itcWheel1->add(*itcWheel2<<itcWheel2OffsetPos); const GeoShapeUnion& itcMotherNeg = itcWheel1->add(*itcWheel2<<itcWheel2OffsetNeg); @@ -525,10 +527,10 @@ void TileDetectorFactory::create(GeoPhysVol *world) // Common mother for ITC1/2 modules // -- first sub shape - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal()* tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal()* tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal()* tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal()* tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* itcModuleSub1 = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -537,10 +539,10 @@ void TileDetectorFactory::create(GeoPhysVol *world) heightWedgeMother/2.); // -- second sub shape - thicknessWedgeMother = dzITC2 * CLHEP::cm; - heightWedgeMother = (rMaxITC2 - rMinITC2) * CLHEP::cm; - dy1WedgeMother = rMinITC2* tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = rMaxITC2* tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dzITC2 * GeoModelKernelUnits::cm; + heightWedgeMother = (rMaxITC2 - rMinITC2) * GeoModelKernelUnits::cm; + dy1WedgeMother = rMinITC2* tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = rMaxITC2* tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* itcModuleSub2 = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -548,9 +550,9 @@ void TileDetectorFactory::create(GeoPhysVol *world) dy2WedgeMother, heightWedgeMother/2.); - HepGeom::Translate3D itcModuleSubShift ((dbManager->TILBdzmodul()-dzITC2)/2*CLHEP::cm, + GeoTrf::Translate3D itcModuleSubShift ((dbManager->TILBdzmodul()-dzITC2)/2*GeoModelKernelUnits::cm, 0., - ((rMinITC2+rMaxITC2)-(dbManager->TILBrmaximal()+dbManager->TILBrminimal()))/2.*CLHEP::cm); + ((rMinITC2+rMaxITC2)-(dbManager->TILBrmaximal()+dbManager->TILBrminimal()))/2.*GeoModelKernelUnits::cm); const GeoShapeUnion& itcModuleMother = itcModuleSub1->add(*itcModuleSub2<<itcModuleSubShift); @@ -563,10 +565,10 @@ void TileDetectorFactory::create(GeoPhysVol *world) // 2. Mother for frontplate (since it's short) //First submother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrmin()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrmin()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.*dbManager->TILBnperiod()); @@ -577,10 +579,10 @@ void TileDetectorFactory::create(GeoPhysVol *world) heightWedgeMother/2.); //Second submother - thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2) * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2) * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* plug2SubMother = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -588,9 +590,9 @@ void TileDetectorFactory::create(GeoPhysVol *world) dy2WedgeMother, heightWedgeMother/2.); - HepGeom::Translate3D plug1SubOffset(-dzITC2*CLHEP::cm/2., + GeoTrf::Translate3D plug1SubOffset(-dzITC2*GeoModelKernelUnits::cm/2., 0., - (dbManager->TILBrminimal()-dbManager->TILBrmaximal())*CLHEP::cm/2.); + (dbManager->TILBrminimal()-dbManager->TILBrmaximal())*GeoModelKernelUnits::cm/2.); const GeoShapeUnion& plug1ModuleMother = plug1SubMother->add(*plug2SubMother<<plug1SubOffset); GeoLogVol* lvPlug1ModuleMother = new GeoLogVol("Plug1Module",&plug1ModuleMother,matAir); @@ -604,9 +606,9 @@ void TileDetectorFactory::create(GeoPhysVol *world) deltaPhi, ModuleNcp, dzITC2); - GeoTransform* tfPlug1ModuleMother = new GeoTransform(HepGeom::Translate3D(0., + GeoTransform* tfPlug1ModuleMother = new GeoTransform(GeoTrf::Translate3D(0., 0., - (dbManager->TILBrmin()-dbManager->TILBrminimal())*CLHEP::cm/2.)); + (dbManager->TILBrmin()-dbManager->TILBrminimal())*GeoModelKernelUnits::cm/2.)); pvITCModuleMother->add(tfPlug1ModuleMother); pvITCModuleMother->add(pvPlug1ModuleMother); @@ -614,10 +616,10 @@ void TileDetectorFactory::create(GeoPhysVol *world) //Mother volume for ITC2 dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - ((dbManager->TILBnperiod()-1)*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()) + dbManager->TILBdzspac()))/(4.*(dbManager->TILBnperiod() - 1)); @@ -646,8 +648,8 @@ void TileDetectorFactory::create(GeoPhysVol *world) pvITCModuleMother->add(pvPlug2ModuleMother); // --- Position N modules inside mother (positive/negative) ----- - TRANSFUNCTION xfITCModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xfITCModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfITCModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xfITCModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stITCModuleMotherPos = new GeoSerialTransformer(pvITCModuleMother, &xfITCModuleMotherPos, @@ -662,14 +664,14 @@ void TileDetectorFactory::create(GeoPhysVol *world) pvITCMotherNeg->add(stITCModuleMotherNeg); - GeoTransform* tfITCMotherPos = new GeoTransform(HepGeom::TranslateZ3D((dbManager->TILBzoffset()+dbManager->TILEzshift())*CLHEP::cm)); + GeoTransform* tfITCMotherPos = new GeoTransform(GeoTrf::TranslateZ3D((dbManager->TILBzoffset()+dbManager->TILEzshift())*GeoModelKernelUnits::cm)); GeoNameTag* ntITCMotherPos = new GeoNameTag("TileITCPos"); pvTileEnvelopePosEndcap->add(tfITCMotherPos); pvTileEnvelopePosEndcap->add(ntITCMotherPos); pvTileEnvelopePosEndcap->add(pvITCMotherPos); - GeoTransform* tfITCMotherNeg = new GeoTransform(HepGeom::TranslateZ3D((-dbManager->TILBzoffset()-dbManager->TILEzshift())*CLHEP::cm)); + GeoTransform* tfITCMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D((-dbManager->TILBzoffset()-dbManager->TILEzshift())*GeoModelKernelUnits::cm)); GeoNameTag* ntITCMotherNeg = new GeoNameTag("TileITCNeg"); pvTileEnvelopeNegEndcap->add(tfITCMotherNeg); pvTileEnvelopeNegEndcap->add(ntITCMotherNeg); @@ -680,19 +682,19 @@ void TileDetectorFactory::create(GeoPhysVol *world) if(dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG3)) { - GeoTube* gapMother = new GeoTube(dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2.*CLHEP::deg), - dbManager->TILBdzmodul()/2.*CLHEP::cm); + GeoTube* gapMother = new GeoTube(dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2.*GeoModelKernelUnits::deg), + dbManager->TILBdzmodul()/2.*GeoModelKernelUnits::cm); GeoLogVol* lvGapMother = new GeoLogVol("Gap",gapMother,matAir); GeoFullPhysVol* pvGapMotherPos = new GeoFullPhysVol(lvGapMother); GeoFullPhysVol* pvGapMotherNeg = new GeoFullPhysVol(lvGapMother); // Trd - module mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = 0.; @@ -714,8 +716,8 @@ void TileDetectorFactory::create(GeoPhysVol *world) deltaPhi); // --- Position N modules inside mother (positive/negative) ----- - TRANSFUNCTION xfGapModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xfGapModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfGapModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xfGapModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stGapModuleMotherPos = new GeoSerialTransformer(pvGapModuleMother, &xfGapModuleMotherPos, @@ -730,14 +732,14 @@ void TileDetectorFactory::create(GeoPhysVol *world) pvGapMotherNeg->add(stGapModuleMotherNeg); - GeoTransform* tfGapMotherPos = new GeoTransform(HepGeom::TranslateZ3D((dbManager->TILBzoffset()+dbManager->TILEzshift())*CLHEP::cm)); + GeoTransform* tfGapMotherPos = new GeoTransform(GeoTrf::TranslateZ3D((dbManager->TILBzoffset()+dbManager->TILEzshift())*GeoModelKernelUnits::cm)); GeoNameTag* ntGapMotherPos = new GeoNameTag("TileGapPos"); pvTileEnvelopePosEndcap->add(tfGapMotherPos); pvTileEnvelopePosEndcap->add(ntGapMotherPos); pvTileEnvelopePosEndcap->add(pvGapMotherPos); - GeoTransform* tfGapMotherNeg = new GeoTransform(HepGeom::TranslateZ3D((-dbManager->TILBzoffset()-dbManager->TILEzshift())*CLHEP::cm)); + GeoTransform* tfGapMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D((-dbManager->TILBzoffset()-dbManager->TILEzshift())*GeoModelKernelUnits::cm)); GeoNameTag* ntGapMotherNeg = new GeoNameTag("TileGapNeg"); pvTileEnvelopeNegEndcap->add(tfGapMotherNeg); pvTileEnvelopeNegEndcap->add(ntGapMotherNeg); @@ -748,10 +750,10 @@ void TileDetectorFactory::create(GeoPhysVol *world) { dbManager->SetCurrentEnvByType(4); nModulesNeg=dbManager->GetEnvNModules(); - zShiftNeg=dbManager->GetEnvZShift()*CLHEP::cm; + zShiftNeg=dbManager->GetEnvZShift()*GeoModelKernelUnits::cm; dbManager->SetCurrentEnvByType(5); nModulesPos=dbManager->GetEnvNModules(); - zShiftPos=dbManager->GetEnvZShift()*CLHEP::cm; + zShiftPos=dbManager->GetEnvZShift()*GeoModelKernelUnits::cm; sectionBuilder->computeCellDim(m_detectorManager, TILE_REGION_GAP, @@ -761,7 +763,7 @@ void TileDetectorFactory::create(GeoPhysVol *world) } else { nModulesPos=nModulesNeg=dbManager->TILEnmodul(); - zShiftPos=zShiftNeg=dbManager->TILEzshift()*CLHEP::cm; + zShiftPos=zShiftNeg=dbManager->TILEzshift()*GeoModelKernelUnits::cm; // do not compute cell volumes for old setups (before DC3), // because cell-size table might be missing in DB } @@ -805,19 +807,19 @@ void TileDetectorFactory::create(GeoPhysVol *world) if(dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG4)) { - GeoTube* crackMother = new GeoTube(dbManager->TILBrminimal()*CLHEP::cm, - dbManager->TILBrmaximal()*CLHEP::cm/cos(deltaPhi/2.*CLHEP::deg), - dbManager->TILBdzmodul()/2.*CLHEP::cm); + GeoTube* crackMother = new GeoTube(dbManager->TILBrminimal()*GeoModelKernelUnits::cm, + dbManager->TILBrmaximal()*GeoModelKernelUnits::cm/cos(deltaPhi/2.*GeoModelKernelUnits::deg), + dbManager->TILBdzmodul()/2.*GeoModelKernelUnits::cm); GeoLogVol* lvCrackMother = new GeoLogVol("Crack",crackMother,matAir); GeoFullPhysVol* pvCrackMotherPos = new GeoFullPhysVol(lvCrackMother); GeoFullPhysVol* pvCrackMotherNeg = new GeoFullPhysVol(lvCrackMother); // Trd - module mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = 0.; @@ -839,8 +841,8 @@ void TileDetectorFactory::create(GeoPhysVol *world) deltaPhi); // --- Position N modules inside mother (positive/negative) ----- - TRANSFUNCTION xfCrackModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xfCrackModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfCrackModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xfCrackModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stCrackModuleMotherPos = new GeoSerialTransformer(pvCrackModuleMother, &xfCrackModuleMotherPos, @@ -855,14 +857,14 @@ void TileDetectorFactory::create(GeoPhysVol *world) pvCrackMotherNeg->add(stCrackModuleMotherNeg); - GeoTransform* tfCrackMotherPos = new GeoTransform(HepGeom::TranslateZ3D((dbManager->TILBzoffset()+dbManager->TILEzshift())*CLHEP::cm)); + GeoTransform* tfCrackMotherPos = new GeoTransform(GeoTrf::TranslateZ3D((dbManager->TILBzoffset()+dbManager->TILEzshift())*GeoModelKernelUnits::cm)); GeoNameTag* ntCrackMotherPos = new GeoNameTag("TileCrackPos"); pvTileEnvelopePosEndcap->add(tfCrackMotherPos); pvTileEnvelopePosEndcap->add(ntCrackMotherPos); pvTileEnvelopePosEndcap->add(pvCrackMotherPos); - GeoTransform* tfCrackMotherNeg = new GeoTransform(HepGeom::TranslateZ3D((-dbManager->TILBzoffset()-dbManager->TILEzshift())*CLHEP::cm)); + GeoTransform* tfCrackMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D((-dbManager->TILBzoffset()-dbManager->TILEzshift())*GeoModelKernelUnits::cm)); GeoNameTag* ntCrackMotherNeg = new GeoNameTag("TileCrackNeg"); pvTileEnvelopeNegEndcap->add(tfCrackMotherNeg); pvTileEnvelopeNegEndcap->add(ntCrackMotherNeg); @@ -880,9 +882,9 @@ void TileDetectorFactory::create(GeoPhysVol *world) zEndSection = dbManager->TILBzoffset() + dbManager->TILBdzmodul()/2.; - GeoTube* fingerMother = new GeoTube(dbManager->TILBrmax()*CLHEP::cm, - dbManager->TILErmam()*CLHEP::cm, - dbManager->TIFGdz()/2.*CLHEP::cm); + GeoTube* fingerMother = new GeoTube(dbManager->TILBrmax()*GeoModelKernelUnits::cm, + dbManager->TILErmam()*GeoModelKernelUnits::cm, + dbManager->TIFGdz()/2.*GeoModelKernelUnits::cm); GeoLogVol* lvFingerMother = new GeoLogVol("Finger",fingerMother,matAir); GeoFullPhysVol* pvFingerMotherPos = new GeoFullPhysVol(lvFingerMother); @@ -890,14 +892,14 @@ void TileDetectorFactory::create(GeoPhysVol *world) // Trd - one finger mother // if(dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1)) - // thicknessWedgeMother = (dbManager->TILBzoffset() - dbManager->TILBdzmodul()/2. + dbManager->TILEzshift() - zEndSection) * CLHEP::cm; + // thicknessWedgeMother = (dbManager->TILBzoffset() - dbManager->TILBdzmodul()/2. + dbManager->TILEzshift() - zEndSection) * GeoModelKernelUnits::cm; // else - thicknessWedgeMother = dbManager->TIFGdz()*CLHEP::cm; + thicknessWedgeMother = dbManager->TIFGdz()*GeoModelKernelUnits::cm; dbManager->SetCurrentSection(TileDddbManager::TILE_BARREL); - heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* fingerModuleMother = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -915,11 +917,11 @@ void TileDetectorFactory::create(GeoPhysVol *world) deltaPhi, m_testbeamGeometry, ModuleNcp, - thicknessWedgeMother*(1./CLHEP::cm)); + thicknessWedgeMother*(1./GeoModelKernelUnits::cm)); // --- Position N modules inside mother (positive/negative) ----- - TRANSFUNCTION xfFingerModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xfFingerModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfFingerModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xfFingerModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stFingerModuleMotherPos = new GeoSerialTransformer(pvFingerModuleMother, &xfFingerModuleMotherPos, @@ -935,14 +937,14 @@ void TileDetectorFactory::create(GeoPhysVol *world) pvFingerMotherNeg->add(stFingerModuleMotherNeg); - GeoTransform* tfFingerMotherPos = new GeoTransform(HepGeom::TranslateZ3D((zEndSection+dbManager->TIFGdz()/2.)*CLHEP::cm)); + GeoTransform* tfFingerMotherPos = new GeoTransform(GeoTrf::TranslateZ3D((zEndSection+dbManager->TIFGdz()/2.)*GeoModelKernelUnits::cm)); GeoNameTag* ntFingerMotherPos = new GeoNameTag("TileFingerPos"); pvTileEnvelopeBarrel->add(tfFingerMotherPos); pvTileEnvelopeBarrel->add(ntFingerMotherPos); pvTileEnvelopeBarrel->add(pvFingerMotherPos); - GeoTransform* tfFingerMotherNeg = new GeoTransform(HepGeom::TranslateZ3D((-zEndSection-dbManager->TIFGdz()/2.)*CLHEP::cm)); + GeoTransform* tfFingerMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D((-zEndSection-dbManager->TIFGdz()/2.)*GeoModelKernelUnits::cm)); GeoNameTag* ntFingerMotherNeg = new GeoNameTag("TileFingerNeg"); pvTileEnvelopeBarrel->add(tfFingerMotherNeg); pvTileEnvelopeBarrel->add(ntFingerMotherNeg); @@ -958,19 +960,19 @@ void TileDetectorFactory::create(GeoPhysVol *world) zEndSection = dbManager->TILBzoffset() + dbManager->TILBdzmodul()/2. + dbManager->TILEzshift(); - GeoTube* efingerMother = new GeoTube(dbManager->TILBrmax()*CLHEP::cm, - dbManager->TILErmam()*CLHEP::cm, - dbManager->TIFGdz()/2.*CLHEP::cm); + GeoTube* efingerMother = new GeoTube(dbManager->TILBrmax()*GeoModelKernelUnits::cm, + dbManager->TILErmam()*GeoModelKernelUnits::cm, + dbManager->TIFGdz()/2.*GeoModelKernelUnits::cm); GeoLogVol* lvEFingerMother = new GeoLogVol("EFinger",efingerMother,matAir); GeoFullPhysVol* pvEFingerMotherPos = new GeoFullPhysVol(lvEFingerMother); GeoFullPhysVol* pvEFingerMotherNeg = new GeoFullPhysVol(lvEFingerMother); // Trd - one finger mother - thicknessWedgeMother = dbManager->TIFGdz() * CLHEP::cm; - heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TIFGdz() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* efingerModuleMother = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -990,8 +992,8 @@ void TileDetectorFactory::create(GeoPhysVol *world) m_testbeamGeometry); // --- Position N modules inside mother (positive/negative) ----- - TRANSFUNCTION xfEFingerModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); - TRANSFUNCTION xfEFingerModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfEFingerModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); + TRANSFUNCTION xfEFingerModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stEFingerModuleMotherPos = new GeoSerialTransformer(pvEFingerModuleMother, &xfEFingerModuleMotherPos, @@ -1006,14 +1008,14 @@ void TileDetectorFactory::create(GeoPhysVol *world) pvEFingerMotherNeg->add(stEFingerModuleMotherNeg); - GeoTransform* tfEFingerMotherPos = new GeoTransform(HepGeom::TranslateZ3D((zEndSection+dbManager->TIFGdz()/2.)*CLHEP::cm)); + GeoTransform* tfEFingerMotherPos = new GeoTransform(GeoTrf::TranslateZ3D((zEndSection+dbManager->TIFGdz()/2.)*GeoModelKernelUnits::cm)); GeoNameTag* ntEFingerMotherPos = new GeoNameTag("TileEFingerPos"); pvTileEnvelopePosEndcap->add(tfEFingerMotherPos); pvTileEnvelopePosEndcap->add(ntEFingerMotherPos); pvTileEnvelopePosEndcap->add(pvEFingerMotherPos); - GeoTransform* tfEFingerMotherNeg = new GeoTransform(HepGeom::TranslateZ3D((-zEndSection-dbManager->TIFGdz()/2.)*CLHEP::cm)); + GeoTransform* tfEFingerMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D((-zEndSection-dbManager->TIFGdz()/2.)*GeoModelKernelUnits::cm)); GeoNameTag* ntEFingerMotherNeg = new GeoNameTag("TileEFingerNeg"); pvTileEnvelopeNegEndcap->add(tfEFingerMotherNeg); pvTileEnvelopeNegEndcap->add(ntEFingerMotherNeg); @@ -1031,11 +1033,11 @@ void TileDetectorFactory::create(GeoPhysVol *world) { // Top transform for the central barrel dbManager->SetCurrentEnvByType(1); - HepGeom::Transform3D mz = HepGeom::RotateZ3D(dbManager->GetEnvDPhi()); - HepGeom::Transform3D my = HepGeom::RotateY3D(dbManager->GetEnvDTheta()); - HepGeom::Transform3D mx = HepGeom::RotateZ3D(dbManager->GetEnvDPsi()); - HepGeom::Transform3D vpos = HepGeom::Translate3D(dbManager->GetEnvDX()*CLHEP::cm,dbManager->GetEnvDY()*CLHEP::cm,dbManager->GetEnvDZ()*CLHEP::cm); - GeoTransform* barrelTT = new GeoTransform(HepGeom::Transform3D(vpos*(mx*(my*(mz))))); + GeoTrf::Transform3D mz = GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()); + GeoTrf::Transform3D my = GeoTrf::RotateY3D(dbManager->GetEnvDTheta()); + GeoTrf::Transform3D mx = GeoTrf::RotateZ3D(dbManager->GetEnvDPsi()); + GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->GetEnvDX()*GeoModelKernelUnits::cm,dbManager->GetEnvDY()*GeoModelKernelUnits::cm,dbManager->GetEnvDZ()*GeoModelKernelUnits::cm); + GeoTransform* barrelTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz))))); world->add(barrelTT); } @@ -1051,11 +1053,11 @@ void TileDetectorFactory::create(GeoPhysVol *world) { // Top transform for the positive endcap dbManager->SetCurrentEnvByType(3); - HepGeom::Transform3D mz = HepGeom::RotateZ3D(dbManager->GetEnvDPhi()); - HepGeom::Transform3D my = HepGeom::RotateY3D(dbManager->GetEnvDTheta()); - HepGeom::Transform3D mx = HepGeom::RotateZ3D(dbManager->GetEnvDPsi()); - HepGeom::Transform3D vpos = HepGeom::Translate3D(dbManager->GetEnvDX()*CLHEP::cm,dbManager->GetEnvDY()*CLHEP::cm,dbManager->GetEnvDZ()*CLHEP::cm); - GeoTransform* posEcTT = new GeoTransform(HepGeom::Transform3D(vpos*(mx*(my*(mz))))); + GeoTrf::Transform3D mz = GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()); + GeoTrf::Transform3D my = GeoTrf::RotateY3D(dbManager->GetEnvDTheta()); + GeoTrf::Transform3D mx = GeoTrf::RotateZ3D(dbManager->GetEnvDPsi()); + GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->GetEnvDX()*GeoModelKernelUnits::cm,dbManager->GetEnvDY()*GeoModelKernelUnits::cm,dbManager->GetEnvDZ()*GeoModelKernelUnits::cm); + GeoTransform* posEcTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz))))); world->add(posEcTT); } @@ -1071,11 +1073,11 @@ void TileDetectorFactory::create(GeoPhysVol *world) { // Top transform for the positive endcap dbManager->SetCurrentEnvByType(2); - HepGeom::Transform3D mz = HepGeom::RotateZ3D(dbManager->GetEnvDPhi()); - HepGeom::Transform3D my = HepGeom::RotateY3D(dbManager->GetEnvDTheta()); - HepGeom::Transform3D mx = HepGeom::RotateZ3D(dbManager->GetEnvDPsi()); - HepGeom::Transform3D vpos = HepGeom::Translate3D(dbManager->GetEnvDX()*CLHEP::cm,dbManager->GetEnvDY()*CLHEP::cm,dbManager->GetEnvDZ()*CLHEP::cm); - GeoTransform* negEcTT = new GeoTransform(HepGeom::Transform3D(vpos*(mx*(my*(mz))))); + GeoTrf::Transform3D mz = GeoTrf::RotateZ3D(dbManager->GetEnvDPhi()); + GeoTrf::Transform3D my = GeoTrf::RotateY3D(dbManager->GetEnvDTheta()); + GeoTrf::Transform3D mx = GeoTrf::RotateZ3D(dbManager->GetEnvDPsi()); + GeoTrf::Transform3D vpos = GeoTrf::Translate3D(dbManager->GetEnvDX()*GeoModelKernelUnits::cm,dbManager->GetEnvDY()*GeoModelKernelUnits::cm,dbManager->GetEnvDZ()*GeoModelKernelUnits::cm); + GeoTransform* negEcTT = new GeoTransform(GeoTrf::Transform3D(vpos*(mx*(my*(mz))))); world->add(negEcTT); } diff --git a/TileCalorimeter/TileGeoModel/src/TileGeoCutBuilder.cxx b/TileCalorimeter/TileGeoModel/src/TileGeoCutBuilder.cxx index be22d9e39f4..d7237e3e504 100755 --- a/TileCalorimeter/TileGeoModel/src/TileGeoCutBuilder.cxx +++ b/TileCalorimeter/TileGeoModel/src/TileGeoCutBuilder.cxx @@ -19,9 +19,11 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" #include "GeoModelKernel/GeoXF.h" #include "GeoModelKernel/GeoSerialTransformer.h" @@ -54,7 +56,7 @@ void TileGeoCutBuilder::MakeCut(GeoPhysVol*& mother, const GeoMaterial* matIron = theMaterialManager->getMaterial("std::Iron"); */ - GeoTransform* tfTmp = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + GeoTransform* tfTmp = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); mother->add(tfTmp); (*m_log) << MSG::INFO <<" MakeCut : number= "<<number<<endmsg; diff --git a/TileCalorimeter/TileGeoModel/src/TileGeoSectionBuilder.cxx b/TileCalorimeter/TileGeoModel/src/TileGeoSectionBuilder.cxx index 8bfaf005485..d88faeba510 100755 --- a/TileCalorimeter/TileGeoModel/src/TileGeoSectionBuilder.cxx +++ b/TileCalorimeter/TileGeoModel/src/TileGeoSectionBuilder.cxx @@ -21,14 +21,16 @@ #include "GeoModelKernel/GeoTransform.h" #include "GeoModelKernel/GeoSerialIdentifier.h" #include "GeoModelKernel/GeoIdentifierTag.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoShapeSubtraction.h" #include "GeoModelKernel/GeoCutVolAction.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" #include "GeoModelKernel/GeoXF.h" #include "GeoModelKernel/GeoSerialTransformer.h" @@ -43,7 +45,7 @@ #include <assert.h> -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; TileGeoSectionBuilder::TileGeoSectionBuilder(const StoredMaterialManager* matManager, @@ -84,7 +86,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, { (*m_log) << MSG::VERBOSE <<" TileGeoSectionBuilder::fillSection ModuleNcp= "<<ModuleNcp<< endmsg; - double tan_delta_phi_2 = tan(delta_phi/2*CLHEP::deg); + double tan_delta_phi_2 = tan(delta_phi/2*GeoModelKernelUnits::deg); // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- // Obtain required materials - Air and Iron @@ -110,10 +112,12 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, int SideFl = 1; if (ModuleNcp>=35 && ModuleNcp<=37) SideFl = -1; - HepGeom::Transform3D TransCut2, TransCutL, TransCutR; + GeoTrf::Transform3D TransCut2(GeoTrf::Transform3D::Identity()); + GeoTrf::Transform3D TransCutL(GeoTrf::Transform3D::Identity()); + GeoTrf::Transform3D TransCutR(GeoTrf::Transform3D::Identity()); - const GeoShapeUnion *CutA= NULL; - GeoShape *CutB= NULL; + const GeoShapeUnion *CutA{nullptr}; + GeoShape *CutB{nullptr}; // ext. barrel Cuts description if (sec_number==2 && m_dbManager->BoolCuts() && ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62))) @@ -121,7 +125,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, volname = "CutB"; m_dbManager->SetCurrentCuts(volname); PosXcut = m_dbManager->CutsXpos(); PosYcut = m_dbManager->CutsYpos(); - Rmore = 0.8*CLHEP::cm; + Rmore = 0.8*GeoModelKernelUnits::cm; // Inert materials, CutB1 dX1 = m_dbManager->CutsDX1()+Rmore; @@ -158,47 +162,47 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, checking("Cut2down", false, 1, dX1,dX2,dY1,dY2,dZ2); GeoTrd* Cut1down = new GeoTrd(dX1,dX2,dY1,dY2,dZ2); - HepGeom::Translate3D yPosA(0.,0.,-dZ1-dZ2); + GeoTrf::Translate3D yPosA(0.,0.,-dZ1-dZ2); const GeoShapeUnion& CutA1 = Cut1up->add(*Cut1down<<yPosA); CutA = &CutA1; - Radius = (m_dbManager->TILBrmaximal() + m_dbManager->TILBrminimal())/2 * CLHEP::cm; + Radius = (m_dbManager->TILBrmaximal() + m_dbManager->TILBrminimal())/2 * GeoModelKernelUnits::cm; - if (ModuleNcp==35||ModuleNcp==62) { YcorA = 5*CLHEP::cm; YcorB = 5*CLHEP::cm; lenPla =0.8*CLHEP::cm, Blia = 17.4*CLHEP::cm;} - if (ModuleNcp==36||ModuleNcp==61) { YcorA = 6.5*CLHEP::cm; YcorB = 6*CLHEP::cm; lenPla =1.7*CLHEP::cm; Blia = 16.9*CLHEP::cm;} - if (ModuleNcp==37||ModuleNcp==60) { YcorA = 8*CLHEP::cm; YcorB = 9*CLHEP::cm; lenPla =2.8*CLHEP::cm; Blia = 16.4*CLHEP::cm;} + if (ModuleNcp==35||ModuleNcp==62) { YcorA = 5*GeoModelKernelUnits::cm; YcorB = 5*GeoModelKernelUnits::cm; lenPla =0.8*GeoModelKernelUnits::cm, Blia = 17.4*GeoModelKernelUnits::cm;} + if (ModuleNcp==36||ModuleNcp==61) { YcorA = 6.5*GeoModelKernelUnits::cm; YcorB = 6*GeoModelKernelUnits::cm; lenPla =1.7*GeoModelKernelUnits::cm; Blia = 16.9*GeoModelKernelUnits::cm;} + if (ModuleNcp==37||ModuleNcp==60) { YcorA = 8*GeoModelKernelUnits::cm; YcorB = 9*GeoModelKernelUnits::cm; lenPla =2.8*GeoModelKernelUnits::cm; Blia = 16.4*GeoModelKernelUnits::cm;} - TransCut2 = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateX3D((90-phi)*CLHEP::deg) * HepGeom::RotateY3D(180*CLHEP::deg) - * HepGeom::Translate3D(0.1*CLHEP::cm,SideFl*17.5*CLHEP::cm,-PosY+YcorA); + TransCut2 = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateX3D((90-phi)*GeoModelKernelUnits::deg) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(0.1*GeoModelKernelUnits::cm,SideFl*17.5*GeoModelKernelUnits::cm,-PosY+YcorA); // For modules on the side C apply extra transformation // which implements ReflectZ(0) if(neg) { - HepGeom::Point3D<double> ptTmp = TransCut2*HepGeom::Point3D<double>(0.,0.,0.); - TransCut2 = HepGeom::TranslateX3D(2*ptTmp.x())*HepGeom::RotateZ3D(180*CLHEP::deg)*TransCut2; + GeoTrf::Vector3D ptTmp = TransCut2*GeoTrf::Vector3D(0.,0.,0.); + TransCut2 = GeoTrf::TranslateX3D(2*ptTmp.x())*GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)*TransCut2; } if (ModuleNcp>=60 && ModuleNcp<=62) { - TransCutL = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(phi*CLHEP::deg) - * HepGeom::Translate3D(-1.4*CLHEP::cm,PosYcut+YcorB,-PosXcut-Blia); + TransCutL = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(-1.4*GeoModelKernelUnits::cm,PosYcut+YcorB,-PosXcut-Blia); // ReflectZ for C side if(neg) { - HepGeom::Point3D<double> ptTmp = TransCutL*HepGeom::Point3D<double>(0.,0.,0.); - TransCutL = HepGeom::TranslateX3D(2*ptTmp.x())*HepGeom::RotateZ3D(180*CLHEP::deg)*TransCutL; + GeoTrf::Vector3D ptTmp = TransCutL*GeoTrf::Vector3D(0.,0.,0.); + TransCutL = GeoTrf::TranslateX3D(2*ptTmp.x())*GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)*TransCutL; } } else if (ModuleNcp>=35 && ModuleNcp<=37) { - TransCutR = HepGeom::TranslateZ3D(-Radius) - * HepGeom::RotateY3D(180*CLHEP::deg) * HepGeom::RotateX3D(phi*CLHEP::deg) - * HepGeom::Translate3D(-1.4*CLHEP::cm,PosYcut+YcorB,PosXcut+Blia) - * HepGeom::RotateY3D(180*CLHEP::deg); + TransCutR = GeoTrf::TranslateZ3D(-Radius) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) * GeoTrf::RotateX3D(phi*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(-1.4*GeoModelKernelUnits::cm,PosYcut+YcorB,PosXcut+Blia) + * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg); // ReflectZ for C side if(neg) { - HepGeom::Point3D<double> ptTmp = TransCutR*HepGeom::Point3D<double>(0.,0.,0.); - TransCutR = HepGeom::TranslateX3D(2*ptTmp.x())*HepGeom::RotateZ3D(180*CLHEP::deg)*TransCutR; + GeoTrf::Vector3D ptTmp = TransCutR*GeoTrf::Vector3D(0.,0.,0.); + TransCutR = GeoTrf::TranslateX3D(2*ptTmp.x())*GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)*TransCutR; } } @@ -215,21 +219,21 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, if (m_dbManager->TILBngirder() > 0) { // Mother volume for girder - thicknessGirderMother = (m_dbManager->TILBdzmodul() - m_dbManager->TILBdzend() - m_dbManager->TILBdzend2())*CLHEP::cm; + thicknessGirderMother = (m_dbManager->TILBdzmodul() - m_dbManager->TILBdzend() - m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm; // special module with special girder if ((Id4 == 7) && (sec_number == 3)) - thicknessGirderMother = (m_dbManager->TILBdzgir() - m_dbManager->TILBdzend() - m_dbManager->TILBdzend2())*CLHEP::cm; + thicknessGirderMother = (m_dbManager->TILBdzgir() - m_dbManager->TILBdzend() - m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm; - double heightGirderMother = (tile_rmax - m_dbManager->TILBrmax())*CLHEP::cm; - double dy1GirderMother = m_dbManager->TILBrmax() * tan_delta_phi_2 * CLHEP::cm; - double dy2GirderMother = tile_rmax * tan_delta_phi_2 * CLHEP::cm; + double heightGirderMother = (tile_rmax - m_dbManager->TILBrmax())*GeoModelKernelUnits::cm; + double dy1GirderMother = m_dbManager->TILBrmax() * tan_delta_phi_2 * GeoModelKernelUnits::cm; + double dy2GirderMother = tile_rmax * tan_delta_phi_2 * GeoModelKernelUnits::cm; // ps test the TILB DZGIR // std::cout <<"\t\t PS Girder Module = "<<ModuleNcp<< std::endl; // std::cout <<"\t\t PS thicknessGirderMother = "<<thicknessGirderMother<< std::endl; //ps account for special ITC modules 14,15,18,19 if ((Id4 == 7) && (sec_number == 3)) { - specialModuleZShift = 0.5*CLHEP::cm*(m_dbManager->TILBdzgir() - m_dbManager->TILBdzmodul()); + specialModuleZShift = 0.5*GeoModelKernelUnits::cm*(m_dbManager->TILBdzgir() - m_dbManager->TILBdzmodul()); } // checking("GirderMother", false, 3, @@ -248,16 +252,16 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, tile_rmax, m_dbManager->TILBrmax(), tan_delta_phi_2, - thicknessGirderMother*(1./CLHEP::cm)); + thicknessGirderMother*(1./GeoModelKernelUnits::cm)); GeoTransform* tfGirderMother = 0; if(sec_number==3) - tfGirderMother = new GeoTransform(HepGeom::Translate3D((m_dbManager->TILBdzend()-m_dbManager->TILBdzend2())*CLHEP::cm/2, 0., - (m_dbManager->TILBrmax()-m_dbManager->TILBrmin())*CLHEP::cm/2)); + tfGirderMother = new GeoTransform(GeoTrf::Translate3D((m_dbManager->TILBdzend()-m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm/2, 0., + (m_dbManager->TILBrmax()-m_dbManager->TILBrmin())*GeoModelKernelUnits::cm/2)); else - tfGirderMother = new GeoTransform(HepGeom::Translate3D((m_dbManager->TILBdzend()-m_dbManager->TILBdzend2())*CLHEP::cm/2, 0., - (m_dbManager->TILBrmax()-rminb)*CLHEP::cm/2)); + tfGirderMother = new GeoTransform(GeoTrf::Translate3D((m_dbManager->TILBdzend()-m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm/2, 0., + (m_dbManager->TILBrmax()-rminb)*GeoModelKernelUnits::cm/2)); mother->add(tfGirderMother); mother->add(pvGirderMother); @@ -277,13 +281,13 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, if(sec_number==3) { //ITC coverplate - thicknessFrontPlate = (m_dbManager->TILBdzmodul() - zlen_itc2)*CLHEP::cm; + thicknessFrontPlate = (m_dbManager->TILBdzmodul() - zlen_itc2)*GeoModelKernelUnits::cm; if (thicknessFrontPlate > rless) { - heightFrontPlate = m_dbManager->TILBdrfront()*CLHEP::cm; - dy1FrontPlate = (rminb*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; - dy2FrontPlate = (m_dbManager->TILBrmin()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + heightFrontPlate = m_dbManager->TILBdrfront()*GeoModelKernelUnits::cm; + dy1FrontPlate = (rminb*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; + dy2FrontPlate = (m_dbManager->TILBrmin()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG <<" FrontPlateSh dX1,dX2= "<<thicknessFrontPlate/2<<", "<<thicknessFrontPlate/2 @@ -298,9 +302,9 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, GeoLogVol* lvFrontPlateSh = new GeoLogVol("FrontPlateSh",frontPlateSh,matIron); GeoPhysVol* pvFrontPlateSh = new GeoPhysVol(lvFrontPlateSh); - GeoTransform* tfFrontPlateSh = new GeoTransform(HepGeom::Translate3D( - -m_dbManager->TILBdzmodul()/2*CLHEP::cm+thicknessFrontPlate/2, 0., - (rminb - tile_rmax)/2*CLHEP::cm)); + GeoTransform* tfFrontPlateSh = new GeoTransform(GeoTrf::Translate3D( + -m_dbManager->TILBdzmodul()/2*GeoModelKernelUnits::cm+thicknessFrontPlate/2, 0., + (rminb - tile_rmax)/2*GeoModelKernelUnits::cm)); mother->add(tfFrontPlateSh); mother->add(pvFrontPlateSh); @@ -323,10 +327,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, volname = "CutB"; m_dbManager->SetCurrentCuts(volname); dXCutB = m_dbManager->CutsDX1(); - thicknessFrontPlate = (m_dbManager->TILBdzmodul() - m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())*CLHEP::cm; - heightFrontPlate = m_dbManager->TILBdrfront()*CLHEP::cm; - dy1FrontPlate = (rminb*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; - dy2FrontPlate = (m_dbManager->TILBrmin()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + thicknessFrontPlate = (m_dbManager->TILBdzmodul() - m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm; + heightFrontPlate = m_dbManager->TILBdrfront()*GeoModelKernelUnits::cm; + dy1FrontPlate = (rminb*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; + dy2FrontPlate = (m_dbManager->TILBrmin()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; GeoTrd* frontPlate = new GeoTrd(thicknessFrontPlate/2 -(dXCutA+dXCutB), thicknessFrontPlate/2 -(dXCutA+dXCutB), @@ -336,8 +340,8 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, // Cuting of Plate /* - HepGeom::Transform3D TCu2 = HepGeom::RotateX3D((90-phi)*CLHEP::deg) * HepGeom::RotateY3D(180*CLHEP::deg) - * HepGeom::Translate3D(thicknessFrontPlate/2-dXCutA,0,0); + GeoTrf::Transform3D TCu2 = GeoTrf::RotateX3D((90-phi)*GeoModelKernelUnits::deg) * GeoTrf::RotateY3D(180*GeoModelKernelUnits::deg) + * GeoTrf::Translate3D(thicknessFrontPlate/2-dXCutA,0,0); GeoTransform* TCu = new GeoTransform(TCu2); const GeoShape &tmp_frontPlate = frontPlate->subtract((*CutA)<<TCu2); @@ -346,9 +350,9 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, GeoLogVol* lvFrontPlate = new GeoLogVol("FrontPlate",frontPlate,matIron); GeoPhysVol* pvFrontPlate = new GeoPhysVol(lvFrontPlate); - GeoTransform* tfFrontPlate = new GeoTransform(HepGeom::Translate3D( - (m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())/2*CLHEP::cm+ dXCutB, 0., - (m_dbManager->TILBrmin()-m_dbManager->TILBdrfront()/2-(tile_rmax + rminb)/2)*CLHEP::cm)); + GeoTransform* tfFrontPlate = new GeoTransform(GeoTrf::Translate3D( + (m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())/2*GeoModelKernelUnits::cm+ dXCutB, 0., + (m_dbManager->TILBrmin()-m_dbManager->TILBdrfront()/2-(tile_rmax + rminb)/2)*GeoModelKernelUnits::cm)); mother->add(tfFrontPlate); mother->add(pvFrontPlate); @@ -360,10 +364,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, else { //Ordinary frontplate - thicknessFrontPlate = (m_dbManager->TILBdzmodul() - m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())*CLHEP::cm; - heightFrontPlate = m_dbManager->TILBdrfront()*CLHEP::cm; - dy1FrontPlate = (rminb*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; - dy2FrontPlate = (m_dbManager->TILBrmin()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + thicknessFrontPlate = (m_dbManager->TILBdzmodul() - m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm; + heightFrontPlate = m_dbManager->TILBdrfront()*GeoModelKernelUnits::cm; + dy1FrontPlate = (rminb*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; + dy2FrontPlate = (m_dbManager->TILBrmin()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; GeoTrd* frontPlate = new GeoTrd(thicknessFrontPlate/2, thicknessFrontPlate/2, @@ -373,9 +377,9 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, GeoLogVol* lvFrontPlate = new GeoLogVol("FrontPlate",frontPlate,matIron); GeoPhysVol* pvFrontPlate = new GeoPhysVol(lvFrontPlate); - GeoTransform* tfFrontPlate = new GeoTransform(HepGeom::Translate3D( - (m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())/2*CLHEP::cm, 0., - (m_dbManager->TILBrmin()-m_dbManager->TILBdrfront()/2-(tile_rmax + rminb)/2)*CLHEP::cm)); + GeoTransform* tfFrontPlate = new GeoTransform(GeoTrf::Translate3D( + (m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())/2*GeoModelKernelUnits::cm, 0., + (m_dbManager->TILBrmin()-m_dbManager->TILBdrfront()/2-(tile_rmax + rminb)/2)*GeoModelKernelUnits::cm)); mother->add(tfFrontPlate); mother->add(pvFrontPlate); @@ -386,13 +390,13 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, double dy1EndPlate, dy2EndPlate, thicknessEndPlate, heightEndPlate; //VARIABLES FOR END PLATE HOLE - double heightEPHole = m_dbManager->TILBflangex()*CLHEP::cm; - double dyEPHole = m_dbManager->TILBflangex()*CLHEP::cm/2; + double heightEPHole = m_dbManager->TILBflangex()*GeoModelKernelUnits::cm; + double dyEPHole = m_dbManager->TILBflangex()*GeoModelKernelUnits::cm/2; // ps . shifts for end plates in cutout regions - HepGeom::Transform3D cutOutTransformation ; + GeoTrf::Transform3D cutOutTransformation(GeoTrf::Transform3D::Identity()); //first endplate - GeoTransform* tfEndPlateSh =NULL; + GeoTransform* tfEndPlateSh{nullptr}; if (m_dbManager->TILBdzend1() > 0) { @@ -400,10 +404,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, { //Short endplate - dy1EndPlate = rminb * tan_delta_phi_2 * CLHEP::cm; - dy2EndPlate = m_dbManager->TILBrmax() * tan_delta_phi_2 * CLHEP::cm; - thicknessEndPlate = m_dbManager->TILBdzend1() * CLHEP::cm; - heightEndPlate = (m_dbManager->TILBrmax() - rminb) * CLHEP::cm; + dy1EndPlate = rminb * tan_delta_phi_2 * GeoModelKernelUnits::cm; + dy2EndPlate = m_dbManager->TILBrmax() * tan_delta_phi_2 * GeoModelKernelUnits::cm; + thicknessEndPlate = m_dbManager->TILBdzend1() * GeoModelKernelUnits::cm; + heightEndPlate = (m_dbManager->TILBrmax() - rminb) * GeoModelKernelUnits::cm; // // creating standart endplate. It is the same for // both standard mosules and modules with cuts @@ -438,40 +442,40 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, if ( ( ModuleNcp == 37 ) || ( ModuleNcp == 60 ) ) { - rotationAngle = (180.0 - 25.3125 )* CLHEP::deg ; // ATLLEMS_0003 0004 - shiftCutPlate = 38.7 * CLHEP::mm; + rotationAngle = (180.0 - 25.3125 )* GeoModelKernelUnits::deg ; // ATLLEMS_0003 0004 + shiftCutPlate = 38.7 * GeoModelKernelUnits::mm; cutOutTransformation = - HepGeom::Translate3D(0,0, -heightEndPlate/2.) * - HepGeom::RotateX3D( 90 * CLHEP::deg ) * - HepGeom::Translate3D(0.,0., -rotationSign * (dy2EndPlate + shiftCutPlate ) ) * - HepGeom::RotateX3D( rotationSign * rotationAngle ) ; + GeoTrf::Translate3D(0,0, -heightEndPlate/2.) * + GeoTrf::RotateX3D( 90 * GeoModelKernelUnits::deg ) * + GeoTrf::Translate3D(0.,0., -rotationSign * (dy2EndPlate + shiftCutPlate ) ) * + GeoTrf::RotateX3D( rotationSign * rotationAngle ) ; const GeoShape & endPlateShCutted3760 = (endPlateSh->subtract( (*endPlateShCut)<< cutOutTransformation ) ) ; lvEndPlateSh = new GeoLogVol("EndPlateSh", &(endPlateShCutted3760) , matIron); } else if ( ( ModuleNcp == 36 ) || ( ModuleNcp == 61 ) ) { - rotationAngle = - ( 116.4832 - 90. )* CLHEP::deg ; // ATLLEMS_0005 0006 - shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*CLHEP::cm - 1448.4 * CLHEP::mm); + rotationAngle = - ( 116.4832 - 90. )* GeoModelKernelUnits::deg ; // ATLLEMS_0005 0006 + shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*GeoModelKernelUnits::cm - 1448.4 * GeoModelKernelUnits::mm); cutOutTransformation = - HepGeom::Translate3D( 0, 0, -heightEndPlate/2. ) * - HepGeom::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate + 0.5*dy2EndPlate*(1.- std::cos(rotationAngle*CLHEP::rad))) ) * - HepGeom::RotateX3D( rotationSign * rotationAngle ) ; + GeoTrf::Translate3D( 0, 0, -heightEndPlate/2. ) * + GeoTrf::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate + 0.5*dy2EndPlate*(1.- std::cos(rotationAngle*GeoModelKernelUnits::rad))) ) * + GeoTrf::RotateX3D( rotationSign * rotationAngle ) ; const GeoShape & endPlateShCutted3661 = (endPlateSh->subtract( (*endPlateShCut)<< cutOutTransformation ) ) ; lvEndPlateSh = new GeoLogVol("EndPlateSh", &(endPlateShCutted3661) , matIron); } else if ( ( ModuleNcp == 35 ) || ( ModuleNcp == 62 ) ) { - rotationAngle = - ( 104.0625 - 90.0 )* CLHEP::deg ; // ATLLEMS_0007 0008 - shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*CLHEP::cm - 1534.6 * CLHEP::mm); + rotationAngle = - ( 104.0625 - 90.0 )* GeoModelKernelUnits::deg ; // ATLLEMS_0007 0008 + shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*GeoModelKernelUnits::cm - 1534.6 * GeoModelKernelUnits::mm); cutOutTransformation = - HepGeom::Translate3D( 0, 0, -heightEndPlate/2. ) * - HepGeom::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate) ) * - HepGeom::RotateX3D( rotationSign * rotationAngle ) ; + GeoTrf::Translate3D( 0, 0, -heightEndPlate/2. ) * + GeoTrf::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate) ) * + GeoTrf::RotateX3D( rotationSign * rotationAngle ) ; const GeoShape & endPlateShCutted3562 = (endPlateSh->subtract( (*endPlateShCut)<< cutOutTransformation ) ) ; lvEndPlateSh = new GeoLogVol("EndPlateSh", &(endPlateShCutted3562) , matIron); @@ -497,10 +501,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, GeoPhysVol* pvEndPlateSh = new GeoPhysVol(lvEndPlateSh); - tfEndPlateSh = new GeoTransform(HepGeom::Translate3D( + tfEndPlateSh = new GeoTransform(GeoTrf::Translate3D( specialModuleZShift + - (m_dbManager->TILBdzend1() - m_dbManager->TILBdzmodul())*CLHEP::cm/2, 0., - (m_dbManager->TILBrmax() - tile_rmax)*CLHEP::cm/2)); + (m_dbManager->TILBdzend1() - m_dbManager->TILBdzmodul())*GeoModelKernelUnits::cm/2, 0., + (m_dbManager->TILBrmax() - tile_rmax)*GeoModelKernelUnits::cm/2)); tfEndPlateSh->ref(); mother->add(tfEndPlateSh); @@ -513,10 +517,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, else { //Ordinary endplate - dy1EndPlate = rminb * tan_delta_phi_2 * CLHEP::cm; - dy2EndPlate = tile_rmax * tan_delta_phi_2 * CLHEP::cm; - thicknessEndPlate = m_dbManager->TILBdzend1() * CLHEP::cm; - heightEndPlate = (tile_rmax-rminb)*CLHEP::cm; + dy1EndPlate = rminb * tan_delta_phi_2 * GeoModelKernelUnits::cm; + dy2EndPlate = tile_rmax * tan_delta_phi_2 * GeoModelKernelUnits::cm; + thicknessEndPlate = m_dbManager->TILBdzend1() * GeoModelKernelUnits::cm; + heightEndPlate = (tile_rmax-rminb)*GeoModelKernelUnits::cm; GeoTrd* endPlate1 = new GeoTrd(thicknessEndPlate/2, thicknessEndPlate/2, @@ -538,14 +542,14 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, GeoLogVol* lvEPHole1 = new GeoLogVol("EPHole1",epHole1,matAir); GeoPhysVol* pvEPHole1 = new GeoPhysVol(lvEPHole1); - GeoTransform* tfEPHole1 = new GeoTransform(HepGeom::Translate3D(0.,0., - (m_dbManager->TILBflangey()-(tile_rmax + rminb)/2)*CLHEP::cm)); + GeoTransform* tfEPHole1 = new GeoTransform(GeoTrf::Translate3D(0.,0., + (m_dbManager->TILBflangey()-(tile_rmax + rminb)/2)*GeoModelKernelUnits::cm)); pvEndPlate1->add(tfEPHole1); pvEndPlate1->add(pvEPHole1); } - GeoTransform* tfEndPlate1 = new GeoTransform(HepGeom::Translate3D( - (m_dbManager->TILBdzend1() - m_dbManager->TILBdzmodul())*CLHEP::cm/2, 0., 0.)); + GeoTransform* tfEndPlate1 = new GeoTransform(GeoTrf::Translate3D( + (m_dbManager->TILBdzend1() - m_dbManager->TILBdzmodul())*GeoModelKernelUnits::cm/2, 0., 0.)); mother->add(tfEndPlate1); mother->add(pvEndPlate1); @@ -555,7 +559,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, } //second endplate - GeoTransform* tfEndPlate2 =NULL; + GeoTransform* tfEndPlate2{nullptr}; if (m_dbManager->TILBdzend2() > 0) { @@ -563,10 +567,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, double radShift =lenPla; double rminbT=rminb + radShift; - dy1EndPlate = rminb * tan_delta_phi_2 * CLHEP::cm; - dy2EndPlate = tile_rmax * tan_delta_phi_2 * CLHEP::cm; - thicknessEndPlate = m_dbManager->TILBdzend2() * CLHEP::cm; - heightEndPlate = (tile_rmax-rminb) * CLHEP::cm; + dy1EndPlate = rminb * tan_delta_phi_2 * GeoModelKernelUnits::cm; + dy2EndPlate = tile_rmax * tan_delta_phi_2 * GeoModelKernelUnits::cm; + thicknessEndPlate = m_dbManager->TILBdzend2() * GeoModelKernelUnits::cm; + heightEndPlate = (tile_rmax-rminb) * GeoModelKernelUnits::cm; GeoLogVol* lvEndPlate2 = 0; @@ -576,8 +580,8 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, dy2EndPlate, heightEndPlate/2); - tfEndPlate2 = new GeoTransform(HepGeom::Translate3D( - (-m_dbManager->TILBdzend2() + m_dbManager->TILBdzmodul())*CLHEP::cm/2, 0., 0.)); + tfEndPlate2 = new GeoTransform(GeoTrf::Translate3D( + (-m_dbManager->TILBdzend2() + m_dbManager->TILBdzmodul())*GeoModelKernelUnits::cm/2, 0., 0.)); tfEndPlate2->ref(); if (sec_number==2 && ((ModuleNcp>=35 && ModuleNcp<=37)||(ModuleNcp>=60 && ModuleNcp<=62)) ) @@ -596,51 +600,51 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, if ( ( ModuleNcp == 37 ) || ( ModuleNcp == 60 ) ) { - rotationAngle = - ( 115.3125 - 90.0 )* CLHEP::deg ; // ATLLEMS_0011 0012 - shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*CLHEP::cm - 1364.0 * CLHEP::mm); + rotationAngle = - ( 115.3125 - 90.0 )* GeoModelKernelUnits::deg ; // ATLLEMS_0011 0012 + shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*GeoModelKernelUnits::cm - 1364.0 * GeoModelKernelUnits::mm); cutOutTransformation = - HepGeom::Translate3D( 0, 0, -heightEndPlate/2. ) * - HepGeom::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate) ) * - HepGeom::RotateX3D( rotationSign * rotationAngle ) ; + GeoTrf::Translate3D( 0, 0, -heightEndPlate/2. ) * + GeoTrf::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate) ) * + GeoTrf::RotateX3D( rotationSign * rotationAngle ) ; const GeoShape & endPlate2Cutted3760 = (endPlate2->subtract( (*endPlate2Cut)<< cutOutTransformation ) ) ; lvEndPlate2 = new GeoLogVol("EndPlate2", &(endPlate2Cutted3760) , matIron); } else if ( ( ModuleNcp == 36 ) || ( ModuleNcp == 61 ) ) { - rotationAngle = - ( 109.6875 - 90.0 )* CLHEP::deg ; // ATLLEMS_0009 0010 - shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*CLHEP::cm - 1464.0 * CLHEP::mm); + rotationAngle = - ( 109.6875 - 90.0 )* GeoModelKernelUnits::deg ; // ATLLEMS_0009 0010 + shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*GeoModelKernelUnits::cm - 1464.0 * GeoModelKernelUnits::mm); cutOutTransformation = - HepGeom::Translate3D( 0, 0, -heightEndPlate/2. ) * - HepGeom::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate) ) * - HepGeom::RotateX3D( rotationSign * rotationAngle ) ; + GeoTrf::Translate3D( 0, 0, -heightEndPlate/2. ) * + GeoTrf::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate) ) * + GeoTrf::RotateX3D( rotationSign * rotationAngle ) ; const GeoShape & endPlate2Cutted3661 = (endPlate2->subtract( (*endPlate2Cut)<< cutOutTransformation ) ) ; lvEndPlate2 = new GeoLogVol("EndPlate2", &(endPlate2Cutted3661) , matIron); } else if ( ( ModuleNcp == 35 ) || ( ModuleNcp == 62 ) ) { - rotationAngle = - ( 104.0625 - 90.0 )* CLHEP::deg ; // ATLLEMS_0009 0010 - shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*CLHEP::cm - ( 1915.0 -385.0 )* CLHEP::mm); // girder is subtracted (no drawing) + rotationAngle = - ( 104.0625 - 90.0 )* GeoModelKernelUnits::deg ; // ATLLEMS_0009 0010 + shiftCutPlate = ( ( m_dbManager->TILBrmax() - rminb )*GeoModelKernelUnits::cm - ( 1915.0 -385.0 )* GeoModelKernelUnits::mm); // girder is subtracted (no drawing) cutOutTransformation = - HepGeom::Translate3D( 0, 0, -heightEndPlate/2. ) * - HepGeom::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate) ) * - HepGeom::RotateX3D( rotationSign * rotationAngle ) ; + GeoTrf::Translate3D( 0, 0, -heightEndPlate/2. ) * + GeoTrf::Translate3D( 0, 0, - (dy2EndPlate - shiftCutPlate) ) * + GeoTrf::RotateX3D( rotationSign * rotationAngle ) ; const GeoShape & endPlate2Cutted3562 = (endPlate2->subtract( (*endPlate2Cut)<< cutOutTransformation ) ) ; lvEndPlate2 = new GeoLogVol("EndPlate2", &(endPlate2Cutted3562) , matIron); } - // dy1EndPlate = rminbT * tan_delta_phi_2 * CLHEP::cm; - // dy2EndPlate = tile_rmax * tan_delta_phi_2 * CLHEP::cm; - // thicknessEndPlate = m_dbManager->TILBdzend2() * CLHEP::cm; - // heightEndPlate = (tile_rmax - rminbT) * CLHEP::cm; + // dy1EndPlate = rminbT * tan_delta_phi_2 * GeoModelKernelUnits::cm; + // dy2EndPlate = tile_rmax * tan_delta_phi_2 * GeoModelKernelUnits::cm; + // thicknessEndPlate = m_dbManager->TILBdzend2() * GeoModelKernelUnits::cm; + // heightEndPlate = (tile_rmax - rminbT) * GeoModelKernelUnits::cm; - // tfEndPlate2 = new GeoTransform(HepGeom::Translate3D( - // (-m_dbManager->TILBdzend2() + m_dbManager->TILBdzmodul())*CLHEP::cm/2, 0, radShift/2*CLHEP::cm)); + // tfEndPlate2 = new GeoTransform(GeoTrf::Translate3D( + // (-m_dbManager->TILBdzend2() + m_dbManager->TILBdzmodul())*GeoModelKernelUnits::cm/2, 0, radShift/2*GeoModelKernelUnits::cm)); } else @@ -653,7 +657,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, //Position air hole if (m_dbManager->TILBflangex() > 0) { - dyEPHole = m_dbManager->TILBflangex()*CLHEP::cm/2; + dyEPHole = m_dbManager->TILBflangex()*GeoModelKernelUnits::cm/2; GeoTrd* epHole2 = new GeoTrd (thicknessEndPlate/2, thicknessEndPlate/2, @@ -663,8 +667,8 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, GeoLogVol* lvEPHole2 = new GeoLogVol("EPHole2",epHole2,matAir); GeoPhysVol* pvEPHole2 = new GeoPhysVol(lvEPHole2); - GeoTransform* tfEPHole2 = new GeoTransform(HepGeom::Translate3D(0.,0., - (m_dbManager->TILBflangey()-(tile_rmax + rminbT)/2)*CLHEP::cm)); + GeoTransform* tfEPHole2 = new GeoTransform(GeoTrf::Translate3D(0.,0., + (m_dbManager->TILBflangey()-(tile_rmax + rminbT)/2)*GeoModelKernelUnits::cm)); pvEndPlate2->add(tfEPHole2); pvEndPlate2->add(pvEPHole2); } @@ -679,10 +683,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, } // End Plates //---------------------------------------------------Absorber-------------------------------------------------------- - double heightAbsorber = (m_dbManager->TILBrmax() - m_dbManager->TILBrmin())*CLHEP::cm; - double thicknessAbsorber = (m_dbManager->TILBdzmodul() - m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())*CLHEP::cm; - double dy1Absorber = (m_dbManager->TILBrmin()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; - double dy2Absorber = (m_dbManager->TILBrmax()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + double heightAbsorber = (m_dbManager->TILBrmax() - m_dbManager->TILBrmin())*GeoModelKernelUnits::cm; + double thicknessAbsorber = (m_dbManager->TILBdzmodul() - m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm; + double dy1Absorber = (m_dbManager->TILBrmin()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; + double dy2Absorber = (m_dbManager->TILBrmax()*tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; checking("Absorber", true, 3, thicknessAbsorber/2,thicknessAbsorber/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -692,10 +696,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, double PosAbsor1 =0, PosAbsor2 =0, PosAbsor3 =0; int nA1 =32, nA2 = 0, nA3 =16; - GeoTrd *absorber =NULL, *absorber1 =NULL, *absorber3 =NULL; - GeoLogVol *lvAbsorber =NULL, *lvAbsorber1 =NULL, *lvAbsorber3 =NULL; - GeoPhysVol *pvAbsorber =NULL, *pvAbsorber1 =NULL, *pvAbsorber3 =NULL; - GeoPhysVol *pvTmp_Absorber1 =NULL, *pvTmp_Absorber3 =NULL; + GeoTrd *absorber{nullptr}, *absorber1{nullptr}, *absorber3{nullptr}; + GeoLogVol *lvAbsorber{nullptr}, *lvAbsorber1{nullptr}, *lvAbsorber3{nullptr}; + GeoPhysVol *pvAbsorber{nullptr}, *pvAbsorber1{nullptr}, *pvAbsorber3{nullptr}; + GeoPhysVol *pvTmp_Absorber1{nullptr}, *pvTmp_Absorber3{nullptr}; // Perform different actions depending on sections switch (sec_number) @@ -703,7 +707,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, case 2: { //Extended barrel - consists of ordinary periods of type 1 only - thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*CLHEP::cm; + thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*GeoModelKernelUnits::cm; // The period number for middle absorber nA2 = m_dbManager->TILBnperiod() - (nA1+nA3); @@ -803,10 +807,10 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, //nrOfPeriods-1 ordinary period and second with one special period of type 2 //First division - thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*CLHEP::cm; + thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*GeoModelKernelUnits::cm; m_barrelPeriodThickness = thicknessPeriod; - m_barrelGlue = dzglue*CLHEP::cm; + m_barrelGlue = dzglue*GeoModelKernelUnits::cm; checking("Period 0", false, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -821,7 +825,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvPeriod = new GeoPhysVol(lvPeriod); fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 1); // 1-period type @@ -838,7 +842,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, // Place periods into Absorber Child like G4 replica GENFUNCTION periodPos1 = (thicknessPeriod*(2*periodInd+1)-thicknessAbsorberChild)/2; - TRANSFUNCTION xfReplica1 = Pow(HepGeom::TranslateX3D(1.),periodPos1); + TRANSFUNCTION xfReplica1 = Pow(GeoTrf::TranslateX3D(1.),periodPos1); if (m_verbose) checktransfunc(thicknessAbsorberChild,thicknessPeriod,m_dbManager->TILBnperiod()-1, (thicknessAbsorberChild - thicknessAbsorber)/2); @@ -850,12 +854,12 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvAbsorberChild->add(stPeriod); // Place absorber child - tfAbsorberChild = new GeoTransform(HepGeom::Translate3D((thicknessAbsorberChild - thicknessAbsorber)/2,0.,0.)); + tfAbsorberChild = new GeoTransform(GeoTrf::Translate3D((thicknessAbsorberChild - thicknessAbsorber)/2,0.,0.)); pvAbsorber->add(tfAbsorberChild); pvAbsorber->add(pvAbsorberChild); //Second division - thicknessPeriod = (m_dbManager->TILBdzmast() + 2.*m_dbManager->TILBdzspac() + 2.*dzglue)*CLHEP::cm; + thicknessPeriod = (m_dbManager->TILBdzmast() + 2.*m_dbManager->TILBdzspac() + 2.*dzglue)*GeoModelKernelUnits::cm; checking("Period 1", false, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -869,7 +873,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvPeriod = new GeoPhysVol(lvPeriod); fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 2); // 2-period type @@ -888,14 +892,14 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, (-thicknessAbsorberChild + thicknessAbsorber)/2); // Place period in the absorber child - tfPeriod = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfPeriod = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvAbsorberChild->add(new GeoIdentifierTag(m_dbManager->TILBnperiod()-1)); pvAbsorberChild->add(tfPeriod); pvAbsorberChild->add(pvPeriod); // Place absorber child - tfAbsorberChild = new GeoTransform(HepGeom::Translate3D((-thicknessAbsorberChild + thicknessAbsorber)/2,0.,0.)); + tfAbsorberChild = new GeoTransform(GeoTrf::Translate3D((-thicknessAbsorberChild + thicknessAbsorber)/2,0.,0.)); pvAbsorber->add(tfAbsorberChild); pvAbsorber->add(pvAbsorberChild); @@ -904,7 +908,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, case 2: { //Extended barrel - consists of ordinary periods of type 1 only - thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*CLHEP::cm; + thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*GeoModelKernelUnits::cm; checking("Period 2", false, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -920,7 +924,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, m_extendedPeriodThickness = thicknessPeriod; fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 1); // 1-period type @@ -929,7 +933,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, // - first partr of absorber // GENFUNCTION periodPos1 = (thicknessPeriod*(2*periodInd+1)-thicknessAbsorber1)/2; - TRANSFUNCTION xfReplica1 = Pow(HepGeom::TranslateX3D(1.),periodPos1); + TRANSFUNCTION xfReplica1 = Pow(GeoTrf::TranslateX3D(1.),periodPos1); if (m_verbose) checktransfunc(thicknessAbsorber1,thicknessPeriod,nA1, (-thicknessAbsorber+thicknessAbsorber1)/2.); @@ -957,7 +961,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, // middle partr of absorber GENFUNCTION periodPos2 = (thicknessPeriod*(2*periodInd+1)-thicknessAbsorber2)/2; - TRANSFUNCTION xfReplica2 = Pow(HepGeom::TranslateX3D(1.),periodPos2); + TRANSFUNCTION xfReplica2 = Pow(GeoTrf::TranslateX3D(1.),periodPos2); if (m_verbose) checktransfunc(thicknessAbsorber2,thicknessPeriod,nA2, (-thicknessAbsorber+thicknessAbsorber2)/2.+thicknessAbsorber1); @@ -972,7 +976,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, // second partr of absorber // GENFUNCTION periodPos3 = (thicknessPeriod*(2*periodInd+1)-thicknessAbsorber3)/2; - TRANSFUNCTION xfReplica3 = Pow(HepGeom::TranslateX3D(1.),periodPos3); + TRANSFUNCTION xfReplica3 = Pow(GeoTrf::TranslateX3D(1.),periodPos3); if (m_verbose) checktransfunc(thicknessAbsorber3,thicknessPeriod,nA3, (-thicknessAbsorber+thicknessAbsorber3)/2.+thicknessAbsorber2+thicknessAbsorber1); @@ -1016,7 +1020,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, //nrOfPeriods-1 ordinary period of type 1 and second with one special period of type 4 //First division - thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*CLHEP::cm; + thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*GeoModelKernelUnits::cm; checking("Period 3 (ITC1 special)", true, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -1030,7 +1034,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvPeriod = new GeoPhysVol(lvPeriod); fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 1); // 1-period type @@ -1047,7 +1051,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, // Place periods into Absorber Child like G4 replica GENFUNCTION periodPosITC1sp = (thicknessPeriod*(2*periodInd+1)-thicknessAbsorberChild)/2; - TRANSFUNCTION xfReplicaITC1sp = Pow(HepGeom::TranslateX3D(1.),periodPosITC1sp); + TRANSFUNCTION xfReplicaITC1sp = Pow(GeoTrf::TranslateX3D(1.),periodPosITC1sp); if (m_verbose) checktransfunc(thicknessAbsorberChild,thicknessPeriod,m_dbManager->TILBnperiod()-1, (thicknessAbsorberChild - thicknessAbsorber)/2); @@ -1059,13 +1063,13 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvAbsorberChild->add(stPeriod); // Place absorber child - tfAbsorberChild = new GeoTransform(HepGeom::Translate3D((thicknessAbsorberChild - thicknessAbsorber)/2,0.,0.)); + tfAbsorberChild = new GeoTransform(GeoTrf::Translate3D((thicknessAbsorberChild - thicknessAbsorber)/2,0.,0.)); pvAbsorber->add(tfAbsorberChild); pvAbsorber->add(pvAbsorberChild); // //Second division // - thicknessPeriod = m_dbManager->TILBdzspac()*CLHEP::cm; + thicknessPeriod = m_dbManager->TILBdzspac()*GeoModelKernelUnits::cm; checking("Period 5 (ITC1 special)", true, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -1079,7 +1083,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvPeriod = new GeoPhysVol(lvPeriod); fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 4); // 4-period type @@ -1097,13 +1101,13 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, (-thicknessAbsorberChild + thicknessAbsorber)/2); // Place period in the absorber child - tfPeriod = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfPeriod = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvAbsorberChild->add(new GeoIdentifierTag(m_dbManager->TILBnperiod()-1)); pvAbsorberChild->add(tfPeriod); pvAbsorberChild->add(pvPeriod); // Place absorber child - tfAbsorberChild = new GeoTransform(HepGeom::Translate3D((-thicknessAbsorberChild + thicknessAbsorber)/2,0.,0.)); + tfAbsorberChild = new GeoTransform(GeoTrf::Translate3D((-thicknessAbsorberChild + thicknessAbsorber)/2,0.,0.)); pvAbsorber->add(tfAbsorberChild); pvAbsorber->add(pvAbsorberChild); @@ -1112,7 +1116,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, } else { - thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*CLHEP::cm; + thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*GeoModelKernelUnits::cm; checking("Period 3", true, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -1126,14 +1130,14 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvPeriod = new GeoPhysVol(lvPeriod); fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 3); // 3-period type // Place periods into Absorber like G4 replica GENFUNCTION periodPos3 = (thicknessPeriod*(2*periodInd+1)-thicknessAbsorber)/2; - TRANSFUNCTION xfReplica3 = Pow(HepGeom::TranslateX3D(1.),periodPos3); + TRANSFUNCTION xfReplica3 = Pow(GeoTrf::TranslateX3D(1.),periodPos3); if (m_verbose) checktransfunc(thicknessAbsorber,thicknessPeriod,m_dbManager->TILBnperiod(),0.0); //ps if( (m_dbManager->TILBsection()==7 || m_dbManager->TILBsection()==8) && m_dbManager->SCNTitem()==302) @@ -1162,7 +1166,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, //nrOfPeriods-1 ordinary period of type 1 and second with one special period of type 4 //First division - thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*CLHEP::cm; + thicknessPeriod = 2.*(m_dbManager->TILBdzmast() + m_dbManager->TILBdzspac() + 2.*dzglue)*GeoModelKernelUnits::cm; checking("Period 4", true, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -1176,7 +1180,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvPeriod = new GeoPhysVol(lvPeriod); fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 1); // 1-period type @@ -1193,7 +1197,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, // Place periods into Absorber Child like G4 replica GENFUNCTION periodPos1 = (thicknessPeriod*(2*periodInd+1)-thicknessAbsorberChild)/2; - TRANSFUNCTION xfReplica1 = Pow(HepGeom::TranslateX3D(1.),periodPos1); + TRANSFUNCTION xfReplica1 = Pow(GeoTrf::TranslateX3D(1.),periodPos1); if (m_verbose) checktransfunc(thicknessAbsorberChild,thicknessPeriod,m_dbManager->TILBnperiod()-1, (thicknessAbsorberChild - thicknessAbsorber)/2); @@ -1205,12 +1209,12 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvAbsorberChild->add(stPeriod); // Place absorber child - tfAbsorberChild = new GeoTransform(HepGeom::Translate3D((thicknessAbsorberChild - thicknessAbsorber)/2,0.,0.)); + tfAbsorberChild = new GeoTransform(GeoTrf::Translate3D((thicknessAbsorberChild - thicknessAbsorber)/2,0.,0.)); pvAbsorber->add(tfAbsorberChild); pvAbsorber->add(pvAbsorberChild); //Second division - thicknessPeriod = m_dbManager->TILBdzspac()*CLHEP::cm; + thicknessPeriod = m_dbManager->TILBdzspac()*GeoModelKernelUnits::cm; checking("Period 5", true, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); @@ -1224,7 +1228,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvPeriod = new GeoPhysVol(lvPeriod); fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 4); // 4-period type @@ -1242,13 +1246,13 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, (-thicknessAbsorberChild + thicknessAbsorber)/2); // Place period in the absorber child - tfPeriod = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfPeriod = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvAbsorberChild->add(new GeoIdentifierTag(m_dbManager->TILBnperiod()-1)); pvAbsorberChild->add(tfPeriod); pvAbsorberChild->add(pvPeriod); // Place absorber child - tfAbsorberChild = new GeoTransform(HepGeom::Translate3D((-thicknessAbsorberChild + thicknessAbsorber)/2,0.,0.)); + tfAbsorberChild = new GeoTransform(GeoTrf::Translate3D((-thicknessAbsorberChild + thicknessAbsorber)/2,0.,0.)); pvAbsorber->add(tfAbsorberChild); pvAbsorber->add(pvAbsorberChild); @@ -1276,8 +1280,8 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, checking("Period 6", true, 4, thicknessPeriod/2,thicknessPeriod/2,dy1Absorber,dy2Absorber,heightAbsorber/2); - double dy1Period = m_dbManager->TILBflangex()/2.*CLHEP::cm; // correct size from the drawings - double dy2Period = m_dbManager->TILBflangey()/2.*CLHEP::cm; // correct size from the drawings + double dy1Period = m_dbManager->TILBflangex()/2.*GeoModelKernelUnits::cm; // correct size from the drawings + double dy2Period = m_dbManager->TILBflangey()/2.*GeoModelKernelUnits::cm; // correct size from the drawings if (dy1Period <= 0.0 || dy2Period <= 0.0 || dy1Period > dy1Absorber || dy2Period > dy2Absorber || dy1Period >= dy2Period ) { dy1Period = dy1Absorber; dy2Period = dy2Absorber; @@ -1293,7 +1297,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, pvPeriod = new GeoPhysVol(lvPeriod); fillPeriod(pvPeriod, - thicknessPeriod*(1./CLHEP::cm), + thicknessPeriod*(1./GeoModelKernelUnits::cm), dzglue, tan_delta_phi_2, 5, period); @@ -1301,7 +1305,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, if (m_verbose) checktransfunc(thicknessAbsorber,thicknessPeriod,1,0.0); // Place period in the absorber - tfPeriod = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfPeriod = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvAbsorber->add(new GeoIdentifierTag(0)); pvAbsorber->add(tfPeriod); pvAbsorber->add(pvPeriod); @@ -1313,7 +1317,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, } // Place absorber in the module mother - GeoTransform *tfAbsorber = NULL, *tfAbsorber1 =NULL, *tfAbsorber3 =NULL; + GeoTransform *tfAbsorber{nullptr}, *tfAbsorber1{nullptr}, *tfAbsorber3{nullptr}; double dXAbsorber = (m_dbManager->TILBdzend1() - m_dbManager->TILBdzend2()); double dZAbsorber = (m_dbManager->TILBrmax() - tile_rmax); @@ -1321,7 +1325,7 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, if (sec_number==3) { // ps specialModuleZShift - tfAbsorber = new GeoTransform(HepGeom::Translate3D( specialModuleZShift + dXAbsorber*CLHEP::cm/2, 0., dZAbsorber*CLHEP::cm/2)); + tfAbsorber = new GeoTransform(GeoTrf::Translate3D( specialModuleZShift + dXAbsorber*GeoModelKernelUnits::cm/2, 0., dZAbsorber*GeoModelKernelUnits::cm/2)); mother->add(tfAbsorber); mother->add(pvAbsorber); } @@ -1330,8 +1334,8 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " _fillsection Ex.barrel in "<< endmsg; - tfAbsorber1 = new GeoTransform(HepGeom::Translate3D(dXAbsorber*CLHEP::cm/2 - PosAbsor1, 0., - (dZAbsorber + m_dbManager->TILBrmin() - rminb)*CLHEP::cm/2)); + tfAbsorber1 = new GeoTransform(GeoTrf::Translate3D(dXAbsorber*GeoModelKernelUnits::cm/2 - PosAbsor1, 0., + (dZAbsorber + m_dbManager->TILBrmin() - rminb)*GeoModelKernelUnits::cm/2)); mother->add(tfAbsorber1); if (m_dbManager->BoolCuts() && ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) ) { mother->add(pvTmp_Absorber1); @@ -1343,16 +1347,16 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " _fillsection ext.barrel pvAbsorber1 Ok"<< endmsg; - tfAbsorber = new GeoTransform(HepGeom::Translate3D(dXAbsorber*CLHEP::cm/2 - PosAbsor2, 0., - (dZAbsorber + m_dbManager->TILBrmin() - rminb)*CLHEP::cm/2)); + tfAbsorber = new GeoTransform(GeoTrf::Translate3D(dXAbsorber*GeoModelKernelUnits::cm/2 - PosAbsor2, 0., + (dZAbsorber + m_dbManager->TILBrmin() - rminb)*GeoModelKernelUnits::cm/2)); mother->add(tfAbsorber); mother->add(pvAbsorber); if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG << " _fillsection ext.barrel pvAbsorber Ok"<< endmsg; - tfAbsorber3 = new GeoTransform(HepGeom::Translate3D(dXAbsorber*CLHEP::cm/2 - PosAbsor3, 0., - (dZAbsorber + m_dbManager->TILBrmin() - rminb)*CLHEP::cm/2)); + tfAbsorber3 = new GeoTransform(GeoTrf::Translate3D(dXAbsorber*GeoModelKernelUnits::cm/2 - PosAbsor3, 0., + (dZAbsorber + m_dbManager->TILBrmin() - rminb)*GeoModelKernelUnits::cm/2)); mother->add(tfAbsorber3); if (m_dbManager->BoolCuts() && ((ModuleNcp>=35 && ModuleNcp<=37) || (ModuleNcp>=60 && ModuleNcp<=62)) ) { mother->add(pvTmp_Absorber3); @@ -1366,8 +1370,8 @@ void TileGeoSectionBuilder::fillSection(GeoPhysVol*& mother, } else { - tfAbsorber = new GeoTransform(HepGeom::Translate3D(dXAbsorber*CLHEP::cm/2, 0., - (dZAbsorber + m_dbManager->TILBrmin() - rminb)*CLHEP::cm/2)); + tfAbsorber = new GeoTransform(GeoTrf::Translate3D(dXAbsorber*GeoModelKernelUnits::cm/2, 0., + (dZAbsorber + m_dbManager->TILBrmin() - rminb)*GeoModelKernelUnits::cm/2)); mother->add(tfAbsorber); mother->add(pvAbsorber); if(m_log->level()<=MSG::DEBUG) @@ -1433,11 +1437,11 @@ void TileGeoSectionBuilder::fillGirder(GeoPhysVol*& mother, dy2GirderElement = (elementRC + elementSizeInR/2) * tan_delta_phi_2; } - girderElement = new GeoTrd(thickness/2*CLHEP::cm, - thickness/2*CLHEP::cm, - dy1GirderElement*CLHEP::cm, - dy2GirderElement*CLHEP::cm, - elementSizeInR/2*CLHEP::cm); + girderElement = new GeoTrd(thickness/2*GeoModelKernelUnits::cm, + thickness/2*GeoModelKernelUnits::cm, + dy1GirderElement*GeoModelKernelUnits::cm, + dy2GirderElement*GeoModelKernelUnits::cm, + elementSizeInR/2*GeoModelKernelUnits::cm); switch(m_dbManager->TIGRmaterial()) { @@ -1465,9 +1469,9 @@ void TileGeoSectionBuilder::fillGirder(GeoPhysVol*& mother, } pvGirderElement = new GeoPhysVol(lvGirderElement); - tfGirderElement = new GeoTransform(HepGeom::Translate3D(0., - elementOffsetInY*CLHEP::cm, - (elementRC-(tilb_rmax + tile_rmax)/2)*CLHEP::cm)); + tfGirderElement = new GeoTransform(GeoTrf::Translate3D(0., + elementOffsetInY*GeoModelKernelUnits::cm, + (elementRC-(tilb_rmax + tile_rmax)/2)*GeoModelKernelUnits::cm)); mother->add(tfGirderElement); mother->add(pvGirderElement); } @@ -1509,7 +1513,7 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, // InDetServices if (m_matLArServices == 0) - { m_matLArServices = new GeoMaterial("LArServices", 2.5*CLHEP::gram/CLHEP::cm3); + { m_matLArServices = new GeoMaterial("LArServices", 2.5*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); m_matLArServices->add(shieldSteel, 0.20); m_matLArServices->add(copper, 0.60); m_matLArServices->add(matRubber, 0.10); @@ -1519,7 +1523,7 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, // m_matIronHalfDens if (m_matIronHalfDens == 0) - { m_matIronHalfDens = new GeoMaterial("LArIronBox", 4.5*CLHEP::gram/CLHEP::cm3); + { m_matIronHalfDens = new GeoMaterial("LArIronBox", 4.5*GeoModelKernelUnits::gram/GeoModelKernelUnits::cm3); m_matIronHalfDens->add(shieldSteel, 0.80); m_matIronHalfDens->add(matRubber, 0.10); m_matIronHalfDens->add(copper, 0.10); @@ -1531,16 +1535,16 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, GeoTrd* fingerElementTrd = 0; GeoTrap* fingerElementTrap = 0; - GeoBox *fingerCablesL = NULL, *fingerCablesR = NULL; - GeoPhysVol *pvFingerElement = 0, *pvFingerCablesL = NULL, *pvFingerCablesR = NULL; - GeoLogVol *lvFingerElement = 0, *lvFingerCablesL = NULL, *lvFingerCablesR = NULL; - GeoTransform* tfFingerElement = 0, *tfFingerCables = NULL; + GeoBox *fingerCablesL{nullptr}, *fingerCablesR{nullptr}; + GeoPhysVol *pvFingerElement = 0, *pvFingerCablesL{nullptr}, *pvFingerCablesR{nullptr}; + GeoLogVol *lvFingerElement = 0, *lvFingerCablesL{nullptr}, *lvFingerCablesR{nullptr}; + GeoTransform* tfFingerElement = 0, *tfFingerCables{nullptr}; GeoTransform* ZrotateMod = 0; GeoTransform* yrotateMod = 0; GeoTransform* zrotateMod = 0; - const GeoMaterial *currentMaterial = NULL, *leftMaterial = NULL, *rightMaterial = NULL; + const GeoMaterial *currentMaterial{nullptr}, *leftMaterial{nullptr}, *rightMaterial{nullptr}; std::string currentName, leftName, rightName; int CurrentTicg = 100*sec_number + 1; @@ -1570,7 +1574,7 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, (*m_log) << MSG::DEBUG << "TileFinger: AirVolumeSize ="<< AirVolumeSize << endmsg; } } - if (elementZPozition*2-AirVolumeSize<-0.01) { // compare with zero with 0.1 CLHEP::mm precision + if (elementZPozition*2-AirVolumeSize<-0.01) { // compare with zero with 0.1 GeoModelKernelUnits::mm precision elementZPozition += AirVolumeShift; // shift all volumes keeping size } else { // resize finger cover with shims attached to it if(m_log->level()<=MSG::DEBUG) @@ -1616,26 +1620,26 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, if(m_dbManager->TICGshape()==1) { - fingerElementTrd = new GeoTrd(elementDz/2*CLHEP::cm, - elementDz/2*CLHEP::cm, - elementDy1/2*CLHEP::cm, - elementDy2/2*CLHEP::cm, - elementHeight/2*CLHEP::cm); + fingerElementTrd = new GeoTrd(elementDz/2*GeoModelKernelUnits::cm, + elementDz/2*GeoModelKernelUnits::cm, + elementDy1/2*GeoModelKernelUnits::cm, + elementDy2/2*GeoModelKernelUnits::cm, + elementHeight/2*GeoModelKernelUnits::cm); lvFingerElement = new GeoLogVol(currentName,fingerElementTrd,currentMaterial); } else if(m_dbManager->TICGshape()==2) { - fingerElementTrap = new GeoTrap(elementDz/2*CLHEP::cm, + fingerElementTrap = new GeoTrap(elementDz/2*GeoModelKernelUnits::cm, 0., 0., - elementHeight/2*CLHEP::cm, - elementDy2/2*CLHEP::cm, - elementDy1/2*CLHEP::cm, + elementHeight/2*GeoModelKernelUnits::cm, + elementDy2/2*GeoModelKernelUnits::cm, + elementDy1/2*GeoModelKernelUnits::cm, atan((elementDy1-elementDy2)/(2.*elementHeight)), - elementHeight/2*CLHEP::cm, - elementDy2/2*CLHEP::cm, - elementDy1/2*CLHEP::cm, + elementHeight/2*GeoModelKernelUnits::cm, + elementDy2/2*GeoModelKernelUnits::cm, + elementDy1/2*GeoModelKernelUnits::cm, atan((elementDy1-elementDy2)/(2.*elementHeight))); lvFingerElement = new GeoLogVol(currentName,fingerElementTrap,currentMaterial); @@ -1649,21 +1653,21 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, pvFingerElement = new GeoPhysVol(lvFingerElement); - tfFingerElement = new GeoTransform(HepGeom::Translate3D(elementZPozition*CLHEP::cm, - elementOffset*CLHEP::cm, - (elementRC-(tilb_rmax + tile_rmax)/2)*CLHEP::cm)); + tfFingerElement = new GeoTransform(GeoTrf::Translate3D(elementZPozition*GeoModelKernelUnits::cm, + elementOffset*GeoModelKernelUnits::cm, + (elementRC-(tilb_rmax + tile_rmax)/2)*GeoModelKernelUnits::cm)); mother->add(tfFingerElement); if (m_dbManager->TICGshape()==2) { if(elementOffset<0) { - ZrotateMod = new GeoTransform(HepGeom::RotateZ3D(180*CLHEP::deg)); + ZrotateMod = new GeoTransform(GeoTrf::RotateZ3D(180*GeoModelKernelUnits::deg)); mother->add(ZrotateMod); } - zrotateMod = new GeoTransform(HepGeom::RotateZ3D(90*CLHEP::deg)); - yrotateMod = new GeoTransform(HepGeom::RotateY3D(-90*CLHEP::deg)); + zrotateMod = new GeoTransform(GeoTrf::RotateZ3D(90*GeoModelKernelUnits::deg)); + yrotateMod = new GeoTransform(GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg)); mother->add(yrotateMod); mother->add(zrotateMod); } @@ -1733,17 +1737,17 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, << " LRflag= " << LRflag <<" Neg "<< boolNeg << endmsg; - GeoTransform *rotateY = new GeoTransform(HepGeom::RotateY3D(90*CLHEP::deg)); - GeoTransform *rotateZ = new GeoTransform(HepGeom::RotateZ3D(3*CLHEP::deg)); - GeoTransform *rotateZm = new GeoTransform(HepGeom::RotateZ3D(-3*CLHEP::deg)); + GeoTransform *rotateY = new GeoTransform(GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg)); + GeoTransform *rotateZ = new GeoTransform(GeoTrf::RotateZ3D(3*GeoModelKernelUnits::deg)); + GeoTransform *rotateZm = new GeoTransform(GeoTrf::RotateZ3D(-3*GeoModelKernelUnits::deg)); // Left (+phi) - fingerCablesL = new GeoBox(dXleft/2*CLHEP::cm, dY/2*CLHEP::cm, dZleft/2*CLHEP::cm); + fingerCablesL = new GeoBox(dXleft/2*GeoModelKernelUnits::cm, dY/2*GeoModelKernelUnits::cm, dZleft/2*GeoModelKernelUnits::cm); lvFingerCablesL = new GeoLogVol(leftName,fingerCablesL,leftMaterial); pvFingerCablesL = new GeoPhysVol(lvFingerCablesL); // Right (-phi) - fingerCablesR = new GeoBox(dXright/2*CLHEP::cm, dY/2*CLHEP::cm, dZright/2*CLHEP::cm); + fingerCablesR = new GeoBox(dXright/2*GeoModelKernelUnits::cm, dY/2*GeoModelKernelUnits::cm, dZright/2*GeoModelKernelUnits::cm); lvFingerCablesR = new GeoLogVol(rightName,fingerCablesR,rightMaterial); pvFingerCablesR = new GeoPhysVol(lvFingerCablesR); @@ -1755,9 +1759,9 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, { YpoFinger = elementOffset-5.4; } - tfFingerCables = new GeoTransform(HepGeom::Translate3D(elementZPozition*CLHEP::cm +0.5*CLHEP::cm -dZsaddleL*CLHEP::cm, - YpoFinger*CLHEP::cm, - (elementRC-(tilb_rmax + tile_rmax)/2)*CLHEP::cm)); + tfFingerCables = new GeoTransform(GeoTrf::Translate3D(elementZPozition*GeoModelKernelUnits::cm +0.5*GeoModelKernelUnits::cm -dZsaddleL*GeoModelKernelUnits::cm, + YpoFinger*GeoModelKernelUnits::cm, + (elementRC-(tilb_rmax + tile_rmax)/2)*GeoModelKernelUnits::cm)); mother->add(tfFingerCables); // inversion for negativ fingers, Left @@ -1778,9 +1782,9 @@ void TileGeoSectionBuilder::fillFinger(GeoPhysVol*& mother, { YpoFinger = -elementOffset+5.4; } - tfFingerCables = new GeoTransform(HepGeom::Translate3D(elementZPozition*CLHEP::cm +0.5*CLHEP::cm -dZsaddleR*CLHEP::cm, - YpoFinger*CLHEP::cm, - (elementRC-(tilb_rmax + tile_rmax)/2)*CLHEP::cm)); + tfFingerCables = new GeoTransform(GeoTrf::Translate3D(elementZPozition*GeoModelKernelUnits::cm +0.5*GeoModelKernelUnits::cm -dZsaddleR*GeoModelKernelUnits::cm, + YpoFinger*GeoModelKernelUnits::cm, + (elementRC-(tilb_rmax + tile_rmax)/2)*GeoModelKernelUnits::cm)); mother->add(tfFingerCables); // inversion for negativ fingers, Right @@ -1873,13 +1877,13 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, const GeoMaterial* matScin = m_theMaterialManager->getMaterial("tile::Scintillator"); //Cs hole parameters - double csHoleR = 0.45 * CLHEP::cm; - double csTubeOuterR = 0.4 * CLHEP::cm; - double csTubeInnerR = 0.3 * CLHEP::cm; - double csTubeOffCorr = 1.35 * CLHEP::cm; + double csHoleR = 0.45 * GeoModelKernelUnits::cm; + double csTubeOuterR = 0.4 * GeoModelKernelUnits::cm; + double csTubeInnerR = 0.3 * GeoModelKernelUnits::cm; + double csTubeOffCorr = 1.35 * GeoModelKernelUnits::cm; - double thicknessMother2 = thickness/2.*CLHEP::cm; - double heightMother2 = (m_dbManager->TILBrmax() - m_dbManager->TILBrmin())*CLHEP::cm/2.; + double thicknessMother2 = thickness/2.*GeoModelKernelUnits::cm; + double heightMother2 = (m_dbManager->TILBrmax() - m_dbManager->TILBrmin())*GeoModelKernelUnits::cm/2.; const bool removeGlue = (m_glue == 0 || m_glue == 2); @@ -1887,18 +1891,18 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, if (dzglue>0.0 && period_type<4 && !removeGlue) { const GeoMaterial* matGlue = m_theMaterialManager->getMaterial("tile::Glue"); - double dzglue2 = dzglue/2*CLHEP::cm; + double dzglue2 = dzglue/2*GeoModelKernelUnits::cm; dzglue2 = floor(dzglue2*1.0e+10)*1.0e-10; if (m_verbose) { - printdouble(" period thickness/2 = ",thickness/2*CLHEP::cm); - printdouble(" glue thickness/2 = ",dzglue/2*CLHEP::cm); + printdouble(" period thickness/2 = ",thickness/2*GeoModelKernelUnits::cm); + printdouble(" glue thickness/2 = ",dzglue/2*GeoModelKernelUnits::cm); printdouble("rounded thickness/2 = ",dzglue2); } - double dy1Glue = (m_dbManager->TILBrmin() * tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; - double dy2Glue = (m_dbManager->TILBrmax() * tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; - double heightGlue2 = (m_dbManager->TILBrmax() - m_dbManager->TILBrmin())*CLHEP::cm/2.; + double dy1Glue = (m_dbManager->TILBrmin() * tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; + double dy2Glue = (m_dbManager->TILBrmax() * tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; + double heightGlue2 = (m_dbManager->TILBrmax() - m_dbManager->TILBrmin())*GeoModelKernelUnits::cm/2.; checking("Glue 0", false, 4, dzglue2,dzglue2,dy1Glue,dy2Glue,heightGlue2); @@ -1912,16 +1916,16 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, idTag = new GeoIdentifierTag(j-CurrentScin); m_dbManager->SetCurrentScin(j); - double off0 = m_dbManager->SCNTrc()*CLHEP::cm - heightMother2; - double off = m_dbManager->SCNTdr()/2.*CLHEP::cm - csTubeOffCorr; + double off0 = m_dbManager->SCNTrc()*GeoModelKernelUnits::cm - heightMother2; + double off = m_dbManager->SCNTdr()/2.*GeoModelKernelUnits::cm - csTubeOffCorr; - HepGeom::Transform3D tfHole1 = HepGeom::Translate3D(0.,0.,(off0-off)) * HepGeom::RotateY3D(-90*CLHEP::deg); - HepGeom::Transform3D tfHole2 = HepGeom::Translate3D(0.,0.,(off0+off)) * HepGeom::RotateY3D(-90*CLHEP::deg); + GeoTrf::Transform3D tfHole1 = GeoTrf::Translate3D(0.,0.,(off0-off)) * GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); + GeoTrf::Transform3D tfHole2 = GeoTrf::Translate3D(0.,0.,(off0+off)) * GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); // air around iron rod, around Cs tube and inside Cs tube - GeoShape *air1 = new GeoTubs(csTubeOuterR, csHoleR, thicknessMother2, 0.,360.0 * CLHEP::deg); - GeoShape *air2 = new GeoTubs(csTubeOuterR, csHoleR, thicknessMother2, 0.,360.0 * CLHEP::deg); - GeoShape *air3 = new GeoTubs(0., csTubeInnerR, thicknessMother2, 0.,360.0 * CLHEP::deg); + GeoShape *air1 = new GeoTubs(csTubeOuterR, csHoleR, thicknessMother2, 0.,360.0 * GeoModelKernelUnits::deg); + GeoShape *air2 = new GeoTubs(csTubeOuterR, csHoleR, thicknessMother2, 0.,360.0 * GeoModelKernelUnits::deg); + GeoShape *air3 = new GeoTubs(0., csTubeInnerR, thicknessMother2, 0.,360.0 * GeoModelKernelUnits::deg); GeoLogVol * lvAir1 = new GeoLogVol("CsTubeAir1",air1,matAir); GeoLogVol * lvAir2 = new GeoLogVol("CsTubeAir2",air2,matAir); @@ -1961,26 +1965,26 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, if (glue) { if (m_verbose) - printdouble(" glue position = ",(-3.*dzglue/2-m_dbManager->TILBdzmast())*CLHEP::cm); - tfGlue = new GeoTransform(HepGeom::Translate3D((-3.*dzglue/2-m_dbManager->TILBdzmast())*CLHEP::cm,0.,0.)); + printdouble(" glue position = ",(-3.*dzglue/2-m_dbManager->TILBdzmast())*GeoModelKernelUnits::cm); + tfGlue = new GeoTransform(GeoTrf::Translate3D((-3.*dzglue/2-m_dbManager->TILBdzmast())*GeoModelKernelUnits::cm,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); if (m_verbose) - printdouble(" glue position = ",-dzglue/2*CLHEP::cm); - tfGlue = new GeoTransform(HepGeom::Translate3D(-dzglue/2*CLHEP::cm,0.,0.)); + printdouble(" glue position = ",-dzglue/2*GeoModelKernelUnits::cm); + tfGlue = new GeoTransform(GeoTrf::Translate3D(-dzglue/2*GeoModelKernelUnits::cm,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); if (m_verbose) - printdouble(" glue position = ",(dzglue/2+m_dbManager->TILBdzspac())*CLHEP::cm); - tfGlue = new GeoTransform(HepGeom::Translate3D((dzglue/2+m_dbManager->TILBdzspac())*CLHEP::cm,0.,0.)); + printdouble(" glue position = ",(dzglue/2+m_dbManager->TILBdzspac())*GeoModelKernelUnits::cm); + tfGlue = new GeoTransform(GeoTrf::Translate3D((dzglue/2+m_dbManager->TILBdzspac())*GeoModelKernelUnits::cm,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); if (m_verbose) - printdouble(" glue position = ",(thickness-dzglue)/2*CLHEP::cm); - tfGlue = new GeoTransform(HepGeom::Translate3D((thickness-dzglue)/2*CLHEP::cm,0.,0.)); + printdouble(" glue position = ",(thickness-dzglue)/2*GeoModelKernelUnits::cm); + tfGlue = new GeoTransform(GeoTrf::Translate3D((thickness-dzglue)/2*GeoModelKernelUnits::cm,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); } @@ -1999,15 +2003,15 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, scintiDeltaInPhi = (m_uShape > 0) ? 0.0 : m_dbManager->SCNTdphi(); thicknessWrapper = (m_dbManager->TILBdzspac() <= (scintiThickness + 2*scintiWrapInZ)) ? - (scintiThickness + 2*scintiWrapInZ)*CLHEP::cm: m_dbManager->TILBdzspac()*CLHEP::cm; + (scintiThickness + 2*scintiWrapInZ)*GeoModelKernelUnits::cm: m_dbManager->TILBdzspac()*GeoModelKernelUnits::cm; if (m_glue == 2) thicknessWrapper = std::max(thicknessWrapper - m_additionalIronLayer, scintiThickness); // create wrapper - heightWrapper = (scintiHeight + 2*scintiWrapInR)*CLHEP::cm; + heightWrapper = (scintiHeight + 2*scintiWrapInR)*GeoModelKernelUnits::cm; dy1Wrapper = ((scintiRC - scintiHeight/2 - scintiWrapInR + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; dy2Wrapper = ((scintiRC + scintiHeight/2 + scintiWrapInR + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; checking("Wrapper 0", true, 5, thicknessWrapper/2,thicknessWrapper/2,dy1Wrapper,dy2Wrapper,heightWrapper/2); @@ -2019,34 +2023,34 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, heightWrapper/2); if (m_csTube) { - wrapper = makeHoles(wrapper, csHoleR, thicknessWrapper/2, scintiHeight/2.*CLHEP::cm - csTubeOffCorr); + wrapper = makeHoles(wrapper, csHoleR, thicknessWrapper/2, scintiHeight/2.*GeoModelKernelUnits::cm - csTubeOffCorr); } lvWrapper = new GeoLogVol("Wrapper",wrapper,matAir); pvWrapper = new GeoPhysVol(lvWrapper); // create scintillator dy1Scintillator = ((scintiRC - scintiHeight/2 + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*GeoModelKernelUnits::cm; dy2Scintillator = ((scintiRC + scintiHeight/2 + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*GeoModelKernelUnits::cm; checking("Scintillator 0", true, 6, - scintiThickness/2*CLHEP::cm,scintiThickness/2*CLHEP::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*CLHEP::cm); + scintiThickness/2*GeoModelKernelUnits::cm,scintiThickness/2*GeoModelKernelUnits::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*GeoModelKernelUnits::cm); - scintillator = new GeoTrd(scintiThickness/2*CLHEP::cm, - scintiThickness/2*CLHEP::cm, + scintillator = new GeoTrd(scintiThickness/2*GeoModelKernelUnits::cm, + scintiThickness/2*GeoModelKernelUnits::cm, dy1Scintillator, dy2Scintillator, - scintiHeight/2*CLHEP::cm); + scintiHeight/2*GeoModelKernelUnits::cm); if (m_csTube) { - scintillator = makeHolesScint(scintillator, csHoleR, scintiThickness/2 * CLHEP::cm, scintiHeight/2.*CLHEP::cm - csTubeOffCorr); + scintillator = makeHolesScint(scintillator, csHoleR, scintiThickness/2 * GeoModelKernelUnits::cm, scintiHeight/2.*GeoModelKernelUnits::cm - csTubeOffCorr); } lvScintillator = new GeoLogVol("Scintillator",scintillator,matScin); pvScintillator = new GeoPhysVol(lvScintillator); // place scintillator in wrapper - tfScintillator = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfScintillator = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvWrapper->add(idTag); pvWrapper->add(tfScintillator); pvWrapper->add(pvScintillator); @@ -2054,13 +2058,13 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, //place wrapper in period if (m_verbose) { (*m_log) << MSG::VERBOSE <<" X scintiZPos= "<<scintiZPos; - printdouble(" ==> ",(scintiZPos*thickness+m_dbManager->TILBdzspac()/2)*CLHEP::cm); + printdouble(" ==> ",(scintiZPos*thickness+m_dbManager->TILBdzspac()/2)*GeoModelKernelUnits::cm); (*m_log) << MSG::VERBOSE <<" Y scintiRC= "<<scintiRC <<endmsg; } - tfWrapper = new GeoTransform(HepGeom::Translate3D((scintiZPos*thickness+m_dbManager->TILBdzspac()/2)*CLHEP::cm, + tfWrapper = new GeoTransform(GeoTrf::Translate3D((scintiZPos*thickness+m_dbManager->TILBdzspac()/2)*GeoModelKernelUnits::cm, 0., - (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*CLHEP::cm)); + (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*GeoModelKernelUnits::cm)); mother->add(idTag); mother->add(tfWrapper); mother->add(pvWrapper); @@ -2075,14 +2079,14 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, if (glue) { if (m_verbose) - printdouble(" glue position = ",(dzglue + m_dbManager->TILBdzmast())*CLHEP::cm/2); - tfGlue = new GeoTransform(HepGeom::Translate3D((dzglue + m_dbManager->TILBdzmast())*CLHEP::cm/2,0.,0.)); + printdouble(" glue position = ",(dzglue + m_dbManager->TILBdzmast())*GeoModelKernelUnits::cm/2); + tfGlue = new GeoTransform(GeoTrf::Translate3D((dzglue + m_dbManager->TILBdzmast())*GeoModelKernelUnits::cm/2,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); if (m_verbose) - printdouble(" glue position = ",-(dzglue + m_dbManager->TILBdzmast())*CLHEP::cm/2); - tfGlue = new GeoTransform(HepGeom::Translate3D(-(dzglue + m_dbManager->TILBdzmast())*CLHEP::cm/2,0.,0.)); + printdouble(" glue position = ",-(dzglue + m_dbManager->TILBdzmast())*GeoModelKernelUnits::cm/2); + tfGlue = new GeoTransform(GeoTrf::Translate3D(-(dzglue + m_dbManager->TILBdzmast())*GeoModelKernelUnits::cm/2,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); } @@ -2101,15 +2105,15 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, scintiDeltaInPhi = (m_uShape > 0) ? 0.0 : m_dbManager->SCNTdphi(); thicknessWrapper = (m_dbManager->TILBdzspac() <= (scintiThickness + 2*scintiWrapInZ)) ? - (scintiThickness + 2*scintiWrapInZ)*CLHEP::cm: m_dbManager->TILBdzspac()*CLHEP::cm; + (scintiThickness + 2*scintiWrapInZ)*GeoModelKernelUnits::cm: m_dbManager->TILBdzspac()*GeoModelKernelUnits::cm; if (m_glue == 2) thicknessWrapper = std::max(thicknessWrapper - m_additionalIronLayer, scintiThickness); // create wrapper - heightWrapper = (scintiHeight + 2*scintiWrapInR)*CLHEP::cm; + heightWrapper = (scintiHeight + 2*scintiWrapInR)*GeoModelKernelUnits::cm; dy1Wrapper = ((scintiRC - scintiHeight/2 - scintiWrapInR + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; dy2Wrapper = ((scintiRC + scintiHeight/2 + scintiWrapInR + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; checking("Wrapper 1", true, 5, thicknessWrapper/2,thicknessWrapper/2,dy1Wrapper,dy2Wrapper,heightWrapper/2); @@ -2121,34 +2125,34 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, heightWrapper/2); if (m_csTube) { - wrapper = makeHoles(wrapper, csHoleR, thicknessWrapper/2, scintiHeight/2.*CLHEP::cm - csTubeOffCorr); + wrapper = makeHoles(wrapper, csHoleR, thicknessWrapper/2, scintiHeight/2.*GeoModelKernelUnits::cm - csTubeOffCorr); } lvWrapper = new GeoLogVol("Wrapper",wrapper,matAir); pvWrapper = new GeoPhysVol(lvWrapper); // create scintillator dy1Scintillator = ((scintiRC - scintiHeight/2 + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*GeoModelKernelUnits::cm; dy2Scintillator = ((scintiRC + scintiHeight/2 + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*GeoModelKernelUnits::cm; checking("Scintillator 1", true, 6, - scintiThickness/2*CLHEP::cm,scintiThickness/2*CLHEP::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*CLHEP::cm); + scintiThickness/2*GeoModelKernelUnits::cm,scintiThickness/2*GeoModelKernelUnits::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*GeoModelKernelUnits::cm); - scintillator = new GeoTrd(scintiThickness/2*CLHEP::cm, - scintiThickness/2*CLHEP::cm, + scintillator = new GeoTrd(scintiThickness/2*GeoModelKernelUnits::cm, + scintiThickness/2*GeoModelKernelUnits::cm, dy1Scintillator, dy2Scintillator, - scintiHeight/2*CLHEP::cm); + scintiHeight/2*GeoModelKernelUnits::cm); if (m_csTube) { - scintillator = makeHolesScint(scintillator, csHoleR, scintiThickness/2 * CLHEP::cm, scintiHeight/2.*CLHEP::cm - csTubeOffCorr); + scintillator = makeHolesScint(scintillator, csHoleR, scintiThickness/2 * GeoModelKernelUnits::cm, scintiHeight/2.*GeoModelKernelUnits::cm - csTubeOffCorr); } lvScintillator = new GeoLogVol("Scintillator",scintillator,matScin); pvScintillator = new GeoPhysVol(lvScintillator); // place scintillator in wrapper - tfScintillator = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfScintillator = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvWrapper->add(idTag); pvWrapper->add(tfScintillator); pvWrapper->add(pvScintillator); @@ -2156,13 +2160,13 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, //place wrapper in period if (m_verbose) { (*m_log) << MSG::VERBOSE <<" X scintiZPos= "<<scintiZPos; - printdouble(" ==> ",(2*scintiZPos+0.5)*(thickness-m_dbManager->TILBdzspac())*CLHEP::cm); + printdouble(" ==> ",(2*scintiZPos+0.5)*(thickness-m_dbManager->TILBdzspac())*GeoModelKernelUnits::cm); (*m_log) << MSG::VERBOSE <<" Y scintiRC= "<<scintiRC <<endmsg; } - tfWrapper = new GeoTransform(HepGeom::Translate3D((2*scintiZPos+0.5)*(thickness-m_dbManager->TILBdzspac())*CLHEP::cm, + tfWrapper = new GeoTransform(GeoTrf::Translate3D((2*scintiZPos+0.5)*(thickness-m_dbManager->TILBdzspac())*GeoModelKernelUnits::cm, 0., - (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*CLHEP::cm)); + (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*GeoModelKernelUnits::cm)); mother->add(idTag); mother->add(tfWrapper); mother->add(pvWrapper); @@ -2177,26 +2181,26 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, if (glue) { if (m_verbose) - printdouble(" glue position = ",(-thickness + dzglue)*CLHEP::cm/2); - tfGlue = new GeoTransform(HepGeom::Translate3D((-thickness + dzglue)*CLHEP::cm/2,0.,0.)); + printdouble(" glue position = ",(-thickness + dzglue)*GeoModelKernelUnits::cm/2); + tfGlue = new GeoTransform(GeoTrf::Translate3D((-thickness + dzglue)*GeoModelKernelUnits::cm/2,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); if (m_verbose) - printdouble(" glue position = ",((-thickness + 3*dzglue)+m_dbManager->TILBdzmast())/2*CLHEP::cm); - tfGlue = new GeoTransform(HepGeom::Translate3D(((-thickness + 3*dzglue)+m_dbManager->TILBdzmast())/2*CLHEP::cm,0.,0.)); + printdouble(" glue position = ",((-thickness + 3*dzglue)+m_dbManager->TILBdzmast())/2*GeoModelKernelUnits::cm); + tfGlue = new GeoTransform(GeoTrf::Translate3D(((-thickness + 3*dzglue)+m_dbManager->TILBdzmast())/2*GeoModelKernelUnits::cm,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); if (m_verbose) - printdouble(" glue position = ",dzglue/2*CLHEP::cm); - tfGlue = new GeoTransform(HepGeom::Translate3D(dzglue/2*CLHEP::cm,0.,0.)); + printdouble(" glue position = ",dzglue/2*GeoModelKernelUnits::cm); + tfGlue = new GeoTransform(GeoTrf::Translate3D(dzglue/2*GeoModelKernelUnits::cm,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); if (m_verbose) - printdouble(" glue position = ",(3.*dzglue/2 + m_dbManager->TILBdzmast())*CLHEP::cm); - tfGlue = new GeoTransform(HepGeom::Translate3D((3.*dzglue/2 + m_dbManager->TILBdzmast())*CLHEP::cm,0.,0.)); + printdouble(" glue position = ",(3.*dzglue/2 + m_dbManager->TILBdzmast())*GeoModelKernelUnits::cm); + tfGlue = new GeoTransform(GeoTrf::Translate3D((3.*dzglue/2 + m_dbManager->TILBdzmast())*GeoModelKernelUnits::cm,0.,0.)); mother->add(tfGlue); mother->add(pvGlue); } @@ -2215,16 +2219,16 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, scintiDeltaInPhi = (m_uShape > 0) ? 0. : m_dbManager->SCNTdphi(); thicknessWrapper = (m_dbManager->TILBdzspac() <= (scintiThickness + 2*scintiWrapInZ)) ? - (scintiThickness + 2*scintiWrapInZ)*CLHEP::cm: m_dbManager->TILBdzspac()*CLHEP::cm; + (scintiThickness + 2*scintiWrapInZ)*GeoModelKernelUnits::cm: m_dbManager->TILBdzspac()*GeoModelKernelUnits::cm; if (m_glue == 2) thicknessWrapper = std::max(thicknessWrapper - m_additionalIronLayer, scintiThickness); // create wrapper - heightWrapper = (scintiHeight + 2*scintiWrapInR)*CLHEP::cm; + heightWrapper = (scintiHeight + 2*scintiWrapInR)*GeoModelKernelUnits::cm; dy1Wrapper = ((scintiRC - scintiHeight/2 - scintiWrapInR + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; dy2Wrapper = ((scintiRC + scintiHeight/2 + scintiWrapInR + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; checking("Wrapper 2", true, 5, thicknessWrapper/2,thicknessWrapper/2,dy1Wrapper,dy2Wrapper,heightWrapper/2); @@ -2236,34 +2240,34 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, heightWrapper/2); if (m_csTube) { - wrapper = makeHoles(wrapper, csHoleR, thicknessWrapper/2, scintiHeight/2.*CLHEP::cm - csTubeOffCorr); + wrapper = makeHoles(wrapper, csHoleR, thicknessWrapper/2, scintiHeight/2.*GeoModelKernelUnits::cm - csTubeOffCorr); } lvWrapper = new GeoLogVol("Wrapper",wrapper,matAir); pvWrapper = new GeoPhysVol(lvWrapper); // create scintillator dy1Scintillator = ((scintiRC - scintiHeight/2 + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*GeoModelKernelUnits::cm; dy2Scintillator = ((scintiRC + scintiHeight/2 + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*GeoModelKernelUnits::cm; checking("Scintillator 2", true, 6, - scintiThickness/2*CLHEP::cm,scintiThickness/2*CLHEP::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*CLHEP::cm); + scintiThickness/2*GeoModelKernelUnits::cm,scintiThickness/2*GeoModelKernelUnits::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*GeoModelKernelUnits::cm); - scintillator = new GeoTrd(scintiThickness/2*CLHEP::cm, - scintiThickness/2*CLHEP::cm, + scintillator = new GeoTrd(scintiThickness/2*GeoModelKernelUnits::cm, + scintiThickness/2*GeoModelKernelUnits::cm, dy1Scintillator, dy2Scintillator, - scintiHeight/2*CLHEP::cm); + scintiHeight/2*GeoModelKernelUnits::cm); if (m_csTube) { - scintillator = makeHolesScint(scintillator, csHoleR, scintiThickness/2 * CLHEP::cm, scintiHeight/2.*CLHEP::cm - csTubeOffCorr); + scintillator = makeHolesScint(scintillator, csHoleR, scintiThickness/2 * GeoModelKernelUnits::cm, scintiHeight/2.*GeoModelKernelUnits::cm - csTubeOffCorr); } lvScintillator = new GeoLogVol("Scintillator",scintillator,matScin); pvScintillator = new GeoPhysVol(lvScintillator); // place scintillator in wrapper - tfScintillator = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfScintillator = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvWrapper->add(idTag); pvWrapper->add(tfScintillator); pvWrapper->add(pvScintillator); @@ -2271,13 +2275,13 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, //place wrapper in period if (m_verbose) { (*m_log) << MSG::VERBOSE <<" X scintiZPos= "<<scintiZPos; - printdouble(" ==> ",(scintiZPos*thickness-m_dbManager->TILBdzspac()/2)*CLHEP::cm); + printdouble(" ==> ",(scintiZPos*thickness-m_dbManager->TILBdzspac()/2)*GeoModelKernelUnits::cm); (*m_log) << MSG::VERBOSE <<" Y scintiRC= "<<scintiRC <<endmsg; } - tfWrapper = new GeoTransform(HepGeom::Translate3D((scintiZPos*thickness-m_dbManager->TILBdzspac()/2)*CLHEP::cm, + tfWrapper = new GeoTransform(GeoTrf::Translate3D((scintiZPos*thickness-m_dbManager->TILBdzspac()/2)*GeoModelKernelUnits::cm, 0., - (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*CLHEP::cm)); + (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*GeoModelKernelUnits::cm)); mother->add(idTag); mother->add(tfWrapper); mother->add(pvWrapper); @@ -2301,18 +2305,18 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, scintiDeltaInPhi = (m_uShape > 0) ? 0.0 : m_dbManager->SCNTdphi(); thicknessWrapper = (m_dbManager->TILBdzspac() <= (scintiThickness + 2*scintiWrapInZ)) ? - (scintiThickness + 2*scintiWrapInZ)*CLHEP::cm: m_dbManager->TILBdzspac()*CLHEP::cm; + (scintiThickness + 2*scintiWrapInZ)*GeoModelKernelUnits::cm: m_dbManager->TILBdzspac()*GeoModelKernelUnits::cm; if (m_glue == 2) thicknessWrapper = std::max(thicknessWrapper - m_additionalIronLayer, scintiThickness); if(scintiZPos<0) { idTag = new GeoIdentifierTag(j-CurrentScin); // create wrapper - heightWrapper = (scintiHeight + 2*scintiWrapInR)*CLHEP::cm; + heightWrapper = (scintiHeight + 2*scintiWrapInR)*GeoModelKernelUnits::cm; dy1Wrapper = ((scintiRC - scintiHeight/2 - scintiWrapInR + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; dy2Wrapper = ((scintiRC + scintiHeight/2 + scintiWrapInR + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2)*GeoModelKernelUnits::cm; checking("Wrapper 3", true, 5, thicknessWrapper/2,thicknessWrapper/2,dy1Wrapper,dy2Wrapper,heightWrapper/2); @@ -2324,34 +2328,34 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, heightWrapper/2); if (m_csTube) { - wrapper = makeHoles(wrapper, csHoleR, thicknessWrapper/2, scintiHeight/2.*CLHEP::cm - csTubeOffCorr); + wrapper = makeHoles(wrapper, csHoleR, thicknessWrapper/2, scintiHeight/2.*GeoModelKernelUnits::cm - csTubeOffCorr); } lvWrapper = new GeoLogVol("Wrapper",wrapper,matAir); pvWrapper = new GeoPhysVol(lvWrapper); // create scintillator dy1Scintillator = ((scintiRC - scintiHeight/2 + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*GeoModelKernelUnits::cm; dy2Scintillator = ((scintiRC + scintiHeight/2 + m_dbManager->TILBrmin()) * - tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*CLHEP::cm; + tan_delta_phi_2 - m_dbManager->TILBphigap()/2 - scintiDeltaInPhi)*GeoModelKernelUnits::cm; checking("Scintillator 3", true, 6, - scintiThickness/2*CLHEP::cm,scintiThickness/2*CLHEP::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*CLHEP::cm); + scintiThickness/2*GeoModelKernelUnits::cm,scintiThickness/2*GeoModelKernelUnits::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*GeoModelKernelUnits::cm); - scintillator = new GeoTrd(scintiThickness/2*CLHEP::cm, - scintiThickness/2*CLHEP::cm, + scintillator = new GeoTrd(scintiThickness/2*GeoModelKernelUnits::cm, + scintiThickness/2*GeoModelKernelUnits::cm, dy1Scintillator, dy2Scintillator, - scintiHeight/2*CLHEP::cm); + scintiHeight/2*GeoModelKernelUnits::cm); if (m_csTube) { - scintillator = makeHolesScint(scintillator, csHoleR, scintiThickness/2 * CLHEP::cm, scintiHeight/2.*CLHEP::cm - csTubeOffCorr); + scintillator = makeHolesScint(scintillator, csHoleR, scintiThickness/2 * GeoModelKernelUnits::cm, scintiHeight/2.*GeoModelKernelUnits::cm - csTubeOffCorr); } lvScintillator = new GeoLogVol("Scintillator",scintillator,matScin); pvScintillator = new GeoPhysVol(lvScintillator); // place scintillator in wrapper - tfScintillator = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfScintillator = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvWrapper->add(idTag); pvWrapper->add(tfScintillator); pvWrapper->add(pvScintillator); @@ -2362,9 +2366,9 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, (*m_log) << MSG::VERBOSE <<" Y scintiRC= "<<scintiRC <<endmsg; } - tfWrapper = new GeoTransform(HepGeom::Translate3D(0., + tfWrapper = new GeoTransform(GeoTrf::Translate3D(0., 0., - (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*CLHEP::cm)); + (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*GeoModelKernelUnits::cm)); mother->add(idTag); mother->add(tfWrapper); mother->add(pvWrapper); @@ -2397,13 +2401,13 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, scintiDeltaInPhi = m_dbManager->SCNTdphi(); // don't need to check m_uShape for single scintillator // create wrapper - heightWrapper = (scintiHeight + 2*scintiWrapInR)*CLHEP::cm; - thicknessWrapper = (scintiThickness + 2*scintiWrapInZ)*CLHEP::cm; + heightWrapper = (scintiHeight + 2*scintiWrapInR)*GeoModelKernelUnits::cm; + thicknessWrapper = (scintiThickness + 2*scintiWrapInZ)*GeoModelKernelUnits::cm; if (m_glue == 2) thicknessWrapper = std::max(thicknessWrapper - m_additionalIronLayer, scintiThickness); - double thicknessEnvelope = (m_dbManager->TILBdzmodul()*CLHEP::cm - thicknessWrapper); // along phi thickness is twice bigger than along Z - dy1Wrapper = dy1Period - thicknessEnvelope + ((scintiRC - scintiHeight/2. - scintiWrapInR)*tanphi)*CLHEP::cm; - dy2Wrapper = dy1Period - thicknessEnvelope + ((scintiRC + scintiHeight/2. + scintiWrapInR)*tanphi)*CLHEP::cm; + double thicknessEnvelope = (m_dbManager->TILBdzmodul()*GeoModelKernelUnits::cm - thicknessWrapper); // along phi thickness is twice bigger than along Z + dy1Wrapper = dy1Period - thicknessEnvelope + ((scintiRC - scintiHeight/2. - scintiWrapInR)*tanphi)*GeoModelKernelUnits::cm; + dy2Wrapper = dy1Period - thicknessEnvelope + ((scintiRC + scintiHeight/2. + scintiWrapInR)*tanphi)*GeoModelKernelUnits::cm; if(m_log->level()<=MSG::DEBUG) (*m_log) << MSG::DEBUG <<"Envelope thickness is " << thicknessEnvelope <<endmsg; @@ -2419,22 +2423,22 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, pvWrapper = new GeoPhysVol(lvWrapper); // create scintillator - dy1Scintillator = dy1Period - thicknessEnvelope + ((scintiRC - scintiHeight/2.)*tanphi - scintiDeltaInPhi)*CLHEP::cm; - dy2Scintillator = dy1Period - thicknessEnvelope + ((scintiRC + scintiHeight/2.)*tanphi - scintiDeltaInPhi)*CLHEP::cm; + dy1Scintillator = dy1Period - thicknessEnvelope + ((scintiRC - scintiHeight/2.)*tanphi - scintiDeltaInPhi)*GeoModelKernelUnits::cm; + dy2Scintillator = dy1Period - thicknessEnvelope + ((scintiRC + scintiHeight/2.)*tanphi - scintiDeltaInPhi)*GeoModelKernelUnits::cm; checking("Scintillator 4", true, 6, - scintiThickness/2*CLHEP::cm,scintiThickness/2*CLHEP::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*CLHEP::cm); + scintiThickness/2*GeoModelKernelUnits::cm,scintiThickness/2*GeoModelKernelUnits::cm,dy1Scintillator,dy2Scintillator,scintiHeight/2*GeoModelKernelUnits::cm); - scintillator = new GeoTrd(scintiThickness/2*CLHEP::cm, - scintiThickness/2*CLHEP::cm, + scintillator = new GeoTrd(scintiThickness/2*GeoModelKernelUnits::cm, + scintiThickness/2*GeoModelKernelUnits::cm, dy1Scintillator, dy2Scintillator, - scintiHeight/2*CLHEP::cm); + scintiHeight/2*GeoModelKernelUnits::cm); lvScintillator = new GeoLogVol("Scintillator",scintillator,matScin); pvScintillator = new GeoPhysVol(lvScintillator); // place scintillator in wrapper - tfScintillator = new GeoTransform(HepGeom::Translate3D(0.,0.,0.)); + tfScintillator = new GeoTransform(GeoTrf::Translate3D(0.,0.,0.)); pvWrapper->add(idTag); pvWrapper->add(tfScintillator); pvWrapper->add(pvScintillator); @@ -2445,9 +2449,9 @@ void TileGeoSectionBuilder::fillPeriod(GeoPhysVol*& mother, (*m_log) << MSG::VERBOSE <<" Y scintiRC= "<<scintiRC <<endmsg; } - tfWrapper = new GeoTransform(HepGeom::Translate3D(0., + tfWrapper = new GeoTransform(GeoTrf::Translate3D(0., 0., - (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*CLHEP::cm)); + (scintiRC-(m_dbManager->TILBrmax()-m_dbManager->TILBrmin())/2)*GeoModelKernelUnits::cm)); mother->add(idTag); mother->add(tfWrapper); mother->add(pvWrapper); @@ -2534,16 +2538,16 @@ void TileGeoSectionBuilder::fillDescriptor(TileDetDescriptor*& descriptor, float drGap[] = {450., 380., 313., 341., 478., 362.}; if (addPlates) { - rBarrel[0] -= 10*CLHEP::mm/2; - rBarrel[2] += 40*CLHEP::mm/2; - drBarrel[0] += 10*CLHEP::mm; - drBarrel[2] += 40*CLHEP::mm; - rExtended[0] -= 10*CLHEP::mm/2; - rExtended[2] += 40*CLHEP::mm/2; - drExtended[0] += 10*CLHEP::mm; - drExtended[2] += 40*CLHEP::mm; - rGap[1] += 40*CLHEP::mm/2; - drGap[1] += 40*CLHEP::mm; + rBarrel[0] -= 10*GeoModelKernelUnits::mm/2; + rBarrel[2] += 40*GeoModelKernelUnits::mm/2; + drBarrel[0] += 10*GeoModelKernelUnits::mm; + drBarrel[2] += 40*GeoModelKernelUnits::mm; + rExtended[0] -= 10*GeoModelKernelUnits::mm/2; + rExtended[2] += 40*GeoModelKernelUnits::mm/2; + drExtended[0] += 10*GeoModelKernelUnits::mm; + drExtended[2] += 40*GeoModelKernelUnits::mm; + rGap[1] += 40*GeoModelKernelUnits::mm/2; + drGap[1] += 40*GeoModelKernelUnits::mm; } int indHardcoded = 0; @@ -2796,10 +2800,10 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, dzPeriod = m_extendedPeriodThickness; } - rMin = m_dbManager->TILBrmin() *CLHEP::cm; - if (addPlates) rMin -= m_dbManager->TILBdrfront() *CLHEP::cm; + rMin = m_dbManager->TILBrmin() *GeoModelKernelUnits::cm; + if (addPlates) rMin -= m_dbManager->TILBdrfront() *GeoModelKernelUnits::cm; CurrentScin = 100*m_dbManager->TILBsection() + 1; - //dzMaster = m_dbManager->TILBdzmast()*CLHEP::cm; + //dzMaster = m_dbManager->TILBdzmast()*GeoModelKernelUnits::cm; /** Initialize rMin, rMax vectors - once per region Initial values for zMin - leftmost edge @@ -2811,13 +2815,13 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, if ( (j == CurrentScin + m_dbManager->TILBnscin() - 1) && addPlates ) { // use end of the master as end of last cell - rMax = m_dbManager->TILBrmax()*CLHEP::cm; + rMax = m_dbManager->TILBrmax()*GeoModelKernelUnits::cm; } else { double tileSize=m_dbManager->SCNTdr(); if (m_dbManager->SCNTdrw() > 0) // round to integer for all tiles except gap scin tileSize=round(tileSize); - rMax = (m_dbManager->TILBrmin() + m_dbManager->SCNTrc() + tileSize/2)*CLHEP::cm; + rMax = (m_dbManager->TILBrmin() + m_dbManager->SCNTrc() + tileSize/2)*GeoModelKernelUnits::cm; } rmins.push_back(rMin); @@ -2825,19 +2829,19 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, rMin = rMax; if(detector == TILE_REGION_CENTRAL) { - zmins.push_back((-m_dbManager->TILBdzmast()/2 - m_barrelGlue*(1./CLHEP::cm) - -(m_dbManager->TILBdzmodul()/2-m_dbManager->TILBdzend1()))*CLHEP::cm); - zEnd1Lim = (-m_dbManager->TILBdzmodul()/2+m_dbManager->TILBdzend1())*CLHEP::cm; - zEnd2Lim = ( m_dbManager->TILBdzmodul()/2-m_dbManager->TILBdzend2())*CLHEP::cm; - zEnd1 = (-m_dbManager->TILBdzmodul()/2)*CLHEP::cm; - zEnd2 = ( m_dbManager->TILBdzmodul()/2)*CLHEP::cm; + zmins.push_back((-m_dbManager->TILBdzmast()/2 - m_barrelGlue*(1./GeoModelKernelUnits::cm) + -(m_dbManager->TILBdzmodul()/2-m_dbManager->TILBdzend1()))*GeoModelKernelUnits::cm); + zEnd1Lim = (-m_dbManager->TILBdzmodul()/2+m_dbManager->TILBdzend1())*GeoModelKernelUnits::cm; + zEnd2Lim = ( m_dbManager->TILBdzmodul()/2-m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm; + zEnd1 = (-m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; + zEnd2 = ( m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; } else { - zmins.push_back((m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2 + m_dbManager->TILBdzend1())*CLHEP::cm); - zEnd1Lim = (m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2+m_dbManager->TILBdzend1()+0.001)*CLHEP::cm; - zEnd2Lim = (m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2-m_dbManager->TILBdzend2()-0.001)*CLHEP::cm; - zEnd1 = (m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2)*CLHEP::cm; - zEnd2 = (m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2)*CLHEP::cm; + zmins.push_back((m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2 + m_dbManager->TILBdzend1())*GeoModelKernelUnits::cm); + zEnd1Lim = (m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2+m_dbManager->TILBdzend1()+0.001)*GeoModelKernelUnits::cm; + zEnd2Lim = (m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2-m_dbManager->TILBdzend2()-0.001)*GeoModelKernelUnits::cm; + zEnd1 = (m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; + zEnd2 = (m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; } zmaxs.push_back(0.); @@ -3002,7 +3006,7 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, << cellDim->getRMax(jj) << " " << cellDim->getZMin(jj) << " " << cellDim->getZMax(jj) << "\n"; - std::cout << " >> Cell Volume is " << cellDim->getVolume()*(1./CLHEP::cm3) << " cm^3\n"; + std::cout << " >> Cell Volume is " << cellDim->getVolume()*(1./GeoModelKernelUnits::cm3) << " cm^3\n"; if(detector != TILE_REGION_CENTRAL) { @@ -3012,7 +3016,7 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, << cellDimNeg->getRMax(jj) << " " << cellDimNeg->getZMin(jj) << " " << cellDimNeg->getZMax(jj) << "\n"; - std::cout << " >> CellNeg Volume is " << cellDimNeg->getVolume()*(1./CLHEP::cm3) << " cm^3\n"; + std::cout << " >> CellNeg Volume is " << cellDimNeg->getVolume()*(1./GeoModelKernelUnits::cm3) << " cm^3\n"; } } /* ------------------------------------------------------------------------------------------------ */ @@ -3048,8 +3052,8 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, m_dbManager->SetNextTiclInDet(); } - rMin = m_dbManager->TILBrmin()*CLHEP::cm; - if (addPlates) rMin -= m_dbManager->TILBdrfront() *CLHEP::cm; + rMin = m_dbManager->TILBrmin()*GeoModelKernelUnits::cm; + if (addPlates) rMin -= m_dbManager->TILBdrfront() *GeoModelKernelUnits::cm; CurrentScin = 100*m_dbManager->TILBsection() + 1; for (unsigned int j = CurrentScin; j < (CurrentScin + m_dbManager->TILBnscin()); j++) @@ -3058,33 +3062,33 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, if ( (j == CurrentScin + m_dbManager->TILBnscin() - 1) && addPlates ) { /** use end of the master as end of last cell */ - rMax = m_dbManager->TILBrmax()*CLHEP::cm; + rMax = m_dbManager->TILBrmax()*GeoModelKernelUnits::cm; /** subtract from C10 thickness of D4 front plate */ if (addPlates && sec) - rMax -= m_dbManager->TILBdrfront()*CLHEP::cm; + rMax -= m_dbManager->TILBdrfront()*GeoModelKernelUnits::cm; } else { double tileSize=m_dbManager->SCNTdr(); if (m_dbManager->SCNTdrw() > 0) /** round to integer for all tiles except gap scin */ tileSize=round(tileSize); - rMax = (m_dbManager->TILBrmin() + m_dbManager->SCNTrc() + tileSize/2)*CLHEP::cm; + rMax = (m_dbManager->TILBrmin() + m_dbManager->SCNTrc() + tileSize/2)*GeoModelKernelUnits::cm; } rmins.push_back(rMin); rmaxs.push_back(rMax); rMin = rMax; - zEnd1Lim = (m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2+m_dbManager->TILBdzend1()+0.001)*CLHEP::cm; - zEnd2Lim = (m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2-m_dbManager->TILBdzend2()-0.001)*CLHEP::cm; - zEnd1 = (m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2)*CLHEP::cm; - zEnd2 = (m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2)*CLHEP::cm; + zEnd1Lim = (m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2+m_dbManager->TILBdzend1()+0.001)*GeoModelKernelUnits::cm; + zEnd2Lim = (m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2-m_dbManager->TILBdzend2()-0.001)*GeoModelKernelUnits::cm; + zEnd1 = (m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; + zEnd2 = (m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm; if ( addPlates ) { - zmins.push_back((m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2)*CLHEP::cm); - zmaxs.push_back((m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2)*CLHEP::cm); + zmins.push_back((m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm); + zmaxs.push_back((m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm); } else { - zmins.push_back((m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2 + m_dbManager->TILBdzend1())*CLHEP::cm); - zmaxs.push_back((m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2 - m_dbManager->TILBdzend2())*CLHEP::cm); + zmins.push_back((m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2 + m_dbManager->TILBdzend1())*GeoModelKernelUnits::cm); + zmaxs.push_back((m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2 - m_dbManager->TILBdzend2())*GeoModelKernelUnits::cm); } } @@ -3134,7 +3138,7 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, << cellDim->getRMax(jj) << " " << cellDim->getZMin(jj) << " " << cellDim->getZMax(jj) << "\n"; - std::cout<< " >> Cell Volume is " << cellDim->getVolume()*(1./CLHEP::cm3) << " cm^3\n"; + std::cout<< " >> Cell Volume is " << cellDim->getVolume()*(1./GeoModelKernelUnits::cm3) << " cm^3\n"; std::cout << " >> CellDimNeg contains " << cellDimNeg->getNRows() << " rows\n"; for(unsigned int jj=0; jj<cellDimNeg->getNRows(); jj++) @@ -3142,7 +3146,7 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, << cellDimNeg->getRMax(jj) << " " << cellDimNeg->getZMin(jj) << " " << cellDimNeg->getZMax(jj) << "\n"; - std::cout << " >> CellNeg Volume is " << cellDimNeg->getVolume()*(1./CLHEP::cm3) << " cm^3\n"; + std::cout << " >> CellNeg Volume is " << cellDimNeg->getVolume()*(1./GeoModelKernelUnits::cm3) << " cm^3\n"; } /* -------------------------------------------- */ } @@ -3165,20 +3169,20 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, CurrentScin = 100*m_dbManager->TILBsection()+1; } - rMin = m_dbManager->TILBrmin()*CLHEP::cm; + rMin = m_dbManager->TILBrmin()*GeoModelKernelUnits::cm; // Initialize rMin, rMax, zMin, zMax vectors for (unsigned int j = CurrentScin; j < (CurrentScin + m_dbManager->TILBnscin()); j++) { m_dbManager->SetCurrentScin(j); - rMax = rMin + m_dbManager->SCNTdr()*CLHEP::cm; + rMax = rMin + m_dbManager->SCNTdr()*GeoModelKernelUnits::cm; rmins.push_back(rMin); rmaxs.push_back(rMax); rMin = rMax; - zmins.push_back((m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2)*CLHEP::cm); - zmaxs.push_back((m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2)*CLHEP::cm); + zmins.push_back((m_dbManager->TILBzoffset() - m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm); + zmaxs.push_back((m_dbManager->TILBzoffset() + m_dbManager->TILBdzmodul()/2)*GeoModelKernelUnits::cm); } // Iterate through scintillators and create corresponding TileCellDim objects (+/-) @@ -3226,7 +3230,7 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, << cellDim->getRMax(jj) << " " << cellDim->getZMin(jj) << " " << cellDim->getZMax(jj) << "\n"; - std::cout << " >> Cell Volume is " << cellDim->getVolume()*(1./CLHEP::cm3) << " cm^3\n"; + std::cout << " >> Cell Volume is " << cellDim->getVolume()*(1./GeoModelKernelUnits::cm3) << " cm^3\n"; std::cout << " >> CellDimNeg contains " << cellDimNeg->getNRows() << " rows\n"; for(unsigned int jj=0; jj<cellDimNeg->getNRows(); jj++) @@ -3234,7 +3238,7 @@ void TileGeoSectionBuilder::computeCellDim(TileDetDescrManager*& manager, << cellDimNeg->getRMax(jj) << " " << cellDimNeg->getZMin(jj) << " " << cellDimNeg->getZMax(jj) << "\n"; - std::cout << " >> CellNeg Volume is " << cellDimNeg->getVolume()*(1./CLHEP::cm3) << " cm^3\n"; + std::cout << " >> CellNeg Volume is " << cellDimNeg->getVolume()*(1./GeoModelKernelUnits::cm3) << " cm^3\n"; } /* -------------------------------------------- */ } @@ -3276,10 +3280,10 @@ void TileGeoSectionBuilder::calculateZ(int detector, // first - find position in ideal world before Z-shift and misalignment if (detector == TILE_REGION_CENTRAL) { // need to split one cylinder in pos/neg halves - float zmin=m_dbManager->TILBzoffset()/2 * CLHEP::cm ; - float zmax=zmin+m_dbManager->TILBdzmodul()/2 * CLHEP::cm ; + float zmin=m_dbManager->TILBzoffset()/2 * GeoModelKernelUnits::cm ; + float zmax=zmin+m_dbManager->TILBdzmodul()/2 * GeoModelKernelUnits::cm ; if (sample==3) { // fix for D0 cell - float D0size = 560.58/307*40 * CLHEP::cm; // size of D0 along Z in CLHEP::cm + float D0size = 560.58/307*40 * GeoModelKernelUnits::cm; // size of D0 along Z in GeoModelKernelUnits::cm // FIXME:: should be taken from DB if (side>0) // positive zmin = - D0size/2; @@ -3289,13 +3293,13 @@ void TileGeoSectionBuilder::calculateZ(int detector, zcenter = (zmin+zmax)/2; dz = (zmax-zmin); } else if (detector == TILE_REGION_GAP && (sample > 9) ){ - zcenter=m_dbManager->TILBzoffset() * CLHEP::cm ; + zcenter=m_dbManager->TILBzoffset() * GeoModelKernelUnits::cm ; m_dbManager->SetCurrentScin(100*m_dbManager->TILBsection() + 1 ); - dz = m_dbManager->SCNTdt()*CLHEP::cm; + dz = m_dbManager->SCNTdt()*GeoModelKernelUnits::cm; } else { - zcenter=m_dbManager->TILBzoffset() * CLHEP::cm ; - dz=m_dbManager->TILBdzmodul() * CLHEP::cm ; + zcenter=m_dbManager->TILBzoffset() * GeoModelKernelUnits::cm ; + dz=m_dbManager->TILBdzmodul() * GeoModelKernelUnits::cm ; } // apply zshift from ideal pseudo-projective eta (which includes alignment also!) @@ -3421,18 +3425,18 @@ void TileGeoSectionBuilder::printdouble(const char * name, double val) } const GeoShape * TileGeoSectionBuilder::makeHolesScint(const GeoShape * mother, double R, double H2, double off, double off0) { - GeoShape *hole = new GeoTubs(0., R, H2, 0., 360.0 * CLHEP::deg); - const GeoShapeUnion& scintUnion = hole->add( *hole << HepGeom::Translate3D((off0-off*2.0),0.,0.)); - HepGeom::Transform3D tfHole = HepGeom::Translate3D(0.,0.,(off0-off)) * HepGeom::RotateY3D(90*CLHEP::deg); + GeoShape *hole = new GeoTubs(0., R, H2, 0., 360.0 * GeoModelKernelUnits::deg); + const GeoShapeUnion& scintUnion = hole->add( *hole << GeoTrf::Translate3D((off0-off*2.0),0.,0.)); + GeoTrf::Transform3D tfHole = GeoTrf::Translate3D(0.,0.,(off0-off)) * GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); const GeoShape & motherWithHoles = (mother->subtract(scintUnion<<tfHole)); return &motherWithHoles; } const GeoShape * TileGeoSectionBuilder::makeHoles(const GeoShape * mother, double R, double H2, double off, double off0) { - GeoShape *hole1 = new GeoTubs(0., R, H2, 0., 360.0 * CLHEP::deg); - GeoShape *hole2 = new GeoTubs(0., R, H2, 0., 360.0 * CLHEP::deg); - HepGeom::Transform3D tfHole1 = HepGeom::Translate3D(0.,0.,(off0-off)) * HepGeom::RotateY3D(-90*CLHEP::deg); - HepGeom::Transform3D tfHole2 = HepGeom::Translate3D(0.,0.,(off0+off)) * HepGeom::RotateY3D(-90*CLHEP::deg); + GeoShape *hole1 = new GeoTubs(0., R, H2, 0., 360.0 * GeoModelKernelUnits::deg); + GeoShape *hole2 = new GeoTubs(0., R, H2, 0., 360.0 * GeoModelKernelUnits::deg); + GeoTrf::Transform3D tfHole1 = GeoTrf::Translate3D(0.,0.,(off0-off)) * GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); + GeoTrf::Transform3D tfHole2 = GeoTrf::Translate3D(0.,0.,(off0+off)) * GeoTrf::RotateY3D(-90*GeoModelKernelUnits::deg); const GeoShape & motherWithHoles = (mother->subtract((*hole1)<<tfHole1).subtract((*hole2)<<tfHole2)); return &motherWithHoles; } diff --git a/TileCalorimeter/TileGeoModel/src/TileTBFactory.cxx b/TileCalorimeter/TileGeoModel/src/TileTBFactory.cxx index bf473a1e053..8a25b3f8aff 100755 --- a/TileCalorimeter/TileGeoModel/src/TileTBFactory.cxx +++ b/TileCalorimeter/TileGeoModel/src/TileTBFactory.cxx @@ -19,9 +19,11 @@ #include "GeoModelKernel/GeoNameTag.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoShapeShift.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" -#include "CLHEP/GenericFunctions/AbsFunction.hh" -#include "CLHEP/GenericFunctions/Variable.hh" +#include "GeoGenericFunctions/AbsFunction.h" +#include "GeoGenericFunctions/Variable.h" #include "GeoModelKernel/GeoXF.h" #include "GeoModelKernel/GeoSerialTransformer.h" #include "GeoModelKernel/GeoSerialIdentifier.h" @@ -36,7 +38,7 @@ #include <iostream> #include <algorithm> -using namespace Genfun; +using namespace GeoGenfun; using namespace GeoXF; @@ -179,11 +181,11 @@ void TileTBFactory::create(GeoPhysVol *world) //int EnvNumLayer = 64; //dbManager->SetCurrentSection(TileDddbManager::TILE_BARREL); //double deltaPhi = 360./dbManager->TILEnmodul(); - GeoTubs* tileTBEnv = new GeoTubs(RInMin * CLHEP::cm, - ROutMax * CLHEP::cm, - tileTBEnvThickness/2.0 * CLHEP::cm, - PhiMin*CLHEP::deg, - (PhiMax - PhiMin)*CLHEP::deg); + GeoTubs* tileTBEnv = new GeoTubs(RInMin * GeoModelKernelUnits::cm, + ROutMax * GeoModelKernelUnits::cm, + tileTBEnvThickness/2.0 * GeoModelKernelUnits::cm, + PhiMin*GeoModelKernelUnits::deg, + (PhiMax - PhiMin)*GeoModelKernelUnits::deg); (*m_log) << MSG::DEBUG << "TileTB envelope parameters: " << " length=" << tileTBEnvThickness << " cm" @@ -211,19 +213,19 @@ void TileTBFactory::create(GeoPhysVol *world) //----------------------- BUILDING ENVELOPES------------------------ // It may be usful on the way of universalization - // GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * CLHEP::cm, - // (dbManager->GetEnvRout()) * CLHEP::cm, - // (dbManager->GetEnvZLength())/2.0 * CLHEP::cm, - // 0.0 * deltaPhi * CLHEP::deg, - // (NumberOfMod)*deltaPhi*CLHEP::deg); + // GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * GeoModelKernelUnits::cm, + // (dbManager->GetEnvRout()) * GeoModelKernelUnits::cm, + // (dbManager->GetEnvZLength())/2.0 * GeoModelKernelUnits::cm, + // 0.0 * deltaPhi * GeoModelKernelUnits::deg, + // (NumberOfMod)*deltaPhi*GeoModelKernelUnits::deg); if(EnvType == 1) { - GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * CLHEP::cm, - (dbManager->GetEnvRout()) * CLHEP::cm, - (dbManager->GetEnvZLength() - 2 * BFingerLength)/2.0 * CLHEP::cm, - 0.0 * CLHEP::deg, - NumberOfMod*deltaPhi*CLHEP::deg); + GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvRout()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvZLength() - 2 * BFingerLength)/2.0 * GeoModelKernelUnits::cm, + 0.0 * GeoModelKernelUnits::deg, + NumberOfMod*deltaPhi*GeoModelKernelUnits::deg); GeoTubs* barrelMother = GeneralMother; GeoLogVol* lvBarrelMother = new GeoLogVol("Barrel",barrelMother,matAir); @@ -239,11 +241,11 @@ void TileTBFactory::create(GeoPhysVol *world) //Envelopes for two barrel fingers dbManager->SetCurrentTifg(2); //use small size for barrel finger ! - GeoTubs* fingerMother = new GeoTubs(FingerRmin*CLHEP::cm, - dbManager->GetEnvRout()*CLHEP::cm, - BFingerLength/2.*CLHEP::cm, - 0.0 * CLHEP::deg, - NumberOfMod*deltaPhi*CLHEP::deg); + GeoTubs* fingerMother = new GeoTubs(FingerRmin*GeoModelKernelUnits::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, + BFingerLength/2.*GeoModelKernelUnits::cm, + 0.0 * GeoModelKernelUnits::deg, + NumberOfMod*deltaPhi*GeoModelKernelUnits::deg); GeoLogVol* lvFingerMother = new GeoLogVol("Finger",fingerMother,matAir); pvFingerMotherPos = new GeoFullPhysVol(lvFingerMother); @@ -258,11 +260,11 @@ void TileTBFactory::create(GeoPhysVol *world) } if(EnvType == 3) { - GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * CLHEP::cm, - (dbManager->GetEnvRout()) * CLHEP::cm, - (dbManager->GetEnvZLength() - EBFingerLength)/2.0 * CLHEP::cm, - 0.0 * CLHEP::deg, - NumberOfMod*deltaPhi*CLHEP::deg); + GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvRout()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvZLength() - EBFingerLength)/2.0 * GeoModelKernelUnits::cm, + 0.0 * GeoModelKernelUnits::deg, + NumberOfMod*deltaPhi*GeoModelKernelUnits::deg); GeoTubs* ebarrelMotherPos = GeneralMother; GeoLogVol* lvEBarrelMotherPos = new GeoLogVol("EBarrel",ebarrelMotherPos,matAir); @@ -276,11 +278,11 @@ void TileTBFactory::create(GeoPhysVol *world) << endmsg; //Envelope for finger separately - GeoTubs* fingerMother = new GeoTubs(FingerRmin*CLHEP::cm, - dbManager->GetEnvRout()*CLHEP::cm, - EBFingerLength/2.*CLHEP::cm, - 0.0 * CLHEP::deg, - NumberOfMod*deltaPhi*CLHEP::deg); + GeoTubs* fingerMother = new GeoTubs(FingerRmin*GeoModelKernelUnits::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, + EBFingerLength/2.*GeoModelKernelUnits::cm, + 0.0 * GeoModelKernelUnits::deg, + NumberOfMod*deltaPhi*GeoModelKernelUnits::deg); GeoLogVol* lvEFingerMother = new GeoLogVol("EFinger",fingerMother,matAir); pvEFingerMotherPos = new GeoFullPhysVol(lvEFingerMother); @@ -294,11 +296,11 @@ void TileTBFactory::create(GeoPhysVol *world) } if(EnvType == 2) { - GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * CLHEP::cm, - (dbManager->GetEnvRout()) * CLHEP::cm, - (dbManager->GetEnvZLength() - EBFingerLength)/2.0 * CLHEP::cm, - 0.0 * CLHEP::deg, - NumberOfMod*deltaPhi*CLHEP::deg); + GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvRout()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvZLength() - EBFingerLength)/2.0 * GeoModelKernelUnits::cm, + 0.0 * GeoModelKernelUnits::deg, + NumberOfMod*deltaPhi*GeoModelKernelUnits::deg); GeoTubs* ebarrelMotherNeg = GeneralMother; GeoLogVol* lvEBarrelMotherNeg = new GeoLogVol("EBarrel",ebarrelMotherNeg,matAir); pvEBarrelMotherNeg = new GeoFullPhysVol(lvEBarrelMotherNeg); @@ -311,11 +313,11 @@ void TileTBFactory::create(GeoPhysVol *world) << endmsg; //Envelope for finger separately - GeoTubs* fingerMother = new GeoTubs(FingerRmin*CLHEP::cm, - dbManager->GetEnvRout()*CLHEP::cm, - EBFingerLength/2.*CLHEP::cm, - 0.0 * CLHEP::deg, - NumberOfMod*deltaPhi*CLHEP::deg); + GeoTubs* fingerMother = new GeoTubs(FingerRmin*GeoModelKernelUnits::cm, + dbManager->GetEnvRout()*GeoModelKernelUnits::cm, + EBFingerLength/2.*GeoModelKernelUnits::cm, + 0.0 * GeoModelKernelUnits::deg, + NumberOfMod*deltaPhi*GeoModelKernelUnits::deg); GeoLogVol* lvEFingerMother = new GeoLogVol("EFinger",fingerMother,matAir); pvEFingerMotherNeg = new GeoFullPhysVol(lvEFingerMother); @@ -329,11 +331,11 @@ void TileTBFactory::create(GeoPhysVol *world) } if(EnvType == 5) { - GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * CLHEP::cm, - (dbManager->GetEnvRout()) * CLHEP::cm, - (dbManager->GetEnvZLength())/2.0 * CLHEP::cm, - 0.0 * CLHEP::deg, - NumberOfMod*deltaPhi*CLHEP::deg); + GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvRout()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvZLength())/2.0 * GeoModelKernelUnits::cm, + 0.0 * GeoModelKernelUnits::deg, + NumberOfMod*deltaPhi*GeoModelKernelUnits::deg); GeoTubs* itcMother = GeneralMother; GeoLogVol* lvITCMother = new GeoLogVol("ITC",itcMother,matAir); @@ -348,11 +350,11 @@ void TileTBFactory::create(GeoPhysVol *world) } if(EnvType == 4) { - GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * CLHEP::cm, - (dbManager->GetEnvRout()) * CLHEP::cm, - (dbManager->GetEnvZLength())/2.0 * CLHEP::cm, - 0.0 * CLHEP::deg, - NumberOfMod*deltaPhi*CLHEP::deg); + GeoTubs* GeneralMother = new GeoTubs((dbManager->GetEnvRin()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvRout()) * GeoModelKernelUnits::cm, + (dbManager->GetEnvZLength())/2.0 * GeoModelKernelUnits::cm, + 0.0 * GeoModelKernelUnits::deg, + NumberOfMod*deltaPhi*GeoModelKernelUnits::deg); GeoTubs* itcMotherNeg = GeneralMother; GeoLogVol* lvITCMotherNeg = new GeoLogVol("ITC",itcMotherNeg,matAir); @@ -384,17 +386,17 @@ void TileTBFactory::create(GeoPhysVol *world) << endmsg; Variable varInd; - GENFUNCTION phiInd = deltaPhi*(varInd + ModCounter + 0.5) * CLHEP::deg; + GENFUNCTION phiInd = deltaPhi*(varInd + ModCounter + 0.5) * GeoModelKernelUnits::deg; //------------------- BARREL BLOCKS ------------------------------------- if( EnvType == 1 || EnvType == 0 ) { // normal barrel module or module zero dbManager->SetCurrentSectionByNumber(ModType); - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - (dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()) - dbManager->TILBdzmast()))/(2.*(2.*dbManager->TILBnperiod() - 1)); @@ -415,7 +417,7 @@ void TileTBFactory::create(GeoPhysVol *world) dzGlue, deltaPhi); - TRANSFUNCTION xfBarrelModuleMother = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfBarrelModuleMother = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stBarrelModuleMother = new GeoSerialTransformer(pvBarrelModuleMother, &xfBarrelModuleMother, @@ -431,10 +433,10 @@ void TileTBFactory::create(GeoPhysVol *world) // Trd - one finger mother - thicknessWedgeMother = dbManager->TIFGdz() * CLHEP::cm; - heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TIFGdz() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* fingerModuleMother = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -452,10 +454,10 @@ void TileTBFactory::create(GeoPhysVol *world) deltaPhi, m_testbeamGeometry, ModuleNcp, - thicknessWedgeMother*(1./CLHEP::cm)); + thicknessWedgeMother*(1./GeoModelKernelUnits::cm)); // --- Position N modules inside mother (positive/negative) ----- - TRANSFUNCTION xfFingerModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfFingerModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stFingerModuleMotherPos = new GeoSerialTransformer(pvFingerModuleMother, &xfFingerModuleMotherPos, @@ -463,7 +465,7 @@ void TileTBFactory::create(GeoPhysVol *world) pvFingerMotherPos->add(new GeoSerialIdentifier(ModPositionNumber)); pvFingerMotherPos->add(stFingerModuleMotherPos); - TRANSFUNCTION xfFingerModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfFingerModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stFingerModuleMotherNeg = new GeoSerialTransformer(pvFingerModuleMother, &xfFingerModuleMotherNeg, @@ -478,10 +480,10 @@ void TileTBFactory::create(GeoPhysVol *world) if((ModType == 2)&&(EnvType == 3)){ dbManager->SetCurrentSectionByNumber(ModType); // Trd - module mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.*dbManager->TILBnperiod()); @@ -502,7 +504,7 @@ void TileTBFactory::create(GeoPhysVol *world) dzGlue, deltaPhi); - TRANSFUNCTION xfEBarrelModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfEBarrelModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stEBarrelModuleMotherPos = new GeoSerialTransformer(pvEBarrelModuleMotherPos, &xfEBarrelModuleMotherPos, @@ -516,10 +518,10 @@ void TileTBFactory::create(GeoPhysVol *world) dbManager->SetCurrentTifg(2); //barrel efinger (small) // Trd - one finger mother - thicknessWedgeMother = dbManager->TIFGdz() * CLHEP::cm; - heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TIFGdz() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* efingerModuleMother = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -540,7 +542,7 @@ void TileTBFactory::create(GeoPhysVol *world) // --- Position N modules inside mother (positive/negative) ----- - TRANSFUNCTION xfEFingerModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfEFingerModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stEFingerModuleMotherPos = new GeoSerialTransformer(pvEFingerModuleMother, &xfEFingerModuleMotherPos, @@ -555,10 +557,10 @@ void TileTBFactory::create(GeoPhysVol *world) if((ModType == 2)&&(EnvType == 2)){ dbManager->SetCurrentSectionByNumber(ModType); // Trd - module mother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.*dbManager->TILBnperiod()); @@ -579,7 +581,7 @@ void TileTBFactory::create(GeoPhysVol *world) dzGlue, deltaPhi); - TRANSFUNCTION xfEBarrelModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfEBarrelModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+dbManager->TILBrminimal())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stEBarrelModuleMotherNeg = new GeoSerialTransformer(pvEBarrelModuleMotherNeg, &xfEBarrelModuleMotherNeg, @@ -594,10 +596,10 @@ void TileTBFactory::create(GeoPhysVol *world) //zEndSection = extOffset + dbManager->TILBdzmodul()/2. + dbManager->TILEzshift(); // Trd - one finger mother - thicknessWedgeMother = dbManager->TIFGdz() * CLHEP::cm; - heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TIFGdz() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILErmax() - dbManager->TILBrmax()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILErmax() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* efingerModuleMother = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -616,7 +618,7 @@ void TileTBFactory::create(GeoPhysVol *world) deltaPhi, m_testbeamGeometry); - TRANSFUNCTION xfEFingerModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfEFingerModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILErmax()+dbManager->TILBrmax())/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stEFingerModuleMotherNeg = new GeoSerialTransformer(pvEFingerModuleMother, &xfEFingerModuleMotherNeg, @@ -636,10 +638,10 @@ void TileTBFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); // Common mother for ITC1/2 modules - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - rMinITC) * CLHEP::cm; - dy1WedgeMother = rMinITC * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - rMinITC) * GeoModelKernelUnits::cm; + dy1WedgeMother = rMinITC * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* itcModuleMotherPos = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -656,10 +658,10 @@ void TileTBFactory::create(GeoPhysVol *world) // 2. Mother for frontplate (since it's short) //First submother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrmin()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrmin()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.*dbManager->TILBnperiod()); @@ -670,19 +672,19 @@ void TileTBFactory::create(GeoPhysVol *world) heightWedgeMother/2.); //Second submother - thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2) * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2) * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* plug2SubMother = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., dy1WedgeMother, dy2WedgeMother, heightWedgeMother/2.); - HepGeom::Translate3D plug1SubOffset(-dzITC2*CLHEP::cm/2., + GeoTrf::Translate3D plug1SubOffset(-dzITC2*GeoModelKernelUnits::cm/2., 0., - (dbManager->TILBrminimal()-dbManager->TILBrmaximal())*CLHEP::cm/2.); + (dbManager->TILBrminimal()-dbManager->TILBrmaximal())*GeoModelKernelUnits::cm/2.); const GeoShapeUnion& plug1ModuleMother = plug1SubMother->add(*plug2SubMother<<plug1SubOffset); GeoLogVol* lvPlug1ModuleMother = new GeoLogVol("Plug1Module",&plug1ModuleMother,matAir); @@ -697,9 +699,9 @@ void TileTBFactory::create(GeoPhysVol *world) ModuleNcp, dzITC2); - GeoTransform* tfPlug1ModuleMother = new GeoTransform(HepGeom::Translate3D(0., + GeoTransform* tfPlug1ModuleMother = new GeoTransform(GeoTrf::Translate3D(0., 0., - (dbManager->TILBrmin()-rMinITC)*CLHEP::cm/2.)); + (dbManager->TILBrmin()-rMinITC)*GeoModelKernelUnits::cm/2.)); pvITCModuleMotherPos->add(tfPlug1ModuleMother); @@ -707,10 +709,10 @@ void TileTBFactory::create(GeoPhysVol *world) //Mother volume for ITC2 dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - ((dbManager->TILBnperiod()-1)*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()) + dbManager->TILBdzspac()))/(4.*(dbManager->TILBnperiod() - 1)); GeoTrd* plug2ModuleMother = new GeoTrd(thicknessWedgeMother/2., @@ -732,13 +734,13 @@ void TileTBFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - GeoTransform* tfPlug2ModuleMother = new GeoTransform(HepGeom::Translate3D((dbManager->TILBdzmodul() - dzITC2)*CLHEP::cm/2., + GeoTransform* tfPlug2ModuleMother = new GeoTransform(GeoTrf::Translate3D((dbManager->TILBdzmodul() - dzITC2)*GeoModelKernelUnits::cm/2., 0., - (dbManager->TILBrmin() - dbManager->TILBrmaximal())*CLHEP::cm/2.)); + (dbManager->TILBrmin() - dbManager->TILBrmaximal())*GeoModelKernelUnits::cm/2.)); pvITCModuleMotherPos->add(tfPlug2ModuleMother); pvITCModuleMotherPos->add(pvPlug2ModuleMother); - TRANSFUNCTION xfITCModuleMotherPos = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+rMinITC)/2.*CLHEP::cm)*HepGeom::RotateX3D(180*CLHEP::deg)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfITCModuleMotherPos = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+rMinITC)/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateX3D(180*GeoModelKernelUnits::deg)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stITCModuleMotherPos = new GeoSerialTransformer(pvITCModuleMotherPos, &xfITCModuleMotherPos, @@ -758,10 +760,10 @@ void TileTBFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); // Common mother for ITC1/2 modules - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - rMinITC) * CLHEP::cm; - dy1WedgeMother = rMinITC * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - rMinITC) * GeoModelKernelUnits::cm; + dy1WedgeMother = rMinITC * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* itcModuleMotherNeg = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., @@ -778,10 +780,10 @@ void TileTBFactory::create(GeoPhysVol *world) // 2. Mother for frontplate (since it's short) //First submother - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrmin()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrmin()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - dbManager->TILBnperiod()*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()))/(4.*dbManager->TILBnperiod()); @@ -792,19 +794,19 @@ void TileTBFactory::create(GeoPhysVol *world) heightWedgeMother/2.); //Second submother - thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2) * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = (dbManager->TILBdzmodul() - dzITC2) * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmin() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmin() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; GeoTrd* plug2SubMother = new GeoTrd(thicknessWedgeMother/2., thicknessWedgeMother/2., dy1WedgeMother, dy2WedgeMother, heightWedgeMother/2.); - HepGeom::Translate3D plug1SubOffset(-dzITC2*CLHEP::cm/2., + GeoTrf::Translate3D plug1SubOffset(-dzITC2*GeoModelKernelUnits::cm/2., 0., - (dbManager->TILBrminimal()-dbManager->TILBrmaximal())*CLHEP::cm/2.); + (dbManager->TILBrminimal()-dbManager->TILBrmaximal())*GeoModelKernelUnits::cm/2.); const GeoShapeUnion& plug1ModuleMother = plug1SubMother->add(*plug2SubMother<<plug1SubOffset); GeoLogVol* lvPlug1ModuleMother = new GeoLogVol("Plug1Module",&plug1ModuleMother,matAir); @@ -820,9 +822,9 @@ void TileTBFactory::create(GeoPhysVol *world) ModuleNcp, dzITC2); - GeoTransform* tfPlug1ModuleMother = new GeoTransform(HepGeom::Translate3D(0., + GeoTransform* tfPlug1ModuleMother = new GeoTransform(GeoTrf::Translate3D(0., 0., - (dbManager->TILBrmin()-rMinITC)*CLHEP::cm/2.)); + (dbManager->TILBrmin()-rMinITC)*GeoModelKernelUnits::cm/2.)); pvITCModuleMotherNeg->add(tfPlug1ModuleMother); @@ -830,10 +832,10 @@ void TileTBFactory::create(GeoPhysVol *world) //Mother volume for ITC2 dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG2); - thicknessWedgeMother = dbManager->TILBdzmodul() * CLHEP::cm; - heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * CLHEP::cm; - dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; - dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*CLHEP::deg) * CLHEP::cm; + thicknessWedgeMother = dbManager->TILBdzmodul() * GeoModelKernelUnits::cm; + heightWedgeMother = (dbManager->TILBrmaximal() - dbManager->TILBrminimal()) * GeoModelKernelUnits::cm; + dy1WedgeMother = dbManager->TILBrminimal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; + dy2WedgeMother = dbManager->TILBrmaximal() * tan(deltaPhi/2.*GeoModelKernelUnits::deg) * GeoModelKernelUnits::cm; dzGlue = (dbManager->TILBdzmodul() - dbManager->TILBdzend1() - dbManager->TILBdzend2() - ((dbManager->TILBnperiod()-1)*2.*(dbManager->TILBdzmast() + dbManager->TILBdzspac()) + dbManager->TILBdzspac()))/(4.*(dbManager->TILBnperiod() - 1)); GeoTrd* plug2ModuleMother = new GeoTrd(thicknessWedgeMother/2., @@ -855,13 +857,13 @@ void TileTBFactory::create(GeoPhysVol *world) dbManager->SetCurrentSection(TileDddbManager::TILE_PLUG1); - GeoTransform* tfPlug2ModuleMother = new GeoTransform(HepGeom::Translate3D((dbManager->TILBdzmodul() - dzITC2)*CLHEP::cm/2., + GeoTransform* tfPlug2ModuleMother = new GeoTransform(GeoTrf::Translate3D((dbManager->TILBdzmodul() - dzITC2)*GeoModelKernelUnits::cm/2., 0., - (dbManager->TILBrmin() - dbManager->TILBrmaximal())*CLHEP::cm/2.)); + (dbManager->TILBrmin() - dbManager->TILBrmaximal())*GeoModelKernelUnits::cm/2.)); pvITCModuleMotherNeg->add(tfPlug2ModuleMother); pvITCModuleMotherNeg->add(pvPlug2ModuleMother); - TRANSFUNCTION xfITCModuleMotherNeg = Pow(HepGeom::RotateZ3D(1.0),phiInd)*HepGeom::TranslateX3D((dbManager->TILBrmaximal()+rMinITC)/2.*CLHEP::cm)*HepGeom::RotateY3D(90*CLHEP::deg); + TRANSFUNCTION xfITCModuleMotherNeg = Pow(GeoTrf::RotateZ3D(1.0),phiInd)*GeoTrf::TranslateX3D((dbManager->TILBrmaximal()+rMinITC)/2.*GeoModelKernelUnits::cm)*GeoTrf::RotateY3D(90*GeoModelKernelUnits::deg); GeoSerialTransformer* stITCModuleMotherNeg = new GeoSerialTransformer(pvITCModuleMotherNeg, &xfITCModuleMotherNeg, @@ -888,7 +890,7 @@ void TileTBFactory::create(GeoPhysVol *world) else { ztrans = 0; } - tfBarrelMother = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D((dbManager->GetEnvDPhi())*CLHEP::deg)); + tfBarrelMother = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D((dbManager->GetEnvDPhi())*GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning barrel with translation " << ztrans << " cm" << endmsg; GeoNameTag* ntBarrelModuleMother = new GeoNameTag("Barrel"); @@ -910,7 +912,7 @@ void TileTBFactory::create(GeoPhysVol *world) else { ztrans = 0; } - tfFingerMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D((dbManager->GetEnvDPhi())*CLHEP::deg)); + tfFingerMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D((dbManager->GetEnvDPhi())*GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning positive barrel finger with translation " << ztrans << " cm and rotation " << dbManager->GetEnvDPhi() << " deg " << endmsg; GeoNameTag* ntFingerMotherPos = new GeoNameTag("TileFingerPos"); @@ -932,7 +934,7 @@ void TileTBFactory::create(GeoPhysVol *world) else { ztrans = 0; } - tfFingerMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D((dbManager->GetEnvDPhi())*CLHEP::deg)); + tfFingerMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D((dbManager->GetEnvDPhi())*GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning negative barrel finger with translation " << ztrans << " cm and rotation " << dbManager->GetEnvDPhi() << " deg " << endmsg; GeoNameTag* ntFingerMotherNeg = new GeoNameTag("TileFingerNeg"); @@ -945,7 +947,7 @@ void TileTBFactory::create(GeoPhysVol *world) if(EnvType == 3) { // positive ext.barrel is always at positive boundary, after finger ztrans = (tileTBEnvThickness/2. - dbManager->GetEnvZLength()/2. - EBFingerLength/2.); - GeoTransform* tfEBarrelMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfEBarrelMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning positive ext.barrel with translation " << ztrans << " cm and rotation " << dbManager->GetEnvDPhi() << " deg " << endmsg; @@ -955,7 +957,7 @@ void TileTBFactory::create(GeoPhysVol *world) pvTileTBEnv->add(pvEBarrelMotherPos); ztrans = (tileTBEnvThickness/2. - EBFingerLength/2.); - GeoTransform* tfEFingerMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfEFingerMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning positive ext.barrel finger with translation " << ztrans << " cm and rotation " << dbManager->GetEnvDPhi() << " deg " << endmsg; @@ -968,7 +970,7 @@ void TileTBFactory::create(GeoPhysVol *world) if(EnvType == 2) { // negative ext.barrel is always at negative boundary, after finger ztrans = (-tileTBEnvThickness/2. + dbManager->GetEnvZLength()/2. + EBFingerLength/2.); - GeoTransform* tfEBarrelMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfEBarrelMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning negative ext.barrel with translation " << ztrans << " cm and rotation " << dbManager->GetEnvDPhi() << " deg " << endmsg; @@ -978,7 +980,7 @@ void TileTBFactory::create(GeoPhysVol *world) pvTileTBEnv->add(pvEBarrelMotherNeg); ztrans = (-tileTBEnvThickness/2. + EBFingerLength/2.); - GeoTransform* tfEFingerMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfEFingerMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning negative ext.barrel finger with translation " << ztrans << " cm and rotation " << dbManager->GetEnvDPhi() << " deg " << endmsg; @@ -991,7 +993,7 @@ void TileTBFactory::create(GeoPhysVol *world) if(EnvType == 5) { // positive ITC attached to positive ext.barrel ztrans = (tileTBEnvThickness/2. - ZLengthEBarrelPos - dbManager->GetEnvZLength()/2.); - GeoTransform* tfITCMotherPos = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfITCMotherPos = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning positive ITC with translation " << ztrans << " cm and rotation " << dbManager->GetEnvDPhi() << " deg " << endmsg; @@ -1003,7 +1005,7 @@ void TileTBFactory::create(GeoPhysVol *world) if(EnvType == 4) { // negative ITC attached to negative ext.barrel ztrans = (-tileTBEnvThickness/2. + ZLengthEBarrelNeg + dbManager->GetEnvZLength()/2.); - GeoTransform* tfITCMotherNeg = new GeoTransform(HepGeom::TranslateZ3D(ztrans*CLHEP::cm) * HepGeom::RotateZ3D(dbManager->GetEnvDPhi() * CLHEP::deg)); + GeoTransform* tfITCMotherNeg = new GeoTransform(GeoTrf::TranslateZ3D(ztrans*GeoModelKernelUnits::cm) * GeoTrf::RotateZ3D(dbManager->GetEnvDPhi() * GeoModelKernelUnits::deg)); (*m_log) << MSG::DEBUG << "Positioning negative ITC with translation " << ztrans << " cm and rotation " << dbManager->GetEnvDPhi() << " deg " << endmsg; @@ -1024,12 +1026,12 @@ void TileTBFactory::create(GeoPhysVol *world) dbManager->SetCurrentEnvByIndex(EnvCounter); int EnvType = dbManager->GetEnvType(); int NumberOfMod = dbManager->GetEnvNModules(); - float Zshift = dbManager->GetEnvZShift() * CLHEP::cm; + float Zshift = dbManager->GetEnvZShift() * GeoModelKernelUnits::cm; (*m_log) << MSG::DEBUG << "EnvCounter is " << EnvCounter << " EnvType is " << EnvType << " Nmodules is " << NumberOfMod - << " Zshift is " << Zshift*(1./CLHEP::cm) << " cm" + << " Zshift is " << Zshift*(1./GeoModelKernelUnits::cm) << " cm" << endmsg; if(EnvType == 1 || EnvType == 0) { // central barrel diff --git a/TileCalorimeter/TileRecUtils/src/TileCellBuilder.cxx b/TileCalorimeter/TileRecUtils/src/TileCellBuilder.cxx index 6475b62cbce..fc80db7a725 100644 --- a/TileCalorimeter/TileRecUtils/src/TileCellBuilder.cxx +++ b/TileCalorimeter/TileRecUtils/src/TileCellBuilder.cxx @@ -31,6 +31,7 @@ #include "StoreGate/ReadHandle.h" #include "StoreGate/WriteHandle.h" +#include "CLHEP/Units/SystemOfUnits.h" using CLHEP::MeV; // uncomment line below for debug output diff --git a/TileCalorimeter/TileTrackingGeometry/CMakeLists.txt b/TileCalorimeter/TileTrackingGeometry/CMakeLists.txt index 8eb89649d84..0463b37f08b 100644 --- a/TileCalorimeter/TileTrackingGeometry/CMakeLists.txt +++ b/TileCalorimeter/TileTrackingGeometry/CMakeLists.txt @@ -15,8 +15,6 @@ atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloDetDescr Control/CxxUtils Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel - DetectorDescription/GeoPrimitives TileCalorimeter/TileDetDescr Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv Tracking/TrkDetDescr/TrkDetDescrUtils @@ -27,13 +25,14 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( CLHEP ) find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_component( TileTrackingGeometry src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GaudiKernel TrkDetDescrInterfaces CaloDetDescrLib CxxUtils StoreGateLib SGtests GeoModelKernel GeoPrimitives TileDetDescr TrkDetDescrGeoModelCnv TrkDetDescrUtils TrkGeometry TrkSurfaces TrkVolumes ) + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} AthenaBaseComps GaudiKernel TrkDetDescrInterfaces CaloDetDescrLib CxxUtils StoreGateLib SGtests GeoPrimitives TileDetDescr TrkDetDescrGeoModelCnv TrkDetDescrUtils TrkGeometry TrkSurfaces TrkVolumes ) # Install files from the package: atlas_install_headers( TileTrackingGeometry ) diff --git a/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx b/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx index 98da0e7d926..17da0de6711 100755 --- a/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx +++ b/TileCalorimeter/TileTrackingGeometry/src/TileVolumeBuilder.cxx @@ -27,8 +27,7 @@ #include "GeoModelKernel/GeoPVConstLink.h" #include "GeoModelKernel/GeoVPhysVol.h" #include "GeoModelKernel/GeoVolumeCursor.h" -// Amg -#include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "GeoModelKernel/Units.h" // Trk #include "TrkDetDescrInterfaces/ITrackingVolumeHelper.h" #include "TrkDetDescrInterfaces/ITrackingVolumeCreator.h" @@ -49,18 +48,13 @@ #include "TrkSurfaces/CylinderBounds.h" #include "TrkSurfaces/DiscSurface.h" #include "TrkSurfaces/DiscBounds.h" -// CLHEP -#include "CLHEP/Units/SystemOfUnits.h" // Gaudi #include "GaudiKernel/MsgStream.h" // StoreGate #include "StoreGate/StoreGateSvc.h" #include "CxxUtils/make_unique.h" -using HepGeom::Transform3D; -using HepGeom::Translate3D; -using CLHEP::Hep3Vector; -using CLHEP::mm; +using GeoModelKernelUnits::mm; using CxxUtils::make_unique; // constructor @@ -268,13 +262,13 @@ const std::vector<const Trk::TrackingVolume*>* Tile::TileVolumeBuilder::tracking const GeoTubs* currentTubs = dynamic_cast<const GeoTubs*>(childShape); Trk::CylinderVolumeBounds* childCylVolBounds = currentTubs ? geoShapeToVolumeBounds.convert(currentTubs) : 0; // get the transform - Transform3D childTransform = currentVPhysVolLink->getXToChildVol(ichild); - double childZposition = childTransform.getTranslation().z(); + GeoTrf::Transform3D childTransform = currentVPhysVolLink->getXToChildVol(ichild); + double childZposition = childTransform.translation().z(); if (childCylVolBounds){ // screen output ATH_MSG_VERBOSE( " ---> CylinderVolumeBounds created as: " ); - ATH_MSG_VERBOSE( " ---> Position in z: " << childTransform.getTranslation().z() ); + ATH_MSG_VERBOSE( " ---> Position in z: " << childTransform.translation().z() ); ATH_MSG_VERBOSE( *childCylVolBounds ); // retrieve split radius from the TileBar2 exit surface @@ -823,7 +817,7 @@ void Tile::TileVolumeBuilder::printInfo(const PVConstLink pv) const std::cout << "New Tile Object:"<<lv->getName()<<", made of"<<lv->getMaterial()->getName()<<","<<lv->getShape()->type()<<std::endl; //m_geoShapeConverter->decodeShape(lv->getShape()); int igen=0; - Amg::Transform3D transf = Amg::CLHEPTransformToEigen(pv->getX()); + Amg::Transform3D transf = pv->getX(); printChildren(pv,igen,transf); } @@ -834,7 +828,7 @@ void Tile::TileVolumeBuilder::printChildren(const PVConstLink pv,int igen, Amg:: igen++; std::string cname; for (unsigned int ic=0; ic<nc; ic++) { - Amg::Transform3D transf = trIn*Amg::CLHEPTransformToEigen(pv->getXToChildVol(ic)); + Amg::Transform3D transf = trIn*pv->getXToChildVol(ic); // //std::cout << " dumping transform to subcomponent" << std::endl; diff --git a/Tracking/Acts/ActsGeometry/src/ActsDetectorElement.cxx b/Tracking/Acts/ActsGeometry/src/ActsDetectorElement.cxx index d2c3a95b26a..56c85d53d68 100644 --- a/Tracking/Acts/ActsGeometry/src/ActsDetectorElement.cxx +++ b/Tracking/Acts/ActsGeometry/src/ActsDetectorElement.cxx @@ -172,10 +172,10 @@ ActsDetectorElement::storeTransform(ActsAlignmentStore* gas) const Transform3D operator()(const InDetDD::SiDetectorElement* detElem) const { - HepGeom::Transform3D g2l + Amg::Transform3D g2l = detElem->getMaterialGeom()->getAbsoluteTransform(m_store); - return Amg::CLHEPTransformToEigen(g2l * detElem->recoToHitTransform()); + return g2l * Amg::CLHEPTransformToEigen(detElem->recoToHitTransform()); } Transform3D operator()(const InDetDD::TRT_BaseElement*) const @@ -206,10 +206,10 @@ ActsDetectorElement::getDefaultTransformMutexed() const Transform3D operator()(const InDetDD::SiDetectorElement* detElem) const { - HepGeom::Transform3D g2l + Amg::Transform3D g2l = detElem->getMaterialGeom()->getDefAbsoluteTransform(); - return Amg::CLHEPTransformToEigen(g2l * detElem->recoToHitTransform()); + return g2l * Amg::CLHEPTransformToEigen(detElem->recoToHitTransform()); } Transform3D operator()(const InDetDD::TRT_BaseElement*) const diff --git a/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/CMakeLists.txt b/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/CMakeLists.txt index 77e3a5d7d1b..ec8f8498dcc 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/CMakeLists.txt +++ b/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/CMakeLists.txt @@ -10,20 +10,19 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoPrimitives Tracking/TrkDetDescr/TrkGeometry PRIVATE - DetectorDescription/GeoModel/GeoModelKernel Tracking/TrkDetDescr/TrkVolumes ) # External dependencies: find_package( CLHEP ) find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( TrkDetDescrGeoModelCnv src/*.cxx PUBLIC_HEADERS TrkDetDescrGeoModelCnv INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} + PRIVATE_INCLUDE_DIRS ${GEOMODEL_INCLUDE_DIRS} LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoPrimitives TrkGeometry - PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelKernel TrkVolumes ) + PRIVATE_LINK_LIBRARIES ${GEOMODEL_LIBRARIES} TrkVolumes ) diff --git a/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/src/GeoMaterialConverter.cxx b/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/src/GeoMaterialConverter.cxx index ced74187ff3..3d46044d3d6 100755 --- a/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/src/GeoMaterialConverter.cxx +++ b/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/src/GeoMaterialConverter.cxx @@ -11,10 +11,10 @@ // GeoModelKernel #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/GeoElement.h" -// CLHEP -#include "CLHEP/Units/SystemOfUnits.h" +#include "GeoModelKernel/Units.h" -double Trk::GeoMaterialConverter::s_densityCnvFactor = 1./CLHEP::gram; + +double Trk::GeoMaterialConverter::s_densityCnvFactor = 1./GeoModelKernelUnits::gram; Trk::Material Trk::GeoMaterialConverter::convert(const GeoMaterial* gm) const { // get the obvious things @@ -30,7 +30,7 @@ Trk::Material Trk::GeoMaterialConverter::convert(const GeoMaterial* gm) const { for (int iEl=0; iEl<numberOfElements; iEl++){ const GeoElement* geoEl = gm->getElement(iEl); float fraction = gm->getFraction(iEl); - A += fraction*(geoEl->getA()/(CLHEP::gram)); + A += fraction*(geoEl->getA()/(GeoModelKernelUnits::gram)); Z += fraction*(geoEl->getZ()); } // return the result diff --git a/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/src/GeoShapeConverter.cxx b/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/src/GeoShapeConverter.cxx index 52de12f99ed..0533d79f2ec 100755 --- a/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/src/GeoShapeConverter.cxx +++ b/Tracking/TrkDetDescr/TrkDetDescrGeoModelCnv/src/GeoShapeConverter.cxx @@ -35,8 +35,8 @@ #include "GeoModelKernel/GeoPgon.h" #include "GeoModelKernel/GeoPara.h" #include "GeoModelKernel/GeoVolumeCursor.h" - -#include "GeoPrimitives/CLHEPtoEigenConverter.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" // #define DEBUG #ifdef DEBUG @@ -50,7 +50,7 @@ namespace { //commonly used axes const Amg::Vector3D gXAxis(1.0, 0.0, 0.0), gYAxis(0.0, 1.0, 0.0), gZAxis(0.0, 0.0, 1.0); //commonly used angles, ±90°, 180° - const double p90deg(90.0 * CLHEP::deg), m90deg(-90.0 * CLHEP::deg), p180deg(180.0 * CLHEP::deg); + const double p90deg(90.0 * GeoModelKernelUnits::deg), m90deg(-90.0 * GeoModelKernelUnits::deg), p180deg(180.0 * GeoModelKernelUnits::deg); } @@ -522,7 +522,7 @@ Trk::Volume* Trk::GeoShapeConverter::translateGeoShape(const GeoShape* sh, Amg:: if (!shift) return 0; const GeoShape* shA = shift->getOp(); //check this! - const Amg::Transform3D tr = Amg::CLHEPTransformToEigen(shift->getX()); + const Amg::Transform3D tr = shift->getX(); Amg::Transform3D newtransf = *transf * tr; Trk::Volume* vol = translateGeoShape(shA, &newtransf); return vol; @@ -602,9 +602,9 @@ void Trk::GeoShapeConverter::decodeShape(const GeoShape* sh) const if ( sh->type()=="Shift") { const GeoShapeShift* shift = dynamic_cast<const GeoShapeShift*> (sh); const GeoShape* shA = shift->getOp(); - const HepGeom::Transform3D transf = shift->getX(); - std::cout << "shifted by:transl:" <<transf.getTranslation() <<", rot:" - << transf[0][0]<<"," << transf[1][1] <<"," << transf[2][2] << std::endl; + const GeoTrf::Transform3D transf = shift->getX(); + std::cout << "shifted by:transl:" <<transf.translation() <<", rot:" + << transf(0,0)<<"," << transf(1,1) <<"," << transf(2,2) << std::endl; decodeShape(shA); } } diff --git a/Tracking/TrkDetDescr/TrkDetElementBase/CMakeLists.txt b/Tracking/TrkDetDescr/TrkDetElementBase/CMakeLists.txt index ac31e33995f..4e927fdc0a4 100644 --- a/Tracking/TrkDetDescr/TrkDetElementBase/CMakeLists.txt +++ b/Tracking/TrkDetDescr/TrkDetElementBase/CMakeLists.txt @@ -7,18 +7,18 @@ atlas_subdir( TrkDetElementBase ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoPrimitives DetectorDescription/Identifier Event/EventPrimitives ) # External dependencies: find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( TrkDetElementBase src/*.cxx PUBLIC_HEADERS TrkDetElementBase - INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoModelKernel GeoPrimitives Identifier EventPrimitives ) + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoPrimitives Identifier EventPrimitives ) diff --git a/Tracking/TrkDetDescr/TrkDetElementBase/TrkDetElementBase/TrkDetElementBase.h b/Tracking/TrkDetDescr/TrkDetElementBase/TrkDetElementBase/TrkDetElementBase.h index f878dba67d8..f9be125f01b 100755 --- a/Tracking/TrkDetDescr/TrkDetElementBase/TrkDetElementBase/TrkDetElementBase.h +++ b/Tracking/TrkDetDescr/TrkDetElementBase/TrkDetElementBase/TrkDetElementBase.h @@ -9,13 +9,14 @@ #ifndef TRKDETELEMENTBASE_TRKDETELEMENTBASE_H #define TRKDETELEMENTBASE_TRKDETELEMENTBASE_H -#include "GeoModelKernel/GeoVDetectorElement.h" -#include "Identifier/Identifier.h" -#include "Identifier/IdentifierHash.h" // Math & Geometry library #include "GeoPrimitives/GeoPrimitives.h" #include "EventPrimitives/EventPrimitives.h" +#include "GeoModelKernel/GeoVDetectorElement.h" +#include "Identifier/Identifier.h" +#include "Identifier/IdentifierHash.h" + namespace Trk { diff --git a/Tracking/TrkEventCnv/TrkJiveXML/src/TrackRetriever.cxx b/Tracking/TrkEventCnv/TrkJiveXML/src/TrackRetriever.cxx index 11e2d09e7ee..81cb4272b04 100644 --- a/Tracking/TrkEventCnv/TrkJiveXML/src/TrackRetriever.cxx +++ b/Tracking/TrkEventCnv/TrkJiveXML/src/TrackRetriever.cxx @@ -35,6 +35,8 @@ // for detector id #include "AtlasDetDescr/AtlasDetectorID.h" +#include "GaudiKernel/SystemOfUnits.h" + namespace JiveXML { ///Namespace for all helper functions namespace TrackRetrieverHelpers { @@ -61,10 +63,10 @@ namespace JiveXML { //write out p_T if ((perigee->parameters())[Trk::qOverP]==0) pt.push_back(DataType(9999.)); - else pt.push_back( (perigee->charge() > 0) ? DataType(perigee->pT()/CLHEP::GeV) : DataType((-perigee->pT())/CLHEP::GeV)); + else pt.push_back( (perigee->charge() > 0) ? DataType(perigee->pT()/Gaudi::Units::GeV) : DataType((-perigee->pT())/Gaudi::Units::GeV)); - d0.push_back(DataType((perigee->parameters())[Trk::d0]/CLHEP::cm)); - z0.push_back(DataType(perigee->parameters()[Trk::z0]/CLHEP::cm)); + d0.push_back(DataType((perigee->parameters())[Trk::d0]/Gaudi::Units::cm)); + z0.push_back(DataType(perigee->parameters()[Trk::z0]/Gaudi::Units::cm)); phi0.push_back(DataType(perigee->parameters()[Trk::phi0])); if (perigee->parameters()[Trk::theta] == 0.) cotTheta.push_back(DataType(9999.)); diff --git a/Tracking/TrkExtrapolation/TrkExSTEP_Propagator/src/STEP_Propagator.cxx b/Tracking/TrkExtrapolation/TrkExSTEP_Propagator/src/STEP_Propagator.cxx index da02025c958..e8445ef286c 100755 --- a/Tracking/TrkExtrapolation/TrkExSTEP_Propagator/src/STEP_Propagator.cxx +++ b/Tracking/TrkExtrapolation/TrkExSTEP_Propagator/src/STEP_Propagator.cxx @@ -31,6 +31,7 @@ // CLHEP #include "CLHEP/Random/RandFlat.h" #include "CLHEP/Random/RandGauss.h" +#include "CLHEP/Units/PhysicalConstants.h" //Gaudi #include "GaudiKernel/PhysicalConstants.h" #include "EventPrimitives/EventPrimitivesToStringConverter.h" diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx index fc62ca93544..ca27bf8d4fa 100755 --- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx +++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx @@ -13,6 +13,7 @@ /////////////////////////////////////////////////////////////////// #include "GaudiKernel/MsgStream.h" +#include "GaudiKernel/SystemOfUnits.h" #include "StoreGate/StoreGateSvc.h" #include "TrkTrack/Track.h" @@ -929,7 +930,7 @@ void Trk::DistributedKalmanFilter::getMagneticField(double gP[3], double* pB) co pB[0]=0.0;pB[1]=0.0;pB[2]=0.0; double field[3]; m_MagFieldSvc->getField(gP,field);//field is returned in kT - for(int i=0;i<3;i++) pB[i]=field[i]/CLHEP::kilogauss;//convert to kG + for(int i=0;i<3;i++) pB[i]=field[i]/Gaudi::Units::kilogauss;//convert to kG } // fit a set of PrepRawData objects diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx index 78036c33da2..58a83461be5 100644 --- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx +++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx @@ -64,6 +64,10 @@ #include "MagFieldInterfaces/IMagFieldSvc.h" +#include "CLHEP/Matrix/Matrix.h" +#include "CLHEP/Matrix/SymMatrix.h" +#include "CLHEP/Matrix/Vector.h" +#include "CLHEP/Units/SystemOfUnits.h" #include "AtlasDetDescr/AtlasDetectorID.h" #include "IdDictDetDescr/IdDictManager.h" diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx index 6b8a765c871..cc6ce5abe80 100755 --- a/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx +++ b/Tracking/TrkFitter/TrkKalmanFitter/src/ForwardKalmanFitter.cxx @@ -42,6 +42,8 @@ #include "TrkParameters/TrackParameters.h" #include "TrkSurfaces/StraightLineSurface.h" +#include "CLHEP/Units/SystemOfUnits.h" + #include <ext/algorithm> //////////////////////////////////////////////////////////////////////////////// diff --git a/Tracking/TrkTools/TrkTrackFieldIntegralTools/src/FieldIntegralByTrackQueryTool.cxx b/Tracking/TrkTools/TrkTrackFieldIntegralTools/src/FieldIntegralByTrackQueryTool.cxx index 7ff653abec0..b139b244d6a 100755 --- a/Tracking/TrkTools/TrkTrackFieldIntegralTools/src/FieldIntegralByTrackQueryTool.cxx +++ b/Tracking/TrkTools/TrkTrackFieldIntegralTools/src/FieldIntegralByTrackQueryTool.cxx @@ -16,7 +16,7 @@ #include "TrkMaterialOnTrack/MaterialEffectsOnTrack.h" #include "TrkMaterialOnTrack/ScatteringAngles.h" #include "TrkGeometry/TrackingVolume.h" - +#include "GaudiKernel/SystemOfUnits.h" // ================ Constructor ================================================= Trk::FieldIntegralByTrackQueryTool::FieldIntegralByTrackQueryTool(const std::string& t, @@ -159,7 +159,7 @@ double Trk::FieldIntegralByTrackQueryTool::fieldIntegral(const Trk::Track& track cosTheta); } } - Amg::Vector3D momentumKick = startMomentum.cross(endDirection)/(0.3*CLHEP::GeV); + Amg::Vector3D momentumKick = startMomentum.cross(endDirection)/(0.3*Gaudi::Units::GeV); integratedMomentumKick += momentumKick; // accumulate abs(Bdl) between measurements diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx index b5bb7456fe7..9e9f2ecda87 100644 --- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx +++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/TruthTrackBuilder.cxx @@ -23,6 +23,7 @@ #include "TrkRIO_OnTrack/RIO_OnTrack.h" // Gaudi #include "GaudiKernel/IPartPropSvc.h" +#include "GaudiKernel/SystemOfUnits.h" // HepMC #include "HepMC/GenParticle.h" #include "HepMC/GenVertex.h" @@ -30,8 +31,6 @@ #include "AtlasDetDescr/AtlasDetectorID.h" -using namespace CLHEP; - /** Constructor **/ Trk::TruthTrackBuilder::TruthTrackBuilder(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), @@ -209,7 +208,7 @@ Trk::Track* Trk::TruthTrackBuilder::createTrack(const PRD_TruthTrajectory& prdTr const Trk::TrackParameters *thispar = m_extrapolator->extrapolate(*prevpar,surf,Trk::alongMomentum,false,Trk::nonInteracting); if (!thispar) break; - if (!surf.insideBounds(thispar->localPosition(),20*mm,50*mm)) { + if (!surf.insideBounds(thispar->localPosition(),20*Gaudi::Units::mm,50*Gaudi::Units::mm)) { delete thispar; continue; } diff --git a/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx b/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx index 84dc79917a2..23a4057f8a5 100644 --- a/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx +++ b/Tracking/TrkValidation/TrkValAlgs/src/TrackValidationNtupleWriter.cxx @@ -38,6 +38,7 @@ #include "TrkValInterfaces/ITruthNtupleTool.h" #include "TrkValInterfaces/IEventPropertyNtupleTool.h" +#include "CLHEP/Vector/LorentzVector.h" using CLHEP::HepLorentzVector; Trk::TrackValidationNtupleWriter::TrackValidationNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator): diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/VKalMagFld.cxx b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/VKalMagFld.cxx index 2fbf5b0f9ae..2161baf258a 100755 --- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/VKalMagFld.cxx +++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/VKalMagFld.cxx @@ -28,6 +28,7 @@ // Header include #include "TrkVKalVrtFitter/TrkVKalVrtFitter.h" #include "TrkVKalVrtFitter/VKalVrtAtlas.h" +#include "CLHEP/Units/SystemOfUnits.h" //------------------------------------------------- #include<iostream> diff --git a/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h b/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h index 0fbcb9cde67..e6838a8e32c 100644 --- a/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h +++ b/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h @@ -9,6 +9,7 @@ #include "TrkParameters/TrackParameters.h" #include "xAODTracking/TrackParticleFwd.h" #include "xAODTracking/VertexFwd.h" +#include "CLHEP/Vector/ThreeVector.h" /** * An abstract base class for algorithms estimating the transverse impact parameter d0 and diff --git a/Tracking/TrkVertexFitter/TrkVertexFitterUtils/TrkVertexFitterUtils/TrackToVertexIPEstimator.h b/Tracking/TrkVertexFitter/TrkVertexFitterUtils/TrkVertexFitterUtils/TrackToVertexIPEstimator.h index 4a2db55308d..3dd1fda2cf0 100644 --- a/Tracking/TrkVertexFitter/TrkVertexFitterUtils/TrkVertexFitterUtils/TrackToVertexIPEstimator.h +++ b/Tracking/TrkVertexFitter/TrkVertexFitterUtils/TrkVertexFitterUtils/TrackToVertexIPEstimator.h @@ -11,6 +11,7 @@ #include "xAODTracking/TrackParticleFwd.h" #include "xAODTracking/VertexFwd.h" +#include "CLHEP/Vector/ThreeVector.h" namespace Trk { diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtx.cxx b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtx.cxx index dfe3a608296..1c1d7d96c61 100755 --- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtx.cxx +++ b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtx.cxx @@ -24,6 +24,8 @@ #include "xAODTracking/TrackParticleContainer.h" #include "xAODBase/IParticle.h" +#include "GaudiKernel/SystemOfUnits.h" + //** ----------------------------------------------------------------------------------------------------------------- **// @@ -45,8 +47,8 @@ TrigT2HistoPrmVtx::TrigT2HistoPrmVtx(const std::string& name, ISvcLocator* pSvcL declareProperty ("EFTrkSel_BLayer", m_c->m_efTrkSelBLayer = 1); declareProperty ("EFTrkSel_PixHits", m_c->m_efTrkSelPixHits = 2); declareProperty ("EFTrkSel_SiHits", m_c->m_efTrkSelSiHits = 7); - declareProperty ("EFTrkSel_D0", m_c->m_efTrkSelD0 = 1*CLHEP::mm); - declareProperty ("EFTrkSel_Pt", m_c->m_efTrkSelPt = 1*CLHEP::GeV); + declareProperty ("EFTrkSel_D0", m_c->m_efTrkSelD0 = 1*Gaudi::Units::mm); + declareProperty ("EFTrkSel_Pt", m_c->m_efTrkSelPt = 1*Gaudi::Units::GeV); declareMonitoredVariable("PrmVtx", m_c->m_zPrmVtx[0] = -1); declareMonitoredVariable("PrmVtxSigmaAll", m_c->m_zPrmVtxSigmaAll[0] = -1); diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtxAllTE.cxx b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtxAllTE.cxx index ce575b96019..1550ea5dd32 100755 --- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtxAllTE.cxx +++ b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtxAllTE.cxx @@ -26,7 +26,7 @@ #include "xAODBase/IParticle.h" #include "BeamSpotConditionsData/BeamSpotData.h" - +#include "GaudiKernel/SystemOfUnits.h" //** ----------------------------------------------------------------------------------------------------------------- **// @@ -50,8 +50,8 @@ TrigT2HistoPrmVtxAllTE::TrigT2HistoPrmVtxAllTE(const std::string& name, ISvcLoca declareProperty ("EFTrkSel_BLayer", m_c->m_efTrkSelBLayer = 1); declareProperty ("EFTrkSel_PixHits", m_c->m_efTrkSelPixHits = 2); declareProperty ("EFTrkSel_SiHits", m_c->m_efTrkSelSiHits = 7); - declareProperty ("EFTrkSel_D0", m_c->m_efTrkSelD0 = 1*CLHEP::mm); - declareProperty ("EFTrkSel_Pt", m_c->m_efTrkSelPt = 1*CLHEP::GeV); + declareProperty ("EFTrkSel_D0", m_c->m_efTrkSelD0 = 1*Gaudi::Units::mm); + declareProperty ("EFTrkSel_Pt", m_c->m_efTrkSelPt = 1*Gaudi::Units::GeV); declareMonitoredVariable("PrmVtx", m_c->m_zPrmVtx[0] = -1); declareMonitoredVariable("PrmVtxSigmaAll", m_c->m_zPrmVtxSigmaAll[0] = -1); diff --git a/Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h b/Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h index 1cb386fbdf8..395cc97bfb8 100644 --- a/Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h +++ b/Trigger/TrigAlgorithms/TrigmuComb/TrigmuComb/muCombMT.h @@ -42,6 +42,7 @@ //#include "TrigT1Interfaces/RecMuonRoI.h" #include "AthenaMonitoring/GenericMonitoringTool.h" +#include "CLHEP/Units/SystemOfUnits.h" /** Main LVL2 Algorithm. Sided by a xAOD::L2StandaloneMuon, match the muon spectrometer track with an ID track, and produces a xAOD::L2CombinedMuon. */ class muCombMT : public AthAlgorithm diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2TrkMassHypo.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2TrkMassHypo.cxx index 56aee1710fc..0b904b37334 100644 --- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2TrkMassHypo.cxx +++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2TrkMassHypo.cxx @@ -35,7 +35,7 @@ // additions of xAOD objects #include "TrigBphysHelperUtilsTool.h" #include "xAODTrigBphys/TrigBphysContainer.h" - +#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx index ac0836911b1..f68f2fbb6de 100755 --- a/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx +++ b/Trigger/TrigHypothesis/TrigCaloHypo/src/TrigEFCaloHypoNoise.cxx @@ -32,6 +32,8 @@ #include "hltinterface/IInfoRegister.h" #include "hltinterface/ContainerFactory.h" +#include "CLHEP/Units/SystemOfUnits.h" + class ISvcLocator; ///////////////////////////////////////////////////////////////////// diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFMtAllTE.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFMtAllTE.cxx index a6f260a7077..4e680975f39 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFMtAllTE.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEFMtAllTE.cxx @@ -17,6 +17,8 @@ #include "TrigMissingEtEvent/TrigMissingET.h" #include "xAODEgamma/ElectronContainer.h" #include "xAODTrigger/TrigPassBits.h" +#include "CLHEP/Units/SystemOfUnits.h" + using namespace std; struct DescendingEt:std::binary_function<const xAOD::Electron*, diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFex.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFex.cxx index fc43bb15145..bedcb8853bc 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFex.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFex.cxx @@ -24,6 +24,8 @@ #include "TrkCaloExtension/CaloExtensionHelpers.h" #include "TrigEgammaHypo/TrigL2ElectronFex.h" #include "xAODTrigCalo/TrigEMClusterContainer.h" +#include "CLHEP/Units/SystemOfUnits.h" + class ISvcLocator; template <class SRC> diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.h index 782dc0f7177..4ccda710657 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.h +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.h @@ -46,6 +46,8 @@ #include "RecoToolInterfaces/IParticleCaloExtensionTool.h" #include "AthenaMonitoring/GenericMonitoringTool.h" +#include "CLHEP/Units/SystemOfUnits.h" + //namespace Trk //{ class IParticleCaloExtensionTool; } diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypo.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypo.cxx index 718cb79fa45..06cfc09b95f 100755 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypo.cxx +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypo.cxx @@ -23,6 +23,7 @@ #include "TrigEgammaHypo/TrigL2ElectronHypo.h" #include "xAODTrigger/TrigPassBits.h" +#include "CLHEP/Units/SystemOfUnits.h" class ISvcLocator; diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigEFDPhiMetJetAllTE.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigEFDPhiMetJetAllTE.cxx index ef0afeef58e..6a6e2025814 100755 --- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigEFDPhiMetJetAllTE.cxx +++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigEFDPhiMetJetAllTE.cxx @@ -19,6 +19,7 @@ #include "xAODTrigger/TrigPassBits.h" #include <math.h> +#include "GaudiKernel/SystemOfUnits.h" TrigEFDPhiMetJetAllTE::TrigEFDPhiMetJetAllTE(const std::string & name, ISvcLocator* pSvcLocator) : HLT::AllTEAlgo(name, pSvcLocator) @@ -27,7 +28,7 @@ TrigEFDPhiMetJetAllTE::TrigEFDPhiMetJetAllTE(const std::string & name, ISvcLocat { declareProperty("MinDPhiCut", m_MinDPhiCut = 0.3 ); declareProperty("MaxDPhiJets", m_MaxDPhiJets = 3 ); - declareProperty("MinJetEt", m_MinJetEt = 20*CLHEP::GeV ); + declareProperty("MinJetEt", m_MinJetEt = 20*Gaudi::Units::GeV ); declareProperty("MinJetEta", m_MinJetEta = 0 ); declareProperty("MaxJetEta", m_MaxJetEta = 3.2 ); diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigCaloRatioHypo.cxx b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigCaloRatioHypo.cxx index 8819bd6482c..7dd83479ac8 100755 --- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigCaloRatioHypo.cxx +++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/src/TrigCaloRatioHypo.cxx @@ -23,7 +23,7 @@ #include "CxxUtils/fpcompare.h" - +#include "CLHEP/Units/SystemOfUnits.h" //** ----------------------------------------------------------------------------------------------------------------- **// diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoTool.h index e45d8259337..a4b260f4df5 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoTool.h +++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFCombinerHypoTool.h @@ -11,6 +11,7 @@ #include "AthenaMonitoring/GenericMonitoringTool.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" #include "xAODMuon/MuonContainer.h" +#include "CLHEP/Units/SystemOfUnits.h" class StoreGateSvc; class TriggerElement; class TrigMuonEFCombinerHypoTool: public ::AthAlgTool { diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h index 872d49ff884..c7fa09cb3f6 100644 --- a/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h +++ b/Trigger/TrigHypothesis/TrigMuonHypo/TrigMuonHypo/TrigMuonEFMSonlyHypoTool.h @@ -11,6 +11,7 @@ #include "AthenaMonitoring/GenericMonitoringTool.h" #include "TrigSteeringEvent/TrigRoiDescriptor.h" #include "xAODMuon/MuonContainer.h" +#include "CLHEP/Units/SystemOfUnits.h" class StoreGateSvc; class TriggerElement; class TrigMuonEFMSonlyHypoTool: public ::AthAlgTool { diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/src/HLTJetMonTool.cxx b/Trigger/TrigMonitoring/TrigJetMonitoring/src/HLTJetMonTool.cxx index 758bfd2fe9c..0beea014e78 100755 --- a/Trigger/TrigMonitoring/TrigJetMonitoring/src/HLTJetMonTool.cxx +++ b/Trigger/TrigMonitoring/TrigJetMonitoring/src/HLTJetMonTool.cxx @@ -12,6 +12,8 @@ #include "TrigDecisionTool/TrigDecisionTool.h" #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h" +#include "GaudiKernel/SystemOfUnits.h" + //#include "TrigCaloEvent/TrigT2JetContainer.h" //#include "JetEvent/JetCollection.h" @@ -1437,7 +1439,7 @@ StatusCode HLTJetMonTool::fillBasicHists() { xAOD::JetRoIContainer::const_iterator it_e_L1 = m_L1JetRoIC->end(); for ( ; it_L1 != it_e_L1; it_L1++) { L1Roi_num++; - double et = ( (*it_L1)->et4x4())/CLHEP::GeV; + double et = ( (*it_L1)->et4x4())/Gaudi::Units::GeV; if(et < 1.e-3) et = 0.; double eta = (*it_L1)->eta(); double ene = et * cosh(eta); @@ -1531,9 +1533,9 @@ StatusCode HLTJetMonTool::fillBasicHists() { // for basic hists, don't cut eta/pt //come back to this - LS//if(m_doselOFBasicHists) if(!selectJet(jet)) continue; - double e = (thisjet->e())/CLHEP::GeV; + double e = (thisjet->e())/Gaudi::Units::GeV; double et = 0., epsilon = 1.e-3; - if(thisjet->pt() > epsilon) et = (thisjet->pt())/CLHEP::GeV; + if(thisjet->pt() > epsilon) et = (thisjet->pt())/Gaudi::Units::GeV; if(et < epsilon) et = 0; double eta = thisjet->eta(); double phi = thisjet->phi(); @@ -1622,9 +1624,9 @@ StatusCode HLTJetMonTool::fillBasicHists() { // for basic hists, don't cut eta/pt //come back to this - LS//if(m_doselOFBasicHists) if(!selectJet(jet)) continue; - double e = (thisjet->e())/CLHEP::GeV; + double e = (thisjet->e())/Gaudi::Units::GeV; double et = 0., epsilon = 1.e-3; - if(thisjet->pt() > epsilon) et = (thisjet->pt())/CLHEP::GeV; + if(thisjet->pt() > epsilon) et = (thisjet->pt())/Gaudi::Units::GeV; if(et < epsilon) et = 0; ATH_MSG_DEBUG( lvl << " thisjet->pt() = " << et ); double eta = thisjet->eta(); @@ -1639,7 +1641,7 @@ StatusCode HLTJetMonTool::fillBasicHists() { ATH_MSG_DEBUG( lvl << " et = " << et << "\teta = " << eta << "\temfrac = " << emfrac <<"\thecfrac"); - v_thisjet.SetPtEtaPhiE(thisjet->pt()/CLHEP::GeV,eta,phi,e); + v_thisjet.SetPtEtaPhiE(thisjet->pt()/Gaudi::Units::GeV,eta,phi,e); m_v_OFjet.push_back(v_thisjet); m_n_index++; @@ -1721,10 +1723,10 @@ void HLTJetMonTool::fillBasicHLTforChain( const std::string& theChain, double th for (auto j : *jcont.cptr()) { - double e = (j->e())/CLHEP::GeV; + double e = (j->e())/Gaudi::Units::GeV; double et = 0., epsilon = 1.e-3; - if(j->pt() > epsilon) et = (j->pt())/CLHEP::GeV; + if(j->pt() > epsilon) et = (j->pt())/Gaudi::Units::GeV; ATH_MSG_DEBUG("jet et = "<<et); @@ -1741,7 +1743,7 @@ void HLTJetMonTool::fillBasicHLTforChain( const std::string& theChain, double th hecfrac = j->getAttribute<float>(xAOD::JetAttribute::HECFrac); } - v_thisjet.SetPtEtaPhiE(j->pt()/CLHEP::GeV,j->eta(), j->phi(),j->e()/CLHEP::GeV); + v_thisjet.SetPtEtaPhiE(j->pt()/Gaudi::Units::GeV,j->eta(), j->phi(),j->e()/Gaudi::Units::GeV); m_v_HLTjet.push_back(v_thisjet); m_n_index++; @@ -1824,7 +1826,7 @@ void HLTJetMonTool::fillBasicL1forChain(const std::string& theChain, double thrE for (; it_L1 != it_e_L1; ++it_L1) { - double et = ((*it_L1)->et4x4())/CLHEP::GeV; + double et = ((*it_L1)->et4x4())/Gaudi::Units::GeV; if(et < 1.e-3) et = 0; double eta = (*it_L1)->eta(); double phi = (*it_L1)->phi(); @@ -1834,8 +1836,8 @@ void HLTJetMonTool::fillBasicL1forChain(const std::string& theChain, double thrE if(msgLvl(MSG::DEBUG)) { const Jet_ROI::thresholds_type thrVec = (*it_L1)->thrNames(); const Jet_ROI::thr_value_type thrVal = (*it_L1)->thrValues(); - double et6 = ((*it_L1)->et6x6())/CLHEP::GeV; - double et8 = ((*it_L1)->et8x8())/CLHEP::GeV; + double et6 = ((*it_L1)->et6x6())/Gaudi::Units::GeV; + double et8 = ((*it_L1)->et8x8())/Gaudi::Units::GeV; std::ostringstream thrv; unsigned int kk = 0; for(Jet_ROI::thresholds_type::const_iterator l1i = thrVec.begin(); l1i != thrVec.end(); ++l1i,kk++ ) { @@ -2300,7 +2302,7 @@ bool HLTJetMonTool::selectJet(const Jet *jet) { // pt / eta // don't cut on eta here since we have FJ signatures to contend with: // if(m_reqEtaCut) if (fabs(jet->eta()) >= m_EtaCut ) return false; - if(m_reqMinPtCut) if (jet->pt()/CLHEP::GeV <= m_MinPtCut ) return false; + if(m_reqMinPtCut) if (jet->pt()/Gaudi::Units::GeV <= m_MinPtCut ) return false; /* jet quality @@ -2456,7 +2458,7 @@ StatusCode HLTJetMonTool::fillOfflineHists() { //passL1thr = (jet->pt()/CLHEP::GeV > thrGeVItem); - ATH_MSG_DEBUG(" L1 Chain= "<<itemName<<" OF Jet pt= "<<jet->pt()/CLHEP::GeV<<" OF Jet eta= "<<jet->eta()<<" Threshold= "<<thrGeVItem<<" TDT= "<<getTDT()->isPassed(itemName)<<" Eta Low "<<EtaLowThres<<" Eta High "<<EtaHighThres); + ATH_MSG_DEBUG(" L1 Chain= "<<itemName<<" OF Jet pt= "<<jet->pt()/Gaudi::Units::GeV<<" OF Jet eta= "<<jet->eta()<<" Threshold= "<<thrGeVItem<<" TDT= "<<getTDT()->isPassed(itemName)<<" Eta Low "<<EtaLowThres<<" Eta High "<<EtaHighThres); // if L1 eff required if(m_doL1TrigEff) { @@ -2464,11 +2466,11 @@ StatusCode HLTJetMonTool::fillOfflineHists() { ATH_MSG_DEBUG(" OF Jet passed requirements->Filling the denominator"); - if((h = hist(Form("%s_Eff_vs_pt_den",itemName.c_str())))) h->Fill(jet->pt()/CLHEP::GeV); + if((h = hist(Form("%s_Eff_vs_pt_den",itemName.c_str())))) h->Fill(jet->pt()/Gaudi::Units::GeV); if((h = hist(Form("%s_Eff_vs_eta_den",itemName.c_str())))) h->Fill(jet->eta()); if((h = hist(Form("%s_Eff_vs_phi_den",itemName.c_str())))) h->Fill(jet->phi()); - if((h2 = hist2(Form("%s_Eff_vs_pt_vs_eta_den",itemName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,jet->eta()); - if((h2 = hist2(Form("%s_Eff_vs_pt_vs_phi_den",itemName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,jet->phi()); + if((h2 = hist2(Form("%s_Eff_vs_pt_vs_eta_den",itemName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,jet->eta()); + if((h2 = hist2(Form("%s_Eff_vs_pt_vs_phi_den",itemName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,jet->phi()); } } //if trigeff @@ -2496,14 +2498,14 @@ StatusCode HLTJetMonTool::fillOfflineHists() { ATH_MSG_DEBUG(" OF Jet passed requirements->Filling the numerator"); - if((h = hist(Form("%s_Eff_vs_pt_num",itemName.c_str())))) h->Fill(jet->pt()/CLHEP::GeV); //fill numerator histogram + if((h = hist(Form("%s_Eff_vs_pt_num",itemName.c_str())))) h->Fill(jet->pt()/Gaudi::Units::GeV); //fill numerator histogram if((h = hist(Form("%s_Eff_vs_eta_num",itemName.c_str())))) h->Fill(jet->eta()); if((h = hist(Form("%s_Eff_vs_phi_num",itemName.c_str())))) h->Fill(jet->phi()); - if((h2 = hist2(Form("%s_Eff_vs_pt_vs_eta_num",itemName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,jet->eta()); - if((h2 = hist2(Form("%s_Eff_vs_pt_vs_phi_num",itemName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,jet->phi()); - if((h2 = hist2(Form("%s_pt_vs_OF_pt",itemName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,v_trigjet_tmp.Pt()/CLHEP::GeV); + if((h2 = hist2(Form("%s_Eff_vs_pt_vs_eta_num",itemName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,jet->eta()); + if((h2 = hist2(Form("%s_Eff_vs_pt_vs_phi_num",itemName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,jet->phi()); + if((h2 = hist2(Form("%s_pt_vs_OF_pt",itemName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,v_trigjet_tmp.Pt()/Gaudi::Units::GeV); - if((p = profile(Form("%s_EffPt",itemName.c_str())))) p->Fill(jet->pt()/CLHEP::GeV,1.0,1.0); //fill profile with 1 + if((p = profile(Form("%s_EffPt",itemName.c_str())))) p->Fill(jet->pt()/Gaudi::Units::GeV,1.0,1.0); //fill profile with 1 if((p = profile(Form("%s_EffEta",itemName.c_str())))) p->Fill(jet->eta(),1.0,1.0); if((p = profile(Form("%s_EffPhi",itemName.c_str())))) p->Fill(jet->phi(),1.0,1.0); @@ -2512,7 +2514,7 @@ StatusCode HLTJetMonTool::fillOfflineHists() { } if (!getTDT()->isPassed(itemName)){ - if((p = profile(Form("%s_EffPt",itemName.c_str())))) p->Fill(jet->pt()/CLHEP::GeV,0.0,1.0); //fill profile with 0 + if((p = profile(Form("%s_EffPt",itemName.c_str())))) p->Fill(jet->pt()/Gaudi::Units::GeV,0.0,1.0); //fill profile with 0 if((p = profile(Form("%s_EffEta",itemName.c_str())))) p->Fill(jet->eta(),0.0,1.0); if((p = profile(Form("%s_EffPhi",itemName.c_str())))) p->Fill(jet->phi(),0.0,1.0); @@ -2538,7 +2540,7 @@ StatusCode HLTJetMonTool::fillOfflineHists() { if(m_doL1TrigEff) { if(getTDT()->isPassed(itemName) /*&& passHLTthr*/) { - if((h = hist(Form("%s_unmatched_pt",itemName.c_str())))) h->Fill(v_trigjet_tmp.Pt()/CLHEP::GeV); + if((h = hist(Form("%s_unmatched_pt",itemName.c_str())))) h->Fill(v_trigjet_tmp.Pt()/Gaudi::Units::GeV); }//TDT } // doTrigEff @@ -2566,11 +2568,11 @@ StatusCode HLTJetMonTool::fillOfflineHists() { if(m_doHLTTrigEff) { if (isLeadingJet(jet,jetcoll,EtaLowThres,EtaHighThres,NJet)){ //OF nth leading jet in the same eta region of HLTJet - if((h = hist(Form("%s_Eff_vs_pt_den",chainName.c_str())))) h->Fill(jet->pt()/CLHEP::GeV); + if((h = hist(Form("%s_Eff_vs_pt_den",chainName.c_str())))) h->Fill(jet->pt()/Gaudi::Units::GeV); if((h = hist(Form("%s_Eff_vs_eta_den",chainName.c_str())))) h->Fill(jet->eta()); if((h = hist(Form("%s_Eff_vs_phi_den",chainName.c_str())))) h->Fill(jet->phi()); - if((h2 = hist2(Form("%s_Eff_vs_pt_vs_eta_den",chainName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,jet->eta()); - if((h2 = hist2(Form("%s_Eff_vs_pt_vs_phi_den",chainName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,jet->phi()); + if((h2 = hist2(Form("%s_Eff_vs_pt_vs_eta_den",chainName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,jet->eta()); + if((h2 = hist2(Form("%s_Eff_vs_pt_vs_phi_den",chainName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,jet->phi()); } //isLeading }//doTrigEff @@ -2595,14 +2597,14 @@ StatusCode HLTJetMonTool::fillOfflineHists() { if (isLeadingJet(jet,jetcoll,EtaLowThres,EtaHighThres,NJet)){ //OF leading jet in the same eta region of HLTJet if(getTDT()->isPassed(Form("HLT_%s",chainName.c_str()))) { - if((h = hist(Form("%s_Eff_vs_pt_num",chainName.c_str())))) h->Fill(jet->pt()/CLHEP::GeV); + if((h = hist(Form("%s_Eff_vs_pt_num",chainName.c_str())))) h->Fill(jet->pt()/Gaudi::Units::GeV); if((h = hist(Form("%s_Eff_vs_eta_num",chainName.c_str())))) h->Fill(jet->eta()); if((h = hist(Form("%s_Eff_vs_phi_num",chainName.c_str())))) h->Fill(jet->phi()); - if((h2 = hist2(Form("%s_Eff_vs_pt_vs_eta_num",chainName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,jet->eta()); - if((h2 = hist2(Form("%s_Eff_vs_pt_vs_phi_num",chainName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,jet->phi()); - if((h2 = hist2(Form("%s_pt_vs_OF_pt",chainName.c_str())))) h2->Fill(jet->pt()/CLHEP::GeV,v_trigjet_tmp.Pt()/CLHEP::GeV); + if((h2 = hist2(Form("%s_Eff_vs_pt_vs_eta_num",chainName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,jet->eta()); + if((h2 = hist2(Form("%s_Eff_vs_pt_vs_phi_num",chainName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,jet->phi()); + if((h2 = hist2(Form("%s_pt_vs_OF_pt",chainName.c_str())))) h2->Fill(jet->pt()/Gaudi::Units::GeV,v_trigjet_tmp.Pt()/Gaudi::Units::GeV); - if((p = profile(Form("%s_EffPt",chainName.c_str())))) p->Fill(jet->pt()/CLHEP::GeV,1.0,1.0); //fill profile with 1 + if((p = profile(Form("%s_EffPt",chainName.c_str())))) p->Fill(jet->pt()/Gaudi::Units::GeV,1.0,1.0); //fill profile with 1 if((p = profile(Form("%s_EffEta",chainName.c_str())))) p->Fill(jet->eta(),1.0,1.0); if((p = profile(Form("%s_EffPhi",chainName.c_str())))) p->Fill(jet->phi(),1.0,1.0); @@ -2610,7 +2612,7 @@ StatusCode HLTJetMonTool::fillOfflineHists() { if((h = hist(Form("%s_Resolution_pt",chainName.c_str())))) h->Fill(res); } if (! getTDT()->isPassed(Form("HLT_%s",chainName.c_str()))){ - if((p = profile(Form("%s_EffPt",chainName.c_str())))) p->Fill(jet->pt()/CLHEP::GeV,0.0,1.0); //fill profile with 0 + if((p = profile(Form("%s_EffPt",chainName.c_str())))) p->Fill(jet->pt()/Gaudi::Units::GeV,0.0,1.0); //fill profile with 0 if((p = profile(Form("%s_EffEta",chainName.c_str())))) p->Fill(jet->eta(),0.0,1.0); if((p = profile(Form("%s_EffPhi",chainName.c_str())))) p->Fill(jet->phi(),0.0,1.0); } @@ -2635,7 +2637,7 @@ StatusCode HLTJetMonTool::fillOfflineHists() { if(m_doHLTTrigEff) { if(getTDT()->isPassed(Form("HLT_%s",chainName.c_str())) /*&& passHLTthr*/) { - if((h = hist(Form("%s_unmatched_pt",chainName.c_str())))) h->Fill(v_trigjet_tmp.Pt()/CLHEP::GeV); + if((h = hist(Form("%s_unmatched_pt",chainName.c_str())))) h->Fill(v_trigjet_tmp.Pt()/Gaudi::Units::GeV); }//TDT } // doTrigEff @@ -2837,7 +2839,7 @@ TLorentzVector HLTJetMonTool::DeltaRMatching(const xAOD::Jet *jet, const std::st for (auto j : *jcont.cptr()) { double et = 0., epsilon = 1.e-3; - if(j->pt() > epsilon) et = (j->pt())/CLHEP::GeV; + if(j->pt() > epsilon) et = (j->pt())/Gaudi::Units::GeV; if(et < epsilon) et = 0; TLorentzVector v_HLT; diff --git a/graphics/GeometryJiveXML/CMakeLists.txt b/graphics/GeometryJiveXML/CMakeLists.txt index 50cfbb141f6..8e57bf2cbdd 100644 --- a/graphics/GeometryJiveXML/CMakeLists.txt +++ b/graphics/GeometryJiveXML/CMakeLists.txt @@ -12,7 +12,6 @@ atlas_depends_on_subdirs( PUBLIC PRIVATE Calorimeter/CaloDetDescr Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel GaudiKernel InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry @@ -29,7 +28,7 @@ atlas_add_component( GeometryJiveXML src/*.cxx src/components/*.cxx INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps JiveXMLLib CaloDetDescrLib StoreGateLib SGtests GeoModelKernel GaudiKernel InDetIdentifier InDetReadoutGeometry LArReadoutGeometry MuonReadoutGeometry MuonIdHelpersLib TileDetDescr ) + LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps JiveXMLLib CaloDetDescrLib StoreGateLib SGtests GaudiKernel InDetIdentifier InDetReadoutGeometry LArReadoutGeometry MuonReadoutGeometry MuonIdHelpersLib TileDetDescr ) # Install files from the package: atlas_install_headers( GeometryJiveXML ) diff --git a/graphics/GeometryJiveXML/src/GeometryWriter.cxx b/graphics/GeometryJiveXML/src/GeometryWriter.cxx index 4efbc3990f4..f654f5951a2 100755 --- a/graphics/GeometryJiveXML/src/GeometryWriter.cxx +++ b/graphics/GeometryJiveXML/src/GeometryWriter.cxx @@ -16,9 +16,9 @@ #include "TileDetDescr/TileDetDescrManager.h" #include "LArReadoutGeometry/LArDetectorManager.h" -#include "GeoModelKernel/GeoPVConstLink.h" -#include "GeoModelKernel/GeoTube.h" -#include "GeoModelKernel/GeoTrd.h" +// #include "GeoModelKernel/GeoPVConstLink.h" +// #include "GeoModelKernel/GeoTube.h" +// #include "GeoModelKernel/GeoTrd.h" #include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElement.h" diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP12DGeometrySystems/CMakeLists.txt index 2dbf4380573..d8d05a5d0d5 100644 --- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP12DGeometrySystems/CMakeLists.txt @@ -12,7 +12,6 @@ atlas_depends_on_subdirs( PUBLIC graphics/VP1/VP1Base PRIVATE Calorimeter/CaloDetDescr - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/IdDictDetDescr InnerDetector/InDetDetDescr/InDetIdentifier InnerDetector/InDetDetDescr/InDetReadoutGeometry @@ -23,6 +22,7 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Eigen ) +find_package( GeoModel ) # Component(s) in the package: atlas_add_library( VP12DGeometrySystems @@ -30,5 +30,5 @@ atlas_add_library( VP12DGeometrySystems PUBLIC_HEADERS VP12DGeometrySystems INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoPrimitives VP1Base StoreGateLib SGtests CaloDetDescrLib MuonIdHelpersLib - PRIVATE_LINK_LIBRARIES GeoModelKernel IdDictDetDescr InDetIdentifier InDetReadoutGeometry LArReadoutGeometry MuonReadoutGeometry TileDetDescr ) + PRIVATE_LINK_LIBRARIES ${GEOMODEL_LIBRARIES} IdDictDetDescr InDetIdentifier InDetReadoutGeometry LArReadoutGeometry MuonReadoutGeometry TileDetDescr ) diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/StoreGateGeometryReader.h b/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/StoreGateGeometryReader.h index cfdabd351fd..0d89032b5e0 100644 --- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/StoreGateGeometryReader.h +++ b/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/StoreGateGeometryReader.h @@ -169,8 +169,6 @@ class StoreGateGeometryReader bool readMuonGeometry(); private: - Detector *newDetector; - /** Pixel detector manager. */ const InDetDD::SiDetectorManager* m_pixel_manager; diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/VP12DGeometrySystem.h b/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/VP12DGeometrySystem.h index fb6d05a6ffa..5dcd1d04682 100755 --- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/VP12DGeometrySystem.h +++ b/graphics/VP1/VP1Systems/VP12DGeometrySystems/VP12DGeometrySystems/VP12DGeometrySystem.h @@ -33,7 +33,7 @@ public: VP12DGeometrySystem & operator= ( const VP12DGeometrySystem & ); class Imp; - Imp *d; + Imp *m_d; }; diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/StoreGateGeometryReader.cxx b/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/StoreGateGeometryReader.cxx index de5b3c8ea3c..f0bdaa16d89 100644 --- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/StoreGateGeometryReader.cxx +++ b/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/StoreGateGeometryReader.cxx @@ -10,6 +10,7 @@ #include "TileDetDescr/TileDetDescrManager.h" #include "LArReadoutGeometry/LArDetectorManager.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoModelKernel/GeoPVConstLink.h" #include "GeoModelKernel/GeoTrd.h" @@ -32,8 +33,7 @@ StoreGateGeometryReader::StoreGateGeometryReader() - : newDetector(nullptr), - m_pixel_manager(nullptr), + : m_pixel_manager(nullptr), m_silicon_manager(nullptr), m_trt_manager(nullptr), m_calo_manager(nullptr), @@ -138,12 +138,11 @@ bool StoreGateGeometryReader::readGeometry() bool StoreGateGeometryReader::readPixelGeometry() { const PixelID* pixelIdHelper = 0; - if(m_detStore->retrieve(pixelIdHelper,"PixelID").isFailure() || !pixelIdHelper) - return false; + if(m_detStore->retrieve(pixelIdHelper,"PixelID").isFailure() || !pixelIdHelper) return false; - InDetDD::SiDetectorElementCollection::const_iterator it; + InDetDD::SiDetectorElementCollection::const_iterator it; - for (it=m_pixel_manager->getDetectorElementBegin(); it<m_pixel_manager->getDetectorElementEnd(); it++) + for (it=m_pixel_manager->getDetectorElementBegin(); it<m_pixel_manager->getDetectorElementEnd(); it++) { const InDetDD::SiDetectorElement *element = *it; @@ -168,7 +167,7 @@ bool StoreGateGeometryReader::readPixelGeometry() } zMax += 5; - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::ABarrelSiliconDetector; newDetector->name = "Pixel"; @@ -224,7 +223,7 @@ bool StoreGateGeometryReader::readPixelGeometry() zMin -= 5; zMax += 5; - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::AEndcapSiliconDetector; newDetector->name = "Pixel"; @@ -308,7 +307,7 @@ bool StoreGateGeometryReader::readSCTGeometry() } zMax += 5; - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::ABarrelSiliconDetector; newDetector->name = "Silicon"; @@ -375,7 +374,7 @@ bool StoreGateGeometryReader::readSCTGeometry() zMin -= 5; zMax += 5; - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::AEndcapSiliconDetector; newDetector->name = "Silicon"; @@ -459,7 +458,7 @@ bool StoreGateGeometryReader::readTRTGeometry() double dphiIn = 2.*M_PI / (nphi * trtIdHelper->straw_max(elementIn->identify())); double dphiOut = 2.*M_PI / (nphi * trtIdHelper->straw_max(elementOut->identify())); - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::ABarrelTRTDetector; newDetector->name = "TRT"; @@ -502,7 +501,7 @@ bool StoreGateGeometryReader::readTRTGeometry() // floor() instead of round() becuase we are neglecting the space between two modules int nphi = (int) floor(2.*M_PI / fabs(posOut.phi() - posIn.phi())); - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::AEndcapTRTDetector; newDetector->name = "TRT"; @@ -541,7 +540,7 @@ bool StoreGateGeometryReader::readSolenoidGeometry() double rIn = 122.9; double rOut = 127.4; - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::ADisc; newDetector->name = "Solenoid"; @@ -607,7 +606,7 @@ bool StoreGateGeometryReader::readTILEGeometry() if (!name.compare(0, 3, "ITC")) { - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::AGapCalorimeter; newDetector->name = name; @@ -644,7 +643,7 @@ bool StoreGateGeometryReader::readTILEGeometry() int tower = tileIdHelper->tower(descriptor->identify()); Identifier id = tileIdHelper->cell_id(section, side, module, tower, i); - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::ABarrelCalorimeter; newDetector->name = name; @@ -694,11 +693,8 @@ bool StoreGateGeometryReader::readMBTSGeometry() { int sampling=0,numPhi=0; std::string stringOfNames=""; - HepGeom::Scale3D scale; - HepGeom::Rotate3D rotate; - HepGeom::Translate3D translate; - (child->getX()).getDecomposition(scale, rotate, translate); - double zlocation = translate.dz(); + GeoTrf::Vector3D translate = (child->getX()).translation(); + double zlocation = translate.z(); if(zlocation<0) zlocation=-zlocation; for (unsigned int cc=0; cc< child->getNChildVols();cc++) @@ -715,17 +711,16 @@ bool StoreGateGeometryReader::readMBTSGeometry() if(stringOfNames.find(currentName,0) == std::string::npos) { stringOfNames+=" " + currentName; - HepGeom::Translate3D translateToChild; - (child->getXToChildVol(cc)).getDecomposition(scale, rotate, translateToChild); + GeoTrf::Vector3D translateToChild = (child->getXToChildVol(cc)).translation(); const GeoTrd* theTrd = dynamic_cast<const GeoTrd*> ((childschild->getLogVol())->getShape()); - double rho=pow(translateToChild.dx(),2.0) + pow(translateToChild.dy(),2.0); + double rho=pow(translateToChild.x(),2.0) + pow(translateToChild.y(),2.0); rho=pow(rho,0.5); double RMin=rho-theTrd->getZHalfLength(); double RMax=rho+theTrd->getZHalfLength(); - double zmovement=translateToChild.dz(); + double zmovement=translateToChild.z(); double zthickness=theTrd->getXHalfLength1(); - newDetector = new Detector; + Detector* newDetector = new Detector; newDetector->type = Detector::AEndcapCryostat; newDetector->name = "Minimum Bias Trigger Scintillators"; @@ -764,6 +759,7 @@ bool StoreGateGeometryReader::readLArGeometry() QColor lArColor; const CaloCell_ID *idHelper = m_calo_manager->getCaloCell_ID(); CaloDetDescrManager::calo_element_const_iterator it; + Detector* newDetector{nullptr}; // This code is not very efficient in terms of speed. Since it will only be used // when the geometry has changed, the code is made to be easily readable instead. @@ -1062,7 +1058,8 @@ bool StoreGateGeometryReader::readMuonGeometry() // this is not MDT specific and any of the other IdHelpers would have worked as well. const MdtIdHelper *mdtIdHelper = m_muon_manager->mdtIdHelper(); int snMax = mdtIdHelper->nStationNames()-1; - + Detector* newDetector{nullptr}; + // Loop over all station types. for (int sn=0; sn<=snMax; sn++) { diff --git a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/VP12DGeometrySystem.cxx b/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/VP12DGeometrySystem.cxx index 0d03a2fc0e3..c876ae01818 100755 --- a/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/VP12DGeometrySystem.cxx +++ b/graphics/VP1/VP1Systems/VP12DGeometrySystems/src/VP12DGeometrySystem.cxx @@ -105,15 +105,15 @@ VP12DGeometrySystem::VP12DGeometrySystem() : IVP12DDetViewsSystem("2DGeo", "This is an illustration of an extremely basic 2D system.\n " "It is a placeholder for the future 2D geometry system.", - "Thomas.Kittelmann@cern.ch"), d(new Imp) + "Thomas.Kittelmann@cern.ch"), m_d(new Imp) { - d->theclass=this; + m_d->theclass=this; } VP12DGeometrySystem::~VP12DGeometrySystem() { - delete d; d = 0; + delete m_d; m_d = nullptr; } //Initializes system members, loads geometry @@ -122,10 +122,10 @@ void VP12DGeometrySystem::systemcreate(StoreGateSvc *detStore) if (detStore) { //set detector store pointer of geometry reader - d->mGeoReader.setDetStore(detStore); + m_d->mGeoReader.setDetStore(detStore); //read geometry and test for success - if (!d->mGeoReader.readGeometry()) + if (!m_d->mGeoReader.readGeometry()) { //here we had an error somewhere while reading geometry message("Error parsing DetStore geometry!"); @@ -142,7 +142,7 @@ void VP12DGeometrySystem::systemcreate(StoreGateSvc *detStore) //print number of detector elements found for sanity check std::stringstream outputdata; - outputdata << "2D Geometry System finds: " << d->mGeoReader.mDetectors.size() << " elements." << std::endl; + outputdata << "2D Geometry System finds: " << m_d->mGeoReader.mDetectors.size() << " elements." << std::endl; QString qstrout = outputdata.str().c_str(); message(qstrout); } @@ -154,10 +154,10 @@ void VP12DGeometrySystem::buildPermanentItemCollections(StoreGateSvc* /*detstore //todo: Add all four at once, but only make one visible, depending //on a UI radio selector - d->addYXProjectionToCollection(ic_xy); + m_d->addYXProjectionToCollection(ic_xy); message("Just wrote X-Y Projection"); - d->addRZProjectionToCollection(ic_rz); + m_d->addRZProjectionToCollection(ic_rz); message("Just wrote Rho-Z Projection"); // if (PROJECTION == "FR") @@ -1526,8 +1526,8 @@ void VP12DGeometrySystem::Imp::processMuonDetector(const Detector& theDetector, // Ui::VP12DGeometryControllerForm ui; // ui.setupUi(theWidget); -// d->xy_RadioBtn = ui.radio_xy; -// d->rz_RadioBtn = ui.radio_rz; +// m_d->xy_RadioBtn = ui.radio_xy; +// m_d->xrz_RadioBtn = ui.radio_rz; // return theWidget; // } diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleCollHandle_CaloCluster.cxx b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleCollHandle_CaloCluster.cxx index 09a13fab272..04375ddd61b 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleCollHandle_CaloCluster.cxx +++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleCollHandle_CaloCluster.cxx @@ -43,7 +43,7 @@ #include "PathResolver/PathResolver.h" - +#include "GaudiKernel/SystemOfUnits.h" //____________________________________________________________________ @@ -92,8 +92,8 @@ public: * DEFINITIONS */ //Fixme: Just some approximate values for now: -double IParticleCollHandle_CaloCluster::calo_start_r = 1.1*CLHEP::m + 0.05*CLHEP::m; -double IParticleCollHandle_CaloCluster::calo_start_z = 3.671*CLHEP::m + 0.05*CLHEP::m; +double IParticleCollHandle_CaloCluster::calo_start_r = 1.1*Gaudi::Units::m + 0.05*Gaudi::Units::m; +double IParticleCollHandle_CaloCluster::calo_start_z = 3.671*Gaudi::Units::m + 0.05*Gaudi::Units::m; double IParticleCollHandle_CaloCluster::calo_crack_eta = fabs(log(tan(0.5*atan(calo_start_r/calo_start_z)))); @@ -216,7 +216,7 @@ double IParticleCollHandle_CaloCluster::energyToLength(const double&energy) cons { VP1Msg::messageDebug("IParticleCollHandle_CaloCluster::energyToLength()"); - return std::max(1*CLHEP::mm, m_d->scale.second*(m_d->scale.first?log(1+fabs(energy)):energy)); + return std::max(1*Gaudi::Units::mm, m_d->scale.second*(m_d->scale.first?log(1+fabs(energy)):energy)); } //____________________________________________________________________ diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_Muon.cxx b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_Muon.cxx index a4ebaa97113..0669d0c5d7b 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_Muon.cxx +++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_Muon.cxx @@ -30,6 +30,7 @@ #include <Inventor/nodes/SoTranslation.h> #include <Inventor/nodes/SoRotationXYZ.h> +#include "GaudiKernel/SystemOfUnits.h" //AOD //____________________________________________________________________ @@ -425,7 +426,7 @@ QString IParticleHandle_Muon::qualityString() const{ QString IParticleHandle_Muon::shortInfo() const { - QString l("|P|="+VP1Msg::str(momentum().mag()/CLHEP::GeV)+" [GeV], " +muonTypeString() + ", "+qualityString() ); + QString l("|P|="+VP1Msg::str(momentum().mag()/Gaudi::Units::GeV)+" [GeV], " +muonTypeString() + ", "+qualityString() ); return l; } diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_TrackParticle.cxx b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_TrackParticle.cxx index aa834f27956..6226fb3e741 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_TrackParticle.cxx +++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/IParticleHandle_TrackParticle.cxx @@ -32,6 +32,7 @@ //Athena #include "TrkExInterfaces/IExtrapolationEngine.h" +#include "GaudiKernel/SystemOfUnits.h" //____________________________________________________________________ class IParticleHandle_TrackParticle::Imp { @@ -419,7 +420,7 @@ unsigned IParticleHandle_TrackParticle::getNMuonPhiHoleLayers() const QString IParticleHandle_TrackParticle::shortInfo() const { - QString l("|P|="+VP1Msg::str(momentum().mag()/CLHEP::GeV)+" [GeV], "); + QString l("|P|="+VP1Msg::str(momentum().mag()/Gaudi::Units::GeV)+" [GeV], "); l+= "Pix["+QString::number(getNPixelHits())+"], SCT["+QString::number(getNSCTHits())+"], TRT["+QString::number(getNTRTHits()) +"], Muon prec. layers/holes ["+QString::number(getNMuonPrecisionLayers())+"/"+QString::number(getNMuonPrecisionHoleLayers())+"]"; return l; diff --git a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/CMakeLists.txt index 77cadf6c74c..b9f8e46c76d 100644 --- a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/CMakeLists.txt @@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC PRIVATE LArCalorimeter/LArGeoModel/LArHV LArCalorimeter/LArGeoModel/LArReadoutGeometry + DetectorDescription/GeoPrimitives graphics/VP1/VP1Utils ) # External dependencies: diff --git a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/VP1CaloReadoutSystem.cxx b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/VP1CaloReadoutSystem.cxx index 54f9fa8cc4a..f9010d5760f 100755 --- a/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/VP1CaloReadoutSystem.cxx +++ b/graphics/VP1/VP1Systems/VP1CaloReadoutSystems/src/VP1CaloReadoutSystem.cxx @@ -56,6 +56,8 @@ #include "LArHV/HECHVSubgap.h" #include "LArHV/LArHVManager.h" +#include "GeoPrimitives/CLHEPtoEigenConverter.h" + #include "VP1Utils/VP1LinAlgUtils.h" #include <sstream> @@ -1044,7 +1046,7 @@ void VP1CaloReadoutSystem::createHV() { const HECDetectorManager *hecManager = VP1DetInfo::hecDetMgr(); const HECDetectorRegion *region = hecManager->getDetectorRegion(element->getEndcapIndex(),element->getSamplingIndex(),element->getRegionIndex()); - const HepGeom::Transform3D &XF= region->getAbsoluteTransform(); + const HepGeom::Transform3D &XF= Amg::EigenTransformToCLHEP(region->getAbsoluteTransform()); double z0 = (XF*HepGeom::Point3D<double>(0,0,element->getZLocal(HECCell::FRONT))).z(); double z1 = (XF*HepGeom::Point3D<double>(0,0,element->getZLocal(HECCell::BACK))).z(); @@ -1113,7 +1115,7 @@ void VP1CaloReadoutSystem::createHV() { for (e=fcalManager->beginFCAL();e!=fcalManager->endFCAL(); e++) { const FCALModule *fcalMod = *e; - const HepGeom::Transform3D &xf = fcalMod->getAbsoluteTransform(); + const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform()); SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf); SoSeparator *sep = new SoSeparator(); @@ -1174,7 +1176,7 @@ void VP1CaloReadoutSystem::createEtaPhi() { EMBDetectorManager::DetectorRegionConstIterator e; for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); e++) { const EMBDetectorRegion *region = *e; - const HepGeom::Transform3D &xf = region->getAbsoluteTransform(); + const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(region->getAbsoluteTransform()); SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf); SoSeparator *sep[NPHISECTORS]= {new SoSeparator(), new SoSeparator(), new SoSeparator(), new SoSeparator(), new SoSeparator(), new SoSeparator(), new SoSeparator(), new SoSeparator(), @@ -1274,7 +1276,7 @@ void VP1CaloReadoutSystem::createEtaPhi() { EMECDetectorManager::DetectorRegionConstIterator e; for (e=manager->beginDetectorRegion();e!=manager->endDetectorRegion(); e++) { const EMECDetectorRegion *region = *e; - const HepGeom::Transform3D &xf = region->getAbsoluteTransform(); + const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(region->getAbsoluteTransform()); // First Focal Points: try { @@ -1358,7 +1360,7 @@ void VP1CaloReadoutSystem::createEtaPhi() { const HECDetectorRegion *region = *e; - const HepGeom::Transform3D &xf = region->getAbsoluteTransform(); + const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(region->getAbsoluteTransform()); // First Focal Points: if (region->getSamplingIndex()==1) { @@ -1444,7 +1446,7 @@ void VP1CaloReadoutSystem::createEtaPhi() { for (e=manager->beginFCAL();e!=manager->endFCAL(); e++) { const FCALModule *fcalMod = *e; - const HepGeom::Transform3D &xf = fcalMod->getAbsoluteTransform(); + const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform()); SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf); @@ -1751,7 +1753,7 @@ void VP1CaloReadoutSystem::userPickedNode(SoNode* mySelectedNode, SoPath */*pick const FCALModule *fcalMod=element->getModule(); - const HepGeom::Transform3D &xf = fcalMod->getAbsoluteTransform(); + const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform()); SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf); SoSeparator * sep = new SoSeparator(); @@ -1800,7 +1802,7 @@ void VP1CaloReadoutSystem::userPickedNode(SoNode* mySelectedNode, SoPath */*pick } if (m_clockwork->ui.fcalTubesCheckBox->isChecked()) { const FCALModule *fcalMod=element->getModule(); - const HepGeom::Transform3D &xf = fcalMod->getAbsoluteTransform(); + const HepGeom::Transform3D &xf = Amg::EigenTransformToCLHEP(fcalMod->getAbsoluteTransform()); SoTransform *XF = VP1LinAlgUtils::toSoTransform(xf); SoSeparator * sep = new SoSeparator(); @@ -1895,7 +1897,7 @@ void VP1CaloReadoutSystem::userPickedNode(SoNode* mySelectedNode, SoPath */*pick const HECDetectorManager *hecManager = VP1DetInfo::hecDetMgr(); const HECDetectorRegion *region = hecManager->getDetectorRegion(element->getEndcapIndex(),element->getSamplingIndex(),element->getRegionIndex()); - const HepGeom::Transform3D &XF= region->getAbsoluteTransform(); + const HepGeom::Transform3D &XF= Amg::EigenTransformToCLHEP(region->getAbsoluteTransform()); double z = (XF*HepGeom::Point3D<double>(0,0,element->getZLocal(HECCell::FRONT))).z(); double phiMin = module->getPhiMin(); diff --git a/graphics/VP1/VP1Systems/VP1CaloSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1CaloSystems/CMakeLists.txt index d2bc10e5d61..78d206c3dd5 100644 --- a/graphics/VP1/VP1Systems/VP1CaloSystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1CaloSystems/CMakeLists.txt @@ -17,7 +17,6 @@ atlas_depends_on_subdirs( Calorimeter/CaloEvent Calorimeter/CaloIdentifier Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoModel/GeoModelUtilities GaudiKernel LArCalorimeter/LArIdentifier @@ -36,6 +35,7 @@ find_package( CLHEP ) find_package( Coin3D ) find_package( Qt5 COMPONENTS Core Gui Widgets ) #find_package( Qwt ) +find_package( GeoModel ) # Generate UI files automatically: set( CMAKE_AUTOUIC TRUE ) @@ -51,8 +51,8 @@ atlas_add_library( VP1CaloSystems ${CMAKE_CURRENT_BINARY_DIR} DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${CLHEP_LIBRARIES} Identifier VP1Base Qt5::Core - PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${QWT_LIBRARIES} CaloDetDescrLib + PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${QWT_LIBRARIES} ${GEOMODEL_LIBRARIES} CaloDetDescrLib StoreGateLib LArCablingLib TileConditionsLib CaloConditions CaloEvent - CaloIdentifier GeoModelKernel GeoModelUtilities GaudiKernel LArIdentifier + CaloIdentifier GeoModelUtilities GaudiKernel LArIdentifier LArRawEvent TileDetDescr TileEvent TileIdentifier VP1HEPVis VP1Utils Qt5::Gui ) diff --git a/graphics/VP1/VP1Systems/VP1CaloSystems/VP1CaloSystems/VP1CaloCellController.h b/graphics/VP1/VP1Systems/VP1CaloSystems/VP1CaloSystems/VP1CaloCellController.h index 52a764f477e..b61bbc46678 100644 --- a/graphics/VP1/VP1Systems/VP1CaloSystems/VP1CaloSystems/VP1CaloCellController.h +++ b/graphics/VP1/VP1Systems/VP1CaloSystems/VP1CaloSystems/VP1CaloCellController.h @@ -7,6 +7,7 @@ #include "VP1Base/VP1Controller.h" #include "VP1CaloSystems/VP1CaloCells.h" +#include "GeoModelKernel/Units.h" #include <QByteArray> #include <QString> #include <map> @@ -113,7 +114,7 @@ class VP1CaloCellController : public VP1Controller //For verbose output: template <class T> static QString toString( const T& t ) { return VP1Controller::toString(t); }//unhide base methods static QString toString(const VP1CCIntervalMap& m) { return "VP1CCIntervalMap of size "+QString::number(m.count()); } - static QString toString(const QPair<bool,double>& par) { return "<"+QString(par.first?"log":"linear")+", "+QString::number(par.second/(CLHEP::cm/CLHEP::GeV))+" cm/GeV>"; } + static QString toString(const QPair<bool,double>& par) { return "<"+QString(par.first?"log":"linear")+", "+QString::number(par.second/(GeoModelKernelUnits::cm/GeoModelKernelUnits::GeV))+" cm/GeV>"; } static QString toString(const VP1CC_GlobalCuts& cuts) { return "VP1CC global cuts: sideA=" + QString(cuts.sideA?"True":"False") + ", sideC=" + QString(cuts.sideC?"True":"False") + ", allowedEta=" + VP1Controller::toString(cuts.allowedEta) + ", allowedPhi=" + VP1Controller::toString(cuts.allowedEta); } // // FIXME:You have to compile Qwt with Qt5. LCG's Qwt is compiled with Qt4 only... diff --git a/graphics/VP1/VP1Systems/VP1CaloSystems/VP1CaloSystems/VP1CaloCells.h b/graphics/VP1/VP1Systems/VP1CaloSystems/VP1CaloSystems/VP1CaloCells.h index c8a9d387039..7b00191e1d9 100644 --- a/graphics/VP1/VP1Systems/VP1CaloSystems/VP1CaloSystems/VP1CaloCells.h +++ b/graphics/VP1/VP1Systems/VP1CaloSystems/VP1CaloSystems/VP1CaloCells.h @@ -10,7 +10,9 @@ #include "Identifier/Identifier.h" #include "Identifier/IdentifierHash.h" -#include "CLHEP/Geometry/Transform3D.h" +#include "GeoPrimitives/GeoPrimitives.h" +#include "GeoModelKernel/GeoDefinitions.h" +#include "GeoModelKernel/Units.h" #include <map> #include <set> @@ -185,7 +187,7 @@ class VP1CaloCell const VP1CC_GlobalCuts& ) = 0; double cellDepth(const QPair<bool,double>& scale, const double& energy) - { return std::max(1.0*CLHEP::mm,scale.second*(scale.first?log(1+fabs(energy)):fabs(energy))); } + { return std::max(1.0*GeoModelKernelUnits::mm,scale.second*(scale.first?log(1+fabs(energy)):fabs(energy))); } virtual bool isInsideClipVolume(const VP1CC_GlobalCuts& globalCuts) ; // by default uses radius to determine this @@ -386,7 +388,7 @@ class VP1CC_TileCrack : public VP1CC_Tile // 1. MBTS scintillator shape parameters (2 different shapes) // 2. MBTS scintillator global positions -typedef std::map<int, HepGeom::Transform3D, std::less<int> > VP1CC_MbtsXfMap; +typedef std::map<int, GeoTrf::Transform3D, std::less<int> > VP1CC_MbtsXfMap; typedef struct { diff --git a/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1CaloCellController.cxx b/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1CaloCellController.cxx index 710d7a84ac9..c275a81ab16 100644 --- a/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1CaloCellController.cxx +++ b/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1CaloCellController.cxx @@ -1137,7 +1137,7 @@ VP1CCIntervalMap VP1CaloCellController::selectionIntervals() const QPair<bool,double> VP1CaloCellController::scale() const { - double scl = m_d->ui_visopts.chbxLogscale->isChecked() ? m_d->ui_visopts.dspbxScale->value()*CLHEP::m/log(1+10*CLHEP::GeV) : m_d->ui_visopts.dspbxScale->value()*CLHEP::m/(10*CLHEP::GeV); + double scl = m_d->ui_visopts.chbxLogscale->isChecked() ? m_d->ui_visopts.dspbxScale->value()*GeoModelKernelUnits::m/log(1+10*GeoModelKernelUnits::GeV) : m_d->ui_visopts.dspbxScale->value()*GeoModelKernelUnits::m/(10*GeoModelKernelUnits::GeV); return QPair<bool,double>(m_d->ui_visopts.chbxLogscale->isChecked(),scl); } diff --git a/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1CaloCells.cxx b/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1CaloCells.cxx index ea8e67278f5..b91cd28aaba 100644 --- a/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1CaloCells.cxx +++ b/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1CaloCells.cxx @@ -24,8 +24,6 @@ #include <stdexcept> #include <sstream> -#include "CLHEP/Units/SystemOfUnits.h" - // MBTS #include "CaloIdentifier/TileTBID.h" #include <Inventor/nodes/SoTransform.h> diff --git a/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1MbtsHelper.cxx b/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1MbtsHelper.cxx index 7ff23be36a7..04dc2eda7c7 100644 --- a/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1MbtsHelper.cxx +++ b/graphics/VP1/VP1Systems/VP1CaloSystems/src/VP1MbtsHelper.cxx @@ -92,11 +92,11 @@ void VP1MbtsHelper::systemcreate(StoreGateSvc* detstore) GeoFullPhysVol* pvLArECA = storedLArECA->getPhysVol(); GeoFullPhysVol* pvLArECC = storedLArECC->getPhysVol(); - HepGeom::Transform3D xfLArECA = pvLArECA->getAbsoluteTransform(); - HepGeom::Transform3D xfLArECC = pvLArECC->getAbsoluteTransform(); + GeoTrf::Transform3D xfLArECA = pvLArECA->getAbsoluteTransform(); + GeoTrf::Transform3D xfLArECC = pvLArECC->getAbsoluteTransform(); // Find a pointer to MBTS mother volume and its local transform - HepGeom::Transform3D xfMbtsMother; + GeoTrf::Transform3D xfMbtsMother; PVConstLink pvMbtsMother; bool mbtsExists = false; diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1GeometrySystems/CMakeLists.txt index 6763fda413f..72a59b24ebb 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/CMakeLists.txt @@ -9,7 +9,7 @@ atlas_subdir( VP1GeometrySystems ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel + DetectorDescription/GeoPrimitives MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry Generators/TruthUtils Event/xAOD/xAODTruth @@ -23,6 +23,7 @@ atlas_depends_on_subdirs( find_package( CLHEP ) find_package( Coin3D ) find_package( Qt5 COMPONENTS Core Gui Widgets ) +find_package( GeoModel ) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -45,5 +46,5 @@ atlas_add_library( VP1GeometrySystems INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${COIN3D_LIBRARIES} GeoModelKernel MuonReadoutGeometry TruthUtils xAODTruth VP1Base GL Qt5::Core Qt5::Widgets + LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODEL_LIBRARIES} MuonReadoutGeometry TruthUtils xAODTruth VP1Base GL Qt5::Core Qt5::Widgets PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelUtilities VP1HEPVis VP1Utils Qt5::Gui ) diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/DumpShape.cxx b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/DumpShape.cxx index 16317bd07b9..8b619104ad4 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/DumpShape.cxx +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/DumpShape.cxx @@ -4,6 +4,7 @@ #include "VP1GeometrySystems/DumpShape.h" +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoShape.h" #include "GeoModelKernel/GeoBox.h" #include "GeoModelKernel/GeoTubs.h" @@ -21,6 +22,7 @@ #include "GeoModelKernel/GeoGenericTrap.h" #include "CLHEP/Units/SystemOfUnits.h" +#include "CLHEP/Vector/TwoVector.h" #include "VP1Utils/VP1LinAlgUtils.h" #include "Inventor/SbMatrix.h" @@ -149,7 +151,7 @@ QStringList DumpShape::shapeToStringList(const GeoShape* shape) if (theShift){ out << " =========> GeoShapeShift:"; SbMatrix t; - VP1LinAlgUtils::transformToMatrix(theShift->getX(), t); + VP1LinAlgUtils::transformToMatrix(Amg::EigenTransformToCLHEP(theShift->getX()), t); float translation_x, translation_y, translation_z, rotaxis_x, rotaxis_y, rotaxis_z, rotangle_radians; VP1LinAlgUtils::decodeTransformation( t, translation_x, translation_y, translation_z, @@ -212,7 +214,11 @@ QStringList DumpShape::shapeToStringList(const GeoShape* shape) if (theGenericTrap){ out << " =========> GenericTrap:"; out << " halfZlength = "+QString::number(theGenericTrap->getZHalfLength()/CLHEP::mm)+" mm"; - std::vector<CLHEP::Hep2Vector> vertices = theGenericTrap->getVertices(); + std::vector<CLHEP::Hep2Vector> vertices; + vertices.reserve(theGenericTrap->getVertices().size()); + for(const auto& geoVertex : theGenericTrap->getVertices()) { + vertices.push_back(CLHEP::Hep2Vector(geoVertex.x(),geoVertex.y())); + } //in total 8 vertices by definition! out << "==> First 4 vertices at - hz/2"; out << "(Ax,Ay) = ( "+QString::number(vertices[0].x()/CLHEP::mm)+" , "+QString::number(vertices[0].y()/CLHEP::mm)+" ) mm"; diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VP1GeometrySystem.cxx b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VP1GeometrySystem.cxx index caeaf57606a..8ce1c04fdc7 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VP1GeometrySystem.cxx +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VP1GeometrySystem.cxx @@ -540,7 +540,7 @@ void VP1GeometrySystem::buildPermanentSceneGraph(StoreGateSvc*/*detstore*/, SoSe //We did... now, time to extract info: subsys->treetopinfo.resize(subsys->treetopinfo.size()+1); subsys->treetopinfo.back().pV = av.getVolume(); - subsys->treetopinfo.back().xf = av.getTransform(); + subsys->treetopinfo.back().xf = Amg::EigenTransformToCLHEP(av.getTransform()); subsys->treetopinfo.back().volname = av.getName(); //Add a switch for this system (turned off for now): @@ -995,7 +995,7 @@ void VP1GeometrySystem::Imp::buildSystem(SubSystemInfo* si) if (si->childrenRegExpNameCompatible(av.getName().c_str())) { PVConstLink pVD = av.getVolume(); SbMatrix matr; - VP1LinAlgUtils::transformToMatrix(av.getTransform(),matr); + VP1LinAlgUtils::transformToMatrix(Amg::EigenTransformToCLHEP(av.getTransform()),matr); VolumeHandle * vh=0; // std::cout<<count++<<": dump SubSystemInfo\n"<<"---"<<std::endl; // si->dump(); diff --git a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeHandle.cxx b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeHandle.cxx index 6809aeda9ba..eeaa2ae73cf 100644 --- a/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeHandle.cxx +++ b/graphics/VP1/VP1Systems/VP1GeometrySystems/src/VolumeHandle.cxx @@ -141,7 +141,7 @@ void VolumeHandle::initialiseChildren() while (!av.atEnd()) { //Add transformation between parent and child to find the complete transformation of the child: SbMatrix matr; - VP1LinAlgUtils::transformToMatrix(av.getTransform(), matr); + VP1LinAlgUtils::transformToMatrix(Amg::EigenTransformToCLHEP(av.getTransform()), matr); matr.multRight(m_d->accumTrans); m_children.push_back(new VolumeHandle(m_d->commondata,this,av.getVolume(),ichild++,(isInMuonChamber()?MUONCHAMBERCHILD:NONMUONCHAMBER),matr)); av.next(); @@ -271,7 +271,7 @@ void VolumeHandle::ensureBuildNodeSep() //In the case of a GeoShapeShift we add its contained transformation here: //Fixme: Remember to use this extra transformation for phisector cuts also! if (m_d->pV->getLogVol()->getShape()->typeID()==GeoShapeShift::getClassTypeID()) - m_d->nodesep->addChild(VP1LinAlgUtils::toSoTransform(dynamic_cast<const GeoShapeShift*>(m_d->pV->getLogVol()->getShape())->getX())); + m_d->nodesep->addChild(VP1LinAlgUtils::toSoTransform(Amg::EigenTransformToCLHEP(dynamic_cast<const GeoShapeShift*>(m_d->pV->getLogVol()->getShape())->getX()))); //Add shape child(ren) and get the separator (helper) where we attach the nodesep when volume is visible: if (iphi>=-1) { diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1PRDSystems/CMakeLists.txt index 664ae08e27a..64389e93480 100644 --- a/graphics/VP1/VP1Systems/VP1PRDSystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1PRDSystems/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( VP1PRDSystems ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoPrimitives InnerDetector/InDetDetDescr/InDetReadoutGeometry InnerDetector/InDetRecEvent/InDetPrepRawData @@ -38,6 +37,7 @@ atlas_depends_on_subdirs( find_package( CLHEP ) find_package( Coin3D ) find_package( Qt5 COMPONENTS Core Gui Widgets) +find_package( GeoModel ) # Generate UI files automatically: set( CMAKE_AUTOUIC TRUE ) @@ -49,7 +49,7 @@ atlas_add_library( VP1PRDSystems VP1PRDSystems/*.h src/*.cxx PUBLIC_HEADERS VP1PRDSystems PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} - LINK_LIBRARIES GeoModelKernel GeoPrimitives InDetReadoutGeometry + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} GeoPrimitives InDetReadoutGeometry InDetPrepRawData MuonPrepRawData TrkPrepRawData TrkSpacePoint VP1Base VP1Utils MuonIdHelpersLib Qt5::Core Qt5::Gui PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/MuonChamberProjectionHelper.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/MuonChamberProjectionHelper.cxx index 2dd115542e6..f4598bb17c2 100644 --- a/graphics/VP1/VP1Systems/VP1PRDSystems/src/MuonChamberProjectionHelper.cxx +++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/MuonChamberProjectionHelper.cxx @@ -215,7 +215,7 @@ bool MuonChamberProjectionHelper::Imp::init() av.next(); continue; } - Amg::Transform3D toptransform = Amg::CLHEPTransformToEigen(av.getTransform()); + Amg::Transform3D toptransform = av.getTransform(); GeoVolumeCursor av2(av.getVolume()); while (!av2.atEnd()) { if (nameIsMDTChamber(av2.getName())) { @@ -240,7 +240,7 @@ bool MuonChamberProjectionHelper::Imp::init() && trd->getYHalfLength1() > 0.0 && trd->getYHalfLength2() > 0.0 ) { trd->ref(); - Amg::Transform3D geovolume_transf = Amg::CLHEPTransformToEigen(av2.getTransform()); + Amg::Transform3D geovolume_transf = av2.getTransform(); mdtchambervolinfo.insert(std::pair<const GeoPVConstLink,MDTChamberInfo>( av2.getVolume(), Imp::MDTChamberInfo(toptransform * geovolume_transf, trd) )); } else { theclass->message("MuonChamberProjectionHelper Error: Chamber trd has non-positive shape parameters!"); diff --git a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TGC.cxx b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TGC.cxx index f4e30fd42df..e78f4cbaeb4 100644 --- a/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TGC.cxx +++ b/graphics/VP1/VP1Systems/VP1PRDSystems/src/PRDHandle_TGC.cxx @@ -54,7 +54,7 @@ SoTransform * PRDHandle_TGC::createTransform() const } Amg::Vector3D lpos_shift(lposTGC.x(),locy_shift,z_shift); - const Amg::Transform3D tgcTrans = Amg::CLHEPTransformToEigen(detEl->getMaterialGeom()->getAbsoluteTransform()); + const Amg::Transform3D tgcTrans = detEl->getMaterialGeom()->getAbsoluteTransform(); Amg::Vector3D gpos = tgcTrans*lposTGC; Amg::Vector3D gpos_shift = tgcTrans*lpos_shift; diff --git a/graphics/VP1/VP1Systems/VP1RawDataSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1RawDataSystems/CMakeLists.txt index fa5f972f94b..de4431bdaf8 100644 --- a/graphics/VP1/VP1Systems/VP1RawDataSystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1RawDataSystems/CMakeLists.txt @@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PUBLIC DetectorDescription/GeoPrimitives graphics/VP1/VP1Base PRIVATE - DetectorDescription/GeoModel/GeoModelKernel Event/EventPrimitives ForwardDetectors/LUCID/LUCID_RawEvent GaudiKernel @@ -25,6 +24,7 @@ atlas_depends_on_subdirs( PUBLIC find_package( Coin3D ) find_package( Eigen ) find_package( Qt5 COMPONENTS Core Gui Widgets ) +find_package( GeoModel ) # Generate UI files automatically: set( CMAKE_AUTOUIC TRUE ) @@ -43,5 +43,5 @@ atlas_add_library( VP1RawDataSystems VP1RawDataSystems/*.h src/*.h src/*.cxx src PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} FILES LUCID_RawEvent/LUCID_Digit.h LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoPrimitives VP1Base GL - PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} GeoModelKernel EventPrimitives LUCID_RawEvent GaudiKernel InDetIdentifier InDetReadoutGeometry InDetBCM_RawData InDetRawData VP1HEPVis VP1Utils ) + PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${GEOMODEL_LIBRARIES} EventPrimitives LUCID_RawEvent GaudiKernel InDetIdentifier InDetReadoutGeometry InDetBCM_RawData InDetRawData VP1HEPVis VP1Utils ) diff --git a/graphics/VP1/VP1Systems/VP1RawDataSystems/src/VP1RawDataHandle_BCM_RDO.cxx b/graphics/VP1/VP1Systems/VP1RawDataSystems/src/VP1RawDataHandle_BCM_RDO.cxx index d3fff54a0a8..6ba77420390 100644 --- a/graphics/VP1/VP1Systems/VP1RawDataSystems/src/VP1RawDataHandle_BCM_RDO.cxx +++ b/graphics/VP1/VP1Systems/VP1RawDataSystems/src/VP1RawDataHandle_BCM_RDO.cxx @@ -132,12 +132,12 @@ void VP1RawDataHandle_BCM_RDO::Imp::ensureInitModuleInfo() GeoVolumeCursor av(*world); while (!av.atEnd()) { if (av.getName()=="Pixel") { - Amg::Transform3D tr_pix = Amg::CLHEPTransformToEigen( av.getTransform() ); + Amg::Transform3D tr_pix = av.getTransform(); GeoVolumeCursor pv(av.getVolume()); while (!pv.atEnd()) { int bcmModLogCopyNumber(-1); if (pv.getVolume()->getLogVol()->getName()=="bcmModLog") { - Amg::Transform3D tr_bcmmod = Amg::CLHEPTransformToEigen( pv.getTransform() ); + Amg::Transform3D tr_bcmmod = pv.getTransform(); Query<int> Qint = pv.getId(); if (Qint.isValid()) { bcmModLogCopyNumber = int(Qint); @@ -145,7 +145,7 @@ void VP1RawDataHandle_BCM_RDO::Imp::ensureInitModuleInfo() GeoVolumeCursor bv(pv.getVolume()); while (!bv.atEnd()) { if (bv.getVolume()->getLogVol()->getName()=="bcmDiamondLog") { - Amg::Transform3D tr_diamond( Amg::CLHEPTransformToEigen( bv.getTransform() ) ); + Amg::Transform3D tr_diamond(bv.getTransform()); const GeoBox * box = bv.getVolume()->getLogVol()->getShape()->typeID()==GeoBox::getClassTypeID() ? static_cast<const GeoBox*>(bv.getVolume()->getLogVol()->getShape()) : 0; modInfo->addBox(tr_pix*tr_bcmmod*tr_diamond,box); diff --git a/graphics/VP1/VP1Systems/VP1RawDataSystems/src/VP1RawDataHandle_LUCID.cxx b/graphics/VP1/VP1Systems/VP1RawDataSystems/src/VP1RawDataHandle_LUCID.cxx index 3d7b1c9fc67..7f3c0fc790f 100644 --- a/graphics/VP1/VP1Systems/VP1RawDataSystems/src/VP1RawDataHandle_LUCID.cxx +++ b/graphics/VP1/VP1Systems/VP1RawDataSystems/src/VP1RawDataHandle_LUCID.cxx @@ -138,7 +138,7 @@ void VP1RawDataHandle_LUCID::Imp::ensureInitTubeInfo() if (tubeID>=0) { const GeoTube * geotube = av4.getVolume()->getLogVol()->getShape()->typeID()==GeoTube::getClassTypeID() ? static_cast<const GeoTube*>(av4.getVolume()->getLogVol()->getShape()) : 0; - Amg::Transform3D tr( Amg::CLHEPTransformToEigen(av.getTransform()*av2.getTransform()*av3.getTransform()*av4.getTransform() ) ); + Amg::Transform3D tr( av.getTransform()*av2.getTransform()*av3.getTransform()*av4.getTransform() ); (*tubeID2TubeInfo)[tubeID] = new TubeInfo(tubeID,tr,geotube); if (VP1Msg::verbose()) VP1Msg::messageVerbose("VP1RawDataHandle_LUCID Added TubeInfo for tubeID = "+QString::number(tubeID)); diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1TrackSystems/CMakeLists.txt index ee2d554f7ae..12a83342665 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/CMakeLists.txt @@ -9,7 +9,6 @@ atlas_subdir( VP1TrackSystems ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoPrimitives DetectorDescription/Identifier Event/xAOD/xAODTracking @@ -65,6 +64,7 @@ find_package( CLHEP ) find_package( Coin3D ) find_package( HepMC ) find_package( Qt5 COMPONENTS Core Gui Widgets ) +find_package( GeoModel ) # Generate UI files automatically: # Note: add the "Widgets" component to "find_package( Qt5 ...)" if you have UI files, otherwise UIC, even if CMAKE_AUTOUIC is set to ON, is not run @@ -77,7 +77,7 @@ atlas_add_library( VP1TrackSystems VP1TrackSystems/*.h src/*.cxx PUBLIC_HEADERS VP1TrackSystems PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} - LINK_LIBRARIES GeoModelKernel GeoPrimitives Identifier xAODTracking + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} GeoPrimitives Identifier xAODTracking GaudiKernel GeneratorObjects TrkDetDescrInterfaces TrkSurfaces TrkEventPrimitives TrkParameters VP1Base VP1Utils StoreGateLib SGtests MuonIdHelpersLib MuonRecHelperToolsLib Qt5::Core Qt5::Gui diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/SimHitHandle_SiHit.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/SimHitHandle_SiHit.cxx index aa2930a835b..4fda1569d55 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/SimHitHandle_SiHit.cxx +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/SimHitHandle_SiHit.cxx @@ -94,7 +94,7 @@ Amg::Vector3D SimHitHandle_SiHit::Imp::localToGlobal( const HepGeom::Point3D<dou { if (!ensureDetElemInit()) return Amg::Vector3D(0,0,0); - return Amg::Vector3D(detelem->transformHit() * local); + return Amg::Vector3D(Amg::EigenTransformToCLHEP(detelem->transformHit()) * local); } //____________________________________________________________________ diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackPropagationHelper.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackPropagationHelper.cxx index 04076ecd1d8..7e8bb6a37d5 100644 --- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackPropagationHelper.cxx +++ b/graphics/VP1/VP1Systems/VP1TrackSystems/src/TrackPropagationHelper.cxx @@ -26,6 +26,7 @@ #include "TrkVolumes/BoundarySurface.h" #include "TrkVolumes/VolumeBounds.h" +#include "CLHEP/Units/PhysicalConstants.h" #include "VP1Base/VP1QtUtils.h" #include <limits> diff --git a/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/CMakeLists.txt index 72b1e98ca49..17ac75c5f04 100644 --- a/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/CMakeLists.txt @@ -7,7 +7,6 @@ atlas_subdir( VP1TrackingGeometrySystems ) # Declare the package's dependencies: atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelKernel Tracking/TrkDetDescr/TrkVolumes graphics/VP1/VP1Base PRIVATE @@ -24,6 +23,7 @@ atlas_depends_on_subdirs( PUBLIC find_package( Coin3D ) find_package( Eigen ) find_package( Qt5 COMPONENTS Core Gui Widgets ) +find_package( GeoModel ) # Generate UI files automatically: set( CMAKE_AUTOUIC TRUE ) @@ -41,6 +41,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) atlas_add_library( VP1TrackingGeometrySystems VP1TrackingGeometrySystems/*.h src/*.h src/*.cxx src/*.qrc PUBLIC_HEADERS VP1TrackingGeometrySystems PRIVATE_INCLUDE_DIRS ${COIN3D_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES GeoModelKernel TrkVolumes VP1Base GL StoreGateLib SGtests + LINK_LIBRARIES ${GEOMODEL_LIBRARIES} TrkVolumes VP1Base GL StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} ${EIGEN_LIBRARIES} GeoPrimitives GaudiKernel TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry VP1HEPVis VP1Utils ) diff --git a/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/src/TrackingVolumeToSoNode.cxx b/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/src/TrackingVolumeToSoNode.cxx index 90d08766755..559a76663a6 100755 --- a/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/src/TrackingVolumeToSoNode.cxx +++ b/graphics/VP1/VP1Systems/VP1TrackingGeometrySystems/src/TrackingVolumeToSoNode.cxx @@ -13,6 +13,7 @@ // // ///////////////////////////////////////////////////////////////////////// +#include "GeoPrimitives/GeoPrimitives.h" #include "VP1TrackingGeometrySystems/TrackingVolumeToSoNode.h" #include "VP1HEPVis/nodes/SoGenericBox.h" #include "VP1HEPVis/nodes/SoTubs.h" @@ -42,6 +43,7 @@ #include "GeoModelKernel/GeoShapeIntersection.h" #include "GeoModelKernel/GeoShapeUnion.h" #include "GeoModelKernel/GeoSimplePolygonBrep.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "GeoPrimitives/GeoPrimitives.h" @@ -146,8 +148,8 @@ SoNode* TrackingVolumeToSoNode::translateTrackingVolume(const Trk::TrackingVolu Trk::TrapezoidVolumeBounds* trBoundB = new Trk::TrapezoidVolumeBounds(medX,maxX,z,y2); const GeoShape* trdA = getShapeFromBounds( trBoundA ); const GeoShape* trdB = getShapeFromBounds( trBoundB ); - const GeoShapeShift* shiftA = new GeoShapeShift(trdA,HepGeom::TranslateY3D(-y1)*HepGeom::RotateX3D(-90*CLHEP::deg)*HepGeom::RotateZ3D(-90*CLHEP::deg)); - const GeoShapeShift* shiftB = new GeoShapeShift(trdB,HepGeom::TranslateY3D(+y2)*HepGeom::RotateX3D(-90*CLHEP::deg)*HepGeom::RotateZ3D(-90*CLHEP::deg)); + const GeoShapeShift* shiftA = new GeoShapeShift(trdA,GeoTrf::TranslateY3D(-y1)*GeoTrf::RotateX3D(-90*CLHEP::deg)*GeoTrf::RotateZ3D(-90*CLHEP::deg)); + const GeoShapeShift* shiftB = new GeoShapeShift(trdB,GeoTrf::TranslateY3D(+y2)*GeoTrf::RotateX3D(-90*CLHEP::deg)*GeoTrf::RotateZ3D(-90*CLHEP::deg)); const GeoShapeUnion* dtrd = new GeoShapeUnion(shiftA,shiftB); SoVisualizeAction* sa = new SoVisualizeAction(); @@ -175,14 +177,14 @@ SoNode* TrackingVolumeToSoNode::translateTrackingVolume(const Trk::TrackingVolu } else if ( type==1 ) { const GeoTubs* tubs = new GeoTubs(innerR,outerR,hZ,-hPhi,2*hPhi); const GeoBox* box = new GeoBox( innerR, tp*innerR, hZ); - const GeoShapeSubtraction* sub = new GeoShapeSubtraction(tubs,new GeoShapeShift(box,HepGeom::Transform3D())); + const GeoShapeSubtraction* sub = new GeoShapeSubtraction(tubs,new GeoShapeShift(box,GeoTrf::Transform3D::Identity())); SoVisualizeAction* sa = new SoVisualizeAction(); sa->handleShape(sub); sovol = sa->getShape(); } else if ( type==2 ) { const GeoTubs* tubs = new GeoTubs(innerR,outerR/cos(hPhi),hZ,-hPhi,2*hPhi); const GeoBox* box = new GeoBox( outerR*(1./cos(hPhi)-1.),tp*outerR,hZ ); - const GeoShapeSubtraction* sub = new GeoShapeSubtraction(tubs,new GeoShapeShift(box,HepGeom::TranslateX3D(outerR/cos(hPhi)))); + const GeoShapeSubtraction* sub = new GeoShapeSubtraction(tubs,new GeoShapeShift(box,GeoTrf::TranslateX3D(outerR/cos(hPhi)))); SoVisualizeAction* sa = new SoVisualizeAction(); sa->handleShape(sub); sovol = sa->getShape(); @@ -190,7 +192,7 @@ SoNode* TrackingVolumeToSoNode::translateTrackingVolume(const Trk::TrackingVolu const GeoTubs* tubs = new GeoTubs(innerR,outerR/cos(hPhi),hZ,-hPhi,2*hPhi); const GeoBox* boxO = new GeoBox( outerR*(1./cos(hPhi)-1.),tp*outerR,hZ ); const GeoBox* boxI = new GeoBox( innerR, tp*innerR, hZ); - const GeoShapeUnion* uni = new GeoShapeUnion(boxI,new GeoShapeShift(boxO,HepGeom::TranslateX3D(outerR/cos(hPhi)))); + const GeoShapeUnion* uni = new GeoShapeUnion(boxI,new GeoShapeShift(boxO,GeoTrf::TranslateX3D(outerR/cos(hPhi)))); const GeoShapeSubtraction* sub = new GeoShapeSubtraction(tubs,uni); SoVisualizeAction* sa = new SoVisualizeAction(); sa->handleShape(sub); @@ -267,9 +269,9 @@ const GeoShape* TrackingVolumeToSoNode::getShapeFromBounds(const Trk::VolumeBoun double thPlus = tvolBevCylBounds->thetaPlus(); double thMinus= tvolBevCylBounds->thetaMinus(); const GeoTube* tub = new GeoTube(innerR, outerR, halfZ); - HepGeom::Transform3D trBoxP = HepGeom::TranslateZ3D(+halfZ)*HepGeom::RotateY3D(thPlus); + GeoTrf::Transform3D trBoxP = GeoTrf::TranslateZ3D(+halfZ)*GeoTrf::RotateY3D(thPlus); const GeoShapeShift* boxP = new GeoShapeShift(new GeoBox(2*outerR/cos(thPlus),outerR ,outerR*sin(thPlus)),trBoxP); - HepGeom::Transform3D trBoxM = HepGeom::TranslateZ3D(-halfZ)*HepGeom::RotateY3D(-thMinus); + GeoTrf::Transform3D trBoxM = GeoTrf::TranslateZ3D(-halfZ)*GeoTrf::RotateY3D(-thMinus); const GeoShapeShift* boxM = new GeoShapeShift(new GeoBox(2*outerR/cos(thPlus),outerR ,outerR*sin(thPlus)),trBoxM); const GeoShapeSubtraction* shape= new GeoShapeSubtraction( new GeoShapeSubtraction(tub,boxM), boxP); @@ -298,8 +300,8 @@ const GeoShape* TrackingVolumeToSoNode::getShapeFromBounds(const Trk::VolumeBoun } const GeoShape* shape1 = getShapeFromBounds(vb1); const GeoShape* shape2 = getShapeFromBounds(vb2); - const GeoShapeShift* shift1 = new GeoShapeShift(shape1, Amg::EigenTransformToCLHEP(transf1) ); - const GeoShapeShift* shift2 = new GeoShapeShift(shape2, Amg::EigenTransformToCLHEP(transf2) ); + const GeoShapeShift* shift1 = new GeoShapeShift(shape1, transf1); + const GeoShapeShift* shift2 = new GeoShapeShift(shape2, transf2); const GeoShapeSubtraction* subtr= new GeoShapeSubtraction(shift1, shift2); return subtr; } @@ -325,8 +327,8 @@ const GeoShape* TrackingVolumeToSoNode::getShapeFromBounds(const Trk::VolumeBoun } const GeoShape* shape1 = getShapeFromBounds(vb1); const GeoShape* shape2 = getShapeFromBounds(vb2); - const GeoShapeShift* shift1 = new GeoShapeShift(shape1, Amg::EigenTransformToCLHEP(transf1) ); - const GeoShapeShift* shift2 = new GeoShapeShift(shape2, Amg::EigenTransformToCLHEP(transf2) ); + const GeoShapeShift* shift1 = new GeoShapeShift(shape1,transf1); + const GeoShapeShift* shift2 = new GeoShapeShift(shape2,transf2); if (tvolCombBounds->intersection()) { const GeoShapeIntersection* intersection= new GeoShapeIntersection( shift1, shift2); return intersection; diff --git a/graphics/VP1/VP1Systems/VP1VertexSystems/src/VP1VertexCollection.cxx b/graphics/VP1/VP1Systems/VP1VertexSystems/src/VP1VertexCollection.cxx index 13826815f6d..9c6e6b42b46 100644 --- a/graphics/VP1/VP1Systems/VP1VertexSystems/src/VP1VertexCollection.cxx +++ b/graphics/VP1/VP1Systems/VP1VertexSystems/src/VP1VertexCollection.cxx @@ -42,6 +42,7 @@ #include "TrkParticleBase/LinkToTrackParticleBase.h" #include "TrkTrackLink/ITrackLink.h" #include "GeoPrimitives/GeoPrimitives.h" +#include "GaudiKernel/SystemOfUnits.h" #include <iostream> @@ -511,8 +512,8 @@ QStringList VP1VertexCollection::infoOnClicked(SoPath* pickedPath) //Make output: l <<"Reconstructed vertex from collection "+text()+":" ; - l << "--Position [CLHEP::mm]: ("+str(vtx->recVertex().position().x()/CLHEP::mm)+", "+ - str(vtx->recVertex().position().y()/CLHEP::mm)+", "+str(vtx->recVertex().position().z()/CLHEP::mm)+")"; + l << "--Position [CLHEP::mm]: ("+str(vtx->recVertex().position().x()/Gaudi::Units::mm)+", "+ + str(vtx->recVertex().position().y()/Gaudi::Units::mm)+", "+str(vtx->recVertex().position().z()/Gaudi::Units::mm)+")"; //Track associations. (in the future we will use them to tell the //track system to e.g. colour tracks by vertex - for now just print the number of those): diff --git a/graphics/VP1/VP1Utils/CMakeLists.txt b/graphics/VP1/VP1Utils/CMakeLists.txt index 1de2eb71f69..09ebbed35da 100644 --- a/graphics/VP1/VP1Utils/CMakeLists.txt +++ b/graphics/VP1/VP1Utils/CMakeLists.txt @@ -13,7 +13,6 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaKernel Control/StoreGate - DetectorDescription/GeoModel/GeoModelKernel DetectorDescription/GeoPrimitives Event/EventPrimitives GaudiKernel @@ -44,6 +43,7 @@ find_package( Coin3D ) find_package( Eigen ) find_package( HepPDT ) find_package( Qt5 COMPONENTS Core HINTS ${QT5_ROOT} ) +find_package( GeoModel ) # CLHEP definitions: add_definitions( -DCLHEP_MAX_MIN_DEFINED @@ -59,7 +59,7 @@ atlas_add_library( VP1Utils VP1Utils/*.h src/*.cxx src/*.cpp INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${COIN3D_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoModelKernel EventPrimitives + LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODEL_LIBRARIES} EventPrimitives GaudiKernel VP1Base StoreGateLib SGtests AthDSoCallBacks MuonIdHelpersLib GeoPrimitives Qt5::Core PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${COIN3D_LIBRARIES} diff --git a/graphics/VP1/VP1Utils/src/HitToSodeNode.cxx b/graphics/VP1/VP1Utils/src/HitToSodeNode.cxx index 2802dc71c0b..6a2b2f121ee 100644 --- a/graphics/VP1/VP1Utils/src/HitToSodeNode.cxx +++ b/graphics/VP1/VP1Utils/src/HitToSodeNode.cxx @@ -100,7 +100,7 @@ double HitToSoNode::getTGCAngle(Identifier id) const { } Amg::Vector3D lpos_shift(lposTGC.x(),locy_shift,z_shift); - const Amg::Transform3D tgcTrans = Amg::CLHEPTransformToEigen(detEl->getMaterialGeom()->getAbsoluteTransform()); + const Amg::Transform3D tgcTrans = detEl->getMaterialGeom()->getAbsoluteTransform(); Amg::Vector3D gpos = tgcTrans * lposTGC; Amg::Vector3D gpos_shift = tgcTrans*lpos_shift; diff --git a/graphics/VP1/VP1Utils/src/SbPolyhedrizeAction.cxx b/graphics/VP1/VP1Utils/src/SbPolyhedrizeAction.cxx index ac6d6f49036..c9400065b61 100644 --- a/graphics/VP1/VP1Utils/src/SbPolyhedrizeAction.cxx +++ b/graphics/VP1/VP1Utils/src/SbPolyhedrizeAction.cxx @@ -2,6 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ +#include "GeoPrimitives/GeoPrimitives.h" #include "GeoModelKernel/GeoShapeShift.h" #include "GeoModelKernel/GeoShapeIntersection.h" #include "GeoModelKernel/GeoShapeUnion.h" @@ -19,6 +20,7 @@ #include "GeoModelKernel/GeoTessellatedSolid.h" #include "GeoModelKernel/GeoFacet.h" #include "GeoModelKernel/GeoGenericTrap.h" +#include "GeoModelKernel/GeoDefinitions.h" #include "VP1Utils/SbPolyhedrizeAction.h" #include "VP1HEPVis/SbPolyhedron.h" @@ -40,8 +42,8 @@ SbPolyhedrizeAction::~SbPolyhedrizeAction() void SbPolyhedrizeAction::handleShift(const GeoShapeShift *shift) { shift->getOp()->exec(this); - CLHEP::HepRotation rotation=shift->getX().getRotation(); - CLHEP::Hep3Vector translation = shift->getX().getTranslation(); + GeoTrf::RotationMatrix3D rotation=shift->getX().rotation(); + GeoTrf::Vector3D translation = shift->getX().translation(); // rbianchi - 14.12.2012 // SbVec3f trx(translation.x(),translation.y(),translation.z()); @@ -51,9 +53,9 @@ void SbPolyhedrizeAction::handleShift(const GeoShapeShift *shift) // 0,0,0,1)); SbVec3d trx(translation.x(),translation.y(),translation.z()); #include <VP1HEPVis/SbRotation.h> //using doubles instead of floats. - HEPVis::SbRotation rot(rotation.xx(),rotation.yx(),rotation.zx(),0, - rotation.xy(),rotation.yy(),rotation.zy(),0, - rotation.xz(),rotation.yz(),rotation.zz(),0, + HEPVis::SbRotation rot(rotation(0,0),rotation(1,0),rotation(2,0),0, + rotation(0,1),rotation(1,1),rotation(2,1),0, + rotation(0,2),rotation(1,2),rotation(2.2),0, 0,0,0,1); //--- diff --git a/graphics/VP1/VP1Utils/src/SoVisualizeAction.cxx b/graphics/VP1/VP1Utils/src/SoVisualizeAction.cxx index 3867818cc94..dec8091d1fe 100644 --- a/graphics/VP1/VP1Utils/src/SoVisualizeAction.cxx +++ b/graphics/VP1/VP1Utils/src/SoVisualizeAction.cxx @@ -14,6 +14,7 @@ #include "GeoModelKernel/GeoTessellatedSolid.h" #include "GeoModelKernel/GeoFacet.h" #include "GeoModelKernel/GeoGenericTrap.h" +#include "GeoModelKernel/Units.h" #include "GeoSpecialShapes/LArCustomShape.h" #include "GeoSpecialShapes/LArWheelCalculator.h" #include "VP1HEPVis/nodes/SoTubs.h" @@ -154,11 +155,11 @@ void SoVisualizeAction::handleLArCustom(const LArCustomShape *custom) static const double eta_low = 1.375; - // static const double zWheelRefPoint = 3689.5*CLHEP::mm; //=endg_z0 - static const double dMechFocaltoWRP = 3691. *CLHEP::mm; //=endg_z1 - // static const double dElecFocaltoWRP = 3689. *CLHEP::mm; //=endg_dcf - static const double dWRPtoFrontFace = 11. *CLHEP::mm; - static const double rOuterCutoff = 2034. *CLHEP::mm; //=endg_rlimit + // static const double zWheelRefPoint = 3689.5*GeoModelKernelUnits::mm; //=endg_z0 + static const double dMechFocaltoWRP = 3691. *GeoModelKernelUnits::mm; //=endg_z1 + // static const double dElecFocaltoWRP = 3689. *GeoModelKernelUnits::mm; //=endg_dcf + static const double dWRPtoFrontFace = 11. *GeoModelKernelUnits::mm; + static const double rOuterCutoff = 2034. *GeoModelKernelUnits::mm; //=endg_rlimit SoLAr::initClass(); @@ -181,7 +182,7 @@ void SoVisualizeAction::handleLArCustom(const LArCustomShape *custom) rInner[1] = zWheelBackFace * tanThetaInner; // Note that there is a 3mm gap between the outer surface of the // inner wheel and the inner surface of the outer wheel. - double HalfGapBetweenWheels = 0.15*CLHEP::cm; // In DB EMECGEOMETRY.DCRACK + double HalfGapBetweenWheels = 0.15*GeoModelKernelUnits::cm; // In DB EMECGEOMETRY.DCRACK rOuter[0] = zWheelFrontFace * tanThetaMid - HalfGapBetweenWheels; rOuter[1] = zWheelBackFace * tanThetaMid - HalfGapBetweenWheels; solar->fRmin.setValues(0,2,rInner); @@ -201,7 +202,7 @@ void SoVisualizeAction::handleLArCustom(const LArCustomShape *custom) double zWheelBackFace = zWheelFrontFace + calc->GetWheelThickness(); // Note that there is a 3mm gap between the outer surface of the // inner wheel and the inner surface of the outer wheel. - double HalfGapBetweenWheels = 0.15*CLHEP::cm; // In DB! (EMECGEOMETRY.DCRACK); + double HalfGapBetweenWheels = 0.15*GeoModelKernelUnits::cm; // In DB! (EMECGEOMETRY.DCRACK); rInner[0] = zWheelFrontFace * tanThetaMid + HalfGapBetweenWheels; rInner[2] = zWheelBackFace * tanThetaMid + HalfGapBetweenWheels; rOuter[0] = zWheelFrontFace * tanThetaOuter; -- GitLab