Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:25:15

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ## Adjust the local reco sequence for running on hybrid zero-suppressed data
0004 def runOnHybridZS(process):
0005     process.load("RecoLocalTracker.SiStripZeroSuppression.SiStripZeroSuppression_cfi")
0006     process.load("RecoLocalTracker.SiStripClusterizer.SiStripClusterizer_cfi")
0007     process.siStripZeroSuppression.Algorithms.APVInspectMode = "Hybrid"
0008     zsInputs = process.siStripZeroSuppression.RawDigiProducersList
0009     clusInputs = process.siStripClusters.DigiProducersList
0010     unpackedZS = cms.InputTag("siStripDigis", "ZeroSuppressed")
0011     zsInputs.append(unpackedZS)
0012     clusInputs.remove(unpackedZS)
0013     clusInputs.append(cms.InputTag("siStripZeroSuppression","ZeroSuppressed"))
0014     # for on-demand clusterizer
0015     from FWCore.ParameterSet.MassReplace import massReplaceParameter
0016     massReplaceParameter(process, "HybridZeroSuppressed", cms.bool(False), cms.bool(True))
0017     return process
0018 
0019 ## Change the (normal, ZS) repacker to use zero-suppressed hybrid data
0020 def repackZSHybrid(process):
0021     process.SiStripDigiToZSRaw.InputDigis = cms.InputTag("siStripZeroSuppression", "ZeroSuppressed")
0022 
0023     process.DigiToRawRepack.insert(0, process.siStripZeroSuppression)
0024 
0025     return process
0026 
0027 ## Add the ZS algorithm (in hybrid emulation mode) before repacking, to produce emulated hybrid samples with
0028 ##   cmsDriver --step RAW2DIGI,REPACK:DigiToHybridRawRepack --customiseRecoLocalTracker/SiStripZeroSuppression/customiseHybrid.addHybridEmulationBeforeRepack ...
0029 def addHybridEmulationBeforeRepack(process):
0030     process.load("RecoLocalTracker.SiStripZeroSuppression.SiStripZeroSuppression_cfi")
0031     zs = process.siStripZeroSuppression
0032     zs.produceRawDigis = False
0033     zs.produceHybridFormat = True
0034     zs.Algorithms.APVInspectMode = "HybridEmulation"
0035     zs.Algorithms.APVRestoreMode = ""
0036     zs.Algorithms.CommonModeNoiseSubtractionMode = 'Median'
0037     zs.Algorithms.MeanCM = 0
0038     zs.Algorithms.DeltaCMThreshold = 20
0039     zs.Algorithms.Use10bitsTruncation = True
0040     zs.RawDigiProducersList = cms.VInputTag(cms.InputTag("siStripDigis", "VirginRaw"))
0041 
0042     process.DigiToHybridRawRepack.insert(0, zs) ## insert before repacking
0043 
0044     return process