ThOr algorithms incorrectly reject legacy algorithm output
The following configuration should work:
from Hlt2Conf import algorithms, algorithms_thor
from Hlt2Conf.standard_particles import make_has_rich_long_pions
algorithms_thor.ParticleFilter(algorithms.ParticleFilter(make_has_rich_long_pions(), Code="ALL"), F.ALL)
But one gets an error:
File "Moore/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm/builders/basic_builder.py", line 420, in make_selected_ks
output_ks = algorithms_thor.ParticleFilter(ParticleFilter(make_has_rich_long_pions(), Code="ALL"), F.ALL)
File "Moore/Hlt/Hlt2Conf/python/Hlt2Conf/algorithms_thor.py", line 95, in ParticleFilter
_validate_type(Input)
File "Moore/Hlt/Hlt2Conf/python/Hlt2Conf/algorithms_thor.py", line 76, in _validate_type
raise TypeError(
TypeError: Data handle type 'unknown_t' is not appropriate for the current ThOr backend 'v1'
The v1 compatibility check needs to be extended. The simplest option is to check if the data's producer satisfies is_particle_producer
.
/cc @abertoli