PageRenderTime 65ms CodeModel.GetById 16ms app.highlight 44ms RepoModel.GetById 1ms app.codeStats 0ms

/ElectroWeakAnalysis/ZEE/test/pat_ZeeVBTF_ntuple_woCertJSON_forData.py

https://github.com/aivanov-cern/cmssw
Python | 469 lines | 457 code | 1 blank | 11 comment | 3 complexity | ab8aea1c8def169eb6aa4ed75293e93b MD5 | raw file
  1#   Initializations
  2#   ---------------
  3#
  4#   Get the base name of the Python script and use it to define input/output associated files
  5#
  6#   N.B:    Special variable __file__ is not available within cmsRun, and the following line fails:
  7#
  8#               pyFile=(__file__).replace('.py','')
  9#
 10#           As a result, the calling arguments must be scanned to locate the Python script.
 11#
 12import sys
 13
 14for inArg in sys.argv:
 15    if inArg.find('.py') == -1:
 16        continue
 17    else:
 18        pyBaseName=inArg.replace('.py','')
 19
 20#   Define input/output associated files.
 21#
 22pyFile = "%s.py" % (pyBaseName)             #   Name of the Python script itself
 23lstFile = "%s.list" % (pyBaseName)          #   Name of the list file       (contains a list of files to process)
 24resFile = "%s.results" % (pyBaseName)       #   Name of the results file    (stdout and stderr messages)
 25outFile = "%s.root" % (pyBaseName)          #   Name of the output file     (ROOT)
 26
 27
 28##   Configuration for the production of the ICHEP VBTF ntuple
 29##   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 30##   MC, spring10
 31##
 32##   Stilianos Kesisoglou - Institute of Nuclear Physics
 33##                                NCSR Demokritos
 34##   25 June 2010
 35import FWCore.ParameterSet.Config as cms
 36
 37process = cms.Process("PAT")
 38
 39
 40
 41process.options = cms.untracked.PSet(
 42    Rethrow = cms.untracked.vstring('ProductNotFound')
 43)
 44
 45#process.MessageLogger = cms.Service(
 46#        "MessageLogger",
 47#            categories = cms.untracked.vstring('info', 'debug','cout')
 48#            )
 49
 50
 51process.load("FWCore.MessageService.MessageLogger_cfi")
 52
 53process.MessageLogger.cerr.threshold = cms.untracked.string("INFO")
 54
 55process.MessageLogger.cerr.FwkSummary = cms.untracked.PSet(
 56    reportEvery = cms.untracked.int32(1000000),
 57    limit = cms.untracked.int32(10000000)
 58       )
 59       
 60process.MessageLogger.cerr.FwkReport = cms.untracked.PSet(
 61      reportEvery = cms.untracked.int32(100000),
 62         limit = cms.untracked.int32(10000000)
 63      )
 64      
 65process.options = cms.untracked.PSet(
 66       wantSummary = cms.untracked.bool(True)
 67       )
 68
 69# 
 70# # source
 71# process.source = cms.Source("PoolSource", 
 72#      fileNames = cms.untracked.vstring(
 73# # SOME DATA FILE TO BE PUT HERE
 74# #
 75# #   DATA test (local) running on the OneElecPlusSC skim made from the EG DATA samples
 76# #   ----------------------------------------------------------------------------------
 77# #    'rfio:/tmp/ikesisog/TestFiles/skimDATA/Zee/00000000-0000-0000-0000-000000000000_woFakeJSON.root',
 78# #    'rfio:/tmp/ikesisog/TestFiles/skimDATA/Zee/00000000-0000-0000-0000-000000000000_wiFakeJSON.root',
 79# #
 80# #   DATA test (local) running directly on the EG DATA samples
 81# #   ----------------------------------------------------------
 82#    'rfio:/tmp/ikesisog/TestFiles/dSetDATA/Zee/6AD8C6D3-2C92-DF11-AFDE-0030487C90C2.root',
 83#    'rfio:/tmp/ikesisog/TestFiles/dSetDATA/Zee/34BD6E1C-3892-DF11-BD3F-001D09F27067.root',
 84#    'rfio:/tmp/ikesisog/TestFiles/dSetDATA/Zee/04D0FF1D-2792-DF11-8B6C-003048F11942.root',
 85#    'rfio:/tmp/ikesisog/TestFiles/dSetDATA/Zee/74CF44CB-1592-DF11-989E-001617C3B77C.root',
 86#    'rfio:/tmp/ikesisog/TestFiles/dSetDATA/Zee/66072495-1A92-DF11-9461-0030487BC68E.root',
 87#    'rfio:/tmp/ikesisog/TestFiles/dSetDATA/Zee/5E06C91D-1E92-DF11-9591-0016177CA778.root',
 88#    'rfio:/tmp/ikesisog/TestFiles/dSetDATA/Zee/48B8741C-1E92-DF11-ADAD-001617C3B6DC.root',
 89#    'rfio:/tmp/ikesisog/TestFiles/dSetDATA/Zee/1EC74696-1A92-DF11-B9BB-0030487CD13A.root',
 90#     )
 91# )
 92# 
 93
 94
 95#   source - Use an input list to bypass the 255 file limit
 96import FWCore.Utilities.FileUtils as FileUtils
 97
 98filelist = FileUtils.loadListFromFile(lstFile) 
 99
