CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ZElectronSkim_cff.py
Go to the documentation of this file.
2 
3 HLTPath = "HLT_Ele*"
4 HLTProcessName = "HLT"
5 
6 ### cut on electron tag
7 ELECTRON_ET_CUT_MIN_TIGHT = 20.0
8 ELECTRON_ET_CUT_MIN_LOOSE = 10.0
9 
10 MASS_CUT_MIN = 40.
11 
12 
13 
14 ## _____ _ _ ___ _
15 ## | ____| | ___ ___| |_ _ __ ___ _ __ |_ _|__| |
16 ## | _| | |/ _ \/ __| __| '__/ _ \| '_ \ | |/ _` |
17 ## | |___| | __/ (__| |_| | | (_) | | | | | | (_| |
18 ## |_____|_|\___|\___|\__|_| \___/|_| |_| |___\__,_|
19 ##
20 # Electron ID ######
22 
23 PassingVeryLooseId = goodElectrons.clone(
24  cut = cms.string(
25  goodElectrons.cut.value() +
26  # " && (gsfTrack.hitPattern().numberOfHits(\'MISSING_INNER_HITS\')<=1 && !(-0.02<convDist<0.02 && -0.02<convDcot<0.02))" #wrt std WP90 allowing 1 numberOfMissingExpectedHits
27  " && (gsfTrack.hitPattern().numberOfHits(\'MISSING_INNER_HITS\')<=1 )" #wrt std WP90 allowing 1 numberOfMissingExpectedHits
28  " && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN_LOOSE) + ")"
29  " && ((isEB"
30  " && ( dr03TkSumPt/p4.Pt <0.2 && dr03EcalRecHitSumEt/p4.Pt < 0.3 && dr03HcalTowerSumEt/p4.Pt < 0.3 )"
31  " && (sigmaIetaIeta<0.012)"
32  " && ( -0.8<deltaPhiSuperClusterTrackAtVtx<0.8 )"
33  " && ( -0.01<deltaEtaSuperClusterTrackAtVtx<0.01 )"
34  " && (hadronicOverEm<0.15)"
35  ")"
36  " || (isEE"
37  " && ( dr03TkSumPt/p4.Pt <0.2 && dr03EcalRecHitSumEt/p4.Pt < 0.3 && dr03HcalTowerSumEt/p4.Pt < 0.3 )"
38  " && (sigmaIetaIeta<0.033)"
39  " && ( -0.7<deltaPhiSuperClusterTrackAtVtx<0.7 )"
40  " && ( -0.01<deltaEtaSuperClusterTrackAtVtx<0.01 )"
41  " && (hadronicOverEm<0.15) "
42  "))"
43  )
44  )
45 
46 PassingTightId = PassingVeryLooseId.clone(
47  cut = cms.string(
48  PassingVeryLooseId.cut.value() +
49  " && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN_TIGHT) + ")"
50  )
51  )
52 
53 Zele_sequence = cms.Sequence(
54  PassingVeryLooseId
55  *PassingTightId
56  )
57 
58 
59 
60 ## _____ ___ ____ ____ _
61 ## |_ _( _ ) | _ \ | _ \ __ _(_)_ __ ___
62 ## | | / _ \/\ |_) | | |_) / _` | | '__/ __|
63 ## | || (_> < __/ | __/ (_| | | | \__ \
64 ## |_| \___/\/_| |_| \__,_|_|_| |___/
65 ##
66 ##
67 import copy
69 ZEEHltFilter = copy.deepcopy(hltHighLevel)
70 ZEEHltFilter.throw = cms.bool(False)
71 ZEEHltFilter.HLTPaths = [HLTPath]
72 
73 tagGsf = cms.EDProducer("CandViewShallowCloneCombiner",
74  # decay = cms.string("PassingWP90 goodElectrons"),
75  # decay = cms.string("PassingVeryLooseId PassingVeryLooseId"),
76  decay = cms.string("PassingTightId PassingVeryLooseId"),
77  checkCharge = cms.bool(False),
78  cut = cms.string("mass > " + str(MASS_CUT_MIN))
79  )
80 tagGsfCounter = cms.EDFilter("CandViewCountFilter",
81  src = cms.InputTag("tagGsf"),
82  minNumber = cms.uint32(1)
83  )
84 tagGsfFilter = cms.Sequence(tagGsf * tagGsfCounter)
85 tagGsfSeq = cms.Sequence( ZEEHltFilter * Zele_sequence * tagGsfFilter )
86 #tagGsfSeq = cms.Sequence( ZEEHltFilter * Zele_sequence )
87 #tagGsfSeq = cms.Sequence( ZEEHltFilter )