PageRenderTime 20ms CodeModel.GetById 7ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/ElectroWeakAnalysis/WMuNu/test/WMuNuCandidateHistogrammer.py

https://github.com/aivanov-cern/cmssw
Python | 171 lines | 107 code | 29 blank | 35 comment | 0 complexity | 15243bd7de5441252b5405eab0f19cfc MD5 | raw file
  1import FWCore.ParameterSet.Config as cms
  2
  3# Process, how many events, inout files, ...
  4process = cms.Process("wmunuplots")
  5process.maxEvents = cms.untracked.PSet(
  6      input = cms.untracked.int32(-1)
  7)
  8process.source = cms.Source("PoolSource",
  9      debugVerbosity = cms.untracked.uint32(0),
 10      debugFlag = cms.untracked.bool(False),
 11       
 12     # fileNames = cms.untracked.vstring(
 13     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_1.root',
 14     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_2.root',
 15     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_3.root',
 16     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_4.root',
 17     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_5.root',
 18     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_6.root',
 19     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_7.root',
 20     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_8.root',
 21     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_9.root',
 22     #         '/store/user/cepeda/mytestSkim_PTR_Wmunu_10pb/EWK_WMuNu_SubSkim_31Xv3_10.root'
 23     #)                  
 24      
 25     fileNames = cms.untracked.vstring(
 26         "file:EWK_WMuNu_SubSkim_31Xv3.root"
 27      #   "file:AOD_with_WCandidates.root"
 28     )
 29)
 30
 31# Debug/info printouts
 32process.MessageLogger = cms.Service("MessageLogger",
 33      debugModules = cms.untracked.vstring('corMetWMuNus','selcorMet'),
 34      cout = cms.untracked.PSet(
 35            default = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
 36            #threshold = cms.untracked.string('INFO')
 37            threshold = cms.untracked.string('DEBUG')
 38      ),
 39      destinations = cms.untracked.vstring('cout')
 40)
 41
 42process.selcorMet = cms.EDFilter("WMuNuSelector",
 43      # Fill Basc Histograms? ->
 44      plotHistograms = cms.untracked.bool(True),
 45
 46      # Input collections ->
 47      MuonTag = cms.untracked.InputTag("muons"),
 48      TrigTag = cms.untracked.InputTag("TriggerResults::HLT8E29"),
 49      JetTag = cms.untracked.InputTag("antikt5CaloJets"),
 50      WMuNuCollectionTag = cms.untracked.InputTag("corMetWMuNus"),
 51
 52      # Preselection! 
 53      MuonTrig = cms.untracked.string("HLT_Mu9"),
 54      PtThrForZ1 = cms.untracked.double(20.0),
 55      PtThrForZ2 = cms.untracked.double(10.0),
 56      EJetMin = cms.untracked.double(40.),
 57      NJetMax = cms.untracked.int32(999999),
 58
 59      # Main cuts ->
 60      PtCut = cms.untracked.double(25.0),
 61      EtaCut = cms.untracked.double(2.1),
 62      IsRelativeIso = cms.untracked.bool(True),
 63      IsCombinedIso = cms.untracked.bool(False),
 64      IsoCut03 = cms.untracked.double(0.1),
 65      MtMin = cms.untracked.double(50.0),
 66      MtMax = cms.untracked.double(200.0),
 67      MetMin = cms.untracked.double(-999999.),
 68      MetMax = cms.untracked.double(999999.),
 69      AcopCut = cms.untracked.double(2.),
 70
 71      # Muon quality cuts ->
 72      DxyCut = cms.untracked.double(0.2),
 73      NormalizedChi2Cut = cms.untracked.double(10.),
 74      TrackerHitsCut = cms.untracked.int32(11),
 75      IsAlsoTrackerMuon = cms.untracked.bool(True),
 76
 77      # Select only W-, W+ ( default is all Ws)  
 78      SelectByCharge=cms.untracked.int32(0)
 79
 80)
 81process.selpfMet = cms.EDFilter("WMuNuSelector",
 82      # Fill Basc Histograms? ->
 83      plotHistograms = cms.untracked.bool(True),
 84
 85      # Preselection! 
 86      MuonTrig = cms.untracked.string("HLT_Mu9"),
 87      PtThrForZ1 = cms.untracked.double(20.0),
 88      PtThrForZ2 = cms.untracked.double(10.0),
 89      EJetMin = cms.untracked.double(40.),
 90      NJetMax = cms.untracked.int32(999999),
 91
 92      # Input collections ->
 93      MuonTag = cms.untracked.InputTag("muons"),
 94      TrigTag = cms.untracked.InputTag("TriggerResults::HLT8E29"),
 95      JetTag = cms.untracked.InputTag("antikt5CaloJets"),
 96      WMuNuCollectionTag = cms.untracked.InputTag("pfMetWMuNus"),
 97
 98      # Main cuts ->
 99      UseTrackerPt = cms.untracked.bool(True),
100      PtCut = cms.untracked.double(25.0),
101      EtaCut = cms.untracked.double(2.1),
102      IsRelativeIso = cms.untracked.bool(True),
103      IsCombinedIso = cms.untracked.bool(False),
104      IsoCut03 = cms.untracked.double(0.1),
105      MtMin = cms.untracked.double(50.0),
106      MtMax = cms.untracked.double(200.0),
107      MetMin = cms.untracked.double(-999999.),
108      MetMax = cms.untracked.double(999999.),
109      AcopCut = cms.untracked.double(2.),
110
111      # Muon quality cuts ->
112      DxyCut = cms.untracked.double(0.2),
113      NormalizedChi2Cut = cms.untracked.double(10.),
114      TrackerHitsCut = cms.untracked.int32(11),
115      IsAlsoTrackerMuon = cms.untracked.bool(True),
116
117      # Select only W-, W+ ( default is all Ws)
118      SelectByCharge=cms.untracked.int32(0)
119
120)
121process.seltcMet = cms.EDFilter("WMuNuSelector",
122      # Fill Basc Histograms? ->
123      plotHistograms = cms.untracked.bool(True),
124
125      # Input collections ->
126      MuonTag = cms.untracked.InputTag("muons"),
127      TrigTag = cms.untracked.InputTag("TriggerResults::HLT8E29"),
128      JetTag = cms.untracked.InputTag("antikt5CaloJets"),
129      WMuNuCollectionTag = cms.untracked.InputTag("tcMetWMuNus"),
130
131      # Preselection! 
132      MuonTrig = cms.untracked.string("HLT_Mu9"),
133      PtThrForZ1 = cms.untracked.double(20.0),
134      PtThrForZ2 = cms.untracked.double(10.0),
135      EJetMin = cms.untracked.double(40.),
136      NJetMax = cms.untracked.int32(999999),
137
138      # Main cuts ->
139      UseTrackerPt = cms.untracked.bool(True),
140      PtCut = cms.untracked.double(25.0),
141      EtaCut = cms.untracked.double(2.1),
142      IsRelativeIso = cms.untracked.bool(True),
143      IsCombinedIso = cms.untracked.bool(False),
144      IsoCut03 = cms.untracked.double(0.1),
145      MtMin = cms.untracked.double(50.0),
146      MtMax = cms.untracked.double(200.0),
147      MetMin = cms.untracked.double(-999999.),
148      MetMax = cms.untracked.double(999999.),
149      AcopCut = cms.untracked.double(2.),
150
151      # Muon quality cuts ->
152      DxyCut = cms.untracked.double(0.2),
153      NormalizedChi2Cut = cms.untracked.double(10.),
154      TrackerHitsCut = cms.untracked.int32(11),
155      IsAlsoTrackerMuon = cms.untracked.bool(True),
156
157      # Select only W-, W+ ( default is all Ws)
158      SelectByCharge=cms.untracked.int32(0)
159
160)
161
162process.TFileService = cms.Service("TFileService", fileName = cms.string('WMuNuBasicPlots.root') )
163
164
165# Steering the process
166process.path1 = cms.Path(process.selcorMet)
167process.path2 = cms.Path(process.selpfMet)
168process.path3 = cms.Path(process.seltcMet)
169
170
171