Skip to content
Snippets Groups Projects
Commit ea567d00 authored by Patrick Koppenburg's avatar Patrick Koppenburg :leaves:
Browse files

Merge branch 'AM_config_rename' into 'master'

Rename ConfiguredMCTruthAndBkgCatAlg and ConfiguredFuntuple

Closes #35

See merge request lhcb/DaVinci!662
parents 3f43a91e 992586f3
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!662Rename ConfiguredMCTruthAndBkgCatAlg and ConfiguredFuntuple
Pipeline #3617023 passed
......@@ -45,7 +45,7 @@ variables = {
def main():
from DaVinci.algorithms import ConfiguredFuntuple
from DaVinci.algorithms import configured_FunTuple
config = {
"location":
......@@ -58,6 +58,6 @@ def main():
}
tools = []
algs = ConfiguredFuntuple({"B0Dspi": config})
algs = configured_FunTuple({"B0Dspi": config})
return algs, tools
......@@ -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 ConfiguredMCTruthAndBkgCatAlg
from DaVinci.truth_matching import configured_MCTruthAndBkgCatAlg
d02kpi_data = make_data_with_FetchDataFromFile(
"/Event/HLT2/Hlt2CharmD0ToKmPipLine/Particles")
#get configured "MCTruthAndBkgCatAlg" algorithm for HLT2 output
mctruth = ConfiguredMCTruthAndBkgCatAlg(inputs=d02kpi_data)
mctruth = configured_MCTruthAndBkgCatAlg(inputs=d02kpi_data)
# use functorcollections to add variables, please expand when there's new collections :)
collections = [
......
......@@ -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 ConfiguredMCTruthAndBkgCatAlg
from DaVinci.truth_matching import configured_MCTruthAndBkgCatAlg
fields = {
"D0": "[D0 -> K- pi+]CC",
......@@ -74,7 +74,7 @@ def main():
"HLT_PASS('Hlt2CharmD0ToKmPipLineDecision')")
#get configured "MCTruthAndBkgCatAlg" algorithm for HLT2 output
mctruth = ConfiguredMCTruthAndBkgCatAlg(inputs=d02kpi_data)
mctruth = configured_MCTruthAndBkgCatAlg(inputs=d02kpi_data)
#Add true ID info to each of the fields (branches)
trueid_bkgcat_info = {
"TRUEID":
......
......@@ -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 ConfiguredMCTruthAndBkgCatAlg
from DaVinci.truth_matching import configured_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 = ConfiguredMCTruthAndBkgCatAlg(
mctruth = configured_MCTruthAndBkgCatAlg(
inputs=B_data, root_in_tes="/Event/Spruce/HLT2")
#Add trueid info to each of the branches
trueid_bkgcat_info = {
......
......@@ -305,7 +305,7 @@ def get_hlt_reports(options, source=''):
return dec_reports
def ConfiguredFuntuple(config):
def configured_FunTuple(config):
"""
Function for the FunTuple configuration and instantiation of the related HDR filter.
......
......@@ -17,7 +17,7 @@ from PyConf.Tools import BackgroundCategory, BackgroundCategoryViaRelations
from PyConf.Tools import P2MCPFromProtoP
def ConfiguredMCTruthAndBkgCatAlg(
def configured_MCTruthAndBkgCatAlg(
inputs,
relations_locs=["Relations/ChargedPP2MCP", "Relations/NeutralPP2MCP"],
root_in_tes="/Event/HLT2",
......
......@@ -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,
ConfiguredFuntuple)
configured_FunTuple)
def test_import_main_options():
......@@ -253,7 +253,7 @@ def test_apply_filters_and_unpack():
def test_configured_funtuple():
"""
Check if the ConfiguredFuntuple provides a correct instance of FunTuple.
Check if the configured_FunTuple 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 = ConfiguredFuntuple(config)
test_dict = configured_FunTuple(config)
assert any("FunTupleBase_Particles/Tuple_TestTuple" in alg.fullname
for alg in test_dict["TestTuple"])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment