Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:44

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # Start with Standard Digitization:
0004 
0005 from SimCalorimetry.Configuration.SimCalorimetry_cff import *
0006 from SimMuon.Configuration.SimMuon_cff import *
0007 
0008 from SimGeneral.PreMixingModule.mixOne_premix_on_sim_cfi import *
0009 
0010 # Run after the DataMixer only.
0011 #
0012 # Calorimetry Digis (Ecal + Hcal) - * unsuppressed *
0013 # 
0014 #
0015 # clone these sequences:
0016 
0017 DMEcalTriggerPrimitiveDigis = simEcalTriggerPrimitiveDigis.clone()
0018 DMEcalEBTriggerPrimitiveDigis = simEcalEBTriggerPrimitiveDigis.clone()
0019 DMEcalDigis = simEcalDigis.clone()
0020 DMEcalPreshowerDigis = simEcalPreshowerDigis.clone()
0021 
0022 # Re-define inputs to point at DataMixer output
0023 DMEcalTriggerPrimitiveDigis.Label = cms.string('mixData')
0024 DMEcalTriggerPrimitiveDigis.InstanceEB = cms.string('')
0025 DMEcalTriggerPrimitiveDigis.InstanceEE = cms.string('')
0026 #
0027 DMEcalEBTriggerPrimitiveDigis.barrelEcalDigis = 'mixData'
0028 #
0029 DMEcalDigis.digiProducer = cms.string('mixData')
0030 DMEcalDigis.EBdigiCollection = cms.string('')
0031 DMEcalDigis.EEdigiCollection = cms.string('')
0032 DMEcalDigis.trigPrimProducer = cms.string('DMEcalTriggerPrimitiveDigis')
0033 #
0034 DMEcalPreshowerDigis.digiProducer = cms.string('mixData')
0035 #DMEcalPreshowerDigis.ESdigiCollection = cms.string('ESDigiCollectionDM')
0036 
0037 ecalDigiTaskDM = cms.Task(DMEcalTriggerPrimitiveDigis, DMEcalDigis, DMEcalPreshowerDigis)
0038 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
0039 _phase2_ecalDigiTaskDM = ecalDigiTaskDM.copy()
0040 _phase2_ecalDigiTaskDM.add(DMEcalEBTriggerPrimitiveDigis)
0041 phase2_common.toReplaceWith(ecalDigiTaskDM, _phase2_ecalDigiTaskDM)
0042 
0043 # same for Hcal:
0044 
0045 # clone these sequences:
0046 
0047 DMHcalTriggerPrimitiveDigis = simHcalTriggerPrimitiveDigis.clone()
0048 DMHcalDigis = simHcalDigis.clone()
0049 DMHcalTTPDigis = simHcalTTPDigis.clone()
0050 
0051 # Re-define inputs to point at DataMixer output
0052 DMHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(cms.InputTag('mixData'),cms.InputTag('mixData'))
0053 DMHcalTriggerPrimitiveDigis.inputUpgradeLabel = cms.VInputTag(cms.InputTag('mixData:HBHEQIE11DigiCollection'),cms.InputTag('mixData:HFQIE10DigiCollection'))
0054 DMHcalDigis.digiLabel = cms.string('mixData')
0055 DMHcalTTPDigis.HFDigiCollection = cms.InputTag("mixData")
0056 
0057 hcalDigiTaskDM = cms.Task(DMHcalTriggerPrimitiveDigis, DMHcalDigis, DMHcalTTPDigis)
0058 
0059 postDMDigi = cms.Task(ecalDigiTaskDM, hcalDigiTaskDM, muonDigiTask)
0060 
0061 # disable adding noise to HCAL cells with no MC signal
0062 #mixData.doEmpty = False
0063 
0064 #
0065 # TrackingParticle Producer is now part of the mixing module, so
0066 # it is no longer run here.
0067 #
0068 from SimGeneral.PileupInformation.AddPileupSummary_cfi import *
0069 
0070 
0071 pdatamixTask = cms.Task(mixData, postDMDigi, addPileupInfo)
0072 pdatamix = cms.Sequence(pdatamixTask)
0073 
0074 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0075 def _fastSimDigis(process):
0076     # pretend these digis have been through digi2raw and raw2digi, by using the approprate aliases
0077     # use an alias to make the mixed track collection available under the usual label
0078     from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases
0079     loadDigiAliases(process, premix=True)
0080 modifyDataMixerPreMix_fastSimDigis = fastSim.makeProcessModifier(_fastSimDigis)