Example #1
0
void hggPaperStyle()
{

    // Hgg Paper style for plots
    TStyle *hggStyle = new TStyle("hggStyle","Hgg Paper Style");

    //hggStyle->SetCanvasColor(0);
    //hggStyle->SetPadColor(0);
    hggStyle->SetPadTickX(0);
    hggStyle->SetPadTickY(0);

    hggStyle->SetFrameFillColor(0);
    hggStyle->SetStatColor(0);
    hggStyle->SetOptStat(0);
    hggStyle->SetTitleFillColor(0);
    hggStyle->SetCanvasBorderMode(0);
    hggStyle->SetPadBorderMode(0);
    hggStyle->SetFrameBorderMode(0);
    hggStyle->SetFrameBorderSize(1);
    hggStyle->SetPadColor(kWhite);
    hggStyle->SetCanvasColor(kWhite);

    hggStyle->SetCanvasDefH(600); //Height of canvas
    hggStyle->SetCanvasDefW(800); //Width of canvas
    hggStyle->SetCanvasDefX(0);   //POsition on screen
    hggStyle->SetCanvasDefY(0);

    hggStyle->SetPadLeftMargin(0.16);//0.16);
    hggStyle->SetPadRightMargin(0.1);//0.02);
    hggStyle->SetPadTopMargin(0.085);//0.02);
    hggStyle->SetPadBottomMargin(0.12);//0.02);

    // For hgg axis titles:
    hggStyle->SetTitleColor(1, "XYZ");
    hggStyle->SetTitleFont(42, "XYZ");
    hggStyle->SetTitleSize(0.05, "XYZ");
    hggStyle->SetTitleYOffset(1.5); // => 1.15 if exponents
    hggStyle->SetTitleXOffset(1.);//0.9);

    // For hgg axis labels:
    hggStyle->SetLabelColor(1, "XYZ");
    hggStyle->SetLabelFont(42, "XYZ");
    hggStyle->SetLabelOffset(0.007, "XYZ");
    hggStyle->SetLabelSize(0.045, "XYZ");

    // Legends
    hggStyle->SetLegendBorderSize(0);
    hggStyle->SetLegendFillColor(kWhite);
    hggStyle->SetLegendFont(42);

    hggStyle->SetFillColor(10);
    // Nothing for now
    hggStyle->SetTextFont(42);
    hggStyle->SetTextSize(0.03);

    hggStyle->SetOptTitle(0);
    hggStyle->SetOptStat(0);
    hggStyle->cd();
}
Example #2
0
// TStyle used for HPlus Studies and AnalysisPack.
//********************************************************************//
void HPlusStyle(void) {

    TStyle *HplusStyle = new TStyle("HplusStyle", "HplusStyle");
    HplusStyle->SetCanvasBorderMode(0);
    HplusStyle->SetCanvasColor(kWhite);
    HplusStyle->SetPadBorderMode(0);
    HplusStyle->SetPadColor(kWhite);
    HplusStyle->SetTitleFillColor(kWhite);
    HplusStyle->SetGridColor(0);
    HplusStyle->SetFrameBorderMode(0);
    HplusStyle->SetFrameBorderSize(1);
    HplusStyle->SetFrameFillColor(0);
    HplusStyle->SetFrameFillStyle(0);
    HplusStyle->SetFrameLineColor(1);
    HplusStyle->SetFrameLineStyle(1);
    HplusStyle->SetFrameLineWidth(1);
    // HplusStyle->SetFillColor(kWhite);
    HplusStyle->SetOptTitle(0);
    HplusStyle->SetTitleFont(42, "XYZ");
    HplusStyle->SetTitleFontSize(0.05);
    HplusStyle->SetTitleSize(0.06, "XYZ");
    HplusStyle->SetTextFont(42);
    HplusStyle->SetTitleXOffset(0.9);
    HplusStyle->SetTitleYOffset(1.25);

    HplusStyle->SetLabelColor(1, "XYZ");
    HplusStyle->SetLabelFont(42, "XYZ");
    HplusStyle->SetLabelOffset(0.007, "XYZ");
    HplusStyle->SetLabelSize(0.05, "XYZ");
    HplusStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
    HplusStyle->SetPadTickY(1);  // To get tick marks on the opposite side of the frame
    HplusStyle->SetNdivisions(508,"XYZ");

    HplusStyle->SetPadTopMargin(0.05);
    HplusStyle->SetPadBottomMargin(0.12);
    HplusStyle->SetPadLeftMargin(0.16);
    HplusStyle->SetPadRightMargin(0.04);//0.02
    HplusStyle->SetCanvasDefH(1280); //Height of canvas
    HplusStyle->SetCanvasDefW(1024); //Width of canvas
    HplusStyle->SetCanvasDefX(0);   //POsition on screen
    HplusStyle->SetCanvasDefY(0);
    HplusStyle->SetPaintTextFormat("5.2f");
    // HplusStyle->SetPalette(1, 0); // Pretty palette
    HplusStyle->SetOptStat(0);
    /// Statistics Box
    HplusStyle->SetStatX(0.9);
    HplusStyle->SetStatY(0.9);
    // HplusStyle->SetStatW(0.19) // default
    // HplusStyle->SetStatH(0.1)  // default
    HplusStyle->SetStatW(0.15);
    HplusStyle->SetStatH(0.1);
    HplusStyle->cd();
} //eof: void HPlusStyle(void){
Example #3
0
// Lauri's Style (LAuri Wendland)
//********************************************************************//
void LAWStyle() {
    TStyle *LAWStyle = new TStyle("LAWStyle", "Neat style");
    LAWStyle->SetCanvasBorderMode(0);
    LAWStyle->SetCanvasColor(kWhite);
    LAWStyle->SetPadBorderMode(0);
    LAWStyle->SetPadColor(kWhite);
    LAWStyle->SetTitleFillColor(kWhite);
    LAWStyle->SetGridColor(0);
    LAWStyle->SetFrameBorderMode(0);
    LAWStyle->SetFrameBorderSize(1);
    LAWStyle->SetFrameFillColor(0);
    LAWStyle->SetFrameFillStyle(0);
    LAWStyle->SetFrameLineColor(1);
    LAWStyle->SetFrameLineStyle(1);
    LAWStyle->SetFrameLineWidth(1);
    LAWStyle->SetFillColor(kWhite);
    LAWStyle->SetFillColor(kWhite);
    LAWStyle->SetOptTitle(0);
    LAWStyle->SetTitleFont(42, "XYZ");
    LAWStyle->SetTitleFontSize(0.05);
    LAWStyle->SetTitleSize(0.06, "XYZ");
    LAWStyle->SetTextFont(42);
    LAWStyle->SetTitleXOffset(0.9);
    LAWStyle->SetTitleYOffset(1.25);

    LAWStyle->SetLabelColor(1, "XYZ");
    LAWStyle->SetLabelFont(42, "XYZ");
    LAWStyle->SetLabelOffset(0.007, "XYZ");
    LAWStyle->SetLabelSize(0.05, "XYZ");
    LAWStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
    LAWStyle->SetPadTickY(1);  // To get tick marks on the opposite side of the frame
    LAWStyle->SetNdivisions(508,"XYZ");

    LAWStyle->SetPadTopMargin(0.05);
    LAWStyle->SetPadBottomMargin(0.12);
    LAWStyle->SetPadLeftMargin(0.16);
    LAWStyle->SetPadRightMargin(0.04);//0.02
    LAWStyle->SetCanvasDefH(600); //Height of canvas
    LAWStyle->SetCanvasDefW(600); //Width of canvas
    LAWStyle->SetCanvasDefX(0);   //POsition on screen
    LAWStyle->SetCanvasDefY(0);
    LAWStyle->SetOptTitle(0);
    LAWStyle->SetOptStat(0);
    LAWStyle->cd();
} //end of: void LAWStyle(){
Example #4
0
// Create my custom FORMAL style
//********************************************************************//
void getMyStyle(void) {

    std::cout << " *** void getMyStyle(void) *** Custom  TStyle initialized!" << std::endl;
    TStyle *myStyle = new TStyle("myStyle","Style for AN09");

    // For the canvas:
    myStyle->SetCanvasBorderMode(0);
    myStyle->SetCanvasColor(kWhite);
    myStyle->SetCanvasDefH(600); //Height of canvas
    myStyle->SetCanvasDefW(600); //Width of canvas
    myStyle->SetCanvasDefX(0);   //POsition on screen
    myStyle->SetCanvasDefY(0);
    // For the Pad:
    myStyle->SetPadBorderMode(0);
    // myStyle->SetOptTitle(0); // delete histogram titles
    // myStyle->SetPadBorderSize(Width_t size = 1);
    myStyle->SetPadColor(kWhite);
    myStyle->SetPadGridX(true);
    myStyle->SetPadGridY(true);
    myStyle->SetGridColor(0);
    myStyle->SetGridStyle(3);
    myStyle->SetGridWidth(1);

    // For the frame:
    myStyle->SetFrameBorderMode(0);
    myStyle->SetFrameBorderSize(1);
    myStyle->SetFrameFillColor(0);
    myStyle->SetFrameFillStyle(0);
    myStyle->SetFrameLineColor(1);
    myStyle->SetFrameLineStyle(1);
    myStyle->SetFrameLineWidth(1);

    // For the histo:
    // myStyle->SetHistFillColor(1);
    // myStyle->SetHistFillStyle(0);
    myStyle->SetHistLineColor(1);
    myStyle->SetHistLineStyle(0);
    myStyle->SetHistLineWidth(1);
    // myStyle->SetLegoInnerR(Float_t rad = 0.5);
    // myStyle->SetNumberContours(Int_t number = 20);

    myStyle->SetEndErrorSize(2);
    //myStyle->SetErrorMarker(20);
    myStyle->SetErrorX(0.);

    myStyle->SetMarkerStyle(20);

    //For the fit/function:
    myStyle->SetOptFit(1);
    myStyle->SetFitFormat("5.4g");
    myStyle->SetFuncColor(2);
    myStyle->SetFuncStyle(1);
    myStyle->SetFuncWidth(1);

    //For the date:
    myStyle->SetOptDate(1);
    // myStyle->SetDateX(Float_t x = 0.01);
    // myStyle->SetDateY(Float_t y = 0.01);

    // For the statistics box:
    myStyle->SetOptFile(0);
    myStyle->SetOptStat("miourne"); // stats box
    myStyle->SetOptFit(1111); // fit box
    myStyle->SetStatColor(kWhite);
    myStyle->SetStatFont(42);
    myStyle->SetStatFontSize(0.025);
    myStyle->SetStatTextColor(1);
    myStyle->SetStatFormat("6.4g");
    myStyle->SetStatBorderSize(1);
    myStyle->SetStatH(0.1);
    myStyle->SetStatW(0.15);
    // myStyle->SetStatStyle(Style_t style = 1001);
    // myStyle->SetStatX(Float_t x = 0);
    // myStyle->SetStatY(Float_t y = 0);

    // Margins:
    myStyle->SetPadTopMargin(0.15);
    myStyle->SetPadBottomMargin(0.13);
    myStyle->SetPadLeftMargin(0.13);
    myStyle->SetPadRightMargin(0.15);

    // For the Global title:

    //  myStyle->SetOptTitle(0);
    myStyle->SetTitleFont(42);
    myStyle->SetTitleColor(1);
    myStyle->SetTitleTextColor(1);
    myStyle->SetTitleFillColor(10);
    myStyle->SetTitleFontSize(0.05);
    // myStyle->SetTitleH(0); // Set the height of the title box
    // myStyle->SetTitleW(0); // Set the width of the title box
    // myStyle->SetTitleX(0); // Set the position of the title box
    // myStyle->SetTitleY(0.985); // Set the position of the title box
    // myStyle->SetTitleStyle(Style_t style = 1001);
    // myStyle->SetTitleBorderSize(2);

    // For the axis titles:

    myStyle->SetTitleColor(1, "XYZ");
    myStyle->SetTitleFont(42, "XYZ");
    myStyle->SetTitleSize(0.06, "XYZ");
    // myStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
    // myStyle->SetTitleYSize(Float_t size = 0.02);
    myStyle->SetTitleXOffset(1.2);
    myStyle->SetTitleYOffset(1.2);
    myStyle->SetTitleOffset(1.2, "Y"); // Another way to set the Offset

    // For the axis labels:

    myStyle->SetLabelColor(1, "XYZ");
    myStyle->SetLabelFont(42, "XYZ");
    myStyle->SetLabelOffset(0.007, "XYZ");
    myStyle->SetLabelSize(0.05, "XYZ");

    // For the axis:
    myStyle->SetAxisColor(1, "XYZ");
    myStyle->SetStripDecimals(kTRUE);
    myStyle->SetTickLength(0.03, "XYZ");
    myStyle->SetNdivisions(510, "XYZ");
    myStyle->SetPadTickX(0);  // To get tick marks on the opposite side of the frame
    myStyle->SetPadTickY(0);

    // Change for log plots:
    myStyle->SetOptLogx(0);
    myStyle->SetOptLogy(0);
    myStyle->SetOptLogz(0);

    myStyle->SetPalette(1,0);

    // Postscript options:
    // myStyle->SetPaperSize(15.,15.);
    // myStyle->SetLineScalePS(Float_t scale = 3);
    // myStyle->SetLineStyleString(Int_t i, const char* text);
    // myStyle->SetHeaderPS(const char* header);
    // myStyle->SetTitlePS(const char* pstitle);

    // myStyle->SetBarOffset(Float_t baroff = 0.5);
    // myStyle->SetBarWidth(Float_t barwidth = 0.5);
    // myStyle->SetPaintTextFormat(const char* format = "g");
    // myStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0);
    // myStyle->SetTimeOffset(Double_t toffset);
    // myStyle->SetHistMinimumZero(kTRUE);

    myStyle->cd();

} //end of: void getMyStyle(void){
Example #5
0
void FitXS (int nminx = 0, int nmaxx = 1509, int nmintest = 0, int nmaxtest = 1509) {
    ////////////////////////////////////////////////////
    // ftp://root.cern.ch/root/doc/ROOTUsersGuideHTML/ch09s05.html
    TStyle *defaultStyle = new TStyle("defaultStyle","Default Style");
    //gStyle->SetOptStat(0);
    //  defaultStyle->SetOptStat(0000);
    //  defaultStyle->SetOptFit(000); 
    //  defaultStyle->SetPalette(1);
    ////////////////////////
    defaultStyle->SetOptStat(0); // remove info box
    /////// pad ////////////
    defaultStyle->SetPadBorderMode(0);
    defaultStyle->SetPadBorderSize(3);
    defaultStyle->SetPadColor(0);
    defaultStyle->SetPadTopMargin(0.1);
    defaultStyle->SetPadBottomMargin(0.16);
    defaultStyle->SetPadRightMargin(5.5);
    defaultStyle->SetPadLeftMargin(0.18);
    /////// canvas /////////
    defaultStyle->SetCanvasBorderMode(1);
    defaultStyle->SetCanvasColor(0);
    //  defaultStyle->SetCanvasDefH(600);
    //  defaultStyle->SetCanvasDefW(600);
    /////// frame //////////
    //defaultStyle->SetFrameBorderMode(1);
    //defaultStyle->SetFrameBorderSize(1);
    defaultStyle->SetFrameFillColor(0); 
    defaultStyle->SetFrameLineColor(1);
    /////// label //////////
    //  defaultStyle->SetLabelOffset(0.005,"XY");
    //  defaultStyle->SetLabelSize(0.05,"XY");
    //defaultStyle->SetLabelFont(46,"XY");
    /////// title //////////
    //defaultStyle->SetTitleW(0.6);
    defaultStyle->SetTitleSize(0.08, "XYZ");
    defaultStyle->SetTitleBorderSize(0);
    defaultStyle->SetTitleX(0.2);
    //  defaultStyle->SetTitleOffset(1.1,"X");
    //  defaultStyle->SetTitleSize(0.01,"X");
    //  defaultStyle->SetTitleOffset(1.25,"Y");
    //  defaultStyle->SetTitleSize(0.05,"Y");
    //defaultStyle->SetTitleFont(42, "XYZ");
    /////// various ////////
    defaultStyle->SetNdivisions(303,"Y");
    defaultStyle->SetTitleFillColor(0);//SetTitleFillStyle(0, "Z");
    //defaultStyle->SetTitleX(0.2);
    //defaultStyle->SetTitleY(0.1);
    //defaultStyle->SetTitleBorderSize(-0.1);  // For the axis titles:
    
    //    defaultStyle->SetTitleColor(1, "XYZ");
    //    defaultStyle->SetTitleFont(42, "XYZ");
    
    
    // defaultStyle->SetTitleYSize(0.08);
    //defaultStyle->SetTitleXOffset(0.9);
    //defaultStyle->SetTitleYOffset(1.05);
    defaultStyle->SetTitleOffset(1.3, "Y"); // Another way to set the Offset
    //defaultStyle->SetTitleOffset(1.0, "X"); // Another way to set the Offset    
    // For the axis labels:
    defaultStyle->SetLabelColor(1, "XYZ");
    //defaultStyle->SetLabelFont(46, "XYZ");
    defaultStyle->SetLabelOffset(0.03, "XYZ");
    defaultStyle->SetLabelSize(0.07, "XYZ");
    //defaultStyle->SetLabelY(0.06);    
    // For the axis:
    //    defaultStyle->SetAxisColor(1, "XYZ");
    defaultStyle->SetStripDecimals(kTRUE);
    defaultStyle->SetTickLength(0.03, "XYZ");
    defaultStyle->SetNdivisions(7, "XYZ");
    //    defaultStyle->SetPadTickX(1);   // To get tick marks on the opposite side of the frame
    //    defaultStyle->SetPadTickY(1);
    defaultStyle->cd();

    ///////////////////////////////////////////

  nmin=nminx;
  nmax=nmaxx;
  if (nmin<0) nmin=0;
  if (nmax>Npoints) nmax=Npoints;
  // Read in the cross section values and the parameters space points
  ifstream XSvals;
    XSvals.open("list_all_translation_CX.txt");//"14TeV_CX_5k_opositecgw.ascii");// "8TeV_CX_5k_opositecgw.ascii");//
  for (int i=nmin; i<nmax; i++)  {
    XSvals >> par0[i] >> par1[i] >> par2[i] >> par3[i] >> par4[i] >> cross_section[i] >> cross_sectionerr[i];
    cout << "For point i = " << i << "pars are " << par0[i] << " " << par1[i] << " " << par2[i] 
    	 << " " << par3[i] << " " << par4[i] << " and xs is " << cross_section[i] << endl;
  }
  
  cout << "**********************************************" << endl;
  
  // Likelihood maximization
  // -----------------------  
  // Minuit routine
  TMinuit rmin(2);
  rmin.SetFCN(Likelihood);
  // Main initialization member function for MINUIT
  rmin.mninit(5,6,7);
  // Parameters needed to be unambiguous with MINOS
  int iflag=0; // You can use this for selection
  double arglis[4];
  //arglis[0]=2;
  arglis[0]=1;
  // Sets the strategy to be used in calculating first and second derivatives 
  // and in certain minimization methods. 1 is default
  rmin.mnexcm("SET STR", arglis, 1, iflag);
  // Set fit parameters
  
  double Start[15];//  ={ 0.030642286182762914, 0.1502216514258229, 0.004287943879883482, 0.0016389029559123376, 0.01930407853512356, -0.12540818099961384, -0.02048425705808435,  0.04246248185144494, 0.02590360491719489,  -0.05255851386689693,  -0.010393610828707423,  0.02770339496466713,  0.005468667874225809,  -0.011297300064522649,  -0.02261561923548796}; // cx in pb
  //  double Start[15] = {2.2646, 1.102, 0.316898, 16, 192, -3, -1, 1, 7, 15, -8, -23, 4, 9, 200}; // normalized to SM
  double Step[15];// ={ 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01 }; //={0.01};
  double Min[15]; // ={-3.1415926};
  double Max[15]; // = {3.1415926}; 
  for (int i=0; i<15; i++) {
    Start[i]=1.;
    Step[i]=1;
    Min[i]=-100000;
    Max[i]=+100000;
  }
  TString parnamEj[15]={"A1","A2","A3","A4","A5","A6","A7","A8","A9","A10","A11","A12","A13","A14","A15"};
  for (int i=0; i<15; i++) {
    rmin.mnparm(i, parnamEj[i],  Start[i], Step[i], Min[i], Max[i], iflag);
  }
  // Instructs Minuit to call subroutine FCN with the value of IFLAG
  rmin.mnexcm("call fcn", arglis, 1, iflag); // command executed normally
  // Causes minimization of the function by the method of Migrad
  rmin.mnexcm("mini", arglis, 0, iflag);
  // Read results
  double a[15], err[15], pmin, pmax;
  int ivar;
  for (int i=0; i<15; i++) {
    rmin.mnpout (i, parnamEj[i], a[i], err[i], pmin, pmax, ivar);
  }

  // End of program
  // --------------
  gROOT->Time();
    cout<<endl<<" Making plots "<<endl;
    cout<<"$A_1$ = "<<a[0]<<" $\\pm$ "<<err[0]<<" & $A_4$ = "<<a[3]<<" $\\pm$ "<<err[3]<<" & $A_7$ = "<<a[6]<<" $\\pm$ "<<err[6]<<" & $A_{10}$ = "<<a[9]<<" $\\pm$ "<<err[9]<<" & $A_{13}$ = "<<a[12]<<" $\\pm$ "<<err[12]<< " \\\ "<<endl;
    cout<<"$A_2$ = "<<a[1]<<" $\\pm$ "<<err[1]<<" & $A_5$ = "<<a[4]<<" $\\pm$ "<<err[4]<<" & $A_8$ = "<<a[7]<<" $\\pm$ "<<err[7]<<" & $A_{11}$ = "<<a[10]<<" $\\pm$ "<<err[10]<<" & $A_{14}$ = "<<a[13]<<" $\\pm$ "<<err[13]<< " \\\ "<<endl;
    cout<<"$A_3$ = "<<a[2]<<" $\\pm$ "<<err[2]<<" & $A_6$ = "<<a[5]<<" $\\pm$ "<<err[5]<<" & $A_9$ = "<<a[8]<<" $\\pm$ "<<err[8]<<" & $A_{12}$ = "<<a[11]<<" $\\pm$ "<<err[11]<<" & $A_{15}$ = "<<a[14]<<" $\\pm$ "<<err[14]<< " \\\ "<<endl;
    cout<<endl<<" To mathematica: "<<endl;
    cout<<"{"<<a[0]<<","<<a[1]<<","<<a[2]<<","<<a[3]<<","<<a[4]<<","<<a[5]<<","<<a[6]<<","<<a[7]<<","<<a[8]<<","<<a[9]<<","<<a[10]<<","<<a[11]<<","<<a[12]<<","<<a[13]<<","<<a[14]<<"}"<<endl;
    cout<<endl<<" To mathematica (errors): "<<endl;
    cout<<"{"<<err[0]<<","<<err[1]<<","<<err[2]<<","<<err[3]<<","<<err[4]<<","<<err[5]<<","<<err[6]<<","<<err[7]<<","<<err[8]<<","<<err[9]<<","<<err[10]<<","<<err[11]<<","<<err[12]<<","<<err[13]<<","<<err[14]<<"}"<<endl;
    
    /////////////////
    // plot the CX 
    ////////////////
    // plane b
    double norm =  1; //0.013531;// 0.0041758;//1;//  8tev 13 tev  1;// 
    double kt5d=1.0;
    double kl5d=1.0;
    double c25d=0.0;
    double mincg = -2.99, maxcg=2.99;
    // cg ===> x 
    // c2g ===> y
    TF2 *fg2 = new TF2("fg2","(([0]*[15]**4 + [1]*[17]**2 + [2]*[15]**2*[16]**2 + [3]*x**2*[16]**2 +  [4]*y**2 + [5]*[17]*[15]**2 + [6]*[15]*[16]*[15]**2 + [7]*[15]*[16]*[17] + [8]*x*[16]*[17] + [9]*[17]*y + [10]*x*[16]*[15]**2 + [11]*y*[15]**2 + [12]*[16]*x*[15]*[16] + [13]*y*[15]*[16] + [14]*x*y*[16])/[18])",mincg,maxcg,mincg,maxcg);
    fg2->SetParameter(0,a[0]);
    fg2->SetParameter(1,a[1]);
    fg2->SetParameter(2,a[2]);    
    fg2->SetParameter(3,a[3]);
    fg2->SetParameter(4,a[4]);
    fg2->SetParameter(5,a[5]); 
    fg2->SetParameter(6,a[6]);
    fg2->SetParameter(7,a[7]);
    fg2->SetParameter(8,a[8]); 
    fg2->SetParameter(9,a[9]);
    fg2->SetParameter(10,a[10]);
    fg2->SetParameter(11,a[11]); 
    fg2->SetParameter(12,a[12]);    
    fg2->SetParameter(13,a[13]);
    fg2->SetParameter(14,a[14]);
    fg2->SetTitle("kt = #kappa_{#lambda} = 1 , c_{2} = 0 ; c_{g} ; c_{2g}");
    fg2->SetParameter(15,kt5d);    
    fg2->SetParameter(16,kl5d);
    fg2->SetParameter(17,c25d);
    fg2->SetParameter(18,norm); //0.013531
    //fg2->SetMinimum(0);
    fg2->SetContour(100);
    // 
    ////////////////////////////////
    kt5d=1.0;
    kl5d=10.0;
    c25d=0.0;
    // cg ===> x 
    // c2g ===> y
    TF2 *fg10 = new TF2("fg10","([0]*[15]**4 + [1]*[17]**2 + [2]*[15]**2*[16]**2 + [3]*x**2*[16]**2 +  [4]*y**2 + [5]*[17]*[15]**2 + [6]*[15]*[16]*[15]**2 + [7]*[15]*[16]*[17] + [8]*x*[16]*[17] + [9]*[17]*y + [10]*x*[16]*[15]**2 + [11]*y*[15]**2 + [12]*[16]*x*[15]*[16] + [13]*y*[15]*[16] + [14]*x*y*[16])/[18]",mincg,maxcg,mincg,maxcg);
    fg10->SetParameter(0,a[0]);
    fg10->SetParameter(1,a[1]);
    fg10->SetParameter(2,a[2]);    
    fg10->SetParameter(3,a[3]);
    fg10->SetParameter(4,a[4]);
    fg10->SetParameter(5,a[5]); 
    fg10->SetParameter(6,a[6]);
    fg10->SetParameter(7,a[7]);
    fg10->SetParameter(8,a[8]); 
    fg10->SetParameter(9,a[9]);
    fg10->SetParameter(10,a[10]);
    fg10->SetParameter(11,a[11]); 
    fg10->SetParameter(12,a[12]);    
    fg10->SetParameter(13,a[13]);
    fg10->SetParameter(14,a[14]);
    fg10->SetTitle("");
    fg10->SetParameter(15,kt5d);    
    fg10->SetParameter(16,kl5d);
    fg10->SetParameter(17,c25d);
    fg10->SetParameter(18,norm);// 0.013531
    fg10->SetMinimum(0);
    ////////////////////////////////
    kt5d=1.0;
    kl5d=-10.0;
    c25d=0.0;
    // cg ===> x 
    // c2g ===> y
    TF2 *fgm10 = new TF2("fgm10","([0]*[15]**4 + [1]*[17]**2 + [2]*[15]**2*[16]**2 + [3]*x**2*[16]**2 +  [4]*y**2 + [5]*[17]*[15]**2 + [6]*[15]*[16]*[15]**2 + [7]*[15]*[16]*[17] + [8]*x*[16]*[17] + [9]*[17]*y + [10]*x*[16]*[15]**2 + [11]*y*[15]**2 + [12]*[16]*x*[15]*[16] + [13]*y*[15]*[16] + [14]*x*y*[16])/[18]",mincg,maxcg,mincg,maxcg);
    fgm10->SetParameter(0,a[0]);
    fgm10->SetParameter(1,a[1]);
    fgm10->SetParameter(2,a[2]);    
    fgm10->SetParameter(3,a[3]);
    fgm10->SetParameter(4,a[4]);
    fgm10->SetParameter(5,a[5]); 
    fgm10->SetParameter(6,a[6]);
    fgm10->SetParameter(7,a[7]);
    fgm10->SetParameter(8,a[8]); 
    fgm10->SetParameter(9,a[9]);
    fgm10->SetParameter(10,a[10]);
    fgm10->SetParameter(11,a[11]); 
    fgm10->SetParameter(12,a[12]);    
    fgm10->SetParameter(13,a[13]);
    fgm10->SetParameter(14,a[14]);
    fgm10->SetTitle("");
    fgm10->SetParameter(15,kt5d);    
    fgm10->SetParameter(16,kl5d);
    fgm10->SetParameter(17,c25d);
    fgm10->SetParameter(18,norm);//0.013531
    fgm10->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< fg2->Eval(0,0)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  fg2->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  fg2->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    ////////////////////////////////////////////////////
    double cg=0.0;
    double c2g=0.0;
    c25d=0.0;
    // cg ===> x  ===> kl
    // c2g ===> y ===> kt
    TF2 *SM0 = new TF2("SM0","(([0]*y**4 + [1]*[17]**2 + [2]*y**2*x**2 + [3]*[15]**2*x**2 +  [4]*[15]**2 + [5]*[17]*y**2 + [6]*y*x*y**2 + [7]*[15]*x*[17] + [8]*[16]*x*[17] + [9]*[17]*y + [10]*[16]*x*[15]**2 + [11]*[16]*y**2 + [12]*x*[16]*[15]*x + [13]*[15]*[15]*x + [14]*[16]*[15])/[18])+[19]",-15,15,0.5,2.5);
    SM0->SetParameter(0,a[0]);
    SM0->SetParameter(1,a[1]);
    SM0->SetParameter(2,a[2]);    
    SM0->SetParameter(3,a[3]);
    SM0->SetParameter(4,a[4]);
    SM0->SetParameter(5,a[5]); 
    SM0->SetParameter(6,a[6]);
    SM0->SetParameter(7,a[7]);
    SM0->SetParameter(8,a[8]); 
    SM0->SetParameter(9,a[9]);
    SM0->SetParameter(10,a[10]);
    SM0->SetParameter(11,a[11]); 
    SM0->SetParameter(12,a[12]);    
    SM0->SetParameter(13,a[13]);
    SM0->SetParameter(14,a[14]);
    SM0->SetParameter(15,cg); //==>y     
    SM0->SetParameter(16,c2g);//==>x
    SM0->SetParameter(17,c25d);
    SM0->SetParameter(18,norm);// 0.013531
    SM0->SetParameter(19,0.0001);// 0.013531
    SM0->SetTitle("c_{2} = c_{2g} = c_{g} = 0 ; #kappa_{#lambda} ; #kappa_{t}");
    //SM0->SetMinimum(0);
    SM0->SetContour(200);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb "<<endl;
    cout<<"teste funcao kl , kt : 1,1 "<< SM0->Eval(1,1)<<endl;
    cout<<"teste funcao kl , kt : -10, 1  "<<  SM0->Eval(-10,1)<<endl;
    cout<<"teste funcao kl , kt : 10, 1  "<<  SM0->Eval(10,1)<<endl;
    ////////////////////////////////
    kt5d=1.0;
    kl5d=1.0;
    c25d=0.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt
    TF2 *l1 = new TF2("l1","([0]*y**4 + [1]*x**2 + [2]*y**2*[16]**2 + [3]*[17]**2*[16]**2 +  [4]*[15]**2 + [5]*x*y**2 + [6]*y*[16]*y**2 + [7]*y*[16]*x + [8]*[17]*[16]*x + [9]*x*[15] + [10]*[17]*[16]*y**2 + [11]*[15]*y**2 + [12]*[16]*[17]*y*[16] + [13]*[15]*y*[16] + [14]*[17]*[15]*[16])/[18]",-4,4,0.5,2.5);
    l1->SetParameter(0,a[0]);
    l1->SetParameter(1,a[1]);
    l1->SetParameter(2,a[2]);    
    l1->SetParameter(3,a[3]);
    l1->SetParameter(4,a[4]);
    l1->SetParameter(5,a[5]); 
    l1->SetParameter(6,a[6]);
    l1->SetParameter(7,a[7]);
    l1->SetParameter(8,a[8]); 
    l1->SetParameter(9,a[9]);
    l1->SetParameter(10,a[10]);
    l1->SetParameter(11,a[11]); 
    l1->SetParameter(12,a[12]);    
    l1->SetParameter(13,a[13]);
    l1->SetParameter(14,a[14]);
    l1->SetTitle("#kappa_{#lambda} =1 , c_{2g} = c_{g} = 0 ; c_{2} ; #kappa_{t}");
    l1->SetParameter(15,c2g); //==> c2g
    l1->SetParameter(16,kl5d);
    l1->SetParameter(17,cg); //==> cg
    l1->SetParameter(18,norm);//0.013531
    //l1->->SetRange(1e1,0.1,1e3,1);
    //l1->SetMaximum(4e2);
    //l1->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< l1->Eval(0,1)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  l1->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  l1->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    
    ////////////////////////////////
    kt5d=1.0;
    kl5d=0.0;
    c25d=0.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt
    TF2 *l0 = new TF2("l0","([0]*y**4 + [1]*x**2 + [2]*y**2*[16]**2 + [3]*[17]**2*[16]**2 +  [4]*[15]**2 + [5]*x*y**2 + [6]*y*[16]*y**2 + [7]*y*[16]*x + [8]*[17]*[16]*x + [9]*x*[15] + [10]*[17]*[16]*y**2 + [11]*[15]*y**2 + [12]*[16]*[17]*y*[16] + [13]*[15]*y*[16] + [14]*[17]*[15]*[16])/[18]",-4,4,0.5,2.5);
    l0->SetParameter(0,a[0]);
    l0->SetParameter(1,a[1]);
    l0->SetParameter(2,a[2]);    
    l0->SetParameter(3,a[3]);
    l0->SetParameter(4,a[4]);
    l0->SetParameter(5,a[5]); 
    l0->SetParameter(6,a[6]);
    l0->SetParameter(7,a[7]);
    l0->SetParameter(8,a[8]); 
    l0->SetParameter(9,a[9]);
    l0->SetParameter(10,a[10]);
    l0->SetParameter(11,a[11]); 
    l0->SetParameter(12,a[12]);    
    l0->SetParameter(13,a[13]);
    l0->SetParameter(14,a[14]);
    l0->SetTitle("");
    l0->SetParameter(15,c2g); //==> c2g
    l0->SetParameter(16,kl5d);
    l0->SetParameter(17,cg); //==> cg
    l0->SetParameter(18,norm);//0.013531
    l0->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< l0->Eval(0,1)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  l0->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  l0->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    ////////////////////////////////
    kt5d=1.0;
    kl5d=2.4;
    c25d=0.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt
    TF2 *l24 = new TF2("l24","([0]*y**4 + [1]*x**2 + [2]*y**2*[16]**2 + [3]*[17]**2*[16]**2 +  [4]*[15]**2 + [5]*x*y**2 + [6]*y*[16]*y**2 + [7]*y*[16]*x + [8]*[17]*[16]*x + [9]*x*[15] + [10]*[17]*[16]*y**2 + [11]*[15]*y**2 + [12]*[16]*[17]*y*[16] + [13]*[15]*y*[16] + [14]*[17]*[15]*[16])/[18]",-4,4,0.5,2.5);
    l24->SetParameter(0,a[0]);
    l24->SetParameter(1,a[1]);
    l24->SetParameter(2,a[2]);    
    l24->SetParameter(3,a[3]);
    l24->SetParameter(4,a[4]);
    l24->SetParameter(5,a[5]); 
    l24->SetParameter(6,a[6]);
    l24->SetParameter(7,a[7]);
    l24->SetParameter(8,a[8]); 
    l24->SetParameter(9,a[9]);
    l24->SetParameter(10,a[10]);
    l24->SetParameter(11,a[11]); 
    l24->SetParameter(12,a[12]);    
    l24->SetParameter(13,a[13]);
    l24->SetParameter(14,a[14]);
    l24->SetTitle("");
    l24->SetParameter(15,c2g); //==> c2g
    l24->SetParameter(16,kl5d);
    l24->SetParameter(17,cg); //==> cg
    l24->SetParameter(18,norm);//0.013531
    l24->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< l24->Eval(0,1)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  l24->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  l24->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    ////////////////////////////////
    kt5d=1.0;
    kl5d=5.0;
    c25d=0.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt
    TF2 *l5 = new TF2("l5","([0]*y**4 + [1]*x**2 + [2]*y**2*[16]**2 + [3]*[17]**2*[16]**2 +  [4]*[15]**2 + [5]*x*y**2 + [6]*y*[16]*y**2 + [7]*y*[16]*x + [8]*[17]*[16]*x + [9]*x*[15] + [10]*[17]*[16]*y**2 + [11]*[15]*y**2 + [12]*[16]*[17]*y*[16] + [13]*[15]*y*[16] + [14]*[17]*[15]*[16])/[18]",-4,4,0.5,2.5);
    l5->SetParameter(0,a[0]);
    l5->SetParameter(1,a[1]);
    l5->SetParameter(2,a[2]);    
    l5->SetParameter(3,a[3]);
    l5->SetParameter(4,a[4]);
    l5->SetParameter(5,a[5]); 
    l5->SetParameter(6,a[6]);
    l5->SetParameter(7,a[7]);
    l5->SetParameter(8,a[8]); 
    l5->SetParameter(9,a[9]);
    l5->SetParameter(10,a[10]);
    l5->SetParameter(11,a[11]); 
    l5->SetParameter(12,a[12]);    
    l5->SetParameter(13,a[13]);
    l5->SetParameter(14,a[14]);
    l5->SetTitle("");
    l5->SetParameter(15,c2g); //==> c2g
    l5->SetParameter(16,kl5d);
    l5->SetParameter(17,cg); //==> cg
    l5->SetParameter(18,norm);//0.013531
    l5->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< l5->Eval(0,1)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  l5->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  l5->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    ////////////////////////////////
    kt5d=1.0;
    kl5d=10.0;
    c25d=0.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt
    TF2 *l10 = new TF2("l10","([0]*y**4 + [1]*x**2 + [2]*y**2*[16]**2 + [3]*[17]**2*[16]**2 +  [4]*[15]**2 + [5]*x*y**2 + [6]*y*[16]*y**2 + [7]*y*[16]*x + [8]*[17]*[16]*x + [9]*x*[15] + [10]*[17]*[16]*y**2 + [11]*[15]*y**2 + [12]*[16]*[17]*y*[16] + [13]*[15]*y*[16] + [14]*[17]*[15]*[16])/[18]",-4,4,0.5,2.5);
    l10->SetParameter(0,a[0]);
    l10->SetParameter(1,a[1]);
    l10->SetParameter(2,a[2]);    
    l10->SetParameter(3,a[3]);
    l10->SetParameter(4,a[4]);
    l10->SetParameter(5,a[5]); 
    l10->SetParameter(6,a[6]);
    l10->SetParameter(7,a[7]);
    l10->SetParameter(8,a[8]); 
    l10->SetParameter(9,a[9]);
    l10->SetParameter(10,a[10]);
    l10->SetParameter(11,a[11]); 
    l10->SetParameter(12,a[12]);    
    l10->SetParameter(13,a[13]);
    l10->SetParameter(14,a[14]);
    l10->SetTitle("");
    l10->SetParameter(15,c2g); //==> c2g
    l10->SetParameter(16,kl5d);
    l10->SetParameter(17,cg); //==> cg
    l10->SetParameter(18,norm);//0.013531
    l10->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< l10->Eval(0,1)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  l10->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  l10->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    ////////////////////////////////
    kt5d=1.0;
    kl5d=-2.4;
    c25d=0.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt
    TF2 *lm24 = new TF2("lm24","([0]*y**4 + [1]*x**2 + [2]*y**2*[16]**2 + [3]*[17]**2*[16]**2 +  [4]*[15]**2 + [5]*x*y**2 + [6]*y*[16]*y**2 + [7]*y*[16]*x + [8]*[17]*[16]*x + [9]*x*[15] + [10]*[17]*[16]*y**2 + [11]*[15]*y**2 + [12]*[16]*[17]*y*[16] + [13]*[15]*y*[16] + [14]*[17]*[15]*[16])/[18]",-17,17,0.5,2.5);
    lm24->SetParameter(0,a[0]);
    lm24->SetParameter(1,a[1]);
    lm24->SetParameter(2,a[2]);    
    lm24->SetParameter(3,a[3]);
    lm24->SetParameter(4,a[4]);
    lm24->SetParameter(5,a[5]); 
    lm24->SetParameter(6,a[6]);
    lm24->SetParameter(7,a[7]);
    lm24->SetParameter(8,a[8]); 
    lm24->SetParameter(9,a[9]);
    lm24->SetParameter(10,a[10]);
    lm24->SetParameter(11,a[11]); 
    lm24->SetParameter(12,a[12]);    
    lm24->SetParameter(13,a[13]);
    lm24->SetParameter(14,a[14]);
    lm24->SetTitle("");
    lm24->SetParameter(15,c2g); //==> c2g
    lm24->SetParameter(16,kl5d);
    lm24->SetParameter(17,cg); //==> cg
    lm24->SetParameter(18,norm);//0.013531
    lm24->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< lm24->Eval(0,1)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  lm24->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  lm24->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    ////////////////////////////////
    kt5d=1.0;
    kl5d=-5.0;
    c25d=0.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt
    TF2 *lm5 = new TF2("lm5","([0]*y**4 + [1]*x**2 + [2]*y**2*[16]**2 + [3]*[17]**2*[16]**2 +  [4]*[15]**2 + [5]*x*y**2 + [6]*y*[16]*y**2 + [7]*y*[16]*x + [8]*[17]*[16]*x + [9]*x*[15] + [10]*[17]*[16]*y**2 + [11]*[15]*y**2 + [12]*[16]*[17]*y*[16] + [13]*[15]*y*[16] + [14]*[17]*[15]*[16])/[18]",-4,4,0.5,2.5);
    lm5->SetParameter(0,a[0]);
    lm5->SetParameter(1,a[1]);
    lm5->SetParameter(2,a[2]);    
    lm5->SetParameter(3,a[3]);
    lm5->SetParameter(4,a[4]);
    lm5->SetParameter(5,a[5]); 
    lm5->SetParameter(6,a[6]);
    lm5->SetParameter(7,a[7]);
    lm5->SetParameter(8,a[8]); 
    lm5->SetParameter(9,a[9]);
    lm5->SetParameter(10,a[10]);
    lm5->SetParameter(11,a[11]); 
    lm5->SetParameter(12,a[12]);    
    lm5->SetParameter(13,a[13]);
    lm5->SetParameter(14,a[14]);
    lm5->SetTitle("");
    lm5->SetParameter(15,c2g); //==> c2g
    lm5->SetParameter(16,kl5d);
    lm5->SetParameter(17,cg); //==> cg
    lm5->SetParameter(18,norm);//0.013531
    lm5->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< lm5->Eval(0,1)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  lm5->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  lm5->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    ////////////////////////////////
    kt5d=1.0;
    kl5d=-10.0;
    c25d=0.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt
    TF2 *lm10 = new TF2("lm10","([0]*y**4 + [1]*x**2 + [2]*y**2*[16]**2 + [3]*[17]**2*[16]**2 +  [4]*[15]**2 + [5]*x*y**2 + [6]*y*[16]*y**2 + [7]*y*[16]*x + [8]*[17]*[16]*x + [9]*x*[15] + [10]*[17]*[16]*y**2 + [11]*[15]*y**2 + [12]*[16]*[17]*y*[16] + [13]*[15]*y*[16] + [14]*[17]*[15]*[16])/[18]",-4,4,0.5,2.5);
    lm10->SetParameter(0,a[0]);
    lm10->SetParameter(1,a[1]);
    lm10->SetParameter(2,a[2]);    
    lm10->SetParameter(3,a[3]);
    lm10->SetParameter(4,a[4]);
    lm10->SetParameter(5,a[5]); 
    lm10->SetParameter(6,a[6]);
    lm10->SetParameter(7,a[7]);
    lm10->SetParameter(8,a[8]); 
    lm10->SetParameter(9,a[9]);
    lm10->SetParameter(10,a[10]);
    lm10->SetParameter(11,a[11]); 
    lm10->SetParameter(12,a[12]);    
    lm10->SetParameter(13,a[13]);
    lm10->SetParameter(14,a[14]);
    lm10->SetTitle("");
    lm10->SetParameter(15,c2g); //==> c2g
    lm10->SetParameter(16,kl5d);
    lm10->SetParameter(17,cg); //==> cg
    lm10->SetParameter(18,norm);//0.013531
    lm10->SetMinimum(0);
    //
    cout<<endl<<"Value of the formula in SM point: 0.013531 pb"<<a[0]<<endl;
    cout<<"teste funcao cg , c2g : 0,0 "<< lm10->Eval(0,1)<<endl;
    cout<<"teste funcao cg , c2g : -1,1  "<<  lm10->Eval(-1,1)<<endl;
    cout<<"teste funcao cg , c2g : 1,-1  "<<  lm10->Eval(-1,1)<<endl;
    cout<<" "<<endl;
    ///////////////////////////////////////////////////////////////
    // Draw this function in pad1 with Gouraud shading option
    TCanvas *c1 = new TCanvas("c1","Surfaces Drawing Options",1500,2500);
    const int Number = 3;
    Double_t Red[Number]    = { 1.00, 0.00, 0.00};
    Double_t Green[Number]  = { 0.00, 1.00, 0.00};
    Double_t Blue[Number]   = { 1.00, 0.00, 1.00};
    Double_t Length[Number] = { 0.00, 0.50, 1.00 };
    Int_t nb=30;
    TColor::CreateGradientColorTable(Number,Length,Red,Green,Blue,nb);
    ////////////////////////////
    TLatex* text = new TLatex();
    text->SetTextSize(0.09);
    c1->SetLogz(0);
    //////////////////////////////////////
    /*
    c1->Divide(3,4);   
    c1->cd(1);
    //c1_1->SetLogz();
    //c1->SetTicks(0,0);
    //c1->SetRightMargin(0.15);
    //c1->SetLeftMargin(0.15);
    //c1->SetBottomMargin(0.02);
    fg2->Draw("colz1");
    text->DrawLatex(-0.85,-0.8,"#kappa_{#lambda} = 1, #kappa_{t} = 1,  c_{2} = 0");
    //-----------------
    c1->cd(2);
    //c1_1->SetLogz();
    //c1_2->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    fg10->Draw("colz1");
    text->DrawLatex(-0.85,-0.8,"#kappa_{#lambda} = 10, #kappa_{t} = 1,  c_{2} = 0");
    //-----------------
    c1->cd(3);
    //c1_1->SetLogz();
    //c1_2->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    fgm10->Draw("colz1");
    text->DrawLatex(-0.85,-0.8,"#kappa_{#lambda} = -10, #kappa_{t} = 1,  c_{2} = 0");
    //text->SetTextSize(0.08);
    //text->SetTextColor(0);
    //text->DrawLatex(-0.85.,-0.8,"#kappa_{#lambda} = 2.4, #kappa_{t} = 1,  c_{2} = 0");
    c1->cd(4);
    //c1_1->SetLogz();
    //c1_2->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    SM0->Draw("colz1");
    text->DrawLatex(-3.,0.7,"c_{2} = c_{g}  = c_{2} = 0");  
    //text->SetTextSize(0.08);
    //text->SetTextColor(0);
    //text->DrawLatex(-0.85.,-0.8,"#kappa_{#lambda} = 2.4, #kappa_{t} = 1,  c_{2} = 0");
    c1->cd(5);
    //c1_5->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    l1->Draw("colz1");
    text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = 1, c_{g}  = c_{2} = 0");  
    c1->cd(6);
    //c1_5->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    l0->Draw("colz1");
    text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = c_{g}  = c_{2} = 0");  
    //text->SetTextSize(0.08);
    //text->SetTextColor(0);
    //text->DrawLatex(-0.85.,-0.8,"#kappa_{#lambda} = 2.4, #kappa_{t} = 1,  c_{2} = 0");   
    c1->cd(7);
    //c1_5->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    l24->Draw("colz");
    text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = 2.4, c_{g}  = c_{2} = 0");  
    //text->SetTextSize(0.08);
    //text->SetTextColor(0);
    //text->DrawLatex(-0.85.,-0.8,"#kappa_{#lambda} = 2.4, #kappa_{t} = 1,  c_{2} = 0");  
    c1->cd(8);
    //c1_5->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    l5->Draw("colz1");
    text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = 5, c_{g}  = c_{2} = 0");  
    //text->SetTextSize(0.08);
    //text->SetTextColor(0);
    //text->DrawLatex(-0.85.,-0.8,"#kappa_{#lambda} = 2.4, #kappa_{t} = 1,  c_{2} = 0");  
    c1->cd(9);
    //c1_5->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    l10->Draw("colz1");
    text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = 10, c_{g}  = c_{2} = 0");  
    //text->DrawLatex(-3,1,"SM plane in log scale");
    //text->SetTextSize(0.08);
    //text->SetTextColor(0);
    //text->DrawLatex(-0.85.,-0.8,"#kappa_{#lambda} = 2.4, #kappa_{t} = 1,  c_{2} = 0");  
    c1->cd(10);
    //c1_5->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    lm24->Draw("colz1");
    text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = -2.4, c_{g}  = c_{2} = 0");  
    c1->cd(11);
    //c1_5->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    lm5->Draw("colz1");
    text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = -5, c_{g}  = c_{2} = 0");  
    c1->cd(12);
    //c1_5->SetTicks(0,0);
    //c1_2->SetRightMargin(0.15);
    //c1_2->SetLeftMargin(0.15);
    //c1_2->SetBottomMargin(0.02);
    lm10->Draw("colz1");
    //text->DrawLatex(-3,1,"SM plane in log scale");
    //text->SetTextSize(0.08);
    //text->SetTextColor(0);
    text->DrawLatex(-3.,0.7,"#kappa_{#lambda} = -10, c_{g}  = c_{2} = 0");  
    c1->SaveAs("C2Fit.pdf");
    c1->Close();
     */
    //////////////////////////////////////////////////
    //
    // do histrograms with errors
    //
    // plot (point - fit)/fit between int nmintest, int nmaxtest
    // do by the planes
    //////////////////////////////////////////////////
    // take the fit
    // need to be done by planes
    //c1->Clear();
    // a
    double SMxs =  0.013531; // 1 0.017278;// 14 0.0041758;// 8tev 0.013531; // 13 tev 0.017278;// 0.0041758;
    TGraph2D *g2 = new TGraph2D(117);//(118);
    g2->SetMarkerStyle(20);
    g2->SetMarkerSize(2);
    g2->SetTitle("0");
    g2->SetTitle("#kappa_{t} = #kappa_{#lambda} = 1 , c_{2} = 0 ; c_{g} ; c_{2g}");
    int j=0;
    for (unsigned int ij = 0; ij < nmaxx ; ij++) if( par1[ij] ==1 && par0[ij] ==1 && par2[ij]==0 && cross_section[ij] >0.0001) if(ij!=301) {
        double fit = SMxs*(fg2->Eval(par3[ij], par4[ij]));
        cout<<j<<" "<< par3[ij]<<" "<< par4[ij]<<" "<<fit <<" "<< cross_section[ij]<<" diff: " <<(fit - cross_section[ij])/fit<< endl;
        g2->SetPoint(j, par3[ij], par4[ij], 100*(fit - cross_section[ij])/fit); 
        j++;
        //Differences2->Fill(par3[i], par4[i], (fit - cross_section[i])/fit); 
    }
    // b 
    ////////////////////////////////
    int ktb=1.0;
    int klb=1.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt ==> cg = c2g
    TF2 *pb = new TF2("pb","([0]*[15]**4 + [1]*x**2 + [2]*[15]**2*[16]**2 + [3]*y**2*[16]**2 +  [4]*y**2 + [5]*x*[15]**2 + [6]*[15]*[16]*[15]**2 + [7]*[15]*[16]*x + [8]*y*[16]*x - [9]*x*y + [10]*y*[16]*[15]**2 - [11]*y*[15]**2 + [12]*[16]*y*[15]*[16] - [13]*y*[15]*[16] - [14]*y*y*[16])/[17]",-3,3,-1,1);
    pb->SetParameter(0,a[0]);
    pb->SetParameter(1,a[1]);
    pb->SetParameter(2,a[2]);    
    pb->SetParameter(3,a[3]);
    pb->SetParameter(4,a[4]);
    pb->SetParameter(5,a[5]); 
    pb->SetParameter(6,a[6]);
    pb->SetParameter(7,a[7]);
    pb->SetParameter(8,a[8]); 
    pb->SetParameter(9,a[9]);
    pb->SetParameter(10,a[10]);
    pb->SetParameter(11,a[11]); 
    pb->SetParameter(12,a[12]);    
    pb->SetParameter(13,a[13]);
    pb->SetParameter(14,a[14]);
    pb->SetTitle("#kappa_{t} = #kappa_{#lambda} = 1 , c_{2g} = - c_{g} ; c_{2} ; c_{g}");
    pb->SetParameter(15,ktb); //==> c2g ==>kt
    pb->SetParameter(16,klb);
    pb->SetContour(200);
    //l5->SetParameter(17,cg); //==> cg
    pb->SetParameter(17,norm);//0.013531
    //pb->SetMinimum(0);
    TGraph2D *gb = new TGraph2D(132);//(118);
    gb->SetMarkerStyle(20);
    gb->SetMarkerSize(2);
    //gb->SetTitle("0");
    gb->SetTitle("#kappa_{t} = #kappa_{#lambda} = 1 , c_{2g} = - c_{g} ; c_{2} ; c_{g}");
    int jb=0;
    for (unsigned int ijb = 0; ijb < nmaxx ; ijb++) if( par1[ijb] ==1 && par0[ijb] ==1 && par3[ijb] == -par4[ijb] && cross_section[ijb] >0.0001) {
        double fitb = SMxs*(pb->Eval(par2[ijb], par3[ijb]));
        cout<<jb<<" "<<ijb<<" "<< par2[ijb]<<" "<< par4[ijb]<<" "<<fitb <<" "<< cross_section[ijb]<<" diff: " <<(fitb - cross_section[ijb])/fitb<< endl;
        if (abs((fitb - cross_section[ijb])/fitb) > 0.1) cout<<"here"<<endl;
        gb->SetPoint(jb, par2[ijb], par4[ijb], 100*((fitb - cross_section[ijb])/fitb)); 
        jb++;
        //Differences2->Fill(par3[i], par4[i], (fit - cross_section[i])/fit); 
    }
    //////////////////////////////////////////////
    // c
    ////////////////////////////////
    int ktc=1.0;
    int c2c=0.0;//==>c2
    // cg ===> x ==> c2 =//=>kl
    // c2g ===> y ==> kt ==> c2g = -cg 
    TF2 *pc = new TF2("pb","([0]*[15]**4 + [1]*[16]**2 + [2]*[15]**2*x**2 + [3]*y**2*x**2 +  [4]*y**2 + [5]*[16]*[15]**2 + [6]*[15]*x*[15]**2 + [7]*[15]*x*[16] + [8]*y*x*[16] - [9]*[16]*y + [10]*y*x*[15]**2 - [11]*y*[15]**2 + [12]*x*y*[15]*x - [13]*y*[15]*x - [14]*y*y*x)/[17]",-17,17,-1,1);
    pc->SetParameter(0,a[0]);
    pc->SetParameter(1,a[1]);
    pc->SetParameter(2,a[2]);    
    pc->SetParameter(3,a[3]);
    pc->SetParameter(4,a[4]);
    pc->SetParameter(5,a[5]); 
    pc->SetParameter(6,a[6]);
    pc->SetParameter(7,a[7]);
    pc->SetParameter(8,a[8]); 
    pc->SetParameter(9,a[9]);
    pc->SetParameter(10,a[10]);
    pc->SetParameter(11,a[11]); 
    pc->SetParameter(12,a[12]);    
    pc->SetParameter(13,a[13]);
    pc->SetParameter(14,a[14]);
    pc->SetTitle("#kappa_{t} = 1 , c2 = 0 , c_{2g} = - c_{g} ; #kappa_{#lambda} ; c_{g}");
    pc->SetParameter(15,ktc); //==> c2g ==>kt
    pc->SetParameter(16,c2c);// ==>c2
    //l5->SetParameter(17,cg); //==> cg
    pc->SetParameter(17,norm);//0.013531
    //pc->SetMinimum(0);
    pc->SetContour(200);
    TGraph2D *gc = new TGraph2D(125);//(118);
    gc->SetMarkerStyle(20);
    gc->SetMarkerSize(2);
    gc->SetTitle("#kappa_{t} = 1 , c2 = 0 , c_{2g} = - c_{g} ; #kappa_{#lambda} ; c_{g}");
  //  gc->GetYaxis()->SetTitle("c_{g}");
  //  gc->GetXaxis()->SetTitle("#kappa_{#lambda}");
    int jc=0;
    for (unsigned int ijb = 0; ijb < nmaxx ; ijb++) if( par1[ijb] ==1 && par2[ijb] ==0 && par3[ijb] == -par4[ijb]  && cross_section[ijb] >0.0001 && par3[ijb] >-1.5) { //&& abs(par0[ijb]) <6
        double fitc = SMxs*(pc->Eval(par0[ijb], par3[ijb]));
        //cout<<jb<<" "<<ijb<<" "<< par0[ijb]<<" "<< par4[ijb]<<" "<<fitc <<" "<< cross_section[ijb]<<" diff: " <<(fitc - cross_section[ijb])/fitc<< endl;
        if (abs((fitc - cross_section[ijb])/fitc) > 0.1) cout<<"here"<<endl;
        gc->SetPoint(jc, par0[ijb], par3[ijb], 100*((fitc - cross_section[ijb])/fitc)); 
        jc++;
        //Differences2->Fill(par3[i], par4[i], (fit - cross_section[i])/fit); 
    }
    //////////////////////////////////
    // d -- SM plane
    //SM0->Eval(1,1)
    // cg ===> x  ===> kl
    // c2g ===> y ===> kt
    TGraph2D *gSM = new TGraph2D(112);//(118);
    gSM->SetMarkerStyle(20);
    gSM->SetMarkerSize(2);
    gSM->SetTitle("0");
    gSM->SetTitle("c_{2} = c_{2g} = c_{g} = 0 ; #kappa_{#lambda} ; #kappa_{t}");
    int jSM=0;
    for (unsigned int ii = 0; ii < nmaxx ; ii++) if( par2[ii] ==0 && par3[ii] ==0 && par4[ii]==0 && cross_section[ii] >0.00001 &&  cross_section[ii] <10000 && par1[ii] >0.3 && ii!=301) {
        double fitSM = SMxs*(SM0->Eval(par0[ii], par1[ii]));
        //{
        //cout<<" SM plane"<<jSM<<" "<<ii<<" " << par0[ii]<<" "<< par1[ii]<<" "<<fitSM <<" "<< cross_section[ii]<<" diff: " <<(fitSM - cross_section[ii])/fitSM<< endl;
        if (abs((fitSM - cross_section[ii])/fitSM) > 0.1) cout<<"here"<<endl;
        gSM->SetPoint(jSM, par0[ii], par1[ii], 100*(fitSM - cross_section[ii])/fitSM); 
        jSM++;
        //}
        //Differences2->Fill(par3[i], par4[i], (fit - cross_section[i])/fit); 
    }    
    //////////////////////////////////
    // e -- SM plane
    //SM0->Eval(1,1)
    // cg ===> x  ===> c2
    // c2g ===> y ===> kt
    TGraph2D *gSMc2 = new TGraph2D(62);//(118);//57 13 tev
    gSMc2->SetMarkerStyle(20);
    gSMc2->SetMarkerSize(2);
    //gSMc2->SetTitle("0");
    gSMc2->SetTitle("#kappa_{#lambda} =1 , c_{2g} = c_{g} = 0 ; c_{2} ; #kappa_{t}");
    int jSMc2=0;
    for (unsigned int ii = 0; ii < nmaxx ; ii++) if( par0[ii] ==1 && par3[ii] ==0 && par4[ii]==0 && cross_section[ii] >0.00001 &&  cross_section[ii] <10000 && par1[ii] >0.25 ) if(ii!=301){
        double fitSM = SMxs*(l1->Eval(par2[ii], par1[ii]));
        //{
        cout<<jSMc2<<" "<<ii<<" " << par2[ii]<<" "<< par1[ii]<<" "<<fitSM <<" "<< cross_section[ii]<<" diff: " <<(fitSM - cross_section[ii])/fitSM<< endl;
        if (abs((fitSM - cross_section[ii])/fitSM) > 0.1) cout<<"here"<<endl;
        gSMc2->SetPoint(jSMc2, par2[ii], par1[ii], 100*(fitSM - cross_section[ii])/fitSM); 
        jSMc2++;
        //}
        //Differences2->Fill(par3[i], par4[i], (fit - cross_section[i])/fit); 
    }   
    ////////////////////////////////
    // f = cg =0
    int ktf=1.0;
    int klf=1.0;
    // cg ===> x ==> c2
    // c2g ===> y ==> kt ==> cg = c2g
    TF2 *pf = new TF2("pf","([0]*[15]**4 + [1]*x**2 + [2]*[15]**2*[16]**2 +  [4]*y**2 + [5]*x*[15]**2 + [6]*[15]*[16]*[15]**2 + [7]*[15]*[16]*x + [9]*x*y + [11]*y*[15]**2  + [13]*y*[15]*[16])/[17]",-3,3,-1,1);
    pf->SetParameter(0,a[0]);
    pf->SetParameter(1,a[1]);
    pf->SetParameter(2,a[2]);    
    pf->SetParameter(3,a[3]);
    pf->SetParameter(4,a[4]);
    pf->SetParameter(5,a[5]); 
    pf->SetParameter(6,a[6]);
    pf->SetParameter(7,a[7]);
    pf->SetParameter(8,a[8]); 
    pf->SetParameter(9,a[9]);
    pf->SetParameter(10,a[10]);
    pf->SetParameter(11,a[11]); 
    pf->SetParameter(12,a[12]);    
    pf->SetParameter(13,a[13]);
    pf->SetParameter(14,a[14]);
    pf->SetTitle("#kappa_{t} = #kappa_{#lambda} = 1 , c_{g} = 0 ; c_{2} ; c_{2g}");
    //pf->SetTitleSize(0.3);
    pf->SetParameter(15,ktf); //==> c2g ==>kt
    pf->SetParameter(16,klf);
    pf->SetContour(200);
    //l5->SetParameter(17,cg); //==> cg
    pf->SetParameter(17,norm);//0.013531
    //pb->SetMinimum(0);
    TGraph2D *gf = new TGraph2D(132);//(118);
    gf->SetMarkerStyle(20);
    gf->SetMarkerSize(2);
    //gb->SetTitle("0");
    gf->SetTitle("#kappa_{t} = #kappa_{#lambda} = 1 , c_{g} = 0 ; c_{2} ; c_{2g}");
    int jf=0;
    for (unsigned int ijb = 0; ijb < nmaxx ; ijb++) if( par1[ijb] ==1 && par0[ijb] ==1 && par3[ijb] == 0 && cross_section[ijb] >0.0001) {
        double fitb = SMxs*(pf->Eval(par2[ijb], par4[ijb]));
        cout<<jf<<" "<<ijb<<" "<< par2[ijb]<<" "<< par4[ijb]<<" "<<fitb <<" "<< cross_section[ijb]<<" diff: " <<(fitb - cross_section[ijb])/fitb<< endl;
        if (abs((fitb - cross_section[ijb])/fitb) > 0.1) cout<<"here"<<endl;
        gf->SetPoint(jf, par2[ijb], par4[ijb], 100*((fitb - cross_section[ijb])/fitb)); 
        jf++;
        //Differences2->Fill(par3[i], par4[i], (fit - cross_section[i])/fit); 
    }
    //////////////////////////////////////////////
    // rest square
    TCanvas *c2 = new TCanvas("c2","Surfaces Drawing Options",700,2200);
    c2->Divide(2,3);   
    c2->cd(1);
    c2_1->SetRightMargin(0.17);
    c2_1->SetLeftMargin(0.21);
    //c2->cd();
    c2_1->SetTheta(90.0-0.001);
    c2_1->SetPhi(0.0+0.001);
    gSM->Draw("Pcolz");
    //fg2->Draw("cont3SAME");
    c2->cd(2);
    c2_2->SetRightMargin(0.2);
    c2_2->SetLeftMargin(0.21);
    c2_2->SetTheta(90.0-0.001);
    c2_2->SetPhi(0.0+0.001);
    gSMc2->Draw("Pcolz");
    //SM0->Draw("cont3SAME");
    c2->cd(3);
    c2_3->SetRightMargin(0.2);
    c2_3->SetLeftMargin(0.21);
    c2_3->SetTheta(90.0-0.001);
    c2_3->SetPhi(0.0+0.001);
    gb->Draw("Pcolz");
    //pb->Draw("cont3SAME");
    c2->cd(4);
    c2_4->SetRightMargin(0.2);
    c2_4->SetLeftMargin(0.21);
    c2_4->SetTheta(90.0-0.001);
    c2_4->SetPhi(0.0+0.001);
    gc->Draw("Pcolz");
    //pc->Draw("cont3SAME");
    c2->cd(5);
    c2_5->SetRightMargin(0.2);
    c2_5->SetLeftMargin(0.21);
    c2_5->SetTheta(90.0-0.001);
    c2_5->SetPhi(0.0+0.001);
    
    g2->Draw("Pcolz");
    //
    c2->cd(6);
    c2_6->SetRightMargin(0.2);
    c2_6->SetLeftMargin(0.21);
    c2_6->SetTheta(90.0-0.001);
    c2_6->SetPhi(0.0+0.001);
    gf->Draw("Pcolz");
    c2->SaveAs("DiffSMplane_all_orthogonal_13tev.pdf");
    //////////////////////////////////////////////
    // rest square
    TCanvas *c3 = new TCanvas("c3","Surfaces Drawing Options",2200,700);
    c3->Divide(3,2); 
    c3->cd(1);
    c3_1->SetLogz(1);
    c3_1->SetLeftMargin(0.19);
    c3_1->SetBottomMargin(0.19);
    c3_1->SetRightMargin(0.2);
    //c2->cd();
    //g2->Draw("Pcolz");
    SM0->Draw("colz");
    
    c3->cd(2);
    c3_2->SetLogz(1);
    c3_2->SetRightMargin(0.19);
    c3_2->SetBottomMargin(0.19);
    c3_2->SetLeftMargin(0.21);
    //gSM->Draw("Pcolz");
    l1->Draw("colz");
    //c3_2->SetRightMargin(0.2);
    c3->cd(3);
    c3_3->SetLogz(1);
    c3_3->SetRightMargin(0.17);
    c3_3->SetBottomMargin(0.19);
    c3_3->SetLeftMargin(0.21);
    //gb->Draw("Pcolz");
    pb->Draw("colz");
    c3->cd(4);
    c3_4->SetLogz(1);
    c3_4->SetRightMargin(0.16);
    c3_4->SetBottomMargin(0.19);
    c3_4->SetLeftMargin(0.21);
    //gc->Draw("Pcolz");
    pc->Draw("colz");
    c3->cd(5);
    c3_5->SetLogz(1);
    c3_5->SetRightMargin(0.19);
    c3_5->SetBottomMargin(0.19);
    c3_5->SetLeftMargin(0.21);
    //gSMc2->Draw("Pcolz");
    
    fg2->Draw("colz");
    c3->cd(6);
    c3_6->SetLogz(1);
    c3_6->SetRightMargin(0.19);
    c3_6->SetBottomMargin(0.19);
    c3_6->SetLeftMargin(0.21);
    //gSMc2->Draw("Pcolz");
    pf->Draw("colz");
    
    c3->SaveAs("CX_all_orthogonal_13tev.pdf");
    //////////////////////////////////////////////
    
    /*  TGraph *gall = new TGraph(nmaxx - nminx);
    gall->SetMarkerStyle(20);
    gall->SetMarkerSize(2);
    gall->SetTitle("0");
    for (unsigned int i = 0; i < nmaxx - nminx; i++) if( par1[i] ==1 && par0[i] ==1 && par2[i]==0 ) {
        double fit = fg2->Eval(par3[i], par4[i]);
        cout<< par3[i]<<" "<< par4[i]<<" "<< (fit - cross_section[i])/fit<< endl;
        g2->SetPoint(i, par3[i], par4[i], (fit - cross_section[i])/fit); 
        //Differences2->Fill(par3[i], par4[i], (fit - cross_section[i])/fit); 
    }*/
    



    
}
Example #6
0
void setStyle(){

//Style//

  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

// For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

// For the Pad:
  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(false);
  tdrStyle->SetPadGridY(false);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

// For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.16);
  tdrStyle->SetPadRightMargin(0.02);

// For the Global title:

  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);

