This repository contains few examples in go, mostly connected to high energy physics (HEP). Mostly:
CLs
: computation of a stat-only CLs exclusion wikipediaplotting
: very short example of plots produced in golhe2root
: example of how to convert a LHE file into a ROOT filereading-root-ttree
: event loop based on aROOT::TTree
, the main HEP software.
LHE to ROOT - based on go-hep
LHE format is convention to store data from particle collision into an ASCI file. A LHE parser is available in go-hep and is used to create a TTree
for a 10000 proton-proton collisions leading to a top-antitop quark pair production.
Reading a TTree
- based on go-hep
In this example, the initial TTree
- stored in ttbar_0j_parton.root - was produced from a LHE file [arXiv:0609.017] describing 10000 proton-proton collisions leading to a top-antitop quark pair production, as predicted by MadGraph tool [arXiv:1405.0301], ran at the leading order.
These collisions are described at the parton level only and each event is described by
- partonic intial state: parton flavour and momentum
- partonic final state: 4-vectors for each particle in the decay
t->Wb->lvb
The program reading-root-ttree/main.go loads some variables of the TTree
, compute
some angular variables probing the spin correlation between the top and the antitop quarks [e.g. arXiv:1612.07004]. These involves Lorentz transformation and simple geometrical calculations, and this progam relies then on the lorentzvector package. The commands
cd reading-root-ttree
go run ./main.go
will produce a ROOT file containing the new TTree
with 10 variables:
dphi_ll
: lab-frame angle between the two leptonsk, r, n
: the three 3-vectors of the spin basiscos(Theta[axis, lepton])
: 6 cosines for 3 axis and 2 leptons