Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb
DaVinci
Commits
feb3ec76
Commit
feb3ec76
authored
Feb 23, 2022
by
Abhijit Mathad
Browse files
rename configured algorithms
parent
3f43a91e
Pipeline
#3612347
passed with stages
in 27 seconds
Changes
7
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_configFuntuple.py
View file @
feb3ec76
...
...
@@ -45,7 +45,7 @@ variables = {
def
main
():
from
DaVinci.algorithms
import
C
onfiguredFun
t
uple
from
DaVinci.algorithms
import
c
onfigured
_
Fun
T
uple
config
=
{
"location"
:
...
...
@@ -58,6 +58,6 @@ def main():
}
tools
=
[]
algs
=
C
onfiguredFun
t
uple
({
"B0Dspi"
:
config
})
algs
=
c
onfigured
_
Fun
T
uple
({
"B0Dspi"
:
config
})
return
algs
,
tools
DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_collections.py
View file @
feb3ec76
...
...
@@ -17,13 +17,13 @@ from FunTuple import FunctorCollection, functorcollections
from
FunTuple
import
FunTuple_Particles
as
Funtuple
from
DaVinci.algorithms
import
add_filter
from
DaVinci
import
options
from
DaVinci.truth_matching
import
C
onfiguredMCTruthAndBkgCatAlg
from
DaVinci.truth_matching
import
c
onfigured
_
MCTruthAndBkgCatAlg
d02kpi_data
=
make_data_with_FetchDataFromFile
(
"/Event/HLT2/Hlt2CharmD0ToKmPipLine/Particles"
)
#get configured "MCTruthAndBkgCatAlg" algorithm for HLT2 output
mctruth
=
C
onfiguredMCTruthAndBkgCatAlg
(
inputs
=
d02kpi_data
)
mctruth
=
c
onfigured
_
MCTruthAndBkgCatAlg
(
inputs
=
d02kpi_data
)
# use functorcollections to add variables, please expand when there's new collections :)
collections
=
[
...
...
DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_hlt2.py
View file @
feb3ec76
...
...
@@ -18,7 +18,7 @@ from PyConf.application import make_data_with_FetchDataFromFile
from
DaVinci.reco_objects
import
make_pvs_for
from
DaVinci.algorithms
import
add_filter
from
DaVinci
import
options
from
DaVinci.truth_matching
import
C
onfiguredMCTruthAndBkgCatAlg
from
DaVinci.truth_matching
import
c
onfigured
_
MCTruthAndBkgCatAlg
fields
=
{
"D0"
:
"[D0 -> K- pi+]CC"
,
...
...
@@ -74,7 +74,7 @@ def main():
"HLT_PASS('Hlt2CharmD0ToKmPipLineDecision')"
)
#get configured "MCTruthAndBkgCatAlg" algorithm for HLT2 output
mctruth
=
C
onfiguredMCTruthAndBkgCatAlg
(
inputs
=
d02kpi_data
)
mctruth
=
c
onfigured
_
MCTruthAndBkgCatAlg
(
inputs
=
d02kpi_data
)
#Add true ID info to each of the fields (branches)
trueid_bkgcat_info
=
{
"TRUEID"
:
...
...
DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_from_spruce_mc.py
View file @
feb3ec76
...
...
@@ -12,7 +12,7 @@ from FunTuple import FunctorCollection
import
Functors
as
F
from
FunTuple
import
FunTuple_Particles
as
Funtuple
from
FunTuple.functorcollections
import
Kinematics
from
DaVinci.truth_matching
import
C
onfiguredMCTruthAndBkgCatAlg
from
DaVinci.truth_matching
import
c
onfigured
_
MCTruthAndBkgCatAlg
from
DaVinci.algorithms
import
add_filter
from
PyConf.application
import
make_data_with_FetchDataFromFile
...
...
@@ -41,7 +41,7 @@ def main():
"HLT_PASS('Spruce_Test_lineDecision')"
)
#get configured "MCTruthAndBkgCatAlg" algorithm for HLT2 output
mctruth
=
C
onfiguredMCTruthAndBkgCatAlg
(
mctruth
=
c
onfigured
_
MCTruthAndBkgCatAlg
(
inputs
=
B_data
,
root_in_tes
=
"/Event/Spruce/HLT2"
)
#Add trueid info to each of the branches
trueid_bkgcat_info
=
{
...
...
Phys/DaVinci/python/DaVinci/algorithms.py
View file @
feb3ec76
...
...
@@ -305,7 +305,7 @@ def get_hlt_reports(options, source=''):
return
dec_reports
def
C
onfiguredFun
t
uple
(
config
):
def
c
onfigured
_
Fun
T
uple
(
config
):
"""
Function for the FunTuple configuration and instantiation of the related HDR filter.
...
...
Phys/DaVinci/python/DaVinci/truth_matching.py
View file @
feb3ec76
...
...
@@ -17,7 +17,7 @@ from PyConf.Tools import BackgroundCategory, BackgroundCategoryViaRelations
from
PyConf.Tools
import
P2MCPFromProtoP
def
C
onfiguredMCTruthAndBkgCatAlg
(
def
c
onfigured
_
MCTruthAndBkgCatAlg
(
inputs
,
relations_locs
=
[
"Relations/ChargedPP2MCP"
,
"Relations/NeutralPP2MCP"
],
root_in_tes
=
"/Event/HLT2"
,
...
...
Phys/DaVinci/tests/config/test_algorithms.py
View file @
feb3ec76
...
...
@@ -18,7 +18,7 @@ from DaVinci.optionChecker import DVImportError
from
DaVinci.algorithms
import
(
setup_algorithms
,
define_fsr_writer
,
add_filter
,
apply_filters_and_unpacking
,
setup_user_algorithms
,
unpack_locations
,
C
onfiguredFun
t
uple
)
c
onfigured
_
Fun
T
uple
)
def
test_import_main_options
():
...
...
@@ -253,7 +253,7 @@ def test_apply_filters_and_unpack():
def
test_configured_funtuple
():
"""
Check if the
C
onfiguredFun
t
uple provides a correct instance of FunTuple.
Check if the
c
onfigured
_
Fun
T
uple provides a correct instance of FunTuple.
"""
from
FunTuple.functorcollections
import
Kinematics
fields
=
{
'B0'
:
"[B0 -> D_s- pi+]CC"
}
...
...
@@ -270,6 +270,6 @@ def test_configured_funtuple():
}
}
test_dict
=
C
onfiguredFun
t
uple
(
config
)
test_dict
=
c
onfigured
_
Fun
T
uple
(
config
)
assert
any
(
"FunTupleBase_Particles/Tuple_TestTuple"
in
alg
.
fullname
for
alg
in
test_dict
[
"TestTuple"
])
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