CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FixedConePFTaus_cff.py
Go to the documentation of this file.
2 import copy
3 
4 from RecoTauTag.RecoTau.RecoTauFixedConeProducer_cfi import fixedConeRecoTaus
5 
6 """
7  Defines producers and discriminants for the "FixedCone" PFTau
8 
9  The sequence provided @ the end of the file,
10 
11  ProduceAndDiscriminateFixedConePFTaus
12 
13  produces the fixed cone PFTau and all its associated discriminants
14 
15  Signal/Iso cone parameters:
16  SignalCone for tracks - 0.07 in DR from lead object
17  SignalCone for ECAL/HCAL - 0.07 in DR from lead object
18  Isolation cone (all types) - 0.50 in DR from lead object
19 
20 """
21 fixedConePFTauProducer = copy.deepcopy(fixedConeRecoTaus)
22 
23 # Get the decay mode reconstruction producer
25 fixedConePFTauDecayModeProducer = copy.deepcopy(pfTauDecayMode)
26 fixedConePFTauDecayModeProducer.PFTauProducer = 'fixedConePFTauProducer'
27 
28 # Store the reco'd decay modes in a simple container
30 fixedConePFTauDecayModeIndexProducer = copy.deepcopy(pfTauDecayModeIndexProducer)
31 fixedConePFTauDecayModeIndexProducer.PFTauProducer = cms.InputTag("fixedConePFTauProducer")
32 fixedConePFTauDecayModeIndexProducer.PFTauDecayModeProducer = cms.InputTag("fixedConePFTauDecayModeProducer")
33 
34 # Define the discriminators for this tau
42 #Discriminators using leading Pion
47 
48 # Load helper functions to change the source of the discriminants
50 
51 #copying Discriminator ByLeadingTrack(finding and pt_cut)
52 fixedConePFTauDiscriminationByLeadingTrackFinding = copy.deepcopy(pfRecoTauDiscriminationByLeadingTrackFinding)
53 setTauSource(fixedConePFTauDiscriminationByLeadingTrackFinding, 'fixedConePFTauProducer')
54 
55 fixedConePFTauDiscriminationByLeadingTrackPtCut = copy.deepcopy(pfRecoTauDiscriminationByLeadingTrackPtCut)
56 setTauSource(fixedConePFTauDiscriminationByLeadingTrackPtCut, 'fixedConePFTauProducer')
57 
58 #copying Discriminator ByPionTrackPtCut
59 fixedConePFTauDiscriminationByLeadingPionPtCut = copy.deepcopy(pfRecoTauDiscriminationByLeadingPionPtCut)
60 setTauSource(fixedConePFTauDiscriminationByLeadingPionPtCut, 'fixedConePFTauProducer')
61 
62 #copying the Discriminator by Isolation
63 fixedConePFTauDiscriminationByIsolation = copy.deepcopy(pfRecoTauDiscriminationByIsolation)
64 setTauSource(fixedConePFTauDiscriminationByIsolation, 'fixedConePFTauProducer')
65 
66 fixedConePFTauDiscriminationByTrackIsolation = copy.deepcopy(pfRecoTauDiscriminationByTrackIsolation)
67 setTauSource(fixedConePFTauDiscriminationByTrackIsolation, 'fixedConePFTauProducer')
68 
69 fixedConePFTauDiscriminationByECALIsolation = copy.deepcopy(pfRecoTauDiscriminationByECALIsolation)
70 setTauSource(fixedConePFTauDiscriminationByECALIsolation, 'fixedConePFTauProducer')
71 
72 #copying the Discriminator by Isolation for leadingPion
73 fixedConePFTauDiscriminationByIsolationUsingLeadingPion = copy.deepcopy(pfRecoTauDiscriminationByIsolationUsingLeadingPion)
74 setTauSource(fixedConePFTauDiscriminationByIsolationUsingLeadingPion, 'fixedConePFTauProducer')
75 
76 fixedConePFTauDiscriminationByTrackIsolationUsingLeadingPion = copy.deepcopy(pfRecoTauDiscriminationByTrackIsolationUsingLeadingPion)
77 setTauSource(fixedConePFTauDiscriminationByTrackIsolationUsingLeadingPion, 'fixedConePFTauProducer')
78 
79 fixedConePFTauDiscriminationByECALIsolationUsingLeadingPion = copy.deepcopy(pfRecoTauDiscriminationByECALIsolationUsingLeadingPion)
80 setTauSource(fixedConePFTauDiscriminationByECALIsolationUsingLeadingPion, 'fixedConePFTauProducer')
81 
82 #copying discriminator against electrons and muons
83 fixedConePFTauDiscriminationAgainstElectron = copy.deepcopy(pfRecoTauDiscriminationAgainstElectron)
84 setTauSource(fixedConePFTauDiscriminationAgainstElectron, 'fixedConePFTauProducer')
85 
86 fixedConePFTauDiscriminationAgainstMuon = copy.deepcopy(pfRecoTauDiscriminationAgainstMuon)
87 setTauSource(fixedConePFTauDiscriminationAgainstMuon, 'fixedConePFTauProducer')
88 
89 produceAndDiscriminateFixedConePFTaus = cms.Sequence(
90  fixedConePFTauProducer*
91  fixedConePFTauDiscriminationByLeadingTrackFinding*
92  fixedConePFTauDiscriminationByLeadingTrackPtCut*
93  fixedConePFTauDiscriminationByLeadingPionPtCut*
94  fixedConePFTauDiscriminationByIsolation*
95  fixedConePFTauDiscriminationByTrackIsolation*
96  fixedConePFTauDiscriminationByECALIsolation*
97  fixedConePFTauDiscriminationByIsolationUsingLeadingPion*
98  fixedConePFTauDiscriminationByTrackIsolationUsingLeadingPion*
99  fixedConePFTauDiscriminationByECALIsolationUsingLeadingPion*
100  fixedConePFTauDiscriminationAgainstElectron*
101  fixedConePFTauDiscriminationAgainstMuon
102  )
103