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

Adding geometry scenarios D59 and D60 implementing ETL version 4 and 5 #30340

Closed
wants to merge 11 commits into from
4 changes: 4 additions & 0 deletions Configuration/Geometry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Fast Timing system:
* I10: Same as I9 w/ material adjustments
* I11: Same as I10, xml reorganized, comparison base for new ETL and DD4hep migration
* I12: Starting from I11, new ETL layout from MTD TDR
* I13: Starting from I12, new ETL layout implementing half-disks instead of quarters

The script also handles the common and forward elements of the geometry:
* O2: detailed cavern description
Expand Down Expand Up @@ -64,5 +65,8 @@ Several detector combinations have been generated:
* D56 = T20+C9+M4+I10+O4+F2
* D57 = T17+C11+M6+I11+O5+F4
* D58 = T17+C12+M6+I11+O5+F5
* D59 = T17+C12+M6+I12+O5+F5
* D60 = T17+C12+M6+I13+O5+F5


D35 is the MTD TDR baseline, D41 is the L1T TDR baseline, and D49 is the HLT TDR baseline.
63 changes: 63 additions & 0 deletions Configuration/Geometry/python/GeometryExtended2026D59Reco_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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.GeometryExtended2026D59_cff import *

# tracker
from Geometry.CommonTopologies.globalTrackingGeometry_cfi import *
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
from Geometry.TrackerGeometryBuilder.trackerParameters_cfi 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.HFNoseTopology_cfi import *
from Geometry.ForwardGeometry.HFNoseGeometryESProducer_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",
"HGCalHFNoseSensitive",
)
)
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.GEMGeometryBuilder.me0Geometry_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)

17 changes: 17 additions & 0 deletions Configuration/Geometry/python/GeometryExtended2026D59_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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.cmsExtendedGeometry2026D59XML_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import *
from SLHCUpgradeSimulations.Geometry.fakeConditions_phase2TkT14_cff import *
from Geometry.EcalCommonData.ecalSimulationParameters_cff import *
from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *
from Geometry.HGCalCommonData.hgcalParametersInitialization_cfi import *
from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import *
from Geometry.ForwardCommonData.hfnoseParametersInitialization_cfi import *
from Geometry.ForwardCommonData.hfnoseNumberingInitialization_cfi import *
from Geometry.MuonNumbering.muonGeometryConstants_cff import *

from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import *
63 changes: 63 additions & 0 deletions Configuration/Geometry/python/GeometryExtended2026D60Reco_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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.GeometryExtended2026D60_cff import *

# tracker
from Geometry.CommonTopologies.globalTrackingGeometry_cfi import *
from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import *
from Geometry.TrackerGeometryBuilder.trackerParameters_cfi 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.HFNoseTopology_cfi import *
from Geometry.ForwardGeometry.HFNoseGeometryESProducer_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",
"HGCalHFNoseSensitive",
)
)
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.GEMGeometryBuilder.me0Geometry_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)

17 changes: 17 additions & 0 deletions Configuration/Geometry/python/GeometryExtended2026D60_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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.cmsExtendedGeometry2026D60XML_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import *
from SLHCUpgradeSimulations.Geometry.fakeConditions_phase2TkT14_cff import *
from Geometry.EcalCommonData.ecalSimulationParameters_cff import *
from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *
from Geometry.HGCalCommonData.hgcalParametersInitialization_cfi import *
from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import *
from Geometry.ForwardCommonData.hfnoseParametersInitialization_cfi import *
from Geometry.ForwardCommonData.hfnoseNumberingInitialization_cfi import *
from Geometry.MuonNumbering.muonGeometryConstants_cff import *

from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import *
30 changes: 30 additions & 0 deletions Configuration/Geometry/python/dict2026Geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,34 @@
],
"era" : "phase2_timing, phase2_timing_layer",
},
"I13" : {
1 : [
'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',
],
3 : [
'Geometry/MTDSimData/data/v2/mtdsens.xml'
],
4 : [
'Geometry/MTDSimData/data/v2/mtdProdCuts.xml'
],
"sim" : [
'from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import *',
],
"reco" :[
'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)'
],
"era" : "phase2_timing, phase2_timing_layer",
},
}

