|
|
|
def | CleanArguments (argv, option) |
|
def | CreateBaseDirectory (options) |
|
def | CreateDirectory (dir, addToExisting=False) |
|
def | CreateSubDirectory (basedir, path) |
|
def | main (argv=None) |
|
def | plotDefault (argv, outputDir, name, type, plots, addArgv=[]) |
|
def | plotDefaults (argv, options, outputDir) |
|
def | plotOneByOne (argv, outputDir, histoList, histoSubNames, paths) |
|
def | StripPath (name) |
|
◆ CleanArguments()
def SteerMultipleCompare.CleanArguments |
( |
|
argv, |
|
|
|
option |
|
) |
| |
Definition at line 54 of file SteerMultipleCompare.py.
56 while argv.count(option) > 0:
57 index = argv.index(option)
58 if index < len(argv)-1:
Referenced by main().
◆ CreateBaseDirectory()
def SteerMultipleCompare.CreateBaseDirectory |
( |
|
options | ) |
|
Definition at line 39 of file SteerMultipleCompare.py.
40 if options.out ==
'MultipleCompare.png' or options.out.find(
'.')!=-1:
43 outputDirName =
'MultipleCompareOutput'
45 outputDirName = options.out
46 outputDir = os.path.join(os.getcwd(), outputDirName)
References CreateDirectory().
Referenced by main().
◆ CreateDirectory()
def SteerMultipleCompare.CreateDirectory |
( |
|
dir, |
|
|
|
addToExisting = False |
|
) |
| |
◆ CreateSubDirectory()
def SteerMultipleCompare.CreateSubDirectory |
( |
|
basedir, |
|
|
|
path |
|
) |
| |
◆ main()
def SteerMultipleCompare.main |
( |
|
argv = None | ) |
|
Definition at line 121 of file SteerMultipleCompare.py.
129 testFile = TFile(options.test)
131 if options.ref !=
'':
132 refFile = TFile(options.ref)
138 print(
'\tError: Please specify at least one histogram. The following ones are available in the root file.')
149 for path
in plotList:
151 histoList.append(path)
152 strippedPath, strippedPlot =
StripPath(path)
153 paths.append(strippedPath)
154 histoSubNames.append(strippedPlot)
156 elif plot.find(
'massiveMode') != -1:
165 print(
"Massive mode: scan all subdirs and make plots comparing each histogram one by one.")
166 plotOneByOne(argv, outputDir, histoList, histoSubNames, paths)
168 print(
"Default mode: Make default plot combinations.")
References CleanArguments(), CreateBaseDirectory(), MultipleCompare.LoadCommandlineOptions(), MultipleCompare.MapDirStructure(), MultipleCompare.Match(), plotDefaults(), plotOneByOne(), print(), and StripPath().
◆ plotDefault()
def SteerMultipleCompare.plotDefault |
( |
|
argv, |
|
|
|
outputDir, |
|
|
|
name, |
|
|
|
type, |
|
|
|
plots, |
|
|
|
addArgv = [] |
|
) |
| |
◆ plotDefaults()
def SteerMultipleCompare.plotDefaults |
( |
|
argv, |
|
|
|
options, |
|
|
|
outputDir |
|
) |
| |
Definition at line 84 of file SteerMultipleCompare.py.
86 if options.testLabel !=
None:
87 name += options.testLabel+
'_'
89 name += options.test+
'_vs_'
90 if options.refLabel !=
None:
91 name += options.refLabel+
'_'
93 name += options.ref+
'_'
96 if outputDir.find(
'QCD')!=-1:
97 additionalArgv.append(
'-f')
98 plotDefault(argv, outputDir, name,
'LeptonRejectionEffphi'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*Rejection/*Effphi'], additionalArgv)
99 plotDefault(argv, outputDir, name,
'LeptonRejectionEffeta'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*Rejection/*Effeta'], additionalArgv)
100 plotDefault(argv, outputDir, name,
'LeptonRejectionEffpt'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*Rejection/*Effpt'], additionalArgv)
102 if outputDir.find(
'QCD')!=-1:
103 additionalArgv.append(
'--logScale')
104 plotDefault(argv, outputDir, name,
'Effphi'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*Effphi',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*Effphi'], additionalArgv)
105 plotDefault(argv, outputDir, name,
'Effeta'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*Effeta',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*Effeta'], additionalArgv)
106 plotDefault(argv, outputDir, name,
'Effpt'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*Effpt',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*Effpt'], additionalArgv)
108 plotDefault(argv, outputDir, name,
'pTRatio_allHadronic'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_pTRatio_allHadronic',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_pTRatio_allHadronic'])
109 plotDefault(argv, outputDir, name,
'pTRatio_oneProng1Pi0'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_pTRatio_oneProng1Pi0',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_pTRatio_oneProng1Pi0'])
110 plotDefault(argv, outputDir, name,
'pTRatio_threeProng0Pi0'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_pTRatio_threeProng0Pi0',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_pTRatio_threeProng0Pi0'])
112 plotDefault(argv, outputDir, name,
'Size_isolationPFChargedHadrCands'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_Size_isolationPFChargedHadrCands',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_Size_isolationPFChargedHadrCands'])
113 plotDefault(argv, outputDir, name,
'Size_isolationPFNeutrHadrCands'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_Size_isolationPFNeutrHadrCands',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_Size_isolationPFNeutrHadrCands'])
114 plotDefault(argv, outputDir, name,
'Size_isolationPFGammaCands'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_Size_isolationPFGammaCands',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_Size_isolationPFGammaCands'])
116 plotDefault(argv, outputDir, name,
'SumPt_isolationPFChargedHadrCands'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_SumPt_isolationPFChargedHadrCands',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_SumPt_isolationPFChargedHadrCands'])
117 plotDefault(argv, outputDir, name,
'SumPt_isolationPFNeutrHadrCands'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_SumPt_isolationPFNeutrHadrCands',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_SumPt_isolationPFNeutrHadrCands'])
118 plotDefault(argv, outputDir, name,
'SumPt_isolationPFGammaCands'+outputType, [
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationByDecayModeFinding/*_SumPt_isolationPFGammaCands',
'DQMData/RecoTauV/hpsPFTauProducer_hpsPFTauDiscriminationBy*CombinedIsolationDBSumPtCorr/*_SumPt_isolationPFGammaCands'])
References plotDefault().
Referenced by main().
◆ plotOneByOne()
def SteerMultipleCompare.plotOneByOne |
( |
|
argv, |
|
|
|
outputDir, |
|
|
|
histoList, |
|
|
|
histoSubNames, |
|
|
|
paths |
|
) |
| |
Definition at line 65 of file SteerMultipleCompare.py.
65 def plotOneByOne(argv, outputDir, histoList, histoSubNames, paths):
66 for hist, name, path
in zip(histoList, histoSubNames, paths):
71 tmpArgv.append(outputDir+
'/'+path+
'/'+name+
'.png')
References CreateSubDirectory(), MultipleCompare.main(), and ComparisonHelper.zip().
Referenced by main().
◆ StripPath()
def SteerMultipleCompare.StripPath |
( |
|
name | ) |
|
Definition at line 17 of file SteerMultipleCompare.py.
20 matches = re.match(
r'(.*)\/(.*)$', name)
22 path = matches.group(1)
23 plot = matches.group(2)
Referenced by main().
◆ __author__
SteerMultipleCompare.__author__ |
|
private |
◆ __doc__
SteerMultipleCompare.__doc__ |
|
private |
def CreateBaseDirectory(options)
def CreateDirectory(dir, addToExisting=False)
def CleanArguments(argv, option)
def plotDefaults(argv, options, outputDir)
def plotOneByOne(argv, outputDir, histoList, histoSubNames, paths)
def LoadCommandlineOptions(argv)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def CreateSubDirectory(basedir, path)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def plotDefault(argv, outputDir, name, type, plots, addArgv=[])
def MapDirStructure(directory, dirName, objectList)