CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
postLS1Customs.py
Go to the documentation of this file.
1 
2 import FWCore.ParameterSet.Config as cms
3 
4 from SLHCUpgradeSimulations.Configuration.muonCustoms 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  alist=['RAWSIM','RAWDEBUG','FEVTDEBUG','FEVTDEBUGHLT','GENRAW','RAWSIMHLT','FEVT']
41  for a in alist:
42  b=a+'output'
43  if hasattr(process,b):
44  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
45  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
46  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
47 
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 
64 def customise_Sim(process):
65  # enable 2015 HF shower library
66  process.g4SimHits.HCalSD.UseShowerLibrary = True
67  process.g4SimHits.HCalSD.UseParametrize = False
68  process.g4SimHits.HCalSD.UsePMTHits = False
69  process.g4SimHits.HCalSD.UseFibreBundleHits = False
70  process.g4SimHits.HFShowerLibrary.FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_eta4_16en.root'
71  process.g4SimHits.HFShowerLibrary.BranchPost= ''
72  process.g4SimHits.HFShowerLibrary.BranchPre = ''
73  process.g4SimHits.HFShowerLibrary.BranchEvt = ''
74  return process
75 
76 
77 def customise_Digi(process):
78  process=digiEventContent(process)
79  if hasattr(process,'mix') and hasattr(process.mix,'digitizers'):
80  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'ho'):
81  process.mix.digitizers.hcal.ho.photoelectronsToAnalog = cms.vdouble([4.0]*16)
82  process.mix.digitizers.hcal.ho.siPMCode = cms.int32(1)
83  process.mix.digitizers.hcal.ho.pixels = cms.int32(2500)
84  process.mix.digitizers.hcal.ho.doSiPMSmearing = cms.bool(False)
85  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf1'):
86  process.mix.digitizers.hcal.hf1.samplingFactor = cms.double(0.60)
87  if hasattr(process.mix.digitizers,'hcal') and hasattr(process.mix.digitizers.hcal,'hf2'):
88  process.mix.digitizers.hcal.hf2.samplingFactor = cms.double(0.60)
89  return process
90 
91 
92 def customise_L1Emulator(process):
93  return process
94 
95 
96 def customise_RawToDigi(process):
97  return process
98 
99 
100 def customise_DigiToRaw(process):
101  return process
102 
103 
104 def customise_HLT(process):
105  process=customise_csc_hlt(process)
106  return process
107 
108 
109 def customise_Reco(process):
110  return process
111 
112 
113 def customise_harvesting(process):
114  #process.dqmHarvesting.remove(process.dataCertificationJetMET)
115  #process.dqmHarvesting.remove(process.sipixelEDAClient)
116  #process.dqmHarvesting.remove(process.sipixelCertification)
117  return (process)
118 
119 def recoOutputCustoms(process):
120 
121  alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
122  for a in alist:
123  b=a+'output'
124  if hasattr(process,b):
125  getattr(process,b).outputCommands.append('keep *_simMuonCSCDigis_*_*')
126  getattr(process,b).outputCommands.append('keep *_simMuonRPCDigis_*_*')
127  getattr(process,b).outputCommands.append('keep *_simHcalUnsuppressedDigis_*_*')
128  getattr(process,b).outputCommands.append('keep *_rawDataCollector_*_*')
129  return process
130 
def customise_csc_hlt
Definition: muonCustoms.py:295
def customise_csc_PostLS1
Definition: muonCustoms.py:248