diff --git a/CalibPPS/ESProducers/plugins/CTPPSCompositeESSource.cc b/CalibPPS/ESProducers/plugins/CTPPSCompositeESSource.cc index 2e9d786d1b3dd..a0f70205566e6 100644 --- a/CalibPPS/ESProducers/plugins/CTPPSCompositeESSource.cc +++ b/CalibPPS/ESProducers/plugins/CTPPSCompositeESSource.cc @@ -66,6 +66,7 @@ class CTPPSCompositeESSource : public edm::ESProducer, public edm::EventSetupRec std::string opticsLabel_; unsigned int generateEveryNEvents_; unsigned int verbosity_; + const bool isRun2_; // ES tokens edm::ESGetToken tokenCompactViewReal_, tokenCompactViewMisaligned_; @@ -126,6 +127,7 @@ CTPPSCompositeESSource::CTPPSCompositeESSource(const edm::ParameterSet &conf) opticsLabel_(conf.getParameter("opticsLabel")), generateEveryNEvents_(conf.getUntrackedParameter("generateEveryNEvents")), verbosity_(conf.getUntrackedParameter("verbosity")), + isRun2_(conf.getParameter("isRun2")), m_engine_(new CLHEP::HepJamesRandom(conf.getParameter("seed"))) { double l_int_sum = 0; @@ -174,6 +176,7 @@ void CTPPSCompositeESSource::fillDescriptions(edm::ConfigurationDescriptions &de desc.add("lhcInfoLabel", "")->setComment("label of the LHCInfo record"); desc.add("opticsLabel", "")->setComment("label of the optics record"); desc.add("seed", 1)->setComment("random seed"); + desc.add("isRun2", false)->setComment("use diamond's run 2 geometry definition?"); desc.addUntracked("generateEveryNEvents", 1)->setComment("how often to switch conditions"); desc.addUntracked("verbosity", 0); @@ -259,7 +262,7 @@ void CTPPSCompositeESSource::buildDirectSimuData(const edm::ParameterSet &profil //---------------------------------------------------------------------------------------------------- void CTPPSCompositeESSource::buildGeometry(const DDCompactView &cpv) { - std::unique_ptr idealGD = detgeomdescbuilder::buildDetGeomDescFromCompactView(cpv); + std::unique_ptr idealGD = detgeomdescbuilder::buildDetGeomDescFromCompactView(cpv, isRun2_); for (auto &pb : profile_bins_) { auto &p = pb.data; @@ -470,4 +473,4 @@ std::unique_ptr CTPPSCompositeESSource::produceLhcInfo(const LHCInfoRcd //---------------------------------------------------------------------------------------------------- -DEFINE_FWK_EVENTSETUP_SOURCE(CTPPSCompositeESSource); \ No newline at end of file +DEFINE_FWK_EVENTSETUP_SOURCE(CTPPSCompositeESSource); diff --git a/CondTools/Geometry/plugins/PPSGeometryBuilder.cc b/CondTools/Geometry/plugins/PPSGeometryBuilder.cc index 20b4728ba45fa..af320fbdd1c5c 100644 --- a/CondTools/Geometry/plugins/PPSGeometryBuilder.cc +++ b/CondTools/Geometry/plugins/PPSGeometryBuilder.cc @@ -37,6 +37,7 @@ class PPSGeometryBuilder : public edm::one::EDAnalyzer<> { bool fromDD4hep_; std::string compactViewTag_; + bool isRun2_; edm::ESGetToken ddToken_; edm::ESGetToken dd4hepToken_; edm::ESWatcher watcherIdealGeometry_; @@ -46,6 +47,7 @@ class PPSGeometryBuilder : public edm::one::EDAnalyzer<> { PPSGeometryBuilder::PPSGeometryBuilder(const edm::ParameterSet& iConfig) : fromDD4hep_(iConfig.getUntrackedParameter("fromDD4hep", false)), compactViewTag_(iConfig.getUntrackedParameter("compactViewTag", "XMLIdealGeometryESSource_CTPPS")), + isRun2_(iConfig.getUntrackedParameter("isRun2", false)), ddToken_(esConsumes(edm::ESInputTag("", compactViewTag_))), dd4hepToken_(esConsumes(edm::ESInputTag("", compactViewTag_))) {} @@ -63,7 +65,7 @@ void PPSGeometryBuilder::analyze(const edm::Event& iEvent, const edm::EventSetup auto const& myCompactView = iSetup.getData(ddToken_); // Build geometry - geoInfoRoot = detgeomdescbuilder::buildDetGeomDescFromCompactView(myCompactView); + geoInfoRoot = detgeomdescbuilder::buildDetGeomDescFromCompactView(myCompactView, isRun2_); } // DD4hep else { @@ -71,7 +73,7 @@ void PPSGeometryBuilder::analyze(const edm::Event& iEvent, const edm::EventSetup auto const& myCompactView = iSetup.getData(dd4hepToken_); // Build geometry - geoInfoRoot = detgeomdescbuilder::buildDetGeomDescFromCompactView(myCompactView); + geoInfoRoot = detgeomdescbuilder::buildDetGeomDescFromCompactView(myCompactView, isRun2_); } } diff --git a/CondTools/Geometry/test/ppsgeometrywriter_DD4hep.py b/CondTools/Geometry/test/ppsgeometrywriter_DD4hep.py index df831b9fd83a9..7b9ffed69ca48 100644 --- a/CondTools/Geometry/test/ppsgeometrywriter_DD4hep.py +++ b/CondTools/Geometry/test/ppsgeometrywriter_DD4hep.py @@ -37,11 +37,12 @@ ) # geometry -process.load("Geometry.VeryForwardGeometry.dd4hep.geometryRPFromDD_2018_cfi") +process.load("Geometry.VeryForwardGeometry.dd4hep.geometryRPFromDD_2021_cfi") # DB writer process.ppsGeometryBuilder = cms.EDAnalyzer("PPSGeometryBuilder", fromDD4hep = cms.untracked.bool(True), + isRun2 = cms.untracked.bool(False), compactViewTag = cms.untracked.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/CondTools/Geometry/test/ppsgeometrywriter_oldDD.py b/CondTools/Geometry/test/ppsgeometrywriter_oldDD.py index 227850425e807..7a2428dedd4e9 100644 --- a/CondTools/Geometry/test/ppsgeometrywriter_oldDD.py +++ b/CondTools/Geometry/test/ppsgeometrywriter_oldDD.py @@ -37,10 +37,11 @@ ) # geometry -process.load("Geometry.VeryForwardGeometry.geometryRPFromDD_2018_cfi") +process.load("Geometry.VeryForwardGeometry.geometryRPFromDD_2021_cfi") # DB writer process.ppsGeometryBuilder = cms.EDAnalyzer("PPSGeometryBuilder", + isRun2 = cms.untracked.bool(False), compactViewTag = cms.untracked.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/DataFormats/CTPPSDetId/interface/CTPPSDetId.h b/DataFormats/CTPPSDetId/interface/CTPPSDetId.h index e2753e74f8e48..fa3a4be55be84 100644 --- a/DataFormats/CTPPSDetId/interface/CTPPSDetId.h +++ b/DataFormats/CTPPSDetId/interface/CTPPSDetId.h @@ -153,4 +153,13 @@ class CTPPSDetId : public DetId { std::ostream &operator<<(std::ostream &os, const CTPPSDetId &id); +namespace std { + template <> + struct hash { + typedef CTPPSDetId argument_type; + typedef std::size_t result_type; + result_type operator()(const argument_type &id) const noexcept { return std::hash()(id.rawId()); } + }; +} // namespace std + #endif diff --git a/Geometry/VeryForwardData/data/2021/v1/CTPPS_Timing_Stations_Assembly.xml b/Geometry/VeryForwardData/data/2021/v1/CTPPS_Timing_Stations_Assembly.xml new file mode 100644 index 0000000000000..be6209c2aff3d --- /dev/null +++ b/Geometry/VeryForwardData/data/2021/v1/CTPPS_Timing_Stations_Assembly.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/2021/v1/RP_220_Left_Station.xml b/Geometry/VeryForwardData/data/2021/v1/RP_220_Left_Station.xml new file mode 100644 index 0000000000000..6e4d55b3e4424 --- /dev/null +++ b/Geometry/VeryForwardData/data/2021/v1/RP_220_Left_Station.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardData/data/2021/v1/RP_220_Right_Station.xml b/Geometry/VeryForwardData/data/2021/v1/RP_220_Right_Station.xml new file mode 100644 index 0000000000000..cf25ab7531be4 --- /dev/null +++ b/Geometry/VeryForwardData/data/2021/v1/RP_220_Right_Station.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/VeryForwardGeometry/data/dd4hep/v1/geometryRPFromDD_2021.xml b/Geometry/VeryForwardGeometry/data/dd4hep/v1/geometryRPFromDD_2021.xml new file mode 100644 index 0000000000000..dcdab247050a4 --- /dev/null +++ b/Geometry/VeryForwardGeometry/data/dd4hep/v1/geometryRPFromDD_2021.xml @@ -0,0 +1,135 @@ + + + + + + + # common and strip files + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # diamond files + + + + + + + + + + + + + + + + + + + + + + + + + + + + # UFSD files + + + + + + + # Totem Timing files + + + + + + + # pixel files + + + + + + + + + + # RP distance + + + + diff --git a/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2016_cfi.py b/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2016_cfi.py index 5c178c0372f14..c30b091f9ee01 100644 --- a/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2016_cfi.py +++ b/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2016_cfi.py @@ -11,6 +11,7 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", fromDD4hep = cms.untracked.bool(True), + isRun2 = cms.bool(True), verbosity = cms.untracked.uint32(1), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2017_cfi.py b/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2017_cfi.py index 0012898c432bd..bd384b8f3fc2a 100644 --- a/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2017_cfi.py +++ b/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2017_cfi.py @@ -11,6 +11,7 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", fromDD4hep = cms.untracked.bool(True), + isRun2 = cms.bool(True), verbosity = cms.untracked.uint32(1), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2018_cfi.py b/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2018_cfi.py index f3fffae290864..0bae498d08288 100644 --- a/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2018_cfi.py +++ b/Geometry/VeryForwardGeometry/python/dd4hep/geometryPPS_CMSxz_fromDD_2018_cfi.py @@ -11,6 +11,7 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", fromDD4hep = cms.untracked.bool(True), + isRun2 = cms.bool(True), verbosity = cms.untracked.uint32(1), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDB_cfi.py b/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDB_cfi.py index c787064a7e914..47180aefc1ff3 100644 --- a/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDB_cfi.py +++ b/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDB_cfi.py @@ -10,11 +10,12 @@ DDCompactViewESProducer = cms.ESProducer("DDCompactViewESProducer", appendToDataLabel = cms.string('XMLIdealGeometryESSource_CTPPS') -) +) ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", fromDD4hep = cms.untracked.bool(True), + isRun2 = cms.bool(False), verbosity = cms.untracked.uint32(1), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2017_cfi.py b/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2017_cfi.py index cfcf10a1ddac3..44d9d32cb06c7 100644 --- a/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2017_cfi.py +++ b/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2017_cfi.py @@ -11,6 +11,7 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", fromDD4hep = cms.untracked.bool(True), + isRun2 = cms.bool(True), verbosity = cms.untracked.uint32(1), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2018_cfi.py b/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2018_cfi.py index caee6c207680f..a9488cc5ba5f4 100644 --- a/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2018_cfi.py +++ b/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2018_cfi.py @@ -11,6 +11,7 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", fromDD4hep = cms.untracked.bool(True), + isRun2 = cms.bool(True), verbosity = cms.untracked.uint32(1), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2021_cfi.py b/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2021_cfi.py new file mode 100644 index 0000000000000..b9618ec260b14 --- /dev/null +++ b/Geometry/VeryForwardGeometry/python/dd4hep/geometryRPFromDD_2021_cfi.py @@ -0,0 +1,18 @@ +import FWCore.ParameterSet.Config as cms + +DDDetectorESProducer = cms.ESSource("DDDetectorESProducer", + confGeomXMLFiles = cms.FileInPath('Geometry/VeryForwardGeometry/data/dd4hep/v1/geometryRPFromDD_2021.xml'), + appendToDataLabel = cms.string('XMLIdealGeometryESSource_CTPPS') +) + +DDCompactViewESProducer = cms.ESProducer("DDCompactViewESProducer", + appendToDataLabel = cms.string('XMLIdealGeometryESSource_CTPPS') +) + +ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", + fromDD4hep = cms.untracked.bool(True), + isRun2 = cms.bool(False), + verbosity = cms.untracked.uint32(1), + compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') +) + diff --git a/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2016_cfi.py b/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2016_cfi.py index cad035090b01f..2191aad40930e 100644 --- a/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2016_cfi.py +++ b/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2016_cfi.py @@ -3,19 +3,19 @@ # common and strip files totemGeomXMLFiles = cms.vstring( 'Geometry/CMSCommonData/data/materials.xml', - 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/cmsextent/2018/v1/cmsextent.xml', - 'Geometry/CMSCommonData/data/cms/2017/v1/cms.xml', - 'Geometry/CMSCommonData/data/beampipe/2017/v1/beampipe.xml', - 'Geometry/CMSCommonData/data/cmsBeam.xml', - 'Geometry/CMSCommonData/data/cmsMother.xml', - 'Geometry/CMSCommonData/data/mgnt.xml', - 'Geometry/ForwardCommonData/data/forward.xml', - 'Geometry/ForwardCommonData/data/totemRotations.xml', - 'Geometry/ForwardCommonData/data/totemMaterials.xml', - 'Geometry/ForwardCommonData/data/totemt1.xml', - 'Geometry/ForwardCommonData/data/totemt2.xml', - 'Geometry/ForwardCommonData/data/ionpump.xml', + 'Geometry/CMSCommonData/data/cms/2017/v1/cms.xml', + 'Geometry/CMSCommonData/data/beampipe/2017/v1/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/ForwardCommonData/data/forward.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/ForwardCommonData/data/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemt1.xml', + 'Geometry/ForwardCommonData/data/totemt2.xml', + 'Geometry/ForwardCommonData/data/ionpump.xml', 'Geometry/VeryForwardData/data/RP_Box.xml', 'Geometry/VeryForwardData/data/RP_Box/RP_Box_000.xml', 'Geometry/VeryForwardData/data/RP_Box/RP_Box_001.xml', @@ -79,7 +79,7 @@ 'Geometry/VeryForwardData/data/CTPPS_Stations_Assembly.xml', 'Geometry/VeryForwardData/data/CTPPS_Cuts_Per_Region.xml', 'Geometry/VeryForwardData/data/RP_Sensitive_Dets.xml' -) +) # diamond files ctppsDiamondGeomXMLFiles = cms.vstring( @@ -112,7 +112,7 @@ ctppsUFSDGeomXMLFiles = cms.vstring( 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern1.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentA.xml', - 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentB.xml', + 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentB.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Planes/CTPPS_UFSD_Plane4.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Parameters.xml' ) @@ -136,6 +136,7 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", verbosity = cms.untracked.uint32(1), + isRun2 = cms.bool(True), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2017_cfi.py b/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2017_cfi.py index 7e8059401f622..7f7a5309a0a28 100644 --- a/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2017_cfi.py +++ b/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2017_cfi.py @@ -3,19 +3,19 @@ # common and strip files totemGeomXMLFiles = cms.vstring( 'Geometry/CMSCommonData/data/materials.xml', - 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/cmsextent/2018/v1/cmsextent.xml', - 'Geometry/CMSCommonData/data/cms/2017/v1/cms.xml', - 'Geometry/CMSCommonData/data/beampipe/2017/v1/beampipe.xml', - 'Geometry/CMSCommonData/data/cmsBeam.xml', - 'Geometry/CMSCommonData/data/cmsMother.xml', - 'Geometry/CMSCommonData/data/mgnt.xml', - 'Geometry/ForwardCommonData/data/forward.xml', - 'Geometry/ForwardCommonData/data/totemRotations.xml', - 'Geometry/ForwardCommonData/data/totemMaterials.xml', - 'Geometry/ForwardCommonData/data/totemt1.xml', - 'Geometry/ForwardCommonData/data/totemt2.xml', - 'Geometry/ForwardCommonData/data/ionpump.xml', + 'Geometry/CMSCommonData/data/cms/2017/v1/cms.xml', + 'Geometry/CMSCommonData/data/beampipe/2017/v1/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/ForwardCommonData/data/forward.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/ForwardCommonData/data/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemt1.xml', + 'Geometry/ForwardCommonData/data/totemt2.xml', + 'Geometry/ForwardCommonData/data/ionpump.xml', 'Geometry/VeryForwardData/data/RP_Box.xml', 'Geometry/VeryForwardData/data/RP_Box/RP_Box_000.xml', 'Geometry/VeryForwardData/data/RP_Box/RP_Box_001.xml', @@ -77,7 +77,7 @@ 'Geometry/VeryForwardData/data/CTPPS_Stations_Assembly.xml', 'Geometry/VeryForwardData/data/CTPPS_Cuts_Per_Region.xml', 'Geometry/VeryForwardData/data/RP_Sensitive_Dets.xml' -) +) # diamond files ctppsDiamondGeomXMLFiles = cms.vstring( @@ -109,7 +109,7 @@ ctppsUFSDGeomXMLFiles = cms.vstring( 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern1.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentA.xml', - 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentB.xml', + 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentB.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Planes/CTPPS_UFSD_Plane4.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Parameters.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Sensitive_Dets_TimingHits.xml' @@ -136,6 +136,7 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", verbosity = cms.untracked.uint32(1), + isRun2 = cms.bool(True), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2018_cfi.py b/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2018_cfi.py index c1be84c4a9839..340305d0347d4 100644 --- a/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2018_cfi.py +++ b/Geometry/VeryForwardGeometry/python/geometryPPS_CMSxz_fromDD_2018_cfi.py @@ -3,19 +3,19 @@ # common and strip files totemGeomXMLFiles = cms.vstring( 'Geometry/CMSCommonData/data/materials.xml', - 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/cmsextent/2018/v1/cmsextent.xml', - 'Geometry/CMSCommonData/data/cms/2017/v1/cms.xml', - 'Geometry/CMSCommonData/data/beampipe/2017/v1/beampipe.xml', - 'Geometry/CMSCommonData/data/cmsBeam.xml', - 'Geometry/CMSCommonData/data/cmsMother.xml', - 'Geometry/CMSCommonData/data/mgnt.xml', - 'Geometry/ForwardCommonData/data/forward.xml', - 'Geometry/ForwardCommonData/data/totemRotations.xml', - 'Geometry/ForwardCommonData/data/totemMaterials.xml', - 'Geometry/ForwardCommonData/data/totemt1.xml', - 'Geometry/ForwardCommonData/data/totemt2.xml', - 'Geometry/ForwardCommonData/data/ionpump.xml', + 'Geometry/CMSCommonData/data/cms/2017/v1/cms.xml', + 'Geometry/CMSCommonData/data/beampipe/2017/v1/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/ForwardCommonData/data/forward.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/ForwardCommonData/data/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemt1.xml', + 'Geometry/ForwardCommonData/data/totemt2.xml', + 'Geometry/ForwardCommonData/data/ionpump.xml', 'Geometry/VeryForwardData/data/RP_Box.xml', 'Geometry/VeryForwardData/data/RP_Box/RP_Box_000.xml', 'Geometry/VeryForwardData/data/RP_Box/RP_Box_001.xml', @@ -75,7 +75,7 @@ 'Geometry/VeryForwardData/data/CTPPS_Stations_Assembly.xml', 'Geometry/VeryForwardData/data/CTPPS_Cuts_Per_Region.xml', 'Geometry/VeryForwardData/data/RP_Sensitive_Dets.xml' -) +) # diamond files ctppsDiamondGeomXMLFiles = cms.vstring( @@ -108,7 +108,7 @@ ctppsUFSDGeomXMLFiles = cms.vstring( 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern1.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentA.xml', - 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentB.xml', + 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentB.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Planes/CTPPS_UFSD_Plane4.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Parameters.xml', 'Geometry/VeryForwardData/data/CTPPS_UFSD_Sensitive_Dets_TimingHits.xml' @@ -137,6 +137,7 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", verbosity = cms.untracked.uint32(1), + isRun2 = cms.bool(True), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/geometryRPFromDB_cfi.py b/Geometry/VeryForwardGeometry/python/geometryRPFromDB_cfi.py index bfdf3d2a349bc..22f148a00625d 100644 --- a/Geometry/VeryForwardGeometry/python/geometryRPFromDB_cfi.py +++ b/Geometry/VeryForwardGeometry/python/geometryRPFromDB_cfi.py @@ -1,12 +1,19 @@ import FWCore.ParameterSet.Config as cms XMLIdealGeometryESSource_CTPPS = cms.ESProducer("XMLIdealGeometryESProducer", - rootDDName = cms.string('cms:CMSE'), - label = cms.string('CTPPS'), - appendToDataLabel = cms.string('XMLIdealGeometryESSource_CTPPS') - ) + rootDDName = cms.string('cms:CMSE'), + label = cms.string('CTPPS'), + appendToDataLabel = cms.string('XMLIdealGeometryESSource_CTPPS') +) ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", verbosity = cms.untracked.uint32(1), + isRun2 = cms.bool(False), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) + +from Configuration.Eras.Modifier_ctpps_2016_cff import ctpps_2016 +from Configuration.Eras.Modifier_ctpps_2017_cff import ctpps_2017 +from Configuration.Eras.Modifier_ctpps_2018_cff import ctpps_2018 + +(ctpps_2016 | ctpps_2017 | ctpps_2018).toModify(ctppsGeometryESModule, isRun2=True) diff --git a/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2017_cfi.py b/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2017_cfi.py index 8449588967ed3..052adda8a3060 100644 --- a/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2017_cfi.py +++ b/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2017_cfi.py @@ -140,5 +140,6 @@ ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", verbosity = cms.untracked.uint32(1), + isRun2 = cms.bool(True), compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') ) diff --git a/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2018_cfi.py b/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2018_cfi.py index 0946d1a71b8e0..952964b387e35 100644 --- a/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2018_cfi.py +++ b/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2018_cfi.py @@ -145,6 +145,7 @@ XMLIdealGeometryESSource_CTPPS.geomXMLFiles.append("Geometry/VeryForwardData/data/2016_ctpps_15sigma_margin0/RP_Dist_Beam_Cent.xml") ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", - verbosity = cms.untracked.uint32(1), - compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') - ) + verbosity = cms.untracked.uint32(1), + isRun2 = cms.bool(True), + compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') +) diff --git a/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2021_cfi.py b/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2021_cfi.py new file mode 100644 index 0000000000000..927ee71de5942 --- /dev/null +++ b/Geometry/VeryForwardGeometry/python/geometryRPFromDD_2021_cfi.py @@ -0,0 +1,153 @@ +# TODO: for the moment this is just copy of the 2018 config !!! this needs updating !!! + +import FWCore.ParameterSet.Config as cms + +# common and strip files +totemGeomXMLFiles = cms.vstring( + 'Geometry/CMSCommonData/data/materials.xml', + 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/extend/cmsextent.xml', + 'Geometry/CMSCommonData/data/cms/2017/v1/cms.xml', + 'Geometry/CMSCommonData/data/beampipe/2017/v1/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/ForwardCommonData/data/forward.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/ForwardCommonData/data/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemt1.xml', + 'Geometry/ForwardCommonData/data/totemt2.xml', + 'Geometry/ForwardCommonData/data/ionpump.xml', + 'Geometry/VeryForwardData/data/RP_Box.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_000.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_001.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_002.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_003.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_004.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_005.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_020.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_021.xml', + #'Geometry/VeryForwardData/data/RP_Box/RP_Box_022.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_023.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_024.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_025.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_100.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_101.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_102.xml', + 'Geometry/VeryForwardData/data/RP_Box/2018/RP_Box_103.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_104.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_105.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_120.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_121.xml', + #'Geometry/VeryForwardData/data/RP_Box/RP_Box_122.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_123.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_124.xml', + 'Geometry/VeryForwardData/data/RP_Box/RP_Box_125.xml', + 'Geometry/VeryForwardData/data/RP_Hybrid.xml', + 'Geometry/VeryForwardData/data/RP_Materials.xml', + 'Geometry/VeryForwardData/data/RP_Transformations.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_000.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_001.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_002.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_004.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_005.xml', + #'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_022.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_024.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_025.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_100.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_101.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_102.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_104.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_105.xml', + #'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_122.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_124.xml', + 'Geometry/VeryForwardData/data/RP_Detectors_Assembly/RP_Detectors_Assembly_125.xml', + 'Geometry/VeryForwardData/data/RP_Device.xml', + 'Geometry/VeryForwardData/data/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device.xml', + 'Geometry/VeryForwardData/data/2021/v1/RP_220_Right_Station.xml', + 'Geometry/VeryForwardData/data/2021/v1/RP_220_Left_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/RP_147_Right_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/RP_147_Left_Station.xml', + 'Geometry/VeryForwardData/data/RP_Stations_Assembly.xml', + 'Geometry/VeryForwardData/data/RP_Sensitive_Dets.xml', + 'Geometry/VeryForwardData/data/RP_Cuts_Per_Region.xml', + 'Geometry/VeryForwardData/data/RP_Param_Beam_Region.xml' + ) + +# diamond files +ctppsDiamondGeomXMLFiles = cms.vstring( + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Materials.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Transformations.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_X_Distance.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Parameters.xml', + 'Geometry/VeryForwardData/data/CTPPS_Timing_Station_Parameters.xml', + 'Geometry/VeryForwardData/data/CTPPS_Timing_Horizontal_Pot.xml', + 'Geometry/VeryForwardData/data/CTPPS_Timing_Positive_Station.xml', + 'Geometry/VeryForwardData/data/CTPPS_Timing_Negative_Station.xml', + 'Geometry/VeryForwardData/data/2021/v1/CTPPS_Timing_Stations_Assembly.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern1_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern2_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern2_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern3_Segment4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_Segments/CTPPS_Diamond_Pattern4_Segment5.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane1.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane3.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Planes/CTPPS_Diamond_Plane4.xml', + 'Geometry/VeryForwardData/data/CTPPS_Diamond_2018/CTPPS_Diamond_Detector_Assembly.xml' + ) + +# UFSD files +ctppsUFSDGeomXMLFiles = cms.vstring( + # UFSDetectors + 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern1.xml', + 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentA.xml', + 'Geometry/VeryForwardData/data/CTPPS_UFSD_Segments/CTPPS_UFSD_Pattern2_SegmentB.xml', + 'Geometry/VeryForwardData/data/CTPPS_UFSD_Planes/CTPPS_UFSD_Plane4.xml', + 'Geometry/VeryForwardData/data/CTPPS_UFSD_Parameters.xml', + ) + +# Totem Timing files +totemTimingGeomXMLFiles = cms.vstring( + # UFSDetectors + 'Geometry/VeryForwardData/data/TotemTiming/TotemTiming_Dist_Beam_Cent.xml', + 'Geometry/VeryForwardData/data/TotemTiming/TotemTiming_DetectorAssembly.xml', + 'Geometry/VeryForwardData/data/TotemTiming/TotemTiming_Parameters.xml', + 'Geometry/VeryForwardData/data/TotemTiming/TotemTiming_Plane.xml', + 'Geometry/VeryForwardData/data/TotemTiming/TotemTiming_Station.xml', + ) + +# pixel files +ctppsPixelGeomXMLFiles = cms.vstring( + 'Geometry/VeryForwardData/data/ppstrackerMaterials.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Module.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Module_2x2.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_023.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_123.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_003.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_2018/CTPPS_Pixel_Assembly_Box_Real_103.xml', + 'Geometry/VeryForwardData/data/CTPPS_Pixel_Sens.xml' + ) + +XMLIdealGeometryESSource_CTPPS = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = totemGeomXMLFiles + ctppsDiamondGeomXMLFiles + ctppsUFSDGeomXMLFiles + totemTimingGeomXMLFiles + ctppsPixelGeomXMLFiles, + rootNodeName = cms.string('cms:CMSE') + ) + +# position of RPs +XMLIdealGeometryESSource_CTPPS.geomXMLFiles.append("Geometry/VeryForwardData/data/2016_ctpps_15sigma_margin0/RP_Dist_Beam_Cent.xml") + +ctppsGeometryESModule = cms.ESProducer("CTPPSGeometryESModule", + verbosity = cms.untracked.uint32(1), + isRun2 = cms.bool(False), + compactViewTag = cms.string('XMLIdealGeometryESSource_CTPPS') +) diff --git a/Geometry/VeryForwardGeometryBuilder/interface/DetGeomDesc.h b/Geometry/VeryForwardGeometryBuilder/interface/DetGeomDesc.h index 258d1974ba885..93061074b2086 100644 --- a/Geometry/VeryForwardGeometryBuilder/interface/DetGeomDesc.h +++ b/Geometry/VeryForwardGeometryBuilder/interface/DetGeomDesc.h @@ -1,7 +1,7 @@ /**************************************************************************** * * Authors: -* Jan Kašpar (jan.kaspar@gmail.com) +* Jan Kašpar (jan.kaspar@gmail.com) * CMSSW developpers (based on class GeometricDet) * * Rewritten + Moved out common functionalities to DetGeomDesc(Builder) by Gabrielle Hugo. @@ -28,7 +28,7 @@ class CTPPSRPAlignmentCorrectionData; * * Class resembling GeometricDet class. Slight changes were made to suit needs of the TOTEM RP description. * Each instance is a tree node, with geometrical information from DDD (shift, rotation, material, ...), ID and list of children nodes. - * + * * The translation and rotation parameters are defined by local-to-global * coordinate transform. That is, if r_l is a point in local coordinate system and x_g in global, * then the transform reads: @@ -37,7 +37,7 @@ class CTPPSRPAlignmentCorrectionData; \endverbatim * * July 2020: Migrated to DD4hep - * To avoid any regression with values from XMLs / Geant4, all lengths are converted from cm (DD4hep) to mm. + * To avoid any regression with values from XMLs / Geant4, all lengths are converted from cm (DD4hep) to mm. * **/ @@ -54,9 +54,11 @@ class DetGeomDesc { using Translation = ROOT::Math::DisplacementVector3D>; // Constructor from old DD DDFilteredView - DetGeomDesc(const DDFilteredView& fv); + /// \param[in] isRun2 Switch between legacy run 2-like geometry and 2021+ scenarii + DetGeomDesc(const DDFilteredView& fv, const bool isRun2); // Constructor from DD4Hep DDFilteredView - DetGeomDesc(const cms::DDFilteredView& fv); + /// \param[in] isRun2 Switch between legacy run 2-like geometry and 2021+ scenarii + DetGeomDesc(const cms::DDFilteredView& fv, const bool isRun2); virtual ~DetGeomDesc(); @@ -115,8 +117,14 @@ class DetGeomDesc { DiamondDimensions computeDiamondDimensions(const bool isABox, const bool isDD4hep, const std::vector& params) const; - DetId computeDetID(const std::string& name, const std::vector& copyNos, unsigned int copyNum) const; - DetId computeDetIDFromDD4hep(const std::string& name, const std::vector& copyNos, unsigned int copyNum) const; + DetId computeDetID(const std::string& name, + const std::vector& copyNos, + const unsigned int copyNum, + const bool isRun2) const; + DetId computeDetIDFromDD4hep(const std::string& name, + const std::vector& copyNos, + const unsigned int copyNum, + const bool isRun2) const; std::string computeSensorType(std::string_view name); std::string m_name; // with no namespace diff --git a/Geometry/VeryForwardGeometryBuilder/interface/DetGeomDescBuilder.h b/Geometry/VeryForwardGeometryBuilder/interface/DetGeomDescBuilder.h index ab367d19df08e..722d9cdcee1b5 100644 --- a/Geometry/VeryForwardGeometryBuilder/interface/DetGeomDescBuilder.h +++ b/Geometry/VeryForwardGeometryBuilder/interface/DetGeomDescBuilder.h @@ -9,9 +9,10 @@ * Generic function to build geo (tree of DetGeomDesc) from compact view. */ namespace detgeomdescbuilder { - std::unique_ptr buildDetGeomDescFromCompactView(const DDCompactView& myCompactView); - void buildDetGeomDescDescendants(DDFilteredView& fv, DetGeomDesc* geoInfoParent); - std::unique_ptr buildDetGeomDescFromCompactView(const cms::DDCompactView& myCompactView); + std::unique_ptr buildDetGeomDescFromCompactView(const DDCompactView& myCompactView, const bool isRun2); + void buildDetGeomDescDescendants(DDFilteredView& fv, DetGeomDesc* geoInfoParent, const bool isRun2); + std::unique_ptr buildDetGeomDescFromCompactView(const cms::DDCompactView& myCompactView, + const bool isRun2); } // namespace detgeomdescbuilder #endif diff --git a/Geometry/VeryForwardGeometryBuilder/plugins/CTPPSGeometryESModule.cc b/Geometry/VeryForwardGeometryBuilder/plugins/CTPPSGeometryESModule.cc index a76a061cc8c52..cad97b1e4e445 100644 --- a/Geometry/VeryForwardGeometryBuilder/plugins/CTPPSGeometryESModule.cc +++ b/Geometry/VeryForwardGeometryBuilder/plugins/CTPPSGeometryESModule.cc @@ -79,6 +79,8 @@ class CTPPSGeometryESModule : public edm::ESProducer { const char* name); const unsigned int verbosity_; + const bool isRun2_; + edm::ESGetToken ddToken_; edm::ESGetToken dd4hepToken_; const bool fromDD4hep_; @@ -92,6 +94,7 @@ class CTPPSGeometryESModule : public edm::ESProducer { CTPPSGeometryESModule::CTPPSGeometryESModule(const edm::ParameterSet& iConfig) : verbosity_(iConfig.getUntrackedParameter("verbosity")), + isRun2_(iConfig.getParameter("isRun2")), fromDD4hep_(iConfig.getUntrackedParameter("fromDD4hep", false)), gdRealTokens_{setWhatProduced(this, &CTPPSGeometryESModule::produceRealGD)}, gdMisTokens_{setWhatProduced(this, &CTPPSGeometryESModule::produceMisalignedGD)}, @@ -112,6 +115,7 @@ CTPPSGeometryESModule::CTPPSGeometryESModule(const edm::ParameterSet& iConfig) void CTPPSGeometryESModule::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; desc.addUntracked("verbosity", 1); + desc.add("isRun2", false)->setComment("Switch to legacy (2017-18) definition of diamond geometry"); desc.add("compactViewTag", std::string()); desc.addUntracked("fromDD4hep", false); descriptions.add("CTPPSGeometryESModule", desc); @@ -123,7 +127,7 @@ std::unique_ptr CTPPSGeometryESModule::produceIdealGD(const IdealGe auto const& myCompactView = iRecord.get(ddToken_); // Build geo from compact view. - return detgeomdescbuilder::buildDetGeomDescFromCompactView(myCompactView); + return detgeomdescbuilder::buildDetGeomDescFromCompactView(myCompactView, isRun2_); } else { @@ -131,7 +135,7 @@ std::unique_ptr CTPPSGeometryESModule::produceIdealGD(const IdealGe auto const& myCompactView = iRecord.get(dd4hepToken_); // Build geo from compact view. - return detgeomdescbuilder::buildDetGeomDescFromCompactView(myCompactView); + return detgeomdescbuilder::buildDetGeomDescFromCompactView(myCompactView, isRun2_); } } diff --git a/Geometry/VeryForwardGeometryBuilder/src/DetGeomDesc.cc b/Geometry/VeryForwardGeometryBuilder/src/DetGeomDesc.cc index 3bf5dcc50aa92..65aa7e024a86d 100644 --- a/Geometry/VeryForwardGeometryBuilder/src/DetGeomDesc.cc +++ b/Geometry/VeryForwardGeometryBuilder/src/DetGeomDesc.cc @@ -1,8 +1,8 @@ /**************************************************************************** * * This is a part of the TOTEM offline software. -* Authors: -* Jan Kašpar (jan.kaspar@gmail.com) +* Authors: +* Jan Kašpar (jan.kaspar@gmail.com) * CMSSW developers (based on GeometricDet class) * ****************************************************************************/ @@ -26,7 +26,7 @@ /* * Constructor from old DD DDFilteredView, also using the SpecPars to access 2x2 wafers info. */ -DetGeomDesc::DetGeomDesc(const DDFilteredView& fv) +DetGeomDesc::DetGeomDesc(const DDFilteredView& fv, const bool isRun2) : m_name(computeNameWithNoNamespace(fv.name())), m_copy(fv.copyno()), m_isDD4hep(false), @@ -36,14 +36,14 @@ DetGeomDesc::DetGeomDesc(const DDFilteredView& fv) m_isABox(fv.shape() == DDSolidShape::ddbox), m_diamondBoxParams(computeDiamondDimensions(m_isABox, m_isDD4hep, m_params)), // mm (legacy) m_sensorType(computeSensorType(fv.logicalPart().name().fullname())), - m_geographicalID(computeDetID(m_name, fv.copyNumbers(), fv.copyno())), + m_geographicalID(computeDetID(m_name, fv.copyNumbers(), fv.copyno(), isRun2)), m_z(fv.translation().z()) // mm (legacy) {} /* * Constructor from DD4Hep DDFilteredView, also using the SpecPars to access 2x2 wafers info. */ -DetGeomDesc::DetGeomDesc(const cms::DDFilteredView& fv) +DetGeomDesc::DetGeomDesc(const cms::DDFilteredView& fv, const bool isRun2) : m_name(computeNameWithNoNamespace(fv.name())), m_copy(fv.copyNum()), m_isDD4hep(true), @@ -53,7 +53,7 @@ DetGeomDesc::DetGeomDesc(const cms::DDFilteredView& fv) m_isABox(dd4hep::isA(fv.solid())), m_diamondBoxParams(computeDiamondDimensions(m_isABox, m_isDD4hep, m_params)), // converted from cm (DD4hep) to mm m_sensorType(computeSensorType(fv.name())), - m_geographicalID(computeDetIDFromDD4hep(m_name, fv.copyNos(), fv.copyNum())), + m_geographicalID(computeDetIDFromDD4hep(m_name, fv.copyNos(), fv.copyNum(), isRun2)), m_z(geant_units::operators::convertCmToMm(fv.translation().z())) // converted from cm (DD4hep) to mm {} @@ -139,7 +139,7 @@ std::vector DetGeomDesc::computeParameters(const cms::DDFilteredView& fv /* * Compute diamond dimensions. * The diamond sensors are represented by the Box shape parameters. - * oldDD: params are already in mm. + * oldDD: params are already in mm. * DD4hep: convert params from cm (DD4hep) to mm (legacy expected by PPS reco software). */ DiamondDimensions DetGeomDesc::computeDiamondDimensions(const bool isABox, @@ -164,14 +164,17 @@ DiamondDimensions DetGeomDesc::computeDiamondDimensions(const bool isABox, * old DD DetId computation. * Relies on name and volumes copy numbers. */ -DetId DetGeomDesc::computeDetID(const std::string& name, const std::vector& copyNos, unsigned int copyNum) const { +DetId DetGeomDesc::computeDetID(const std::string& name, + const std::vector& copyNos, + const unsigned int copyNum, + const bool isRun2) const { DetId geoID; // strip sensors if (name == DDD_TOTEM_RP_SENSOR_NAME) { - // check size of copy numbers array + // check size of copy numbers vector if (copyNos.size() < 3) - throw cms::Exception("DDDTotemRPContruction") + throw cms::Exception("DDDTotemRPConstruction") << "size of copyNumbers for strip sensor is " << copyNos.size() << ". It must be >= 3."; // extract information @@ -203,9 +206,9 @@ DetId DetGeomDesc::computeDetID(const std::string& name, const std::vector& } else if (std::regex_match(name, std::regex(DDD_TOTEM_TIMING_SENSOR_TMPL))) { - // check size of copy numbers array + // check size of copy numbers vector if (copyNos.size() < 4) - throw cms::Exception("DDDTotemRPContruction") + throw cms::Exception("DDDTotemRPConstruction") << "size of copyNumbers for TOTEM timing sensor is " << copyNos.size() << ". It must be >= 4."; const unsigned int decRPId = copyNos[copyNos.size() - 4]; @@ -221,9 +224,9 @@ DetId DetGeomDesc::computeDetID(const std::string& name, const std::vector& // pixel sensors else if (name == DDD_CTPPS_PIXELS_SENSOR_NAME || name == DDD_CTPPS_PIXELS_SENSOR_NAME_2x2) { - // check size of copy numbers array + // check size of copy numbers vector if (copyNos.size() < 4) - throw cms::Exception("DDDTotemRPContruction") + throw cms::Exception("DDDTotemRPConstruction") << "size of copyNumbers for pixel sensor is " << copyNos.size() << ". It must be >= 4."; // extract information @@ -237,27 +240,45 @@ DetId DetGeomDesc::computeDetID(const std::string& name, const std::vector& // diamond/UFSD sensors else if (name == DDD_CTPPS_DIAMONDS_SEGMENT_NAME || name == DDD_CTPPS_UFSD_SEGMENT_NAME) { + // check size of copy numbers vector + if (copyNos.size() < 2) + throw cms::Exception("DDDTotemRPConstruction") + << "size of copyNumbers for diamond segments is " << copyNos.size() << ". It must be >= 2."; + const unsigned int decRPId = copyNos[1]; + unsigned int arm, station, rp; + if (isRun2) { + arm = decRPId - 1; + station = 1; + rp = 6; + } else { + arm = (decRPId % 1000) / 100; + station = (decRPId % 100) / 10; + rp = decRPId % 10; + } const unsigned int id = copyNos[copyNos.size() - 1]; - const unsigned int arm = copyNos[1] - 1; - const unsigned int station = 1; - const unsigned int rp = 6; - const unsigned int plane = (id / 100); + const unsigned int plane = id / 100; const unsigned int channel = id % 100; - geoID = CTPPSDiamondDetId(arm, station, rp, plane, channel); } // diamond/UFSD RPs else if (name == DDD_CTPPS_DIAMONDS_RP_NAME) { - // check size of copy numbers array + // check size of copy numbers vector if (copyNos.size() < 2) - throw cms::Exception("DDDTotemRPContruction") + throw cms::Exception("DDDTotemRPConstruction") << "size of copyNumbers for diamond RP is " << copyNos.size() << ". It must be >= 2."; - const unsigned int arm = copyNos[1] - 1; - const unsigned int station = 1; - const unsigned int rp = 6; - + const unsigned int decRPId = copyNos[1]; + unsigned int arm, station, rp; + if (isRun2) { + arm = decRPId - 1; + station = 1; + rp = 6; + } else { + arm = (decRPId % 1000) / 100; + station = (decRPId % 100) / 10; + rp = decRPId % 10; + } geoID = CTPPSDiamondDetId(arm, station, rp); } @@ -269,10 +290,11 @@ DetId DetGeomDesc::computeDetID(const std::string& name, const std::vector& */ DetId DetGeomDesc::computeDetIDFromDD4hep(const std::string& name, const std::vector& copyNos, - unsigned int copyNum) const { + const unsigned int copyNum, + const bool isRun2) const { std::vector copyNosOldDD = {copyNos.rbegin() + 1, copyNos.rend()}; - return computeDetID(name, copyNosOldDD, copyNum); + return computeDetID(name, copyNosOldDD, copyNum, isRun2); } /* diff --git a/Geometry/VeryForwardGeometryBuilder/src/DetGeomDescBuilder.cc b/Geometry/VeryForwardGeometryBuilder/src/DetGeomDescBuilder.cc index c48e5371b0050..1bbe604204591 100644 --- a/Geometry/VeryForwardGeometryBuilder/src/DetGeomDescBuilder.cc +++ b/Geometry/VeryForwardGeometryBuilder/src/DetGeomDescBuilder.cc @@ -6,16 +6,17 @@ /* * Generic function to build geo (tree of DetGeomDesc) from old DD compact view. */ -std::unique_ptr detgeomdescbuilder::buildDetGeomDescFromCompactView(const DDCompactView& myCompactView) { +std::unique_ptr detgeomdescbuilder::buildDetGeomDescFromCompactView(const DDCompactView& myCompactView, + const bool isRun2) { // Create DDFilteredView (no filter!!) DDPassAllFilter filter; DDFilteredView fv(myCompactView, filter); // Geo info: root node. - auto geoInfoRoot = std::make_unique(fv); + auto geoInfoRoot = std::make_unique(fv, isRun2); // Construct the tree of children geo info (DetGeomDesc). - detgeomdescbuilder::buildDetGeomDescDescendants(fv, geoInfoRoot.get()); + detgeomdescbuilder::buildDetGeomDescDescendants(fv, geoInfoRoot.get(), isRun2); edm::LogInfo("PPSGeometryESProducer") << "Successfully built geometry."; @@ -26,18 +27,18 @@ std::unique_ptr detgeomdescbuilder::buildDetGeomDescFromCompactView * Depth-first search recursion. * Construct the tree of children geo info (DetGeomDesc) (old DD). */ -void detgeomdescbuilder::buildDetGeomDescDescendants(DDFilteredView& fv, DetGeomDesc* geoInfo) { +void detgeomdescbuilder::buildDetGeomDescDescendants(DDFilteredView& fv, DetGeomDesc* geoInfo, const bool isRun2) { // Leaf if (!fv.firstChild()) return; do { // Create node, and add it to the geoInfoParent's list. - DetGeomDesc* child = new DetGeomDesc(fv); + DetGeomDesc* child = new DetGeomDesc(fv, isRun2); geoInfo->addComponent(child); // Recursion - buildDetGeomDescDescendants(fv, child); + buildDetGeomDescDescendants(fv, child, isRun2); } while (fv.nextSibling()); fv.parent(); @@ -47,7 +48,7 @@ void detgeomdescbuilder::buildDetGeomDescDescendants(DDFilteredView& fv, DetGeom * Generic function to build geo (tree of DetGeomDesc) from DD4hep compact view. */ std::unique_ptr detgeomdescbuilder::buildDetGeomDescFromCompactView( - const cms::DDCompactView& myCompactView) { + const cms::DDCompactView& myCompactView, const bool isRun2) { // create DDFilteredView (no filter!!) const cms::DDDetector* mySystem = myCompactView.detector(); const dd4hep::Volume& worldVolume = mySystem->worldVolume(); @@ -57,12 +58,12 @@ std::unique_ptr detgeomdescbuilder::buildDetGeomDescFromCompactView } // Geo info: root node. - auto geoInfoRoot = std::make_unique(fv); + auto geoInfoRoot = std::make_unique(fv, isRun2); // Construct the tree of children geo info (DetGeomDesc). do { // Create node, and add it to the geoInfoRoot's list. - DetGeomDesc* child = new DetGeomDesc(fv); + DetGeomDesc* child = new DetGeomDesc(fv, isRun2); geoInfoRoot->addComponent(child); } while (fv.next(0)); diff --git a/RecoPPS/Local/plugins/CTPPSDiamondLocalTrackFitter.cc b/RecoPPS/Local/plugins/CTPPSDiamondLocalTrackFitter.cc index a07904ba9cce7..d9c3af54d031d 100644 --- a/RecoPPS/Local/plugins/CTPPSDiamondLocalTrackFitter.cc +++ b/RecoPPS/Local/plugins/CTPPSDiamondLocalTrackFitter.cc @@ -28,7 +28,6 @@ class CTPPSDiamondLocalTrackFitter : public edm::stream::EDProducer<> { public: explicit CTPPSDiamondLocalTrackFitter(const edm::ParameterSet&); - ~CTPPSDiamondLocalTrackFitter() override; static void fillDescriptions(edm::ConfigurationDescriptions&); @@ -36,65 +35,47 @@ class CTPPSDiamondLocalTrackFitter : public edm::stream::EDProducer<> { void produce(edm::Event&, const edm::EventSetup&) override; edm::EDGetTokenT > recHitsToken_; - CTPPSDiamondTrackRecognition trk_algo_45_; - CTPPSDiamondTrackRecognition trk_algo_56_; + const edm::ParameterSet trk_algo_params_; + std::unordered_map > trk_algo_; }; CTPPSDiamondLocalTrackFitter::CTPPSDiamondLocalTrackFitter(const edm::ParameterSet& iConfig) : recHitsToken_( consumes >(iConfig.getParameter("recHitsTag"))), - trk_algo_45_(iConfig.getParameter("trackingAlgorithmParams")), - trk_algo_56_(iConfig.getParameter("trackingAlgorithmParams")) { + trk_algo_params_(iConfig.getParameter("trackingAlgorithmParams")) { produces >(); } -CTPPSDiamondLocalTrackFitter::~CTPPSDiamondLocalTrackFitter() {} - void CTPPSDiamondLocalTrackFitter::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { + // prepare the output auto pOut = std::make_unique >(); edm::Handle > recHits; iEvent.getByToken(recHitsToken_, recHits); - const CTPPSDiamondDetId id_45(0, 1, 6, 0, 0), id_56(1, 1, 6, 0, 0); - - pOut->find_or_insert(id_45); // tracks in 4-5 - edm::DetSet& tracks56 = pOut->find_or_insert(id_56); // tracks in 5-6 - - // workaround to retrieve the detset for 4-5 without losing the reference - edm::DetSet& tracks45 = pOut->operator[](id_45); + // clear all hits possibly inherited from previous event + for (auto& algo_vs_id : trk_algo_) + algo_vs_id.second->clear(); // feed hits to the track producers for (const auto& vec : *recHits) { - const CTPPSDiamondDetId detid(vec.detId()); - for (const auto& hit : vec) { + const CTPPSDiamondDetId raw_detid(vec.detId()), detid(raw_detid.arm(), raw_detid.station(), raw_detid.rp()); + // if algorithm is not found, build it + if (trk_algo_.count(detid) == 0) + trk_algo_[detid] = std::make_unique(trk_algo_params_); + for (const auto& hit : vec) // skip hits without a leading edge - if (hit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING) - continue; - - switch (detid.arm()) { - case 0: { - trk_algo_45_.addHit(hit); - } break; - case 1: { - trk_algo_56_.addHit(hit); - } break; - default: - edm::LogWarning("CTPPSDiamondLocalTrackFitter") << "Invalid arm for rechit: " << detid.arm(); - break; - } - } + if (hit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING) + trk_algo_[detid]->addHit(hit); } - // retrieve the tracks for both arms - trk_algo_45_.produceTracks(tracks45); - trk_algo_56_.produceTracks(tracks56); + // build the tracks for all stations + for (auto& algo_vs_id : trk_algo_) { + auto& tracks = pOut->find_or_insert(algo_vs_id.first); + algo_vs_id.second->produceTracks(tracks); + } iEvent.put(std::move(pOut)); - - // remove all hits from the track producers to prepare for the next event - trk_algo_45_.clear(); - trk_algo_56_.clear(); } void CTPPSDiamondLocalTrackFitter::fillDescriptions(edm::ConfigurationDescriptions& descr) { diff --git a/Validation/CTPPS/python/simu_config/year_2016_cff.py b/Validation/CTPPS/python/simu_config/year_2016_cff.py index 845cda44ae71d..6e2e956e92a94 100644 --- a/Validation/CTPPS/python/simu_config/year_2016_cff.py +++ b/Validation/CTPPS/python/simu_config/year_2016_cff.py @@ -9,14 +9,16 @@ ) ) -# geometry -from Geometry.VeryForwardGeometry.geometryRPFromDD_2017_cfi import * # using 2017 here is OK -ctppsCompositeESSource.compactViewTag = ctppsGeometryESModule.compactViewTag -del ctppsGeometryESModule # this functionality is replaced by the composite ES source +# geometry (using 2017 here is OK) +from Geometry.VeryForwardGeometry.geometryRPFromDD_2017_cfi import totemGeomXMLFiles, ctppsDiamondGeomXMLFiles, ctppsUFSDGeomXMLFiles, ctppsPixelGeomXMLFiles +from Geometry.VeryForwardGeometry.geometryRPFromDD_2017_cfi import XMLIdealGeometryESSource_CTPPS +from Geometry.VeryForwardGeometry.geometryRPFromDD_2017_cfi import ctppsGeometryESModule as _geom +ctppsCompositeESSource.compactViewTag = _geom.compactViewTag +ctppsCompositeESSource.isRun2 = _geom.isRun2 # local reconstruction ctppsLocalTrackLiteProducer.includeStrips = True -ctppsLocalTrackLiteProducer.includePixels = False +ctppsLocalTrackLiteProducer.includePixels = False reco_local = cms.Sequence( totemRPUVPatternFinder diff --git a/Validation/CTPPS/python/simu_config/year_2017_cff.py b/Validation/CTPPS/python/simu_config/year_2017_cff.py index d6df416230be7..b25acd1d8b332 100644 --- a/Validation/CTPPS/python/simu_config/year_2017_cff.py +++ b/Validation/CTPPS/python/simu_config/year_2017_cff.py @@ -7,7 +7,7 @@ ctppsLHCInfo = dict( beamEnergy = 6500 ), - + ctppsOpticalFunctions = dict( opticalFunctions = cms.VPSet( cms.PSet( xangle = cms.double(120), fileName = cms.FileInPath("CalibPPS/ESProducers/data/optical_functions/2017/version5tim/120urad.root") ), @@ -29,9 +29,11 @@ ) # geometry -from Geometry.VeryForwardGeometry.geometryRPFromDD_2017_cfi import * -ctppsCompositeESSource.compactViewTag = ctppsGeometryESModule.compactViewTag -del ctppsGeometryESModule # this functionality is replaced by the composite ES source +from Geometry.VeryForwardGeometry.geometryRPFromDD_2017_cfi import totemGeomXMLFiles, ctppsDiamondGeomXMLFiles, ctppsUFSDGeomXMLFiles, ctppsPixelGeomXMLFiles +from Geometry.VeryForwardGeometry.geometryRPFromDD_2017_cfi import XMLIdealGeometryESSource_CTPPS +from Geometry.VeryForwardGeometry.geometryRPFromDD_2017_cfi import ctppsGeometryESModule as _geom +ctppsCompositeESSource.compactViewTag = _geom.compactViewTag +ctppsCompositeESSource.isRun2 = _geom.isRun2 # local reconstruction ctppsLocalTrackLiteProducer.includeStrips = True diff --git a/Validation/CTPPS/python/simu_config/year_2018_cff.py b/Validation/CTPPS/python/simu_config/year_2018_cff.py index f739353565512..321d6e047c1ff 100644 --- a/Validation/CTPPS/python/simu_config/year_2018_cff.py +++ b/Validation/CTPPS/python/simu_config/year_2018_cff.py @@ -26,7 +26,7 @@ cms.PSet( rpId = cms.uint32(2040004608), dirName = cms.string("XRPH_B6R5_B1"), z = cms.double(+21955.0) ), # RP 123, pixel ) ), - + ctppsDirectSimuData = dict( empiricalAperture45 = cms.string("-(8.44219E-07*[xangle]-0.000100957)+(([xi]<(0.000247185*[xangle]+0.101599))*-(1.40289E-05*[xangle]-0.00727237)+([xi]> = (0.000247185*[xangle]+0.101599))*-(0.000107811*[xangle]-0.0261867))*([xi]-(0.000247185*[xangle]+0.101599))"), empiricalAperture56 = cms.string("-(-4.74758E-07*[xangle]+3.0881E-05)+(([xi]<(0.000727859*[xangle]+0.0722653))*-(2.43968E-05*[xangle]-0.0085461)+([xi]> = (0.000727859*[xangle]+0.0722653))*-(7.19216E-05*[xangle]-0.0148267))*([xi]-(0.000727859*[xangle]+0.0722653))") @@ -34,9 +34,11 @@ ) # geometry -from Geometry.VeryForwardGeometry.geometryRPFromDD_2018_cfi import * -ctppsCompositeESSource.compactViewTag = ctppsGeometryESModule.compactViewTag -del ctppsGeometryESModule # this functionality is replaced by the composite ES source +from Geometry.VeryForwardGeometry.geometryRPFromDD_2018_cfi import totemGeomXMLFiles, ctppsDiamondGeomXMLFiles, ctppsUFSDGeomXMLFiles, ctppsPixelGeomXMLFiles +from Geometry.VeryForwardGeometry.geometryRPFromDD_2018_cfi import XMLIdealGeometryESSource_CTPPS +from Geometry.VeryForwardGeometry.geometryRPFromDD_2018_cfi import ctppsGeometryESModule as _geom +ctppsCompositeESSource.compactViewTag = _geom.compactViewTag +ctppsCompositeESSource.isRun2 = _geom.isRun2 # local reconstruction ctppsLocalTrackLiteProducer.includeStrips = False