Skip to content

WIP: Use tuple tools to write out Hlt1 trigger decisions and calculate first line efficiencies

Ross John Hunter requested to merge use-tuple-tools into master

FYI @rmatev @sstahl @mvesteri

NB this MR soon be closed and superseded by an MR to the new MooreAnalysis project, which will have the correct stack dependencies.

This MR introduces the HltEfficiencyChecker tool, which runs the trigger on MC from the testfileDB and then instances a MCDecayTreeTuple algorithm from the Analysis project, with the tools TupleToolTrigger, TupleToolEventInfo, MCTupleToolKinematic and MCTupleToolReconstructed to write out the trigger line decisions to a tuple, as well kinematic MC truth info about the candidates that were triggered on. From there, analysis is performed on the tuple to calculate and plot efficiencies.

The tool is packaged up by the wrapper script Hlt/Hlt1Conf/options/HltEfficiencyChecker.py, to which you pass information such as the test file you wish to run, number of events, which efficiency denominators and which lines you wish to calculate efficiencies for. This then auto-generates an input file for you containing information for Moore, then calls gaudirun.py with Hlt/Hlt1Conf/options/hlt1_example.py and your new autogenerated input file. This will generate the tuple for analysis as described above. Finally, HltEfficiencyChecker.py then calls an analysis script, Hlt/Hlt1Conf/scripts/hlt1_line_efficiencies.py to calculate and plot the efficiencies, as specified by the user.

An example usage (from the stack/Moore/ directory) would be

python Hlt/Hlt1Conf/options/HltEfficiencyChecker.py --testfiles upgrade_DC19_01_Bs2JPsiPhi_MD --events 100

which would run Moore on 100 B_s \rightarrow J/\psi \phi events and print efficiencies for all lines and denominators defined in the analysis script, as well as generating a variety of associated plots.

Documentation will follow in the form of an internal note and a starter kit-style tutorial soon after this is merged.

Please see slides here https://indico.cern.ch/event/852123/ for some plots.

TODO

  • Write doc string in all the new scripts.
  • Make first attempt at writing truth-level kinematic info from the test file using DaVinci to a tuple, in order to calculate the denominator as some number of analysis-agnostic heavy flavour decays that should be trigger-able by a subset of the Hlt1 lines.
  • Discuss/explore different options for denominator.
  • Code clean-up/re-format.
  • Move my code out of hlt1_example.py
  • Find out why it fails for Z \rightarrow \mu\mu
Edited by Ross John Hunter

Merge request reports