4 """ Skim list building functions for tau-pair analyses """
11 import modularAnalysis
as ma
12 from skim.standardlists.lightmesons
import (loadStdAllF_0, loadStdAllKstar0,
13 loadStdAllPhi, loadStdAllRho0)
14 from skimExpertFunctions
import BaseSkim, fancy_skim_header
15 from stdCharged
import stdE, stdK, stdMu, stdPi, stdPr
16 from stdPhotons
import stdPhotons
17 from variables
import variables
as vm
19 __liaison__ =
"Kenji Inami <kenji.inami@desy.de>"
25 **Channel**: :math:`\\tau \\to l \\gamma, lll, l \\pi^0, l V^0, lhh, llp, phh`
27 **Output particle lists**: ``e+:taulfv, mu+:taulfv, pi+:taulfv, K+:taulfv, p+:taulfv``,
28 ``gamma:taulfv, pi0:taulfv, K_S0:taulfv, eta:taulfv, eta':taulfv``,
31 **Criteria for 1 prong final states**: Number of good tracks < 5, :math:`1.0 < M < 2.0` GeV, :math:`-1.5 < \\Delta E < 0.5` GeV
33 **Criteria for >1 prong final states** : Number of good tracks < 7,
34 :math:`1.4 < M < 2.0` GeV, :math:`-1.0 < \\Delta E < 0.5` GeV
36 __authors__ = [
"Kenji Inami"]
37 __description__ =
"Skim for Tau LFV decays."
38 __contact__ = __liaison__
39 __category__ =
"physics, tau"
41 produce_on_tau_samples =
False
44 stdE(
"all", path=path)
45 stdK(
"all", path=path)
46 stdMu(
"all", path=path)
47 stdPi(
"all", path=path)
48 stdPr(
"all", path=path)
50 loadStdAllRho0(path=path)
51 loadStdAllKstar0(path=path)
52 loadStdAllPhi(path=path)
53 loadStdAllF_0(path=path)
57 trackCuts =
"-3.0 < dz < 3.0 and dr < 1.0"
58 ma.cutAndCopyList(
"e+:taulfv",
"e+:all", trackCuts, path=path)
59 ma.cutAndCopyList(
"mu+:taulfv",
"mu+:all", trackCuts, path=path)
60 ma.cutAndCopyList(
"pi+:taulfv",
"pi+:all", trackCuts, path=path)
61 ma.cutAndCopyList(
"K+:taulfv",
"K+:all", trackCuts, path=path)
62 ma.cutAndCopyList(
"p+:taulfv",
"p+:all", trackCuts, path=path)
64 ma.reconstructDecay(
"K_S0:taulfv -> pi+:all pi-:all",
"0.3 < M < 0.7", path=path)
66 gammaCuts =
"E > 0.20 and clusterNHits > 1.5 and -0.8660 < cosTheta < 0.9563"
67 ma.cutAndCopyList(
"gamma:taulfv",
"gamma:all", gammaCuts, path=path)
69 gammaLooseCuts =
"E > 0.1 and -0.8660 < cosTheta < 0.9563 and clusterNHits > 1.5"
70 ma.cutAndCopyLists(
"gamma:taulfvloose",
"gamma:all", gammaLooseCuts, path=path)
72 ma.reconstructDecay(
"pi0:taulfv -> gamma:taulfvloose gamma:taulfvloose",
"0.115 < M < 0.152", path=path)
74 ma.reconstructDecay(
"eta:taulfv1 -> gamma:taulfvloose gamma:taulfvloose",
"0.4 < M < 0.6", path=path)
75 ma.reconstructDecay(
"eta:taulfv2 -> pi0:taulfv pi-:all pi+:all",
"0.4 < M < 0.6", path=path)
76 ma.copyLists(
"eta:taulfv", [
"eta:taulfv1",
"eta:taulfv2"], path=path)
78 ma.reconstructDecay(
"eta':taulfv1 -> pi+:all pi-:all gamma:taulfvloose",
"0.8 < M < 1.1", path=path)
79 ma.reconstructDecay(
"eta':taulfv2 -> pi+:all pi-:all eta:taulfv",
"0.8 < M < 1.1", path=path)
80 ma.copyLists(
"eta':taulfv", [
"eta':taulfv1",
"eta':taulfv2"], path=path)
82 ma.reconstructDecay(
"omega:taulfv -> pi0:taulfv pi-:all pi+:all",
"0.73 < M < 0.83", path=path)
85 vm.addAlias(
"netChargeLFV",
"formula(countInList(pi+:taulfv, charge == 1) - countInList(pi+:taulfv, charge == -1))")
86 tauLFVCuts1 =
"nParticlesInList(pi+:taulfv) < 5 and 1.0 < M < 2.0 and -1.5 < deltaE < 0.5"
87 tauLFVCuts3 =
"nParticlesInList(pi+:taulfv) < 7 and 1.4 < M < 2.0 and -1.0 < deltaE < 0.5"
89 tau_lgamma_Channels = [
"e+:taulfv gamma:taulfv",
90 "mu+:taulfv gamma:taulfv"
93 tau_lll_Channels = [
"e+:taulfv e+:taulfv e-:taulfv",
94 "mu+:taulfv mu+:taulfv mu-:taulfv",
95 "mu+:taulfv e+:taulfv e-:taulfv",
96 "e+:taulfv mu+:taulfv mu-:taulfv",
97 "e+:taulfv e+:taulfv mu-:taulfv",
98 "mu+:taulfv mu+:taulfv e-:taulfv"
101 tau_lP01_Channels = [
"e+:taulfv pi0:taulfv",
102 "mu+:taulfv pi0:taulfv",
103 "e+:taulfv eta:taulfv1",
104 "mu+:taulfv eta:taulfv1"
106 tau_lP03_Channels = [
"e+:taulfv eta:taulfv2",
107 "mu+:taulfv eta:taulfv2",
108 "e+:taulfv eta':taulfv",
109 "mu+:taulfv eta':taulfv",
110 "e+:taulfv K_S0:taulfv",
111 "mu+:taulfv K_S0:taulfv"
114 tau_lS0_Channels = [
"e+:taulfv f_0:all",
118 tau_lV0_Channels = [
"e+:taulfv rho0:all",
119 "mu+:taulfv rho0:all",
121 "mu+:taulfv K*0:all",
122 "e+:taulfv anti-K*0:all",
123 "mu+:taulfv anti-K*0:all",
125 "mu+:taulfv phi:all",
126 "e+:taulfv omega:taulfv",
127 "mu+:taulfv omega:taulfv"
130 tau_lhh_Channels = [
"e+:taulfv pi-:taulfv pi+:taulfv",
131 "mu+:taulfv pi-:taulfv pi+:taulfv",
132 "e-:taulfv pi+:taulfv pi+:taulfv",
133 "mu-:taulfv pi+:taulfv pi+:taulfv",
134 "e+:taulfv K-:taulfv K+:taulfv",
135 "mu+:taulfv K-:taulfv K+:taulfv",
136 "e-:taulfv K+:taulfv K+:taulfv",
137 "mu-:taulfv K+:taulfv K+:taulfv",
138 "e+:taulfv K-:taulfv pi+:taulfv",
139 "mu+:taulfv K-:taulfv pi+:taulfv",
140 "e-:taulfv K+:taulfv pi+:taulfv",
141 "mu-:taulfv K+:taulfv pi+:taulfv",
142 "e+:taulfv K_S0:taulfv K_S0:taulfv",
143 "mu+:taulfv K_S0:taulfv K_S0:taulfv"
146 tau_bnv_Channels = [
"mu+:taulfv mu+:taulfv anti-p-:taulfv",
147 "mu-:taulfv mu+:taulfv p+:taulfv",
148 "anti-p-:taulfv pi+:taulfv pi+:taulfv",
149 "p+:taulfv pi-:taulfv pi+:taulfv",
150 "anti-p-:taulfv pi+:taulfv K+:taulfv",
151 "p+:taulfv pi-:taulfv K+:taulfv"
155 for chID, channel
in enumerate(tau_lgamma_Channels):
156 ma.reconstructDecay(
"tau+:LFV_lgamma" + str(chID) +
" -> " + channel, tauLFVCuts1, chID, path=path)
157 tau_lgamma_list.append(
"tau+:LFV_lgamma" + str(chID))
160 for chID, channel
in enumerate(tau_lll_Channels):
161 ma.reconstructDecay(
"tau+:LFV_lll" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
162 tau_lll_list.append(
"tau+:LFV_lll" + str(chID))
165 for chID, channel
in enumerate(tau_lP01_Channels):
166 ma.reconstructDecay(
"tau+:LFV_lP01" + str(chID) +
" -> " + channel, tauLFVCuts1, chID, path=path)
167 tau_lP0_list.append(
"tau+:LFV_lP01" + str(chID))
168 for chID, channel
in enumerate(tau_lP03_Channels):
169 ma.reconstructDecay(
"tau+:LFV_lP03" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
170 tau_lP0_list.append(
"tau+:LFV_lP03" + str(chID))
173 for chID, channel
in enumerate(tau_lS0_Channels):
174 ma.reconstructDecay(
"tau+:LFV_lS0" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
175 tau_lS0_list.append(
"tau+:LFV_lS0" + str(chID))
178 for chID, channel
in enumerate(tau_lV0_Channels):
179 ma.reconstructDecay(
"tau+:LFV_lV0" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
180 tau_lV0_list.append(
"tau+:LFV_lV0" + str(chID))
183 for chID, channel
in enumerate(tau_lhh_Channels):
184 ma.reconstructDecay(
"tau+:LFV_lhh" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
185 tau_lhh_list.append(
"tau+:LFV_lhh" + str(chID))
188 for chID, channel
in enumerate(tau_bnv_Channels):
189 ma.reconstructDecay(
"tau+:LFV_bnv" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
190 tau_bnv_list.append(
"tau+:LFV_bnv" + str(chID))
192 tau_lfv_lists = tau_lgamma_list + tau_lll_list + tau_lP0_list + tau_lS0_list + tau_lV0_list + tau_lhh_list + tau_bnv_list
196 ma.copyLists(
'tau+:LFV', self.
SkimLists, path=path)
199 ma.variablesToHistogram(
200 filename=
'TauLFV_Validation.root',
201 decayString=
'tau+:LFV',
202 variables=[(
'M', 100, 1.00, 2.00), (
'deltaE', 120, -1.6, 0.6)],
203 variables_2d=[(
'M', 50, 1.00, 2.00,
'deltaE', 60, -1.6, 0.6)],
211 **Channel**: :math:`e^+ e^- \\to \\tau^+ \\tau^-`
217 1. Number of good tracks = 2, net charge < 2
218 2. ``visibleEnergyOfEventCMS < 10 GeV and E_ECLtrk < 6 GeV`` and ``missingMomentumOfEvent_theta < 2.6180``
219 3. ``visibleEnergyOfEventCMS > 3 GeV or max P_t > 1 GeV``
220 4. max. opening angle < 178 deg.
224 1. Number of good tracks = 3 or 4, net charge < 2
225 2. ``visibleEnergyOfEventCMS < 10.5 GeV and E_ECLtrk < 6 GeV``
226 3. ``visibleEnergyOfEventCMS > 3 GeV or max P_t > 1 GeV``
227 4. max. opening angle < 178 deg.
228 5. Event divided by thrust axis; No. good tracks in tag side = 1 or 3
229 6. ``M_tag < 1.8 GeV`` and ``M_sig < 2.3 GeV``
233 1. Number of good tracks = 5 or 6, net charge < 2
234 2. Event divided by thrust axis; No. good tracks in tag side = 1 or 3
235 3. ``M_tag < 1.8 GeV`` and ``M_sig < 2.3 GeV``
237 __authors__ = [
"Kenji Inami"]
238 __description__ =
"Skim for Tau generic decays."
239 __contact__ = __liaison__
240 __category__ =
"physics, tau"
242 produce_on_tau_samples =
False
245 stdPi(
"all", path=path)
250 Set particle lists and variables for TauGeneric skim.
252 **Output particle lists**: ``pi+:tauskim, gamma:tauskim, pi+:S1/S2, gamma:S1/S2``
256 * ``nGoodTracks``: number of good tracks in an event
257 * ``netCharge``: total net charge of good tracks
258 * ``nTracksS1/nTracksS2:`` number of good tracks in each hemisphere ``S1/S2`` divided by thrust axis
259 * ``invMS1/invMS2``: invariant mass of particles in each hemisphere
260 * ``maxPt``: maximum Pt amoung good tracks
261 * ``E_ECLtrk``: total ECL energy of good tracks
265 trackCuts =
"-3.0 < dz < 3.0 and dr < 1.0"
267 gammaCuts =
"E > 0.15"
268 gammaCuts +=
" and -0.8660 < cosTheta < 0.9563"
269 ma.cutAndCopyList(
"pi+:tauskim",
"pi+:all", trackCuts, path=path)
270 ma.cutAndCopyList(
"gamma:tauskim",
"gamma:all", gammaCuts, path=path)
273 ma.buildEventShape([
"pi+:tauskim",
"gamma:tauskim"],
274 allMoments=
False, foxWolfram=
False, cleoCones=
False,
275 sphericity=
False, jets=
False, path=path)
276 ma.buildEventKinematics([
"pi+:tauskim",
"gamma:tauskim"], path=path)
279 ma.cutAndCopyList(
"pi+:S1",
"pi+:tauskim",
"cosToThrustOfEvent > 0", path=path)
280 ma.cutAndCopyList(
"pi+:S2",
"pi+:tauskim",
"cosToThrustOfEvent < 0", path=path)
281 ma.cutAndCopyList(
"gamma:S1",
"gamma:tauskim",
"cosToThrustOfEvent > 0", path=path)
282 ma.cutAndCopyList(
"gamma:S2",
"gamma:tauskim",
"cosToThrustOfEvent < 0", path=path)
284 vm.addAlias(
"nGoodTracks",
"nParticlesInList(pi+:tauskim)")
285 vm.addAlias(
"netCharge",
"formula(countInList(pi+:tauskim, charge == 1) - countInList(pi+:tauskim, charge == -1))")
286 vm.addAlias(
"nTracksS1",
"nParticlesInList(pi+:S1)")
287 vm.addAlias(
"nTracksS2",
"nParticlesInList(pi+:S2)")
288 vm.addAlias(
"invMS1",
"invMassInLists(pi+:S1, gamma:S1)")
289 vm.addAlias(
"invMS2",
"invMassInLists(pi+:S2, gamma:S2)")
291 vm.addAlias(
"maxPt",
"maxPtInList(pi+:tauskim)")
292 vm.addAlias(
"E_ECLtrk",
"formula(totalECLEnergyOfParticlesInList(pi+:tauskim))")
293 vm.addAlias(
"maxOp",
"useCMSFrame(maxOpeningAngleInList(pi+:tauskim))")
297 ma.reconstructDecay(
'tau+:g2 -> pi+:S1',
'nGoodTracks == 2 and -2 < netCharge <2', path=path)
298 ma.reconstructDecay(
'tau+:g34 -> pi+:S1',
'[nGoodTracks == 3 or nGoodTracks == 4] and -2 < netCharge <2', path=path)
299 ma.reconstructDecay(
'tau+:g56 -> pi+:S1',
'[nGoodTracks == 5 or nGoodTracks == 6] and -2 < netCharge <2', path=path)
303 ma.applyCuts(
'tau+:g2',
'visibleEnergyOfEventCMS < 10', path=path)
304 ma.applyCuts(
'tau+:g2',
'E_ECLtrk < 6', path=path)
305 ma.applyCuts(
'tau+:g2',
'missingMomentumOfEvent_theta < 2.6180', path=path)
306 ma.applyCuts(
'tau+:g2',
'visibleEnergyOfEventCMS > 3 or maxPt > 1', path=path)
307 ma.applyCuts(
'tau+:g2',
'maxOp < 3.106686', path=path)
309 ma.applyCuts(
'tau+:g34',
'visibleEnergyOfEventCMS < 10.5', path=path)
310 ma.applyCuts(
'tau+:g34',
'E_ECLtrk < 6', path=path)
311 ma.applyCuts(
'tau+:g34',
'visibleEnergyOfEventCMS > 3 or maxPt > 1', path=path)
312 ma.applyCuts(
'tau+:g34',
'maxOp < 3.106686', path=path)
313 ma.applyCuts(
'tau+:g34',
314 '[[ nTracksS1 == 1 or nTracksS1 == 3 ] and invMS1 < 1.8 and invMS2 < 2.3 ] or '
315 '[[ nTracksS2 == 1 or nTracksS2 == 3 ] and invMS2 < 1.8 and invMS1 < 2.3 ]', path=path)
317 ma.applyCuts(
'tau+:g56',
318 '[[ nTracksS1 == 1 or nTracksS1 == 3 ] and invMS1 < 1.8 and invMS2 < 2.3 ] or '
319 '[[ nTracksS2 == 1 or nTracksS2 == 3 ] and invMS2 < 1.8 and invMS1 < 2.3 ]', path=path)
322 eventParticle = [
'tau+:g2',
'tau+:g34',
'tau+:g56']
329 vm.addAlias(
'Theta_miss',
'formula(missingMomentumOfEvent_theta*180/3.14159)')
336 ma.variablesToHistogram(
337 filename=
'TauGeneric_Validation.root',
339 variables=[(
'nGoodTracks', 7, 1, 8),
340 (
'visibleEnergyOfEventCMS', 40, 0, 12),
341 (
'E_ECLtrk', 70, 0, 7),
343 (
'invMS1', 60, 0, 3),
344 (
'invMS2', 60, 0, 3),
345 (
'Theta_miss', 30, 0, 180)],
346 variables_2d=[(
'invMS1', 30, 0, 3,
'invMS2', 30, 0, 3)],
355 **Channel**: :math:`e^+ e^- \\to \\tau^+ \\tau^-`
359 * ``1 < No. good tracks < 7``
360 * ``net charge == 0``
361 * Event divided by thrust axis; select 1x1, 1x3, 1x5, 3x3 topology
363 * ``visibleEnergyOfEventCMS < 10.4 GeV``
364 * For 1x1 topology, ``thrust < 0.99``
366 __authors__ = [
"Ami Rostomyan",
"Kenji Inami"]
367 __description__ =
"Skim for Tau decays using thrust."
368 __contact__ = __liaison__
369 __category__ =
"physics, tau"
371 produce_on_tau_samples =
False
374 stdPi(
"all", path=path)
379 Set particle lists and variables for TauThrust skim.
381 **Constructed particle lists**: ``pi+:thrust, gamma:thrust, pi+:thrustS1/thrustS2, pi0:thrust``
385 * ``nGoodTracksThrust``: number of good tracks in an event
386 * ``netChargeThrust``: total net charge of good tracks
387 * ``nTracksS1Thrust/nTracksS2Thrust``: number of good tracks in each hemisphere S1/S2 divided by thrust axis
390 trackCuts =
'-3.0 < dz < 3.0 and dr < 1.0'
391 ma.cutAndCopyList(
'pi+:thrust',
'pi+:all', trackCuts, path=path)
392 gammaForPi0Cuts =
'E > 0.1 and -0.8660 < cosTheta < 0.9563 and clusterNHits > 1.5'
393 ma.cutAndCopyLists(
'gamma:thrustForPi0',
'gamma:all', gammaForPi0Cuts, path=path)
394 ma.reconstructDecay(
'pi0:thrust -> gamma:thrustForPi0 gamma:thrustForPi0',
'0.115 < M < 0.152', path=path)
395 gammaCuts =
'E > 0.20 and clusterNHits > 1.5 and -0.8660 < cosTheta < 0.9563'
396 gammaCuts +=
' and isDaughterOfList(pi0:thrust) == 0'
397 ma.cutAndCopyList(
'gamma:thrust',
'gamma:all', gammaCuts, path=path)
400 ma.buildEventShape([
'pi+:thrust',
'pi0:thrust',
'gamma:thrust'],
401 allMoments=
False, foxWolfram=
False, cleoCones=
False,
402 sphericity=
False, jets=
False, path=path)
403 ma.buildEventKinematics([
'pi+:thrust',
'pi0:thrust',
'gamma:thrust'], path=path)
406 ma.cutAndCopyList(
'pi+:thrustS1',
'pi+:thrust',
'cosToThrustOfEvent > 0', path=path)
407 ma.cutAndCopyList(
'pi+:thrustS2',
'pi+:thrust',
'cosToThrustOfEvent < 0', path=path)
409 vm.addAlias(
'nGoodTracksThrust',
'nParticlesInList(pi+:thrust)')
410 vm.addAlias(
'netChargeThrust',
'formula(countInList(pi+:thrust, charge == 1) - countInList(pi+:thrust, charge == -1))')
411 vm.addAlias(
'nTracksS1Thrust',
'nParticlesInList(pi+:thrustS1)')
412 vm.addAlias(
'nTracksS2Thrust',
'nParticlesInList(pi+:thrustS2)')
415 ma.reconstructDecay(
"tau+:thrust -> pi+:thrustS1",
"", path=path)
416 eventParticle = [
"tau+:thrust"]
419 ma.applyCuts(
"tau+:thrust",
"1 < nGoodTracksThrust < 7", path=path)
420 ma.applyCuts(
"tau+:thrust",
"netChargeThrust == 0", path=path)
422 topologyCuts =
"[nTracksS1Thrust == 1 and nTracksS2Thrust == 1]"
423 topologyCuts +=
" or [nTracksS1Thrust == 1 and nTracksS2Thrust == 3]"\
424 " or [nTracksS1Thrust == 3 and nTracksS2Thrust == 1]"
425 topologyCuts +=
" or [nTracksS1Thrust == 1 and nTracksS2Thrust == 5]"\
426 " or [nTracksS1Thrust == 5 and nTracksS2Thrust == 1]"
427 topologyCuts +=
" or [nTracksS1Thrust == 3 and nTracksS2Thrust == 3]"
429 ma.applyCuts(
"tau+:thrust", topologyCuts, path=path)
430 ma.applyCuts(
"tau+:thrust",
"0.8 < thrust", path=path)
431 ma.applyCuts(
"tau+:thrust",
"visibleEnergyOfEventCMS < 10.4", path=path)
433 ma.applyCuts(
"tau+:thrust",
"thrust < 0.99 or nGoodTracksThrust!=2", path=path)
443 ma.variablesToHistogram(
444 filename=
'TauThrust_Validation.root',
446 variables=[(
'nGoodTracksThrust', 7, 1, 8),
447 (
'visibleEnergyOfEventCMS', 40, 0, 12),
448 (
'thrust', 50, 0.75, 1)],