本文整理汇总了C++中TStyle::SetErrorX方法的典型用法代码示例。如果您正苦于以下问题:C++ TStyle::SetErrorX方法的具体用法?C++ TStyle::SetErrorX怎么用?C++ TStyle::SetErrorX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStyle
的用法示例。
在下文中一共展示了TStyle::SetErrorX方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setTDRStyle
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->SetErrorX(0.5);
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.07);
tdrStyle->SetPadBottomMargin(0.15);
tdrStyle->SetPadLeftMargin(0.15);
// tdrStyle->SetPadBottomMargin(0.22);
// tdrStyle->SetPadLeftMargin(0.20);
tdrStyle->SetPadRightMargin(0.05);
// For the Global title:
tdrStyle->SetOptTitle(1);
tdrStyle->SetTitleFont(42);
tdrStyle->SetTitleColor(1);
tdrStyle->SetTitleTextColor(1);
tdrStyle->SetTitleFillColor(10);
tdrStyle->SetTitleFontSize(0.085);
// 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?
//.........这里部分代码省略.........
示例2: setTDRStyle
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(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(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.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.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);
//.........这里部分代码省略.........
示例3: FakeRate
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);
//.........这里部分代码省略.........
示例4: met
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);
//.........这里部分代码省略.........
示例5: setHHStyle
void setHHStyle(TStyle& HHStyle)
{
const int fontstyle=42;
HHStyle.SetPalette(1);
// ==============
// Canvas
// ==============
HHStyle.SetCanvasBorderMode(0);
HHStyle.SetCanvasColor(kWhite);
HHStyle.SetCanvasDefH(600); //Height of canvas
HHStyle.SetCanvasDefW(600); //Width of canvas
HHStyle.SetCanvasDefX(0); //Position on screen
HHStyle.SetCanvasDefY(0);
// ==============
// Pad
// ==============
HHStyle.SetPadBorderMode(0);
// HHStyle.SetPadBorderSize(Width_t size = 1);
HHStyle.SetPadColor(kWhite);
HHStyle.SetPadGridX(false);
HHStyle.SetPadGridY(false);
HHStyle.SetGridColor(kGray);
HHStyle.SetGridStyle(3);
HHStyle.SetGridWidth(1);
// ==============
// Frame
// ==============
HHStyle.SetFrameBorderMode(0);
HHStyle.SetFrameBorderSize(1);
HHStyle.SetFrameFillColor(0);
HHStyle.SetFrameFillStyle(0);
HHStyle.SetFrameLineColor(1);
HHStyle.SetFrameLineStyle(1);
HHStyle.SetFrameLineWidth(1);
// ==============
// Histo
// ==============
HHStyle.SetErrorX(0.0);
HHStyle.SetEndErrorSize(8);
// HHStyle.SetHistFillColor(1);
// HHStyle.SetHistFillStyle(0);
// HHStyle.SetHistLineColor(1);
HHStyle.SetHistLineStyle(0);
HHStyle.SetHistLineWidth(1);
// HHStyle.SetLegoInnerR(Float_t rad = 0.5);
// HHStyle.SetNumberContours(Int_t number = 20);
// HHStyle.SetErrorMarker(20);
HHStyle.SetMarkerStyle(20);
// ==============
// Fit/function
// ==============
HHStyle.SetOptFit(0);
HHStyle.SetFitFormat("5.4g");
HHStyle.SetFuncColor(2);
HHStyle.SetFuncStyle(1);
HHStyle.SetFuncWidth(1);
// ==============
// Date
// ==============
HHStyle.SetOptDate(0);
// HHStyle.SetDateX(Float_t x = 0.01);
// HHStyle.SetDateY(Float_t y = 0.01);
// =====================
// Statistics Box
// =====================
HHStyle.SetOptFile(0);
HHStyle.SetOptStat(0); // To display the mean and RMS: SetOptStat("mr");
HHStyle.SetStatColor(kWhite);
HHStyle.SetStatFont(fontstyle);
HHStyle.SetStatFontSize(0.025);
HHStyle.SetStatTextColor(1);
HHStyle.SetStatFormat("6.4g");
HHStyle.SetStatBorderSize(1);
HHStyle.SetStatH(0.1);
HHStyle.SetStatW(0.15);
// HHStyle.SetStatStyle(Style_t style = 1001);
// HHStyle.SetStatX(Float_t x = 0);
// HHStyle.SetStatY(Float_t y = 0);
// ==============
// Margins
// ==============
//.........这里部分代码省略.........
示例6: setTDRStyle
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);
tdrStyle->SetMarkerSize(1.2);
//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(1.05);
tdrStyle->SetPadBottomMargin(0.13);
tdrStyle->SetPadLeftMargin(0.11);
tdrStyle->SetPadRightMargin(0.08);
// 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?
//.........这里部分代码省略.........
示例7: electronCompare
int electronCompare()
{
TString CMP_DIR = gSystem->Getenv( "CMP_DIR" ) ;
TString CMP_URL = gSystem->Getenv( "CMP_URL" ) ;
TString CMP_TITLE = gSystem->Getenv( "CMP_TITLE" ) ;
TString CMP_RED_FILE = gSystem->Getenv( "CMP_RED_FILE" ) ;
TString CMP_BLUE_FILE = gSystem->Getenv( "CMP_BLUE_FILE" ) ;
TString CMP_RED_NAME = gSystem->Getenv( "CMP_RED_NAME" ) ;
TString CMP_BLUE_NAME = gSystem->Getenv( "CMP_BLUE_NAME" ) ;
TString CMP_RED_COMMENT = gSystem->Getenv( "CMP_RED_COMMENT" ) ;
TString CMP_BLUE_COMMENT = gSystem->Getenv( "CMP_BLUE_COMMENT" ) ;
TString CMP_CONFIG = gSystem->Getenv( "CMP_CONFIG" ) ;
TString CMP_RED_RELEASE = gSystem->Getenv( "CMP_RED_RELEASE" ) ;
TString CMP_BLUE_RELEASE = gSystem->Getenv( "CMP_BLUE_RELEASE" ) ;
//-----
// AC
// std::cout << "red_file : C : " << CMP_RED_FILE << std::endl;
// std::cout << "blue_file : C : " << CMP_BLUE_FILE << std::endl;
std::cout << "red_release : C : " << CMP_RED_RELEASE << std::endl;
std::cout << "blue_release : C : " << CMP_BLUE_RELEASE << std::endl;
std::cout << "CMP_RED_NAME : " << CMP_RED_NAME << std::endl;
std::cout << "CMP_BLUE_NAME : " << CMP_BLUE_NAME << std::endl;
//-----
// style:
TStyle *eleStyle = new TStyle("eleStyle","Style for electron validation");
eleStyle->SetCanvasBorderMode(0);
eleStyle->SetCanvasColor(kWhite);
eleStyle->SetCanvasDefH(600);
eleStyle->SetCanvasDefW(800);
eleStyle->SetCanvasDefX(0);
eleStyle->SetCanvasDefY(0);
eleStyle->SetPadBorderMode(0);
eleStyle->SetPadColor(kWhite);
eleStyle->SetPadGridX(false);
eleStyle->SetPadGridY(false);
eleStyle->SetGridColor(0);
eleStyle->SetGridStyle(3);
eleStyle->SetGridWidth(1);
eleStyle->SetOptStat(1);
eleStyle->SetPadTickX(1);
eleStyle->SetPadTickY(1);
eleStyle->SetHistLineColor(1);
eleStyle->SetHistLineStyle(0);
eleStyle->SetHistLineWidth(2);
eleStyle->SetEndErrorSize(2);
eleStyle->SetErrorX(0.);
eleStyle->SetOptStat(1);
eleStyle->SetTitleColor(1, "XYZ");
eleStyle->SetTitleFont(42, "XYZ");
eleStyle->SetTitleXOffset(1.0);
eleStyle->SetTitleYOffset(1.0);
eleStyle->SetLabelOffset(0.005, "XYZ");
eleStyle->SetTitleSize(0.05, "XYZ");
eleStyle->SetTitleFont(22,"X");
eleStyle->SetTitleFont(22,"Y");
eleStyle->SetHistLineWidth(2);
eleStyle->SetPadBottomMargin(0.13);
eleStyle->SetPadLeftMargin(0.15);
eleStyle->SetMarkerStyle(21);
eleStyle->SetMarkerSize(0.8);
//-- AC --
eleStyle->SetPadRightMargin(0.2) ;
eleStyle->cd();
gROOT->ForceStyle();
TString internal_path("DQMData/Run 1/EgammaV/Run summary/") ;
TString old_internal_path("DQMData/EgammaV/") ;
// TString new_internal_path("DQMData/Run 1/EgammaV/Run summary/") ;
TString file_ref_dir ;
TFile * file_ref = 0 ;
if ( CMP_BLUE_FILE != "" )
{
file_ref = TFile::Open(CMP_BLUE_FILE) ;
if (file_ref!=0)
{
std::cout<<"open "<<CMP_BLUE_FILE<<std::endl ;
if (file_ref->cd(internal_path)==kTRUE)
{
std::cerr<<"cd "<<internal_path<<std::endl ;
file_ref_dir = internal_path ;
file_ref->cd() ;
}
else if (file_ref->cd(old_internal_path)==kTRUE)
{
std::cerr<<"cd "<<old_internal_path<<std::endl ;
file_ref_dir = old_internal_path ;
file_ref->cd() ;
}
else
{
std::cerr<<"Failed move to: "<<internal_path<<" and "<<old_internal_path<<std::endl ;
file_ref_dir = "" ;
}
}
else
//.........这里部分代码省略.........
示例8: teenyWeenyBtagEffCalculation
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?
//.........这里部分代码省略.........
示例9: setIStyle
//-------------------------------------------------------------------------------
void setIStyle() {
TStyle* IStyle = new TStyle("IStyle","Ignazio Style");
gROOT->Reset();
gROOT->SetStyle("Plain");
// For the Global title:
IStyle->SetOptTitle(1); // In general I want global title!
IStyle->SetTitleFont(42);
IStyle->SetTitleColor(1);
IStyle->SetTitleTextColor(1);
IStyle->SetTitleFillColor(10);
IStyle->SetTitleFontSize(0.05);
IStyle->SetCanvasBorderMode(0);
IStyle->SetCanvasColor(kWhite);
IStyle->SetCanvasDefH(400); //Height of canvas
IStyle->SetCanvasDefW(600); //Width of canvas
IStyle->SetPadBorderMode(0);
IStyle->SetPadColor(kWhite);
/*
// Pad Margins:
//-----------------------------
IStyle->SetPadTopMargin(0.05);
IStyle->SetPadBottomMargin(0.13);
IStyle->SetPadLeftMargin(0.16);
IStyle->SetPadRightMargin(0.02);
*/
// For the frame:
//-----------------------------
IStyle->SetFrameBorderMode(0);
IStyle->SetFrameBorderSize(1);
IStyle->SetFrameFillColor(kWhite);
IStyle->SetFrameFillStyle(0);
IStyle->SetFrameLineColor(1);
IStyle->SetFrameLineStyle(1);
IStyle->SetFrameLineWidth(1);
// For the histo:
//-----------------------------
IStyle->SetHistLineWidth(1);
IStyle->SetHistLineColor(kBlack);
IStyle->SetEndErrorSize(2);
IStyle->SetErrorX(0.);
// IStyle->SetMarkerStyle(kFullDotSmall);
// IStyle->SetMarkerStyle(kFullDotMedium);
IStyle->SetMarkerStyle(kFullDotLarge);
// IStyle->SetMarkerStyle(kFullCircle);
// For the statistics box:
//-----------------------------
/*
gStyle->SetOptStat("option-string");
Where option string can contain:-
n ; name of histogram is printed
e ; number of entries printed
m ; mean value printed
r ; rms printed
u ; number of underflows printed
o ; number of overflows printed
i ; integral of bins printed
Example: gStyle->SetOptStat("ne");
print only name of histogram and number of entries.
To remove it altogther:-
gStyle->SetOptStat("");
*/
// IStyle->SetOptStat("emr");
/*
The parameter mode can be = ksiourmen (default = 000001111)
k = 1; kurtosis printed
k = 2; kurtosis and kurtosis error printed
s = 1; skewness printed
s = 2; skewness and skewness error printed
i = 1; integral of bins printed
o = 1; number of overflows printed
u = 1; number of underflows printed
r = 1; rms printed
r = 2; rms and rms error printed
m = 1; mean value printed
m = 2; mean and mean error values printed
e = 1; number of entries printed
n = 1; name of histogram is printed
Example: gStyle->SetOptStat(11);
print only name of histogram and number of entries.
gStyle->SetOptStat(1101); displays the name of histogram, mean value and RMS.
WARNING: never call SetOptStat(000111); but SetOptStat(1111), 0001111 will
be taken as an octal number !!
WARNING: SetOptStat(1) is taken as SetOptStat(1111) (for back compatibility
with older versions. If you want to print only the name of the histogram
call SetOptStat(1000000001).
NOTE that in case of 2-D histograms, when selecting just underflow (10000)
or overflow (100000), the stats box will show all combinations
of underflow/overflows and not just one single number!
//.........这里部分代码省略.........