CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
postLS1CustomsPreMixing.py
Go to the documentation of this file.
1 
2 import FWCore.ParameterSet.Config as cms
3 
4 from SLHCUpgradeSimulations.Configuration.muonCustomsPreMixing import customise_csc_PostLS1,customise_csc_hlt
5 
6 
7 def customisePostLS1(process):
8 
9  # deal with CSC separately:
10  process = customise_csc_PostLS1(process)
11 
12  # all the rest:
13  if hasattr(process,'DigiToRaw'):
14  process=customise_DigiToRaw(process)
15  if hasattr(process,'RawToDigi'):
16  process=customise_RawToDigi(process)
17  if hasattr(process,'reconstruction'):
18  process=customise_Reco(process)
19  if hasattr(process,'digitisation_step'):
20  process=customise_Digi(process)
21  if hasattr(process,'HLTSchedule'):
22  process=customise_HLT(process)
23  if hasattr(process,'L1simulation_step'):
24  process=customise_L1Emulator(process)
25  if hasattr(process,'dqmoffline_step'):
26  process=customise_DQM(process)
27  if hasattr(process,'dqmHarvesting'):
28  process=customise_harvesting(process)
29  if hasattr(process,'validation_step'):
30  process=customise_Validation(process)
31 
32  return process
33 
34 
35 def digiEventContent(process):
36  #extend the event content
37 
38  alist=['RAWSIM','RAWDEBUG','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT','PREMIX','PREMIXRAW']
39  for a in alist:
40  b=a+'output'
41  if hasattr(process,b):
42  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
43  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
44  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCComparatorDigisDM_*')
45  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCStripDigisDM_*')
46  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCWireDigisDM_*')
47  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
48  return process
49 
50 
51 def customise_DQM(process):
52  #process.dqmoffline_step.remove(process.jetMETAnalyzer)
53  return process
54 
55 
56 def customise_Validation(process):
57  #process.validation_step.remove(process.PixelTrackingRecHitsValid)
58  # We don't run the HLT
59  #process.validation_step.remove(process.HLTSusyExoVal)
60  #process.validation_step.remove(process.hltHiggsValidator)
61  return process
62 
63 def customise_Digi(process):
64  process=digiEventContent(process)
65  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
66  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'ho'):
67  process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
68  process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1)
69  process.mix.digitizers.hcal.ho.pixels = cms.int32(2500)
70  process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False)
71  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf1'):
72  process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.60)
73  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf2'):
74  process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.60)
75  return process
76 
77 
78 def customise_L1Emulator(process):
79  return process
80 
81 
82 def customise_RawToDigi(process):
83  return process
84 
85 
86 def customise_DigiToRaw(process):
87  return process
88 
89 
90 def customise_HLT(process):
91  process=customise_csc_hlt(process)
92  return process
93 
94 
95 def customise_Reco(process):
96  return process
97 
98 
99 def customise_harvesting(process):
100  #process.dqmHarvesting.remove(process.jetMETDQMOfflineClient)
101  #process.dqmHarvesting.remove(process.dataCertificationJetMET)
102  #process.dqmHarvesting.remove(process.sipixelEDAClient)
103  #process.dqmHarvesting.remove(process.sipixelCertification)
104  return (process)
105 
106 def recoOutputCustoms(process):
107 
108  alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
109  for a in alist:
110  b=a+'output'
111  if hasattr(process,b):
112  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
113  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
114  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCComparatorDigisDM_*')
115  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCStripDigisDM_*')
116  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCWireDigisDM_*')
117  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
118  getattr(process,b).outputCommands.append('keep *_rawDataCollector_*_*')
119  return process
120 
def customise_csc_hlt
Definition: muonCustoms.py:295
def customise_csc_PostLS1
Definition: muonCustoms.py:248