Skip to content
Snippets Groups Projects

Draft: Functor Collector with RecSummary information

Closed Clara Landesa Gomez requested to merge cl-recsummary-fc into master
1 unresolved thread

Added RecSummary() Functor Collector to Analysis/Phys/FunTuple/python/FunTuple/functorcollections.py. It retrieves an event-level collection of RecSummary information.

It creates the following branches:

  • nTracks,
  • nPVs
  • nFTClusters
  • nVPClusters
  • nEcalClusters
  • eCalTot
  • hCalTot
  • nVeloTracks
  • nLongTracks
  • nDownstreamTracks
  • nUpstreamTracks
  • nBackTracks
  • nRich1Hits
  • nRich2Hits

Work towards DPA task https://gitlab.cern.ch/lhcb-dpa/project/-/issues/178.

Edited by Eduardo Rodrigues

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Clara Landesa Gomez marked this merge request as ready

    marked this merge request as ready

  • Hello @clandesa, welcome to DPA and thank you for this contribution :thumbsup:.

    Let me be very brief at this point as I have limited time today:

    • Have a look at the DaVinci docs for how to contribute, if not done already.
    • Always good to add relevant labels and assign are reviewer (the WP coord if no other expert on some particular topic is an obvious person). I added some more relevant labels as they are useful for bookkeeping.
    • I guess this must be work atop MR Rec!3332 (diffs) and related to comment https://gitlab.cern.ch/lhcb-dpa/project/-/issues/178#note_6491601. It is relevant to the DPA task https://gitlab.cern.ch/lhcb-dpa/project/-/issues/178. Can you add this to the list at the top of this DPA task so that everyone knows what is available and/or being worked on?
    • I see your docs are minimalistic. Do have a look at the docstrings of other collections and adapt accordingly.
    • I would say that track related info is what most people will be interested in and the rest, such as hits, is more for special studies. Useful then to have a flag for "verbose output" similar to what other collections do.
    • You will need to add or extend one of the DaVinci tests to ensure this new code is tested in the CI. Grep around in DaVinciTests and DaVinciExamples to see where it is best to add such tests.

    Note that you can simplify the code avoiding temporary variables and alike. Something like

    >>> l = ["a", "b", "c"]
    >>> some_dict_such_as_a_functorcollection = FunctorCollection({item: my_functor_or_function_or(item) for item in l})

    I hope this helps. Let us know.

    Thanks again.

  • Eduardo Rodrigues marked this merge request as draft

    marked this merge request as draft

  • Eduardo Rodrigues changed the description

    changed the description

  • added 1 commit

    • 963e53fd - Apply suggested changes: add VERBOSE flag, extend doc, simplify code

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Hi @clandesa and @sbelin , We are retiring Analysis master. Could you follow these instructions to move this MR to DV by Wednesday next week please?

    Move ongoing (unmerged) work to DaVinci

    You can rebase your unmerged branches on top of DaVinci and open MRs there. First, add Analysis as a remote in your DaVinci clone:

    git clone ssh://git@gitlab.cern.ch:7999/lhcb/DaVinci.git
    cd DaVinci
    git remote add Analysis ssh://git@gitlab.cern.ch:7999/lhcb/Analysis.git
    git fetch Analysis
    git fetch origin

    And then rebase the Analysis commits in your branch (e.g. AM_test) onto the master of DaVinci:

    # interactive rebase: you can just save the default list
    git rebase -i --onto origin/master Analysis/master Analysis/AM_test
    # create a new branch on the rebased commits and push
    git checkout -b AM_test
    git push -u origin AM_test

    In case you want to rebase onto another DaVinci branch (merge a Analysis and a DaVinci MR), first rebase the DaVinci branch onto the latest master, push it, and then use the following slight variation of the rebase above:

    git rebase -i --onto origin/AM_test Analysis/master Analysis/AM_test
    Edited by Abhijit Mathad
    • Hello @clandesa, we're trying to see what can be finalised soon. Can you let us know your timeline on this piece of work? Advance thanks.

    • Dear Eduardo,

      Apologies for the late response. Somehow I couldn't compile after moving my changes to DaVinci (see above). I am fixing it and finalizing the test. My main concern is how to make the changes to the .ref file to run the test.

      Hopefully, it will be done by the end of the week.

      Best regards,

      Clara

    • Hi. No late response, no worries.

      Sounds good. When you run the test locally any changes will trigger the creation of a .ref.new file and you can then rename it as an update, and commit. I hope that is what you were wondering about.

    • @clandesa Sorry to trouble you again. I would like to close this - is there any progress?

      I'll open the relevant issue in DaVinci with reference to this so it doesn't get forgotten.

    • Hi. Sorry for not finalising the merging. The test was still not working and my workflow got interrupted. I saw that two months ago there was already a RecSummary Functor Collector merged to master !1076 so I think this issue can be closed.

    • Please register or sign in to reply
  • closed

  • mentioned in issue DaVinci#209 (closed)

Please register or sign in to reply
Loading