Skip to content
Snippets Groups Projects

B2taunu with btracking lines

Merged Maarten Van Veghel requested to merge mveghel-b2taunu-btracking into master
2 files
+ 209
0
Compare changes
  • Side-by-side
  • Inline
Files
2
###############################################################################
# (c) Copyright 2021-2022 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
from __future__ import absolute_import
from PyConf import configurable
import Functors as F
from Functors.math import in_range
from GaudiKernel.SystemOfUnits import GeV, MeV, mm
from Hlt2Conf.algorithms_thor import ParticleFilter, ParticleCombiner, require_all
from RecoConf.reconstruction_objects import make_pvs
from Hlt2Conf.standard_particles import (make_has_rich_long_pions,
make_has_rich_long_kaons)
"""
SL lines for the B->taunu decays (and control modes) with purpose of using charged
B tracking, hence large transverse flight distance requirements and VELO raw banks
"""
@configurable
def make_candidate_btracking(name="SLB_Pions_BTracking",
make_particles=make_has_rich_long_pions,
make_pvs=make_pvs,
p_min=10 * GeV,
pt_min=1 * GeV,
ip_min=0.1 * mm,
pid=None):
"""
base candidates for btracking
note: note extra track quality (based) cuts due to possible B hits in tracks
"""
pvs = make_pvs()
code = require_all(F.P > p_min, F.PT > pt_min, F.MINIP(pvs) > ip_min)
if pid is not None:
code = require_all(code, pid)
return ParticleFilter(make_particles(), F.FILTER(code), name=name)
@configurable
def make_x23prong_btracking(name="SLB_ThreeProng_BTracking",
particles=make_has_rich_long_pions,
descriptor="[tau+ -> pi- pi+ pi+]cc",
make_pvs=make_pvs,
comb_doca_max=0.15 * mm,
pt_min=2.0 * GeV,
mipchi2_min=4,
vchi2_max=16,
m_min=400. * MeV,
m_max=3500. * MeV,
fdt_min=4. * mm,
mcorr_min=None,
twobody_m_max=1670 * MeV):
"""
3-prong decay for B tracking purposes, with large transverse flight distance (fdt)
and no track quality (based) requirements
"""
pvs = make_pvs()
# two-body selection
twobody_code = require_all(F.MASS < twobody_m_max)
# three-body selection
combination_code = require_all(
in_range(m_min - 50 * MeV, F.MASS, m_max + 50 * MeV),
F.MAXDOCACUT(comb_doca_max),
F.SUBCOMB(Functor=F.MASS < twobody_m_max, Indices=(1, 3)))
if mipchi2_min is not None:
combination_code = require_all(
combination_code, 1 < F.SUM(F.MINIPCHI2(pvs) > mipchi2_min))
# vertex-based selection
vertex_code = require_all(F.PT > pt_min, in_range(m_min, F.MASS, m_max),
F.CHI2 < vchi2_max)
if mcorr_min is not None:
vertex_code = require_all(vertex_code, F.BPVCORRM(pvs) > mcorr_min)
if fdt_min is not None:
vertex_code = require_all(vertex_code, F > BPVVDRHO(pvs) > fdt_min)
return ParticleCombiner(
particles,
DecayDescriptor=descriptor,
Combination12Cut=twobody_code,
CombinationCut=combination_code,
CompositeCut=vertex_code)
def make_twopions(pions,
mother_id="rho(770)0",
m_max=3.5 * GeV,
comb_doca_max=0.15 * mm,
mipchi2_min=4,
vchi2_max=16):
"""
for pions from B+->D-pi+pi+ dalitz decays, these pions form the B vertex
"""
combination_code = require_all(F.MASS < (m_max + 50 * MeV),
F.MAXDOCACUT(comb_doca_max),
1 < F.SUM(F.MINIPCHI2(pvs) > mipchi2_min))
vertex_code = require_all(F.CHI2 < vchi2_max, F.MASS < m_max)
return ParticleCombiner([pions, pions],
DecayDescriptor=f"[{mother_id} -> pi+ pi+]cc",
CombinationCut=combination_code,
CompositeCut=vertex_code)
def make_b2taunu_tau2pipipi(process):
"""
for candidates of B(c)+ -> tau+ ( -> pi+ pi+ pi- nu_tau ) nu_tau
with B tracking
"""
assert process in ['hlt2', 'spruce'
], 'Line must be defined as Hlt2 or Sprucing line!'
pions = make_candidate_btracking()
return make_x23prong_btracking(
name="SLB_TauToThreePion_BTracking",
particles=[pions, pions, pions],
descriptor="[tau+ -> pi- pi+ pi+]cc")
def make_b2dpipi_d2kpipi(process,
make_pvs=make_pvs,
vchi2_max=16,
m_min=5.0 * GeV,
m_max=5.7 * GeV):
"""
for candidates for B+ -> D- ( -> K+ pi- pi- ) pi+ pi+ with B tracking (control channel)
"""
assert process in ['hlt2', 'spruce'
], 'Line must be defined as Hlt2 or Sprucing line!'
pvs = make_pvs()
pions = make_candidate_btracking(name="SLB_Pions_BTracking")
kaons = make_candidate_btracking(
name="SLB_Kaons_BTracking", particles=make_has_rich_long_kaons)
# input D-, same selection as tau23pi aside from mass window
dps = make_x23prong_btracking(
name="SLB_DToKaonTwoPion_BTracking",
particles=[kaons, pions, pions],
descriptor="[D- -> K+ pi- pi-]cc",
m_min=1830 * MeV,
m_max=1910 * MeV)
twopions_id = "rho(770)0"
twopions = make_twopions(pions, mother_id=twopions_id)
# combine to form full B
combination_code = require_all(
in_range(m_min - 50 * MeV, F.MASS, m_max + 50 * MeV))
vertex_code = require_all(
in_range(m_min, F.MASS, m_max), F.CHI2 < vchi2_max)
return ParticleCombiner([dps, twopions],
DecayDescriptor=f"[B+ -> D- {twopions_id}]cc",
CombinationCut=combination_code,
CompositeCut=vertex_code)
Loading