Giter VIP home page Giter VIP logo

mu2e-mat's Introduction

MAT Barebones Test for Mu2e

Introduction

The MINERvA Analysis Toolkit (MAT) is a toolkit for at looping root tuples, filling histograms, and calculating/propagating systematics. It's the foundation for dozens of MINERvA publications and counting.

Paper here: Arxiv 2103.08677.

In this repo I show here how it can work on Mu2e. runEventLoop.C loops over TrkAna tree entries, makes cuts, and plots a branch: the number of hits in a track. Run it with (and see instructions below):

root -l -b -q load.C+ runEventLoop.C+

The major offerings of the MAT

Replace MakeClass: At minimum, MAT's ChainWrapper can immediately replace ROOTs MakeClass for looping entries and accessing branches: it's faster and has an easier branch access interface:

chain->GetDouble("my_branch");
chain->GetVectorInt("my_int_vector_branch");

No messy header loading all branches. Each branch is loaded as needed and is cached for subsequent loops.

Systematics The MAT makes it easy to start doing systematics analysis immediately. It uses "many universe" approach to systematics: For a single event, a histogram's bin counts are re-calculated in each user-defined universe, subject to cuts or event weights. Resulting systematics and histogram algebra/manipulation are handled and propagated. CVUniverse.h defines how variables are calculated in the central value. And in Systematics.h, user defines how those variables should behave differently in each universe.

Installation on mu2e gpvms

# standard mu2e setup
cd /your/working/directory
mu2einit
setup mu2e
muse setup TrkAna v05_00_00

# the MAT
git clone https://github.com/MinervaExpt/MAT.git
mkdir -p opt/build && cd opt/build
cmake ../../MAT -DCMAKE_INSTALL_PREFIX=`pwd`/.. -DCMAKE_BUILD_TYPE=Release
make install #-j 4
source setup_MAT.sh 
cd ../..

# get some tutorial trkana files
mkdir filelists
setup dhtools
samListLocations -d --defname=nts.mu2e.CeEndpointMix1BBSignal.Tutorial_2024_03.tka > filelists/nts.mu2e.CeEndpointMix1BBSignal.Tutorial_2024_03.list

# download this repo and run the loop
git clone https://github.com/bamesserly/mu2e-mat.git
cd mu2e-mat/
root -l -q -b load.C+ runEventLoop.C+

Output

Events vs demmc.nhits Fractional error

mu2e-mat's People

Contributors

bamesserly avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.