Skip to content

Commit

Permalink
Merge pull request #35464 from mmusich/ddh4epGlobalTagInModifiers
Browse files Browse the repository at this point in the history
introduce `auto:phase1_2021_dd4hep` and use it in RelVals
  • Loading branch information
cmsbuild committed Oct 2, 2021
2 parents d169d37 + 6bd3203 commit c9e62f9
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Configuration/AlCa/python/autoCond.py
Expand Up @@ -108,6 +108,10 @@
from Configuration.AlCa.autoCondModifiers import autoCondHLTHI
autoCond = autoCondHLTHI(autoCond)

# special GT for 2021 DD4HEP geometry
from Configuration.AlCa.autoCondModifiers import autoCondDD4HEP
autoCond = autoCondDD4HEP(autoCond)

### OLD KEYS ### kept for backward compatibility
# GlobalTag for MC production with perfectly aligned and calibrated detector
autoCond['mc'] = ( autoCond['run1_design'] )
Expand Down
41 changes: 41 additions & 0 deletions Configuration/AlCa/python/autoCondModifiers.py
Expand Up @@ -30,3 +30,44 @@ def autoCondHLTHI(autoCond):

autoCond.update(GlobalTagsHLTHI)
return autoCond

def autoCondDD4HEP(autoCond):

GlobalTagsDDHEP = {}
# substitute the DDD geometry tags with DD4HEP ones
CSCRECODIGI_Geometry_dd4hep = ','.join( ['CSCRECODIGI_Geometry_120DD4hepV1' , "CSCRecoDigiParametersRcd", connectionString, "", "2021-09-28 12:00:00.000"] )
CSCRECO_Geometry_dd4hep = ','.join( ['CSCRECO_Geometry_120DD4hepV1' , "CSCRecoGeometryRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
DTRECO_Geometry_dd4hep = ','.join( ['DTRECO_Geometry_120DD4hepV1' , "DTRecoGeometryRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
GEMRECO_Geometry_dd4hep = ','.join( ['GEMRECO_Geometry_120DD4hepV1' , "GEMRecoGeometryRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
XMLFILE_Geometry_dd4hep = ','.join( ['XMLFILE_Geometry_120DD4hepV3_Extended2021_mc', "GeometryFileRcd" , connectionString, "Extended", "2021-09-28 12:00:00.000"] )
HCALParameters_Geometry_dd4hep = ','.join( ['HCALParameters_Geometry_120DD4hepV1' , "HcalParametersRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
TKRECO_Geometry_dd4hep = ','.join( ['TKRECO_Geometry_120DD4hepV1' , "IdealGeometryRecord" , connectionString, "", "2021-09-28 12:00:00.000"] )
CTRECO_Geometry_dd4hep = ','.join( ['CTRECO_Geometry_120DD4hepV1' , "PCaloTowerRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
EBRECO_Geometry_dd4hep = ','.join( ['EBRECO_Geometry_120DD4hepV1' , "PEcalBarrelRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
EERECO_Geometry_dd4hep = ','.join( ['EERECO_Geometry_120DD4hepV1' , "PEcalEndcapRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
EPRECO_Geometry_dd4hep = ','.join( ['EPRECO_Geometry_120DD4hepV1' , "PEcalPreshowerRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
HCALRECO_Geometry_dd4hep = ','.join( ['HCALRECO_Geometry_120DD4hepV1' , "PHcalRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
TKParameters_Geometry_dd4hep = ','.join( ['TKParameters_Geometry_120DD4hepV1' , "PTrackerParametersRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
ZDCRECO_Geometry_dd4hep = ','.join( ['ZDCRECO_Geometry_120DD4hepV1' , "PZdcRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )
RPCRECO_Geometry_dd4hep = ','.join( ['RPCRECO_Geometry_120DD4hepV1' , "RPCRecoGeometryRcd" , connectionString, "", "2021-09-28 12:00:00.000"] )

for key,val in autoCond.items():
if key == 'phase1_2021_realistic': # modification of the DD4HEP relval GT
GlobalTagsDDHEP['phase1_2021_dd4hep'] = (autoCond[key],
CSCRECODIGI_Geometry_dd4hep,
CSCRECO_Geometry_dd4hep,
DTRECO_Geometry_dd4hep,
GEMRECO_Geometry_dd4hep,
XMLFILE_Geometry_dd4hep,
HCALParameters_Geometry_dd4hep,
TKRECO_Geometry_dd4hep,
CTRECO_Geometry_dd4hep,
EBRECO_Geometry_dd4hep,
EERECO_Geometry_dd4hep,
EPRECO_Geometry_dd4hep,
HCALRECO_Geometry_dd4hep,
TKParameters_Geometry_dd4hep,
ZDCRECO_Geometry_dd4hep,
RPCRECO_Geometry_dd4hep)
autoCond.update(GlobalTagsDDHEP)
return autoCond
Expand Up @@ -1104,7 +1104,7 @@ def condition(self, fragment, stepList, key, hasHarvest):
class UpgradeWorkflow_DD4hepDB(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
if 'Run3' in stepDict[step][k]['--era']:
stepDict[stepName][k] = merge([{'--conditions': '121X_mcRun3_2021_realistic_dd4hep_v3', '--geometry': 'DB:Extended', '--procModifiers': 'dd4hep'}, stepDict[step][k]])
stepDict[stepName][k] = merge([{'--conditions': 'auto:phase1_2021_dd4hep', '--geometry': 'DB:Extended', '--procModifiers': 'dd4hep'}, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
return '2021' in key
upgradeWFs['DD4hepDB'] = UpgradeWorkflow_DD4hepDB(
Expand Down

0 comments on commit c9e62f9

Please sign in to comment.