Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-18 03:42:04

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     """the following function configures the mapping producers
0008     NOTE: for production-targetted configs should be avoided as it checks if the process as 
0009     already the Accelerators sequence loaded, if not it loads it to the process"""
0010 
0011     process.load('Geometry.HGCalMapping.hgCalMappingESProducer_cfi')
0012     process.hgCalMappingESProducer.modules = cms.FileInPath(modules)
0013     process.hgCalMappingESProducer.si = cms.FileInPath(sicells)
0014     process.hgCalMappingESProducer.sipm = cms.FileInPath(sipmcells)
0015 
0016     if not hasattr(process, 'ProcessAcceleratorCUDA'):
0017         process.load('Configuration.StandardSequences.Accelerators_cff')
0018         
0019     process.hgCalMappingCellESProducer = cms.ESProducer('hgcal::HGCalMappingCellESProducer@alpaka',
0020                                                         filelist=cms.vstring(sicells, sipmcells),
0021                                                         cellindexer=cms.ESInputTag(''))
0022     process.hgCalMappingModuleESProducer = cms.ESProducer('hgcal::HGCalMappingModuleESProducer@alpaka',
0023                                                           filename=cms.FileInPath(modules),
0024                                                           moduleindexer=cms.ESInputTag(''))
0025     process.hgCalDenseIndexInfoESProducer = cms.ESProducer('hgcal::HGCalDenseIndexInfoESProducer@alpaka',
0026                                                            moduleindexer=cms.ESInputTag('') )
0027     
0028     return process