CMS 3D CMS Logo

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