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 
6 
8 
9 # Run after the DataMixer only.
10 #
11 # Calorimetry Digis (Ecal + Hcal) - * unsuppressed *
12 #
13 #
14 # clone these sequences:
15 
16 DMEcalTriggerPrimitiveDigis = simEcalTriggerPrimitiveDigis.clone()
17 DMEcalEBTriggerPrimitiveDigis = simEcalEBTriggerPrimitiveDigis.clone()
18 DMEcalDigis = simEcalDigis.clone()
19 DMEcalPreshowerDigis = simEcalPreshowerDigis.clone()
20 
21 # Re-define inputs to point at DataMixer output
22 DMEcalTriggerPrimitiveDigis.Label = cms.string('mixData')
23 DMEcalTriggerPrimitiveDigis.InstanceEB = cms.string('')
24 DMEcalTriggerPrimitiveDigis.InstanceEE = cms.string('')
25 #
26 DMEcalEBTriggerPrimitiveDigis.barrelEcalDigis = 'mixData'
27 #
28 DMEcalDigis.digiProducer = cms.string('mixData')
29 DMEcalDigis.EBdigiCollection = cms.string('')
30 DMEcalDigis.EEdigiCollection = cms.string('')
31 DMEcalDigis.trigPrimProducer = cms.string('DMEcalTriggerPrimitiveDigis')
32 #
33 DMEcalPreshowerDigis.digiProducer = cms.string('mixData')
34 #DMEcalPreshowerDigis.ESdigiCollection = cms.string('ESDigiCollectionDM')
35 
36 ecalDigiSequenceDM = cms.Sequence(DMEcalTriggerPrimitiveDigis*DMEcalDigis*DMEcalPreshowerDigis)
37 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
38 _phase2_ecalDigiSequenceDM = ecalDigiSequenceDM.copy()
39 _phase2_ecalDigiSequenceDM.insert(0,DMEcalEBTriggerPrimitiveDigis)
40 phase2_common.toReplaceWith(ecalDigiSequenceDM, _phase2_ecalDigiSequenceDM)
41 
42 # same for Hcal:
43 
44 # clone these sequences:
45 
46 DMHcalTriggerPrimitiveDigis = simHcalTriggerPrimitiveDigis.clone()
47 DMHcalDigis = simHcalDigis.clone()
48 DMHcalTTPDigis = simHcalTTPDigis.clone()
49 
50 # Re-define inputs to point at DataMixer output
51 DMHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(cms.InputTag('mixData'),cms.InputTag('mixData'))
52 DMHcalTriggerPrimitiveDigis.inputUpgradeLabel = cms.VInputTag(cms.InputTag('mixData:HBHEQIE11DigiCollection'),cms.InputTag('mixData:HFQIE10DigiCollection'))
53 DMHcalDigis.digiLabel = cms.string('mixData')
54 DMHcalTTPDigis.HFDigiCollection = cms.InputTag("mixData")
55 
56 hcalDigiSequenceDM = cms.Sequence(DMHcalTriggerPrimitiveDigis+DMHcalDigis*DMHcalTTPDigis)
57 
58 postDMDigi = cms.Sequence(ecalDigiSequenceDM+hcalDigiSequenceDM)
59 
60 # GEM and ME0 have additional digi sequences
61 from SimMuon.GEMDigitizer.muonGEMDigi_cff import muonGEMDigiDM
62 from SimMuon.GEMDigitizer.muonME0Digi_cff import muonME0DigiDM
63 _phase2_postDMDigi = postDMDigi.copy()
64 _phase2_postDMDigi += (muonGEMDigiDM+muonME0DigiDM)
65 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
66 phase2_muon.toReplaceWith(postDMDigi, _phase2_postDMDigi)
67 
68 # disable adding noise to HCAL cells with no MC signal
69 #mixData.doEmpty = False
70 
71 #
72 # TrackingParticle Producer is now part of the mixing module, so
73 # it is no longer run here.
74 #
76 
77 
78 
79 pdatamix = cms.Sequence(mixData+postDMDigi+addPileupInfo)
80 
81 from Configuration.Eras.Modifier_fastSim_cff import fastSim
82 def _fastSimDigis(process):
83  # pretend these digis have been through digi2raw and raw2digi, by using the approprate aliases
84  # use an alias to make the mixed track collection available under the usual label
85  from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases
86  loadDigiAliases(process, premix=True)
87 modifyDataMixerPreMix_fastSimDigis = fastSim.makeProcessModifier(_fastSimDigis)
def loadDigiAliases(process, premix=False)