Skip to content

Commit

Permalink
Adjust customisations for separate hybridemulation, repack+zs and rec…
Browse files Browse the repository at this point in the history
…o steps
  • Loading branch information
pieterdavid committed Sep 5, 2018
1 parent 97603e4 commit b462d55
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#RAW
RecoHIRAWOutput=cms.untracked.vstring('keep FEDRawDataCollection_rawDataRepacker_*_*',
'keep FEDRawDataCollection_hybridRawDataRepacker_*_*',
'keep FEDRawDataCollection_virginRawDataRepacker_*_*')

RAWEventContent.outputCommands.extend(RecoHIRAWOutput)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RawDataTag = cms.InputTag('rawDataCollector')
)

SiStripDigiToZS10Raw = SiStripDigiToZSRaw.clone(
SiStripDigiToHybridRaw = SiStripDigiToZSRaw.clone(
PacketCode = cms.string('ZERO_SUPPRESSED10'),
)

Expand All @@ -34,6 +34,11 @@
cms.InputTag('source'),
cms.InputTag('rawDataCollector'))
)
hybridRawDataRepacker = rawDataRepacker.clone(
RawCollectionList = cms.VInputTag( cms.InputTag('SiStripDigiToHybridRaw'),
cms.InputTag('source'),
cms.InputTag('rawDataCollector'))
)

virginRawDataRepacker = rawDataRepacker.clone(
RawCollectionList = cms.VInputTag( cms.InputTag('SiStripRawDigiToVirginRaw'))
Expand All @@ -44,6 +49,6 @@
##

DigiToRawRepack = cms.Sequence( SiStripDigiToZSRaw * rawDataRepacker )
DigiToZS10RawRepack = cms.Sequence( SiStripDigiToZS10Raw * rawDataRepacker )
DigiToHybridRawRepack = cms.Sequence( SiStripDigiToHybridRaw * hybridRawDataRepacker )
DigiToVirginRawRepack = cms.Sequence( SiStripRawDigiToVirginRaw * virginRawDataRepacker )
DigiToSplitRawRepack = cms.Sequence( DigiToRawRepack + DigiToVirginRawRepack )
20 changes: 13 additions & 7 deletions RecoLocalTracker/SiStripZeroSuppression/python/customiseHybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Adjust the local reco sequence for running on hybrid zero-suppressed data
def runOnHybridZS(process):
process.load("RecoLocalTracker.SiStripZeroSuppression.SiStripZeroSuppression_cfi")
process.load("RecoLocalTracker.SiStripClusterizer.SiStripClusterizer_cfi")
zsInputs = process.siStripZeroSuppression.RawDigiProducersList
clusInputs = process.siStripClusters.DigiProducersList
unpackedZS = cms.InputTag("siStripDigis", "ZeroSuppressed")
Expand All @@ -13,9 +15,17 @@ def runOnHybridZS(process):
massReplaceParameter(process, "HybridZeroSuppressed", cms.bool(False), cms.bool(True))
return process

## Change the (normal, ZS) repacker to use zero-suppressed hybrid data
def repackZSHybrid(process):
process.SiStripDigiToZSRaw.InputDigis = cms.InputTag("siStripZeroSuppression", "ZeroSuppressed")

process.DigiToRawRepack.insert(0, process.siStripZeroSuppression)

return process

## Add the ZS algorithm (in hybrid emulation mode) before repacking, to produce emulated hybrid samples with
## cmsDriver --step RAW2DIGI,REPACK:DigiToZS10RawRepack --customiseRecoLocalTracker/SiStripZeroSuppression/customiseHybrid.addHybridEmulationBeforeRepackZS10 ...
def addHybridEmulationBeforeRepackZS10(process):
## cmsDriver --step RAW2DIGI,REPACK:DigiToHybridRawRepack --customiseRecoLocalTracker/SiStripZeroSuppression/customiseHybrid.addHybridEmulationBeforeRepack ...
def addHybridEmulationBeforeRepack(process):
process.load("RecoLocalTracker.SiStripZeroSuppression.SiStripZeroSuppression_cfi")
zs = process.siStripZeroSuppression
zs.produceRawDigis = False
Expand All @@ -28,10 +38,6 @@ def addHybridEmulationBeforeRepackZS10(process):
zs.Algorithms.Use10bitsTruncation = True
zs.RawDigiProducersList = cms.VInputTag(cms.InputTag("siStripDigis", "VirginRaw"))

process.DigiToZS10RawRepack.insert(0, zs) ## insert before repacking
process.rawDataRepacker.RawCollectionList = cms.VInputTag(
cms.InputTag("SiStripDigiToZS10Raw"),
cms.InputTag('source'),
cms.InputTag('rawDataCollector'))
process.DigiToHybridRawRepack.insert(0, zs) ## insert before repacking

return process

0 comments on commit b462d55

Please sign in to comment.