CMS 3D CMS Logo

HBHEPhase1Reconstructor_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import RecoLocalCalo.HcalRecProducers.HBHEMethod3Parameters_cfi as method3
3 import RecoLocalCalo.HcalRecProducers.HBHEMethod2Parameters_cfi as method2
4 import RecoLocalCalo.HcalRecProducers.HBHEMethod0Parameters_cfi as method0
5 import RecoLocalCalo.HcalRecProducers.HBHEMahiParameters_cfi as mahi
6 import RecoLocalCalo.HcalRecProducers.HBHEPulseShapeFlagSetter_cfi as pulseShapeFlag
7 import RecoLocalCalo.HcalRecProducers.HBHEStatusBitSetter_cfi as hbheStatusFlag
8 
9 hbheprereco = cms.EDProducer(
10  "HBHEPhase1Reconstructor",
11 
12  # Label for the input HBHEDigiCollection, and flag indicating
13  # whether we should process this collection
14  digiLabelQIE8 = cms.InputTag("hcalDigis"),
15  processQIE8 = cms.bool(True),
16 
17  # Label for the input QIE11DigiCollection, and flag indicating
18  # whether we should process this collection
19  digiLabelQIE11 = cms.InputTag("hcalDigis"),
20  processQIE11 = cms.bool(True),
21 
22  # Get the "sample of interest" index from DB?
23  # If not, it is taken from the dataframe.
24  tsFromDB = cms.bool(False),
25 
26  # Use the HcalRecoParam structure from DB inside
27  # the reconstruction algorithm?
28  recoParamsFromDB = cms.bool(True),
29 
30  # store "effective" pedestal including SiPM dark current contribution
31  saveEffectivePedestal = cms.bool(False),
32 
33  # Drop zero-suppressed channels?
34  dropZSmarkedPassed = cms.bool(True),
35 
36  # Flag indicating whether we should produce HBHERecHitCollection
37  makeRecHits = cms.bool(True),
38 
39  # Flag indicating whether we should produce HBHEChannelInfoCollection
40  saveInfos = cms.bool(False),
41 
42  # Flag indicating whether we should include HBHEChannelInfo objects
43  # into HBHEChannelInfoCollection despite the fact that the channels
44  # are either tagged bad in DB of zero-suppressed. Note that the rechit
45  # collection will not include such channels even if this flag is set.
46  saveDroppedInfos = cms.bool(False),
47 
48  # Flag to use only 8 TSs for reconstruction. This should be in effect
49  # only when there are 10 TSs, e.g., <=2017
50  use8ts = cms.bool(True),
51 
52  # Parameters which define how we calculate the charge for the basic SiPM
53  # nonlinearity correction. To sum up the charge in all time slices
54  # (e.g., for cosmics), set sipmQTSShift to -100 and sipmQNTStoSum to 200.
55  sipmQTSShift = cms.int32(0),
56  sipmQNTStoSum = cms.int32(3),
57 
58  # Configure the reconstruction algorithm
59  algorithm = cms.PSet(
60  # Parameters for "Method 3" (non-keyword arguments have to go first)
61  method3.m3Parameters,
62  method2.m2Parameters,
63  method0.m0Parameters,
64  mahi.mahiParameters,
65 
66  Class = cms.string("SimpleHBHEPhase1Algo"),
67 
68  # Time shift (in ns) to add to TDC timing (for QIE11)
69  tdcTimeShift = cms.double(0.0),
70 
71  # Use "Method 2"?
72  useM2 = cms.bool(False),
73 
74  # Use "Method 3"?
75  useM3 = cms.bool(True),
76 
77  # Use Mahi?
78  useMahi = cms.bool(True),
79 
80  # Apply legacy HB- energy correction?
81  applyLegacyHBMCorrection = cms.bool(True)
82  ),
83 
84  # Reconstruction algorithm configuration data to fetch from DB, if any
85  algoConfigClass = cms.string(""),
86 
87  # Turn rechit status bit setters on/off
88  setNegativeFlagsQIE8 = cms.bool(True),
89  setNegativeFlagsQIE11 = cms.bool(False),
90  setNoiseFlagsQIE8 = cms.bool(True),
91  setNoiseFlagsQIE11 = cms.bool(False),
92  setPulseShapeFlagsQIE8 = cms.bool(True),
93  setPulseShapeFlagsQIE11 = cms.bool(False),
94  setLegacyFlagsQIE8 = cms.bool(True),
95  setLegacyFlagsQIE11 = cms.bool(False),
96 
97  # Parameter sets configuring rechit status bit setters
98  flagParametersQIE8 = cms.PSet(
99  hbheStatusFlag.qie8Config
100  ),
101  flagParametersQIE11 = cms.PSet(),
102 
103  pulseShapeParametersQIE8 = cms.PSet(
104  pulseShapeFlag.qie8Parameters
105  ),
106  pulseShapeParametersQIE11 = cms.PSet()
107 )
108 
109 # Disable the "triangle peak fit" and the corresponding HBHETriangleNoise flag
110 hbheprereco.pulseShapeParametersQIE8.TrianglePeakTS = 10000
111 
112 from Configuration.Eras.Modifier_run2_HE_2017_cff import run2_HE_2017
113 run2_HE_2017.toModify(hbheprereco, saveEffectivePedestal = True)
114 
115 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
116 run3_HB.toModify(hbheprereco, algorithm = dict(applyLegacyHBMCorrection = False))