CMS 3D CMS Logo

clustering2d.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from L1Trigger.L1THGCal.l1tHGCalBackEndLayer1Producer_cfi import dummy_C2d_params, \
3  distance_C2d_params, \
4  topological_C2d_params, \
5  constrTopological_C2d_params, \
6  layer1truncation_proc, \
7  truncation_params
8 from L1Trigger.L1THGCal.customClustering import set_threshold_params
9 
10 
11 def create_distance(process, inputs,
12  distance=distance_C2d_params.dR_cluster, # cm
13  seed_threshold=distance_C2d_params.seeding_threshold_silicon, # MipT
14  cluster_threshold=distance_C2d_params.clustering_threshold_silicon # MipT
15  ):
16  producer = process.l1tHGCalBackEndLayer1Producer.clone(
17  InputTriggerCells = cms.InputTag(inputs)
18  )
19  producer.ProcessorParameters.C2d_parameters = distance_C2d_params.clone(
20  dR_cluster = distance
21  )
22  set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
23  return producer
24 
25 
26 def create_topological(process, inputs,
27  seed_threshold=topological_C2d_params.seeding_threshold_silicon, # MipT
28  cluster_threshold=topological_C2d_params.clustering_threshold_silicon # MipT
29  ):
30  producer = process.l1tHGCalBackEndLayer1Producer.clone(
31  InputTriggerCells = cms.InputTag(inputs)
32  )
33  producer.ProcessorParameters.C2d_parameters = topological_C2d_params.clone()
34  set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
35  return producer
36 
37 
38 def create_constrainedtopological(process, inputs,
39  distance=constrTopological_C2d_params.dR_cluster, # cm
40  seed_threshold=constrTopological_C2d_params.seeding_threshold_silicon, # MipT
41  cluster_threshold=constrTopological_C2d_params.clustering_threshold_silicon # MipT
42  ):
43  producer = process.l1tHGCalBackEndLayer1Producer.clone(
44  InputTriggerCells = cms.InputTag(inputs)
45  )
46  producer.ProcessorParameters.C2d_parameters = constrTopological_C2d_params.clone(
47  dR_cluster = distance
48  )
49  set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
50  return producer
51 
52 
53 
55  def __call__(self, process, inputs):
56  producer = process.l1tHGCalBackEndLayer1Producer.clone(
57  InputTriggerCells = cms.InputTag(inputs)
58  )
59  producer.ProcessorParameters.C2d_parameters = dummy_C2d_params.clone()
60  return producer
61 
63  def __call__(self, process, inputs):
64  producer = process.l1tHGCalBackEndLayer1Producer.clone(
65  InputTriggerCells = cms.InputTag(inputs)
66  )
67  producer.ProcessorParameters.C2d_parameters = dummy_C2d_params.clone()
68  return producer
69 
70 
72  def __init__(self,
73  maxTcsPerBin=truncation_params.maxTcsPerBin):
74  self.processor = layer1truncation_proc.clone(
75  truncation_parameters=truncation_params.clone(
76  maxTcsPerBin=maxTcsPerBin
77  )
78  )
79 
80  def __call__(self, process, inputs):
81  producer = process.l1tHGCalBackEndLayer1Producer.clone(
82  InputTriggerCells = cms.InputTag(inputs),
83  ProcessorParameters = self.processor
84  )
85  return producer
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:29
def set_threshold_params(pset, seed_threshold, cluster_threshold)
def __call__(self, process, inputs)
Definition: clustering2d.py:63
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:42
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:15
def __init__(self, maxTcsPerBin=truncation_params.maxTcsPerBin)
Definition: clustering2d.py:73
def __call__(self, process, inputs)
Definition: clustering2d.py:80
def __call__(self, process, inputs)
Definition: clustering2d.py:55