CMS 3D CMS Logo

ctppsRawToDigi_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # ---------- trigger data ----------
4 from EventFilter.CTPPSRawToDigi.totemTriggerRawToDigi_cfi import totemTriggerRawToDigi
5 totemTriggerRawToDigi.rawDataTag = cms.InputTag("rawDataCollector")
6 
7 # ---------- Si strips ----------
8 totemDAQMappingESSourceXML_TrackingStrip = cms.ESSource("TotemDAQMappingESSourceXML",
9  verbosity = cms.untracked.uint32(0),
10  subSystem = cms.untracked.string("TrackingStrip"),
11  sampicSubDetId = cms.uint32(6),
12  configuration = cms.VPSet(
13  # 2016, before TS2
14  cms.PSet(
15  validityRange = cms.EventRange("1:min - 280385:max"),
16  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_tracking_strip_2016_to_fill_5288.xml"),
17  maskFileNames = cms.vstring()
18  ),
19  # 2016, during TS2
20  cms.PSet(
21  validityRange = cms.EventRange("280386:min - 281600:max"),
22  mappingFileNames = cms.vstring(),
23  maskFileNames = cms.vstring()
24  ),
25  # 2016, after TS2
26  cms.PSet(
27  validityRange = cms.EventRange("281601:min - 290872:max"),
28  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_tracking_strip_2016_from_fill_5330.xml"),
29  maskFileNames = cms.vstring()
30  ),
31  # 2017
32  cms.PSet(
33  validityRange = cms.EventRange("290873:min - 311625:max"),
34  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_tracking_strip_2017.xml"),
35  maskFileNames = cms.vstring()
36  ),
37  # 2018
38  cms.PSet(
39  validityRange = cms.EventRange("311626:min - 339999:max"),
40  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_tracking_strip_2018.xml"),
41  maskFileNames = cms.vstring()
42  ),
43  # 2022
44  cms.PSet(
45  validityRange = cms.EventRange("340000:min - 999999999:max"),
46  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_tracking_strip_2022.xml"),
47  maskFileNames = cms.vstring()
48  )
49 
50  )
51 )
52 
53 from EventFilter.CTPPSRawToDigi.totemRPRawToDigi_cfi import totemRPRawToDigi
54 totemRPRawToDigi.rawDataTag = cms.InputTag("rawDataCollector")
55 
56 # various error/warning/info output may be enabled with these flags
57 # totemRPRawToDigi.RawUnpacking.verbosity = 1
58 # totemRPRawToDigi.RawToDigi.verbosity = 1 # or higher number for more output
59 # totemRPRawToDigi.RawToDigi.printErrorSummary = 1
60 # totemRPRawToDigi.RawToDigi.printUnknownFrameSummary = 1
61 
62 # ---------- diamonds ----------
63 totemDAQMappingESSourceXML_TimingDiamond = cms.ESSource("TotemDAQMappingESSourceXML",
64  verbosity = cms.untracked.uint32(0),
65  subSystem = cms.untracked.string("TimingDiamond"),
66  sampicSubDetId = cms.uint32(6),
67  configuration = cms.VPSet(
68  # 2016, before diamonds inserted in DAQ
69  cms.PSet(
70  validityRange = cms.EventRange("1:min - 283819:max"),
71  mappingFileNames = cms.vstring(),
72  maskFileNames = cms.vstring()
73  ),
74  # 2016, after diamonds inserted in DAQ
75  cms.PSet(
76  validityRange = cms.EventRange("283820:min - 292520:max"),
77  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_timing_diamond.xml"),
78  maskFileNames = cms.vstring()
79  ),
80  # 2017
81  cms.PSet(
82  validityRange = cms.EventRange("292521:min - 310000:max"),
83  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_timing_diamond_2017.xml"),
84  maskFileNames = cms.vstring()
85  ),
86  # 2018
87  cms.PSet(
88  validityRange = cms.EventRange("310001:min - 339999:max"),
89  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_timing_diamond_2018.xml"),
90  maskFileNames = cms.vstring()
91  ),
92  # 2022
93  cms.PSet(
94  validityRange = cms.EventRange("340000:min - 999999999:max"),
95  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_timing_diamond_2022.xml"),
96  maskFileNames = cms.vstring()
97  )
98 
99  )
100 )
101 
102 from EventFilter.CTPPSRawToDigi.ctppsDiamondRawToDigi_cfi import ctppsDiamondRawToDigi
103 ctppsDiamondRawToDigi.rawDataTag = cms.InputTag("rawDataCollector")
104 
105 # ---------- Totem Timing ----------
106 totemDAQMappingESSourceXML_TotemTiming = cms.ESSource("TotemDAQMappingESSourceXML",
107  verbosity = cms.untracked.uint32(0),
108  subSystem = cms.untracked.string("TotemTiming"),
109  sampicSubDetId = cms.uint32(5),
110  configuration = cms.VPSet(
111  # 2017, before detector inserted in DAQ
112  cms.PSet(
113  validityRange = cms.EventRange("1:min - 310000:max"),
114  mappingFileNames = cms.vstring(),
115  maskFileNames = cms.vstring()
116  ),
117  # 2018
118  cms.PSet(
119  validityRange = cms.EventRange("310001:min - 339999:max"),
120  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_totem_timing_2018.xml"),
121  maskFileNames = cms.vstring()
122  ),
123  # 2022
124  cms.PSet(
125  validityRange = cms.EventRange("340000:min - 999999999:max"),
126  mappingFileNames = cms.vstring("CondFormats/PPSObjects/xml/mapping_totem_timing_2022.xml"),
127  maskFileNames = cms.vstring()
128  )
129  )
130 )
131 
132 from EventFilter.CTPPSRawToDigi.totemTimingRawToDigi_cfi import totemTimingRawToDigi
133 totemTimingRawToDigi.rawDataTag = cms.InputTag("rawDataCollector")
134 
135 # ---------- pixels ----------
136 from EventFilter.CTPPSRawToDigi.ctppsPixelDigis_cfi import ctppsPixelDigis
137 ctppsPixelDigis.inputLabel = cms.InputTag("rawDataCollector")
138 
139 from Configuration.Eras.Modifier_ctpps_2016_cff import ctpps_2016
140 from Configuration.Eras.Modifier_ctpps_2017_cff import ctpps_2017
141 from Configuration.Eras.Modifier_ctpps_2018_cff import ctpps_2018
142 (ctpps_2016 | ctpps_2017 | ctpps_2018).toModify(ctppsPixelDigis, isRun3 = False )
143 (ctpps_2016 | ctpps_2017 | ctpps_2018).toModify(totemDAQMappingESSourceXML_TotemTiming, sampicSubDetId = 6 )
144 
145 # raw-to-digi task and sequence
146 ctppsRawToDigiTask = cms.Task(
147  totemTriggerRawToDigi,
148  totemRPRawToDigi,
149  ctppsDiamondRawToDigi,
150  totemTimingRawToDigi,
151  ctppsPixelDigis
152 )
153 ctppsRawToDigi = cms.Sequence(ctppsRawToDigiTask)