CMS 3D CMS Logo

DataMixerPreMix_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Start with Standard Digitization:
4 
7 
9 
10 # Run after the DataMixer only.
11 #
12 # Calorimetry Digis (Ecal + Hcal) - * unsuppressed *
13 #
14 #
15 # clone these sequences:
16 
17 DMEcalTriggerPrimitiveDigis = simEcalTriggerPrimitiveDigis.clone()
18 DMEcalEBTriggerPrimitiveDigis = simEcalEBTriggerPrimitiveDigis.clone()
19 DMEcalDigis = simEcalDigis.clone()
20 DMEcalPreshowerDigis = simEcalPreshowerDigis.clone()
21 
22 # Re-define inputs to point at DataMixer output
23 DMEcalTriggerPrimitiveDigis.Label = cms.string('mixData')
24 DMEcalTriggerPrimitiveDigis.InstanceEB = cms.string('')
25 DMEcalTriggerPrimitiveDigis.InstanceEE = cms.string('')
26 #
27 DMEcalEBTriggerPrimitiveDigis.barrelEcalDigis = 'mixData'
28 #
29 DMEcalDigis.digiProducer = cms.string('mixData')
30 DMEcalDigis.EBdigiCollection = cms.string('')
31 DMEcalDigis.EEdigiCollection = cms.string('')
32 DMEcalDigis.trigPrimProducer = cms.string('DMEcalTriggerPrimitiveDigis')
33 #
34 DMEcalPreshowerDigis.digiProducer = cms.string('mixData')
35 #DMEcalPreshowerDigis.ESdigiCollection = cms.string('ESDigiCollectionDM')
36 
37 ecalDigiTaskDM = cms.Task(DMEcalTriggerPrimitiveDigis, DMEcalDigis, DMEcalPreshowerDigis)
38 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
39 _phase2_ecalDigiTaskDM = ecalDigiTaskDM.copy()
40 _phase2_ecalDigiTaskDM.add(DMEcalEBTriggerPrimitiveDigis)
41 phase2_common.toReplaceWith(ecalDigiTaskDM, _phase2_ecalDigiTaskDM)
42 
43 # same for Hcal:
44 
45 # clone these sequences:
46 
47 DMHcalTriggerPrimitiveDigis = simHcalTriggerPrimitiveDigis.clone()
48 DMHcalDigis = simHcalDigis.clone()
49 DMHcalTTPDigis = simHcalTTPDigis.clone()
50 
51 # Re-define inputs to point at DataMixer output
52 DMHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(cms.InputTag('mixData'),cms.InputTag('mixData'))
53 DMHcalTriggerPrimitiveDigis.inputUpgradeLabel = cms.VInputTag(cms.InputTag('mixData:HBHEQIE11DigiCollection'),cms.InputTag('mixData:HFQIE10DigiCollection'))
54 DMHcalDigis.digiLabel = cms.string('mixData')
55 DMHcalTTPDigis.HFDigiCollection = cms.InputTag("mixData")
56 
57 hcalDigiTaskDM = cms.Task(DMHcalTriggerPrimitiveDigis, DMHcalDigis, DMHcalTTPDigis)
58 
59 postDMDigi = cms.Task(ecalDigiTaskDM, hcalDigiTaskDM, muonDigiTask)
60 
61 # disable adding noise to HCAL cells with no MC signal
62 #mixData.doEmpty = False
63 
64 #
65 # TrackingParticle Producer is now part of the mixing module, so
66 # it is no longer run here.
67 #
69 
70 
71 pdatamixTask = cms.Task(mixData, postDMDigi, addPileupInfo)
72 pdatamix = cms.Sequence(pdatamixTask)
73 
74 from Configuration.Eras.Modifier_fastSim_cff import fastSim
75 def _fastSimDigis(process):
76  # pretend these digis have been through digi2raw and raw2digi, by using the approprate aliases
77  # use an alias to make the mixed track collection available under the usual label
78  from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases
79  loadDigiAliases(process, premix=True)
80 modifyDataMixerPreMix_fastSimDigis = fastSim.makeProcessModifier(_fastSimDigis)
def loadDigiAliases(process, premix=False)