CMS 3D CMS Logo

ZElectronSkim_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # run on MIONAOD
4 RUN_ON_MINIAOD = False
5 #print "ZEE SKIM. RUN ON MINIAOD = ",RUN_ON_MINIAOD
6 
7 # cuts
8 ELECTRON_CUT=("pt > 10 && abs(eta)<2.5")
9 DIELECTRON_CUT=("mass > 40 && mass < 140 && daughter(0).pt>20 && daughter(1).pt()>10")
10 
11 
12 # single lepton selectors
13 if RUN_ON_MINIAOD:
14  goodZeeElectrons = cms.EDFilter("PATElectronRefSelector",
15  src = cms.InputTag("slimmedElectrons"),
16  cut = cms.string(ELECTRON_CUT)
17  )
18 else:
19  goodZeeElectrons = cms.EDFilter("GsfElectronRefSelector",
20  src = cms.InputTag("gedGsfElectrons"),
21  cut = cms.string(ELECTRON_CUT)
22  )
23 
24 # electron ID (sync with the AlCaReco: https://raw.githubusercontent.com/cms-sw/cmssw/CMSSW_7_5_X/Calibration/EcalAlCaRecoProducers/python/WZElectronSkims_cff.py)
25 identifiedElectrons = goodZeeElectrons.clone(cut = cms.string(goodZeeElectrons.cut.value() +
26  " && (gsfTrack.hitPattern().numberOfHits(\'MISSING_INNER_HITS\')<=2)"
27  " && ((isEB"
28  " && ( ((pfIsolationVariables().sumChargedHadronPt + max(0.0,pfIsolationVariables().sumNeutralHadronEt + pfIsolationVariables().sumPhotonEt - 0.5 * pfIsolationVariables().sumPUPt))/p4.pt)<0.164369)"
29  " && (full5x5_sigmaIetaIeta<0.011100)"
30  " && ( - 0.252044<deltaPhiSuperClusterTrackAtVtx< 0.252044 )"
31  " && ( -0.016315<deltaEtaSuperClusterTrackAtVtx<0.016315 )"
32  " && (hadronicOverEm<0.345843)"
33  ")"
34  " || (isEE"
35  " && (gsfTrack.hitPattern().numberOfHits(\'MISSING_INNER_HITS\')<=3)"
36  " && ( ((pfIsolationVariables().sumChargedHadronPt + max(0.0,pfIsolationVariables().sumNeutralHadronEt + pfIsolationVariables().sumPhotonEt - 0.5 * pfIsolationVariables().sumPUPt))/p4.pt)<0.212604 )"
37  " && (full5x5_sigmaIetaIeta<0.033987)"
38  " && ( -0.245263<deltaPhiSuperClusterTrackAtVtx<0.245263 )"
39  " && ( -0.010671<deltaEtaSuperClusterTrackAtVtx<0.010671 )"
40  " && (hadronicOverEm<0.134691) "
41  "))"
42  )
43  )
44 
45 # dilepton selectors
46 diZeeElectrons = cms.EDProducer("CandViewShallowCloneCombiner",
47  decay = cms.string("identifiedElectrons identifiedElectrons"),
48  checkCharge = cms.bool(False),
49  cut = cms.string(DIELECTRON_CUT)
50  )
51 # dilepton counters
52 diZeeElectronsFilter = cms.EDFilter("CandViewCountFilter",
53  src = cms.InputTag("diZeeElectrons"),
54  minNumber = cms.uint32(1)
55  )
56 
57 #sequences
58 zdiElectronSequence = cms.Sequence( goodZeeElectrons * identifiedElectrons * diZeeElectrons * diZeeElectronsFilter )