Skip to content
Snippets Groups Projects
Commit 51b155ae authored by Takashi Yamanaka's avatar Takashi Yamanaka
Browse files

Merge branch 'removeConfigMacro_master' into 'master'

Fix ATLASRECTS-3960

Closes ATLASRECTS-3960

See merge request !1071
parents 3d9d779e df63cfb1
No related branches found
No related tags found
No related merge requests found
Showing
with 635 additions and 175 deletions
...@@ -37,5 +37,5 @@ atlas_add_component( MuonPhysValMonitoring ...@@ -37,5 +37,5 @@ atlas_add_component( MuonPhysValMonitoring
LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaMonitoringLib xAODBase xAODCore xAODEventInfo xAODMuon xAODTracking xAODTrigMuon xAODTrigger xAODTruth MuonHistUtils IsolationSelectionLib MuonSelectorToolsLib MuonCombinedToolInterfaces TrkToolInterfaces TrkValHistUtils TrigDecisionToolLib ) LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaMonitoringLib xAODBase xAODCore xAODEventInfo xAODMuon xAODTracking xAODTrigMuon xAODTrigger xAODTruth MuonHistUtils IsolationSelectionLib MuonSelectorToolsLib MuonCombinedToolInterfaces TrkToolInterfaces TrkValHistUtils TrigDecisionToolLib )
# Install files from the package: # Install files from the package:
atlas_install_scripts( macros/*.py macros/*.sh macros/*.C ) atlas_install_scripts( macros/MuonValidation_*.py macros/MuonValidation_*.sh )
...@@ -44,7 +44,7 @@ private ...@@ -44,7 +44,7 @@ private
## default is to make component library ## default is to make component library
library MuonPhysValMonitoring *.cxx components/*.cxx library MuonPhysValMonitoring *.cxx components/*.cxx
apply_pattern declare_scripts files="-s=$(MuonPhysValMonitoring_root)/macros *.py *.sh *.C" apply_pattern declare_scripts files="-s=$(MuonPhysValMonitoring_root)/macros MuonValidation_*.py MuonValidation_*.sh"
#macro_append cppflags ' -std=c++11 ' #macro_append cppflags ' -std=c++11 '
#macro_append use_linkopts ' -std=c++11 ' #macro_append use_linkopts ' -std=c++11 '
......
...@@ -71,6 +71,5 @@ def main( args ): ...@@ -71,6 +71,5 @@ def main( args ):
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
if __name__ == "__main__": if __name__ == "__main__":
ROOT.gROOT.Macro("rootlogon.C")
ROOT.gROOT.SetBatch() ROOT.gROOT.SetBatch()
main( sys.argv ) main( sys.argv )
...@@ -5,7 +5,7 @@ import os ...@@ -5,7 +5,7 @@ import os
from array import array from array import array
import itertools import itertools
import ROOT import ROOT
from CreateResolutionProfiles import * from MuonValidation_CreateResolutionProfiles import *
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
...@@ -76,6 +76,5 @@ def main( args ): ...@@ -76,6 +76,5 @@ def main( args ):
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
if __name__ == "__main__": if __name__ == "__main__":
ROOT.gROOT.Macro("rootlogon.C")
ROOT.gROOT.SetBatch() ROOT.gROOT.SetBatch()
main( sys.argv ) main( sys.argv )
...@@ -223,6 +223,5 @@ def main( args ): ...@@ -223,6 +223,5 @@ def main( args ):
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
if __name__ == "__main__": if __name__ == "__main__":
ROOT.gROOT.Macro("rootlogon.C")
ROOT.gROOT.SetBatch() ROOT.gROOT.SetBatch()
main( sys.argv ) main( sys.argv )
...@@ -8,7 +8,7 @@ import sys ...@@ -8,7 +8,7 @@ import sys
import os import os
import argparse import argparse
from commands import getstatusoutput from commands import getstatusoutput
from config import * from MuonValidation_CreateSlides_config import *
############################################################################# #############################################################################
...@@ -305,6 +305,6 @@ if __name__ == "__main__": ...@@ -305,6 +305,6 @@ if __name__ == "__main__":
print( 'INFO This program requires Python version 2.7 or greater' ) print( 'INFO This program requires Python version 2.7 or greater' )
exit(1) exit(1)
ROOT.gROOT.Macro("rootlogon.C") #ROOT.gROOT.Macro("rootlogon.C")
ROOT.gROOT.SetBatch() ROOT.gROOT.SetBatch()
main() main()
...@@ -14,13 +14,13 @@ tmpfile=$inputfile.temp.root ...@@ -14,13 +14,13 @@ tmpfile=$inputfile.temp.root
# showing overall efficiency, resolution, scale, etc. # showing overall efficiency, resolution, scale, etc.
## Creates efficiency and other ratio plots ## Creates efficiency and other ratio plots
#CreateEffAndRecoFracPlots.py $tmpfile #doAverage #MuonValidation_CreateEffAndRecoFracPlots.py $tmpfile #doAverage
## Creates pt resolution and pt scale plots. doBinned option makes res plots for each bin in 2D hists ## Creates pt resolution and pt scale plots. doBinned option makes res plots for each bin in 2D hists
CreateResolutionProfiles.py $tmpfile #doAverage doBinned MuonValidation_CreateResolutionProfiles.py $tmpfile #doAverage doBinned
## Creates profiles of pull plots over pt ## Creates profiles of pull plots over pt
#CreatePullProfiles.py $tmpfile #doAverage #MuonValidation_CreatePullProfiles.py $tmpfile #doAverage
## Normalizes all plots to unity (for comparisons). MUST RUN AFTER EFFICIENCY MACROS!!! OTHERWISE EFFICIENCY WILL BE WRONG!!!! ## Normalizes all plots to unity (for comparisons). MUST RUN AFTER EFFICIENCY MACROS!!! OTHERWISE EFFICIENCY WILL BE WRONG!!!!
# normalizator.py $tmpfile # normalizator.py $tmpfile
......
...@@ -14,6 +14,8 @@ import re ...@@ -14,6 +14,8 @@ import re
import os import os
import math import math
LABELS = []
def GoToDirectory(directory): def GoToDirectory(directory):
cwd = os.getcwd() cwd = os.getcwd()
print os.getcwd() print os.getcwd()
...@@ -52,20 +54,21 @@ class Validator(object): ...@@ -52,20 +54,21 @@ class Validator(object):
self.CompareFunc = compareFunc self.CompareFunc = compareFunc
self.DoNormalization = normalization self.DoNormalization = normalization
def CompareFiles(self,reference, test, dirName): def CompareFiles(self, fileNames, dirName):
refFile = TFile.Open(reference) openedFiles = [ TFile.Open(f) for f in fileNames ]
testFile = TFile.Open(test) self.CompareDirectories(openedFiles, dirName)
self.CompareDirectories(refFile, testFile, dirName)
def CompareDirectories(self, refDir, testDir, dirName): def CompareDirectories(self, dirs, dirName):
if (self.structDirs): GoToDirectory(dirName) if (self.structDirs): GoToDirectory(dirName)
refDir = dirs[0]
newRefDir = refDir.GetDirectory(dirName) newRefDir = refDir.GetDirectory(dirName)
if not testDir: for testDir in dirs:
print 'ERROR --------- test dir not found: ', dirName if testDir == refDir: continue
newTestDir=0 if not testDir:
return print 'ERROR --------- test dir not found: ', dirName, testDir
else: return
newTestDir = testDir.GetDirectory(dirName)
newTestDirs = [ testDir.GetDirectory(dirName) for testDir in dirs ]
theDir = newRefDir theDir = newRefDir
# if not newRefDir: # if not newRefDir:
...@@ -73,7 +76,7 @@ class Validator(object): ...@@ -73,7 +76,7 @@ class Validator(object):
# theDir = newTestDir # theDir = newTestDir
for key in theDir.GetListOfKeys(): for key in theDir.GetListOfKeys():
obj = key.ReadObj() obj = key.ReadObj()
#2D histograms cannot be compared; skip #2D histograms cannot be compared; skip
...@@ -82,28 +85,29 @@ class Validator(object): ...@@ -82,28 +85,29 @@ class Validator(object):
if obj.IsA().InheritsFrom(ROOT.TH1.Class()): if obj.IsA().InheritsFrom(ROOT.TH1.Class()):
print key.GetName() print key.GetName()
testHist = newTestDir.Get(key.GetName()) #testHist = newTestDir.Get(key.GetName())
if testHist: testHists = [ newTestDir.Get(key.GetName()) for newTestDir in newTestDirs ]
self.CompareHistograms(obj, testHist, newRefDir.GetPath()) self.CompareHistograms( testHists, newRefDir.GetPath())
elif obj.IsA().InheritsFrom(ROOT.TDirectory.Class()): elif obj.IsA().InheritsFrom(ROOT.TDirectory.Class()):
self.CompareDirectories(newRefDir, newTestDir, obj.GetName()) self.CompareDirectories( newTestDirs, obj.GetName())
if (self.structDirs): os.chdir("..") if (self.structDirs): os.chdir("..")
def CompareHistograms(self, refHist, testHist, path): def CompareHistograms(self, hists, path):
# print self.excludedStrings, refHist.GetName() # print self.excludedStrings, refHist.GetName()
# if any(exString in refHist.GetName() for exString in self.excludedStrings): # if any(exString in refHist.GetName() for exString in self.excludedStrings):
# print "Skipped " + path + "/" + refHist.GetName() # print "Skipped " + path + "/" + refHist.GetName()
# return # return
#@@@if self.CompareFunc(refHist, testHist): print path + refHist.GetName() + " looks ok" #@@@if self.CompareFunc(refHist, testHist): print path + refHist.GetName() + " looks ok"
#else: #else:
self.MakeComparisonPlot(refHist, testHist, path) #self.MakeComparisonPlot(refHist, testHist, path)
self.MakeComparisonPlot(hists, path)
def MakeComparisonPlot(self,refHist, testHist, path): #def MakeComparisonPlot(self,refHist, testHist, path):
def SetBounds(refHist, testHist, ymin=0, ymax=0): def MakeComparisonPlot(self, hists, path):
def SetBounds(hists, ymin=0, ymax=0):
if (ymin==0 and ymax==0): if (ymin==0 and ymax==0):
ymin = min(refHist.GetMinimum(), testHist.GetMinimum()) ymin = min( [ h.GetMinimum() for h in hists ] )
ymax = max(refHist.GetMaximum(), testHist.GetMaximum()) ymax = min( [ h.GetMaximum() for h in hists ] )
if ymin>0 and ymax>0: if ymin>0 and ymax>0:
ymin = 0 ymin = 0
else: else:
...@@ -112,11 +116,11 @@ class Validator(object): ...@@ -112,11 +116,11 @@ class Validator(object):
# if ymin<0 and ymax>0: # if ymin<0 and ymax>0:
# if ymax>0 and abs(minimum)>ymax: # if ymax>0 and abs(minimum)>ymax:
# ymax = -minimum # ymax = -minimum
refHist.SetMinimum(ymin) hists[0].SetMinimum(ymin)
refHist.SetMaximum(ymax) hists[0].SetMaximum(ymax)
return refHist return hists[0]
################################## end SetBounds ################################## end SetBounds
# try: # try:
# refHist.Scale(1.0/refHist.Integral()) # refHist.Scale(1.0/refHist.Integral())
# testHist.Scale(1.0/testHist.Integral()) # testHist.Scale(1.0/testHist.Integral())
...@@ -133,29 +137,37 @@ class Validator(object): ...@@ -133,29 +137,37 @@ class Validator(object):
padRatio.Draw() padRatio.Draw()
ROOT.TLine() ROOT.TLine()
padMain.cd() padMain.cd()
#leg = ROOT.TLegend(0.82,0.78,0.96,0.94) leg = ROOT.TLegend(0.82,0.78,0.96,0.94)
leg = ROOT.TLegend(0.8,0.76,0.96,0.94) #leg = ROOT.TLegend(0.52,0.76,0.96,0.94)
#leg.SetFillColor(ROOT.kWhite) #leg.SetFillColor(ROOT.kWhite)
leg.SetFillStyle(0) leg.SetFillStyle(0)
leg.SetBorderSize(0) leg.SetBorderSize(0)
leg.SetTextFont(43) leg.SetTextFont(43)
leg.SetTextSizePixels(32) leg.SetTextSizePixels(32)
leg.AddEntry(refHist, "ref", 'lp')
leg.AddEntry(testHist, "test",'lp') refHist = hists[0]
refHist.SetLineColor(17) refHist.SetLineColor(17)
#refHist.SetFillColor(30) #refHist.SetFillColor(30)
if self.DoNormalization and not "_Eff_" in refHist.GetName() and not "_eff" in refHist.GetName(): ## @@@ Legend!!!
i1 = 1.*refHist.Integral() #leg.AddEntry(hists[0], 'ref', 'lp')
i2 = 1.*testHist.Integral() #leg.AddEntry(hists[1], 'test', 'lp')
if i1>i2: #if len(hists)>2:
refHist.Scale(i2/i1) # for i in range(2,len(hists)):
elif i2>0: # leg.AddEntry(hists[i], 'test{0}'.format(i), 'lp')
testHist.Scale(i1/i2) for i in range(0,len(hists)):
leg.AddEntry(hists[i], LABELS[i], 'lp')
refHist = SetBounds(refHist, testHist)
if self.DoNormalization and not "_Eff_" in refHist.GetName() and not "_eff" in refHist.GetName() and not "_Eff" in refHist.GetName():
for h in hists:
n = h.Integral()
if n>0:
h.Scale(1./n)
for i in range (1,h.GetXaxis().GetNbins()+1):
h.SetBinError(i,h.GetBinError(i)/n);
refHist = SetBounds(hists)
ref_textsize = 32./(padMain.GetWh()*padMain.GetAbsHNDC()) ref_textsize = 32./(padMain.GetWh()*padMain.GetAbsHNDC())
refHist.GetYaxis().SetLabelSize( ref_textsize ) refHist.GetYaxis().SetLabelSize( ref_textsize )
...@@ -173,52 +185,80 @@ class Validator(object): ...@@ -173,52 +185,80 @@ class Validator(object):
#testHist.Rebin(2) #testHist.Rebin(2)
#refHist.Rebin(2); #refHist.Rebin(2);
histmax = refHist
if refHist.GetMaximum()>testHist.GetMaximum(): histmax.DrawCopy('e')
refHist.DrawCopy("e") # for h in hists:
testHist.DrawCopy("ehistsame") # if h.GetMaximum() > refHist.GetMaximum():
refHist.DrawCopy("ehistsame") # histmax = h
else: # if histmax == refHist:
testHist.DrawCopy("ehist") # histmax.DrawCopy("e")
refHist.DrawCopy("ehistsame") # else:
# histmax.DrawCopy("ehist")
nh=0
for h in hists:
if h is not histmax:
if h==refHist:
h.DrawCopy('histsame')
else:
nh=nh+1
if nh>1:
h.SetMarkerStyle(0)
h.SetMarkerColor(0)
h.SetLineColor(8) # green
h.SetLineStyle(ROOT.kDashed)
h.DrawCopy('ehistsame')
# if refHist.GetMaximum()>histmax.GetMaximum():
# refHist.DrawCopy("e")
# testHist.DrawCopy("ehistsame")
# refHist.DrawCopy("ehistsame")
# else:
# testHist.DrawCopy("ehist")
# refHist.DrawCopy("ehistsame")
leg.Draw() leg.Draw()
padRatio.cd() padRatio.cd()
ratioHist = testHist.Clone()
ratioHist.Divide(refHist)
#ratioHist = SetBounds(ratioHist, ratioHist, 0.84,1.16)
ratioHist = SetBounds(ratioHist, ratioHist, 0.941,1.059)
for i in range(ratioHist.GetNbinsX()):
nref = refHist.GetBinContent(i)
ntest = testHist.GetBinContent(i)
if nref == 0 or ntest == 0:
ratioHist.SetBinError(i, 0)
else:
#error = nref/ntest*math.sqrt((refHist.GetBinError(i)/nref)**2 + (testHist.GetBinError(i)/ntest)**2)
error = nref/ntest* max(refHist.GetBinError(i)/nref, testHist.GetBinError(i)/ntest)
ratioHist.SetBinError(i, error)
ratioHist_textsize = 32./(padRatio.GetWh()*padRatio.GetAbsHNDC()) for h in hists:
ratioHist.GetYaxis().SetLabelSize( ratioHist_textsize ) if h is refHist: continue
ratioHist.GetXaxis().SetLabelSize( ratioHist_textsize ) ratioHist = h.Clone()
ratioHist.GetXaxis().SetTitleSize( 1.2*ratioHist_textsize ) ratioHist.Divide(refHist)
ratioHist.GetXaxis().SetTitleOffset(0.75) ratioHist = SetBounds( [ratioHist, ratioHist], 0.84,1.16) # 0.941,1.059
ratioHist.GetXaxis().SetTitleColor(kAzure) for i in range(ratioHist.GetNbinsX()):
ratioHist.GetYaxis().SetTitleSize( ratioHist_textsize ) nref = refHist.GetBinContent(i)
ratioHist.GetYaxis().SetTitleOffset(0.6) ntest = h.GetBinContent(i)
if nref == 0 or ntest == 0:
ratioHist.SetBinError(i, 0)
else:
#error = nref/ntest*math.sqrt((refHist.GetBinError(i)/nref)**2 + (testHist.GetBinError(i)/ntest)**2)
error = nref/ntest* max(refHist.GetBinError(i)/nref, h.GetBinError(i)/ntest)
ratioHist.SetBinError(i, error)
ratioHist_textsize = 32./(padRatio.GetWh()*padRatio.GetAbsHNDC())
ratioHist.GetYaxis().SetLabelSize( ratioHist_textsize )
ratioHist.GetXaxis().SetLabelSize( ratioHist_textsize )
ratioHist.GetXaxis().SetTitleSize( 1.2*ratioHist_textsize )
ratioHist.GetXaxis().SetTitleOffset(0.75)
ratioHist.GetXaxis().SetTitleColor(kAzure)
ratioHist.GetYaxis().SetTitleSize( ratioHist_textsize )
ratioHist.GetYaxis().SetTitleOffset(0.6)
ratioHist.SetLineColor(ROOT.kBlack) ratioHist.SetLineColor(ROOT.kBlack)
ratioHist.SetMarkerStyle(24) ratioHist.SetMarkerStyle(24)
ratioHist.SetYTitle("test / ref") ratioHist.SetYTitle("test / ref")
ratioHist.Draw("p") if h == hists[1]:
ratioHist.DrawCopy("p")
lineRatio = ROOT.TLine( ratioHist.GetXaxis().GetXmin(), 1, lineRatio = ROOT.TLine( ratioHist.GetXaxis().GetXmin(), 1,
ratioHist.GetXaxis().GetXmax(), 1 ) ratioHist.GetXaxis().GetXmax(), 1 )
lineRatio.SetLineColor( ROOT.kRed ) lineRatio.SetLineColor( ROOT.kRed )
lineRatio.SetLineWidth( 2 ) lineRatio.SetLineWidth( 2 )
lineRatio.Draw("same") lineRatio.Draw("same")
else:
ratioHist.SetMarkerStyle(25)
ratioHist.SetMarkerColor(8)
ratioHist.SetLineColor(8)
ratioHist.DrawCopy("psame")
npath = "" npath = ""
if not self.structDirs: if not self.structDirs:
npath = path[path.find(":/")+2:] + "/" npath = path[path.find(":/")+2:] + "/"
...@@ -242,23 +282,43 @@ def main( argv ): ...@@ -242,23 +282,43 @@ def main( argv ):
parser = argparse.ArgumentParser( description = 'Distribution Plotter' ) parser = argparse.ArgumentParser( description = 'Distribution Plotter' )
parser.add_argument( '-s', '--structDirs', default = True, action = "store_true", help = ' if true, it creates directories following the same structure as in the root file to store the pdf plots') parser.add_argument( '-s', '--structDirs', default = True, action = "store_true", help = ' if true, it creates directories following the same structure as in the root file to store the pdf plots')
parser.add_argument( '-r', '--reference', help = 'bla' ) parser.add_argument( '-r', '--reference', help = 'The reference' )
parser.add_argument( '-t', '--test', help = 'Print cutflow' ) parser.add_argument( '-t', '--test', help = 'The test' )
parser.add_argument( '-t2', '--test2', default ='', help = 'The additional test' )
parser.add_argument( '-d', '--directory', default = "/", help = 'Print cutflow fror systematic variations' ) parser.add_argument( '-d', '--directory', default = "/", help = 'Print cutflow fror systematic variations' )
parser.add_argument( '-e', '--exclude', default = "_bin_", help = 'histograms whose names contain the provided strings are not examined') parser.add_argument( '-e', '--exclude', default = "_bin_", help = 'histograms whose names contain the provided strings are not examined')
parser.add_argument( '-n', '--normalize', default = False, action = "store_true", help = 'normalize histograms with larger stats for better comparison') parser.add_argument( '-n', '--normalize', default = False, action = "store_true", help = 'normalize histograms with larger stats for better comparison')
parser.add_argument( '-l', '--labels', default ='', help = 'Add text to legend for ref/test/test2, split with commas' )
args = parser.parse_args() args = parser.parse_args()
#ROOT.gROOT.Macro("rootlogon.C") #ROOT.gROOT.Macro("rootlogon.C")
ROOT.gROOT.SetBatch() ROOT.gROOT.SetBatch()
#ROOT.gROOT.LoadMacro("./AtlasUtils.C") #ROOT.gROOT.LoadMacro("./AtlasUtils.C")
ROOT.gROOT.LoadMacro("./AtlasStyle.C") ROOT.gROOT.LoadMacro("./AtlasStyle.C")
ROOT.TH1.SetDefaultSumw2(ROOT.kTRUE)
SetAtlasStyle()
SetAtlasStyle()
LABELS = []
if args.labels is '':
LABELS = [ 'Ref','Test' ]
if args.test2 is not '':
LABELS.append( 'Test2' )
else:
LABELS = args.labels.split(",")
#print LABELS
# if you want to pass labels to legend directly from the file name...:
#LABELS.append( args.test.split('.')[2]+' '+args.test.split('.')[3] )
#
validator = Validator( args.structDirs, args.exclude, SameHist, args.normalize ) validator = Validator( args.structDirs, args.exclude, SameHist, args.normalize )
validator.CompareFiles(os.path.abspath(args.reference), os.path.abspath(args.test), args.directory) if args.test2 == '':
#validator.CompareFiles(os.path.abspath(args.test), os.path.abspath(args.reference), args.directory) allFiles = [ os.path.abspath(args.reference), os.path.abspath(args.test) ]
else:
allFiles = [ os.path.abspath(args.reference), os.path.abspath(args.test), os.path.abspath(args.test2) ]
#====================================================================== #======================================================================
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "xAODTrigMuon/L2CombinedMuonContainer.h" #include "xAODTrigMuon/L2CombinedMuonContainer.h"
#include "xAODTrigMuon/L2CombinedMuon.h" #include "xAODTrigMuon/L2CombinedMuon.h"
#include "xAODMuon/SlowMuon.h"
// Tools // Tools
#include "MuonSelectorTools/IMuonSelectionTool.h" #include "MuonSelectorTools/IMuonSelectionTool.h"
#include "TrigDecisionTool/TrigDecisionTool.h" #include "TrigDecisionTool/TrigDecisionTool.h"
...@@ -41,11 +43,12 @@ ...@@ -41,11 +43,12 @@
#include "TriggerMuonValidationPlots.h" #include "TriggerMuonValidationPlots.h"
#include "MuonTrackValidationPlots.h" #include "MuonTrackValidationPlots.h"
#include "MuonSegmentValidationPlots.h" #include "MuonSegmentValidationPlots.h"
#include "SlowMuonValidationPlots.h"
// Forward declaration // Forward declaration
namespace Rec { namespace Rec {
class IMuonPrintingTool; class IMuonPrintingTool;
} }
namespace MuonPhysValMonitoring { namespace MuonPhysValMonitoring {
class MuonPhysValMonitoringTool class MuonPhysValMonitoringTool
...@@ -90,7 +93,8 @@ class MuonPhysValMonitoringTool ...@@ -90,7 +93,8 @@ class MuonPhysValMonitoringTool
/// Default constructor: /// Default constructor:
MuonPhysValMonitoringTool(); MuonPhysValMonitoringTool();
void handleMuon(const xAOD::Muon* mu); void handleMuon(const xAOD::Muon* mu,const xAOD::SlowMuon *smu=0);
void handleSlowMuon(const xAOD::SlowMuon *smu);
void handleTruthMuon(const xAOD::TruthParticle* truthMu); void handleTruthMuon(const xAOD::TruthParticle* truthMu);
void handleMuonTrack(const xAOD::TrackParticle* tp, xAOD::Muon::TrackParticleType type); void handleMuonTrack(const xAOD::TrackParticle* tp, xAOD::Muon::TrackParticleType type);
void handleMuonSegment(const xAOD::MuonSegment* muSeg); void handleMuonSegment(const xAOD::MuonSegment* muSeg);
...@@ -109,6 +113,7 @@ class MuonPhysValMonitoringTool ...@@ -109,6 +113,7 @@ class MuonPhysValMonitoringTool
StatusCode bookValidationPlots(PlotBase& valPlots); StatusCode bookValidationPlots(PlotBase& valPlots);
const xAOD::Muon* findRecoMuon(const xAOD::TruthParticle* truthMu); const xAOD::Muon* findRecoMuon(const xAOD::TruthParticle* truthMu);
const xAOD::SlowMuon* findRecoSlowMuon(const xAOD::TruthParticle* truthMu);
const xAOD::MuonSegment* findRecoMuonSegment(const xAOD::MuonSegment* truthMuSeg); const xAOD::MuonSegment* findRecoMuonSegment(const xAOD::MuonSegment* truthMuSeg);
xAOD::Muon* getCorrectedMuon(const xAOD::Muon &mu); xAOD::Muon* getCorrectedMuon(const xAOD::Muon &mu);
...@@ -126,6 +131,7 @@ class MuonPhysValMonitoringTool ...@@ -126,6 +131,7 @@ class MuonPhysValMonitoringTool
std::string m_tracksName; std::string m_tracksName;
std::string m_fwdtracksName; std::string m_fwdtracksName;
std::string m_muonsName; std::string m_muonsName;
std::string m_slowMuonsName;
std::string m_muonsTruthName; std::string m_muonsTruthName;
std::string m_muonTracksName; std::string m_muonTracksName;
std::string m_muonExtrapolatedTracksName; std::string m_muonExtrapolatedTracksName;
...@@ -170,6 +176,7 @@ class MuonPhysValMonitoringTool ...@@ -170,6 +176,7 @@ class MuonPhysValMonitoringTool
std::vector<std::string> m_selectMuonCategoriesStr; std::vector<std::string> m_selectMuonCategoriesStr;
MuonPhysValMonitoringTool::MUCATEGORY getMuonSegmentTruthCategory(const xAOD::MuonSegment* truthMuSeg, const xAOD::TruthParticleContainer* muonTruthContainer); MuonPhysValMonitoringTool::MUCATEGORY getMuonSegmentTruthCategory(const xAOD::MuonSegment* truthMuSeg, const xAOD::TruthParticleContainer* muonTruthContainer);
MuonPhysValMonitoringTool::MUCATEGORY getMuonTruthCategory(const xAOD::IParticle* prt); MuonPhysValMonitoringTool::MUCATEGORY getMuonTruthCategory(const xAOD::IParticle* prt);
MuonPhysValMonitoringTool::MUCATEGORY getMuonTruthCategory(const xAOD::Muon* prt);
bool passesAcceptanceCuts(const xAOD::IParticle* prt); bool passesAcceptanceCuts(const xAOD::IParticle* prt);
float deltaR(const xAOD::IParticle* prt1, const xAOD::IParticle* prt2); float deltaR(const xAOD::IParticle* prt1, const xAOD::IParticle* prt2);
void SplitString(TString x, TString delim, std::vector<TString> &v); void SplitString(TString x, TString delim, std::vector<TString> &v);
...@@ -189,6 +196,8 @@ class MuonPhysValMonitoringTool ...@@ -189,6 +196,8 @@ class MuonPhysValMonitoringTool
Muon::RecoMuonTrackPlotOrganizer* m_oUnmatchedRecoMuonTrackPlots; Muon::RecoMuonTrackPlotOrganizer* m_oUnmatchedRecoMuonTrackPlots;
Muon::MuonSegmentPlots* m_oUnmatchedRecoMuonSegmentPlots; Muon::MuonSegmentPlots* m_oUnmatchedRecoMuonSegmentPlots;
std::vector<SlowMuonValidationPlots*> m_slowMuonValidationPlots;
//overview hists //overview hists
std::vector<TH1F*> h_overview_nObjects; std::vector<TH1F*> h_overview_nObjects;
TH1F* h_overview_reco_category; TH1F* h_overview_reco_category;
...@@ -200,10 +209,10 @@ class MuonPhysValMonitoringTool ...@@ -200,10 +209,10 @@ class MuonPhysValMonitoringTool
std::vector<const xAOD::TruthParticle*> m_vMatchedTruthMuons; std::vector<const xAOD::TruthParticle*> m_vMatchedTruthMuons;
std::vector<const xAOD::Muon*> m_vMatchedMuons; std::vector<const xAOD::Muon*> m_vMatchedMuons;
std::vector<const xAOD::SlowMuon*> m_vMatchedSlowMuons;
std::vector<const xAOD::TrackParticle*> m_vMatchedMuonTracks; std::vector<const xAOD::TrackParticle*> m_vMatchedMuonTracks;
std::vector<const xAOD::MuonSegment*> m_vMatchedMuonSegments; std::vector<const xAOD::MuonSegment*> m_vMatchedMuonSegments;
std::vector<const xAOD::TrackParticle*> m_vZmumuIDTracks; std::vector<const xAOD::TrackParticle*> m_vZmumuIDTracks;
std::vector<const xAOD::TrackParticle*> m_vZmumuMSTracks;
std::vector<const xAOD::TrackParticle*> m_vZmumuMETracks; std::vector<const xAOD::TrackParticle*> m_vZmumuMETracks;
std::vector<const xAOD::Muon*> m_vZmumuMuons; std::vector<const xAOD::Muon*> m_vZmumuMuons;
std::vector<const xAOD::Muon*> m_vEFMuons; std::vector<const xAOD::Muon*> m_vEFMuons;
......
...@@ -8,9 +8,8 @@ ...@@ -8,9 +8,8 @@
typedef ElementLink< xAOD::TrackParticleContainer > TrackLink; typedef ElementLink< xAOD::TrackParticleContainer > TrackLink;
typedef ElementLink< xAOD::MuonContainer > MuonLink; typedef ElementLink< xAOD::MuonContainer > MuonLink;
MuonValidationPlots::MuonValidationPlots(PlotBase* pParent, std::string sDir,std::vector<int> wps,std::vector<unsigned int> authors, bool isData, bool doBinnedResolutionPlots, bool /*doMuonTree*/): MuonValidationPlots::MuonValidationPlots(PlotBase* pParent, std::string sDir,std::vector<int> wps,std::vector<unsigned int> authors, bool isData, bool doBinnedResolutionPlots, bool doSeparateSAFMuons, bool /*doMuonTree*/):
PlotBase(pParent, sDir), m_selectedWPs(wps), m_selectedAuthors(authors), m_truthSelections(2,""), m_oTruthRelatedMuonPlots(NULL), m_isData(isData) PlotBase(pParent, sDir), m_selectedWPs(wps), m_selectedAuthors(authors), m_truthSelections(2,""), m_oTruthRelatedMuonPlots(NULL), m_isData(isData), m_doSeparateSAFMuons(doSeparateSAFMuons)
{ {
if (!m_isData) { if (!m_isData) {
m_truthSelections[0] = "all"; //no selection on truth muons (minimum selection is |eta|<2.5, pt>5 GeV, defined in MuonPhysValMonitoringTool::handleTruthMuon() m_truthSelections[0] = "all"; //no selection on truth muons (minimum selection is |eta|<2.5, pt>5 GeV, defined in MuonPhysValMonitoringTool::handleTruthMuon()
...@@ -48,13 +47,24 @@ MuonValidationPlots::MuonValidationPlots(PlotBase* pParent, std::string sDir,std ...@@ -48,13 +47,24 @@ MuonValidationPlots::MuonValidationPlots(PlotBase* pParent, std::string sDir,std
//define a histogram class for each of the selected muon authors (+one inclusive for all authors) //define a histogram class for each of the selected muon authors (+one inclusive for all authors)
for (unsigned int i=0; i<m_selectedAuthors.size(); i++) { for (unsigned int i=0; i<m_selectedAuthors.size(); i++) {
std::string sAuthor = Muon::EnumDefs::toString( (xAOD::Muon::Author) m_selectedAuthors[i] ); std::string sAuthor = Muon::EnumDefs::toString( (xAOD::Muon::Author) m_selectedAuthors[i] );
if (sAuthor=="CaloTag") sAuthor="CaloTagTight";
m_oRecoMuonPlots_perAuthor.push_back(new Muon::RecoMuonPlotOrganizer(this, "reco/"+sAuthor, (sAuthor=="MuidCo")? &allPlotCategories: &selectedPlotCategories)); m_oRecoMuonPlots_perAuthor.push_back(new Muon::RecoMuonPlotOrganizer(this, "reco/"+sAuthor, (sAuthor=="MuidCo")? &allPlotCategories: &selectedPlotCategories));
if (!m_isData) m_oTruthRelatedMuonPlots_perAuthor.push_back(new Muon::TruthRelatedMuonPlotOrganizer(this, "matched/"+sAuthor, doBinnedResolutionPlots)); if (!m_isData) m_oTruthRelatedMuonPlots_perAuthor.push_back(new Muon::TruthRelatedMuonPlotOrganizer(this, "matched/"+sAuthor, doBinnedResolutionPlots));
} }
//define histogram class for SiliconAssociatedForwardMuons //define histogram class for loose CaloTag and append to author plots, not very nice workaround though
m_oRecoMuonPlots_SiAssocFwrdMu.push_back(new Muon::RecoMuonPlotOrganizer(this, "reco/SiAssocForward", &selectedPlotCategories)); for (unsigned int i=0; i<m_selectedAuthors.size(); i++) {
if (!m_isData) m_oTruthRelatedMuonPlots_SiAssocFwrdMu.push_back(new Muon::TruthRelatedMuonPlotOrganizer(this, "matched/SiAssocForward", doBinnedResolutionPlots)); if ((xAOD::Muon::Author) m_selectedAuthors[i]==xAOD::Muon::CaloTag){ //found CaloTag in list, also do CaloTagLoose
m_oRecoMuonPlots_perAuthor.push_back(new Muon::RecoMuonPlotOrganizer(this, "reco/CaloTagLoose", &selectedPlotCategories));
if (!m_isData) m_oTruthRelatedMuonPlots_perAuthor.push_back(new Muon::TruthRelatedMuonPlotOrganizer(this, "matched/CaloTagLoose", doBinnedResolutionPlots));
}
}
//define histogram class for SiliconAssociatedForwardMuons
if (m_doSeparateSAFMuons) {
m_oRecoMuonPlots_SiAssocFwrdMu.push_back(new Muon::RecoMuonPlotOrganizer(this, "reco/SiAssocForward", &selectedPlotCategories));
if (!m_isData) m_oTruthRelatedMuonPlots_SiAssocFwrdMu.push_back(new Muon::TruthRelatedMuonPlotOrganizer(this, "matched/SiAssocForward", doBinnedResolutionPlots));
}
} }
...@@ -122,14 +132,19 @@ void MuonValidationPlots::fillRecoMuonPlots(const xAOD::Muon& mu) ...@@ -122,14 +132,19 @@ void MuonValidationPlots::fillRecoMuonPlots(const xAOD::Muon& mu)
if (ipar<11) continue; if (ipar<11) continue;
} }
//filter SiliconAssociatedForwardMuons //filter SiliconAssociatedForwardMuons
if (mu.muonType()!=(xAOD::Muon::MuonType) xAOD::Muon::SiliconAssociatedForwardMuon) m_oRecoMuonPlots_perAuthor[i]->fill(mu); if (mu.muonType()!=(xAOD::Muon::MuonType)xAOD::Muon::SiliconAssociatedForwardMuon || !m_doSeparateSAFMuons) m_oRecoMuonPlots_perAuthor[i]->fill(mu);
} }
} }
//fill SiliconAssociatedForwardMuons //fill SiliconAssociatedForwardMuons
for (unsigned int i=0; i<m_oTruthRelatedMuonPlots_SiAssocFwrdMu.size();i++){ for (unsigned int i=0; i<m_oTruthRelatedMuonPlots_SiAssocFwrdMu.size();i++){
if (mu.muonType()==(xAOD::Muon::MuonType) xAOD::Muon::SiliconAssociatedForwardMuon) m_oRecoMuonPlots_SiAssocFwrdMu[i]->fill(mu); if (mu.muonType()==(xAOD::Muon::MuonType) xAOD::Muon::SiliconAssociatedForwardMuon) m_oRecoMuonPlots_SiAssocFwrdMu[i]->fill(mu);
} }
//fill CaloTagLoose (one additional plot in plot list)
unsigned int counter= m_selectedAuthors.size();
if ( counter+1==m_oRecoMuonPlots_perAuthor.size()){
if (mu.isAuthor(xAOD::Muon::CaloTag)) m_oRecoMuonPlots_perAuthor[counter]->fill(mu);
}
} }
void MuonValidationPlots::fillTruthMuonPlots(const xAOD::TruthParticle &truthMu) void MuonValidationPlots::fillTruthMuonPlots(const xAOD::TruthParticle &truthMu)
...@@ -160,7 +175,7 @@ void MuonValidationPlots::fill(const xAOD::TruthParticle* truthMu, const xAOD::M ...@@ -160,7 +175,7 @@ void MuonValidationPlots::fill(const xAOD::TruthParticle* truthMu, const xAOD::M
m_oTruthRelatedMuonPlots->fill(*truthMu, *mu, MSTracks); m_oTruthRelatedMuonPlots->fill(*truthMu, *mu, MSTracks);
//fill SiliconAssociatedForwardMuons //fill SiliconAssociatedForwardMuons
for (unsigned int i=0; i<m_oTruthRelatedMuonPlots_SiAssocFwrdMu.size();i++){ for (unsigned int i=0; i<m_oTruthRelatedMuonPlots_SiAssocFwrdMu.size();i++){
if (mu->muonType()==xAOD::Muon::SiliconAssociatedForwardMuon) m_oTruthRelatedMuonPlots_SiAssocFwrdMu[i]->fill(*truthMu, *mu, MSTracks); if (mu->muonType()==xAOD::Muon::SiliconAssociatedForwardMuon || !m_doSeparateSAFMuons) m_oTruthRelatedMuonPlots_SiAssocFwrdMu[i]->fill(*truthMu, *mu, MSTracks);
} }
//plots per quality //plots per quality
...@@ -179,9 +194,14 @@ void MuonValidationPlots::fill(const xAOD::TruthParticle* truthMu, const xAOD::M ...@@ -179,9 +194,14 @@ void MuonValidationPlots::fill(const xAOD::TruthParticle* truthMu, const xAOD::M
if (ipar<11) continue; if (ipar<11) continue;
} }
//filter SilicionAssociatedForwardMuons //filter SilicionAssociatedForwardMuons
if (mu->muonType()!=xAOD::Muon::SiliconAssociatedForwardMuon) m_oTruthRelatedMuonPlots_perAuthor[i]->fill(*truthMu, *mu, MSTracks); if (mu->muonType()!=xAOD::Muon::SiliconAssociatedForwardMuon || !m_doSeparateSAFMuons) m_oTruthRelatedMuonPlots_perAuthor[i]->fill(*truthMu, *mu, MSTracks);
} }
} }
//fill CaloTagLoose (one additional plot in plot list)
unsigned int counter= m_selectedAuthors.size();
if ( counter+1==m_oRecoMuonPlots_perAuthor.size()){
if (mu->isAuthor(xAOD::Muon::CaloTag)) m_oTruthRelatedMuonPlots_perAuthor[counter]->fill(*truthMu, *mu, MSTracks);
}
} }
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
class MuonValidationPlots:public PlotBase { class MuonValidationPlots:public PlotBase {
public: public:
MuonValidationPlots(PlotBase* pParent, std::string sDir, std::vector<int> wps, std::vector<unsigned int> authors, bool isData, bool doBinnedResolutionPlots, bool doMuonTree=false ); MuonValidationPlots(PlotBase* pParent, std::string sDir, std::vector<int> wps, std::vector<unsigned int> authors, bool isData, bool doBinnedResolutionPlots, bool doSplitSAFMuons, bool doMuonTree=false );
virtual ~MuonValidationPlots(); virtual ~MuonValidationPlots();
void fill(const xAOD::Muon& mu); void fill(const xAOD::Muon& mu);
...@@ -43,7 +43,7 @@ class MuonValidationPlots:public PlotBase { ...@@ -43,7 +43,7 @@ class MuonValidationPlots:public PlotBase {
void fillTruthMuonPlots(const xAOD::TruthParticle &truthMu); void fillTruthMuonPlots(const xAOD::TruthParticle &truthMu);
bool m_isData; bool m_isData;
bool m_doSeparateSAFMuons;
}; };
#endif #endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "SlowMuonValidationPlots.h"
#include "MuonHistUtils/MuonEnumDefs.h"
#include <iostream>
typedef ElementLink< xAOD::MuonContainer > MuonLink;
SlowMuonValidationPlots::SlowMuonValidationPlots(PlotBase* pParent, std::string sDir, bool isData):
PlotBase(pParent, sDir), m_isData(isData)
{
//histogram classes for all muons
m_oSlowMuonRecoPlots = new Muon::SlowMuonParamPlots(this, "reco/AllMuons/parameters/");
if (!m_isData) m_oSlowMuonMatchedPlots = new Muon::SlowMuonParamPlots(this, "matched/AllMuons/parameters/");
}
SlowMuonValidationPlots::~SlowMuonValidationPlots()
{
delete m_oSlowMuonRecoPlots;
m_oSlowMuonRecoPlots = 0;
if (!m_isData) {
delete m_oSlowMuonMatchedPlots;
m_oSlowMuonMatchedPlots = 0;
}
}
void SlowMuonValidationPlots::fill(const xAOD::SlowMuon& smu, const xAOD::Muon& mu)
{
fillRecoMuonPlots(smu,mu);
}
void SlowMuonValidationPlots::fill( const xAOD::TruthParticle* truthMu, const xAOD::SlowMuon* smu, const xAOD::Muon* mu )
{
if (smu) fillRecoMuonPlots(*smu,*mu);
if ( (smu) && (truthMu) ) {
m_oSlowMuonMatchedPlots->fill(*smu);
}
}
void SlowMuonValidationPlots::fillRecoMuonPlots(const xAOD::SlowMuon& smu, const xAOD::Muon& /*mu*/)
{
//fill hists for all muons
m_oSlowMuonRecoPlots->fill(smu);
}
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONPHYSVALMONITORING_SLOWMUONVALIDATIONPLOTS_H
#define MUONPHYSVALMONITORING_SLOWMUONVALIDATIONPLOTS_H
#include "xAODTruth/TruthParticle.h"
#include "xAODMuon/SlowMuon.h"
#include "MuonHistUtils/SlowMuonParamPlots.h"
class SlowMuonValidationPlots:public PlotBase
{
public:
SlowMuonValidationPlots(PlotBase* pParent, std::string sDir, bool isData);
virtual ~SlowMuonValidationPlots();
void fill(const xAOD::SlowMuon& smu, const xAOD::Muon& mu);
void fill(const xAOD::TruthParticle *truthMu, const xAOD::SlowMuon *smu, const xAOD::Muon* mu);
Muon::SlowMuonParamPlots* m_oSlowMuonRecoPlots;
Muon::SlowMuonParamPlots* m_oSlowMuonMatchedPlots;
private:
void fillRecoMuonPlots(const xAOD::SlowMuon& smu, const xAOD::Muon& mu);
void fillMatchedMuonPlots(const xAOD::SlowMuon& smu, const xAOD::Muon& mu);
bool m_isData;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONHISTUTILS_MUONPARAMELOSSPLOTS_H
#define MUONHISTUTILS_MUONPARAMELOSSPLOTS_H
#include "TrkValHistUtils/PlotBase.h"
#include "xAODMuon/Muon.h"
#include "xAODTruth/TruthParticle.h"
#include <string>
namespace Muon{
class MuonParamElossPlots: public PlotBase
{
public:
MuonParamElossPlots(PlotBase *pParent, std::string sDir);
void fill(const xAOD::TruthParticle& truthMu, const xAOD::Muon& mu);
TH1* msInnerMatchChi2;
TH1* msOuterMatchChi2;
TH1* ELoss;
TH1* ELossDiffTruth;
TH1* ELossDiffTruthEta0_1p35;
TH1* ELossDiffTruthEta1p35_1p55;
TH1* ELossDiffTruthEta1p55_end;
TH1* ELossSigma;
TH1* paramELoss;
TH1* paramELossDiff;
TH1* paramELossDiffTruth;
TH1* paramELossDiffTruthEta0_1p35;
TH1* paramELossDiffTruthEta1p35_1p55;
TH1* paramELossDiffTruthEta1p55_end;
TH1* measELoss;
TH1* measELossDiff;
TH1* measELossDiffTruth;
TH1* measELossDiffTruthEta0_1p35;
TH1* measELossDiffTruthEta1p35_1p55;
TH1* measELossDiffTruthEta1p55_end;
TH1* ELossType;
TH1* ELossTypeParametrPt;
TH1* ELossTypeNotIsoPt;
TH1* ELossTypeTailPt;
TH1* ELossTypeAllPt;
private:
void initializePlots();
void FillPlot(TH1* hist, const xAOD::Muon& mu,const xAOD::Muon::ParamDef paramDef,float scale=1);
void FillPlot(TH1* hist, TH1* hist_DiffTruth, TH1* hist_DiffTruthEta0_1p35, TH1* hist_DiffTruthEta1p35_1p55, TH1* hist_DiffTruthEta1p55_endd, const xAOD::TruthParticle& truthMu, const xAOD::Muon& mu, const xAOD::Muon::ParamDef paramDef,float scale=1);
void FillPlotELossType(TH1* hist, const xAOD::Muon& mu,float scale=1);
void FillPlotELossType(TH1* hist, const xAOD::Muon& mu, xAOD::Muon::EnergyLossType type, float scale=1);
};
}
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONHISTUTILS_MUONTRUTHHITPLOTS_H
#define MUONHISTUTILS_MUONTRUTHHITPLOTS_H
#include "TrkValHistUtils/PlotBase.h"
#include "xAODMuon/Muon.h"
namespace Muon{
class MuonTruthHitPlots:public PlotBase {
public:
MuonTruthHitPlots(PlotBase* pParent, std::string sDir);
void fill(const xAOD::Muon& muon);
void fillPlot(TH1* hitPlots, const std::string& sInfo, const Muon::MuonStationIndex::ChIndex& index, const xAOD::Muon& muon);
void fillPlot(TH1* hitPlots, const std::string& sInfo, const Muon::MuonStationIndex::PhiIndex& index, const xAOD::Muon& muon);
void fillPlot(TH1* hitPlots, const std::string& sInfo, const xAOD::Muon& muon);
TH1* precMatchedHitsSummed;
TH1* precMatchedHitsBIS;
TH1* precMatchedHitsBIL;
TH1* precMatchedHitsBMS;
TH1* precMatchedHitsBML;
TH1* precMatchedHitsBOS;
TH1* precMatchedHitsBOL;
TH1* precMatchedHitsBEE;
TH1* precMatchedHitsEIS;
TH1* precMatchedHitsEIL;
TH1* precMatchedHitsEMS;
TH1* precMatchedHitsEML;
TH1* precMatchedHitsEOS;
TH1* precMatchedHitsEOL;
TH1* precMatchedHitsEES;
TH1* precMatchedHitsEEL;
TH1* precMatchedHitsCSS;
TH1* precMatchedHitsCSL;
TH1* phiMatchedHitsSummed;
TH1* phiMatchedHitsBM1;
TH1* phiMatchedHitsBM2;
TH1* phiMatchedHitsBO1;
TH1* phiMatchedHitsBO2;
TH1* phiMatchedHitsT1;
TH1* phiMatchedHitsT2;
TH1* phiMatchedHitsT3;
TH1* phiMatchedHitsT4;
TH1* phiMatchedHitsCSC;
TH1* trigEtaMatchedHitsSummed;
TH1* trigEtaMatchedHitsBM1;
TH1* trigEtaMatchedHitsBM2;
TH1* trigEtaMatchedHitsBO1;
TH1* trigEtaMatchedHitsBO2;
TH1* trigEtaMatchedHitsT1;
TH1* trigEtaMatchedHitsT2;
TH1* trigEtaMatchedHitsT3;
TH1* trigEtaMatchedHitsT4;
// TH1* trigEtaMatchedHitsCSC;
};
}
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MUONHISTUTILS_SLOWMUONPARAMPLOTS_H
#define MUONHISTUTILS_SLOWMUONPARAMPLOTS_H
#include "TrkValHistUtils/PlotBase.h"
#include "xAODMuon/SlowMuon.h"
namespace Muon{
class SlowMuonParamPlots: public PlotBase {
public:
SlowMuonParamPlots(PlotBase *pParent, std::string sDir);
void fill(const xAOD::SlowMuon& smu);
TH1* beta;
private:
void initializePlots();
};
}
#endif
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
#include "MuonHistUtils/MuonHitDiffSummaryPlots.h" #include "MuonHistUtils/MuonHitDiffSummaryPlots.h"
#include "MuonHistUtils/MuonResolutionPlots.h" #include "MuonHistUtils/MuonResolutionPlots.h"
#include "MuonHistUtils/MomentumTruthPullPlots.h" #include "MuonHistUtils/MomentumTruthPullPlots.h"
#include "MuonHistUtils/MuonParamElossPlots.h"
#include "MuonHistUtils/MuonTree.h" #include "MuonHistUtils/MuonTree.h"
#include "MuonHistUtils/MuonTruthHitPlots.h"
#include "TrkValHistUtils/DefParamPullPlots.h" #include "TrkValHistUtils/DefParamPullPlots.h"
#include "xAODMuon/Muon.h" #include "xAODMuon/Muon.h"
...@@ -20,7 +22,7 @@ ...@@ -20,7 +22,7 @@
namespace Muon namespace Muon
{ {
enum TRUTHRELATEDPLOTCLASS {TRK_MATCHEDTRUE,TRK_MATCHEDRECO,TRK_MSHITDIFF,MUON_HITDIFF,MUON_RESOL,TRK_DEFPARAMPULLS,MUON_PULLSTAIL,MUON_PULLSNOTAIL,MAX_TRUTHRELATEDPLOTCLASS}; enum TRUTHRELATEDPLOTCLASS {TRK_MATCHEDTRUE,TRK_MATCHEDRECO,TRK_MSHITDIFF,MUON_HITDIFF,MUON_TRUTHHIT,MUON_RESOL,TRK_DEFPARAMPULLS,MUON_PULLSTAIL,MUON_PULLSNOTAIL,MUON_PARAMELOSS,MAX_TRUTHRELATEDPLOTCLASS};
class TruthRelatedMuonPlotOrganizer:public PlotBase { class TruthRelatedMuonPlotOrganizer:public PlotBase {
public: public:
...@@ -39,10 +41,12 @@ namespace Muon ...@@ -39,10 +41,12 @@ namespace Muon
Trk::ParamPlots *m_oMatchedRecoPlots; Trk::ParamPlots *m_oMatchedRecoPlots;
Trk::MSHitDiffPlots *m_oMSHitDiffPlots; Trk::MSHitDiffPlots *m_oMSHitDiffPlots;
Muon::MuonHitDiffSummaryPlots *m_oMuonHitDiffSummaryPlots; Muon::MuonHitDiffSummaryPlots *m_oMuonHitDiffSummaryPlots;
Muon::MuonTruthHitPlots *m_oMuonTruthHitPlots;
Muon::MuonResolutionPlots *m_oMuonResolutionPlots; Muon::MuonResolutionPlots *m_oMuonResolutionPlots;
Trk::DefParamPullPlots *m_oDefParamPullPlots; Trk::DefParamPullPlots *m_oDefParamPullPlots;
Muon::MomentumTruthPullPlots *m_oMomentumTruthPullPlots_Tail; Muon::MomentumTruthPullPlots *m_oMomentumTruthPullPlots_Tail;
Muon::MomentumTruthPullPlots *m_oMomentumTruthPullPlots_NoTail; Muon::MomentumTruthPullPlots *m_oMomentumTruthPullPlots_NoTail;
Muon::MuonParamElossPlots *m_oMatchedRecoElossPlots;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment