Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run3-hcx353 Backport from #46033 new definition of 2024 Geometry Scenario of CMS #46062

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions CalibCalorimetry/HcalPlugins/src/HcalHardcodeCalibrations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,6 @@ std::unique_ptr<HcalQIEData> HcalHardcodeCalibrations::produceQIEData(const Hcal
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HCAL") << "HcalHardcodeCalibrations::produceQIEData-> ...";
#endif
/*
edm::LogVerbatim("HcalCalib") << ">>> HcalHardcodeCalibrations::produceQIEData";
*/

auto const& topo = rcd.get(topoTokens_[kQIEData]);
auto const& zdcTopo = rcd.get(zdcTopoTokens_[kQIEData]);
Expand Down
18 changes: 11 additions & 7 deletions CondFormats/HcalObjects/src/HcalCondObjectContainerBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ HcalCondObjectContainerBase::HcalCondObjectContainerBase(const HcalTopology* top
}

void HcalCondObjectContainerBase::setTopo(const HcalTopology* topo) {
if ((topo) && (packedIndexVersion_ != 0) && (!topo->denseIdConsistent(packedIndexVersion_)))
edm::LogError("HCAL") << std::string("Inconsistent dense packing between current topology (") << topo->topoVersion()
<< ") and calibration object (" << packedIndexVersion_ << ")";
topo_ = topo;
packedIndexVersion_ = topo_->topoVersion();
kSizeForDenseIndexing_ =
((packedIndexVersion_ >= 10) ? HcalZDCDetId::kSizeForDenseIndexingRun3 : HcalZDCDetId::kSizeForDenseIndexingRun1);
if (topo) {
if ((packedIndexVersion_ != 0) && (!topo->denseIdConsistent(packedIndexVersion_)))
edm::LogError("HCAL") << std::string("Inconsistent dense packing between current topology (")
<< topo->topoVersion() << ") and calibration object (" << packedIndexVersion_ << ")";
topo_ = topo;
packedIndexVersion_ = topo->topoVersion();
kSizeForDenseIndexing_ = ((packedIndexVersion_ >= 10) ? HcalZDCDetId::kSizeForDenseIndexingRun3
: HcalZDCDetId::kSizeForDenseIndexingRun1);
} else {
edm::LogError("HCAL") << "Illegal call to HcalCondObjectContainerBase with a null pointer";
}
}

unsigned int HcalCondObjectContainerBase::indexFor(DetId fId) const {
Expand Down
84 changes: 76 additions & 8 deletions Configuration/Geometry/python/dict2021Geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@
caloDict = {
"abbrev" : "C",
"name" : "calo",
"default" : 1,
"default" : 2,
"C1" : {
1 : [
'Geometry/EcalCommonData/data/ebcon/2021/v1/ebcon.xml',
Expand Down Expand Up @@ -1388,7 +1388,75 @@
'from Geometry.EcalMapping.EcalMappingRecord_cfi import *',
],
"era" : "run3_HB",
}
},
"C2" : {
1 : [
'Geometry/EcalCommonData/data/ebcon/2021/v1/ebcon.xml',
'Geometry/EcalCommonData/data/eecon.xml',
'Geometry/EcalCommonData/data/escon.xml',
'Geometry/EcalCommonData/data/eregalgo/2017/v1/eregalgo.xml',
'Geometry/EcalCommonData/data/ebalgo.xml',
'Geometry/EcalCommonData/data/ebrot.xml',
'Geometry/EcalCommonData/data/eefixed/2021/v1/eefixed.xml',
'Geometry/EcalCommonData/data/eehier.xml',
'Geometry/EcalCommonData/data/eealgo.xml',
'Geometry/EcalCommonData/data/esalgo.xml',
'Geometry/EcalCommonData/data/eeF.xml',
'Geometry/EcalCommonData/data/eeB.xml',
'Geometry/EcalCommonData/data/ectkcable.xml',
'Geometry/HcalCommonData/data/hcalrotations.xml',
'Geometry/HcalCommonData/data/hcal/PhaseI/hcalalgo.xml',
'Geometry/HcalCommonData/data/hcalcablealgo.xml',
'Geometry/HcalCommonData/data/hcalbarrelalgo.xml',
'Geometry/HcalCommonData/data/hcalendcap/PhaseI/hcalendcapalgo.xml',
'Geometry/HcalCommonData/data/hcalouteralgo/v1/hcalouteralgo.xml',
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml',
],
3 : [
'Geometry/EcalSimData/data/ecalsens.xml',
'Geometry/HcalCommonData/data/hcalsens/2021/v2/hcalsenspmf.xml',
'Geometry/HcalSimData/data/hf.xml',
'Geometry/HcalSimData/data/hfpmt.xml',
'Geometry/HcalSimData/data/hffibrebundle.xml',
'Geometry/HcalSimData/data/CaloUtil/2021/v1/CaloUtil.xml',
],
4 : [
'Geometry/HcalSimData/data/HcalProdCuts/2021/v2/HcalProdCuts.xml',
'Geometry/EcalSimData/data/EcalProdCuts.xml',
'Geometry/EcalSimData/data/ESProdCuts.xml',
],
"sim" : [
'from Geometry.EcalCommonData.ecalSimulationParameters_cff import *',
'from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *',
],
"reco" : [
'from Geometry.CaloEventSetup.CaloTopology_cfi import *',
'from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import *',
'CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder",',
' SelectedCalos = cms.vstring("HCAL",',
' "ZDC",',
' "EcalBarrel",',
' "EcalEndcap",',
' "EcalPreshower",',
' "TOWER",',
' )',
')',
'from Geometry.EcalAlgo.EcalGeometry_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.ForwardGeometry.ForwardGeometry_cfi import *',
'from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import *',
'from Geometry.EcalMapping.EcalMapping_cfi import *',
'from Geometry.EcalMapping.EcalMappingRecord_cfi import *',
],
"era" : "run3_HB",
},
}

muonDict = {
Expand Down Expand Up @@ -1801,12 +1869,12 @@
("O5","T6","C1","M2","F2","P7") : "2023FlatMinus10Percent",
("O5","T7","C1","M2","F2","P7") : "2023FlatPlus05Percent",
("O5","T8","C1","M2","F2","P7") : "2023FlatPlus10Percent",
("O6","T3","C1","M4","F3","P7") : "2024",
("O4","T4","C1","M4","F2","P7") : "2024ZeroMaterial",
("O5","T5","C1","M4","F2","P7") : "2024FlatMinus05Percent",
("O5","T6","C1","M4","F2","P7") : "2024FlatMinus10Percent",
("O5","T7","C1","M4","F2","P7") : "2024FlatPlus05Percent",
("O5","T8","C1","M4","F2","P7") : "2024FlatPlus10Percent",
("O6","T3","C2","M4","F3","P7") : "2024",
("O4","T4","C2","M4","F2","P7") : "2024ZeroMaterial",
("O5","T5","C2","M4","F2","P7") : "2024FlatMinus05Percent",
("O5","T6","C2","M4","F2","P7") : "2024FlatMinus10Percent",
("O5","T7","C2","M4","F2","P7") : "2024FlatPlus05Percent",
("O5","T8","C2","M4","F2","P7") : "2024FlatPlus10Percent",
}

deprecatedSubdets = set([ "T1", "T2", "O1", "O2", "O3", "P1", "P2", "P3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<Include ref='Geometry/HcalCommonData/data/hcalforwardalgo.xml'/>
<Include ref='Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml'/>
<Include ref='Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml'/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<Include ref='Geometry/HcalCommonData/data/hcalforwardalgo.xml'/>
<Include ref='Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml'/>
<Include ref='Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml'/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<Include ref='Geometry/HcalCommonData/data/hcalforwardalgo.xml'/>
<Include ref='Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml'/>
<Include ref='Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml'/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<Include ref='Geometry/HcalCommonData/data/hcalforwardalgo.xml'/>
<Include ref='Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml'/>
<Include ref='Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml'/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<Include ref='Geometry/HcalCommonData/data/hcalforwardalgo.xml'/>
<Include ref='Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml'/>
<Include ref='Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml'/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<Include ref='Geometry/HcalCommonData/data/hcalforwardalgo.xml'/>
<Include ref='Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml'/>
<Include ref='Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml'/>
<Include ref='Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml'/>
<Include ref='Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml'/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml',
'Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml',
'Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml',
'Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml',
'Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml',
'Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml',
'Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml',
'Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml',
'Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml',
'Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml',
'Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml',
'Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml',
'Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml',
'Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml',
'Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml',
'Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
'Geometry/HcalCommonData/data/hcalforwardalgo.xml',
'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml',
'Geometry/HcalCommonData/data/hcalSimNumbering/2021/v1/hcalSimNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v1/hcalRecNumbering.xml',
'Geometry/HcalCommonData/data/hcalRecNumbering/2021/v2/hcalRecNumbering.xml',
'Geometry/MuonCommonData/data/mbCommon/2021/v2/mbCommon.xml',
'Geometry/MuonCommonData/data/mb1/2021/v1/mb1.xml',
'Geometry/MuonCommonData/data/mb2/2021/v1/mb2.xml',
Expand Down
13 changes: 3 additions & 10 deletions Geometry/ForwardGeometry/plugins/ZdcTopologyEP.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
Implementation:
<Notes on implementation>
*/
//
// Original Author: Jeremiah Mans
// Created: Mon Oct 3 11:35:27 CDT 2005
//
//

#include "Geometry/ForwardGeometry/plugins/ZdcTopologyEP.h"
#include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h"
Expand All @@ -23,19 +18,17 @@
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"

#define EDM_ML_DEBUG
//#define EDM_ML_DEBUG

ZdcTopologyEP::ZdcTopologyEP(const edm::ParameterSet& conf)
: m_hdcToken{setWhatProduced(this, &ZdcTopologyEP::produce).consumes<HcalDDDRecConstants>(edm::ESInputTag{})},
m_restrictions(conf.getUntrackedParameter<std::string>("Exclude")) {
: m_hdcToken{setWhatProduced(this, &ZdcTopologyEP::produce).consumes<HcalDDDRecConstants>(edm::ESInputTag{})} {
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HCalGeom") << "ZdcTopologyEP::ZdcTopologyEP with Exclude: " << m_restrictions;
edm::LogVerbatim("HCalGeom") << "ZdcTopologyEP::ZdcTopologyEP";
#endif
}

void ZdcTopologyEP::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.addUntracked<std::string>("Exclude", "");
descriptions.add("zdcTopologyEP", desc);
}

Expand Down
2 changes: 0 additions & 2 deletions Geometry/ForwardGeometry/plugins/ZdcTopologyEP.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@ class ZdcTopologyEP : public edm::ESProducer {
private:
// ----------member data ---------------------------
edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> m_hdcToken;
std::string m_restrictions;
bool m_mergePosition;
};
#endif
12 changes: 5 additions & 7 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,12 @@ def checkHLTfor43774(process):
return process

# Adding zdc Topology producer
def customizeHLTfor46011(process):
def customizeHLTfor46062(process):
"""Add topology producer for ZDC"""

if hasattr(process, 'ZdcGeometryFromDBEP'):
process.ZdcTopologyEP = cms.ESProducer( "ZdcTopologyEP",
Exclude = cms.untracked.string( "" ),
appendToDataLabel = cms.string( "" )
)
for esprod in esproducers_by_type(process, 'ZdcGeometryFromDBEP'):
process.load("Geometry.ForwardGeometry.zdcTopologyEP_cfi")
break

return process

Expand Down Expand Up @@ -339,6 +337,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
process = checkHLTfor43774(process)
process = customizeHLTfor44576(process)
process = customizeHLTfor45063(process)
process = customizeHLTfor46011(process)
process = customizeHLTfor46062(process)

return process