Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "TFile.h"
0002 #include "TTree.h"
0003 #include "TText.h"
0004 
0005 void EcalSimHitsPlotCompare( TString currentfile   = "EcalSimHitsValidation_new.root",
0006                              TString referencefile = "EcalSimHitsValidation_old.root" )
0007 {
0008   
0009   gROOT ->Reset();
0010   char*  rfilename = referencefile ;
0011   char*  sfilename = currentfile ;
0012   
0013   int rcolor = 2;      // new plots
0014   int scolor = 4;      // old plots
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/EcalHitsV/EcalSimHitsValidation");
0025   gDirectory->ls();
0026   
0027   sfile->cd("DQMData/EcalHitsV/EcalSimHitsValidation");
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 
0040   // Particle Gun 
0041   if (1) {
0042     TCanvas *Ecal = new TCanvas("Ecal","Ecal",800,1000);
0043     Ecal->Divide(1,3);
0044     
0045     TH1 *meGunEnergy_;
0046     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Gun Momentum;1", meGunEnergy_);
0047     meGunEnergy_;
0048     meGunEnergy_->SetLineColor(rcolor);
0049     
0050     TH1 *meGunEta_;
0051     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Gun Eta;1", meGunEta_);
0052     meGunEta_;
0053     meGunEta_->SetLineColor(rcolor);
0054     
0055     TH1 *meGunPhi_; 
0056     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Gun Phi;1", meGunPhi_);
0057     meGunPhi_; 
0058     meGunPhi_->SetLineColor(rcolor); 
0059     
0060     TH1 *newmeGunEnergy_;
0061     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Gun Momentum;1", newmeGunEnergy_);
0062     newmeGunEnergy_;
0063     newmeGunEnergy_->SetLineColor(scolor);
0064     
0065     TH1 *newmeGunEta_;
0066     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Gun Eta;1", newmeGunEta_);
0067     newmeGunEta_;
0068     newmeGunEta_->SetLineColor(scolor);
0069     
0070     TH1 *newmeGunPhi_; 
0071     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Gun Phi;1", newmeGunPhi_);
0072     newmeGunPhi_; 
0073     newmeGunPhi_->SetLineColor(scolor); 
0074     
0075     
0076     Ecal->cd(1); 
0077     if ( meGunEnergy_ && newmeGunEnergy_ ) {
0078       meGunEnergy_   ->Draw(); 
0079       newmeGunEnergy_->Draw("same"); 
0080       myPV->PVCompute(meGunEnergy_ , newmeGunEnergy_ , te);
0081     }
0082     Ecal->cd(2); 
0083     if ( meGunEta_ && newmeGunEta_ ) {
0084       meGunEta_   ->Draw(); 
0085       newmeGunEta_->Draw("same"); 
0086       myPV->PVCompute(meGunEta_ , newmeGunEta_ , te);
0087     }
0088     Ecal->cd(3); 
0089     if ( meGunPhi_ && newmeGunPhi_ ) {
0090       meGunPhi_   ->Draw(); 
0091       newmeGunPhi_->Draw("same"); 
0092       myPV->PVCompute(meGunPhi_ , newmeGunPhi_ , te);
0093     }
0094     Ecal->Print("ParticleGun_compare.eps"); 
0095   }
0096 
0097   // Relative energy fraction
0098   if (1) {
0099     TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0100     Ecal->Divide(1,3);
0101     
0102     TH1 *meEBEnergyFraction_;
0103     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Barrel fraction of energy;1",meEBEnergyFraction_);
0104     meEBEnergyFraction_;
0105     meEBEnergyFraction_->SetLineColor(rcolor);
0106     
0107     TH1 *meEEEnergyFraction_;
0108     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Endcap fraction of energy;1",meEEEnergyFraction_);
0109     meEEEnergyFraction_;
0110     meEEEnergyFraction_->SetLineColor(rcolor);
0111     
0112     TH1 *meESEnergyFraction_;
0113     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Preshower fraction of energy;1",meESEnergyFraction_);
0114     meESEnergyFraction_;
0115     meESEnergyFraction_->SetLineColor(rcolor);
0116 
0117     TH1 *newmeEBEnergyFraction_;
0118     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Barrel fraction of energy;1",newmeEBEnergyFraction_);
0119     newmeEBEnergyFraction_;
0120     newmeEBEnergyFraction_->SetLineColor(scolor);
0121     
0122     TH1 *newmeEEEnergyFraction_;
0123     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Endcap fraction of energy;1",newmeEEEnergyFraction_);
0124     newmeEEEnergyFraction_;
0125     newmeEEEnergyFraction_->SetLineColor(scolor);
0126     
0127     TH1 *newmeESEnergyFraction_;
0128     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EcalSimHitsValidation Preshower fraction of energy;1",newmeESEnergyFraction_);
0129     newmeESEnergyFraction_;
0130     newmeESEnergyFraction_->SetLineColor(scolor);
0131     
0132     Ecal->cd(1); 
0133     if (meEBEnergyFraction_ && newmeEBEnergyFraction_) {
0134       meEBEnergyFraction_   ->Draw();
0135       newmeEBEnergyFraction_->Draw("same");
0136       myPV->PVCompute(meEBEnergyFraction_, newmeEBEnergyFraction_, te);
0137     }
0138     
0139     Ecal->cd(2); 
0140     if (meEEEnergyFraction_ && newmeEEEnergyFraction_) {
0141       meEEEnergyFraction   _->Draw();
0142       newmeEEEnergyFraction_->Draw("same");
0143       myPV->PVCompute(meEEEnergyFraction_, newmeEEEnergyFraction_, te);
0144     }
0145     
0146     Ecal->cd(3); 
0147     if (meESEnergyFraction_ && newmeESEnergyFraction_) {
0148       meESEnergyFraction_   ->Draw();
0149       newmeESEnergyFraction_->Draw("same");
0150       myPV->PVCompute(meESEnergyFraction_, newmeESEnergyFraction_, te);
0151     }
0152     
0153     Ecal->Print("RelativeEnergyFraction_compare.eps");
0154   }
0155 
0156   // Hits multiplicity
0157   if (1) {
0158     TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0159     Ecal->Divide(1,3);
0160     
0161     TH1 * meEBHits_;
0162     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB hits multiplicity;1",meEBHits_);
0163     meEBHits_;
0164     meEBHits_->SetLineColor(rcolor);
0165     
0166     TH1 * meEEzpHits_;
0167     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE+ hits multiplicity;1",meEEzpHits_);
0168     meEEzpHits_;
0169     meEEzpHits_->SetLineColor(rcolor);
0170 
0171     TH1 * meEEzmHits_;
0172     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE- hits multiplicity;1",meEEzmHits_);
0173     meEEzmHits_;
0174     meEEzmHits_->SetLineColor(rcolor);
0175     
0176     TH1 * newmeEBHits_;
0177     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB hits multiplicity;1",newmeEBHits_);
0178     newmeEBHits_;
0179     newmeEBHits_->SetLineColor(scolor);
0180     
0181     TH1 * newmeEEzpHits_;
0182     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE+ hits multiplicity;1",newmeEEzpHits_);
0183     newmeEEzpHits_;
0184     newmeEEzpHits_->SetLineColor(scolor);
0185 
0186     TH1 * newmeEEzmHits_;
0187     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE- hits multiplicity;1",newmeEEzmHits_);
0188     newmeEEzmHits_;
0189     newmeEEzmHits_->SetLineColor(scolor);
0190     
0191     Ecal->cd(1); 
0192     if (meEBHits_ && newmeEBHits_) {
0193       meEBHits_   ->Draw();
0194       newmeEBHits_->Draw("same");
0195       myPV->PVCompute(meEBHits_, newmeEBHits_, te);
0196     }
0197 
0198     Ecal->cd(2); 
0199     if (meEEzpHits_ && newmeEEzpHits_) {
0200       meEEzpHits_   ->Draw();
0201       newmeEEzpHits_->Draw("same");
0202       myPV->PVCompute(meEEzpHits_, newmeEEzpHits_, te);
0203     }
0204 
0205    Ecal->cd(3); 
0206     if (meEEzmHits_ && newmeEEzmHits_) {
0207       meEEzmHits_   ->Draw();
0208       newmeEEzmHits_->Draw("same");
0209       myPV->PVCompute(meEEzmHits_, newmeEEzmHits_, te);
0210     }
0211     
0212     Ecal->Print("HitsNumber_compare.eps");
0213   }
0214   
0215   
0216   // Crystals multiplicity
0217   if (1) {
0218     TCanvas *Ecal = new TCanvas("Ecal","Ecal",800,1000);
0219     Ecal->Divide(1,3);
0220     
0221     TH1 *meEBCrystals_;
0222     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB crystals multiplicity;1",meEBCrystals_);
0223     meEBCrystals_;
0224     meEBCrystals_->SetLineColor(rcolor);
0225     
0226     TH1 *meEEzpCrystals_;
0227     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE+ crystals multiplicity;1",meEEzpCrystals_);
0228     meEEzpCrystals_;
0229     meEEzpCrystals_->SetLineColor(rcolor);
0230     
0231     TH1 *meEEzmCrystals_;
0232     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE- crystals multiplicity;1",meEEzmCrystals_);
0233     meEEzmCrystals_;
0234     meEEzmCrystals_->SetLineColor(rcolor);
0235     
0236     TH1 *newmeEBCrystals_;
0237     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB crystals multiplicity;1",newmeEBCrystals_);
0238     newmeEBCrystals_;
0239     newmeEBCrystals_->SetLineColor(scolor);
0240     
0241     TH1 *newmeEEzpCrystals_;
0242     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE+ crystals multiplicity;1",newmeEEzpCrystals_);
0243     newmeEEzpCrystals_;
0244     newmeEEzpCrystals_->SetLineColor(scolor);
0245     
0246     TH1 *newmeEEzmCrystals_;
0247     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE- crystals multiplicity;1",newmeEEzmCrystals_);
0248     newmeEEzmCrystals_;
0249     newmeEEzmCrystals_->SetLineColor(scolor);
0250   
0251     Ecal->cd(1); 
0252     if (meEBCrystals_ && newmeEBCrystals_) {
0253       meEBCrystals_   ->Draw();
0254       newmeEBCrystals_->Draw("same");
0255       myPV->PVCompute(meEBCrystals_, newmeEBCrystals_, te);
0256     }
0257     
0258     Ecal->cd(2); 
0259     if (meEEzpCrystals_ && newmeEEzpCrystals_ ) {
0260       meEEzpCrystals_   ->Draw();
0261       newmeEEzpCrystals_->Draw("same");
0262       myPV->PVCompute(meEEzpCrystals_, newmeEEzpCrystals_, te);
0263     }
0264     
0265     Ecal->cd(3); 
0266     if (meEEzmCrystals_ && newmeEEzmCrystals_) {
0267       gPad->SetLogy();
0268       meEEzmCrystals_   ->Draw();
0269       newmeEEzmCrystals_->Draw("same");
0270       myPV->PVCompute(meEEzmCrystals_, newmeEEzmCrystals_, te);
0271     }
0272     
0273     Ecal->Print("CrystalsNumber_compare.eps");
0274   }
0275   
0276   
0277   // Barrel occupancy
0278   if (1) {
0279     TCanvas *Ecal = new TCanvas("Ecal","Ecal",800,1000);
0280     Ecal->Divide(1,2);
0281     
0282     TH2 *meEBoccupancy_;
0283     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB occupancy;1",meEBoccupancy_);
0284     meEBoccupancy_;
0285     
0286     TH2 *newmeEBoccupancy_;
0287     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB occupancy;1",newmeEBoccupancy_);
0288     newmeEBoccupancy_;
0289     
0290     if (meEBoccupancy_ && newmeEBoccupancy_){ 
0291       Ecal->cd(1);
0292       meEBoccupancy_->Draw("colz");
0293       Ecal->cd(2);
0294       newmeEBoccupancy_->Draw("colz");
0295       myPV->PVCompute(meEBoccupancy_ , newmeEBoccupancy_ , te);
0296     }
0297     Ecal->Print("Barrel_Occupancy_compare.eps");
0298   }
0299 
0300 
0301   // Endcap occupancy
0302   if (1) {
0303     TCanvas *Ecal = new TCanvas("Ecal","Ecal",800,1000);
0304     Ecal->Divide(2,2);
0305     
0306     TH2 *meEEzpOccupancy_;
0307     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE+ occupancy",meEEzpOccupancy_);
0308     meEEzpOccupancy_;
0309 
0310     TH2 *meEEzmOccupancy_;
0311     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE- occupancy",meEEzmOccupancy_);
0312     meEEzmOccupancy_;
0313     
0314     TH2 *newmeEEzpOccupancy_;
0315     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE+ occupancy",newmeEEzpOccupancy_);
0316     newmeEEzpOccupancy_;
0317 
0318     TH2 *newmeEEzmOccupancy_;
0319     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE- occupancy",newmeEEzmOccupancy_);
0320     newmeEEzmOccupancy_;
0321     
0322     if (meEEzpOccupancy_ && newmeEEzpOccupancy_){ 
0323       Ecal->cd(1);
0324       meEEzpOccupancy_->Draw("colz");
0325       Ecal->cd(2);
0326       newmeEEzpOccupancy_->Draw("colz");
0327       myPV->PVCompute(meEEzpOccupancy_ , newmeEEzpOccupancy_ , te);
0328     }
0329 
0330     if (meEEzmOccupancy_ && newmeEEzmOccupancy_){ 
0331       Ecal->cd(3);
0332       meEEzmOccupancy_->Draw("colz");
0333       Ecal->cd(4);
0334       newmeEEzmOccupancy_->Draw("colz");
0335       myPV->PVCompute(meEEzmOccupancy_ , newmeEEzmOccupancy_ , te);
0336     }
0337     Ecal->Print("Endcap_Occupancy_compare.eps");
0338   }
0339 
0340 
0341   // longitudinal shower profile
0342   if (1) {
0343     TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0344     Ecal->Divide(1,2);
0345     
0346     TProfile *meEBLongitudinalShower_;
0347     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB longitudinal shower profile;1",meEBLongitudinalShower_);
0348     meEBLongitudinalShower_;
0349     meEBLongitudinalShower_->SetLineColor(rcolor);
0350     
0351     TProfile *meEELongitudinalShower_;
0352     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE longitudinal shower profile;1",meEELongitudinalShower_);
0353     meEELongitudinalShower_;
0354     meEELongitudinalShower_->SetLineColor(rcolor);
0355     
0356     TProfile *newmeEBLongitudinalShower_;
0357     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB longitudinal shower profile;1",newmeEBLongitudinalShower_);
0358     newmeEBLongitudinalShower_;
0359     newmeEBLongitudinalShower_->SetLineColor(scolor);
0360     
0361     TProfile *newmeEELongitudinalShower_;
0362     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE longitudinal shower profile;1",newmeEELongitudinalShower_);
0363     newmeEELongitudinalShower_;
0364     newmeEELongitudinalShower_->SetLineColor(scolor);
0365     
0366     Ecal->cd(1);
0367     if ( meEBLongitudinalShower_ && newmeEBLongitudinalShower_ ) {
0368       meEBLongitudinalShower_   ->Draw();
0369       newmeEBLongitudinalShower_->Draw("same");
0370       myPV->PVCompute(meEBLongitudinalShower_, newmeEBLongitudinalShower_, te);
0371     }
0372     Ecal->cd(2);
0373     if ( meEELongitudinalShower_ && newmeEELongitudinalShower_ ) {
0374       meEELongitudinalShower_   ->Draw();
0375       newmeEELongitudinalShower_->Draw("same");
0376       myPV->PVCompute(meEELongitudinalShower_, newmeEELongitudinalShower_, te);
0377     }
0378     Ecal->Print("LongitudinalShowerProfile_compare.eps");
0379   }
0380    
0381   // hits energy spectrum
0382   if (1) {
0383     TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0384     Ecal->Divide(1,3);
0385     
0386     TH1 *meEBhitEnergy_; 
0387     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB hits energy spectrum;1",meEBhitEnergy_);
0388     meEBhitEnergy_; 
0389     meEBhitEnergy_->SetLineColor(rcolor);
0390     
0391     TH1 *meEEzpHitEnergy_; 
0392     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE+ hits energy spectrum;1",meEEzpHitEnergy_);
0393     meEEzpHitEnergy_; 
0394     meEEzpHitEnergy_->SetLineColor(rcolor);
0395 
0396     TH1 *meEEzmHitEnergy_; 
0397     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE- hits energy spectrum;1",meEEzmHitEnergy_);
0398     meEEzmHitEnergy_; 
0399     meEEzmHitEnergy_->SetLineColor(rcolor);
0400     
0401     TH1 *newmeEBhitEnergy_; 
0402     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB hits energy spectrum;1",newmeEBhitEnergy_);
0403     newmeEBhitEnergy_; 
0404     newmeEBhitEnergy_->SetLineColor(scolor);
0405     
0406     TH1 *newmeEEzpHitEnergy_; 
0407     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE+ hits energy spectrum;1",newmeEEzpHitEnergy_);
0408     newmeEEzpHitEnergy_; 
0409     newmeEEzpHitEnergy_->SetLineColor(scolor);
0410 
0411     TH1 *newmeEEzmHitEnergy_; 
0412     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE- hits energy spectrum;1",newmeEEzmHitEnergy_);
0413     newmeEEzmHitEnergy_; 
0414     newmeEEzmHitEnergy_->SetLineColor(scolor);
0415 
0416     Ecal->cd(1);
0417     if ( meEBhitEnergy_ && newmeEBhitEnergy_){
0418       gPad->SetLogy();
0419       meEBhitEnergy_   ->Draw();
0420       newmeEBhitEnergy_->Draw("same");
0421       myPV->PVCompute(meEBhitEnergy_, newmeEBhitEnergy_, te);
0422     }
0423 
0424     Ecal->cd(2);
0425     if ( meEEzpHitEnergy_ && newmeEEzpHitEnergy_){
0426       gPad->SetLogy();
0427       meEEzpHitEnergy_   ->Draw();
0428       newmeEEzpHitEnergy_->Draw("same");
0429       myPV->PVCompute(meEEzpHitEnergy_, newmeEEzpHitEnergy_, te);
0430     }
0431 
0432     Ecal->cd(3);
0433     if ( meEEzmHitEnergy_ && newmeEEzmHitEnergy_){
0434       gPad->SetLogy();
0435       meEEzmHitEnergy_   ->Draw();
0436       newmeEEzmHitEnergy_->Draw("same");
0437       myPV->PVCompute(meEEzmHitEnergy_, newmeEEzmHitEnergy_, te);
0438     }
0439     Ecal->Print("HitsEnergySpectrum_compare.eps");
0440   }
0441 
0442   if (1) {
0443     TH1 *meEBe1_; 
0444     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E1;1",meEBe1_);
0445     meEBe1_; 
0446     meEBe1_->SetLineColor(rcolor);
0447     
0448     TH1 *meEBe4_; 
0449     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E4;1",meEBe4_);
0450     meEBe4_; 
0451     meEBe4_->SetLineColor(rcolor);
0452     
0453     TH1 *meEBe9_; 
0454     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E9;1",meEBe9_);
0455     meEBe9_; 
0456     meEBe9_->SetLineColor(rcolor);
0457     
0458     TH1 *meEBe16_; 
0459     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E16;1",meEBe16_);
0460     meEBe16_; 
0461     meEBe16_->SetLineColor(rcolor);
0462     
0463     TH1 *meEBe25_; 
0464     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E25;1",meEBe25_);
0465     meEBe25_; 
0466     meEBe25_->SetLineColor(rcolor);
0467 
0468     TH1 *newmeEBe1_; 
0469     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E1;1",newmeEBe1_);
0470     newmeEBe1_; 
0471     newmeEBe1_->SetLineColor(scolor);
0472     
0473     TH1 *newmeEBe4_; 
0474     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E4;1",newmeEBe4_);
0475     newmeEBe4_; 
0476     newmeEBe4_->SetLineColor(scolor);
0477     
0478     TH1 *newmeEBe9_; 
0479     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E9;1",newmeEBe9_);
0480     newmeEBe9_; 
0481     newmeEBe9_->SetLineColor(scolor);
0482     
0483     TH1 *newmeEBe16_; 
0484     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E16;1",newmeEBe16_);
0485     newmeEBe16_; 
0486     newmeEBe16_->SetLineColor(scolor);
0487     
0488     TH1 *newmeEBe25_; 
0489     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E25;1",newmeEBe25_);
0490     newmeEBe25_; 
0491     newmeEBe25_->SetLineColor(scolor);
0492     
0493     TCanvas *Ecal1 = new TCanvas("Ecal1","Ecal1",800,1000);
0494     if ( meEBe1_ && newmeEBe1_){ 
0495       gPad->SetLogy();
0496       meEBe1_   ->Draw();
0497       newmeEBe1_->Draw("same");
0498       myPV->PVCompute(meEBe1_, newmeEBe1_, te);
0499     }
0500     Ecal1->Print("EB1x1_compare.eps");
0501     
0502     TCanvas *Ecal4 = new TCanvas("Ecal4","Ecal4",800,1000);
0503     if ( meEBe4_ && newmeEBe4_){ 
0504       gPad->SetLogy();
0505       meEBe4_   ->Draw();
0506       newmeEBe4_->Draw("same");
0507       myPV->PVCompute(meEBe4_, newmeEBe4_, te);
0508     }
0509     Ecal4->Print("EB2x2_compare.eps");
0510     
0511     TCanvas *Ecal9 = new TCanvas("Ecal9","Ecal9",800,1000);
0512     if ( meEBe9_ && newmeEBe9_){ 
0513       gPad->SetLogy();
0514       meEBe9_   ->Draw();
0515       newmeEBe9_->Draw("same");
0516       myPV->PVCompute(meEBe9_, newmeEBe9_, te);
0517     }
0518     Ecal9->Print("EB3x3_compare.eps");
0519 
0520     TCanvas *Ecal16 = new TCanvas("Ecal16","Ecal16",800,1000);
0521     if ( meEBe16_ && newmeEBe16_){ 
0522       gPad->SetLogy();
0523       meEBe16  _ ->Draw();
0524       newmeEBe16_->Draw("same");
0525       myPV->PVCompute(meEBe16_, newmeEBe16_, te);
0526     }
0527     Ecal16->Print("EB4x4_compare.eps");
0528     
0529     TCanvas * Ecal25 = new TCanvas("Ecal25","Ecal25",800,1000);
0530     if ( meEBe25_ && newmeEBe25_){ 
0531       gPad->SetLogy();
0532       meEBe25_   ->Draw();
0533       newmeEBe25_->Draw("same");
0534       myPV->PVCompute(meEBe25_, newmeEBe25_, te);
0535     }
0536     Ecal25->Print("EB5x5_compare.eps");
0537   }
0538 
0539   
0540   if (1) {
0541     TH1 *meEEe1_; 
0542     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E1;1",meEEe1_);
0543     meEEe1_; 
0544     meEEe1_->SetLineColor(rcolor);
0545     
0546     TH1 *meEEe4_; 
0547     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E4;1",meEEe4_);
0548     meEEe4_; 
0549     meEEe4_->SetLineColor(rcolor);
0550     
0551     TH1 *meEEe9_; 
0552     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E9;1",meEEe9_);
0553     meEEe9_; 
0554     meEEe9_->SetLineColor(rcolor);
0555     
0556     TH1 *meEEe16_; 
0557     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E16;1",meEEe16_);
0558     meEEe16_; 
0559     meEEe16_->SetLineColor(rcolor);
0560     
0561     TH1 *meEEe25_; 
0562     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E25;1",meEEe25_);
0563     meEEe25_; 
0564     meEEe25_->SetLineColor(rcolor);
0565 
0566     TH1 *newmeEEe1_; 
0567     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E1;1",newmeEEe1_);
0568     newmeEEe1_; 
0569     newmeEEe1_->SetLineColor(scolor);
0570     
0571     TH1 *newmeEEe4_; 
0572     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E4;1",newmeEEe4_);
0573     newmeEEe4_; 
0574     newmeEEe4_->SetLineColor(scolor);
0575     
0576     TH1 *newmeEEe9_; 
0577     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E9;1",newmeEEe9_);
0578     newmeEEe9_; 
0579     newmeEEe9_->SetLineColor(scolor);
0580     
0581     TH1 *newmeEEe16_; 
0582     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E16;1",newmeEEe16_);
0583     newmeEEe16_; 
0584     newmeEEe16_->SetLineColor(scolor);
0585     
0586     TH1 *newmeEEe25_; 
0587     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E25;1",newmeEEe25_);
0588     newmeEEe25_; 
0589     newmeEEe25_->SetLineColor(scolor);
0590 
0591     TCanvas *Ecal1 = new TCanvas("Ecal1","Ecal1",800,1000);
0592     if ( meEEe1_ && newmeEEe1_){ 
0593       gPad->SetLogy();
0594       meEEe1_   ->Draw();
0595       newmeEEe1_->Draw("same");
0596       myPV->PVCompute(meEEe1_, newmeEEe1_, te);
0597     }
0598     Ecal1->Print("EE1x1_compare.eps");
0599 
0600     TCanvas *Ecal4 = new TCanvas("Ecal4","Ecal4",800,1000);
0601     if ( meEEe4_ && newmeEEe4_){ 
0602       gPad->SetLogy();
0603       meEEe4_   ->Draw();
0604       newmeEEe4_->Draw("same");
0605       myPV->PVCompute(meEEe4_, newmeEEe4_, te);
0606     }
0607     Ecal4->Print("EE2x2_compare.eps");
0608     
0609     TCanvas *Ecal9 = new TCanvas("Ecal9","Ecal9",800,1000);
0610     if ( meEEe9_ && newmeEEe9_){ 
0611       gPad->SetLogy();
0612       meEEe9_   ->Draw();
0613       newmeEEe9_->Draw("same");
0614       myPV->PVCompute(meEEe9_, newmeEEe9_, te);
0615     }
0616     Ecal9->Print("EE3x3_compare.eps");
0617     
0618     TCanvas *Ecal16 = new TCanvas("Ecal16","Ecal16",800,1000);
0619     if ( meEEe16_ && newmeEEe16_){ 
0620       gPad->SetLogy();
0621       meEEe16  _ ->Draw();
0622       newmeEEe16_->Draw("same");
0623       myPV->PVCompute(meEEe16_, newmeEEe16_, te);
0624     }
0625     Ecal16->Print("EE4x4_compare.eps");
0626     
0627     TCanvas *Ecal25 = new TCanvas("Ecal25","Ecal25",800,1000);
0628     if ( meEEe25_ && newmeEEe25_){ 
0629       gPad->SetLogy();
0630       meEEe25 _  ->Draw();
0631       newmeEEe25_->Draw("same");
0632       myPV->PVCompute(meEEe25_, newmeEEe25_, te);
0633     }
0634     Ecal25->Print("EE5x5_compare.eps");
0635   }
0636 
0637 
0638   if (1) {
0639     TH1 *meEBe1oe4_; 
0640     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E1oE4;1",meEBe1oe4_);
0641     meEBe1oe4_; 
0642     meEBe1oe4_->SetLineColor(rcolor);
0643     
0644     TH1 *meEBe4oe9_; 
0645     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E4oE9;1",meEBe4oe9_);
0646     meEBe4oe9_; 
0647     meEBe4oe9_->SetLineColor(rcolor);
0648     
0649     TH1 *meEBe9oe16_; 
0650     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E9oE16;1",meEBe9oe16_);
0651     meEBe9oe16_; 
0652     meEBe9oe16_->SetLineColor(rcolor);
0653 
0654     TH1 *meEBe1oe25_; 
0655     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E1oE25;1",meEBe1oe25_);
0656     meEBe1oe25_; 
0657     meEBe1oe25_->SetLineColor(rcolor);
0658     
0659     TH1 *meEBe9oe25_; 
0660     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E9oE25;1",meEBe9oe25_);
0661     meEBe9oe25_; 
0662     meEBe9oe25_->SetLineColor(rcolor);
0663     
0664     TH1 *meEBe16oe25_; 
0665     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E16oE25;1",meEBe16oe25_);
0666     meEBe16oe25_; 
0667     meEBe16oe25_->SetLineColor(rcolor);
0668    
0669     TH1 *newmeEBe1oe4_; 
0670     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E1oE4;1",newmeEBe1oe4_);
0671     newmeEBe1oe4_; 
0672     newmeEBe1oe4_->SetLineColor(scolor);
0673     
0674     TH1 *newmeEBe4oe9_; 
0675     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E4oE9;1",newmeEBe4oe9_);
0676     newmeEBe4oe9_; 
0677     newmeEBe4oe9_->SetLineColor(scolor);
0678     
0679     TH1 *newmeEBe9oe16_; 
0680     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E9oE16;1",newmeEBe9oe16_);
0681     newmeEBe9oe16_; 
0682     newmeEBe9oe16_->SetLineColor(scolor);
0683 
0684     TH1 *newmeEBe1oe25_; 
0685     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E1oE25;1",newmeEBe1oe25_);
0686     newmeEBe1oe25_; 
0687     newmeEBe1oe25_->SetLineColor(scolor);
0688     
0689     TH1 *newmeEBe9oe25_; 
0690     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E9oE25;1",newmeEBe9oe25_);
0691     newmeEBe9oe25_; 
0692     newmeEBe9oe25_->SetLineColor(scolor);
0693     
0694     TH1 *newmeEBe16oe25_; 
0695     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EB E16oE25;1",newmeEBe16oe25_);
0696     newmeEBe16oe25_; 
0697     newmeEBe16oe25_->SetLineColor(scolor);
0698   
0699     TH1 *meEEe1oe4_; 
0700     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E1oE4;1",meEEe1oe4_);
0701     meEEe1oe4_; 
0702     meEEe1oe4_->SetLineColor(rcolor);
0703     
0704     TH1 *meEEe4oe9_; 
0705     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E4oE9;1",meEEe4oe9_);
0706     meEEe4oe9_; 
0707     meEEe4oe9_->SetLineColor(rcolor);
0708     
0709     TH1 *meEEe9oe16_; 
0710     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E9oE16;1",meEEe9oe16_);
0711     meEEe9oe16_; 
0712     meEEe9oe16_->SetLineColor(rcolor);
0713 
0714     TH1 *meEEe1oe25_; 
0715     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E1oE25;1",meEEe1oe25_);
0716     meEEe1oe25_; 
0717     meEEe1oe25_->SetLineColor(rcolor);
0718     
0719     TH1 *meEEe9oe25_; 
0720     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E9oE25;1",meEEe9oe25_);
0721     meEEe9oe25_; 
0722     meEEe9oe25_->SetLineColor(rcolor);
0723     
0724     TH1 *meEEe16oe25_; 
0725     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E16oE25;1",meEEe16oe25_);
0726     meEEe16oe25_; 
0727     meEEe16oe25_->SetLineColor(rcolor);
0728     
0729     TH1 *newmeEEe1oe4_; 
0730     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E1oE4;1",newmeEEe1oe4_);
0731     newmeEEe1oe4_; 
0732     newmeEEe1oe4_->SetLineColor(scolor);
0733     
0734     TH1 *newmeEEe4oe9_; 
0735     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E4oE9;1",newmeEEe4oe9_);
0736     newmeEEe4oe9_; 
0737     newmeEEe4oe9_->SetLineColor(scolor);
0738     
0739     TH1 *newmeEEe9oe16_; 
0740     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E9oE16;1",newmeEEe9oe16_);
0741     newmeEEe9oe16_; 
0742     newmeEEe9oe16_->SetLineColor(scolor);
0743     
0744     TH1 *newmeEEe1oe25_; 
0745     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E1oE25;1",newmeEEe1oe25_);
0746     newmeEEe1oe25_; 
0747     newmeEEe1oe25_->SetLineColor(scolor);
0748     
0749     TH1 *newmeEEe9oe25_; 
0750     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E9oE25;1",newmeEEe9oe25_);
0751     newmeEEe9oe25_; 
0752     newmeEEe9oe25_->SetLineColor(scolor);
0753 
0754     TH1 *newmeEEe16oe25_; 
0755     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE E16oE25;1",newmeEEe16oe25_);
0756     newmeEEe16oe25_; 
0757     newmeEEe16oe25_->SetLineColor(scolor);
0758   
0759 
0760     TCanvas *EcalEB1o4 = new TCanvas("EcalEB1o4","EcalEB1o4",800,1000);
0761     if ( meEBe1oe4_ && newmeEBe1oe4_){ 
0762       meEBe1oe4_   ->Draw();
0763       newmeEBe1oe4_->Draw("same");
0764       myPV->PVCompute(meEBe1oe4_, newmeEBe1oe4_, te);
0765     }
0766     EcalEB1o4->Print("EB1o4_compare.eps");
0767 
0768     TCanvas *EcalEB4o9 = new TCanvas("EcalEB4o9","EcalEB4o9",800,1000);
0769     if ( meEBe4oe9_ && newmeEBe4oe9_){ 
0770       meEBe4oe9_   ->Draw();
0771       newmeEBe4oe9_->Draw("same");
0772       myPV->PVCompute(meEBe4oe9_, newmeEBe4oe9_, te);
0773     }
0774     EcalEB4o9->Print("EB4o9_compare.eps");
0775 
0776     TCanvas *EcalEB9o16 = new TCanvas("EcalEB9o16","EcalEB9o16",800,1000);
0777     if ( meEBe9oe16_ && newmeEBe9oe16_){ 
0778       meEBe9oe16_   ->Draw();
0779       newmeEBe9oe16_->Draw("same");
0780       myPV->PVCompute(meEBe9oe16_, newmeEBe9oe16_, te);
0781     }
0782     EcalEB9o16->Print("EB9o16_compare.eps");
0783 
0784     TCanvas *EcalEB16o25 = new TCanvas("EcalEB16o25","EcalEB16o25",800,1000);
0785     if ( meEBe16oe25_ && newmeEBe16oe25_){ 
0786       meEBe16oe25_   ->Draw();
0787       newmeEBe16oe25_->Draw("same");
0788       myPV->PVCompute(meEBe16oe25_, newmeEBe16oe25_, te);
0789     }
0790     EcalEB16o25->Print("EB16o25_compare.eps");
0791    
0792     TCanvas *EcalEB9o25 = new TCanvas("EcalEB9o25","EcalEB9o25",800,1000);
0793     if ( meEBe9oe25_ && newmeEBe9oe25_){ 
0794       meEBe9oe25_   ->Draw();
0795       newmeEBe9oe25_->Draw("same");
0796       myPV->PVCompute(meEBe9oe25_, newmeEBe9oe25_, te);
0797     }
0798     EcalEB9o25->Print("EB9o25_compare.eps");
0799     
0800     TCanvas *EcalEE1o4 = new TCanvas("EcalEE1o4","EcalEE1o4",800,1000);
0801     if ( meEEe1oe4_ && newmeEEe1oe4_){ 
0802       meEEe1oe4_   ->Draw();
0803       newmeEEe1oe4_->Draw("same");
0804       myPV->PVCompute(meEEe1oe4_, newmeEEe1oe4_, te);
0805     }
0806     EcalEE1o4->Print("EE1o4_compare.eps");
0807     
0808     TCanvas * EcalEE4o9 = new TCanvas("EcalEE4o9","EcalEE4o9",800,1000);
0809     if ( meEEe4oe9_ && newmeEEe4oe9_){ 
0810       meEEe4oe9_   ->Draw();
0811       newmeEEe4oe9_->Draw("same");
0812       myPV->PVCompute(meEEe4oe9_, newmeEEe4oe9_, te);
0813     }
0814     EcalEE4o9->Print("EE4o9_compare.eps");
0815 
0816     TCanvas * EcalEE9o16 = new TCanvas("EcalEE9o16","EcalEE9o16",800,1000);
0817     if ( meEEe9oe16_ && newmeEEe9oe16_){ 
0818       meEEe9oe16_   ->Draw();
0819       newmeEEe9oe16_->Draw("same");
0820       myPV->PVCompute(meEEe9oe16_, newmeEEe9oe16_, te);
0821     }
0822     EcalEE9o16->Print("EE9o16_compare.eps");
0823     
0824     TCanvas * EcalEE16o25 = new TCanvas("EcalEE16o25","EcalEE16o25",800,1000);
0825     if ( meEEe16oe25_ && newmeEEe16oe25_){ 
0826       meEEe16oe25_   ->Draw();
0827       newmeEEe16oe25_->Draw("same");
0828       myPV->PVCompute(meEEe16oe25_, newmeEEe16oe25_, te);
0829     }
0830     EcalEE16o25->Print("EE16o25_compare.eps");
0831     
0832     TCanvas * EcalEE9o25 = new TCanvas("EcalEE9o25","EcalEE9o25",800,1000);
0833     if ( meEEe9oe25_ && newmeEEe9oe25_){ 
0834       meEEe9oe25_   ->Draw();
0835       newmeEEe9oe25_->Draw("same");
0836       myPV->PVCompute(meEEe9oe25_, newmeEEe9oe25_, te);
0837     }
0838     EcalEE9o25->Print("EE9o25_compare.eps");
0839   }
0840 
0841 
0842         
0843   // preshower
0844   if (1) {
0845     TH1 *meESHits1zp_;
0846     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits layer 1 multiplicity z+", meESHits1zp_ );
0847     meESHits1zp_;
0848     meESHits1zp_->SetLineColor(rcolor);
0849     
0850     TH1 *meESHits2zp_;
0851     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits layer 2 multiplicity z+", meESHits2zp_ );
0852     meESHits2zp_;
0853     meESHits2zp_->SetLineColor(rcolor);
0854     
0855     TH1 *meESHits1zm_;
0856     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits layer 1 multiplicity z-", meESHits1zm_ );
0857     meESHits1zm_;
0858     meESHits1zm_->SetLineColor(rcolor);
0859     
0860     TH1 *meESHits2zm_;
0861     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits layer 2 multiplicity z-", meESHits2zm_ );
0862     meESHits2zm_;
0863     meESHits2zm_->SetLineColor(rcolor);
0864     
0865     TH1 *newmeESHits1zp_;
0866     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits layer 1 multiplicity z+", newmeESHits1zp_ );
0867     newmeESHits1zp_;
0868     newmeESHits1zp_->SetLineColor(scolor);
0869     
0870     TH1 *newmeESHits2zp_;
0871     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits layer 2 multiplicity z+", newmeESHits2zp_ );
0872     newmeESHits2zp_;
0873     newmeESHits2zp_->SetLineColor(scolor);
0874     
0875     TH1 *newmeESHits1zm_;
0876     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits layer 1 multiplicity z-", newmeESHits1zm_ );
0877     newmeESHits1zm_;
0878     newmeESHits1zm_->SetLineColor(scolor);
0879     
0880     TH1 *newmeESHits2zm_;
0881     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits layer 2 multiplicity z-", newmeESHits2zm_ );
0882     newmeESHits2zm_;
0883     newmeESHits2zm_->SetLineColor(scolor);
0884     
0885     TCanvas *ESHits1zp = new TCanvas("ESHits1zp","ESHits1zp",800,1000);
0886     if ( meESHits1zp_ && newmeESHits1zp_ ){
0887       gPad->SetLogy();
0888       meESHits1zp_   ->Draw();
0889       newmeESHits1zp_->Draw("same");
0890       myPV->PVCompute(meESHits1zp_, newmeESHits1zp_, te);
0891     }
0892     ESHits1zp->Print("ESHits1zp_compare.eps");
0893     
0894     TCanvas *ESHits2zp = new TCanvas("ESHits2zp","ESHits2zp",800,1000);
0895     if ( meESHits2zp_ && newmeESHits2zp_ ){
0896       gPad->SetLogy();
0897       meESHits2zp_   ->Draw();
0898       newmeESHits2zp_->Draw("same");
0899       myPV->PVCompute(meESHits2zp_, newmeESHits2zp_, te);
0900     }
0901     ESHits2zp->Print("ESHits2zp_compare.eps");
0902     
0903     TCanvas *ESHits1zm = new TCanvas("ESHits1zm","ESHits1zm",800,1000);
0904     if ( meESHits1zm_ && newmeESHits1zm_ ){
0905       gPad->SetLogy();
0906       meESHits1zm_   ->Draw();
0907       newmeESHits1zm_->Draw("same");
0908       myPV->PVCompute(meESHits1zm_, newmeESHits1zm_, te);
0909     }
0910     ESHits1zm->Print("ESHits1zm_compare.eps");
0911     
0912     TCanvas *ESHits2zm = new TCanvas("ESHits2zm","ESHits2zm",800,1000);
0913     if ( meESHits2zm_ && newmeESHits2zm_ ){
0914       gPad->SetLogy();
0915       meESHits2zm_   ->Draw();
0916       newmeESHits2zm_->Draw("same");
0917       myPV->PVCompute(meESHits2zm_, newmeESHits2zm_, te);
0918     }
0919     ESHits2zm->Print("ESHits2zm_compare.eps");
0920   }
0921   
0922 
0923   if(1){
0924     
0925     TH1 *meESEnergy1zp_;
0926     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits energy layer 1 z+", meESEnergy1zp_);
0927     meESEnergy1zp_;
0928     meESEnergy1zp_->SetLineColor(rcolor);
0929     
0930     TH1 *meESEnergy2zp_;
0931     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits energy layer 2 z+", meESEnergy2zp_);
0932     meESEnergy2zp_;
0933     meESEnergy2zp_->SetLineColor(rcolor);
0934     
0935     TH1 *meESEnergy1zm_;
0936     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits energy layer 1 z-", meESEnergy1zm_);
0937     meESEnergy1zm_;
0938     meESEnergy1zm_->SetLineColor(rcolor);
0939     
0940     TH1 *meESEnergy2zm_;
0941     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits energy layer 2 z-", meESEnergy2zm_);
0942     meESEnergy2zm_;
0943     meESEnergy2zm_->SetLineColor(rcolor);
0944     
0945     TH1 *newmeESEnergy1zp_;
0946     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits energy layer 1 z+", newmeESEnergy1zp_);
0947     newmeESEnergy1zp_;
0948     newmeESEnergy1zp_->SetLineColor(scolor);
0949     
0950     TH1 *newmeESEnergy2zp_;
0951     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits energy layer 2 z+", newmeESEnergy2zp_);
0952     newmeESEnergy2zp_;
0953     newmeESEnergy2zp_->SetLineColor(scolor);
0954     
0955     TH1 *newmeESEnergy1zm_;
0956     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits energy layer 1 z-", newmeESEnergy1zm_);
0957     newmeESEnergy1zm_;
0958     newmeESEnergy1zm_->SetLineColor(scolor);
0959     
0960     TH1 *newmeESEnergy2zm_;
0961     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES hits energy layer 2 z-", newmeESEnergy2zm_);
0962     newmeESEnergy2zm_;
0963     newmeESEnergy2zm_->SetLineColor(scolor);
0964     
0965    
0966     TCanvas *ESEnergy1zm = new TCanvas("ESEnergy1zm","ESEnergy1zm",800,1000);
0967     if ( meESEnergy1zm_ && newmeESEnergy1zm_ ){
0968       meESEnergy1zm_   ->Draw();
0969       newmeESEnergy1zm_->Draw("same");
0970       myPV->PVCompute(meESEnergy1zm_, newmeESEnergy1zm_, te);
0971     }
0972     ESEnergy1zm->Print("ESEnergy1zm_compare.eps");
0973     
0974     TCanvas *ESEnergy1zp = new TCanvas("ESEnergy1zp","ESEnergy1zp",800,1000);
0975     if ( meESEnergy1zp_ && newmeESEnergy1zp_ ){
0976       meESEnergy1zp_   ->Draw();
0977       newmeESEnergy1zp_->Draw("same");
0978       myPV->PVCompute(meESEnergy1zp_, newmeESEnergy1zp_, te);
0979     }
0980     ESEnergy1zp->Print("ESEnergy1zp_compare.eps");
0981     
0982     TCanvas *ESEnergy2zm = new TCanvas("ESEnergy2zm","ESEnergy2zm",800,1000);
0983     if ( meESEnergy2zm_ && newmeESEnergy2zm_ ){
0984       meESEnergy2zm_   ->Draw();
0985       newmeESEnergy2zm_->Draw("same");
0986       myPV->PVCompute(meESEnergy2zm_, newmeESEnergy2zm_, te);
0987     }
0988     ESEnergy2zm->Print("ESEnergy2zm_compare.eps");
0989     
0990     TCanvas *ESEnergy2zp = new TCanvas("ESEnergy2zp","ESEnergy2zp",800,1000);
0991     if ( meESEnergy2zp_ && newmeESEnergy2zp_ ){
0992       meESEnergy2zp_   ->Draw();
0993       newmeESEnergy2zp_->Draw("same");
0994       myPV->PVCompute(meESEnergy2zp_, newmeESEnergy2zp_, te);
0995     }
0996     ESEnergy2zp->Print("ESEnergy2zp_compare.eps");
0997   }
0998 
0999   if(1){
1000     TH1 *meE1alphaE2zp_;                         
1001     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES E1+07E2 z+", meE1alphaE2zp_);
1002     meE1alphaE2zp_;
1003     meE1alphaE2zp_->SetLineColor(rcolor);
1004     
1005     TH1 *meE1alphaE2zm_;                         
1006     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES E1+07E2 z-", meE1alphaE2zm_);
1007     meE1alphaE2zm_;
1008     meE1alphaE2zm_->SetLineColor(rcolor);
1009     
1010     TH1 *me2eszpOver1eszp_;
1011     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES ene2oEne1 z+", me2eszpOver1eszp_);
1012     me2eszpOver1eszp_;
1013     me2eszpOver1eszp_->SetLineColor(rcolor);
1014     
1015     TH1 *me2eszmOver1eszm_;
1016     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES ene2oEne1 z-", me2eszmOver1eszm_);
1017     me2eszmOver1eszm_;
1018     me2eszmOver1eszm_->SetLineColor(rcolor);
1019 
1020     TProfile *meEEoverESzp_;                         
1021     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE vs ES z+", meEEoverESzp_);
1022     meEEoverESzp_;                         
1023     meEEoverESzp_->SetLineColor(rcolor);
1024 
1025     TProfile *meEEoverESzm_;                         
1026     rfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE vs ES z-", meEEoverESzm_);
1027     meEEoverESzm_;                         
1028     meEEoverESzm_->SetLineColor(rcolor);
1029 
1030     TH1 *newmeE1alphaE2zp_;                         
1031     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES E1+07E2 z+", newmeE1alphaE2zp_);
1032     newmeE1alphaE2zp_;
1033     newmeE1alphaE2zp_->SetLineColor(scolor);
1034     
1035     TH1 *newmeE1alphaE2zm_;                         
1036     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES E1+07E2 z-", newmeE1alphaE2zm_);
1037     newmeE1alphaE2zm_;
1038     newmeE1alphaE2zm_->SetLineColor(scolor);
1039     
1040     TH1 *newme2eszpOver1eszp_;
1041     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES ene2oEne1 z+", newme2eszpOver1eszp_);
1042     newme2eszpOver1eszp_;
1043     newme2eszpOver1eszp_->SetLineColor(scolor);
1044     
1045     TH1 *newme2eszmOver1eszm_;
1046     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/ES ene2oEne1 z-", newme2eszmOver1eszm_);
1047     newme2eszmOver1eszm_;
1048     newme2eszmOver1eszm_->SetLineColor(scolor);
1049 
1050     TProfile *newmeEEoverESzp_;                         
1051     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE vs ES z+", newmeEEoverESzp_);
1052     newmeEEoverESzp_;                         
1053     newmeEEoverESzp_->SetLineColor(scolor);
1054 
1055     TProfile *newmeEEoverESzm_;                         
1056     sfile->GetObject("DQMData/EcalHitsV/EcalSimHitsValidation/EE vs ES z-", newmeEEoverESzm_);
1057     newmeEEoverESzm_;                         
1058     newmeEEoverESzm_->SetLineColor(scolor);
1059 
1060     TCanvas *cE1alphaE2zp = new TCanvas("cE1alphaE2zp","E1 alpha E2 z+",800, 1000);
1061     if ( meE1alphaE2zp_ && newmeE1alphaE2zp_){
1062       meE1alphaE2zp_  ->Draw();
1063       newmeE1alphaE2zp_->Draw("same");
1064       myPV->PVCompute(meE1alphaE2zp_, newmeE1alphaE2zp_, te);
1065     }
1066     cE1alphaE2zp->Print("E1alphaE2zp_compare.eps");     
1067     
1068     TCanvas *cE1alphaE2zm = new TCanvas("cE1alphaE2zm","E1 alpha E2 z-",800, 1000);
1069     if ( meE1alphaE2zm_ && newmeE1alphaE2zm_){
1070       meE1alphaE2zm_  ->Draw();
1071       newmeE1alphaE2zm_->Draw("same");
1072       myPV->PVCompute(meE1alphaE2zm_, newmeE1alphaE2zm_, te);
1073     }
1074     cE1alphaE2zm->Print("E1alphaE2zm_compare.eps");     
1075 
1076     TCanvas *c2eszpOver1eszp = new TCanvas("c2eszpOver1eszp","c2eszpOver1eszp",800, 1000);
1077     if ( me2eszpOver1eszp_ && newme2eszpOver1eszp_ ){
1078       me2eszpOver1eszp_    ->Draw();
1079       newme2eszpOver1eszp_ ->Draw("same");
1080       myPV->PVCompute(me2eszpOver1eszp_, newme2eszpOver1eszp_, te); 
1081     }
1082     c2eszpOver1eszp->Print("2eszpOver1eszp_compare.eps");     
1083     
1084     TCanvas *c2eszmOver1eszm = new TCanvas("c2eszmOver1eszm","c2eszmOver1eszm",800, 1000);
1085     if ( me2eszmOver1eszm_ && newme2eszmOver1eszm_ ){
1086       me2eszmOver1eszm_    ->Draw();
1087       newme2eszmOver1eszm_ ->Draw("same");
1088       myPV->PVCompute(me2eszmOver1eszm_, newme2eszmOver1eszm_, te); 
1089     }
1090     c2eszmOver1eszm->Print("2eszmOver1eszm_compare.eps");
1091 
1092     TCanvas *cEEoverESzp = new TCanvas("cEEoverESzp","EE vs ES z+",800, 1000);
1093     if ( meEEoverESzp_ && newmeEEoverESzp_){
1094       meEEoverESzp_  ->Draw();
1095       newmeEEoverESzp_->Draw("same");
1096       myPV->PVCompute(meEEoverESzp_, newmeEEoverESzp_, te);
1097     }
1098     cEEoverESzp->Print("EEoverESzp_compare.eps");          
1099 
1100     TCanvas *cEEoverESzm = new TCanvas("cEEoverESzm","EE vs ES z-",800, 1000);
1101     if ( meEEoverESzm_ && newmeEEoverESzm_){
1102       meEEoverESzm_  ->Draw();
1103       newmeEEoverESzm_->Draw("same");
1104       myPV->PVCompute(meEEoverESzm_, newmeEEoverESzm_, te);
1105     }
1106     cEEoverESzm->Print("EEoverESzm_compare.eps");          
1107   } 
1108 }
1109