Commit feb3ec76 authored by Abhijit Mathad's avatar Abhijit Mathad
Browse files

rename configured algorithms

parent 3f43a91e
Pipeline #3612347 passed with stages
in 27 seconds
......@@ -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"])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment