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