Fixed unused arguments for all RD trigger lines
There are many functions with unused arguments, which are easy-to-fix bugs. This MR aims to fix all of these in the trigger lines in the RD WG.
Long list of changes:
rd/b_to_xll_hlt2_mva.py
:
filter_tracks
and filter_dileptons
have unused line_name
argument, and tag_dielectron_pid
and filter_anti_pid_e
have name as an unused argument. I have asked the proponents to fix this in !4397 (closed)
rd/b_to_Xdilepton_detached.py
:
persistreco=False
arguments not used anywhere, I removed these
rd/btosmutau_exclusive_hlt2.py
:
persistreco=False
not propagated in one of the lines, I fixed this
rd/builders/b0_builder_kstarmumu.py
:
name not forwarded to ParticleCombiner
, I fixed this
rd/builders/b_to_hemu_builders.py
:
pvs
argument not used in make_hh
, I removed this and all places where this function is called
rd/builders/b_to_v0ll_builder.py
:
pvs
argument not used in make_ksttokspi
, I removed this and all places where this function is called
rd/builders/b_to_xgamma_exclusive_builders.py
:
name argument not propagated correctly in make_rd_soft_photons
, make_rd_loose_photons
and make_rd_tight_photons
, I fixed this
rd/builders/b_to_xll_builders.py
:
make_rd_KstToKpPi builder has an unused vchi2pdof argument, but this builder is not used anywhere. I've removed the whole builder
rd/builders/b_to_xtaul_3pi_builder.py
:
filter_rd_detached_rho0
has a PID cut that is unused, but this builder is not used anywhere. I've removed the whole builder
rd/builders/b_to_xtaul_3pi_builder.py
:
filter_rd_detached_k1
builders has an IP chi2 cut is not propagated correctly, I have fixed this (but the default value is the same so this should not change any physics)
rd/builders/b_to_xtaul_3pi_builder.py
:
name argument was note propagated correctly in filter_rd_lambdas
and filter_rd_ks0s
, I've fixed this
rd/builders/baryonic_radiative_builders.py
:
name argument was not propagated correctly in make_rd_loose_baryonic_photons
and make_rd_tight_baryonic_photons
, I fixed this
rd/builders/btosmutau_exclusive.py
:
pvs argument not used in make_kmu
, I've removed this argument and all places where this builder is used
rd/builders/prompt_multilepton_builders.py
:
I removed a bunch of pid_best
, p_best
, pt_best
, electronchannel
arguments that were not used, and also some Jpsi arguments that seem to have been duplicated. These lines haven't been touched since they were written 2 years ago, so I assume it's safe to remove these arguments. But I encourage anyone who is interested in these lines to have a look.
rd/builders/qqbar_to_ll_builders.py
:
make_upsilons_to_upsilons
has an unused argument minipchi2
, which by default is zero, but I
have added this cut anyway
rd/builders/rd_isolation.py
:
In select_combinations_for_vertex_isolation
, the arguments use_fiducial_cut
were not passed, I've fixed this after checking with the code author (but no change in physics because the default argument was the same)
rd/rare_tau_decay_lines.py
:
name argument was not propagated in make_rd_rare_tau_gamma_ee
and make_rd_rare_tau_gamma_ee_mva
, I've fixed this
rd/rare_tau_decay_lines.py
:
name and kwargs arguments in make_tau_mumue
, make_tau_muee
, make_tau_pmumu
and make_ds_phipi_mumu
are not used and not needed, I've removed these
rdbuilder_thor.py
:
make_filter_tracks
does not propagated the track chi2 and ghost probability arguments. Miroslav says these were commented out and applied globally during reconstruction. I checked and the cuts are at 4.0 and 0.7, respectively, for 2024 data taking. I will put these as None and treat them as optional.
rdbuilder_thor.py
:
make_rd_detached_down_pions
have a IP chi2 cut that is not applied, it's commented out. The default cut is at 4.0. This builder is used in make_rd_ks0_dds
, where the default argument is not changed. It is also used in make_rd_lambda_dds
, where this argument is overwritten to 6. I see loads of lines using this builder, and some also overwrite this argument, with no effect. After some discussion with @fibishop we decided to make separate generic downstream builders and detached builders that filter on top of these.
rdbuilder_thor.py
:
make_rd_detached_down_pions
, make_rd_detached_down_kaons
and make_rd_detached_down_protons
have p_min
and pt_min
arguments, but further down the pt_min
argument is passed twice. This is an obvious bug that has been fixed. It should affect all lines with KS, Lambda, and also one Omega line with a downstream kaon
rdbuilder_thor.py
:
make_rd_merged_pi0s
was not using the cl_min
variable, which is a PID variable for photons. I've put this as an optional cut.
rdbuilder_thor.py
:
In make_rd_hpi0
, there was a hpi0_max_vtxchi2
argument. A vertex cut doesn't really make sense because there is a neutral pi0 and the combiner uses ParticleAdder. Similarly, in make_rd_KstToKpPi
, there is an argument vchi2pdof_max
that doesn't make sense for ParticleAdder. I've removed these arguments.
rdbuilder_thor.py
:
make_rd_detached_phis
has an unused argument make_pvs
, I have removed it
rdbuilder_thor.py
:
make_rd_detached_etaprime
has both pi_p_min
and pi_pt_min
as arguments, but pi_pt_min
is passed twice later. I have fixed this bug
rdbuilder_thor.py
:
make_rd_detached_etaprime
had an argument adocachi2_cut
that seemed to disappear during a rebase... Should be fine, see !4524 (merged)
rdbuilder_thor.py
:
make_prompt_dielectron_with_brem
and make_rd_prompt_dielectrons
have trghostprob
arguments that are not used, I've removed them as they are applied globally during reconstruction
rdbuilder_thor.py
:
make_rd_tauons_hadronic_decay
has an unused argument pt_max
which seems crazy... It's never been used, so I've removed it
inclusive_detached_dilepton/dilepton_mva_builder.py
:
make_inclusive_dilepton_detached_mue
didn't propagate the name argument. I've fixed this now
inclusive_detached_dilepton/dilepton_mva_builder.py
:
make_rd_detached_dielectron_plus_neutral
, make_rd_detached_mue_plus_neutral
and make_rd_detached_dimuon_plus_neutral
have an argument same_sign_pions
that's not used and doesn't make sense, I've removed this and the places where this function is called