Skip to content
Snippets Groups Projects

Fix crash in TupleToolHerschel when multiple versions are present

Closed Patrick Koppenburg requested to merge pkoppenb-Herschel into master

TupleToolHerschel causes a crash without any error message when a file from a run with one calibration is followed by a file from another run with another calibration in the same job. @crsanche ran into the problem with files 00069074_00008083_1.ew.dst and 00069074_00010274_1.ew.dst from 2015.

The reason is that the name of the variable is changed depending on calibration. On the first J/psi->mumu event of these two files we have

 log_hrc_fom_v5  = 5.62789
 log_hrc_fom_B_v5 = 5.61727
 log_hrc_fom_F_v5 = 1.07714

and

 log_hrc_fom_v4  = -15.9944
 log_hrc_fom_B_v4 = -17.4217
 log_hrc_fom_F_v4 = -16.2688

This is a bug. A TupleTool should not crash. I suggest to add a variable that gives the version and remove it from the name of the log chi2.

Merge request reports

Pipeline #3523974 passed

Pipeline passed for 6bfffce8 on pkoppenb-Herschel

Approval is optional

Closed by Patrick KoppenburgPatrick Koppenburg 3 years ago (Feb 3, 2022 1:36pm UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Contributor

      @cattanem, @masmith - this has broken DecayTreeTuple.addTupleTool for tools with :: or __ in their type and no given name. To reproduce:

      lb-run DaVinci/v45r6 python -c "from DecayTreeTuple.Configuration import DecayTreeTuple
      DecayTreeTuple('dtt').addTupleTool('LoKi::Hybrid::TupleTool')"

      gives

      AttributeError: '<class 'DecayTreeTupleBase.DecayTreeTupleBaseConf.DecayTreeTuple'>' object has no attribute 'LoKi__Hybrid__TupleTool'

      The problem is that DecayTreeTuple.addTool gives the tool a different name when called with an instance rather than a type:

      from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool
      dtt = DecayTreeTuple('dtt')
      print(dtt.addTool(LoKi__Hybrid__TupleTool).getName())
      print(dtt.addTool(LoKi__Hybrid__TupleTool()).getName())

      outputs:

      dtt.LoKi__Hybrid__TupleTool
      dtt.LoKi::Hybrid::TupleTool

      I'm not sure the best fix in this case.

    • Thanks, I'll have a look.

      Edited by Mark Smith
    • Please register or sign in to reply
  • Patrick Koppenburg requested review from @johndan

    requested review from @johndan

  • That doesn't work. Branch was already used.

Please register or sign in to reply
Loading