// For the axis titles:

  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.06, "XYZ");
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(0.9);

// For the axis labels:

  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.05, "XYZ");

// For the axis:

  tdrStyle->SetAxisColor(1, "XYZ");
  //tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  tdrStyle->SetPaperSize(20.,20.);

  tdrStyle->SetHatchesLineWidth(5);
  tdrStyle->SetHatchesSpacing(0.05);

  tdrStyle->SetOptStat(0);

  tdrStyle->cd();
}
Example #7
0
void setTDRStyle() {
  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

// For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

// For the Pad:
  tdrStyle->SetPadBorderMode(0);
  // tdrStyle->SetPadBorderSize(Width_t size = 1);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(false);
  tdrStyle->SetPadGridY(false);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

// For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);


//For the date:
  tdrStyle->SetOptDate(0);
  // tdrStyle->SetDateX(Float_t x = 0.01);
  // tdrStyle->SetDateY(Float_t y = 0.01);

// For the statistics box:
  tdrStyle->SetOptFile(11);
  tdrStyle->SetOptStat(11111111);

// For the Global title:

  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);

// For the axis titles:

  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.06, "XYZ");
  // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
  // tdrStyle->SetTitleYSize(Float_t size = 0.02);
  tdrStyle->SetTitleXOffset(0.7);
  tdrStyle->SetTitleYOffset(0.7);
  // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset

