Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Moore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
Moore
Commits
13ab0464
Commit
13ab0464
authored
3 years ago
by
Izaac Sanderswood
Browse files
Options
Downloads
Patches
Plain Diff
skeleton of bs2phigamma line
parent
2c74dd46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1240
Bs2PhiGamma and Bd2KstGamma HLT2 and Sprucing lines
Pipeline
#3421908
failed
3 years ago
Stage: check
Stage: build
Stage: docs
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/bs2phigamma_line.py
+165
-0
165 additions, 0 deletions
Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/bs2phigamma_line.py
with
165 additions
and
0 deletions
Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/bs2phigamma_line.py
0 → 100644
+
165
−
0
View file @
13ab0464
###############################################################################
# (c) Copyright 2021 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. #
###############################################################################
"""
Bs2PhiGamma Hlt2 Line
"""
from
Moore.config
import
register_line_builder
from
Moore.lines
import
Hlt2Line
from
RecoConf.reconstruction_objects
import
upfront_reconstruction
from
GaudiKernel.SystemOfUnits
import
GeV
,
MeV
,
mm
import
Functors
as
F
from
Functors.math
import
in_range
from
RecoConf.reconstruction_objects
import
(
make_pvs_v2
as
make_pvs
,
make_pvs
as
make_pvs_v1
)
from
PyConf
import
configurable
# from Hlt2Conf.standard_particles import (
# make_photons,
# make_long_kaons,
# make_phi2kk,
# make_has_rich_long_kaons
# )
from
Hlt2Conf.lines.rd.builders.rdbuilder_thor
import
(
make_rd_photons
as
make_photons
,
make_rd_detached_phis
,
)
from
Hlt2Conf.lines.rd.builders
import
b_tmva_builder
all_lines
=
{}
from
Hlt2Conf.algorithms_thor
import
ParticleCombiner
,
ParticleFilter
,
require_all
## The cuts are put here for clarity
## If adding new cuts, please add here, then refer to them in the parts below
photon_cuts
=
{
"
pt_min
"
:
2
*
GeV
,
"
p_min
"
:
5
*
GeV
,
}
track_cuts
=
{
"
chi2pdof_max
"
:
5
,
"
ipchi2_min
"
:
20
,
"
pt_min
"
:
500
*
MeV
,
}
phi_cuts
=
{
"
vchi2pdof_max
"
:
25
,
"
comb_m_min
"
:
1010
*
MeV
,
"
comb_m_max
"
:
1030
*
MeV
,
}
b_cuts
=
{
"
vchi2pdof_max
"
:
25
,
"
dira_max
"
:
0.063
,
"
pt_min
"
:
2000
*
MeV
,
"
comb_m_min
"
:
750
*
MeV
,
"
comb_m_max
"
:
2250
*
MeV
,
"
ipchi2_max
"
:
12
,
}
cuts
=
{
"
photon
"
:
photon_cuts
,
"
track
"
:
track_cuts
,
"
phi
"
:
phi_cuts
,
"
b
"
:
b_cuts
}
# make sure we passed GEC and have PV in event
def
prefilters
():
return
[
require_pvs
(
make_pvs
())]
# Define photon filter
# TO DO -- what are the filter requirements?
# @configurable
# def filter_photons(photons,pvs,pt_min=photon_cuts["pt_min"]):
# filter_code = require_all(
# F.PT > pt_min
# )
# return ParticleFilter(photons,F.FILTER(filter_code))
# # return photons
# # Define the kaon filter
# @configurable
# def filter_kaons(kaons,pvs,pt_min=track_cuts["pt_min"],chi2pdof_max=track_cuts["chi2pdof_max"],ipchi2_min=track_cuts["ipchi2_min"]):
# filter_code = require_all(
# F.PT > pt_min,
# F.CHI2DOF < chi2pdof_max,
# F.BPVIPCHI2(pvs) > ipchi2_min
# )
# return ParticleFilter(kaons,F.FILTER(filter_code))
# # define the maker for the phi
# @configurable
# def make_phis(kaons,pvs,comb_m_min=phi_cuts["comb_m_min"],comb_m_max=phi_cuts["comb_m_max"],vchi2pdof_max=phi_cuts["vchi2pdof_max"]):
# descriptor = "[phi(1020) -> K+ K-]cc"
# combination_code = in_range(comb_m_min,F.MASS,comb_m_max)
# vertex_code = require_all(
# F.CHI2DOF < vchi2pdof_max
# )
# return ParticleCombiner(
# name="Phi2KKCombiner4Bs2PhiGamma",
# Inputs=kaons,
# DecayDescriptor=descriptor,
# CombinationCut=combination_code,
# CompositeCut=vertex_code
# )
# Make the Bs
@configurable
def
make_bs2phigamma
(
phis
,
photons
,
pvs
,
comb_m_min
=
b_cuts
[
"
comb_m_min
"
],
comb_m_max
=
b_cuts
[
"
comb_m_max
"
],
pt_min
=
b_cuts
[
"
pt_min
"
],
vchi2pdof_max
=
b_cuts
[
"
vchi2pdof_max
"
],
ipchi2_max
=
b_cuts
[
"
ipchi2_max
"
]):
descriptor
=
"
[B_s0 -> phi(1020) gamma]cc
"
combination_code
=
require_all
(
in_range
(
comb_m_min
,
F
.
MASS
,
comb_m_max
),
F
.
SUM
(
F
.
PT
)
>
pt_min
,
)
vertex_code
=
require_all
(
F
.
CHI2DOF
<
vchi2pdof_max
,
F
.
BPVIPCHI2
(
pvs
)
<
ipchi2_max
)
# return particle combiner
return
ParticleCombiner
(
name
=
"
Bs2PhiGammaCombiner
"
,
Inputs
=
[
phis
,
photons
],
DecayDescriptor
=
descriptor
,
CombinationCut
=
combination_code
,
CompositeCut
=
vertex_code
)
@register_line_builder
(
all_lines
)
def
bs2phigamma_line
(
name
=
"
Hlt2Bs2PhiGammaLine
"
,
prescale
=
1
):
pvs
=
make_pvs
()
pvs_v1
=
make_pvs_v1
()
# to do: double check which type of kaon to use
# kaons = filter_kaons(kaons=make_long_kaons(),pvs=pvs)
# phis = make_phis([kaons,kaons],pvs) # is this ok or broken?
phis
=
make_rd_detached_phis
()
# photons = filter_photons(photons=make_photons(),pvs=pvs)
photons
=
make_photons
()
;
b_s0_presel
=
make_bs2phigamma
(
phis
=
phis
,
photons
=
photons
,
pvs
=
pvs
)
b_s0
=
b_tmva_builder
.
make_b
(
b_s0_presel
,
pvs_v1
,
"
HHgamma
"
,
0.18
)
return
Hlt2Line
(
name
=
name
,
algs
=
upfront_reconstruction
()
+
[
b_s0
],
prescale
=
prescale
,
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment