CMS 3D CMS Logo

CaloRecoTauDiscriminationForChargedHiggs_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import copy
3 
16 
17 def addCaloDiscriminator(process, tau, name, module):
18  module.CaloTauProducer = cms.InputTag(tau+"Producer")
19  process.__setattr__(tau+name, module)
20  return module
21 
22 def addCaloDiscriminatorSequence(process, tau):
23  lst = []
24 
25  lst.append(addCaloDiscriminator(process, tau, "DiscriminationForChargedHiggsByLeadingTrackPtCut",
26  caloRecoTauDiscriminationByLeadingTrackPtCut.clone(
27  MinPtLeadingObject = cms.double(20.0),
28  )))
29 
30  lst.append(addCaloDiscriminator(process, tau, "DiscriminationByCharge",
31  caloRecoTauDiscriminationByCharge.clone()))
32 
33  # index -1 points to the last element in the list
34  lst.append(addCaloDiscriminator(process, tau, "DiscriminationForChargedHiggsByECALIsolation",
35  caloRecoTauDiscriminationByECALIsolation.clone()))
36  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
37 
38  lst.append(addCaloDiscriminator(process, tau, "DiscriminationForChargedHiggsAgainstMuon",
39  caloRecoTauDiscriminationAgainstMuon.clone()))
40  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
41 
42  lst.append(addCaloDiscriminator(process, tau, "DiscriminationByTauPolarization",
43  caloRecoTauDiscriminationByTauPolarization.clone()))
44  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
45 
46  lst.append(addCaloDiscriminator(process, tau, "DiscriminationByDeltaE",
47  caloRecoTauDiscriminationByDeltaE.clone()))
48  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
49 
50  lst.append(addCaloDiscriminator(process, tau, "DiscriminationByInvMass",
51  caloRecoTauDiscriminationByInvMass.clone()))
52  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
53 
54  lst.append(addCaloDiscriminator(process, tau, "DiscriminationByFlightPathSignificance",
55  caloRecoTauDiscriminationByFlightPathSignificance.clone()))
56  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
57 
58  lst.append(addCaloDiscriminator(process, tau, "DiscriminationBy1Prong",
59  caloRecoTauDiscriminationByNProngs.clone(
60  nProngs = cms.uint32(1)
61  )))
62  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
63 
64  lst.append(addCaloDiscriminator(process, tau, "DiscriminationBy3Prongs",
65  caloRecoTauDiscriminationByNProngs.clone(
66  nProngs = cms.uint32(3)
67  )))
68  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
69 
70  lst.append(addCaloDiscriminator(process, tau, "DiscriminationForChargedHiggsBy3ProngCombined",
71  caloRecoTauDiscriminationByNProngs.clone(
72  nProngs = cms.uint32(3),
73  Prediscriminants = cms.PSet(
74  BooleanOperator = cms.string("and"),
75  leadTrack = cms.PSet(
76  Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding'),
77  cut = cms.double(0.5)
78  ),
79  deltaE = cms.PSet(
80  Producer = cms.InputTag(tau+'DiscriminationByDeltaE'),
81  cut = cms.double(0.5)
82  ),
83  invMass = cms.PSet(
84  Producer = cms.InputTag(tau+'DiscriminationByInvMass'),
85  cut = cms.double(0.5)
86  ),
87  flightPathSig = cms.PSet(
88  Producer = cms.InputTag(tau+'DiscriminationByFlightPathSignificance'),
89  cut = cms.double(0.5)
90  )
91  )
92  )))
93  lst[-1].Prediscriminants.leadTrack.Producer = cms.InputTag(tau+'DiscriminationByLeadingTrackFinding')
94 
95  lst.append(addCaloDiscriminator(process, tau, "DiscriminationForChargedHiggsBy1or3Prongs",
96  caloRecoTauDiscriminationByLeadingTrackFinding.clone(
97  Prediscriminants = cms.PSet(
98  BooleanOperator = cms.string("or"),
99  oneProng = cms.PSet(
100  Producer = cms.InputTag(tau+'DiscriminationBy1Prong'),
101  cut = cms.double(0.5)
102  ),
103  threeProng = cms.PSet(
104  Producer = cms.InputTag(tau+'DiscriminationForChargedHiggsBy3ProngCombined'),
105  cut = cms.double(0.5)
106  )
107  )
108  )))
109  lst.append(addCaloDiscriminator(process, tau, "DiscriminationForChargedHiggs",
110  caloRecoTauDiscriminationByTrackIsolation.clone(
111  Prediscriminants = cms.PSet(
112  BooleanOperator = cms.string("and"),
113  leadingTrack = cms.PSet(
114  Producer = cms.InputTag(tau+'DiscriminationForChargedHiggsByLeadingTrackPtCut'),
115  cut = cms.double(0.5)
116  ),
117  charge = cms.PSet(
118  Producer = cms.InputTag(tau+'DiscriminationByCharge'),
119  cut = cms.double(0.5)
120  ),
121  ecalIsolation = cms.PSet(
122  Producer = cms.InputTag(tau+'DiscriminationForChargedHiggsByECALIsolation'),
123  cut = cms.double(0.5)
124  ),
125  electronVeto = cms.PSet(
126  Producer = cms.InputTag(tau+'DiscriminationAgainstElectron'),
127  cut = cms.double(0.5)
128  ),
129  polarization = cms.PSet(
130  Producer = cms.InputTag(tau+'DiscriminationByTauPolarization'),
131  cut = cms.double(0.5)
132  ),
133  prongs = cms.PSet(
134  Producer = cms.InputTag(tau+'DiscriminationForChargedHiggsBy1or3Prongs'),
135  cut = cms.double(0.5)
136  )
137  )
138  )))
139 
140  sequence = cms.Sequence()
141  for m in lst:
142  sequence *= m
143 
144  process.__setattr__(tau+"HplusDiscriminationSequence", sequence)
145  return sequence
146 
148  process.CaloTauDiscriminationSequenceForChargedHiggs = cms.Sequence(
149  addCaloDiscriminatorSequence(process, "caloRecoTau")
150  )
151 
152  return process.CaloTauDiscriminationSequenceForChargedHiggs