// For the axis labels:

  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.03, "XYZ");

// For the axis:

  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  tdrStyle->cd();

}
Example #8
0
void Style_Toby_2()
{
   // Add the saved style to the current ROOT session.

   delete gROOT->GetStyle("Toby_2");

   TStyle *tmpStyle = new TStyle("Toby_2", "Style for posters and talks");
   tmpStyle->SetNdivisions(510, "x");
   tmpStyle->SetNdivisions(510, "y");
   tmpStyle->SetNdivisions(510, "z");
   tmpStyle->SetAxisColor(1, "x");
   tmpStyle->SetAxisColor(1, "y");
   tmpStyle->SetAxisColor(1, "z");
   tmpStyle->SetLabelColor(1, "x");
   tmpStyle->SetLabelColor(1, "y");
   tmpStyle->SetLabelColor(1, "z");
   tmpStyle->SetLabelFont(42, "x");
   tmpStyle->SetLabelFont(42, "y");
   tmpStyle->SetLabelFont(42, "z");
   tmpStyle->SetLabelOffset(0.005, "x");
   tmpStyle->SetLabelOffset(0.005, "y");
   tmpStyle->SetLabelOffset(0.005, "z");
   tmpStyle->SetLabelSize(0.035, "x");
   tmpStyle->SetLabelSize(0.035, "y");
   tmpStyle->SetLabelSize(0.035, "z");
   tmpStyle->SetTickLength(0.03, "x");
   tmpStyle->SetTickLength(0.03, "y");
   tmpStyle->SetTickLength(0.03, "z");
   tmpStyle->SetTitleOffset(1, "x");
   tmpStyle->SetTitleOffset(1, "y");
   tmpStyle->SetTitleOffset(1, "z");
   tmpStyle->SetTitleSize(0.035, "x");
   tmpStyle->SetTitleSize(0.035, "y");
   tmpStyle->SetTitleSize(0.035, "z");
   tmpStyle->SetTitleColor(1, "x");
   tmpStyle->SetTitleColor(1, "y");
   tmpStyle->SetTitleColor(1, "z");
   tmpStyle->SetTitleFont(42, "x");
   tmpStyle->SetTitleFont(42, "y");
   tmpStyle->SetTitleFont(42, "z");
   tmpStyle->SetBarWidth(1);
   tmpStyle->SetBarOffset(0);
   tmpStyle->SetDrawBorder(0);
   tmpStyle->SetOptLogx(0);
   tmpStyle->SetOptLogy(0);
   tmpStyle->SetOptLogz(0);
   tmpStyle->SetOptDate(0);
   tmpStyle->SetOptStat(111);
   tmpStyle->SetOptTitle(kTRUE);
   tmpStyle->SetOptFit(0);
   tmpStyle->SetNumberContours(20);
   tmpStyle->GetAttDate()->SetTextFont(62);
   tmpStyle->GetAttDate()->SetTextSize(0.025);
   tmpStyle->GetAttDate()->SetTextAngle(0);
   tmpStyle->GetAttDate()->SetTextAlign(11);
   tmpStyle->GetAttDate()->SetTextColor(1);
   tmpStyle->SetDateX(0.01);
   tmpStyle->SetDateY(0.01);
   tmpStyle->SetEndErrorSize(2);
   tmpStyle->SetErrorX(0.5);
   tmpStyle->SetFuncColor(2);
   tmpStyle->SetFuncStyle(1);
   tmpStyle->SetFuncWidth(2);
   tmpStyle->SetGridColor(0);
   tmpStyle->SetGridStyle(3);
   tmpStyle->SetGridWidth(1);
   tmpStyle->SetLegendBorderSize(1);
   tmpStyle->SetLegendFillColor(0);
   tmpStyle->SetLegendFont(42);
   tmpStyle->SetHatchesLineWidth(1);
   tmpStyle->SetHatchesSpacing(1);
   tmpStyle->SetFrameFillColor(0);
   tmpStyle->SetFrameLineColor(1);
   tmpStyle->SetFrameFillStyle(1001);
   tmpStyle->SetFrameLineStyle(1);
   tmpStyle->SetFrameLineWidth(1);
   tmpStyle->SetFrameBorderSize(1);
   tmpStyle->SetFrameBorderMode(0);
   tmpStyle->SetHistFillColor(0);
   tmpStyle->SetHistLineColor(602);
   tmpStyle->SetHistFillStyle(1001);
   tmpStyle->SetHistLineStyle(1);
   tmpStyle->SetHistLineWidth(1);
   tmpStyle->SetHistMinimumZero(kFALSE);
   tmpStyle->SetCanvasPreferGL(kFALSE);
   tmpStyle->SetCanvasColor(0);
   tmpStyle->SetCanvasBorderSize(2);
   tmpStyle->SetCanvasBorderMode(0);
   tmpStyle->SetCanvasDefH(500);
   tmpStyle->SetCanvasDefW(700);
   tmpStyle->SetCanvasDefX(10);
   tmpStyle->SetCanvasDefY(10);
   tmpStyle->SetPadColor(0);
   tmpStyle->SetPadBorderSize(2);
   tmpStyle->SetPadBorderMode(0);
   tmpStyle->SetPadBottomMargin(0.1);
   tmpStyle->SetPadTopMargin(0.1);
   tmpStyle->SetPadLeftMargin(0.1);
   tmpStyle->SetPadRightMargin(0.1);
   tmpStyle->SetPadGridX(kFALSE);
   tmpStyle->SetPadGridY(kFALSE);
   tmpStyle->SetPadTickX(0);
   tmpStyle->SetPadTickY(0);
   tmpStyle->SetPaperSize(20, 26);
   tmpStyle->SetScreenFactor(1);
   tmpStyle->SetStatColor(0);
   tmpStyle->SetStatTextColor(1);
   tmpStyle->SetStatBorderSize(1);
   tmpStyle->SetStatFont(42);
   tmpStyle->SetStatFontSize(0);
   tmpStyle->SetStatStyle(1001);
   tmpStyle->SetStatFormat("6.4g");
   tmpStyle->SetStatX(0.9);
   tmpStyle->SetStatY(0.97);
   tmpStyle->SetStatW(0.15);
   tmpStyle->SetStatH(0.16);
   tmpStyle->SetStripDecimals(kTRUE);
   tmpStyle->SetTitleAlign(23);
   tmpStyle->SetTitleFillColor(0);
   tmpStyle->SetTitleTextColor(1);
   tmpStyle->SetTitleBorderSize(0);
   tmpStyle->SetTitleFont(42);
   tmpStyle->SetTitleFontSize(0.05);
   tmpStyle->SetTitleStyle(0);
   tmpStyle->SetTitleX(0.5);
   tmpStyle->SetTitleY(0.995);
   tmpStyle->SetTitleW(0);
   tmpStyle->SetTitleH(0);
   tmpStyle->SetLegoInnerR(0.5);

   Int_t fPaletteColor[50] = {51, 52, 53, 54, 55, 56, 57, 58, 59, 
                             60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 
                             70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 
                             80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 
                             90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100};
   tmpStyle->SetPalette(50, fPaletteColor);

   TString fLineStyleArrayTmp[30] = {"", "   ", "  12 12", "  4 8", 
                             "  12 16 4 16", "  20 12 4 12", "  20 12 4 12 4 12 4 12", "  20 20", "  20 12 4 12 4 12", 
                             "  80 20", "  80 40 4 40", "   ", "   ", "   ", 
                             "   ", "   ", "   ", "   ", "   ", 
                             "   ", "   ", "   ", "   ", "   ", 
                             "   ", "   ", "   ", "   ", "   ", "   "};
   for (Int_t i=0; i<30; i++)
      tmpStyle->SetLineStyleString(i, fLineStyleArrayTmp[i]);

   tmpStyle->SetHeaderPS("");
   tmpStyle->SetTitlePS("");
   tmpStyle->SetFitFormat("5.4g");
   tmpStyle->SetPaintTextFormat("g");
   tmpStyle->SetLineScalePS(3);
   tmpStyle->SetColorModelPS(0);
   tmpStyle->SetTimeOffset(788918400);

   tmpStyle->SetLineColor(1);
   tmpStyle->SetLineStyle(1);
   tmpStyle->SetLineWidth(1);
   tmpStyle->SetFillColor(19);
   tmpStyle->SetFillStyle(1001);
   tmpStyle->SetMarkerColor(1);
   tmpStyle->SetMarkerSize(1);
   tmpStyle->SetMarkerStyle(1);
   tmpStyle->SetTextAlign(11);
   tmpStyle->SetTextAngle(0);
   tmpStyle->SetTextColor(1);
   tmpStyle->SetTextFont(62);
   tmpStyle->SetTextSize(0.05);
}
Example #9
0
void set_plot_style() {
    TStyle* style = new TStyle("style", "Style for P-TDR");

    // For the canvas:
    style->SetCanvasBorderMode(0);
    style->SetCanvasColor(kWhite);
    style->SetCanvasDefX(0);  //Position on screen
    style->SetCanvasDefY(0);

    // For the Pad:
    style->SetPadBorderMode(0);
    style->SetPadColor(kWhite);
    style->SetPadGridX(false);
    style->SetPadGridY(false);
    style->SetGridColor(kBlack);
    style->SetGridStyle(3);
    style->SetGridWidth(1);

    // For the frame:
    style->SetFrameBorderMode(0);
    style->SetFrameBorderSize(1);
    style->SetFrameFillColor(kWhite);
    style->SetFrameFillStyle(0);
    style->SetFrameLineColor(kBlack);
    style->SetFrameLineStyle(1);
    style->SetFrameLineWidth(1);

    // For the histo:
    // style->SetHistFillColor(1);
    style->SetHistFillStyle(0); //
    style->SetHistLineColor(kBlack);
    style->SetHistLineStyle(0);
    style->SetHistLineWidth(1);

    style->SetEndErrorSize(2);
    style->SetErrorX(0.);

    style->SetMarkerStyle(20);

    //For the fit/function:
    style->SetOptFit(1);
    style->SetFitFormat("5.4g");
    style->SetFuncColor(kRed);
    style->SetFuncStyle(1);
    style->SetFuncWidth(1);

    //For the date:
    style->SetOptDate(0);

    // For the statistics box:
    style->SetOptFile(0);
    style->SetOptStat(0);  // To display the mean and RMS: SetOptStat("mr");
    style->SetStatColor(kWhite);
    style->SetStatFont(42);
    style->SetStatFontSize(0.025);
    style->SetStatTextColor(kBlack);
    style->SetStatFormat("6.4g");
    style->SetStatBorderSize(1);
    style->SetStatH(0.1);
    style->SetStatW(0.15);

    // Margins:
    style->SetPadTopMargin(1 - 0.95);
    style->SetPadBottomMargin(0.1);
    style->SetPadLeftMargin(0.12);
    style->SetPadRightMargin(1 - 0.96);

    // For the Global title:
    style->SetOptTitle(0);
    style->SetTitleFont(42);
    style->SetTitleColor(kBlack);
    style->SetTitleTextColor(kBlack);
    style->SetTitleFillColor(kWhite);  //10 is roughly kWhite, 10% grey?
    style->SetTitleFontSize(0.05);

    // For the axis titles:
    style->SetTitleColor(kBlack, "XYZ");
    style->SetTitleFont(42, "XYZ");
    style->SetTitleSize(0.06, "XYZ");
    style->SetTitleXOffset(0.9);
    style->SetTitleYOffset(1.25);

    // For the axis labels:
    style->SetLabelColor(kBlack, "XYZ");
    style->SetLabelFont(42, "XYZ");
    style->SetLabelOffset(0.007, "XYZ");
    style->SetLabelSize(0.05, "XYZ");

    // For the axis:
    style->SetAxisColor(kBlack, "XYZ");
    style->SetStripDecimals(true);
    style->SetTickLength(0.03, "XYZ");
    style->SetNdivisions(510, "XYZ");
    style->SetPadTickX(true);  // To get tick marks on the opposite side of the frame
    style->SetPadTickY(true);

    // Change for log plots:
    style->SetOptLogx(false);
    style->SetOptLogy(false);
    style->SetOptLogz(false);

    // Set the style
    style->cd();
}
void setStyle() {

  // set the TStyle
  TStyle* style = new TStyle("DrawBaseStyle", "");
  style->SetCanvasColor(0);
  style->SetPadColor(0);
  style->SetFrameFillColor(0);
  style->SetStatColor(0);
  style->SetOptStat(0);
  style->SetTitleFillColor(0);
  style->SetCanvasBorderMode(0);
  style->SetPadBorderMode(0);
  style->SetFrameBorderMode(0);
  style->SetPadBottomMargin(0.12);
  style->SetPadLeftMargin(0.12);
  style->cd();
  // For the canvas:
  style->SetCanvasBorderMode(0);
  style->SetCanvasColor(kWhite);
  style->SetCanvasDefH(600); //Height of canvas
  style->SetCanvasDefW(600); //Width of canvas
  style->SetCanvasDefX(0); //POsition on screen
  style->SetCanvasDefY(0);
  // For the Pad:
  style->SetPadBorderMode(0);
  style->SetPadColor(kWhite);
  style->SetPadGridX(false);
  style->SetPadGridY(false);
  style->SetGridColor(0);
  style->SetGridStyle(3);
  style->SetGridWidth(1);
  // For the frame:
  style->SetFrameBorderMode(0);
  style->SetFrameBorderSize(1);
  style->SetFrameFillColor(0);
  style->SetFrameFillStyle(0);
  style->SetFrameLineColor(1);
  style->SetFrameLineStyle(1);
  style->SetFrameLineWidth(1);
  // Margins:
  style->SetPadTopMargin(0.05);
  style->SetPadBottomMargin(0.15);//0.13);
  style->SetPadLeftMargin(0.15);//0.16);
  style->SetPadRightMargin(0.05);//0.02);
  // For the Global title:
  style->SetOptTitle(0);
  style->SetTitleFont(42);
  style->SetTitleColor(1);
  style->SetTitleTextColor(1);
  style->SetTitleFillColor(10);
  style->SetTitleFontSize(0.05);
  // For the axis titles:
  style->SetTitleColor(1, "XYZ");
  style->SetTitleFont(42, "XYZ");
  style->SetTitleSize(0.05, "XYZ");
  style->SetTitleXOffset(1.15);//0.9);
  style->SetTitleYOffset(1.3); // => 1.15 if exponents
  // For the axis labels:
  style->SetLabelColor(1, "XYZ");
  style->SetLabelFont(42, "XYZ");
  style->SetLabelOffset(0.007, "XYZ");
  style->SetLabelSize(0.045, "XYZ");
  // For the axis:
  style->SetAxisColor(1, "XYZ");
  style->SetStripDecimals(kTRUE);
  style->SetTickLength(0.03, "XYZ");
  style->SetNdivisions(510, "XYZ");
  style->SetPadTickX(1); // To get tick marks on the opposite side of the frame
  style->SetPadTickY(1);
  // for histograms:
  style->SetHistLineColor(0);
  style->cd();

}
Example #11
0
void met(){

  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  // tdrStyle->SetPadBorderSize(Width_t size = 1);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(true);
  tdrStyle->SetPadGridY(true);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  // For the histo:
  // tdrStyle->SetHistFillColor(1);
  // tdrStyle->SetHistFillStyle(0);
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  // tdrStyle->SetLegoInnerR(Float_t rad = 0.5);
  // tdrStyle->SetNumberContours(Int_t number = 20);

  tdrStyle->SetEndErrorSize(2);
  //  tdrStyle->SetErrorMarker(20);
  tdrStyle->SetErrorX(0.);

  tdrStyle->SetMarkerStyle(20);

  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

  //For the date:
  tdrStyle->SetOptDate(0);
  // tdrStyle->SetDateX(Float_t x = 0.01);
  // tdrStyle->SetDateY(Float_t y = 0.01);

  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat("emr"); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);
  // tdrStyle->SetStatStyle(Style_t style = 1001);
  // tdrStyle->SetStatX(Float_t x = 0);
  // tdrStyle->SetStatY(Float_t y = 0);

  // Margins:
  tdrStyle->SetPadTopMargin(0.07);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.13);
  tdrStyle->SetPadRightMargin(0.05);

  // For the Global title:
  //tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(35);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.045);
  // tdrStyle->SetTitleH(0); // Set the height of the title box
  // tdrStyle->SetTitleW(0); // Set the width of the title box
  tdrStyle->SetTitleX(0.15); // Set the position of the title box
  // tdrStyle->SetTitleY(0.985); // Set the position of the title box
  // tdrStyle->SetTitleStyle(Style_t style = 1001);
  tdrStyle->SetTitleBorderSize(0);

  // For the axis titles:
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.04, "XYZ");
  // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
  // tdrStyle->SetTitleYSize(Float_t size = 0.02);
  tdrStyle->SetTitleXOffset(1.05);
  tdrStyle->SetTitleYOffset(1.45);
  // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset

  // For the axis labels:
  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.03, "XYZ");

  // For the axis:
  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  // Change for log plots:
  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
  tdrStyle->SetOptLogz(0);

  // Postscript options:
  tdrStyle->SetPaperSize(20.,20.);
  // tdrStyle->SetLineScalePS(Float_t scale = 3);
  // tdrStyle->SetLineStyleString(Int_t i, const char* text);
  // tdrStyle->SetHeaderPS(const char* header);
  // tdrStyle->SetTitlePS(const char* pstitle);

  //tdrStyle->SetBarOffset(Float_t baroff = 0.5);
  //tdrStyle->SetBarWidth(Float_t barwidth = 0.5);
  //tdrStyle->SetPaintTextFormat(const char* format = "g");
  tdrStyle->SetPalette(1);
  //tdrStyle->SetTimeOffset(Double_t toffset);
  //tdrStyle->SetHistMinimumZero(kTRUE);



  const Int_t NRGBs = 5;
  const Int_t NCont = 255;

  Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
  Double_t red[NRGBs]   = { 0.00, 0.00, 0.87, 1.00, 0.51 };
  Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
  Double_t blue[NRGBs]  = { 0.51, 1.00, 0.12, 0.00, 0.00 };
  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
  tdrStyle->SetNumberContours(NCont);

  gROOT -> ForceStyle();

  tdrStyle->cd();
  gStyle->SetOptStat(kFALSE);

  TFile *f_sig = new TFile("../../rootFiles/higgsHistograms_susyHiggs.root","READ");
  f_sig->cd("Analyzer");  
  TH1F *h_sig_pf   = new TH1F("h_sig_pf","h_sig_pf;Events;MET [GeV]",200,0,200);
  TH1F *h_sig_gen  = new TH1F("h_sig_gen","h_sig_gen;MET [GeV]; Events",200,0,200);
  TH1F *h_sig_min  = new TH1F("h_sig_min","h_sig_min",200,0,200);
 
  AnalyzerTree->Draw("sum_genPt>>h_sig_gen","","");
  h_sig_gen->SetTitle("");
  h_sig_gen->SetLineColor(1);
  h_sig_gen->SetLineWidth(2);

  AnalyzerTree->Draw("MET>>h_sig_pf","","");
  h_sig_pf->SetLineColor(4);
  h_sig_pf->SetLineWidth(2);

  AnalyzerTree->Draw("minMET>>h_sig_min","","");
  h_sig_min->SetLineColor(2);
  h_sig_min->SetLineWidth(2);

  h_sig_gen->Draw();
  h_sig_pf->Draw("sames");
  h_sig_min->Draw("sames");

  TLegend *leg = new TLegend(0.6879195,0.7482517,0.9496644,0.9300699,NULL,"brNDC");

  leg->AddEntry(h_sig_gen,"Generated MET","l");
  leg->AddEntry(h_sig_pf,"PFMET","l");//"DM_M10_V x 10000","l");                     
  leg->AddEntry(h_sig_min,"Minimized MET","l");
  leg->SetFillColor(0);
  leg->SetShadowColor(0);
  leg->Draw();


}
Example #12
0
void
SetOKStyle()
{
  TStyle* OKStyle = new TStyle("OKStyle", "OK Default Style");

  // Colors

  //set the background color to white
  OKStyle->SetFillColor(10);
  OKStyle->SetFrameFillColor(kWhite);
  OKStyle->SetFrameFillStyle(0);
  OKStyle->SetFillStyle(0);
  OKStyle->SetCanvasColor(kWhite);
  OKStyle->SetPadColor(kWhite);
  OKStyle->SetTitleFillColor(0);
  OKStyle->SetStatColor(kWhite);

  // Get rid of drop shadow on legends
  // This doesn't seem to work.  Call SetBorderSize(1) directly on your TLegends
  OKStyle->SetLegendBorderSize(1);

  //don't put a colored frame around the plots
  OKStyle->SetFrameBorderMode(0);
  OKStyle->SetCanvasBorderMode(0);
  OKStyle->SetPadBorderMode(0);

  //use the primary color palette
  OKStyle->SetPalette(1, 0);

  //set the default line color for a histogram to be black
  OKStyle->SetHistLineColor(kBlack);

  //set the default line color for a fit function to be red
  OKStyle->SetFuncColor(kBlue);

  //make the axis labels black
  OKStyle->SetLabelColor(kBlack, "xyz");

  //set the default title color to be black
  OKStyle->SetTitleColor(kBlack);

  //set the margins
  OKStyle->SetPadBottomMargin(0.15);
  OKStyle->SetPadLeftMargin(0.1);
  OKStyle->SetPadTopMargin(0.075);
  OKStyle->SetPadRightMargin(0.1);

  //set axis label and title text sizes
  OKStyle->SetLabelSize(0.035, "xyz");
  OKStyle->SetTitleSize(0.05, "xyz");
  OKStyle->SetTitleOffset(0.9, "xyz");
  OKStyle->SetStatFontSize(0.035);
  OKStyle->SetTextSize(0.05);
  OKStyle->SetTitleBorderSize(0);
  OKStyle->SetTitleStyle(0);

  OKStyle->SetLegendBorderSize(0);

  //set line widths
  OKStyle->SetHistLineWidth(1);
  OKStyle->SetFrameLineWidth(2);
  OKStyle->SetFuncWidth(2);

  // Misc

  //align the titles to be centered
  //OKStyle->SetTextAlign(22);

  //turn off xy grids
  OKStyle->SetPadGridX(1);
  OKStyle->SetPadGridY(1);

  //set the tick mark style
  OKStyle->SetPadTickX(1);
  OKStyle->SetPadTickY(1);

  //don't show the fit parameters in a box
  OKStyle->SetOptFit(0);

  //set the default stats shown
  OKStyle->SetOptStat(1);

  //marker settings
// 	OKStyle->SetMarkerStyle(8);
// 	OKStyle->SetMarkerSize(0.7);

  // Fonts
  OKStyle->SetStatFont(42);
  OKStyle->SetLabelFont(42, "xyz");
  OKStyle->SetTitleFont(42, "xyz");
  OKStyle->SetTextFont(42);

  // Set the paper size for output
  OKStyle->SetPaperSize(TStyle::kUSLetter);

  //done
  OKStyle->cd();

  cout << "Using Jin's Style" << endl;
}
Example #13
0
void FakeRate() {


  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(true);
  tdrStyle->SetPadGridY(true);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  // For the histo:
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  tdrStyle->SetEndErrorSize(2);
  tdrStyle->SetErrorX(0.);
  tdrStyle->SetMarkerStyle(20);

  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

  //For the date:
  tdrStyle->SetOptDate(0);

  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat("emr"); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);

  // Margins:
  tdrStyle->SetPadTopMargin(0.07);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.13);
  tdrStyle->SetPadRightMargin(0.05);

  // For the Global title:
  tdrStyle->SetTitleFont(35);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.045);
  tdrStyle->SetTitleX(0.15); // Set the position of the title box
  tdrStyle->SetTitleBorderSize(0);

  // For the axis titles:
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.04, "XYZ");
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(1.5);

  // For the axis labels:
  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.03, "XYZ");

  // For the axis:
  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  // Change for log plots:
  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
  tdrStyle->SetOptLogz(0);

  // Postscript options:
  tdrStyle->SetPaperSize(20.,20.);
  tdrStyle->SetPalette(1);
  
  const Int_t NRGBs = 5;
  const Int_t NCont = 255;

  Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
  Double_t red[NRGBs]   = { 0.00, 0.00, 0.87, 1.00, 0.51 };
  Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
  Double_t blue[NRGBs]  = { 0.51, 1.00, 0.12, 0.00, 0.00 };
  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
  TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
  tdrStyle->SetNumberContours(NCont);

  gROOT -> ForceStyle();

  tdrStyle->cd();
  
  int binsize = 10;
  int binlow = 30;
  int binup = 130;

  TString cut_Iasonas_n = "pfmet_pt < 40. && ph_N_Pt   > 0. && ph_N_sinin < 0.011";
  TString cut_Iasonas_d = "pfmet_pt < 40. && ph_DLU_Pt > 0. ";

  TString cut_Zeynep_n = "Num_Pho_Pt > 0. && Num_Pho_SigmaIEtaIEta < 0.011";
  TString cut_Zeynep_d = "Den_Pho_Pt > 0.";

  TString cut_Zeynep_n_new = "passedNum && Pho_Pt > 0. && Pho_SigmaIEtaIEta < 0.011 && muVeto0==0";
  TString cut_Zeynep_d_new = "passedDen && Pho_Pt > 0. && muVeto0==0";


  TFile *f_Iasonas = new TFile("old_results/dataAll.root","READ");
  f_Iasonas->cd("Analyzer");
  TH1F *h_num_I  = new TH1F("h_num_I","h_num_I" ,binsize ,binlow ,binup);
  TH1F *h_den_I  = new TH1F("h_den_I","h_den_I" ,binsize ,binlow ,binup);

  AnalyzerTree->Draw("ph_N_Pt>>h_num_I",cut_Iasonas_n,"goff");
  AnalyzerTree->Draw("ph_DLU_Pt>>h_den_I",cut_Iasonas_d,"goff");
  
  TH1F *h_raw_I = (TH1F*)h_num_I->Clone("h_raw_I");
  h_raw_I->Divide(h_den_I);

  //TFile *f_Zeynep = new TFile("higgsHistograms_QCD.root","READ");
  //TFile *f_Zeynep = new TFile("higgsHistograms_QCD_newHoE.root","READ");
  TFile *f_Zeynep = new TFile("n_jetTest2.root","READ");
  f_Zeynep->cd("Analyzer");
  h_num_Z  = new TH1F("h_num_Z","h_num_Z" ,binsize ,binlow ,binup);
  h_den_Z  = new TH1F("h_den_Z","h_den_Z" ,binsize ,binlow ,binup);
  
  AnalyzerTree->Draw("Pho_Pt>>h_num_Z",cut_Zeynep_n_new,"goff");
  AnalyzerTree->Draw("Pho_Pt>>h_den_Z",cut_Zeynep_d_new,"goff");
 
  TH1F *h_raw_Z = (TH1F*)h_num_Z->Clone("h_raw_Z");
  h_raw_Z->Divide(h_den_Z);


  TFile *f_Zeynep_o = new TFile("old_results/compareDen_Num/ifStatements/testing_simple_1fake.root","READ");
  //TFile *f_Zeynep_o = new TFile("higgsHistograms_QCD_newHoE.root","READ");
  f_Zeynep_o->cd("Analyzer");
  h_num_Z_o  = new TH1F("h_num_Z_o","h_num_Z_o" ,binsize ,binlow ,binup);
  h_den_Z_o  = new TH1F("h_den_Z_o","h_den_Z_o" ,binsize ,binlow ,binup);

  AnalyzerTree->Draw("Num_Pho_Pt>>h_num_Z_o",cut_Zeynep_n,"goff");
  AnalyzerTree->Draw("Den_Pho_Pt>>h_den_Z_o",cut_Zeynep_d,"goff");

  TH1F *h_raw_Z_o = (TH1F*)h_num_Z_o->Clone("h_raw_Z_o");
  h_raw_Z_o->Divide(h_den_Z_o);





  TCanvas* c1 =  new TCanvas("c1","c1",700,600);
  c1->cd();

  h_raw_I->SetTitle("Raw Fake Rate");
  h_raw_I->GetYaxis()->SetTitle("Raw Fake Rate");
  h_raw_I->GetXaxis()->SetTitle("Offline Photon Pt [GeV]");
  h_raw_I->Draw();
  h_raw_I->GetYaxis()->SetRangeUser(0.0,15);

  h_raw_Z->SetLineColor(2);
  h_raw_Z->Draw("same");

  h_raw_Z_o->SetLineColor(4);
  h_raw_Z_o->Draw("same");


  gStyle->SetOptStat(kFALSE);
  
  TLegend *leg = new TLegend(0.6879195,0.7482517,0.9496644,0.9300699,NULL,"brNDC");
  leg->AddEntry(h_raw_I, "Iasonas Raw Fake Rate" ,"l");
  leg->AddEntry(h_raw_Z, "Zeynep Raw Fake Rate" ,"l");
  leg->AddEntry(h_raw_Z_o, "Zeynep old Raw Fake Rate" ,"l");

  leg->SetFillColor(0);
  leg->SetShadowColor(0);
  leg->Draw();
  
  

}
Example #14
0
void Style(){
	
	TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");
	
	// For the canvas:
	tdrStyle->SetCanvasBorderMode(0);
	tdrStyle->SetCanvasColor(kWhite);
	tdrStyle->SetCanvasDefH(600); //Height of canvas
	tdrStyle->SetCanvasDefW(1100); //Width of canvas
	tdrStyle->SetCanvasDefX(0);   //POsition on screen
	tdrStyle->SetCanvasDefY(0);
	
	// For the Pad:
	tdrStyle->SetPadBorderMode(0);
	tdrStyle->SetPadColor(kWhite);
	tdrStyle->SetPadGridX(false);
	tdrStyle->SetPadGridY(false);
	tdrStyle->SetGridColor(0);
	tdrStyle->SetGridStyle(3);
	tdrStyle->SetGridWidth(1);
	
	// For the frame:
	tdrStyle->SetFrameBorderMode(0);
	tdrStyle->SetFrameBorderSize(1);
	tdrStyle->SetFrameFillColor(0);
	tdrStyle->SetFrameFillStyle(0);
	tdrStyle->SetFrameLineColor(1);
	tdrStyle->SetFrameLineStyle(1);
	tdrStyle->SetFrameLineWidth(1);
	
	tdrStyle->SetHistLineWidth(1.5);
	//For the fit/function:
	tdrStyle->SetOptFit(1);
	tdrStyle->SetStatColor(kWhite);
	tdrStyle->SetStatFont(42);
	tdrStyle->SetStatFontSize(0.025);
	tdrStyle->SetOptStat(000000);
	tdrStyle->SetStatColor(kWhite);
	
	// Margins:
	tdrStyle->SetPadTopMargin(0.05);
	tdrStyle->SetPadBottomMargin(0.13);
	tdrStyle->SetPadLeftMargin(0.10);
	tdrStyle->SetPadRightMargin(0.02);
	
	// For the Global title:
	
	tdrStyle->SetOptTitle(0);
	tdrStyle->SetTitleFont(42);
	tdrStyle->SetTitleColor(1);
	tdrStyle->SetTitleTextColor(1);
	tdrStyle->SetTitleFillColor(10);
	tdrStyle->SetTitleFontSize(0.05);
	
	// For the axis titles:
	
	tdrStyle->SetTitleColor(1, "XYZ");
	tdrStyle->SetTitleFont(42, "XYZ");
	tdrStyle->SetTitleSize(0.04, "XYZ");
	tdrStyle->SetTitleXOffset(1.1);
	tdrStyle->SetTitleYOffset(1.1);
	
	// For the axis labels:
	
	tdrStyle->SetLabelColor(1, "XYZ");
	tdrStyle->SetLabelFont(42, "XYZ");
	tdrStyle->SetLabelOffset(0.007, "XYZ");
	tdrStyle->SetLabelSize(0.04, "XYZ");
	
	// For the axis:
	
	tdrStyle->SetAxisColor(1, "XYZ");
	tdrStyle->SetStripDecimals(kTRUE);
	tdrStyle->SetTickLength(0.03, "XYZ");
	tdrStyle->SetNdivisions(510, "XYZ");
	tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
	tdrStyle->SetPadTickY(1);
	
	// Change for log plots:
	tdrStyle->SetOptLogx(0);
	tdrStyle->SetOptLogy(0);
	tdrStyle->SetOptLogz(0);
	
	// Postscript options:
	tdrStyle->SetPaperSize(20.,20.);
	
	tdrStyle->cd();
	
	gStyle->SetFillColor(-1);
}
void teenyWeenyBtagEffCalculation(){
  
  // TDR style crap - include from Utilities.cc
  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");
  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //Position on screen
  tdrStyle->SetCanvasDefY(0);
  
  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  // tdrStyle->SetPadBorderSize(Width_t size = 1);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(false);
  tdrStyle->SetPadGridY(false);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);
  
  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);
  
  // For the histo:
  // tdrStyle->SetHistFillColor(1);
  // tdrStyle->SetHistFillStyle(0);
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  // tdrStyle->SetLegoInnerR(Float_t rad = 0.5);
  // tdrStyle->SetNumberContours(Int_t number = 20);
  
  tdrStyle->SetEndErrorSize(2);
  //tdrStyle->SetErrorMarker(20);
  tdrStyle->SetErrorX(0.);
  
  tdrStyle->SetMarkerStyle(20);
  
  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);
  
  //For the date:
  tdrStyle->SetOptDate(0);
  // tdrStyle->SetDateX(Float_t x = 0.01);
  // tdrStyle->SetDateY(Float_t y = 0.01);
  
  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);
  // tdrStyle->SetStatStyle(Style_t style = 1001);
  // tdrStyle->SetStatX(Float_t x = 0);
  // tdrStyle->SetStatY(Float_t y = 0);

  // Margins:
  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.16);
  tdrStyle->SetPadRightMargin(0.04);
  
  // For the Global title:

  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);
  // tdrStyle->SetTitleH(0); // Set the height of the title box
  // tdrStyle->SetTitleW(0); // Set the width of the title box
  // tdrStyle->SetTitleX(0); // Set the position of the title box
  // tdrStyle->SetTitleY(0.985); // Set the position of the title box
  // tdrStyle->SetTitleStyle(Style_t style = 1001);
  // tdrStyle->SetTitleBorderSize(2);
  
  // For the axis titles:
  
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.05, "XYZ");
  // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
  // tdrStyle->SetTitleYSize(Float_t size = 0.02);
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(1.25);
  // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset
//  tdrStyle->SetTitleOffset(.3, "X"); // Another way to set the Offset
//  tdrStyle->SetTitleOffset(1., "Y"); // Another way to set the Offset
//  
  // For the axis labels:

  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.05, "XYZ");

  // For the axis:

  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  // Change for log plots:
  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
  tdrStyle->SetOptLogz(0);

  // Postscript options:
  tdrStyle->SetPaperSize(20.,20.);
  // tdrStyle->SetLineScalePS(Float_t scale = 3);
  // tdrStyle->SetLineStyleString(Int_t i, const char* text);
  // tdrStyle->SetHeaderPS(const char* header);
  // tdrStyle->SetTitlePS(const char* pstitle);

  // tdrStyle->SetBarOffset(Float_t baroff = 0.5);
  // tdrStyle->SetBarWidth(Float_t barwidth = 0.5);
  // tdrStyle->SetPaintTextFormat(const char* format = "g");
  // tdrStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0);
  // tdrStyle->SetTimeOffset(Double_t toffset);
  // tdrStyle->SetHistMinimumZero(kTRUE);

  tdrStyle->cd();

  // Meat of the stuff

//
//  ned in current scope  (tmpfile):1:
//    (const int)0
//*** Interpreter error recovered ***
//root [4] .ls
//      TFile**/lustre/ncg.ingrid.pt/cmslocal/samples/CMSSW_5_3_7_patch4/chiggs/fakerate_fractionsEstimate/trees/TauFRWMuMCFailing_PFlow.root
//      TFile*/lustre/ncg.ingrid.pt/cmslocal/samples/CMSSW_5_3_7_patch4/chiggs/fakerate_fractionsEstimate/trees/TauFRWMuMCFailing_PFlow.root
//root [5] .q
//[vischia@ui-cms01 TopTaus]$ ls /lustre/ncg.ingrid.pt/
//cmslocal/ cmst3/    data1/    data2/    data3/    
//[vischia@ui-cms01 TopTaus]$ ls /lustre/ncg.ingrid.pt/cmslocal/vischia/
//MyTMVA_temporaneo/      backupFirstFullRun2012/ myt
//
//																									   
//	

  TFile* ttmutau = new TFile("/lustre/ncg.ingrid.pt/cmslocal/vischia/store/tau/Jan13ReReco/dataRedo/test_preapp2/nomt-2012-V1-mc-MU-20GeV/out-ttbar-mutau.root");
  
  TH1F* btag_eff_fakebs_num   = (TH1F*) ttmutau->Get("PFlow/RecoSteps/m_tau/MET/btag_eff_fakebs_num_27" );                 
  TH1F* btag_eff_fakebs_den   = (TH1F*) ttmutau->Get("PFlow/RecoSteps/m_tau/MET/btag_eff_fakebs_den_27" );
  TH1F* btag_eff_nomatch_num  = (TH1F*) ttmutau->Get("PFlow/RecoSteps/m_tau/MET/btag_eff_nomatch_num_27");
  TH1F* btag_eff_nomatch_den  = (TH1F*) ttmutau->Get("PFlow/RecoSteps/m_tau/MET/btag_eff_nomatch_den_27");
  TH1F* btag_eff_fakebs2_num  = (TH1F*) ttmutau->Get("PFlow/RecoSteps/m_tau/MET/btag_eff_fakebs2_num_27");
  TH1F* btag_eff_fakebs2_den  = (TH1F*) ttmutau->Get("PFlow/RecoSteps/m_tau/MET/btag_eff_fakebs2_den_27");
  TH1F* btag_eff_realbs_num   = (TH1F*) ttmutau->Get("PFlow/RecoSteps/m_tau/MET/btag_eff_realbs_num_27" );
  TH1F* btag_eff_realbs_den   = (TH1F*) ttmutau->Get("PFlow/RecoSteps/m_tau/MET/btag_eff_realbs_den_27" );   
  
  //  num= passing
  //  den = non passing
  
  double fakesWNonMatchedPassing_over_fakesWNonMatchedNonPassing = ( btag_eff_fakebs_num->Integral()+ btag_eff_nomatch_num->Integral() )  / ( btag_eff_fakebs_den->Integral() + btag_eff_nomatch_den->Integral()     );
  double fakesWoutNonMatchedPassing_over_fakesWoutNonMatchedNonPassing = btag_eff_fakebs_num->Integral() /     btag_eff_fakebs_den->Integral();
  double fakesAllNonBsPassing_over_fakesAllNonBsNonPassing = btag_eff_fakebs2_num->Integral() /     btag_eff_fakebs2_den->Integral();
  double realBsNonPassing_over_fakeAndRealbsNonPassing =  btag_eff_realbs_den->Integral() /   (  btag_eff_fakebs_den->Integral() +btag_eff_realbs_den->Integral());
  double realBsPassing_over_realBsNonPassing  = btag_eff_realbs_num->Integral() /  btag_eff_realbs_den->Integral();
  double realBsPassing_over_realBs  = btag_eff_realbs_num->Integral() / ( btag_eff_realbs_num->Integral() + btag_eff_realbs_den->Integral()   );
  double fakeBsPassing_over_fakeBs  = btag_eff_fakebs_num->Integral() / ( btag_eff_fakebs_num->Integral() + btag_eff_fakebs_den->Integral()   );
  double fakeBsPassing_over_fakeBs_includeNonMatched  = btag_eff_fakebs2_num->Integral() / ( btag_eff_fakebs2_num->Integral() + btag_eff_fakebs2_den->Integral()   );

  cout << "fakesWNonMatchedPassing_over_fakesWNonMatchedNonPassing: "        << fakesWNonMatchedPassing_over_fakesWNonMatchedNonPassing	   <<endl;   
  cout << "fakesWoutNonMatchedPassing_over_fakesWoutNonMatchedNonPassing: "  << fakesWoutNonMatchedPassing_over_fakesWoutNonMatchedNonPassing <<endl;
  cout << "fakesAllNonBsPassing_over_fakesAllNonBsNonPassing: "	        << fakesAllNonBsPassing_over_fakesAllNonBsNonPassing	      	   <<endl;
  cout << "realBsNonPassing_over_fakeAndRealbsNonPassing: "		        << realBsNonPassing_over_fakeAndRealbsNonPassing	   <<endl;	      
  cout << "realBsPassing_over_realBsNonPassing: "                            << realBsPassing_over_realBsNonPassing                           <<endl;
  cout << "realBsPassing_over_realBs: "                                      << realBsPassing_over_realBs                                   <<endl;
  cout << "fakeBsPassing_over_fakeBs: "                                      << fakeBsPassing_over_fakeBs                                   <<endl;
  cout << "fakeBsPassing_over_fakeBs_includeNonMatched: "                    << fakeBsPassing_over_fakeBs_includeNonMatched                 <<endl;
//  
//  httllq->Sumw2();
//  httllg->Sumw2();
//
//  httllq->Add(hwjetq,1.);
//  httllg->Add(hwjetg,1.);
//  httlla->Add(hwjeta,1.);
//
//  double fqf= httllq->Integral() / (httllq->Integral() + httllg->Integral());
//  double fgf= httllg->Integral() / (httllq->Integral() + httllg->Integral());
//  
// 
//  cout << "Fractions in ttll sample: quarks " << ttllfq << ", gluons " << ttllfg << endl;
//  cout << "Fractions in wjet sample: quarks " << wjetfq << ", gluons " << wjetfg << endl;
//  cout << "Combination: quarks " << 0.5*ttllfq + 0.5*wjetfq << ", gluons " << 0.5*ttllfg+0.5*wjetfg << endl;
//  cout << "Fractions in main anal. sample: quarks " << fqf << ", gluons " << fgf << endl;
//  cout << "-------------------------------" << endl;
//
//  TFile* wmuP = new TFile("/lustre/ncg.ingrid.pt/cmslocal/samples/CMSSW_5_3_7_patch4/chiggs/fakerate_testPOG/trees/TauFRWMuMCPassing_PFlow.root");
//  TFile* wmuF = new TFile("/lustre/ncg.ingrid.pt/cmslocal/samples/CMSSW_5_3_7_patch4/chiggs/fakerate_testPOG/trees/TauFRWMuMCFailing_PFlow.root");
//  TFile* qcdP = new TFile("/lustre/ncg.ingrid.pt/cmslocal/samples/CMSSW_5_3_7_patch4/chiggs/fakerate_testPOG/trees/TauFRQCDMCPassing_PFlow.root");
//  TFile* qcdF = new TFile("/lustre/ncg.ingrid.pt/cmslocal/samples/CMSSW_5_3_7_patch4/chiggs/fakerate_testPOG/trees/TauFRQCDMCFailing_PFlow.root");
//    
//  std::vector<TH1F*> v_wplusjets_pt;
//  std::vector<TH1F*> v_wplusjets_pt_unknown;
//  std::vector<TH1F*> v_wplusjets_pt_quark;
//  std::vector<TH1F*> v_wplusjets_pt_bquark;
//  std::vector<TH1F*> v_wplusjets_pt_gluon;
//  std::vector<TH1F*> v_wplusjets_pt_allquark;
//
//  std::vector<TH1F*> v_qf;
//  std::vector<TH1F*> v_gf;
//
//
//  v_wplusjets_pt         .push_back( (TH1F*) ((TH1F*) wmuP->Get("wplusjets_pt")         )->Clone("wmuP_wplusjets_pt")          );	       
//  v_wplusjets_pt_unknown .push_back( (TH1F*) ((TH1F*) wmuP->Get("wplusjets_pt_unknown") )->Clone("wmuP_wplusjets_pt_unknown")  ); 
//  v_wplusjets_pt_quark	 .push_back( (TH1F*) ((TH1F*) wmuP->Get("wplusjets_pt_quark")   )->Clone("wmuP_wplusjets_pt_quark")    );   
//  v_wplusjets_pt_bquark	 .push_back( (TH1F*) ((TH1F*) wmuP->Get("wplusjets_pt_bquark")  )->Clone("wmuP_wplusjets_pt_bquark")   );  
//  v_wplusjets_pt_gluon	 .push_back( (TH1F*) ((TH1F*) wmuP->Get("wplusjets_pt_gluon")   )->Clone("wmuP_wplusjets_pt_gluon")    );   
//  v_wplusjets_pt_allquark.push_back( (TH1F*) ((TH1F*) wmuP->Get("wplusjets_pt_allquark"))->Clone("wmuP_wplusjets_pt_allquark") );
//
//  v_wplusjets_pt         .push_back( (TH1F*) ((TH1F*) wmuF->Get("wplusjets_pt")         )->Clone("wmuF_wplusjets_pt")          );	       
//  v_wplusjets_pt_unknown .push_back( (TH1F*) ((TH1F*) wmuF->Get("wplusjets_pt_unknown") )->Clone("wmuF_wplusjets_pt_unknown")  ); 
//  v_wplusjets_pt_quark	 .push_back( (TH1F*) ((TH1F*) wmuF->Get("wplusjets_pt_quark")   )->Clone("wmuF_wplusjets_pt_quark")    );   
//  v_wplusjets_pt_bquark	 .push_back( (TH1F*) ((TH1F*) wmuF->Get("wplusjets_pt_bquark")  )->Clone("wmuF_wplusjets_pt_bquark")   );  
//  v_wplusjets_pt_gluon	 .push_back( (TH1F*) ((TH1F*) wmuF->Get("wplusjets_pt_gluon")   )->Clone("wmuF_wplusjets_pt_gluon")    );   
//  v_wplusjets_pt_allquark.push_back( (TH1F*) ((TH1F*) wmuF->Get("wplusjets_pt_allquark"))->Clone("wmuF_wplusjets_pt_allquark") );
//
//  v_wplusjets_pt         .push_back( (TH1F*) ((TH1F*) qcdP->Get("wplusjets_pt")         )->Clone("qcdP_wplusjets_pt")          );	       
//  v_wplusjets_pt_unknown .push_back( (TH1F*) ((TH1F*) qcdP->Get("wplusjets_pt_unknown") )->Clone("qcdP_wplusjets_pt_unknown")  ); 
//  v_wplusjets_pt_quark	 .push_back( (TH1F*) ((TH1F*) qcdP->Get("wplusjets_pt_quark")   )->Clone("qcdP_wplusjets_pt_quark")    );   
//  v_wplusjets_pt_bquark	 .push_back( (TH1F*) ((TH1F*) qcdP->Get("wplusjets_pt_bquark")  )->Clone("qcdP_wplusjets_pt_bquark")   );  
//  v_wplusjets_pt_gluon	 .push_back( (TH1F*) ((TH1F*) qcdP->Get("wplusjets_pt_gluon")   )->Clone("qcdP_wplusjets_pt_gluon")    );   
//  v_wplusjets_pt_allquark.push_back( (TH1F*) ((TH1F*) qcdP->Get("wplusjets_pt_allquark"))->Clone("qcdP_wplusjets_pt_allquark") );
//
//  v_wplusjets_pt         .push_back( (TH1F*) ((TH1F*) qcdF->Get("wplusjets_pt")         )->Clone("qcdF_wplusjets_pt")          );	       
//  v_wplusjets_pt_unknown .push_back( (TH1F*) ((TH1F*) qcdF->Get("wplusjets_pt_unknown") )->Clone("qcdF_wplusjets_pt_unknown")  ); 
//  v_wplusjets_pt_quark	 .push_back( (TH1F*) ((TH1F*) qcdF->Get("wplusjets_pt_quark")   )->Clone("qcdF_wplusjets_pt_quark")    );   
//  v_wplusjets_pt_bquark	 .push_back( (TH1F*) ((TH1F*) qcdF->Get("wplusjets_pt_bquark")  )->Clone("qcdF_wplusjets_pt_bquark")   );  
//  v_wplusjets_pt_gluon	 .push_back( (TH1F*) ((TH1F*) qcdF->Get("wplusjets_pt_gluon")   )->Clone("qcdF_wplusjets_pt_gluon")    );   
//  v_wplusjets_pt_allquark.push_back( (TH1F*) ((TH1F*) qcdF->Get("wplusjets_pt_allquark"))->Clone("qcdF_wplusjets_pt_allquark") );
//
//  std::vector<int> colours;
//  colours.push_back(1);
//  colours.push_back(2);
//  colours.push_back(4);  
//  colours.push_back(5);
//
//  std::vector<TString> labels;
//  labels.push_back("W+1jet ");
//  labels.push_back("W+1jet ");
//  labels.push_back("QCDmulti ");
//  labels.push_back("QCDmulti ");
//
//  std::vector<TString> fBase;
//  fBase.push_back("WMu1");
//  fBase.push_back("WMu2");
//  fBase.push_back("QCD1");
//  fBase.push_back("QCD2");
//
//  for(size_t i=0; i<v_wplusjets_pt.size(); ++i){
//    v_wplusjets_pt         [i]->SetLineColor(colours[i]);    
//    v_wplusjets_pt_unknown [i]->SetLineColor(colours[i]);
//    v_wplusjets_pt_quark   [i]->SetLineColor(colours[1]);	 
//    v_wplusjets_pt_bquark  [i]->SetLineColor(colours[i]);	 
//    v_wplusjets_pt_gluon   [i]->SetLineColor(colours[2]);	 
//    v_wplusjets_pt_allquark[i]->SetLineColor(colours[1]);    
//
//    v_wplusjets_pt         [i]->SetLineWidth(3);    
//    v_wplusjets_pt_unknown [i]->SetLineWidth(3);
//    v_wplusjets_pt_quark   [i]->SetLineWidth(3);	 
//    v_wplusjets_pt_bquark  [i]->SetLineWidth(3);	 
//    v_wplusjets_pt_gluon   [i]->SetLineWidth(3);	 
//    v_wplusjets_pt_allquark[i]->SetLineWidth(3);    
//
//    //    v_wplusjets_pt_gluon[i]->Add(v_wplusjets_pt_unknown[i],1.);
//
//    TH1F* numQ = v_wplusjets_pt_allquark[i]->Clone(TString(v_wplusjets_pt_allquark[i]->GetName())+"numQ");
//    TH1F* numG = v_wplusjets_pt_gluon[i]->Clone(TString(v_wplusjets_pt_gluon[i]->GetName())+"numG");
//    TH1F* den =  v_wplusjets_pt_allquark[i]->Clone(TString(v_wplusjets_pt_allquark[i]->GetName())+"den");
//
//    numQ->GetYaxis()->SetTitle("Jet content");	 
//    numG->GetYaxis()->SetTitle("Jet content");	 
//    
//
//    cout << "Fractions for " << fBase[i] << ": quark " << v_wplusjets_pt_allquark[i]->Integral() / (v_wplusjets_pt_allquark[i]->Integral() + v_wplusjets_pt_gluon[i]->Integral() ) << ", gluon " << v_wplusjets_pt_gluon[i]->Integral() / (v_wplusjets_pt_allquark[i]->Integral() + v_wplusjets_pt_gluon[i]->Integral() ) << endl;
//    
//    numQ->Sumw2();
//    numG->Sumw2();
//    den->Sumw2();
//    
//    den->Add(v_wplusjets_pt_gluon[i],1.);
//    
//    numQ->Divide(den);
//    numG->Divide(den);
//    cout << "I divided" << endl;
//
//    v_qf.push_back(numQ);
//    v_gf.push_back(numG);
//    
//    
//    //    TLegend* leg_ = new TLegend(0.15,0.65,0.62,0.80,NULL,"brNDC");
//    TLegend* leg_ = new TLegend(0.40,0.50,0.80,0.70,NULL,"brNDC");
//    leg_->SetTextFont(42);
//    leg_->SetBorderSize(0);
//    leg_->SetLineColor(1);
//    leg_->SetLineStyle(1);
//    leg_->SetLineWidth(1);
//    leg_->SetFillColor(0);
//    leg_->SetFillStyle(0);
//    leg_->AddEntry(numQ,/*labels[i]+*/"Quark jets fraction","lpf");  
//    leg_->AddEntry(numG,/*labels[i]+*/"Gluon jets fraction","lpf");
//
//    TPaveText *pt1 = new TPaveText(0.17,0.45,0.5,0.5, "brNDC");
//    pt1->SetBorderSize(1);
//    pt1->SetFillColor(19);
//    pt1->SetFillStyle(0);
//    pt1->SetLineColor(0);
//    pt1->SetTextFont(132);
//    pt1->SetTextSize(0.033);
//    //  TText *text = pt1->AddText("#splitline{m_{H^{#pm}} = 120 GeV/c^{2},}{BR(t #rightarrow H^{+}b) = 0.05}");
//    TCanvas* myCanva = new TCanvas(labels[i],labels[i],2000,2000);
//    myCanva->cd();
//
//    if(i<2){
//      numQ->Draw("hist");
//      numG->Draw("histsame");
//    }
//    else{
//      numG->Draw("hist");
//      numQ->Draw("histsame");
//    }
//    leg_->Draw();
//    //    pt1->Draw("same");
//    myCanva->SaveAs(fBase[i]+".pdf");
//    myCanva->SaveAs(fBase[i]+".png");
//    myCanva->Clear();
//    delete myCanva;
//    delete pt1;
//    delete numQ;
//    delete numG;
//    delete den;
//    delete leg_;
//  }
}
Example #16
0
void TDRStyle() {
    TStyle *TDRStyle = new TStyle("TDRStyle", "TDR style");

    /// helvetica, size absolute
    // TDRStyle->font = 43
    // TDRStyle->titleSize = 33
    // TDRStyle->labelSize = 27
    // TDRStyle->statSize = 14

    ///  for the canvas
    TDRStyle->SetCanvasBorderMode(0);
    TDRStyle->SetCanvasColor(kWhite);
    TDRStyle->SetCanvasDefH(600); // Height of canvas
    TDRStyle->SetCanvasDefW(600); // Width of canvas
    TDRStyle->SetCanvasDefX(0);   // POsition on screen
    TDRStyle->SetCanvasDefY(0);

    /// For the Pad:
    TDRStyle->SetPadBorderMode(0);
    TDRStyle->SetPadColor(kWhite);
    TDRStyle->SetPadGridX(false);
    TDRStyle->SetPadGridY(false);
    TDRStyle->SetGridColor(0);
    TDRStyle->SetGridStyle(3);
    TDRStyle->SetGridWidth(1);

    /// For the frame:
    TDRStyle->SetFrameBorderMode(0);
    TDRStyle->SetFrameBorderSize(1);
    TDRStyle->SetFrameFillColor(0);
    TDRStyle->SetFrameFillStyle(0);
    TDRStyle->SetFrameLineColor(1);
    TDRStyle->SetFrameLineStyle(1);
    TDRStyle->SetFrameLineWidth(1);

    /// For the histo:
    TDRStyle->SetHistLineColor(1);
    TDRStyle->SetHistLineStyle(0);
    TDRStyle->SetHistLineWidth(1);
    TDRStyle->SetEndErrorSize(2);
    TDRStyle->SetErrorX(0.5); // needed for uncertainty histograms
    TDRStyle->SetMarkerStyle(20);
    /// For the fit/function:
    TDRStyle->SetOptFit(1);
    TDRStyle->SetFitFormat("5.4g");
    TDRStyle->SetFuncColor(2);
    TDRStyle->SetFuncStyle(1);
    TDRStyle->SetFuncWidth(1);

    /// For the date:
    TDRStyle->SetOptDate(0);;

    /// For the statistics box:
    TDRStyle->SetOptFile(0);
    TDRStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");;
    TDRStyle->SetStatColor(kWhite);
    TDRStyle->SetStatFont(43);
    TDRStyle->SetStatFontSize(14);
    TDRStyle->SetStatTextColor(1);
    TDRStyle->SetStatFormat("6.4g");
    TDRStyle->SetStatBorderSize(1);
    TDRStyle->SetStatH(0.1);
    TDRStyle->SetStatW(0.15);

    ///  Margins:
    TDRStyle->SetPadTopMargin(0.05); // default
    TDRStyle->SetPadBottomMargin(0.13);
    TDRStyle->SetPadLeftMargin(0.16);
    TDRStyle->SetPadRightMargin(0.05); // default

    /// For the Global title:
    TDRStyle->SetOptTitle(0);
    TDRStyle->SetTitleFont(43);
    TDRStyle->SetTitleColor(1);
    TDRStyle->SetTitleTextColor(1);
    TDRStyle->SetTitleFillColor(10);
    TDRStyle->SetTitleFontSize(27);

    /// For the axis titles:
    TDRStyle->SetTitleColor(1, "XYZ");
    TDRStyle->SetTitleFont(43, "XYZ");
    TDRStyle->SetTitleSize(33, "XYZ");
    TDRStyle->SetTitleXOffset(0.9);
    TDRStyle->SetTitleYOffset(1.25);

    ///  For the axis labels:
    TDRStyle->SetLabelColor(1, "XYZ");
    TDRStyle->SetLabelFont(43, "XYZ");
    TDRStyle->SetLabelOffset(0.007, "XYZ");
    TDRStyle->SetLabelSize(27, "XYZ");

    /// For the axis:
    TDRStyle->SetAxisColor(1, "XYZ");
    TDRStyle->SetStripDecimals(true);
    TDRStyle->SetTickLength(0.03, "XYZ");
    TDRStyle->SetNdivisions(510, "XYZ");
    TDRStyle->SetPadTickX(1);  /// To get tick marks on the opposite side of the frame
    TDRStyle->SetPadTickY(1);

    /// For the text boxes
    TDRStyle->SetTextFont(43+20); // Bold
    TDRStyle->SetTextSize(27);

    /// Change for log plots:
    TDRStyle->SetOptLogx(0);
    TDRStyle->SetOptLogy(0);
    TDRStyle->SetOptLogz(0);

    /// Postscript options:
    TDRStyle->SetPaperSize(20,20);
    TDRStyle->cd();

}
Example #17
0
void setTDRStyle() {
  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600);
  tdrStyle->SetCanvasDefW(600);
  tdrStyle->SetCanvasDefX(0);
  tdrStyle->SetCanvasDefY(0);

  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);

  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);

  tdrStyle->SetEndErrorSize(2);
  tdrStyle->SetErrorX(0.);
  
  tdrStyle->SetMarkerStyle(20);
  tdrStyle->SetMarkerSize(2);

  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

  tdrStyle->SetOptDate(0);

  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat(0); 
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);

  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.10);
  tdrStyle->SetPadRightMargin(0.05);

  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);

 
  // For the axis labels:

  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.03, "XYZ");

  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  
  tdrStyle->SetPadTickY(1);


  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
  tdrStyle->SetOptLogz(0);

  tdrStyle->SetPaperSize(20.,20.);

  tdrStyle->cd();
}
Example #18
0
void setEgammaStyle() {
  TStyle *egammaStyle = new TStyle("egammaStyle","Style for P-TDR");

  // For the palette:
  egammaStyle->SetPalette(1);

  // For the grid
  egammaStyle->SetPadGridX(1);
  egammaStyle->SetPadGridY(1);

  // For the canvas: 
  egammaStyle->SetCanvasBorderMode(0);
  egammaStyle->SetCanvasBorderSize(2);     
  egammaStyle->SetCanvasColor(0);
  //egammaStyle->SetCanvasDefH(600);  
  //egammaStyle->SetCanvasDefW(600);  
  egammaStyle->SetCanvasDefX(0);    
  egammaStyle->SetCanvasDefY(0);

  // For the pad:
  egammaStyle->SetPadBorderMode(0);
  egammaStyle->SetPadColor(kWhite);
  egammaStyle->SetPadGridX(false);
  egammaStyle->SetPadGridY(false);
  egammaStyle->SetGridColor(0);
  egammaStyle->SetGridStyle(3);
  egammaStyle->SetGridWidth(1);

  // For the frame:
  egammaStyle->SetFrameBorderMode(0);
  egammaStyle->SetFrameBorderSize(1);
  egammaStyle->SetFrameFillColor(0);
  egammaStyle->SetFrameFillStyle(0);
  egammaStyle->SetFrameLineColor(1);
  egammaStyle->SetFrameLineStyle(1);
  egammaStyle->SetFrameLineWidth(1);

  // For the histos:
  egammaStyle->SetHistLineColor(1);
  egammaStyle->SetHistLineStyle(0);
  egammaStyle->SetHistLineWidth(2);      // chiara: era 1
  egammaStyle->SetEndErrorSize(2);
  egammaStyle->SetErrorX(0.);

  // for the graphs
  egammaStyle->SetMarkerColor(1);
  egammaStyle->SetMarkerStyle(20);
  egammaStyle->SetMarkerSize(1.1);        // chiara: era 1.2

  // For the fit/function:
  egammaStyle->SetOptFit(1);
  egammaStyle->SetFitFormat("5.4g");
  egammaStyle->SetFuncColor(2);
  egammaStyle->SetFuncStyle(1);
  egammaStyle->SetFuncWidth(2);          // chiara: era 1

  //For the date:
  egammaStyle->SetOptDate(0);

  // For the statistics box:
  egammaStyle->SetOptFile(0);
  egammaStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");
  egammaStyle->SetStatColor(kWhite);
  egammaStyle->SetStatFont(42);
  egammaStyle->SetStatFontSize(0.025);
  egammaStyle->SetStatTextColor(1);
  egammaStyle->SetStatFormat("6.4g");
  egammaStyle->SetStatBorderSize(1);
  egammaStyle->SetStatH(0.1);
  egammaStyle->SetStatW(0.15);

  // For the Global title:
  egammaStyle->SetOptTitle(1);    // 0=No Title
  egammaStyle->SetTitleFont(42);
  egammaStyle->SetTitleColor(1);
  egammaStyle->SetTitleTextColor(1);
  egammaStyle->SetTitleFillColor(10);
  egammaStyle->SetTitleFontSize(0.05);      

  // For the axis titles:
  egammaStyle->SetTitleColor(1, "XYZ");
  egammaStyle->SetTitleFont(42, "XYZ");
  egammaStyle->SetTitleSize(0.05, "XYZ");        // chiara: era 0.06
  // egammaStyle->SetTitleXOffset(0.9);          // chiara
  // egammaStyle->SetTitleYOffset(1.25);         // chiara

  // For the axis labels:
  egammaStyle->SetLabelColor(1, "XYZ");
  egammaStyle->SetLabelFont(42, "XYZ");
  egammaStyle->SetLabelOffset(0.007, "XYZ");    // chiara 
  egammaStyle->SetLabelSize(0.04, "XYZ");       // chiara: era 0.05

  // For the axis:
  egammaStyle->SetAxisColor(1, "XYZ");
  egammaStyle->SetStripDecimals(kTRUE);
  egammaStyle->SetTickLength(0.03, "XYZ");
  egammaStyle->SetNdivisions(510, "XYZ");
  egammaStyle->SetPadTickX(0);  // 0=Text labels (and tics) only on bottom, 1=Text labels on top and bottom
  egammaStyle->SetPadTickY(1);

  // Change for log plots:
  egammaStyle->SetOptLogx(0);
  egammaStyle->SetOptLogy(0);
  egammaStyle->SetOptLogz(0);

  // Postscript options:
  egammaStyle->SetPaperSize(20.,20.);

  egammaStyle->cd();
}
Example #19
0
void setTDRStyle() {

  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); 