100process.source = cms.Source('PoolSource',
101    fileNames = cms.untracked.vstring(*filelist)
102    )
103
104
105# 
106# #   using locally provided JSON
107# import PhysicsTools.PythonAnalysis.LumiList as LumiList
108# import FWCore.ParameterSet.Types as CfgTypes
109# myLumis = LumiList.LumiList(filename = 'Cert_132440-149442_7TeV_StreamExpress_Collisions10_JSON_v2.json').getCMSSWString().split(',')
110# process.source.lumisToProcess = CfgTypes.untracked(CfgTypes.VLuminosityBlockRange())
111# process.source.lumisToProcess.extend(myLumis)
112# 
113
114process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
115
116## Load additional processes
117# 
118process.load("Configuration.StandardSequences.Geometry_cff")
119process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
120
121## global tags:
122#
123process.GlobalTag.globaltag = cms.string('GR_R_39X_V5::All') # GLOBAL TAG FOR DATA
124
125process.load("Configuration.StandardSequences.MagneticField_cff")
126
127
128################################################################################################
129###    P r e p a r a t i o n      o f    t h e    P A T    O b j e c t s   f r o m    A O D  ###
130################################################################################################
131
132## pat sequences to be loaded:
133#process.load("PhysicsTools.PFCandProducer.PF2PAT_cff")
134
135process.load("PhysicsTools.PatAlgos.patSequences_cff")
136
137#process.load("PhysicsTools.PatAlgos.triggerLayer1.triggerProducer_cff")
138
139##
140#
141
142## MET creation     <=== WARNING: YOU MAY WANT TO MODIFY THIS PART OF THE CODE       %%%%%%%%%%%%%
143##                                specify the names of the MET collections that you need here %%%%
144##                                                                                             #%%
145## if you don't specify anything the default MET is the raw Calo MET                           #%%
146process.caloMET = process.patMETs.clone(                                                       #%%
147    metSource = cms.InputTag("met","","RECO"),
148    addTrigMatch = cms.bool(False),
149    addMuonCorrections = cms.bool(False),
150    addGenMET = cms.bool(False),
151)
152process.tcMET = process.patMETs.clone(                                                         #%%
153    metSource = cms.InputTag("tcMet","","RECO"),
154    addTrigMatch = cms.bool(False),
155    addMuonCorrections = cms.bool(False),
156    addGenMET = cms.bool(False),
157)
158process.pfMET = process.patMETs.clone(                                                         #%%
159    metSource = cms.InputTag("pfMet","","RECO"),
160    addTrigMatch = cms.bool(False),
161    addMuonCorrections = cms.bool(False),
162    addGenMET = cms.bool(False),
163)
164
165## specify here what you want to have on the plots! <===== MET THAT YOU WANT ON THE PLOTS  %%%%%%%
166myMetCollection   = 'caloMET'
167myPfMetCollection =   'pfMET'
168myTcMetCollection =   'tcMET'
169
170## modify the sequence of the MET creation:                                                    #%%
171process.makePatMETs = cms.Sequence(process.caloMET*process.tcMET*process.pfMET)
172
173
174## modify the final pat sequence: keep only electrons + METS (muons are needed for met corrections)
175
176process.load("RecoEgamma.EgammaIsolationAlgos.egammaIsolationSequence_cff")
177#process.patElectronIsolation = cms.Sequence(process.egammaIsolationSequence)
178
179process.patElectrons.isoDeposits = cms.PSet()
180process.patElectrons.userIsolation = cms.PSet()
181process.patElectrons.addElectronID = cms.bool(True)
182
183process.patElectrons.electronIDSources = cms.PSet(
184    simpleEleId95relIso = cms.InputTag("simpleEleId95relIso"),
185    simpleEleId90relIso = cms.InputTag("simpleEleId90relIso"),
186    simpleEleId85relIso = cms.InputTag("simpleEleId85relIso"),
187    simpleEleId80relIso = cms.InputTag("simpleEleId80relIso"),
188    simpleEleId70relIso = cms.InputTag("simpleEleId70relIso"),
189    simpleEleId60relIso = cms.InputTag("simpleEleId60relIso"),
190    simpleEleId95cIso   = cms.InputTag("simpleEleId95cIso"),
191    simpleEleId90cIso   = cms.InputTag("simpleEleId90cIso"),
192    simpleEleId85cIso   = cms.InputTag("simpleEleId85cIso"),
193    simpleEleId80cIso   = cms.InputTag("simpleEleId80cIso"),
194    simpleEleId70cIso   = cms.InputTag("simpleEleId70cIso"),
195    simpleEleId60cIso   = cms.InputTag("simpleEleId60cIso")    
196)
197
198##
199
200process.patElectrons.addGenMatch = cms.bool(False)
201process.patElectrons.embedGenMatch = cms.bool(False)
202process.patElectrons.usePV = cms.bool(False)
203
204##
205
206process.load("ElectroWeakAnalysis.ZEE.simpleEleIdSequence_cff")
207
208# you have to tell the ID that it is data. These are set to False for MC
209process.simpleEleId95relIso.dataMagneticFieldSetUp = cms.bool(True)
210process.simpleEleId90relIso.dataMagneticFieldSetUp = cms.bool(True)
211process.simpleEleId85relIso.dataMagneticFieldSetUp = cms.bool(True)
212process.simpleEleId80relIso.dataMagneticFieldSetUp = cms.bool(True)
213process.simpleEleId70relIso.dataMagneticFieldSetUp = cms.bool(True)
214process.simpleEleId60relIso.dataMagneticFieldSetUp = cms.bool(True)
215process.simpleEleId95cIso.dataMagneticFieldSetUp = cms.bool(True)
216process.simpleEleId90cIso.dataMagneticFieldSetUp = cms.bool(True)
217process.simpleEleId85cIso.dataMagneticFieldSetUp = cms.bool(True)
218process.simpleEleId80cIso.dataMagneticFieldSetUp = cms.bool(True)
219process.simpleEleId70cIso.dataMagneticFieldSetUp = cms.bool(True)
220process.simpleEleId60cIso.dataMagneticFieldSetUp = cms.bool(True)
221#
222process.patElectronIDs = cms.Sequence(process.simpleEleIdSequence)
223
224process.makePatElectrons = cms.Sequence(process.patElectronIDs*process.patElectrons)
225
226# process.makePatMuons may be needed depending on how you calculate the MET
227
228process.makePatCandidates = cms.Sequence(process.makePatElectrons+process.makePatMETs)
229
230process.patDefaultSequence = cms.Sequence(process.makePatCandidates)
231
232## WARNING: you may want to modify this item:
233HLT_process_name = "HLT"   # REDIGI for the production traditional MC / HLT for the powheg samples or data
234
235# Trigger Path(s)
236HLT_path_name     = "HLT_Photon10_L1R"
237
238# Label of the last Trigger Filter in the Trigger Path
239HLT_filter_name  =  "hltL1NonIsoHLTNonIsoSinglePhotonEt10HcalIsolFilter"
240
241HLT_path_name_extra0   = "HLT_Photon15_Cleaned_L1R"
242HLT_filter_name_extra0 = cms.untracked.InputTag("hltL1NonIsoHLTNonIsoSinglePhotonEt15CleanedHcalIsolFilter","",HLT_process_name)
243
244HLT_path_name_extra1   = "HLT_Ele15_SW_CaloEleId_L1R"
245HLT_filter_name_extra1 = cms.untracked.InputTag("hltL1NonIsoHLTNonIsoSingleElectronEt15CaloEleIdPixelMatchFilter","",HLT_process_name)
246
247HLT_path_name_extra2   = "HLT_Ele17_SW_CaloEleId_L1R"
248HLT_filter_name_extra2 = cms.untracked.InputTag("hltL1NonIsoHLTNonIsoSingleElectronEt17CaloEleIdPixelMatchFilter","",HLT_process_name)
249
250HLT_path_name_extra3   = "HLT_Ele17_SW_TightEleId_L1R"
251HLT_filter_name_extra3 = cms.untracked.InputTag("hltL1NonIsoHLTNonIsoSingleElectronEt17TightEleIdDphiFilter","",HLT_process_name)
252
253# HLT_path_name_extra4   = "HLT_Ele17_SW_TighterEleIdIsol_L1R_v2"
254# HLT_filter_name_extra4 = cms.untracked.InputTag("hltL1NonIsoHLTNonIsoSingleElectronEt17TighterEleIdIsolTrackIsolFilter","",HLT_process_name)
255
256HLT_path_name_extra5   = "HLT_Ele22_SW_TighterCaloIdIsol_L1R_v1"
257HLT_filter_name_extra5 = cms.untracked.InputTag("hltL1NonIsoHLTNonIsoSingleElectronEt22TighterCaloIdIsolTrackIsolFilter","",HLT_process_name)
258
259HLT_path_name_extra6   = "HLT_Ele22_SW_TighterCaloIdIsol_L1R_v2"
260HLT_filter_name_extra6 = cms.untracked.InputTag("hltL1NonIsoHLTNonIsoSingleElectronEt22TighterCaloIdIsolTrackIsolFilter","",HLT_process_name)
261
262
263rules_Filter = cms.PSet (
264    ### the input collections needed:
265    electronCollectionTag = cms.untracked.InputTag("patElectrons","","PAT"),
266    metCollectionTag = cms.untracked.InputTag(myMetCollection,"","PAT"),
267    pfMetCollectionTag = cms.untracked.InputTag(myPfMetCollection,"","PAT"),
268    tcMetCollectionTag = cms.untracked.InputTag(myTcMetCollection,"","PAT"),
269    triggerCollectionTag = cms.untracked.InputTag("TriggerResults","",HLT_process_name),
270    triggerEventTag = cms.untracked.InputTag("hltTriggerSummaryAOD","",HLT_process_name),
271    hltpath = cms.untracked.string(HLT_path_name), 
272    hltpathFilter = cms.untracked.InputTag(HLT_filter_name,"",HLT_process_name),
273    ebRecHits = cms.untracked.InputTag("reducedEcalRecHitsEB"),
274    eeRecHits = cms.untracked.InputTag("reducedEcalRecHitsEE"),
275    PrimaryVerticesCollection = cms.untracked.InputTag("offlinePrimaryVertices"),
276    ### here the preselection is applied
277    # fiducial cuts:
278    BarrelMaxEta = cms.untracked.double(1.4442),
279    EndCapMinEta = cms.untracked.double(1.5660),
280    EndCapMaxEta = cms.untracked.double(2.5000),
281    # demand ecal driven electron:
282    useEcalDrivenElectrons = cms.untracked.bool(True),
283    # demand offline spike cleaning with the Swiss Cross criterion:
284    useSpikeRejection = cms.untracked.bool(False),
285    spikeCleaningSwissCrossCut = cms.untracked.double(0.95),
286    # demand geometrically matched to an HLT object with ET>15GeV
287    useTriggerInfo = cms.untracked.bool(True),
288    electronMatched2HLT = cms.untracked.bool(True),
289    electronMatched2HLT_DR = cms.untracked.double(0.1),
290    useHLTObjectETCut = cms.untracked.bool(True),
291    hltObjectETCut = cms.untracked.double(15.0),
292    useExtraTrigger = cms.untracked.bool(True),
293#     vHltpathExtra = cms.untracked.vstring(HLT_path_name_extra0,HLT_path_name_extra1,HLT_path_name_extra2,HLT_path_name_extra3,HLT_path_name_extra4,HLT_path_name_extra5),
294#     vHltpathFilterExtra = cms.untracked.VInputTag(HLT_filter_name_extra0,HLT_filter_name_extra1,HLT_filter_name_extra2,HLT_filter_name_extra3,HLT_filter_name_extra4,HLT_filter_name_extra5),
295    vHltpathExtra = cms.untracked.vstring(HLT_path_name_extra0,HLT_path_name_extra1,HLT_path_name_extra2,HLT_path_name_extra3,HLT_path_name_extra5,HLT_path_name_extra6),
296    vHltpathFilterExtra = cms.untracked.VInputTag(HLT_filter_name_extra0,HLT_filter_name_extra1,HLT_filter_name_extra2,HLT_filter_name_extra3,HLT_filter_name_extra5,HLT_filter_name_extra6),
297
298    # ET Cut in the SC
299    ETCut = cms.untracked.double(25.0),                                  
300    METCut = cms.untracked.double(0.0),
301    # For DATA set it to True, for MC set it to False
302    dataMagneticFieldSetUp = cms.untracked.bool(True),
303    dcsTag = cms.untracked.InputTag("scalersRawToDigi")
304)
305
306
307rules_Filter_Elec0 = cms.PSet (
308    # Other parameters of the code - leave them as they are
309    useValidFirstPXBHit0            = cms.untracked.bool(False),
310    useConversionRejection0         = cms.untracked.bool(False),
311    useExpectedMissingHits0         = cms.untracked.bool(True),
312    maxNumberOfExpectedMissingHits0 = cms.untracked.int32(0),
313    # calculate some new cuts
314    calculateValidFirstPXBHit0      = cms.untracked.bool(False),
315    calculateConversionRejection0   = cms.untracked.bool(False),
316    calculateExpectedMissingHits0   = cms.untracked.bool(False)
317)
318
319rules_Filter_Elec1 = cms.PSet (
320    # Other parameters of the code - leave them as they are
321    useValidFirstPXBHit1            = cms.untracked.bool(False),
322    useConversionRejection1         = cms.untracked.bool(False),
323    useExpectedMissingHits1         = cms.untracked.bool(True),
324    maxNumberOfExpectedMissingHits1 = cms.untracked.int32(0),
325    # calculate some new cuts
326    calculateValidFirstPXBHit1      = cms.untracked.bool(False),
327    calculateConversionRejection1   = cms.untracked.bool(False),
328    calculateExpectedMissingHits1   = cms.untracked.bool(False)
329)
330
331rules_Filter_Elec2 = cms.PSet (
332    # Other parameters of the code - leave them as they are
333    useValidFirstPXBHit2            = cms.untracked.bool(False),
334    useConversionRejection2         = cms.untracked.bool(False),
335    useExpectedMissingHits2         = cms.untracked.bool(True),
336    maxNumberOfExpectedMissingHits2 = cms.untracked.int32(0),
337    # calculate some new cuts
338    calculateValidFirstPXBHit2      = cms.untracked.bool(False),
339    calculateConversionRejection2   = cms.untracked.bool(False),
340    calculateExpectedMissingHits2   = cms.untracked.bool(False)
341)
342
343
344process.zeeFilter = cms.EDFilter('ZeeCandidateFilter',
345    rules_Filter,
346    rules_Filter_Elec0,    
347    rules_Filter_Elec1,    
348    rules_Filter_Elec2   
349)
350
351
352
353## the Z selection that you prefer
354from ElectroWeakAnalysis.ZEE.simpleCutBasedSpring10SelectionBlocks_cfi import *
355
356selection_inverse = cms.PSet (
357    deta_EB_inv = cms.untracked.bool(True),
358    deta_EE_inv = cms.untracked.bool(True)
359    )
360
361
362rules_Plotter = cms.PSet (
363    #   treat or not the elecrons with same criteria. if yes then rules_Plotter_Elec1/2 are neglected
364    useSameSelectionOnBothElectrons = cms.untracked.bool(True),    
365    # some extra information on the ntuple production:
366    sihih0_EB = cms.untracked.double(1000.0),
367    dphi0_EB  = cms.untracked.double(1000.0),
368    deta0_EB  = cms.untracked.double(1000.0),
369    hoe0_EB   = cms.untracked.double(1000.0),
370    sihih0_EE = cms.untracked.double(1000.0),
371    dphi0_EE  = cms.untracked.double(1000.0),
372    deta0_EE  = cms.untracked.double(1000.0),
373    hoe0_EE   = cms.untracked.double(1000.0),
374    includeJetInformationInNtuples = cms.untracked.bool(True),
375    caloJetCollectionTag = cms.untracked.InputTag('ak5CaloJetsL2L3'),
376    pfJetCollectionTag = cms.untracked.InputTag('ak5PFJetsL2L3'),
377    DRJetFromElectron = cms.untracked.double(0.3),
378    #
379    zeeCollectionTag = cms.untracked.InputTag("zeeFilter","selectedZeeCandidates","PAT"),
380    ZEE_VBTFselectionFileName = cms.untracked.string("ZEE_VBTFselection.root"),
381    ZEE_VBTFpreseleFileName = cms.untracked.string("ZEE_VBTFpreselection.root"),
382    DatasetTag =  cms.untracked.int32(100),
383    storeExtraInformation = cms.untracked.bool(True)
384)
385
386rules_Plotter_Elec0 = cms.PSet (
387    # The selection to be used here:
388    usePrecalcID0                   = cms.untracked.bool(True),
389    usePrecalcIDType0               = cms.untracked.string('simpleEleId80relIso'),
390    usePrecalcIDSign0               = cms.untracked.string('='),
391    usePrecalcIDValue0              = cms.untracked.double(7),    
392    ## preselection criteria are independent of useSameSelectionOnBothElectrons
393    #  set them to False if you don't want them
394    useValidFirstPXBHit0            = cms.untracked.bool(False),
395    useConversionRejection0         = cms.untracked.bool(False),
396    useExpectedMissingHits0         = cms.untracked.bool(True),
397    maxNumberOfExpectedMissingHits0 = cms.untracked.int32(0),    
398    ##
399    calculateValidFirstPXBHit0      = cms.untracked.bool(False),
400    calculateConversionRejection0   = cms.untracked.bool(False),
401    calculateExpectedMissingHits0   = cms.untracked.bool(False)
402)
403
404rules_Plotter_Elec1 = cms.PSet (
405    # The selection to be used here:
406    usePrecalcID1                   = cms.untracked.bool(True),
407    usePrecalcIDType1               = cms.untracked.string('simpleEleId80relIso'),
408    usePrecalcIDSign1               = cms.untracked.string('='),
409    usePrecalcIDValue1              = cms.untracked.double(7),    
410    ## preselection criteria are independent of useSameSelectionOnBothElectrons
411    #  set them to False if you don't want them
412    useValidFirstPXBHit1            = cms.untracked.bool(False),
413    useConversionRejection1         = cms.untracked.bool(False),
414    useExpectedMissingHits1         = cms.untracked.bool(True),
415    maxNumberOfExpectedMissingHits1 = cms.untracked.int32(0),    
416    ##
417    calculateValidFirstPXBHit1      = cms.untracked.bool(False),
418    calculateConversionRejection1   = cms.untracked.bool(False),
419    calculateExpectedMissingHits1   = cms.untracked.bool(False)
420)
421
422rules_Plotter_Elec2 = cms.PSet (
423    # The selection to be used here:
424    usePrecalcID2                   = cms.untracked.bool(True),
425    usePrecalcIDType2               = cms.untracked.string('simpleEleId80relIso'),
426    usePrecalcIDSign2               = cms.untracked.string('='),
427    usePrecalcIDValue2              = cms.untracked.double(7),    
428    ## preselection criteria are independent of useSameSelectionOnBothElectrons
429    #  set them to False if you don't want them
430    useValidFirstPXBHit2            = cms.untracked.bool(False),
431    useConversionRejection2         = cms.untracked.bool(False),
432    useExpectedMissingHits2         = cms.untracked.bool(True),
433    maxNumberOfExpectedMissingHits2 = cms.untracked.int32(0),    
434    ##
435    calculateValidFirstPXBHit2      = cms.untracked.bool(False),
436    calculateConversionRejection2   = cms.untracked.bool(False),
437    calculateExpectedMissingHits2   = cms.untracked.bool(False)
438)
439
440
441# we need to store jet information, hence we have to produce the jets:
442process.load("JetMETCorrections.Configuration.DefaultJEC_cff")
443
444process.jetSequence = cms.Sequence( process.ak5CaloJetsL2L3  )
445
446process.pfjetAK5Sequence = cms.Sequence( process.ak5PFJetsL2L3 )
447
448process.ourJetSequence = cms.Sequence( process.jetSequence * process.pfjetAK5Sequence )
449
450
451process.plotter = cms.EDAnalyzer('ZeePlots',
452    rules_Plotter,
453    rules_Plotter_Elec0,
454    rules_Plotter_Elec1,
455    rules_Plotter_Elec2   
456)
457
458
459# For DATA, 361p4 electrons need fixing first (misalignment corrections) *NOT* be used with MC
460#process.load("RecoEgamma.EgammaTools.correctedElectronsProducer_cfi")
461#process.p = cms.Path( process.gsfElectrons*process.ourJetSequence*process.patDefaultSequence*process.zeeFilter*process.plotter)
462
463# For DATA, 397 electrons are fixed (misalignment corrections included)
464process.p = cms.Path( process.ourJetSequence*process.patDefaultSequence*process.zeeFilter*process.plotter)
465
466# For MonteCarlo,
467#process.p = cms.Path( process.ourJetSequence * process.patDefaultSequence +process.zeeFilter + process.plotter)
468
469