Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 {
0002 // needs the efficiency.root
0003 std::cout<<" Makes 1D histos from a (ch, type) 2D histos (X projections for each Y bin). You specify the 2D histo!"<<std::endl;
0004 gStyle->SetOptStat(-1);
0005 gStyle->SetMarkerStyle(20);
0006 //gPad->SetFillColor(0);
0007   gStyle->SetStatW(0.25);
0008   gStyle->SetStatH(0.2);
0009 
0010 TH2F * the2D_histo = h_rhEfficiency; 
0011 
0012 TH1D * proj_MEm41 = the2D_histo->ProjectionX("ME-41",1,1);
0013 TH1D * proj_MEm32 = the2D_histo->ProjectionX("ME-32",2,2);
0014 TH1D * proj_MEm31 = the2D_histo->ProjectionX("ME-31",3,3);
0015 TH1D * proj_MEm22 = the2D_histo->ProjectionX("ME-22",4,4);
0016 TH1D * proj_MEm21 = the2D_histo->ProjectionX("ME-21",5,5);
0017 TH1D * proj_MEm13 = the2D_histo->ProjectionX("ME-13",6,6);
0018 TH1D * proj_MEm12 = the2D_histo->ProjectionX("ME-12",7,7);
0019 TH1D * proj_MEm11 = the2D_histo->ProjectionX("ME-11",8,8);
0020 
0021 
0022 TH1D * proj_MEp41 = the2D_histo->ProjectionX("ME+41",16,16);
0023 TH1D * proj_MEp32 = the2D_histo->ProjectionX("ME+32",15,15);
0024 TH1D * proj_MEp31 = the2D_histo->ProjectionX("ME+31",14,14);
0025 TH1D * proj_MEp22 = the2D_histo->ProjectionX("ME+22",13,13);
0026 TH1D * proj_MEp21 = the2D_histo->ProjectionX("ME+21",12,12);
0027 TH1D * proj_MEp13 = the2D_histo->ProjectionX("ME+13",11,11);
0028 TH1D * proj_MEp12 = the2D_histo->ProjectionX("ME+12",10,10);
0029 TH1D * proj_MEp11 = the2D_histo->ProjectionX("ME+11",9,9);
0030 
0031 
0032 float  maxEff = 1.005;
0033 
0034 proj_MEm41->SetMaximum(maxEff);
0035 proj_MEm32->SetMaximum(maxEff);
0036 proj_MEm31->SetMaximum(maxEff);
0037 proj_MEm22->SetMaximum(maxEff);
0038 proj_MEm21->SetMaximum(maxEff);
0039 proj_MEm13->SetMaximum(maxEff);
0040 proj_MEm12->SetMaximum(maxEff);
0041 proj_MEm11->SetMaximum(maxEff);
0042 
0043 
0044 proj_MEp41->SetMaximum(maxEff);
0045 proj_MEp32->SetMaximum(maxEff);
0046 proj_MEp31->SetMaximum(maxEff);
0047 proj_MEp22->SetMaximum(maxEff);
0048 proj_MEp21->SetMaximum(maxEff);
0049 proj_MEp13->SetMaximum(maxEff);
0050 proj_MEp12->SetMaximum(maxEff);
0051 proj_MEp11->SetMaximum(maxEff);
0052 
0053 
0054 
0055 
0056 proj_MEm41->UseCurrentStyle();
0057 proj_MEm32->UseCurrentStyle();
0058 proj_MEm31->UseCurrentStyle();
0059 proj_MEm22->UseCurrentStyle();
0060 proj_MEm21->UseCurrentStyle();
0061 proj_MEm13->UseCurrentStyle();
0062 proj_MEm12->UseCurrentStyle();
0063 proj_MEm11->UseCurrentStyle();
0064 
0065 
0066 proj_MEp41->UseCurrentStyle();
0067 proj_MEp32->UseCurrentStyle();
0068 proj_MEp31->UseCurrentStyle();
0069 proj_MEp22->UseCurrentStyle();
0070 proj_MEp21->UseCurrentStyle();
0071 proj_MEp13->UseCurrentStyle();
0072 proj_MEp12->UseCurrentStyle();
0073 proj_MEp11->UseCurrentStyle();
0074 
0075 proj_MEp22->Draw();
0076 std::cout<<" names are proj_MEp11 for ME+11, proj_MEm11 for ME-11, etc."<<std::endl;
0077 
0078 }