Beispiel #1
0
chains.register_backend2(
    "Histomaxvardrth20", lambda p, i: clustering3d.create_histoMax_variableDr(
        p, i, seed_threshold=20.))
# Register ntuples
# Store gen info only in the reference ntuple
ntuple_list_ref = ['event', 'gen', 'multiclusters']
ntuple_list = ['event', 'multiclusters']
chains.register_ntuple(
    "Genclustersntuple",
    lambda p, i: ntuple.create_ntuple(p, i, ntuple_list_ref))
chains.register_ntuple("Clustersntuple",
                       lambda p, i: ntuple.create_ntuple(p, i, ntuple_list))

# Register trigger chains
## Reference chain
chains.register_chain('Floatingpoint8', "Threshold", 'Ref2d', 'Ref3d',
                      'Genclustersntuple')
concentrator_algos = ['Supertriggercell', 'Threshold']
backend_algos = [
    'Histomax', 'Histomaxvardrth0', 'Histomaxvardrth10', 'Histomaxvardrth20'
]
## Make cross product fo ECON and BE algos
import itertools
for cc, be in itertools.product(concentrator_algos, backend_algos):
    chains.register_chain('Floatingpoint8', cc, 'Dummy', be, 'Clustersntuple')

process = chains.create_sequences(process)

# Remove towers from sequence
process.hgcalTriggerPrimitives.remove(process.hgcalTowerMap)
process.hgcalTriggerPrimitives.remove(process.hgcalTower)
import L1Trigger.L1THGCalUtilities.concentrator as concentrator
import L1Trigger.L1THGCalUtilities.clustering2d as clustering2d
import L1Trigger.L1THGCalUtilities.clustering3d as clustering3d

chain = HGCalTriggerChains()
chain.register_vfe("VFEfp7", vfe.create_compression)
chain.register_concentrator("tcTh", concentrator.create_threshold)
# chain.register_concentrator("sTC", concentrator.create_supertriggercell)
# chain.register_backend1("dRNNC2d", clustering2d.create_constrainedtopological)
chain.register_backend1("dummyC2d", clustering2d.create_dummy)
chain.register_backend2("histoMaxC3dVR",
                        clustering3d.create_histoMax_variableDr)
# chain.register_backend2("histoMaxC3dVRPhiBins", lambda p, i: clustering3d.create_histoMax_variableDr(p, i, nBins_Phi=108))
# chain.register_backend2("dRC3d", clustering3d.create_distance)
# chain.register_chain('VFEfp7', 'tcTh', 'dummyC2d', 'histoMaxC3d')
chain.register_chain('VFEfp7', 'tcTh', 'dummyC2d', 'histoMaxC3dVR')
# chain.register_chain('VFEfp7', 'tcTh', 'dummyC2d', 'histoMaxC3dVRPhiBins')
# chain.register_chain('VFEfp7', 'sTC', 'dummyC2d', 'histoMaxC3dVR')
# chain.register_chain('VFEfp7', 'tcTh', 'dRNNC2d', 'dRC3d')
# chain.register_chain('Floatingpoint7', 'Threshold', 'Dummy', 'Histothreshold')
# chain.register_chain('Floatingpoint7', 'Bestchoice', 'Dummy', 'Histothreshold')
process = chain.create_sequences(process)

# process.load("L1Trigger.L1THGCalUtilities.caloTruthCells_cff")
# process.caloTruthCellsProducer.triggerCells = cms.InputTag('VFEfp7:HGCalVFEProcessorSums')
# process.caloTruthCellsProducer.makeCellsCollection = True
# process.caloTruth_step = cms.Path(process.caloTruthCells)
# process.ntuple_triggercells.FillTruthMap = True
# process.ntuple_triggercells.caloParticlesToCells = cms.InputTag('caloTruthCellsProducer')

process.hgcalTowerMapProducer.InputTriggerCells = cms.InputTag(
Beispiel #3
0
chains.register_ntuple("Genclustersntuple",
                       lambda p, i: ntuple.create_ntuple(p, i, ntuple_list))

# Register trigger chains
concentrator_algos = [
    'Supertriggercell', 'Supertriggercell4444fixed', 'Equalshare', 'Onebit'
]
backend_algos = [
    'Histomax', 'Histomaxth0', 'Histomaxth20', 'Histomaxdr50', 'Histomaxdr200'
]
## Make cross product fo ECON and BE algos
import itertools
for cc, be in itertools.product(concentrator_algos, backend_algos):
    if 'Supertriggercell' in cc:
        # Use a shape threshold of 1.5 mipT for STC
        chains.register_chain('Floatingpoint8', cc, 'Dummy', be + 'shape15',
                              'Genmatch', 'Genclustersntuple')
    else:
        chains.register_chain('Floatingpoint8', cc, 'Dummy', be, 'Genmatch',
                              'Genclustersntuple')

process = chains.create_sequences(process)

# Remove towers from sequence
process.hgcalTriggerPrimitives.remove(process.hgcalTowerMap)
process.hgcalTriggerPrimitives.remove(process.hgcalTower)

process.hgcl1tpg_step = cms.Path(process.hgcalTriggerPrimitives)
process.selector_step = cms.Path(process.hgcalTriggerSelector)
process.ntuple_step = cms.Path(process.hgcalTriggerNtuples)

# Schedule definition
Beispiel #4
0
chain.register_concentrator("tcTh", concentrator.create_threshold)
chain.register_concentrator("sTC", concentrator.create_supertriggercell)

chain.register_backend1("dRNNC2d", clustering2d.create_constrainedtopological)
chain.register_backend1("dummyC2d", clustering2d.create_dummy)

chain.register_backend2("histoMaxC3dVR",
                        clustering3d.create_histoMax_variableDr)
chain.register_backend2(
    "histoMaxC3dVRPhiBins",
    lambda p, i: clustering3d.create_histoMax_variableDr(p, i, nBins_Phi=108))

chain.register_backend2("dRC3d", clustering3d.create_distance)

# chain.register_chain('VFEfp7', 'tcTh', 'dummyC2d', 'histoMaxC3d')
chain.register_chain('VFEfp7', 'tcTh', 'dummyC2d', 'histoMaxC3dVR')
chain.register_chain('VFEfp7', 'tcTh', 'dummyC2d', 'histoMaxC3dVRPhiBins')
chain.register_chain('VFEfp7', 'sTC', 'dummyC2d', 'histoMaxC3dVR')
chain.register_chain('VFEfp7', 'tcTh', 'dRNNC2d', 'dRC3d')

# chain.register_chain('Floatingpoint7', 'Threshold', 'Dummy', 'Histothreshold')
# chain.register_chain('Floatingpoint7', 'Bestchoice', 'Dummy', 'Histothreshold')
process = chain.create_sequences(process)

process.load("L1Trigger.L1THGCalUtilities.caloTruthCells_cff")
process.caloTruthCellsProducer.triggerCells = cms.InputTag(
    'VFEfp7:HGCalVFEProcessorSums')
process.caloTruth_step = cms.Path(process.caloTruthCells)

process.hgcalTowerMapProducer.InputTriggerCells = cms.InputTag(
    'VFEfp7:HGCalVFEProcessorSums')
## BE2
chains.register_backend2("Ref3d", clustering3d.create_distance)
chains.register_backend2("Histomax", clustering3d.create_histoMax)
chains.register_backend2("Histomaxvardrth0", lambda p,i : clustering3d.create_histoMax_variableDr(p,i,seed_threshold=0.))
chains.register_backend2("Histomaxvardrth10", lambda p,i : clustering3d.create_histoMax_variableDr(p,i,seed_threshold=10.))
chains.register_backend2("Histomaxvardrth20", lambda p,i : clustering3d.create_histoMax_variableDr(p,i,seed_threshold=20.))
# Register ntuples
# Store gen info only in the reference ntuple
ntuple_list_ref = ['event', 'gen', 'multiclusters']
ntuple_list = ['event', 'multiclusters']
chains.register_ntuple("Genclustersntuple", lambda p,i : ntuple.create_ntuple(p,i, ntuple_list_ref))
chains.register_ntuple("Clustersntuple", lambda p,i : ntuple.create_ntuple(p,i, ntuple_list))

# Register trigger chains
## Reference chain
chains.register_chain('Floatingpoint8', "Threshold", 'Ref2d', 'Ref3d', 'Genclustersntuple')
concentrator_algos = ['Supertriggercell', 'Threshold']
backend_algos = ['Histomax', 'Histomaxvardrth0', 'Histomaxvardrth10', 'Histomaxvardrth20']
## Make cross product fo ECON and BE algos
import itertools
for cc,be in itertools.product(concentrator_algos,backend_algos):
    chains.register_chain('Floatingpoint8', cc, 'Dummy', be, 'Clustersntuple')

process = chains.create_sequences(process)

# Remove towers from sequence
process.hgcalTriggerPrimitives.remove(process.hgcalTowerMap)
process.hgcalTriggerPrimitives.remove(process.hgcalTower)

process.hgcl1tpg_step = cms.Path(process.hgcalTriggerPrimitives)
process.ntuple_step = cms.Path(process.hgcalTriggerNtuples)
    "Genclustersntuple",
    lambda p, i: ntuple.create_ntuple(p, i, ntuple_list_ref))
chains.register_ntuple("Clustersntuple",
                       lambda p, i: ntuple.create_ntuple(p, i, ntuple_list))

# Register trigger chains
concentrator_algos = ['Threshold', 'Supertriggercell']
backend_algos = ['Histomaxvardr']
## Make cross product fo ECON and BE algos
import itertools
ch_idx = 0  #add gen info to first chain
for cc, be in itertools.product(concentrator_algos, backend_algos):
    if ch_idx == 0:
        chains.register_chain('Floatingpoint8',
                              cc,
                              'Dummy',
                              be,
                              ntuple='Genclustersntuple')
    else:
        chains.register_chain('Floatingpoint8',
                              cc,
                              'Dummy',
                              be,
                              ntuple='Clustersntuple')
    ch_idx += 1

#Add chains to process
process = chains.create_sequences(process)

# Set MinPt threshold in each chain
for ch in chains.chain: