CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LEDCalibrationChannels.py
Go to the documentation of this file.
1 # Specify detector coordinates of LED calibration channels
2 import FWCore.ParameterSet.Config as cms
3 
4 # Coordinates as python tuples, (ieta, iphi, depth)
5 led_calibration_channels_tuple = {
6  "HB":{},
7  "HE":{
8  (-16, 48, 10),
9  (-16, 112, 10),
10  (-17, 48, 10),
11  (-17, 112, 10),
12  (-18, 48, 10),
13  (-18, 112, 10),
14  (-19, 48, 10),
15  (-19, 112, 10),
16  (-20, 48, 10),
17  (-20, 112, 10),
18  (-21, 48, 10),
19  (-21, 112, 10),
20  (-22, 48, 10),
21  (-22, 112, 10),
22  (-23, 48, 10),
23  (-23, 112, 10),
24  (-24, 48, 10),
25  (-24, 112, 10),
26  (-48, 48, 10),
27  (-48, 112, 10),
28  (-49, 48, 10),
29  (-49, 112, 10),
30  (-50, 48, 10),
31  (-50, 112, 10),
32  (-51, 48, 10),
33  (-51, 112, 10),
34  (-52, 48, 10),
35  (-52, 112, 10),
36  (-53, 48, 10),
37  (-53, 112, 10),
38  (-54, 48, 10),
39  (-54, 112, 10),
40  (-55, 48, 10),
41  (-55, 112, 10),
42  (-56, 48, 10),
43  (-56, 112, 10),
44  },
45 
46  "HO":{},
47  "HF":{
48  (-16, 16, 12),
49  (-18, 48, 12),
50  (-20, 80, 12),
51  (-22, 112, 12),
52  (-50, 48, 12),
53  (-52, 80, 12),
54  (-54, 112, 12),
55  (-54, 120, 12),
56  },
57 }
58 
59 # Convert tuples to CMSSW objects
60 ledCalibrationChannels = cms.VPSet()
61 for subdet in ["HB", "HE", "HO", "HF"]:
62  subdet_channels = cms.untracked.PSet(
63  ieta = cms.untracked.vint32(),
64  iphi = cms.untracked.vint32(),
65  depth = cms.untracked.vint32()
66  )
67  for channel in led_calibration_channels_tuple[subdet]:
68  subdet_channels.ieta.append(channel[0])
69  subdet_channels.iphi.append(channel[1])
70  subdet_channels.depth.append(channel[2])
71  ledCalibrationChannels.append(subdet_channels)