Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-13 22:59:54

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #                                                    
0004 # Full-scale Digitization of the simulated hits      
0005 # in all CMS subdets : Tracker, ECAL, HCAl, Muon's;  
0006 # MixingModule (at least in zero-pileup mode) needs  
0007 # to be included to make Digi's operational, since   
0008 # it's required for ECAL/HCAL & Muon's                
0009 # Defined in a separate fragment
0010 #                                                    
0011 # Tracker Digis (Pixel + SiStrips) are now made in the mixing
0012 # module, so the old "trDigi" sequence has been taken out.
0013 #
0014 
0015 # Calorimetry Digis (Ecal + Hcal) - * unsuppressed *
0016 # returns sequence "calDigi"
0017 from SimCalorimetry.Configuration.SimCalorimetry_cff import *
0018 # Muon Digis (CSC + DT + RPC)
0019 # returns sequence "muonDigi"
0020 #
0021 from SimMuon.Configuration.SimMuon_cff import *
0022 #
0023 # PPS Digis
0024 # returns sequence "ctppsDigi"
0025 from SimPPS.Configuration.SimPPS_cff import *
0026 #
0027 # TrackingParticle Producer is now part of the mixing module, so
0028 # it is no longer run here.
0029 #
0030 from SimGeneral.Configuration.SimGeneral_cff import *
0031 
0032 from SimTracker.Configuration.SimTrackerLinks_cff import *
0033 
0034 # add updating the GEN information by default
0035 from Configuration.StandardSequences.Generator_cff import *
0036 from GeneratorInterface.Core.generatorSmeared_cfi import *
0037 
0038 doAllDigiTask = cms.Task(generatorSmeared, calDigiTask, muonDigiTask, ctppsDigiTask)
0039 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
0040 # premixing stage2 runs muon digis after PreMixingModule (configured in DataMixerPreMix_cff)
0041 premix_stage2.toReplaceWith(doAllDigiTask, doAllDigiTask.copyAndExclude([muonDigiTask]))
0042 
0043 pdigiTask_nogen = cms.Task(generatorSmeared, cms.TaskPlaceholder("randomEngineStateProducer"), cms.TaskPlaceholder("mix"), doAllDigiTask, addPileupInfo)
0044 # premixing stage2 runs addPileupInfo after PreMixingModule (configured in DataMixerPreMix_cff)
0045 premix_stage2.toReplaceWith(pdigiTask_nogen, pdigiTask_nogen.copyAndExclude([addPileupInfo]))
0046 
0047 pdigiTask = cms.Task(pdigiTask_nogen, fixGenInfoTask, tpPruningTask)
0048 
0049 doAllDigi = cms.Sequence(doAllDigiTask)
0050 pdigi = cms.Sequence(pdigiTask)
0051 pdigi_valid = cms.Sequence(pdigiTask)
0052 pdigi_nogen=cms.Sequence(pdigiTask_nogen)
0053 pdigi_valid_nogen=cms.Sequence(pdigiTask_nogen)
0054 
0055 from GeneratorInterface.HiGenCommon.HeavyIon_cff import *
0056 pdigiTask_hi = cms.Task(pdigiTask, heavyIon)
0057 pdigiTask_hi_nogen = cms.Task(pdigiTask_nogen, genJetMETTask, heavyIon)
0058 pdigi_hi=cms.Sequence(pdigiTask_hi)
0059 pdigi_hi_nogen=cms.Sequence(pdigiTask_hi_nogen)
0060 
0061 # define genPUProtons as an EDProducer only when not in premixing stage2 job
0062 # in premixing stage2 genPUProtons is an EDAlias, defined in aliases_PreMix_cfi
0063 def _premixStage2GenPUProtons(process):
0064     process.load("SimGeneral.PileupInformation.genPUProtons_cfi")
0065     process.pdigiTask_nogen.add(process.genPUProtons)
0066 modifyDigi_premixStage2GenPUProtons = (~premix_stage2).makeProcessModifier(_premixStage2GenPUProtons)
0067 
0068 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0069 def _fastSimDigis(process):
0070     import FastSimulation.Configuration.DigiAliases_cff as DigiAliases
0071 
0072     # pretend these digis have been through digi2raw and raw2digi, by using the approprate aliases
0073     # use an alias to make the mixed track collection available under the usual label
0074     from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases
0075     loadDigiAliases(process)
0076 # no need for the aliases for premixing stage1
0077 modifyDigi_fastSimDigis = (fastSim & ~premix_stage1).makeProcessModifier(_fastSimDigis)
0078 
0079 #phase 2 common mods
0080 def _modifyEnableHcalHardcode( theProcess ):
0081     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
0082     theProcess.hcal_db_producer = _hcal_db_producer
0083     theProcess.es_hardcode = _es_hardcode
0084     theProcess.es_prefer_hcalHardcode = _es_prefer_hcalHardcode    
0085 
0086 from Configuration.Eras.Modifier_hcalHardcodeConditions_cff import hcalHardcodeConditions
0087 modifyEnableHcalHardcode_ = hcalHardcodeConditions.makeProcessModifier( _modifyEnableHcalHardcode )