CMS 3D CMS Logo

customiseHybrid.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 ## Adjust the local reco sequence for running on hybrid zero-suppressed data
4 def runOnHybridZS(process):
5  process.load("RecoLocalTracker.SiStripZeroSuppression.SiStripZeroSuppression_cfi")
6  process.load("RecoLocalTracker.SiStripClusterizer.SiStripClusterizer_cfi")
7  zsInputs = process.siStripZeroSuppression.RawDigiProducersList
8  clusInputs = process.siStripClusters.DigiProducersList
9  unpackedZS = cms.InputTag("siStripDigis", "ZeroSuppressed")
10  zsInputs.append(unpackedZS)
11  clusInputs.remove(unpackedZS)
12  clusInputs.append(cms.InputTag("siStripZeroSuppression","ZeroSuppressed"))
13  # for on-demand clusterizer
14  from FWCore.ParameterSet.MassReplace import massReplaceParameter
15  massReplaceParameter(process, "HybridZeroSuppressed", cms.bool(False), cms.bool(True))
16  return process
17 
18 ## Change the (normal, ZS) repacker to use zero-suppressed hybrid data
19 def repackZSHybrid(process):
20  process.SiStripDigiToZSRaw.InputDigis = cms.InputTag("siStripZeroSuppression", "ZeroSuppressed")
21 
22  process.DigiToRawRepack.insert(0, process.siStripZeroSuppression)
23 
24  return process
25 
26 ## Add the ZS algorithm (in hybrid emulation mode) before repacking, to produce emulated hybrid samples with
27 ## cmsDriver --step RAW2DIGI,REPACK:DigiToHybridRawRepack --customiseRecoLocalTracker/SiStripZeroSuppression/customiseHybrid.addHybridEmulationBeforeRepack ...
29  process.load("RecoLocalTracker.SiStripZeroSuppression.SiStripZeroSuppression_cfi")
30  zs = process.siStripZeroSuppression
31  zs.produceRawDigis = False
32  zs.produceHybridFormat = True
33  zs.Algorithms.APVInspectMode = "HybridEmulation"
34  zs.Algorithms.APVRestoreMode = ""
35  zs.Algorithms.CommonModeNoiseSubtractionMode = 'Median'
36  zs.Algorithms.MeanCM = 512
37  zs.Algorithms.DeltaCMThreshold = 20
38  zs.Algorithms.Use10bitsTruncation = True
39  zs.RawDigiProducersList = cms.VInputTag(cms.InputTag("siStripDigis", "VirginRaw"))
40 
41  process.DigiToHybridRawRepack.insert(0, zs) ## insert before repacking
42 
43  return process
def repackZSHybrid(process)
Change the (normal, ZS) repacker to use zero-suppressed hybrid data.
def addHybridEmulationBeforeRepack(process)
Add the ZS algorithm (in hybrid emulation mode) before repacking, to produce emulated hybrid samples ...
def runOnHybridZS(process)
Adjust the local reco sequence for running on hybrid zero-suppressed data.
def massReplaceParameter(process, name="label", old="rawDataCollector", new="rawDataRepacker", verbose=False)
Definition: MassReplace.py:119