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,'g4SimHits'):
14  process=customise_Sim(process)
15  if hasattr(process,'DigiToRaw'):
16  process=customise_DigiToRaw(process)
17  if hasattr(process,'RawToDigi'):
18  process=customise_RawToDigi(process)
19  if hasattr(process,'reconstruction'):
20  process=customise_Reco(process)
21  if hasattr(process,'digitisation_step'):
22  process=customise_Digi(process)
23  if hasattr(process,'HLTSchedule'):
24  process=customise_HLT(process)
25  if hasattr(process,'L1simulation_step'):
26  process=customise_L1Emulator(process)
27  if hasattr(process,'dqmoffline_step'):
28  process=customise_DQM(process)
29  if hasattr(process,'dqmHarvesting'):
30  process=customise_harvesting(process)
31  if hasattr(process,'validation_step'):
32  process=customise_Validation(process)
33 
34  return process
35 
36 
37 def digiEventContent(process):
38  #extend the event content
39 
40 
41  alist=['RAWSIM','RAWDEBUG','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT','PREMIX','PREMIXRAW']
42  for a in alist:
43  b=a+'output'
44  if hasattr(process,b):
45  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
46  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
47  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCComparatorDigisDM_*')
48  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCStripDigisDM_*')
49  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCWireDigisDM_*')
50  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
51  return process
52 
53 
54 def customise_DQM(process):
55  #process.dqmoffline_step.remove(process.jetMETAnalyzer)
56  return process
57 
58 
59 def customise_Validation(process):
60  #process.validation_step.remove(process.PixelTrackingRecHitsValid)
61  # We don't run the HLT
62  #process.validation_step.remove(process.HLTSusyExoVal)
63  #process.validation_step.remove(process.hltHiggsValidator)
64  return process
65 
66 def customise_Sim(process):
67  process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en.root'
68  return process
69 
70 def customise_Digi(process):
71  process=digiEventContent(process)
72  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
73  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'ho'):
74  process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
75  process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1)
76  process.mix.digitizers.hcal.ho.pixels = cms.int32(2500)
77  process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False)
78  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf1'):
79  process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.60)
80  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf2'):
81  process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.60)
82  return process
83 
84 
85 def customise_L1Emulator(process):
86  return process
87 
88 
89 def customise_RawToDigi(process):
90  return process
91 
92 
93 def customise_DigiToRaw(process):
94  return process
95 
96 
97 def customise_HLT(process):
98  process=customise_csc_hlt(process)
99  return process
100 
101 
102 def customise_Reco(process):
103  return process
104 
105 
106 def customise_harvesting(process):
107  #process.dqmHarvesting.remove(process.jetMETDQMOfflineClient)
108  #process.dqmHarvesting.remove(process.dataCertificationJetMET)
109  #process.dqmHarvesting.remove(process.sipixelEDAClient)
110  #process.dqmHarvesting.remove(process.sipixelCertification)
111  return (process)
112 
113 def recoOutputCustoms(process):
114 
115  alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
116  for a in alist:
117  b=a+'output'
118  if hasattr(process,b):
119  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
120  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
121  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCComparatorDigisDM_*')
122  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCStripDigisDM_*')
123  getattr(process,b).outputCommands.append('keep *_mixData_MuonCSCWireDigisDM_*')
124  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
125  getattr(process,b).outputCommands.append('keep *_rawDataCollector_*_*')
126  return process
127 
def customise_csc_hlt
Definition: muonCustoms.py:280
def customise_csc_PostLS1
Definition: muonCustoms.py:233