diff --git a/Configuration/Geometry/README.md b/Configuration/Geometry/README.md index 4fc12e8858a68..36c1753ad2078 100644 --- a/Configuration/Geometry/README.md +++ b/Configuration/Geometry/README.md @@ -42,6 +42,8 @@ The script also handles the common and forward elements of the geometry: * O5: as O6, but with trackermaterial removed (they are in T5, T6, T7, T8) * O6: 2021 baseline * F1: 2021 baseline +* F2: same as F1 with modified file zdc.xmlfrom ZDC group +* F3: same as F2 with added simulti geometry for RPD Several detector combinations have been generated: * 2021 = T3+C1+M1+P7+O6+F1 @@ -50,7 +52,12 @@ Several detector combinations have been generated: * 2021FlatMinus10Percent = T6+C1+M1+P7+O5+F1 * 2021FlatPlus05Percent = T7+C1+M1+P7+O5+F1 * 2021FlatPlus10Percent = T8+C1+M1+P7+O5+F1 -* 2023 = T3+C1+M2+P7+O6+F1 +* 2023 = T3+C1+M2+P7+O6+F3 +* 2023ZeroMaterial = T4+C1+M2+P7+O4+F2 +* 2023FlatMinus05Percent = T5+C1+M2+P7+O5+F2 +* 2023FlatMinus10Percent = T6+C1+M2+P7+O5+F2 +* 2023FlatPlus05Percent = T7+C1+M2+P7+O5+F2 +* 2023FlatPlus10Percent = T8+C1+M2+P7+O5+F2 # Phase 2 Geometries diff --git a/Configuration/Geometry/python/dict2021Geometry.py b/Configuration/Geometry/python/dict2021Geometry.py index 64d854d1bca93..109d8c6f25f02 100644 --- a/Configuration/Geometry/python/dict2021Geometry.py +++ b/Configuration/Geometry/python/dict2021Geometry.py @@ -1484,7 +1484,7 @@ forwardDict = { "abbrev" : "F", "name" : "forward", - "default" : 1, + "default" : 3, "F1" : { 2 : [ 'Geometry/ForwardCommonData/data/forward/2021/v1/forward.xml', @@ -1517,7 +1517,73 @@ "reco" :[ 'from Geometry.ForwardGeometry.ForwardGeometry_cfi import *', ] - } + }, + "F2" : { + 2 : [ + 'Geometry/ForwardCommonData/data/forward/2021/v1/forward.xml', + 'Geometry/ForwardCommonData/data/totemt2/2021/v1/totemt2.xml', + 'Geometry/ForwardCommonData/data/forwardshield/2021/v1/forwardshield.xml', + 'Geometry/ForwardCommonData/data/bhm.xml', + 'Geometry/ForwardCommonData/data/pltbcm/2021/v1/pltbcm.xml', + 'Geometry/ForwardCommonData/data/bcm1f/2021/v1/bcm1f.xml', + 'Geometry/ForwardCommonData/data/plt/2021/v1/plt.xml', + 'Geometry/ForwardCommonData/data/zdcmaterials/2021/v1/zdcmaterials.xml', + 'Geometry/ForwardCommonData/data/lumimaterials.xml', + 'Geometry/ForwardCommonData/data/zdcrotations.xml', + 'Geometry/ForwardCommonData/data/lumirotations.xml', + 'Geometry/ForwardCommonData/data/zdc/2021/v3/zdc.xml', + 'Geometry/ForwardCommonData/data/zdclumi/2021/v2/zdclumi.xml', + 'Geometry/ForwardCommonData/data/cmszdc.xml', + ], + 3 : [ + 'Geometry/ForwardSimData/data/totemsensT2/2021/totemsensT2.xml', + 'Geometry/ForwardCommonData/data/bhmsens.xml', + 'Geometry/ForwardSimData/data/pltsens.xml', + 'Geometry/ForwardSimData/data/bcm1fsens.xml', + 'Geometry/ForwardSimData/data/zdcsens.xml', + ], + 4 : [ + 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', + 'Geometry/ForwardSimData/data/bhmProdCuts/2021/v1/bhmProdCuts.xml', + 'Geometry/ForwardSimData/data/zdcProdCuts/2021/v2/zdcProdCuts.xml', + ], + "reco" :[ + 'from Geometry.ForwardGeometry.ForwardGeometry_cfi import *', + ] + }, + "F3" : { + 2 : [ + 'Geometry/ForwardCommonData/data/forward/2021/v1/forward.xml', + 'Geometry/ForwardCommonData/data/totemt2/2021/v1/totemt2.xml', + 'Geometry/ForwardCommonData/data/forwardshield/2021/v1/forwardshield.xml', + 'Geometry/ForwardCommonData/data/bhm.xml', + 'Geometry/ForwardCommonData/data/pltbcm/2021/v1/pltbcm.xml', + 'Geometry/ForwardCommonData/data/bcm1f/2021/v1/bcm1f.xml', + 'Geometry/ForwardCommonData/data/plt/2021/v1/plt.xml', + 'Geometry/ForwardCommonData/data/zdcmaterials/2021/v1/zdcmaterials.xml', + 'Geometry/ForwardCommonData/data/lumimaterials.xml', + 'Geometry/ForwardCommonData/data/zdcrotations.xml', + 'Geometry/ForwardCommonData/data/lumirotations.xml', + 'Geometry/ForwardCommonData/data/zdc/2021/v3/zdc.xml', + 'Geometry/ForwardCommonData/data/rpd/2021/v1/rpd.xml', + 'Geometry/ForwardCommonData/data/cmszdc.xml', + ], + 3 : [ + 'Geometry/ForwardSimData/data/totemsensT2/2021/totemsensT2.xml', + 'Geometry/ForwardCommonData/data/bhmsens.xml', + 'Geometry/ForwardSimData/data/pltsens.xml', + 'Geometry/ForwardSimData/data/bcm1fsens.xml', + 'Geometry/ForwardSimData/data/zdcsens/2021/v1/zdcsens.xml', + ], + 4 : [ + 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', + 'Geometry/ForwardSimData/data/bhmProdCuts/2021/v1/bhmProdCuts.xml', + 'Geometry/ForwardSimData/data/zdcProdCuts/2021/v3/zdcProdCuts.xml', + ], + "reco" :[ + 'from Geometry.ForwardGeometry.ForwardGeometry_cfi import *', + ] + }, } ppsDict = { @@ -1633,7 +1699,7 @@ ("O5","T6","C1","M1","F1","P7") : "2021FlatMinus10Percent", ("O5","T7","C1","M1","F1","P7") : "2021FlatPlus05Percent", ("O5","T8","C1","M1","F1","P7") : "2021FlatPlus10Percent", - ("O6","T3","C1","M2","F1","P7") : "2023", + ("O6","T3","C1","M2","F3","P7") : "2023", ("O4","T4","C1","M2","F1","P7") : "2023ZeroMaterial", ("O5","T5","C1","M2","F1","P7") : "2023FlatMinus05Percent", ("O5","T6","C1","M2","F1","P7") : "2023FlatMinus10Percent", diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2023.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2023.xml index 488220a515523..d197f8084a841 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2023.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2023.xml @@ -261,8 +261,8 @@ - - + + @@ -369,14 +369,14 @@ - + - + diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023XML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023XML_cfi.py index 49ccb48031b7b..65a79144f6453 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023XML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023XML_cfi.py @@ -264,8 +264,8 @@ 'Geometry/ForwardCommonData/data/lumimaterials.xml', 'Geometry/ForwardCommonData/data/zdcrotations.xml', 'Geometry/ForwardCommonData/data/lumirotations.xml', - 'Geometry/ForwardCommonData/data/zdc/2021/v2/zdc.xml', - 'Geometry/ForwardCommonData/data/zdclumi/2021/v2/zdclumi.xml', + 'Geometry/ForwardCommonData/data/zdc/2021/v3/zdc.xml', + 'Geometry/ForwardCommonData/data/rpd/2021/v1/rpd.xml', 'Geometry/ForwardCommonData/data/cmszdc.xml', 'Geometry/VeryForwardData/data/RP_Box.xml', 'Geometry/VeryForwardData/data/RP_Box/v3/RP_Box_000.xml', @@ -372,14 +372,14 @@ 'Geometry/ForwardCommonData/data/bhmsens.xml', 'Geometry/ForwardSimData/data/pltsens.xml', 'Geometry/ForwardSimData/data/bcm1fsens.xml', - 'Geometry/ForwardSimData/data/zdcsens.xml', + 'Geometry/ForwardSimData/data/zdcsens/2021/v1/zdcsens.xml', 'Geometry/HcalSimData/data/HcalProdCuts/2021/v2/HcalProdCuts.xml', 'Geometry/EcalSimData/data/EcalProdCuts.xml', 'Geometry/EcalSimData/data/ESProdCuts.xml', 'Geometry/MuonSimData/data/muonProdCuts/2021/v3/muonProdCuts.xml', 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', 'Geometry/ForwardSimData/data/bhmProdCuts/2021/v1/bhmProdCuts.xml', - 'Geometry/ForwardSimData/data/zdcProdCuts/2021/v2/zdcProdCuts.xml', + 'Geometry/ForwardSimData/data/zdcProdCuts/2021/v3/zdcProdCuts.xml', 'Geometry/CMSCommonData/data/FieldParameters.xml', ), rootNodeName = cms.string('cms:OCMS') diff --git a/Geometry/ForwardCommonData/data/rpd/2021/v1/rpd.xml b/Geometry/ForwardCommonData/data/rpd/2021/v1/rpd.xml new file mode 100644 index 0000000000000..72cd2c549baf3 --- /dev/null +++ b/Geometry/ForwardCommonData/data/rpd/2021/v1/rpd.xml @@ -0,0 +1,857 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/ForwardCommonData/data/zdc/2021/v3/zdc.xml b/Geometry/ForwardCommonData/data/zdc/2021/v3/zdc.xml new file mode 100644 index 0000000000000..ad502400022a1 --- /dev/null +++ b/Geometry/ForwardCommonData/data/zdc/2021/v3/zdc.xml @@ -0,0 +1,1846 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/ForwardCommonData/plugins/DDRPDPosition.cc b/Geometry/ForwardCommonData/plugins/DDRPDPosition.cc new file mode 100644 index 0000000000000..5e51590c9fed6 --- /dev/null +++ b/Geometry/ForwardCommonData/plugins/DDRPDPosition.cc @@ -0,0 +1,82 @@ +/////////////////////////////////////////////////////////////////////////////// +// File: DDRPDPosition.cc +// Description: Position inside the mother according to phi +/////////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include + +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/PluginManager/interface/PluginFactory.h" +#include "DataFormats/Math/interface/GeantUnits.h" +#include "DetectorDescription/Core/interface/DDAlgorithm.h" +#include "DetectorDescription/Core/interface/DDAlgorithmFactory.h" +#include "DetectorDescription/Core/interface/DDCurrentNamespace.h" +#include "DetectorDescription/Core/interface/DDLogicalPart.h" +#include "DetectorDescription/Core/interface/DDSplit.h" +#include "DetectorDescription/Core/interface/DDTypes.h" +#include "DetectorDescription/Core/interface/DDutils.h" + +//#define EDM_ML_DEBUG + +class DDRPDPosition : public DDAlgorithm { +public: + //Constructor and Destructor + DDRPDPosition(); + + void initialize(const DDNumericArguments& nArgs, + const DDVectorArguments& vArgs, + const DDMapArguments& mArgs, + const DDStringArguments& sArgs, + const DDStringVectorArguments& vsArgs) override; + + void execute(DDCompactView& cpv) override; + +private: + std::vector xpos_; //Positions along x-axis + double ypos_; //Position along y-axis + double zpos_; //Position along z-axis + std::string childName_; //Children name +}; + +DDRPDPosition::DDRPDPosition() { edm::LogVerbatim("ForwardGeom") << "DDRPDPosition test: Creating an instance"; } + +void DDRPDPosition::initialize(const DDNumericArguments& nArgs, + const DDVectorArguments& vArgs, + const DDMapArguments&, + const DDStringArguments& sArgs, + const DDStringVectorArguments&) { + xpos_ = vArgs["positionX"]; + ypos_ = nArgs["positionY"]; + zpos_ = nArgs["positionZ"]; + childName_ = sArgs["ChildName"]; +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: Parameters for positioning-- " << xpos_.size() << " copies of " + << childName_ << " to be positioned inside " << parent().name() << " at y = " << ypos_ + << ", z = " << zpos_ << " and at x = ("; + std::ostringstream st1; + for (const auto& x : xpos_) + st1 << x << " "; + edm::LogVerbatim("ForwardGeom") << st1.str() << ")"; +#endif +} + +void DDRPDPosition::execute(DDCompactView& cpv) { + DDName child(DDSplit(childName_).first, DDSplit(childName_).second); + DDName parentName = parent().name(); + DDRotation rot; + + for (unsigned int jj = 0; jj < xpos_.size(); jj++) { + DDTranslation tran(xpos_[jj], ypos_, zpos_); + + cpv.position(child, parentName, jj + 1, tran, rot); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: " << child << " number " << jj + 1 << " positioned in " + << parentName << " at " << tran << " with no rotation"; +#endif + } +} + +DEFINE_EDM_PLUGIN(DDAlgorithmFactory, DDRPDPosition, "rpdalgo:DDRPDPosition"); diff --git a/Geometry/ForwardCommonData/plugins/dd4hep/DDRPDPosition.cc b/Geometry/ForwardCommonData/plugins/dd4hep/DDRPDPosition.cc new file mode 100644 index 0000000000000..26568b6aa74c1 --- /dev/null +++ b/Geometry/ForwardCommonData/plugins/dd4hep/DDRPDPosition.cc @@ -0,0 +1,46 @@ +#include "DataFormats/Math/interface/GeantUnits.h" +#include "DetectorDescription/Core/interface/DDSplit.h" +#include "DetectorDescription/DDCMS/interface/DDPlugins.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "DD4hep/DetFactoryHelper.h" + +#include +#include +#include + +//#define EDM_ML_DEBUG + +static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext& ctxt, xml_h e) { + cms::DDNamespace ns(ctxt, e, true); + cms::DDAlgoArguments args(ctxt, e); + + const auto& xpos = args.value >("positionX"); + const auto& ypos = args.value("positionY"); + const auto& zpos = args.value("positionZ"); + const auto& childName = args.value("ChildName"); + + dd4hep::Volume parent = ns.volume(args.parentName()); + dd4hep::Volume child = ns.volume(ns.prepend(childName)); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: Parameters for positioning-- " << xpos.size() << " copies of " + << child.name() << " to be positioned inside " << parent.name() << " at y = " << ypos + << ", z = " << zpos << " and at x = ("; + std::ostringstream st1; + for (const auto& x : xpos) + st1 << x << " "; + edm::LogVerbatim("ForwardGeom") << st1.str() << ")"; +#endif + + for (unsigned int jj = 0; jj < xpos.size(); jj++) { + dd4hep::Position tran(xpos[jj], ypos, zpos); + parent.placeVolume(child, jj + 1, tran); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: " << child.name() << " number " << jj + 1 << " positioned in " + << parent.name() << " at " << tran << " with no rotation"; +#endif + } + return cms::s_executed; +} + +// first argument is the type from the xml file +DECLARE_DDCMS_DETELEMENT(DDCMS_rpdalgo_DDRPDPosition, algorithm) diff --git a/Geometry/ForwardSimData/data/zdcProdCuts/2021/v3/zdcProdCuts.xml b/Geometry/ForwardSimData/data/zdcProdCuts/2021/v3/zdcProdCuts.xml new file mode 100644 index 0000000000000..d3ebaaf69d0ba --- /dev/null +++ b/Geometry/ForwardSimData/data/zdcProdCuts/2021/v3/zdcProdCuts.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Geometry/ForwardSimData/data/zdcsens/2021/v1/zdcsens.xml b/Geometry/ForwardSimData/data/zdcsens/2021/v1/zdcsens.xml new file mode 100644 index 0000000000000..6f070b99846d3 --- /dev/null +++ b/Geometry/ForwardSimData/data/zdcsens/2021/v1/zdcsens.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + +