15 |
|
from OSUT3Analysis.Configuration.configurationOptions import * |
16 |
|
from OSUT3Analysis.Configuration.processingUtilities import * |
17 |
|
|
18 |
< |
from ROOT import TChain, TCut, TDirectory, TFile, TH1D, TStopwatch, TTree, gROOT |
18 |
> |
from ROOT import TChain, TCut, TDirectory, TFile, TH1D, TH2D, TStopwatch, TTree, gROOT |
19 |
|
|
20 |
|
gROOT.SetBatch(True) # This is to prevent pop-up graphical windows |
21 |
|
|
47 |
|
|
48 |
|
for dataset in split_datasets: |
49 |
|
MakeCondorSubmitFile(arguments, dataset) |
50 |
< |
# Now submit the condor job |
51 |
< |
# os.system("condor_submit condor/"+arguments.condorDir+"/"+dataset+"condorBNTree.sub") |
52 |
< |
print "Submitted job for: %s/%s" % (arguments.condorDir, dataset) |
50 |
> |
cmd = "condor_submit condor/"+arguments.condorDir+"/"+dataset+"/condorBNTree.sub" |
51 |
> |
os.system(cmd) |
52 |
> |
print "Submitting job: %s " % cmd |
53 |
|
|
54 |
|
return |
55 |
|
|
103 |
|
currentDir = outputFile.GetDirectory("OSUAnalysis/"+hist['channel']); |
104 |
|
if not currentDir: print "Could not find directory OSUAnalysis/%s in file %s" % (hist['channel'], outputFile.GetName()) |
105 |
|
currentDir.Delete(deleteString); |
106 |
< |
|
107 |
< |
h = TH1D(hist['histName'], hist['histName'], hist['nbins'], hist['xMin'], hist['xMax']) |
106 |
> |
if 'nbinsY' in hist: # only make a 2D histogram if the key "nbinsY" is defined |
107 |
> |
h = TH2D(hist['histName'], hist['histName'], |
108 |
> |
hist['nbins'], hist['xMin'], hist['xMax'], |
109 |
> |
hist['nbinsY'], hist['yMin'], hist['yMax']) |
110 |
> |
else: |
111 |
> |
h = TH1D(hist['histName'], hist['histName'], hist['nbins'], hist['xMin'], hist['xMax']) |
112 |
|
h.Sumw2() # Needed to get weights correct. |
113 |
|
cut = TCut(hist['cutString']) |
114 |
|
ch.Draw(hist['varToPlot']+">>"+hist['histName'], cut) |