diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/AllFunctors.py b/DaVinciExamples/python/DaVinciExamples/tupling/AllFunctors.py index f4b2db28d8066da7b3fb5f792b9b54e27ca8dcd3..700311b44d9b433bb534935bf033719522b50822 100644 --- a/DaVinciExamples/python/DaVinciExamples/tupling/AllFunctors.py +++ b/DaVinciExamples/python/DaVinciExamples/tupling/AllFunctors.py @@ -132,7 +132,6 @@ def all_variables(pvs, DTFR, mctruth, ptype): all_vars['DTF_BPVIPCHI2'] = F.MAP_INPUT( Functor=F.BPVIPCHI2(pvs), Relations=DTFR) # MAP_INPUT_ARRAY - # MAP_RANGE all_vars['MASS'] = F.MASS if top: # B diff --git a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_array_taggers.py b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_array_taggers.py index 8b609646a55d30c843a41091db031e85c9998b82..fca342a0bf31a94db5830dd645f285ccbde60a38 100644 --- a/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_array_taggers.py +++ b/DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_array_taggers.py @@ -9,12 +9,11 @@ # or submit itself to any jurisdiction. # ############################################################################### """ - Option file for testing the ParticleTaggerAlg algorithm and the related ThOr functors MAP_ARRAY and MAP_RANGE. + Option file for testing the ParticleTaggerAlg algorithm and the related ThOr functors MAP_INPUT_ARRAY. The job runs over a spruced sample and retrieves a set of B0 -> Ds K+ candidates. For each candidate the ParticleTaggerAlg looks at the TES location defined via the 'make_long_pions_from_spruce' function and creates a 'one-to-many' relation map relating all the available tracks to the B candidate of the events. - Then the MAP_ARRAY functor takes in input this relation map and for each entry stores the output of an external functor (i.e F.P, F.PT) - in a vector via the MAP_RANGE functor. + Then the MAP_INPUT_ARRAY functor takes in input this relation map and for each entry stores the output of an external functor (i.e F.P, F.PT) in a vector. This example is meant to be run with $ ./run davinci run-mc --inputfiledb Spruce_all_lines_dst Phys/DaVinci/options/DaVinciDB-Example.yaml --user_algorithms DaVinciExamples/python/DaVinciExamples/tupling/option_davinci_tupling_array_taggers:main @@ -49,12 +48,11 @@ variables_B = FunctorCollection({ 'THOR_MASS': F.MASS, "TagTr_P": - F.MAP_INPUT_ARRAY(Functor=F.MAP_RANGE(Functor=F.P), Relations=tagAlg_rels), + F.MAP_INPUT_ARRAY(Functor=F.P, Relations=tagAlg_rels), # Currently this stores a branch called "indx" which corresponds to nPVs. # You can give a custom name for this via following "TagTr_PT[nTags]": - F.MAP_INPUT_ARRAY( - Functor=F.MAP_RANGE(Functor=F.PT), Relations=tagAlg_rels), + F.MAP_INPUT_ARRAY(Functor=F.PT, Relations=tagAlg_rels), }) #make collection of functors for Muplus diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_array_taggers.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_array_taggers.qmt index f0bd0bc1b29888e9dc0103e8b4c06339f0ce7218..b8f71e1f0dd01cf2b8a531508da16c8b59eafbbd 100644 --- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_array_taggers.qmt +++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_array_taggers.qmt @@ -17,7 +17,7 @@ # SUMMARY OF THIS TEST # ................... # Author: dfazzini -# Purpose: Test for the ParticleTaggerAlg algorithm and the related MAP_ARRAY and MAP_RANGE functors +# Purpose: Test for the ParticleTaggerAlg algorithm and the related MAP_INPUT_ARRAY functor # Prerequisites: None # inputfiledb Spruce_all_lines_dst $DAVINCIROOT/options/DaVinciDB-Example.yaml # user_algorithms ../../python/DaVinciExamples/tupling/option_davinci_tupling_array_taggers:main diff --git a/DaVinciTests/tests/options/option_davinci_funtuple_array.py b/DaVinciTests/tests/options/option_davinci_funtuple_array.py index 8b4d860686271f6160c15d177f779018f1e90d23..1031af54b9927a0f72afeb9889400c93240e35c9 100644 --- a/DaVinciTests/tests/options/option_davinci_funtuple_array.py +++ b/DaVinciTests/tests/options/option_davinci_funtuple_array.py @@ -49,12 +49,11 @@ variables_B = FunctorCollection({ 'THOR_MASS': F.MASS, "TagTr_P": - F.MAP_INPUT_ARRAY(Functor=F.MAP_RANGE(Functor=F.P), Relations=tagAlg_rels), + F.MAP_INPUT_ARRAY(Functor=F.P, Relations=tagAlg_rels), # Currently this stores a branch called "indx" which corresponds to nPVs. # You can give a custom name for this via following "TagTr_PT[nTags]": - F.MAP_INPUT_ARRAY( - Functor=F.MAP_RANGE(Functor=F.PT), Relations=tagAlg_rels), + F.MAP_INPUT_ARRAY(Functor=F.PT, Relations=tagAlg_rels), }) # Defining fields and variables we want to store in our tuple diff --git a/DaVinciTutorials/tests/refs/test_tutorial5_MCTruth.ref b/DaVinciTutorials/tests/refs/test_tutorial5_MCTruth.ref index 9ad5f5c849dc6819c8cfe2834ac488a7b2110be5..758421b8ae9d8b7b72ee9108f0943ec05ca8d64f 100644 --- a/DaVinciTutorials/tests/refs/test_tutorial5_MCTruth.ref +++ b/DaVinciTutorials/tests/refs/test_tutorial5_MCTruth.ref @@ -1,32 +1,32 @@ DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable') <FunctorCollection object at 0x########: - TRUEP: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Magnitude{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( MAGNITUDE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - TRUEPT: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Rho_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( RHO_COORDINATE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - TRUEPX: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::X_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( X_COORDINATE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - TRUEPY: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Y_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( Y_COORDINATE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - TRUEPZ: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Z_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( Z_COORDINATE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - TRUEENERGY: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::E_Coordinate{}, ::Functors::Track::FourMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( E_COORDINATE @ FOURMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") + TRUEP: ('Functors::chain( ::Functors::Common::Magnitude{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MAGNITUDE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + TRUEPT: ('Functors::chain( ::Functors::Common::Rho_Coordinate{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( RHO_COORDINATE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + TRUEPX: ('Functors::chain( ::Functors::Common::X_Coordinate{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( X_COORDINATE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + TRUEPY: ('Functors::chain( ::Functors::Common::Y_Coordinate{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( Y_COORDINATE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + TRUEPZ: ('Functors::chain( ::Functors::Common::Z_Coordinate{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( Z_COORDINATE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + TRUEENERGY: ('Functors::chain( ::Functors::Common::E_Coordinate{}, ::Functors::Track::FourMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( E_COORDINATE @ FOURMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") > <FunctorCollection object at 0x########: - TRUEID: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Simulation::Particle_Id{} ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=PARTICLE_ID).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - MC_MOTHER_ID: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 1>{}, /* The functor to apply on the mother. */ ::Functors::Simulation::Particle_Id{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=MC_MOTHER(Generation=1, Functor=PARTICLE_ID)).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - MC_MOTHER_KEY: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 1>{}, /* The functor to apply on the mother. */ ::Functors::TES::ObjectKey{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=MC_MOTHER(Generation=1, Functor=OBJECT_KEY)).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - MC_GD_MOTHER_ID: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 2>{}, /* The functor to apply on the mother. */ ::Functors::Simulation::Particle_Id{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=MC_MOTHER(Generation=2, Functor=PARTICLE_ID)).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - MC_GD_MOTHER_KEY: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 2>{}, /* The functor to apply on the mother. */ ::Functors::TES::ObjectKey{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=MC_MOTHER(Generation=2, Functor=OBJECT_KEY)).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - MC_GD_GD_MOTHER_ID: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 3>{}, /* The functor to apply on the mother. */ ::Functors::Simulation::Particle_Id{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=MC_MOTHER(Generation=3, Functor=PARTICLE_ID)).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") - MC_GD_GD_MOTHER_KEY: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 3>{}, /* The functor to apply on the mother. */ ::Functors::TES::ObjectKey{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=MC_MOTHER(Generation=3, Functor=OBJECT_KEY)).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") + TRUEID: ('Functors::chain( ::Functors::Simulation::Particle_Id{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( PARTICLE_ID @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + MC_MOTHER_ID: ('Functors::chain( ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 1>{}, /* The functor to apply on the mother. */ ::Functors::Simulation::Particle_Id{} ), ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MC_MOTHER(Generation=1, Functor=PARTICLE_ID) @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + MC_MOTHER_KEY: ('Functors::chain( ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 1>{}, /* The functor to apply on the mother. */ ::Functors::TES::ObjectKey{} ), ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MC_MOTHER(Generation=1, Functor=OBJECT_KEY) @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + MC_GD_MOTHER_ID: ('Functors::chain( ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 2>{}, /* The functor to apply on the mother. */ ::Functors::Simulation::Particle_Id{} ), ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MC_MOTHER(Generation=2, Functor=PARTICLE_ID) @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + MC_GD_MOTHER_KEY: ('Functors::chain( ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 2>{}, /* The functor to apply on the mother. */ ::Functors::TES::ObjectKey{} ), ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MC_MOTHER(Generation=2, Functor=OBJECT_KEY) @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + MC_GD_GD_MOTHER_ID: ('Functors::chain( ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 3>{}, /* The functor to apply on the mother. */ ::Functors::Simulation::Particle_Id{} ), ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MC_MOTHER(Generation=3, Functor=PARTICLE_ID) @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") + MC_GD_GD_MOTHER_KEY: ('Functors::chain( ::Functors::Simulation::MC::Mother( /* The generation of the mother. Generation 1 is simply Mother, Generation 2 is Grandmother and so on. */ std::integral_constant<int, 3>{}, /* The functor to apply on the mother. */ ::Functors::TES::ObjectKey{} ), ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MC_MOTHER(Generation=3, Functor=OBJECT_KEY) @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") > <FunctorCollection object at 0x########: M: ('::Functors::Composite::Mass{}', 'MASS') P: ('Functors::chain( ::Functors::Common::Magnitude{}, ::Functors::Track::ThreeMomentum{} )', '( MAGNITUDE @ THREEMOMENTUM )') > <FunctorCollection object at 0x########: - TRUEP: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Magnitude{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( MAGNITUDE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") + TRUEP: ('Functors::chain( ::Functors::Common::Magnitude{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MAGNITUDE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") > <FunctorCollection object at 0x########: - TRUEID: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Simulation::Particle_Id{} ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=PARTICLE_ID).bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS )") + TRUEID: ('Functors::chain( ::Functors::Simulation::Particle_Id{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>>( /* List of DataHandles */ std::vector{std::string{"/Event/MCTruthAndBkgCatAlg#1/MCAssocTable"}} ), ::Functors::Common::ForwardArgs{} ) )', "( PARTICLE_ID @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/MCTruthAndBkgCatAlg#1/MCAssocTable')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::MCParticle>']), FORWARDARGS ) )") > -ApplicationMgr SUCCESS +ApplicationMgr SUCCESS ==================================================================================================================================== ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully diff --git a/DaVinciTutorials/tests/refs/test_tutorial6_DecayTreeFit.ref b/DaVinciTutorials/tests/refs/test_tutorial6_DecayTreeFit.ref index 305fe293be2991ff9267c2872d81477d0b746a34..00bbf965c3f097d64206aa190cadb76e1fedf6d4 100644 --- a/DaVinciTutorials/tests/refs/test_tutorial6_DecayTreeFit.ref +++ b/DaVinciTutorials/tests/refs/test_tutorial6_DecayTreeFit.ref @@ -1,13 +1,13 @@ <FunctorCollection object at 0x########: - DTF_M: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ ::Functors::Composite::Mass{} ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=MASS).bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS )") - DTF_P: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Magnitude{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( MAGNITUDE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS )") - DTF_PT: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Rho_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( RHO_COORDINATE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS )") - DTF_PX: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::X_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( X_COORDINATE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS )") - DTF_PY: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Y_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( Y_COORDINATE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS )") - DTF_PZ: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::Z_Coordinate{}, ::Functors::Track::ThreeMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( Z_COORDINATE @ THREEMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS )") - DTF_ENERGY: ('Functors::bind( ::Functors::Adapters::MapRelInputToFunOutput( /* The functor to apply to the particle. */ Functors::chain( ::Functors::Common::E_Coordinate{}, ::Functors::Track::FourMomentum{} ) ), ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} )', "_MAP_INPUT(Functor=( E_COORDINATE @ FOURMOMENTUM )).bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS )") + DTF_M: ('Functors::chain( ::Functors::Composite::Mass{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MASS @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS ) )") + DTF_P: ('Functors::chain( ::Functors::Common::Magnitude{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} ) )', "( MAGNITUDE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS ) )") + DTF_PT: ('Functors::chain( ::Functors::Common::Rho_Coordinate{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} ) )', "( RHO_COORDINATE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS ) )") + DTF_PX: ('Functors::chain( ::Functors::Common::X_Coordinate{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} ) )', "( X_COORDINATE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS ) )") + DTF_PY: ('Functors::chain( ::Functors::Common::Y_Coordinate{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} ) )', "( Y_COORDINATE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS ) )") + DTF_PZ: ('Functors::chain( ::Functors::Common::Z_Coordinate{}, ::Functors::Track::ThreeMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} ) )', "( Z_COORDINATE @ THREEMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS ) )") + DTF_ENERGY: ('Functors::chain( ::Functors::Common::E_Coordinate{}, ::Functors::Track::FourMomentum{}, ::Functors::Common::To{}, ::Functors::Functional::Front{}, Functors::bind( ::Functors::Common::Relations{}, ::Functors::Common::TES<LHCb::Relation1D<LHCb::Particle,LHCb::Particle>>( /* List of DataHandles */ std::vector{std::string{"/Event/DecayTreeFitterAlg/OutputRelations"}} ), ::Functors::Common::ForwardArgs{} ) )', "( E_COORDINATE @ FOURMOMENTUM @ TO @ FRONT @ RELATIONS.bind( TES(DataHandles=[DataHandle('/Event/DecayTreeFitterAlg/OutputRelations')], DataTypes=['LHCb::Relation1D<LHCb::Particle,LHCb::Particle>']), FORWARDARGS ) )") > -ApplicationMgr SUCCESS +ApplicationMgr SUCCESS ==================================================================================================================================== ==================================================================================================================================== ApplicationMgr INFO Application Manager Configured successfully