Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alex Pearce
Moore
Commits
4c1acfe3
Commit
4c1acfe3
authored
Aug 08, 2019
by
Louis Henry
Committed by
Alex Pearce
Aug 08, 2019
Browse files
Define particle makers that filter on track type.
Closes #57.
parent
18ae04fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Hlt/Hlt2Conf/python/Hlt2Conf/lines/D02HH.py
View file @
4c1acfe3
...
...
@@ -28,7 +28,7 @@ from RecoConf.reco_objects_from_file import make_pvs as get_pvs_from_file
from
..algorithms
import
require_all
,
ParticleCombinerWithPVs
,
ParticleFilterWithPVs
from
..framework
import
configurable
from
..standard_particles
import
make_has_rich_pions
,
make_has_rich_kaons
from
..standard_particles
import
make_has_rich_
long_
pions
,
make_has_rich_
long_
kaons
from
.
import
hlt2_line_builder
# Charged pion mass in MeV
...
...
@@ -38,7 +38,7 @@ _PION_M = 139.57061 # +/- 0.00024
# TODO(AP): implement shared decorator
# @shared
@
configurable
def
make_selected_particles
(
make_particles
=
make_has_rich_pions
,
def
make_selected_particles
(
make_particles
=
make_has_rich_
long_
pions
,
make_pvs
=
get_pvs_from_file
,
trchi2_max
=
3
,
mipchi2_min
=
8
,
...
...
@@ -70,12 +70,14 @@ def make_selected_particles(make_particles=make_has_rich_pions,
@
configurable
def
make_charm_pions
(
pid
=
'PIDK < 3'
):
return
make_selected_particles
(
make_particles
=
make_has_rich_pions
,
pid
=
pid
)
return
make_selected_particles
(
make_particles
=
make_has_rich_long_pions
,
pid
=
pid
)
@
configurable
def
make_charm_kaons
(
pid
=
'PIDK > 3'
):
return
make_selected_particles
(
make_particles
=
make_has_rich_kaons
,
pid
=
pid
)
return
make_selected_particles
(
make_particles
=
make_has_rich_long_kaons
,
pid
=
pid
)
@
configurable
...
...
@@ -174,7 +176,7 @@ def dstar2dzeropi_dzero2Kpi_line():
pions
=
make_charm_pions
()
dzeros
=
make_dzeros
(
particles
=
[
kaons
,
pions
],
descriptors
=
[
'[D0 -> K- pi+]cc'
])
soft_pions
=
make_has_rich_pions
()
soft_pions
=
make_has_rich_
long_
pions
()
dstars
=
make_dstars
(
dzeros
=
dzeros
,
soft_pions
=
soft_pions
,
...
...
Hlt/Hlt2Conf/python/Hlt2Conf/standard_particles.py
View file @
4c1acfe3
...
...
@@ -32,22 +32,36 @@ from RecoConf.reco_objects_from_file import make_protoparticles
@
configurable
def
standard_particle
_track_selector
(
Code
=
'TrALL'
,
**
kwargs
):
return
TrackSelector
(
Code
=
Code
,
**
kwargs
)
def
long
_track_selector
(
Code
=
'TrALL'
,
**
kwargs
):
return
TrackSelector
(
Code
=
require_all
(
'TrLONG'
,
Code
)
,
**
kwargs
)
@
configurable
def
standard_particle_protoparticle_filter
(
Code
=
'PP_ALL'
,
**
kwargs
):
def
down_track_selector
(
Code
=
'TrALL'
,
**
kwargs
):
return
TrackSelector
(
Code
=
require_all
(
'TrDOWNSTREAM'
,
Code
),
**
kwargs
)
@
configurable
def
upstream_track_selector
(
Code
=
'TrALL'
,
**
kwargs
):
return
TrackSelector
(
Code
=
require_all
(
'TrUPSTREAM'
,
Code
),
**
kwargs
)
@
configurable
def
ttrack_track_selector
(
Code
=
'TrALL'
,
**
kwargs
):
return
TrackSelector
(
Code
=
require_all
(
'TrTTRACK'
,
Code
),
**
kwargs
)
@
configurable
def
standard_protoparticle_filter
(
Code
=
'PP_ALL'
,
**
kwargs
):
return
ProtoParticleFilter
(
Code
=
Code
,
Factory
=
patched_hybrid_tool
(
'PPFactory'
),
**
kwargs
)
@
configurable
def
make_particles
(
species
=
'pion'
,
make_protoparticles
=
make_protoparticles
,
make_track_selector
=
standard_particle_track_selector
,
make_protoparticle_filter
=
standard_particle_protoparticle_filter
):
def
make_particles
(
species
=
'pion'
,
make_protoparticles
=
make_protoparticles
,
make_track_selector
=
long_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
):
particles
=
FunctionalParticleMaker
(
InputProtoParticles
=
make_protoparticles
(),
ParticleID
=
species
,
...
...
@@ -56,16 +70,63 @@ def make_particles(
return
particles
def
make_pions
():
return
make_particles
(
species
=
'pion'
)
#Long particles
def
make_long_pions
():
return
make_particles
(
species
=
"pion"
,
make_track_selector
=
long_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
)
def
make_long_kaons
():
return
make_particles
(
species
=
"kaon"
,
make_track_selector
=
long_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
)
def
make_kaons
():
return
make_particles
(
species
=
'kaon'
)
def
make_long_protons
():
return
make_particles
(
species
=
"proton"
,
make_track_selector
=
long_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
)
def
make_muons
():
return
make_particles
(
species
=
'muon'
)
def
make_long_muons
():
return
make_particles
(
species
=
"muon"
,
make_track_selector
=
long_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
)
#Down particles
def
make_down_pions
():
return
make_particles
(
species
=
"pion"
,
make_track_selector
=
down_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
)
def
make_down_protons
():
return
make_particles
(
species
=
"proton"
,
make_track_selector
=
down_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
)
#T particles
def
make_ttrack_pions
():
return
make_particles
(
species
=
"pion"
,
make_track_selector
=
ttrack_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
)
def
make_ttrack_protons
():
return
make_particles
(
species
=
"proton"
,
make_track_selector
=
ttrack_track_selector
,
make_protoparticle_filter
=
standard_protoparticle_filter
)
@
configurable
...
...
@@ -109,13 +170,65 @@ def make_mass_constrained_jpsi2mumu(pid_mu=0,
MotherCut
=
vertex_code
)
# Make pions
@
configurable
def
make_has_rich_long_pions
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_long_pions
()
@
configurable
def
make_has_rich_down_pions
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_down_pions
()
@
configurable
def
make_has_rich_ttrack_pions
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_ttrack_pions
()
# Make kaons
@
configurable
def
make_has_rich_long_kaons
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_long_kaons
()
@
configurable
def
make_has_rich_down_kaons
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_down_kaons
()
@
configurable
def
make_has_rich_ttrack_kaons
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_ttrack_kaons
()
# Make protons
@
configurable
def
make_has_rich_long_protons
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_long_protons
()
@
configurable
def
make_has_rich_down_protons
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_down_protons
()
@
configurable
def
make_has_rich_
pi
ons
():
with
standard_
particle_
protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_
pi
ons
()
def
make_has_rich_
ttrack_prot
ons
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_HASRICH'
):
return
make_
ttrack_prot
ons
()
# Make muons
@
configurable
def
make_
has_rich_ka
on
s
():
with
standard_
particle_
protoparticle_filter
.
bind
(
Code
=
'PP_
HASRICH
'
):
return
make_
ka
ons
()
def
make_
ismuon_long_mu
on
():
with
standard_protoparticle_filter
.
bind
(
Code
=
'PP_
ISMUON
'
):
return
make_
long_mu
ons
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment