Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:58

0001 {
0002   gSystem->Load("libFWCoreFWLite.so"); 
0003   FWLiteEnabler::enable();
0004   gSystem->Load("libDataFormatsFWLite.so");
0005   gROOT->ProcessLine("namespace edm {typedef edm::Wrapper<vector<float> > Wrapper<vector<float,allocator<float> > >; }");
0006   gROOT->ProcessLine("namespace edm {typedef edm::Wrapper<vector<double> > Wrapper<vector<double,allocator<double> > >; }");
0007 
0008   TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");
0009 
0010   cout << "TDR Style initialized" << endl;
0011 
0012 // For the canvas:
0013   tdrStyle->SetCanvasBorderMode(0);
0014   tdrStyle->SetCanvasColor(kWhite);
0015   tdrStyle->SetCanvasDefH(600); //Height of canvas
0016   tdrStyle->SetCanvasDefW(600); //Width of canvas
0017   tdrStyle->SetCanvasDefX(0);   //POsition on screen
0018   tdrStyle->SetCanvasDefY(0);
0019 
0020 // For the Pad:
0021   tdrStyle->SetPadBorderMode(0);
0022   // tdrStyle->SetPadBorderSize(Width_t size = 1);
0023   tdrStyle->SetPadColor(kWhite);
0024   tdrStyle->SetPadGridX(false);
0025   tdrStyle->SetPadGridY(false);
0026   tdrStyle->SetGridColor(0);
0027   tdrStyle->SetGridStyle(3);
0028   tdrStyle->SetGridWidth(1);
0029 
0030 // For the frame:
0031   tdrStyle->SetFrameBorderMode(0);
0032   tdrStyle->SetFrameBorderSize(1);
0033   tdrStyle->SetFrameFillColor(0);
0034   tdrStyle->SetFrameFillStyle(0);
0035   tdrStyle->SetFrameLineColor(1);
0036   tdrStyle->SetFrameLineStyle(1);
0037   tdrStyle->SetFrameLineWidth(1);
0038 
0039 // For the histo:
0040   // tdrStyle->SetHistFillColor(1);
0041   // tdrStyle->SetHistFillStyle(0);
0042   tdrStyle->SetHistLineColor(1);
0043   tdrStyle->SetHistLineStyle(0);
0044   tdrStyle->SetHistLineWidth(1);
0045   // tdrStyle->SetLegoInnerR(Float_t rad = 0.5);
0046   // tdrStyle->SetNumberContours(Int_t number = 20);
0047 
0048   tdrStyle->SetEndErrorSize(2);
0049   //tdrStyle->SetErrorMarker(20);
0050   tdrStyle->SetErrorX(0.);
0051   
0052   tdrStyle->SetMarkerStyle(20);
0053 
0054 //For the fit/function:
0055   tdrStyle->SetOptFit(1);
0056   tdrStyle->SetFitFormat("5.4g");
0057   tdrStyle->SetFuncColor(2);
0058   tdrStyle->SetFuncStyle(1);
0059   tdrStyle->SetFuncWidth(1);
0060 
0061 //For the date:
0062   tdrStyle->SetOptDate(0);
0063   // tdrStyle->SetDateX(Float_t x = 0.01);
0064   // tdrStyle->SetDateY(Float_t y = 0.01);
0065 
0066 // For the statistics box:
0067   tdrStyle->SetOptFile(0);
0068   tdrStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");
0069   tdrStyle->SetStatColor(kWhite);
0070   tdrStyle->SetStatFont(42);
0071   tdrStyle->SetStatFontSize(0.025);
0072   tdrStyle->SetStatTextColor(1);
0073   tdrStyle->SetStatFormat("6.4g");
0074   tdrStyle->SetStatBorderSize(1);
0075   tdrStyle->SetStatH(0.1);
0076   tdrStyle->SetStatW(0.15);
0077   // tdrStyle->SetStatStyle(Style_t style = 1001);
0078   // tdrStyle->SetStatX(Float_t x = 0);
0079   // tdrStyle->SetStatY(Float_t y = 0);
0080 
0081 // Margins:
0082   tdrStyle->SetPadTopMargin(0.15);
0083   tdrStyle->SetPadBottomMargin(0.13);
0084   tdrStyle->SetPadLeftMargin(0.13);
0085   tdrStyle->SetPadRightMargin(0.15);
0086 
0087 // For the Global title:
0088 
0089 //  tdrStyle->SetOptTitle(0);
0090   tdrStyle->SetTitleFont(42);
0091   tdrStyle->SetTitleColor(1);
0092   tdrStyle->SetTitleTextColor(1);
0093   tdrStyle->SetTitleFillColor(10);
0094   tdrStyle->SetTitleFontSize(0.05);
0095   // tdrStyle->SetTitleH(0); // Set the height of the title box
0096   // tdrStyle->SetTitleW(0); // Set the width of the title box
0097   // tdrStyle->SetTitleX(0); // Set the position of the title box
0098   // tdrStyle->SetTitleY(0.985); // Set the position of the title box
0099   // tdrStyle->SetTitleStyle(Style_t style = 1001);
0100   // tdrStyle->SetTitleBorderSize(2);
0101 
0102 // For the axis titles:
0103 
0104   tdrStyle->SetTitleColor(1, "XYZ");
0105   tdrStyle->SetTitleFont(42, "XYZ");
0106   tdrStyle->SetTitleSize(0.06, "XYZ");
0107   // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
0108   // tdrStyle->SetTitleYSize(Float_t size = 0.02);
0109   tdrStyle->SetTitleXOffset(1.0);
0110 //   tdrStyle->SetTitleYOffset(1.5);
0111   tdrStyle->SetTitleOffset(1.5, "Y"); // Another way to set the Offset
0112 
0113 // For the axis labels:
0114 
0115   tdrStyle->SetLabelColor(1, "XYZ");
0116   tdrStyle->SetLabelFont(42, "XYZ");
0117   tdrStyle->SetLabelOffset(0.007, "XYZ");
0118   tdrStyle->SetLabelSize(0.05, "XYZ");
0119 
0120 // For the axis:
0121 
0122   tdrStyle->SetAxisColor(1, "XYZ");
0123   tdrStyle->SetStripDecimals(kTRUE);
0124   tdrStyle->SetTickLength(0.03, "XYZ");
0125   tdrStyle->SetNdivisions(510, "XYZ");
0126   tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
0127   tdrStyle->SetPadTickY(1);
0128 
0129 // Change for log plots:
0130   tdrStyle->SetOptLogx(0);
0131   tdrStyle->SetOptLogy(0);
0132   tdrStyle->SetOptLogz(0);
0133 
0134   tdrStyle->SetPalette(1,0);
0135 
0136 // Postscript options:
0137   // tdrStyle->SetPaperSize(15.,15.);
0138   // tdrStyle->SetLineScalePS(Float_t scale = 3);
0139   // tdrStyle->SetLineStyleString(Int_t i, const char* text);
0140   // tdrStyle->SetHeaderPS(const char* header);
0141   // tdrStyle->SetTitlePS(const char* pstitle);
0142 
0143   // tdrStyle->SetBarOffset(Float_t baroff = 0.5);
0144   // tdrStyle->SetBarWidth(Float_t barwidth = 0.5);
0145   // tdrStyle->SetPaintTextFormat(const char* format = "g");
0146   // tdrStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0);
0147   // tdrStyle->SetTimeOffset(Double_t toffset);
0148   // tdrStyle->SetHistMinimumZero(kTRUE);
0149 
0150   tdrStyle->cd();
0151 }