Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:08

0001 #include "TFile.h"
0002 #include "TTree.h"
0003 #include "TText.h"
0004 
0005 void EcalSuppUnsuppCompare( TString currentfile   = "EcalRecHitsValidation_supp.root",
0006                             TString referencefile = "EcalRecHitsValidation_unsupp.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: sim/rec hit ratios
0040  if (1) 
0041    {
0042      TH1 *meEBRecHitSimHitRatio_;
0043      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Barrel RecSimHit Ratio;1",meEBRecHitSimHitRatio_);
0044      meEBRecHitSimHitRatio_;
0045      meEBRecHitSimHitRatio_->SetLineColor(rcolor);
0046      
0047      TH1 *meEERecHitSimHitRatio_;
0048      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Endcap RecSimHit Ratio;1",meEERecHitSimHitRatio_);
0049      meEERecHitSimHitRatio_;
0050      meEERecHitSimHitRatio_->SetLineColor(rcolor);
0051      
0052      TH1 *meESRecHitSimHitRatio_;
0053      rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Preshower RecSimHit Ratio;1",meESRecHitSimHitRatio_);
0054      meESRecHitSimHitRatio_;
0055      meESRecHitSimHitRatio_->SetLineColor(rcolor);
0056 
0057      TH1 *newmeEBRecHitSimHitRatio_;
0058      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Barrel RecSimHit Ratio;1",newmeEBRecHitSimHitRatio_);
0059      newmeEBRecHitSimHitRatio_;
0060      newmeEBRecHitSimHitRatio_->SetLineColor(scolor);
0061      
0062      TH1 *newmeEERecHitSimHitRatio_;
0063      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Endcap RecSimHit Ratio;1",newmeEERecHitSimHitRatio_);
0064      newmeEERecHitSimHitRatio_;
0065      newmeEERecHitSimHitRatio_->SetLineColor(scolor);
0066      
0067      TH1 *newmeESRecHitSimHitRatio_;
0068      sfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Preshower RecSimHit Ratio;1",newmeESRecHitSimHitRatio_);
0069      newmeESRecHitSimHitRatio_;
0070      newmeESRecHitSimHitRatio_->SetLineColor(scolor);
0071 
0072      // --------------------------------
0073      TCanvas *BarrelSimRec = new TCanvas("BarrelSimRec","BarrelSimRec",800,800);
0074      if ( meEBRecHitSimHitRatio_ && newmeEBRecHitSimHitRatio_ ) {
0075        meEBRecHitSimHitRatio_->Draw();
0076        newmeEBRecHitSimHitRatio_->Draw("same");
0077        myPV->PVCompute( meEBRecHitSimHitRatio_ , newmeEBRecHitSimHitRatio_ , te );       
0078      }
0079      BarrelSimRec->Print("Barrel_SimRecHitsRatio_compare.eps");
0080      delete BarrelSimRec;
0081 
0082 
0083      TCanvas *EndcapSimRec = new TCanvas("EndcapSimRec","EndcapSimRec",800,800);
0084      if ( meEERecHitSimHitRatio_ && newmeEERecHitSimHitRatio_ ) {
0085        meEERecHitSimHitRatio_->Draw();
0086        newmeEERecHitSimHitRatio_->Draw("same");
0087        myPV->PVCompute( meEERecHitSimHitRatio_ , newmeEERecHitSimHitRatio_ , te );       
0088      }
0089      EndcapSimRec->Print("Endcap_SimRecHitsRatio_compare.eps");
0090      delete EndcapSimRec;
0091 
0092 
0093      TCanvas *PreshowerSimRec = new TCanvas("PreshowerSimRec","PreshowerSimRec",800,800);
0094      if ( meESRecHitSimHitRatio_ && newmeESRecHitSimHitRatio_ ) {
0095        meESRecHitSimHitRatio_->Draw();
0096        newmeESRecHitSimHitRatio_->Draw("same");
0097        myPV->PVCompute( meESRecHitSimHitRatio_ , newmeESRecHitSimHitRatio_ , te );       
0098      }
0099      PreshowerSimRec->Print("Preshower_SimRecHitsRatio_compare.eps");
0100      delete PreshowerSimRec;
0101    }
0102 
0103 
0104 
0105  // ---------------------------------------------------------------------------------
0106  cout << endl;
0107  cout << "Barrel validation" << endl;
0108  rfile->cd("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask");
0109  gDirectory->ls();
0110  sfile->cd("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask");
0111  gDirectory->ls();
0112  
0113  
0114  // Barrel validation
0115  if (1) 
0116    {    
0117      TH1 *meEBUncalibRecHitsAmplitude_;
0118      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude;1",meEBUncalibRecHitsAmplitude_);
0119      meEBUncalibRecHitsAmplitude_;
0120      meEBUncalibRecHitsAmplitude_->SetLineColor(rcolor);
0121       
0122      TH1 *meEBUncalibRecHitsPedestal_;
0123      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal;1",meEBUncalibRecHitsPedestal_);
0124      meEBUncalibRecHitsPedestal_;
0125      meEBUncalibRecHitsPedestal_->SetLineColor(rcolor);
0126      
0127      TH1 *meEBUncalibRecHitsJitter_;
0128      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter;1",meEBUncalibRecHitsJitter_);
0129      meEBUncalibRecHitsJitter_;
0130      meEBUncalibRecHitsJitter_->SetLineColor(rcolor);
0131      
0132      TH1 *meEBUncalibRecHitsChi2_;
0133      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2;1",meEBUncalibRecHitsChi2_);
0134      meEBUncalibRecHitsChi2_;
0135      meEBUncalibRecHitsChi2_->SetLineColor(rcolor);
0136 
0137      TH1 *meEBUncalibRecHitMaxSampleRatio_;
0138      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio;1",meEBUncalibRecHitMaxSampleRatio_);
0139      meEBUncalibRecHitMaxSampleRatio_;
0140      meEBUncalibRecHitMaxSampleRatio_->SetLineColor(rcolor);
0141 
0142      TH1 *meEBUncalibRecHitsAmplitudeGt100adc_;
0143      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude gt 100 adc counts;1",meEBUncalibRecHitsAmplitudeGt100adc_);
0144      meEBUncalibRecHitsAmplitudeGt100adc_;
0145      meEBUncalibRecHitsAmplitudeGt100adc_->SetLineColor(rcolor);
0146       
0147      TH1 *meEBUncalibRecHitsPedestalGt100adc_;
0148      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal gt 100 adc counts;1",meEBUncalibRecHitsPedestalGt100adc_);
0149      meEBUncalibRecHitsPedestalGt100adc_;
0150      meEBUncalibRecHitsPedestalGt100adc_->SetLineColor(rcolor);
0151      
0152      TH1 *meEBUncalibRecHitsJitterGt100adc_;
0153      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter gt 100 adc counts;1",meEBUncalibRecHitsJitterGt100adc_);
0154      meEBUncalibRecHitsJitterGt100adc_;
0155      meEBUncalibRecHitsJitterGt100adc_->SetLineColor(rcolor);
0156      
0157      TH1 *meEBUncalibRecHitsChi2Gt100adc_;
0158      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2 gt 100 adc counts;1",meEBUncalibRecHitsChi2Gt100adc_);
0159      meEBUncalibRecHitsChi2Gt100adc_;
0160      meEBUncalibRecHitsChi2Gt100adc_->SetLineColor(rcolor);
0161 
0162      TH1 *meEBUncalibRecHitMaxSampleRatioGt100adc_;
0163      rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio gt 100 adc counts;1",meEBUncalibRecHitMaxSampleRatioGt100adc_);
0164      meEBUncalibRecHitMaxSampleRatioGt100adc_;
0165      meEBUncalibRecHitMaxSampleRatioGt100adc_->SetLineColor(rcolor);
0166 
0167      TH1 *newmeEBUncalibRecHitsAmplitude_;
0168      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude;1",newmeEBUncalibRecHitsAmplitude_);
0169      newmeEBUncalibRecHitsAmplitude_;
0170      newmeEBUncalibRecHitsAmplitude_->SetLineColor(scolor);
0171       
0172      TH1 *newmeEBUncalibRecHitsPedestal_;
0173      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal;1",newmeEBUncalibRecHitsPedestal_);
0174      newmeEBUncalibRecHitsPedestal_;
0175      newmeEBUncalibRecHitsPedestal_->SetLineColor(scolor);
0176      
0177      TH1 *newmeEBUncalibRecHitsJitter_;
0178      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter;1",newmeEBUncalibRecHitsJitter_);
0179      newmeEBUncalibRecHitsJitter_;
0180      newmeEBUncalibRecHitsJitter_->SetLineColor(scolor);
0181      
0182      TH1 *newmeEBUncalibRecHitsChi2_;
0183      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2;1",newmeEBUncalibRecHitsChi2_);
0184      newmeEBUncalibRecHitsChi2_;
0185      newmeEBUncalibRecHitsChi2_->SetLineColor(scolor);
0186 
0187      TH1 *newmeEBUncalibRecHitMaxSampleRatio_;
0188      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio;1",newmeEBUncalibRecHitMaxSampleRatio_);
0189      newmeEBUncalibRecHitMaxSampleRatio_;
0190      newmeEBUncalibRecHitMaxSampleRatio_->SetLineColor(scolor);
0191 
0192      TH1 *newmeEBUncalibRecHitsAmplitudeGt100adc_;
0193      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude gt 100 adc counts;1",newmeEBUncalibRecHitsAmplitudeGt100adc_);
0194      newmeEBUncalibRecHitsAmplitudeGt100adc_;
0195      newmeEBUncalibRecHitsAmplitudeGt100adc_->SetLineColor(scolor);
0196       
0197      TH1 *newmeEBUncalibRecHitsPedestalGt100adc_;
0198      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal gt 100 adc counts;1",newmeEBUncalibRecHitsPedestalGt100adc_);
0199      newmeEBUncalibRecHitsPedestalGt100adc_;
0200      newmeEBUncalibRecHitsPedestalGt100adc_->SetLineColor(scolor);
0201      
0202      TH1 *newmeEBUncalibRecHitsJitterGt100adc_;
0203      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter gt 100 adc counts;1",newmeEBUncalibRecHitsJitterGt100adc_);
0204      newmeEBUncalibRecHitsJitterGt100adc_;
0205      newmeEBUncalibRecHitsJitterGt100adc_->SetLineColor(scolor);
0206      
0207      TH1 *newmeEBUncalibRecHitsChi2Gt100adc_;
0208      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2 gt 100 adc counts;1",newmeEBUncalibRecHitsChi2Gt100adc_);
0209      newmeEBUncalibRecHitsChi2Gt100adc_;
0210      newmeEBUncalibRecHitsChi2Gt100adc_->SetLineColor(scolor);
0211 
0212      TH1 *newmeEBUncalibRecHitMaxSampleRatioGt100adc_;
0213      sfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio gt 100 adc counts;1",newmeEBUncalibRecHitMaxSampleRatioGt100adc_);
0214      newmeEBUncalibRecHitMaxSampleRatioGt100adc_;
0215      newmeEBUncalibRecHitMaxSampleRatioGt100adc_->SetLineColor(scolor);
0216       
0217 
0218       // --------------------------------
0219       TCanvas *Barrel = new TCanvas("Barrel","Barrel",800,800);
0220       Barrel->Divide(4,2);
0221       if ( meEBUncalibRecHitsAmplitude_ && newmeEBUncalibRecHitsAmplitude_ )
0222     {
0223       Barrel->cd(1); 
0224       gPad->SetLogy();  
0225       meEBUncalibRecHitsAmplitude_->Draw(); 
0226 
0227       Barrel->cd(5); 
0228       gPad->SetLogy();  
0229       newmeEBUncalibRecHitsAmplitude_->Draw(); 
0230       myPV->PVCompute( meEBUncalibRecHitsAmplitude_ , newmeEBUncalibRecHitsAmplitude_ , te );       
0231     }
0232 
0233       if ( meEBUncalibRecHitsPedestal_ && newmeEBUncalibRecHitsPedestal_ )
0234     {
0235       Barrel->cd(2);  
0236       meEBUncalibRecHitsPedestal_->Draw(); 
0237 
0238       Barrel->cd(6);  
0239       newmeEBUncalibRecHitsPedestal_->Draw();
0240       myPV->PVCompute( meEBUncalibRecHitsPedestal_ , newmeEBUncalibRecHitsPedestal_ , te );        
0241     }
0242 
0243       if ( meEBUncalibRecHitsJitter_ && newmeEBUncalibRecHitsJitter_ )
0244     {
0245       Barrel->cd(3);  
0246       meEBUncalibRecHitsJitter_->Draw(); 
0247 
0248       Barrel->cd(7);  
0249       newmeEBUncalibRecHitsJitter_->Draw();
0250       myPV->PVCompute( meEBUncalibRecHitsJitter_ , newmeEBUncalibRecHitsJitter_ , te );       
0251     }
0252 
0253       if ( meEBUncalibRecHitMaxSampleRatio_ && newmeEBUncalibRecHitMaxSampleRatio_ )
0254     {
0255       Barrel->cd(4);  
0256       meEBUncalibRecHitMaxSampleRatio_->Draw(); 
0257 
0258       Barrel->cd(8);  
0259       newmeEBUncalibRecHitMaxSampleRatio_->Draw(); 
0260       myPV->PVCompute( meEBUncalibRecHitMaxSampleRatio_ , newmeEBUncalibRecHitMaxSampleRatio_ , te );       
0261     }
0262 
0263       Barrel->Print("Barrel_compare.eps");
0264       delete Barrel;
0265    
0266 
0267       TCanvas *BarrelGt100adc = new TCanvas("BarrelGt100adc","BarrelGt100adc",800,800);
0268       BarrelGt100adc->Divide(4,2);
0269       if ( meEBUncalibRecHitsAmplitudeGt100adc_ && newmeEBUncalibRecHitsAmplitudeGt100adc_ )
0270     {
0271       BarrelGt100adc->cd(1); 
0272       gPad->SetLogy();  
0273       meEBUncalibRecHitsAmplitudeGt100adc_->Draw(); 
0274 
0275       BarrelGt100adc->cd(5); 
0276       gPad->SetLogy();  
0277       newmeEBUncalibRecHitsAmplitudeGt100adc_->Draw(); 
0278       myPV->PVCompute( meEBUncalibRecHitsAmplitudeGt100adc_ , newmeEBUncalibRecHitsAmplitudeGt100adc_ , te );       
0279     }
0280 
0281       if ( meEBUncalibRecHitsPedestalGt100adc_ && newmeEBUncalibRecHitsPedestalGt100adc_ )
0282     {
0283       BarrelGt100adc->cd(2);  
0284       meEBUncalibRecHitsPedestalGt100adc_->Draw(); 
0285 
0286       BarrelGt100adc->cd(6);  
0287       newmeEBUncalibRecHitsPedestalGt100adc_->Draw();
0288       myPV->PVCompute( meEBUncalibRecHitsPedestalGt100adc_ , newmeEBUncalibRecHitsPedestalGt100adc_ , te );        
0289     }
0290 
0291       if ( meEBUncalibRecHitsJitterGt100adc_ && newmeEBUncalibRecHitsJitterGt100adc_ )
0292     {
0293       BarrelGt100adc->cd(3);  
0294       meEBUncalibRecHitsJitterGt100adc_->Draw(); 
0295 
0296       BarrelGt100adc->cd(7);  
0297       newmeEBUncalibRecHitsJitterGt100adc_->Draw();
0298       myPV->PVCompute( meEBUncalibRecHitsJitterGt100adc_ , newmeEBUncalibRecHitsJitterGt100adc_ , te );       
0299     }
0300 
0301       if ( meEBUncalibRecHitMaxSampleRatioGt100adc_ && newmeEBUncalibRecHitMaxSampleRatioGt100adc_ )
0302     {
0303       BarrelGt100adc->cd(4);  
0304       meEBUncalibRecHitMaxSampleRatioGt100adc_->Draw(); 
0305 
0306       BarrelGt100adc->cd(8);  
0307       newmeEBUncalibRecHitMaxSampleRatioGt100adc_->Draw(); 
0308       myPV->PVCompute( meEBUncalibRecHitMaxSampleRatioGt100adc_ , newmeEBUncalibRecHitMaxSampleRatioGt100adc_ , te );       
0309     }
0310 
0311       BarrelGt100adc->Print("BarrelGt100adc_compare.eps");
0312       delete BarrelGt100adc;
0313    }
0314 
0315 
0316 
0317 
0318 
0319  // -----------------------------------------------------------------
0320  cout << endl;
0321  cout << "Endcap validation" << endl;
0322  rfile->cd("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask");
0323  gDirectory->ls();
0324  sfile->cd("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask");
0325  gDirectory->ls();
0326  
0327 
0328  
0329  // Endcap validation
0330  if (1) 
0331    {    
0332      TH1 *meEEUncalibRecHitsAmplitude_;
0333      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude;1",meEEUncalibRecHitsAmplitude_);
0334      meEEUncalibRecHitsAmplitude_;
0335      meEEUncalibRecHitsAmplitude_->SetLineColor(rcolor);
0336       
0337      TH1 *meEEUncalibRecHitsPedestal_;
0338      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal;1",meEEUncalibRecHitsPedestal_);
0339      meEEUncalibRecHitsPedestal_;
0340      meEEUncalibRecHitsPedestal_->SetLineColor(rcolor);
0341      
0342      TH1 *meEEUncalibRecHitsJitter_;
0343      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter;1",meEEUncalibRecHitsJitter_);
0344      meEEUncalibRecHitsJitter_;
0345      meEEUncalibRecHitsJitter_->SetLineColor(rcolor);
0346      
0347      TH1 *meEEUncalibRecHitsChi2_;
0348      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2;1",meEEUncalibRecHitsChi2_);
0349      meEEUncalibRecHitsChi2_;
0350      meEEUncalibRecHitsChi2_->SetLineColor(rcolor);
0351 
0352      TH1 *meEEUncalibRecHitMaxSampleRatio_;
0353      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio;1",meEEUncalibRecHitMaxSampleRatio_);
0354      meEEUncalibRecHitMaxSampleRatio_;
0355      meEEUncalibRecHitMaxSampleRatio_->SetLineColor(rcolor);
0356 
0357      TH1 *meEEUncalibRecHitsAmplitudeGt60adc_;
0358      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude gt 60 adc counts;1",meEEUncalibRecHitsAmplitudeGt60adc_);
0359      meEEUncalibRecHitsAmplitudeGt60adc_;
0360      meEEUncalibRecHitsAmplitudeGt60adc_->SetLineColor(rcolor);
0361       
0362      TH1 *meEEUncalibRecHitsPedestalGt60adc_;
0363      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal gt 60 adc counts;1",meEEUncalibRecHitsPedestalGt60adc_);
0364      meEEUncalibRecHitsPedestalGt60adc_;
0365      meEEUncalibRecHitsPedestalGt60adc_->SetLineColor(rcolor);
0366      
0367      TH1 *meEEUncalibRecHitsJitterGt60adc_;
0368      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter gt 60 adc counts;1",meEEUncalibRecHitsJitterGt60adc_);
0369      meEEUncalibRecHitsJitterGt60adc_;
0370      meEEUncalibRecHitsJitterGt60adc_->SetLineColor(rcolor);
0371      
0372      TH1 *meEEUncalibRecHitsChi2Gt60adc_;
0373      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2 gt 60 adc counts;1",meEEUncalibRecHitsChi2Gt60adc_);
0374      meEEUncalibRecHitsChi2Gt60adc_;
0375      meEEUncalibRecHitsChi2Gt60adc_->SetLineColor(rcolor);
0376 
0377      TH1 *meEEUncalibRecHitMaxSampleRatioGt60adc_;
0378      rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio gt 60 adc counts;1",meEEUncalibRecHitMaxSampleRatioGt60adc_);
0379      meEEUncalibRecHitMaxSampleRatioGt60adc_;
0380      meEEUncalibRecHitMaxSampleRatioGt60adc_->SetLineColor(rcolor);
0381 
0382      TH1 *newmeEEUncalibRecHitsAmplitude_;
0383      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude;1",newmeEEUncalibRecHitsAmplitude_);
0384      newmeEEUncalibRecHitsAmplitude_;
0385      newmeEEUncalibRecHitsAmplitude_->SetLineColor(scolor);
0386       
0387      TH1 *newmeEEUncalibRecHitsPedestal_;
0388      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal;1",newmeEEUncalibRecHitsPedestal_);
0389      newmeEEUncalibRecHitsPedestal_;
0390      newmeEEUncalibRecHitsPedestal_->SetLineColor(scolor);
0391      
0392      TH1 *newmeEEUncalibRecHitsJitter_;
0393      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter;1",newmeEEUncalibRecHitsJitter_);
0394      newmeEEUncalibRecHitsJitter_;
0395      newmeEEUncalibRecHitsJitter_->SetLineColor(scolor);
0396      
0397      TH1 *newmeEEUncalibRecHitsChi2_;
0398      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2;1",newmeEEUncalibRecHitsChi2_);
0399      newmeEEUncalibRecHitsChi2_;
0400      newmeEEUncalibRecHitsChi2_->SetLineColor(scolor);
0401       
0402      TH1 *newmeEEUncalibRecHitMaxSampleRatio_;
0403      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio;1",newmeEEUncalibRecHitMaxSampleRatio_);
0404      newmeEEUncalibRecHitMaxSampleRatio_;
0405      newmeEEUncalibRecHitMaxSampleRatio_->SetLineColor(scolor);
0406 
0407      TH1 *newmeEEUncalibRecHitsAmplitudeGt60adc_;
0408      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude gt 60 adc counts;1",newmeEEUncalibRecHitsAmplitudeGt60adc_);
0409      newmeEEUncalibRecHitsAmplitudeGt60adc_;
0410      newmeEEUncalibRecHitsAmplitudeGt60adc_->SetLineColor(scolor);
0411       
0412      TH1 *newmeEEUncalibRecHitsPedestalGt60adc_;
0413      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal gt 60 adc counts;1",newmeEEUncalibRecHitsPedestalGt60adc_);
0414      newmeEEUncalibRecHitsPedestalGt60adc_;
0415      newmeEEUncalibRecHitsPedestalGt60adc_->SetLineColor(scolor);
0416      
0417      TH1 *newmeEEUncalibRecHitsJitterGt60adc_;
0418      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter gt 60 adc counts;1",newmeEEUncalibRecHitsJitterGt60adc_);
0419      newmeEEUncalibRecHitsJitterGt60adc_;
0420      newmeEEUncalibRecHitsJitterGt60adc_->SetLineColor(scolor);
0421      
0422      TH1 *newmeEEUncalibRecHitsChi2Gt60adc_;
0423      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2 gt 60 adc counts;1",newmeEEUncalibRecHitsChi2Gt60adc_);
0424      newmeEEUncalibRecHitsChi2Gt60adc_;
0425      newmeEEUncalibRecHitsChi2Gt60adc_->SetLineColor(scolor);
0426       
0427      TH1 *newmeEEUncalibRecHitMaxSampleRatioGt60adc_;
0428      sfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio gt 60 adc counts;1",newmeEEUncalibRecHitMaxSampleRatioGt60adc_);
0429      newmeEEUncalibRecHitMaxSampleRatioGt60adc_;
0430      newmeEEUncalibRecHitMaxSampleRatioGt60adc_->SetLineColor(scolor);
0431 
0432 
0433       // --------------------------------
0434       TCanvas *Endcap = new TCanvas("Endcap","Endcap",800,800);
0435       Endcap->Divide(3,2);
0436       if ( meEEUncalibRecHitsAmplitude_ && newmeEEUncalibRecHitsAmplitude_ )
0437     {
0438       Endcap->cd(1); 
0439       gPad->SetLogy();  
0440       meEEUncalibRecHitsAmplitude_->Draw(); 
0441 
0442       Endcap->cd(4); 
0443       gPad->SetLogy();  
0444       newmeEEUncalibRecHitsAmplitude_->Draw(); 
0445       myPV->PVCompute( meEEUncalibRecHitsAmplitude_ , newmeEEUncalibRecHitsAmplitude_ , te );       
0446     }
0447 
0448       if ( meEEUncalibRecHitsPedestal_ && newmeEEUncalibRecHitsPedestal_ )
0449     {
0450       Endcap->cd(2);  
0451       meEEUncalibRecHitsPedestal_->Draw(); 
0452 
0453       Endcap->cd(5);  
0454       newmeEEUncalibRecHitsPedestal_->Draw();
0455       myPV->PVCompute( meEEUncalibRecHitsPedestal_ , newmeEEUncalibRecHitsPedestal_ , te );        
0456     }
0457 
0458       if ( meEEUncalibRecHitsJitter_ && newmeEEUncalibRecHitsJitter_ )
0459     {
0460       Endcap->cd(3);  
0461       meEEUncalibRecHitsJitter_->Draw(); 
0462 
0463       Endcap->cd(6);  
0464       newmeEEUncalibRecHitsJitter_->Draw();
0465       myPV->PVCompute( meEEUncalibRecHitsJitter_ , newmeEEUncalibRecHitsJitter_ , te );       
0466     }
0467       Endcap->Print("Endcap_compare.eps");
0468       delete Endcap;
0469 
0470 
0471       TCanvas *EndcapGt60adc = new TCanvas("EndcapGt60adc","EndcapGt60adc",800,800);
0472       EndcapGt60adc->Divide(3,2);
0473       if ( meEEUncalibRecHitsAmplitudeGt60adc_ && newmeEEUncalibRecHitsAmplitudeGt60adc_ )
0474     {
0475       EndcapGt60adc->cd(1); 
0476       gPad->SetLogy();  
0477       meEEUncalibRecHitsAmplitudeGt60adc_->Draw(); 
0478 
0479       EndcapGt60adc->cd(4); 
0480       gPad->SetLogy();  
0481       newmeEEUncalibRecHitsAmplitudeGt60adc_->Draw(); 
0482       myPV->PVCompute( meEEUncalibRecHitsAmplitudeGt60adc_ , newmeEEUncalibRecHitsAmplitudeGt60adc_ , te );       
0483     }
0484 
0485       if ( meEEUncalibRecHitsPedestalGt60adc_ && newmeEEUncalibRecHitsPedestalGt60adc_ )
0486     {
0487       EndcapGt60adc->cd(2);  
0488       meEEUncalibRecHitsPedestalGt60adc_->Draw(); 
0489       myPV->PVCompute( meEEUncalibRecHitsPedestalGt60adc_ , newmeEEUncalibRecHitsPedestalGt60adc_ , te );        
0490 
0491       EndcapGt60adc->cd(5);  
0492       newmeEEUncalibRecHitsPedestalGt60adc_->Draw();
0493       myPV->PVCompute( meEEUncalibRecHitsPedestalGt60adc_ , newmeEEUncalibRecHitsPedestalGt60adc_ , te );        
0494     }
0495 
0496       if ( meEEUncalibRecHitsJitterGt60adc_ && newmeEEUncalibRecHitsJitterGt60adc_ )
0497     {
0498       EndcapGt60adc->cd(3);  
0499       meEEUncalibRecHitsJitterGt60adc_->Draw(); 
0500 
0501       EndcapGt60adc->cd(6);  
0502       newmeEEUncalibRecHitsJitterGt60adc_->Draw();
0503       myPV->PVCompute( meEEUncalibRecHitsJitterGt60adc_ , newmeEEUncalibRecHitsJitterGt60adc_ , te );       
0504     }
0505       EndcapGt60adc->Print("EndcapGt60adc_compare.eps");
0506       delete EndcapGt60adc;
0507    }
0508 
0509 
0510 
0511 
0512 
0513 
0514 
0515  // ----------------------------------------------------------------
0516  cout << endl;
0517  cout << "Preshower validation" << endl;
0518  rfile->cd("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask");
0519  gDirectory->ls();
0520  sfile->cd("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask");
0521  gDirectory->ls();
0522 
0523   
0524  // Preshower validation
0525  if (1) 
0526    {    
0527      TH1 *meESRecHitsEnergy_;
0528      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy;1",meESRecHitsEnergy_);
0529      meESRecHitsEnergy_;
0530      meESRecHitsEnergy_->SetLineColor(rcolor);
0531      
0532      TH1 *meESRecHitsEnergy_zp1st_;
0533      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side+;1",meESRecHitsEnergy_zp1st_);
0534      meESRecHitsEnergy_zp1st_;
0535      meESRecHitsEnergy_zp1st_->SetLineColor(rcolor);
0536 
0537      TH1 *meESRecHitsEnergy_zp2nd_;
0538      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side+;1",meESRecHitsEnergy_zp2nd_);
0539      meESRecHitsEnergy_zp2nd_;
0540      meESRecHitsEnergy_zp2nd_->SetLineColor(rcolor);
0541 
0542      TH1 *meESRecHitsEnergy_zm1st_;
0543      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side-;1",meESRecHitsEnergy_zm1st_);
0544      meESRecHitsEnergy_zm1st_;
0545      meESRecHitsEnergy_zm1st_->SetLineColor(rcolor);
0546 
0547      TH1 *meESRecHitsEnergy_zm2nd_;
0548      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side-;1",meESRecHitsEnergy_zm2nd_);
0549      meESRecHitsEnergy_zm2nd_;
0550      meESRecHitsEnergy_zm2nd_->SetLineColor(rcolor);
0551 
0552      TH1 *meESEERecHitsEnergy_zp_;
0553      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side+;1",meESEERecHitsEnergy_zp_);
0554      meESEERecHitsEnergy_zp_;
0555   
0556      TH1 *meESEERecHitsEnergy_zm_;
0557      rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side-;1",meESEERecHitsEnergy_zm_);
0558      meESEERecHitsEnergy_zm_;
0559 
0560      TH1 *newmeESRecHitsEnergy_;
0561      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy;1",newmeESRecHitsEnergy_);
0562      newmeESRecHitsEnergy_;
0563      newmeESRecHitsEnergy_->SetLineColor(scolor);
0564      
0565      TH1 *newmeESRecHitsEnergy_zp1st_;
0566      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side+;1",newmeESRecHitsEnergy_zp1st_);
0567      newmeESRecHitsEnergy_zp1st_;
0568      newmeESRecHitsEnergy_zp1st_->SetLineColor(scolor);
0569 
0570      TH1 *newmeESRecHitsEnergy_zp2nd_;
0571      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side+;1",newmeESRecHitsEnergy_zp2nd_);
0572      newmeESRecHitsEnergy_zp2nd_;
0573      newmeESRecHitsEnergy_zp2nd_->SetLineColor(scolor);
0574 
0575      TH1 *newmeESRecHitsEnergy_zm1st_;
0576      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side-;1",newmeESRecHitsEnergy_zm1st_);
0577      newmeESRecHitsEnergy_zm1st_;
0578      newmeESRecHitsEnergy_zm1st_->SetLineColor(scolor);
0579 
0580      TH1 *newmeESRecHitsEnergy_zm2nd_;
0581      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side-;1",newmeESRecHitsEnergy_zm2nd_);
0582      newmeESRecHitsEnergy_zm2nd_;
0583      newmeESRecHitsEnergy_zm2nd_->SetLineColor(scolor);
0584 
0585      TH1 *newmeESEERecHitsEnergy_zp_;
0586      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side+;1",newmeESEERecHitsEnergy_zp_);
0587      newmeESEERecHitsEnergy_zp_;
0588   
0589      TH1 *newmeESEERecHitsEnergy_zm_;
0590      sfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side-;1",newmeESEERecHitsEnergy_zm_);
0591      newmeESEERecHitsEnergy_zm_;
0592 
0593      
0594      
0595      // ----------------------------------------------
0596      TCanvas *ESEnergy = new TCanvas("ESEnergy","ESEnergy",800,800);
0597      ESEnergy->Divide(2,2);
0598      if ( meESRecHitsEnergy_zp1st_ && newmeESRecHitsEnergy_zp1st_ )
0599        {
0600      ESEnergy->cd(1); gPad->SetLogy(); 
0601      meESRecHitsEnergy_zp1st   _->Draw(); 
0602      newmeESRecHitsEnergy_zp1st_->Draw("same"); 
0603        }
0604      if ( meESRecHitsEnergy_zp2nd_ && newmeESRecHitsEnergy_zp2nd_ )
0605        {
0606      ESEnergy->cd(2); gPad->SetLogy(); 
0607      meESRecHitsEnergy_zp2nd_   ->Draw(); 
0608      newmeESRecHitsEnergy_zp2nd_->Draw("same"); 
0609        }
0610      if ( meESRecHitsEnergy_zm1st_ && newmeESRecHitsEnergy_zm1st_ )
0611        {
0612      ESEnergy->cd(3); gPad->SetLogy(); 
0613      meESRecHitsEnergy_zm1st_   ->Draw(); 
0614      newmeESRecHitsEnergy_zm1st_->Draw("same"); 
0615        }
0616      if ( meESRecHitsEnergy_zm2nd_ && newmeESRecHitsEnergy_zm2nd_ )
0617        {
0618      ESEnergy->cd(4); gPad->SetLogy(); 
0619      meESRecHitsEnergy_zm2nd_   ->Draw(); 
0620      newmeESRecHitsEnergy_zm2nd_->Draw("same"); 
0621        }
0622      ESEnergy->Print("PreshowerEnergy_compare.eps");
0623      delete ESEnergy;
0624    }
0625  
0626  
0627 }
0628