CMS 3D CMS Logo

customTowers.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import math
3 
4 
5 def custom_towers_etaphi(process,
6  minEta=1.479,
7  maxEta=3.0,
8  minPhi=-math.pi,
9  maxPhi=math.pi,
10  nBinsEta=18,
11  nBinsPhi=72,
12  binsEta=[],
13  binsPhi=[]
14  ):
15  parameters_towers_2d = process.hgcalTowerMapProducer.ProcessorParameters.towermap_parameters
16  parameters_towers_2d.L1TTriggerTowerConfig.readMappingFile = cms.bool(False)
17  parameters_towers_2d.L1TTriggerTowerConfig.minEta = cms.double(minEta)
18  parameters_towers_2d.L1TTriggerTowerConfig.maxEta = cms.double(maxEta)
19  parameters_towers_2d.L1TTriggerTowerConfig.minPhi = cms.double(minPhi)
20  parameters_towers_2d.L1TTriggerTowerConfig.maxPhi = cms.double(maxPhi)
21  parameters_towers_2d.L1TTriggerTowerConfig.nBinsEta = cms.int32(nBinsEta)
22  parameters_towers_2d.L1TTriggerTowerConfig.nBinsPhi = cms.int32(nBinsPhi)
23  parameters_towers_2d.L1TTriggerTowerConfig.binsEta = cms.vdouble(binsEta)
24  parameters_towers_2d.L1TTriggerTowerConfig.binsPhi = cms.vdouble(binsPhi)
25  return process
26 
27 
28 def custom_towers_map(process,
29  towermapping='L1Trigger/L1THGCal/data/tower_mapping_hgcroc_eta-phi_v3.txt',
30  minEta=1.479,
31  maxEta=3.0,
32  minPhi=-math.pi,
33  maxPhi=math.pi,
34  nBinsEta=18,
35  nBinsPhi=72
36  ):
37  parameters_towers_2d = process.hgcalTowerMapProducer.ProcessorParameters.towermap_parameters
38  parameters_towers_2d.L1TTriggerTowerConfig.readMappingFile = cms.bool(True)
39  parameters_towers_2d.L1TTriggerTowerConfig.L1TTriggerTowerMapping = cms.FileInPath(towermapping)
40  parameters_towers_2d.L1TTriggerTowerConfig.minEta = cms.double(minEta)
41  parameters_towers_2d.L1TTriggerTowerConfig.maxEta = cms.double(maxEta)
42  parameters_towers_2d.L1TTriggerTowerConfig.minPhi = cms.double(minPhi)
43  parameters_towers_2d.L1TTriggerTowerConfig.maxPhi = cms.double(maxPhi)
44  parameters_towers_2d.L1TTriggerTowerConfig.nBinsEta = cms.int32(nBinsEta)
45  parameters_towers_2d.L1TTriggerTowerConfig.nBinsPhi = cms.int32(nBinsPhi)
46  return process
47 
48 
49 def custom_tower_map_hgcroc(process,
50  towermapping='L1Trigger/L1THGCal/data/tower_mapping_hgcroc_eta-phi_v3.txt',
51  minEta=1.479,
52  maxEta=3.0,
53  minPhi=-math.pi,
54  maxPhi=math.pi,
55  nBinsEta=18,
56  nBinsPhi=72
57  ):
58  return custom_towers_map(process,
59  towermapping,
60  minEta,
61  maxEta,
62  minPhi,
63  maxPhi,
64  nBinsEta,
65  nBinsPhi
66  )
67 
68 
69 def custom_tower_map_wafer(process,
70  towermapping='L1Trigger/L1THGCal/data/tower_mapping_wafer_eta-phi_v3.txt',
71  minEta=1.479,
72  maxEta=3.0,
73  minPhi=-math.pi,
74  maxPhi=math.pi,
75  nBinsEta=18,
76  nBinsPhi=72
77  ):
78  return custom_towers_map(process,
79  towermapping,
80  minEta,
81  maxEta,
82  minPhi,
83  maxPhi,
84  nBinsEta,
85  nBinsPhi
86  )
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:14
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:77
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:57
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:36