Example #1
0
/////////
// the Style Section
/////////
void setHLTStyle() {
  setTDRStyle();
  //  TStyle *hltStyle = new TStyle(*tdrStyle);
  TStyle *hltStyle  = new TStyle("hltStyle","My HLT Styles");
  gStyle->Copy(*hltStyle);

  hltStyle->SetCanvasColor(-1);

  hltStyle->SetCanvasDefH(600);
  hltStyle->SetCanvasDefW(600);
  hltStyle->SetPadColor(-1);  
  hltStyle->SetPadGridX(false);
  hltStyle->SetPadGridY(false);
  hltStyle->SetGridWidth(0.25);
  
  hltStyle->SetFrameFillColor(-1); // Transparent

  hltStyle->SetHistFillColor(-1); // Transparent
  hltStyle->SetHistFillStyle(0);  // None
  hltStyle->SetHistLineWidth(3);

  hltStyle->SetPadTopMargin(0.08);
  hltStyle->SetPadBottomMargin(0.12);
  hltStyle->SetPadLeftMargin(0.15);
  hltStyle->SetPadRightMargin(0.04);

  hltStyle->SetTitleSize(0.05);
  hltStyle->SetTitleFillColor(-1); // Transparent
  hltStyle->SetTitleH(0.05); // Set the height of the title box
  hltStyle->SetTitleW(0.); // Set the width of the title box

  hltStyle->SetTitleSize(0.04, "XYZ");     
  hltStyle->SetTitleOffset(1.2, "X"); // Another way to set the Offset
  hltStyle->SetTitleOffset(1.8, "Y"); // Another way to set the Offset

  hltStyle->SetLabelSize(0.035, "XYZ");

  hltStyle->SetPalette(1,0);
  hltStyle->SetFillColor(0);    // White
  hltStyle->SetFillStyle(4000); // Transparent

  hltStyle->SetStatStyle(0);
  hltStyle->SetTitleStyle(0);
  hltStyle->SetCanvasBorderSize(0);
  hltStyle->SetFrameBorderSize(0);
  hltStyle->SetLegendBorderSize(0);
  hltStyle->SetStatBorderSize(0);
  hltStyle->SetTitleBorderSize(0);

  hltStyle->cd();
}
Example #2
0
void LatinoStyle2()
{
  TStyle* GloStyle;
  GloStyle = gStyle;

  TStyle* LatinosStyle = new TStyle("LatinosStyle", "LatinosStyle");
  gStyle = LatinosStyle;


  //----------------------------------------------------------------------------
  // Canvas
  //----------------------------------------------------------------------------
  LatinosStyle->SetCanvasBorderMode(  0);
  LatinosStyle->SetCanvasBorderSize( 10);
  LatinosStyle->SetCanvasColor     (  0);
  LatinosStyle->SetCanvasDefH      (794);
  LatinosStyle->SetCanvasDefW      (550);
  LatinosStyle->SetCanvasDefX      ( 10);
  LatinosStyle->SetCanvasDefY      ( 10);


  //----------------------------------------------------------------------------
  // Pad
  //----------------------------------------------------------------------------
  LatinosStyle->SetPadBorderMode  (   0);
  LatinosStyle->SetPadBorderSize  (  10);
  LatinosStyle->SetPadColor       (   0);
  LatinosStyle->SetPadBottomMargin(0.20);
  LatinosStyle->SetPadTopMargin   (0.08);
  LatinosStyle->SetPadLeftMargin  (0.18);
  LatinosStyle->SetPadRightMargin (0.05);


  //----------------------------------------------------------------------------
  // Frame
  //----------------------------------------------------------------------------
  LatinosStyle->SetFrameFillStyle ( 0);
  LatinosStyle->SetFrameFillColor ( 0);
  LatinosStyle->SetFrameLineColor ( 1);
  LatinosStyle->SetFrameLineStyle ( 0);
  LatinosStyle->SetFrameLineWidth ( 2);
  LatinosStyle->SetFrameBorderMode( 0);
  LatinosStyle->SetFrameBorderSize(10);


  //----------------------------------------------------------------------------
  // Hist
  //----------------------------------------------------------------------------
  LatinosStyle->SetHistFillColor(0);
  LatinosStyle->SetHistFillStyle(1);
  LatinosStyle->SetHistLineColor(1);
  LatinosStyle->SetHistLineStyle(0);
  LatinosStyle->SetHistLineWidth(1);


  //----------------------------------------------------------------------------
  // Axis
  //----------------------------------------------------------------------------
  LatinosStyle->SetLabelFont  (   42, "xyz");
  LatinosStyle->SetLabelOffset(0.015, "xyz");
  LatinosStyle->SetLabelSize  (0.050, "xyz");
  LatinosStyle->SetNdivisions (  505, "xyz");
  LatinosStyle->SetTitleFont  (   42, "xyz");
  LatinosStyle->SetTitleSize  (0.050, "xyz");

  //  LatinosStyle->SetNdivisions ( -503, "y");

  LatinosStyle->SetTitleOffset(  1.4,   "x");
  LatinosStyle->SetTitleOffset(  1.2,   "y");
  LatinosStyle->SetPadTickX   (           1);  // Tick marks on the opposite side of the frame
  LatinosStyle->SetPadTickY   (           1);  // Tick marks on the opposite side of the frame


  //----------------------------------------------------------------------------
  // Title
  //----------------------------------------------------------------------------
  LatinosStyle->SetTitleBorderSize(    0);
  LatinosStyle->SetTitleFillColor (   10);
  LatinosStyle->SetTitleAlign     (   12);
  LatinosStyle->SetTitleFontSize  (0.045);
  LatinosStyle->SetTitleX         (0.590);
  LatinosStyle->SetTitleY         (0.830);

  LatinosStyle->SetTitleFont(42, "");


  //----------------------------------------------------------------------------
  // Stat
  //----------------------------------------------------------------------------
//   LatinosStyle->SetOptStat       (1110);
  LatinosStyle->SetOptStat       (   0);
  LatinosStyle->SetStatBorderSize(   0);
  LatinosStyle->SetStatColor     (  10);
  LatinosStyle->SetStatFont      (  42);
  LatinosStyle->SetStatX         (0.94);
  LatinosStyle->SetStatY         (0.91);

  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);
  LatinosStyle->SetNumberContours(NCont);

  return;
}
void blinding_study() 
{
	gSystem->CompileMacro("MitGPTree.h");
	
// First we define MIT Style for the plots.

	TStyle *MitStyle = gStyle;
	//gStyle = MitStyle;

	// Canvas
	MitStyle->SetCanvasColor     (0);
	MitStyle->SetCanvasBorderSize(10);
	MitStyle->SetCanvasBorderMode(0);
	MitStyle->SetCanvasDefH      (700);
	MitStyle->SetCanvasDefW      (700);
	MitStyle->SetCanvasDefX      (100);
	MitStyle->SetCanvasDefY      (100);

	// Pads
	MitStyle->SetPadColor       (0);
	MitStyle->SetPadBorderSize  (10);
	MitStyle->SetPadBorderMode  (0);
	MitStyle->SetPadBottomMargin(0.13);
	MitStyle->SetPadTopMargin   (0.04);
	MitStyle->SetPadLeftMargin  (0.18);
	MitStyle->SetPadRightMargin (0.04);
	MitStyle->SetPadGridX       (0);
	MitStyle->SetPadGridY       (0);
	MitStyle->SetPadTickX       (0);
	MitStyle->SetPadTickY       (0);

	// Frames
	MitStyle->SetFrameFillStyle ( 0);
	MitStyle->SetFrameFillColor ( 0);
	MitStyle->SetFrameLineColor ( 1);
	MitStyle->SetFrameLineStyle ( 0);
	MitStyle->SetFrameLineWidth ( 1);
	MitStyle->SetFrameBorderSize(10);
	MitStyle->SetFrameBorderMode( 0);

	// Histograms
	MitStyle->SetHistFillColor(2);
	MitStyle->SetHistFillStyle(0);
	MitStyle->SetHistLineColor(1);
	MitStyle->SetHistLineStyle(0);
	MitStyle->SetHistLineWidth(2);
	MitStyle->SetNdivisions(505);

	// Functions
	MitStyle->SetFuncColor(1);
	MitStyle->SetFuncStyle(0);
	MitStyle->SetFuncWidth(2);

	// Various
	MitStyle->SetMarkerStyle(20);
	MitStyle->SetMarkerColor(kBlack);
	MitStyle->SetMarkerSize (1.2);

	MitStyle->SetTitleSize  (0.055,"X");
	MitStyle->SetTitleOffset(1.200,"X");
	MitStyle->SetLabelOffset(0.005,"X");
	MitStyle->SetLabelSize  (0.050,"X");
	MitStyle->SetLabelFont  (42   ,"X");
	MitStyle->SetTickLength (-0.03,"X");

	MitStyle->SetStripDecimals(kFALSE);

	MitStyle->SetTitleSize  (0.055,"Y");
	MitStyle->SetTitleOffset(1.800,"Y");
	MitStyle->SetLabelOffset(0.010,"Y");
	MitStyle->SetLabelSize  (0.050,"Y");
	MitStyle->SetLabelFont  (42   ,"Y");
	MitStyle->SetTickLength (-0.03,"Y");

	MitStyle->SetTextSize   (0.055);
	MitStyle->SetTextFont   (42);

	MitStyle->SetStatFont   (42);
	MitStyle->SetTitleFont  (42);
	MitStyle->SetTitleFont  (42,"X");
	MitStyle->SetTitleFont  (42,"Y");

	MitStyle->SetOptStat    (0);
  
// Here the style section ends and the macro begins.
	
	string sig_samples[] = 
	{
		"s12-dmmpho-v_m1-v7a",
		"s12-dmmpho-av_m1-v7a",
		"s12-dmmpho-v_m10-v7a",
		"s12-dmmpho-av_m10-v7a",
		"s12-dmmpho-v_m100-v7a",
		"s12-dmmpho-av_m100-v7a",
		"s12-dmmpho-v_m200-v7a",
		"s12-dmmpho-av_m200-v7a",
		"s12-dmmpho-av_m300-v7a",	
		"s12-dmmpho-v_m500-v7a",
		"s12-dmmpho-av_m500-v7a",		
		"s12-dmmpho-v_m1000-v7a",
		"s12-dmmpho-av_m1000-v7a",
		"s12-addmpho-md1_d2-v7a",
		"s12-addmpho-md1_d3-v7a",
		"s12-addmpho-md1_d4-v7a",
		"s12-addmpho-md1_d5-v7a",		
		"s12-addmpho-md1_d6-v7a",
		"s12-addmpho-md2_d2-v7a",
		"s12-addmpho-md2_d3-v7a",
		"s12-addmpho-md2_d5-v7a",
		"s12-addmpho-md2_d6-v7a",
		"s12-addmpho-md3_d2-v7a",
		"s12-addmpho-md3_d3-v7a",
		"s12-addmpho-md3_d4-v7a",
		"s12-addmpho-md3_d5-v7a",
		"s12-addmpho-md3_d6-v7a"
	}
	
	Int_t signal_num=0; 
	
// This macro considers only one signal sample at a time, so the variable signal_num defines
// which signal sample to work on (it is the index of the sample in sig_samples).
	
	double sig_weights[] =
	{
		4.81E-07,
		4.79E-07,
		4.80E-07,
		4.81E-07,
		4.77E-07,
		4.26E-07,
		4.23E-07,
		3.18E-07,
		2.19E-07,
		2.01E-07,
		9.52E-08,
		3.00E-08,
		8.22E-09,
		6.48E-02,
		1.73E-01,
		6.93E-02,
		9.17E-02,
		9.63E-01,
		5.87E-03,
		4.91E-03,
		4.37E-03,
		4.26E-03,
		1.45E-03,
		7.93E-04,
		5.53E-04,
		4.26E-04,
		3.24E-04
	};
	
// The signal weights are given by (sigma_MC * lumi)/(N_processed). Background weights are defined similarly below.

	string bg_samples[] = {"s12-zgptg130-v7c", "s12-wjets-ptw100-v7a", "s12-wgptg130-v7a", "s12-qcdht100-250-v7a", "s12-qcdht250-500-v7a", "s12-qcdht500-1000-v7a", 
	"s12-qcdht1000-v7a", "s12-2pibo10_25-v7a", "s12-2pibo25_250-v7a", "s12-2pibo250-v7a", "s12-2pibx10_25-v7a", "s12-2pibx25_250-v7a", "s12-2pibx250-v7a", 
	"s12-pj50_80-v7a", "s12-pj80_120-v7a", "s12-pj120_170-v7a", "s12-pj170_300-v7a", "s12-pj300_470-v7a", "s12-pj470_800-v7a", "s12-pj800_1400-v7a", 
	"s12-pj1400_1800-v7a", "s12-pj1800-v7a", "s12-zgllgptg130-v7a", "s12-zgllg-v7a"};

	double bg_weights[]=
	{
		5.28E-03,
		1.14E-01,
		1.38E-02,
		5.63E+03,
		2.34E+02,
		9.71E+00,
		3.09E-01,
		9.21E+00,
		9.90E-01,
		4.21E-04,
		1.66E+01,
		6.43E-01,
		4.91E-05,
		3.30E+01,
		5.49E+00,
		1.09E+00,
		3.01E-01,
		2.15E-02,
		2.10E-03,
		7.11E-05,
		4.45E-07,
		1.88E-08,
		3.18E-03,
		5.10E-01
	};
	
	string sigLine = sig_samples[signal_num];
	Double_t sigWeight = sig_weights[signal_num];
	
	TH1* sig_hist = new TH1F("sig_hist", TString("Phi Between Met and Photon for Signal Events [") + TString(sigLine) + TString("]"), 70, 0, 3.5); 
	TH1* bg_hist = new TH1F("bg_hist", TString("Phi Between Met and Photon for Background Events [") + TString(sigLine) + TString("]"), 70, 0, 3.5);
	
	TH1* signifhist = new TH1F("signifhist", TString(" "), 24, 2, 3.2);

	cout<<"The selected signal sample is: "<<TString(sigLine)<<" "<<endl;
	
	TString sigFilename = TString("monoph-2013-July9_") + TString(sigLine) + TString("_noskim.root");
	
	MitGPTree sigEvent;
	sigEvent.LoadTree(TString("/scratch/cferko/hist/monoph-2013-July9/merged/")+sigFilename, 0);
	sigEvent.InitTree(0);
	
	int nDataSig=sigEvent.tree_->GetEntries();
	
	for (int evt=0; evt<nDataSig; ++evt) 
	{
		sigEvent.tree_->GetEntry(evt);
		Double_t pho1Pt = sigEvent.pho1_.Pt();
		Double_t jet1Pt = sigEvent.jet1_.Pt();
		Double_t met = sigEvent.met_;
		Double_t metPhi = sigEvent.metPhi_;
		Double_t nphotons = sigEvent.nphotons_;
		Double_t ncosmics = sigEvent.ncosmics_;
		Double_t phoPassEleVeto = sigEvent.phoPassEleVeto_a1_;
		Double_t jet1Pt = sigEvent.jet1_.Pt();
		Double_t nlep = sigEvent.nlep_;
		Double_t pho1Eta = sigEvent.pho1_.Eta();
		Double_t pho1Phi = sigEvent.pho1_.Phi();
		Double_t phoIsTrigger = sigEvent.phoIsTrigger_a1_;
		Double_t phoLeadTimeSpan = sigEvent.phoLeadTimeSpan_a1_;
		Double_t phoCoviEtaiEta = sigEvent.phoCoviEtaiEta_a1_;
		Double_t phoCoviPhiiPhi = sigEvent.phoCoviPhiiPhi_a1_;
		Double_t phoMipIsHalo = sigEvent.phoMipIsHalo_a1_;
		Double_t phoSeedTime = sigEvent.phoSeedTime_a1_;
		
		Double_t deltaPhi = TMath::ACos(TMath::Cos(pho1Phi - metPhi));
		
		if (TMath::Abs(pho1Eta)<1.479 && met>140 && pho1Pt>160 && nphotons>0 && phoPassEleVeto>0 && phoIsTrigger==1 && TMath::Abs(phoLeadTimeSpan) < 8. && phoCoviEtaiEta > 0.001 && phoCoviPhiiPhi > 0.001 && phoMipIsHalo == 0 && phoSeedTime > -1.5 && nlep==0 && ncosmics==0 && jet1Pt<100) sig_hist->Fill(deltaPhi, sigWeight);			
	}

	for (int i=0; i<24; i++)
	{
		string bgLine = bg_samples[i];
		Double_t bgWeight = bg_weights[i];

		TString bgFilename = TString("monoph-2013-July9_") + TString(bgLine) + TString("_noskim.root");

		MitGPTree bgEvent;
		bgEvent.LoadTree(TString("/scratch/cferko/hist/monoph-2013-July9/merged/") + bgFilename, 0);
		bgEvent.InitTree(0);
		
		int nDataBg=bgEvent.tree_->GetEntries();
		
		for (int evt=0; evt<nDataBg; ++evt) 
		{
			bgEvent.tree_->GetEntry(evt);
			Double_t pho1Pt = bgEvent.pho1_.Pt();
			Double_t jet1Pt = bgEvent.jet1_.Pt();
			Double_t met = bgEvent.met_;
			Double_t metPhi = bgEvent.metPhi_;
			Double_t nphotons = bgEvent.nphotons_;
			Double_t ncosmics = bgEvent.ncosmics_;
			Double_t phoPassEleVeto = bgEvent.phoPassEleVeto_a1_;
			Double_t jet1Pt = bgEvent.jet1_.Pt();
			Double_t nlep = bgEvent.nlep_;
			Double_t pho1Eta = bgEvent.pho1_.Eta();
			Double_t pho1Phi = bgEvent.pho1_.Phi();
			Double_t phoIsTrigger = bgEvent.phoIsTrigger_a1_;
			Double_t phoLeadTimeSpan = bgEvent.phoLeadTimeSpan_a1_;
			Double_t phoCoviEtaiEta = bgEvent.phoCoviEtaiEta_a1_;
			Double_t phoCoviPhiiPhi = bgEvent.phoCoviPhiiPhi_a1_;
			Double_t phoMipIsHalo = bgEvent.phoMipIsHalo_a1_;
			Double_t phoSeedTime = bgEvent.phoSeedTime_a1_;
			
			Double_t deltaPhi = TMath::ACos(TMath::Cos(pho1Phi - metPhi));
			
			if (TMath::Abs(pho1Eta)<1.479 && met>140 && pho1Pt>160 && nphotons>0 && phoPassEleVeto>0 && phoIsTrigger==1 && TMath::Abs(phoLeadTimeSpan) < 8. && phoCoviEtaiEta > 0.001 && phoCoviPhiiPhi > 0.001 && phoMipIsHalo == 0 && phoSeedTime > -1.5 && nlep==0 && ncosmics==0 && jet1Pt<100) bg_hist->Fill(deltaPhi, bgWeight);			
		}	
	}
	
	Double_t sigTot = sig_hist->Integral();
	Double_t bgTot = bg_hist->Integral();
	
	Double_t signifTot = sigTot/TMath::Sqrt(bgTot);
	Double_t signifTarget = 0.25*signifTot;
	
	Int_t reduced=0;

// The strange limits in the for loop are a messy hack to get the integral to work out. Since hist->Integral(a,b)
// integrates from BIN a to BIN b (bin numbers instead of values of the x-axis), I choose to work from bin 64
// (an angle cut of 3.2) to bin 40 (an angle cut of 2).

	for (int i=64; i>=40; i--)
	{
		Double_t sigcount = sig_hist->Integral(0, i);
		Double_t bgcount = bg_hist->Integral(0, i);
		if (bgcount>0)
		{
			Double_t significance = sigcount/TMath::Sqrt(bgcount);
//			cout<<"At a phi cut of "<<sig_hist->GetBinCenter(i)+0.025<<" the significance is "<<significance<<", which is a fraction "<<significance/signifTot<<" of max."<<endl;
			if (significance<signifTarget && reduced==0)
			{
				cout<<"The signal significance is reduced to one-fourth of its uncut value at a phi cut of "<<sig_hist->GetBinCenter(i)+0.025<<endl;
				reduced=1;
			}
			signifhist->Fill(sig_hist->GetBinCenter(i), significance);
		}
	}
	
	signifhist->SetStats(kFALSE);
	signifhist->GetXaxis()->SetTitle("Maximum #Delta#phi");
	signifhist->GetYaxis()->SetTitle("Signal Significance");
	signifhist->Draw();
	c1->Print(TString("Blinding_") + TString(sigLine) + TString(".pdf"));
}
Example #4
0
void SetStyle()
{
  TStyle *MYStyle = new TStyle("Style","Style");
  gStyle = MYStyle;

  // Canvas
  MYStyle->SetCanvasColor     (0);
  MYStyle->SetCanvasBorderSize(10);
  MYStyle->SetCanvasBorderMode(0);
  MYStyle->SetCanvasDefH      (700);
  MYStyle->SetCanvasDefW      (700);
  MYStyle->SetCanvasDefX      (100);
  MYStyle->SetCanvasDefY      (100);

  // Pads
  MYStyle->SetPadColor       (0);
  MYStyle->SetPadBorderSize  (10);
  MYStyle->SetPadBorderMode  (0);
  MYStyle->SetPadBottomMargin(0.13);
  MYStyle->SetPadTopMargin   (0.08);
  MYStyle->SetPadLeftMargin  (0.15);
  MYStyle->SetPadRightMargin (0.05);
  MYStyle->SetPadGridX       (0);
  MYStyle->SetPadGridY       (0);
  MYStyle->SetPadTickX       (0);
  MYStyle->SetPadTickY       (0);

  // Frames
  MYStyle->SetFrameFillStyle ( 0);
  MYStyle->SetFrameFillColor ( 0);
  MYStyle->SetFrameLineColor ( 1);
  MYStyle->SetFrameLineStyle ( 0);
  MYStyle->SetFrameLineWidth ( 1);
  MYStyle->SetFrameBorderSize(10);
  MYStyle->SetFrameBorderMode( 0);

  // Histograms
  MYStyle->SetHistFillColor(2);
//   MYStyle->SetHistFillStyle(0);
  MYStyle->SetHistLineColor(1);
  MYStyle->SetHistLineStyle(0);
  MYStyle->SetHistLineWidth(2);
  MYStyle->SetNdivisions(505);

  // Functions
  MYStyle->SetFuncColor(1);
  MYStyle->SetFuncStyle(0);
  MYStyle->SetFuncWidth(2);

  // Various
  MYStyle->SetMarkerStyle(20);
  MYStyle->SetMarkerColor(kBlack);
  MYStyle->SetMarkerSize (1.2);

  MYStyle->SetTitleSize  (0.055,"X");
  MYStyle->SetTitleOffset(1.050,"X");
  MYStyle->SetLabelOffset(0.005,"X");
  MYStyle->SetLabelSize  (0.045,"X");
  MYStyle->SetLabelFont  (42   ,"X");

  MYStyle->SetStripDecimals(kFALSE);

  MYStyle->SetTitleSize  (0.055,"Y");
  MYStyle->SetTitleOffset(1.400,"Y");
  MYStyle->SetLabelOffset(0.010,"Y");
  MYStyle->SetLabelSize  (0.045,"Y");
  MYStyle->SetLabelFont  (42   ,"Y");

  MYStyle->SetTextSize   (0.055);
  MYStyle->SetTextFont   (42);

  MYStyle->SetStatFont   (42);
  MYStyle->SetTitleFont  (42);
  MYStyle->SetTitleFont  (42,"X");
  MYStyle->SetTitleFont  (42,"Y");

  MYStyle->SetOptStat    (0);

  MYStyle->SetPalette    (1);
  return;
}
Example #5
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 #6
0
setStyle()
{
  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.15);
