Skip to content
Snippets Groups Projects

Test for DecayTreeFitterAlg

Merged Patrick Koppenburg requested to merge pkoppenb-DecayTreeFitterAlg into master

Test for DecayTreeFitterAlg and subsequent functors. Based on Phys!970 (merged) and Rec!2504 (merged)

Edited by Patrick Koppenburg

Merge request reports

Merge request pipeline #3275001 passed

Merge request pipeline passed for 067a3745

Merged by Patrick KoppenburgPatrick Koppenburg 3 years ago (Nov 24, 2021 7:32am UTC)

Merge details

  • Changes merged into with 73bd2a95.
  • Deleted the source branch.

Pipeline #3277856 passed

Pipeline passed for 73bd2a95 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Patrick Koppenburg marked this merge request as draft

    marked this merge request as draft

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • ad4781b2 - Add DTF functor --- does not work yet

    Compare with previous version

  • mentioned in merge request Rec!2504 (merged)

  • added 11 commits

    Compare with previous version

  • added 1 commit

    • b237c419 - This cofnigures but DecayTreeFitterAlg crashes

    Compare with previous version

  • added 1 commit

    • a315c3c2 - Updated example. Still not working.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 11 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 5 commits

    Compare with previous version

  • With Rec@8f240165 I get

    FunctorFactory                         INFO Cache miss for functor: ::Functors::Adapters::ParticleMapper<>( /* TES location of relation table */ std::string{"/Event/DecayTreeFitterAlg/OutputRelations"} ), now trying cling with headers [<string>, Event/Particle.h, Functors/Adapters.h]
    input_line_459:9:176: error: no member named 'ParticleMapper' in namespace 'Functors::Adapters'
    std::unique_ptr<Functors::AnyFunctor> functor_0xdacc4462ac30ad0e_cling() { return std::make_unique<Functors::Functor<std::any (LHCb::Particle const&)>>( ::Functors::Adapters::ParticleMapper<>( /* TES location of relation table */ std::string{"/Event/DecayTreeFitterAlg/OutputRelations"} ) ); }
                                                                                                                                                             ~~~~~~~~~~~~~~~~~~~~~~^
    input_line_459:9:191: error: expected expression
    std::unique_ptr<Functors::AnyFunctor> functor_0xdacc4462ac30ad0e_cling() { return std::make_unique<Functors::Functor<std::any (LHCb::Particle const&)>>( ::Functors::Adapters::ParticleMapper<>( /* TES location of relation table */ std::string{"/Event/DecayTreeFitterAlg/OutputRelations"} ) ); }
                                                                                                                                                                                                  ^
    FunctorFactory                         INFO Code we attempted to JIT compile was:
    #pragma cling optimize(3)
    #pragma cling load("TrackKernel")
    #ifndef GAUDI_V20_COMPAT
    #define GAUDI_V20_COMPAT
    #endif
    #include <string>
    #include "Event/Particle.h"
    #include "Functors/Adapters.h"
    std::unique_ptr<Functors::AnyFunctor> functor_0xdacc4462ac30ad0e_cling() { return std::make_unique<Functors::Functor<std::any (LHCb::Particle const&)>>( ::Functors::Adapters::ParticleMapper<>( /* TES location of relation table */ std::string{"/Event/DecayTreeFitterAlg/OutputRelations"} ) ); }
    auto const functor_0xdacc4462ac30ad0e_cling_factory_ptr = functor_0xdacc4462ac30ad0e_cling;
    DimuonsTuple                          FATAL  Exception with tag=FunctorFactory::get<Functors::Functor<std::any (LHCb::Particle const&)>> is caught 
    

    The good news is that is caught the TES location /Event/DecayTreeFitterAlg/OutputRelations. But then it doesn't like the rest.

  • Adding @graven to participants

  • Patrick Koppenburg requested review from @graven

    requested review from @graven

  • added 3 commits

    Compare with previous version

  • ... I think it's a git glitch. Trying again.

  • Indeed. It was a red herring. The DaVinci test initialises correctly with Rec!2504 (1fd0e12a)

    Edited by Patrick Koppenburg
  • added 1 commit

    Compare with previous version

  • Success! I have a refitted PT in the tuple!

    DTF_pt

  • Now the next step is to generalise with any functor.

  • Really nice :thumbsup:!

  • added 1 commit

    Compare with previous version

  • Nice work! Does the test include the results for all of the different PVs in the refitting? It's not clear to me whether this variable is still an array :-) (and how do you access the DTF chi2?)

    Edited by Laurent Dufour
  • Eduardo Rodrigues resolved all threads

    resolved all threads

  • That will all come. Next I need to access PT via the functor. Once I can do that I can access any property of the refitted particle, and DTF chi2 can be one of them.

  • @pkoppenb, so you're not accessing your DTF pT via a/the functor? Got me perplexed. But I can wait for the magic to be displayed soon ... looking really forward to it :-).

  • Not yet. We did a design session at the whiteboard with @graven. We decided to factorise the problem into two steps:

    1. Make a functor that accesses the related particle and returns pt
    2. Replace pt by a functor PT, or any functor you like.

    (Now I am surprised Gerhard didn't mention "divide and conquer" when suggesting that :-) )

    Step 1 is complete. Next week I'll get to step 2. It was useful to split the problem as it identified that we need two functions. Now I need to template them by (or ideally only the outer one).

    One problem is that TestFunctors.cpp in Rec has no access to the Gaudi TES and this cannot really test the functor, just make sure it complies. Hence we need the chain to work up to DaVini to be sure it's OK.

    Edited by Patrick Koppenburg
  • Sounds good to me. I look forward to seeing a draft since point 2. sounds like a generic adaptor, as it were.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading