Commit 56e3ae37 authored by Olli Lupton's avatar Olli Lupton
Browse files

Support PrFittedForwardTracks in Filter and CombineTracks wrappers.

parent 118fc9b0
......@@ -13,9 +13,11 @@ from PyConf import configurable
from Configurables import (
PrFilter__Track_v1,
PrFilter__Track_v2,
PrFilter__PrFittedForwardTracks,
TrackCombiner,
CombineTracks__2Body__Track_v2,
CombineTracks__2Body__Track_v2__Dumper,
CombineTracks__2Body__PrFittedForwardTracks,
)
from PyConf.components import Algorithm
......@@ -84,6 +86,16 @@ def PrFilterV2Tracks(functor, **kwargs):
**kwargs)
@configurable
def FilterPrFittedForwardTracks(functor, **kwargs):
return Algorithm(
PrFilter__PrFittedForwardTracks,
Code=functor.code(),
Headers=functor.headers(),
Factory='FunctorFactory',
**kwargs)
@configurable
def CombineTracks(NBodies=2,
CombinationCut=None,
......@@ -92,6 +104,7 @@ def CombineTracks(NBodies=2,
ChildDump=None,
CombinationDump=None,
VertexDump=None,
PrTracks=False,
**kwargs):
assert NBodies == 2
......@@ -105,9 +118,14 @@ def CombineTracks(NBodies=2,
VertexDump_dict = parse(VertexDump)
enable_dumper = len(ChildDump_dict) or len(CombinationDump_dict) or len(
VertexDump_dict)
if PrTracks:
AlgType = CombineTracks__2Body__PrFittedForwardTracks
elif enable_dumper:
AlgType = CombineTracks__2Body__Track_v2__Dumper
else:
AlgType = CombineTracks__2Body__Track_v2
return Algorithm(
CombineTracks__2Body__Track_v2__Dumper
if enable_dumper else CombineTracks__2Body__Track_v2,
AlgType,
VertexCut_Code=VertexCut.code(),
VertexCut_Headers=VertexCut.headers(),
CombinationCut_Code=CombinationCut.code(),
......
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