//   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);
//   // 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(1.0);
// //   tdrStyle->SetTitleYOffset(1.5);
//   tdrStyle->SetTitleOffset(1.5, "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(505, "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->SetPalette(1,0);

// Postscript options:
  // tdrStyle->SetPaperSize(15.,15.);
  // 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);

  // Canvas
  tdrStyle->SetCanvasColor     (0);
  tdrStyle->SetCanvasBorderSize(10);
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasDefH      (700);
  tdrStyle->SetCanvasDefW      (700);
  tdrStyle->SetCanvasDefX      (100);
  tdrStyle->SetCanvasDefY      (100);

  // color palette for 2D temperature plots
  tdrStyle->SetPalette(1,0);
  
  // Pads
  tdrStyle->SetPadColor       (0);
  tdrStyle->SetPadBorderSize  (10);
  tdrStyle->SetPadBorderMode  (0);
  tdrStyle->SetPadBottomMargin(0.15);
  tdrStyle->SetPadTopMargin   (0.05);
  tdrStyle->SetPadLeftMargin  (0.18);
  tdrStyle->SetPadRightMargin (0.07);
  tdrStyle->SetPadGridX       (0);
  tdrStyle->SetPadGridY       (0);
  tdrStyle->SetPadTickX       (1);
  tdrStyle->SetPadTickY       (1);

  // Frames
  tdrStyle->SetLineWidth(3);
  tdrStyle->SetFrameFillStyle ( 0);
  tdrStyle->SetFrameFillColor ( 0);
  tdrStyle->SetFrameLineColor ( 1);
  tdrStyle->SetFrameLineStyle ( 0);
  tdrStyle->SetFrameLineWidth ( 2);
  tdrStyle->SetFrameBorderSize(10);
  tdrStyle->SetFrameBorderMode( 0);

  // Histograms
  tdrStyle->SetHistFillColor(2);
  tdrStyle->SetHistFillStyle(0);
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(3);
  tdrStyle->SetNdivisions(505);

  // Functions
  tdrStyle->SetFuncColor(1);
  tdrStyle->SetFuncStyle(0);
  tdrStyle->SetFuncWidth(2);

  // Various
  tdrStyle->SetMarkerStyle(20);
  tdrStyle->SetMarkerColor(kBlack);
  tdrStyle->SetMarkerSize (1.4);

  tdrStyle->SetTitleBorderSize(0);
  tdrStyle->SetTitleFillColor (0);
  tdrStyle->SetTitleX         (0.2);

  tdrStyle->SetTitleSize  (0.055,"X");
  tdrStyle->SetTitleOffset(1.200,"X");
  tdrStyle->SetLabelOffset(0.005,"X");
  tdrStyle->SetLabelSize  (0.050,"X");
  tdrStyle->SetLabelFont  (42   ,"X");

  tdrStyle->SetStripDecimals(kFALSE);

  tdrStyle->SetTitleSize  (0.055,"Y");
  tdrStyle->SetTitleOffset(1.600,"Y");
  tdrStyle->SetLabelOffset(0.010,"Y");
  tdrStyle->SetLabelSize  (0.050,"Y");
  tdrStyle->SetLabelFont  (42   ,"Y");

  tdrStyle->SetTextSize   (0.055);
  tdrStyle->SetTextFont   (42);

  tdrStyle->SetStatFont   (42);
  tdrStyle->SetTitleFont  (42);
  tdrStyle->SetTitleFont  (42,"X");
  tdrStyle->SetTitleFont  (42,"Y");

  tdrStyle->SetOptStat    (0);
  tdrStyle->SetLineStyleString(11,"20 10");


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

  tdrStyle->SetCanvasColor     (0);
  tdrStyle->SetCanvasBorderSize(10);
  tdrStyle->SetCanvasBorderMode(0);
  tdrStyle->SetCanvasDefH      (700);
  tdrStyle->SetCanvasDefW      (700);
  tdrStyle->SetCanvasDefX      (100);
  tdrStyle->SetCanvasDefY      (100);

  // color palette for 2D temperature plots
  tdrStyle->SetPalette(1,0);
  
  // Pads
  tdrStyle->SetPadColor       (0);
  tdrStyle->SetPadBorderSize  (5);
  tdrStyle->SetPadBorderMode  (0);
  tdrStyle->SetPadBorderMode  (0);
  tdrStyle->SetPadBottomMargin(0.15);
  tdrStyle->SetPadTopMargin   (0.08);
  tdrStyle->SetPadLeftMargin  (0.12);
  tdrStyle->SetPadRightMargin (0.07);
  tdrStyle->SetPadGridX       (0);
  tdrStyle->SetPadGridY       (0);
  tdrStyle->SetPadTickX       (1);
  tdrStyle->SetPadTickY       (1);

  // Frames
  tdrStyle->SetLineWidth(3);
  tdrStyle->SetFrameFillStyle ( 0);
  tdrStyle->SetFrameFillColor ( 0);
  tdrStyle->SetFrameLineColor ( 1);
  tdrStyle->SetFrameLineStyle ( 0);
  tdrStyle->SetFrameLineWidth ( 2);
  tdrStyle->SetFrameBorderSize(5);
  tdrStyle->SetFrameBorderMode( 0);

  
  tdrStyle->SetFillStyle( 0);

  // Histograms
  tdrStyle->SetHistFillColor(2);
  tdrStyle->SetHistFillStyle(0);
  tdrStyle->SetHistLineColor(1);
  tdrStyle->SetHistLineStyle(0);
  tdrStyle->SetHistLineWidth(4);
  tdrStyle->SetNdivisions(510);

  // Functions
  tdrStyle->SetFuncColor(1);
  tdrStyle->SetFuncStyle(0);
  tdrStyle->SetFuncWidth(2);

  // Various
  tdrStyle->SetMarkerStyle(20);
  tdrStyle->SetMarkerColor(kBlack);
  tdrStyle->SetMarkerSize (1.4);

  tdrStyle->SetTitleBorderSize(0);
  tdrStyle->SetTitleFillColor (0);
  tdrStyle->SetTitleX         (0.2);

  tdrStyle->SetTitleSize  (0.055,"X");
  tdrStyle->SetTitleOffset(1.200,"X");
  tdrStyle->SetLabelOffset(0.005,"X");
  tdrStyle->SetLabelSize  (0.050,"X");
  tdrStyle->SetLabelFont  (42   ,"X");

  tdrStyle->SetStripDecimals(kFALSE);

  tdrStyle->SetTitleSize  (0.055,"Y");
  tdrStyle->SetTitleOffset(1.000,"Y");
  tdrStyle->SetLabelOffset(0.010,"Y");
  tdrStyle->SetLabelSize  (0.050,"Y");
  tdrStyle->SetLabelFont  (42   ,"Y");

  tdrStyle->SetTextSize   (0.055);
  tdrStyle->SetTextFont   (42);

  tdrStyle->SetStatFont   (42);
  tdrStyle->SetTitleFont  (42);
  tdrStyle->SetTitleFont  (42,"X");
  tdrStyle->SetTitleFont  (42,"Y");

  tdrStyle->SetOptStat    (0);
  tdrStyle->SetOptTitle    (0);

  tdrStyle->SetLineStyleString(11,"20 10");


  tdrStyle->SetLegendBorderSize(0);




  tdrStyle->cd();
}
Example #8
0
void SetStyle() {

  TH1::SetDefaultSumw2();
  gROOT->SetStyle("Plain");

  TStyle *MITStyle = new TStyle("MIT-Style","The Perfect Style for Plots ;-)");
  gStyle = MITStyle;

  gStyle->SetTitleSize(0.08,"t");//  gStyle->SetTitleX(0.8);
  gStyle->SetTitleW(0.3);
  gStyle->SetFrameFillColor(2);
  gStyle->SetFrameLineColor(2);

  // Canvas

  MITStyle->SetCanvasColor     (0);
  MITStyle->SetCanvasBorderSize(10);
  MITStyle->SetCanvasBorderMode(0);

  MITStyle->SetCanvasDefH      (500);
  MITStyle->SetCanvasDefW      (550);
  //  MITStyle->SetCanvasDefX      (100);
  //  MITStyle->SetCanvasDefY      (100);

  // Pads

  MITStyle->SetPadColor       (0);
  //  MITStyle->SetPadBorderSize  (10);
  MITStyle->SetPadBorderMode  (0);
  MITStyle->SetPadBottomMargin(0.18);
  MITStyle->SetPadTopMargin   (0.06);
  MITStyle->SetPadLeftMargin  (0.22);
  MITStyle->SetPadRightMargin (0.06);
  MITStyle->SetPadGridX       (0);
  MITStyle->SetPadGridY       (0);
  MITStyle->SetPadTickX       (1);
  MITStyle->SetPadTickY       (1);

  // Frames

  MITStyle->SetFrameFillStyle ( 0);
  MITStyle->SetFrameFillColor ( 0);
  MITStyle->SetFrameLineColor ( 1);
  MITStyle->SetFrameLineStyle ( 0);
  MITStyle->SetFrameLineWidth ( 1);
  //  MITStyle->SetFrameBorderSize(10);
  MITStyle->SetFrameBorderMode( 0);

  // Histograms

  MITStyle->SetHistLineColor(1);
  MITStyle->SetHistLineStyle(0);
  MITStyle->SetHistLineWidth(3);
  MITStyle->SetNdivisions(505,"X");
  MITStyle->SetNdivisions(505,"Y");
  MITStyle->SetNdivisions(505,"Z");

  // Functions

  MITStyle->SetFuncColor(1);
  MITStyle->SetFuncStyle(0);
  MITStyle->SetFuncWidth(2);

  // Various

  MITStyle->SetMarkerStyle(20);
  MITStyle->SetMarkerColor(kBlack);
  MITStyle->SetMarkerSize (1.2);

//  MITStyle->SetTitleSize  (0.1,"t");

  MITStyle->SetTitleSize  (0.070,"X");
  MITStyle->SetTitleOffset(1.0,"X");
  MITStyle->SetTitleFont  (42,"X");
  MITStyle->SetLabelOffset(0.005,"X");
  MITStyle->SetLabelSize  (0.070,"X");
  MITStyle->SetLabelFont  (42   ,"X");

  MITStyle->SetTitleSize  (0.070,"Y");
  MITStyle->SetTitleOffset(1.0,"Y");
  MITStyle->SetTitleFont  (42,"Y");
  MITStyle->SetLabelOffset(0.005,"Y");
  MITStyle->SetLabelSize  (0.070,"Y");
  MITStyle->SetLabelFont  (42   ,"Y");

  MITStyle->SetTitleSize  (0.06,"Z");
  MITStyle->SetTitleOffset(1.640,"Z");
  MITStyle->SetTitleFont  (42,"Z");
  MITStyle->SetLabelOffset(0.005,"Z");
  MITStyle->SetLabelSize  (0.070,"Z");
  MITStyle->SetLabelFont  (42   ,"Z");

  MITStyle->SetStripDecimals(kFALSE);
  MITStyle->SetTitleBorderSize(0);
  MITStyle->SetTitleFillColor(0);
  //  MITStyle->SetTitleAlign(6);

  MITStyle->SetTextSize   (20);
  MITStyle->SetTextFont   (43);

  MITStyle->SetStatFont   (42);
  MITStyle->SetOptStat    (0);

  MITStyle->SetLegendBorderSize(0);
  MITStyle->SetEndErrorSize(0);
  MITStyle->SetErrorX(0);

  MITStyle->SetPalette    (1,0);
}
Example #9
0
void WZPaperStyle()
{
  TStyle* WZPaperStyle = new TStyle("WZPaperStyle", "WZPaperStyle");

  gStyle = WZPaperStyle;


  //----------------------------------------------------------------------------
  // Canvas
  //----------------------------------------------------------------------------
  WZPaperStyle->SetCanvasBorderMode(  0);
  WZPaperStyle->SetCanvasBorderSize( 10);
  WZPaperStyle->SetCanvasColor     (  0);
  WZPaperStyle->SetCanvasDefH      (600);
  WZPaperStyle->SetCanvasDefW      (550);
  WZPaperStyle->SetCanvasDefX      ( 10);
  WZPaperStyle->SetCanvasDefY      ( 10);


  //----------------------------------------------------------------------------
  // Pad
  //----------------------------------------------------------------------------
  WZPaperStyle->SetPadBorderMode  (   0);
  WZPaperStyle->SetPadBorderSize  (  10);
  WZPaperStyle->SetPadColor       (   0);
  WZPaperStyle->SetPadBottomMargin(0.20);
  WZPaperStyle->SetPadTopMargin   (0.08);
  WZPaperStyle->SetPadLeftMargin  (0.18);
  WZPaperStyle->SetPadRightMargin (0.05);


  //----------------------------------------------------------------------------
  // Frame
  //----------------------------------------------------------------------------
  WZPaperStyle->SetFrameBorderMode( 0);
  WZPaperStyle->SetFrameBorderSize(10);
  WZPaperStyle->SetFrameFillStyle ( 0);
  WZPaperStyle->SetFrameFillColor ( 0);
  WZPaperStyle->SetFrameLineColor ( 1);
  WZPaperStyle->SetFrameLineStyle ( 0);
  WZPaperStyle->SetFrameLineWidth ( 2);


  //----------------------------------------------------------------------------
  // Hist
  //----------------------------------------------------------------------------
  WZPaperStyle->SetHistFillColor(0);
  WZPaperStyle->SetHistFillStyle(1);
  WZPaperStyle->SetHistLineColor(1);
  WZPaperStyle->SetHistLineStyle(0);
  WZPaperStyle->SetHistLineWidth(1);


  //----------------------------------------------------------------------------
  // Axis
  //----------------------------------------------------------------------------
  WZPaperStyle->SetLabelFont  (   42, "xyz");
  WZPaperStyle->SetLabelOffset(0.015, "xyz");
  WZPaperStyle->SetLabelSize  (0.040, "xyz");
  WZPaperStyle->SetNdivisions (  505, "xyz");
  WZPaperStyle->SetTitleFont  (   42, "xyz");
  WZPaperStyle->SetTitleSize  (0.040, "xyz");
  WZPaperStyle->SetTitleOffset( 1.15,   "x");
  WZPaperStyle->SetTitleOffset( 1.15,   "y");
  WZPaperStyle->SetPadTickX   (           1);
  WZPaperStyle->SetPadTickY   (           1);


  //----------------------------------------------------------------------------
  // Title
  //----------------------------------------------------------------------------
  WZPaperStyle->SetTitleAlign     (   33);
  WZPaperStyle->SetTitleBorderSize(    0);
  WZPaperStyle->SetTitleFillColor (   10);
  WZPaperStyle->SetTitleFont      (   42);
  WZPaperStyle->SetTitleFontSize  (0.045);
  WZPaperStyle->SetTitleX         (0.960);
  WZPaperStyle->SetTitleY         (0.990);


  //----------------------------------------------------------------------------
  // Stat
  //----------------------------------------------------------------------------
  WZPaperStyle->SetOptStat       (   0);
  WZPaperStyle->SetStatBorderSize(   0);
  WZPaperStyle->SetStatColor     (  10);
  WZPaperStyle->SetStatFont      (  42);
  WZPaperStyle->SetStatX         (0.94);
  WZPaperStyle->SetStatY         (0.91);
}
Example #10
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();
}
void ChargeRatioStyle()
{
  TStyle* GloStyle;
  GloStyle = gStyle;

  TStyle* ChargeRatioStyle = new TStyle("ChargeRatioStyle", "ChargeRatioStyle");
  gStyle = ChargeRatioStyle;

  //----------------------------------------------------------------------------
  // Canvas
  //----------------------------------------------------------------------------
  ChargeRatioStyle->SetCanvasBorderMode(  0);
  ChargeRatioStyle->SetCanvasBorderSize( 10);
  ChargeRatioStyle->SetCanvasColor     (  0);
  ChargeRatioStyle->SetCanvasDefH      (600);
  ChargeRatioStyle->SetCanvasDefW      (550);
  ChargeRatioStyle->SetCanvasDefX      ( 10);
  ChargeRatioStyle->SetCanvasDefY      ( 10);

  //----------------------------------------------------------------------------
  // Pad
  //----------------------------------------------------------------------------
  ChargeRatioStyle->SetPadBorderMode  (   0);
  ChargeRatioStyle->SetPadBorderSize  (  10);
  ChargeRatioStyle->SetPadColor       (   0);
  ChargeRatioStyle->SetPadBottomMargin(0.20);
  ChargeRatioStyle->SetPadTopMargin   (0.08);
  ChargeRatioStyle->SetPadLeftMargin  (0.18);
  ChargeRatioStyle->SetPadRightMargin (0.05);

  //----------------------------------------------------------------------------
  // Frame
  //----------------------------------------------------------------------------
  ChargeRatioStyle->SetFrameFillStyle ( 0);
  ChargeRatioStyle->SetFrameFillColor ( 0);
  ChargeRatioStyle->SetFrameLineColor ( 1);
  ChargeRatioStyle->SetFrameLineStyle ( 0);
  ChargeRatioStyle->SetFrameLineWidth ( 2);
  ChargeRatioStyle->SetFrameBorderMode( 0);
  ChargeRatioStyle->SetFrameBorderSize(10);

  //----------------------------------------------------------------------------
  // Hist
  //----------------------------------------------------------------------------
  ChargeRatioStyle->SetHistFillColor(0);
  ChargeRatioStyle->SetHistFillStyle(1);
  ChargeRatioStyle->SetHistLineColor(1);
  ChargeRatioStyle->SetHistLineStyle(0);
  ChargeRatioStyle->SetHistLineWidth(1);

  //----------------------------------------------------------------------------
  // Axis
  //----------------------------------------------------------------------------
  ChargeRatioStyle->SetLabelFont  (   42, "xyz");
  ChargeRatioStyle->SetLabelOffset(0.015, "xyz");
  ChargeRatioStyle->SetLabelSize  (0.050, "xyz");
  ChargeRatioStyle->SetNdivisions (  505, "xyz");
  ChargeRatioStyle->SetTitleFont  (   42, "xyz");
  ChargeRatioStyle->SetTitleSize  (0.050, "xyz");

  //  ChargeRatioStyle->SetNdivisions ( -503, "y");

  ChargeRatioStyle->SetTitleOffset(  1.4,   "x");
  ChargeRatioStyle->SetTitleOffset(  1.2,   "y");
  ChargeRatioStyle->SetPadTickX   (           1);  // Tick marks on the opposite side of the frame
  ChargeRatioStyle->SetPadTickY   (           1);  // Tick marks on the opposite side of the frame


  //----------------------------------------------------------------------------
  // Title
  //----------------------------------------------------------------------------
  ChargeRatioStyle->SetTitleBorderSize( 0);
  ChargeRatioStyle->SetTitleFillColor (10);
  ChargeRatioStyle->SetTitleFont      (42, "");

  ChargeRatioStyle->SetTitleAlign   (   33);
  ChargeRatioStyle->SetTitleFontSize(0.045);

  ChargeRatioStyle->SetTitleX       (0.560);
  ChargeRatioStyle->SetTitleY       (0.890);
  //  ChargeRatioStyle->SetTitleX       (0.940);
  //  ChargeRatioStyle->SetTitleY       (0.990);


  //----------------------------------------------------------------------------
  // Stat
  //----------------------------------------------------------------------------
  ChargeRatioStyle->SetOptStat       (1110);
  ChargeRatioStyle->SetStatBorderSize(   0);
  ChargeRatioStyle->SetStatColor     (  10);
  ChargeRatioStyle->SetStatFont      (  42);
  ChargeRatioStyle->SetStatX         (0.94);
  ChargeRatioStyle->SetStatY         (0.91);

  return();
}