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 EcalRecHitsPlots( TString inputfile = "EcalRecHitsValidation.root" )
0006 {  
0007   gROOT ->Reset();
0008   char*  rfilename = inputfile;
0009   
0010   delete gROOT->GetListOfFiles()->FindObject(rfilename);
0011 
0012   TText *te    = new TText();
0013   TFile *rfile = new TFile(rfilename);
0014 
0015   TF1 *gausa = new TF1 ("gausa","([0]*exp(-1*(x-[1])*(x-[1])/2/[2]/[2]))",0.,5.);
0016 
0017   cout << "General validation" << endl;
0018   rfile->cd("DQMData/EcalRecHitsV/EcalRecHitsTask");
0019   gDirectory->ls();
0020   
0021   Char_t histo[200];
0022   
0023   gStyle->SetOptStat("nemruoi");
0024 
0025   //////////////////////////////////////////////////////////////
0026 
0027 
0028   // ---------------------------------------------------------
0029   // General class: particle Gun 
0030   if (1) 
0031     {
0032       TH1* meGunEnergy_;
0033       rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Momentum;1",meGunEnergy_);
0034       meGunEnergy_;
0035       
0036       TH1* meGunEta_;
0037       rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Eta;1",meGunEta_);
0038       meGunEta_;
0039       
0040       TH1* meGunPhi_; 
0041       rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Gun Phi;1",meGunPhi_);
0042       meGunPhi_; 
0043       
0044       
0045       // --------------------------------
0046       TCanvas *Ecal = new TCanvas("Ecal","Ecal",1000,800);
0047       Ecal->Divide(1,3);
0048       Ecal->cd(1); if ( meGunEnergy_ ) meGunEnergy_->Draw(); 
0049       Ecal->cd(2); if ( meGunEta_ )    meGunEta_->Draw(); 
0050       Ecal->cd(3); if ( meGunPhi_ )    meGunPhi_->Draw(); 
0051       Ecal->Print("ParticleGun.eps");
0052       delete Ecal;
0053     }
0054   
0055 
0056 
0057 
0058   // General class: sim/rec hit ratios
0059   if (1) 
0060     {
0061       TH1 *meEBRecHitSimHitRatio_;
0062       rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Barrel RecSimHit Ratio;1",meEBRecHitSimHitRatio_);
0063       meEBRecHitSimHitRatio_;
0064       
0065       TH1 *meEERecHitSimHitRatio_;
0066       rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Endcap RecSimHit Ratio;1",meEERecHitSimHitRatio_);
0067       meEERecHitSimHitRatio_;
0068 
0069       TH1 *meESRecHitSimHitRatio_;
0070       rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Preshower RecSimHit Ratio;1",meESRecHitSimHitRatio_);
0071       meESRecHitSimHitRatio_;
0072 
0073       TH1 *meEBRecHitSimHitRatioGt35_;
0074       rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Barrel RecSimHit Ratio gt 3p5 GeV;1",meEBRecHitSimHitRatioGt35_);
0075       meEBRecHitSimHitRatioGt35_;
0076       
0077       TH1 *meEERecHitSimHitRatioGt35_;
0078       rfile->GetObject("DQMData/EcalRecHitsV/EcalRecHitsTask/EcalRecHitsTask Endcap RecSimHit Ratio gt 3p5 GeV;1",meEERecHitSimHitRatioGt35_);
0079       meEERecHitSimHitRatioGt35_;
0080 
0081 
0082       
0083       
0084       // --------------------------------
0085       TCanvas *BarrelSimRec = new TCanvas("BarrelSimRec","BarrelSimRec",800,800);
0086       if ( meEBRecHitSimHitRatio_ ) { meEBRecHitSimHitRatio_->Draw(); }
0087       BarrelSimRec->Print("Barrel_SimRecHitsRatio.eps");
0088       delete BarrelSimRec;
0089 
0090       TCanvas *EndcapSimRec = new TCanvas("EndcapSimRec","EndcapSimRec",800,800);
0091       if ( meEERecHitSimHitRatio_ ) { meEERecHitSimHitRatio_->Draw(); }
0092       EndcapSimRec->Print("Endcap_SimRecHitsRatio.eps");
0093       delete EndcapSimRec;
0094 
0095       TCanvas *PreshowerSimRec = new TCanvas("PreshowerSimRec","PreshowerSimRec",800,800);
0096       if ( meESRecHitSimHitRatio_ ) meESRecHitSimHitRatio_->Draw();
0097       PreshowerSimRec->Print("Preshower_SimRecHitsRatio.eps");
0098       delete PreshowerSimRec;
0099 
0100       TCanvas *BarrelSimRecGt35 = new TCanvas("BarrelSimRecGt35","BarrelSimRecGt35",800,800);
0101       if ( meEBRecHitSimHitRatioGt35_ )
0102     { 
0103       meEBRecHitSimHitRatioGt35_->Draw(); 
0104       double ebMean = meEBRecHitSimHitRatioGt35_-> GetMean();
0105       double ebRms  = meEBRecHitSimHitRatioGt35_-> GetRMS();
0106       double ebNorm = meEBRecHitSimHitRatioGt35_-> GetMaximum();
0107       gausa->SetParameters(ebNorm, ebMean, ebRms);
0108       meEBRecHitSimHitRatioGt35_->Fit("gausa", "", "", ebMean-3*ebRms, ebMean+3*ebRms);
0109     }
0110       BarrelSimRecGt35->Print("Barrel_SimRecHitsRatioGt35.eps");
0111       delete BarrelSimRecGt35;
0112 
0113       TCanvas *EndcapSimRecGt35 = new TCanvas("EndcapSimRecGt35","EndcapSimRecGt35",800,800);
0114       if ( meEERecHitSimHitRatioGt35_ )
0115     { 
0116       meEERecHitSimHitRatioGt35_->Draw(); 
0117       double eeMean = meEERecHitSimHitRatioGt35_-> GetMean();
0118       double eeRms  = meEERecHitSimHitRatioGt35_-> GetRMS();
0119       double eeNorm = meEERecHitSimHitRatioGt35_-> GetMaximum();
0120       gausa->SetParameters(eeNorm, eeMean, eeRms);
0121       meEERecHitSimHitRatioGt35_->Fit("gausa", "", "", eeMean-3*eeRms, eeMean+3*eeRms);
0122     }
0123       EndcapSimRecGt35->Print("Endcap_SimRecHitsRatioGt35.eps");
0124       delete EndcapSimRecGt35;
0125     }
0126   
0127 
0128 
0129 
0130 
0131   // ----------------------------------------------------------
0132   cout << endl;
0133   cout << "Barrel validation" << endl;
0134   rfile->cd("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask");
0135   gDirectory->ls();
0136 
0137   // Barrel validation
0138   if (1) 
0139     {    
0140       TH2 *meEBUncalibRecHitsOccupancy_;
0141       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Occupancy;1",meEBUncalibRecHitsOccupancy_);
0142       meEBUncalibRecHitsOccupancy_;
0143       
0144       TH1 *meEBUncalibRecHitsAmplitude_;
0145       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude;1",meEBUncalibRecHitsAmplitude_);
0146       meEBUncalibRecHitsAmplitude_;
0147       
0148       TH1 *meEBUncalibRecHitsPedestal_;
0149       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal;1",meEBUncalibRecHitsPedestal_);
0150       meEBUncalibRecHitsPedestal_;
0151       
0152       TH1 *meEBUncalibRecHitsJitter_;
0153       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter;1",meEBUncalibRecHitsJitter_);
0154       meEBUncalibRecHitsJitter_;
0155       
0156       TH1 *meEBUncalibRecHitsChi2_;
0157       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2;1",meEBUncalibRecHitsChi2_);
0158       meEBUncalibRecHitsChi2_;
0159 
0160       TH1 *meEBUncalibRecHitMaxSampleRatio_;
0161       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio;1",meEBUncalibRecHitMaxSampleRatio_);
0162       meEBUncalibRecHitMaxSampleRatio_;
0163 
0164       TH2 *meEBUncalibRecHitsOccupancyGt100adc_;
0165       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Occupancy gt 100 adc counts;1",meEBUncalibRecHitsOccupancyGt100adc_);
0166       meEBUncalibRecHitsOccupancyGt100adc_;
0167       
0168       TH1 *meEBUncalibRecHitsAmplitudeGt100adc_;
0169       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude gt 100 adc counts;1",meEBUncalibRecHitsAmplitudeGt100adc_);
0170       meEBUncalibRecHitsAmplitudeGt100adc_;
0171       
0172       TH1 *meEBUncalibRecHitsPedestalGt100adc_;
0173       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal gt 100 adc counts;1",meEBUncalibRecHitsPedestalGt100adc_);
0174       meEBUncalibRecHitsPedestalGt100adc_;
0175       
0176       TH1 *meEBUncalibRecHitsJitterGt100adc_;
0177       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Jitter gt 100 adc counts;1",meEBUncalibRecHitsJitterGt100adc_);
0178       meEBUncalibRecHitsJitterGt100adc_;
0179       
0180       TH1 *meEBUncalibRecHitsChi2Gt100adc_;
0181       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Chi2 gt 100 adc counts;1",meEBUncalibRecHitsChi2Gt100adc_);
0182       meEBUncalibRecHitsChi2Gt100adc_;
0183 
0184       TH1 *meEBUncalibRecHitMaxSampleRatioGt100adc_;
0185       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB RecHit Max Sample Ratio gt 100 adc counts;1",meEBUncalibRecHitMaxSampleRatioGt100adc_);
0186       meEBUncalibRecHitMaxSampleRatioGt100adc_;
0187 
0188       TProfile2D *meEBUncalibRecHitsAmpFullMap_;
0189       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amplitude Full Map;1",meEBUncalibRecHitsAmpFullMap_);
0190       meEBUncalibRecHitsAmpFullMap_;
0191       
0192       TProfile2D *meEBUncalibRecHitsPedFullMap_;
0193       rfile->GetObject("DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Pedestal Full Map;1",meEBUncalibRecHitsPedFullMap_);
0194       meEBUncalibRecHitsPedFullMap_;
0195       
0196       TProfile2D *meEBUncalibRecHitAmplMap_[36];
0197       TProfile2D *meEBUncalibRecHitPedMap_[36];
0198       for (int ii=0; ii<36 ; ii++) 
0199     {
0200       sprintf(histo, "DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Amp SM%02d;1", ii+1);
0201       rfile->GetObject(histo,meEBUncalibRecHitAmplMap_[ii]);
0202       meEBUncalibRecHitAmplMap_[ii];
0203       
0204       sprintf(histo, "DQMData/EcalRecHitsV/EcalBarrelRecHitsTask/EB Ped SM%02d;1", ii+1);
0205       rfile->GetObject(histo,meEBUncalibRecHitPedMap_[ii]);
0206       meEBUncalibRecHitPedMap_[ii];
0207     }
0208       
0209 
0210 
0211 
0212       // --------------------------------
0213       TCanvas *BarrelOccupancy = new TCanvas("BarrelOccupancy","BarrelOccupancy",1000,800);
0214       if ( meEBUncalibRecHitsOccupancy_ ) meEBUncalibRecHitsOccupancy_->Draw("colz"); 
0215       BarrelOccupancy->Print("BarrelOccupancy.eps"); 
0216       delete BarrelOccupancy;
0217 
0218       TCanvas *BarrelOccupancyGt100adc = new TCanvas("BarrelOccupancyGt100adc","BarrelOccupancyGt100adc",1000,800);
0219       if ( meEBUncalibRecHitsOccupancyGt100adc_ ) meEBUncalibRecHitsOccupancyGt100adc_->Draw("colz"); 
0220       BarrelOccupancyGt100adc->Print("BarrelOccupancyGt100adc.eps"); 
0221       delete BarrelOccupancyGt100adc;
0222 
0223       TCanvas *Barrel = new TCanvas("Barrel","Barrel",800,800);
0224       Barrel->Divide(3,2);
0225       Barrel->cd(1); 
0226       gPad->SetLogy();   if ( meEBUncalibRecHitsAmplitude_ )     meEBUncalibRecHitsAmplitude_->Draw(); 
0227       Barrel->cd(2);     if ( meEBUncalibRecHitsPedestal_ )      meEBUncalibRecHitsPedestal_->Draw(); 
0228       Barrel->cd(3);     if ( meEBUncalibRecHitsJitter_ )        meEBUncalibRecHitsJitter_->Draw(); 
0229       Barrel->cd(4);     if ( meEBUncalibRecHitsChi2_ )          meEBUncalibRecHitsChi2_->Draw(); 
0230       Barrel->cd(5);     if ( meEBUncalibRecHitMaxSampleRatio_ ) meEBUncalibRecHitMaxSampleRatio_->Draw(); 
0231       Barrel->Print("Barrel.eps");
0232       delete Barrel;
0233 
0234       TCanvas *BarrelGt100adc = new TCanvas("BarrelGt100adc","BarrelGt100adc",800,800);
0235       BarrelGt100adc->Divide(3,2);
0236       BarrelGt100adc->cd(1); 
0237       gPad->SetLogy();           if ( meEBUncalibRecHitsAmplitudeGt100adc_ )     meEBUncalibRecHitsAmplitudeGt100adc_->Draw(); 
0238       BarrelGt100adc->cd(2);     if ( meEBUncalibRecHitsPedestalGt100adc_ )      meEBUncalibRecHitsPedestalGt100adc_->Draw(); 
0239       BarrelGt100adc->cd(3);     if ( meEBUncalibRecHitsJitterGt100adc_ )        meEBUncalibRecHitsJitterGt100adc_->Draw(); 
0240       BarrelGt100adc->cd(4);     if ( meEBUncalibRecHitsChi2Gt100adc_ )          meEBUncalibRecHitsChi2Gt100adc_->Draw(); 
0241       BarrelGt100adc->cd(5);     if ( meEBUncalibRecHitMaxSampleRatioGt100adc_ ) meEBUncalibRecHitMaxSampleRatioGt100adc_->Draw(); 
0242       BarrelGt100adc->Print("BarrelGt100adc.eps");
0243       delete BarrelGt100adc;
0244 
0245       TCanvas *BarrelFullMaps = new TCanvas("BarrelFullMaps","BarrelFullMaps",800,800);
0246       BarrelFullMaps->Divide(1,2);
0247       BarrelFullMaps->cd(1);  if ( meEBUncalibRecHitsAmpFullMap_ ) meEBUncalibRecHitsAmpFullMap_ ->Draw("colz");
0248       BarrelFullMaps->cd(2);  if ( meEBUncalibRecHitsPedFullMap_ ) meEBUncalibRecHitsPedFullMap_ ->Draw("colz");
0249       BarrelFullMaps->Print("BarrelFullMaps.eps");
0250       delete BarrelFullMaps;
0251 
0252       TCanvas *BarrelMapAmpl   = new TCanvas("BarrelMapAmpl","BarrelMapAmpl",800,800);
0253       TCanvas *BarrelMapPed    = new TCanvas("BarrelMapPed","BarrelMapPed",800,800);
0254       BarrelMapAmpl->Divide(9,4);
0255       BarrelMapPed ->Divide(9,4);
0256       for (int ii=0; ii<36; ii++) 
0257     {
0258       BarrelMapAmpl->cd(ii+1); if( meEBUncalibRecHitAmplMap_[ii] )  meEBUncalibRecHitAmplMap_[ii]->Draw("colz"); 
0259       BarrelMapPed ->cd(ii+1); if( meEBUncalibRecHitPedMap_[ii] )   meEBUncalibRecHitPedMap_[ii]->Draw("colz"); 
0260     } 
0261       BarrelMapAmpl->Print("BarrelAmplitudeMap.eps"); 
0262       BarrelMapPed ->Print("BarrelPedestalMap.eps");
0263       delete BarrelMapAmpl;
0264       delete BarrelMapPed;
0265     }
0266 
0267 
0268 
0269 
0270 
0271 
0272   // -------------------------------------------------------
0273   cout << endl;
0274   cout << "Endcap validation" << endl;
0275   rfile->cd("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask");
0276   gDirectory->ls();
0277 
0278   // Endcap validation
0279   if (1) 
0280     {    
0281       TH2 *meEEUncalibRecHitsOccupancyPlus_;
0282       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE+ Occupancy;1",meEEUncalibRecHitsOccupancyPlus_);
0283       meEEUncalibRecHitsOccupancyPlus_;
0284 
0285       TH2 *meEEUncalibRecHitsOccupancyMinus_;
0286       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE- Occupancy;1",meEEUncalibRecHitsOccupancyMinus_);
0287       meEEUncalibRecHitsOccupancyMinus_;
0288       
0289       TH1 *meEEUncalibRecHitsAmplitude_;
0290       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude;1",meEEUncalibRecHitsAmplitude_);
0291       meEEUncalibRecHitsAmplitude_;
0292 
0293       TH1 *meEEUncalibRecHitsPedestal_;
0294       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal;1",meEEUncalibRecHitsPedestal_);
0295       meEEUncalibRecHitsPedestal_;
0296       
0297       TH1 *meEEUncalibRecHitsJitter_;
0298       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter;1",meEEUncalibRecHitsJitter_);
0299       meEEUncalibRecHitsJitter_;
0300       
0301       TH1 *meEEUncalibRecHitsChi2_;
0302       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2;1",meEEUncalibRecHitsChi2_);
0303       meEEUncalibRecHitsChi2_;
0304       
0305       TH1 *meEEUncalibRecHitMaxSampleRatio_;
0306       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio;1",meEEUncalibRecHitMaxSampleRatio_);
0307       meEEUncalibRecHitMaxSampleRatio_;
0308 
0309       TH2 *meEEUncalibRecHitsOccupancyPlusGt60adc_;
0310       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE+ Occupancy gt 60 adc counts;1",meEEUncalibRecHitsOccupancyPlusGt60adc_);
0311       meEEUncalibRecHitsOccupancyPlusGt60adc_;
0312 
0313       TH2 *meEEUncalibRecHitsOccupancyMinusGt60adc_;
0314       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE- Occupancy gt 60 adc counts;1",meEEUncalibRecHitsOccupancyMinusGt60adc_);
0315       meEEUncalibRecHitsOccupancyMinusGt60adc_;
0316       
0317       TH1 *meEEUncalibRecHitsAmplitudeGt60adc_;
0318       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude gt 60 adc counts;1",meEEUncalibRecHitsAmplitudeGt60adc_);
0319       meEEUncalibRecHitsAmplitudeGt60adc_;
0320 
0321       TH1 *meEEUncalibRecHitsPedestalGt60adc_;
0322       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal gt 60 adc counts;1",meEEUncalibRecHitsPedestalGt60adc_);
0323       meEEUncalibRecHitsPedestalGt60adc_;
0324       
0325       TH1 *meEEUncalibRecHitsJitterGt60adc_;
0326       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Jitter gt 60 adc counts;1",meEEUncalibRecHitsJitterGt60adc_);
0327       meEEUncalibRecHitsJitterGt60adc_;
0328       
0329       TH1 *meEEUncalibRecHitsChi2Gt60adc_;
0330       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Chi2 gt 60 adc counts;1",meEEUncalibRecHitsChi2Gt60adc_);
0331       meEEUncalibRecHitsChi2Gt60adc_;
0332       
0333       TH1 *meEEUncalibRecHitMaxSampleRatioGt60adc_;
0334       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE RecHit Max Sample Ratio gt 60 adc counts;1",meEEUncalibRecHitMaxSampleRatioGt60adc_);
0335       meEEUncalibRecHitMaxSampleRatioGt60adc_;
0336 
0337       TProfile2D *meEEUncalibRecHitsAmpFullMap_;
0338       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Amplitude Full Map;1",meEEUncalibRecHitsAmpFullMap_);
0339       meEEUncalibRecHitsAmpFullMap_;
0340 
0341       TProfile2D *meEEUncalibRecHitsPedFullMap_;
0342       rfile->GetObject("DQMData/EcalRecHitsV/EcalEndcapRecHitsTask/EE Pedestal Full Map;1",meEEUncalibRecHitsPedFullMap_);
0343       meEEUncalibRecHitsPedFullMap_;
0344 
0345 
0346 
0347 
0348       // --------------------------------
0349       TCanvas *EndcapOccupancy = new TCanvas("EndcapOccupancy","EndcapOccupancy",1000,800);
0350       EndcapOccupancy->Divide(1,2);
0351       EndcapOccupancy->cd(1);  if ( meEEUncalibRecHitsOccupancyPlus_ )  meEEUncalibRecHitsOccupancyPlus_->Draw("colz"); 
0352       EndcapOccupancy->cd(2);  if ( meEEUncalibRecHitsOccupancyMinus_ ) meEEUncalibRecHitsOccupancyMinus_->Draw("colz"); 
0353       EndcapOccupancy->Print("EndcapOccupancy.eps"); 
0354       delete EndcapOccupancy;
0355 
0356       TCanvas *EndcapOccupancyGt60adc = new TCanvas("EndcapOccupancyGt60adc","EndcapOccupancyGt60adc",1000,800);
0357       EndcapOccupancyGt60adc->Divide(1,2);
0358       EndcapOccupancyGt60adc->cd(1);  if ( meEEUncalibRecHitsOccupancyPlusGt60adc_ )  meEEUncalibRecHitsOccupancyPlusGt60adc_->Draw("colz"); 
0359       EndcapOccupancyGt60adc->cd(2);  if ( meEEUncalibRecHitsOccupancyMinusGt60adc_ ) meEEUncalibRecHitsOccupancyMinusGt60adc_->Draw("colz"); 
0360       EndcapOccupancyGt60adc->Print("EndcapOccupancyGt60adc.eps"); 
0361       delete EndcapOccupancyGt60adc;
0362 
0363       TCanvas *EndcapFullMaps = new TCanvas("EndcapFullMaps","EndcapFullMaps",800,800);
0364       EndcapFullMaps->Divide(1,2);
0365       EndcapFullMaps->cd(1);  if ( meEEUncalibRecHitsAmpFullMap_ ) meEEUncalibRecHitsAmpFullMap_ ->Draw("colz");
0366       EndcapFullMaps->cd(2);  if ( meEEUncalibRecHitsPedFullMap_ ) meEEUncalibRecHitsPedFullMap_ ->Draw("colz");
0367       EndcapFullMaps->Print("EndcapFullMaps.eps");
0368       delete EndcapFullMaps;
0369 
0370       TCanvas *Endcap = new TCanvas("Endcap","Endcap",800,800);
0371       Endcap->Divide(3,2);
0372       Endcap->cd(1); 
0373       gPad->SetLogy(); if ( meEEUncalibRecHitsAmplitude_ )     meEEUncalibRecHitsAmplitude_->Draw(); 
0374       Endcap->cd(2);   if ( meEEUncalibRecHitsPedestal_ )      meEEUncalibRecHitsPedestal_->Draw(); 
0375       Endcap->cd(3);   if ( meEEUncalibRecHitsJitter_ )        meEEUncalibRecHitsJitter_->Draw(); 
0376       Endcap->cd(4);   if ( meEEUncalibRecHitsChi2_ )          meEEUncalibRecHitsChi2_->Draw(); 
0377       Endcap->cd(5);   if ( meEEUncalibRecHitMaxSampleRatio_ ) meEEUncalibRecHitMaxSampleRatio_->Draw(); 
0378       Endcap->Print("Endcap.eps");
0379       delete Endcap;
0380 
0381       TCanvas *EndcapGt60adc = new TCanvas("EndcapGt60adc","EndcapGt60adc",800,800);
0382       EndcapGt60adc->Divide(3,2);
0383       EndcapGt60adc->cd(1); 
0384       gPad->SetLogy();        if ( meEEUncalibRecHitsAmplitudeGt60adc_ )     meEEUncalibRecHitsAmplitudeGt60adc_->Draw(); 
0385       EndcapGt60adc->cd(2);   if ( meEEUncalibRecHitsPedestalGt60adc_ )      meEEUncalibRecHitsPedestalGt60adc_->Draw(); 
0386       EndcapGt60adc->cd(3);   if ( meEEUncalibRecHitsJitterGt60adc_ )        meEEUncalibRecHitsJitterGt60adc_->Draw(); 
0387       EndcapGt60adc->cd(4);   if ( meEEUncalibRecHitsChi2Gt60adc_ )          meEEUncalibRecHitsChi2Gt60adc_->Draw(); 
0388       EndcapGt60adc->cd(5);   if ( meEEUncalibRecHitMaxSampleRatioGt60adc_ ) meEEUncalibRecHitMaxSampleRatioGt60adc_->Draw(); 
0389       EndcapGt60adc->Print("EndcapGt60adc.eps");
0390       delete EndcapGt60adc;
0391     }
0392 
0393 
0394 
0395 
0396 
0397 
0398 
0399 
0400   // ----------------------------------------------------------
0401   cout << endl;
0402   cout << "Preshower validation" << endl;
0403   rfile->cd("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask");
0404   gDirectory->ls();
0405   
0406   // Preshower validation
0407   if (1) 
0408     {    
0409       TH1 *meESRecHitsEnergy_;
0410       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy;1",meESRecHitsEnergy_);
0411       meESRecHitsEnergy_;
0412 
0413       TH1 *meESRecHitsEnergy_zp1st_;
0414       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side+;1",meESRecHitsEnergy_zp1st_);
0415       meESRecHitsEnergy_zp1st_;
0416 
0417       TH1 *meESRecHitsEnergy_zp2nd_;
0418       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side+;1",meESRecHitsEnergy_zp2nd_);
0419       meESRecHitsEnergy_zp2nd_;
0420 
0421       TH1 *meESRecHitsEnergy_zm1st_;
0422       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane1 Side-;1",meESRecHitsEnergy_zm1st_);
0423       meESRecHitsEnergy_zm1st_;
0424 
0425       TH1 *meESRecHitsEnergy_zm2nd_;
0426       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Energy Plane2 Side-;1",meESRecHitsEnergy_zm2nd_);
0427       meESRecHitsEnergy_zm2nd_;
0428 
0429       TH1 *meESRecHitsMultip_;
0430       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity;1",meESRecHitsMultip_);
0431       meESRecHitsMultip_;
0432 
0433       TH1 *meESRecHitsMultip_zp1st_;
0434       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane1 Side+;1",meESRecHitsMultip_zp1st_);
0435       meESRecHitsMultip_zp1st_;
0436 
0437       TH1 *meESRecHitsMultip_zp2nd_;
0438       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane2 Side+;1",meESRecHitsMultip_zp2nd_);
0439       meESRecHitsMultip_zp2nd_;
0440 
0441       TH1 *meESRecHitsMultip_zm1st_;
0442       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane1 Side-;1",meESRecHitsMultip_zm1st_);
0443       meESRecHitsMultip_zm1st_;
0444 
0445       TH1 *meESRecHitsMultip_zm2nd_;
0446       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Multiplicity Plane2 Side-;1",meESRecHitsMultip_zm2nd_);
0447       meESRecHitsMultip_zm2nd_;
0448 
0449       TH1 *meESEERecHitsEnergy_zp_;
0450       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side+;1",meESEERecHitsEnergy_zp_);
0451       meESEERecHitsEnergy_zp_;
0452 
0453       TH1 *meESEERecHitsEnergy_zm_;
0454       rfile->GetObject("DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/Preshower EE vs ES energy Side-;1",meESEERecHitsEnergy_zm_);
0455       meESEERecHitsEnergy_zm_;
0456 
0457       TH2 *meESRecHitsStripOccupancy_zp1st_[32];
0458       TH2 *meESRecHitsStripOccupancy_zp2nd_[32];
0459       TH2 *meESRecHitsStripOccupancy_zm1st_[32];
0460       TH2 *meESRecHitsStripOccupancy_zm2nd_[32];
0461       for (int kk=0; kk<32; kk++)
0462     { 
0463       sprintf(histo, "DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Occupancy Plane1 Side+ Strip%02d", kk+1);
0464       rfile->GetObject(histo,meESRecHitsStripOccupancy_zp1st_[kk]);
0465       meESRecHitsStripOccupancy_zp1st_[kk];
0466 
0467       sprintf(histo, "DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Occupancy Plane2 Side+ Strip%02d", kk+1);
0468       rfile->GetObject(histo,meESRecHitsStripOccupancy_zp2nd_[kk]);
0469       meESRecHitsStripOccupancy_zp2nd_[kk];
0470 
0471       sprintf(histo, "DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Occupancy Plane1 Side- Strip%02d", kk+1);
0472       rfile->GetObject(histo,meESRecHitsStripOccupancy_zm1st_[kk]);
0473       meESRecHitsStripOccupancy_zm1st_[kk];
0474 
0475       sprintf(histo, "DQMData/EcalRecHitsV/EcalPreshowerRecHitsTask/ES Occupancy Plane2 Side- Strip%02d", kk+1);
0476       rfile->GetObject(histo,meESRecHitsStripOccupancy_zm2nd_[kk]);
0477       meESRecHitsStripOccupancy_zm2nd_[kk];
0478     }
0479 
0480 
0481 
0482 
0483       // --------------------------------
0484       TCanvas *ESEnergyAll = new TCanvas("ESEnergyAll","ESEnergyAll",800,800);
0485       gPad->SetLogy(); 
0486       if ( meESRecHitsEnergy_ ) meESRecHitsEnergy_->Draw(); 
0487       ESEnergyAll->Print("PreshowerEnergyAll.eps");
0488       delete ESEnergyAll;
0489 
0490 
0491       TCanvas *ESEnergy = new TCanvas("ESEnergy","ESEnergy",800,800);
0492       ESEnergy->Divide(2,2);
0493       ESEnergy->cd(1); gPad->SetLogy(); 
0494       if ( meESRecHitsEnergy_zp1st_ ) meESRecHitsEnergy_zp1st_->Draw(); 
0495       ESEnergy->cd(2); gPad->SetLogy(); 
0496       if ( meESRecHitsEnergy_zp2nd_ ) meESRecHitsEnergy_zp2nd_->Draw(); 
0497       ESEnergy->cd(3); gPad->SetLogy(); 
0498       if ( meESRecHitsEnergy_zm1st_ ) meESRecHitsEnergy_zm1st_->Draw(); 
0499       ESEnergy->cd(4); gPad->SetLogy(); 
0500       if ( meESRecHitsEnergy_zm2nd_ ) meESRecHitsEnergy_zm2nd_->Draw(); 
0501       ESEnergy->Print("PreshowerEnergy.eps");
0502       delete ESEnergy;
0503 
0504 
0505       TCanvas *ESMultipAll = new TCanvas("ESMultipAll","ESMultipAll",800,800);
0506       if ( meESRecHitsMultip_ ) meESRecHitsMultip_->Draw(); 
0507       ESMultipAll->Print("PreshowerMultipAll.eps");
0508       delete ESMultipAll;
0509 
0510 
0511       TCanvas *ESMultip = new TCanvas("ESMultip","ESMultip",800,800);
0512       ESMultip->Divide(2,2);
0513       ESMultip->cd(1);  if ( meESRecHitsMultip_zp1st_ ) meESRecHitsMultip_zp1st_->Draw(); 
0514       ESMultip->cd(2);  if ( meESRecHitsMultip_zp2nd_ ) meESRecHitsMultip_zp2nd_->Draw(); 
0515       ESMultip->cd(3);  if ( meESRecHitsMultip_zm1st_ ) meESRecHitsMultip_zm1st_->Draw(); 
0516       ESMultip->cd(4);  if ( meESRecHitsMultip_zm2nd_ ) meESRecHitsMultip_zm2nd_->Draw(); 
0517       ESMultip->Print("PreshowerMultip.eps");
0518       delete ESMultip;
0519 
0520       
0521       TCanvas *ESvsEE = new TCanvas("ESvsEE","ESvsEE",800,800);
0522       ESvsEE->Divide(2,1);
0523       ESvsEE->cd(1);   if ( meESEERecHitsEnergy_zp_ ) meESEERecHitsEnergy_zp_->Draw();
0524       ESvsEE->cd(2);   if ( meESEERecHitsEnergy_zm_ ) meESEERecHitsEnergy_zm_->Draw();
0525       ESvsEE->Print("ESvsEE.eps");
0526       delete ESvsEE;
0527 
0528 
0529       TCanvas *ESOccupancy_zp1st = new TCanvas("ESOccupancy_zp1st", "EE occupancy, plane 1, side+", 800,800);
0530       TCanvas *ESOccupancy_zp2nd = new TCanvas("ESOccupancy_zp2nd", "EE occupancy, plane 2, side+", 800,800);
0531       TCanvas *ESOccupancy_zm1st = new TCanvas("ESOccupancy_zm1st", "EE occupancy, plane 1, side-", 800,800);
0532       TCanvas *ESOccupancy_zm2nd = new TCanvas("ESOccupancy_zm2nd", "EE occupancy, plane 2, side-", 800,800);
0533       ESOccupancy_zp1st -> Divide(8,4);
0534       ESOccupancy_zp2nd -> Divide(8,4);
0535       ESOccupancy_zm1st -> Divide(8,4);
0536       ESOccupancy_zm2nd -> Divide(8,4);
0537       for (int kk=0; kk<32; kk++)
0538     {
0539       ESOccupancy_zp1st->cd(kk+1); if(meESRecHitsStripOccupancy_zp1st_[kk]) meESRecHitsStripOccupancy_zp1st_[kk]->Draw("colz"); 
0540       ESOccupancy_zp2nd->cd(kk+1); if(meESRecHitsStripOccupancy_zp2nd_[kk]) meESRecHitsStripOccupancy_zp2nd_[kk]->Draw("colz"); 
0541       ESOccupancy_zm1st->cd(kk+1); if(meESRecHitsStripOccupancy_zm1st_[kk]) meESRecHitsStripOccupancy_zm1st_[kk]->Draw("colz"); 
0542       ESOccupancy_zm2nd->cd(kk+1); if(meESRecHitsStripOccupancy_zm2nd_[kk]) meESRecHitsStripOccupancy_zm2nd_[kk]->Draw("colz"); 
0543     } 
0544       ESOccupancy_zp1st -> Print("PreshowerOccupancy_zp_plane1.eps"); 
0545       ESOccupancy_zp2nd -> Print("PreshowerOccupancy_zp_plane2.eps"); 
0546       ESOccupancy_zm1st -> Print("PreshowerOccupancy_zm_plane1.eps"); 
0547       ESOccupancy_zm2nd -> Print("PreshowerOccupancy_zm_plane2.eps"); 
0548       delete ESOccupancy_zp1st;
0549       delete ESOccupancy_zp2nd;
0550       delete ESOccupancy_zm1st;
0551       delete ESOccupancy_zm2nd;
0552     }
0553 
0554 }