ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/Configuration/scripts/makePlots.py
(Generate patch)

Comparing UserCode/OSUT3Analysis/Configuration/scripts/makePlots.py (file contents):
Revision 1.27 by lantonel, Thu Mar 28 10:45:05 2013 UTC vs.
Revision 1.28 by ahart, Tue Apr 9 21:42:18 2013 UTC

# Line 84 | Line 84 | for key in testFile.GetListOfKeys():
84          channels.append(key2.GetName())
85  
86  
87 < weight = intLumi / 10000.0
88 < for dataset in processed_datasets:
89 <    dataset_file = "%s/%s.root" % (condor_dir,dataset)
90 <    fin = TFile (dataset_file)
91 <    flags = fin.Get ("flags")
92 <    noWeights = flags and flags.GetBinContent (1)
93 <    fin.Close ()
94 <    if types[dataset] != "data" and not noWeights:
95 <        os.system("mergeTFileServiceHistograms -i %s -o %s -w %g" % (dataset_file, dataset_file + "_tmp", weight))
96 <    else:
97 <        os.system("mergeTFileServiceHistograms -i %s -o %s -w %g" % (dataset_file, dataset_file + "_tmp", 1.0))
87 > #weight = intLumi / 10000.0
88 > #for dataset in processed_datasets:
89 > #    dataset_file = "%s/%s.root" % (condor_dir,dataset)
90 > #    fin = TFile (dataset_file)
91 > #    flags = fin.Get ("flags")
92 > #    noWeights = flags and flags.GetBinContent (1)
93 > #    fin.Close ()
94 > #
95 > #    if types[dataset] != "data" and not noWeights:
96 > #        os.system("mergeTFileServiceHistograms -i %s -o %s -w %g" % (dataset_file, dataset_file + "_tmp", weight))
97 > #    else:
98 > #        os.system("mergeTFileServiceHistograms -i %s -o %s -w %g" % (dataset_file, dataset_file + "_tmp", 1.0))
99  
100   for channel in channels: # loop over final states, which each have their own directory
101  
# Line 143 | Line 144 | for channel in channels: # loop over fin
144              scaleFactor = 1
145              
146              for sample in processed_datasets: # loop over different samples as listed in configurationOptions.py
147 <                dataset_file = "%s/%s.root_tmp" % (condor_dir,sample)
147 >                dataset_file = "%s/%s.root" % (condor_dir,sample)
148                  inputFile = TFile(dataset_file)
149                  Histogram = inputFile.Get(rootDirectory+"/"+channel+"/"+histogramName).Clone()
150                  Histogram.SetDirectory(0)
# Line 218 | Line 219 | for channel in channels: # loop over fin
219                      Stack.Add(bgMCHist)
220  
221                  
221
222              finalMax = 0
223              if not arguments.noStack:
224                  finalMax = Stack.GetMaximum()
# Line 271 | Line 271 | for channel in channels: # loop over fin
271                  Canvas.cd(1)
272  
273              if(numBgMCSamples is not 0):
274 +
275                  if not arguments.noStack:
276                      Stack.SetTitle(histoTitle)
277                      Stack.Draw("HIST")
# Line 411 | Line 412 | for channel in channels: # loop over fin
412              DataHistograms = []
413  
414              for sample in processed_datasets: # loop over different samples as listed in configurationOptions.py
415 <                dataset_file = "%s/%s.root_tmp" % (condor_dir,sample)
415 >                dataset_file = "%s/%s.root" % (condor_dir,sample)
416                  inputFile = TFile(dataset_file)
417                  Histogram = inputFile.Get(rootDirectory+"/"+channel+"/"+histogramName).Clone()
418                  Histogram.SetDirectory(0)
# Line 492 | Line 493 | for channel in channels: # loop over fin
493          
494  
495  
496 < for dataset in processed_datasets:
497 <    dataset_file = "%s/%s.root_tmp" % (condor_dir,dataset)
498 <    os.remove(dataset_file)
496 > #for dataset in processed_datasets:
497 > #    dataset_file = "%s/%s.root_tmp" % (condor_dir,dataset)
498 > #    os.remove(dataset_file)
499  
500   outputFile.Close()        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines