Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:51

0001 #include <TChain.h>
0002 #include <TH1D.h>
0003 #include <TH2D.h>
0004 #include <TProfile.h>
0005 #include <TFitResult.h>
0006 #include <TFitResultPtr.h>
0007 #include <TPaveStats.h>
0008 #include <vector>
0009 #include <string>
0010 #include <iomanip>
0011 //#####
0012 #include <iostream>
0013 #include <fstream>
0014 #include "TH1.h"
0015 #include "TH2.h"
0016 #include "TCanvas.h"
0017 #include "TROOT.h"
0018 #include <TMath.h>
0019 #include "TStyle.h"
0020 #include "TSystem.h"
0021 #include "TLegend.h"
0022 #include "TText.h"
0023 #include "TAxis.h"
0024 #include "TFile.h"
0025 #include "TLine.h"
0026 #include "TGraph.h"
0027 #include <TPaveText.h>
0028 #include <TPostScript.h>
0029 #include <TClass.h>
0030 
0031 //
0032 using namespace std;
0033 //
0034 //
0035 
0036 //inline void HERE(const char *msg) { std::cout << msg << std::endl; }
0037 
0038 int main(int argc, char *argv[]) {
0039   std::string dirnm = "Analyzer";
0040   //======================================================================
0041   printf("reco: gROOT Reset \n");
0042   gROOT->Reset();
0043   gROOT->SetStyle("Plain");
0044   gStyle->SetOptStat(0);  //  no statistics _or_
0045   //                  gStyle->SetOptStat(11111111);
0046   //gStyle->SetOptStat(1101);// name mean and rms
0047   //    gStyle->SetOptStat(0101);// name and entries
0048   //       gStyle->SetOptStat(1100);// mean and rms only !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0049   //    gStyle->SetOptStat(1110000);// und over, integral !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0050   //  gStyle->SetOptStat(101110);  // entries, mean, rms, overflow !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0051   //    gStyle->SetOptStat(100000);//  over !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0052   //
0053   //gStyle->SetOptFit(00010);// constant, mean and sigma only !!
0054   //    gStyle->SetOptFit(00001);// hi2/nu, constant, mean and sigma only !!
0055   gStyle->SetOptFit(0010);  // constant, mean and sigma only !!
0056   //    gStyle->SetOptFit(00011);// constant, mean and sigma only !!
0057   // gStyle->SetOptFit(1101);
0058   //       gStyle->SetOptFit(1011);
0059   //
0060   //gStyle->SetStatX(0.98);
0061   //gStyle->SetStatY(0.99);
0062   //gStyle->SetStatW(0.30);
0063   //gStyle->SetStatH(0.25);
0064   gStyle->SetStatX(0.91);
0065   gStyle->SetStatY(0.75);
0066   gStyle->SetStatW(0.20);
0067   gStyle->SetStatH(0.10);
0068   // gStyle->SetStatH(0.35);
0069   //
0070 
0071   //        Float_t LeftOffset = 0.12;
0072   //Float_t TopOffset = 0.12;
0073   Float_t LeftOffset = 0.12;
0074   Float_t TopOffset = 0.22;
0075 
0076   gStyle->SetLineWidth(1);
0077   gStyle->SetErrorX(0);
0078 
0079   //---=[ Titles,Labels ]=-----------
0080   gStyle->SetOptTitle(0);  // title on/off
0081   //      gStyle->SetTitleColor(0);           // title color
0082   gStyle->SetTitleColor(1);  // title color
0083   //      gStyle->SetTitleX(0.35);            // title x-position
0084   gStyle->SetTitleX(0.15);  // title x-position
0085   gStyle->SetTitleH(0.15);  // title height
0086   //      gStyle->SetTitleW(0.53);            // title width
0087   gStyle->SetTitleW(0.60);         // title width
0088   gStyle->SetTitleFont(42);        // title font
0089   gStyle->SetTitleFontSize(0.07);  // title font size
0090 
0091   gStyle->SetPalette(1);
0092   //---=[ Histogram style ]=----------
0093   //        gStyle->SetHistFillColor(38);
0094   //            gStyle->SetFrameFillColor(41);// jelto-kori4nev-svetl
0095   //    gStyle->SetFrameFillColor(5);// jeltyi
0096   //    gStyle->SetFrameFillColor(17);// seryi
0097   //    gStyle->SetFrameFillColor(18);// svetlo seryi
0098   //    gStyle->SetFrameFillColor(20);// svetlo kori4nev
0099   //        gStyle->SetFrameFillColor(33);// sine-seryi
0100   //    gStyle->SetFrameFillColor(40);// fiolet-seryi
0101   //    gStyle->SetFrameFillColor(23);// sv.kor
0102 
0103   //---=[ Pad style ]=----------------
0104   gStyle->SetPadTopMargin(TopOffset);
0105   gStyle->SetPadBottomMargin(LeftOffset);
0106   gStyle->SetPadRightMargin(TopOffset);
0107   gStyle->SetPadLeftMargin(LeftOffset);
0108   //---=[ SetCanvasDef           ]=----------------
0109   //======================================================================
0110   //
0111   // Connect the input file and get the 2-d histogram in memory
0112   //======================================================================
0113   //  TBrowser *b = new TBrowser
0114 
0115   TFile *hfile1 = new TFile("Global_362596.root", "READ");
0116   //TFile *hfile1 = new TFile("Global_362365.root", "READ");
0117 
0118   TPostScript psfile("zcorrtsnvsampltest.ps", 111);
0119 
0120   //
0121 
0122   TCanvas *c1 = new TCanvas("c1", "Hcal4test", 200, 10, 700, 900);
0123 
0124   hfile1->ls();
0125   TDirectory *dir = (TDirectory *)hfile1->FindObjectAny(dirnm.c_str());
0126 
0127   //=============================================================================================== 1
0128   //======================================================================
0129   //======================================================================
0130   //================
0131   //======================================================================
0132   c1->Clear();
0133   c1->Divide(2, 2);
0134 
0135   c1->cd(1);
0136   TH2F *two11 = (TH2F *)dir->FindObjectAny("h2_TSnVsAyear2023_HB");
0137   gPad->SetGridy();
0138   gPad->SetGridx();
0139   two11->SetMarkerStyle(20);
0140   two11->SetMarkerSize(0.4);
0141   two11->SetYTitle("timing HB \b");
0142   two11->SetXTitle("Q HB\b");
0143   two11->SetMarkerColor(1);
0144   two11->SetLineColor(1);
0145   //               gPad->SetLogx();
0146   //               gPad->SetLogy();
0147   two11->Draw("BOX");
0148   //   two11->Draw("");
0149   //    two11->Draw("COLZ");
0150 
0151   c1->cd(2);
0152   TH2F *two12 = (TH2F *)dir->FindObjectAny("h2_TSnVsAyear2023_HE");
0153   gPad->SetGridy();
0154   gPad->SetGridx();
0155   two12->SetMarkerStyle(20);
0156   two12->SetMarkerSize(0.4);
0157   two12->SetYTitle("timing HE \b");
0158   two12->SetXTitle("Q HE\b");
0159   two12->SetMarkerColor(1);
0160   two12->SetLineColor(1);
0161   //   gPad->SetLogy();
0162   two12->Draw("BOX");
0163   //    two12->Draw("SCAT");
0164 
0165   c1->cd(3);
0166   TH2F *two22 = (TH2F *)dir->FindObjectAny("h2_TSnVsAyear2023_HF");
0167   gPad->SetGridy();
0168   gPad->SetGridx();
0169   two22->SetMarkerStyle(20);
0170   two22->SetMarkerSize(0.4);
0171   two22->SetYTitle("timing HF \b");
0172   two22->SetXTitle("Q HF\b");
0173   two22->SetMarkerColor(1);
0174   two22->SetLineColor(1);
0175   two22->Draw("BOX");
0176   //    two22->Draw("ARR");
0177 
0178   c1->cd(4);
0179   TH2F *two23 = (TH2F *)dir->FindObjectAny("h2_TSnVsAyear2023_HO");
0180   gPad->SetGridy();
0181   gPad->SetGridx();
0182   two23->SetMarkerStyle(20);
0183   two23->SetMarkerSize(0.4);
0184   two23->SetYTitle("timing HO \b");
0185   two23->SetXTitle("Q HO\b");
0186   two23->SetMarkerColor(1);
0187   two23->SetLineColor(1);
0188   two23->Draw("BOX");
0189 
0190   c1->Update();
0191 
0192   //========================================================================================== 2
0193   //======================================================================
0194   //======================================================================
0195   //================
0196   //======================================================================
0197   c1->Clear();
0198   c1->Divide(1, 4);
0199 
0200   c1->cd(1);
0201   TH1F *TSNvsQ_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HB");
0202   gPad->SetGridy();
0203   gPad->SetGridx();
0204   gPad->SetLogy();
0205   TSNvsQ_HB->SetMarkerStyle(20);
0206   TSNvsQ_HB->SetMarkerSize(0.6);
0207   TSNvsQ_HB->GetYaxis()->SetLabelSize(0.04);
0208   TSNvsQ_HB->SetXTitle("Q,fb HB \b");
0209   TSNvsQ_HB->SetYTitle("iev*ieta*iphi*idepth \b");
0210   TSNvsQ_HB->SetMarkerColor(4);
0211   TSNvsQ_HB->SetLineColor(0);
0212   TSNvsQ_HB->SetMinimum(0.8);
0213   //TSNvsQ_HB->GetXaxis()->SetRangeUser(0, MaxLumDanila + 5.);
0214   TSNvsQ_HB->Draw("E");
0215 
0216   c1->cd(2);
0217   TH1F *TSNvsQ_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HE");
0218   gPad->SetGridy();
0219   gPad->SetGridx();
0220   gPad->SetLogy();
0221   TSNvsQ_HE->SetMarkerStyle(20);
0222   TSNvsQ_HE->SetMarkerSize(0.6);
0223   TSNvsQ_HE->GetYaxis()->SetLabelSize(0.04);
0224   TSNvsQ_HE->SetXTitle("Q,fb HE \b");
0225   TSNvsQ_HE->SetYTitle("iev*ieta*iphi*idepth \b");
0226   TSNvsQ_HE->SetMarkerColor(4);
0227   TSNvsQ_HE->SetLineColor(0);
0228   TSNvsQ_HE->SetMinimum(0.8);
0229   //TSNvsQ_HE->GetXaxis()->SetRangeUser(0, MaxLumDanila + 5.);
0230   TSNvsQ_HE->Draw("E");
0231 
0232   c1->cd(3);
0233   TH1F *TSNvsQ_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HF");
0234   gPad->SetGridy();
0235   gPad->SetGridx();
0236   gPad->SetLogy();
0237   TSNvsQ_HF->SetMarkerStyle(20);
0238   TSNvsQ_HF->SetMarkerSize(0.6);
0239   TSNvsQ_HF->GetYaxis()->SetLabelSize(0.04);
0240   TSNvsQ_HF->SetXTitle("Q,fb HF \b");
0241   TSNvsQ_HF->SetYTitle("iev*ieta*iphi*idepth \b");
0242   TSNvsQ_HF->SetMarkerColor(4);
0243   TSNvsQ_HF->SetLineColor(0);
0244   TSNvsQ_HF->SetMinimum(0.8);
0245   //TSNvsQ_HF->GetXaxis()->SetRangeUser(0, MaxLumDanila + 5.);
0246   TSNvsQ_HF->Draw("E");
0247 
0248   c1->cd(4);
0249   TH1F *TSNvsQ_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HO");
0250   gPad->SetGridy();
0251   gPad->SetGridx();
0252   gPad->SetLogy();
0253   TSNvsQ_HO->SetMarkerStyle(20);
0254   TSNvsQ_HO->SetMarkerSize(0.6);
0255   TSNvsQ_HO->GetYaxis()->SetLabelSize(0.04);
0256   TSNvsQ_HO->SetXTitle("Q,fb HO \b");
0257   TSNvsQ_HO->SetYTitle("iev*ieta*iphi*idepth \b");
0258   TSNvsQ_HO->SetMarkerColor(4);
0259   TSNvsQ_HO->SetLineColor(0);
0260   TSNvsQ_HO->SetMinimum(0.8);
0261   //TSNvsQ_HO->GetXaxis()->SetRangeUser(0, MaxLumDanila + 5.);
0262   TSNvsQ_HO->Draw("E");
0263 
0264   c1->Update();
0265 
0266   //========================================================================================== 3
0267   //======================================================================
0268   //======================================================================
0269   //================
0270   //======================================================================
0271   c1->Clear();
0272   c1->Divide(1, 4);
0273 
0274   c1->cd(1);
0275   TH1F *twod1_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HB");
0276   TH1F *twod0_HB = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HB");
0277   twod1_HB->Sumw2();
0278   twod0_HB->Sumw2();
0279   TH1F *Ceff_HB = (TH1F *)twod1_HB->Clone("Ceff_HB");
0280   //  Ceff_HB->Sumw2();
0281   for (int x = 1; x <= twod1_HB->GetXaxis()->GetNbins(); x++) {
0282     twod1_HB->SetBinError(float(x), 0.001);
0283   }  //end x
0284   Ceff_HB->Divide(twod1_HB, twod0_HB, 1, 1, "B");
0285   gPad->SetGridy();
0286   gPad->SetGridx();
0287   Ceff_HB->SetMarkerStyle(20);
0288   Ceff_HB->SetMarkerSize(0.4);
0289   Ceff_HB->SetXTitle("Q, fc \b");
0290   Ceff_HB->SetYTitle("<timing>HB \b");
0291   Ceff_HB->SetMarkerColor(2);
0292   Ceff_HB->SetLineColor(2);
0293   Ceff_HB->SetMaximum(140.);
0294   Ceff_HB->SetMinimum(30.);
0295   Ceff_HB->Draw("E");
0296   //Ceff_HB->Draw("COLZ");
0297 
0298   c1->cd(2);
0299   TH1F *twod1_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HE");
0300   TH1F *twod0_HE = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HE");
0301   //  twod1_HE->Sumw2();
0302   //  twod0_HE->Sumw2();
0303   TH1F *Ceff_HE = (TH1F *)twod1_HE->Clone("Ceff_HE");
0304   //  Ceff_HE->Sumw2();
0305   for (int x = 1; x <= twod1_HE->GetXaxis()->GetNbins(); x++) {
0306     twod1_HE->SetBinError(float(x), 0.001);
0307   }  //end x
0308   Ceff_HE->Divide(twod1_HE, twod0_HE, 1, 1, "B");
0309   gPad->SetGridy();
0310   gPad->SetGridx();
0311   Ceff_HE->SetMarkerStyle(20);
0312   Ceff_HE->SetMarkerSize(0.4);
0313   Ceff_HE->SetXTitle("Q, fc \b");
0314   Ceff_HE->SetYTitle("<timing>HE \b");
0315   Ceff_HE->SetMarkerColor(2);
0316   Ceff_HE->SetLineColor(2);
0317   Ceff_HE->SetMaximum(150.);
0318   Ceff_HE->SetMinimum(25.);
0319   Ceff_HE->Draw("E");
0320   //Ceff_HE->Draw("COLZ");
0321 
0322   c1->cd(3);
0323   TH1F *twod1_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HF");
0324   TH1F *twod0_HF = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HF");
0325   //  twod1_HF->Sumw2();
0326   //  twod0_HF->Sumw2();
0327   TH1F *Ceff_HF = (TH1F *)twod1_HF->Clone("Ceff_HF");
0328   //  Ceff_HF->Sumw2();
0329   for (int x = 1; x <= twod1_HF->GetXaxis()->GetNbins(); x++) {
0330     twod1_HF->SetBinError(float(x), 0.001);
0331   }  //end x
0332   Ceff_HF->Divide(twod1_HF, twod0_HF, 1, 1, "B");
0333   gPad->SetGridy();
0334   gPad->SetGridx();
0335   Ceff_HF->SetMarkerStyle(20);
0336   Ceff_HF->SetMarkerSize(0.4);
0337   Ceff_HF->SetXTitle("Q, fc \b");
0338   Ceff_HF->SetYTitle("<timing>HF \b");
0339   Ceff_HF->SetMarkerColor(2);
0340   Ceff_HF->SetLineColor(2);
0341   Ceff_HF->SetMaximum(50.);
0342   Ceff_HF->SetMinimum(0.);
0343   Ceff_HF->Draw("E");
0344   //Ceff_HF->Draw("COLZ");
0345 
0346   c1->cd(4);
0347   TH1F *twod1_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear2023_HO");
0348   TH1F *twod0_HO = (TH1F *)dir->FindObjectAny("h1_TSnVsAyear20230_HO");
0349   // twod1_HO->Sumw2();
0350   //  twod0_HO->Sumw2();
0351   TH1F *Ceff_HO = (TH1F *)twod1_HO->Clone("Ceff_HO");
0352   //  Ceff_HO->Sumw2();
0353   for (int x = 1; x <= twod1_HO->GetXaxis()->GetNbins(); x++) {
0354     twod1_HO->SetBinError(float(x), 0.001);
0355   }  //end x
0356   Ceff_HO->Divide(twod1_HO, twod0_HO, 1, 1, "B");
0357   gPad->SetGridy();
0358   gPad->SetGridx();
0359   Ceff_HO->SetMarkerStyle(20);
0360   Ceff_HO->SetMarkerSize(0.4);
0361   Ceff_HO->SetXTitle("Q, fc \b");
0362   Ceff_HO->SetYTitle("<timing>HO \b");
0363   Ceff_HO->SetMarkerColor(2);
0364   Ceff_HO->SetLineColor(2);
0365   Ceff_HO->SetMaximum(150.);
0366   Ceff_HO->SetMinimum(70.);
0367   Ceff_HO->Draw("E");
0368   //Ceff_HO->Draw("COLZ");
0369 
0370   c1->Update();
0371 
0372   //========================================================================================== 4
0373   //======================================================================
0374   //======================================================================
0375   //================
0376   //======================================================================
0377   c1->Clear();
0378   c1->Divide(2, 2);
0379 
0380   c1->cd(1);
0381   TH2F *dva1_HBDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HB");
0382   TH2F *dva0_HBDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HB");
0383   //dva1_HBDepth1->Sumw2();
0384   //dva0_HBDepth1->Sumw2();
0385   TH2F *Seff_HBDepth1 = (TH2F *)dva1_HBDepth1->Clone("Seff_HBDepth1");
0386   Seff_HBDepth1->Divide(dva1_HBDepth1, dva0_HBDepth1, 25., 1., "B");
0387   gPad->SetGridy();
0388   gPad->SetGridx();
0389   //gPad->SetLogz();
0390   Seff_HBDepth1->SetMarkerStyle(20);
0391   Seff_HBDepth1->SetMarkerSize(0.4);
0392   Seff_HBDepth1->SetXTitle("#eta \b");
0393   Seff_HBDepth1->SetYTitle("#phi \b");
0394   Seff_HBDepth1->SetZTitle("<timing> HB Depth1 \b");
0395   Seff_HBDepth1->SetMarkerColor(2);
0396   Seff_HBDepth1->SetLineColor(2);
0397   Seff_HBDepth1->SetMaximum(90.);
0398   Seff_HBDepth1->SetMinimum(85.);
0399   Seff_HBDepth1->Draw("COLZ");
0400 
0401   c1->cd(2);
0402   TH2F *dva1_HBDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HB");
0403   TH2F *dva0_HBDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HB");
0404   //dva1_HBDepth2->Sumw2();
0405   //dva0_HBDepth2->Sumw2();
0406   TH2F *Seff_HBDepth2 = (TH2F *)dva1_HBDepth2->Clone("Seff_HBDepth2");
0407   Seff_HBDepth2->Divide(dva1_HBDepth2, dva0_HBDepth2, 25., 1., "B");
0408   gPad->SetGridy();
0409   gPad->SetGridx();
0410   //gPad->SetLogz();
0411   Seff_HBDepth2->SetMarkerStyle(20);
0412   Seff_HBDepth2->SetMarkerSize(0.4);
0413   Seff_HBDepth2->SetXTitle("#eta \b");
0414   Seff_HBDepth2->SetYTitle("#phi \b");
0415   Seff_HBDepth2->SetZTitle("<timing> HB Depth2 \b");
0416   Seff_HBDepth2->SetMarkerColor(2);
0417   Seff_HBDepth2->SetLineColor(2);
0418   Seff_HBDepth2->SetMaximum(90.);
0419   Seff_HBDepth2->SetMinimum(85.);
0420   Seff_HBDepth2->Draw("COLZ");
0421 
0422   c1->cd(3);
0423   TH2F *dva1_HBDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HB");
0424   TH2F *dva0_HBDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HB");
0425   //dva1_HBDepth3->Sumw2();
0426   //dva0_HBDepth3->Sumw2();
0427   TH2F *Seff_HBDepth3 = (TH2F *)dva1_HBDepth3->Clone("Seff_HBDepth3");
0428   Seff_HBDepth3->Divide(dva1_HBDepth3, dva0_HBDepth3, 25., 1., "B");
0429   gPad->SetGridy();
0430   gPad->SetGridx();
0431   //gPad->SetLogz();
0432   Seff_HBDepth3->SetMarkerStyle(20);
0433   Seff_HBDepth3->SetMarkerSize(0.4);
0434   Seff_HBDepth3->SetXTitle("#eta \b");
0435   Seff_HBDepth3->SetYTitle("#phi \b");
0436   Seff_HBDepth3->SetZTitle("<timing> HB Depth3 \b");
0437   Seff_HBDepth3->SetMarkerColor(2);
0438   Seff_HBDepth3->SetLineColor(2);
0439   Seff_HBDepth3->SetMaximum(90.);
0440   Seff_HBDepth3->SetMinimum(85.);
0441   Seff_HBDepth3->Draw("COLZ");
0442 
0443   c1->cd(4);
0444   TH2F *dva1_HBDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HB");
0445   TH2F *dva0_HBDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HB");
0446   //dva1_HBDepth4->Sumw2();
0447   //dva0_HBDepth4->Sumw2();
0448   TH2F *Seff_HBDepth4 = (TH2F *)dva1_HBDepth4->Clone("Seff_HBDepth4");
0449   Seff_HBDepth4->Divide(dva1_HBDepth4, dva0_HBDepth4, 25., 1., "B");
0450   gPad->SetGridy();
0451   gPad->SetGridx();
0452   //gPad->SetLogz();
0453   Seff_HBDepth4->SetMarkerStyle(20);
0454   Seff_HBDepth4->SetMarkerSize(0.4);
0455   Seff_HBDepth4->SetXTitle("#eta \b");
0456   Seff_HBDepth4->SetYTitle("#phi \b");
0457   Seff_HBDepth4->SetZTitle("<timing> HB Depth4 \b");
0458   Seff_HBDepth4->SetMarkerColor(2);
0459   Seff_HBDepth4->SetLineColor(2);
0460   Seff_HBDepth4->SetMaximum(90.);
0461   Seff_HBDepth4->SetMinimum(85.);
0462   Seff_HBDepth4->Draw("COLZ");
0463 
0464   c1->Update();
0465 
0466   //========================================================================================== 5
0467   //======================================================================
0468   //======================================================================
0469   //================
0470   //======================================================================
0471   c1->Clear();
0472   c1->Divide(2, 4);
0473 
0474   c1->cd(1);
0475   TH2F *dva1_HEDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HE");
0476   TH2F *dva0_HEDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HE");
0477   //dva1_HEDepth1->Sumw2();
0478   //dva0_HEDepth1->Sumw2();
0479   TH2F *Seff_HEDepth1 = (TH2F *)dva1_HEDepth1->Clone("Seff_HEDepth1");
0480   Seff_HEDepth1->Divide(dva1_HEDepth1, dva0_HEDepth1, 25., 1., "B");
0481   gPad->SetGridy();
0482   gPad->SetGridx();
0483   //gPad->SetLogz();
0484   Seff_HEDepth1->SetMarkerStyle(20);
0485   Seff_HEDepth1->SetMarkerSize(0.4);
0486   Seff_HEDepth1->SetXTitle("#eta \b");
0487   Seff_HEDepth1->SetYTitle("#phi \b");
0488   Seff_HEDepth1->SetZTitle("<timing> HE Depth1 \b");
0489   Seff_HEDepth1->SetMarkerColor(2);
0490   Seff_HEDepth1->SetLineColor(2);
0491   Seff_HEDepth1->SetMaximum(90.);
0492   Seff_HEDepth1->SetMinimum(85.);
0493   Seff_HEDepth1->Draw("COLZ");
0494 
0495   c1->cd(2);
0496   TH2F *dva1_HEDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HE");
0497   TH2F *dva0_HEDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HE");
0498   //dva1_HEDepth2->Sumw2();
0499   //dva0_HEDepth2->Sumw2();
0500   TH2F *Seff_HEDepth2 = (TH2F *)dva1_HEDepth2->Clone("Seff_HEDepth2");
0501   Seff_HEDepth2->Divide(dva1_HEDepth2, dva0_HEDepth2, 25., 1., "B");
0502   gPad->SetGridy();
0503   gPad->SetGridx();
0504   //gPad->SetLogz();
0505   Seff_HEDepth2->SetMarkerStyle(20);
0506   Seff_HEDepth2->SetMarkerSize(0.4);
0507   Seff_HEDepth2->SetXTitle("#eta \b");
0508   Seff_HEDepth2->SetYTitle("#phi \b");
0509   Seff_HEDepth2->SetZTitle("<timing> HE Depth2 \b");
0510   Seff_HEDepth2->SetMarkerColor(2);
0511   Seff_HEDepth2->SetLineColor(2);
0512   Seff_HEDepth2->SetMaximum(90.);
0513   Seff_HEDepth2->SetMinimum(85.);
0514   Seff_HEDepth2->Draw("COLZ");
0515 
0516   c1->cd(3);
0517   TH2F *dva1_HEDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HE");
0518   TH2F *dva0_HEDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HE");
0519   //dva1_HEDepth3->Sumw2();
0520   //dva0_HEDepth3->Sumw2();
0521   TH2F *Seff_HEDepth3 = (TH2F *)dva1_HEDepth3->Clone("Seff_HEDepth3");
0522   Seff_HEDepth3->Divide(dva1_HEDepth3, dva0_HEDepth3, 25., 1., "B");
0523   gPad->SetGridy();
0524   gPad->SetGridx();
0525   //gPad->SetLogz();
0526   Seff_HEDepth3->SetMarkerStyle(20);
0527   Seff_HEDepth3->SetMarkerSize(0.4);
0528   Seff_HEDepth3->SetXTitle("#eta \b");
0529   Seff_HEDepth3->SetYTitle("#phi \b");
0530   Seff_HEDepth3->SetZTitle("<timing> HE Depth3 \b");
0531   Seff_HEDepth3->SetMarkerColor(2);
0532   Seff_HEDepth3->SetLineColor(2);
0533   Seff_HEDepth3->SetMaximum(90.);
0534   Seff_HEDepth3->SetMinimum(85.);
0535   Seff_HEDepth3->Draw("COLZ");
0536 
0537   c1->cd(4);
0538   TH2F *dva1_HEDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HE");
0539   TH2F *dva0_HEDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HE");
0540   //dva1_HEDepth4->Sumw2();
0541   //dva0_HEDepth4->Sumw2();
0542   TH2F *Seff_HEDepth4 = (TH2F *)dva1_HEDepth4->Clone("Seff_HEDepth4");
0543   Seff_HEDepth4->Divide(dva1_HEDepth4, dva0_HEDepth4, 25., 1., "B");
0544   gPad->SetGridy();
0545   gPad->SetGridx();
0546   //gPad->SetLogz();
0547   Seff_HEDepth4->SetMarkerStyle(20);
0548   Seff_HEDepth4->SetMarkerSize(0.4);
0549   Seff_HEDepth4->SetXTitle("#eta \b");
0550   Seff_HEDepth4->SetYTitle("#phi \b");
0551   Seff_HEDepth4->SetZTitle("<timing> HE Depth4 \b");
0552   Seff_HEDepth4->SetMarkerColor(2);
0553   Seff_HEDepth4->SetLineColor(2);
0554   Seff_HEDepth4->SetMaximum(90.);
0555   Seff_HEDepth4->SetMinimum(85.);
0556   Seff_HEDepth4->Draw("COLZ");
0557 
0558   c1->cd(5);
0559   TH2F *dva1_HEDepth5 = (TH2F *)dir->FindObjectAny("h_mapDepth5TSmeanA_HE");
0560   TH2F *dva0_HEDepth5 = (TH2F *)dir->FindObjectAny("h_mapDepth5_HE");
0561   //dva1_HEDepth5->Sumw2();
0562   //dva0_HEDepth5->Sumw2();
0563   TH2F *Seff_HEDepth5 = (TH2F *)dva1_HEDepth5->Clone("Seff_HEDepth5");
0564   Seff_HEDepth5->Divide(dva1_HEDepth5, dva0_HEDepth5, 25., 1., "B");
0565   gPad->SetGridy();
0566   gPad->SetGridx();
0567   //gPad->SetLogz();
0568   Seff_HEDepth5->SetMarkerStyle(20);
0569   Seff_HEDepth5->SetMarkerSize(0.4);
0570   Seff_HEDepth5->SetXTitle("#eta \b");
0571   Seff_HEDepth5->SetYTitle("#phi \b");
0572   Seff_HEDepth5->SetZTitle("<timing> HE Depth5 \b");
0573   Seff_HEDepth5->SetMarkerColor(2);
0574   Seff_HEDepth5->SetLineColor(2);
0575   Seff_HEDepth5->SetMaximum(90.);
0576   Seff_HEDepth5->SetMinimum(85.);
0577   Seff_HEDepth5->Draw("COLZ");
0578 
0579   c1->cd(6);
0580   TH2F *dva1_HEDepth6 = (TH2F *)dir->FindObjectAny("h_mapDepth6TSmeanA_HE");
0581   TH2F *dva0_HEDepth6 = (TH2F *)dir->FindObjectAny("h_mapDepth6_HE");
0582   //dva1_HEDepth6->Sumw2();
0583   //dva0_HEDepth6->Sumw2();
0584   TH2F *Seff_HEDepth6 = (TH2F *)dva1_HEDepth6->Clone("Seff_HEDepth6");
0585   Seff_HEDepth6->Divide(dva1_HEDepth6, dva0_HEDepth6, 25., 1., "B");
0586   gPad->SetGridy();
0587   gPad->SetGridx();
0588   //gPad->SetLogz();
0589   Seff_HEDepth6->SetMarkerStyle(20);
0590   Seff_HEDepth6->SetMarkerSize(0.4);
0591   Seff_HEDepth6->SetXTitle("#eta \b");
0592   Seff_HEDepth6->SetYTitle("#phi \b");
0593   Seff_HEDepth6->SetZTitle("<timing> HE Depth6 \b");
0594   Seff_HEDepth6->SetMarkerColor(2);
0595   Seff_HEDepth6->SetLineColor(2);
0596   Seff_HEDepth6->SetMaximum(90.);
0597   Seff_HEDepth6->SetMinimum(85.);
0598   Seff_HEDepth6->Draw("COLZ");
0599 
0600   c1->cd(7);
0601   TH2F *dva1_HEDepth7 = (TH2F *)dir->FindObjectAny("h_mapDepth7TSmeanA_HE");
0602   TH2F *dva0_HEDepth7 = (TH2F *)dir->FindObjectAny("h_mapDepth7_HE");
0603   //dva1_HEDepth7->Sumw2();
0604   //dva0_HEDepth7->Sumw2();
0605   TH2F *Seff_HEDepth7 = (TH2F *)dva1_HEDepth7->Clone("Seff_HEDepth7");
0606   Seff_HEDepth7->Divide(dva1_HEDepth7, dva0_HEDepth7, 25., 1., "B");
0607   gPad->SetGridy();
0608   gPad->SetGridx();
0609   //gPad->SetLogz();
0610   Seff_HEDepth7->SetMarkerStyle(20);
0611   Seff_HEDepth7->SetMarkerSize(0.4);
0612   Seff_HEDepth7->SetXTitle("#eta \b");
0613   Seff_HEDepth7->SetYTitle("#phi \b");
0614   Seff_HEDepth7->SetZTitle("<timing> HE Depth7 \b");
0615   Seff_HEDepth7->SetMarkerColor(2);
0616   Seff_HEDepth7->SetLineColor(2);
0617   Seff_HEDepth7->SetMaximum(90.);
0618   Seff_HEDepth7->SetMinimum(85.);
0619   Seff_HEDepth7->Draw("COLZ");
0620 
0621   c1->Update();
0622 
0623   //========================================================================================== 6
0624   //======================================================================
0625   //======================================================================
0626   //================
0627   //======================================================================
0628   c1->Clear();
0629   c1->Divide(2, 2);
0630 
0631   c1->cd(1);
0632   TH2F *dva1_HFDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1TSmeanA_HF");
0633   TH2F *dva0_HFDepth1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HF");
0634   //dva1_HFDepth1->Sumw2();
0635   //dva0_HFDepth1->Sumw2();
0636   TH2F *Seff_HFDepth1 = (TH2F *)dva1_HFDepth1->Clone("Seff_HFDepth1");
0637   Seff_HFDepth1->Divide(dva1_HFDepth1, dva0_HFDepth1, 25., 1., "B");
0638   gPad->SetGridy();
0639   gPad->SetGridx();
0640   //gPad->SetLogz();
0641   Seff_HFDepth1->SetMarkerStyle(20);
0642   Seff_HFDepth1->SetMarkerSize(0.4);
0643   Seff_HFDepth1->SetXTitle("#eta \b");
0644   Seff_HFDepth1->SetYTitle("#phi \b");
0645   Seff_HFDepth1->SetZTitle("<timing> HF Depth1 \b");
0646   Seff_HFDepth1->SetMarkerColor(2);
0647   Seff_HFDepth1->SetLineColor(2);
0648   Seff_HFDepth1->SetMaximum(27.);
0649   Seff_HFDepth1->SetMinimum(23.);
0650   Seff_HFDepth1->Draw("COLZ");
0651 
0652   c1->cd(2);
0653   TH2F *dva1_HFDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2TSmeanA_HF");
0654   TH2F *dva0_HFDepth2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HF");
0655   //dva1_HFDepth2->Sumw2();
0656   //dva0_HFDepth2->Sumw2();
0657   TH2F *Seff_HFDepth2 = (TH2F *)dva1_HFDepth2->Clone("Seff_HFDepth2");
0658   Seff_HFDepth2->Divide(dva1_HFDepth2, dva0_HFDepth2, 25., 1., "B");
0659   gPad->SetGridy();
0660   gPad->SetGridx();
0661   //gPad->SetLogz();
0662   Seff_HFDepth2->SetMarkerStyle(20);
0663   Seff_HFDepth2->SetMarkerSize(0.4);
0664   Seff_HFDepth2->SetXTitle("#eta \b");
0665   Seff_HFDepth2->SetYTitle("#phi \b");
0666   Seff_HFDepth2->SetZTitle("<timing> HF Depth2 \b");
0667   Seff_HFDepth2->SetMarkerColor(2);
0668   Seff_HFDepth2->SetLineColor(2);
0669   Seff_HFDepth2->SetMaximum(27.);
0670   Seff_HFDepth2->SetMinimum(23.);
0671   Seff_HFDepth2->Draw("COLZ");
0672 
0673   c1->cd(3);
0674   TH2F *dva1_HFDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3TSmeanA_HF");
0675   TH2F *dva0_HFDepth3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HF");
0676   //dva1_HFDepth3->Sumw2();
0677   //dva0_HFDepth3->Sumw2();
0678   TH2F *Seff_HFDepth3 = (TH2F *)dva1_HFDepth3->Clone("Seff_HFDepth3");
0679   Seff_HFDepth3->Divide(dva1_HFDepth3, dva0_HFDepth3, 25., 1., "B");
0680   gPad->SetGridy();
0681   gPad->SetGridx();
0682   //gPad->SetLogz();
0683   Seff_HFDepth3->SetMarkerStyle(20);
0684   Seff_HFDepth3->SetMarkerSize(0.4);
0685   Seff_HFDepth3->SetXTitle("#eta \b");
0686   Seff_HFDepth3->SetYTitle("#phi \b");
0687   Seff_HFDepth3->SetZTitle("<timing> HF Depth3 \b");
0688   Seff_HFDepth3->SetMarkerColor(2);
0689   Seff_HFDepth3->SetLineColor(2);
0690   Seff_HFDepth3->SetMaximum(27.);
0691   Seff_HFDepth3->SetMinimum(23.);
0692   Seff_HFDepth3->Draw("COLZ");
0693 
0694   c1->cd(4);
0695   TH2F *dva1_HFDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HF");
0696   TH2F *dva0_HFDepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HF");
0697   //dva1_HFDepth4->Sumw2();
0698   //dva0_HFDepth4->Sumw2();
0699   TH2F *Seff_HFDepth4 = (TH2F *)dva1_HFDepth4->Clone("Seff_HFDepth4");
0700   Seff_HFDepth4->Divide(dva1_HFDepth4, dva0_HFDepth4, 25., 1., "B");
0701   gPad->SetGridy();
0702   gPad->SetGridx();
0703   //gPad->SetLogz();
0704   Seff_HFDepth4->SetMarkerStyle(20);
0705   Seff_HFDepth4->SetMarkerSize(0.4);
0706   Seff_HFDepth4->SetXTitle("#eta \b");
0707   Seff_HFDepth4->SetYTitle("#phi \b");
0708   Seff_HFDepth4->SetZTitle("<timing> HF Depth4 \b");
0709   Seff_HFDepth4->SetMarkerColor(2);
0710   Seff_HFDepth4->SetLineColor(2);
0711   Seff_HFDepth4->SetMaximum(27.);
0712   Seff_HFDepth4->SetMinimum(23.);
0713   Seff_HFDepth4->Draw("COLZ");
0714 
0715   c1->Update();
0716 
0717   //========================================================================================== 7
0718   //======================================================================
0719   //======================================================================
0720   //================
0721   //======================================================================
0722   c1->Clear();
0723   c1->Divide(1, 1);
0724 
0725   c1->cd(1);
0726   TH2F *dva1_HODepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4TSmeanA_HO");
0727   for (int i = 1; i <= dva1_HODepth4->GetXaxis()->GetNbins(); i++) {
0728     for (int j = 1; j <= dva1_HODepth4->GetYaxis()->GetNbins(); j++) {
0729       double ccc1 = dva1_HODepth4->GetBinContent(i, j);
0730       if (ccc1 > 0.)
0731         std::cout << "******    dva1_HODepth4   **************   i =  " << i << " j =  " << j << " ccc1 =  " << ccc1
0732                   << std::endl;
0733     }
0734   }
0735   TH2F *dva0_HODepth4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HO");
0736   for (int i = 1; i <= dva0_HODepth4->GetXaxis()->GetNbins(); i++) {
0737     for (int j = 1; j <= dva0_HODepth4->GetYaxis()->GetNbins(); j++) {
0738       double ccc1 = dva0_HODepth4->GetBinContent(i, j);
0739       if (ccc1 > 0.)
0740         std::cout << "******   dva0_HODepth4   **************   i =  " << i << " j =  " << j << " ccc1 =  " << ccc1
0741                   << std::endl;
0742     }
0743   }
0744   TH2F *Seff_HODepth4 = (TH2F *)dva1_HODepth4->Clone("Seff_HODepth4");
0745   Seff_HODepth4->Divide(dva1_HODepth4, dva0_HODepth4, 25., 1., "B");
0746   for (int i = 1; i <= Seff_HODepth4->GetXaxis()->GetNbins(); i++) {
0747     for (int j = 1; j <= Seff_HODepth4->GetYaxis()->GetNbins(); j++) {
0748       double ccc1 = Seff_HODepth4->GetBinContent(i, j);
0749       if (ccc1 > 0.)
0750         std::cout << "******    Seff_HODepth4   **************   i =  " << i << " j =  " << j << " ccc1 =  " << ccc1
0751                   << std::endl;
0752     }
0753   }
0754   gPad->SetGridy();
0755   gPad->SetGridx();
0756   Seff_HODepth4->SetMarkerStyle(20);
0757   Seff_HODepth4->SetMarkerSize(0.4);
0758   Seff_HODepth4->SetXTitle("#eta \b");
0759   Seff_HODepth4->SetYTitle("#phi \b");
0760   Seff_HODepth4->SetZTitle("<timing> HB Depth1 \b");
0761   Seff_HODepth4->SetMarkerColor(2);
0762   Seff_HODepth4->SetLineColor(2);
0763   Seff_HODepth4->SetMaximum(115.);
0764   Seff_HODepth4->SetMinimum(110.);
0765   Seff_HODepth4->Draw("COLZ");
0766 
0767   c1->Update();
0768   //======================================================================
0769   //======================================================================================== end
0770   //======================================================================
0771   //======================================================================
0772   // close and delete all possible things:
0773 
0774   //   psfile->Close();
0775   psfile.Close();
0776 
0777   hfile1->Close();
0778   //    hfile1->Delete();
0779   hfile1->Close();
0780   //    hfile1->Delete();
0781 
0782   //  Exit Root
0783   gSystem->Exit(0);
0784   //======================================================================
0785 }