Commit 2975a301 authored by David Blyth's avatar David Blyth

Updates across the board

parent 0ff99d4f
......@@ -2,4 +2,3 @@
*.proio
*.pdf
*.png
go.sum
......@@ -44,6 +44,7 @@ func main() {
p.X.Label.Text = "Mass (GeV)"
p.X.Tick.Marker = eicplot.PreciseTicks{NSuggestedTicks: 5}
p.Y.Tick.Marker = eicplot.PreciseTicks{NSuggestedTicks: 5}
p.Legend.Top = true
for i, filename := range flag.Args() {
hist := makeInvMassHist(filename)
......@@ -65,6 +66,7 @@ func main() {
}
p.Add(h)
p.Legend.Add(hist.Name(), h)
}
p.Save(6*vg.Inch, 4*vg.Inch, *output)
......@@ -72,6 +74,7 @@ func main() {
func makeInvMassHist(filename string) *hbook.H1D {
invMassHist := hbook.NewH1D(50, 2.9, 3.3)
invMassHist.Ann["name"] = filename
reader, err := proio.Open(filename)
if err != nil {
......
......@@ -4,24 +4,24 @@ require (
github.com/ajstarks/svgo v0.0.0-20181006003313-6ce6a3bcf6cd // indirect
github.com/awalterschulze/gographviz v0.0.0-20181013152038-b2885df04310 // indirect
github.com/cznic/mathutil v0.0.0-20181021201202-eba54fb065b7 // indirect
github.com/go-gl/gl v0.0.0-20181020191150-629e6eb0370b // indirect
github.com/go-gl/gl v0.0.0-20181026044259-55b76b7df9d2 // indirect
github.com/go-gl/glfw v0.0.0-20181014061658-691ee1b84c51 // indirect
github.com/hanwen/go-fuse v0.0.0-20181015130005-a53ed6b9b54d // indirect
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf // indirect
github.com/hanwen/go-fuse v0.0.0-20181027161220-c029b69a13a7 // indirect
github.com/llgcode/draw2d v0.0.0-20180825133448-f52c8a71aff0 // indirect
github.com/pborman/uuid v1.2.0 // indirect
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/pkg/profile v1.2.1
github.com/proio-org/go-proio v0.4.0
github.com/proio-org/go-proio-pb v0.0.0-20181010213421-017d1def0591
github.com/ulikunitz/xz v0.5.5 // indirect
go-hep.org/x/hep v0.15.0
golang.org/x/crypto v0.0.0-20181024171144-74cb1d3d52f4 // indirect
golang.org/x/exp v0.0.0-20181022080537-42ba7d4b6eb2 // indirect
golang.org/x/image v0.0.0-20181023232108-9b1e201e7c4c // indirect
golang.org/x/mobile v0.0.0-20181010163405-92f3b9caf7ba // indirect
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519 // indirect
golang.org/x/sys v0.0.0-20181024145615-5cd93ef61a7c // indirect
golang.org/x/tools v0.0.0-20181024171208-a2dc47679d30 // indirect
gonum.org/v1/gonum v0.0.0-20181019200927-f0982070f509 // indirect
gonum.org/v1/netlib v0.0.0-20181018051557-57e1e4db57a7 // indirect
gonum.org/v1/plot v0.0.0-20181024024241-4632fe2bf7c6
golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd // indirect
golang.org/x/exp v0.0.0-20181106170214-d68db9428509 // indirect
golang.org/x/image v0.0.0-20181102021609-63626fb251ce // indirect
golang.org/x/mobile v0.0.0-20181026062114-a27dd33d354d // indirect
golang.org/x/sys v0.0.0-20181106135930-3a76605856fd // indirect
golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac // indirect
gonum.org/v1/gonum v0.0.0-20181106105144-6439751d3175 // indirect
gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6 // indirect
gonum.org/v1/plot v0.0.0-20181106102004-0582252c54f6
)
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af h1:wVe6/Ea46ZMeNkQjjBW6xcqyQA/j5e0D6GytH95g0gQ=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/ajstarks/svgo v0.0.0-20181006003313-6ce6a3bcf6cd h1:JdtityihAc6A+gVfYh6vGXfZQg+XOLyBvla/7NbXFCg=
github.com/ajstarks/svgo v0.0.0-20181006003313-6ce6a3bcf6cd/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/awalterschulze/gographviz v0.0.0-20180704132352-49969fe6eded/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs=
github.com/awalterschulze/gographviz v0.0.0-20180813113015-16ed621cdb51/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs=
github.com/awalterschulze/gographviz v0.0.0-20181013152038-b2885df04310/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs=
github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8=
github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg=
github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc=
github.com/cznic/internal v0.0.0-20180608152220-f44710a21d00/go.mod h1:olo7eAdKwJdXxb55TKGLiJ6xt1H0/tiiRCWKVLmtjY4=
github.com/cznic/lldb v1.1.0/go.mod h1:FIZVUmYUVhPwRiPzL8nD/mpFcJ/G7SSXjjXYG4uRI3A=
github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM=
github.com/cznic/mathutil v0.0.0-20181021201202-eba54fb065b7/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM=
github.com/cznic/ql v1.2.0/go.mod h1:FbpzhyZrqr0PVlK6ury+PoW3T0ODUV22OeWIxcaOrSE=
github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ=
github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc=
github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc/go.mod h1:Y1SNZ4dRUOKXshKUbwUapqNncRrho4mkjQebgEHZLj8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/go-gl/gl v0.0.0-20180407155706-68e253793080/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk=
github.com/go-gl/gl v0.0.0-20181026044259-55b76b7df9d2/go.mod h1:482civXOzJJCPzJ4ZOX/pwvXBWSnzD4OKMdH4ClKGbk=
github.com/go-gl/glfw v0.0.0-20180426074136-46a8d530c326/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw v0.0.0-20181014061658-691ee1b84c51/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gonuts/binary v0.1.0 h1:oVfskRjTSl2f9M2HYtX64IPzXaDvXbBQHCwUI6jfAtk=
github.com/gonuts/binary v0.1.0/go.mod h1:4CAt43hCGBSSZzDSCpAN4hErmhJgDVcby8PrQLghc4o=
github.com/gonuts/commander v0.1.0/go.mod h1:qkb5mSlcWodYgo7vs8ulLnXhfinhZsZcm6+H/z1JjgY=
github.com/gonuts/flag v0.1.0/go.mod h1:ZTmTGtrSPejTo/SRNhCqwLTmiAgyBdCkLYhHrAoBdz4=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/shlex v0.0.0-20150127133951-6f45313302b9/go.mod h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE=
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf/go.mod h1:RpwtwJQFrIEPstU94h88MWPXP2ektJZ8cZ0YntAmXiE=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hanwen/go-fuse v0.0.0-20180727080243-8393ebf1f669/go.mod h1:4ZJ05v9yt5k/mcFkGvSPKJB5T8G/6nuumL63ZqlrPvI=
github.com/hanwen/go-fuse v0.0.0-20180831115513-1d35017e9701/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok=
github.com/hanwen/go-fuse v0.0.0-20181027161220-c029b69a13a7/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok=
github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
github.com/jung-kurt/gofpdf v1.0.0 h1:EroSdlP9BOoL5ssLYf3uLJXhCQMMM2fFxCJDKA3RhnA=
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/llgcode/draw2d v0.0.0-20180124133339-274031cf2abe/go.mod h1:th5ThsEAha37D8D9FbfhLvGuf04dR1aM0mgdYs+XHto=
github.com/llgcode/draw2d v0.0.0-20180817132918-587a55234ca2 h1:3xDkT1Tbsw2yDtKWUrROAlr15+dzp76kwucDvAPPnQo=
github.com/llgcode/draw2d v0.0.0-20180817132918-587a55234ca2/go.mod h1:mVa0dA29Db2S4LVqDYLlsePDzRJLDfdhVZiI15uY0FA=
github.com/llgcode/draw2d v0.0.0-20180825133448-f52c8a71aff0 h1:2vp6ESimuT8pCuZHThVyV0hlfa9oPL06HnGCL9pbUgc=
github.com/llgcode/draw2d v0.0.0-20180825133448-f52c8a71aff0/go.mod h1:mVa0dA29Db2S4LVqDYLlsePDzRJLDfdhVZiI15uY0FA=
github.com/llgcode/ps v0.0.0-20150911083025-f1443b32eedb/go.mod h1:1l8ky+Ew27CMX29uG+a2hNOKpeNYEQjjtiALiBlFQbY=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/pborman/uuid v0.0.0-20180122190007-c65b2f87fee3/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
github.com/pborman/uuid v0.0.0-20180827223501-4c1ecd6722e8/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/peterh/liner v0.0.0-20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
github.com/peterh/liner v1.1.0/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
github.com/pierrec/lz4 v2.0.3+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4 v2.0.4-0.20180826165652-dbe9298ce099+incompatible h1:XtKvvsvNaQSc3fh9mBqTTVhbxNsLPk9XmA7o3U5VJvI=
github.com/pierrec/lz4 v2.0.4-0.20180826165652-dbe9298ce099+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/xxHash v0.1.1/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/proio-org/go-proio v0.4.0 h1:/FSFvLpR4RcpQ+/VlvFqly3pVClz+gQKp/JowZkOIyo=
github.com/proio-org/go-proio v0.4.0/go.mod h1:+AyqWcBUJicQp081iSmUXlZr15flX8Ds7a6xmSMvLuQ=
github.com/proio-org/go-proio-pb v0.0.0-20181010213421-017d1def0591 h1:37YHMzRa6umdcGbqgdeGfFkJ3/qS7EjrFKtHDQ46OA8=
github.com/proio-org/go-proio-pb v0.0.0-20181010213421-017d1def0591/go.mod h1:gbdLvpbwav5ue7P0Lkp5Nk2lKRHpVhchedmPETO0qxg=
github.com/sbinet/npyio v0.1.0/go.mod h1:4R3nG9dzbDyCrB5GYzuu4gshDM/smHtOabnlLvH4nKI=
github.com/sbinet/npyio v0.2.0/go.mod h1:Wk81yG1hlHgHAy4KXRQ59EfpZoAzT+2V4Pjyv7rUEM0=
github.com/smira/lzma v0.0.0-20160124201817-7f0af6269940 h1:z3NJMtzxmGxEs+RUxFpp3jxuFzeG2ihp6jZ0FZi75Wc=
github.com/smira/lzma v0.0.0-20160124201817-7f0af6269940/go.mod h1:zmVvOLLLFrvqaEvoz1i14UoaNPVg8ge70IA/NblPfw8=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchrcom/testify v1.2.2/go.mod h1:zUrQijuLcfRPyrWG6SBFjct9CuJZz2Ybtack4DGF2Jo=
github.com/ulikunitz/xz v0.5.4/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
go-hep.org/x/exp v0.0.0-20180802154217-6d993ac81a11 h1:g7VVU92t9wO0Q8OkoyodPHaQIxcXgbkoFr5tQS9c8Bw=
go-hep.org/x/exp v0.0.0-20180802154217-6d993ac81a11/go.mod h1:laR3d9r+2P9cHBEfp0Pa1m/Fe4Xc6nAsk8Pxk5+BEr4=
go-hep.org/x/hep v0.14.0/go.mod h1:w6Kf562FIV9x8Qw+GYICq6d47obkLyEdzsdQkbYyETY=
go-hep.org/x/hep v0.15.0 h1:3Ppdn7k02MAOu4fLLBij1dmQaSQAIetvWiElLct5Kxc=
go-hep.org/x/hep v0.15.0/go.mod h1:N1C/ufKFTfhlUoU+oM0PSr2Ng7/fcAJGMEm0oqbDE58=
golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181106171534-e4dc69e5b2fd/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180710024300-14dda7b62fcd/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f h1:9kQ594xxPWRNKfTOnPjPcgrIJ19zM3ic57aI7PbMyAA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20181106170214-d68db9428509 h1:k21GX33vzpH/syMF7TgrLxe8ILtvwbyuHtEO3ebR82E=
golang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81 h1:00VmoueYNlNz/aHIilyyQz/MHSqGoWJzpFv/HW8xpzI=
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/image v0.0.0-20181102021609-63626fb251ce h1:9baQ83qLsketF/x2bdSUNelOJfCgswFxV8yNnV/+6II=
golang.org/x/image v0.0.0-20181102021609-63626fb251ce/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
golang.org/x/mobile v0.0.0-20180719123216-371a4e8cb797/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20180829074904-fe88d2776746 h1:WN+fy6dItHyyj8B+LCeAbX8Y0BuPi9meM2Rt04zEzTM=
golang.org/x/mobile v0.0.0-20180829074904-fe88d2776746/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20181026062114-a27dd33d354d h1:DuZZDdMFwDrzmycNhCaWSve7Vh+BIrjm7ttgb4fD3Os=
golang.org/x/mobile v0.0.0-20181026062114-a27dd33d354d/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/sys v0.0.0-20180801221139-3dc4335d56c7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181106135930-3a76605856fd/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181105230042-78dc5bac0cac/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gonum.org/v1/gonum v0.0.0-20180525204857-c75679ee1eff/go.mod h1:cucAdkem48eM79EG1fdGOGASXorNZIYAO9duTse+1cI=
gonum.org/v1/gonum v0.0.0-20180716103638-023b8e605abb/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.0.0-20180802100750-85c178576af8/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.0.0-20180905072443-36be7e6faa5b h1:yOR3TJ+694F19LAYORgTkF48Qbz9Jw8vjk/dqcs5IGo=
gonum.org/v1/gonum v0.0.0-20180905072443-36be7e6faa5b/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.0.0-20181106105144-6439751d3175 h1:Hx3PbcYkQX1G1xglwPhGZxee1r+55vA9UBBKB/xo7xE=
gonum.org/v1/gonum v0.0.0-20181106105144-6439751d3175/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/netlib v0.0.0-20180816165226-ebcc3d2662d3/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/plot v0.0.0-20180724132003-e0f807cd8606/go.mod h1:9lTB+d5GQ6jxxXQJwo+5H0W80Esv9xbU0OgYPz9ikqY=
gonum.org/v1/plot v0.0.0-20180905080458-5f3c436ce602/go.mod h1:VIQWjXleEHakKVLjfhAAXUy3mq0NuXvobpOBf0ZBZro=
gonum.org/v1/plot v0.0.0-20181106102004-0582252c54f6 h1:REYXj45m5S6aslp97dEUcsrm3/z5UfEUzKXQJZIbspU=
gonum.org/v1/plot v0.0.0-20181106102004-0582252c54f6/go.mod h1:VIQWjXleEHakKVLjfhAAXUy3mq0NuXvobpOBf0ZBZro=
gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo=
gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q=
gopkg.in/jcmturner/goidentity.v2 v2.0.0/go.mod h1:vCwK9HeXksMeUmQ4SxDd1tRz4LejrKh3KRVjQWhjvZI=
gopkg.in/jcmturner/gokrb5.v5 v5.3.0/go.mod h1:oQz8Wc5GsctOTgCVyKad1Vw4TCWz5G6gfIQr88RPv4k=
gopkg.in/jcmturner/rpc.v0 v0.0.2/go.mod h1:NzMq6cRzR9lipgw7WxRBHNx5N8SifBuaCQsOT1kWY/E=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
......@@ -19,7 +19,7 @@ import (
)
func printUsage() {
fmt.Fprintf(os.Stderr, `Usage: `+os.Args[0]+` [options] <proio-input-file>
fmt.Fprintf(os.Stderr, `Usage: `+os.Args[0]+` [options] <proio-input-files>...
options:
`,
......@@ -45,10 +45,15 @@ func main() {
p.X.Tick.Marker = eicplot.PreciseTicks{NSuggestedTicks: 5}
p.Y.Tick.Marker = eicplot.LogTicks{}
p.Y.Scale = eicplot.LogScale{}
p.Legend.Top = true
var hists []*hbook.H1D
for _, filename := range flag.Args() {
hists = append(hists, makeHists(filename)...)
for i, filename := range flag.Args() {
if i < len(flag.Args())-1 {
hists = append(hists, makeHists(filename)[0])
} else {
hists = append(hists, makeHists(filename)...)
}
}
for i, hist := range hists {
......@@ -68,6 +73,7 @@ func main() {
h.Infos.Style = hplot.HInfoNone
p.Add(h)
p.Legend.Add(hist.Name(), h)
}
p.Save(6*vg.Inch, 4*vg.Inch, *output)
......@@ -77,7 +83,9 @@ const jpsiMass = 3.096916
func makeHists(filename string) []*hbook.H1D {
deltaPTHist := hbook.NewH1D(50, 0, 4)
deltaPTHist.Ann["name"] = filename + ": reconstructed"
deltaPTTruthHist := hbook.NewH1D(50, 0, 4)
deltaPTTruthHist.Ann["name"] = "truth"
reader, err := proio.Open(filename)
if err != nil {
......@@ -120,5 +128,5 @@ func makeHists(filename string) []*hbook.H1D {
}
reader.Close()
return []*hbook.H1D{deltaPTTruthHist, deltaPTHist}
return []*hbook.H1D{deltaPTHist, deltaPTTruthHist}
}
package main
import (
"flag"
"fmt"
"image/color"
"log"
"math"
"os"
"github.com/proio-org/go-proio"
"github.com/proio-org/go-proio-pb/model/eic"
"go-hep.org/x/hep/hbook"
"go-hep.org/x/hep/hplot"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
"eicweb.phy.anl.gov/EIC/eicplot"
)
func printUsage() {
fmt.Fprintf(os.Stderr, `Usage: `+os.Args[0]+` [options] <proio-input-files>...
options:
`,
)
flag.PrintDefaults()
}
func main() {
var (
title = flag.String("title", "", "plot title")
output = flag.String("output", "out.png", "output file")
)
flag.Usage = printUsage
flag.Parse()
if flag.NArg() < 1 {
printUsage()
log.Fatal("Invalid arguments")
}
p, _ := plot.New()
p.Title.Text = *title
p.X.Label.Text = "p_T^2 of J/Psi (GeV^2)"
p.X.Tick.Marker = eicplot.PreciseTicks{NSuggestedTicks: 5}
p.Y.Tick.Marker = eicplot.LogTicks{}
p.Y.Scale = eicplot.LogScale{}
p.Legend.Top = true
var hists []*hbook.H1D
for i, filename := range flag.Args() {
if i < len(flag.Args())-1 {
hists = append(hists, makeHists(filename)[0])
} else {
hists = append(hists, makeHists(filename)...)
}
}
for i, hist := range hists {
lineColor := color.RGBA{A: 255}
switch i {
case 1:
lineColor = color.RGBA{G: 255, A: 255}
case 2:
lineColor = color.RGBA{B: 255, A: 255}
case 3:
lineColor = color.RGBA{R: 255, B: 127, G: 127, A: 255}
}
h := hplot.NewH1D(hist)
h.FillColor = nil
h.LineStyle.Color = lineColor
h.Infos.Style = hplot.HInfoNone
p.Add(h)
p.Legend.Add(hist.Name(), h)
}
p.Save(6*vg.Inch, 4*vg.Inch, *output)
}
const jpsiMass = 3.096916
func makeHists(filename string) []*hbook.H1D {
jPsiPTHist := hbook.NewH1D(50, -1, 4)
jPsiPTHist.Ann["name"] = filename + ": reconstructed"
reader, err := proio.Open(filename)
if err != nil {
log.Fatal(err)
}
for event := range reader.ScanEvents(10) {
// reconstructed
ids := event.TaggedEntries("Reconstructed")
tracks := []*eic.Track{}
for _, id := range ids {
track, ok := event.GetEntry(id).(*eic.Track)
if ok && len(track.Segment) > 0 {
tracks = append(tracks, track)
}
}
if len(tracks) == 2 {
var p [2]float64
for _, track := range tracks {
p[0] += *track.Segment[0].Poq.X
p[1] += *track.Segment[0].Poq.Y
}
t := math.Pow(p[0], 2) + math.Pow(p[1], 2)
jPsiPTHist.Fill(t, 1)
}
}
reader.Close()
return []*hbook.H1D{jPsiPTHist}
}
func pSquareD(p *eic.XYZD) float64 {
px2 := math.Pow(float64(*p.X), 2)
py2 := math.Pow(float64(*p.Y), 2)
pz2 := math.Pow(float64(*p.Z), 2)
return px2 + py2 + pz2
}
func pSquareF(p *eic.XYZF) float64 {
px2 := math.Pow(float64(*p.X), 2)
py2 := math.Pow(float64(*p.Y), 2)
pz2 := math.Pow(float64(*p.Z), 2)
return px2 + py2 + pz2
}
......@@ -19,7 +19,7 @@ import (
)
func printUsage() {
fmt.Fprintf(os.Stderr, `Usage: `+os.Args[0]+` [options] <proio-input-file>
fmt.Fprintf(os.Stderr, `Usage: `+os.Args[0]+` [options] <proio-input-files>...
options:
`,
......@@ -45,10 +45,15 @@ func main() {
p.X.Tick.Marker = eicplot.PreciseTicks{NSuggestedTicks: 5}
p.Y.Tick.Marker = eicplot.LogTicks{}
p.Y.Scale = eicplot.LogScale{}
p.Legend.Top = true
var hists []*hbook.H1D
for _, filename := range flag.Args() {
hists = append(hists, makeHists(filename)...)
for i, filename := range flag.Args() {
if i < len(flag.Args())-1 {
hists = append(hists, makeHists(filename)[0])
} else {
hists = append(hists, makeHists(filename)...)
}
}
for i, hist := range hists {
......@@ -68,6 +73,7 @@ func main() {
h.Infos.Style = hplot.HInfoNone
p.Add(h)
p.Legend.Add(hist.Name(), h)
}
p.Save(6*vg.Inch, 4*vg.Inch, *output)
......@@ -77,8 +83,9 @@ const jpsiMass = 3.096916
func makeHists(filename string) []*hbook.H1D {
tHist := hbook.NewH1D(50, -1, 4)
tPTruthHist := hbook.NewH1D(50, -1, 4)
tETruthHist := hbook.NewH1D(50, -1, 4)
tHist.Ann["name"] = filename + ": reconstructed"
tTruthHist := hbook.NewH1D(50, -1, 4)
tTruthHist.Ann["name"] = "truth"
reader, err := proio.Open(filename)
if err != nil {
......@@ -110,44 +117,36 @@ func makeHists(filename string) []*hbook.H1D {
tHist.Fill(t, 1)
}
// truth
ids = event.TaggedEntries("GenStable")
protons := []*eic.Particle{}
leptons := []*eic.Particle{}
nonprotons := []*eic.Particle{}
for _, id := range ids {
part, ok := event.GetEntry(id).(*eic.Particle)
if ok {
if *part.Pdg == 2212 {
protons = append(protons, part)
} else if *part.Pdg == 11 || *part.Pdg == -11 {
leptons = append(leptons, part)
if *part.Pdg != 2212 {
nonprotons = append(nonprotons, part)
}
}
}
if len(protons) == 1 {
t := math.Pow(float64(*protons[0].P.X), 2) + math.Pow(float64(*protons[0].P.Y), 2) + math.Pow(float64(*protons[0].P.Z-100.), 2) // 100 GeV p+ beam
t -= math.Pow(math.Sqrt(pSquareF(protons[0].P)+math.Pow(float64(*protons[0].Mass), 2))-100., 2)
tPTruthHist.Fill(t, 1)
}
if len(leptons) == 3 {
if len(nonprotons) == 3 {
var p [4]float64
p[2] += 5. // 5 GeV e- beam
p[3] -= 5.
for _, lepton := range leptons {
p[0] += float64(*lepton.P.X)
p[1] += float64(*lepton.P.Y)
p[2] += float64(*lepton.P.Z)
p[3] += math.Sqrt(pSquareF(lepton.P))
for _, part := range nonprotons {
p[0] += float64(*part.P.X)
p[1] += float64(*part.P.Y)
p[2] += float64(*part.P.Z)
p[3] += math.Sqrt(pSquareF(part.P) + math.Pow(float64(*part.Mass), 2))
}
t := math.Pow(p[0], 2) + math.Pow(p[1], 2) + math.Pow(p[2], 2)
t -= math.Pow(p[3], 2)
tETruthHist.Fill(t, 1)
tTruthHist.Fill(t, 1)
}
}
reader.Close()
return []*hbook.H1D{tPTruthHist, tETruthHist, tHist}
return []*hbook.H1D{tHist, tTruthHist}
}
func pSquareD(p *eic.XYZD) float64 {
......
package main
import (
"flag"
"fmt"
"image/color"
"log"
"math"
"os"
"github.com/proio-org/go-proio"
"github.com/proio-org/go-proio-pb/model/eic"
"go-hep.org/x/hep/hbook"
"go-hep.org/x/hep/hplot"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
"eicweb.phy.anl.gov/EIC/eicplot"
)
func printUsage() {
fmt.Fprintf(os.Stderr, `Usage: `+os.Args[0]+` [options] <proio-input-files>...
options:
`,
)
flag.PrintDefaults()
}
func main() {
var (
title = flag.String("title", "", "plot title")
output = flag.String("output", "out.png", "output file")
)
flag.Usage = printUsage
flag.Parse()
if flag.NArg() < 1 {
printUsage()
log.Fatal("Invalid arguments")
}
p, _ := plot.New()
p.Title.Text = *title
p.X.Label.Text = "Mass (GeV)"
p.X.Tick.Marker = eicplot.PreciseTicks{NSuggestedTicks: 5}
p.Y.Tick.Marker = eicplot.PreciseTicks{NSuggestedTicks: 5}
for i, filename := range flag.Args() {
hist := makeInvMassHist(filename)
lineColor := color.RGBA{A: 255}
switch i {
case 1:
lineColor = color.RGBA{G: 255, A: 255}
case 2:
lineColor = color.RGBA{B: 255, A: 255}
case 3:
lineColor = color.RGBA{R: 255, B: 127, G: 127, A: 255}
}
h := hplot.NewH1D(hist)
h.LineStyle.Color = lineColor
if len(flag.Args()) == 1 {
h.Infos.Style = hplot.HInfoSummary
}
p.Add(h)
}
p.Save(6*vg.Inch, 4*vg.Inch, *output)
}
func makeInvMassHist(filename string) *hbook.H1D {
invMassHist := hbook.NewH1D(50, 2.9, 3.3)
reader, err := proio.Open(filename)
if err != nil {
log.Fatal(err)
}
for event := range reader.ScanEvents(10) {
ids := event.TaggedEntries("Reconstructed")
tracks := []*eic.Track{}
for _, id := range ids {
track, ok := event.GetEntry(id).(*eic.Track)
if ok && len(track.Segment) > 0 {
tracks = append(tracks, track)
}
}
for i := 0; i < len(tracks); i++ {
for j := i + 1; j < len(tracks); j++ {
if (*tracks[i].Segment[0].Chargesign)*(*tracks[j].Segment[0].Chargesign) > 0 {
continue
}
poqi := tracks[i].Segment[0].Poq
poqj := tracks[j].Segment[0].Poq
p := []float64{*poqi.X + *poqj.X, *poqi.Y + *poqj.Y, *poqi.Z + *poqj.Z}
p2 := math.Pow(p[0], 2) + math.Pow(p[1], 2) + math.Pow(p[2], 2)
Ei := math.Sqrt(math.Pow(*poqi.X, 2) + math.Pow(*poqi.Y, 2) + math.Pow(*poqi.Z, 2) + math.Pow(0.105658, 2))
Ej := math.Sqrt(math.Pow(*poqj.X, 2) + math.Pow(*poqj.Y, 2) + math.Pow(*poqj.Z, 2) + math.Pow(0.105658, 2))
E2 := math.Pow(Ei+Ej, 2)
// eta := math.Atanh(p[2] / math.Sqrt(p2))
invMass := math.Sqrt(E2 - p2)
if invMass > 2.9 && invMass < 3.3 {
invMassHist.Fill(invMass, 1)
}
}
}
}
reader.Close()
return invMassHist
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment