PageRenderTime 19ms CodeModel.GetById 8ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/ElectroWeakAnalysis/Utilities/test/distPFMuMET.py

https://github.com/aivanov-cern/cmssw
Python | 166 lines | 95 code | 51 blank | 20 comment | 0 complexity | f5babf64263a97928137d6f8ab01466f MD5 | raw file
  1import FWCore.ParameterSet.Config as cms
  2
  3process = cms.Process("REPROD")
  4
  5
  6
  7
  8
  9# mm
 10# mm
 11# mm
 12
 13# GEN-REC muon matching
 14process.genMatchMap = cms.EDFilter("MCTruthDeltaRMatcherNew",
 15    src = cms.InputTag("muons"),
 16    matched = cms.InputTag("genParticles"),
 17    distMin = cms.double(0.15),
 18    matchPDGId = cms.vint32(13)
 19)
 20
 21
 22
 23
 24
 25# Create a new "distorted" PFCandidate collection
 26process.distortedPFCand = cms.EDFilter("DistortedPFCandProducer",
 27      MuonTag = cms.untracked.InputTag("muons"),
 28      PFTag = cms.untracked.InputTag("particleFlow"),
 29      GenMatchTag = cms.untracked.InputTag("genMatchMap"),
 30
 31      EtaBinEdges = cms.untracked.vdouble(-3.,3.), # one more entry than next vectors
 32
 33      ShiftOnOneOverPt = cms.untracked.vdouble(1.e-3), #in [1/GeV] units
 34      RelativeShiftOnPt = cms.untracked.vdouble(0.), # relative
 35      UncertaintyOnOneOverPt = cms.untracked.vdouble(3.e-3), #in [1/GeV] units
 36      RelativeUncertaintyOnPt = cms.untracked.vdouble(3.e-3), # relative
 37
 38      EfficiencyRatioOverMC = cms.untracked.vdouble(1.)
 39)
 40
 41
 42
 43# Create the old distortedMuon collection
 44process.distortedMuons = cms.EDFilter("DistortedMuonProducer",
 45      MuonTag = cms.untracked.InputTag("muons"),
 46      GenMatchTag = cms.untracked.InputTag("genMatchMap"),
 47
 48      EtaBinEdges = cms.untracked.vdouble(-3.,3.), # one more entry than next vectors
 49
 50      ShiftOnOneOverPt = cms.untracked.vdouble(1.e-3), #in [1/GeV] units
 51      RelativeShiftOnPt = cms.untracked.vdouble(0.), # relative
 52      UncertaintyOnOneOverPt = cms.untracked.vdouble(3.e-3), #in [1/GeV] units
 53      RelativeUncertaintyOnPt = cms.untracked.vdouble(3.e-3), # relative
 54
 55      EfficiencyRatioOverMC = cms.untracked.vdouble(1.)
 56)
 57
 58 
 59
 60
 61
 62
 63# mm 
 64# mm
 65# mm
 66
 67
 68
 69process.load("Configuration.StandardSequences.Reconstruction_cff")
 70process.load("Configuration.StandardSequences.MagneticField_cff")
 71process.load("Configuration.StandardSequences.Geometry_cff")
 72process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
 73process.GlobalTag.globaltag = 'START3X_V26A::All'
 74#process.load("Configuration.StandardSequences.FakeConditions_cff")
 75
 76# process.Timing =cms.Service("Timing")
 77process.maxEvents = cms.untracked.PSet(
 78    input = cms.untracked.int32(-1)
 79)
 80
 81process.source = cms.Source(
 82    "PoolSource",
 83    fileNames = cms.untracked.vstring(
 84#        'file:/data4/Wmunu_Summer09-MC_31X_V3-v1_GEN-SIM-RECO/0009/76E35258-507F-DE11-9A21-0022192311C5.root'
 85          '/store/mc/Spring10/MinBias/GEN-SIM-RECO/START3X_V26A_356ReReco-v1/0009/FEFC70B6-F53D-DF11-B57E-003048679150.root'
 86    ),
 87    secondaryFileNames = cms.untracked.vstring(),
 88    noEventSort = cms.untracked.bool(True),
 89    duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
 90)
 91
 92#process.MessageLogger = cms.Service("MessageLogger",
 93#    rectoblk = cms.untracked.PSet(
 94#        threshold = cms.untracked.string('INFO')
 95#    ),
 96#    destinations = cms.untracked.vstring('rectoblk')
 97#)
 98
 99process.dump = cms.EDAnalyzer("EventContentAnalyzer")
