CMS 3D CMS Logo

customise_TkRecoMaterial.py
Go to the documentation of this file.
1 '''Customization functions for cmsDriver to change the phase-2 tracker reco material for geometry D49'''
2 import FWCore.ParameterSet.Config as cms
4 
5  ''' will replace one tracker reco material file with another one for geometry D49
6  syntax: --customise SLHCUpgradeSimulations/Configuration/customise_TkRecoMaterial.customizeRecoMaterialD49
7  '''
8 
9  if hasattr(process,'XMLIdealGeometryESSource') and hasattr(process.XMLIdealGeometryESSource,'geomXMLFiles'):
10 
11  try:
12  process.XMLIdealGeometryESSource.geomXMLFiles.remove(
13  'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker613_MB_2019_04/trackerRecoMaterial.xml'
14  )
15  process.XMLIdealGeometryESSource.geomXMLFiles.append(
16  'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker613_MB_2019_04/v2_ITonly/trackerRecoMaterial.xml'
17  )
18  except ValueError:
19  raise SystemExit("\n\n ERROR! Could not replace trackerRecoMaterial.xml file, please check if D49 geometry is being used \n\n")
20 
21  return process