Giter Site home page Giter Site logo

roofitter's Introduction

roofitter

This program runs RooFit on a TTree. The user can define cuts, observables and pdfs for their analysis with a fhicl file.

Clone the Repository

To download a version:

git clone https://github.com/AndrewEdmonds11/roofitter.git

Setup

To setup (on a mu2egpvm machine):

setup mu2e

source setup.sh

If not working on a mu2egpvm machine, you will need to be able to see Mu2e Offline releases on cvmfs and do your equivalent of "setup mu2e"

Compilation

To compile:

scons -j4

Example

roofitter does not need to run on TrkAna trees, but we will use one for this example:

mu2e -c $MU2E_BASE_RELEASE/TrkDiag/fcl/TrkAnaRecoEnsemble-Data.fcl -s ensemble-file.art --TFileName trkana.root

To fit the momentum spectrum we can use this example:

roofitter -c Main/fcl/example.fcl -i trkana-file.root -t TrkAnaNeg/trkana -o ana.root

And you can plot the result:

root -l Main/scripts/plot_cemDio_mom.C("ana.root")

More Details

If you open up example.fcl, you will see that we #include two files specific to TrkAna:

obs_leaves_trkana.fcl -- defines the leaves for the observables cuts_cd3_trkana.fcl -- defines the leaves for the cut variables

The analysis itself is defined in ana_cemDio_mom.fcl. It is worth noting that in a single run of roofitter, you can run more than one analysis by adding to the line:

analyses : [ @local::cemDio_mom ]

in example.fcl.

If you look in ana_cemDio_mom.fcl, you will see that we #include files to define the observable and components of this analysis.

  • the observable file defines histogram limits, and possible efficiency and resolution functions for the variable
  • the component file defines possible truth PDFs for the component for a given observable

Back in the ana_cemDIO_mom.fcl file, we define the observables ("mom") and components ("cemLL" and "dioPol58") that we want as well as the cuts ("AllCD3Cuts").

Finally, we define the full model that we want to fit. Note that the PDF names for each component are:

  • true PDF name + observable + "EffResp"

where "EffResp" is if you want the efficiency and resolution effects included.

Input Arguments

 -c, --config [cfg file]: input configuration file
 -i, --input [root file]: input ROOT file containing the tree (overrides anything in cfg file)
 -t, --tree [tree name]: tree name (inc. directory) in the input file (overrides anything in cfg file)
 -o, --output [root file]: output ROOT file that will be created (overrides anything in cfg file)
 -d, --debug-config [filename]: print out the final config file to file
 -h, --help: print this help message

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.