Commit 6e1d2046 authored by David Blyth's avatar David Blyth

trackpull: added argument for setting pull limit for color map

parent 79ebce0a
...@@ -20,13 +20,14 @@ import ( ...@@ -20,13 +20,14 @@ import (
) )
var ( var (
pTMin = flag.Float64("minpt", 0.5, "minimum transverse momentum") pTMin = flag.Float64("minpt", 0.5, "minimum transverse momentum")
pTMax = flag.Float64("maxpt", 30, "maximum transverse momentum") pTMax = flag.Float64("maxpt", 30, "maximum transverse momentum")
etaLimit = flag.Float64("etalimit", 4, "maximum absolute value of eta") etaLimit = flag.Float64("etalimit", 4, "maximum absolute value of eta")
nBinsPT = flag.Int("nbinspt", 10, "number of bins in transverse momentum") pullLimit = flag.Float64("pulllimit", 0.1, "maximum momentum pull in the color map")
nBinsEta = flag.Int("nbinseta", 10, "number of bins in eta") nBinsPT = flag.Int("nbinspt", 10, "number of bins in transverse momentum")
title = flag.String("title", "", "plot title") nBinsEta = flag.Int("nbinseta", 10, "number of bins in eta")
output = flag.String("output", "out.png", "output file") title = flag.String("title", "", "plot title")
output = flag.String("output", "out.png", "output file")
) )
func printUsage() { func printUsage() {
...@@ -125,11 +126,11 @@ func main() { ...@@ -125,11 +126,11 @@ func main() {
dc1 := draw.Crop(dc, 620, 0, 0, 0) dc1 := draw.Crop(dc, 620, 0, 0, 0)
colorMap := moreland.SmoothBlueRed() colorMap := moreland.SmoothBlueRed()
colorMap.SetMin(0.99) colorMap.SetMin(1.0 - *pullLimit)
colorMap.SetMax(1.01) colorMap.SetMax(1.0 + *pullLimit)
heatMap := plotter.NewHeatMap(resGrid, colorMap.Palette(1000)) heatMap := plotter.NewHeatMap(resGrid, colorMap.Palette(1000))
heatMap.Min = 0.99 heatMap.Min = 1.0 - *pullLimit
heatMap.Max = 1.01 heatMap.Max = 1.0 + *pullLimit
p.Add(heatMap) p.Add(heatMap)
p.Draw(dc0) p.Draw(dc0)
......
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