CMS 3D CMS Logo

clustering2d.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from L1Trigger.L1THGCal.hgcalBackEndLayer1Producer_cfi import dummy_C2d_params, \
3  distance_C2d_params, \
4  topological_C2d_params, \
5  constrTopological_C2d_params
6 from L1Trigger.L1THGCal.customClustering import set_threshold_params
7 
8 
9 def create_distance(process, inputs,
10  distance=distance_C2d_params.dR_cluster, # cm
11  seed_threshold=distance_C2d_params.seeding_threshold_silicon, # MipT
12  cluster_threshold=distance_C2d_params.clustering_threshold_silicon # MipT
13  ):
14  producer = process.hgcalBackEndLayer1Producer.clone(
15  InputTriggerCells = cms.InputTag('{}:HGCalConcentratorProcessorSelection'.format(inputs))
16  )
17  producer.ProcessorParameters.C2d_parameters = distance_C2d_params.clone(
18  dR_cluster = distance
19  )
20  set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
21  return producer
22 
23 
24 def create_topological(process, inputs,
25  seed_threshold=topological_C2d_params.seeding_threshold_silicon, # MipT
26  cluster_threshold=topological_C2d_params.clustering_threshold_silicon # MipT
27  ):
28  producer = process.hgcalBackEndLayer1Producer.clone(
29  InputTriggerCells = cms.InputTag('{}:HGCalConcentratorProcessorSelection'.format(inputs))
30  )
31  producer.ProcessorParameters.C2d_parameters = topological_C2d_params.clone()
32  set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
33  return producer
34 
35 
36 def create_constrainedtopological(process, inputs,
37  distance=constrTopological_C2d_params.dR_cluster, # cm
38  seed_threshold=constrTopological_C2d_params.seeding_threshold_silicon, # MipT
39  cluster_threshold=constrTopological_C2d_params.clustering_threshold_silicon # MipT
40  ):
41  producer = process.hgcalBackEndLayer1Producer.clone(
42  InputTriggerCells = cms.InputTag('{}:HGCalConcentratorProcessorSelection'.format(inputs))
43  )
44  producer.ProcessorParameters.C2d_parameters = constrTopological_C2d_params.clone(
45  dR_cluster = distance
46  )
47  set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
48  return producer
49 
50 
51 def create_dummy(process, inputs):
52  producer = process.hgcalBackEndLayer1Producer.clone(
53  InputTriggerCells = cms.InputTag('{}:HGCalConcentratorProcessorSelection'.format(inputs))
54  )
55  producer.ProcessorParameters.C2d_parameters = dummy_C2d_params.clone()
56  return producer
57 
58 def create_truth_dummy(process, inputs):
59  producer = process.hgcalBackEndLayer1Producer.clone(
60  InputTriggerCells = cms.InputTag('{}'.format(inputs))
61  )
62  producer.ProcessorParameters.C2d_parameters = dummy_C2d_params.clone()
63  return producer
clustering2d.create_constrainedtopological
def create_constrainedtopological(process, inputs, distance=constrTopological_C2d_params.dR_cluster, seed_threshold=constrTopological_C2d_params.seeding_threshold_silicon, cluster_threshold=constrTopological_C2d_params.clustering_threshold_silicon # MipT)
Definition: clustering2d.py:36
clustering2d.create_distance
def create_distance(process, inputs, distance=distance_C2d_params.dR_cluster, seed_threshold=distance_C2d_params.seeding_threshold_silicon, cluster_threshold=distance_C2d_params.clustering_threshold_silicon # MipT)
Definition: clustering2d.py:9
clustering2d.create_dummy
def create_dummy(process, inputs)
Definition: clustering2d.py:51
hgcalBackEndLayer1Producer_cfi
customClustering.set_threshold_params
def set_threshold_params(pset, seed_threshold, cluster_threshold)
Definition: customClustering.py:21
format
clustering2d.create_topological
def create_topological(process, inputs, seed_threshold=topological_C2d_params.seeding_threshold_silicon, cluster_threshold=topological_C2d_params.clustering_threshold_silicon # MipT)
Definition: clustering2d.py:24
clustering2d.create_truth_dummy
def create_truth_dummy(process, inputs)
Definition: clustering2d.py:58