Skip to content

Instantly share code, notes, and snippets.

View mickypaganini's full-sized avatar

Michela Paganini mickypaganini

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mickypaganini
mickypaganini / MLAnalysis_HGam_h008.ipynb
Created November 6, 2015 14:55
Old ipynb with results for trained models on centralized HGam h008 MxAODs (modified folder names for root file loading)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mickypaganini
mickypaganini / deltaR.py
Created December 18, 2015 09:35
function to compute the distance deltaR between two objects given their eta and phi coordinates
def deltaR(eta1, eta2, phi1, phi2):
import math
'''
Definition:
-----------
Function that calculates DR between two objects given their etas and phis
Args:
-----
eta1 = float, eta of first object
eta2 = float, eta of second object
@mickypaganini
mickypaganini / set_atlas.py
Created December 18, 2015 09:53
Set ATLAS style while plotting in matplotlib
from rootpy.plotting.style import set_style
set_style('ATLAS', mpl=True)
@mickypaganini
mickypaganini / non_param_fit.ipynb
Created December 18, 2015 10:08
Non-parametric curve fitting using Kernel Density Estimation and peak finding
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from root_numpy.tmva import add_classification_events, evaluate_reader
from rootpy.io import root_open
from rootpy import stl, log
from rootpy.tree import Tree
from rootpy.vector import Vector3, LorentzVector
from ROOT import TMVA, TFile
import xml.etree.ElementTree as ET
from array import array
import pandas as pd
import pandautils as pup