100
101process.load("ElectroWeakAnalysis.Utilities.distPFMET_cfi") 
102
103
104process.p1 = cms.Path(process.genMatchMap+process.distortedMuons
105             +process.distortedPFCand+process.distpfMet)
106
107
108# And the output.
109
110process.out = cms.OutputModule("PoolOutputModule", 
111    fileName = cms.untracked.string('PFMuMETevents.root') 
112)
113
114
115process.out.outputCommands = cms.untracked.vstring( 'drop *' )
116process.out.outputCommands.extend(cms.untracked.vstring('keep *_genParticles_*_*'))
117process.out.outputCommands.extend(cms.untracked.vstring('keep *_offlineBeamSpot_*_*'))
118process.out.outputCommands.extend(cms.untracked.vstring('keep *_TriggerResults_*_HLT'))
119process.out.outputCommands.extend(cms.untracked.vstring('keep *_hltTriggerSummaryAOD_*_HLT'))
120process.out.outputCommands.extend(cms.untracked.vstring('keep *_muons_*_*'))
121process.out.outputCommands.extend(cms.untracked.vstring('keep *_particleFlow_*_*'))
122process.out.outputCommands.extend(cms.untracked.vstring('keep *_distortedMuons_*_*'))
123process.out.outputCommands.extend(cms.untracked.vstring('keep *_distortedPFCand_*_*'))
124process.out.outputCommands.extend(cms.untracked.vstring('keep recoTracks_globalMuons_*_*'))
125process.out.outputCommands.extend(cms.untracked.vstring('keep recoTracks_standAloneMuons_*_*'))
126process.out.outputCommands.extend(cms.untracked.vstring('keep *_met_*_*'))
127process.out.outputCommands.extend(cms.untracked.vstring('keep *_corMetGlobalMuons_*_*'))
128process.out.outputCommands.extend(cms.untracked.vstring('keep *_tcMet_*_*'))
129process.out.outputCommands.extend(cms.untracked.vstring('keep *_pfMet_*_*'))
130process.out.outputCommands.extend(cms.untracked.vstring('keep *_distpfMet_*_*'))
131process.out.outputCommands.extend(cms.untracked.vstring('keep *_ak5CaloJets_*_*'))
132
133
134process.outpath = cms.EndPath(process.out)
135
136
137
138
139# And the logger
140process.load("FWCore.MessageLogger.MessageLogger_cfi")
141process.options = cms.untracked.PSet(
142    makeTriggerResults = cms.untracked.bool(True),
143    wantSummary = cms.untracked.bool(True),
144    Rethrow = cms.untracked.vstring('Unknown', 
145        'ProductNotFound', 
146        'DictionaryNotFound', 
147        'InsertFailure', 
148        'Configuration', 
149        'LogicError', 
150        'UnimplementedFeature', 
151        'InvalidReference', 
152        'NullPointerError', 
153        'NoProductSpecified', 
154        'EventTimeout', 
155        'EventCorruption', 
156        'ModuleFailure', 
157        'ScheduleExecutionFailure', 
158        'EventProcessorFailure', 
159        'FileInPathError', 
160        'FatalRootError', 
161        'NotFound')
162)
163
164process.MessageLogger.cerr.FwkReport.reportEvery = 1
165
166