ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/nowaf/RootFilesInUse/MakeScanPlots2.py
Revision: 1.1.1.1 (vendor branch)
Committed: Tue Mar 20 13:12:08 2012 UTC (13 years, 1 month ago) by nowak
Content type: text/x-python
Branch: rootFilesInUse, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
Log Message:
t files in use

File Contents

# Content
1 import ROOT
2 import sys, re
3 sys.path.append("/afs/naf.desy.de/user/n/nowaf/UserCode/nowaf/PythonScripts/")
4 import definitions as Def
5 import Scan_cff as Scan
6 import styles as Style
7
8 if __name__ == "__main__":
9
10 Def.SetGlobalStyles( withTitle=True )
11 ROOT.gStyle.SetPadRightMargin( 0.11 )
12 ROOT.gStyle.SetLabelSize( 0.03,"XYZ" )
13 #lumi = 4.5
14 lumi = 5.0
15 #title = "CMS Simulation, L = " + str( round( lumi,1 ) ) + " fb^{-1}, #sqrt{s} = 7 TeV"
16 title = "L = " + str( round( lumi,1 ) ) + " fb^{-1}, #sqrt{s} = 7 TeV"
17 name = "plots/Limit/cMSSM_tanB40_xix"
18 if re.search( "CMS Simulation", title ):
19 name = name + "_CMSSim"
20 pass
21 save = True
22
23 Type = ""
24 #Type = "Pre"
25
26 dataQCD=2.9
27 dataMuon=25.9
28
29 if Type == "Pre":
30 dataQCD=59.
31 dataMuon=415.
32 pass
33
34 filename = "/scratch/hh/lustre/cms/user/nowaf/2011Data/VersionII/Plots/ScanTanBeta40new_xix/ScanTanBeta40new_xix.root"
35 #filename = "/scratch/hh/lustre/cms/user/nowaf/2011Data/VersionII/Plots/ScanTanBeta40new_xi/ScanTanBet40new_xi.root"
36 rootfile = ROOT.TFile.Open( filename )
37 filenamePDF = "/scratch/hh/lustre/cms/user/nowaf/2011Data/VersionII/Plots/ScanTanBeta40new_vi_PDF/ScanTanBeta40new_vi_PDF.root"
38 rootfilePDF = ROOT.TFile.Open( filenamePDF )
39 histDict = Scan.readInScanHists( rootfile )
40 Scan.getPDFHists( rootfilePDF, histDict )
41 rootfile.Close()
42
43 Scan.getAccHist( histDict, "NLO", Type=Type )
44 Scan.getRateHist( histDict, "NLO", lumi=lumi, Type=Type )
45 Scan.getSignalCont( histDict, lumi=lumi, data=dataQCD, Type=Type )
46 Scan.getSignalCont( histDict, backgr="Muon", data=dataMuon, lumi=lumi, Type=Type )
47 for err in [ "JECUp", "JECDn", "TEUp", "TEDn", "NLO2", "NLO05",
48 "MuonIsoUp", "MuonIsoDn", "ElecIsoUp", "ElecIsoDn" ]:
49 Scan.getAccHist( histDict, err, Type=Type, otherApp="NLO" )
50 Scan.getRelAcc( histDict, err, "NLO", Type=Type )
51 Scan.getRateHist( histDict, err, lumi=lumi, Type=Type )
52 Scan.getRelRate( histDict, err, "NLO", Type=Type )
53 pass
54 #Scan.getRateHist( histDict, "PDFxsec", lumi=lumi, Type=Type )
55 #Scan.getRateHist( histDict, "PDFxsecUncert", lumi=lumi, Type=Type )
56 #Scan.getRelRate( histDict, "PDFxsecUncert", "PDFxsec", Type=Type )
57 #####Scan.getRelAcc( histDict, "PDFxsecUncert", "PDFxsec", Type=Type )
58 Scan.getRelPDFErr( histDict,Type=Type )
59 Scan.getCombRelRateErr( histDict, Type=Type )
60 Scan.getCombRelAccErr( histDict, Type=Type )
61 Scan.getCombTheoRelRateErr( histDict, Type=Type )
62 #print histDict.keys()
63
64 cDict = {}
65 cDict.update( Scan.drawStandard( histDict, Type=Type, title=title ) )
66 cDict.update( Scan.drawMC( histDict, title=title ) )
67 cDict.update( Scan.drawSignalCont( histDict, Type=Type, title=title ) )
68 cDict.update( Scan.drawSignalCont( histDict, backgr="Muon", Type=Type, title=title ) )
69 for err in [ "JECUp", "JECDn", "TEUp", "TEDn", "NLO2", "NLO05",
70 "MuonIsoUp", "MuonIsoDn", "ElecIsoUp", "ElecIsoDn",
71 #"PDFxsecUncert"
72 ]:
73 cDict.update( Scan.drawRelErr( histDict, err, Type=Type, title=title ) )
74 pass
75 cDict.update( Scan.drawRelErr( histDict, "CombUp", Type=Type, title=title ) )
76 cDict.update( Scan.drawRelErr( histDict, "CombDn", Type=Type, title=title ) )
77 cDict.update( Scan.drawRelErr( histDict, "PDFUp", Type=Type, title=title ) )
78 cDict.update( Scan.drawRelErr( histDict, "PDFDn", Type=Type, title=title ) )
79 cDict.update( Scan.drawRelErr( histDict, "CombTheoUp", Type=Type, title=title ) )
80 cDict.update( Scan.drawRelErr( histDict, "CombTheoDn", Type=Type, title=title ) )
81
82 if save:
83 Style.saveToEPS( name, cDict )
84 pass
85
86 Def.DontQuit()