1 |
rwolf |
1.1 |
import FWCore.ParameterSet.Config as cms
|
2 |
|
|
|
3 |
rwolf |
1.3 |
# load what is needed to get the nSVfit stuff run
|
4 |
rwolf |
1.1 |
from PhysicsTools.PatAlgos.producersLayer1.metProducer_cfi import *
|
5 |
|
|
patMETs.metSource = "pfMet"
|
6 |
rwolf |
1.3 |
patMETs.addGenMET = False
|
7 |
rwolf |
1.1 |
patMETs.addMuonCorrections = False
|
8 |
|
|
|
9 |
|
|
from PhysicsTools.PatAlgos.recoLayer0.tauIsolation_cff import *
|
10 |
|
|
from PhysicsTools.PatAlgos.producersLayer1.tauProducer_cff import *
|
11 |
|
|
from PhysicsTools.PatAlgos.selectionLayer1.tauSelector_cfi import *
|
12 |
rwolf |
1.3 |
from PhysicsTools.PatAlgos.recoLayer0.pfCandidateIsoDepositSelection_cff import *
|
13 |
rwolf |
1.1 |
|
14 |
rwolf |
1.3 |
tauIsoDepositPFCandidates.src = "hpsPFTauProducer"
|
15 |
|
|
tauIsoDepositPFCandidates.ExtractorPSet.tauSource = "hpsPFTauProducer"
|
16 |
rwolf |
1.1 |
tauIsoDepositPFChargedHadrons.src = "hpsPFTauProducer"
|
17 |
|
|
tauIsoDepositPFChargedHadrons.ExtractorPSet.tauSource = "hpsPFTauProducer"
|
18 |
|
|
tauIsoDepositPFNeutralHadrons.src = "hpsPFTauProducer"
|
19 |
|
|
tauIsoDepositPFNeutralHadrons.ExtractorPSet.tauSource = "hpsPFTauProducer"
|
20 |
rwolf |
1.3 |
tauIsoDepositPFGammas.src = "hpsPFTauProducer"
|
21 |
|
|
tauIsoDepositPFGammas.ExtractorPSet.tauSource = "hpsPFTauProducer"
|
22 |
rwolf |
1.1 |
|
23 |
|
|
patTaus.tauSource = "hpsPFTauProducer"
|
24 |
rwolf |
1.3 |
patTaus.tauIDSources = cms.PSet(
|
25 |
|
|
decayModeFinding = cms.InputTag("hpsPFTauDiscriminationByDecayModeFinding"),
|
26 |
rwolf |
1.1 |
byVLooseIsolation = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolation"),
|
27 |
rwolf |
1.3 |
byLooseIsolation = cms.InputTag("hpsPFTauDiscriminationByLooseIsolation"),
|
28 |
rwolf |
1.1 |
byMediumIsolation = cms.InputTag("hpsPFTauDiscriminationByMediumIsolation"),
|
29 |
rwolf |
1.3 |
byTightIsolation = cms.InputTag("hpsPFTauDiscriminationByTightIsolation"),
|
30 |
|
|
againstElectronLoose = cms.InputTag("hpsPFTauDiscriminationByLooseElectronRejection"),
|
31 |
rwolf |
1.1 |
againstElectronMedium = cms.InputTag("hpsPFTauDiscriminationByMediumElectronRejection"),
|
32 |
rwolf |
1.3 |
againstElectronTight = cms.InputTag("hpsPFTauDiscriminationByTightElectronRejection"),
|
33 |
rwolf |
1.1 |
againstMuonLoose = cms.InputTag("hpsPFTauDiscriminationByLooseMuonRejection"),
|
34 |
|
|
againstMuonTight = cms.InputTag("hpsPFTauDiscriminationByTightMuonRejection")
|
35 |
|
|
)
|
36 |
|
|
|
37 |
|
|
from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi import *
|
38 |
|
|
from PhysicsTools.PatAlgos.selectionLayer1.muonSelector_cfi import *
|
39 |
|
|
from PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi import *
|
40 |
|
|
from PhysicsTools.PatAlgos.selectionLayer1.electronSelector_cfi import *
|
41 |
|
|
|
42 |
rwolf |
1.3 |
patTaus.addGenMatch = False
|
43 |
|
|
patTaus.addGenJetMatch = False
|
44 |
|
|
patMuons.addGenMatch = False
|
45 |
rwolf |
1.1 |
patElectrons.addGenMatch = False
|
46 |
|
|
|
47 |
|
|
preselectedTaus = selectedPatTaus.clone(cut = 'pt > 15. & abs(eta) < 2.3 & tauID("decayModeFinding") > 0.5 & tauID("byLooseIsolation") > 0.5 & tauID("againstMuonLoose") > 0.5 & tauID("againstElectronLoose") > 0.5')
|
48 |
rwolf |
1.2 |
preselectedMuons = selectedPatMuons.clone(cut = 'isGlobalMuon & isTrackerMuon & pt > 10. & abs(eta) < 2.1 & (trackIso+caloIso)/pt < 0.2')
|
49 |
|
|
preselectedElecs = selectedPatElectrons.clone(cut = 'et > 15. & abs(eta) < 2.5 & (trackIso+caloIso)/et < 0.15')
|
50 |
rwolf |
1.1 |
|
51 |
|
|
# run the nSVfit algorithm
|
52 |
|
|
from TauAnalysis.CandidateTools.nSVfitAlgorithmDiTau_cfi import *
|
53 |
|
|
|
54 |
|
|
## mu-tau version
|
55 |
rwolf |
1.5 |
nSVfitConfigMuTau = nSVfitConfig_template.clone()
|
56 |
rwolf |
1.1 |
nSVfitConfigMuTau.event.resonances.A.daughters.leg1.src = "preselectedMuons"
|
57 |
|
|
nSVfitConfigMuTau.event.resonances.A.daughters.leg2.src = "preselectedTaus"
|
58 |
|
|
nSVfitConfigMuTau.event.srcMEt = "patMETs"
|
59 |
rwolf |
1.5 |
nSVfitProducerMuTau = nSVfitProducerByLikelihoodMaximization.clone()
|
60 |
rwolf |
1.1 |
nSVfitProducerMuTau.config = nSVfitConfigMuTau
|
61 |
rwolf |
1.5 |
#nSVfitProducerMuTau.algorithm.maxObjFunctionCalls = 1000.
|
62 |
rwolf |
1.1 |
|
63 |
|
|
## e-tau version
|
64 |
rwolf |
1.5 |
nSVfitConfigETau = nSVfitConfig_template.clone()
|
65 |
rwolf |
1.1 |
nSVfitConfigETau.event.resonances.A.daughters.leg1.src = "preselectedElecs"
|
66 |
|
|
nSVfitConfigETau.event.resonances.A.daughters.leg1.likelihoodFunctions = cms.VPSet(nSVfitElectronLikelihoodPhaseSpace)
|
67 |
|
|
nSVfitConfigETau.event.resonances.A.daughters.leg1.builder = nSVfitTauToElecBuilder
|
68 |
|
|
nSVfitConfigETau.event.resonances.A.daughters.leg2.src = "preselectedTaus"
|
69 |
|
|
nSVfitConfigETau.event.resonances.A.daughters.leg2.likelihoodFunctions = cms.VPSet(nSVfitTauLikelihoodPhaseSpace)
|
70 |
|
|
nSVfitConfigETau.event.resonances.A.daughters.leg2.builder = nSVfitTauToHadBuilder
|
71 |
|
|
nSVfitConfigETau.event.srcMEt = "patMETs"
|
72 |
rwolf |
1.5 |
nSVfitProducerETau = nSVfitProducerByLikelihoodMaximization.clone()
|
73 |
rwolf |
1.1 |
nSVfitProducerETau.config = nSVfitConfigETau
|
74 |
rwolf |
1.5 |
#nSVfitProducerETau.algorithm.maxObjFunctionCalls = 1000.
|
75 |
rwolf |
1.1 |
|
76 |
|
|
##e-mu version
|
77 |
rwolf |
1.5 |
nSVfitConfigEMu = nSVfitConfig_template.clone()
|
78 |
rwolf |
1.1 |
nSVfitConfigEMu.event.resonances.A.daughters.leg1.src = "preselectedMuons"
|
79 |
|
|
nSVfitConfigEMu.event.resonances.A.daughters.leg1.likelihoodFunctions = cms.VPSet(nSVfitMuonLikelihoodPhaseSpace)
|
80 |
|
|
nSVfitConfigEMu.event.resonances.A.daughters.leg1.builder = nSVfitTauToMuBuilder
|
81 |
|
|
nSVfitConfigEMu.event.resonances.A.daughters.leg2.src = "preselectedElecs"
|
82 |
|
|
nSVfitConfigEMu.event.resonances.A.daughters.leg2.likelihoodFunctions = cms.VPSet(nSVfitElectronLikelihoodPhaseSpace)
|
83 |
|
|
nSVfitConfigEMu.event.resonances.A.daughters.leg2.builder = nSVfitTauToElecBuilder
|
84 |
|
|
nSVfitConfigEMu.event.srcMEt = "patMETs"
|
85 |
rwolf |
1.5 |
nSVfitProducerEMu = nSVfitProducerByLikelihoodMaximization.clone()
|
86 |
rwolf |
1.1 |
nSVfitProducerEMu.config = nSVfitConfigEMu
|
87 |
rwolf |
1.5 |
#nSVfitProducerEMu.algorithm.maxObjFunctionCalls = 1000.
|
88 |
|
|
|
89 |
rwolf |
1.1 |
|
90 |
|
|
nSVFitSetup = cms.Sequence(
|
91 |
|
|
patMETs
|
92 |
|
|
* patPFCandidateIsoDepositSelection
|
93 |
|
|
* patPFTauIsolation
|
94 |
|
|
* patTaus
|
95 |
|
|
* preselectedTaus
|
96 |
|
|
* patMuons
|
97 |
|
|
* preselectedMuons
|
98 |
|
|
* patElectrons
|
99 |
|
|
* preselectedElecs
|
100 |
|
|
* nSVfitProducerMuTau
|
101 |
|
|
* nSVfitProducerETau
|
102 |
|
|
* nSVfitProducerEMu
|
103 |
|
|
)
|