Skip to content

Instantly share code, notes, and snippets.

View mattleblanc's full-sized avatar
🎉
"if you ain't boostin', you ain't livin'"

Matt LeBlanc mattleblanc

🎉
"if you ain't boostin', you ain't livin'"
View GitHub Profile
# standard library imports
from __future__ import absolute_import, division, print_function
# standard numerical library imports
import numpy as np
# matplotlib is required for this example
import matplotlib.pyplot as plt
# matplotlib inline
'''
xAH_LundAnalysis.py
An xAODAnaHelpers config to run studies on the jet Lund Plane, for HCW 2018.
Matt LeBlanc (Arizona), matt.leblanc@cern.ch
Cluster-level systematics tool implemented by J. Roloff (Harvard)
(link)
Original Lund Plane code from F. Dreyer
https://github.com/rappoccio/fastjet-tutorial
# standard library imports
from __future__ import absolute_import, division, print_function
# standard numerical library imports
import numpy as np
from numpy import stack, vstack, hstack, hsplit
import matplotlib.pyplot as plt
import math
[[ 1.0779756e-01 -1.5096217e+00 8.2120484e-01]
[ 6.4470631e-01 -1.2379662e+00 6.7307860e-01]
[ 1.0247824e+00 -1.4674745e+00 9.3655944e-01]
[ 9.0748066e-01 -1.0875183e+00 7.4759513e-01]
[ 2.8884621e+00 -1.1018797e+00 9.3668556e-01]
[ 8.1364784e+00 -1.2544842e+00 8.5104781e-01]
[ 3.3919575e+00 -1.1915125e+00 9.4713718e-01]
[ 2.9960896e+01 -1.2121054e+00 9.4920963e-01]
[ 1.2441242e+01 -1.2245705e+00 8.8597697e-01]
[ 5.7293983e+00 -1.2214684e+00 8.9757460e-01]
import uproot
import h5py
import numpy as np
from tempfile import mkdtemp
import os
import argparse
# if we want multiple custom formatters, use inheriting
class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter):
http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDocDirectory/EventInfo_p4/html/
EventInfo_p4
| EventInfo_p4* ByteStreamEventInfo
--------------------
http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDocDirectory/xAODBTagging/html/
xAOD::BTaggingContainer
| xAOD::BTaggingContainer* BTagging_AntiKt2Track
| | &->getAttribute<vector<ElementLink<DataVector<xAOD::TrackParticle> > >>("BTagTrackToJetAssociator")
| | &->getAttribute<vector<ElementLink<DataVector<xAOD::TrackParticle> > >>("BTagTrackToJetAssociatorBB")
@mattleblanc
mattleblanc / disabledTile.info
Last active August 2, 2018 08:46
Contents of AODs with disabled tile modules
http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDocDirectory/CaloClusterCellLink_p1/html/
CaloClusterCellLinkContainer_p1
| CaloClusterCellLinkContainer_p1* egammaClusters_links
| CaloClusterCellLinkContainer_p1* InDetTrackParticlesAssociatedClusters_links
| CaloClusterCellLinkContainer_p1* MuonClusterCollection_links
--------------------
http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDocDirectory/CaloCompactCell/html/
CaloCompactCellContainer
| CaloCompactCellContainer* AODCellContainer
http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDocDirectory/PileUpEventInfo_p5/html/
PileUpEventInfo_p5
| PileUpEventInfo_p5* McEventInfo
--------------------
http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDocDirectory/xAODBTagging/html/
xAOD::BTaggingContainer
| xAOD::BTaggingContainer* BTagging_AntiKt4EMTopo
| | &->getAttribute<vector<ElementLink<DataVector<xAOD::TrackParticle> > >>("BTagTrackToJetAssociator")
| | &->getAttribute<vector<ElementLink<DataVector<xAOD::TrackParticle> > >>("BTagTrackToJetAssociatorBB")
#!/usr/bin/python
'''
Romain Madar's significance formula
see s7 here for more details:
https://indico.cern.ch/event/696609/contributions/2943410/attachments/1625903/2589232/Btagging.pdf
'''
import math
from optparse import OptionParser
@mattleblanc
mattleblanc / info.dump
Last active July 30, 2018 09:41
R21 E/p DAOD contents
http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDocDirectory/PileUpEventInfo_p5/html/
PileUpEventInfo_p5
| PileUpEventInfo_p5* McEventInfo
--------------------
http://atlas-computing.web.cern.ch/atlas-computing/links/nightlyDocDirectory/xAODEventInfo/html/
xAOD::EventInfo
| xAOD::EventInfo* EventInfo
| | Float_t &->actualInteractionsPerCrossing()
| | Float_t &->averageInteractionsPerCrossing()