Functor properties in TCKs
The new functors are evaluated eagerly, which results in gaudi receiving rather long and hard to understand strings.
For example, for the TwoTrackMVA line we have this in the configuration
VertexCut = ((CHI2DOF < 10.) & (BPVDIRA(pvs) > 0) & (
BPVCORRM(Mass=139.57018 * MeV, Vertices=pvs) > 1. * GeV
) & in_range(2., BPVETA(pvs), 5.) & (MVA(
MVAType='MatrixNet',
Config={'MatrixnetFile': "${PARAMFILESROOT}/data/Hlt1TwoTrackMVA.mx"},
Inputs={
'chi2': CHI2DOF,
'fdchi2': BPVFDCHI2(pvs),
'sumpt': apply_to_combination(SUM(PT)),
'nlt16': apply_to_combination(SUM(BPVIPCHI2(pvs) < 16.)),
}) > 0.96))
while gaudi sees this
'VertexCut_Code': '( ( ( ( ( ::Functors::Track::Chi2PerDoF{} < 10.0f ) & ( ::Functors::Composite::CosDirectionAngleToVertex<>( /* TES location of input [primary] vertices. */ std::string{"/Event/TrackBeamLineVertexFinderSoA/OutputVertices"} ) > 0 ) ) & ( ::Functors::Composite::CorrectedMass<>( /* Mass hypotheses to apply to the composite children */ 139.57018f, /* TES location of input [primary] vertices. */ std::string{"/Event/TrackBeamLineVertexFinderSoA/OutputVertices"} ) > 1000.0f ) ) & ::Functors::math::in_range( 2.0f, ::Functors::Composite::PseudoRapidityFromVertex<>( /* TES location of input [primary] vertices. */ std::string{"/Event/TrackBeamLineVertexFinderSoA/OutputVertices"} ), 5.0f ) ) & ( ::Functors::MVA<Sel::MatrixNet>( /* MVA config */ {{ std::string{"MatrixnetFile"}, std::string{"${PARAMFILESROOT}/data/Hlt1TwoTrackMVA.mx"} }}, /* MVA inputs */ MVAInput( std::string{"chi2"}, ::Functors::Track::Chi2PerDoF{} ), MVAInput( std::string{"sumpt"}, ::Functors::Adapters::CombinationFromComposite<LHCb::Pr::Iterable::Fitted::Forward::Tracks>( /* The functor to apply to the \'combination\' object. */ ::Functors::Adapters::Accumulate( /* The functor to accumulate the return value of. */ ::Functors::Track::TransverseMomentum{} ), /* List of data locations where the child objects can be found. */ std::string{"/Event/MakeIterableTracks/Output"} ) ), MVAInput( std::string{"nlt16"}, ::Functors::Adapters::CombinationFromComposite<LHCb::Pr::Iterable::Fitted::Forward::Tracks>( /* The functor to apply to the \'combination\' object. */ ::Functors::Adapters::Accumulate( /* The functor to accumulate the return value of. */ ( ::Functors::Track::ImpactParameterChi2ToVertex<>( /* TES location of input [primary] vertices. */ std::string{"/Event/TrackBeamLineVertexFinderSoA/OutputVertices"} ) < 16.0f ) ), /* List of data locations where the child objects can be found. */ std::string{"/Event/MakeIterableTracks/Output"} ) ), MVAInput( std::string{"fdchi2"}, ::Functors::Composite::FlightDistanceChi2ToVertex<>( /* TES location of input [primary] vertices. */ std::string{"/Event/TrackBeamLineVertexFinderSoA/OutputVertices"} ) ) ) > 0.96f ) )',
Consequently, this is also what will be saved in a TCK.
We should think about a way to keep a simpler, more readable, representation, possibly along with the resolved functor code.