Skip to content

Mu2e/EventNtuple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventNtuple

Table of Contents

  1. Introduction
  2. Structure
  3. How to Check the EventNtuple
  4. How to Analyze an EventNtuple
  5. How to Create an EventNtuple
  6. Validation
  7. Tagging a New Release
  8. Notes for Developers
  9. Previous Verisons
  10. Other Useful Links

Introduction

The EventNtuple is a simplified data format that can be used for Mu2e analyses.

Structure

The EventNtuple structure is complex. Some branches consist of a single object (e.g. evtinfo), some are vectors of objects (e.g. trk) and some are vectors-of-vectors of objects (e.g. trksegs).

A list of branches is available

The help understand what all the branches and leaves mean, we have an ntuplehelper tool

How to Check the EventNtuple

You can get some basic information about the EventNtuple file useing checkEventNtuple like so:

checkEventNtuple file1.root file2.root

This will print the version number (for versions after v6.3.0) and the trigger branches in the file (for versions after v6.8.0)

How to Analyze an EventNtuple

To help with analyzing the EventNtuple given its complex structure, we have two sets of utilities:

  • RooUtil for ROOT-based analyses, and
  • pyutils for python-based analyses.

Feel free to send questions, comments, or suggestions for improvement to the #analysis-tools Slack channel.

How to Create an EventNtuple

In case you need to create your own EventNtuple you can do the following from a clean login in your working directory with the list of files you want to run over in a text file called your-art-filelist.txt:

mu2einit
muse setup EventNtuple
mu2e -c EventNtuple/fcl/from_mcs-mockdata.fcl -S your-art-filelist.txt

This will create a file called nts.owner.description.version.sequencer.root that contains the EventNtuple. The EventNtuple will then be in the ROOT file as EventNtuple/ntuple.

Note: Other fcl files are available. See table here to see if another one is more appropriate for your use case.

Notes for Developers

Notes for developers contributing to EventNtuple are here

Validation

Validation scripts and instructions are here

Tagging a New Release

Instructions for tagging a new release:

  • have a working area set up environment set up with a backing to the latest SimJob and a clone of EventNtuple (you might already have this)
cd /your/work/area
muse backing SimJob MDCXXXXvv
muse setup
git clone [email protected]:YourGitHubUsername/EventNtuple.git
cd EventNtuple/
git remote add -f mu2e https://github.com/Mu2e/EventNtuple.git
  • from your clone of the EventNtuple, fetch the latest version of the code from the main Mu2e repository and make a new branch:
git fetch --tags mu2e main
git checkout --no-track -b vXX-YY-ZZ mu2e/main
  • update version number in histogram _hVersion in src/EventNtupleMaker_module.cc and commit
  • make sure EventNtuple runs following these steps
    • if any test fails, then you can look in test_fcls.log to see the error. You can also see the command to rerun and debug locally without having to re-run the whole test_fcls.sh script
  • create a "before" ntuple with the previous release of EventNtuple. In a fresh login:
mu2einit
muse setup EventNtuple vXX_YY_ZZ
mu2e -c EventNtuple/fcl/from_mcs-mockdata.fcl -S ../EventNtupleDev_NewTag/filelists/mcs.mu2e.ensembleMDS2cMix1BBTriggered.MDC2020ba_best_v1_3.art.list --TFileName nts.ntuple.before.root -n 100
root -l -b ${MUSE_WORK_DIR}/EventNtuple/validation/create_val_file_rooutil.C\(\"nts.ntuple.before.root\",\"val.ntuple.before.root\"\)
  • create a comparison booklet following these steps
    • make sure any differences are understood
  • open PR with final changes and merge
  • make sure EventNtuple builds with spack following these steps, fix any errors and merge them
    • this needs to be done after merging so that we can checkout the main branch
  • create new release on GitHub
    • auto-generate release notes but add text to highlight important changes
  • ask for a new Musing to be made
  • post announcement on #analysis-tools Slack channel
  • update Mu2eWiki page
  • present updates at next Infra / Tools meeting

Previous Versions

The version history of EventNtuple is here.

Upgrading from v5 to v6

  • For analyzers: a list of branch/leaf/name changes is here
  • For developers: instructions to update your development area are here

Other Useful Links

About

Event-based analysis ntuple for the Mu2e Experiment

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 13