CMS 3D CMS Logo

customTowers.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from L1Trigger.L1THGCal.hgcalTowerMapProducer_cfi import L1TTriggerTowerConfig_energySplit
3 import math
4 
6  process.l1tHGCalTowerProducer.InputTriggerCells = cms.InputTag('l1tHGCalBackEndLayer2Producer:HGCalBackendLayer2Processor3DClusteringUnclustered')
7  process.l1tHGCalTowerProducerHFNose.InputTriggerCells = cms.InputTag('l1tHGCalBackEndLayer2ProducerHFNose:HGCalBackendLayer2Processor3DClusteringUnclustered')
8  return process
9 
10 
11 def custom_towers_all_tc(process):
12  process.l1tHGCalTowerProducer.InputTriggerCells = cms.InputTag('l1tHGCalBackEndLayer1Producer:HGCalBackendLayer1Processor2DClustering')
13  process.l1tHGCalTowerProducerHFNose.InputTriggerCells = cms.InputTag('l1tHGCalBackEndLayer1ProducerHFNose:HGCalBackendLayer1Processor2DClustering')
14  return process
15 
16 
17 def custom_towers_etaphi(process,
18  minEta=1.479,
19  maxEta=3.0,
20  minPhi=-math.pi,
21  maxPhi=math.pi,
22  nBinsEta=18,
23  nBinsPhi=72,
24  binsEta=[],
25  binsPhi=[]
26  ):
27  parameters_towers_2d = process.l1tHGCalTowerMapProducer.ProcessorParameters.towermap_parameters
28  parameters_towers_2d.L1TTriggerTowerConfig.readMappingFile = cms.bool(False)
29  parameters_towers_2d.L1TTriggerTowerConfig.minEta = cms.double(minEta)
30  parameters_towers_2d.L1TTriggerTowerConfig.maxEta = cms.double(maxEta)
31  parameters_towers_2d.L1TTriggerTowerConfig.minPhi = cms.double(minPhi)
32  parameters_towers_2d.L1TTriggerTowerConfig.maxPhi = cms.double(maxPhi)
33  parameters_towers_2d.L1TTriggerTowerConfig.nBinsEta = cms.int32(nBinsEta)
34  parameters_towers_2d.L1TTriggerTowerConfig.nBinsPhi = cms.int32(nBinsPhi)
35  parameters_towers_2d.L1TTriggerTowerConfig.binsEta = cms.vdouble(binsEta)
36  parameters_towers_2d.L1TTriggerTowerConfig.binsPhi = cms.vdouble(binsPhi)
37  return process
38 
40  parameters_towers_2d = L1TTriggerTowerConfig_energySplit.clone()
41  process.hgcalTowerMapProducer.ProcessorParameters.towermap_parameters.L1TTriggerTowerConfig = parameters_towers_2d
42  return process
43 
44 def custom_towers_map(process,
45  towermapping='L1Trigger/L1THGCal/data/tower_mapping_hgcroc_eta-phi_v3.txt',
46  minEta=1.479,
47  maxEta=3.0,
48  minPhi=-math.pi,
49  maxPhi=math.pi,
50  nBinsEta=18,
51  nBinsPhi=72
52  ):
53  parameters_towers_2d = process.l1tHGCalTowerMapProducer.ProcessorParameters.towermap_parameters
54  parameters_towers_2d.L1TTriggerTowerConfig.readMappingFile = cms.bool(True)
55  parameters_towers_2d.L1TTriggerTowerConfig.L1TTriggerTowerMapping = cms.FileInPath(towermapping)
56  parameters_towers_2d.L1TTriggerTowerConfig.minEta = cms.double(minEta)
57  parameters_towers_2d.L1TTriggerTowerConfig.maxEta = cms.double(maxEta)
58  parameters_towers_2d.L1TTriggerTowerConfig.minPhi = cms.double(minPhi)
59  parameters_towers_2d.L1TTriggerTowerConfig.maxPhi = cms.double(maxPhi)
60  parameters_towers_2d.L1TTriggerTowerConfig.nBinsEta = cms.int32(nBinsEta)
61  parameters_towers_2d.L1TTriggerTowerConfig.nBinsPhi = cms.int32(nBinsPhi)
62  return process
63 
64 
65 def custom_tower_map_hgcroc(process,
66  towermapping='L1Trigger/L1THGCal/data/tower_mapping_hgcroc_eta-phi_v3.txt',
67  minEta=1.479,
68  maxEta=3.0,
69  minPhi=-math.pi,
70  maxPhi=math.pi,
71  nBinsEta=18,
72  nBinsPhi=72
73  ):
74  return custom_towers_map(process,
75  towermapping,
76  minEta,
77  maxEta,
78  minPhi,
79  maxPhi,
80  nBinsEta,
81  nBinsPhi
82  )
83 
84 
85 def custom_tower_map_wafer(process,
86  towermapping='L1Trigger/L1THGCal/data/tower_mapping_wafer_eta-phi_v3.txt',
87  minEta=1.479,
88  maxEta=3.0,
89  minPhi=-math.pi,
90  maxPhi=math.pi,
91  nBinsEta=18,
92  nBinsPhi=72
93  ):
94  return custom_towers_map(process,
95  towermapping,
96  minEta,
97  maxEta,
98  minPhi,
99  maxPhi,
100  nBinsEta,
101  nBinsPhi
102  )
def custom_towers_etaphi(process, minEta=1.479, maxEta=3.0, minPhi=-math.pi, maxPhi=math.pi, nBinsEta=18, nBinsPhi=72, binsEta=[], binsPhi=[])
Definition: customTowers.py:26
def custom_towers_unclustered_tc(process)
Definition: customTowers.py:5
def custom_tower_map_wafer(process, towermapping='L1Trigger/L1THGCal/data/tower_mapping_wafer_eta-phi_v3.txt', minEta=1.479, maxEta=3.0, minPhi=-math.pi, maxPhi=math.pi, nBinsEta=18, nBinsPhi=72)
Definition: customTowers.py:93
def custom_tower_map_hgcroc(process, towermapping='L1Trigger/L1THGCal/data/tower_mapping_hgcroc_eta-phi_v3.txt', minEta=1.479, maxEta=3.0, minPhi=-math.pi, maxPhi=math.pi, nBinsEta=18, nBinsPhi=72)
Definition: customTowers.py:73
def custom_towers_energySplit(process)
Definition: customTowers.py:39
def custom_towers_map(process, towermapping='L1Trigger/L1THGCal/data/tower_mapping_hgcroc_eta-phi_v3.txt', minEta=1.479, maxEta=3.0, minPhi=-math.pi, maxPhi=math.pi, nBinsEta=18, nBinsPhi=72)
Definition: customTowers.py:52
def custom_towers_all_tc(process)
Definition: customTowers.py:11