Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
import FWCore.ParameterSet.Config as cms

# Start with Standard Digitization:

from SimCalorimetry.Configuration.SimCalorimetry_cff import *

from SimGeneral.DataMixingModule.mixOne_sim_on_sim_cfi import *

# Run after the DataMixer only.
#
# Calorimetry Digis (Ecal + Hcal) - * unsuppressed *
# 
#
# clone these sequences:

DMEcalTriggerPrimitiveDigis = simEcalTriggerPrimitiveDigis.clone()
DMEcalDigis = simEcalDigis.clone()
DMEcalPreshowerDigis = simEcalPreshowerDigis.clone()

# Re-define inputs to point at DataMixer output
DMEcalTriggerPrimitiveDigis.Label = cms.string('mixData')
DMEcalTriggerPrimitiveDigis.InstanceEB = cms.string('EBDigiCollectionDM')
DMEcalTriggerPrimitiveDigis.InstanceEE = cms.string('EEDigiCollectionDM')
#
DMEcalDigis.digiProducer = cms.string('mixData')
DMEcalDigis.EBdigiCollection = cms.string('EBDigiCollectionDM')
DMEcalDigis.EEdigiCollection = cms.string('EEDigiCollectionDM')
DMEcalDigis.trigPrimProducer = cms.string('DMEcalTriggerPrimitiveDigis')
#
DMEcalPreshowerDigis.digiProducer = cms.string('mixData')
#DMEcalPreshowerDigis.ESdigiCollection = cms.string('ESDigiCollectionDM')

ecalDigiSequenceDM = cms.Sequence(DMEcalTriggerPrimitiveDigis*DMEcalDigis*DMEcalPreshowerDigis)

# same for Hcal:

# clone these sequences:

DMHcalTriggerPrimitiveDigis = simHcalTriggerPrimitiveDigis.clone()
DMHcalDigis = simHcalDigis.clone()
DMHcalTTPDigis = simHcalTTPDigis.clone()

# Re-define inputs to point at DataMixer output
DMHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(cms.InputTag('mixData'),cms.InputTag('mixData'))
DMHcalTriggerPrimitiveDigis.inputUpgradeLabel = cms.VInputTag(cms.InputTag('mixData:HBHEQIE11DigiCollection'),cms.InputTag('mixData:HFQIE10DigiCollection'))
DMHcalDigis.digiLabel = cms.string("mixData")
DMHcalTTPDigis.HFDigiCollection = cms.InputTag("mixData")

hcalDigiSequenceDM = cms.Sequence(DMHcalTriggerPrimitiveDigis+DMHcalDigis*DMHcalTTPDigis)

postDMDigi = cms.Sequence(ecalDigiSequenceDM+hcalDigiSequenceDM)

# disable adding noise to HCAL cells with no MC signal
#mixData.doEmpty = False

pdatamix = cms.Sequence(mixData+postDMDigi)