Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:33:18

0001 from ROOT import kBlack, TPaveText
0002 
0003 def officialStyle(style):
0004     style.SetCanvasColor     (0)
0005     style.SetCanvasBorderSize(10)
0006     style.SetCanvasBorderMode(0)
0007     style.SetCanvasDefH      (700)
0008     style.SetCanvasDefW      (700)
0009     style.SetCanvasDefX      (100)
0010     style.SetCanvasDefY      (100)
0011 
0012     # color palette for 2D temperature plots
0013     # style.SetPalette(1,0)
0014 
0015     # Pads
0016     style.SetPadColor       (0)
0017     style.SetPadBorderSize  (10)
0018     style.SetPadBorderMode  (0)
0019     style.SetPadBottomMargin(0.16)
0020     style.SetPadTopMargin   (0.08)
0021     style.SetPadLeftMargin  (0.15)
0022 #    style.SetPadRightMargin (0.3)
0023     style.SetPadRightMargin (0.05)
0024     style.SetPadGridX       (1)
0025     style.SetPadGridY       (1)
0026     style.SetPadTickX       (1)
0027     style.SetPadTickY       (1)
0028 
0029     # Frames
0030     style.SetLineWidth(3)
0031     style.SetFrameFillStyle ( 0)
0032     style.SetFrameFillColor ( 0)
0033     style.SetFrameLineColor ( 1)
0034     style.SetFrameLineStyle ( 0)
0035     style.SetFrameLineWidth ( 2)
0036     style.SetFrameBorderSize(10)
0037     style.SetFrameBorderMode( 0)
0038 
0039     # Histograms
0040     style.SetHistFillColor(2)
0041     style.SetHistFillStyle(0)
0042     style.SetHistLineColor(1)
0043     style.SetHistLineStyle(0)
0044     style.SetHistLineWidth(3)
0045     style.SetNdivisions(505)
0046 
0047     # Functions
0048     style.SetFuncColor(1)
0049     style.SetFuncStyle(0)
0050     style.SetFuncWidth(2)
0051 
0052     # Various
0053     style.SetMarkerStyle(20)
0054     style.SetMarkerColor(kBlack)
0055     style.SetMarkerSize (1.4)
0056 
0057     style.SetTitleBorderSize(0)
0058     style.SetTitleFillColor (0)
0059     style.SetTitleX         (0.3)
0060 
0061     style.SetTitleSize  (0.055,"X")
0062     style.SetTitleOffset(1.200,"X")
0063     style.SetLabelOffset(0.005,"X")
0064     style.SetLabelSize  (0.050,"X")
0065     style.SetLabelFont  (42   ,"X")
0066 
0067     style.SetStripDecimals(False)
0068     style.SetLineStyleString(11,"20 10")
0069 
0070     style.SetTitleSize  (0.055,"Y")
0071     style.SetTitleOffset(1.100,"Y")
0072     style.SetLabelOffset(0.010,"Y")
0073     style.SetLabelSize  (0.050,"Y")
0074     style.SetLabelFont  (42   ,"Y")
0075 
0076     style.SetTextSize   (0.055)
0077     style.SetTextFont   (42)
0078 
0079     style.SetStatFont   (42)
0080     style.SetTitleFont  (42)
0081     style.SetTitleFont  (42,"X")
0082     style.SetTitleFont  (42,"Y")
0083 
0084     style.SetOptStat    (0)
0085 
0086 
0087 def CMSPrelim(dataset, channel, lowX, lowY):
0088     cmsprel  =  TPaveText(lowX, lowY+0.06, lowX+0.30, lowY+0.16, "NDC")
0089     cmsprel.SetBorderSize(   0 )
0090     cmsprel.SetFillStyle(    0 )
0091     cmsprel.SetTextAlign(   12 )
0092     cmsprel.SetTextSize ( 0.04 )
0093     cmsprel.SetTextColor(    1 )
0094     cmsprel.SetTextFont (   62 )
0095     cmsprel.AddText(dataset)
0096     
0097 ##     lumi     =  TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC")
0098 ##     lumi.SetBorderSize(   0 )
0099 ##     lumi.SetFillStyle(    0 )
0100 ##     lumi.SetTextAlign(   12 )
0101 ##     lumi.SetTextSize ( 0.04 )
0102 ##     lumi.SetTextColor(    1 )
0103 ##     lumi.SetTextFont (   62 )
0104 ##     lumi.AddText(dataset)
0105     
0106     chan     =  TPaveText(lowX+0.68, lowY+0.061, lowX+0.80, lowY+0.161, "NDC")
0107     chan.SetBorderSize(   0 )
0108     chan.SetFillStyle(    0 )
0109     chan.SetTextAlign(   12 )
0110     chan.SetTextSize ( 0.05 )
0111     chan.SetTextColor(    1 )
0112     chan.SetTextFont (   62 )
0113     chan.AddText(channel)
0114     
0115     return cmsprel, chan
0116