Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #include "TFile.h"
0002 #include "TTree.h"
0003 #include "TText.h"
0004 
0005 void EcalDigisPlots( TString inputfile = "EcalDigisValidation.root" )
0006 {
0007 
0008  gROOT ->Reset();
0009  char*  rfilename = inputfile;
0010 
0011  delete gROOT->GetListOfFiles()->FindObject(rfilename);
0012 
0013  TText* te = new TText();
0014  TFile * rfile = new TFile(rfilename);
0015 
0016  rfile->cd("DQMData/EcalDigisV/EcalDigiTask");
0017  gDirectory->ls();
0018 
0019  Char_t histo[200];
0020 
0021  gStyle->SetOptStat("nemruoi");
0022 
0023 //////////////////////////////////////////////////////////////
0024 
0025 // Particle Gun
0026  
0027  if (1) {
0028    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0029    Ecal->Divide(1,3);
0030    
0031    TH1* meGunEnergy_;
0032    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Gun Momentum;1",meGunEnergy_);
0033    meGunEnergy_;
0034    
0035    TH1* meGunEta_;
0036    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Gun Eta;1",meGunEta_);
0037    meGunEta_;
0038    
0039    TH1* meGunPhi_; 
0040    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Gun Phi;1",meGunPhi_);
0041    meGunPhi_; 
0042    
0043    
0044    Ecal->cd(1); 
0045    if ( meGunEnergy_ ) meGunEnergy_->Draw(); 
0046    Ecal->cd(2); 
0047    if ( meGunEta_ ) meGunEta_->Draw(); 
0048    Ecal->cd(3); 
0049    if ( meGunPhi_ ) meGunPhi_->Draw(); 
0050    Ecal->Print("ParticleGun.eps"); 
0051  }
0052 
0053  // Barrel occupancy
0054 
0055  if (1) {
0056    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0057 
0058    TH2 * meEBDigiOccupancy_;
0059    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel occupancy;1",meEBDigiOccupancy_);
0060    meEBDigiOccupancy_;
0061 
0062    gStyle->SetOptStat("11");
0063 
0064    Ecal->cd(1);
0065    if ( meEBDigiOccupancy_ ) meEBDigiOccupancy_->Draw("colz");
0066    Ecal->Print("Barrel_Occupancy.eps");
0067 
0068    gStyle->SetOptStat("nemruoi");
0069  }
0070 
0071  // Endcap occupancy
0072 
0073  if (1) {
0074    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0075    Ecal->Divide(1,2);
0076 
0077    TH2 * meEEDigiOccupancyzp_;
0078    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap occupancy z+;1",meEEDigiOccupancyzp_);
0079    meEEDigiOccupancyzp_;
0080 
0081    TH2 * meEEDigiOccupancyzm_;
0082    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap occupancy z-;1",meEEDigiOccupancyzm_);
0083    meEEDigiOccupancyzm_;
0084 
0085    gStyle->SetOptStat("11");
0086 
0087    Ecal->cd(1);
0088    if ( meEEDigiOccupancyzp_ ) meEEDigiOccupancyzp_->Draw("colz");
0089    Ecal->cd(2);
0090    if ( meEEDigiOccupancyzm_ ) meEEDigiOccupancyzm_->Draw("colz");
0091    Ecal->Print("Endcap_Occupancy.eps");
0092 
0093    gStyle->SetOptStat("nemruoi");
0094  }
0095 
0096  // Multiplicities
0097 
0098  if (1) {
0099    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0100    Ecal->Divide(2,2);
0101 
0102    TH1 * meEBDigiMultiplicity_;
0103    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel digis multiplicity;1",meEBDigiMultiplicity_);
0104    meEBDigiMultiplicity_;
0105 
0106    TH1 * meESDigiMultiplicity_;
0107    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Preshower digis multiplicity;1",meESDigiMultiplicity_);
0108    meESDigiMultiplicity_;
0109 
0110    TH1 * meEEDigiMultiplicityzp_;
0111    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap multiplicity z+;1",meEEDigiMultiplicityzp_);
0112    meEEDigiMultiplicityzp_;
0113 
0114    TH1 * meEEDigiMultiplicityzm_;
0115    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap multiplicity z-;1",meEEDigiMultiplicityzm_);
0116    meEEDigiMultiplicityzm_;
0117 
0118    Ecal->cd(1);
0119    gPad->SetLogx(0);
0120    if ( meEBDigiMultiplicity_ ) meEBDigiMultiplicity_->Draw();
0121    gPad->SetLogx(1);
0122    Ecal->cd(2);
0123    gPad->SetLogx(0);
0124    if ( meESDigiMultiplicity_ ) meESDigiMultiplicity_->Draw();
0125    gPad->SetLogx(1);
0126    Ecal->cd(3);
0127    gPad->SetLogx(0);
0128    if ( meEEDigiMultiplicityzp_ ) meEEDigiMultiplicityzp_->Draw();
0129    gPad->SetLogx(1);
0130    Ecal->cd(4);
0131    gPad->SetLogx(0);
0132    if ( meEEDigiMultiplicityzm_ ) meEEDigiMultiplicityzm_->Draw();
0133    gPad->SetLogx(1);
0134    Ecal->Print("Multiplicity.eps");
0135  }
0136 
0137  // global pulse shapes
0138 
0139  if (1) {
0140    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0141    Ecal->Divide(1,2);
0142 
0143    TProfile * meEBDigiADCGlobal_;
0144    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel global pulse shape;1",meEBDigiADCGlobal_) ;
0145    meEBDigiADCGlobal_;
0146 
0147    TProfile * meEEDigiADCGlobal_;
0148    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap global pulse shape;1",meEEDigiADCGlobal_) ;
0149    meEEDigiADCGlobal_;
0150 
0151    Ecal->cd(1);
0152    if ( meEBDigiADCGlobal_ ) meEBDigiADCGlobal_->Draw();
0153    Ecal->cd(2);
0154    if ( meEEDigiADCGlobal_ ) meEEDigiADCGlobal_->Draw();
0155    Ecal->Print("Global_pulse_shape.eps");
0156  }
0157 
0158  // maximum Digi over Sim ratio
0159 
0160  if (1) {
0161    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0162    Ecal->Divide(1,2);
0163 
0164    TH1 * meEBDigiSimRatio_;
0165    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel maximum Digi over Sim ratio;1",meEBDigiSimRatio_);
0166    meEBDigiSimRatio_;
0167 
0168    TH1 * meEEDigiSimRatio_;
0169    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap maximum Digi over Sim ratio;1",meEEDigiSimRatio_);
0170    meEEDigiSimRatio_;
0171 
0172    Ecal->cd(1);
0173    gPad->SetLogy(0);
0174    if ( meEBDigiSimRatio_ ) meEBDigiSimRatio_->Draw();
0175    gPad->SetLogy(1);
0176    Ecal->cd(2);
0177    gPad->SetLogy(0);
0178    if ( meEEDigiSimRatio_ ) meEEDigiSimRatio_->Draw();
0179    gPad->SetLogy(1);
0180    Ecal->Print("MaxADC_over_Sim_Ratio.eps");
0181  } 
0182 
0183  if (1) {
0184    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0185    Ecal->Divide(1,2);
0186 
0187    TH1 * meEBDigiSimRatiogt10ADC_;
0188    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel maximum Digi over Sim ratio gt 10 ADC;1",meEBDigiSimRatiogt10ADC_);
0189    meEBDigiSimRatiogt10ADC_;
0190 
0191    TH1 * meEEDigiSimRatiogt20ADC_;
0192    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap maximum Digi over Sim ratio gt 20 ADC;1",meEEDigiSimRatiogt20ADC_);
0193    meEEDigiSimRatiogt20ADC_;
0194 
0195    Ecal->cd(1);
0196    gPad->SetLogy(0);
0197    if ( meEBDigiSimRatiogt10ADC_ ) meEBDigiSimRatiogt10ADC_->Draw();
0198    gPad->SetLogy(1);
0199    Ecal->cd(2);
0200    gPad->SetLogy(0);
0201    if ( meEEDigiSimRatiogt20ADC_ ) meEEDigiSimRatiogt20ADC_->Draw();
0202    gPad->SetLogy(1);
0203    Ecal->Print("MaxADC_over_Sim_Ratio_gt10ADC.eps");
0204  } 
0205 
0206  if (1) {
0207    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0208    Ecal->Divide(1,2);
0209 
0210    TH1 * meEBDigiSimRatiogt100ADC_;
0211    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel maximum Digi over Sim ratio gt 100 ADC;1",meEBDigiSimRatiogt100ADC_);
0212    meEBDigiSimRatiogt100ADC_;
0213 
0214    TH1 * meEEDigiSimRatiogt100ADC_;
0215    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap maximum Digi over Sim ratio gt 100 ADC;1",meEEDigiSimRatiogt100ADC_);
0216    meEEDigiSimRatiogt100ADC_;
0217 
0218    Ecal->cd(1);
0219    gPad->SetLogy(0);
0220    if ( meEBDigiSimRatiogt100ADC_ ) meEBDigiSimRatiogt100ADC_->Draw();
0221    gPad->SetLogy(1);
0222    Ecal->cd(2);
0223    gPad->SetLogy(0);
0224    if ( meEEDigiSimRatiogt100ADC_ ) meEEDigiSimRatiogt100ADC_->Draw();
0225    gPad->SetLogy(1);
0226    Ecal->Print("MaxADC_over_Sim_Ratio_gt100ADC.eps");
0227  } 
0228 
0229  // Gain switch check
0230 
0231  if (1) {
0232    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0233    Ecal->Divide(1,2);
0234 
0235    TH1 * meEBnADCafterSwitch_;
0236    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel ADC counts after gain switch;1", meEBnADCafterSwitch_) ;
0237    meEBnADCafterSwitch_;
0238 
0239    TH1 * meEEnADCafterSwitch_;
0240    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap ADC counts after gain switch;1", meEEnADCafterSwitch_) ;
0241    meEEnADCafterSwitch_;
0242 
0243    Ecal->cd(1);
0244    if ( meEBnADCafterSwitch_ ) meEBnADCafterSwitch_->Draw();
0245    Ecal->cd(2);
0246    if ( meEEnADCafterSwitch_ ) meEEnADCafterSwitch_->Draw();
0247    Ecal->Print("Counts_after_gain_switch.eps");
0248  }
0249 
0250  // pedestal for pre-sample
0251 
0252  if (1) {
0253    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0254    Ecal->Divide(1,2);
0255 
0256    TH1 * meEBPedestal_;
0257    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel pedestal for pre-sample;1",meEBPedestal_);
0258    meEBPedestal_;
0259 
0260    TH1 * meEEPedestal_;
0261    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap pedestal for pre-sample;1",meEEPedestal_);
0262    meEEPedestal_;
0263 
0264    Ecal->cd(1);
0265    if ( meEBPedestal_ ) meEBPedestal_->Draw();
0266    Ecal->cd(2);
0267    if ( meEEPedestal_ ) meEEPedestal_->Draw();
0268    Ecal->Print("Presample_pedestal.eps");
0269  } 
0270 
0271  // maximum position
0272 
0273 
0274  if (1) {
0275    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0276    Ecal->Divide(1,2);
0277 
0278    TH1 * meEBMaximumgt100ADC_;
0279    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel maximum position gt 100 ADC;1",meEBMaximumgt100ADC_);
0280    meEBMaximumgt100ADC_;
0281 
0282    TH1 * meEEMaximumgt100ADC_;
0283    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap maximum position gt 100 ADC;1",meEEMaximumgt100ADC_);
0284    meEEMaximumgt100ADC_;
0285 
0286    Ecal->cd(1);
0287    if ( meEBMaximumgt100ADC_ ) meEBMaximumgt100ADC_->Draw();
0288    Ecal->cd(2);
0289    if ( meEEMaximumgt100ADC_ ) meEEMaximumgt100ADC_->Draw();
0290    Ecal->Print("Maximum_position_gt100ADC.eps");
0291  }
0292 
0293  if (1) {
0294    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0295    Ecal->Divide(1,2);
0296 
0297    TH1 * meEBMaximumgt10ADC_;
0298    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel maximum position gt 10 ADC;1",meEBMaximumgt10ADC_);
0299    meEBMaximumgt10ADC_;
0300 
0301    TH1 * meEEMaximumgt20ADC_;
0302    rfile->GetObject("DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap maximum position gt 20 ADC;1",meEEMaximumgt20ADC_);
0303    meEEMaximumgt20ADC_;
0304 
0305    Ecal->cd(1);
0306    if ( meEBMaximumgt10ADC_ ) meEBMaximumgt10ADC_->Draw();
0307    Ecal->cd(2);
0308    if ( meEEMaximumgt20ADC_ ) meEEMaximumgt20ADC_->Draw();
0309    Ecal->Print("Maximum_position_gt10ADC.eps");
0310  }
0311 
0312  // Preshower ADC counts
0313 
0314  if (1) {
0315    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0316    Ecal->Divide(1,3);
0317 
0318    TH1 * meESDigiADC_[3];
0319    for ( Int_t  i=0 ; i<3; i++ ) {
0320      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Preshower ADC pulse %02d;1", i+1) ;
0321      rfile->GetObject(histo,meESDigiADC_[i]);
0322      meESDigiADC_[i];
0323    }
0324    for ( Int_t  i=0 ; i<3; i++ ) {
0325      Ecal->cd(i+1);
0326      gPad->SetLogy(0);
0327      if ( meESDigiADC_[i] ) meESDigiADC_[i]->Draw();
0328      gPad->SetLogy(1);
0329    }
0330    Ecal->Print("Preshower_ADC_counts.eps");
0331  }
0332  
0333  // Barrel analog pulse
0334 
0335  if (1) {
0336    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0337    Ecal->Divide(2,5);
0338 
0339    TH1 * meEBDigiADCAnalog_[10];
0340    for ( Int_t  i=0 ; i<10; i++ ) {
0341      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel analog pulse %02d;1", i+1) ;
0342      rfile->GetObject(histo,meEBDigiADCAnalog_[i]);
0343      meEBDigiADCAnalog_[i];
0344    }
0345    for ( Int_t  i=0 ; i<10; i++ ) {
0346      Ecal->cd(i+1);
0347      gPad->SetLogy(0);
0348      if ( meEBDigiADCAnalog_[i] ) meEBDigiADCAnalog_[i]->Draw();
0349      gPad->SetLogy(1);
0350    }
0351    Ecal->Print("Barrel_analog_ADC_counts.eps");
0352  }
0353 
0354  // Barrel ADC counts gain 1
0355 
0356  if (1) {
0357    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0358    Ecal->Divide(2,5);
0359 
0360    TH1 * meEBDigiADCg1_[10];
0361    for ( Int_t  i=0 ; i<10; i++ ) {
0362      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel ADC pulse %02d Gain 1;1", i+1) ;
0363      rfile->GetObject(histo,meEBDigiADCg1_[i]);
0364      meEBDigiADCg1_[i];
0365    }
0366    for ( Int_t  i=0 ; i<10; i++ ) {
0367      Ecal->cd(i+1);
0368      gPad->SetLogy(0);
0369      if ( meEBDigiADCg1_[i] ) meEBDigiADCg1_[i]->Draw();
0370      gPad->SetLogy(1);
0371    }
0372    Ecal->Print("Barrel_ADC_counts_gain1.eps");
0373  }
0374 
0375  // Barrel ADC counts gain 6
0376 
0377  if (1) {
0378    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0379    Ecal->Divide(2,5);
0380 
0381    TH1 * meEBDigiADCg6_[10];
0382    for ( Int_t  i=0 ; i<10; i++ ) {
0383      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel ADC pulse %02d Gain 6;1", i+1) ;
0384      rfile->GetObject(histo,meEBDigiADCg6_[i]);
0385      meEBDigiADCg6_[i];
0386    }
0387    for ( Int_t  i=0 ; i<10; i++ ) {
0388      Ecal->cd(i+1);
0389      gPad->SetLogy(0);
0390      if ( meEBDigiADCg6_[i] ) meEBDigiADCg6_[i]->Draw();
0391      gPad->SetLogy(1);
0392    }
0393    Ecal->Print("Barrel_ADC_counts_gain6.eps");
0394  }
0395 
0396  // Barrel ADC counts gain 12
0397 
0398  if (1) {
0399    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0400    Ecal->Divide(2,5);
0401 
0402    TH1 * meEBDigiADCg12_[10];
0403    for ( Int_t  i=0 ; i<10; i++ ) {
0404      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel ADC pulse %02d Gain 12;1", i+1) ;
0405      rfile->GetObject(histo,meEBDigiADCg12_[i]);
0406      meEBDigiADCg12_[i];
0407    }
0408    for ( Int_t  i=0 ; i<10; i++ ) {
0409      Ecal->cd(i+1);
0410      gPad->SetLogy(0);
0411      if ( meEBDigiADCg12_[i] ) meEBDigiADCg12_[i]->Draw();
0412      gPad->SetLogy(1);
0413    }
0414    Ecal->Print("Barrel_ADC_counts_gain12.eps");
0415  }
0416 
0417  // Barrel gain distributions
0418 
0419  if (1) {
0420    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0421    Ecal->Divide(2,5);
0422 
0423    TH1 * meEBDigiGain_[10];
0424    for ( Int_t  i=0 ; i<10; i++ ) {
0425      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Barrel gain pulse %02d;1", i+1) ;
0426      rfile->GetObject(histo,meEBDigiGain_[i]);
0427      meEBDigiGain_[i];
0428    }
0429    for ( Int_t  i=0 ; i<10; i++ ) {
0430      Ecal->cd(i+1);
0431      gPad->SetLogy(0);
0432      if ( meEBDigiGain_[i] ) meEBDigiGain_[i]->Draw();
0433      gPad->SetLogy(1);
0434    }
0435    Ecal->Print("Barrel_ADC_gain.eps");
0436  }
0437  
0438  // Endcap analog pulse
0439 
0440  if (1) {
0441    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0442    Ecal->Divide(2,5);
0443 
0444    TH1 * meEEDigiADCAnalog_[10];
0445    for ( Int_t  i=0 ; i<10; i++ ) {
0446      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap analog pulse %02d;1", i+1) ;
0447      rfile->GetObject(histo,meEEDigiADCAnalog_[i]);
0448      meEEDigiADCAnalog_[i];
0449    }
0450    for ( Int_t  i=0 ; i<10; i++ ) {
0451      Ecal->cd(i+1);
0452      gPad->SetLogy(0);
0453      if ( meEEDigiADCAnalog_[i] ) meEEDigiADCAnalog_[i]->Draw();
0454      gPad->SetLogy(1);
0455    }
0456    Ecal->Print("Endcap_analog_ADC_counts.eps");
0457  }
0458 
0459  // Endcap ADC counts gain 1
0460 
0461  if (1) {
0462    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0463    Ecal->Divide(2,5);
0464 
0465    TH1 * meEEDigiADCg1_[10];
0466    for ( Int_t  i=0 ; i<10; i++ ) {
0467      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap ADC pulse %02d Gain 1;1", i+1) ;
0468      rfile->GetObject(histo,meEEDigiADCg1_[i]);
0469      meEEDigiADCg1_[i];
0470    }
0471    for ( Int_t  i=0 ; i<10; i++ ) {
0472      Ecal->cd(i+1);
0473      gPad->SetLogy(0);
0474      if ( meEEDigiADCg1_[i] ) meEEDigiADCg1_[i]->Draw();
0475      gPad->SetLogy(1);
0476    }
0477    Ecal->Print("Endcap_ADC_counts_gain1.eps");
0478  }
0479 
0480  // Endcap ADC counts gain 6
0481 
0482  if (1) {
0483    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0484    Ecal->Divide(2,5);
0485 
0486    TH1 * meEEDigiADCg6_[10];
0487    for ( Int_t  i=0 ; i<10; i++ ) {
0488      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap ADC pulse %02d Gain 6;1", i+1) ;
0489      rfile->GetObject(histo,meEEDigiADCg6_[i]);
0490      meEEDigiADCg6_[i];
0491    }
0492    for ( Int_t  i=0 ; i<10; i++ ) {
0493      Ecal->cd(i+1);
0494      gPad->SetLogy(0);
0495      if ( meEEDigiADCg6_[i] ) meEEDigiADCg6_[i]->Draw();
0496      gPad->SetLogy(1);
0497    }
0498    Ecal->Print("Endcap_ADC_counts_gain6.eps");
0499  }
0500 
0501  // Endcap ADC counts gain 12
0502 
0503  if (1) {
0504    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0505    Ecal->Divide(2,5);
0506 
0507    TH1 * meEEDigiADCg12_[10];
0508    for ( Int_t  i=0 ; i<10; i++ ) {
0509      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap ADC pulse %02d Gain 12;1", i+1) ;
0510      rfile->GetObject(histo,meEEDigiADCg12_[i]);
0511      meEEDigiADCg12_[i];
0512    }
0513    for ( Int_t  i=0 ; i<10; i++ ) {
0514      Ecal->cd(i+1);
0515      gPad->SetLogy(0);
0516      if ( meEEDigiADCg12_[i] ) meEEDigiADCg12_[i]->Draw();
0517      gPad->SetLogy(1);
0518    }
0519    Ecal->Print("Endcap_ADC_counts_gain12.eps");
0520  }
0521 
0522  // Endcap gain distributions
0523 
0524  if (1) {
0525    TCanvas * Ecal = new TCanvas("Ecal","Ecal",800,1000);
0526    Ecal->Divide(2,5);
0527 
0528    TH1 * meEEDigiGain_[10];
0529    for ( Int_t  i=0 ; i<10; i++ ) {
0530      sprintf (histo, "DQMData/EcalDigisV/EcalDigiTask/EcalDigiTask Endcap gain pulse %02d;1", i+1) ;
0531      rfile->GetObject(histo,meEEDigiGain_[i]);
0532      meEEDigiGain_[i];
0533    }
0534    for ( Int_t  i=0 ; i<10; i++ ) {
0535      Ecal->cd(i+1);
0536      gPad->SetLogy(0);
0537      if ( meEEDigiGain_[i] ) meEEDigiGain_[i]->Draw();
0538      gPad->SetLogy(1);
0539    }
0540    Ecal->Print("Endcap_ADC_gain.eps");
0541  }
0542 
0543 }