CMS 3D CMS Logo

PATTauDiscriminationAgainstElectronMVA6Phase2_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # Electron collection merger
4 mergedSlimmedElectronsForTauId = cms.EDProducer('PATElectronCollectionMerger',
5  src = cms.VInputTag('slimmedElectrons', 'slimmedElectronsHGC')
6 )
7 # anti-e phase-2 tauID (Raw)
8 from RecoTauTag.RecoTau.tauDiscriminationAgainstElectronMVA6Phase2_mvaDefs_cff import mvaNames_phase2, mapping_phase2, workingPoints_phase2
9 from RecoTauTag.RecoTau.TauDiscriminatorTools import noPrediscriminants
11 patTauDiscriminationAgainstElectronMVA6Phase2Raw = patTauDiscriminationAgainstElectronMVA6.clone(
12  #Note: PATTauProducer has to be set in the final cfg
13  Prediscriminants = noPrediscriminants,
14  srcElectrons = "mergedSlimmedElectronsForTauId",
15  isPhase2 = True,
16  vetoEcalCracks = False,
17  **mvaNames_phase2
18 )
19 # anti-e phase-2 tauID (WPs)
20 from RecoTauTag.RecoTau.patTauDiscriminantCutMultiplexerDefault_cfi import patTauDiscriminantCutMultiplexerDefault
21 patTauDiscriminationAgainstElectronMVA6Phase2 = patTauDiscriminantCutMultiplexerDefault.clone(
22  #Note: PFTauProducer and Prediscriminants have to be set in the final cfg
23  toMultiplex = 'patTauDiscriminationAgainstElectronMVA6Phase2Raw',
24  mapping = mapping_phase2,
25  rawValues = ["discriminator", "category"],
26  workingPoints = workingPoints_phase2
27 )
28 
29 patTauDiscriminationAgainstElectronMVA6Phase2Task = cms.Task(
30  mergedSlimmedElectronsForTauId,
31  patTauDiscriminationAgainstElectronMVA6Phase2Raw,
32  patTauDiscriminationAgainstElectronMVA6Phase2
33 )
34 
35 patTauDiscriminationAgainstElectronMVA6Phase2Seq = cms.Sequence(
36  patTauDiscriminationAgainstElectronMVA6Phase2Task
37 )