12 """ Skim list building functions for tau-pair analyses """
14 import modularAnalysis
as ma
15 from skim.standardlists.lightmesons
import (loadStdAllF_0, loadStdAllKstar0,
16 loadStdAllPhi, loadStdAllRho0)
17 from skim
import BaseSkim, fancy_skim_header
18 from stdCharged
import stdE, stdK, stdMu, stdPi, stdPr
19 from stdPhotons
import stdPhotons
20 from variables
import variables
as vm
22 __liaison__ =
"Kenji Inami <kenji.inami@desy.de>"
23 _VALIDATION_SAMPLE =
"mdst14.root"
29 **Channel**: :math:`\\tau \\to l \\gamma, lll, l \\pi^0, l V^0, lhh, llp, phh`
31 **Output particle lists**: ``e+:taulfv, mu+:taulfv, pi+:taulfv, K+:taulfv, p+:taulfv``,
32 ``gamma:taulfv, pi0:taulfv, K_S0:taulfv, eta:taulfv, eta':taulfv``,
35 **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
37 **Criteria for >1 prong final states**: Number of good tracks < 7, :math:`1.4 < M < 2.0` GeV, :math:`-1.0 < \\Delta E < 0.5` GeV
39 __authors__ = [
"Kenji Inami"]
40 __description__ =
"Skim for Tau LFV decays."
41 __contact__ = __liaison__
42 __category__ =
"physics, tau"
44 produce_on_tau_samples =
False
45 validation_sample = _VALIDATION_SAMPLE
48 stdE(
"all", path=path)
49 stdK(
"all", path=path)
50 stdMu(
"all", path=path)
51 stdPi(
"all", path=path)
52 stdPr(
"all", path=path)
53 stdPhotons(
"all", path=path, loadPhotonBeamBackgroundMVA=
False)
54 loadStdAllRho0(path=path)
55 loadStdAllKstar0(path=path)
56 loadStdAllPhi(path=path)
57 loadStdAllF_0(path=path)
61 trackCuts =
"-3.0 < dz < 3.0 and dr < 1.0"
62 ma.cutAndCopyList(
"e+:taulfv",
"e+:all", trackCuts, path=path)
63 ma.cutAndCopyList(
"mu+:taulfv",
"mu+:all", trackCuts, path=path)
64 ma.cutAndCopyList(
"pi+:taulfv",
"pi+:all", trackCuts, path=path)
65 ma.cutAndCopyList(
"K+:taulfv",
"K+:all", trackCuts, path=path)
66 ma.cutAndCopyList(
"p+:taulfv",
"p+:all", trackCuts, path=path)
68 ma.reconstructDecay(
"K_S0:taulfv -> pi+:all pi-:all",
"0.3 < M < 0.7", path=path)
70 gammaCuts =
"E > 0.20 and clusterNHits > 1.5 and -0.8660 < cosTheta < 0.9563"
71 ma.cutAndCopyList(
"gamma:taulfv",
"gamma:all", gammaCuts, path=path)
73 gammaLooseCuts =
"E > 0.1 and -0.8660 < cosTheta < 0.9563 and clusterNHits > 1.5"
74 ma.cutAndCopyLists(
"gamma:taulfvloose",
"gamma:all", gammaLooseCuts, path=path)
76 ma.reconstructDecay(
"pi0:taulfv -> gamma:taulfvloose gamma:taulfvloose",
"0.115 < M < 0.152", path=path)
78 ma.reconstructDecay(
"eta:taulfv1 -> gamma:taulfvloose gamma:taulfvloose",
"0.4 < M < 0.6", path=path)
79 ma.reconstructDecay(
"eta:taulfv2 -> pi0:taulfv pi-:all pi+:all",
"0.4 < M < 0.6", path=path)
80 ma.copyLists(
"eta:taulfv", [
"eta:taulfv1",
"eta:taulfv2"], path=path)
82 ma.reconstructDecay(
"eta':taulfv1 -> pi+:all pi-:all gamma:taulfvloose",
"0.8 < M < 1.1", path=path)
83 ma.reconstructDecay(
"eta':taulfv2 -> pi+:all pi-:all eta:taulfv",
"0.8 < M < 1.1", path=path)
84 ma.copyLists(
"eta':taulfv", [
"eta':taulfv1",
"eta':taulfv2"], path=path)
86 ma.reconstructDecay(
"omega:taulfv -> pi0:taulfv pi-:all pi+:all",
"0.73 < M < 0.83", path=path)
89 vm.addAlias(
"netChargeLFV",
"formula(countInList(pi+:taulfv, charge == 1) - countInList(pi+:taulfv, charge == -1))")
90 tauLFVCuts1 =
"nParticlesInList(pi+:taulfv) < 5 and 1.0 < M < 2.0 and -1.5 < deltaE < 0.5"
91 tauLFVCuts3 =
"nParticlesInList(pi+:taulfv) < 7 and 1.4 < M < 2.0 and -1.0 < deltaE < 0.5"
93 tau_lgamma_Channels = [
"e+:taulfv gamma:taulfv",
94 "mu+:taulfv gamma:taulfv"
97 tau_lll_Channels = [
"e+:taulfv e+:taulfv e-:taulfv",
98 "mu+:taulfv mu+:taulfv mu-:taulfv",
99 "mu+:taulfv e+:taulfv e-:taulfv",
100 "e+:taulfv mu+:taulfv mu-:taulfv",
101 "e+:taulfv e+:taulfv mu-:taulfv",
102 "mu+:taulfv mu+:taulfv e-:taulfv"
105 tau_lP01_Channels = [
"e+:taulfv pi0:taulfv",
106 "mu+:taulfv pi0:taulfv",
107 "e+:taulfv eta:taulfv1",
108 "mu+:taulfv eta:taulfv1"
110 tau_lP03_Channels = [
"e+:taulfv eta:taulfv2",
111 "mu+:taulfv eta:taulfv2",
112 "e+:taulfv eta':taulfv",
113 "mu+:taulfv eta':taulfv",
114 "e+:taulfv K_S0:taulfv",
115 "mu+:taulfv K_S0:taulfv"
118 tau_lS0_Channels = [
"e+:taulfv f_0:all",
122 tau_lV0_Channels = [
"e+:taulfv rho0:all",
123 "mu+:taulfv rho0:all",
125 "mu+:taulfv K*0:all",
126 "e+:taulfv anti-K*0:all",
127 "mu+:taulfv anti-K*0:all",
129 "mu+:taulfv phi:all",
130 "e+:taulfv omega:taulfv",
131 "mu+:taulfv omega:taulfv"
134 tau_lhh_Channels = [
"e+:taulfv pi-:taulfv pi+:taulfv",
135 "mu+:taulfv pi-:taulfv pi+:taulfv",
136 "e-:taulfv pi+:taulfv pi+:taulfv",
137 "mu-:taulfv pi+:taulfv pi+:taulfv",
138 "e+:taulfv K-:taulfv K+:taulfv",
139 "mu+:taulfv K-:taulfv K+:taulfv",
140 "e-:taulfv K+:taulfv K+:taulfv",
141 "mu-:taulfv K+:taulfv K+:taulfv",
142 "e+:taulfv K-:taulfv pi+:taulfv",
143 "mu+:taulfv K-:taulfv pi+:taulfv",
144 "e-:taulfv K+:taulfv pi+:taulfv",
145 "mu-:taulfv K+:taulfv pi+:taulfv",
146 "e+:taulfv K_S0:taulfv K_S0:taulfv",
147 "mu+:taulfv K_S0:taulfv K_S0:taulfv"
150 tau_bnv_Channels = [
"mu+:taulfv mu+:taulfv anti-p-:taulfv",
151 "mu-:taulfv mu+:taulfv p+:taulfv",
152 "anti-p-:taulfv pi+:taulfv pi+:taulfv",
153 "p+:taulfv pi-:taulfv pi+:taulfv",
154 "anti-p-:taulfv pi+:taulfv K+:taulfv",
155 "p+:taulfv pi-:taulfv K+:taulfv"
159 for chID, channel
in enumerate(tau_lgamma_Channels):
160 ma.reconstructDecay(
"tau+:LFV_lgamma" + str(chID) +
" -> " + channel, tauLFVCuts1, chID, path=path)
161 tau_lgamma_list.append(
"tau+:LFV_lgamma" + str(chID))
164 for chID, channel
in enumerate(tau_lll_Channels):
165 ma.reconstructDecay(
"tau+:LFV_lll" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
166 tau_lll_list.append(
"tau+:LFV_lll" + str(chID))
169 for chID, channel
in enumerate(tau_lP01_Channels):
170 ma.reconstructDecay(
"tau+:LFV_lP01" + str(chID) +
" -> " + channel, tauLFVCuts1, chID, path=path)
171 tau_lP0_list.append(
"tau+:LFV_lP01" + str(chID))
172 for chID, channel
in enumerate(tau_lP03_Channels):
173 ma.reconstructDecay(
"tau+:LFV_lP03" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
174 tau_lP0_list.append(
"tau+:LFV_lP03" + str(chID))
177 for chID, channel
in enumerate(tau_lS0_Channels):
178 ma.reconstructDecay(
"tau+:LFV_lS0" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
179 tau_lS0_list.append(
"tau+:LFV_lS0" + str(chID))
182 for chID, channel
in enumerate(tau_lV0_Channels):
183 ma.reconstructDecay(
"tau+:LFV_lV0" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
184 tau_lV0_list.append(
"tau+:LFV_lV0" + str(chID))
187 for chID, channel
in enumerate(tau_lhh_Channels):
188 ma.reconstructDecay(
"tau+:LFV_lhh" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
189 tau_lhh_list.append(
"tau+:LFV_lhh" + str(chID))
192 for chID, channel
in enumerate(tau_bnv_Channels):
193 ma.reconstructDecay(
"tau+:LFV_bnv" + str(chID) +
" -> " + channel, tauLFVCuts3, chID, path=path)
194 tau_bnv_list.append(
"tau+:LFV_bnv" + str(chID))
196 return tau_lgamma_list + tau_lll_list + tau_lP0_list + tau_lS0_list + tau_lV0_list + tau_lhh_list + tau_bnv_list
206 contact =
"kenji@hepl.phys.nagoya-u.ac.jp"
209 create_validation_histograms(
210 rootfile=f
'{self}_Validation.root',
211 particlelist=
'tau+:LFV',
213 (
'M', 100, 1.00, 2.00,
'', contact,
'',
''),
214 (
'deltaE', 120, -1.6, 0.6,
'', contact,
'',
'')],
215 variables_2d=[(
'M', 50, 1.00, 2.00,
'deltaE', 60, -1.6, 0.6,
'', contact,
'',
'')],
222 **Channel**: :math:`e^+ e^- \\to \\tau^+ \\tau^-`
228 1. Number of good tracks = 2, net charge < 2
229 2. ``visibleEnergyOfEventCMS < 10 GeV and E_ECLtrk < 6 GeV`` and ``missingMomentumOfEvent_theta < 2.6180``
230 3. ``visibleEnergyOfEventCMS > 3 GeV or max P_t > 1 GeV``
231 4. max. opening angle < 178 deg.
235 1. Number of good tracks = 3 or 4, net charge < 2
236 2. ``visibleEnergyOfEventCMS < 10.5 GeV and E_ECLtrk < 6 GeV``
237 3. ``visibleEnergyOfEventCMS > 3 GeV or max P_t > 1 GeV``
238 4. max. opening angle < 178 deg.
239 5. Event divided by thrust axis; No. good tracks in tag side = 1 or 3
240 6. ``M_tag < 1.8 GeV`` and ``M_sig < 2.3 GeV``
244 1. Number of good tracks = 5 or 6, net charge < 2
245 2. Event divided by thrust axis; No. good tracks in tag side = 1 or 3
246 3. ``M_tag < 1.8 GeV`` and ``M_sig < 2.3 GeV``
248 __authors__ = [
"Kenji Inami"]
249 __description__ =
"Skim for Tau generic decays."
250 __contact__ = __liaison__
251 __category__ =
"physics, tau"
253 produce_on_tau_samples =
False
254 validation_sample = _VALIDATION_SAMPLE
257 stdPi(
"all", path=path)
258 stdPhotons(
"all", path=path, loadPhotonBeamBackgroundMVA=
False)
262 Set particle lists and variables for TauGeneric skim.
264 **Output particle lists**: ``pi+:tauskim, gamma:tauskim, pi+:S1/S2, gamma:S1/S2``
268 * ``nGoodTracks``: number of good tracks in an event
269 * ``netCharge``: total net charge of good tracks
270 * ``nTracksS1/nTracksS2:`` number of good tracks in each hemisphere ``S1/S2`` divided by thrust axis
271 * ``invMS1/invMS2``: invariant mass of particles in each hemisphere
272 * ``maxPt``: maximum Pt amoung good tracks
273 * ``E_ECLtrk``: total ECL energy of good tracks
277 trackCuts =
"-3.0 < dz < 3.0 and dr < 1.0"
279 gammaCuts =
"E > 0.15"
280 gammaCuts +=
" and -0.8660 < cosTheta < 0.9563"
281 ma.cutAndCopyList(
"pi+:tauskim",
"pi+:all", trackCuts, path=path)
282 ma.cutAndCopyList(
"gamma:tauskim",
"gamma:all", gammaCuts, path=path)
285 ma.buildEventShape([
"pi+:tauskim",
"gamma:tauskim"],
286 allMoments=
False, foxWolfram=
False, cleoCones=
False,
287 sphericity=
False, jets=
False, path=path)
288 ma.buildEventKinematics([
"pi+:tauskim",
"gamma:tauskim"], path=path)
291 ma.cutAndCopyList(
"pi+:S1",
"pi+:tauskim",
"cosToThrustOfEvent > 0", path=path)
292 ma.cutAndCopyList(
"pi+:S2",
"pi+:tauskim",
"cosToThrustOfEvent < 0", path=path)
293 ma.cutAndCopyList(
"gamma:S1",
"gamma:tauskim",
"cosToThrustOfEvent > 0", path=path)
294 ma.cutAndCopyList(
"gamma:S2",
"gamma:tauskim",
"cosToThrustOfEvent < 0", path=path)
296 vm.addAlias(
"nGoodTracks",
"nParticlesInList(pi+:tauskim)")
297 vm.addAlias(
"netCharge",
"formula(countInList(pi+:tauskim, charge == 1) - countInList(pi+:tauskim, charge == -1))")
298 vm.addAlias(
"nTracksS1",
"nParticlesInList(pi+:S1)")
299 vm.addAlias(
"nTracksS2",
"nParticlesInList(pi+:S2)")
300 vm.addAlias(
"invMS1",
"invMassInLists(pi+:S1, gamma:S1)")
301 vm.addAlias(
"invMS2",
"invMassInLists(pi+:S2, gamma:S2)")
303 vm.addAlias(
"maxPt",
"maxPtInList(pi+:tauskim)")
304 vm.addAlias(
"E_ECLtrk",
"formula(totalECLEnergyOfParticlesInList(pi+:tauskim))")
305 vm.addAlias(
"maxOp",
"useCMSFrame(maxOpeningAngleInList(pi+:tauskim))")
309 ma.reconstructDecay(
'tau+:g2 -> pi+:S1',
'nGoodTracks == 2 and -2 < netCharge <2', path=path)
310 ma.reconstructDecay(
'tau+:g34 -> pi+:S1',
'[nGoodTracks == 3 or nGoodTracks == 4] and -2 < netCharge <2', path=path)
311 ma.reconstructDecay(
'tau+:g56 -> pi+:S1',
'[nGoodTracks == 5 or nGoodTracks == 6] and -2 < netCharge <2', path=path)
315 ma.applyCuts(
'tau+:g2',
'visibleEnergyOfEventCMS < 10', path=path)
316 ma.applyCuts(
'tau+:g2',
'E_ECLtrk < 6', path=path)
317 ma.applyCuts(
'tau+:g2',
'missingMomentumOfEvent_theta < 2.6180', path=path)
318 ma.applyCuts(
'tau+:g2',
'visibleEnergyOfEventCMS > 3 or maxPt > 1', path=path)
319 ma.applyCuts(
'tau+:g2',
'maxOp < 3.106686', path=path)
321 ma.applyCuts(
'tau+:g34',
'visibleEnergyOfEventCMS < 10.5', path=path)
322 ma.applyCuts(
'tau+:g34',
'E_ECLtrk < 6', path=path)
323 ma.applyCuts(
'tau+:g34',
'visibleEnergyOfEventCMS > 3 or maxPt > 1', path=path)
324 ma.applyCuts(
'tau+:g34',
'maxOp < 3.106686', path=path)
325 ma.applyCuts(
'tau+:g34',
326 '[[ nTracksS1 == 1 or nTracksS1 == 3 ] and invMS1 < 1.8 and invMS2 < 2.3 ] or '
327 '[[ nTracksS2 == 1 or nTracksS2 == 3 ] and invMS2 < 1.8 and invMS1 < 2.3 ]', path=path)
329 ma.applyCuts(
'tau+:g56',
330 '[[ nTracksS1 == 1 or nTracksS1 == 3 ] and invMS1 < 1.8 and invMS2 < 2.3 ] or '
331 '[[ nTracksS2 == 1 or nTracksS2 == 3 ] and invMS2 < 1.8 and invMS1 < 2.3 ]', path=path)
334 return [
'tau+:g2',
'tau+:g34',
'tau+:g56']
341 vm.addAlias(
'Theta_miss',
'formula(missingMomentumOfEvent_theta*180/3.14159)')
344 contact =
"kenji@hepl.phys.nagoya-u.ac.jp"
346 create_validation_histograms(
347 rootfile=f
'{self}_Validation.root',
350 (
'nGoodTracks', 7, 1, 8,
'', contact,
'',
''),
351 (
'visibleEnergyOfEventCMS', 40, 0, 12,
'', contact,
'',
''),
352 (
'E_ECLtrk', 70, 0, 7,
'', contact,
'',
''),
353 (
'maxPt', 30, 0, 6,
'', contact,
'',
''),
354 (
'invMS1', 60, 0, 3,
'', contact,
'',
'',
'',
''),
355 (
'invMS2', 60, 0, 3,
'', contact,
'',
''),
356 (
'Theta_miss', 30, 0, 180,
'', contact,
'',
'')],
357 variables_2d=[(
'invMS1', 30, 0, 3,
'invMS2', 30, 0, 3,
'', contact,
'',
'')],
364 **Channel**: :math:`e^+ e^- \\to \\tau^+ \\tau^-`
368 * ``1 < No. good tracks < 7``
369 * ``net charge == 0``
370 * Event divided by thrust axis; select 1x1, 1x3, 1x5, 3x3 topology
372 * ``visibleEnergyOfEventCMS < 10.4 GeV``
373 * For 1x1 topology, ``thrust < 0.99``
375 __authors__ = [
"Ami Rostomyan",
"Kenji Inami"]
376 __description__ =
"Skim for Tau decays using thrust."
377 __contact__ = __liaison__
378 __category__ =
"physics, tau"
380 produce_on_tau_samples =
False
381 validation_sample = _VALIDATION_SAMPLE
384 stdPi(
"all", path=path)
385 stdPhotons(
"all", path=path, loadPhotonBeamBackgroundMVA=
False)
389 Set particle lists and variables for TauThrust skim.
391 **Constructed particle lists**: ``pi+:thrust, gamma:thrust, pi+:thrustS1/thrustS2, pi0:thrust``
395 * ``nGoodTracksThrust``: number of good tracks in an event
396 * ``netChargeThrust``: total net charge of good tracks
397 * ``nTracksS1Thrust/nTracksS2Thrust``: number of good tracks in each hemisphere S1/S2 divided by thrust axis
400 trackCuts =
'-3.0 < dz < 3.0 and dr < 1.0'
401 ma.cutAndCopyList(
'pi+:thrust',
'pi+:all', trackCuts, path=path)
402 gammaForPi0Cuts =
'E > 0.1 and -0.8660 < cosTheta < 0.9563 and clusterNHits > 1.5'
403 ma.cutAndCopyLists(
'gamma:thrustForPi0',
'gamma:all', gammaForPi0Cuts, path=path)
404 ma.reconstructDecay(
'pi0:thrust -> gamma:thrustForPi0 gamma:thrustForPi0',
'0.115 < M < 0.152', path=path)
405 gammaCuts =
'E > 0.20 and clusterNHits > 1.5 and -0.8660 < cosTheta < 0.9563'
406 gammaCuts +=
' and isDaughterOfList(pi0:thrust) == 0'
407 ma.cutAndCopyList(
'gamma:thrust',
'gamma:all', gammaCuts, path=path)
410 ma.buildEventShape([
'pi+:thrust',
'pi0:thrust',
'gamma:thrust'],
411 allMoments=
False, foxWolfram=
False, cleoCones=
False,
412 sphericity=
False, jets=
False, path=path)
413 ma.buildEventKinematics([
'pi+:thrust',
'pi0:thrust',
'gamma:thrust'], path=path)
416 ma.cutAndCopyList(
'pi+:thrustS1',
'pi+:thrust',
'cosToThrustOfEvent > 0', path=path)
417 ma.cutAndCopyList(
'pi+:thrustS2',
'pi+:thrust',
'cosToThrustOfEvent < 0', path=path)
419 vm.addAlias(
'nGoodTracksThrust',
'nParticlesInList(pi+:thrust)')
420 vm.addAlias(
'netChargeThrust',
'formula(countInList(pi+:thrust, charge == 1) - countInList(pi+:thrust, charge == -1))')
421 vm.addAlias(
'nTracksS1Thrust',
'nParticlesInList(pi+:thrustS1)')
422 vm.addAlias(
'nTracksS2Thrust',
'nParticlesInList(pi+:thrustS2)')
425 ma.reconstructDecay(
"tau+:thrust -> pi+:thrustS1",
"", path=path)
426 eventParticle = [
"tau+:thrust"]
429 ma.applyCuts(
"tau+:thrust",
"1 < nGoodTracksThrust < 7", path=path)
430 ma.applyCuts(
"tau+:thrust",
"netChargeThrust == 0", path=path)
432 topologyCuts =
"[nTracksS1Thrust == 1 and nTracksS2Thrust == 1]"
433 topologyCuts +=
" or [nTracksS1Thrust == 1 and nTracksS2Thrust == 3]"\
434 " or [nTracksS1Thrust == 3 and nTracksS2Thrust == 1]"
435 topologyCuts +=
" or [nTracksS1Thrust == 1 and nTracksS2Thrust == 5]"\
436 " or [nTracksS1Thrust == 5 and nTracksS2Thrust == 1]"
437 topologyCuts +=
" or [nTracksS1Thrust == 3 and nTracksS2Thrust == 3]"
439 ma.applyCuts(
"tau+:thrust", topologyCuts, path=path)
440 ma.applyCuts(
"tau+:thrust",
"0.8 < thrust", path=path)
441 ma.applyCuts(
"tau+:thrust",
"visibleEnergyOfEventCMS < 10.4", path=path)
443 ma.applyCuts(
"tau+:thrust",
"thrust < 0.99 or nGoodTracksThrust!=2", path=path)
452 contact =
"kenji@hepl.phys.nagoya-u.ac.jp"
454 create_validation_histograms(
455 rootfile=f
'{self}_Validation.root',
458 (
'nGoodTracksThrust', 7, 1, 8,
'', contact,
'',
''),
459 (
'visibleEnergyOfEventCMS', 40, 0, 12,
'', contact,
'',
''),
460 (
'thrust', 50, 0.75, 1,
'', contact,
'',
'')],
def additional_setup(self, path)
def build_lists(self, path)
def validation_histograms(self, path)
def load_standard_lists(self, path)
def build_lists(self, path)
def validation_histograms(self, path)
def load_standard_lists(self, path)
def additional_setup(self, path)
def build_lists(self, path)
def validation_histograms(self, path)
def load_standard_lists(self, path)