CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
me0Customs.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 def customise(process):
4  #process=customise_hack_ecal(process)
5  if hasattr(process,'digitisation_step'):
6  process=customise_Digi(process)
7  if hasattr(process,'L1simulation_step'):
8  process=customise_L1Emulator(process)
9  if hasattr(process,'DigiToRaw'):
10  process=customise_DigiToRaw(process)
11  if hasattr(process,'RawToDigi'):
12  process=customise_RawToDigi(process)
13  #if hasattr(process,'reconstruction'):
14  # process=customise_RecoFull(process)
15  if hasattr(process,'reconstruction'):
16  process=customise_Reco(process)
17  if hasattr(process,'globalreco_step'):
18  process=customise_Reco(process)
19  #if hasattr(process,'famosWithEverything'):
20  # process=customise_RecoFast(process)
21  if hasattr(process,'dqmoffline_step'):
22  process=customise_DQM(process)
23  if hasattr(process,'dqmHarvesting'):
24  process=customise_harvesting(process)
25  #if hasattr(process,'validation_step'):
26  # process=customise_Validation(process)
27  return process
28 
29 
30 def customise_hack_ecal(process):
31  process.load("Geometry.CaloEventSetup.CaloGeometryBuilder_cfi")
32  process.CaloGeometryBuilder.SelectedCalos = cms.vstring('HCAL',
33  'ZDC',
34  'EcalBarrel',
35  'EcalEndcap',
36  #'EcalPreshower',
37  'TOWER')
38  #process.load("RecoEcal.EgammaClusterProducers.reducedRecHitsSequence_cff")
39  #process.load("Configuration.StandardSequences.Reconstruction_cff")
40  #process.reducedRecHits = cms.Sequence ( reducedEcalRecHitsSequenceEcalOnly * reducedHcalRecHitsSequence )
41  #Might not be needed...
42  #process.load("RecoEcal.EgammaClusterProducers.particleFlowSuperClusterECAL_cfi")
43  #process.particleFlowSuperClusterECALBox.use_preshower=cms.bool(False)
44  #process.particleFlowSuperClusterECALMustache.use_preshower=cms.bool(False)
45  return process
46 
47 def customise_Digi(process):
48  process.RandomNumberGeneratorService.simMuonME0Digis = cms.PSet(
49  initialSeed = cms.untracked.uint32(1234567),
50  engineName = cms.untracked.string('HepJamesRandom')
51  )
52  process.mix.mixObjects.mixSH.crossingFrames.append('MuonME0Hits')
53  process.mix.mixObjects.mixSH.input.append(cms.InputTag("g4SimHits","MuonME0Hits"))
54  process.mix.mixObjects.mixSH.subdets.append('MuonME0Hits')
55  process.load('SimMuon.GEMDigitizer.muonME0DigisPreReco_cfi')
56  process.muonDigi += process.simMuonME0Digis
57  # process.load('SimCalorimetry.Configuration.SimCalorimetry_cff')
58  # process.digitisation_step.remove(calDigi)
59  process=outputCustoms(process)
60  return process
61 
62 
63 def customise_L1Emulator(process):
64  return process
65 
66 def customise_DigiToRaw(process):
67  return process
68 
69 def customise_RawToDigi(process):
70  return process
71 
72 def customise_LocalReco(process):
73  process.load('RecoLocalMuon.GEMRecHit.me0LocalReco_cff')
74  process.muonlocalreco += process.me0LocalReco
75  process=outputCustoms(process)
76  return process
77 
79  process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAlong_cfi")
80  process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorOpposite_cfi")
81  process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAny_cfi")
82  return process
83 
86  # process.load('RecoMuon.MuonIdentification.me0MuonReco_cff')
87  # process.reconstructionWithFamos += process.me0MuonReco
88  return process
89 
92  # process.load('RecoMuon.MuonIdentification.me0MuonReco_cff')
93  # process.muonGlobalReco += process.me0MuonReco
94  return process
95 
96 def customise_RecoFast(process):
97  process=customise_LocalReco(process)
98  process=customise_GlobalRecoFast(process)
99  process=outputCustoms(process)
100  return process
101 
102 def customise_RecoFull(process):
103  process=customise_LocalReco(process)
104  process=customise_GlobalRecoFull(process)
105  process=outputCustoms(process)
106  return process
107 
108 
109 def customise_Reco(process):
110  #process.load('RecoLocalMuon.GEMRecHit.gemRecHits_cfi')
111  process.load('RecoLocalMuon.GEMRecHit.me0LocalReco_cfi')
112  process.muonlocalreco += process.me0LocalReco
113  #process.load("RecoMuon.StandAloneMuonProducer.standAloneMuons_cff")
114  process.standAloneMuons.STATrajBuilderParameters.FilterParameters.EnableME0Measurement = cms.bool(True)
115  process.standAloneMuons.STATrajBuilderParameters.BWFilterParameters.EnableME0Measurement = cms.bool(True)
116  process.refittedStandAloneMuons.STATrajBuilderParameters.FilterParameters.EnableME0Measurement = cms.bool(True)
117  process.refittedStandAloneMuons.STATrajBuilderParameters.BWFilterParameters.EnableME0Measurement = cms.bool(True)
118  process=outputCustoms(process)
119  return process
120 
121 def customise_Validation(process):
122  process.load('Validation.Configuration.gemSimValid_cff')
123  process.genvalid_all += process.me0SimValid
124  return process
125 
126 def customise_DQM(process):
127  return process
128 
129 def customise_harvesting(process):
130  return process
131 
132 def outputCustoms(process):
133  alist=['AODSIM','RECOSIM','FEVTSIM','FEVTDEBUG','FEVTDEBUGHLT','RECODEBUG','RAWRECOSIMHLT','RAWRECODEBUGHLT']
134  for a in alist:
135  b=a+'output'
136  if hasattr(process,b):
137  getattr(process,b).outputCommands.append('keep *_simMuonME0Digis_*_*')
138  getattr(process,b).outputCommands.append('keep *_me0RecHits_*_*')
139  getattr(process,b).outputCommands.append('keep *_me0Segments_*_*')
140  getattr(process,b).outputCommands.append('keep *_me0SegmentProducer_*_*')
141  getattr(process,b).outputCommands.append('drop *_me0SegmentMatcher_*_*')
142  getattr(process,b).outputCommands.append('drop *_me0MuonConverter_*_*')
143  getattr(process,b).outputCommands.append('keep *_me0SegmentMatching_*_*')
144  getattr(process,b).outputCommands.append('keep *_me0MuonConverting_*_*')
145  return process
def customise_Reco
Definition: me0Customs.py:109
def customise_DQM
Definition: me0Customs.py:126
def customise_hack_ecal
Definition: me0Customs.py:30
def customise_Validation
Definition: me0Customs.py:121
def customise_DigiToRaw
Definition: me0Customs.py:66
def customise_L1Emulator
Definition: me0Customs.py:63
def customise_RecoFull
Definition: me0Customs.py:102
def customise
Definition: me0Customs.py:3
def customise_RecoFast
Definition: me0Customs.py:96
def outputCustoms
Definition: me0Customs.py:132
def customise_RawToDigi
Definition: me0Customs.py:69
def customise_LocalReco
Definition: me0Customs.py:72
def customise_Digi
Definition: me0Customs.py:47
def customise_GlobalRecoFull
Definition: me0Customs.py:90
def customise_GlobalRecoInclude
Definition: me0Customs.py:78
def customise_GlobalRecoFast
Definition: me0Customs.py:84
def customise_harvesting
Definition: me0Customs.py:129