Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-05-19 07:20:05

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 def customise_hgcalmapper(process,
0004                           modules = 'Geometry/HGCalMapping/data/ModuleMaps/modulelocator_test.txt',
0005                           sicells = 'Geometry/HGCalMapping/data/CellMaps/WaferCellMapTraces.txt',
0006                           sipmcells = 'Geometry/HGCalMapping/data/CellMaps/channels_sipmontile.hgcal.txt',
0007                           offsetfile = 'Geometry/HGCalMapping/data/CellMaps/calibration_to_surrounding_offsetMap.txt'):
0008     """the following function configures the mapping producers
0009     NOTE: for production-targetted configs should be avoided as it checks if the process as 
0010     already the Accelerators sequence loaded, if not it loads it to the process"""
0011 
0012     process.load('Geometry.HGCalMapping.hgCalMappingESProducer_cfi')
0013     process.hgCalMappingESProducer.modules = cms.FileInPath(modules)
0014     process.hgCalMappingESProducer.si = cms.FileInPath(sicells)
0015     process.hgCalMappingESProducer.sipm = cms.FileInPath(sipmcells)
0016 
0017     if not hasattr(process, 'ProcessAcceleratorCUDA'):
0018         process.load('Configuration.StandardSequences.Accelerators_cff')
0019         
0020     process.hgCalMappingCellESProducer = cms.ESProducer('hgcal::HGCalMappingCellESProducer@alpaka',
0021                                                         filelist=cms.vstring(sicells, sipmcells),
0022                                                         cellindexer=cms.ESInputTag(''),
0023                                                         offsetfile=cms.FileInPath(offsetfile))
0024     process.hgCalMappingModuleESProducer = cms.ESProducer('hgcal::HGCalMappingModuleESProducer@alpaka',
0025                                                           filename=cms.FileInPath(modules),
0026                                                           moduleindexer=cms.ESInputTag(''))
0027     process.hgCalDenseIndexInfoESProducer = cms.ESProducer('hgcal::HGCalDenseIndexInfoESProducer@alpaka',
0028                                                            moduleindexer=cms.ESInputTag('') )
0029     
0030     return process