// For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

// For the Pad:
  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(false);
  tdrStyle->SetPadGridY(false);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

// For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

// For the histo:
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  tdrStyle->SetEndErrorSize(2);
  tdrStyle->SetErrorX(0.);
  tdrStyle->SetMarkerStyle(20);

//For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

//For the date:
  tdrStyle->SetOptDate(0);

// For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);

// Margins:
  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.16);
  tdrStyle->SetPadRightMargin(0.02);

// For the Global title:
  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);

// For the axis titles:
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.06, "XYZ");
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(1.25);

// For the axis labels:
  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.05, "XYZ");

// For the axis:
  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

// Change for log plots:
  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
  tdrStyle->SetOptLogz(0);

// Postscript options:
  tdrStyle->SetPaperSize(20.,20.);

  tdrStyle->cd();
}
Example #20
0
int main()
{

gROOT->Reset();

TStyle * Sty = new TStyle("MyStyle","MyStyle");
Sty->SetOptTitle(0);
Sty->SetOptStat(0);
Sty->SetPalette(8,0);
Sty->SetCanvasColor(10);
Sty->SetCanvasBorderMode(0);
Sty->SetFrameLineWidth(3);
Sty->SetFrameFillColor(10);
Sty->SetPadColor(10);
Sty->SetPadTickX(1);
Sty->SetPadTickY(1);
Sty->SetPadBottomMargin(.2);
Sty->SetPadLeftMargin(.2);
Sty->SetHistLineWidth(3);
Sty->SetHistLineColor(kRed);
Sty->SetFuncWidth(3);
Sty->SetFuncColor(kGreen);
Sty->SetLineWidth(3);
Sty->SetLabelSize(0.06,"xyz");
Sty->SetLabelOffset(0.02,"y");
Sty->SetLabelOffset(0.02,"x");
Sty->SetLabelColor(kBlack,"xyz");
Sty->SetTitleSize(0.06,"xyz");
Sty->SetTitleOffset(1.4,"y");
Sty->SetTitleOffset(1.3,"x");
Sty->SetTitleFillColor(10);
Sty->SetTitleTextColor(kBlack);
Sty->SetTickLength(.05,"xz");
Sty->SetTickLength(.025,"y");
Sty->SetNdivisions(5,"xyz");
Sty->SetEndErrorSize(0);
gROOT->SetStyle("MyStyle");
gROOT->ForceStyle();



  line FermiN;
  line N0s12;
  line N0p32;
  line N0p12;
  line N0d52;
  line N1s12;
  line N0d32;
  line N0f72;
  line N0f52;
  line N1p12;
  line N1p32;
  line N0g92;
  line N1d52;

  line NN0d52;
  line NN0d32;
  line NN1s12;
  line NN0f72;
  line NN1p12;
  line NN1p32;
  line NN0f52;


  line FermiP;
  line P0s12;
  line P0p32;
  line P0p12;
  line P0d52;
  line P1s12;
  line P0d32;
  line P0f72;
  line P0f52;
  line P1p12;
  line P1p32;
  line P0g92;
  line P1d52;

  line PP0d52;
  line PP0d32;
  line PP1s12;
  line PP0f72;
  line PP1p12;
  line PP1p32;
  line PP0f52;

  float z,a,three,Efermi;
  //TFile *f = new TFile("alev.root","RECREATE");
  char stuff[100];
  ostringstream outstring;
  string name;
  ifstream file;
  int Nneut = 0;
  float j,energy,RMS,occup,spect,Delta;
  float error,RMSerror,spectError,DeltaError;
  int l,N,colour,Efit,Rfit,Dfit,sfit;

  
  // neutrons
  for (int A=36;A<74;A+=2)
    {
      outstring.str("");
      outstring << "nca" << A << ".inp";
      name = outstring.str();
      file.open(name.c_str());
      if (file.fail()) 
	{
	  cout << name << " not opened " << endl;
          file.clear();
          continue;
	}
      Nneut++;
      file >> three >> z >> a >> Efermi;
      file.close();
      file.clear();

      if (Efermi == 0.) 
	{
         outstring.str("");
         outstring << "nca" << A << ".fermi";
         name = outstring.str();
         file.open(name.c_str());
         if (file.fail()) 
	   {
	     cout << name << " not opened " << endl;
             file.clear();
             continue;
	   }
	 file >> Efermi;
	 file.close();
	 file.clear();
	}
      cout << Efermi << endl;
      FermiN.add((float)A,Efermi);

      outstring.str("");
      outstring << "nca" << A << ".level";
      name = outstring.str();
      file.open(name.c_str());
      if (file.fail()) 
	{
	  cout << name << " not opened " << endl;
          file.clear();
          continue;
	}
       file.getline(stuff,100);

       for (;;)
         {
           file >> N >> j >> l >> energy >> RMS >> occup 
                >> spect >> Delta>> colour;
           if (file.eof())break;

           if (l == 0 && j == 0.5 && N ==0 ) N0s12.add((float)A,energy);
           if (l == 0 && j == 0.5 && N ==1 ) N1s12.add((float)A,energy);
           if (l == 1 && j == 0.5 && N ==0 ) N0p12.add((float)A,energy);
           if (l == 1 && j == 1.5 && N ==0 ) N0p32.add((float)A,energy);
           if (l == 2 && j == 2.5 && N ==0 ) N0d52.add((float)A,energy);
           if (l == 2 && j == 1.5 && N ==0 ) N0d32.add((float)A,energy);
           if (l == 3 && j == 3.5 && N ==0 ) N0f72.add((float)A,energy);
           if (l == 3 && j == 2.5 && N ==0 ) N0f52.add((float)A,energy);
           if (l == 1 && j == 0.5 && N ==1 ) N1p12.add((float)A,energy);
           if (l == 1 && j == 1.5 && N ==1 ) N1p32.add((float)A,energy);
           if (l == 4 && j == 4.5 && N ==0 ) N0g92.add((float)A,energy);
           if (l == 2 && j == 2.5 && N ==1 ) N1d52.add((float)A,energy);
	 }
       file.close();
       file.clear();

     outstring.str("");
      outstring << "nca" << A << ".lev";
      name = outstring.str();
      file.open(name.c_str());
      if (file.fail()) 
	{
	  cout << name << " not opened " << endl;
	  file.clear();
          continue;
	}
       file.getline(stuff,100);
       file.getline(stuff,100);

       for (;;)
         {
            file >> energy >> error >> N >> j >> l >> colour >>Efit>> 
            RMS >> RMSerror >> Rfit >> Delta>>DeltaError >> Dfit >> 
            spect>>spectError>>sfit;

           if (file.eof())break;

           //if (l == 0 && j == 0.5 && N ==0 ) NN0s12.add((float)A,energy);
           if (l == 0 && j == 0.5 && N ==1 ) NN1s12.add((float)A,energy);
           //if (l == 1 && j == 0.5 && N ==0 ) NN0p12.add((float)A,energy);
           //if (l == 1 && j == 1.5 && N ==0 ) NN0p32.add((float)A,energy);
           if (l == 2 && j == 2.5 && N ==0 ) NN0d52.add((float)A,energy);
           if (l == 2 && j == 1.5 && N ==0 ) NN0d32.add((float)A,energy);
           if (l == 3 && j == 3.5 && N ==0 ) NN0f72.add((float)A,energy);
           if (l == 3 && j == 2.5 && N ==0 ) NN0f52.add((float)A,energy);
           //if (l == 3 && j == 2.5 && N ==0 ) NN0f52.add((float)A,energy);
           if (l == 1 && j == 0.5 && N ==1 ) NN1p12.add((float)A,energy);
           if (l == 1 && j == 1.5 && N ==1 ) NN1p32.add((float)A,energy);
           //if (l == 4 && j == 4.5 && N ==0 ) NN0g92.add((float)A,energy);
	 }
       file.close();
       file.clear();

    }
void absoluteCS_CSnPb()
{
    TStyle * style = (TStyle*)gROOT->FindObject("graphStyle");

    if(!style)      
    {
        style = new TStyle("graphStyle","graphStyle");
    }

    TCanvas* c = new TCanvas("c1","",1200,1200);

    style->SetOptStat(0);
    style->SetOptTitle(0);    
    style->SetPalette(1,0);
    style->SetCanvasColor(10);      
    style->SetCanvasBorderMode(0);    
    style->SetFrameLineWidth(3);
    style->SetFrameFillColor(10);
    style->SetPadColor(10);
    style->SetHistLineWidth(3);
    style->SetHistLineColor(kBlue);
    style->SetMarkerSize(0.9);
    style->SetMarkerStyle(8);
    style->SetFuncWidth(3);
    style->SetFuncColor(kRed);
    style->SetLabelColor(kBlack,"xyz");
    style->SetTitleSize(0.06,"xyz");
    style->SetTitleFillColor(10);
    style->SetTitleTextColor(kBlack);
    style->SetEndErrorSize(0);

    gROOT->SetStyle("graphStyle");
    gROOT->ForceStyle();

    // read graphs
    string expFileName = "/data2/analysis/total.root";
    string litFileName = "/data2/analysis/literatureData.root";

    TFile* expFile = new TFile(expFileName.c_str(),"READ");
    TFile* litFile = new TFile(litFileName.c_str(),"READ");
    
    string expCGraphName = "CNat";
    string expSnGraphName = "SnNat";
    string expPbGraphName = "PbNat";

    string litCGraphName = "Natural C (n,tot)";
    string litSnGraphName = "Natural Sn (n,tot)";
    string litPbGraphName = "Natural Pb (n,tot)";
    
    TGraphAsymmErrors* expCGraph = (TGraphAsymmErrors*)expFile->Get(expCGraphName.c_str());
    TGraphAsymmErrors* expSnGraph = (TGraphAsymmErrors*)expFile->Get(expSnGraphName.c_str());
    TGraphAsymmErrors* expPbGraph = (TGraphAsymmErrors*)expFile->Get(expPbGraphName.c_str());

    TGraphAsymmErrors* litCGraph = (TGraphAsymmErrors*)litFile->Get(litCGraphName.c_str());
    TGraphAsymmErrors* litSnGraph = (TGraphAsymmErrors*)litFile->Get(litSnGraphName.c_str());
    TGraphAsymmErrors* litPbGraph = (TGraphAsymmErrors*)litFile->Get(litPbGraphName.c_str());

    // Set graph point and line characteristics
    expCGraph->SetLineColor(kRed);
    expCGraph->SetLineWidth(5);
    expCGraph->SetLineStyle(0);
    expCGraph->SetMarkerColor(kRed);

    expSnGraph->SetLineColor(kRed);
    expSnGraph->SetLineWidth(5);
    expSnGraph->SetLineStyle(0);
    expSnGraph->SetMarkerColor(kRed);

    expPbGraph->SetLineColor(kRed);
    expPbGraph->SetLineWidth(5);
    expPbGraph->SetLineStyle(0);
    expPbGraph->SetMarkerColor(kRed);

    litCGraph->SetLineColor(kBlack);
    litCGraph->SetLineWidth(3);
    litCGraph->SetLineStyle(2);
    litCGraph->SetMarkerColor(kBlack);

    litSnGraph->SetLineColor(kBlack);
    litSnGraph->SetLineWidth(3);
    litSnGraph->SetLineStyle(2);
    litSnGraph->SetMarkerColor(kBlack);

    litPbGraph->SetLineColor(kBlack);
    litPbGraph->SetLineWidth(3);
    litPbGraph->SetLineStyle(2);
    litPbGraph->SetMarkerColor(kBlack);

    // Pad dimensions and margins
    gPad->SetPad(0.005, 0.995, 0.995, 0.005);
    gPad->SetLeftMargin(0.15);
    gPad->SetRightMargin(0.01);
    gPad->SetTopMargin(0.03);
    gPad->SetBottomMargin(0.15);
    gPad->SetTicky(2);

    // X-axis parameters
    expCGraph->GetXaxis()->SetTitle("Energy (MeV)");
    expCGraph->GetXaxis()->SetTitleSize(0.05);
    expCGraph->GetXaxis()->SetTitleFont(2);
    expCGraph->GetXaxis()->SetTitleOffset(1.4);
    expCGraph->GetXaxis()->CenterTitle();

    expCGraph->GetXaxis()->SetLabelOffset(0.01);
    expCGraph->GetXaxis()->SetLabelSize(0.05);
    expCGraph->GetXaxis()->SetLabelFont(2);

    expCGraph->GetXaxis()->SetNdivisions(10);
    expCGraph->GetXaxis()->SetTickLength(0.03);

    // Y-axis parameters
    expCGraph->GetYaxis()->SetTitle("#sigma_{tot} (barns)");
    expCGraph->GetYaxis()->SetTitleSize(0.06);
    expCGraph->GetYaxis()->SetTitleFont(2);
    expCGraph->GetYaxis()->SetTitleOffset(0.8);
    expCGraph->GetYaxis()->CenterTitle();

    expCGraph->GetYaxis()->SetLabelOffset(0.01);
    expCGraph->GetYaxis()->SetLabelSize(0.05);

    expCGraph->GetYaxis()->SetLabelFont(2);
    expCGraph->GetYaxis()->SetNdivisions(10);
    expCGraph->GetYaxis()->SetTickLength(0.02);

    expCGraph->Draw("");
    expSnGraph->Draw("same");
    expPbGraph->Draw("same");
    litCGraph->Draw("same");
    litSnGraph->Draw("same");
    litPbGraph->Draw("same");
    expCGraph->Draw("same");
    expSnGraph->Draw("same");
    expPbGraph->Draw("same");

    gPad->SetLogx(1);
    
    expCGraph->GetYaxis()->SetRangeUser(0,9);

    TLatex latex;
    latex.SetNDC();
    latex.SetTextSize(0.035);
    latex.SetTextAlign(13); // align at top
    latex.DrawLatex(0.65,0.65,"Pb (elem.)");
    latex.DrawLatex(0.35,0.52,"Sn (elem.)");
    latex.DrawLatex(0.32,0.4,"C (elem.)");

    // Define legend format and contents
    TLegend *legend = new TLegend(0.7,0.8,0.9,0.9);
    legend->AddEntry(litCGraph,"lit data (analog)","l");
    legend->AddEntry(expCGraph,"new data (DSP)","l");
    legend->Draw();

    expFile->Close();
    litFile->Close();
}
Example #22
0
/////
//   Set setTDRStyle_modified (from link https://twiki.cern.ch/twiki/pub/CMS/TRK10001/setTDRStyle_modified.C)
/////
void setTDRStyle(){
  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);
  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(false);
  tdrStyle->SetPadGridY(false);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);
  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  // For the histo:
  tdrStyle->SetHistFillColor(0);
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  tdrStyle->SetErrorX(0.);
  tdrStyle->SetMarkerStyle(20);

  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

  //For the date:
  tdrStyle->SetOptDate(0);

  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat("e");
  tdrStyle->SetStatColor(kGray);
  tdrStyle->SetStatFont(42);

  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(0);
  tdrStyle->SetStatX(1.); //Starting position on X axis
  tdrStyle->SetStatY(1.); //Starting position on Y axis
  tdrStyle->SetStatFontSize(0.025); //Vertical Size
  tdrStyle->SetStatW(0.15); //Horizontal size 
  // tdrStyle->SetStatStyle(Style_t style = 1001);

  // Margins:
  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.125);
  tdrStyle->SetPadLeftMargin(0.105);
  tdrStyle->SetPadRightMargin(0.1);

  // For the Global title:

  //  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);

  // For the axis titles:
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.05, "XYZ");
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(0.8);
  tdrStyle->SetTitleOffset(0.7, "Y"); // Another way to set the Offset

  // For the axis labels:
  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.045, "XYZ");

  // For the axis:

  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  // Change for log plots:
  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
  tdrStyle->SetOptLogz(0);

  tdrStyle->cd();
}
Example #23
0
void roc_plot(){

 TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(true);
  tdrStyle->SetPadGridY(true);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);

  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);

  // For the histo:
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  tdrStyle->SetEndErrorSize(2);
  tdrStyle->SetErrorX(0.);

  tdrStyle->SetMarkerStyle(20);

  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

  //For the date:
  tdrStyle->SetOptDate(0);

  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat("emr"); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);

  // Margins:
  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.13);
  tdrStyle->SetPadRightMargin(0.05);

  // For the Global title:
  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);
  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);

  // For the axis titles:
  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.06, "XYZ");
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(1.05);

  // For the axis labels:
  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.05, "XYZ");

  // For the axis:
  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  // Change for log plots:
  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
  tdrStyle->SetOptLogz(0);

  // Postscript options:
  tdrStyle->SetPaperSize(20.,20.);
  tdrStyle->SetPalette(1);
  
  gROOT -> ForceStyle();
  
  tdrStyle->cd();
  
  gStyle->SetOptStat(0111);
  gStyle->SetOptFit(1111);
  

  int bkg = 787623.93;
  int sig = 9313.;
  
  const int n = 5;
  
  //minmet
  //Double_t cut[n] = {10,15,20,25,30,35,40,45,50,55} ;
  
  //pvalue
  //Double_t cut[n] = {0,0.5,1,1.5,2,2.5,3,3.5,4.0};

  //metsig
  Double_t cut[n] = {5,10,15,20,25};

  //minmet
  //Double_t sensitivity_bkg_n[n]={660142.26/bkg,551026.78/bkg,444547.21/bkg,354649.92/bkg,283093.63/bkg ,227934.73/bkg ,187564.23/bkg,158191.46/bkg,103089.49/bkg,68423.49/bkg};
  //Double_t sensitivity_sig_n[n]={9274./sig ,9233./sig,9172./sig,9089./sig,8995./sig,8870./sig,8718./sig,8539./sig,7398./sig,6497./sig};

  //pvalue
  //Double_t sensitivity_bkg_n[n]={787623.93/bkg,290416.84/bkg, 166165.65/bkg, 87792.43/bkg, 49447.43/bkg, 30536.76/bkg, 19869.09/bkg, 13705.00/bkg, 10075.21/bkg};
  //Double_t sensitivity_sig_n[n]={9313./sig,9005./sig, 8499./sig,7547./sig,6508./sig,5579./sig,4832./sig,4213./sig,3649./sig};

  //metsig
  Double_t sensitivity_bkg_n[n]={579088.98/bkg,94310.14/bkg, 13034.68/bkg,2503.93./bkg,756.13./bkg};
  Double_t sensitivity_sig_n[n]={9045./sig,7492./sig,5899./sig,4654./sig,3726./sig};

  sensitivity_bkg = new TGraph(n,cut,sensitivity_bkg_n);
  sensitivity_sig = new TGraph(n,cut,sensitivity_sig_n);
  
  //Double_t xdummy[2] = {10,55};
  //Double_t xdummy[2] = {-0.1,3};
  Double_t xdummy[2] = {0,25};
  Double_t ydummy[2] = {0.0,1.0};
  
  dummy = new TGraph(2,xdummy,ydummy);
  dummy->SetLineColor(0);
  dummy->SetLineWidth(0);
  dummy->SetMarkerColor(0);
  dummy->SetMarkerSize(0);
  dummy->Draw("AP*");
  dummy->GetYaxis()->SetTitle("Efficiency");
  //dummy->GetXaxis()->SetTitle("Minimized #slash{E}_{T} Cut [GeV]");
  //dummy->GetXaxis()->SetTitle("|Log10(P_{#Chi^{2}})|");
  dummy->GetXaxis()->SetTitle("Met Significance");
  dummy->GetYaxis()->SetLabelSize(0.04);
  dummy->GetXaxis()->SetLabelSize(0.04);
  
  sensitivity_bkg->SetLineColor(2);
  sensitivity_bkg->SetMarkerColor(2);
  
  sensitivity_sig->SetLineColor(4);
  sensitivity_sig->SetMarkerColor(4);
  
  sensitivity_bkg->Draw("LPSame");
  sensitivity_sig->Draw("LPSame");

  //legend = new TLegend(.70,.70,.90,.90,"Final Selection e/#mu+jets");
  legend = new TLegend(0.1845638,0.2027972,0.3674497,0.3024476,NULL,"brNDC");

  legend->AddEntry(sensitivity_bkg, "#gamma + Jets", "lp");
  legend->AddEntry(sensitivity_sig, "Z (#nu#nu) #gamma" , "lp");
  
  legend->SetShadowColor(0);
  legend->SetFillColor(0);
  legend->SetLineColor(0);
  legend->Draw("Same");
  
  latex2 = new TLatex();
  latex2->SetNDC();
  latex2->SetTextSize(0.04);
  latex2->SetTextAlign(31); 
  latex2->DrawLatex(0.87, 0.96, "CMS Preliminary, #sqrt{s} = 8 TeV");

  
}
Example #24
0
// Create my custom FORMAL style
// *****************************
void SemiFormalStyle(void) {

    std::cout << " *** void getSemiFormalStyle(void) *** Custom  TStyle initialized!" << std::endl;
    TStyle *semiFStyle = new TStyle("semiFStyle","Style for AN09");

    // For the canvas:
    semiFStyle->SetCanvasBorderMode(0);
    semiFStyle->SetCanvasColor(kWhite);
    semiFStyle->SetCanvasDefH(600); //Height of canvas
    semiFStyle->SetCanvasDefW(600); //Width of canvas
    semiFStyle->SetCanvasDefX(0);   //POsition on screen
    semiFStyle->SetCanvasDefY(0);
    // For the Pad:
    semiFStyle->SetPadBorderMode(0);
    // semiFStyle->SetOptTitle(0); // delete histogram titles
    // semiFStyle->SetPadBorderSize(Width_t size = 1);
    semiFStyle->SetPadColor(kWhite);
    semiFStyle->SetPadGridX(true);
    semiFStyle->SetPadGridY(true);
    semiFStyle->SetGridColor(0);
    semiFStyle->SetGridStyle(3);
    semiFStyle->SetGridWidth(1);

    // For the frame:
    semiFStyle->SetFrameBorderMode(0);
    semiFStyle->SetFrameBorderSize(1);
    semiFStyle->SetFrameFillColor(0);
    semiFStyle->SetFrameFillStyle(0);
    semiFStyle->SetFrameLineColor(1);
    semiFStyle->SetFrameLineStyle(1);
    semiFStyle->SetFrameLineWidth(1);

    // For the histo:
    // semiFStyle->SetHistFillColor(1);
    // semiFStyle->SetHistFillStyle(0);
    semiFStyle->SetHistLineColor(1);
    semiFStyle->SetHistLineStyle(0);
    semiFStyle->SetHistLineWidth(1);
    // semiFStyle->SetLegoInnerR(Float_t rad = 0.5);
    // semiFStyle->SetNumberContours(Int_t number = 20);

    semiFStyle->SetEndErrorSize(2);
    //semiFStyle->SetErrorMarker(20);
    semiFStyle->SetErrorX(0.);

    semiFStyle->SetMarkerStyle(20);

    //For the fit/function:
    semiFStyle->SetOptFit(1);
    semiFStyle->SetFitFormat("5.4g");
    semiFStyle->SetFuncColor(2);
    semiFStyle->SetFuncStyle(1);
    semiFStyle->SetFuncWidth(1);

    //For the date:
    semiFStyle->SetOptDate(1);

    // For the statistics box:
    semiFStyle->SetOptFile(0);
    semiFStyle->SetOptStat("mnre"); // stats box
    semiFStyle->SetOptFit(1111); // fit box
    semiFStyle->SetStatColor(kWhite);
    semiFStyle->SetStatFont(42);
    semiFStyle->SetStatFontSize(0.025);
    semiFStyle->SetStatTextColor(1);
    semiFStyle->SetStatFormat("6.4g");
    semiFStyle->SetStatBorderSize(1);
    semiFStyle->SetStatH(0.1);
    semiFStyle->SetStatW(0.15);

    // Margins:
    semiFStyle->SetPadTopMargin(0.15);
    semiFStyle->SetPadBottomMargin(0.13);
    semiFStyle->SetPadLeftMargin(0.13);
    semiFStyle->SetPadRightMargin(0.15);

    // For the Global title:
    //  semiFStyle->SetOptTitle(0);
    semiFStyle->SetTitleFont(42);
    semiFStyle->SetTitleColor(1);
    semiFStyle->SetTitleTextColor(1);
    semiFStyle->SetTitleFillColor(10);
    semiFStyle->SetTitleFontSize(0.05);

    // For the axis titles:
    semiFStyle->SetTitleColor(1, "XYZ");
    semiFStyle->SetTitleFont(42, "XYZ");
    semiFStyle->SetTitleSize(0.06, "XYZ");
    semiFStyle->SetTitleXOffset(1.5);
    semiFStyle->SetTitleYOffset(1.5);
    semiFStyle->SetTitleOffset(1.5, "Y"); // Another way to set the Offset

    // For the axis labels:

    semiFStyle->SetLabelColor(1, "XYZ");
    semiFStyle->SetLabelFont(42, "XYZ");
    semiFStyle->SetLabelOffset(0.007, "XYZ");
    semiFStyle->SetLabelSize(0.05, "XYZ");

    // For the axis:
    semiFStyle->SetAxisColor(1, "XYZ");
    semiFStyle->SetStripDecimals(kTRUE);
    semiFStyle->SetTickLength(0.03, "XYZ");
    semiFStyle->SetNdivisions(510, "XYZ");
    semiFStyle->SetPadTickX(0);  // To get tick marks on the opposite side of the frame
    semiFStyle->SetPadTickY(0);

    // Change for log plots:
    semiFStyle->SetOptLogx(0);
    semiFStyle->SetOptLogy(0);
    semiFStyle->SetOptLogz(0);

    semiFStyle->SetPalette(1,0);
    semiFStyle->cd();

} //end of: void SemiFormalStyle(void){
Example #25
0
void setTDRStyle() {
  TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR");

  // For the canvas:
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasColor(kWhite);
  tdrStyle->SetCanvasDefH(600); //Height of canvas
  tdrStyle->SetCanvasDefW(600); //Width of canvas
  tdrStyle->SetCanvasDefX(0);   //POsition on screen
  tdrStyle->SetCanvasDefY(0);

  // For the Pad:
  tdrStyle->SetPadBorderMode(0);
  // tdrStyle->SetPadBorderSize(Width_t size = 1);
  tdrStyle->SetPadColor(kWhite);
  tdrStyle->SetPadGridX(false);
  tdrStyle->SetPadGridY(false);
  tdrStyle->SetGridColor(0);
  tdrStyle->SetGridStyle(3);
  tdrStyle->SetGridWidth(1);


  // For the frame:
  tdrStyle->SetFrameBorderMode(0);
  tdrStyle->SetFrameBorderSize(1);
  tdrStyle->SetFrameFillColor(0);
  tdrStyle->SetFrameFillStyle(0);
  tdrStyle->SetFrameLineColor(1);
  tdrStyle->SetFrameLineStyle(1);
  tdrStyle->SetFrameLineWidth(1);


  // For the histo:
  // tdrStyle->SetHistFillColor(1);
  // tdrStyle->SetHistFillStyle(0);
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(1);
  // tdrStyle->SetLegoInnerR(Float_t rad = 0.5);
  // tdrStyle->SetNumberContours(Int_t number = 20);
  tdrStyle->SetEndErrorSize(2);
  //  tdrStyle->SetErrorMarker(20);
  //  tdrStyle->SetErrorX(0.);

  tdrStyle->SetMarkerStyle(20);

  //For the fit/function:
  tdrStyle->SetOptFit(1);
  tdrStyle->SetFitFormat("5.4g");
  tdrStyle->SetFuncColor(2);
  tdrStyle->SetFuncStyle(1);
  tdrStyle->SetFuncWidth(1);

  //For the date:
  tdrStyle->SetOptDate(0);
  // tdrStyle->SetDateX(Float_t x = 0.01);

  // tdrStyle->SetDateY(Float_t y = 0.01);

  // For the statistics box:
  tdrStyle->SetOptFile(0);
  tdrStyle->SetOptStat(0); // To display the mean and RMS:   SetOptStat("mr");
  tdrStyle->SetStatColor(kWhite);
  tdrStyle->SetStatFont(42);
  tdrStyle->SetStatFontSize(0.025);
  tdrStyle->SetStatTextColor(1);
  tdrStyle->SetStatFormat("6.4g");
  tdrStyle->SetStatBorderSize(1);
  tdrStyle->SetStatH(0.1);
  tdrStyle->SetStatW(0.15);
  // tdrStyle->SetStatStyle(Style_t style = 1001);
  // tdrStyle->SetStatX(Float_t x = 0);
  // tdrStyle->SetStatY(Float_t y = 0);

  // Margins:
  tdrStyle->SetPadTopMargin(0.05);
  tdrStyle->SetPadBottomMargin(0.13);
  tdrStyle->SetPadLeftMargin(0.16);
  tdrStyle->SetPadRightMargin(0.02);

  // For the Global title:

  tdrStyle->SetOptTitle(0);
  tdrStyle->SetTitleFont(42);
  tdrStyle->SetTitleColor(1);

  tdrStyle->SetTitleTextColor(1);
  tdrStyle->SetTitleFillColor(10);
  tdrStyle->SetTitleFontSize(0.05);
  // tdrStyle->SetTitleH(0); // Set the height of the title box
  // tdrStyle->SetTitleW(0); // Set the width of the title box
  // tdrStyle->SetTitleX(0); // Set the position of the title box
  // tdrStyle->SetTitleY(0.985); // Set the position of the title box
  // tdrStyle->SetTitleStyle(Style_t style = 1001);
  // tdrStyle->SetTitleBorderSize(2);

  // For the axis titles:

  tdrStyle->SetTitleColor(1, "XYZ");
  tdrStyle->SetTitleFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.06, "XYZ");
  // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
  // tdrStyle->SetTitleYSize(Float_t size = 0.02);
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(1.4);
  // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset



  // For the axis labels:

  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetTitleSize(0.06, "XYZ");
  // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size?
  // tdrStyle->SetTitleYSize(Float_t size = 0.02);
  tdrStyle->SetTitleXOffset(0.9);
  tdrStyle->SetTitleYOffset(1.4);
  // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset

  // For the axis labels:

  tdrStyle->SetLabelColor(1, "XYZ");
  tdrStyle->SetLabelFont(42, "XYZ");
  tdrStyle->SetLabelOffset(0.007, "XYZ");
  tdrStyle->SetLabelSize(0.05, "XYZ");

  // For the axis:

  tdrStyle->SetAxisColor(1, "XYZ");
  tdrStyle->SetStripDecimals(kTRUE);
  tdrStyle->SetTickLength(0.03, "XYZ");
  tdrStyle->SetNdivisions(510, "XYZ");
  tdrStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  tdrStyle->SetPadTickY(1);

  // Change for log plots:
  tdrStyle->SetOptLogx(0);
  tdrStyle->SetOptLogy(0);
  tdrStyle->SetOptLogz(0);

  // Postscript options:
  tdrStyle->SetPaperSize(20.,20.);
  // tdrStyle->SetLineScalePS(Float_t scale = 3);
  // tdrStyle->SetLineStyleString(Int_t i, const char* text);
  // tdrStyle->SetHeaderPS(const char* header);
  // tdrStyle->SetTitlePS(const char* pstitle);

  // tdrStyle->SetBarOffset(Float_t baroff = 0.5);
  // tdrStyle->SetBarWidth(Float_t barwidth = 0.5);
  // tdrStyle->SetPaintTextFormat(const char* format = "g");
  // tdrStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0);
  // tdrStyle->SetTimeOffset(Double_t toffset);
  // tdrStyle->SetHistMinimumZero(kTRUE);

  tdrStyle->cd();

}
Example #26
0
TStyle* createMyStyle() {
  TStyle *myStyle = new TStyle("myStyle", "myStyle");

  // For the canvas:
  myStyle->SetCanvasBorderMode(0);
  myStyle->SetCanvasColor(kWhite);
  myStyle->SetCanvasDefH(800); //Height of canvas
  myStyle->SetCanvasDefW(800); //Width of canvas
  myStyle->SetCanvasDefX(0);   //POsition on screen
  myStyle->SetCanvasDefY(0);

  // For the Pad:
  myStyle->SetPadBorderMode(0);
  myStyle->SetPadColor(kWhite);
  myStyle->SetPadGridX(false);
  myStyle->SetPadGridY(false);
  myStyle->SetGridColor(0);
  myStyle->SetGridStyle(3);
  myStyle->SetGridWidth(1);

  // For the frame:
  myStyle->SetFrameBorderMode(0);
  myStyle->SetFrameBorderSize(1);
  myStyle->SetFrameFillColor(0);
  myStyle->SetFrameFillStyle(0);
  myStyle->SetFrameLineColor(1);
  myStyle->SetFrameLineStyle(1);
  myStyle->SetFrameLineWidth(1);

  // For the histo:
  myStyle->SetHistLineStyle(1);
  myStyle->SetHistLineWidth(2);
  myStyle->SetEndErrorSize(2);

  //For the fit/function:
  myStyle->SetFitFormat("5.4g");
  myStyle->SetFuncColor(2);
  myStyle->SetFuncStyle(1);
  myStyle->SetFuncWidth(1);

  // For the statistics box:
  myStyle->SetOptFile(0);
  myStyle->SetStatColor(kWhite);
  //myStyle->SetStatFont(43);
  //myStyle->SetStatFontSize(0.025);
  myStyle->SetStatTextColor(1);
  myStyle->SetStatFormat("6.4g");
  myStyle->SetStatBorderSize(1);
  myStyle->SetStatH(0.12);
  myStyle->SetStatW(0.3);
  myStyle->SetStatY(0.92);
  myStyle->SetStatX(0.94);

  //For the date:
  myStyle->SetOptDate(0);

  // Margins:
  myStyle->SetPadTopMargin(TOP_MARGIN);
  myStyle->SetPadBottomMargin(BOTTOM_MARGIN);
  myStyle->SetPadLeftMargin(LEFT_MARGIN);
  myStyle->SetPadRightMargin(RIGHT_MARGIN);

  // For the Global title:
  myStyle->SetOptTitle(0);
  myStyle->SetTitleFont(63);
  myStyle->SetTitleColor(1);
  myStyle->SetTitleTextColor(1);
  myStyle->SetTitleFillColor(10);
  myStyle->SetTitleBorderSize(0);
  myStyle->SetTitleAlign(33); 
  myStyle->SetTitleX(1);
  myStyle->SetTitleFontSize(TITLE_FONTSIZE);

  // For the axis titles:

  myStyle->SetTitleColor(1, "XYZ");
  myStyle->SetTitleFont(43, "XYZ");
  myStyle->SetTitleSize(TITLE_FONTSIZE, "XYZ");
  myStyle->SetTitleYOffset(2.); 
  myStyle->SetTitleXOffset(1.25);

  myStyle->SetLabelColor(1, "XYZ");
  myStyle->SetLabelFont(43, "XYZ");
  myStyle->SetLabelOffset(0.01, "YZ");
  myStyle->SetLabelOffset(0.015, "X");
  myStyle->SetLabelSize(LABEL_FONTSIZE, "XYZ");

  myStyle->SetAxisColor(1, "XYZ");
  myStyle->SetStripDecimals(kTRUE);
  myStyle->SetTickLength(0.03, "XYZ");
  myStyle->SetNdivisions(510, "XYZ");
  myStyle->SetPadTickX(1);  // To get tick marks on the opposite side of the frame
  myStyle->SetPadTickY(1);

  myStyle->SetOptLogx(0);
  myStyle->SetOptLogy(0);
  myStyle->SetOptLogz(0);

  myStyle->SetHatchesSpacing(1.3);
  myStyle->SetHatchesLineWidth(1);

  myStyle->cd();

  return myStyle;
}