Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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("test.root", "READ");
0116   //
0117 
0118   //    TFile *hfile1= new TFile("testNZS.root", "READ");
0119   //    TFile *hfile1= new TFile("test.root", "READ");
0120 
0121   //    TFile *hfile1= new TFile("newruns/Global_234034.root", "READ");
0122   //
0123 
0124   //    TFile *hfile1= new TFile("/afs/cern.ch/cms/CAF/CMSALCA/ALCA_HCALCALIB/HCALMONITORING/CMTweb/histos/Global_234556.root", "READ");
0125   //    TFile *hfile1= new TFile("Global_234034.root", "READ");
0126   //    TFile *hfile1= new TFile("test211006.root", "READ");
0127   //    TFile *hfile1= new TFile("test234457.root", "READ");
0128 
0129   //    TFile *hfile1= new TFile("Global_51.root", "READ");
0130   //    TFile *hfile1= new TFile("Global_235698.root", "READ");
0131 
0132   //    TFile *hfile1= new TFile("Global_39.root", "READ");
0133   //    TFile *hfile1= new TFile("test237165.root", "READ");
0134   //
0135   //    TFile *hfile1= new TFile("Laser_238187.root", "READ");
0136   //    TFile *hfile1= new TFile("Laser_238183.root", "READ");
0137 
0138   //    TFile *hfile1= new TFile("Global_255031.root", "READ");
0139 
0140   //    TFile *hfile1= new TFile("Global_256001.root", "READ");
0141   //    TFile *hfile1= new TFile("Global_256167.root", "READ");
0142   //    TFile *hfile1= new TFile("Global_256348.root", "READ");
0143   //    TFile *hfile1= new TFile("Global_256630.root", "READ");
0144 
0145   //    TFile *hfile1= new TFile("../PYTHON_runlist_test/Global_283884_1.root", "READ");
0146   //        TFile *hfile1= new TFile("Global_test.root", "READ");
0147 
0148   //    TFile *hfile1= new TFile("LED_280702.root", "READ");
0149   //    TFile *hfile2= new TFile("LED_287824.root", "READ");
0150 
0151   //    TFile *hfile1= new TFile("LED_284352.root", "READ");
0152   //    TFile *hfile1= new TFile("LEDtest.root", "READ");
0153   //  TFile *hfile1 = new TFile("Global_346445.root", "READ");
0154 
0155   TFile *hfile1 = new TFile("Global_362365.root", "READ");
0156   //          TH1D *hist1(nullptr);
0157   //            hist1 = (TH1D *)dir->FindObjectAny("h_mapDepth1_HE");
0158 
0159   //    TFile *hfile2= new TFile("LED_284902.root", "READ");
0160   //    TFile *hfile2= new TFile("LED_284499.root", "READ");
0161   //    TFile *hfile2= new TFile("LED_284352.root", "READ");
0162 
0163   //    TFile *hfile2= new TFile("LED_286590.root", "READ");
0164 
0165   //    getchar();
0166   //
0167   TPostScript psfile("zamplpedcorr.ps", 111);
0168 
0169   //
0170 
0171   TCanvas *c1 = new TCanvas("c1", "Hcal4test", 200, 10, 700, 900);
0172 
0173   hfile1->ls();
0174   TDirectory *dir = (TDirectory *)hfile1->FindObjectAny(dirnm.c_str());
0175 
0176   //=============================================================================================== 1
0177   //======================================================================
0178   //======================================================================
0179   //================
0180   //======================================================================
0181   c1->Clear();
0182   c1->Divide(2, 2);
0183 
0184   c1->cd(1);
0185   TH1F *twod1 = (TH1F *)dir->FindObjectAny("h_pedvsampl_HB");
0186   TH1F *twod0 = (TH1F *)dir->FindObjectAny("h_pedvsampl0_HB");
0187   twod1->Sumw2();
0188   twod0->Sumw2();
0189   //      if(twod0->IsA()->InheritsFrom("TH1F")){
0190   TH1F *Cefz225 = (TH1F *)twod1->Clone("Cefz225");
0191   Cefz225->Divide(twod1, twod0, 1, 1, "B");
0192   Cefz225->Sumw2();
0193   //      }
0194   gPad->SetGridy();
0195   gPad->SetGridx();
0196   Cefz225->SetMarkerStyle(20);
0197   Cefz225->SetMarkerSize(0.4);
0198   Cefz225->SetXTitle("Pedestals \b");
0199   Cefz225->SetYTitle("<A> \b");
0200   Cefz225->SetMarkerColor(2);
0201   Cefz225->SetLineColor(2);
0202   //    Cefz225->SetMaximum(1.000);
0203   //    Cefz225->SetMinimum(0.0001);
0204   Cefz225->Draw("COLZ");
0205 
0206   c1->cd(2);
0207   TH1F *twod61 = (TH1F *)dir->FindObjectAny("h_pedwvsampl_HB");
0208   TH1F *twod60 = (TH1F *)dir->FindObjectAny("h_pedwvsampl0_HB");
0209   twod61->Sumw2();
0210   twod60->Sumw2();
0211   //      if(twod60->IsA()->InheritsFrom("TH1F")){
0212   TH1F *Cefz226 = (TH1F *)twod61->Clone("Cefz226");
0213   Cefz226->Divide(twod61, twod60, 1, 1, "B");
0214   Cefz226->Sumw2();
0215   //      }
0216   gPad->SetGridy();
0217   gPad->SetGridx();
0218   Cefz226->SetMarkerStyle(20);
0219   Cefz226->SetMarkerSize(0.4);
0220   Cefz226->SetXTitle("Width_Pedestals \b");
0221   Cefz226->SetYTitle("<A> \b");
0222   Cefz226->SetMarkerColor(2);
0223   Cefz226->SetLineColor(2);
0224   //    Cefz226->SetMaximum(1.000);
0225   //    Cefz226->SetMinimum(0.0001);
0226   Cefz226->Draw("COLZ");
0227 
0228   c1->cd(3);
0229   TH1F *twod71 = (TH1F *)dir->FindObjectAny("h_amplvsped_HB");
0230   TH1F *twod70 = (TH1F *)dir->FindObjectAny("h_amplvsped0_HB");
0231   twod71->Sumw2();
0232   twod70->Sumw2();
0233   //      if(twod70->IsA()->InheritsFrom("TH1F")){
0234   TH1F *Cefz227 = (TH1F *)twod71->Clone("Cefz227");
0235   Cefz227->Divide(twod71, twod70, 1, 1, "B");
0236   Cefz227->Sumw2();
0237   //      }
0238   gPad->SetGridy();
0239   gPad->SetGridx();
0240   Cefz227->SetMarkerStyle(20);
0241   Cefz227->SetMarkerSize(0.4);
0242   Cefz227->SetXTitle("Amplitude \b");
0243   Cefz227->SetYTitle("<Pedestals> \b");
0244   Cefz227->SetMarkerColor(2);
0245   Cefz227->SetLineColor(2);
0246   //    Cefz227->SetMaximum(1.000);
0247   //    Cefz227->SetMinimum(0.0001);
0248   Cefz227->Draw("COLZ");
0249 
0250   c1->cd(4);
0251   TH1F *twod81 = (TH1F *)dir->FindObjectAny("h_amplvspedw_HB");
0252   TH1F *twod80 = (TH1F *)dir->FindObjectAny("h_amplvsped0_HB");
0253   twod81->Sumw2();
0254   twod80->Sumw2();
0255   //      if(twod80->IsA()->InheritsFrom("TH1F")){
0256   TH1F *Cefz228 = (TH1F *)twod81->Clone("Cefz228");
0257   Cefz228->Divide(twod81, twod80, 1, 1, "B");
0258   Cefz228->Sumw2();
0259   //      }
0260   gPad->SetGridy();
0261   gPad->SetGridx();
0262   Cefz228->SetMarkerStyle(20);
0263   Cefz228->SetMarkerSize(0.4);
0264   Cefz228->SetXTitle("Amplitude \b");
0265   Cefz228->SetYTitle("<Width_Pedestals> \b");
0266   Cefz228->SetMarkerColor(2);
0267   Cefz228->SetLineColor(2);
0268   //    Cefz228->SetMaximum(1.000);
0269   //    Cefz228->SetMinimum(0.0001);
0270   Cefz228->Draw("COLZ");
0271 
0272   c1->Update();
0273 
0274   //========================================================================================= 2
0275   //======================================================================
0276   //======================================================================
0277   //================
0278   //======================================================================
0279   c1->Clear();
0280   c1->Divide(2, 2);
0281 
0282   c1->cd(1);
0283   TH2F *two11 = (TH2F *)dir->FindObjectAny("h2_pedvsampl_HB");
0284   gPad->SetGridy();
0285   gPad->SetGridx();
0286   two11->SetMarkerStyle(20);
0287   two11->SetMarkerSize(0.4);
0288   two11->SetXTitle("Pedestals HB \b");
0289   two11->SetYTitle("Amplitude HB\b");
0290   two11->SetMarkerColor(2);
0291   two11->SetLineColor(2);
0292   //         gPad->SetLogy();
0293   two11->Draw("COLZ");
0294 
0295   c1->cd(2);
0296   TH2F *two12 = (TH2F *)dir->FindObjectAny("h2_pedwvsampl_HB");
0297   gPad->SetGridy();
0298   gPad->SetGridx();
0299   two12->SetMarkerStyle(20);
0300   two12->SetMarkerSize(0.4);
0301   two12->SetXTitle("Width_Pedestals HB \b");
0302   two12->SetYTitle("Amplitude HB\b");
0303   two12->SetMarkerColor(2);
0304   two12->SetLineColor(2);
0305   //   gPad->SetLogy();
0306   two12->Draw("COLZ");
0307 
0308   c1->cd(3);
0309   TH2F *two22 = (TH2F *)dir->FindObjectAny("h2_amplvsped_HB");
0310   gPad->SetGridy();
0311   gPad->SetGridx();
0312   two22->SetMarkerStyle(20);
0313   two22->SetMarkerSize(0.4);
0314   two22->SetYTitle("Pedestals HB \b");
0315   two22->SetXTitle("Amplitude HB\b");
0316   two22->SetMarkerColor(2);
0317   two22->SetLineColor(2);
0318   two22->Draw("COLZ");
0319 
0320   c1->cd(4);
0321   TH2F *two23 = (TH2F *)dir->FindObjectAny("h2_amplvspedw_HB");
0322   gPad->SetGridy();
0323   gPad->SetGridx();
0324   two23->SetMarkerStyle(20);
0325   two23->SetMarkerSize(0.4);
0326   two23->SetYTitle("Width_Pedestals HB \b");
0327   two23->SetXTitle("Amplitude HB\b");
0328   two23->SetMarkerColor(2);
0329   two23->SetLineColor(2);
0330   two23->Draw("COLZ");
0331 
0332   c1->Update();
0333 
0334   //========================================================================================= 3
0335   //======================================================================
0336   //======================================================================
0337   //================
0338   //======================================================================
0339   c1->Clear();
0340   c1->Divide(2, 2);
0341 
0342   c1->cd(1);
0343   TH1F *aaaaaa1 = (TH1F *)dir->FindObjectAny("h_sumADCAmplLS1copy2");
0344   gPad->SetLogy();
0345   aaaaaa1->SetMarkerStyle(20);
0346   aaaaaa1->SetMarkerSize(0.8);
0347   aaaaaa1->GetYaxis()->SetLabelSize(0.04);
0348   aaaaaa1->SetXTitle("<A>(ev.in LS) in LSs & channels - HB depth1\b");
0349   aaaaaa1->SetMarkerColor(4);
0350   aaaaaa1->SetLineColor(0);
0351   aaaaaa1->Draw("Error");
0352 
0353   c1->cd(2);
0354   TH1F *aaaaaa2 = (TH1F *)dir->FindObjectAny("h_sumADCAmplLS1copy3");
0355   gPad->SetLogy();
0356   aaaaaa2->SetMarkerStyle(20);
0357   aaaaaa2->SetMarkerSize(0.8);
0358   aaaaaa2->GetYaxis()->SetLabelSize(0.04);
0359   aaaaaa2->SetXTitle("<A>(ev.in LS) in LSs & channels - HB depth1\b");
0360   aaaaaa2->SetMarkerColor(4);
0361   aaaaaa2->SetLineColor(0);
0362   aaaaaa2->Draw("Error");
0363 
0364   c1->cd(3);
0365   TH1F *aaaaaa3 = (TH1F *)dir->FindObjectAny("h_sumADCAmplLS1copy4");
0366   gPad->SetLogy();
0367   aaaaaa3->SetMarkerStyle(20);
0368   aaaaaa3->SetMarkerSize(0.8);
0369   aaaaaa3->GetYaxis()->SetLabelSize(0.04);
0370   aaaaaa3->SetXTitle("<A>(ev.in LS) in LSs & channels - HB depth1\b");
0371   aaaaaa3->SetMarkerColor(4);
0372   aaaaaa3->SetLineColor(0);
0373   aaaaaa3->Draw("Error");
0374   c1->cd(4);
0375   TH1F *aaaaaa4 = (TH1F *)dir->FindObjectAny("h_sumADCAmplLS1copy5");
0376   gPad->SetLogy();
0377   aaaaaa4->SetMarkerStyle(20);
0378   aaaaaa4->SetMarkerSize(0.8);
0379   aaaaaa4->GetYaxis()->SetLabelSize(0.04);
0380   aaaaaa4->SetXTitle("<A>(ev.in LS) in LSs & channels - HB depth1\b");
0381   aaaaaa4->SetMarkerColor(4);
0382   aaaaaa4->SetLineColor(0);
0383   aaaaaa4->Draw("Error");
0384 
0385   c1->Update();
0386 
0387   //=============================================================================================== 4
0388   //======================================================================
0389   //======================================================================
0390   //================
0391   //======================================================================
0392   c1->Clear();
0393   c1->Divide(2, 2);
0394   /*
0395       c1->cd(1);
0396       TH1F *twodhe1= (TH1F*)dir->FindObjectAny("h_pedvsampl_HE");
0397       TH1F *twodhe0= (TH1F*)dir->FindObjectAny("h_pedvsampl0_HE");
0398       twodhe1->Sumw2();
0399       twodhe0->Sumw2();
0400 //      if(twodhe0->IsA()->InheritsFrom("TH1F")){
0401     TH1F* Cefzhe225= (TH1F*)twodhe1->Clone("Cefzhe225");
0402     Cefzhe225->Divide(twodhe1,twodhe0, 1, 1, "B");
0403     Cefzhe225->Sumw2();
0404 //      }
0405       gPad->SetGridy();
0406       gPad->SetGridx();
0407       Cefzhe225->SetMarkerStyle(20);
0408       Cefzhe225->SetMarkerSize(0.4);
0409           Cefzhe225->SetXTitle("Pedestals \b");
0410           Cefzhe225->SetYTitle("<A> \b");
0411       Cefzhe225->SetMarkerColor(2);
0412       Cefzhe225->SetLineColor(2);
0413       //    Cefzhe225->SetMaximum(1.000);
0414       //    Cefzhe225->SetMinimum(0.0001);
0415       Cefzhe225->Draw("COLZ");
0416       
0417       c1->cd(2);
0418       TH1F *twodhe61= (TH1F*)dir->FindObjectAny("h_pedwvsampl_HE");
0419       TH1F *twodhe60= (TH1F*)dir->FindObjectAny("h_pedwvsampl0_HE");
0420       twodhe61->Sumw2();
0421       twodhe60->Sumw2();
0422 //      if(twodhe60->IsA()->InheritsFrom("TH1F")){
0423     TH1F* Cefzhe226= (TH1F*)twodhe61->Clone("Cefzhe226");
0424     Cefzhe226->Divide(twodhe61,twodhe60, 1, 1, "B");
0425     Cefzhe226->Sumw2();
0426 //      }
0427       gPad->SetGridy();
0428       gPad->SetGridx();
0429       Cefzhe226->SetMarkerStyle(20);
0430       Cefzhe226->SetMarkerSize(0.4);
0431           Cefzhe226->SetXTitle("Width_Pedestals \b");
0432           Cefzhe226->SetYTitle("<A> \b");
0433       Cefzhe226->SetMarkerColor(2);
0434       Cefzhe226->SetLineColor(2);
0435       //    Cefzhe226->SetMaximum(1.000);
0436       //    Cefzhe226->SetMinimum(0.0001);
0437       Cefzhe226->Draw("COLZ");
0438       
0439       c1->cd(3);
0440       TH1F *twodhe71= (TH1F*)dir->FindObjectAny("h_amplvsped_HE");
0441       TH1F *twodhe70= (TH1F*)dir->FindObjectAny("h_amplvsped0_HE");
0442       twodhe71->Sumw2();
0443       twodhe70->Sumw2();
0444 //      if(twodhe70->IsA()->InheritsFrom("TH1F")){
0445     TH1F* Cefzhe227= (TH1F*)twodhe71->Clone("Cefzhe227");
0446     Cefzhe227->Divide(twodhe71,twodhe70, 1, 1, "B");
0447     Cefzhe227->Sumw2();
0448 //      }
0449       gPad->SetGridy();
0450       gPad->SetGridx();
0451       Cefzhe227->SetMarkerStyle(20);
0452       Cefzhe227->SetMarkerSize(0.4);
0453           Cefzhe227->SetXTitle("Amplitude \b");
0454           Cefzhe227->SetYTitle("<Pedestals> \b");
0455       Cefzhe227->SetMarkerColor(2);
0456       Cefzhe227->SetLineColor(2);
0457       //    Cefzhe227->SetMaximum(1.000);
0458       //    Cefzhe227->SetMinimum(0.0001);
0459       Cefzhe227->Draw("COLZ");
0460       
0461       c1->cd(4);
0462       TH1F *twodhe81= (TH1F*)dir->FindObjectAny("h_amplvspedw_HE");
0463       TH1F *twodhe80= (TH1F*)dir->FindObjectAny("h_amplvsped0_HE");
0464       twodhe81->Sumw2();
0465       twodhe80->Sumw2();
0466 //      if(twodhe80->IsA()->InheritsFrom("TH1F")){
0467     TH1F* Cefzhe228= (TH1F*)twodhe81->Clone("Cefzhe228");
0468     Cefzhe228->Divide(twodhe81,twodhe80, 1, 1, "B");
0469     Cefzhe228->Sumw2();
0470 //      }
0471       gPad->SetGridy();
0472       gPad->SetGridx();
0473       Cefzhe228->SetMarkerStyle(20);
0474       Cefzhe228->SetMarkerSize(0.4);
0475           Cefzhe228->SetXTitle("Amplitude \b");
0476           Cefzhe228->SetYTitle("<Width_Pedestals> \b");
0477       Cefzhe228->SetMarkerColor(2);
0478       Cefzhe228->SetLineColor(2);
0479       //    Cefzhe228->SetMaximum(1.000);
0480       //    Cefzhe228->SetMinimum(0.0001);
0481       Cefzhe228->Draw("COLZ");
0482       
0483  */
0484   c1->Update();
0485 
0486   //=============================================================================================== 5
0487   //======================================================================
0488   //======================================================================
0489   //================
0490   //======================================================================
0491   c1->Clear();
0492   c1->Divide(2, 2);
0493   /*
0494       c1->cd(1);
0495       TH1F *twodhf1= (TH1F*)dir->FindObjectAny("h_pedvsampl_HF");
0496       TH1F *twodhf0= (TH1F*)dir->FindObjectAny("h_pedvsampl0_HF");
0497       twodhf1->Sumw2();
0498       twodhf0->Sumw2();
0499 //      if(twodhf0->IsA()->InheritsFrom("TH1F")){
0500     TH1F* Cefzhf225= (TH1F*)twodhf1->Clone("Cefzhf225");
0501     Cefzhf225->Divide(twodhf1,twodhf0, 1, 1, "B");
0502     Cefzhf225->Sumw2();
0503 //      }
0504       gPad->SetGridy();
0505       gPad->SetGridx();
0506       Cefzhf225->SetMarkerStyle(20);
0507       Cefzhf225->SetMarkerSize(0.4);
0508           Cefzhf225->SetXTitle("Pedestals \b");
0509           Cefzhf225->SetYTitle("<A> \b");
0510       Cefzhf225->SetMarkerColor(2);
0511       Cefzhf225->SetLineColor(2);
0512       //    Cefzhf225->SetMaximum(1.000);
0513       //    Cefzhf225->SetMinimum(0.0001);
0514       Cefzhf225->Draw("COLZ");
0515       
0516       c1->cd(2);
0517       TH1F *twodhf61= (TH1F*)dir->FindObjectAny("h_pedwvsampl_HF");
0518       TH1F *twodhf60= (TH1F*)dir->FindObjectAny("h_pedwvsampl0_HF");
0519       twodhf61->Sumw2();
0520       twodhf60->Sumw2();
0521 //      if(twodhf60->IsA()->InheritsFrom("TH1F")){
0522     TH1F* Cefzhf226= (TH1F*)twodhf61->Clone("Cefzhf226");
0523     Cefzhf226->Divide(twodhf61,twodhf60, 1, 1, "B");
0524     Cefzhf226->Sumw2();
0525 //      }
0526       gPad->SetGridy();
0527       gPad->SetGridx();
0528       Cefzhf226->SetMarkerStyle(20);
0529       Cefzhf226->SetMarkerSize(0.4);
0530           Cefzhf226->SetXTitle("Width_Pedestals \b");
0531           Cefzhf226->SetYTitle("<A> \b");
0532       Cefzhf226->SetMarkerColor(2);
0533       Cefzhf226->SetLineColor(2);
0534       //    Cefzhf226->SetMaximum(1.000);
0535       //    Cefzhf226->SetMinimum(0.0001);
0536       Cefzhf226->Draw("COLZ");
0537       
0538       c1->cd(3);
0539       TH1F *twodhf71= (TH1F*)dir->FindObjectAny("h_amplvsped_HF");
0540       TH1F *twodhf70= (TH1F*)dir->FindObjectAny("h_amplvsped0_HF");
0541       twodhf71->Sumw2();
0542       twodhf70->Sumw2();
0543 //      if(twodhf70->IsA()->InheritsFrom("TH1F")){
0544     TH1F* Cefzhf227= (TH1F*)twodhf71->Clone("Cefzhf227");
0545     Cefzhf227->Divide(twodhf71,twodhf70, 1, 1, "B");
0546     Cefzhf227->Sumw2();
0547 //      }
0548       gPad->SetGridy();
0549       gPad->SetGridx();
0550       Cefzhf227->SetMarkerStyle(20);
0551       Cefzhf227->SetMarkerSize(0.4);
0552           Cefzhf227->SetXTitle("Amplitude \b");
0553           Cefzhf227->SetYTitle("<Pedestals> \b");
0554       Cefzhf227->SetMarkerColor(2);
0555       Cefzhf227->SetLineColor(2);
0556       //    Cefzhf227->SetMaximum(1.000);
0557       //    Cefzhf227->SetMinimum(0.0001);
0558       Cefzhf227->Draw("COLZ");
0559       
0560       c1->cd(4);
0561       TH1F *twodhf81= (TH1F*)dir->FindObjectAny("h_amplvspedw_HF");
0562       TH1F *twodhf80= (TH1F*)dir->FindObjectAny("h_amplvsped0_HF");
0563       twodhf81->Sumw2();
0564       twodhf80->Sumw2();
0565 //      if(twodhf80->IsA()->InheritsFrom("TH1F")){
0566     TH1F* Cefzhf228= (TH1F*)twodhf81->Clone("Cefzhf228");
0567     Cefzhf228->Divide(twodhf81,twodhf80, 1, 1, "B");
0568     Cefzhf228->Sumw2();
0569 //      }
0570       gPad->SetGridy();
0571       gPad->SetGridx();
0572       Cefzhf228->SetMarkerStyle(20);
0573       Cefzhf228->SetMarkerSize(0.4);
0574           Cefzhf228->SetXTitle("Amplitude \b");
0575           Cefzhf228->SetYTitle("<Width_Pedestals> \b");
0576       Cefzhf228->SetMarkerColor(2);
0577       Cefzhf228->SetLineColor(2);
0578       //    Cefzhf228->SetMaximum(1.000);
0579       //    Cefzhf228->SetMinimum(0.0001);
0580       Cefzhf228->Draw("COLZ");
0581       
0582  */
0583 
0584   c1->Update();
0585 
0586   //=============================================================================================== 6
0587   //======================================================================
0588   //======================================================================
0589   //================
0590   //======================================================================
0591   c1->Clear();
0592   c1->Divide(2, 2);
0593   /*
0594       c1->cd(1);
0595       TH1F *twodho1= (TH1F*)dir->FindObjectAny("h_pedvsampl_HO");
0596       TH1F *twodho0= (TH1F*)dir->FindObjectAny("h_pedvsampl0_HO");
0597       twodho1->Sumw2();
0598       twodho0->Sumw2();
0599 //      if(twodho0->IsA()->InheritsFrom("TH1F")){
0600     TH1F* Cefzho225= (TH1F*)twodho1->Clone("Cefzho225");
0601     Cefzho225->Divide(twodho1,twodho0, 1, 1, "B");
0602     Cefzho225->Sumw2();
0603 //      }
0604       gPad->SetGridy();
0605       gPad->SetGridx();
0606       Cefzho225->SetMarkerStyle(20);
0607       Cefzho225->SetMarkerSize(0.4);
0608           Cefzho225->SetXTitle("Pedestals \b");
0609           Cefzho225->SetYTitle("<A> \b");
0610       Cefzho225->SetMarkerColor(2);
0611       Cefzho225->SetLineColor(2);
0612       //    Cefzho225->SetMaximum(1.000);
0613       //    Cefzho225->SetMinimum(0.0001);
0614       Cefzho225->Draw("COLZ");
0615       
0616       c1->cd(2);
0617       TH1F *twodho61= (TH1F*)dir->FindObjectAny("h_pedwvsampl_HO");
0618       TH1F *twodho60= (TH1F*)dir->FindObjectAny("h_pedwvsampl0_HO");
0619       twodho61->Sumw2();
0620       twodho60->Sumw2();
0621 //      if(twodho60->IsA()->InheritsFrom("TH1F")){
0622     TH1F* Cefzho226= (TH1F*)twodho61->Clone("Cefzho226");
0623     Cefzho226->Divide(twodho61,twodho60, 1, 1, "B");
0624     Cefzho226->Sumw2();
0625 //      }
0626       gPad->SetGridy();
0627       gPad->SetGridx();
0628       Cefzho226->SetMarkerStyle(20);
0629       Cefzho226->SetMarkerSize(0.4);
0630           Cefzho226->SetXTitle("Width_Pedestals \b");
0631           Cefzho226->SetYTitle("<A> \b");
0632       Cefzho226->SetMarkerColor(2);
0633       Cefzho226->SetLineColor(2);
0634       //    Cefzho226->SetMaximum(1.000);
0635       //    Cefzho226->SetMinimum(0.0001);
0636       Cefzho226->Draw("COLZ");
0637       
0638       c1->cd(3);
0639       TH1F *twodho71= (TH1F*)dir->FindObjectAny("h_amplvsped_HO");
0640       TH1F *twodho70= (TH1F*)dir->FindObjectAny("h_amplvsped0_HO");
0641       twodho71->Sumw2();
0642       twodho70->Sumw2();
0643 //      if(twodho70->IsA()->InheritsFrom("TH1F")){
0644     TH1F* Cefzho227= (TH1F*)twodho71->Clone("Cefzho227");
0645     Cefzho227->Divide(twodho71,twodho70, 1, 1, "B");
0646     Cefzho227->Sumw2();
0647 //      }
0648       gPad->SetGridy();
0649       gPad->SetGridx();
0650       Cefzho227->SetMarkerStyle(20);
0651       Cefzho227->SetMarkerSize(0.4);
0652           Cefzho227->SetXTitle("Amplitude \b");
0653           Cefzho227->SetYTitle("<Pedestals> \b");
0654       Cefzho227->SetMarkerColor(2);
0655       Cefzho227->SetLineColor(2);
0656       //    Cefzho227->SetMaximum(1.000);
0657       //    Cefzho227->SetMinimum(0.0001);
0658       Cefzho227->Draw("COLZ");
0659       
0660       c1->cd(4);
0661       TH1F *twodho81= (TH1F*)dir->FindObjectAny("h_amplvspedw_HO");
0662       TH1F *twodho80= (TH1F*)dir->FindObjectAny("h_amplvsped0_HO");
0663       twodho81->Sumw2();
0664       twodho80->Sumw2();
0665 //      if(twodho80->IsA()->InheritsFrom("TH1F")){
0666     TH1F* Cefzho228= (TH1F*)twodho81->Clone("Cefzho228");
0667     Cefzho228->Divide(twodho81,twodho80, 1, 1, "B");
0668     Cefzho228->Sumw2();
0669 //      }
0670       gPad->SetGridy();
0671       gPad->SetGridx();
0672       Cefzho228->SetMarkerStyle(20);
0673       Cefzho228->SetMarkerSize(0.4);
0674           Cefzho228->SetXTitle("Amplitude \b");
0675           Cefzho228->SetYTitle("<Width_Pedestals> \b");
0676       Cefzho228->SetMarkerColor(2);
0677       Cefzho228->SetLineColor(2);
0678       //    Cefzho228->SetMaximum(1.000);
0679       //    Cefzho228->SetMinimum(0.0001);
0680       Cefzho228->Draw("COLZ");
0681       
0682  */
0683 
0684   c1->Update();
0685 
0686   //======================================================================
0687   //======================================================================================== end
0688   //======================================================================
0689   //======================================================================
0690   // close and delete all possible things:
0691 
0692   //   psfile->Close();
0693   psfile.Close();
0694 
0695   hfile1->Close();
0696   //    hfile1->Delete();
0697   hfile1->Close();
0698   //    hfile1->Delete();
0699 
0700   //  Exit Root
0701   gSystem->Exit(0);
0702   //======================================================================
0703 }