Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:44

0001 
0002 import FWCore.ParameterSet.Config as cms
0003 import SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi as digiparam
0004 from L1Trigger.L1THGCal.l1tHGCalConcentratorProducer_cfi import threshold_conc_proc, best_conc_proc, supertc_conc_proc, coarsetc_onebitfraction_proc, custom_conc_proc, autoEncoder_conc_proc
0005 
0006 
0007 class CreateSuperTriggerCell(object):
0008     def __init__(self,
0009             stcSize=supertc_conc_proc.stcSize,
0010             type_energy_division=supertc_conc_proc.type_energy_division,
0011             fixedDataSizePerHGCROC=supertc_conc_proc.fixedDataSizePerHGCROC,
0012             coarsenTriggerCells=supertc_conc_proc.coarsenTriggerCells,
0013             ctcSize=supertc_conc_proc.ctcSize,
0014             ):
0015         self.processor = supertc_conc_proc.clone(
0016                 stcSize = stcSize,
0017                 type_energy_division = type_energy_division,
0018                 fixedDataSizePerHGCROC = fixedDataSizePerHGCROC,
0019                 coarsenTriggerCells = coarsenTriggerCells,
0020                 ctcSize = ctcSize,
0021                 )
0022 
0023     def __call__(self, process, inputs):
0024         producer = process.l1tHGCalConcentratorProducer.clone(
0025                 InputTriggerCells = cms.InputTag(inputs),
0026                 InputTriggerSums = cms.InputTag(inputs),
0027                 ProcessorParameters = self.processor
0028                 )
0029         return producer
0030 
0031 
0032 class CreateThreshold(object):
0033     def __init__(self,
0034             threshold_silicon=threshold_conc_proc.threshold_silicon,  # in mipT
0035             threshold_scintillator=threshold_conc_proc.threshold_scintillator  # in mipT
0036             ):
0037         self.processor = threshold_conc_proc.clone(
0038                 threshold_silicon = threshold_silicon,  # MipT
0039                 threshold_scintillator = threshold_scintillator  # MipT
0040                 )
0041 
0042     def __call__(self, process, inputs):
0043         producer = process.l1tHGCalConcentratorProducer.clone(
0044                 InputTriggerCells = cms.InputTag(inputs),
0045                 InputTriggerSums = cms.InputTag(inputs),
0046                 ProcessorParameters = self.processor
0047                 )
0048         return producer
0049 
0050 
0051 class CreateBestChoice(object):
0052     def __init__(self,
0053             triggercells=best_conc_proc.NData,
0054             coarsenTriggerCells=best_conc_proc.coarsenTriggerCells,
0055             ctcSize=best_conc_proc.ctcSize,
0056             ):
0057         self.processor = best_conc_proc.clone(
0058                 NData = triggercells,
0059                 coarsenTriggerCells = coarsenTriggerCells,
0060                 ctcSize=ctcSize,
0061                 )
0062 
0063     def __call__(self, process, inputs):
0064         producer = process.l1tHGCalConcentratorProducer.clone(
0065                 InputTriggerCells = cms.InputTag(inputs),
0066                 InputTriggerSums = cms.InputTag(inputs),
0067                 ProcessorParameters = self.processor
0068                 )
0069         return producer
0070 
0071 
0072 class CreateAutoencoder(object):
0073     def __init__(self,
0074             cellRemap = autoEncoder_conc_proc.cellRemap,
0075             cellRemapNoDuplicates = autoEncoder_conc_proc.cellRemapNoDuplicates,
0076             nBitsPerInput = autoEncoder_conc_proc.nBitsPerInput,
0077             maxBitsPerOutput = autoEncoder_conc_proc.maxBitsPerOutput,
0078             bitsPerLink = autoEncoder_conc_proc.bitsPerLink,
0079             modelFiles = autoEncoder_conc_proc.modelFiles,
0080             linkToGraphMap = autoEncoder_conc_proc.linkToGraphMap,
0081             encoderShape = autoEncoder_conc_proc.encoderShape,
0082             decoderShape = autoEncoder_conc_proc.decoderShape,
0083             zeroSuppresionThreshold = autoEncoder_conc_proc.zeroSuppresionThreshold,
0084             saveEncodedValues = autoEncoder_conc_proc.saveEncodedValues,
0085             preserveModuleSum = autoEncoder_conc_proc.preserveModuleSum,
0086             scintillatorMethod = 'thresholdSelect',
0087             ):
0088          self.processor = autoEncoder_conc_proc.clone(
0089                 cellRemap = cellRemap,
0090                 cellRemapNoDuplicates = cellRemapNoDuplicates,
0091                 nBitsPerInput = nBitsPerInput,
0092                 maxBitsPerOutput = maxBitsPerOutput,
0093                 bitsPerLink = bitsPerLink,
0094                 modelFiles = modelFiles,
0095                 linkToGraphMap = linkToGraphMap,
0096                 encoderShape = encoderShape,
0097                 decoderShape = decoderShape,
0098                 zeroSuppresionThreshold = zeroSuppresionThreshold,
0099                 saveEncodedValues = saveEncodedValues,
0100                 preserveModuleSum = preserveModuleSum,
0101                 Method = cms.vstring(['autoEncoder','autoEncoder', scintillatorMethod]),
0102                 )
0103 
0104     def __call__(self, process, inputs):
0105         producer = process.l1tHGCalConcentratorProducer.clone(
0106                 InputTriggerCells = cms.InputTag(inputs),
0107                 InputTriggerSums = cms.InputTag(inputs),
0108                 ProcessorParameters = self.processor
0109                 )
0110         return producer
0111 
0112 
0113 class CreateOneBitFraction(object):
0114     def __init__(self,
0115             stcSize=coarsetc_onebitfraction_proc.stcSize,
0116             fixedDataSizePerHGCROC=coarsetc_onebitfraction_proc.fixedDataSizePerHGCROC
0117             ):
0118         self.processor = coarsetc_onebitfraction_proc.clone(
0119                 stcSize = stcSize,
0120                 fixedDataSizePerHGCROC = fixedDataSizePerHGCROC
0121                 )
0122 
0123     def __call__(self, process, inputs):
0124         producer = process.l1tHGCalConcentratorProducer.clone(
0125                 InputTriggerCells = cms.InputTag(inputs),
0126                 InputTriggerSums = cms.InputTag(inputs),
0127                 ProcessorParameters = self.processor
0128                 )
0129         return producer
0130 
0131 
0132 class CreateMixedFeOptions(object):
0133     def __init__(self,
0134             stcSize=custom_conc_proc.stcSize,
0135             type_energy_division=custom_conc_proc.type_energy_division,
0136             fixedDataSizePerHGCROC=custom_conc_proc.fixedDataSizePerHGCROC,
0137             triggercells=custom_conc_proc.NData
0138             ):
0139         self.processor = custom_conc_proc.clone(
0140                 stcSize = stcSize,
0141                 type_energy_division = type_energy_division,
0142                 fixedDataSizePerHGCROC = fixedDataSizePerHGCROC,
0143                 NData = triggercells,
0144                 Method = cms.vstring('bestChoiceSelect','superTriggerCellSelect','superTriggerCellSelect'),
0145                 )
0146 
0147     def __call__(self, process, inputs):
0148         producer = process.l1tHGCalConcentratorProducer.clone(
0149                 InputTriggerCells = cms.InputTag(inputs),
0150                 InputTriggerSums = cms.InputTag(inputs),
0151                 ProcessorParameters = self.processor
0152                 )
0153         return producer
0154 
0155 
0156 class CreateCustom(object):
0157     def __init__(self,
0158             stcSize=custom_conc_proc.stcSize,
0159             type_energy_division=custom_conc_proc.type_energy_division,
0160             fixedDataSizePerHGCROC=custom_conc_proc.fixedDataSizePerHGCROC,
0161             triggercells=custom_conc_proc.NData,
0162             threshold_silicon=custom_conc_proc.threshold_silicon,  # in mipT
0163             threshold_scintillator=custom_conc_proc.threshold_scintillator,  # in mipT
0164             Method = custom_conc_proc.Method,
0165             coarsenTriggerCells=custom_conc_proc.coarsenTriggerCells,
0166             ctcSize=custom_conc_proc.ctcSize,
0167             ):
0168         self.processor = custom_conc_proc.clone(
0169                 stcSize = stcSize,
0170                 type_energy_division = type_energy_division,
0171                 fixedDataSizePerHGCROC = fixedDataSizePerHGCROC,
0172                 NData = triggercells,
0173                 threshold_silicon = threshold_silicon,  # MipT
0174                 threshold_scintillator = threshold_scintillator,  # MipT
0175                 Method = Method,
0176                 coarsenTriggerCells=coarsenTriggerCells,
0177                 ctcSize = ctcSize,
0178                 )
0179 
0180     def __call__(self, process, inputs):
0181         producer = process.l1tHGCalConcentratorProducer.clone(
0182                 InputTriggerCells = cms.InputTag(inputs),
0183                 InputTriggerSums = cms.InputTag(inputs),
0184                 ProcessorParameters = self.processor
0185                 )
0186         return producer
0187