Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:29

0001 #include "TFile.h"
0002 #include "TTree.h"
0003 #include "TText.h"
0004 
0005 void EcalRecHitsPlotCompare( TString currentfile = "EcalRecHitsValidation_new.root",
0006                              TString referencefile = "EcalRecHitsValidation_old.root")
0007 {
0008 
0009  gROOT ->Reset();
0010  char*  rfilename = referencefile;
0011  char*  sfilename = currentfile;
0012 
0013  int rcolor = 2;
0014  int scolor = 4;
0015 
0016  delete gROOT->GetListOfFiles()->FindObject(rfilename);
0017  delete gROOT->GetListOfFiles()->FindObject(sfilename);
0018 
0019  TText* te = new TText();
0020  te->SetTextSize(0.1);
0021  TFile * rfile = new TFile(rfilename);
0022  TFile * sfile = new TFile(sfilename);
0023 
0024  rfile->cd("DQMData/EcalRecHitsV/EcalRecHitsTask");
0025  gDirectory->ls();
0026 
0027  sfile->cd("DQMData/EcalRecHitsV/EcalRecHitsTask");
0028  gDirectory->ls();
0029 
0030  Char_t histo[200];
0031 
0032  gStyle->SetOptStat("n");
0033 
0034  gROOT->ProcessLine(".x HistoCompare.C");
0035  HistoCompare * myPV = new HistoCompare();
0036 
0037  //////////////////////////////////////////////////////////////
0038  
0039  // General class: Particle Gun 
0040  if (1) 
0041    {   
0042      TH1* meGunEnergy_;
0043      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Momentum;1",meGunEnergy_);
0044      meGunEnergy_;
0045      meGunEnergy_->SetLineColor(rcolor);
0046      
0047      TH1* meGunEta_;
0048      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Eta;1",meGunEta_);
0049      meGunEta_;
0050      meGunEta_->SetLineColor(rcolor);
0051      
0052      TH1* meGunPhi_; 
0053      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Phi;1",meGunPhi_);
0054      meGunPhi_; 
0055      meGunPhi_->SetLineColor(rcolor);
0056      
0057      TH1* newmeGunEnergy_;
0058      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Momentum;1",newmeGunEnergy_);
0059      newmeGunEnergy_;
0060      newmeGunEnergy_->SetLineColor(scolor);
0061      
0062      TH1* newmeGunEta_;
0063      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Eta;1",newmeGunEta_);
0064      newmeGunEta_;
0065      newmeGunEta_->SetLineColor(scolor);
0066      
0067      TH1* newmeGunPhi_; 
0068      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Phi;1",newmeGunPhi_);
0069      newmeGunPhi_; 
0070      newmeGunPhi_->SetLineColor(scolor);
0071      
0072     
0073      // --------------------------------
0074      TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0075      Ecal->Divide(1,3);
0076      
0077      Ecal->cd(1); 
0078      if ( meGunEnergy_ && newmeGunEnergy_ ) {
0079        meGunEnergy_->Draw(); 
0080        newmeGunEnergy_->Draw("same"); 
0081        myPV->PVCompute( meGunEnergy_ , newmeGunEnergy_ , te );
0082      }
0083 
0084      Ecal->cd(2); 
0085      if ( meGunEta_ && newmeGunEta_ ) {
0086        meGunEta_->Draw(); 
0087        newmeGunEta_->Draw("same"); 
0088        myPV->PVCompute( meGunEta_ , newmeGunEta_ , te );
0089      }
0090 
0091      Ecal->cd(3); 
0092      if ( meGunPhi_ && newmeGunPhi_ ) {
0093        meGunPhi_->Draw(); 
0094        newmeGunPhi_->Draw("same"); 
0095        myPV->PVCompute( meGunPhi_ , newmeGunPhi_ , te );
0096      }
0097 
0098      Ecal->Print("ParticleGun_compare.eps"); 
0099      delete Ecal;
0100    }
0101  
0102 
0103 
0104  // General class: sim/rec hit ratios
0105  if (1) 
0106    {
0107      TH1 *meEBRecHitSimHitRatio_;
0108      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Barrel RecSimHit Ratio;1",meEBRecHitSimHitRatio_);
0109      meEBRecHitSimHitRatio_;
0110      meEBRecHitSimHitRatio_->SetLineColor(rcolor);
0111      
0112      TH1 *meEERecHitSimHitRatio_;
0113      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Endcap RecSimHit Ratio;1",meEERecHitSimHitRatio_);
0114      meEERecHitSimHitRatio_;
0115      meEERecHitSimHitRatio_->SetLineColor(rcolor);
0116      
0117      TH1 *meESRecHitSimHitRatio_;
0118      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Preshower RecSimHit Ratio;1",meESRecHitSimHitRatio_);
0119      meESRecHitSimHitRatio_;
0120      meESRecHitSimHitRatio_->SetLineColor(rcolor);
0121 
0122      TH1 *newmeEBRecHitSimHitRatio_;
0123      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Barrel RecSimHit Ratio;1",newmeEBRecHitSimHitRatio_);
0124      newmeEBRecHitSimHitRatio_;
0125      newmeEBRecHitSimHitRatio_->SetLineColor(scolor);
0126      
0127      TH1 *newmeEERecHitSimHitRatio_;
0128      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Endcap RecSimHit Ratio;1",newmeEERecHitSimHitRatio_);
0129      newmeEERecHitSimHitRatio_;
0130      newmeEERecHitSimHitRatio_->SetLineColor(scolor);
0131      
0132      TH1 *newmeESRecHitSimHitRatio_;
0133      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Preshower RecSimHit Ratio;1",newmeESRecHitSimHitRatio_);
0134      newmeESRecHitSimHitRatio_;
0135      newmeESRecHitSimHitRatio_->SetLineColor(scolor);
0136 
0137      TH1 *meEBRecHitSimHitRatioGt35_;
0138      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Barrel RecSimHit Ratio gt 3p5 GeV;1",meEBRecHitSimHitRatioGt35_);
0139      meEBRecHitSimHitRatioGt35_;
0140      meEBRecHitSimHitRatioGt35_->SetLineColor(rcolor);
0141      
0142      TH1 *meEERecHitSimHitRatioGt35_;
0143      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Endcap RecSimHit Ratio gt 3p5 GeV;1",meEERecHitSimHitRatioGt35_);
0144      meEERecHitSimHitRatioGt35_;
0145      meEERecHitSimHitRatioGt35_->SetLineColor(rcolor);
0146      
0147      TH1 *newmeEBRecHitSimHitRatioGt35_;
0148      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Barrel RecSimHit Ratio gt 3p5 GeV;1",newmeEBRecHitSimHitRatioGt35_);
0149      newmeEBRecHitSimHitRatioGt35_;
0150      newmeEBRecHitSimHitRatioGt35_->SetLineColor(scolor);
0151      
0152      TH1 *newmeEERecHitSimHitRatioGt35_;
0153      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Endcap RecSimHit Ratio gt 3p5 GeV;1",newmeEERecHitSimHitRatioGt35_);
0154      newmeEERecHitSimHitRatioGt35_;
0155      newmeEERecHitSimHitRatioGt35_->SetLineColor(scolor);
0156      
0157 
0158      // --------------------------------
0159      TCanvas *BarrelSimRec = new TCanvas("BarrelSimRec","BarrelSimRec",800,800);
0160      if ( meEBRecHitSimHitRatio_ && newmeEBRecHitSimHitRatio_ ) {
0161        meEBRecHitSimHitRatio_->Draw();
0162        newmeEBRecHitSimHitRatio_->Draw("same");
0163        myPV->PVCompute( meEBRecHitSimHitRatio_ , newmeEBRecHitSimHitRatio_ , te );       
0164      }
0165      BarrelSimRec->Print("Barrel_SimRecHitsRatio_compare.eps");
0166      delete BarrelSimRec;
0167 
0168 
0169      TCanvas *EndcapSimRec = new TCanvas("EndcapSimRec","EndcapSimRec",800,800);
0170      if ( meEERecHitSimHitRatio_ && newmeEERecHitSimHitRatio_ ) {
0171        meEERecHitSimHitRatio_->Draw();
0172        newmeEERecHitSimHitRatio_->Draw("same");
0173        myPV->PVCompute( meEERecHitSimHitRatio_ , newmeEERecHitSimHitRatio_ , te );       
0174      }
0175      EndcapSimRec->Print("Endcap_SimRecHitsRatio_compare.eps");
0176      delete EndcapSimRec;
0177 
0178 
0179      TCanvas *PreshowerSimRec = new TCanvas("PreshowerSimRec","PreshowerSimRec",800,800);
0180      if ( meESRecHitSimHitRatio_ && newmeESRecHitSimHitRatio_ ) {
0181        meESRecHitSimHitRatio_->Draw();
0182        newmeESRecHitSimHitRatio_->Draw("same");
0183        myPV->PVCompute( meESRecHitSimHitRatio_ , newmeESRecHitSimHitRatio_ , te );       
0184      }
0185      PreshowerSimRec->Print("Preshower_SimRecHitsRatio_compare.eps");
0186      delete PreshowerSimRec;
0187 
0188 
0189      TCanvas *BarrelSimRecGt35 = new TCanvas("BarrelSimRecGt35","BarrelSimRecGt35",800,800);
0190      if ( meEBRecHitSimHitRatioGt35_ && newmeEBRecHitSimHitRatioGt35_ ) {
0191        meEBRecHitSimHitRatioGt35_   ->Draw();
0192        newmeEBRecHitSimHitRatioGt35_->Draw("same");
0193        myPV->PVCompute( meEBRecHitSimHitRatioGt35_ , newmeEBRecHitSimHitRatioGt35_ , te );       
0194      }
0195      BarrelSimRecGt35->Print("Barrel_SimRecHitsRatioGt35_compare.eps");
0196      delete BarrelSimRecGt35;
0197 
0198 
0199      TCanvas *EndcapSimRecGt35 = new TCanvas("EndcapSimRecGt35","EndcapSimRecGt35",800,800);
0200      if ( meEERecHitSimHitRatioGt35_ && newmeEERecHitSimHitRatioGt35_ ) {
0201        meEERecHitSimHitRatioGt35_   ->Draw();
0202        newmeEERecHitSimHitRatioGt35_->Draw("same");
0203        myPV->PVCompute( meEERecHitSimHitRatioGt35_ , newmeEERecHitSimHitRatioGt35_ , te );       
0204      }
0205      EndcapSimRecGt35->Print("Endcap_SimRecHitsRatioGt35_compare.eps");
0206      delete EndcapSimRecGt35;
0207    }
0208 
0209 
0210 
0211  
0212 
0213 
0214 
0215 
0216  // ---------------------------------------------------------------------------------
0217  cout << endl;
0218  cout << "Barrel validation" << endl;
0219  rfile->cd("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask");
0220  gDirectory->ls();
0221  sfile->cd("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask");
0222  gDirectory->ls();
0223  
0224  
0225  // Barrel validation
0226  if (1) 
0227    {    
0228      TH2 *meEBUncalibRecHitsOccupancy_;
0229      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Occupancy;1",meEBUncalibRecHitsOccupancy_);
0230      meEBUncalibRecHitsOccupancy_;
0231       
0232      TH1 *meEBUncalibRecHitsAmplitude_;
0233      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude;1",meEBUncalibRecHitsAmplitude_);
0234      meEBUncalibRecHitsAmplitude_;
0235      meEBUncalibRecHitsAmplitude_->SetLineColor(rcolor);
0236       
0237      TH1 *meEBUncalibRecHitsPedestal_;
0238      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal;1",meEBUncalibRecHitsPedestal_);
0239      meEBUncalibRecHitsPedestal_;
0240      meEBUncalibRecHitsPedestal_->SetLineColor(rcolor);
0241      
0242      TH1 *meEBUncalibRecHitsJitter_;
0243      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter;1",meEBUncalibRecHitsJitter_);
0244      meEBUncalibRecHitsJitter_;
0245      meEBUncalibRecHitsJitter_->SetLineColor(rcolor);
0246      
0247      TH1 *meEBUncalibRecHitsChi2_;
0248      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2;1",meEBUncalibRecHitsChi2_);
0249      meEBUncalibRecHitsChi2_;
0250      meEBUncalibRecHitsChi2_->SetLineColor(rcolor);
0251 
0252      TH1 *meEBUncalibRecHitMaxSampleRatio_;
0253      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio;1",meEBUncalibRecHitMaxSampleRatio_);
0254      meEBUncalibRecHitMaxSampleRatio_;
0255      meEBUncalibRecHitMaxSampleRatio_->SetLineColor(rcolor);
0256 
0257      TH2 *meEBUncalibRecHitsOccupancyGt100adc_;
0258      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Occupancy gt 100 adc counts;1",meEBUncalibRecHitsOccupancyGt100adc_);
0259      meEBUncalibRecHitsOccupancyGt100adc_;
0260       
0261      TH1 *meEBUncalibRecHitsAmplitudeGt100adc_;
0262      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude gt 100 adc counts;1",meEBUncalibRecHitsAmplitudeGt100adc_);
0263      meEBUncalibRecHitsAmplitudeGt100adc_;
0264      meEBUncalibRecHitsAmplitudeGt100adc_->SetLineColor(rcolor);
0265       
0266      TH1 *meEBUncalibRecHitsPedestalGt100adc_;
0267      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal gt 100 adc counts;1",meEBUncalibRecHitsPedestalGt100adc_);
0268      meEBUncalibRecHitsPedestalGt100adc_;
0269      meEBUncalibRecHitsPedestalGt100adc_->SetLineColor(rcolor);
0270      
0271      TH1 *meEBUncalibRecHitsJitterGt100adc_;
0272      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter gt 100 adc counts;1",meEBUncalibRecHitsJitterGt100adc_);
0273      meEBUncalibRecHitsJitterGt100adc_;
0274      meEBUncalibRecHitsJitterGt100adc_->SetLineColor(rcolor);
0275      
0276      TH1 *meEBUncalibRecHitsChi2Gt100adc_;
0277      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2 gt 100 adc counts;1",meEBUncalibRecHitsChi2Gt100adc_);
0278      meEBUncalibRecHitsChi2Gt100adc_;
0279      meEBUncalibRecHitsChi2Gt100adc_->SetLineColor(rcolor);
0280 
0281      TH1 *meEBUncalibRecHitMaxSampleRatioGt100adc_;
0282      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio gt 100 adc counts;1",meEBUncalibRecHitMaxSampleRatioGt100adc_);
0283      meEBUncalibRecHitMaxSampleRatioGt100adc_;
0284      meEBUncalibRecHitMaxSampleRatioGt100adc_->SetLineColor(rcolor);
0285 
0286      TProfile2D *meEBUncalibRecHitsAmpFullMap_;
0287      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude Full Map;1",meEBUncalibRecHitsAmpFullMap_);
0288      meEBUncalibRecHitsAmpFullMap_;
0289 
0290      TProfile2D *meEBUncalibRecHitsPedFullMap_;
0291      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal Full Map;1",meEBUncalibRecHitsPedFullMap_);
0292      meEBUncalibRecHitsPedFullMap_;
0293 
0294      TH2 *newmeEBUncalibRecHitsOccupancy_;
0295      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Occupancy;1",newmeEBUncalibRecHitsOccupancy_);
0296      newmeEBUncalibRecHitsOccupancy_;
0297       
0298      TH1 *newmeEBUncalibRecHitsAmplitude_;
0299      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude;1",newmeEBUncalibRecHitsAmplitude_);
0300      newmeEBUncalibRecHitsAmplitude_;
0301      newmeEBUncalibRecHitsAmplitude_->SetLineColor(scolor);
0302       
0303      TH1 *newmeEBUncalibRecHitsPedestal_;
0304      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal;1",newmeEBUncalibRecHitsPedestal_);
0305      newmeEBUncalibRecHitsPedestal_;
0306      newmeEBUncalibRecHitsPedestal_->SetLineColor(scolor);
0307      
0308      TH1 *newmeEBUncalibRecHitsJitter_;
0309      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter;1",newmeEBUncalibRecHitsJitter_);
0310      newmeEBUncalibRecHitsJitter_;
0311      newmeEBUncalibRecHitsJitter_->SetLineColor(scolor);
0312      
0313      TH1 *newmeEBUncalibRecHitsChi2_;
0314      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2;1",newmeEBUncalibRecHitsChi2_);
0315      newmeEBUncalibRecHitsChi2_;
0316      newmeEBUncalibRecHitsChi2_->SetLineColor(scolor);
0317 
0318      TH1 *newmeEBUncalibRecHitMaxSampleRatio_;
0319      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio;1",newmeEBUncalibRecHitMaxSampleRatio_);
0320      newmeEBUncalibRecHitMaxSampleRatio_;
0321      newmeEBUncalibRecHitMaxSampleRatio_->SetLineColor(scolor);
0322 
0323      TH2 *newmeEBUncalibRecHitsOccupancyGt100adc_;
0324      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Occupancy gt 100 adc counts;1",newmeEBUncalibRecHitsOccupancyGt100adc_);
0325      newmeEBUncalibRecHitsOccupancyGt100adc_;
0326       
0327      TH1 *newmeEBUncalibRecHitsAmplitudeGt100adc_;
0328      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude gt 100 adc counts;1",newmeEBUncalibRecHitsAmplitudeGt100adc_);
0329      newmeEBUncalibRecHitsAmplitudeGt100adc_;
0330      newmeEBUncalibRecHitsAmplitudeGt100adc_->SetLineColor(scolor);
0331       
0332      TH1 *newmeEBUncalibRecHitsPedestalGt100adc_;
0333      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal gt 100 adc counts;1",newmeEBUncalibRecHitsPedestalGt100adc_);
0334      newmeEBUncalibRecHitsPedestalGt100adc_;
0335      newmeEBUncalibRecHitsPedestalGt100adc_->SetLineColor(scolor);
0336      
0337      TH1 *newmeEBUncalibRecHitsJitterGt100adc_;
0338      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter gt 100 adc counts;1",newmeEBUncalibRecHitsJitterGt100adc_);
0339      newmeEBUncalibRecHitsJitterGt100adc_;
0340      newmeEBUncalibRecHitsJitterGt100adc_->SetLineColor(scolor);
0341      
0342      TH1 *newmeEBUncalibRecHitsChi2Gt100adc_;
0343      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2 gt 100 adc counts;1",newmeEBUncalibRecHitsChi2Gt100adc_);
0344      newmeEBUncalibRecHitsChi2Gt100adc_;
0345      newmeEBUncalibRecHitsChi2Gt100adc_->SetLineColor(scolor);
0346 
0347      TH1 *newmeEBUncalibRecHitMaxSampleRatioGt100adc_;
0348      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio gt 100 adc counts;1",newmeEBUncalibRecHitMaxSampleRatioGt100adc_);
0349      newmeEBUncalibRecHitMaxSampleRatioGt100adc_;
0350      newmeEBUncalibRecHitMaxSampleRatioGt100adc_->SetLineColor(scolor);
0351       
0352      TProfile2D *newmeEBUncalibRecHitsAmpFullMap_;
0353      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude Full Map;1",newmeEBUncalibRecHitsAmpFullMap_);
0354      newmeEBUncalibRecHitsAmpFullMap_;
0355 
0356      TProfile2D *newmeEBUncalibRecHitsPedFullMap_;
0357      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal Full Map;1",newmeEBUncalibRecHitsPedFullMap_);
0358      newmeEBUncalibRecHitsPedFullMap_;
0359 
0360 
0361 
0362 
0363 
0364       // --------------------------------
0365       TCanvas *BarrelOccupancy = new TCanvas("BarrelOccupancy","BarrelOccupancy",1000,800);
0366       BarrelOccupancy->Divide(2,1);
0367       if ( meEBUncalibRecHitsOccupancy_ && newmeEBUncalibRecHitsOccupancy_ ) 
0368     {
0369       BarrelOccupancy->cd(1); meEBUncalibRecHitsOccupancy_   ->Draw("colz"); 
0370       BarrelOccupancy->cd(2); newmeEBUncalibRecHitsOccupancy_->Draw("colz"); 
0371       myPV->PVCompute( meEBUncalibRecHitsOccupancy_ , newmeEBUncalibRecHitsOccupancy_ , te );       
0372     }
0373       BarrelOccupancy->Print("BarrelOccupancy_compare.eps"); 
0374       delete BarrelOccupancy;
0375 
0376 
0377       TCanvas *BarrelOccupancyGt100adc = new TCanvas("BarrelOccupancyGt100adc","BarrelOccupancyGt100adc",1000,800);
0378       BarrelOccupancyGt100adc->Divide(2,1);
0379       if ( meEBUncalibRecHitsOccupancyGt100adc_ && newmeEBUncalibRecHitsOccupancyGt100adc_ ) 
0380     {
0381       BarrelOccupancyGt100adc->cd(1); meEBUncalibRecHitsOccupancyGt100adc_   ->Draw("colz"); 
0382       BarrelOccupancyGt100adc->cd(2); newmeEBUncalibRecHitsOccupancyGt100adc_->Draw("colz"); 
0383       myPV->PVCompute( meEBUncalibRecHitsOccupancyGt100adc_ , newmeEBUncalibRecHitsOccupancyGt100adc_ , te );       
0384     }
0385       BarrelOccupancyGt100adc->Print("BarrelOccupancyGt100adc_compare.eps"); 
0386       delete BarrelOccupancyGt100adc;
0387 
0388 
0389       TCanvas *BarrelFullMap = new TCanvas("BarrelFullMap","BarrelFullMap",1000,800);
0390       BarrelFullMap->Divide(2,2);
0391       if ( meEBUncalibRecHitsAmpFullMap_ && newmeEBUncalibRecHitsAmpFullMap_ )
0392     {
0393       BarrelFullMap->cd(1); meEBUncalibRecHitsAmpFullMap_   ->Draw("colz"); 
0394       BarrelFullMap->cd(2); newmeEBUncalibRecHitsAmpFullMap_->Draw("colz"); 
0395       myPV->PVCompute( meEBUncalibRecHitsAmpFullMap_ , newmeEBUncalibRecHitsAmpFullMap_ , te );       
0396 
0397       BarrelFullMap->cd(3); meEBUncalibRecHitsPedFullMap_   ->Draw("colz"); 
0398       BarrelFullMap->cd(4); newmeEBUncalibRecHitsPedFullMap_->Draw("colz"); 
0399       myPV->PVCompute( meEBUncalibRecHitsPedFullMap_ , newmeEBUncalibRecHitsPedFullMap_ , te );       
0400     }
0401       BarrelFullMap->Print("BarrelFullMap_compare.eps"); 
0402       delete BarrelFullMap;
0403 
0404 
0405       TCanvas *Barrel = new TCanvas("Barrel","Barrel",800,800);
0406       Barrel->Divide(3,2);
0407       if ( meEBUncalibRecHitsAmplitude_ && newmeEBUncalibRecHitsAmplitude_ )
0408     {
0409       Barrel->cd(1); 
0410       gPad->SetLogy();  
0411       meEBUncalibRecHitsAmplitude_->Draw(); 
0412       newmeEBUncalibRecHitsAmplitude_->Draw("same"); 
0413       myPV->PVCompute( meEBUncalibRecHitsAmplitude_ , newmeEBUncalibRecHitsAmplitude_ , te );       
0414     }
0415 
0416       if ( meEBUncalibRecHitsPedestal_ && newmeEBUncalibRecHitsPedestal_ )
0417     {
0418       Barrel->cd(2);  
0419       meEBUncalibRecHitsPedestal_->Draw(); 
0420       newmeEBUncalibRecHitsPedestal_->Draw("same");
0421       myPV->PVCompute( meEBUncalibRecHitsPedestal_ , newmeEBUncalibRecHitsPedestal_ , te );        
0422     }
0423 
0424       if ( meEBUncalibRecHitsJitter_ && newmeEBUncalibRecHitsJitter_ )
0425     {
0426       Barrel->cd(3);  
0427       meEBUncalibRecHitsJitter_->Draw(); 
0428       newmeEBUncalibRecHitsJitter_->Draw("same");
0429       myPV->PVCompute( meEBUncalibRecHitsJitter_ , newmeEBUncalibRecHitsJitter_ , te );       
0430     }
0431 
0432       if ( meEBUncalibRecHitsChi2_ && newmeEBUncalibRecHitsChi2_ )
0433     {
0434       Barrel->cd(4);  
0435       meEBUncalibRecHitsChi2_->Draw(); 
0436       newmeEBUncalibRecHitsChi2_->Draw("same"); 
0437       myPV->PVCompute( meEBUncalibRecHitsChi2_ , newmeEBUncalibRecHitsChi2_ , te );       
0438     }
0439 
0440       if ( meEBUncalibRecHitMaxSampleRatio_ && newmeEBUncalibRecHitMaxSampleRatio_ )
0441     {
0442       Barrel->cd(5);  
0443       meEBUncalibRecHitMaxSampleRatio_->Draw(); 
0444       newmeEBUncalibRecHitMaxSampleRatio_->Draw("same"); 
0445       myPV->PVCompute( meEBUncalibRecHitMaxSampleRatio_ , newmeEBUncalibRecHitMaxSampleRatio_ , te );       
0446     }
0447 
0448       Barrel->Print("Barrel_compare.eps");
0449       delete Barrel;
0450    
0451 
0452       TCanvas *BarrelGt100adc = new TCanvas("BarrelGt100adc","BarrelGt100adc",800,800);
0453       BarrelGt100adc->Divide(3,2);
0454       if ( meEBUncalibRecHitsAmplitudeGt100adc_ && newmeEBUncalibRecHitsAmplitudeGt100adc_ )
0455     {
0456       BarrelGt100adc->cd(1); 
0457       gPad->SetLogy();  
0458       meEBUncalibRecHitsAmplitudeGt100adc_->Draw(); 
0459       newmeEBUncalibRecHitsAmplitudeGt100adc_->Draw("same"); 
0460       myPV->PVCompute( meEBUncalibRecHitsAmplitudeGt100adc_ , newmeEBUncalibRecHitsAmplitudeGt100adc_ , te );       
0461     }
0462 
0463       if ( meEBUncalibRecHitsPedestalGt100adc_ && newmeEBUncalibRecHitsPedestalGt100adc_ )
0464     {
0465       BarrelGt100adc->cd(2);  
0466       meEBUncalibRecHitsPedestalGt100adc_->Draw(); 
0467       newmeEBUncalibRecHitsPedestalGt100adc_->Draw("same");
0468       myPV->PVCompute( meEBUncalibRecHitsPedestalGt100adc_ , newmeEBUncalibRecHitsPedestalGt100adc_ , te );        
0469     }
0470 
0471       if ( meEBUncalibRecHitsJitterGt100adc_ && newmeEBUncalibRecHitsJitterGt100adc_ )
0472     {
0473       BarrelGt100adc->cd(3);  
0474       meEBUncalibRecHitsJitterGt100adc_->Draw(); 
0475       newmeEBUncalibRecHitsJitterGt100adc_->Draw("same");
0476       myPV->PVCompute( meEBUncalibRecHitsJitterGt100adc_ , newmeEBUncalibRecHitsJitterGt100adc_ , te );       
0477     }
0478 
0479       if ( meEBUncalibRecHitsChi2Gt100adc_ && newmeEBUncalibRecHitsChi2Gt100adc_ )
0480     {
0481       BarrelGt100adc->cd(4);  
0482       meEBUncalibRecHitsChi2Gt100adc_->Draw(); 
0483       newmeEBUncalibRecHitsChi2Gt100adc_->Draw("same"); 
0484       myPV->PVCompute( meEBUncalibRecHitsChi2Gt100adc_ , newmeEBUncalibRecHitsChi2Gt100adc_ , te );       
0485     }
0486 
0487       if ( meEBUncalibRecHitMaxSampleRatioGt100adc_ && newmeEBUncalibRecHitMaxSampleRatioGt100adc_ )
0488     {
0489       BarrelGt100adc->cd(5);  
0490       meEBUncalibRecHitMaxSampleRatioGt100adc_->Draw(); 
0491       newmeEBUncalibRecHitMaxSampleRatioGt100adc_->Draw("same"); 
0492       myPV->PVCompute( meEBUncalibRecHitMaxSampleRatioGt100adc_ , newmeEBUncalibRecHitMaxSampleRatioGt100adc_ , te );       
0493     }
0494 
0495       BarrelGt100adc->Print("BarrelGt100adc_compare.eps");
0496       delete BarrelGt100adc;
0497    }
0498 
0499 
0500 
0501 
0502 
0503  // -----------------------------------------------------------------
0504  cout << endl;
0505  cout << "Endcap validation" << endl;
0506  rfile->cd("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask");
0507  gDirectory->ls();
0508  sfile->cd("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask");
0509  gDirectory->ls();
0510  
0511 
0512  
0513  // Endcap validation
0514  if (1) 
0515    {    
0516      TH2 *meEEUncalibRecHitsOccupancyPlus_;
0517      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE+ Occupancy;1",meEEUncalibRecHitsOccupancyPlus_);
0518      meEEUncalibRecHitsOccupancyPlus_;
0519 
0520      TH2 *meEEUncalibRecHitsOccupancyMinus_;
0521      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE- Occupancy;1",meEEUncalibRecHitsOccupancyMinus_);
0522      meEEUncalibRecHitsOccupancyMinus_;
0523       
0524      TH1 *meEEUncalibRecHitsAmplitude_;
0525      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude;1",meEEUncalibRecHitsAmplitude_);
0526      meEEUncalibRecHitsAmplitude_;
0527      meEEUncalibRecHitsAmplitude_->SetLineColor(rcolor);
0528       
0529      TH1 *meEEUncalibRecHitsPedestal_;
0530      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal;1",meEEUncalibRecHitsPedestal_);
0531      meEEUncalibRecHitsPedestal_;
0532      meEEUncalibRecHitsPedestal_->SetLineColor(rcolor);
0533      
0534      TH1 *meEEUncalibRecHitsJitter_;
0535      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter;1",meEEUncalibRecHitsJitter_);
0536      meEEUncalibRecHitsJitter_;
0537      meEEUncalibRecHitsJitter_->SetLineColor(rcolor);
0538      
0539      TH1 *meEEUncalibRecHitsChi2_;
0540      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2;1",meEEUncalibRecHitsChi2_);
0541      meEEUncalibRecHitsChi2_;
0542      meEEUncalibRecHitsChi2_->SetLineColor(rcolor);
0543 
0544      TH1 *meEEUncalibRecHitMaxSampleRatio_;
0545      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio;1",meEEUncalibRecHitMaxSampleRatio_);
0546      meEEUncalibRecHitMaxSampleRatio_;
0547      meEEUncalibRecHitMaxSampleRatio_->SetLineColor(rcolor);
0548 
0549      TH2 *meEEUncalibRecHitsOccupancyPlusGt60adc_;
0550      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE+ Occupancy gt 60 adc counts;1",meEEUncalibRecHitsOccupancyPlusGt60adc_);
0551      meEEUncalibRecHitsOccupancyPlusGt60adc_;
0552 
0553      TH2 *meEEUncalibRecHitsOccupancyMinusGt60adc_;
0554      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE- Occupancy gt 60 adc counts;1",meEEUncalibRecHitsOccupancyMinusGt60adc_);
0555      meEEUncalibRecHitsOccupancyMinusGt60adc_;
0556       
0557      TH1 *meEEUncalibRecHitsAmplitudeGt60adc_;
0558      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude gt 60 adc counts;1",meEEUncalibRecHitsAmplitudeGt60adc_);
0559      meEEUncalibRecHitsAmplitudeGt60adc_;
0560      meEEUncalibRecHitsAmplitudeGt60adc_->SetLineColor(rcolor);
0561       
0562      TH1 *meEEUncalibRecHitsPedestalGt60adc_;
0563      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal gt 60 adc counts;1",meEEUncalibRecHitsPedestalGt60adc_);
0564      meEEUncalibRecHitsPedestalGt60adc_;
0565      meEEUncalibRecHitsPedestalGt60adc_->SetLineColor(rcolor);
0566      
0567      TH1 *meEEUncalibRecHitsJitterGt60adc_;
0568      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter gt 60 adc counts;1",meEEUncalibRecHitsJitterGt60adc_);
0569      meEEUncalibRecHitsJitterGt60adc_;
0570      meEEUncalibRecHitsJitterGt60adc_->SetLineColor(rcolor);
0571      
0572      TH1 *meEEUncalibRecHitsChi2Gt60adc_;
0573      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2 gt 60 adc counts;1",meEEUncalibRecHitsChi2Gt60adc_);
0574      meEEUncalibRecHitsChi2Gt60adc_;
0575      meEEUncalibRecHitsChi2Gt60adc_->SetLineColor(rcolor);
0576 
0577      TH1 *meEEUncalibRecHitMaxSampleRatioGt60adc_;
0578      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio gt 60 adc counts;1",meEEUncalibRecHitMaxSampleRatioGt60adc_);
0579      meEEUncalibRecHitMaxSampleRatioGt60adc_;
0580      meEEUncalibRecHitMaxSampleRatioGt60adc_->SetLineColor(rcolor);
0581 
0582      TProfile2D *meEEUncalibRecHitsAmpFullMap_;
0583      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude Full Map;1",meEEUncalibRecHitsAmpFullMap_);
0584      meEEUncalibRecHitsAmpFullMap_;
0585 
0586      TProfile2D *meEEUncalibRecHitsPedFullMap_;
0587      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal Full Map;1",meEEUncalibRecHitsPedFullMap_);
0588      meEEUncalibRecHitsPedFullMap_;
0589 
0590      TH2 *newmeEEUncalibRecHitsOccupancyPlus_;
0591      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE+ Occupancy;1",newmeEEUncalibRecHitsOccupancyPlus_);
0592      newmeEEUncalibRecHitsOccupancyPlus_;
0593 
0594      TH2 *newmeEEUncalibRecHitsOccupancyMinus_;
0595      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE- Occupancy;1",newmeEEUncalibRecHitsOccupancyMinus_);
0596      newmeEEUncalibRecHitsOccupancyMinus_;
0597 
0598      TH1 *newmeEEUncalibRecHitsAmplitude_;
0599      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude;1",newmeEEUncalibRecHitsAmplitude_);
0600      newmeEEUncalibRecHitsAmplitude_;
0601      newmeEEUncalibRecHitsAmplitude_->SetLineColor(scolor);
0602       
0603      TH1 *newmeEEUncalibRecHitsPedestal_;
0604      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal;1",newmeEEUncalibRecHitsPedestal_);
0605      newmeEEUncalibRecHitsPedestal_;
0606      newmeEEUncalibRecHitsPedestal_->SetLineColor(scolor);
0607      
0608      TH1 *newmeEEUncalibRecHitsJitter_;
0609      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter;1",newmeEEUncalibRecHitsJitter_);
0610      newmeEEUncalibRecHitsJitter_;
0611      newmeEEUncalibRecHitsJitter_->SetLineColor(scolor);
0612      
0613      TH1 *newmeEEUncalibRecHitsChi2_;
0614      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2;1",newmeEEUncalibRecHitsChi2_);
0615      newmeEEUncalibRecHitsChi2_;
0616      newmeEEUncalibRecHitsChi2_->SetLineColor(scolor);
0617       
0618      TH1 *newmeEEUncalibRecHitMaxSampleRatio_;
0619      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio;1",newmeEEUncalibRecHitMaxSampleRatio_);
0620      newmeEEUncalibRecHitMaxSampleRatio_;
0621      newmeEEUncalibRecHitMaxSampleRatio_->SetLineColor(scolor);
0622 
0623      TH2 *newmeEEUncalibRecHitsOccupancyPlusGt60adc_;
0624      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE+ Occupancy gt 60 adc counts;1",newmeEEUncalibRecHitsOccupancyPlusGt60adc_);
0625      newmeEEUncalibRecHitsOccupancyPlusGt60adc_;
0626 
0627      TH2 *newmeEEUncalibRecHitsOccupancyMinusGt60adc_;
0628      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE- Occupancy gt 60 adc counts;1",newmeEEUncalibRecHitsOccupancyMinusGt60adc_);
0629      newmeEEUncalibRecHitsOccupancyMinusGt60adc_;
0630 
0631      TH1 *newmeEEUncalibRecHitsAmplitudeGt60adc_;
0632      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude gt 60 adc counts;1",newmeEEUncalibRecHitsAmplitudeGt60adc_);
0633      newmeEEUncalibRecHitsAmplitudeGt60adc_;
0634      newmeEEUncalibRecHitsAmplitudeGt60adc_->SetLineColor(scolor);
0635       
0636      TH1 *newmeEEUncalibRecHitsPedestalGt60adc_;
0637      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal gt 60 adc counts;1",newmeEEUncalibRecHitsPedestalGt60adc_);
0638      newmeEEUncalibRecHitsPedestalGt60adc_;
0639      newmeEEUncalibRecHitsPedestalGt60adc_->SetLineColor(scolor);
0640      
0641      TH1 *newmeEEUncalibRecHitsJitterGt60adc_;
0642      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter gt 60 adc counts;1",newmeEEUncalibRecHitsJitterGt60adc_);
0643      newmeEEUncalibRecHitsJitterGt60adc_;
0644      newmeEEUncalibRecHitsJitterGt60adc_->SetLineColor(scolor);
0645      
0646      TH1 *newmeEEUncalibRecHitsChi2Gt60adc_;
0647      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2 gt 60 adc counts;1",newmeEEUncalibRecHitsChi2Gt60adc_);
0648      newmeEEUncalibRecHitsChi2Gt60adc_;
0649      newmeEEUncalibRecHitsChi2Gt60adc_->SetLineColor(scolor);
0650       
0651      TH1 *newmeEEUncalibRecHitMaxSampleRatioGt60adc_;
0652      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio gt 60 adc counts;1",newmeEEUncalibRecHitMaxSampleRatioGt60adc_);
0653      newmeEEUncalibRecHitMaxSampleRatioGt60adc_;
0654      newmeEEUncalibRecHitMaxSampleRatioGt60adc_->SetLineColor(scolor);
0655 
0656      TProfile2D *newmeEEUncalibRecHitsAmpFullMap_;
0657      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude Full Map;1",newmeEEUncalibRecHitsAmpFullMap_);
0658      newmeEEUncalibRecHitsAmpFullMap_;
0659 
0660      TProfile2D *newmeEEUncalibRecHitsPedFullMap_;
0661      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal Full Map;1",newmeEEUncalibRecHitsPedFullMap_);
0662      newmeEEUncalibRecHitsPedFullMap_;
0663 
0664 
0665 
0666       // --------------------------------
0667       TCanvas *EndcapOccupancy = new TCanvas("EndcapOccupancy","EndcapOccupancy",1000,800);
0668       EndcapOccupancy->Divide(2,2);
0669       if ( meEEUncalibRecHitsOccupancyPlus_ && newmeEEUncalibRecHitsOccupancyPlus_ ) 
0670     {
0671       EndcapOccupancy->cd(1); meEEUncalibRecHitsOccupancyPlus_->Draw("colz"); 
0672       EndcapOccupancy->cd(2); newmeEEUncalibRecHitsOccupancyPlus_->Draw("colz"); 
0673       myPV->PVCompute( meEEUncalibRecHitsOccupancyPlus_ , newmeEEUncalibRecHitsOccupancyPlus_ , te );       
0674     }
0675 
0676       if ( meEEUncalibRecHitsOccupancyMinus_ && newmeEEUncalibRecHitsOccupancyMinus_ ) 
0677     {
0678       EndcapOccupancy->cd(3); meEEUncalibRecHitsOccupancyMinus_->Draw("colz"); 
0679       EndcapOccupancy->cd(4); newmeEEUncalibRecHitsOccupancyMinus_->Draw("colz"); 
0680       myPV->PVCompute( meEEUncalibRecHitsOccupancyMinus_ , newmeEEUncalibRecHitsOccupancyMinus_ , te );       
0681     }
0682 
0683       EndcapOccupancy->Print("EndcapOccupancy_compare.eps"); 
0684       delete EndcapOccupancy;
0685 
0686 
0687       TCanvas *EndcapOccupancyGt60adc = new TCanvas("EndcapOccupancyGt60adc","EndcapOccupancyGt60adc",1000,800);
0688       EndcapOccupancyGt60adc->Divide(2,2);
0689       if ( meEEUncalibRecHitsOccupancyPlusGt60adc_ && newmeEEUncalibRecHitsOccupancyPlusGt60adc_ ) 
0690     {
0691       EndcapOccupancyGt60adc->cd(1); meEEUncalibRecHitsOccupancyPlusGt60adc_->Draw("colz"); 
0692       EndcapOccupancyGt60adc->cd(2); newmeEEUncalibRecHitsOccupancyPlusGt60adc_->Draw("colz"); 
0693       myPV->PVCompute( meEEUncalibRecHitsOccupancyPlusGt60adc_ , newmeEEUncalibRecHitsOccupancyPlusGt60adc_ , te );       
0694     }
0695 
0696       if ( meEEUncalibRecHitsOccupancyMinusGt60adc_ && newmeEEUncalibRecHitsOccupancyMinusGt60adc_ ) 
0697     {
0698       EndcapOccupancyGt60adc->cd(3); meEEUncalibRecHitsOccupancyMinusGt60adc_->Draw("colz"); 
0699       EndcapOccupancyGt60adc->cd(4); newmeEEUncalibRecHitsOccupancyMinusGt60adc_->Draw("colz"); 
0700       myPV->PVCompute( meEEUncalibRecHitsOccupancyMinusGt60adc_ , newmeEEUncalibRecHitsOccupancyMinusGt60adc_ , te );       
0701     }
0702 
0703       EndcapOccupancyGt60adc->Print("EndcapOccupancyGt60adc_compare.eps"); 
0704       delete EndcapOccupancyGt60adc;
0705 
0706 
0707       TCanvas *EndcapFullMap = new TCanvas("EndcapFullMap","EndcapFullMap",1000,800);
0708       EndcapFullMap->Divide(2,2);
0709       if ( meEEUncalibRecHitsAmpFullMap_ && newmeEEUncalibRecHitsAmpFullMap_ )
0710     {
0711       EndcapFullMap->cd(1); meEEUncalibRecHitsAmpFullMap_   ->Draw("colz"); 
0712       EndcapFullMap->cd(2); newmeEEUncalibRecHitsAmpFullMap_->Draw("colz"); 
0713       myPV->PVCompute( meEEUncalibRecHitsAmpFullMap_ , newmeEEUncalibRecHitsAmpFullMap_ , te );       
0714 
0715       EndcapFullMap->cd(3); meEEUncalibRecHitsPedFullMap_   ->Draw("colz"); 
0716       EndcapFullMap->cd(4); newmeEEUncalibRecHitsPedFullMap_->Draw("colz"); 
0717       myPV->PVCompute( meEEUncalibRecHitsPedFullMap_ , newmeEEUncalibRecHitsPedFullMap_ , te );       
0718     }
0719       EndcapFullMap->Print("EndcapFullMap_compare.eps"); 
0720       delete EndcapFullMap;
0721 
0722 
0723       TCanvas *Endcap = new TCanvas("Endcap","Endcap",800,800);
0724       Endcap->Divide(2,2);
0725       if ( meEEUncalibRecHitsAmplitude_ && newmeEEUncalibRecHitsAmplitude_ )
0726     {
0727       Endcap->cd(1); 
0728       gPad->SetLogy();  
0729       meEEUncalibRecHitsAmplitude_->Draw(); 
0730       newmeEEUncalibRecHitsAmplitude_->Draw("same"); 
0731       myPV->PVCompute( meEEUncalibRecHitsAmplitude_ , newmeEEUncalibRecHitsAmplitude_ , te );       
0732     }
0733 
0734       if ( meEEUncalibRecHitsPedestal_ && newmeEEUncalibRecHitsPedestal_ )
0735     {
0736       Endcap->cd(2);  
0737       meEEUncalibRecHitsPedestal_->Draw(); 
0738       newmeEEUncalibRecHitsPedestal_->Draw("same");
0739       myPV->PVCompute( meEEUncalibRecHitsPedestal_ , newmeEEUncalibRecHitsPedestal_ , te );        
0740     }
0741 
0742       if ( meEEUncalibRecHitsJitter_ && newmeEEUncalibRecHitsJitter_ )
0743     {
0744       Endcap->cd(3);  
0745       meEEUncalibRecHitsJitter_->Draw(); 
0746       newmeEEUncalibRecHitsJitter_->Draw("same");
0747       myPV->PVCompute( meEEUncalibRecHitsJitter_ , newmeEEUncalibRecHitsJitter_ , te );       
0748     }
0749 
0750       if ( meEEUncalibRecHitsChi2_ && newmeEEUncalibRecHitsChi2_ )
0751     {
0752       Endcap->cd(4);  
0753       meEEUncalibRecHitsChi2_->Draw(); 
0754       newmeEEUncalibRecHitsChi2_->Draw("same"); 
0755       myPV->PVCompute( meEEUncalibRecHitsChi2_ , newmeEEUncalibRecHitsChi2_ , te );       
0756     }
0757       Endcap->Print("Endcap_compare.eps");
0758       delete Endcap;
0759 
0760 
0761       TCanvas *EndcapGt60adc = new TCanvas("EndcapGt60adc","EndcapGt60adc",800,800);
0762       EndcapGt60adc->Divide(2,2);
0763       if ( meEEUncalibRecHitsAmplitudeGt60adc_ && newmeEEUncalibRecHitsAmplitudeGt60adc_ )
0764     {
0765       EndcapGt60adc->cd(1); 
0766       gPad->SetLogy();  
0767       meEEUncalibRecHitsAmplitudeGt60adc_->Draw(); 
0768       newmeEEUncalibRecHitsAmplitudeGt60adc_->Draw("same"); 
0769       myPV->PVCompute( meEEUncalibRecHitsAmplitudeGt60adc_ , newmeEEUncalibRecHitsAmplitudeGt60adc_ , te );       
0770     }
0771 
0772       if ( meEEUncalibRecHitsPedestalGt60adc_ && newmeEEUncalibRecHitsPedestalGt60adc_ )
0773     {
0774       EndcapGt60adc->cd(2);  
0775       meEEUncalibRecHitsPedestalGt60adc_->Draw(); 
0776       newmeEEUncalibRecHitsPedestalGt60adc_->Draw("same");
0777       myPV->PVCompute( meEEUncalibRecHitsPedestalGt60adc_ , newmeEEUncalibRecHitsPedestalGt60adc_ , te );        
0778     }
0779 
0780       if ( meEEUncalibRecHitsJitterGt60adc_ && newmeEEUncalibRecHitsJitterGt60adc_ )
0781     {
0782       EndcapGt60adc->cd(3);  
0783       meEEUncalibRecHitsJitterGt60adc_->Draw(); 
0784       newmeEEUncalibRecHitsJitterGt60adc_->Draw("same");
0785       myPV->PVCompute( meEEUncalibRecHitsJitterGt60adc_ , newmeEEUncalibRecHitsJitterGt60adc_ , te );       
0786     }
0787 
0788       if ( meEEUncalibRecHitsChi2Gt60adc_ && newmeEEUncalibRecHitsChi2Gt60adc_ )
0789     {
0790       EndcapGt60adc->cd(4);  
0791       meEEUncalibRecHitsChi2Gt60adc_->Draw(); 
0792       newmeEEUncalibRecHitsChi2Gt60adc_->Draw("same"); 
0793       myPV->PVCompute( meEEUncalibRecHitsChi2Gt60adc_ , newmeEEUncalibRecHitsChi2Gt60adc_ , te );       
0794     }
0795       EndcapGt60adc->Print("EndcapGt60adc_compare.eps");
0796       delete EndcapGt60adc;
0797    }
0798 
0799 
0800 
0801 
0802 
0803 
0804 
0805  // ----------------------------------------------------------------
0806  cout << endl;
0807  cout << "Preshower validation" << endl;
0808  rfile->cd("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask");
0809  gDirectory->ls();
0810  sfile->cd("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask");
0811  gDirectory->ls();
0812 
0813   
0814  // Preshower validation
0815  if (1) 
0816    {    
0817      TH1 *meESRecHitsEnergy_;
0818      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy;1",meESRecHitsEnergy_);
0819      meESRecHitsEnergy_;
0820      meESRecHitsEnergy_->SetLineColor(rcolor);
0821      
0822      TH1 *meESRecHitsEnergy_zp1st_;
0823      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side+;1",meESRecHitsEnergy_zp1st_);
0824      meESRecHitsEnergy_zp1st_;
0825      meESRecHitsEnergy_zp1st_->SetLineColor(rcolor);
0826 
0827      TH1 *meESRecHitsEnergy_zp2nd_;
0828      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side+;1",meESRecHitsEnergy_zp2nd_);
0829      meESRecHitsEnergy_zp2nd_;
0830      meESRecHitsEnergy_zp2nd_->SetLineColor(rcolor);
0831 
0832      TH1 *meESRecHitsEnergy_zm1st_;
0833      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side-;1",meESRecHitsEnergy_zm1st_);
0834      meESRecHitsEnergy_zm1st_;
0835      meESRecHitsEnergy_zm1st_->SetLineColor(rcolor);
0836 
0837      TH1 *meESRecHitsEnergy_zm2nd_;
0838      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side-;1",meESRecHitsEnergy_zm2nd_);
0839      meESRecHitsEnergy_zm2nd_;
0840      meESRecHitsEnergy_zm2nd_->SetLineColor(rcolor);
0841 
0842      TH1 *meESRecHitsMultip_;
0843      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity;1",meESRecHitsMultip_);
0844      meESRecHitsMultip_;
0845      meESRecHitsMultip_->SetLineColor(rcolor);
0846 
0847      TH1 *meESRecHitsMultip_zp1st_;
0848      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane1 Side+;1",meESRecHitsMultip_zp1st_);
0849      meESRecHitsMultip_zp1st_;
0850      meESRecHitsMultip_zp1st_->SetLineColor(rcolor);
0851 
0852      TH1 *meESRecHitsMultip_zp2nd_;
0853      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane2 Side+;1",meESRecHitsMultip_zp2nd_);
0854      meESRecHitsMultip_zp2nd_;
0855      meESRecHitsMultip_zp2nd_->SetLineColor(rcolor);
0856 
0857      TH1 *meESRecHitsMultip_zm1st_;
0858      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane1 Side-;1",meESRecHitsMultip_zm1st_);
0859      meESRecHitsMultip_zm1st_;
0860      meESRecHitsMultip_zm1st_->SetLineColor(rcolor);
0861 
0862      TH1 *meESRecHitsMultip_zm2nd_;
0863      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane1 Side-;1",meESRecHitsMultip_zm2nd_);
0864      meESRecHitsMultip_zm2nd_;
0865      meESRecHitsMultip_zm2nd_->SetLineColor(rcolor);
0866 
0867      TH1 *meESEERecHitsEnergy_zp_;
0868      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side+;1",meESEERecHitsEnergy_zp_);
0869      meESEERecHitsEnergy_zp_;
0870   
0871      TH1 *meESEERecHitsEnergy_zm_;
0872      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side-;1",meESEERecHitsEnergy_zm_);
0873      meESEERecHitsEnergy_zm_;
0874 
0875      TH1 *newmeESRecHitsEnergy_;
0876      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy;1",newmeESRecHitsEnergy_);
0877      newmeESRecHitsEnergy_;
0878      newmeESRecHitsEnergy_->SetLineColor(scolor);
0879      
0880      TH1 *newmeESRecHitsEnergy_zp1st_;
0881      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side+;1",newmeESRecHitsEnergy_zp1st_);
0882      newmeESRecHitsEnergy_zp1st_;
0883      newmeESRecHitsEnergy_zp1st_->SetLineColor(scolor);
0884 
0885      TH1 *newmeESRecHitsEnergy_zp2nd_;
0886      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side+;1",newmeESRecHitsEnergy_zp2nd_);
0887      newmeESRecHitsEnergy_zp2nd_;
0888      newmeESRecHitsEnergy_zp2nd_->SetLineColor(scolor);
0889 
0890      TH1 *newmeESRecHitsEnergy_zm1st_;
0891      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side-;1",newmeESRecHitsEnergy_zm1st_);
0892      newmeESRecHitsEnergy_zm1st_;
0893      newmeESRecHitsEnergy_zm1st_->SetLineColor(scolor);
0894 
0895      TH1 *newmeESRecHitsEnergy_zm2nd_;
0896      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side-;1",newmeESRecHitsEnergy_zm2nd_);
0897      newmeESRecHitsEnergy_zm2nd_;
0898      newmeESRecHitsEnergy_zm2nd_->SetLineColor(scolor);
0899 
0900      TH1 *newmeESRecHitsMultip_;
0901      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity;1",newmeESRecHitsMultip_);
0902      newmeESRecHitsMultip_;
0903      newmeESRecHitsMultip_->SetLineColor(scolor);
0904 
0905      TH1 *newmeESRecHitsMultip_zp1st_;
0906      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane1 Side+;1",newmeESRecHitsMultip_zp1st_);
0907      newmeESRecHitsMultip_zp1st_;
0908      newmeESRecHitsMultip_zp1st_->SetLineColor(scolor);
0909 
0910      TH1 *newmeESRecHitsMultip_zp2nd_;
0911      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane2 Side+;1",newmeESRecHitsMultip_zp2nd_);
0912      newmeESRecHitsMultip_zp2nd_;
0913      newmeESRecHitsMultip_zp2nd_->SetLineColor(scolor);
0914 
0915      TH1 *newmeESRecHitsMultip_zm1st_;
0916      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane1 Side-;1",newmeESRecHitsMultip_zm1st_);
0917      newmeESRecHitsMultip_zm1st_;
0918      newmeESRecHitsMultip_zm1st_->SetLineColor(scolor);
0919 
0920      TH1 *newmeESRecHitsMultip_zm2nd_;
0921      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane1 Side-;1",newmeESRecHitsMultip_zm2nd_);
0922      newmeESRecHitsMultip_zm2nd_;
0923      newmeESRecHitsMultip_zm2nd_->SetLineColor(scolor);
0924 
0925      TH1 *newmeESEERecHitsEnergy_zp_;
0926      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side+;1",newmeESEERecHitsEnergy_zp_);
0927      newmeESEERecHitsEnergy_zp_;
0928   
0929      TH1 *newmeESEERecHitsEnergy_zm_;
0930      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side-;1",newmeESEERecHitsEnergy_zm_);
0931      newmeESEERecHitsEnergy_zm_;
0932 
0933      
0934      
0935      // ----------------------------------------------
0936      TCanvas *ESEnergyAll = new TCanvas("ESEnergyAll","ESEnergyAll",800,800);
0937      gPad->SetLogy(); 
0938      if ( meESRecHitsEnergy_ && newmeESRecHitsEnergy_ ) 
0939        {
0940      meESRecHitsEnergy_->Draw(); 
0941      newmeESRecHitsEnergy_->Draw("same");
0942      myPV->PVCompute( meESRecHitsEnergy_ , newmeESRecHitsEnergy_ , te );       
0943        }
0944      ESEnergyAll->Print("PreshowerEnergyAll_compare.eps");
0945      delete ESEnergyAll;
0946 
0947 
0948      TCanvas *ESEnergy = new TCanvas("ESEnergy","ESEnergy",800,800);
0949      ESEnergy->Divide(2,2);
0950      if ( meESRecHitsEnergy_zp1st_ && newmeESRecHitsEnergy_zp1st_ )
0951        {
0952      ESEnergy->cd(1); gPad->SetLogy(); 
0953      meESRecHitsEnergy_zp1st   _->Draw(); 
0954      newmeESRecHitsEnergy_zp1st_->Draw("same"); 
0955        }
0956      if ( meESRecHitsEnergy_zp2nd_ && newmeESRecHitsEnergy_zp2nd_ )
0957        {
0958      ESEnergy->cd(2); gPad->SetLogy(); 
0959      meESRecHitsEnergy_zp2nd_   ->Draw(); 
0960      newmeESRecHitsEnergy_zp2nd_->Draw("same"); 
0961        }
0962      if ( meESRecHitsEnergy_zm1st_ && newmeESRecHitsEnergy_zm1st_ )
0963        {
0964      ESEnergy->cd(3); gPad->SetLogy(); 
0965      meESRecHitsEnergy_zm1st_   ->Draw(); 
0966      newmeESRecHitsEnergy_zm1st_->Draw("same"); 
0967        }
0968      if ( meESRecHitsEnergy_zm2nd_ && newmeESRecHitsEnergy_zm2nd_ )
0969        {
0970      ESEnergy->cd(4); gPad->SetLogy(); 
0971      meESRecHitsEnergy_zm2nd_   ->Draw(); 
0972      newmeESRecHitsEnergy_zm2nd_->Draw("same"); 
0973        }
0974      ESEnergy->Print("PreshowerEnergy_compare.eps");
0975      delete ESEnergy;
0976 
0977 
0978      TCanvas *ESMultipAll = new TCanvas("ESMultipAll","ESMultipAll",800,800);
0979      if ( meESRecHitsMultip_ && newmeESRecHitsMultip_ ) 
0980        {
0981      meESRecHitsMultip_->Draw(); 
0982      newmeESRecHitsMultip_->Draw("same");
0983      myPV->PVCompute( meESRecHitsMultip_ , newmeESRecHitsMultip_ , te );       
0984        }
0985      ESMultipAll->Print("PreshowerMultipAll_compare.eps");
0986      delete ESMultipAll;
0987 
0988 
0989 
0990      TCanvas *ESMultip = new TCanvas("ESMultip","ESMultip",800,800);
0991      ESMultip->Divide(2,2);
0992      if ( meESRecHitsMultip_zp1st_ && newmeESRecHitsMultip_zp1st_ )
0993        {
0994      ESMultip->cd(1); 
0995      meESRecHitsMultip_zp1st   _->Draw(); 
0996      newmeESRecHitsMultip_zp1st_->Draw("same"); 
0997        }
0998      if ( meESRecHitsMultip_zp2nd_ && newmeESRecHitsMultip_zp2nd_ )
0999        {
1000      ESMultip->cd(2); 
1001      meESRecHitsMultip_zp2nd_   ->Draw(); 
1002      newmeESRecHitsMultip_zp2nd_->Draw("same"); 
1003        }
1004      if ( meESRecHitsMultip_zm1st_ && newmeESRecHitsMultip_zm1st_ )
1005        {
1006      ESMultip->cd(3); 
1007      meESRecHitsMultip_zm1st_   ->Draw(); 
1008      newmeESRecHitsMultip_zm1st_->Draw("same"); 
1009        }
1010      if ( meESRecHitsMultip_zm2nd_ && newmeESRecHitsMultip_zm2nd_ )
1011        {
1012      ESMultip->cd(4); 
1013      meESRecHitsMultip_zm2nd_   ->Draw(); 
1014      newmeESRecHitsMultip_zm2nd_->Draw("same"); 
1015        }
1016      ESMultip->Print("PreshowerMultip_compare.eps");
1017      delete ESMultip;
1018 
1019 
1020 
1021      TCanvas *ESvsEE = new TCanvas("ESvsEE","ESvsEE",800,800);
1022      ESvsEE->Divide(2,2);
1023      if ( meESEERecHitsEnergy_zp_ && newmeESEERecHitsEnergy_zp_ )
1024        {
1025      ESvsEE->cd(1);   meESEERecHitsEnergy_zp   _->Draw();
1026      ESvsEE->cd(2);   newmeESEERecHitsEnergy_zp_->Draw();
1027      myPV->PVCompute( meESEERecHitsEnergy_zp_ , newmeESEERecHitsEnergy_zp_ , te);
1028        }
1029      if ( meESEERecHitsEnergy_zm_ && newmeESEERecHitsEnergy_zm_ )
1030        {
1031      ESvsEE->cd(3);   meESEERecHitsEnergy_zm   _->Draw();
1032      ESvsEE->cd(4);   newmeESEERecHitsEnergy_zm_->Draw();
1033      myPV->PVCompute( meESEERecHitsEnergy_zm_ , newmeESEERecHitsEnergy_zm_ , te);
1034        }
1035      ESvsEE->Print("ESvsEE_compare.eps");
1036      delete ESvsEE;
1037    }
1038  
1039 
1040 }
1041