CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Digi_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #
4 # Full-scale Digitization of the simulated hits
5 # in all CMS subdets : Tracker, ECAL, HCAl, Muon's;
6 # MixingModule (at least in zero-pileup mode) needs
7 # to be included to make Digi's operational, since
8 # it's required for ECAL/HCAL & Muon's
9 # Defined in a separate fragment
10 #
11 # Tracker Digis (Pixel + SiStrips) are now made in the mixing
12 # module, so the old "trDigi" sequence has been taken out.
13 #
14 
15 # Calorimetry Digis (Ecal + Hcal) - * unsuppressed *
16 # returns sequence "calDigi"
18 # Muon Digis (CSC + DT + RPC)
19 # returns sequence "muonDigi"
20 #
22 #
23 # PPS Digis
24 # returns sequence "ctppsDigi"
26 #
27 # TrackingParticle Producer is now part of the mixing module, so
28 # it is no longer run here.
29 #
31 
33 
34 # add updating the GEN information by default
37 
38 doAllDigiTask = cms.Task(generatorSmeared, calDigiTask, muonDigiTask, ctppsDigiTask)
39 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
40 # premixing stage2 runs muon digis after PreMixingModule (configured in DataMixerPreMix_cff)
41 premix_stage2.toReplaceWith(doAllDigiTask, doAllDigiTask.copyAndExclude([muonDigiTask]))
42 
43 pdigiTask_nogen = cms.Task(generatorSmeared, cms.TaskPlaceholder("randomEngineStateProducer"), cms.TaskPlaceholder("mix"), doAllDigiTask, addPileupInfo)
44 # premixing stage2 runs addPileupInfo after PreMixingModule (configured in DataMixerPreMix_cff)
45 premix_stage2.toReplaceWith(pdigiTask_nogen, pdigiTask_nogen.copyAndExclude([addPileupInfo]))
46 
47 pdigiTask = cms.Task(pdigiTask_nogen, fixGenInfoTask, tpPruningTask)
48 
49 doAllDigi = cms.Sequence(doAllDigiTask)
50 pdigi = cms.Sequence(pdigiTask)
51 pdigi_valid = cms.Sequence(pdigiTask)
52 pdigi_nogen=cms.Sequence(pdigiTask_nogen)
53 pdigi_valid_nogen=cms.Sequence(pdigiTask_nogen)
54 
56 pdigiTask_hi = cms.Task(pdigiTask, heavyIon)
57 pdigiTask_hi_nogen = cms.Task(pdigiTask_nogen, genJetMETTask, heavyIon)
58 pdigi_hi=cms.Sequence(pdigiTask_hi)
59 pdigi_hi_nogen=cms.Sequence(pdigiTask_hi_nogen)
60 
61 # define genPUProtons as an EDProducer only when not in premixing stage2 job
62 # in premixing stage2 genPUProtons is an EDAlias, defined in aliases_PreMix_cfi
64  process.load("SimGeneral.PileupInformation.genPUProtons_cfi")
65  process.pdigiTask_nogen.add(process.genPUProtons)
66 modifyDigi_premixStage2GenPUProtons = (~premix_stage2).makeProcessModifier(_premixStage2GenPUProtons)
67 
68 from Configuration.Eras.Modifier_fastSim_cff import fastSim
69 def _fastSimDigis(process):
70  import FastSimulation.Configuration.DigiAliases_cff as DigiAliases
71 
72  # pretend these digis have been through digi2raw and raw2digi, by using the approprate aliases
73  # use an alias to make the mixed track collection available under the usual label
74  from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases
75  loadDigiAliases(process)
76 # no need for the aliases for premixing stage1
77 modifyDigi_fastSimDigis = (fastSim & ~premix_stage1).makeProcessModifier(_fastSimDigis)
78 
79 #phase 2 common mods
80 def _modifyEnableHcalHardcode( theProcess ):
81  from CalibCalorimetry.HcalPlugins.Hcal_Conditions_forGlobalTag_cff import hcal_db_producer as _hcal_db_producer, es_hardcode as _es_hardcode, es_prefer_hcalHardcode as _es_prefer_hcalHardcode
82  theProcess.hcal_db_producer = _hcal_db_producer
83  theProcess.es_hardcode = _es_hardcode
84  theProcess.es_prefer_hcalHardcode = _es_prefer_hcalHardcode
85 
86 from Configuration.Eras.Modifier_hcalHardcodeConditions_cff import hcalHardcodeConditions
87 modifyEnableHcalHardcode_ = hcalHardcodeConditions.makeProcessModifier( _modifyEnableHcalHardcode )
def _modifyEnableHcalHardcode
Definition: Digi_cff.py:80
def _premixStage2GenPUProtons
Definition: Digi_cff.py:63
def _fastSimDigis
Definition: Digi_cff.py:69