diff --git a/Configuration/AlCa/python/autoCond.py b/Configuration/AlCa/python/autoCond.py index 5fba69d26aff0..1b984ce2c0d6a 100644 --- a/Configuration/AlCa/python/autoCond.py +++ b/Configuration/AlCa/python/autoCond.py @@ -2,81 +2,81 @@ ### NEW KEYS ### # GlobalTag for MC production with perfectly aligned and calibrated detector for Run1 - 'run1_design' : '113X_mcRun1_design_v2', + 'run1_design' : '113X_mcRun1_design_v3', # GlobalTag for MC production (pp collisions) with realistic alignment and calibrations for Run1 - 'run1_mc' : '113X_mcRun1_realistic_v2', + 'run1_mc' : '113X_mcRun1_realistic_v3', # GlobalTag for MC production (Heavy Ions collisions) with realistic alignment and calibrations for Run1 - 'run1_mc_hi' : '113X_mcRun1_HeavyIon_v2', + 'run1_mc_hi' : '113X_mcRun1_HeavyIon_v3', # GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run1 - 'run1_mc_pa' : '113X_mcRun1_pA_v2', + 'run1_mc_pa' : '113X_mcRun1_pA_v3', # GlobalTag for MC production with pessimistic alignment and calibrations for Run2 - 'run2_mc_50ns' : '113X_mcRun2_startup_v2', + 'run2_mc_50ns' : '113X_mcRun2_startup_v3', # GlobalTag for MC production (2015 L1 Trigger Stage1) with startup-like alignment and calibrations for Run2, L1 trigger in Stage1 mode - 'run2_mc_l1stage1' : '113X_mcRun2_asymptotic_l1stage1_v3', + 'run2_mc_l1stage1' : '113X_mcRun2_asymptotic_l1stage1_v4', # GlobalTag for MC production with perfectly aligned and calibrated detector for Run2 - 'run2_design' : '113X_mcRun2_design_v3', + 'run2_design' : '113X_mcRun2_design_v4', #GlobalTag for MC production with optimistic alignment and calibrations for 2016, prior to VFP change - 'run2_mc_pre_vfp' : '113X_mcRun2_asymptotic_preVFP_v3', + 'run2_mc_pre_vfp' : '113X_mcRun2_asymptotic_preVFP_v4', #GlobalTag for MC production with optimistic alignment and calibrations for 2016, after VFP change - 'run2_mc' : '113X_mcRun2_asymptotic_v3', + 'run2_mc' : '113X_mcRun2_asymptotic_v4', # GlobalTag for MC production (cosmics) with starup-like alignment and calibrations for Run2, Strip tracker in peak mode - 'run2_mc_cosmics' : '113X_mcRun2cosmics_asymptotic_deco_v3', + 'run2_mc_cosmics' : '113X_mcRun2cosmics_asymptotic_deco_v4', # GlobalTag for MC production (Heavy Ions collisions) with optimistic alignment and calibrations for Run2 - 'run2_mc_hi' : '113X_mcRun2_HeavyIon_v3', + 'run2_mc_hi' : '113X_mcRun2_HeavyIon_v4', # GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run2 - 'run2_mc_pa' : '113X_mcRun2_pA_v3', + 'run2_mc_pa' : '113X_mcRun2_pA_v4', # GlobalTag for Run2 data reprocessing - 'run2_data' : '113X_dataRun2_v5', + 'run2_data' : '113X_dataRun2_v6', # GlobalTag for Run2 data 2018B relvals only: HEM-15-16 fail - 'run2_data_HEfail' : '113X_dataRun2_HEfail_v5', + 'run2_data_HEfail' : '113X_dataRun2_HEfail_v6', # GlobalTag for Run2 data relvals: allows customization to run with fixed L1 menu - 'run2_data_relval' : '113X_dataRun2_relval_v5', + 'run2_data_relval' : '113X_dataRun2_relval_v6', # GlobalTag for Run2 HI data - 'run2_data_promptlike_hi' : '113X_dataRun2_PromptLike_HI_v5', + 'run2_data_promptlike_hi' : '113X_dataRun2_PromptLike_HI_v6', # GlobalTag for Run3 HLT: it points to the online GT - 'run3_hlt' : '112X_dataRun3_HLT_v3', + 'run3_hlt' : '113X_dataRun3_HLT_v1', # GlobalTag with fixed snapshot time for Run2 HLT RelVals: customizations to run with fixed L1 Menu - 'run2_hlt_relval' : '112X_dataRun2_HLT_relval_v6', + 'run2_hlt_relval' : '113X_dataRun2_HLT_relval_v1', # GlobalTag for Run3 data relvals (express GT) - 'run3_data_express' : '112X_dataRun3_Express_v5', + 'run3_data_express' : '113X_dataRun3_Express_v1', # GlobalTag for Run3 data relvals - 'run3_data_prompt' : '112X_dataRun3_Prompt_v5', + 'run3_data_prompt' : '113X_dataRun3_Prompt_v1', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2017 (and 0,0,~0-centred beamspot) - 'phase1_2017_design' : '113X_mc2017_design_v4', + 'phase1_2017_design' : '113X_mc2017_design_v5', # GlobalTag for MC production with realistic conditions for Phase1 2017 detector - 'phase1_2017_realistic' : '113X_mc2017_realistic_v4', + 'phase1_2017_realistic' : '113X_mc2017_realistic_v5', # GlobalTag for MC production (cosmics) with realistic alignment and calibrations for Phase1 2017 detector, Strip tracker in DECO mode - 'phase1_2017_cosmics' : '113X_mc2017cosmics_realistic_deco_v4', + 'phase1_2017_cosmics' : '113X_mc2017cosmics_realistic_deco_v5', # GlobalTag for MC production (cosmics) with realistic alignment and calibrations for Phase1 2017 detector, Strip tracker in PEAK mode - 'phase1_2017_cosmics_peak' : '113X_mc2017cosmics_realistic_peak_v4', + 'phase1_2017_cosmics_peak' : '113X_mc2017cosmics_realistic_peak_v5', # GlobalTag for MC production with perfectly aligned and calibrated detector for full Phase1 2018 (and 0,0,0-centred beamspot) - 'phase1_2018_design' : '113X_upgrade2018_design_v4', + 'phase1_2018_design' : '113X_upgrade2018_design_v5', # GlobalTag for MC production with realistic conditions for full Phase1 2018 detector - 'phase1_2018_realistic' : '113X_upgrade2018_realistic_v4', + 'phase1_2018_realistic' : '113X_upgrade2018_realistic_v5', # GlobalTag for MC production with realistic run-dependent (RD) conditions for full Phase1 2018 detector - 'phase1_2018_realistic_rd' : '113X_upgrade2018_realistic_RD_v3', + 'phase1_2018_realistic_rd' : '113X_upgrade2018_realistic_RD_v4', # GlobalTag for MC production with realistic conditions for full Phase1 2018 detector for Heavy Ion - 'phase1_2018_realistic_hi' : '113X_upgrade2018_realistic_HI_v4', + 'phase1_2018_realistic_hi' : '113X_upgrade2018_realistic_HI_v5', # GlobalTag for MC production with realistic conditions for full Phase1 2018 detector: HEM-15-16 fail - 'phase1_2018_realistic_HEfail' : '113X_upgrade2018_realistic_HEfail_v4', + 'phase1_2018_realistic_HEfail' : '113X_upgrade2018_realistic_HEfail_v5', # GlobalTag for MC production (cosmics) with realistic conditions for full Phase1 2018 detector, Strip tracker in DECO mode - 'phase1_2018_cosmics' : '113X_upgrade2018cosmics_realistic_deco_v4', + 'phase1_2018_cosmics' : '113X_upgrade2018cosmics_realistic_deco_v5', # GlobalTag for MC production (cosmics) with realistic conditions for full Phase1 2018 detector, Strip tracker in PEAK mode - 'phase1_2018_cosmics_peak' : '113X_upgrade2018cosmics_realistic_peak_v4', + 'phase1_2018_cosmics_peak' : '113X_upgrade2018cosmics_realistic_peak_v5', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2021 - 'phase1_2021_design' : '113X_mcRun3_2021_design_v7', # GT containing design conditions for Phase1 2021 + 'phase1_2021_design' : '113X_mcRun3_2021_design_v8', # GT containing design conditions for Phase1 2021 # GlobalTag for MC production with realistic conditions for Phase1 2021 - 'phase1_2021_realistic' : '113X_mcRun3_2021_realistic_v9', # GT containing realistic conditions for Phase1 2021 + 'phase1_2021_realistic' : '113X_mcRun3_2021_realistic_v10', # GT containing realistic conditions for Phase1 2021 # GlobalTag for MC production (cosmics) with realistic conditions for Phase1 2021, Strip tracker in DECO mode - 'phase1_2021_cosmics' : '113X_mcRun3_2021cosmics_realistic_deco_v8', + 'phase1_2021_cosmics' : '113X_mcRun3_2021cosmics_realistic_deco_v9', # GlobalTag for MC production with realistic conditions for Phase1 2021 detector for Heavy Ion - 'phase1_2021_realistic_hi' : '113X_mcRun3_2021_realistic_HI_v7', + 'phase1_2021_realistic_hi' : '113X_mcRun3_2021_realistic_HI_v8', # GlobalTag for MC production with realistic conditions for Phase1 2023 - 'phase1_2023_realistic' : '113X_mcRun3_2023_realistic_v7', # GT containing realistic conditions for Phase1 2023 + 'phase1_2023_realistic' : '113X_mcRun3_2023_realistic_v8', # GT containing realistic conditions for Phase1 2023 # GlobalTag for MC production with realistic conditions for Phase1 2024 - 'phase1_2024_realistic' : '113X_mcRun3_2024_realistic_v7', # GT containing realistic conditions for Phase1 2024 + 'phase1_2024_realistic' : '113X_mcRun3_2024_realistic_v8', # GT containing realistic conditions for Phase1 2024 # GlobalTag for MC production with realistic conditions for Phase2 - 'phase2_realistic' : '113X_mcRun4_realistic_v6' + 'phase2_realistic' : '113X_mcRun4_realistic_v7' } aliases = { diff --git a/Configuration/Geometry/README.md b/Configuration/Geometry/README.md index fdfbb1be39045..63f708650c61e 100644 --- a/Configuration/Geometry/README.md +++ b/Configuration/Geometry/README.md @@ -60,6 +60,7 @@ Calorimeters: * C13: HGCal (reading the constants of the flat file and made provision to be used downstream) + Phase2 HCAL and EB * C14: HGCal (reading the constants of the flat file and use it to create geometry) + Phase2 HCAL and EB * C15: HGCal (as in C14) + HFNose with corrected wafer size + Phase2 HCAL and EB +* C16: HGCal (create HGCal geometry with real full and partial silicon modules using the constants of the flat file) + Phase2 HCAL and EB Muon system: * M4: Phase2 muon system for TDR w/ GE2/1, ME0, RE3/1, RE4/1 (incl. granularity in ME0, staggered GE2/1), 96 iRPC strips, no overlaps, MB4Shields @@ -98,3 +99,4 @@ Several detector combinations have been generated: * D80 = T25+C14+M9+I13+O7+F6 * D81 = T26+C14+M9+I13+O7+F6 * D82 = T21+C15+M9+I13+O7+F7 +* D83 = T24+C16+M9+I13+O7+F6 diff --git a/Configuration/Geometry/python/GeometryDD4hepExtended2026D83Reco_cff.py b/Configuration/Geometry/python/GeometryDD4hepExtended2026D83Reco_cff.py new file mode 100644 index 0000000000000..20938526fdef8 --- /dev/null +++ b/Configuration/Geometry/python/GeometryDD4hepExtended2026D83Reco_cff.py @@ -0,0 +1,59 @@ +import FWCore.ParameterSet.Config as cms + +# This config was generated automatically using generate2026Geometry.py +# If you notice a mistake, please update the generating script, not just this config + +from Configuration.Geometry.GeometryDD4hepExtended2026D83_cff import * + +# tracker +from Geometry.CommonTopologies.globalTrackingGeometry_cfi import * +from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import * +from Geometry.TrackerGeometryBuilder.trackerParameters_cff import * +from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import * +from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import * +trackerGeometry.applyAlignment = cms.bool(False) + +# calo +from Geometry.CaloEventSetup.HGCalV9Topology_cfi import * +from Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi import * +from Geometry.CaloEventSetup.CaloTopology_cfi import * +from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import * +CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder", + SelectedCalos = cms.vstring("HCAL", + "ZDC", + "EcalBarrel", + "TOWER", + "HGCalEESensitive", + "HGCalHESiliconSensitive", + "HGCalHEScintillatorSensitive" + ) +) +from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import * +from Geometry.HcalEventSetup.HcalGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerTopology_cfi import * +from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import * +from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import * +from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import * +from Geometry.EcalMapping.EcalMapping_cfi import * +from Geometry.EcalMapping.EcalMappingRecord_cfi import * + +# muon +from Geometry.MuonNumbering.muonNumberingInitialization_cfi import * +from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import * +from Geometry.GEMGeometryBuilder.gemGeometry_cfi import * +from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import * +from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import * + +# forward +from Geometry.ForwardGeometry.ForwardGeometry_cfi import * + +# timing +from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import * +from Geometry.MTDGeometryBuilder.mtdParameters_cff import * +from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import * +from Geometry.MTDNumberingBuilder.mtdTopology_cfi import * +from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import * +from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import * +mtdGeometry.applyAlignment = cms.bool(False) + diff --git a/Configuration/Geometry/python/GeometryDD4hepExtended2026D83_cff.py b/Configuration/Geometry/python/GeometryDD4hepExtended2026D83_cff.py new file mode 100644 index 0000000000000..1d900d3d1416f --- /dev/null +++ b/Configuration/Geometry/python/GeometryDD4hepExtended2026D83_cff.py @@ -0,0 +1,16 @@ +import FWCore.ParameterSet.Config as cms + +# This config was generated automatically using generate2026Geometry.py +# If you notice a mistake, please update the generating script, not just this config + +from Configuration.Geometry.GeometryDD4hep_cff import * +DDDetectorESProducer.confGeomXMLFiles = cms.FileInPath("Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D83.xml") + +from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import * +from Geometry.EcalCommonData.ecalSimulationParameters_cff import * +from Geometry.HcalCommonData.hcalDDDSimConstants_cff import * +from Geometry.HGCalCommonData.hgcalV15ParametersInitialization_cfi import * +from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import * +from Geometry.MuonNumbering.muonGeometryConstants_cff import * +from Geometry.MuonNumbering.muonOffsetESProducer_cff import * +from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import * diff --git a/Configuration/Geometry/python/GeometryExtended2026D83Reco_cff.py b/Configuration/Geometry/python/GeometryExtended2026D83Reco_cff.py new file mode 100644 index 0000000000000..077457796a218 --- /dev/null +++ b/Configuration/Geometry/python/GeometryExtended2026D83Reco_cff.py @@ -0,0 +1,59 @@ +import FWCore.ParameterSet.Config as cms + +# This config was generated automatically using generate2026Geometry.py +# If you notice a mistake, please update the generating script, not just this config + +from Configuration.Geometry.GeometryExtended2026D83_cff import * + +# tracker +from Geometry.CommonTopologies.globalTrackingGeometry_cfi import * +from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import * +from Geometry.TrackerGeometryBuilder.trackerParameters_cff import * +from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import * +from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import * +trackerGeometry.applyAlignment = cms.bool(False) + +# calo +from Geometry.CaloEventSetup.HGCalV9Topology_cfi import * +from Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi import * +from Geometry.CaloEventSetup.CaloTopology_cfi import * +from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import * +CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder", + SelectedCalos = cms.vstring("HCAL", + "ZDC", + "EcalBarrel", + "TOWER", + "HGCalEESensitive", + "HGCalHESiliconSensitive", + "HGCalHEScintillatorSensitive" + ) +) +from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import * +from Geometry.HcalEventSetup.HcalGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerTopology_cfi import * +from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import * +from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import * +from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import * +from Geometry.EcalMapping.EcalMapping_cfi import * +from Geometry.EcalMapping.EcalMappingRecord_cfi import * + +# muon +from Geometry.MuonNumbering.muonNumberingInitialization_cfi import * +from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import * +from Geometry.GEMGeometryBuilder.gemGeometry_cfi import * +from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import * +from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import * + +# forward +from Geometry.ForwardGeometry.ForwardGeometry_cfi import * + +# timing +from RecoMTD.DetLayers.mtdDetLayerGeometry_cfi import * +from Geometry.MTDGeometryBuilder.mtdParameters_cff import * +from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import * +from Geometry.MTDNumberingBuilder.mtdTopology_cfi import * +from Geometry.MTDGeometryBuilder.mtdGeometry_cfi import * +from Geometry.MTDGeometryBuilder.idealForDigiMTDGeometry_cff import * +mtdGeometry.applyAlignment = cms.bool(False) + diff --git a/Configuration/Geometry/python/GeometryExtended2026D83_cff.py b/Configuration/Geometry/python/GeometryExtended2026D83_cff.py new file mode 100644 index 0000000000000..09f7c3f18aee0 --- /dev/null +++ b/Configuration/Geometry/python/GeometryExtended2026D83_cff.py @@ -0,0 +1,14 @@ +import FWCore.ParameterSet.Config as cms + +# This config was generated automatically using generate2026Geometry.py +# If you notice a mistake, please update the generating script, not just this config + +from Geometry.CMSCommonData.cmsExtendedGeometry2026D83XML_cfi import * +from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import * +from Geometry.EcalCommonData.ecalSimulationParameters_cff import * +from Geometry.HcalCommonData.hcalDDDSimConstants_cff import * +from Geometry.HGCalCommonData.hgcalV15ParametersInitialization_cfi import * +from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import * +from Geometry.MuonNumbering.muonGeometryConstants_cff import * +from Geometry.MuonNumbering.muonOffsetESProducer_cff import * +from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import * diff --git a/Configuration/Geometry/python/dict2021Geometry.py b/Configuration/Geometry/python/dict2021Geometry.py index 49de937e62cd4..0a8bef7a8026a 100644 --- a/Configuration/Geometry/python/dict2021Geometry.py +++ b/Configuration/Geometry/python/dict2021Geometry.py @@ -1994,8 +1994,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station.xml', @@ -2097,8 +2097,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station.xml', @@ -2200,8 +2200,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v1/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v1/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v1/CTPPS_210_Right_Station.xml', diff --git a/Configuration/Geometry/python/dict2026Geometry.py b/Configuration/Geometry/python/dict2026Geometry.py index 52c17c497af09..1d60dc712f358 100644 --- a/Configuration/Geometry/python/dict2026Geometry.py +++ b/Configuration/Geometry/python/dict2026Geometry.py @@ -309,7 +309,6 @@ 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackersens.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/pixelsens.xml', 'Geometry/TrackerRecoData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/trackerRecoMaterial.xml', - 'SimTracker/TrackerMaterialAnalysis/data/trackingMaterialGroups_ForPhaseII/v1/trackingMaterialGroups_ForPhaseII.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackerProdCuts.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/pixelProdCuts.xml', 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', @@ -344,7 +343,6 @@ 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackersens.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/pixelsens.xml', 'Geometry/TrackerRecoData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/trackerRecoMaterial.xml', - 'SimTracker/TrackerMaterialAnalysis/data/trackingMaterialGroups_ForPhaseII/v1/trackingMaterialGroups_ForPhaseII.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackerProdCuts.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/pixelProdCuts.xml', 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', @@ -833,6 +831,80 @@ ], "era" : "phase2_ecal, phase2_hcal, phase2_hgcal, hcalHardcodeConditions, phase2_hgcalV10, phase2_hgcalV11, phase2_hgcalV12, phase2_hfnose", }, + "C16" : { + 1 : [ + 'Geometry/EcalCommonData/data/eregalgo/2026/v2/eregalgo.xml', + 'Geometry/EcalCommonData/data/ectkcable/2026/v1/ectkcable.xml', + 'Geometry/EcalCommonData/data/ectkcablemat/2026/v1/ectkcablemat.xml', + 'Geometry/EcalCommonData/data/ebalgo.xml', + 'Geometry/EcalCommonData/data/ebcon.xml', + 'Geometry/EcalCommonData/data/ebrot.xml', + 'Geometry/HcalCommonData/data/hcalrotations.xml', + 'Geometry/HcalCommonData/data/hcal/v2/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', + 'Geometry/HcalCommonData/data/hcalcablealgo/v2/hcalcablealgo.xml', + 'Geometry/HcalCommonData/data/hcalouteralgo.xml', + 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', + 'Geometry/HcalCommonData/data/hcalSimNumbering/NoHE/hcalSimNumbering.xml', + 'Geometry/HcalCommonData/data/hcalRecNumbering/NoHE/hcalRecNumbering.xml', + 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', + 'Geometry/HGCalCommonData/data/hgcalMaterial/v1/hgcalMaterial.xml', + 'Geometry/HGCalCommonData/data/hgcal/v15/hgcal.xml', + 'Geometry/HGCalCommonData/data/hgcalcell/v15/hgcalcell.xml', + 'Geometry/HGCalCommonData/data/hgcalwafer/v15/hgcalwafer.xml', + 'Geometry/HGCalCommonData/data/hgcalEE/v15/hgcalEE.xml', + 'Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcalHEsil.xml', + 'Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmix.xml', + 'Geometry/HGCalCommonData/data/hgcalCons/v15/hgcalCons.xml', + 'Geometry/HGCalCommonData/data/hgcalConsData/v15/hgcalConsData.xml', + ], + 3 : [ + 'Geometry/EcalSimData/data/PhaseII/ecalsens.xml', + 'Geometry/HcalCommonData/data/hcalsens/NoHE/hcalsenspmf.xml', + 'Geometry/HcalSimData/data/hf.xml', + 'Geometry/HcalSimData/data/hfpmt.xml', + 'Geometry/HcalSimData/data/hffibrebundle.xml', + 'Geometry/HcalSimData/data/CaloUtil/2026/v2c/CaloUtil.xml', + 'Geometry/HGCalSimData/data/hgcsensv15.xml', + ], + 4 : [ + 'Geometry/HcalSimData/data/HcalProdCuts/2021/v1/HcalProdCuts.xml', + 'Geometry/EcalSimData/data/EcalProdCuts.xml', + 'Geometry/HGCalSimData/data/hgcProdCutsv15.xml', + ], + "sim" : [ + 'from Geometry.EcalCommonData.ecalSimulationParameters_cff import *', + 'from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *', + 'from Geometry.HGCalCommonData.hgcalV15ParametersInitialization_cfi import *', + 'from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import *' + ], + "reco" : [ + 'from Geometry.CaloEventSetup.HGCalV9Topology_cfi import *', + 'from Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi import *', + 'from Geometry.CaloEventSetup.CaloTopology_cfi import *', + 'from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import *', + 'CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder",', + ' SelectedCalos = cms.vstring("HCAL",', + ' "ZDC",', + ' "EcalBarrel",', + ' "TOWER",', + ' "HGCalEESensitive",', + ' "HGCalHESiliconSensitive",', + ' "HGCalHEScintillatorSensitive"', + ' )', + ')', + 'from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import *', + 'from Geometry.HcalEventSetup.HcalGeometry_cfi import *', + 'from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import *', + 'from Geometry.HcalEventSetup.CaloTowerTopology_cfi import *', + 'from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import *', + 'from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import *', + 'from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *', + 'from Geometry.EcalMapping.EcalMapping_cfi import *', + 'from Geometry.EcalMapping.EcalMappingRecord_cfi import *', + ], + "era" : "phase2_ecal, phase2_hcal, phase2_hgcal, hcalHardcodeConditions, phase2_hgcalV10, phase2_hgcalV11, phase2_hgcalV12, phase2_hfnose", + }, } @@ -1266,6 +1338,7 @@ ("O7","T25","C14","M9","F6","I13") : "D80", ("O7","T26","C14","M9","F6","I13") : "D81", ("O7","T21","C15","M9","F7","I13") : "D82", + ("O7","T24","C16","M9","F6","I13") : "D83", } deprecatedDets = set([ "D1", "D2", "D3", "D5", "D6" , "D7", "D4", "D8" , "D9", "D12", "D13", "D15", "D10", "D11", "D14", "D16", "D17", "D18", "D19", "D20", "D21", "D22", "D23", "D24", "D25", "D26", "D27", "D28", "D29", "D30", "D31", "D32", "D33", "D34", "D36", "D37", "D38", "D39", "D40", "D42", "D35", "D41", "D43", "D44", "D45", "D46", "D48", "D47", "D50", "D51", "D52", "D53", "D54", "D55", "D56", "D57", "D58", "D59", "D61", "D62", "D63", "D64", "D65", "D66", "D67", "D69", "D71", "D72", "D73", "D74", "D75"]) diff --git a/Configuration/PyReleaseValidation/python/relval_2026.py b/Configuration/PyReleaseValidation/python/relval_2026.py index 4dd1257b5e540..437f8822218f2 100644 --- a/Configuration/PyReleaseValidation/python/relval_2026.py +++ b/Configuration/PyReleaseValidation/python/relval_2026.py @@ -31,6 +31,7 @@ numWFIB.extend([36234.0]) #2026D80 numWFIB.extend([36634.0]) #2026D81 numWFIB.extend([37034.0]) #2026D82 +numWFIB.extend([37434.0]) #2026D83 for numWF in numWFIB: workflows[numWF] = _upgrade_workflows[numWF] diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 8b7ccd217e6c2..a3473016a853b 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -50,6 +50,8 @@ '2026D81PU', '2026D82', '2026D82PU', + '2026D83', + '2026D83PU', ] # pre-generation of WF numbers @@ -1266,6 +1268,13 @@ def condition(self, fragment, stepList, key, hasHarvest): 'Era' : 'Phase2C11I13M9', 'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'], }, + '2026D83' : { + 'Geom' : 'Extended2026D83', + 'HLTmenu': '@fake2', + 'GT' : 'auto:phase2_realistic_T21', + 'Era' : 'Phase2C11I13M9', + 'ScenToRun' : ['GenSimHLBeamSpot','DigiTrigger','RecoGlobal', 'HARVESTGlobal'], + }, } # standard PU sequences diff --git a/Configuration/StandardSequences/python/GeometryConf.py b/Configuration/StandardSequences/python/GeometryConf.py index c503e5b0e8c44..313a7e1c771fd 100644 --- a/Configuration/StandardSequences/python/GeometryConf.py +++ b/Configuration/StandardSequences/python/GeometryConf.py @@ -61,4 +61,5 @@ 'Extended2026D80' : 'Extended2026D80,Extended2026D80Reco', 'Extended2026D81' : 'Extended2026D81,Extended2026D81Reco', 'Extended2026D82' : 'Extended2026D82,Extended2026D82Reco', + 'Extended2026D83' : 'Extended2026D83,Extended2026D83Reco', } diff --git a/DQM/TrackingMonitor/interface/TrackAnalyzer.h b/DQM/TrackingMonitor/interface/TrackAnalyzer.h index eb4d0a11572f3..cb25867828264 100644 --- a/DQM/TrackingMonitor/interface/TrackAnalyzer.h +++ b/DQM/TrackingMonitor/interface/TrackAnalyzer.h @@ -270,10 +270,6 @@ namespace tadqm { MonitorElement* TrackEtaPhi = nullptr; MonitorElement* TrackEtaPhiInverted = nullptr; MonitorElement* TrackEtaPhiInvertedoutofphase = nullptr; - MonitorElement* TkEtaPhi_Ratio_byFoldingmap = nullptr; - MonitorElement* TkEtaPhi_Ratio_byFoldingmap_op = nullptr; - MonitorElement* TkEtaPhi_RelativeDifference_byFoldingmap = nullptr; - MonitorElement* TkEtaPhi_RelativeDifference_byFoldingmap_op = nullptr; MonitorElement* TrackEtaPhiInner = nullptr; MonitorElement* TrackEtaPhiOuter = nullptr; diff --git a/DQM/TrackingMonitor/interface/TrackEfficiencyClient.h b/DQM/TrackingMonitor/interface/TrackEfficiencyClient.h index 27b3e6651b4d9..09e083eb3d509 100644 --- a/DQM/TrackingMonitor/interface/TrackEfficiencyClient.h +++ b/DQM/TrackingMonitor/interface/TrackEfficiencyClient.h @@ -23,11 +23,7 @@ DQM class to compute the tracking efficiency #include "DQMServices/Core/interface/DQMStore.h" -#include -#include #include -#include -//#include class TrackEfficiencyClient : public DQMEDHarvester { public: diff --git a/DQM/TrackingMonitor/interface/TrackFoldedOccupancyClient.h b/DQM/TrackingMonitor/interface/TrackFoldedOccupancyClient.h new file mode 100644 index 0000000000000..8efd5f921324a --- /dev/null +++ b/DQM/TrackingMonitor/interface/TrackFoldedOccupancyClient.h @@ -0,0 +1,55 @@ +#ifndef TrackingMonitor_TrackFoldedOccupancyClient_h +#define TrackingMonitor_TrackFoldedOccupancyClient_h +// -*- C++ -*- +// +// Package: TrackingMonitor +// Class : TrackFoldedOccupancyClient +// +//DQM class to plot occupancy in eta phi + +#include + +#include "DQMServices/Core/interface/DQMEDHarvester.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/LuminosityBlock.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "DQMServices/Core/interface/DQMStore.h" + +class TrackFoldedOccupancyClient : public DQMEDHarvester { +public: + /// Constructor + TrackFoldedOccupancyClient(const edm::ParameterSet& ps); + + /// Destructor + ~TrackFoldedOccupancyClient() override; + +protected: + /// BeginJob + void beginJob(void) override; + + /// BeginRun + void beginRun(edm::Run const& run, edm::EventSetup const& eSetup) override; + + /// EndJob + void dqmEndJob(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_) override; + +private: + /// book MEs + void bookMEs(DQMStore::IBooker& ibooker_); + + edm::ParameterSet conf_; + std::string algoName_; + std::string quality_; + std::string state_; + std::string histTag_; + std::string TopFolder_; + + MonitorElement* TkEtaPhi_RelativeDifference_byFoldingmap = nullptr; + MonitorElement* TkEtaPhi_RelativeDifference_byFoldingmap_op = nullptr; + MonitorElement* TkEtaPhi_Ratio_byFoldingmap = nullptr; + MonitorElement* TkEtaPhi_Ratio_byFoldingmap_op = nullptr; +}; +#endif diff --git a/DQM/TrackingMonitor/interface/TrackingMonitor.h b/DQM/TrackingMonitor/interface/TrackingMonitor.h index e10764ec35a7a..6c001bca6f402 100644 --- a/DQM/TrackingMonitor/interface/TrackingMonitor.h +++ b/DQM/TrackingMonitor/interface/TrackingMonitor.h @@ -74,7 +74,6 @@ class TrackingMonitor : public DQMEDAnalyzer { void analyze(const edm::Event&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override; - // virtual void dqmBeginRun(const edm::Run&, const edm::EventSetup&); private: void doProfileX(TH2* th2, MonitorElement* me); diff --git a/DQM/TrackingMonitor/python/TrackFoldedOccupancyClient_cfi.py b/DQM/TrackingMonitor/python/TrackFoldedOccupancyClient_cfi.py new file mode 100644 index 0000000000000..2459646a77224 --- /dev/null +++ b/DQM/TrackingMonitor/python/TrackFoldedOccupancyClient_cfi.py @@ -0,0 +1,43 @@ +import FWCore.ParameterSet.Config as cms +from DQMServices.Core.DQMEDHarvester import DQMEDHarvester + +TrackerMapFoldedClient = DQMEDHarvester("TrackFoldedOccupancyClient", + FolderName = cms.string('Tracking/TrackParameters'), + AlgoName = cms.string('GenTk'), + TrackQuality = cms.string('generalTracks'), + MeasurementState = cms.string('ImpactPoint'), + PhiMax = cms.double(3.141592654), + PhiMin = cms.double(-3.141592654), + EtaMax = cms.double(2.5), + EtaMin = cms.double(-2.5), + Eta2DBin = cms.int32(26), + Phi2DBin = cms.int32(32), +) + +from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel +phase1Pixel.toModify(TrackerMapFoldedClient, EtaMin=-3., EtaMax=3.) +from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker +phase2_tracker.toModify(TrackerMapFoldedClient, EtaMin=-4.5, EtaMax=4.5) + +TrackerMapFoldedClient_highpurity_dzPV0p1=TrackerMapFoldedClient.clone( + TrackQuality=cms.string('highPurityTracks/dzPV0p1') +) + +TrackerMapFoldedClient_highpurity_pt0to1=TrackerMapFoldedClient.clone( + TrackQuality=cms.string('highPurityTracks/pt_0to1') +) + +TrackerMapFoldedClient_highpurity_pt1=TrackerMapFoldedClient.clone( + TrackQuality=cms.string('highPurityTracks/pt_1') +) + +foldedMapClientSeq=cms.Sequence(TrackerMapFoldedClient*TrackerMapFoldedClient_highpurity_dzPV0p1*TrackerMapFoldedClient_highpurity_pt0to1*TrackerMapFoldedClient_highpurity_pt1) + +#run3 +TrackerMapFoldedClient_hiConformalPixelTracks=TrackerMapFoldedClient.clone( + TrackQuality = cms.string('hiConformalPixelTracks') +) + +folded_with_conformalpixtkclient= cms.Sequence(TrackerMapFoldedClient_hiConformalPixelTracks+foldedMapClientSeq.copy()) +from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA +pp_on_AA.toReplaceWith(foldedMapClientSeq, folded_with_conformalpixtkclient) diff --git a/DQM/TrackingMonitor/src/GetLumi.cc b/DQM/TrackingMonitor/src/GetLumi.cc index b8c8508f4c1c1..7b7df55f97228 100644 --- a/DQM/TrackingMonitor/src/GetLumi.cc +++ b/DQM/TrackingMonitor/src/GetLumi.cc @@ -4,7 +4,6 @@ * \author: Mia Tosi,40 3-B32,+41227671609 */ -#include #include "DQM/TrackingMonitor/interface/GetLumi.h" #include "FWCore/Framework/interface/LuminosityBlock.h" @@ -63,9 +62,9 @@ double GetLumi::getRawValue(edm::LuminosityBlock const& lumiBlock, edm::EventSet if (lumiSummary_->isValid()) { lumi = lumiSummary_->avgInsDelLumi(); intDelLumi = lumiSummary_->intgDelLumi(); - std::cout << "Luminosity in this Lumi Section " << lumi << " --> " << intDelLumi << std::endl; + edm::LogInfo("GetLumi") << "Luminosity in this Lumi Section " << lumi << " --> " << intDelLumi << std::endl; } else { - std::cout << "No valid data found!" << std::endl; + edm::LogWarning("GetLumi") << "No valid data found!" << std::endl; } return lumi; diff --git a/DQM/TrackingMonitor/src/TrackAnalyzer.cc b/DQM/TrackingMonitor/src/TrackAnalyzer.cc index 89db0b299953c..847984e3af53f 100644 --- a/DQM/TrackingMonitor/src/TrackAnalyzer.cc +++ b/DQM/TrackingMonitor/src/TrackAnalyzer.cc @@ -1746,30 +1746,6 @@ void TrackAnalyzer::bookHistosForState(std::string sname, DQMStore::IBooker& ibo tkmes.TrackEtaPhiInvertedoutofphase->setAxisTitle("Track #eta", 1); tkmes.TrackEtaPhiInvertedoutofphase->setAxisTitle("Track #phi", 2); - histname = "TkEtaPhi_Ratio_byFoldingmap_" + histTag; - tkmes.TkEtaPhi_Ratio_byFoldingmap = - ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax); - tkmes.TkEtaPhi_Ratio_byFoldingmap->setAxisTitle("Track #eta", 1); - tkmes.TkEtaPhi_Ratio_byFoldingmap->setAxisTitle("Track #phi", 2); - - histname = "TkEtaPhi_Ratio_byFoldingmap_op_" + histTag; - tkmes.TkEtaPhi_Ratio_byFoldingmap_op = - ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax); - tkmes.TkEtaPhi_Ratio_byFoldingmap_op->setAxisTitle("Track #eta", 1); - tkmes.TkEtaPhi_Ratio_byFoldingmap_op->setAxisTitle("Track #phi", 2); - - histname = "TkEtaPhi_RelativeDifference_byFoldingmap_" + histTag; - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap = - ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax); - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap->setAxisTitle("Track #eta", 1); - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap->setAxisTitle("Track #phi", 2); - - histname = "TkEtaPhi_RelativeDifference_byFoldingmap_op_" + histTag; - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap_op = - ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax); - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap_op->setAxisTitle("Track #eta", 1); - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap_op->setAxisTitle("Track #phi", 2); - histname = "TrackQoverP_" + histTag; tkmes.TrackQoverP = ibooker.book1D(histname, histname, 10 * TrackQBin, TrackQMin, TrackQMax); tkmes.TrackQoverP->setAxisTitle("Track QoverP", 1); @@ -2026,38 +2002,8 @@ void TrackAnalyzer::fillHistosForState(const edm::EventSetup& iSetup, const reco if (Folder == "Tr") { tkmes.TrackEtaPhiInverted->Fill(eta, -1 * phi); - tkmes.TrackEtaPhiInvertedoutofphase->Fill(eta, 3.141592654 + -1 * phi); - tkmes.TrackEtaPhiInvertedoutofphase->Fill(eta, -1 * phi - 3.141592654); - tkmes.TkEtaPhi_Ratio_byFoldingmap->divide(tkmes.TrackEtaPhi, tkmes.TrackEtaPhiInverted, 1., 1., ""); - tkmes.TkEtaPhi_Ratio_byFoldingmap_op->divide(tkmes.TrackEtaPhi, tkmes.TrackEtaPhiInvertedoutofphase, 1., 1., ""); - - int nx = tkmes.TrackEtaPhi->getNbinsX(); - int ny = tkmes.TrackEtaPhi->getNbinsY(); - - //NOTE: for full reproducibility when using threads, this loop needs to be - // a critical section - for (int ii = 1; ii <= nx; ii++) { - for (int jj = 1; jj <= ny; jj++) { - double Sum1 = tkmes.TrackEtaPhi->getBinContent(ii, jj) + tkmes.TrackEtaPhiInverted->getBinContent(ii, jj); - double Sum2 = - tkmes.TrackEtaPhi->getBinContent(ii, jj) + tkmes.TrackEtaPhiInvertedoutofphase->getBinContent(ii, jj); - - double Sub1 = tkmes.TrackEtaPhi->getBinContent(ii, jj) - tkmes.TrackEtaPhiInverted->getBinContent(ii, jj); - double Sub2 = - tkmes.TrackEtaPhi->getBinContent(ii, jj) - tkmes.TrackEtaPhiInvertedoutofphase->getBinContent(ii, jj); - - if (Sum1 == 0 || Sum2 == 0) { - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap->setBinContent(ii, jj, 1); - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap_op->setBinContent(ii, jj, 1); - } else { - double ratio1 = Sub1 / Sum1; - double ratio2 = Sub2 / Sum2; - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap->setBinContent(ii, jj, ratio1); - tkmes.TkEtaPhi_RelativeDifference_byFoldingmap_op->setBinContent(ii, jj, ratio2); - } - } - } - + tkmes.TrackEtaPhiInvertedoutofphase->Fill(eta, M_PI - phi); + tkmes.TrackEtaPhiInvertedoutofphase->Fill(eta, -(phi + M_PI)); //pT histograms to create efficiency vs pT plot, only for the most inefficient region. if (eta < 0. && phi < -1.6) { diff --git a/DQM/TrackingMonitor/src/TrackBuildingAnalyzer.cc b/DQM/TrackingMonitor/src/TrackBuildingAnalyzer.cc index e04403778bbf3..96fa072d0e606 100644 --- a/DQM/TrackingMonitor/src/TrackBuildingAnalyzer.cc +++ b/DQM/TrackingMonitor/src/TrackBuildingAnalyzer.cc @@ -20,8 +20,6 @@ #include #include "TMath.h" -#include - TrackBuildingAnalyzer::TrackBuildingAnalyzer(const edm::ParameterSet& iConfig) : doAllPlots(iConfig.getParameter("doAllPlots")), doAllSeedPlots(iConfig.getParameter("doSeedParameterHistos")), diff --git a/DQM/TrackingMonitor/src/TrackEfficiencyClient.cc b/DQM/TrackingMonitor/src/TrackEfficiencyClient.cc index 8ce4e6df21169..952e0836a26e6 100644 --- a/DQM/TrackingMonitor/src/TrackEfficiencyClient.cc +++ b/DQM/TrackingMonitor/src/TrackEfficiencyClient.cc @@ -5,21 +5,9 @@ */ #include "FWCore/MessageLogger/interface/MessageLogger.h" - -#include "FWCore/Framework/interface/LuminosityBlock.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/ParameterSet/interface/FileInPath.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" - #include "DQM/TrackingMonitor/interface/TrackEfficiencyClient.h" -#include "DQMServices/Core/interface/DQMStore.h" - -#include -#include -#include -#include -#include -#include //----------------------------------------------------------------------------------- TrackEfficiencyClient::TrackEfficiencyClient(edm::ParameterSet const& iConfig) diff --git a/DQM/TrackingMonitor/src/TrackFoldedOccupancyClient.cc b/DQM/TrackingMonitor/src/TrackFoldedOccupancyClient.cc new file mode 100644 index 0000000000000..36b8298607318 --- /dev/null +++ b/DQM/TrackingMonitor/src/TrackFoldedOccupancyClient.cc @@ -0,0 +1,122 @@ +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" +#include "DQM/TrackingMonitor/interface/TrackFoldedOccupancyClient.h" +//----------------------------------------------------------------------------------- +TrackFoldedOccupancyClient::TrackFoldedOccupancyClient(edm::ParameterSet const& iConfig) +//----------------------------------------------------------------------------------- +{ + edm::LogInfo("TrackFoldedOccupancyClient") << "TrackFoldedOccupancyClient::Deleting TrackFoldedOccupancyClient "; + TopFolder_ = iConfig.getParameter("FolderName"); + quality_ = iConfig.getParameter("TrackQuality"); + algoName_ = iConfig.getParameter("AlgoName"); + state_ = iConfig.getParameter("MeasurementState"); + histTag_ = (state_ == "default") ? algoName_ : state_ + "_" + algoName_; + conf_ = iConfig; +} + +//----------------------------------------------------------------------------------- +TrackFoldedOccupancyClient::~TrackFoldedOccupancyClient() +//----------------------------------------------------------------------------------- +{ + edm::LogInfo("TrackFoldedOccupancyClient") << "TrackFoldedOccupancyClient::Deleting TrackFoldedOccupancyClient "; +} + +//----------------------------------------------------------------------------------- +void TrackFoldedOccupancyClient::beginJob(void) +//----------------------------------------------------------------------------------- +{ + edm::LogInfo("TrackFoldedOccupancyClient") << "TrackFoldedOccupancyClient::beginJob done"; +} + +//----------------------------------------------------------------------------------- +void TrackFoldedOccupancyClient::beginRun(edm::Run const& run, edm::EventSetup const& eSetup) +//----------------------------------------------------------------------------------- +{ + edm::LogInfo("TrackFoldedOccupancyClient") << "TrackFoldedOccupancyClient:: Begining of Run"; +} + +//----------------------------------------------------------------------------------- +void TrackFoldedOccupancyClient::bookMEs(DQMStore::IBooker& ibooker) +//----------------------------------------------------------------------------------- +{ + ibooker.setCurrentFolder(TopFolder_ + "/" + quality_ + "/GeneralProperties/"); + int Phi2DBin = conf_.getParameter("Phi2DBin"); + int Eta2DBin = conf_.getParameter("Eta2DBin"); + double EtaMin = conf_.getParameter("EtaMin"); + double EtaMax = conf_.getParameter("EtaMax"); + double PhiMin = conf_.getParameter("PhiMin"); + double PhiMax = conf_.getParameter("PhiMax"); + + // use the AlgoName and Quality Name + std::string histname = "TkEtaPhi_RelativeDifference_byFoldingmap_" + histTag_; + TkEtaPhi_RelativeDifference_byFoldingmap = + ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax); + TkEtaPhi_RelativeDifference_byFoldingmap->setAxisTitle("Track #eta", 1); + TkEtaPhi_RelativeDifference_byFoldingmap->setAxisTitle("Track #phi", 2); + + histname = "TkEtaPhi_RelativeDifference_byFoldingmap_op_" + histTag_; + TkEtaPhi_RelativeDifference_byFoldingmap_op = + ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax); + TkEtaPhi_RelativeDifference_byFoldingmap_op->setAxisTitle("Track #eta", 1); + TkEtaPhi_RelativeDifference_byFoldingmap_op->setAxisTitle("Track #phi", 2); + + histname = "TkEtaPhi_Ratio_byFoldingmap_" + histTag_; + TkEtaPhi_Ratio_byFoldingmap = ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax); + TkEtaPhi_Ratio_byFoldingmap->setAxisTitle("Track #eta", 1); + TkEtaPhi_Ratio_byFoldingmap->setAxisTitle("Track #phi", 2); + + histname = "TkEtaPhi_Ratio_byFoldingmap_op_" + histTag_; + TkEtaPhi_Ratio_byFoldingmap_op = + ibooker.book2D(histname, histname, Eta2DBin, EtaMin, EtaMax, Phi2DBin, PhiMin, PhiMax); + TkEtaPhi_Ratio_byFoldingmap_op->setAxisTitle("Track #eta", 1); + TkEtaPhi_Ratio_byFoldingmap_op->setAxisTitle("Track #phi", 2); +} + +//----------------------------------------------------------------------------------- +void TrackFoldedOccupancyClient::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) +//----------------------------------------------------------------------------------- +{ + edm::LogInfo("TrackFoldedOccupancyClient") << "TrackFoldedOccupancyClient::endLuminosityBlock"; + + bookMEs(ibooker); + std::string inFolder = TopFolder_ + "/" + quality_ + "/GeneralProperties/"; + + std::string hname; + hname = "TrackEtaPhi_"; + MonitorElement* TrackEtaPhi = igetter.get(inFolder + hname + histTag_); + + hname = "TrackEtaPhiInverted_"; + MonitorElement* TrackEtaPhiInverted = igetter.get(inFolder + hname + histTag_); + + hname = "TrackEtaPhiInvertedoutofphase_"; + MonitorElement* TrackEtaPhiInvertedoutofphase = igetter.get(inFolder + hname + histTag_); + + TkEtaPhi_Ratio_byFoldingmap->divide(TrackEtaPhi, TrackEtaPhiInverted, 1., 1., ""); + TkEtaPhi_Ratio_byFoldingmap_op->divide(TrackEtaPhi, TrackEtaPhiInvertedoutofphase, 1., 1., ""); + + int nx = TrackEtaPhi->getNbinsX(); + int ny = TrackEtaPhi->getNbinsY(); + + for (int ii = 1; ii <= nx; ii++) { + for (int jj = 1; jj <= ny; jj++) { + double Sum1 = TrackEtaPhi->getBinContent(ii, jj) + TrackEtaPhiInverted->getBinContent(ii, jj); + double Sum2 = TrackEtaPhi->getBinContent(ii, jj) + TrackEtaPhiInvertedoutofphase->getBinContent(ii, jj); + + double Sub1 = TrackEtaPhi->getBinContent(ii, jj) - TrackEtaPhiInverted->getBinContent(ii, jj); + double Sub2 = TrackEtaPhi->getBinContent(ii, jj) - TrackEtaPhiInvertedoutofphase->getBinContent(ii, jj); + + if (Sum1 == 0 || Sum2 == 0) { + TkEtaPhi_RelativeDifference_byFoldingmap->setBinContent(ii, jj, 1); + TkEtaPhi_RelativeDifference_byFoldingmap_op->setBinContent(ii, jj, 1); + } else { + double ratio1 = Sub1 / Sum1; + double ratio2 = Sub2 / Sum2; + TkEtaPhi_RelativeDifference_byFoldingmap->setBinContent(ii, jj, ratio1); + TkEtaPhi_RelativeDifference_byFoldingmap_op->setBinContent(ii, jj, ratio2); + } + } + } +} + +DEFINE_FWK_MODULE(TrackFoldedOccupancyClient); diff --git a/DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_Cosmic_cff.py b/DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_Cosmic_cff.py index f7f92f6cb89c3..be90120171783 100644 --- a/DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_Cosmic_cff.py +++ b/DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_Cosmic_cff.py @@ -59,6 +59,20 @@ TrackEffClient.FolderName = 'Tracking/TrackParameters/TrackEfficiency' TrackEffClient.AlgoName = 'CKFTk' +from DQM.TrackingMonitor.TrackFoldedOccupancyClient_cfi import TrackerMapFoldedClient + +TrackerMapFoldedClient_CKFTk=TrackerMapFoldedClient.clone( + AlgoName = cms.string('CKFTk'), + MeasurementState = cms.string('default'), + TrackQuality = cms.string('') +) + +TrackerMapFoldedClient_CosmicTk=TrackerMapFoldedClient.clone( + AlgoName = cms.string('CosmicTk'), + MeasurementState = cms.string('default'), + TrackQuality = cms.string('') +) + # Sequence -TrackingCosmicDQMClient = cms.Sequence(trackingQTester*trackingOfflineAnalyser*TrackEffClient) +TrackingCosmicDQMClient = cms.Sequence(trackingQTester*trackingOfflineAnalyser*TrackEffClient*TrackerMapFoldedClient_CKFTk*TrackerMapFoldedClient_CosmicTk) diff --git a/DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_cff.py b/DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_cff.py index 93d4038db9292..7b0291c3189c2 100644 --- a/DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_cff.py +++ b/DQM/TrackingMonitorClient/python/TrackingClientConfig_Tier0_cff.py @@ -89,6 +89,21 @@ TrackEffClient.FolderName = 'Tracking/TrackParameters/TrackEfficiency' TrackEffClient.AlgoName = 'CKFTk' -TrackingOfflineDQMClient = cms.Sequence(trackingQTester*trackingOfflineAnalyser*trackingEffFromHitPattern*voMonitoringClientSequence*primaryVertexResolutionClient*TrackEffClient) +from DQM.TrackingMonitor.TrackFoldedOccupancyClient_cfi import * -TrackingOfflineDQMClientZeroBias = cms.Sequence(trackingQTester*trackingOfflineAnalyser*trackingEffFromHitPatternZeroBias*voMonitoringClientSequence*primaryVertexResolutionClient*TrackEffClient) +TrackingOfflineDQMClient = cms.Sequence(trackingQTester*trackingOfflineAnalyser*trackingEffFromHitPattern*voMonitoringClientSequence*primaryVertexResolutionClient*TrackEffClient*foldedMapClientSeq) + +TrackingOfflineDQMClientZeroBias = cms.Sequence(trackingQTester*trackingOfflineAnalyser*trackingEffFromHitPatternZeroBias*voMonitoringClientSequence*primaryVertexResolutionClient*TrackEffClient*foldedMapClientSeq) + +# fastsim customs +_TrackingOfflineDQMClient_fastsim = TrackingOfflineDQMClient.copy() +_TrackingOfflineDQMClient_fastsim.remove(foldedMapClientSeq) + +_TrackingOfflineDQMClientZeroBias_fastsim = TrackingOfflineDQMClientZeroBias.copy() +_TrackingOfflineDQMClientZeroBias_fastsim.remove(foldedMapClientSeq) + +from Configuration.Eras.Modifier_fastSim_cff import fastSim +fastSim.toReplaceWith(TrackingOfflineDQMClient,_TrackingOfflineDQMClient_fastsim) + +from Configuration.Eras.Modifier_fastSim_cff import fastSim +fastSim.toReplaceWith(TrackingOfflineDQMClientZeroBias,_TrackingOfflineDQMClientZeroBias_fastsim) diff --git a/DQM/TrackingMonitorClient/python/TrackingDQMClientHeavyIons_cfi.py b/DQM/TrackingMonitorClient/python/TrackingDQMClientHeavyIons_cfi.py index 9796072bfdc39..0548381cbccc9 100644 --- a/DQM/TrackingMonitorClient/python/TrackingDQMClientHeavyIons_cfi.py +++ b/DQM/TrackingMonitorClient/python/TrackingDQMClientHeavyIons_cfi.py @@ -1,6 +1,14 @@ import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester -hiTrackingDqmClientHeavyIons = DQMEDHarvester("TrackingDQMClientHeavyIons", +hiTrackingDqmClientHI = DQMEDHarvester("TrackingDQMClientHeavyIons", FolderName = cms.string('Tracking/TrackParameters/GeneralProperties') ) + +from DQM.TrackingMonitor.TrackFoldedOccupancyClient_cfi import TrackerMapFoldedClient + +TrackerMapFoldedClient_heavyionTk=TrackerMapFoldedClient.clone( + AlgoName = cms.string('HeavyIonTk'), + TrackQuality = cms.string('') +) +hiTrackingDqmClientHeavyIons=cms.Sequence(hiTrackingDqmClientHI*TrackerMapFoldedClient_heavyionTk) diff --git a/DataFormats/HGCalReco/interface/Trackster.h b/DataFormats/HGCalReco/interface/Trackster.h index 40a80d35f7046..ece599d1c9926 100644 --- a/DataFormats/HGCalReco/interface/Trackster.h +++ b/DataFormats/HGCalReco/interface/Trackster.h @@ -114,7 +114,7 @@ namespace ticl { p = *(probs++); } } - inline void setIdProbability(ParticleType type, float value) { id_probabilities_[int(type)] = 1.f; } + inline void setIdProbability(ParticleType type, float value) { id_probabilities_[int(type)] = value; } inline const Trackster::IterationIndex ticlIteration() const { return (IterationIndex)iterationIndex_; } inline const std::vector &vertices() const { return vertices_; } diff --git a/FWCore/ParameterSet/python/Modules.py b/FWCore/ParameterSet/python/Modules.py index 3406889521de1..a1a03fe18c89d 100644 --- a/FWCore/ParameterSet/python/Modules.py +++ b/FWCore/ParameterSet/python/Modules.py @@ -700,7 +700,7 @@ def testSwithProducerWithAlias(self): foo = cms.VPSet(cms.PSet( type = cms.string('Foo2') )) -) + ) ) """) diff --git a/FWCore/ParameterSet/python/Types.py b/FWCore/ParameterSet/python/Types.py index 1ecf5ae15260b..3024376a009b4 100644 --- a/FWCore/ParameterSet/python/Types.py +++ b/FWCore/ParameterSet/python/Types.py @@ -1444,7 +1444,7 @@ def dumpPython(self, options=PrintOptions()): options.indent() resultList.append(options.indentation()+name+' = '+param.dumpPython(options)) options.unindent() - return '\n'.join(resultList)+'\n)' + return '\n'.join(resultList) + '\n' + options.indentation() + ')' # an EDAlias only references other modules by label, so it does not need their definition def directDependencies(self): diff --git a/GeneratorInterface/GenFilters/plugins/PythiaAllDauVFilter.cc b/GeneratorInterface/GenFilters/plugins/PythiaAllDauVFilter.cc new file mode 100644 index 0000000000000..d0eb9778881f5 --- /dev/null +++ b/GeneratorInterface/GenFilters/plugins/PythiaAllDauVFilter.cc @@ -0,0 +1,202 @@ +#include "PythiaAllDauVFilter.h" +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" +#include +#include +#include + +using namespace edm; +using namespace std; +using namespace Pythia8; + +PythiaAllDauVFilter::PythiaAllDauVFilter(const edm::ParameterSet& iConfig) + : fVerbose(iConfig.getUntrackedParameter("verbose", 0)), + token_(consumes( + // edm::InputTag(iConfig.getUntrackedParameter("moduleLabel", std::string("generator")), "unsmeared"))), + edm::InputTag(iConfig.getUntrackedParameter("moduleLabel", std::string("generator"))))), + particleID(iConfig.getUntrackedParameter("ParticleID", 0)), + motherID(iConfig.getUntrackedParameter("MotherID", 0)), + chargeconju(iConfig.getUntrackedParameter("ChargeConjugation", true)), + ndaughters(iConfig.getUntrackedParameter("NumberDaughters", 0)), + maxptcut(iConfig.getUntrackedParameter("MaxPt", 14000.)) { + //now do what ever initialization is needed + vector defdauID; + defdauID.push_back(0); + dauIDs = iConfig.getUntrackedParameter >("DaughterIDs", defdauID); + vector defminptcut; + defminptcut.push_back(0.); + minptcut = iConfig.getUntrackedParameter >("MinPt", defminptcut); + vector defminetacut; + defminetacut.push_back(-10.); + minetacut = iConfig.getUntrackedParameter >("MinEta", defminetacut); + vector defmaxetacut; + defmaxetacut.push_back(10.); + maxetacut = iConfig.getUntrackedParameter >("MaxEta", defmaxetacut); + + // create pythia8 instance to access particle data + edm::LogInfo("PythiaAllDauVFilter") << "Creating pythia8 instance for particle properties" << endl; + if (!fLookupGen.get()) + fLookupGen = std::make_unique(); + + if (chargeconju) { + antiParticleID = -particleID; + if (!(fLookupGen->particleData.isParticle(antiParticleID))) + antiParticleID = particleID; + + int antiId; + for (size_t i = 0; i < dauIDs.size(); i++) { + antiId = -dauIDs[i]; + if (!(fLookupGen->particleData.isParticle(antiId))) + antiId = dauIDs[i]; + + antiDauIDs.push_back(antiId); + } + } + + edm::LogInfo("PythiaAllDauVFilter") << "----------------------------------------------------------------------" + << endl; + edm::LogInfo("PythiaAllDauVFilter") << "--- PythiaAllDauVFilter" << endl; + for (unsigned int i = 0; i < dauIDs.size(); ++i) { + edm::LogInfo("PythiaAllDauVFilter") << "ID: " << dauIDs[i] << " pT > " << minptcut[i] << " " << minetacut[i] + << " eta < " << maxetacut[i] << endl; + } + if (chargeconju) + for (unsigned int i = 0; i < antiDauIDs.size(); ++i) { + edm::LogInfo("PythiaAllDauVFilter") << "ID: " << antiDauIDs[i] << " pT > " << minptcut[i] << " " << minetacut[i] + << " eta < " << maxetacut[i] << endl; + } + edm::LogInfo("PythiaAllDauVFilter") << "maxptcut = " << maxptcut << endl; + edm::LogInfo("PythiaAllDauVFilter") << "particleID = " << particleID << endl; + if (chargeconju) + edm::LogInfo("PythiaAllDauVFilter") << "antiParticleID = " << antiParticleID << endl; + + edm::LogInfo("PythiaAllDauVFilter") << "motherID = " << motherID << endl; +} + +PythiaAllDauVFilter::~PythiaAllDauVFilter() { + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) +} + +// +// member functions +// + +// ------------ method called to produce the data ------------ +bool PythiaAllDauVFilter::filter(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const { + using namespace edm; + bool accepted = false; + Handle evt; + iEvent.getByToken(token_, evt); + + int OK(1); + vector vparticles; + vector foundDaughter(dauIDs.size(), false); + auto dauCollection = &dauIDs; + + HepMC::GenEvent* myGenEvent = new HepMC::GenEvent(*(evt->GetEvent())); + + if (fVerbose > 5) { + edm::LogInfo("PythiaAllDauVFilter") << "looking for " << particleID << endl; + } + + for (HepMC::GenEvent::particle_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end(); ++p) { + if ((*p)->pdg_id() == particleID) { + dauCollection = &(dauIDs); + } else if (chargeconju and ((*p)->pdg_id() == antiParticleID)) { + dauCollection = &(antiDauIDs); + } else { + continue; + } + + // -- Check for mother of this particle + if (0 != motherID) { + OK = 0; + for (HepMC::GenVertex::particles_in_const_iterator des = (*p)->production_vertex()->particles_in_const_begin(); + des != (*p)->production_vertex()->particles_in_const_end(); + ++des) { + if (fVerbose > 10) { + edm::LogInfo("PythiaAllDauVFilter") << "mother: " << (*des)->pdg_id() << " pT: " << (*des)->momentum().perp() + << " eta: " << (*des)->momentum().eta() << endl; + } + if (abs(motherID) == abs((*des)->pdg_id())) { + OK = 1; + break; + } + } + } + if (0 == OK) + continue; + + // -- check for daugthers + int ndau = 0; + for (unsigned int i = 0; i < foundDaughter.size(); ++i) { + foundDaughter[i] = false; + } + if (fVerbose > 5) { + edm::LogInfo("PythiaAllDauVFilter") << "found ID: " << (*p)->pdg_id() << " pT: " << (*p)->momentum().perp() + << " eta: " << (*p)->momentum().eta() << endl; + } + if ((*p)->end_vertex()) { + for (HepMC::GenVertex::particle_iterator des = (*p)->end_vertex()->particles_begin(HepMC::children); + des != (*p)->end_vertex()->particles_end(HepMC::children); + ++des) { + ++ndau; + if (fVerbose > 5) { + edm::LogInfo("PythiaAllDauVFilter") + << "\t daughter : ID: " << (*des)->pdg_id() << " pT: " << (*des)->momentum().perp() + << " eta: " << (*des)->momentum().eta() << endl; + } + for (unsigned int i = 0; i < dauCollection->size(); ++i) { + if ((*des)->pdg_id() != dauCollection->at(i)) + continue; + + // possible to have more than one daughter of same pdgID and same/different kinematic constraints + if (foundDaughter[i]) + continue; + + if (fVerbose > 5) { + edm::LogInfo("PythiaAllDauVFilter") + << "\t\t checking cuts of , daughter i = " << i << " pT = " << (*des)->momentum().perp() + << " eta = " << (*des)->momentum().eta() << endl; + } + if ((*des)->momentum().perp() > minptcut[i] && (*des)->momentum().perp() < maxptcut && + (*des)->momentum().eta() > minetacut[i] && (*des)->momentum().eta() < maxetacut[i]) { + foundDaughter[i] = true; + vparticles.push_back((*des)->pdg_id()); + if (fVerbose > 2) { + edm::LogInfo("PythiaAllDauVFilter") + << "\t accepted this particle " << (*des)->pdg_id() << " pT = " << (*des)->momentum().perp() + << " eta = " << (*des)->momentum().eta() << endl; + } + break; + } + } + } + } + + // -- ( number of daughtrs == daughters passing cut ) and ( all daughters specified are found) + if (ndau == ndaughters) { + accepted = true; + for (unsigned int i = 0; i < foundDaughter.size(); ++i) { + if (!foundDaughter[i]) { + accepted = false; + } + } + if (accepted and (fVerbose > 0)) { + edm::LogInfo("PythiaAllDauVFilter") << " accepted this decay from " << (*p)->pdg_id(); + for (unsigned int iv = 0; iv < vparticles.size(); ++iv) + edm::LogInfo("PythiaAllDauVFilter") << vparticles[iv] << " "; + edm::LogInfo("PythiaAllDauVFilter") << " from mother = " << motherID << endl; + } + } + + if (accepted) + break; + } + + delete myGenEvent; + return accepted; +} + +//define this as a plug-in +DEFINE_FWK_MODULE(PythiaAllDauVFilter); diff --git a/GeneratorInterface/GenFilters/plugins/PythiaAllDauVFilter.h b/GeneratorInterface/GenFilters/plugins/PythiaAllDauVFilter.h new file mode 100644 index 0000000000000..1e7fd9444296c --- /dev/null +++ b/GeneratorInterface/GenFilters/plugins/PythiaAllDauVFilter.h @@ -0,0 +1,67 @@ +#ifndef PYTHIAALLDAUVFILTER_h +#define PYTHIAALLDAUVFILTER_h +// -*- C++ -*- +// +// Package: PythiaAllDauVFilter +// Class: PythiaAllDauVFilter +// +/**\class PythiaAllDauVFilter PythiaAllDauVFilter.cc + + Description: Filter events using MotherId and ChildrenIds infos + Accepts if event has a specified Mother with only specified daughters and all of the daughters complies to respective pT and eta Cuts + + Implementation: + +*/ +// +// Original Author: Daniele Pedrini, PythiaDauVFilter +// Aravind T S , Updated and Modified to PythiaAllDauVFilter +// Created: Apr 29 2008 +// Apr 12 2021 +// +// + +// system include files +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/global/EDFilter.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "Pythia8/Pythia.h" + +// +// class decleration +// +namespace edm { + class HepMCProduct; +} + +class PythiaAllDauVFilter : public edm::global::EDFilter<> { +public: + explicit PythiaAllDauVFilter(const edm::ParameterSet&); + ~PythiaAllDauVFilter() override; + + bool filter(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + +private: + const int fVerbose; + const edm::EDGetTokenT token_; + std::vector dauIDs, antiDauIDs; + const int particleID; + int antiParticleID; + const int motherID; + const bool chargeconju; + const int ndaughters; + std::vector minptcut; + const double maxptcut; + std::vector minetacut; + std::vector maxetacut; + std::unique_ptr fLookupGen; // this instance is for accessing particleData information +}; +#endif diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml index 7383a3624be66..cc2bab4bb54cc 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml @@ -313,8 +313,8 @@ - - + + diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatMinus05Percent.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatMinus05Percent.xml index 77d3a164567c9..bb2e45e4b3e34 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatMinus05Percent.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatMinus05Percent.xml @@ -313,8 +313,8 @@ - - + + diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatMinus10Percent.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatMinus10Percent.xml index bb63c87750d58..20496701f30d4 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatMinus10Percent.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatMinus10Percent.xml @@ -313,8 +313,8 @@ - - + + diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatPlus05Percent.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatPlus05Percent.xml index 0794983273b4f..6ae8d93134488 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatPlus05Percent.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatPlus05Percent.xml @@ -313,8 +313,8 @@ - - + + diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatPlus10Percent.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatPlus10Percent.xml index 8c78e2403185f..0ca6cfb407a5e 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatPlus10Percent.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021FlatPlus10Percent.xml @@ -313,8 +313,8 @@ - - + + diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021ZeroMaterial.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021ZeroMaterial.xml index f5768dae68a03..3d04e0f92ac0e 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021ZeroMaterial.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021ZeroMaterial.xml @@ -313,8 +313,8 @@ - - + + diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D80.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D80.xml index 191e51ba964e0..2ec682be52ca5 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D80.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D80.xml @@ -38,7 +38,6 @@ - diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D81.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D81.xml index 3ba8b48d3dc20..f31ed51b57523 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D81.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D81.xml @@ -38,7 +38,6 @@ - diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D83.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D83.xml new file mode 100644 index 0000000000000..38fec4ef11f0f --- /dev/null +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2026D83.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatMinus05PercentXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatMinus05PercentXML_cfi.py index e98a90189f51d..92eb58fd716a2 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatMinus05PercentXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatMinus05PercentXML_cfi.py @@ -316,8 +316,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v1/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v1/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v1/CTPPS_210_Right_Station.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatMinus10PercentXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatMinus10PercentXML_cfi.py index 5598c87635f72..58ff186d3fc77 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatMinus10PercentXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatMinus10PercentXML_cfi.py @@ -316,8 +316,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v1/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v1/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v1/CTPPS_210_Right_Station.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatPlus05PercentXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatPlus05PercentXML_cfi.py index 6d027dcf9914e..05b78d14a696f 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatPlus05PercentXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatPlus05PercentXML_cfi.py @@ -316,8 +316,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v1/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v1/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v1/CTPPS_210_Right_Station.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatPlus10PercentXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatPlus10PercentXML_cfi.py index 36144c08c64c9..01dc96413933c 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatPlus10PercentXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021FlatPlus10PercentXML_cfi.py @@ -316,8 +316,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v1/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v1/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v1/CTPPS_210_Right_Station.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021XML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021XML_cfi.py index 62b4b1b698f92..debfe8726e570 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021XML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021XML_cfi.py @@ -316,8 +316,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v1/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v1/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v1/CTPPS_210_Right_Station.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021ZeroMaterialXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021ZeroMaterialXML_cfi.py index a22d4f0b820d9..9c467908aae19 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2021ZeroMaterialXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2021ZeroMaterialXML_cfi.py @@ -316,8 +316,8 @@ '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/RP_Vertical_Device/2021/v1/RP_Vertical_Device.xml', + 'Geometry/VeryForwardData/data/RP_Horizontal_Device/2021/v1/RP_Horizontal_Device.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Right_Station/v1/CTPPS_220_Right_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_220_Left_Station/v1/CTPPS_220_Left_Station.xml', 'Geometry/VeryForwardData/data/CTPPS_2018/CTPPS_210_Right_Station/v1/CTPPS_210_Right_Station.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D80XML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D80XML_cfi.py index 3c62f3b439999..079537091a988 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D80XML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D80XML_cfi.py @@ -39,7 +39,6 @@ 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackersens.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/pixelsens.xml', 'Geometry/TrackerRecoData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/trackerRecoMaterial.xml', - 'SimTracker/TrackerMaterialAnalysis/data/trackingMaterialGroups_ForPhaseII/v1/trackingMaterialGroups_ForPhaseII.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackerProdCuts.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/pixelProdCuts.xml', 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D81XML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D81XML_cfi.py index e54f9bf2cb626..f9d33dcd1d272 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D81XML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D81XML_cfi.py @@ -39,7 +39,6 @@ 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackersens.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/pixelsens.xml', 'Geometry/TrackerRecoData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/trackerRecoMaterial.xml', - 'SimTracker/TrackerMaterialAnalysis/data/trackingMaterialGroups_ForPhaseII/v1/trackingMaterialGroups_ForPhaseII.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackerProdCuts.xml', 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_IT702_2021_03/pixelProdCuts.xml', 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D83XML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D83XML_cfi.py new file mode 100644 index 0000000000000..ad14785a5293f --- /dev/null +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2026D83XML_cfi.py @@ -0,0 +1,130 @@ +import FWCore.ParameterSet.Config as cms + +# This config was generated automatically using generate2026Geometry.py +# If you notice a mistake, please update the generating script, not just this config + +XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = cms.vstring( + 'Geometry/CMSCommonData/data/materials/2021/v1/materials.xml', + 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/extend/v2/cmsextent.xml', + 'Geometry/CMSCommonData/data/cavernData/2021/v1/cavernData.xml', + 'Geometry/CMSCommonData/data/cms/2026/v5/cms.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/eta3/etaMax.xml', + 'Geometry/CMSCommonData/data/cmsTracker.xml', + 'Geometry/CMSCommonData/data/caloBase/2026/v5/caloBase.xml', + 'Geometry/CMSCommonData/data/cmsCalo.xml', + 'Geometry/CMSCommonData/data/muonBase/2026/v5/muonBase.xml', + 'Geometry/CMSCommonData/data/cmsMuon.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/CMSCommonData/data/beampipe/2026/v3/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam/2026/v1/cmsBeam.xml', + 'Geometry/CMSCommonData/data/muonMB.xml', + 'Geometry/CMSCommonData/data/muonMagnet.xml', + 'Geometry/CMSCommonData/data/cavern/2021/v1/cavern.xml', + 'Geometry/CMSCommonData/data/cavernFloor/2017/v1/cavernFloor.xml', + 'Geometry/TrackerCommonData/data/PhaseII/trackerParameters.xml', + 'Geometry/TrackerCommonData/data/pixfwdCommon.xml', + 'Geometry/TrackerCommonData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/pixfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseII/OuterTracker616_2020_04/pixbar.xml', + 'Geometry/TrackerCommonData/data/trackermaterial.xml', + 'Geometry/TrackerCommonData/data/PhaseII/OuterTracker616_2020_04/otst.xml', + 'Geometry/TrackerCommonData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/tracker.xml', + 'Geometry/TrackerCommonData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/pixel.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/trackerbar.xml', + 'Geometry/TrackerCommonData/data/PhaseII/TiltedTracker404/trackerfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackerStructureTopology.xml', + 'Geometry/TrackerCommonData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/pixelStructureTopology.xml', + 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackersens.xml', + 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/pixelsens.xml', + 'Geometry/TrackerRecoData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackerRecoMaterial.xml', + 'SimTracker/TrackerMaterialAnalysis/data/trackingMaterialGroups_ForPhaseII/v1/trackingMaterialGroups_ForPhaseII.xml', + 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/trackerProdCuts.xml', + 'Geometry/TrackerSimData/data/PhaseII/Tracker_DD4hep_compatible_2021_02/pixelProdCuts.xml', + 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', + 'Geometry/EcalCommonData/data/eregalgo/2026/v2/eregalgo.xml', + 'Geometry/EcalCommonData/data/ectkcable/2026/v1/ectkcable.xml', + 'Geometry/EcalCommonData/data/ectkcablemat/2026/v1/ectkcablemat.xml', + 'Geometry/EcalCommonData/data/ebalgo.xml', + 'Geometry/EcalCommonData/data/ebcon.xml', + 'Geometry/EcalCommonData/data/ebrot.xml', + 'Geometry/HcalCommonData/data/hcalrotations.xml', + 'Geometry/HcalCommonData/data/hcal/v2/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', + 'Geometry/HcalCommonData/data/hcalcablealgo/v2/hcalcablealgo.xml', + 'Geometry/HcalCommonData/data/hcalouteralgo.xml', + 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', + 'Geometry/HcalCommonData/data/hcalSimNumbering/NoHE/hcalSimNumbering.xml', + 'Geometry/HcalCommonData/data/hcalRecNumbering/NoHE/hcalRecNumbering.xml', + 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', + 'Geometry/HGCalCommonData/data/hgcalMaterial/v1/hgcalMaterial.xml', + 'Geometry/HGCalCommonData/data/hgcal/v15/hgcal.xml', + 'Geometry/HGCalCommonData/data/hgcalcell/v15/hgcalcell.xml', + 'Geometry/HGCalCommonData/data/hgcalwafer/v15/hgcalwafer.xml', + 'Geometry/HGCalCommonData/data/hgcalEE/v15/hgcalEE.xml', + 'Geometry/HGCalCommonData/data/hgcalHEsil/v15/hgcalHEsil.xml', + 'Geometry/HGCalCommonData/data/hgcalHEmix/v15/hgcalHEmix.xml', + 'Geometry/HGCalCommonData/data/hgcalCons/v15/hgcalCons.xml', + 'Geometry/HGCalCommonData/data/hgcalConsData/v15/hgcalConsData.xml', + 'Geometry/MuonCommonData/data/mbCommon/2021/v1/mbCommon.xml', + 'Geometry/MuonCommonData/data/mb1/2015/v2/mb1.xml', + 'Geometry/MuonCommonData/data/mb2/2015/v2/mb2.xml', + 'Geometry/MuonCommonData/data/mb3/2015/v2/mb3.xml', + 'Geometry/MuonCommonData/data/mb4/2015/v2/mb4.xml', + 'Geometry/MuonCommonData/data/mb4Shield/2021/v1/mb4Shield.xml', + 'Geometry/MuonCommonData/data/muonYoke/2026/v1/muonYoke.xml', + 'Geometry/MuonCommonData/data/mf/2026/v7/mf.xml', + 'Geometry/MuonCommonData/data/csc/2021/v2/csc.xml', + 'Geometry/MuonCommonData/data/rpcf/2026/v3/rpcf.xml', + 'Geometry/MuonCommonData/data/gemf/TDR_BaseLine/gemf.xml', + 'Geometry/MuonCommonData/data/gem11/TDR_BaseLine/gem11.xml', + 'Geometry/MuonCommonData/data/gem21/TDR_Eta16/gem21.xml', + 'Geometry/MuonCommonData/data/mfshield/2026/v5/mfshield.xml', + 'Geometry/MuonCommonData/data/ge0/TDR_Dev/v3/ge0.xml', + 'Geometry/ForwardCommonData/data/forwardshield/2026/v4/forwardshield.xml', + 'Geometry/ForwardCommonData/data/brmrotations.xml', + 'Geometry/ForwardCommonData/data/brm/2026/v1/brm.xml', + 'Geometry/ForwardCommonData/data/zdcmaterials.xml', + 'Geometry/ForwardCommonData/data/lumimaterials.xml', + 'Geometry/ForwardCommonData/data/zdcrotations.xml', + 'Geometry/ForwardCommonData/data/lumirotations.xml', + 'Geometry/ForwardCommonData/data/zdc.xml', + 'Geometry/ForwardCommonData/data/zdclumi.xml', + 'Geometry/ForwardCommonData/data/cmszdc.xml', + 'Geometry/MTDCommonData/data/mtdMaterial/v2/mtdMaterial.xml', + 'Geometry/MTDCommonData/data/btl/v1/btl.xml', + 'Geometry/MTDCommonData/data/etl/v5/etl.xml', + 'Geometry/MTDCommonData/data/mtdParameters/v3/mtdStructureTopology.xml', + 'Geometry/MTDCommonData/data/mtdParameters/v2/mtdParameters.xml', + )+ + cms.vstring( + 'Geometry/MuonCommonData/data/muonNumbering/TDR_DeV/v3/muonNumbering.xml', + 'Geometry/EcalSimData/data/PhaseII/ecalsens.xml', + 'Geometry/HcalCommonData/data/hcalsens/NoHE/hcalsenspmf.xml', + 'Geometry/HcalSimData/data/hf.xml', + 'Geometry/HcalSimData/data/hfpmt.xml', + 'Geometry/HcalSimData/data/hffibrebundle.xml', + 'Geometry/HcalSimData/data/CaloUtil/2026/v2c/CaloUtil.xml', + 'Geometry/HGCalSimData/data/hgcsensv15.xml', + 'Geometry/MuonSimData/data/PhaseII/v2/muonSens.xml', + 'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', + 'Geometry/RPCGeometryBuilder/data/2026/v1/RPCSpecs.xml', + 'Geometry/GEMGeometryBuilder/data/v12/GEMSpecsFilter.xml', + 'Geometry/GEMGeometryBuilder/data/v12/GEMSpecs.xml', + 'Geometry/ForwardCommonData/data/brmsens.xml', + 'Geometry/ForwardSimData/data/zdcsens.xml', + 'Geometry/MTDSimData/data/v2/mtdsens.xml', + 'Geometry/HcalSimData/data/HcalProdCuts/2021/v1/HcalProdCuts.xml', + 'Geometry/EcalSimData/data/EcalProdCuts.xml', + 'Geometry/HGCalSimData/data/hgcProdCutsv15.xml', + 'Geometry/MuonSimData/data/PhaseII/muonProdCuts.xml', + 'Geometry/ForwardSimData/data/zdcProdCuts.xml', + 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', + 'Geometry/MTDSimData/data/v2/mtdProdCuts.xml', + 'Geometry/CMSCommonData/data/FieldParameters.xml', + ), + rootNodeName = cms.string('cms:OCMS') +) diff --git a/Geometry/EcalCommonData/interface/EcalBarrelNumberingScheme.h b/Geometry/EcalCommonData/interface/EcalBarrelNumberingScheme.h index 5e55a5bbcfd8f..c600cb5c29978 100644 --- a/Geometry/EcalCommonData/interface/EcalBarrelNumberingScheme.h +++ b/Geometry/EcalCommonData/interface/EcalBarrelNumberingScheme.h @@ -6,12 +6,16 @@ #define EcalBarrelNumberingScheme_h #include "Geometry/EcalCommonData/interface/EcalNumberingScheme.h" +#include class EcalBarrelNumberingScheme : public EcalNumberingScheme { public: EcalBarrelNumberingScheme(); ~EcalBarrelNumberingScheme() override; uint32_t getUnitID(const EcalBaseNumber& baseNumber) const override; + +private: + std::pair numbers(const std::string&) const; }; #endif diff --git a/Geometry/EcalCommonData/plugins/dd4hep/DDEcalBarrelNewAlgo.cc b/Geometry/EcalCommonData/plugins/dd4hep/DDEcalBarrelNewAlgo.cc index 636a7357a2a0d..321673184ae79 100644 --- a/Geometry/EcalCommonData/plugins/dd4hep/DDEcalBarrelNewAlgo.cc +++ b/Geometry/EcalCommonData/plugins/dd4hep/DDEcalBarrelNewAlgo.cc @@ -920,7 +920,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext // Supermodule parent------------------------------------------------------------ const string spmcut1ddname((0 != spm.cutShow) ? spm.name : (spm.name + "CUT1")); - Solid ddspm = Polycone(spmcut1ddname, spm.lowPhi, spm.delPhi, spm.vecRMin, spm.vecRMax, spm.vecZPts); + #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << spmcut1ddname << " PolyCone from " << convertRadToDeg(spm.lowPhi) << " to " << convertRadToDeg(spm.lowPhi + spm.delPhi) << " with " << spm.vecZPts.size() @@ -936,13 +936,6 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext array cutBoxParms{{1.05 * (spm.vecRMax[indx] - spm.vecRMin[indx]) * 0.5, 0.5 * spm.cutThick, fabs(spm.vecZPts.back() - spm.vecZPts.front()) * 0.5 + 1.0 * dd4hep::mm}}; - Solid spmCutBox = Box(spm.cutName, cutBoxParms[0], cutBoxParms[1], cutBoxParms[2]); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << spm.cutName << " Box " << cms::convert2mm(cutBoxParms[0]) << ":" - << cms::convert2mm(cutBoxParms[1]) << ":" << cms::convert2mm(cutBoxParms[2]); - -#endif - Volume spmCutLog = Volume(spm.cutName, spmCutBox, ns.material(spm.mat)); // Supermodule side platess array sideParms{{0.5 * spm.sideHigh, 0.5 * spm.sideThick, 0.5 * fabs(spm.vecZPts[1] - spm.vecZPts[0])}}; @@ -953,12 +946,8 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext #endif Volume sideLog = Volume(spm.sideName, sideSolid, ns.material(spm.sideMat)); - Solid temp1; - Solid temp2; Position sideddtra1; Position sideddtra2; - Transform3D alltrot1; - Transform3D alltrot2; for (unsigned int icopy(1); icopy <= 2; ++icopy) { const std::vector& tvec(1 == icopy ? spm.vecCutTM : spm.vecCutTP); double rang(1 == icopy ? spm.cutRM : spm.cutRP); @@ -969,26 +958,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext RotationZ ro1(ang); const Position tr1( 0.5 * (spm.vecRMax[indx] + spm.vecRMin[indx]), 0, 0.5 * (spm.vecZPts.front() + spm.vecZPts.back())); - Transform3D alltrot(Transform3D(Transform3D(ro1 * tr1) * tr) * ro); - if (1 == icopy) { - alltrot1 = alltrot; - temp1 = SubtractionSolid(spm.name + "_T1", ddspm, spmCutBox, alltrot); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << (spm.name + "_T1") << " Subtraction " << ddspm.name() << ":" << spmCutBox.name() - << " at (" << cms::convert2mm(alltrot.Translation().Vect().x()) << "," - << cms::convert2mm(alltrot.Translation().Vect().y()) << "," - << cms::convert2mm(alltrot.Translation().Vect().z()) << ")"; -#endif - } else { - alltrot2 = alltrot; - temp2 = SubtractionSolid(spm.name, temp1, spmCutBox, alltrot); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << spm.name << " Subtraction " << temp1.name() << ":" << spmCutBox.name() << " at (" - << cms::convert2mm(alltrot.Translation().Vect().x()) << "," - << cms::convert2mm(alltrot.Translation().Vect().y()) << "," - << cms::convert2mm(alltrot.Translation().Vect().z()) << ")"; -#endif - } + const Tl3D trSide(tvec[0], tvec[1] + (1 == icopy ? 1. : -1.) * (cutBoxParms[1] + sideParms[1]) + (1 == icopy ? spm.sideYOffM : spm.sideYOffP), @@ -1002,32 +972,19 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const Position sideddtra(sideRot.getTranslation()); 1 == icopy ? sideddtra1 = sideddtra : sideddtra2 = sideddtra; } - Volume spmLog = Volume(spm.name, ((0 != spm.cutShow) ? ddspm : temp2), ns.material(spm.mat)); - if (0 != spm.cutShow) { - spmLog.placeVolume(spmCutLog, 1, alltrot1); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << spmCutLog.name() << ":1 positioned in " << spmLog.name() << " at (" - << cms::convert2mm(alltrot1.Translation().Vect().x()) << "," - << cms::convert2mm(alltrot1.Translation().Vect().y()) << "," - << cms::convert2mm(alltrot1.Translation().Vect().z()) << ") with rotation"; -#endif - spmLog.placeVolume(spmCutLog, 1, alltrot2); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << spmCutLog.name() << ":1 positioned in " << spmLog.name() << " at (" - << cms::convert2mm(alltrot2.Translation().Vect().x()) << "," - << cms::convert2mm(alltrot2.Translation().Vect().y()) << "," - << cms::convert2mm(alltrot2.Translation().Vect().z()) << ") with rotation"; -#endif - } - spmLog.placeVolume(sideLog, 1, Transform3D(ns.rotation(spm.sideName + std::to_string(1)), sideddtra1)); + + ns.addAssembly(spm.name); + ns.assembly(spm.name).placeVolume( + sideLog, 1, Transform3D(ns.rotation(spm.sideName + std::to_string(1)), sideddtra1)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << sideLog.name() << ":1 positioned in " << spmLog.name() << " at (" + edm::LogVerbatim("EBGeomX") << sideLog.name() << ":1 positioned in " << spm.name << " at (" << cms::convert2mm(sideddtra1.x()) << "," << cms::convert2mm(sideddtra1.y()) << "," << cms::convert2mm(sideddtra1.z()) << ") with rotation"; #endif - spmLog.placeVolume(sideLog, 2, Transform3D(ns.rotation(spm.sideName + std::to_string(2)), sideddtra2)); + ns.assembly(spm.name).placeVolume( + sideLog, 2, Transform3D(ns.rotation(spm.sideName + std::to_string(2)), sideddtra2)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << sideLog.name() << ":2 positioned in " << spmLog.name() << " at (" + edm::LogVerbatim("EBGeomX") << sideLog.name() << ":2 positioned in " << ns.assembly(spm.name).name() << " at (" << cms::convert2mm(sideddtra2.x()) << "," << cms::convert2mm(sideddtra2.y()) << "," << cms::convert2mm(sideddtra2.z()) << ") with rotation"; #endif @@ -1060,11 +1017,12 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext if (spm.vecHere[iphi] != 0) { // convert from CLHEP to Position & etc. Position myTran(both.getTranslation().x(), both.getTranslation().y(), both.getTranslation().z()); - barVolume.placeVolume(spmLog, iphi + 1, Transform3D(rota, myTran)); + barVolume.placeVolume(ns.assembly(spm.name), iphi + 1, Transform3D(rota, myTran)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << spmLog.name() << ":" << (iphi + 1) << " positioned in " << barVolume.name() - << " at (" << cms::convert2mm(myTran.x()) << "," << cms::convert2mm(myTran.y()) - << "," << cms::convert2mm(myTran.z()) << ") with rotation"; + edm::LogVerbatim("EBGeomX") << ns.assembly(spm.name).name() << ":" << (iphi + 1) << " positioned in " + << barVolume.name() << " at (" << cms::convert2mm(myTran.x()) << "," + << cms::convert2mm(myTran.y()) << "," << cms::convert2mm(myTran.z()) + << ") with rotation"; #endif } } @@ -1089,10 +1047,10 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext << convertRadToDeg(ily.phiLow) << ":" << convertRadToDeg(ily.delPhi); #endif Volume ilyLog = Volume(ily.name, ilySolid, ns.material(spm.mat)); - spmLog.placeVolume(ilyLog, copyOne, Position(0, 0, ilyLengthHalf)); + ns.assembly(spm.name).placeVolume(ilyLog, copyOne, Position(0, 0, ilyLengthHalf)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << ilyLog.name() << ":" << copyOne << " positioned in " << spmLog.name() << " at (0,0," - << cms::convert2mm(ilyLengthHalf) << ") with no rotation"; + edm::LogVerbatim("EBGeomX") << ilyLog.name() << ":" << copyOne << " positioned in " << ns.assembly(spm.name).name() + << " at (0,0," << cms::convert2mm(ilyLengthHalf) << ") with no rotation"; #endif Volume ilyPipeLog[200]; if (0 != ily.pipeHere) { @@ -1103,8 +1061,8 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext 0, // rmin ily.pipeODHalf, // rmax ily.vecIlyPipeLengthHalf[iPipeType], // dz - 0_deg, // startPhi - 360_deg); // startPhi + deltaPhi + 0._deg, // startPhi + 360._deg); // startPhi + deltaPhi #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << pName << " Tubs " << cms::convert2mm(ily.vecIlyPipeLengthHalf[iPipeType]) << ":0:" << cms::convert2mm(ily.pipeODHalf) << ":0:360"; @@ -1116,8 +1074,8 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext 0, // rmin 0.5 * ily.pipeID, // rmax ily.vecIlyPipeLengthHalf[iPipeType], // dz - 0_deg, // startPhi - 360_deg); // startPhi + deltaPhi + 0._deg, // startPhi + 360._deg); // startPhi + deltaPhi #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << pWaName << " Tubs " << cms::convert2mm(ily.vecIlyPipeLengthHalf[iPipeType]) << ":0:" << cms::convert2mm(0.5 * ily.pipeID) << ":0:360"; @@ -1233,7 +1191,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext ++fanOutCopy; xilyLog.placeVolume(ilyFanOutLog, fanOutCopy, - Transform3D(RotationZ(phi) * RotationY(180_deg), + Transform3D(RotationZ(phi) * RotationY(180._deg), Position(xx, yy, ily.vecIlyFanOutZ[ilyFO] - ilyLengthHalf))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") @@ -1284,7 +1242,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext xilyLog.placeVolume( ilyPipeLog[type], copyNum[type], - Transform3D(Rotation3D(ROOT::Math::AxisAngle(ROOT::Math::AxisAngle::XYZVector(xx, yy, 0), 90_deg)), + Transform3D(Rotation3D(ROOT::Math::AxisAngle(ROOT::Math::AxisAngle::XYZVector(xx, yy, 0), 90._deg)), Position(xx, yy, zz))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << ilyPipeLog[type].name() << ":" << copyNum[type] << " positioned in " @@ -1318,9 +1276,9 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext << cms::convert2mm(cro[k]); #endif Volume clyrLog = Volume(clyrName, clyrSolid, ns.material(ily.vecIlyMat[4])); - spmLog.placeVolume(clyrLog, copyOne); + ns.assembly(spm.name).placeVolume(clyrLog, copyOne); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << clyrLog.name() << ":" << copyOne << " positioned in " << spmLog.name() + edm::LogVerbatim("EBGeomX") << clyrLog.name() << ":" << copyOne << " positioned in " << ns.assembly(spm.name).name() << " at (0,0,0) with no rotation"; #endif // Begin Alveolar Wedge parent ------------------------------------------------------ @@ -1356,13 +1314,12 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext 0.5 * H_hawR, //double aHalfLengthYNegZ , // h1, H/2 0.5 * h_hawR, //double aHalfLengthYPosZ , // h2, h/2 0.5 * L_hawR, //double aHalfLengthZ , // dz, L/2 - 90_deg, //double aAngleAD , // alfa1 + 90._deg, //double aAngleAD , // alfa1 0, //double aCoord15X , // x15 0 //double aCoord15Y // y15 ); string hawRName1(alvWedge.hawRName + "1"); - Solid hawRSolid1 = mytrap(hawRName1, trapHAWR); const double al1_fawR(atan((B_hawR - a_hawR) / H_hawR) + M_PI_2); @@ -1389,7 +1346,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext // HAW cut box to cut off back end of wedge const string hawCutName(alvWedge.hawRName + "CUTBOX"); array hawBoxParms{{0.5 * b_hawR + hawBoxClr, 0.5 * alvWedge.hawRCutY, 0.5 * alvWedge.hawRCutZ}}; - Solid hawCutBox = Box(hawCutName, hawBoxParms[0], hawBoxParms[1], hawBoxParms[2]); + #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << hawCutName << " Box " << cms::convert2mm(hawBoxParms[0]) << ":" << cms::convert2mm(hawBoxParms[1]) << ":" << cms::convert2mm(hawBoxParms[2]); @@ -1409,19 +1366,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext vHAW[1] + Pt3D(-hawBoxClr, -alvWedge.hawRCutDelY, 0), Pt3D(vHAW[0].x() - hawBoxClr, vHAW[0].y(), vHAW[0].z() - zDel)); - Solid hawRSolid = SubtractionSolid(hawRSolid1, - hawCutBox, - Transform3D(myrot(ns, hawCutName + "R", hawCutForm.getRotation()), - Position(hawCutForm.getTranslation().x(), - hawCutForm.getTranslation().y(), - hawCutForm.getTranslation().z()))); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << alvWedge.hawRName << " Subtraction " << hawRSolid1.name() << ":" << hawCutBox.name() - << " at (" << cms::convert2mm(hawCutForm.getTranslation().x()) << "," - << cms::convert2mm(hawCutForm.getTranslation().y()) << "," - << cms::convert2mm(hawCutForm.getTranslation().z()) << ")"; -#endif - Volume hawRLog = Volume(alvWedge.hawRName, hawRSolid, ns.material(spm.mat)); + ns.addAssembly(alvWedge.hawRName); // FAW cut box to cut off back end of wedge const string fawCutName(alvWedge.fawName + "CUTBOX"); @@ -1465,27 +1410,27 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext 0.5 * (vFAW[1] + vFAW[2])); fawLog.placeVolume( - hawRLog, + ns.assembly(alvWedge.hawRName), copyOne, Transform3D( myrot(ns, alvWedge.hawRName + "R", hawRform.getRotation()), Position(hawRform.getTranslation().x(), hawRform.getTranslation().y(), hawRform.getTranslation().z()))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << hawRLog.name() << ":" << copyOne << " positioned in " << fawLog.name() << " at (" - << cms::convert2mm(hawRform.getTranslation().x()) << "," + edm::LogVerbatim("EBGeomX") << ns.assembly(alvWedge.hawRName).name() << ":" << copyOne << " positioned in " + << fawLog.name() << " at (" << cms::convert2mm(hawRform.getTranslation().x()) << "," << cms::convert2mm(hawRform.getTranslation().y()) << "," << cms::convert2mm(hawRform.getTranslation().z()) << ") with rotation"; #endif fawLog.placeVolume( - hawRLog, + ns.assembly(alvWedge.hawRName), copyTwo, Transform3D( Rotation3D(1., 0., 0., 0., 1., 0., 0., 0., -1.) * RotationY(M_PI), // rotate about Y after refl thru Z Position(-hawRform.getTranslation().x(), -hawRform.getTranslation().y(), -hawRform.getTranslation().z()))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << hawRLog.name() << ":" << copyTwo << " positioned in " << fawLog.name() << " at (" - << cms::convert2mm(-hawRform.getTranslation().x()) << "," + edm::LogVerbatim("EBGeomX") << ns.assembly(alvWedge.hawRName).name() << ":" << copyTwo << " positioned in " + << fawLog.name() << " at (" << cms::convert2mm(-hawRform.getTranslation().x()) << "," << cms::convert2mm(-hawRform.getTranslation().y()) << "," << cms::convert2mm(-hawRform.getTranslation().z()) << ") with rotation"; #endif @@ -1494,17 +1439,17 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const Tf3D fawform(RoZ3D(rPhi) * Tl3D(alvWedge.fawRadOff + (trapFAW.H() + trapFAW.h()) / 4, 0, 0.5 * trapFAW.L()) * - RoZ3D(-90_deg + alvWedge.fawPhiRot)); + RoZ3D(-90._deg + alvWedge.fawPhiRot)); if (alvWedge.fawHere) { - spmLog.placeVolume( + ns.assembly(spm.name).placeVolume( fawLog, iPhi, Transform3D( myrot(ns, alvWedge.fawName + "_Rot" + std::to_string(iPhi), fawform.getRotation()), Position(fawform.getTranslation().x(), fawform.getTranslation().y(), fawform.getTranslation().z()))); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << fawLog.name() << ":" << iPhi << " positioned in " << spmLog.name() << " at (" - << cms::convert2mm(fawform.getTranslation().x()) << "," + edm::LogVerbatim("EBGeomX") << fawLog.name() << ":" << iPhi << " positioned in " << ns.assembly(spm.name).name() + << " at (" << cms::convert2mm(fawform.getTranslation().x()) << "," << cms::convert2mm(fawform.getTranslation().y()) << "," << cms::convert2mm(fawform.getTranslation().z()) << ") with rotation"; #endif @@ -1523,7 +1468,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext 0.5 * h_Grid, // h1, H/2 0.5 * h_Grid, // h2, h/2 0.5 * (L_hawR - 8 * dd4hep::cm), // dz, L/2 - 90_deg, // alfa1 + 90._deg, // alfa1 0, // x15 H_hawR - h_hawR // y15 ); @@ -1541,14 +1486,16 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext vHAW[6]); if (0 != grid.here) { - hawRLog.placeVolume( - gridLog, - copyOne, - Transform3D( - myrot(ns, grid.name + "R", gridForm.getRotation()), - Position(gridForm.getTranslation().x(), gridForm.getTranslation().y(), gridForm.getTranslation().z()))); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << gridLog.name() << ":" << copyOne << " positioned in " << hawRLog.name() << " at (" + ns.assembly(alvWedge.hawRName) + .placeVolume(gridLog, + copyOne, + Transform3D(myrot(ns, grid.name + "R", gridForm.getRotation()), + Position(gridForm.getTranslation().x(), + gridForm.getTranslation().y(), + gridForm.getTranslation().z()))); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("EBGeomX") << gridLog.name() << ":" << copyOne << " positioned in " + << ns.assembly(alvWedge.hawRName).name() << " at (" << cms::convert2mm(gridForm.getTranslation().x()) << "," << cms::convert2mm(gridForm.getTranslation().y()) << "," << cms::convert2mm(gridForm.getTranslation().z()) << ") with rotation"; @@ -1581,10 +1528,10 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const double rClr(alv.clrReAlv); // theta is angle in yz plane between z axis & leading edge of crystal - double theta(90_deg); - double zee(0); - double side(0); - double zeta(0_deg); // increment in theta for last crystal + double theta(90._deg); + double zee(0 * dd4hep::mm); + double side(0 * dd4hep::mm); + double zeta(0._deg); // increment in theta for last crystal for (unsigned int cryType(1); cryType <= alv.nCryTypes; ++cryType) { const string sType("_" + std::string(10 > cryType ? "0" : "") + std::to_string(cryType)); @@ -1598,7 +1545,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const double HNom(cry.vecNomCryDimBR[cryType - 1]); const double hNom(cry.vecNomCryDimBF[cryType - 1]); - const double alfCry(90_deg + atan((bNom - bUnd - aNom + aUnd) / (hNom - hUnd))); + const double alfCry(90._deg + atan((bNom - bUnd - aNom + aUnd) / (hNom - hUnd))); const EcalTrap trapCry(0.5 * (ANom - AUnd), //double aHalfLengthXNegZLoY , // bl1, A/2 0.5 * (aNom - aUnd), //double aHalfLengthXPosZLoY , // bl2, a/2 @@ -1626,10 +1573,10 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext Volume capLog = Volume(capDDName, capSolid, ns.material(cap.mat)); const string sglDDName(apd.sglName + sType); - Solid sglSolid = Box(sglDDName, cap.xSizeHalf, cap.ySizeHalf, apd.sglThick / 2.); + Solid sglSolid = Box(sglDDName, cap.xSizeHalf, cap.ySizeHalf, apd.sglThick * 0.5); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << sglDDName << " Box " << cms::convert2mm(cap.xSizeHalf) << ":" - << cms::convert2mm(cap.ySizeHalf) << ":" << cms::convert2mm(apd.sglThick / 2.); + << cms::convert2mm(cap.ySizeHalf) << ":" << cms::convert2mm(apd.sglThick * 0.5); #endif Volume sglLog = Volume(sglDDName, sglSolid, ns.material(apd.sglMat)); const unsigned int copySGL(1); @@ -1700,7 +1647,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const double sinbeta(sin(beta)); // Now clearance trap - const double alfClr(90_deg + atan((bNom - aNom) / (hNom + sClr))); + const double alfClr(90._deg + atan((bNom - aNom) / (hNom + sClr))); const EcalTrap trapClr(0.5 * (ANom + sClr + rClr * singamma), //double aHalfLengthXNegZLoY , // bl1, A/2 0.5 * (aNom + sClr - fClr * singamma), //double aHalfLengthXPosZLoY , // bl2, a/2 @@ -1718,7 +1665,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext Volume clrLog = Volume(clrDDName, clrSolid, ns.material(cry.clrMat)); // Now wrap trap - const double alfWrap(90_deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap))); + const double alfWrap(90._deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap))); const EcalTrap trapWrap(0.5 * (trapClr.A() + 2. * sWrap + rWrap * singamma), // bl1, A/2 0.5 * (trapClr.a() + 2. * sWrap - fWrap * singamma), // bl2, a/2 @@ -1737,7 +1684,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext // Now wall trap - const double alfWall(90_deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap + 2. * sWall))); + const double alfWall(90._deg + atan((bNom - aNom) / (hNom + sClr + 2. * sWrap + 2. * sWall))); const EcalTrap trapWall(0.5 * (trapWrap.A() + 2 * sWall + rWall * singamma), // A/2 0.5 * (trapWrap.a() + 2 * sWall - fWall * singamma), // a/2 @@ -1872,7 +1819,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext 0.5 * thick, // H/2 0.5 * thick, // h/2 0.5 * LWebx, // L/2 - 90_deg, // alfa1 + 90._deg, // alfa1 trapWall.b() - BWebx, // x15 0 // y15 ); @@ -1918,15 +1865,17 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3); if (0 != web.here) { - hawRLog.placeVolume( - webClrLog, - copyOne, - Transform3D( - myrot(ns, webClrName + std::to_string(iWeb), tForm.getRotation()), - Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()))); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << webClrLog.name() << ":" << copyOne << " positioned in " << hawRLog.name() - << " at (" << cms::convert2mm(tForm.getTranslation().x()) << "," + ns.assembly(alvWedge.hawRName) + .placeVolume( + webClrLog, + copyOne, + Transform3D( + myrot(ns, webClrName + std::to_string(iWeb), tForm.getRotation()), + Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()))); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("EBGeomX") << webClrLog.name() << ":" << copyOne << " positioned in " + << ns.assembly(alvWedge.hawRName).name() << " at (" + << cms::convert2mm(tForm.getTranslation().x()) << "," << cms::convert2mm(tForm.getTranslation().y()) << "," << cms::convert2mm(tForm.getTranslation().z()) << ") with rotation"; #endif @@ -1959,13 +1908,16 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const double xx(0.050 * dd4hep::mm); const Tf3D tForm(HepGeom::Translate3D(xx, 0, 0) * tForm1); - hawRLog.placeVolume( - wallLog, - etaAlv, - Transform3D(myrot(ns, wallDDName + "_" + std::to_string(etaAlv), tForm.getRotation()), - Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()))); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << wallLog.name() << ":" << etaAlv << " positioned in " << hawRLog.name() << " at (" + ns.assembly(alvWedge.hawRName) + .placeVolume( + wallLog, + etaAlv, + Transform3D( + myrot(ns, wallDDName + "_" + std::to_string(etaAlv), tForm.getRotation()), + Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()))); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("EBGeomX") << wallLog.name() << ":" << etaAlv << " positioned in " + << ns.assembly(alvWedge.hawRName).name() << " at (" << cms::convert2mm(tForm.getTranslation().x()) << "," << cms::convert2mm(tForm.getTranslation().y()) << "," << cms::convert2mm(tForm.getTranslation().z()) << ") with rotation"; @@ -1990,7 +1942,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext 0.5 * thick, // H/2 0.5 * thick, // h/2 0.5 * LWebx, // L/2 - 90_deg, // alfa1 + 90._deg, // alfa1 trapWall.a() - BWebx, // x15 0 // y15 ); @@ -2036,15 +1988,17 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const Tf3D tForm(vWeb[0], vWeb[2], vWeb[3], wedge1, wedge2, wedge3); if (0 != web.here) { - hawRLog.placeVolume( - webClrLog, - copyOne, - Transform3D( - myrot(ns, webClrName + std::to_string(iWeb), tForm.getRotation()), - Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()))); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << webClrLog.name() << ":" << copyOne << " positioned in " << hawRLog.name() - << " at (" << cms::convert2mm(tForm.getTranslation().x()) << "," + ns.assembly(alvWedge.hawRName) + .placeVolume( + webClrLog, + copyOne, + Transform3D( + myrot(ns, webClrName + std::to_string(iWeb), tForm.getRotation()), + Position(tForm.getTranslation().x(), tForm.getTranslation().y(), tForm.getTranslation().z()))); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("EBGeomX") << webClrLog.name() << ":" << copyOne << " positioned in " + << ns.assembly(alvWedge.hawRName).name() << " at (" + << cms::convert2mm(tForm.getTranslation().x()) << "," << cms::convert2mm(tForm.getTranslation().y()) << "," << cms::convert2mm(tForm.getTranslation().z()) << ") with rotation"; #endif @@ -2087,7 +2041,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext Volume backPlateLog = Volume(back.plateName, backPlateSolid, ns.material(back.plateMat)); const Position backPlateTra( - 0.5 * back.sideHeight + backPlateParms[1], 0, backPlateParms[2] - 0.5 * back.sideLength); + 0.5 * back.sideHeight + backPlateParms[1], 0 * dd4hep::mm, backPlateParms[2] - 0.5 * back.sideLength); Solid backPlate2Solid = Box(back.plate2Name, 0.5 * back.plateWidth, 0.5 * back.plate2Thick, 0.5 * back.plateLength); @@ -2098,7 +2052,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext #endif Volume backPlate2Log = Volume(back.plate2Name, backPlate2Solid, ns.material(back.plate2Mat)); - const Position backPlate2Tra(0, -backPlateParms[1] + back.plate2Thick / 2., 0); + const Position backPlate2Tra(0, -backPlateParms[1] + back.plate2Thick * 0.5, 0); if (0 != back.plateHere) { backPlateLog.placeVolume(backPlate2Log, copyOne, Transform3D(backPlate2Tra)); #ifdef EDM_ML_DEBUG @@ -2107,13 +2061,14 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext << cms::convert2mm(backPlate2Tra.y()) << "," << cms::convert2mm(backPlate2Tra.z()) << ") with no rotation"; #endif - spmLog.placeVolume( + ns.assembly(spm.name).placeVolume( backPlateLog, copyOne, - Transform3D(myrot(ns, back.plateName + "Rot5", CLHEP::HepRotationZ(270_deg)), outtra + backPlateTra)); + Transform3D(myrot(ns, back.plateName + "Rot5", CLHEP::HepRotationZ(270._deg)), outtra + backPlateTra)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << backPlateLog.name() << ":" << copyOne << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm((outtra + backPlateTra).x()) << "," + edm::LogVerbatim("EBGeomX") << backPlateLog.name() << ":" << copyOne << " positioned in " + << ns.assembly(spm.name).name() << " at (" + << cms::convert2mm((outtra + backPlateTra).x()) << "," << cms::convert2mm((outtra + backPlateTra).y()) << "," << cms::convert2mm((outtra + backPlateTra).z()) << ") with rotation"; #endif @@ -2130,41 +2085,43 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - const EcalTrap trapBS(back.sideWidth / 2., //double aHalfLengthXNegZLoY , // bl1, A/2 - back.sideWidth / 2., //double aHalfLengthXPosZLoY , // bl2, a/2 - back.sideWidth / 4., //double aHalfLengthXPosZHiY , // tl2, b/2 - back.sideHeight / 2., //double aHalfLengthYNegZ , // h1, H/2 - back.sideHeight / 2., //double aHalfLengthYPosZ , // h2, h/2 - back.sideLength / 2., //double aHalfLengthZ , // dz, L/2 - back.sideAngle, //double aAngleAD , // alfa1 - 0, //double aCoord15X , // x15 - 0 //double aCoord15Y // y15 + const EcalTrap trapBS(back.sideWidth * 0.5, //double aHalfLengthXNegZLoY , // bl1, A/2 + back.sideWidth * 0.5, //double aHalfLengthXPosZLoY , // bl2, a/2 + back.sideWidth / 4., //double aHalfLengthXPosZHiY , // tl2, b/2 + back.sideHeight * 0.5, //double aHalfLengthYNegZ , // h1, H/2 + back.sideHeight * 0.5, //double aHalfLengthYPosZ , // h2, h/2 + back.sideLength * 0.5, //double aHalfLengthZ , // dz, L/2 + back.sideAngle, //double aAngleAD , // alfa1 + 0, //double aCoord15X , // x15 + 0 //double aCoord15Y // y15 ); Solid backSideSolid = mytrap(back.sideName, trapBS); Volume backSideLog = Volume(back.sideName, backSideSolid, ns.material(back.sideMat)); - const Position backSideTra1(0, back.plateWidth / 2 + back.sideYOff1, 1 * dd4hep::mm); + const Position backSideTra1(0 * dd4hep::mm, back.plateWidth * 0.5 + back.sideYOff1, 1 * dd4hep::mm); if (0 != back.sideHere) { - spmLog.placeVolume( + ns.assembly(spm.name).placeVolume( backSideLog, copyOne, - Transform3D(myrot(ns, back.sideName + "Rot8", CLHEP::HepRotationX(180_deg) * CLHEP::HepRotationZ(90_deg)), + Transform3D(myrot(ns, back.sideName + "Rot8", CLHEP::HepRotationX(180._deg) * CLHEP::HepRotationZ(90._deg)), outtra + backSideTra1)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << backSideLog.name() << ":" << copyOne << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm((outtra + backSideTra1).x()) << "," + edm::LogVerbatim("EBGeomX") << backSideLog.name() << ":" << copyOne << " positioned in " + << ns.assembly(spm.name).name() << " at (" + << cms::convert2mm((outtra + backSideTra1).x()) << "," << cms::convert2mm((outtra + backSideTra1).y()) << "," << cms::convert2mm((outtra + backSideTra1).z()) << ") with rotation"; #endif - const Position backSideTra2(0, -back.plateWidth / 2 + back.sideYOff2, 1 * dd4hep::mm); - spmLog.placeVolume( + const Position backSideTra2(0 * dd4hep::mm, -back.plateWidth * 0.5 + back.sideYOff2, 1 * dd4hep::mm); + ns.assembly(spm.name).placeVolume( backSideLog, copyTwo, - Transform3D(myrot(ns, back.sideName + "Rot9", CLHEP::HepRotationZ(90_deg)), outtra + backSideTra2)); + Transform3D(myrot(ns, back.sideName + "Rot9", CLHEP::HepRotationZ(90._deg)), outtra + backSideTra2)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << backSideLog.name() << ":" << copyTwo << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm((outtra + backSideTra2).x()) << "," + edm::LogVerbatim("EBGeomX") << backSideLog.name() << ":" << copyTwo << " positioned in " + << ns.assembly(spm.name).name() << " at (" + << cms::convert2mm((outtra + backSideTra2).x()) << "," << cms::convert2mm((outtra + backSideTra2).y()) << "," << cms::convert2mm((outtra + backSideTra2).z()) << ") with rotation"; #endif @@ -2186,18 +2143,18 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const double manifCut(2 * dd4hep::mm); - Solid mBManifSolid = Tube(0, mbManif.outDiam / 2, backCoolWidth / 2. - manifCut, 0_deg, 360_deg); + Solid mBManifSolid = Tube(0, mbManif.outDiam * 0.5, backCoolWidth * 0.5 - manifCut, 0._deg, 360._deg); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << mbManif.name << " Tubs " << cms::convert2mm(backCoolWidth / 2. - manifCut) - << ":0:" << cms::convert2mm(mbManif.outDiam / 2) << ":0:360"; + edm::LogVerbatim("EBGeom") << mbManif.name << " Tubs " << cms::convert2mm(backCoolWidth * 0.5 - manifCut) + << ":0:" << cms::convert2mm(mbManif.outDiam * 0.5) << ":0:360"; #endif Volume mBManifLog = Volume(mbManif.name, mBManifSolid, ns.material(mbManif.mat)); const string mBManifWaName(mbManif.name + "Wa"); - Solid mBManifWaSolid = Tube(0, mbManif.innDiam / 2, backCoolWidth / 2. - manifCut, 0_deg, 360_deg); + Solid mBManifWaSolid = Tube(0, mbManif.innDiam * 0.5, backCoolWidth * 0.5 - manifCut, 0._deg, 360._deg); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << mBManifWaName << " Tubs " << cms::convert2mm(backCoolWidth / 2. - manifCut) - << ":0:" << cms::convert2mm(mbManif.innDiam / 2) << ":0:360"; + edm::LogVerbatim("EBGeom") << mBManifWaName << " Tubs " << cms::convert2mm(backCoolWidth * 0.5 - manifCut) + << ":0:" << cms::convert2mm(mbManif.innDiam * 0.5) << ":0:360"; #endif Volume mBManifWaLog(mBManifWaName, mBManifWaSolid, ns.material(backPipe.waterMat)); mBManifLog.placeVolume(mBManifWaLog, copyOne); @@ -2221,11 +2178,11 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const double deltaY(-5 * dd4hep::mm); Solid grEdgeSlotSolid = - Box(grille.edgeSlotName, grille.edgeSlotHeight / 2., grille.edgeSlotWidth / 2., grille.thick / 2.); + Box(grille.edgeSlotName, grille.edgeSlotHeight * 0.5, grille.edgeSlotWidth * 0.5, grille.thick * 0.5); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << grille.edgeSlotName << " Box " << cms::convert2mm(grille.edgeSlotHeight / 2.) << ":" - << cms::convert2mm(grille.edgeSlotWidth / 2.) << ":" - << cms::convert2mm(grille.thick / 2.); + edm::LogVerbatim("EBGeom") << grille.edgeSlotName << " Box " << cms::convert2mm(grille.edgeSlotHeight * 0.5) + << ":" << cms::convert2mm(grille.edgeSlotWidth * 0.5) << ":" + << cms::convert2mm(grille.thick * 0.5); #endif Volume grEdgeSlotLog = Volume(grille.edgeSlotName, grEdgeSlotSolid, ns.material(grille.edgeSlotMat)); @@ -2236,28 +2193,29 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext for (unsigned int iGr(0); iGr != grille.vecHeight.size(); ++iGr) { string gName(grille.name + std::to_string(iGr)); - Solid grilleSolid = Box(gName, grille.vecHeight[iGr] / 2., backCoolWidth / 2., grille.thick / 2.); + Solid grilleSolid = Box(gName, grille.vecHeight[iGr] * 0.5, backCoolWidth * 0.5, grille.thick * 0.5); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << gName << " Box " << cms::convert2mm(grille.vecHeight[iGr] / 2.) << ":" - << cms::convert2mm(backCoolWidth / 2.) << ":" << cms::convert2mm(grille.thick / 2.); + edm::LogVerbatim("EBGeom") << gName << " Box " << cms::convert2mm(grille.vecHeight[iGr] * 0.5) << ":" + << cms::convert2mm(backCoolWidth * 0.5) << ":" + << cms::convert2mm(grille.thick * 0.5); #endif Volume grilleLog = Volume(gName, grilleSolid, ns.material(grille.mat)); - const Position grilleTra(-realBPthick / 2 - grille.vecHeight[iGr] / 2, + const Position grilleTra(-realBPthick * 0.5 - grille.vecHeight[iGr] * 0.5, deltaY, - grille.vecZOff[iGr] + grille.thick / 2 - back.sideLength / 2); + grille.vecZOff[iGr] + grille.thick * 0.5 - back.sideLength * 0.5); const Position gTra(outtra + backPlateTra + grilleTra); if (0 != grille.midSlotHere && 0 != iGr) { if (0 == (iGr - 1) % 2) { - string mName(grille.midSlotName + std::to_string(iGr / 2)); + string mName(grille.midSlotName + std::to_string(iGr * 0.5)); Solid grMidSlotSolid = - Box(mName, grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., grille.midSlotWidth / 2., grille.thick / 2.); + Box(mName, grille.vecMidSlotHeight[(iGr - 1) / 2] * 0.5, grille.midSlotWidth * 0.5, grille.thick * 0.5); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << mName << " Box " - << cms::convert2mm(grille.vecMidSlotHeight[(iGr - 1) / 2] / 2.) << ":" - << cms::convert2mm(grille.midSlotWidth / 2.) << ":" - << cms::convert2mm(grille.thick / 2.); + << cms::convert2mm(grille.vecMidSlotHeight[(iGr - 1) / 2] * 0.5) << ":" + << cms::convert2mm(grille.midSlotWidth * 0.5) << ":" + << cms::convert2mm(grille.thick * 0.5); #endif grMidSlotLog[(iGr - 1) / 2] = Volume(mName, grMidSlotSolid, ns.material(grille.midSlotMat)); } @@ -2265,24 +2223,24 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext grMidSlotLog[(iGr - 1) / 2], ++midSlotCopy, Transform3D(Position( - grille.vecHeight[iGr] / 2. - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., +grille.midSlotXOff, 0))); + grille.vecHeight[iGr] * 0.5 - grille.vecMidSlotHeight[(iGr - 1) / 2] * 0.5, +grille.midSlotXOff, 0))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << grMidSlotLog[(iGr - 1) / 2].name() << ":" << midSlotCopy << " positioned in " << grilleLog.name() << " at (" - << cms::convert2mm(grille.vecHeight[iGr] / 2. - - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2.) + << cms::convert2mm(grille.vecHeight[iGr] * 0.5 - + grille.vecMidSlotHeight[(iGr - 1) / 2] * 0.5) << "," << cms::convert2mm(grille.midSlotXOff) << ",0) with no rotation"; #endif grilleLog.placeVolume( grMidSlotLog[(iGr - 1) / 2], ++midSlotCopy, Transform3D(Position( - grille.vecHeight[iGr] / 2. - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2., -grille.midSlotXOff, 0))); + grille.vecHeight[iGr] * 0.5 - grille.vecMidSlotHeight[(iGr - 1) / 2] * 0.5, -grille.midSlotXOff, 0))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << grMidSlotLog[(iGr - 1) / 2].name() << ":" << midSlotCopy << " positioned in " << grilleLog.name() << " at (" - << cms::convert2mm(grille.vecHeight[iGr] / 2. - - grille.vecMidSlotHeight[(iGr - 1) / 2] / 2.) + << cms::convert2mm(grille.vecHeight[iGr] * 0.5 - + grille.vecMidSlotHeight[(iGr - 1) / 2] * 0.5) << "," << cms::convert2mm(-grille.midSlotXOff) << ",0) with no rotation"; #endif } @@ -2290,66 +2248,69 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext if (0 != grille.edgeSlotHere && 0 != iGr) { grilleLog.placeVolume(grEdgeSlotLog, ++edgeSlotCopy, - Transform3D(Position(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2., - backCoolWidth / 2 - grille.edgeSlotWidth / 2., + Transform3D(Position(grille.vecHeight[iGr] * 0.5 - grille.edgeSlotHeight * 0.5, + backCoolWidth * 0.5 - grille.edgeSlotWidth * 0.5, 0))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << grEdgeSlotLog.name() << ":" << edgeSlotCopy << " positioned in " << grilleLog.name() << " at (" - << cms::convert2mm(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.) << "," - << cms::convert2mm(backCoolWidth / 2 - grille.edgeSlotWidth / 2.) + << cms::convert2mm(grille.vecHeight[iGr] * 0.5 - grille.edgeSlotHeight * 0.5) + << "," << cms::convert2mm(backCoolWidth * 0.5 - grille.edgeSlotWidth * 0.5) << ",0) with no rotation"; #endif grilleLog.placeVolume(grEdgeSlotLog, ++edgeSlotCopy, - Transform3D(Position(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2., - -backCoolWidth / 2 + grille.edgeSlotWidth / 2., + Transform3D(Position(grille.vecHeight[iGr] * 0.5 - grille.edgeSlotHeight * 0.5, + -backCoolWidth * 0.5 + grille.edgeSlotWidth * 0.5, 0))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << grEdgeSlotLog.name() << ":" << edgeSlotCopy << " positioned in " << grilleLog.name() << " at (" - << cms::convert2mm(grille.vecHeight[iGr] / 2. - grille.edgeSlotHeight / 2.) << "," - << cms::convert2mm(-backCoolWidth / 2 + grille.edgeSlotWidth / 2.) + << cms::convert2mm(grille.vecHeight[iGr] * 0.5 - grille.edgeSlotHeight * 0.5) + << "," << cms::convert2mm(-backCoolWidth * 0.5 + grille.edgeSlotWidth * 0.5) << ",0) with no rotation"; #endif } if (0 != grille.here) { - spmLog.placeVolume(grilleLog, iGr, Transform3D(gTra)); + ns.assembly(spm.name).placeVolume(grilleLog, iGr, Transform3D(gTra)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << grilleLog.name() << ":" << iGr << " positioned in " << spmLog.name() << " at (" - << cms::convert2mm(gTra.x()) << "," << cms::convert2mm(gTra.y()) << "," - << cms::convert2mm(gTra.z()) << ") with no rotation"; + edm::LogVerbatim("EBGeomX") << grilleLog.name() << ":" << iGr << " positioned in " + << ns.assembly(spm.name).name() << " at (" << cms::convert2mm(gTra.x()) << "," + << cms::convert2mm(gTra.y()) << "," << cms::convert2mm(gTra.z()) + << ") with no rotation"; #endif } if ((0 != iGr % 2) && (0 != mbManif.here)) { - spmLog.placeVolume(mBManifLog, - iGr, - Transform3D(myrot(ns, mbManif.name + "R1", CLHEP::HepRotationX(90_deg)), - gTra - Position(-mbManif.outDiam / 2. + grille.vecHeight[iGr] / 2., - manifCut, - grille.thick / 2. + 3 * mbManif.outDiam / 2.))); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << mBManifLog.name() << ":" << iGr << " positioned in " << spmLog.name() - << " at (" - << cms::convert2mm(gTra.x() + mbManif.outDiam / 2. - grille.vecHeight[iGr] / 2.) + ns.assembly(spm.name).placeVolume( + mBManifLog, + iGr, + Transform3D(myrot(ns, mbManif.name + "R1", CLHEP::HepRotationX(90._deg)), + gTra - Position(-mbManif.outDiam * 0.5 + grille.vecHeight[iGr] * 0.5, + manifCut, + grille.thick * 0.5 + 3 * mbManif.outDiam * 0.5))); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("EBGeomX") << mBManifLog.name() << ":" << iGr << " positioned in " + << ns.assembly(spm.name).name() << " at (" + << cms::convert2mm(gTra.x() + mbManif.outDiam * 0.5 - grille.vecHeight[iGr] * 0.5) << "," << cms::convert2mm(gTra.y() - manifCut) << "," - << cms::convert2mm(gTra.z() - grille.thick / 2. - 3 * mbManif.outDiam / 2.) + << cms::convert2mm(gTra.z() - grille.thick * 0.5 - 3 * mbManif.outDiam * 0.5) << ") with rotation"; #endif - spmLog.placeVolume(mBManifLog, - iGr - 1, - Transform3D(myrot(ns, mbManif.name + "R2", CLHEP::HepRotationX(90_deg)), - gTra - Position(-3 * mbManif.outDiam / 2. + grille.vecHeight[iGr] / 2., - manifCut, - grille.thick / 2 + 3 * mbManif.outDiam / 2.))); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << mBManifLog.name() << ":" << (iGr - 1) << " positioned in " << spmLog.name() - << " at (" - << cms::convert2mm(gTra.x() + 3 * mbManif.outDiam / 2. - - grille.vecHeight[iGr] / 2.) + ns.assembly(spm.name).placeVolume( + mBManifLog, + iGr - 1, + Transform3D(myrot(ns, mbManif.name + "R2", CLHEP::HepRotationX(90._deg)), + gTra - Position(-3 * mbManif.outDiam * 0.5 + grille.vecHeight[iGr] * 0.5, + manifCut, + grille.thick * 0.5 + 3 * mbManif.outDiam * 0.5))); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("EBGeomX") << mBManifLog.name() << ":" << (iGr - 1) << " positioned in " + << ns.assembly(spm.name).name() << " at (" + << cms::convert2mm(gTra.x() + 3 * mbManif.outDiam * 0.5 - + grille.vecHeight[iGr] * 0.5) << "," << cms::convert2mm(gTra.y() - manifCut) << "," - << cms::convert2mm(gTra.z() - grille.thick / 2 - 3 * mbManif.outDiam / 2.) + << cms::convert2mm(gTra.z() - grille.thick * 0.5 - 3 * mbManif.outDiam * 0.5) << ") with rotation"; #endif } @@ -2368,20 +2329,20 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Solid backCoolBarSolid = - Box(backCool.barName, backCool.barHeight / 2., backCool.barWidth / 2., backCool.barThick / 2.); + Box(backCool.barName, backCool.barHeight * 0.5, backCool.barWidth * 0.5, backCool.barThick * 0.5); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << backCool.barName << " Box " << cms::convert2mm(backCool.barHeight / 2.) << ":" - << cms::convert2mm(backCool.barWidth / 2.) << ":" - << cms::convert2mm(backCool.barThick / 2.); + edm::LogVerbatim("EBGeom") << backCool.barName << " Box " << cms::convert2mm(backCool.barHeight * 0.5) << ":" + << cms::convert2mm(backCool.barWidth * 0.5) << ":" + << cms::convert2mm(backCool.barThick * 0.5); #endif Volume backCoolBarLog = Volume(backCool.barName, backCoolBarSolid, ns.material(backCool.barMat)); Solid backCoolBarSSSolid = - Box(backCool.barSSName, backCool.barHeight / 2., backCool.barWidth / 2., backCool.barSSThick / 2.); + Box(backCool.barSSName, backCool.barHeight * 0.5, backCool.barWidth * 0.5, backCool.barSSThick * 0.5); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << backCool.barSSName << " Box " << cms::convert2mm(backCool.barHeight / 2.) << ":" - << cms::convert2mm(backCool.barWidth / 2.) << ":" - << cms::convert2mm(backCool.barSSThick / 2.); + edm::LogVerbatim("EBGeom") << backCool.barSSName << " Box " << cms::convert2mm(backCool.barHeight * 0.5) << ":" + << cms::convert2mm(backCool.barWidth * 0.5) << ":" + << cms::convert2mm(backCool.barSSThick * 0.5); #endif Volume backCoolBarSSLog = Volume(backCool.barSSName, backCoolBarSSSolid, ns.material(backCool.barSSMat)); const Position backCoolBarSSTra(0, 0, 0); @@ -2394,11 +2355,11 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext #endif Solid backCoolBarWaSolid = - Box(backCool.barWaName, backCool.barHeight / 2., backCool.barWidth / 2., backCool.barWaThick / 2.); + Box(backCool.barWaName, backCool.barHeight * 0.5, backCool.barWidth * 0.5, backCool.barWaThick * 0.5); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << backCool.barWaName << " Box " << cms::convert2mm(backCool.barHeight / 2.) << ":" - << cms::convert2mm(backCool.barWidth / 2.) << ":" - << cms::convert2mm(backCool.barWaThick / 2.); + edm::LogVerbatim("EBGeom") << backCool.barWaName << " Box " << cms::convert2mm(backCool.barHeight * 0.5) << ":" + << cms::convert2mm(backCool.barWidth * 0.5) << ":" + << cms::convert2mm(backCool.barWaThick * 0.5); #endif Volume backCoolBarWaLog = Volume(backCool.barWaName, backCoolBarWaSolid, ns.material(backCool.barWaMat)); const Position backCoolBarWaTra(0, 0, 0); @@ -2427,29 +2388,29 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext thickVFE += backCool.vecBackVFELyrThick[iLyr]; } Solid backVFESolid = - Box((myns + backCool.backVFEName), backCool.barHeight / 2., backCool.barWidth / 2., thickVFE / 2.); + Box((myns + backCool.backVFEName), backCool.barHeight * 0.5, backCool.barWidth * 0.5, thickVFE * 0.5); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << (myns + backCool.backVFEName) << " Box " << cms::convert2mm(backCool.barHeight / 2.) - << ":" << cms::convert2mm(backCool.barWidth / 2.) << ":" - << cms::convert2mm(thickVFE / 2.); + edm::LogVerbatim("EBGeom") << (myns + backCool.backVFEName) << " Box " + << cms::convert2mm(backCool.barHeight * 0.5) << ":" + << cms::convert2mm(backCool.barWidth * 0.5) << ":" << cms::convert2mm(thickVFE * 0.5); #endif Volume backVFELog = ns.addVolume(Volume(myns + backCool.backVFEName, backVFESolid, ns.material(backCool.backVFEMat))); - Position offTra(0, 0, -thickVFE / 2); + Position offTra(0, 0, -thickVFE * 0.5); for (unsigned int iLyr(0); iLyr != backCool.vecBackVFELyrThick.size(); ++iLyr) { Solid backVFELyrSolid = Box(backCool.vecBackVFELyrName[iLyr], - backCool.barHeight / 2., - backCool.barWidth / 2., - backCool.vecBackVFELyrThick[iLyr] / 2.); + backCool.barHeight * 0.5, + backCool.barWidth * 0.5, + backCool.vecBackVFELyrThick[iLyr] * 0.5); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << backCool.vecBackVFELyrName[iLyr] << " Box " - << cms::convert2mm(backCool.barHeight / 2.) << ":" - << cms::convert2mm(backCool.barWidth / 2.) << ":" - << cms::convert2mm(backCool.vecBackVFELyrThick[iLyr] / 2.); + << cms::convert2mm(backCool.barHeight * 0.5) << ":" + << cms::convert2mm(backCool.barWidth * 0.5) << ":" + << cms::convert2mm(backCool.vecBackVFELyrThick[iLyr] * 0.5); #endif Volume backVFELyrLog = Volume(backCool.vecBackVFELyrName[iLyr], backVFELyrSolid, ns.material(backCool.vecBackVFELyrMat[iLyr])); - const Position backVFELyrTra(0, 0, backCool.vecBackVFELyrThick[iLyr] / 2); + const Position backVFELyrTra(0, 0, backCool.vecBackVFELyrThick[iLyr] * 0.5); backVFELog.placeVolume(backVFELyrLog, copyOne, Transform3D(backVFELyrTra + offTra)); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << backVFELyrLog.name() << ":" << copyOne << " positioned in " << backVFELog.name() @@ -2472,11 +2433,11 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - const double halfZCoolVFE(thickVFE + backCool.barThick / 2.); - Solid backCoolVFESolid = Box(backCool.barHeight / 2., backCool.barWidth / 2., halfZCoolVFE); + const double halfZCoolVFE(thickVFE + backCool.barThick * 0.5); + Solid backCoolVFESolid = Box(backCool.barHeight * 0.5, backCool.barWidth * 0.5, halfZCoolVFE); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << backCool.vFEName << " Box " << cms::convert2mm(backCool.barHeight / 2.) << ":" - << cms::convert2mm(backCool.barWidth / 2.) << ":" << cms::convert2mm(halfZCoolVFE); + edm::LogVerbatim("EBGeom") << backCool.vFEName << " Box " << cms::convert2mm(backCool.barHeight * 0.5) << ":" + << cms::convert2mm(backCool.barWidth * 0.5) << ":" << cms::convert2mm(halfZCoolVFE); #endif Volume backCoolVFELog = ns.addVolume(Volume(backCool.vFEName, backCoolVFESolid, ns.material(backCool.vFEMat))); if (0 != backCool.barHere) { @@ -2488,20 +2449,20 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext } if (0 != backCool.vFEHere) { backCoolVFELog.placeVolume( - backVFELog, copyOne, Transform3D(Position(0, 0, backCool.barThick / 2. + thickVFE / 2.))); + backVFELog, copyOne, Transform3D(Position(0, 0, backCool.barThick * 0.5 + thickVFE * 0.5))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << backVFELog.name() << ":" << copyOne << " positioned in " << backCoolVFELog.name() - << " at (0,0," << cms::convert2mm(backCool.barThick / 2. + thickVFE / 2.) + << " at (0,0," << cms::convert2mm(backCool.barThick * 0.5 + thickVFE * 0.5) << ") with no rotation"; #endif } backCoolVFELog.placeVolume(backVFELog, copyTwo, - Transform3D(myrot(ns, backCool.vFEName + "Flip", CLHEP::HepRotationX(180_deg)), - Position(0, 0, -backCool.barThick / 2. - thickVFE / 2.))); + Transform3D(myrot(ns, backCool.vFEName + "Flip", CLHEP::HepRotationX(180._deg)), + Position(0, 0, -backCool.barThick * 0.5 - thickVFE * 0.5))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << backVFELog.name() << ":" << copyTwo << " positioned in " << backCoolVFELog.name() - << " at (0,0," << cms::convert2mm(-backCool.barThick / 2. - thickVFE / 2.) + << " at (0,0," << cms::convert2mm(-backCool.barThick * 0.5 - thickVFE * 0.5) << ") with rotation"; #endif @@ -2523,7 +2484,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext for (unsigned int iMod(0); iMod != 4; ++iMod) { const double pipeLength(grille.vecZOff[2 * iMod + 1] - grille.vecZOff[2 * iMod] - grille.thick - 3 * dd4hep::mm); - const double pipeZPos(grille.vecZOff[2 * iMod + 1] - pipeLength / 2 - 1.5 * dd4hep::mm); + const double pipeZPos(grille.vecZOff[2 * iMod + 1] - pipeLength * 0.5 - 1.5 * dd4hep::mm); // accumulate total height of parent volume double backCoolHeight(backCool.barHeight + mbCoolTube.outDiam); @@ -2536,23 +2497,24 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext bottomThick += mbLyr.vecMBLyrThick[iMB]; } - const double halfZBCool((pipeLength - 2 * mbManif.outDiam - grille.zSpace) / 2); - Solid backCoolSolid = Box(backCool.vecName[iMod], backCoolHeight / 2., backCoolWidth / 2., halfZBCool); + const double halfZBCool((pipeLength - 2 * mbManif.outDiam - grille.zSpace) * 0.5); + Solid backCoolSolid = Box(backCool.vecName[iMod], backCoolHeight * 0.5, backCoolWidth * 0.5, halfZBCool); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << backCool.vecName[iMod] << " Box " << cms::convert2mm(backCoolHeight / 2.) << ":" - << cms::convert2mm(backCoolWidth / 2.) << ":" << cms::convert2mm(halfZBCool); + edm::LogVerbatim("EBGeom") << backCool.vecName[iMod] << " Box " << cms::convert2mm(backCoolHeight * 0.5) << ":" + << cms::convert2mm(backCoolWidth * 0.5) << ":" << cms::convert2mm(halfZBCool); #endif Volume backCoolLog = Volume(backCool.vecName[iMod], backCoolSolid, ns.material(spm.mat)); const Position bCoolTra( - -realBPthick / 2 + backCoolHeight / 2 - grille.vecHeight[2 * iMod], + -realBPthick * 0.5 + backCoolHeight * 0.5 - grille.vecHeight[2 * iMod], deltaY, - grille.vecZOff[2 * iMod] + grille.thick + grille.zSpace + halfZBCool - back.sideLength / 2); + grille.vecZOff[2 * iMod] + grille.thick + grille.zSpace + halfZBCool - back.sideLength * 0.5); if (0 != backCool.here) { - spmLog.placeVolume(backCoolLog, iMod + 1, outtra + backPlateTra + bCoolTra); + ns.assembly(spm.name).placeVolume(backCoolLog, iMod + 1, outtra + backPlateTra + bCoolTra); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << backCoolLog.name() << ":" << (iMod + 1) << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm((outtra + backPlateTra + bCoolTra).x()) << "," + edm::LogVerbatim("EBGeomX") << backCoolLog.name() << ":" << (iMod + 1) << " positioned in " + << ns.assembly(spm.name).name() << " at (" + << cms::convert2mm((outtra + backPlateTra + bCoolTra).x()) << "," << cms::convert2mm((outtra + backPlateTra + bCoolTra).y()) << "," << cms::convert2mm((outtra + backPlateTra + bCoolTra).z()) << ") with no rotation"; @@ -2564,38 +2526,38 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext const double halfZTank(halfZBCool - 5 * dd4hep::cm); string bTankName(backCoolTank.name + std::to_string(iMod + 1)); - Solid backCoolTankSolid = Box(bTankName, backCoolTankHeight / 2., backCoolTank.width / 2., halfZTank); + Solid backCoolTankSolid = Box(bTankName, backCoolTankHeight * 0.5, backCoolTank.width * 0.5, halfZTank); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << bTankName << " Box " << cms::convert2mm(backCoolTankHeight / 2.) << ":" - << cms::convert2mm(backCoolTank.width / 2.) << ":" << cms::convert2mm(halfZTank); + edm::LogVerbatim("EBGeom") << bTankName << " Box " << cms::convert2mm(backCoolTankHeight * 0.5) << ":" + << cms::convert2mm(backCoolTank.width * 0.5) << ":" << cms::convert2mm(halfZTank); #endif Volume backCoolTankLog = Volume(bTankName, backCoolTankSolid, ns.material(backCoolTank.mat)); if (0 != backCoolTank.here) { backCoolLog.placeVolume(backCoolTankLog, copyOne, Transform3D(Rotation3D(), - Position(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick, - backCool.barWidth / 2. + backCoolTank.width / 2., + Position(-backCoolHeight * 0.5 + backCoolTankHeight * 0.5 + bottomThick, + backCool.barWidth * 0.5 + backCoolTank.width * 0.5, 0))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << backCoolTankLog.name() << ":" << copyOne << " positioned in " << backCoolLog.name() << " at (" - << cms::convert2mm(-backCoolHeight / 2 + backCoolTankHeight / 2. + bottomThick) - << "," << cms::convert2mm(backCool.barWidth / 2. + backCoolTank.width / 2.) + << cms::convert2mm(-backCoolHeight * 0.5 + backCoolTankHeight * 0.5 + bottomThick) + << "," << cms::convert2mm(backCool.barWidth * 0.5 + backCoolTank.width * 0.5) << ",0) with no rotation"; #endif } string bTankWaName(backCoolTank.waName + std::to_string(iMod + 1)); Solid backCoolTankWaSolid = Box(bTankWaName, - backCoolTankHeight / 2. - backCoolTank.thick / 2., - backCoolTank.waWidth / 2., - halfZTank - backCoolTank.thick / 2.); + backCoolTankHeight * 0.5 - backCoolTank.thick * 0.5, + backCoolTank.waWidth * 0.5, + halfZTank - backCoolTank.thick * 0.5); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << bTankWaName << " Box " - << cms::convert2mm(backCoolTankHeight / 2. - backCoolTank.thick / 2.) << ":" - << cms::convert2mm(backCoolTank.waWidth / 2.) << ":" - << cms::convert2mm(halfZTank - backCoolTank.thick / 2.); + << cms::convert2mm(backCoolTankHeight * 0.5 - backCoolTank.thick * 0.5) << ":" + << cms::convert2mm(backCoolTank.waWidth * 0.5) << ":" + << cms::convert2mm(halfZTank - backCoolTank.thick * 0.5); #endif Volume backCoolTankWaLog = Volume(bTankWaName, backCoolTankWaSolid, ns.material(backCoolTank.waMat)); backCoolTankLog.placeVolume(backCoolTankWaLog, copyOne, Transform3D(Rotation3D(), Position(0, 0, 0))); @@ -2606,10 +2568,10 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext string bBracketName(backCoolTank.backBracketName + std::to_string(iMod + 1)); Solid backBracketSolid = - Box(bBracketName, backCoolTank.backBracketHeight / 2., backCoolTank.width / 2., halfZTank); + Box(bBracketName, backCoolTank.backBracketHeight * 0.5, backCoolTank.width * 0.5, halfZTank); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << bBracketName << " Box " << cms::convert2mm(backCoolTank.backBracketHeight / 2.) - << ":" << cms::convert2mm(backCoolTank.width / 2.) << ":" + edm::LogVerbatim("EBGeom") << bBracketName << " Box " << cms::convert2mm(backCoolTank.backBracketHeight * 0.5) + << ":" << cms::convert2mm(backCoolTank.width * 0.5) << ":" << cms::convert2mm(halfZTank); #endif Volume backBracketLog = Volume(bBracketName, backBracketSolid, ns.material(backCoolTank.backBracketMat)); @@ -2617,38 +2579,38 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext backCoolLog.placeVolume(backBracketLog, copyOne, Transform3D(Rotation3D(), - Position(backCool.barHeight - backCoolHeight / 2. - - backCoolTank.backBracketHeight / 2. + bottomThick, - -backCool.barWidth / 2. - backCoolTank.width / 2., + Position(backCool.barHeight - backCoolHeight * 0.5 - + backCoolTank.backBracketHeight * 0.5 + bottomThick, + -backCool.barWidth * 0.5 - backCoolTank.width * 0.5, 0))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << backBracketLog.name() << ":" << copyOne << " positioned in " << backCoolLog.name() << " at (" - << cms::convert2mm(backCool.barHeight - backCoolHeight / 2. - - backCoolTank.backBracketHeight / 2. + bottomThick) - << "," << cms::convert2mm(-backCool.barWidth / 2. - backCoolTank.width / 2.) + << cms::convert2mm(backCool.barHeight - backCoolHeight * 0.5 - + backCoolTank.backBracketHeight * 0.5 + bottomThick) + << "," << cms::convert2mm(-backCool.barWidth * 0.5 - backCoolTank.width * 0.5) << ",0) with no rotation"; #endif } //=== - Position bSumTra(backCool.barHeight - backCoolHeight / 2. + bottomThick, 0, 0); + Position bSumTra(backCool.barHeight - backCoolHeight * 0.5 + bottomThick, 0, 0); for (unsigned int j(0); j != nMisc; ++j) { // loop over miscellaneous layers Solid bSolid = Box(backMisc.vecName[iMod * nMisc + j], - backMisc.vecThick[iMod * nMisc + j] / 2, - backCool.barWidth / 2. + backCoolTank.width, + backMisc.vecThick[iMod * nMisc + j] * 0.5, + backCool.barWidth * 0.5 + backCoolTank.width, halfZBCool); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << backMisc.vecName[iMod * nMisc + j] << " Box " - << cms::convert2mm(backMisc.vecThick[iMod * nMisc + j] / 2) << ":" - << cms::convert2mm(backCool.barWidth / 2. + backCoolTank.width) << ":" + << cms::convert2mm(backMisc.vecThick[iMod * nMisc + j] * 0.5) << ":" + << cms::convert2mm(backCool.barWidth * 0.5 + backCoolTank.width) << ":" << cms::convert2mm(halfZBCool); #endif Volume bLog = Volume(backMisc.vecName[iMod * nMisc + j], bSolid, ns.material(backMisc.vecMat[iMod * nMisc + j])); - const Position bTra(backMisc.vecThick[iMod * nMisc + j] / 2, 0, 0); + const Position bTra(backMisc.vecThick[iMod * nMisc + j] * 0.5, 0 * dd4hep::mm, 0 * dd4hep::mm); if (0 != backMisc.here) { backCoolLog.placeVolume(bLog, copyOne, Transform3D(Rotation3D(), bSumTra + bTra)); @@ -2663,47 +2625,47 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext bSumTra += 2 * bTra; } - const double bHalfWidth(backCool.barWidth / 2. + backCoolTank.width); + const double bHalfWidth(backCool.barWidth * 0.5 + backCoolTank.width); if (0 != mbLyr.here) { - Position mTra(-backCoolHeight / 2. + mbCoolTube.outDiam, 0, 0); + Position mTra(-backCoolHeight * 0.5 + mbCoolTube.outDiam, 0, 0); for (unsigned int j(0); j != mbLyr.vecMBLyrThick.size(); ++j) // loop over MB layers { - Solid mSolid = Box(mbLyr.vecMBLyrThick[j] / 2, bHalfWidth, halfZBCool); + Solid mSolid = Box(mbLyr.vecMBLyrThick[j] * 0.5, bHalfWidth, halfZBCool); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << (mbLyr.vecMBLyrName[j] + "_" + std::to_string(iMod + 1)) << " Box " - << cms::convert2mm(mbLyr.vecMBLyrThick[j] / 2) << ":" + << cms::convert2mm(mbLyr.vecMBLyrThick[j] * 0.5) << ":" << cms::convert2mm(bHalfWidth) << ":" << cms::convert2mm(halfZBCool); #endif Volume mLog = Volume( mbLyr.vecMBLyrName[j] + "_" + std::to_string(iMod + 1), mSolid, ns.material(mbLyr.vecMBLyrMat[j])); - mTra += Position(mbLyr.vecMBLyrThick[j] / 2.0, 0, 0); + mTra += Position(mbLyr.vecMBLyrThick[j] * 0.5, 0 * dd4hep::mm, 0 * dd4hep::mm); backCoolLog.placeVolume(mLog, copyOne, Transform3D(Rotation3D(), mTra)); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << mLog.name() << ":" << copyOne << " positioned in " << backCoolLog.name() << " at (" << cms::convert2mm(mTra.x()) << "," << cms::convert2mm(mTra.y()) << "," << cms::convert2mm(mTra.z()) << ") with no rotation"; #endif - mTra += Position(mbLyr.vecMBLyrThick[j] / 2.0, 0, 0); + mTra += Position(mbLyr.vecMBLyrThick[j] * 0.5, 0 * dd4hep::mm, 0 * dd4hep::mm); } } if (0 != mbCoolTube.here) { const string mBName(mbCoolTube.name + "_" + std::to_string(iMod + 1)); - Solid mBCoolTubeSolid = Tube(0, mbCoolTube.outDiam / 2, halfZBCool, 0_deg, 360_deg); + Solid mBCoolTubeSolid = Tube(0, mbCoolTube.outDiam * 0.5, halfZBCool, 0._deg, 360._deg); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << mBName << " Tubs " << cms::convert2mm(halfZBCool) - << ":0:" << cms::convert2mm(mbCoolTube.outDiam / 2) << ":0:360"; + << ":0:" << cms::convert2mm(mbCoolTube.outDiam * 0.5) << ":0:360"; #endif Volume mBLog = Volume(mBName, mBCoolTubeSolid, ns.material(mbCoolTube.mat)); const string mBWaName(mbCoolTube.name + "Wa_" + std::to_string(iMod + 1)); - Solid mBCoolTubeWaSolid = Tube(mBWaName, 0, mbCoolTube.innDiam / 2, halfZBCool, 0_deg, 360_deg); + Solid mBCoolTubeWaSolid = Tube(mBWaName, 0, mbCoolTube.innDiam * 0.5, halfZBCool, 0._deg, 360._deg); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << mBWaName << " Tubs " << cms::convert2mm(halfZBCool) - << ":0:" << cms::convert2mm(mbCoolTube.innDiam / 2) << ":0:360"; + << ":0:" << cms::convert2mm(mbCoolTube.innDiam * 0.5) << ":0:360"; #endif Volume mBWaLog = Volume(mBWaName, mBCoolTubeWaSolid, ns.material(backPipe.waterMat)); mBLog.placeVolume(mBWaLog, copyOne); @@ -2717,12 +2679,12 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext backCoolLog.placeVolume(mBLog, 2 * j + 1, Transform3D(Rotation3D(), - Position(-backCoolHeight / 2.0 + mbCoolTube.outDiam / 2., + Position(-backCoolHeight * 0.5 + mbCoolTube.outDiam * 0.5, -bHalfWidth + (j + 1) * bHalfWidth / 5, 0))); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << mBLog.name() << ":" << (2 * j + 1) << " positioned in " << backCoolLog.name() - << " at (" << cms::convert2mm(-backCoolHeight / 2.0 + mbCoolTube.outDiam / 2.) + << " at (" << cms::convert2mm(-backCoolHeight * 0.5 + mbCoolTube.outDiam * 0.5) << "," << cms::convert2mm(-bHalfWidth + (j + 1) * bHalfWidth / 5) << ",0) with no rotation"; #endif @@ -2738,14 +2700,19 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext string bPipeName(backPipe.name + "_" + std::to_string(iMod + 1)); string bInnerName(backPipe.name + "_H2O_" + std::to_string(iMod + 1)); - Solid backPipeSolid = Tube(bPipeName, 0, backPipe.vecDiam[iMod] / 2, pipeLength / 2, 0_deg, 360_deg); - Solid backInnerSolid = - Tube(bInnerName, 0, backPipe.vecDiam[iMod] / 2 - backPipe.vecThick[iMod], pipeLength / 2, 0_deg, 360_deg); -#ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << bPipeName << " Tubs " << cms::convert2mm(pipeLength / 2) - << ":0:" << cms::convert2mm(backPipe.vecDiam[iMod] / 2) << ":0:360"; - edm::LogVerbatim("EBGeom") << bInnerName << " Tubs " << cms::convert2mm(pipeLength / 2) - << ":0:" << cms::convert2mm(backPipe.vecDiam[iMod] / 2 - backPipe.vecThick[iMod]) + Solid backPipeSolid = + Tube(bPipeName, 0 * dd4hep::mm, backPipe.vecDiam[iMod] * 0.5, pipeLength * 0.5, 0._deg, 360._deg); + Solid backInnerSolid = Tube(bInnerName, + 0 * dd4hep::mm, + backPipe.vecDiam[iMod] * 0.5 - backPipe.vecThick[iMod], + pipeLength * 0.5, + 0._deg, + 360._deg); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("EBGeom") << bPipeName << " Tubs " << cms::convert2mm(pipeLength * 0.5) + << ":0:" << cms::convert2mm(backPipe.vecDiam[iMod] * 0.5) << ":0:360"; + edm::LogVerbatim("EBGeom") << bInnerName << " Tubs " << cms::convert2mm(pipeLength * 0.5) + << ":0:" << cms::convert2mm(backPipe.vecDiam[iMod] * 0.5 - backPipe.vecThick[iMod]) << ":0:360"; #endif @@ -2753,24 +2720,25 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext Volume backInnerLog = Volume(bInnerName, backInnerSolid, ns.material(backPipe.waterMat)); const Position bPipeTra1(back.xOff + back.sideHeight - 0.7 * backPipe.vecDiam[iMod], - back.yOff + back.plateWidth / 2 - back.sideWidth - 0.7 * backPipe.vecDiam[iMod], + back.yOff + back.plateWidth * 0.5 - back.sideWidth - 0.7 * backPipe.vecDiam[iMod], pipeZPos); - spmLog.placeVolume(backPipeLog, copyOne, Transform3D(Rotation3D(), bPipeTra1)); + ns.assembly(spm.name).placeVolume(backPipeLog, copyOne, Transform3D(Rotation3D(), bPipeTra1)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << backPipeLog.name() << ":" << copyOne << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm(bPipeTra1.x()) << "," - << cms::convert2mm(bPipeTra1.y()) << "," << cms::convert2mm(bPipeTra1.z()) + edm::LogVerbatim("EBGeomX") << backPipeLog.name() << ":" << copyOne << " positioned in " + << ns.assembly(spm.name).name() << " at (" << cms::convert2mm(bPipeTra1.x()) + << "," << cms::convert2mm(bPipeTra1.y()) << "," << cms::convert2mm(bPipeTra1.z()) << ") with no rotation"; #endif - const Position bPipeTra2( - bPipeTra1.x(), back.yOff - back.plateWidth / 2 + back.sideWidth + backPipe.vecDiam[iMod], bPipeTra1.z()); + const Position bPipeTra2(bPipeTra1.x(), + back.yOff - back.plateWidth * 0.5 + back.sideWidth + backPipe.vecDiam[iMod], + bPipeTra1.z()); - spmLog.placeVolume(backPipeLog, copyTwo, Transform3D(Rotation3D(), bPipeTra2)); + ns.assembly(spm.name).placeVolume(backPipeLog, copyTwo, Transform3D(Rotation3D(), bPipeTra2)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << backPipeLog.name() << ":" << copyTwo << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm(bPipeTra2.x()) << "," - << cms::convert2mm(bPipeTra2.y()) << "," << cms::convert2mm(bPipeTra2.z()) + edm::LogVerbatim("EBGeomX") << backPipeLog.name() << ":" << copyTwo << " positioned in " + << ns.assembly(spm.name).name() << " at (" << cms::convert2mm(bPipeTra2.x()) + << "," << cms::convert2mm(bPipeTra2.y()) << "," << cms::convert2mm(bPipeTra2.z()) << ") with no rotation"; #endif @@ -2791,36 +2759,36 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext if (0 != dryAirTube.here) { string dryAirTubName(dryAirTube.name + std::to_string(iMod + 1)); - Solid dryAirTubeSolid = - Tube(dryAirTubName, dryAirTube.innDiam / 2, dryAirTube.outDiam / 2, pipeLength / 2, 0_deg, 360_deg); + Solid dryAirTubeSolid = Tube( + dryAirTubName, dryAirTube.innDiam * 0.5, dryAirTube.outDiam * 0.5, pipeLength * 0.5, 0._deg, 360._deg); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << dryAirTubName << " Tubs " << cms::convert2mm(pipeLength / 2) << ":" - << cms::convert2mm(dryAirTube.innDiam / 2) << ":" - << cms::convert2mm(dryAirTube.outDiam / 2) << ":0:360"; + edm::LogVerbatim("EBGeom") << dryAirTubName << " Tubs " << cms::convert2mm(pipeLength * 0.5) << ":" + << cms::convert2mm(dryAirTube.innDiam * 0.5) << ":" + << cms::convert2mm(dryAirTube.outDiam * 0.5) << ":0:360"; #endif Volume dryAirTubeLog = Volume((myns + dryAirTubName), dryAirTubeSolid, ns.material(dryAirTube.mat)); const Position dryAirTubeTra1(back.xOff + back.sideHeight - 0.7 * dryAirTube.outDiam - backPipe.vecDiam[iMod], - back.yOff + back.plateWidth / 2 - back.sideWidth - 1.2 * dryAirTube.outDiam, + back.yOff + back.plateWidth * 0.5 - back.sideWidth - 1.2 * dryAirTube.outDiam, pipeZPos); - spmLog.placeVolume(dryAirTubeLog, copyOne, Transform3D(Rotation3D(), dryAirTubeTra1)); + ns.assembly(spm.name).placeVolume(dryAirTubeLog, copyOne, Transform3D(Rotation3D(), dryAirTubeTra1)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << dryAirTubeLog.name() << ":" << copyOne << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm(dryAirTubeTra1.x()) << "," - << cms::convert2mm(dryAirTubeTra1.y()) << "," + edm::LogVerbatim("EBGeomX") << dryAirTubeLog.name() << ":" << copyOne << " positioned in " + << ns.assembly(spm.name).name() << " at (" << cms::convert2mm(dryAirTubeTra1.x()) + << "," << cms::convert2mm(dryAirTubeTra1.y()) << "," << cms::convert2mm(dryAirTubeTra1.z()) << ") with no rotation"; #endif const Position dryAirTubeTra2(dryAirTubeTra1.x(), - back.yOff - back.plateWidth / 2 + back.sideWidth + 0.7 * dryAirTube.outDiam, + back.yOff - back.plateWidth * 0.5 + back.sideWidth + 0.7 * dryAirTube.outDiam, dryAirTubeTra1.z()); - spmLog.placeVolume(dryAirTubeLog, copyTwo, Transform3D(Rotation3D(), dryAirTubeTra2)); + ns.assembly(spm.name).placeVolume(dryAirTubeLog, copyTwo, Transform3D(Rotation3D(), dryAirTubeTra2)); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << dryAirTubeLog.name() << ":" << copyTwo << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm(dryAirTubeTra2.x()) << "," - << cms::convert2mm(dryAirTubeTra2.y()) << "," + edm::LogVerbatim("EBGeomX") << dryAirTubeLog.name() << ":" << copyTwo << " positioned in " + << ns.assembly(spm.name).name() << " at (" << cms::convert2mm(dryAirTubeTra2.x()) + << "," << cms::convert2mm(dryAirTubeTra2.y()) << "," << cms::convert2mm(dryAirTubeTra2.z()) << ") with no rotation"; #endif } @@ -2832,7 +2800,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - Position cTra(backCool.barHeight / 2. - backCoolHeight / 2. + bottomThick, 0, -halfZTank + halfZCoolVFE); + Position cTra(backCool.barHeight * 0.5 - backCoolHeight * 0.5 + bottomThick, 0, -halfZTank + halfZCoolVFE); const unsigned int numSec(static_cast(backCool.vecBackCoolNSec[iMod])); for (unsigned int jSec(0); jSec != numSec; ++jSec) { const unsigned int nMax(static_cast(backCool.vecBackCoolNPerSec[iNSec++])); @@ -2874,8 +2842,9 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext patchHeight += patchPanel.vecThick[iPatch]; } - array patchParms{ - {patchHeight / 2., backCool.barWidth / 2., (spm.vecZPts.back() - grille.vecZOff.back() - grille.thick) / 2}}; + array patchParms{{patchHeight * 0.5, + backCool.barWidth * 0.5, + (spm.vecZPts.back() - grille.vecZOff.back() - grille.thick) / 2}}; Solid patchSolid = Box(patchParms[0], patchParms[1], patchParms[2]); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << patchPanel.name << " Box " << cms::convert2mm(patchParms[0]) << ":" @@ -2883,27 +2852,28 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext #endif Volume patchLog = Volume(patchPanel.name, patchSolid, ns.material(spm.mat)); - const Position patchTra(back.xOff + 4 * dd4hep::mm, 0, grille.vecZOff.back() + grille.thick + patchParms[2]); + const Position patchTra( + back.xOff + 4 * dd4hep::mm, 0 * dd4hep::mm, grille.vecZOff.back() + grille.thick + patchParms[2]); if (0 != patchPanel.here) { - spmLog.placeVolume(patchLog, copyOne, patchTra); + ns.assembly(spm.name).placeVolume(patchLog, copyOne, patchTra); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeomX") << patchLog.name() << ":" << copyOne << " positioned in " << spmLog.name() - << " at (" << cms::convert2mm(patchTra.x()) << "," << cms::convert2mm(patchTra.y()) - << "," << cms::convert2mm(patchTra.z()) << ") with no rotation"; + edm::LogVerbatim("EBGeomX") << patchLog.name() << ":" << copyOne << " positioned in " << spm.name << " at (" + << cms::convert2mm(patchTra.x()) << "," << cms::convert2mm(patchTra.y()) << "," + << cms::convert2mm(patchTra.z()) << ") with no rotation"; #endif } Position pTra(-patchParms[0], 0, 0); for (unsigned int j(0); j != patchPanel.vecNames.size(); ++j) { - Solid pSolid = Box(patchPanel.vecThick[j] / 2., patchParms[1], patchParms[2]); + Solid pSolid = Box(patchPanel.vecThick[j] * 0.5, patchParms[1], patchParms[2]); #ifdef EDM_ML_DEBUG - edm::LogVerbatim("EBGeom") << patchPanel.vecNames[j] << " Box " << cms::convert2mm(patchPanel.vecThick[j] / 2.) + edm::LogVerbatim("EBGeom") << patchPanel.vecNames[j] << " Box " << cms::convert2mm(patchPanel.vecThick[j] * 0.5) << ":" << cms::convert2mm(patchParms[1]) << ":" << cms::convert2mm(patchParms[2]); #endif Volume pLog = Volume(patchPanel.vecNames[j], pSolid, ns.material(patchPanel.vecMat[j])); - pTra += Position(patchPanel.vecThick[j] / 2, 0, 0); + pTra += Position(patchPanel.vecThick[j] * 0.5, 0 * dd4hep::mm, 0 * dd4hep::mm); patchLog.placeVolume(pLog, copyOne, pTra); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << pLog.name() << ":" << copyOne << " positioned in " << patchLog.name() << " at (" @@ -2911,7 +2881,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext << cms::convert2mm(pTra.z()) << ") with no rotation"; #endif - pTra += Position(patchPanel.vecThick[j] / 2, 0, 0); + pTra += Position(patchPanel.vecThick[j] * 0.5, 0 * dd4hep::mm, 0 * dd4hep::mm); } //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -2958,7 +2928,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext << ") with no rotation"; #endif - array cutParms{{pincer.cutWidth / 2., pincer.cutHeight / 2., pincer.blkLengthHalf}}; + array cutParms{{pincer.cutWidth * 0.5, pincer.cutHeight * 0.5, pincer.blkLengthHalf}}; Solid cutSolid = Box(pincer.cutName, cutParms[0], cutParms[1], cutParms[2]); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << pincer.cutName << " Box " << cms::convert2mm(cutParms[0]) << ":" @@ -2976,7 +2946,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext pincer.shim2Width) << "," << cms::convert2mm(-blkParms[1] + cutParms[1]) << ",0) with no rotation"; #endif - array shim2Parms{{pincer.shim2Width / 2., pincer.shimHeight / 2., pincer.blkLengthHalf}}; + array shim2Parms{{pincer.shim2Width * 0.5, pincer.shimHeight * 0.5, pincer.blkLengthHalf}}; Solid shim2Solid = Box(pincer.shim2Name, shim2Parms[0], shim2Parms[1], shim2Parms[2]); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << pincer.shim2Name << " Box " << cms::convert2mm(shim2Parms[0]) << ":" @@ -2991,7 +2961,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext #endif array shim1Parms{ - {pincer.shim1Width / 2., pincer.shimHeight / 2., pincer.envLengthHalf - pincer.blkLengthHalf}}; + {pincer.shim1Width * 0.5, pincer.shimHeight * 0.5, pincer.envLengthHalf - pincer.blkLengthHalf}}; Solid shim1Solid = Box(pincer.shim1Name, shim1Parms[0], shim1Parms[1], shim1Parms[2]); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeom") << pincer.shim1Name << " Box " << cms::convert2mm(shim1Parms[0]) << ":" @@ -3031,7 +3001,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext 1 + iRod, Transform3D(myrot(ns, pincer.rodName + std::to_string(iRod), - CLHEP::HepRotationZ(90_deg + pincer.vecRodAzimuth[iRod])), + CLHEP::HepRotationZ(90._deg + pincer.vecRodAzimuth[iRod])), rodTra)); #ifdef EDM_ML_DEBUG edm::LogVerbatim("EBGeomX") << rodLog.name() << ":" << (1 + iRod) << " positioned in " << xilyLog.name() diff --git a/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc b/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc index 19d72569e3d6c..922a6fd7b2a78 100644 --- a/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc +++ b/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc @@ -38,13 +38,18 @@ uint32_t EcalBarrelNumberingScheme::getUnitID(const EcalBaseNumber& baseNumber) uint32_t wallCopy(0), hawCopy(0), fawCopy(0), supmCopy(0); const int off(13 < nLevels ? 3 : 0); - if (nLevels != 11) { + if ((nLevels != 11) && (nLevels != 14)) { wallCopy = baseNumber.getCopyNumber(3 + off); hawCopy = baseNumber.getCopyNumber(4 + off); fawCopy = baseNumber.getCopyNumber(5 + off); supmCopy = baseNumber.getCopyNumber(6 + off); } else { - wallCopy = baseNumber.getCopyNumber(3); + auto num1 = numbers(baseNumber.getLevelName(3 + off)); + wallCopy = num1.second; + hawCopy = num1.first; + auto num2 = numbers(baseNumber.getLevelName(4 + off)); + fawCopy = num2.second; + supmCopy = num2.first; } #ifdef EDM_ML_DEBUG edm::LogVerbatim("EcalGeom") << nLevels << " off: " << off << " cryType: " << cryType << " wallCopy: " << wallCopy @@ -116,3 +121,23 @@ uint32_t EcalBarrelNumberingScheme::getUnitID(const EcalBaseNumber& baseNumber) #endif return intindex; } + +std::pair EcalBarrelNumberingScheme::numbers(const std::string& name) const { + int num1(-1), num2(-1); + if (name.find('#') != std::string::npos) { + uint32_t ip1 = name.find('#'); + if (name.find('!') != std::string::npos) { + uint32_t ip2 = name.find('!'); + num1 = ::atoi(name.substr(ip1 + 1, ip2 - ip1 - 1).c_str()); + if (name.find('#', ip2) != std::string::npos) { + uint32_t ip3 = name.find('#', ip2); + num2 = ::atoi(name.substr(ip3 + 1, name.size() - ip3 - 1).c_str()); + } + } + } +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("EcalGeom") << "EcalBarrelNumberingScheme::Numbers from " << name << " are " << num1 << " and " + << num2; +#endif + return std::make_pair(num1, num2); +} diff --git a/PhysicsTools/UtilAlgos/test/fwliteWithPythonConfig_cfg.py b/PhysicsTools/UtilAlgos/test/fwliteWithPythonConfig_cfg.py index 714cf902f2597..abb3931bb1aa1 100644 --- a/PhysicsTools/UtilAlgos/test/fwliteWithPythonConfig_cfg.py +++ b/PhysicsTools/UtilAlgos/test/fwliteWithPythonConfig_cfg.py @@ -3,7 +3,7 @@ process = cms.PSet() process.fwliteInput = cms.PSet( - fileNames = cms.vstring('root://eoscms.cern.ch//eos/cms/store/relval/CMSSW_7_2_0_pre5/RelValProdTTbar/GEN-SIM-RECO/START72_V1-v1/00000/022350A9-AC30-E411-B225-0025905A6076.root'), ## mandatory + fileNames = cms.vstring('root://eoscms.cern.ch//eos/cms/store/user/cmsbuild/store/relval/CMSSW_9_3_0_pre1/RelValTTbar_13/GEN-SIM-RECO/PU25ns_92X_upgrade2017_realistic_v7-v1/00000/32EA1438-3D61-E711-8FE7-0025905B85B2.root'), ## mandatory maxEvents = cms.int32(100), ## optional outputEvery = cms.uint32(10), ## optional ) diff --git a/RecoHGCal/Configuration/python/RecoHGCal_EventContent_cff.py b/RecoHGCal/Configuration/python/RecoHGCal_EventContent_cff.py index 7e0076bb947bb..62ae794e85ecc 100644 --- a/RecoHGCal/Configuration/python/RecoHGCal_EventContent_cff.py +++ b/RecoHGCal/Configuration/python/RecoHGCal_EventContent_cff.py @@ -3,6 +3,7 @@ #AOD content TICL_AOD = cms.PSet( + # 13/04/2021 Felice: MultiClusters will be deprecated soon outputCommands = cms.untracked.vstring( 'keep *_ticlMultiClustersFromTrackstersEM_*_*', 'keep *_ticlMultiClustersFromTrackstersHAD_*_*', @@ -10,6 +11,7 @@ 'keep *_ticlMultiClustersFromTrackstersTrkEM_*_*', 'keep *_ticlMultiClustersFromTrackstersMIP_*_*', 'keep *_ticlMultiClustersFromTrackstersMerge_*_*', + 'keep *_ticlMultiClustersFromSimTracksters_*_*', ) ) @@ -35,6 +37,7 @@ # FEVT Content TICL_FEVT = cms.PSet( outputCommands = cms.untracked.vstring( + 'keep *_ticlSimTracksters_*_*', ) ) TICL_FEVT.outputCommands.extend(TICL_RECO.outputCommands) diff --git a/RecoHGCal/TICL/plugins/BuildFile.xml b/RecoHGCal/TICL/plugins/BuildFile.xml index 00c267848b23e..c3b923786d3f3 100644 --- a/RecoHGCal/TICL/plugins/BuildFile.xml +++ b/RecoHGCal/TICL/plugins/BuildFile.xml @@ -1,18 +1,36 @@ - - - - - - + + + - + + + + + - + + + + + + + + + + + + + + + + + + diff --git a/RecoHGCal/TICL/plugins/TrackstersFromSimClustersProducer.cc b/RecoHGCal/TICL/plugins/TrackstersFromSimClustersProducer.cc new file mode 100644 index 0000000000000..3b0a75ee1a283 --- /dev/null +++ b/RecoHGCal/TICL/plugins/TrackstersFromSimClustersProducer.cc @@ -0,0 +1,151 @@ +// Author: Felice Pantaleo - felice.pantaleo@cern.ch +// Date: 02/2021 + +// user include files + +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" + +#include "DataFormats/CaloRecHit/interface/CaloCluster.h" +#include "DataFormats/ParticleFlowReco/interface/PFCluster.h" + +#include "DataFormats/HGCalReco/interface/Trackster.h" + +#include "DataFormats/Common/interface/ValueMap.h" +#include "SimDataFormats/Associations/interface/LayerClusterToSimClusterAssociator.h" +#include "SimDataFormats/CaloAnalysis/interface/SimCluster.h" +#include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h" + +#include "TrackstersPCA.h" +#include +#include +#include +using namespace ticl; + +namespace { + Trackster::ParticleType tracksterParticleTypeFromPdgId(int pdgId, int charge) { + if (pdgId == 111) { + return Trackster::ParticleType::neutral_pion; + } else { + pdgId = std::abs(pdgId); + if (pdgId == 22) { + return Trackster::ParticleType::photon; + } else if (pdgId == 11) { + return Trackster::ParticleType::electron; + } else if (pdgId == 13) { + return Trackster::ParticleType::muon; + } else { + bool isHadron = (pdgId > 100 and pdgId < 900) or (pdgId > 1000 and pdgId < 9000); + if (isHadron) { + if (charge != 0) { + return Trackster::ParticleType::charged_hadron; + } else { + return Trackster::ParticleType::neutral_hadron; + } + } else { + return Trackster::ParticleType::unknown; + } + } + } + } +} // namespace + +class TrackstersFromSimClustersProducer : public edm::stream::EDProducer<> { +public: + explicit TrackstersFromSimClustersProducer(const edm::ParameterSet&); + ~TrackstersFromSimClustersProducer() override {} + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + void produce(edm::Event&, const edm::EventSetup&) override; + +private: + std::string detector_; + const bool doNose_ = false; + const edm::EDGetTokenT> clusters_token_; + const edm::EDGetTokenT>> clustersTime_token_; + const edm::EDGetTokenT> filtered_layerclusters_mask_token_; + + edm::EDGetTokenT> simclusters_token_; + + edm::InputTag associatorLayerClusterSimCluster_; + edm::EDGetTokenT associatorMapSimToReco_token_; + edm::ESGetToken geom_token_; + hgcal::RecHitTools rhtools_; +}; +DEFINE_FWK_MODULE(TrackstersFromSimClustersProducer); + +TrackstersFromSimClustersProducer::TrackstersFromSimClustersProducer(const edm::ParameterSet& ps) + : detector_(ps.getParameter("detector")), + doNose_(detector_ == "HFNose"), + clusters_token_(consumes>(ps.getParameter("layer_clusters"))), + clustersTime_token_( + consumes>>(ps.getParameter("time_layerclusters"))), + filtered_layerclusters_mask_token_(consumes>(ps.getParameter("filtered_mask"))), + simclusters_token_(consumes>(ps.getParameter("simclusters"))), + associatorLayerClusterSimCluster_(ps.getUntrackedParameter("layerClusterSimClusterAssociator")), + associatorMapSimToReco_token_( + consumes(associatorLayerClusterSimCluster_)), + geom_token_(esConsumes()) { + produces>(); + produces>(); +} + +void TrackstersFromSimClustersProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + // hgcalMultiClusters + edm::ParameterSetDescription desc; + desc.add("detector", "HGCAL"); + desc.add("layer_clusters", edm::InputTag("hgcalLayerClusters")); + desc.add("time_layerclusters", edm::InputTag("hgcalLayerClusters", "timeLayerCluster")); + desc.add("filtered_mask", edm::InputTag("filteredLayerClustersSimTracksters", "ticlSimTracksters")); + desc.add("simclusters", edm::InputTag("mix", "MergedCaloTruth")); + desc.addUntracked("layerClusterSimClusterAssociator", + edm::InputTag("layerClusterSimClusterAssociationProducer")); + descriptions.add("trackstersFromSimClustersProducer", desc); +} + +void TrackstersFromSimClustersProducer::produce(edm::Event& evt, const edm::EventSetup& es) { + auto result = std::make_unique>(); + auto output_mask = std::make_unique>(); + const auto& layerClusters = evt.get(clusters_token_); + const auto& layerClustersTimes = evt.get(clustersTime_token_); + const auto& inputClusterMask = evt.get(filtered_layerclusters_mask_token_); + output_mask->resize(layerClusters.size(), 1.f); + + const auto& simclusters = evt.get(simclusters_token_); + const auto& simToRecoColl = evt.get(associatorMapSimToReco_token_); + + const auto& geom = es.getData(geom_token_); + rhtools_.setGeometry(geom); + auto num_simclusters = simclusters.size(); + result->reserve(num_simclusters); + for (const auto& [key, values] : simToRecoColl) { + auto const& sc = *(key); + auto simClusterIndex = &sc - &simclusters[0]; + Trackster tmpTrackster; + tmpTrackster.zeroProbabilities(); + tmpTrackster.vertices().reserve(values.size()); + tmpTrackster.vertex_multiplicity().reserve(values.size()); + + for (auto const& [lc, energyScorePair] : values) { + if (inputClusterMask[lc.index()] > 0) { + tmpTrackster.vertices().push_back(lc.index()); + double fraction = energyScorePair.first / lc->energy(); + (*output_mask)[lc.index()] -= fraction; + tmpTrackster.vertex_multiplicity().push_back(static_cast(std::clamp(1. / fraction, 0., 255.))); + } + } + tmpTrackster.setIdProbability(tracksterParticleTypeFromPdgId(sc.pdgId(), sc.charge()), 1.f); + tmpTrackster.setSeed(key.id(), simClusterIndex); + result->emplace_back(tmpTrackster); + } + ticl::assignPCAtoTracksters( + *result, layerClusters, layerClustersTimes, rhtools_.getPositionLayer(rhtools_.lastLayerEE(doNose_)).z()); + evt.put(std::move(result)); + evt.put(std::move(output_mask)); +} diff --git a/RecoHGCal/TICL/python/SimTracksters_cff.py b/RecoHGCal/TICL/python/SimTracksters_cff.py new file mode 100644 index 0000000000000..8aa9d1a9fd8c7 --- /dev/null +++ b/RecoHGCal/TICL/python/SimTracksters_cff.py @@ -0,0 +1,31 @@ +import FWCore.ParameterSet.Config as cms + +from RecoHGCal.TICL.trackstersFromSimClustersProducer_cfi import trackstersFromSimClustersProducer as _trackstersFromSimClustersProducer +from RecoHGCal.TICL.multiClustersFromTrackstersProducer_cfi import multiClustersFromTrackstersProducer as _multiClustersFromTrackstersProducer +from RecoHGCal.TICL.filteredLayerClustersProducer_cfi import filteredLayerClustersProducer as _filteredLayerClustersProducer + + +# CA - PATTERN RECOGNITION + + +filteredLayerClustersSimTracksters = _filteredLayerClustersProducer.clone( + clusterFilter = "ClusterFilterByAlgoAndSize", + algo_number = 8, + min_cluster_size = 0, # inclusive + iteration_label = "ticlSimTracksters" +) + +ticlSimTracksters = _trackstersFromSimClustersProducer.clone( +) + +from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2 +premix_stage2.toModify(ticlSimTracksters, + simclusters = "mixData:MergedCaloTruth" +) + +ticlMultiClustersFromSimTracksters = _multiClustersFromTrackstersProducer.clone( + Tracksters = "ticlSimTracksters" +) + +ticlSimTrackstersTask = cms.Task(filteredLayerClustersSimTracksters, ticlSimTracksters, ticlMultiClustersFromSimTracksters) + diff --git a/RecoHGCal/TICL/python/iterativeTICL_cff.py b/RecoHGCal/TICL/python/iterativeTICL_cff.py index 3fdf588e188a5..7ea82224b5611 100644 --- a/RecoHGCal/TICL/python/iterativeTICL_cff.py +++ b/RecoHGCal/TICL/python/iterativeTICL_cff.py @@ -5,6 +5,7 @@ from RecoHGCal.TICL.TrkStep_cff import * from RecoHGCal.TICL.EMStep_cff import * from RecoHGCal.TICL.HADStep_cff import * + from RecoHGCal.TICL.ticlLayerTileProducer_cfi import ticlLayerTileProducer from RecoHGCal.TICL.pfTICLProducer_cfi import pfTICLProducer as _pfTICLProducer from RecoHGCal.TICL.trackstersMergeProducer_cfi import trackstersMergeProducer as _trackstersMergeProducer diff --git a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTrigPrimESDoubleWeights_cff.py b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTrigPrimESDoubleWeights_cff.py deleted file mode 100644 index aa9d2fa118561..0000000000000 --- a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTrigPrimESDoubleWeights_cff.py +++ /dev/null @@ -1,15 +0,0 @@ -import FWCore.ParameterSet.Config as cms -from CondCore.CondDB.CondDB_cfi import * - -CondDB.connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') - -EcalTPGDoubleWeightRecords = cms.ESSource("PoolDBESSource",CondDB, - toGet = cms.VPSet( - cms.PSet(record = cms.string("EcalTPGOddWeightGroupRcd"), - tag = cms.string("EcalTPGOddWeightGroup_mc")), - cms.PSet(record = cms.string("EcalTPGOddWeightIdMapRcd"), - tag = cms.string("EcalTPGOddWeightIdMap_mc")), - cms.PSet(record = cms.string("EcalTPGTPModeRcd"), - tag = cms.string("EcalTPGTPMode_mc")), - ) - ) diff --git a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_cff.py b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_cff.py index e32ea15ffae0f..1b23381a89e18 100644 --- a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_cff.py +++ b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_cff.py @@ -9,9 +9,6 @@ # #from SimCalorimetry.EcalTrigPrimProducers.ecalTrigPrimESProducer_cff import * -# Import the records for the new odd weights from tags not yet in the GT -from SimCalorimetry.EcalTrigPrimProducers.ecalTrigPrimESDoubleWeights_cff import * - #Common from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal phase2_hgcal.toModify( simEcalTriggerPrimitiveDigis, BarrelOnly = cms.bool(True) ) diff --git a/SimDataFormats/Associations/interface/LayerClusterToSimClusterAssociator.h b/SimDataFormats/Associations/interface/LayerClusterToSimClusterAssociator.h index a5509353f22a8..094db05e3ba5d 100644 --- a/SimDataFormats/Associations/interface/LayerClusterToSimClusterAssociator.h +++ b/SimDataFormats/Associations/interface/LayerClusterToSimClusterAssociator.h @@ -19,8 +19,11 @@ namespace hgcal { LayerClusterToSimClusterAssociator() = default; LayerClusterToSimClusterAssociator(LayerClusterToSimClusterAssociator &&) = default; LayerClusterToSimClusterAssociator &operator=(LayerClusterToSimClusterAssociator &&) = default; - ~LayerClusterToSimClusterAssociator() = default; + LayerClusterToSimClusterAssociator(const LayerClusterToSimClusterAssociator &) = delete; // stop default + ~LayerClusterToSimClusterAssociator() = default; + const LayerClusterToSimClusterAssociator &operator=(const LayerClusterToSimClusterAssociator &) = + delete; // stop default // ---------- const member functions --------------------- /// Associate a LayerCluster to SimClusters hgcal::RecoToSimCollectionWithSimClusters associateRecoToSim(const edm::Handle &cCCH, @@ -35,11 +38,6 @@ namespace hgcal { } private: - LayerClusterToSimClusterAssociator(const LayerClusterToSimClusterAssociator &) = delete; // stop default - - const LayerClusterToSimClusterAssociator &operator=(const LayerClusterToSimClusterAssociator &) = - delete; // stop default - // ---------- member data -------------------------------- std::unique_ptr m_impl; }; diff --git a/SimPPS/Configuration/test/gluglu_step1_GEN_SIM_2021.py b/SimPPS/Configuration/test/gluglu_step1_GEN_SIM_2021.py index feb3216d5130f..b4f3b984f4f72 100644 --- a/SimPPS/Configuration/test/gluglu_step1_GEN_SIM_2021.py +++ b/SimPPS/Configuration/test/gluglu_step1_GEN_SIM_2021.py @@ -7,7 +7,6 @@ process = cms.Process('SIM',eras.Run3) # import of standard configurations -process.load("CondCore.CondDB.CondDB_cfi") process.load('Configuration.StandardSequences.Services_cff') process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') process.load('FWCore.MessageService.MessageLogger_cfi') @@ -19,8 +18,7 @@ process.load('Configuration.StandardSequences.SimIdeal_cff') process.load('Configuration.StandardSequences.EndOfProcess_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') - -process.load('Configuration.Geometry.GeometryExtended2021_cff') +process.load('Configuration.StandardSequences.GeometrySimDB_cff') process.RandomNumberGeneratorService.generator.initialSeed = cms.untracked.uint32(random.randint(0,900000000)) @@ -33,38 +31,42 @@ ) process.source = cms.Source("EmptySource") -""" -process.source = cms.Source("EmptySource", - firstRun = cms.untracked.uint32(324612), #2018D - firstTime = cms.untracked.uint64(6612348794983940096) -) -""" + from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') -#process.GlobalTag = GlobalTag(process.GlobalTag, "106X_dataRun2_v26") - +""" +# Optical functions and LHCinfo tags in case the ones in the GT is not the desired ones +process.GlobalTag.toGet = cms.VPSet( + cms.PSet( + record = cms.string('LHCInfoRcd'), + tag = cms.string("LHCInfo_2021_mc_v1") + ), + cms.PSet( + record = cms.string('CTPPSOpticsRcd'), + tag = cms.string("PPSOpticalFunctions_2021_mc_v1") + ) + ) +""" # generator - - process.generator = cms.EDFilter("ExhumeGeneratorFilter", ExhumeParameters = cms.PSet( AlphaEw = cms.double(0.0072974), B = cms.double(4.0), - BottomMass = cms.double(4.6), - CharmMass = cms.double(1.42), - HiggsMass = cms.double(120.0), + MuonMass = cms.double(0.1057), + BottomMass = cms.double(4.65), + CharmMass = cms.double(1.28), + StrangeMass = cms.double(0.095), + TauMass = cms.double(1.78), + TopMass = cms.double(172.8), + WMass = cms.double(80.38), + ZMass = cms.double(91.187), + HiggsMass = cms.double(125.1), HiggsVev = cms.double(246.0), LambdaQCD = cms.double(80.0), MinQt2 = cms.double(0.64), - MuonMass = cms.double(0.1057), PDF = cms.double(11000), Rg = cms.double(1.2), - StrangeMass = cms.double(0.19), - Survive = cms.double(0.03), - TauMass = cms.double(1.77), - TopMass = cms.double(175.0), - WMass = cms.double(80.33), - ZMass = cms.double(91.187) + Survive = cms.double(0.03) ), ExhumeProcess = cms.PSet( MassRangeHigh = cms.double(2000.0), @@ -75,7 +77,7 @@ PythiaParameters = cms.PSet( parameterSets = cms.vstring() ), - comEnergy = cms.double(13000.0), + comEnergy = cms.double(14000.0), maxEventsToPrint = cms.untracked.int32(2), pythiaHepMCVerbosity = cms.untracked.bool(False), pythiaPylistVerbosity = cms.untracked.int32(1) @@ -88,7 +90,6 @@ version = cms.untracked.string('$Revision: 1.19 $') ) - process.ProductionFilterSequence = cms.Sequence(process.generator) ############ @@ -100,7 +101,6 @@ process.generation_step = cms.Path(process.pgen) process.simulation_step = cms.Path(process.psim) - process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) process.outpath = cms.EndPath(process.o1) process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.outpath) diff --git a/SimPPS/Configuration/test/gluglu_step2_DIGI_DIGI2RAW_2021.py b/SimPPS/Configuration/test/gluglu_step2_DIGI_DIGI2RAW_2021.py index cd6f1a903423e..0c064b2202850 100644 --- a/SimPPS/Configuration/test/gluglu_step2_DIGI_DIGI2RAW_2021.py +++ b/SimPPS/Configuration/test/gluglu_step2_DIGI_DIGI2RAW_2021.py @@ -8,9 +8,8 @@ process = cms.Process('DIGI2RAW',eras.Run3) # import of standard configurations -process.load("CondCore.CondDB.CondDB_cfi") process.load('Configuration.StandardSequences.Services_cff') -process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +#process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('Configuration.StandardSequences.MagneticField_cff') @@ -20,11 +19,7 @@ process.load('Configuration.StandardSequences.DigiToRaw_cff') process.load('Configuration.StandardSequences.EndOfProcess_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') - -# Since the PPS simulation geometry is not yet in the database, the line below is needed process.load('Configuration.StandardSequences.GeometryDB_cff') -#process.load("Geometry.VeryForwardGeometry.geometryPPS_CMSxz_fromDD_2021_cfi") -process.load("Geometry.VeryForwardGeometry.geometryRPFromDB_cfi") # Input source process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1)) @@ -70,8 +65,8 @@ filterName = cms.untracked.string('') ), eventAutoFlushCompressedSize = cms.untracked.int32(5242880), - fileName = cms.untracked.string('GluGlu_step2_DIGI_DIGI2RAW2021.root'), - outputCommands = process.FEVTDEBUGEventContent.outputCommands + ['keep *_CTPPS*_*_*',"keep *_*RP*_*_*",'keep *_LHCTransport_*_*'], + fileName = cms.untracked.string('GluGlu_step2_DIGI_DIGI2RAW_2021.root'), + outputCommands = process.FEVTDEBUGEventContent.outputCommands + ['keep *_CTPPS*_*_*',"keep *_*RP*_*_*",'keep *_generatorSmeared_*_*'], splitLevel = cms.untracked.int32(0) ) @@ -79,7 +74,6 @@ # Other statements from Configuration.AlCa.GlobalTag import GlobalTag -#process.GlobalTag = GlobalTag(process.GlobalTag, '111X_mcRun3_2021_realistic_Candidate_2020_06_03_17_55_10', '') process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') diff --git a/SimPPS/Configuration/test/gluglu_step3_RAW2DIGI_L1Reco_RECO_2021.py b/SimPPS/Configuration/test/gluglu_step3_RAW2DIGI_L1Reco_RECO_2021.py index 96ad558ba4ee3..1a9c2b201c679 100644 --- a/SimPPS/Configuration/test/gluglu_step3_RAW2DIGI_L1Reco_RECO_2021.py +++ b/SimPPS/Configuration/test/gluglu_step3_RAW2DIGI_L1Reco_RECO_2021.py @@ -12,26 +12,19 @@ process.load("Configuration.EventContent.EventContent_cff") process.load('Configuration.StandardSequences.MagneticField_cff') process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.RawToDigi_cff') +process.load('Configuration.StandardSequences.Reconstruction_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') process.load('Configuration.StandardSequences.GeometryDB_cff') -process.load("Geometry.VeryForwardGeometry.geometryRPFromDB_cfi") -#process.load("Geometry.VeryForwardGeometry.geometryPPS_CMSxz_fromDD_2021_cfi") # CMS frame process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) -process.source = cms.Source("EmptyIOVSource", - timetype = cms.string('runnumber'), - firstValue = cms.uint64(1), - lastValue = cms.uint64(1), - interval = cms.uint64(1) -) - # Input source process.source = cms.Source("PoolSource", - fileNames = cms.untracked.vstring('file:GluGlu_step2_DIGI_DIGI2RAW2021.root'), + fileNames = cms.untracked.vstring('file:GluGlu_step2_DIGI_DIGI2RAW_2021.root'), secondaryFileNames = cms.untracked.vstring() ) @@ -45,31 +38,18 @@ # Output definition process.output = cms.OutputModule("PoolOutputModule", - fileName = cms.untracked.string('GluGlu_step3_RAW2DIGI_RECO2021.root'), - outputCommands = cms.untracked.vstring("drop *","keep SimVertexs_g4SimHits_*_*","keep PSimHits*_*_*_*","keep CTPPS*_*_*_*","keep *_*RP*_*_*",'keep *_LHCTransport_*_*') + fileName = cms.untracked.string('GluGlu_step3_RAW2DIGI_RECO_2021.root'), + outputCommands = cms.untracked.vstring("drop *","keep SimVertexs_g4SimHits_*_*","keep PSimHits*_*_*_*","keep CTPPS*_*_*_*","keep *_*RP*_*_*",'keep *_generatorSmeared_*_*','keep recoForwardProtons_ctppsProtons_*_*') ) - # Additional output definition # Other statements from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') -# modify CTPPS 2018 raw-to-digi modules ONLY FOR PARTICLE GUN, TO AVOID RUN THIS FOR THE WHOLE CMS -process.load('Configuration.StandardSequences.RawToDigi_cff') - -# do not make testID for simulation - keeping the frame -from EventFilter.CTPPSRawToDigi.totemRPRawToDigi_cfi import totemRPRawToDigi -totemRPRawToDigi.RawToDigi.testID = cms.uint32(1) - -from RecoPPS.Local.totemRPLocalReconstruction_cff import totemRPLocalReconstruction -process.load('RecoPPS.Local.totemRPLocalReconstruction_cff') -from RecoPPS.Local.ctppsPixelLocalReconstruction_cff import ctppsPixelLocalReconstruction -process.load('RecoPPS.Local.ctppsPixelLocalReconstruction_cff') - # Path and EndPath definitions -process.raw2digi_step = cms.Path(process.ctppsRawToDigi) -process.reco_step = cms.Path(process.totemRPLocalReconstruction*process.ctppsPixelLocalReconstruction) +process.raw2digi_step = cms.Path(process.RawToDigi) +process.reco_step = cms.Path(process.reconstruction) process.endjob_step = cms.EndPath(process.endOfProcess) process.output_step = cms.EndPath(process.output) @@ -80,4 +60,3 @@ for path in process.paths: # getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq getattr(process,path)._seq = getattr(process,path)._seq - diff --git a/SimPPS/Configuration/test/pg_step1_GEN_SIM_2021.py b/SimPPS/Configuration/test/pg_step1_GEN_SIM_2021.py index 1683c82c0b6cf..1ad8cebdd9a27 100644 --- a/SimPPS/Configuration/test/pg_step1_GEN_SIM_2021.py +++ b/SimPPS/Configuration/test/pg_step1_GEN_SIM_2021.py @@ -7,7 +7,6 @@ process = cms.Process('SIM',eras.Run3) # import of standard configurations -process.load("CondCore.CondDB.CondDB_cfi") process.load('Configuration.StandardSequences.Services_cff') process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') process.load('FWCore.MessageService.MessageLogger_cfi') @@ -19,8 +18,7 @@ process.load('Configuration.StandardSequences.SimIdeal_cff') process.load('Configuration.StandardSequences.EndOfProcess_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') - -process.load('Configuration.Geometry.GeometryExtended2021_cff') +process.load('Configuration.StandardSequences.GeometrySimDB_cff') process.RandomNumberGeneratorService.generator.initialSeed = cms.untracked.uint32(random.randint(0,900000000)) @@ -33,25 +31,30 @@ ) process.source = cms.Source("EmptySource") -""" -process.source = cms.Source("EmptySource", - firstRun = cms.untracked.uint32(324612), #2018D - firstTime = cms.untracked.uint64(6612348794983940096) -) -""" from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') -#process.GlobalTag = GlobalTag(process.GlobalTag, "106X_dataRun2_v26") - -# generator +""" +# Optical functions and LHCinfo tags in case the ones in the GT are to be tested +process.GlobalTag.toGet = cms.VPSet( + cms.PSet( + record = cms.string('LHCInfoRcd'), + tag = cms.string("LHCInfo_2021_mc_v1") + ), + cms.PSet( + record = cms.string('CTPPSOpticsRcd'), + tag = cms.string("PPSOpticalFunctions_2021_mc_v1") + ) + ) +""" +# Generator phi_min = -math.pi phi_max = math.pi t_min = 0. t_max = 2. -xi_min = 0.03 -xi_max = 0.15 -ecms = 13000. +xi_min = 0.02 +xi_max = 0.20 +ecms = 14000. # ATTENTION: if using HECTOR propagator, currently the energy is hardcoded as 6500 but the optics file is prepared for 7 TeV process.generator = cms.EDProducer("RandomtXiGunProducer", PGunParameters = cms.PSet( @@ -90,4 +93,3 @@ # filter all path with the production filter sequence for path in process.paths: getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq - diff --git a/SimPPS/Configuration/test/pg_step2_DIGI_DIGI2RAW_2021.py b/SimPPS/Configuration/test/pg_step2_DIGI_DIGI2RAW_2021.py index ab5de7b118360..6b069aac41b1f 100644 --- a/SimPPS/Configuration/test/pg_step2_DIGI_DIGI2RAW_2021.py +++ b/SimPPS/Configuration/test/pg_step2_DIGI_DIGI2RAW_2021.py @@ -8,9 +8,8 @@ process = cms.Process('DIGI2RAW',eras.Run3) # import of standard configurations -process.load("CondCore.CondDB.CondDB_cfi") process.load('Configuration.StandardSequences.Services_cff') -process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +#process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('Configuration.StandardSequences.MagneticField_cff') @@ -20,11 +19,10 @@ process.load('Configuration.StandardSequences.DigiToRaw_cff') process.load('Configuration.StandardSequences.EndOfProcess_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +process.load('Configuration.StandardSequences.GeometryDB_cff') # Since the PPS simulation geometry is not yet in the database, the line below is needed -process.load('Configuration.StandardSequences.GeometryDB_cff') #process.load("Geometry.VeryForwardGeometry.geometryPPS_CMSxz_fromDD_2021_cfi") -process.load("Geometry.VeryForwardGeometry.geometryRPFromDB_cfi") # Input source process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1)) @@ -71,7 +69,7 @@ ), eventAutoFlushCompressedSize = cms.untracked.int32(5242880), fileName = cms.untracked.string('step2_DIGI_DIGI2RAW2021.root'), - outputCommands = process.FEVTDEBUGEventContent.outputCommands + ['keep *_CTPPS*_*_*',"keep *_*RP*_*_*",'keep *_LHCTransport_*_*'], + outputCommands = process.FEVTDEBUGEventContent.outputCommands + ['keep *_CTPPS*_*_*',"keep *_*RP*_*_*",'keep *_generatorSmeared_*_*'], splitLevel = cms.untracked.int32(0) ) @@ -79,7 +77,6 @@ # Other statements from Configuration.AlCa.GlobalTag import GlobalTag -#process.GlobalTag = GlobalTag(process.GlobalTag, '111X_mcRun3_2021_realistic_Candidate_2020_06_03_17_55_10', '') process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') diff --git a/SimPPS/Configuration/test/pg_step3_MCDB_RAW2DIGI_RECO_2021.py b/SimPPS/Configuration/test/pg_step3_MCDB_RAW2DIGI_RECO_2021.py index 0131e8b73d3e4..61ca9658f931c 100644 --- a/SimPPS/Configuration/test/pg_step3_MCDB_RAW2DIGI_RECO_2021.py +++ b/SimPPS/Configuration/test/pg_step3_MCDB_RAW2DIGI_RECO_2021.py @@ -13,22 +13,16 @@ process.load('Configuration.StandardSequences.MagneticField_cff') process.load('Configuration.StandardSequences.EndOfProcess_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +process.load('Configuration.StandardSequences.RawToDigi_cff') +process.load('Configuration.StandardSequences.Reconstruction_cff') process.load('Configuration.StandardSequences.GeometryDB_cff') -process.load("Geometry.VeryForwardGeometry.geometryRPFromDB_cfi") -#process.load("Geometry.VeryForwardGeometry.geometryPPS_CMSxz_fromDD_2021_cfi") # CMS frame - +#process.load("Geometry.VeryForwardGeometry.geometryRPFromDB_cfi") +#process.load("Geometry.VeryForwardGeometry.geometryPPS_CMSxz_fromDD_2018_cfi") # CMS frame, 2021 = 2018 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) -process.source = cms.Source("EmptyIOVSource", - timetype = cms.string('runnumber'), - firstValue = cms.uint64(1), - lastValue = cms.uint64(1), - interval = cms.uint64(1) -) - # Input source process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring('file:step2_DIGI_DIGI2RAW2021.root'), @@ -46,7 +40,7 @@ process.output = cms.OutputModule("PoolOutputModule", fileName = cms.untracked.string('step3_RAW2DIGI_RECO2021.root'), - outputCommands = cms.untracked.vstring("drop *","keep SimVertexs_g4SimHits_*_*","keep PSimHits*_*_*_*","keep CTPPS*_*_*_*","keep *_*RP*_*_*",'keep *_LHCTransport_*_*') + outputCommands = cms.untracked.vstring("drop *","keep SimVertexs_g4SimHits_*_*","keep PSimHits*_*_*_*","keep CTPPS*_*_*_*","keep *_*RP*_*_*",'keep *_generatorSmeared_*_*','keep recoForwardProtons_ctppsProtons_*_*') ) @@ -55,21 +49,9 @@ from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') -# modify CTPPS 2018 raw-to-digi modules ONLY FOR PARTICLE GUN, TO AVOID RUN THIS FOR THE WHOLE CMS -process.load('Configuration.StandardSequences.RawToDigi_cff') - -# do not make testID for simulation - keeping the frame -from EventFilter.CTPPSRawToDigi.totemRPRawToDigi_cfi import totemRPRawToDigi -totemRPRawToDigi.RawToDigi.testID = cms.uint32(1) - -from RecoPPS.Local.totemRPLocalReconstruction_cff import totemRPLocalReconstruction -process.load('RecoPPS.Local.totemRPLocalReconstruction_cff') -from RecoPPS.Local.ctppsPixelLocalReconstruction_cff import ctppsPixelLocalReconstruction -process.load('RecoPPS.Local.ctppsPixelLocalReconstruction_cff') - # Path and EndPath definitions -process.raw2digi_step = cms.Path(process.ctppsRawToDigi) -process.reco_step = cms.Path(process.totemRPLocalReconstruction*process.ctppsPixelLocalReconstruction) +process.raw2digi_step = cms.Path(process.RawToDigi) +process.reco_step = cms.Path(process.reconstruction) process.endjob_step = cms.EndPath(process.endOfProcess) process.output_step = cms.EndPath(process.output) @@ -80,4 +62,3 @@ for path in process.paths: # getattr(process,path)._seq = process.ProductionFilterSequence * getattr(process,path)._seq getattr(process,path)._seq = getattr(process,path)._seq - diff --git a/SimTransport/PPSProtonTransport/python/OpticalFunctionsConfig_cfi.py b/SimTransport/PPSProtonTransport/python/OpticalFunctionsConfig_cfi.py index cb0e15c647d56..166b591201a7b 100644 --- a/SimTransport/PPSProtonTransport/python/OpticalFunctionsConfig_cfi.py +++ b/SimTransport/PPSProtonTransport/python/OpticalFunctionsConfig_cfi.py @@ -125,6 +125,29 @@ ) ) +_config_2021 = cms.PSet( + opticalFunctionConfig = cms.PSet( + es_source = cms.PSet( + validityRange = cms.EventRange("0:min - 999999:max"), + opticalFunctions = cms.VPSet( + cms.PSet( xangle = cms.double(110.444), fileName = cms.FileInPath("CalibPPS/ESProducers/data/optical_functions/2021/version_pre3/110.444urad.root") ), + cms.PSet( xangle = cms.double(184.017), fileName = cms.FileInPath("CalibPPS/ESProducers/data/optical_functions/2021/version_pre3/184.017urad.root") ) + ) + ), + defaultCrossingAngle = cms.double(0.0) + ), + optics_parameters = cms.PSet( + empiricalAperture45_xi0_int = cms.double(0.079), + empiricalAperture45_xi0_slp = cms.double(4.211E-04), + empiricalAperture45_a_int = cms.double(42.8), + empiricalAperture45_a_slp = cms.double(0.669), + empiricalAperture56_xi0_int = cms.double(0.074), + empiricalAperture56_xi0_slp = cms.double(6.604E-04), + empiricalAperture56_a_int = cms.double(-22.7), + empiricalAperture56_a_slp = cms.double(1.600) + ) +) + _opticalfunctionsTransportSetup_2016_preTS2 =cms.PSet( opticalFunctionConfig = _config_2016_preTS2.opticalFunctionConfig, optics_parameters = cms.PSet(_baseOpticalFunctionsParameters,_config_2016_preTS2.optics_parameters) @@ -146,11 +169,17 @@ ) opticalfunctionsTransportSetup_2018 =cms.PSet( - opticalFunctionConfig = _config_2018.opticalFunctionConfig, - optics_parameters = cms.PSet(_baseOpticalFunctionsParameters, _config_2018.optics_parameters) + _baseOpticalFunctionsParameters, + _config_2018.opticalFunctionConfig, + _config_2018.optics_parameters +) + +opticalfunctionsTransportSetup_2021 =cms.PSet( + _baseOpticalFunctionsParameters, + _config_2021.opticalFunctionConfig, + _config_2021.optics_parameters ) # Default setup opticalfunctionsTransportSetup_2016 = _opticalfunctionsTransportSetup_2016_preTS2.clone() opticalfunctionsTransportSetup_2017 = _opticalfunctionsTransportSetup_2017_preTS2.clone() -opticalfunctionsTransportSetup_2021 = opticalfunctionsTransportSetup_2018.clone() diff --git a/SimTransport/PPSProtonTransport/python/PPSTransportESSources_cfi.py b/SimTransport/PPSProtonTransport/python/PPSTransportESSources_cfi.py index e4cbfd736e977..7e6afe9b0b041 100644 --- a/SimTransport/PPSProtonTransport/python/PPSTransportESSources_cfi.py +++ b/SimTransport/PPSProtonTransport/python/PPSTransportESSources_cfi.py @@ -1,19 +1,33 @@ import FWCore.ParameterSet.Config as cms # beam optics +from CondCore.CondDB.CondDB_cfi import * from CalibPPS.ESProducers.ctppsBeamParametersFromLHCInfoESSource_cfi import * from CalibPPS.ESProducers.ctppsInterpolatedOpticalFunctionsESSource_cfi import * ctppsInterpolatedOpticalFunctionsESSource.lhcInfoLabel = "" - -# For optical functions from root file, when they are not yet in the database, use the definitino below """ -from SimTransport.PPSProtonTransport.OpticalFunctionsConfig_cfi import * +# For optical functions and LHCinfo not yet in a GT, use the definitino below +ppsTransportESSource = cms.ESSource("PoolDBESSource") + +_ppsESSource2021 = cms.ESSource("PoolDBESSource", + connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'), + timetype = cms.untracked.string('runnumber'), + toGet = cms.VPSet( + cms.PSet( + record = cms.string('LHCInfoRcd'), + tag = cms.string("LHCInfo_2021_mc_v1") + ), + cms.PSet( + record = cms.string('CTPPSOpticsRcd'), + tag = cms.string("PPSOpticalFunctions_2021_mc_v1") + ) + ) +) -_opticsConfig = cms.PSet( - defaultCrossingAngle=cms.double(0.0), - es_source = cms.PSet() - ) +from Configuration.Eras.Modifier_ctpps_2021_cff import ctpps_2021 +ctpps_2021.toReplaceWith(ppsTransportESSource,_ppsESSource2021) +del _ppsESSource2021 from Configuration.Eras.Modifier_ctpps_2016_cff import ctpps_2016 ctpps_2016.toReplaceWith(_opticsConfig, opticalfunctionsTransportSetup_2016.opticalFunctionConfig) diff --git a/SimTransport/PPSProtonTransport/python/PPSTransport_cff.py b/SimTransport/PPSProtonTransport/python/PPSTransport_cff.py index c494fff3d885e..ed23c0fadb786 100644 --- a/SimTransport/PPSProtonTransport/python/PPSTransport_cff.py +++ b/SimTransport/PPSProtonTransport/python/PPSTransport_cff.py @@ -25,8 +25,10 @@ from Configuration.Eras.Modifier_ctpps_2018_cff import ctpps_2018 ctpps_2018.toReplaceWith(_LHCTransportPSet,_hector_2018) +#ctpps_2018.toReplaceWith(_LHCTransportPSet,_opticalfunctionsTransportSetup_2018) from Configuration.Eras.Modifier_ctpps_2021_cff import ctpps_2021 -ctpps_2021.toReplaceWith(_LHCTransportPSet, _hector_2021) # there is no LHCInfo tag for Run3 yet, force to use a nonDB propagation +#ctpps_2021.toReplaceWith(_LHCTransportPSet, _hector_2021) # there is no LHCInfo tag for Run3 yet, force to use a nonDB propagation +ctpps_2021.toReplaceWith(_LHCTransportPSet, _opticalfunctionsTransportSetup_2021) # there is no LHCInfo tag for Run3 yet, force to use a nonDB propagation LHCTransport = cms.EDProducer("PPSSimTrackProducer",_commonParameters,_LHCTransportPSet) diff --git a/Validation/Configuration/python/globalValidation_cff.py b/Validation/Configuration/python/globalValidation_cff.py index 8ea73c681b963..cf25942c176d7 100644 --- a/Validation/Configuration/python/globalValidation_cff.py +++ b/Validation/Configuration/python/globalValidation_cff.py @@ -198,7 +198,7 @@ ) globalValidationHGCal = cms.Sequence(hgcalValidation) -globalPrevalidationHGCal = cms.Sequence(hgcalAssociators) +globalPrevalidationHGCal = cms.Sequence(hgcalAssociators, ticlSimTrackstersTask) globalValidationMTD = cms.Sequence() diff --git a/Validation/Configuration/python/hgcalSimValid_cff.py b/Validation/Configuration/python/hgcalSimValid_cff.py index b0c5a299ccf7c..3ac4142386bb0 100644 --- a/Validation/Configuration/python/hgcalSimValid_cff.py +++ b/Validation/Configuration/python/hgcalSimValid_cff.py @@ -10,6 +10,7 @@ from Validation.HGCalValidation.digiValidation_cff import * from Validation.HGCalValidation.rechitValidation_cff import * from Validation.HGCalValidation.hgcalHitValidation_cfi import * +from RecoHGCal.TICL.SimTracksters_cff import * from Validation.HGCalValidation.HGCalValidator_cfi import hgcalValidator from Validation.RecoParticleFlow.PFJetValidation_cff import pfJetValidation1 as _hgcalPFJetValidation diff --git a/Validation/HGCalValidation/python/HGCalValidator_cfi.py b/Validation/HGCalValidation/python/HGCalValidator_cfi.py index fe55643a325dd..4f415db769eaa 100644 --- a/Validation/HGCalValidation/python/HGCalValidator_cfi.py +++ b/Validation/HGCalValidation/python/HGCalValidator_cfi.py @@ -11,8 +11,9 @@ from RecoHGCal.TICL.iterativeTICL_cff import ticlIterLabels, ticlIterLabelsMerge labelMcl = [cms.InputTag("ticlMultiClustersFromTracksters"+iteration) for iteration in ticlIterLabelsMerge] +labelMcl.extend(["ticlMultiClustersFromSimTracksters"]) lcInputMask = [cms.InputTag("ticlTracksters"+iteration) for iteration in ticlIterLabels] - +lcInputMask.extend(["ticlSimTracksters"]) hgcalValidator = DQMEDAnalyzer( "HGCalValidator", diff --git a/Validation/HGCalValidation/python/PostProcessorHGCAL_cfi.py b/Validation/HGCalValidation/python/PostProcessorHGCAL_cfi.py index ed181b75c5a5a..c138c5f07aa5d 100644 --- a/Validation/HGCalValidation/python/PostProcessorHGCAL_cfi.py +++ b/Validation/HGCalValidation/python/PostProcessorHGCAL_cfi.py @@ -35,6 +35,7 @@ eff_simclusters.extend(["merge_phi_layer{:02d} 'LayerCluster Merge Rate vs #phi Layer{:02d} in z-' NumMerge_LayerCluster_in_SimCluster_Phi_perlayer{:02d} Denom_LayerCluster_in_SimCluster_Phi_perlayer{:02d}".format(i, i%maxlayerzm+1, i, i) if (i