Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:50

0001 import FWCore.ParameterSet.Config as cms
0002 import RecoLocalCalo.HcalRecProducers.HBHEMethod3Parameters_cfi as method3
0003 import RecoLocalCalo.HcalRecProducers.HBHEMethod2Parameters_cfi as method2
0004 import RecoLocalCalo.HcalRecProducers.HBHEMethod0Parameters_cfi as method0
0005 import RecoLocalCalo.HcalRecProducers.HBHEMahiParameters_cfi as mahi
0006 import RecoLocalCalo.HcalRecProducers.HBHEPulseShapeFlagSetter_cfi as pulseShapeFlag
0007 import RecoLocalCalo.HcalRecProducers.HBHEStatusBitSetter_cfi as hbheStatusFlag
0008 
0009 hbheprereco = cms.EDProducer(
0010     "HBHEPhase1Reconstructor",
0011 
0012     # Label for the input HBHEDigiCollection, and flag indicating
0013     # whether we should process this collection
0014     digiLabelQIE8 = cms.InputTag("hcalDigis"),
0015     processQIE8 = cms.bool(True),
0016 
0017     # Label for the input QIE11DigiCollection, and flag indicating
0018     # whether we should process this collection
0019     digiLabelQIE11 = cms.InputTag("hcalDigis"),
0020     processQIE11 = cms.bool(True),
0021 
0022     # Get the "sample of interest" index from DB?
0023     # If not, it is taken from the dataframe.
0024     tsFromDB = cms.bool(False),
0025 
0026     # Use the HcalRecoParam structure from DB inside
0027     # the reconstruction algorithm?
0028     recoParamsFromDB = cms.bool(True),
0029 
0030     # store "effective" pedestal including SiPM dark current contribution
0031     saveEffectivePedestal = cms.bool(False),
0032 
0033     # Drop zero-suppressed channels?
0034     dropZSmarkedPassed = cms.bool(True),
0035 
0036     # Flag indicating whether we should produce HBHERecHitCollection
0037     makeRecHits = cms.bool(True),
0038 
0039     # Flag indicating whether we should produce HBHEChannelInfoCollection
0040     saveInfos = cms.bool(False),
0041 
0042     # Flag indicating whether we should include HBHEChannelInfo objects
0043     # into HBHEChannelInfoCollection despite the fact that the channels
0044     # are either tagged bad in DB of zero-suppressed. Note that the rechit
0045     # collection will not include such channels even if this flag is set.
0046     saveDroppedInfos = cms.bool(False),
0047 
0048     # Flag to use only 8 TSs for reconstruction. This should be in effect
0049     # only when there are 10 TSs, e.g., <=2017
0050     use8ts = cms.bool(True),
0051 
0052     # Parameters which define how we calculate the charge for the basic SiPM
0053     # nonlinearity correction. To sum up the charge in all time slices
0054     # (e.g., for cosmics), set sipmQTSShift to -100 and sipmQNTStoSum to 200.
0055     sipmQTSShift = cms.int32(0),
0056     sipmQNTStoSum = cms.int32(3),
0057 
0058     # Configure the reconstruction algorithm
0059     algorithm = cms.PSet(
0060         # Parameters for "Method 3" (non-keyword arguments have to go first)
0061         method3.m3Parameters,
0062         method2.m2Parameters,
0063         method0.m0Parameters,
0064         mahi.mahiParameters,
0065 
0066         Class = cms.string("SimpleHBHEPhase1Algo"),
0067 
0068         # Time shift (in ns) to add to TDC timing (for QIE11)
0069         tdcTimeShift = cms.double(0.0),
0070 
0071         # Use "Method 2"?
0072         useM2 = cms.bool(False),
0073 
0074         # Use "Method 3"?
0075         useM3 = cms.bool(True),
0076 
0077         # Use Mahi?
0078         useMahi = cms.bool(True),
0079 
0080         # Apply legacy HB- energy correction?
0081         applyLegacyHBMCorrection = cms.bool(True)
0082     ),
0083 
0084     # Reconstruction algorithm configuration data to fetch from DB, if any
0085     algoConfigClass = cms.string(""),
0086 
0087     # Turn rechit status bit setters on/off
0088     setNegativeFlagsQIE8 = cms.bool(True),
0089     setNegativeFlagsQIE11 = cms.bool(False),
0090     setNoiseFlagsQIE8 = cms.bool(True),
0091     setNoiseFlagsQIE11 = cms.bool(False),
0092     setPulseShapeFlagsQIE8 = cms.bool(True),
0093     setPulseShapeFlagsQIE11 = cms.bool(False),
0094     setLegacyFlagsQIE8 = cms.bool(True),
0095     setLegacyFlagsQIE11 = cms.bool(False),
0096 
0097     # Parameter sets configuring rechit status bit setters
0098     flagParametersQIE8 = cms.PSet(
0099         hbheStatusFlag.qie8Config
0100     ),
0101     flagParametersQIE11 = cms.PSet(),
0102 
0103     pulseShapeParametersQIE8 = cms.PSet(
0104         pulseShapeFlag.qie8Parameters
0105     ),
0106     pulseShapeParametersQIE11 = cms.PSet()
0107 )
0108 
0109 # Disable the "triangle peak fit" and the corresponding HBHETriangleNoise flag
0110 hbheprereco.pulseShapeParametersQIE8.TrianglePeakTS = 10000
0111 
0112 from Configuration.Eras.Modifier_run2_HE_2017_cff import run2_HE_2017
0113 run2_HE_2017.toModify(hbheprereco, saveEffectivePedestal = True)
0114 
0115 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0116 run3_common.toModify(hbheprereco, algorithm = dict(applyLegacyHBMCorrection = False, useM3 = False))