Skip to content
Snippets Groups Projects

Draft : Upsilon -> ll

Closed Raja Nandakumar requested to merge nraja_rd_upsilon2ll into master
10 unresolved threads
3 files
+ 141
131
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -26,36 +26,40 @@ from GaudiKernel.SystemOfUnits import MeV, GeV
from RecoConf.reconstruction_objects import make_pvs_v2 as make_pvs
from Hlt2Conf.algorithms_thor import require_all, ParticleFilter, ParticleCombiner
from Hlt2Conf.algorithms_thor import require_all, ParticleFilter
from PyConf import configurable
from Hlt2Conf.algorithms import ParticleCombinerWithPVs
from Hlt2Conf.lines.rd.builders.rdbuilder_thor import make_rd_tauons_hadronic_decay
from Hlt2Conf.standard_particles import (
make_detached_mue_with_brem, make_detached_dielectron_with_brem,
make_detached_mumu, make_long_electrons_with_brem, make_ismuon_long_muon)
make_detached_mue_with_brem,
make_detached_dielectron_with_brem,
make_detached_mumu,
make_long_electrons_with_brem,
make_ismuon_long_muon,
)
# filter based on the rd_detached_mue / make_detached_mue_with_brem with zero cuts on IP and added combination cuts
@configurable
def make_prompt_mue(
name="prompt_mue_builder",
min_dilepton_mass=0.0 * MeV,
max_dilepton_mass=6000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_mue=50,
parent_id="J/psi(1S)",
min_probnn_mu=0.0,
min_PIDmu=0.0,
IsMuon=True,
min_PIDe=2.0,
min_pt_e=0.5 * GeV,
min_pt_mu=0.5 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_vchi2ndof=10.0,
max_trghostprob=0.2,
same_sign=False,
name="prompt_mue_builder",
min_dilepton_mass=0.0 * MeV,
max_dilepton_mass=6000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_mue=50,
parent_id="J/psi(1S)",
min_probnn_mu=0.0,
min_PIDmu=0.0,
IsMuon=True,
min_PIDe=2.0,
min_pt_e=0.5 * GeV,
min_pt_mu=0.5 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_vchi2ndof=10.0,
max_trghostprob=0.2,
same_sign=False,
):
"""
Make the detached muon-electron pair, opposite-sign or same-sign.
@@ -85,19 +89,19 @@ def make_prompt_mue(
@configurable
def make_prompt_etau(
name="prompt_mue_builder",
min_dilepton_mass=7000.0 * MeV,
max_dilepton_mass=13000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_etau=50,
parent_id="Upsilon(1S)",
min_PIDe=2.0,
max_adocachi2=30.,
min_pt_e=0.5 * GeV,
min_pt_tau=0.3 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_vchi2ndof=10.0,
name="prompt_mue_builder",
min_dilepton_mass=7000.0 * MeV,
max_dilepton_mass=13000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_etau=50,
parent_id="Upsilon(1S)",
min_PIDe=2.0,
max_adocachi2=30.0,
min_pt_e=0.5 * GeV,
min_pt_tau=0.3 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_vchi2ndof=10.0,
):
"""
Make the detached electron-tau pair, opposite-sign for now.
@@ -105,27 +109,27 @@ def make_prompt_etau(
pvs = make_pvs()
descriptor = "[{} -> e+ tau-]cc".format(parent_id)
taus = make_rd_tauons_hadronic_decay(
best_pi_ipchi2_min=minipchi2) # Make them prompt(?)
best_pi_ipchi2_min=minipchi2
) # Make them prompt(?)
electrons = make_long_electrons_with_brem()
daughters_code = {
'tau+':
f'(PT > {min_pt_tau}) & (MIPCHI2DV(PRIMARY) > {minipchi2})', # Do we need to add a minipchi2 to the taus also for promptness?
'tau-':
f'(PT > {min_pt_tau}) & (MIPCHI2DV(PRIMARY) > {minipchi2})',
'e+':
f'(PIDe > {min_PIDe}) & (PT > {min_pt_e}) & (MIPCHI2DV(PRIMARY) > {minipchi2})',
'e-':
f'(PIDe > {min_PIDe}) & (PT > {min_pt_e}) & (MIPCHI2DV(PRIMARY) > {minipchi2})'
"tau+": f"(PT > {min_pt_tau}) & (MIPCHI2DV(PRIMARY) > {minipchi2})", # Do we need to add a minipchi2 to the taus also for promptness?
"tau-": f"(PT > {min_pt_tau}) & (MIPCHI2DV(PRIMARY) > {minipchi2})",
"e+": f"(PIDe > {min_PIDe}) & (PT > {min_pt_e}) & (MIPCHI2DV(PRIMARY) > {minipchi2})",
"e-": f"(PIDe > {min_PIDe}) & (PT > {min_pt_e}) & (MIPCHI2DV(PRIMARY) > {minipchi2})",
}
combination_code = f"ADOCACHI2CUT({max_adocachi2}, '')"
vertex_code = f"(VFASPF(VCHI2/VDOF) < {max_vchi2ndof}) & (BPVVDCHI2() > {min_bpvvdchi2})"
vertex_code = (
f"(VFASPF(VCHI2/VDOF) < {max_vchi2ndof}) & (BPVVDCHI2() > {min_bpvvdchi2})"
)
etau = ParticleCombinerWithPVs(
particles=[electrons, taus],
pvs=pvs,
DaughtersCuts=daughters_code,
DecayDescriptor=descriptor,
CombinationCut=combination_code,
MotherCut=vertex_code)
MotherCut=vertex_code,
)
code = require_all(
in_range(min_dilepton_mass, F.MASS, max_dilepton_mass),
F.PT > min_dilepton_pt,
@@ -136,21 +140,21 @@ def make_prompt_etau(
@configurable
def make_prompt_mutau(
name="prompt_mue_builder",
min_dilepton_mass=7000.0 * MeV,
max_dilepton_mass=13000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_mutau=50,
parent_id="Upsilon(1S)",
min_probnn_mu=0.2,
min_PIDmu=0.,
IsMuon=False,
min_pt_mu=0. * GeV,
max_adocachi2=30.,
min_pt_tau=0.3 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_vchi2ndof=10.0,
name="prompt_mue_builder",
min_dilepton_mass=7000.0 * MeV,
max_dilepton_mass=13000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_mutau=50,
parent_id="Upsilon(1S)",
min_probnn_mu=0.2,
min_PIDmu=0.0,
IsMuon=False,
min_pt_mu=0.0 * GeV,
max_adocachi2=30.0,
min_pt_tau=0.3 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_vchi2ndof=10.0,
):
"""
Make the detached electron-tau pair, opposite-sign for now.
@@ -158,30 +162,30 @@ def make_prompt_mutau(
pvs = make_pvs()
descriptor = "[{} -> mu+ tau-]cc".format(parent_id)
taus = make_rd_tauons_hadronic_decay(
best_pi_ipchi2_min=minipchi2) # Make them prompt(?)
best_pi_ipchi2_min=minipchi2
) # Make them prompt(?)
muons = make_ismuon_long_muon()
daughters_code = {
'tau+':
f'(PT > {min_pt_tau}) & (MIPCHI2DV(PRIMARY) > {minipchi2})', # Do we need to add a minipchi2 to the taus also for promptness?
'tau-':
f'(PT > {min_pt_tau}) & (MIPCHI2DV(PRIMARY) > {minipchi2})',
'mu+':
f'(PROBNNmu > {min_probnn_mu}) & (PIDmu > {min_PIDmu}) & (PT > {min_pt_mu}) & (MIPCHI2DV(PRIMARY) > {minipchi2})',
'mu-':
f'(PROBNNmu > {min_probnn_mu}) & (PIDmu > {min_PIDmu}) & (PT > {min_pt_mu}) & (MIPCHI2DV(PRIMARY) > {minipchi2})',
"tau+": f"(PT > {min_pt_tau}) & (MIPCHI2DV(PRIMARY) > {minipchi2})", # Do we need to add a minipchi2 to the taus also for promptness?
"tau-": f"(PT > {min_pt_tau}) & (MIPCHI2DV(PRIMARY) > {minipchi2})",
"mu+": f"(PROBNNmu > {min_probnn_mu}) & (PIDmu > {min_PIDmu}) & (PT > {min_pt_mu}) & (MIPCHI2DV(PRIMARY) > {minipchi2})",
"mu-": f"(PROBNNmu > {min_probnn_mu}) & (PIDmu > {min_PIDmu}) & (PT > {min_pt_mu}) & (MIPCHI2DV(PRIMARY) > {minipchi2})",
}
if IsMuon:
daughters_code["mu+"] = daughters_code["mu+"] + " & ISMUON"
daughters_code["mu-"] = daughters_code["mu-"] + " & ISMUON"
combination_code = f"ADOCACHI2CUT({max_adocachi2}, '')"
vertex_code = f"(VFASPF(VCHI2/VDOF) < {max_vchi2ndof}) & (BPVVDCHI2() > {min_bpvvdchi2})"
vertex_code = (
f"(VFASPF(VCHI2/VDOF) < {max_vchi2ndof}) & (BPVVDCHI2() > {min_bpvvdchi2})"
)
mutau = ParticleCombinerWithPVs(
particles=[muons, taus],
pvs=pvs,
DaughtersCuts=daughters_code,
DecayDescriptor=descriptor,
CombinationCut=combination_code,
MotherCut=vertex_code)
MotherCut=vertex_code,
)
code = require_all(
in_range(min_dilepton_mass, F.MASS, max_dilepton_mass),
F.PT > min_dilepton_pt,
@@ -192,31 +196,33 @@ def make_prompt_mutau(
@configurable
def make_prompt_tautau(
name="prompt_tautau_builder",
min_dilepton_mass=7000.0 * MeV,
max_dilepton_mass=13000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_tautau=50,
max_adocachi2=30.,
parent_id="Upsilon(1S)",
min_pt_tau=0.3 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_vchi2ndof=10.0,
name="prompt_tautau_builder",
min_dilepton_mass=7000.0 * MeV,
max_dilepton_mass=13000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_tautau=50,
max_adocachi2=30.0,
parent_id="Upsilon(1S)",
min_pt_tau=0.3 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_vchi2ndof=10.0,
):
"""
Make the detached muon-electron pair, opposite-sign or same-sign.
"""
pvs = make_pvs()
taus = make_rd_tauons_hadronic_decay(
best_pi_ipchi2_min=minipchi2) # Make them prompt(?)
best_pi_ipchi2_min=minipchi2
) # Make them prompt(?)
descriptor = "{} -> tau+ tau-".format(parent_id)
combination_code = f"ADOCACHI2CUT({max_adocachi2}, '')"
vertex_code = f"(VFASPF(VCHI2/VDOF) < {max_vchi2ndof}) & (BPVVDCHI2() > {min_bpvvdchi2})"
vertex_code = (
f"(VFASPF(VCHI2/VDOF) < {max_vchi2ndof}) & (BPVVDCHI2() > {min_bpvvdchi2})"
)
daughters_code = {
'tau+':
f'(PT > {min_pt_tau})', # Do we need to add a minipchi2 to the taus also for promptness?
'tau-': f'(PT > {min_pt_tau})'
"tau+": f"(PT > {min_pt_tau})", # Do we need to add a minipchi2 to the taus also for promptness?
"tau-": f"(PT > {min_pt_tau})",
}
tautau = ParticleCombinerWithPVs(
particles=[taus, taus],
@@ -224,7 +230,8 @@ def make_prompt_tautau(
DaughtersCuts=daughters_code,
DecayDescriptor=descriptor,
CombinationCut=combination_code,
MotherCut=vertex_code)
MotherCut=vertex_code,
)
code = require_all(
in_range(min_dilepton_mass, F.MASS, max_dilepton_mass),
@@ -237,18 +244,18 @@ def make_prompt_tautau(
# filter based on the rd_detached_mue / make_detached_mue_with_brem with zero cuts on IP and added combination cuts
@configurable
def make_prompt_mumu(
name="prompt_mumu_builder",
min_dilepton_mass=0.0 * MeV,
max_dilepton_mass=6000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_mumu=50,
parent_id="J/psi(1S)",
min_probnn_mu=0.0,
IsMuon=True,
min_pt_mu=0.5 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_trghostprob=0.2,
name="prompt_mumu_builder",
min_dilepton_mass=0.0 * MeV,
max_dilepton_mass=6000.0 * MeV,
min_dilepton_pt=1.0 * GeV,
max_ipchi2_mumu=50,
parent_id="J/psi(1S)",
min_probnn_mu=0.0,
IsMuon=True,
min_pt_mu=0.5 * GeV,
minipchi2=0, # must be 0 for a prompt builder
min_bpvvdchi2=0.0, # must be 0 for a prompt builder
max_trghostprob=0.2,
):
"""
Make the detached muon-electron pair, opposite-sign or same-sign.
@@ -273,19 +280,19 @@ def make_prompt_mumu(
@configurable
def make_prompt_ee(
name="prompt_ee_builder",
opposite_sign=True,
PIDe_min=2.0,
pt_e=0.5 * GeV,
minipchi2=0, # must be 0 for a prompt builder
max_ipchi2_ee=50,
trghostprob=0.2,
parent_id="J/psi(1S)",
min_dilepton_pt=0 * GeV,
min_dilepton_mass=0 * MeV,
max_dilepton_mass=6000 * MeV,
adocachi2cut=30,
max_vchi2ndof=7.5,
name="prompt_ee_builder",
opposite_sign=True,
PIDe_min=2.0,
pt_e=0.5 * GeV,
minipchi2=0, # must be 0 for a prompt builder
max_ipchi2_ee=50,
trghostprob=0.2,
parent_id="J/psi(1S)",
min_dilepton_pt=0 * GeV,
min_dilepton_mass=0 * MeV,
max_dilepton_mass=6000 * MeV,
adocachi2cut=30,
max_vchi2ndof=7.5,
):
"""
Make the detached muon-electron pair, opposite-sign or same-sign.
Loading