allDicts = [ commonDict, trackerDict, caloDict, muonDict, forwardDict, timingDict ]
Expand All @@ -1501,6 +1529,8 @@
("O4","T20","C9","M4","F2","I10") : "D56",
("O5","T17","C11","M6","F4","I11") : "D57",
("O5","T17","C12","M6","F5","I11") : "D58",
("O5","T17","C12","M6","F5","I12") : "D59",
("O5","T17","C12","M6","F5","I13") : "D60",
}

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", "D52" ])
Expand Down
2 changes: 2 additions & 0 deletions Configuration/StandardSequences/python/GeometryConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@
'Extended2026D56' : 'Extended2026D56,Extended2026D56Reco',
'Extended2026D57' : 'Extended2026D57,Extended2026D57Reco',
'Extended2026D58' : 'Extended2026D58,Extended2026D58Reco',
'Extended2026D59' : 'Extended2026D59,Extended2026D59Reco',
'Extended2026D60' : 'Extended2026D60,Extended2026D60Reco',
}
12 changes: 7 additions & 5 deletions DataFormats/ForwardDetId/interface/ETLDetId.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

class ETLDetId : public MTDDetId {
public:
static const uint32_t kETLmoduleOffset = 7;
static const uint32_t kETLmoduleMask = 0x1FF;
static const uint32_t kETLmodTypeOffset = 5;
static const uint32_t kETLmodTypeMask = 0x3;
static const uint32_t kETLmoduleOffset = 5; //7
static const uint32_t kETLmoduleMask = 0x7FF; //0x1FF
static const uint32_t kETLmodTypeOffset = 3; //5
static const uint32_t kETLmodTypeMask = 0x3; //0x3

static constexpr int kETLv1maxRing = 11;
static constexpr int kETLv1maxModule = 176;
Expand All @@ -31,7 +31,7 @@ class ETLDetId : public MTDDetId {
static const uint32_t kETLsectorMask = 0x3;

static constexpr int kETLv4maxRing = 16;
static constexpr int kETLv4maxModule = 248;
static constexpr int kETLv4maxModule = 517; //248
static constexpr int kETLv4nDisc = 2;

static constexpr uint32_t kSoff = 4;
Expand Down Expand Up @@ -95,6 +95,8 @@ class ETLDetId : public MTDDetId {
inline int nDisc() const {
return (((((id_ >> kRodRingOffset) & kRodRingMask) - 1) >> kETLnDiscOffset) & kETLnDiscMask) + 1;
}

uint32_t newForm(const uint32_t& rawid);
};

std::ostream& operator<<(std::ostream&, const ETLDetId&);
Expand Down
10 changes: 10 additions & 0 deletions DataFormats/ForwardDetId/src/ETLDetId.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ std::ostream& operator<<(std::ostream& os, const ETLDetId& id) {
<< " Module type : " << id.modType() << std::endl;
return os;
}

uint32_t ETLDetId::newForm(const uint32_t& rawid) {
uint32_t rawid_new = 0;
rawid_new |= (MTDType::ETL & ETLDetId::kMTDsubdMask) << ETLDetId::kMTDsubdOffset |
(mtdSide() & ETLDetId::kZsideMask) << ETLDetId::kZsideOffset |
(mtdRR() & ETLDetId::kRodRingMask) << ETLDetId::kRodRingOffset |
(module() & ETLDetId::kETLmoduleMask) << (ETLDetId::kETLmoduleOffset - 2) |
(modType() & ETLDetId::kETLmodTypeMask) << (kETLmodTypeOffset - 2);
return rawid_new;
}
9 changes: 8 additions & 1 deletion DataFormats/ForwardDetId/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@
<class name="BTLDetId" ClassVersion="3">
<version ClassVersion="3" checksum="1515591716"/>
</class>
<class name="ETLDetId" ClassVersion="3">
<class name="ETLDetId" ClassVersion="4">
<version ClassVersion="4" checksum="1644731879"/>
<version ClassVersion="3" checksum="1644731879"/>
<ioread sourceClass = "ETLDetId" version="[-4]" targetClass="ETLDetId" source="" target="">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@icosivi @casarsa most likely the version here should be [-3], we want the conversion on older ClassVersion data. This would explain why everything looks ok while writing, but then it miserably fails after reading back data from file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while it looks ok reading data from previous versions...

<![CDATA[
ETLDetId tmp(newObj->newForm(newObj->rawId()));
*newObj=tmp;
]]>
</ioread>
</class>
<class name="HFNoseDetId" ClassVersion="0">
<version ClassVersion="0" checksum="1469396081"/>
Expand Down
Loading