Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:34:39

0001 void SiPixelRecHitsCompare()
0002 {
0003    gROOT->Reset();
0004    char* sfilename = "pixelrechitshisto.root";
0005    char* rfilename = "../pixelrechitshisto.root";
0006    
0007    //char* rfilename = "/uscms/home/ggiurgiu/work/CMSSW_1_2_0_pre4/src/Validation/TrackerRecHits/test/pixelrechitshisto_test34.root";
0008    //char* sfilename = "/uscms/home/ggiurgiu/work/CMSSW_1_2_0_pre4/src/Validation/TrackerRecHits/test/pixelrechitshisto_test56.root";
0009    
0010 
0011    delete gROOT->GetListOfFiles()->FindObject(rfilename);
0012    delete gROOT->GetListOfFiles()->FindObject(sfilename);
0013 
0014    TText * te = new TText();
0015    TFile * rfile = new TFile(rfilename);
0016    TDirectory * rdir=gDirectory; 
0017    TFile * sfile = new TFile(sfilename);
0018    TDirectory * sdir=gDirectory;
0019 
0020  if(rfile->cd("DQMData/Run 1/TrackerRecHitsV"))rfile->cd("DQMData/Run 1/TrackerRecHitsV/Run summary/TrackerRecHits/Pixel");
0021  else rfile->cd("DQMData/TrackerRecHitsV/TrackerRecHits/Pixel");
0022  rdir=gDirectory;
0023 
0024  if(sfile->cd("DQMData/Run 1/TrackerRecHitsV"))sfile->cd("DQMData/Run 1/TrackerRecHitsV/Run summary/TrackerRecHits/Pixel");
0025  else sfile->cd("DQMData/TrackerRecHitsV/TrackerRecHits/Pixel");
0026  sdir=gDirectory; 
0027  
0028 
0029 
0030   TLegend leg(0.3, 0.80, 0.55, 0.90);
0031  //Get list of Keys from the Reference file.
0032   TList* ref_list = rfile->GetListOfKeys() ;
0033   if (!ref_list) {
0034       std::cout<<"=========>> AutoComaprison:: There is no Keys available in the Reference file."<<std::endl;
0035       exit(1) ;
0036    }
0037 
0038   //Get list of Keys from the New file.
0039   TList* new_list = sfile->GetListOfKeys() ;
0040   if (!new_list) {
0041       std::cout<<"=========>> AutoComaprison:: There is no Keys available in New file."<<std::endl;
0042       exit(1) ;
0043    }
0044 
0045 
0046   //Iterate on the List of Keys of the  Reference file.
0047   TIter     refkey_iter( ref_list) ;
0048   TKey*     ref_key ;
0049   TObject*  ref_obj ;
0050 
0051   char rver[50];
0052   char cver[50];
0053   while ( ref_key = (TKey*) refkey_iter() ) {
0054       ref_obj = ref_key->ReadObj() ;
0055       if (strcmp(ref_obj->IsA()->GetName(),"TObjString")==0) {
0056 
0057          TObjString * rversion = dynamic_cast< TObjString*> (ref_obj);
0058          sprintf(rver, "%s", rversion->GetName());
0059          std::cout<<" Ref. version =" << rver<<std::endl;
0060          break;
0061       }
0062   }
0063 
0064   //Iterate on the List of Keys of the  Reference file.
0065   TIter     newkey_iter( new_list) ;
0066   TKey*     new_key ;
0067   TObject*  new_obj ;
0068   while ( new_key = (TKey*) newkey_iter() ) {
0069       new_obj = new_key->ReadObj() ;
0070       if (strcmp(new_obj->IsA()->GetName(),"TObjString")==0) {
0071 
0072          TObjString * cversion = dynamic_cast< TObjString*> (new_obj);
0073          sprintf(cver, "%s", cversion->GetName());
0074          std::cout<<" Cur version =" << cver<<std::endl;
0075          break;
0076 
0077       }
0078   }
0079 
0080  
0081 
0082   gROOT->ProcessLine(".x HistoCompare.C");    
0083    HistoCompare * myPV = new HistoCompare();
0084 
0085    Char_t histo[200];
0086 
0087    TCanvas* Pixel0;
0088    TCanvas* Pixel1;
0089    TCanvas* Pixel2;
0090    TCanvas* Pixel3;
0091    TCanvas* Pixel4;
0092    TCanvas* Pixel5;
0093    TCanvas* Pixel6;
0094    TCanvas* Pixel7;
0095    TCanvas* Pixel8;
0096    TCanvas* Pixel9;
0097    TCanvas* Pixel10;
0098    TCanvas* Pixel11;
0099    TCanvas* Pixel12;
0100    TCanvas* Pixel13;
0101    TCanvas* Pixel14;
0102    TCanvas* Pixel15;
0103    TCanvas* Pixel16;
0104    TCanvas* Pixel17;
0105    TCanvas* Pixel18;
0106    TCanvas* Pixel19;
0107    TCanvas* Pixel20;
0108    TCanvas* Pixel21;
0109    TCanvas* Pixel22;
0110    TCanvas* Pixel23;
0111    TCanvas* Pixel24;
0112    TCanvas* Pixel25;
0113    TCanvas* Pixel26;
0114    TCanvas* Pixel27;
0115    TCanvas* Pixel28;
0116    TCanvas* Pixel29;
0117    TCanvas* Pixel30;
0118    TCanvas* Pixel31;
0119    TCanvas* Pixel32;
0120    TCanvas* Pixel33;
0121    TCanvas* Pixel34;
0122    TCanvas* Pixel35;
0123    TCanvas* Pixel36;
0124    TCanvas* Pixel37;
0125 
0126    float scale = -99999.9;
0127 
0128    ////////////////////////////
0129    // Barrel Clusters
0130    ///////////////////////////
0131 
0132    if (1) 
0133      {
0134        //Cluster y size by module
0135        
0136        Pixel0 = new TCanvas("Pixel0", "Pixel0", 800, 1200);
0137        Pixel0->Divide(2,4);
0138        
0139        TH1* clustYSizeModule_[8];
0140        TH1* newclustYSizeModule_[8];
0141        
0142        for (Int_t i=0; i<8; i++) 
0143      {
0144        sprintf(histo, "clustBPIX/Clust_y_size_Module%d", i+1);
0145        rdir->GetObject(histo, clustYSizeModule_[i]);
0146        sdir->GetObject(histo, newclustYSizeModule_[i]);
0147        Pixel0->cd(i+1);
0148        gPad->SetLogy();
0149        clustYSizeModule_[i]->SetLineColor(2);
0150        clustYSizeModule_[i]->Sumw2();
0151        newclustYSizeModule_[i]->Sumw2();
0152        scale = 1.0/clustYSizeModule_[i]->Integral();
0153        clustYSizeModule_[i]->Scale(scale);
0154        scale = 1.0/newclustYSizeModule_[i]->Integral();
0155        newclustYSizeModule_[i]->Scale(scale);
0156        clustYSizeModule_[i]->Draw("h");
0157        newclustYSizeModule_[i]->SetLineColor(4);
0158        newclustYSizeModule_[i]->SetLineStyle(2);
0159        newclustYSizeModule_[i]->Draw("sameh");
0160        myPV->PVCompute(clustYSizeModule_[i], newclustYSizeModule_[i], te);
0161     leg.Clear();
0162    leg.AddEntry(clustYSizeModule_[i],rver , "l");
0163    leg.AddEntry(newclustYSizeModule_[i],cver , "l");
0164    leg.Draw();
0165      }
0166        Pixel0->Print("Clust_y_size_by_module.eps");   
0167      }
0168    
0169    if (1) 
0170      {
0171        //Cluster x size by layer
0172        
0173        Pixel1 = new TCanvas("Pixel1", "Pixel1", 800, 1200);
0174        Pixel1->Divide(1,3);
0175        
0176        TH1* clustXSizeLayer_[3];
0177        TH1* newclustXSizeLayer_[3];
0178        
0179        for (Int_t i=0; i<3; i++) 
0180      {
0181        sprintf(histo, "clustBPIX/Clust_x_size_Layer%d", i+1);
0182        rdir->GetObject(histo, clustXSizeLayer_[i]);
0183        sdir->GetObject(histo, newclustXSizeLayer_[i]);
0184        Pixel1->cd(i+1);
0185        gPad->SetLogy();
0186        clustXSizeLayer_[i]->SetLineColor(2);
0187        clustXSizeLayer_[i]->Sumw2();
0188        newclustXSizeLayer_[i]->Sumw2();
0189        scale = 1.0/clustXSizeLayer_[i]->Integral();
0190        clustXSizeLayer_[i]->Scale(scale);
0191        scale = 1.0/newclustXSizeLayer_[i]->Integral();
0192        newclustXSizeLayer_[i]->Scale(scale);
0193        clustXSizeLayer_[i]->Draw("h");
0194        newclustXSizeLayer_[i]->SetLineColor(4);
0195        newclustXSizeLayer_[i]->SetLineStyle(2);
0196        newclustXSizeLayer_[i]->Draw("sameh");
0197        myPV->PVCompute(clustXSizeLayer_[i], newclustXSizeLayer_[i], te);
0198     leg.Clear();
0199    leg.AddEntry(clustXSizeLayer_[i],rver , "l");
0200    leg.AddEntry(newclustXSizeLayer_[i],cver , "l");
0201    leg.Draw();
0202      }
0203        Pixel1->Print("Clust_x_size_by_layer.eps");   
0204      }
0205    
0206    if (1) 
0207      {
0208        //Cluster charge for Layer 1 by module
0209        
0210        Pixel2 = new TCanvas("Pixel2", "Pixel2", 800, 1200);
0211        Pixel2->Divide(2,4);
0212        
0213        TH1* clustChargeLayer1Modules_[8];
0214        TH1* newclustChargeLayer1Modules_[8];
0215        
0216        for (Int_t i=0; i<8; i++) 
0217      {
0218        sprintf(histo, "clustBPIX/Clust_charge_Layer1_Module%d", i+1);
0219        rdir->GetObject(histo, clustChargeLayer1Modules_[i]);
0220        sdir->GetObject(histo, newclustChargeLayer1Modules_[i]);
0221        Pixel2->cd(i+1);
0222        gPad->SetLogy();
0223        clustChargeLayer1Modules_[i]->SetLineColor(2);
0224        clustChargeLayer1Modules_[i]->Sumw2();
0225        newclustChargeLayer1Modules_[i]->Sumw2();
0226        scale = 1.0/clustChargeLayer1Modules_[i]->Integral();
0227        clustChargeLayer1Modules_[i]->Scale(scale);
0228        scale = 1.0/newclustChargeLayer1Modules_[i]->Integral();
0229        newclustChargeLayer1Modules_[i]->Scale(scale);
0230        clustChargeLayer1Modules_[i]->Draw("h");
0231        newclustChargeLayer1Modules_[i]->SetLineColor(4);
0232        newclustChargeLayer1Modules_[i]->SetLineStyle(2);
0233        newclustChargeLayer1Modules_[i]->Draw("sameh");
0234        myPV->PVCompute(clustChargeLayer1Modules_[i], newclustChargeLayer1Modules_[i], te);
0235        leg.Clear();
0236        leg.AddEntry(clustChargeLayer1Modules_[i],rver , "l");
0237        leg.AddEntry(newclustChargeLayer1Modules_[i],cver , "l");
0238        leg.Draw();
0239      }
0240        Pixel2->Print("Clust_charge_layer1_modules.eps");   
0241      }
0242    
0243    if (1) 
0244      {
0245        //Cluster charge for Layer 2 by module
0246        
0247        Pixel3 = new TCanvas("Pixel3", "Pixel3", 800, 1200);
0248        Pixel3->Divide(2,4);
0249        
0250        TH1* clustChargeLayer2Modules_[8];
0251        TH1* newclustChargeLayer2Modules_[8];
0252        
0253        for (Int_t i=0; i<8; i++) 
0254      {
0255        sprintf(histo, "clustBPIX/Clust_charge_Layer2_Module%d", i+1);
0256        rdir->GetObject(histo, clustChargeLayer2Modules_[i]);
0257        sdir->GetObject(histo, newclustChargeLayer2Modules_[i]);
0258        Pixel3->cd(i+1);
0259        gPad->SetLogy();
0260        clustChargeLayer2Modules_[i]->SetLineColor(2);
0261        clustChargeLayer2Modules_[i]->Sumw2();
0262        newclustChargeLayer2Modules_[i]->Sumw2();
0263        scale = 1.0/clustChargeLayer2Modules_[i]->Integral();
0264        clustChargeLayer2Modules_[i]->Scale(scale);
0265        scale = 1.0/newclustChargeLayer2Modules_[i]->Integral();
0266        newclustChargeLayer2Modules_[i]->Scale(scale);
0267        clustChargeLayer2Modules_[i]->Draw("h");
0268        newclustChargeLayer2Modules_[i]->SetLineColor(4);
0269        newclustChargeLayer2Modules_[i]->SetLineStyle(2);
0270        newclustChargeLayer2Modules_[i]->Draw("sameh");
0271        myPV->PVCompute(clustChargeLayer2Modules_[i], newclustChargeLayer2Modules_[i], te);
0272        leg.Clear();
0273        leg.AddEntry(clustChargeLayer2Modules_[i],rver , "l");
0274        leg.AddEntry(newclustChargeLayer2Modules_[i],cver , "l");
0275        leg.Draw();
0276      }
0277        Pixel3->Print("Clust_charge_layer2_modules.eps");   
0278      }
0279    
0280    if (1) 
0281      {
0282        //Cluster charge for Layer 3 by module
0283        
0284        Pixel4 = new TCanvas("Pixel4", "Pixel4", 800, 1200);
0285        Pixel4->Divide(2,4);
0286        
0287        TH1* clustChargeLayer3Modules_[8];
0288        TH1* newclustChargeLayer3Modules_[8];
0289        
0290        for (Int_t i=0; i<8; i++) 
0291      {
0292        sprintf(histo, "clustBPIX/Clust_charge_Layer3_Module%d", i+1);
0293        rdir->GetObject(histo, clustChargeLayer3Modules_[i]);
0294        sdir->GetObject(histo, newclustChargeLayer3Modules_[i]);
0295        Pixel4->cd(i+1);
0296        gPad->SetLogy();
0297        clustChargeLayer3Modules_[i]->SetLineColor(2);
0298        clustChargeLayer3Modules_[i]->Sumw2();
0299        newclustChargeLayer3Modules_[i]->Sumw2();
0300        scale = 1.0/clustChargeLayer3Modules_[i]->Integral();
0301        clustChargeLayer3Modules_[i]->Scale(scale);
0302        scale = 1.0/newclustChargeLayer3Modules_[i]->Integral();
0303        newclustChargeLayer3Modules_[i]->Scale(scale);
0304        clustChargeLayer3Modules_[i]->Draw("h");
0305        newclustChargeLayer3Modules_[i]->SetLineColor(4);
0306        newclustChargeLayer3Modules_[i]->SetLineStyle(2);
0307        newclustChargeLayer3Modules_[i]->Draw("sameh");
0308        myPV->PVCompute(clustChargeLayer3Modules_[i], newclustChargeLayer3Modules_[i], te);
0309     leg.Clear();
0310    leg.AddEntry(clustChargeLayer3Modules_[i],rver , "l");
0311    leg.AddEntry(newclustChargeLayer3Modules_[i],cver , "l");
0312    leg.Draw();
0313      }
0314        Pixel4->Print("Clust_charge_layer3_modules.eps");   
0315      }
0316    
0317    //----------------------------
0318    // Forward clusters
0319    //----------------------------
0320      
0321    if (1) 
0322      {
0323        // Cluster xsize for Disk1 by plaquette
0324        
0325        Pixel5 = new TCanvas("Pixel5", "Pixel5", 800, 1200);
0326        Pixel5->Divide(2,4);
0327        
0328        TH1* clustXSizeDisk1Plaquettes_[7];
0329        TH1* newclustXSizeDisk1Plaquettes_[7];
0330        
0331        for (Int_t i=0; i<7; i++) 
0332      {
0333        sprintf(histo, "clustFPIX/Clust_x_size_Disk1_Plaquette%d", i+1);
0334        rdir->GetObject(histo, clustXSizeDisk1Plaquettes_[i]);
0335        sdir->GetObject(histo, newclustXSizeDisk1Plaquettes_[i]);
0336        Pixel5->cd(i+1);
0337        gPad->SetLogy();
0338        clustXSizeDisk1Plaquettes_[i]->SetLineColor(2);
0339        clustXSizeDisk1Plaquettes_[i]->Sumw2();
0340        newclustXSizeDisk1Plaquettes_[i]->Sumw2();
0341        scale = 1.0/clustXSizeDisk1Plaquettes_[i]->Integral();
0342        clustXSizeDisk1Plaquettes_[i]->Scale(scale);
0343        scale = 1.0/ newclustXSizeDisk1Plaquettes_[i]->Integral();
0344        newclustXSizeDisk1Plaquettes_[i]->Scale(scale);
0345        clustXSizeDisk1Plaquettes_[i]->Draw("h");
0346        newclustXSizeDisk1Plaquettes_[i]->SetLineColor(4);
0347        newclustXSizeDisk1Plaquettes_[i]->SetLineStyle(2);
0348        newclustXSizeDisk1Plaquettes_[i]->Draw("sameh");
0349        myPV->PVCompute(clustXSizeDisk1Plaquettes_[i], newclustXSizeDisk1Plaquettes_[i], te);
0350     leg.Clear();
0351    leg.AddEntry(clustXSizeDisk1Plaquettes_[i],rver , "l");
0352    leg.AddEntry(newclustXSizeDisk1Plaquettes_[i],cver , "l");
0353    leg.Draw();
0354      }
0355        Pixel5->Print("Clust_xsize_disk1_plaquettes.eps");   
0356      }
0357    
0358    if (1) 
0359      {
0360        //Cluster xsize for Disk2 by plaquette
0361        
0362        Pixel6 = new TCanvas("Pixel6", "Pixel6", 800, 1200);
0363        Pixel6->Divide(2,4);
0364        
0365        TH1* clustXSizeDisk2Plaquettes_[7];
0366        TH1* newclustXSizeDisk2Plaquettes_[7];
0367        
0368        for (Int_t i=0; i<7; i++) 
0369      {
0370        sprintf(histo, "clustFPIX/Clust_x_size_Disk2_Plaquette%d", i+1);
0371        rdir->GetObject(histo, clustXSizeDisk2Plaquettes_[i]);
0372        sdir->GetObject(histo, newclustXSizeDisk2Plaquettes_[i]);
0373        Pixel6->cd(i+1);
0374        gPad->SetLogy();
0375        clustXSizeDisk2Plaquettes_[i]->SetLineColor(2);
0376        clustXSizeDisk2Plaquettes_[i]->Sumw2();
0377        newclustXSizeDisk2Plaquettes_[i]->Sumw2();
0378        scale = 1.0/clustXSizeDisk2Plaquettes_[i]->Integral();
0379        clustXSizeDisk2Plaquettes_[i]->Scale(scale);
0380        scale = 1.0/newclustXSizeDisk2Plaquettes_[i]->Integral();
0381        newclustXSizeDisk2Plaquettes_[i]->Scale(scale);
0382        clustXSizeDisk2Plaquettes_[i]->Draw("h");
0383        newclustXSizeDisk2Plaquettes_[i]->SetLineColor(4);
0384        newclustXSizeDisk2Plaquettes_[i]->SetLineStyle(2);
0385        newclustXSizeDisk2Plaquettes_[i]->Draw("sameh");
0386        myPV->PVCompute(clustXSizeDisk2Plaquettes_[i], newclustXSizeDisk2Plaquettes_[i], te);
0387     leg.Clear();
0388    leg.AddEntry(clustXSizeDisk2Plaquettes_[i],rver , "l");
0389    leg.AddEntry(newclustXSizeDisk2Plaquettes_[i],cver , "l");
0390    leg.Draw();
0391      }
0392        Pixel6->Print("Clust_xsize_disk2_plaquettes.eps");   
0393      }
0394    
0395    
0396    if (1) 
0397      {
0398        // Cluster ysize for Disk1 by plaquette
0399        
0400        Pixel7 = new TCanvas("Pixel7", "Pixel7", 800, 1200);
0401        Pixel7->Divide(2,4);
0402        
0403        TH1* clustYSizeDisk1Plaquettes_[7];
0404        TH1* newclustYSizeDisk1Plaquettes_[7];
0405        
0406        for (Int_t i=0; i<7; i++) 
0407      {
0408        sprintf(histo, "clustFPIX/Clust_y_size_Disk1_Plaquette%d", i+1);
0409        rdir->GetObject(histo, clustYSizeDisk1Plaquettes_[i]);
0410        sdir->GetObject(histo, newclustYSizeDisk1Plaquettes_[i]);
0411        Pixel7->cd(i+1);
0412        gPad->SetLogy();
0413        clustYSizeDisk1Plaquettes_[i]->SetLineColor(2);
0414        clustYSizeDisk1Plaquettes_[i]->Sumw2();
0415        newclustYSizeDisk1Plaquettes_[i]->Sumw2();
0416        scale = 1.0/clustYSizeDisk1Plaquettes_[i]->Integral();
0417        clustYSizeDisk1Plaquettes_[i]->Scale(scale);
0418        scale = 1.0/newclustYSizeDisk1Plaquettes_[i]->Integral();
0419        newclustYSizeDisk1Plaquettes_[i]->Scale(scale);
0420        clustYSizeDisk1Plaquettes_[i]->Draw("h");
0421        newclustYSizeDisk1Plaquettes_[i]->SetLineColor(4);
0422        newclustYSizeDisk1Plaquettes_[i]->SetLineStyle(2);
0423        newclustYSizeDisk1Plaquettes_[i]->Draw("sameh");
0424        myPV->PVCompute(clustYSizeDisk1Plaquettes_[i], newclustYSizeDisk1Plaquettes_[i], te);
0425     leg.Clear();
0426    leg.AddEntry(clustYSizeDisk1Plaquettes_[i],rver , "l");
0427    leg.AddEntry(newclustYSizeDisk1Plaquettes_[i],cver , "l");
0428    leg.Draw();
0429      }
0430        Pixel7->Print("Clust_ysize_disk1_plaquettes.eps");   
0431      }
0432    
0433    if (1) 
0434      {
0435        //Cluster ysize for Disk2 by plaquette
0436        
0437        Pixel8 = new TCanvas("Pixel8", "Pixel8", 800, 1200);
0438        Pixel8->Divide(2,4);
0439        
0440        TH1* clustYSizeDisk2Plaquettes_[7];
0441        TH1* newclustYSizeDisk2Plaquettes_[7];
0442        
0443        for (Int_t i=0; i<7; i++) 
0444      {
0445        sprintf(histo, "clustFPIX/Clust_y_size_Disk2_Plaquette%d", i+1);
0446        rdir->GetObject(histo, clustYSizeDisk2Plaquettes_[i]);
0447        sdir->GetObject(histo, newclustYSizeDisk2Plaquettes_[i]);
0448        Pixel8->cd(i+1);
0449        gPad->SetLogy();
0450        clustYSizeDisk2Plaquettes_[i]->SetLineColor(2);
0451        clustYSizeDisk2Plaquettes_[i]->Sumw2();
0452        newclustYSizeDisk2Plaquettes_[i]->Sumw2();
0453        scale = 1.0/clustYSizeDisk2Plaquettes_[i]->Integral();
0454        clustYSizeDisk2Plaquettes_[i]->Scale(scale);
0455        scale = 1.0/newclustYSizeDisk2Plaquettes_[i]->Integral();
0456        newclustYSizeDisk2Plaquettes_[i]->Scale(scale);
0457        clustYSizeDisk2Plaquettes_[i]->Draw("h");
0458        newclustYSizeDisk2Plaquettes_[i]->SetLineColor(4);
0459        newclustYSizeDisk2Plaquettes_[i]->SetLineStyle(2);
0460        newclustYSizeDisk2Plaquettes_[i]->Draw("sameh");
0461        myPV->PVCompute(clustYSizeDisk2Plaquettes_[i], newclustYSizeDisk2Plaquettes_[i], te);
0462     leg.Clear();
0463    leg.AddEntry(clustYSizeDisk2Plaquettes_[i],rver , "l");
0464    leg.AddEntry(newclustYSizeDisk2Plaquettes_[i],cver , "l");
0465    leg.Draw();
0466     }
0467        Pixel8->Print("Clust_ysize_disk2_plaquettes.eps");   
0468      }
0469    
0470    
0471    if (1) 
0472      {
0473        //Cluster charge for Disk1 by plaquette
0474        
0475        Pixel9 = new TCanvas("Pixel9", "Pixel9", 800, 1200);
0476        Pixel9->Divide(2,4);
0477        
0478        TH1* clustChargeDisk1Plaquettes_[7];
0479        TH1* newclustChargeDisk1Plaquettes_[7];
0480        
0481        for (Int_t i=0; i<7; i++) 
0482      {
0483        sprintf(histo, "clustFPIX/Clust_charge_Disk1_Plaquette%d", i+1);
0484        rdir->GetObject(histo, clustChargeDisk1Plaquettes_[i]);
0485        sdir->GetObject(histo, newclustChargeDisk1Plaquettes_[i]);
0486        Pixel9->cd(i+1);
0487        gPad->SetLogy();
0488        clustChargeDisk1Plaquettes_[i]->SetLineColor(2);
0489        clustChargeDisk1Plaquettes_[i]->Sumw2();
0490        newclustChargeDisk1Plaquettes_[i]->Sumw2();
0491        scale = 1.0/clustChargeDisk1Plaquettes_[i]->Integral();
0492        clustChargeDisk1Plaquettes_[i]->Scale(scale);
0493        scale = 1.0/newclustChargeDisk1Plaquettes_[i]->Integral();
0494        newclustChargeDisk1Plaquettes_[i]->Scale(scale);
0495        clustChargeDisk1Plaquettes_[i]->Draw("h");
0496        newclustChargeDisk1Plaquettes_[i]->SetLineColor(4);
0497        newclustChargeDisk1Plaquettes_[i]->SetLineStyle(2);
0498        newclustChargeDisk1Plaquettes_[i]->Draw("sameh");
0499        myPV->PVCompute(clustChargeDisk1Plaquettes_[i], newclustChargeDisk1Plaquettes_[i], te);
0500     leg.Clear();
0501    leg.AddEntry(clustChargeDisk1Plaquettes_[i],rver , "l");
0502    leg.AddEntry(newclustChargeDisk1Plaquettes_[i],cver , "l");
0503    leg.Draw();
0504      }
0505        Pixel9->Print("Clust_charge_disk1_plaquettes.eps");   
0506      }
0507    
0508    if (1) 
0509      {
0510        //Cluster charge for Disk2 by plaquette
0511        
0512        Pixel10 = new TCanvas("Pixel10", "Pixel10", 800, 1200);
0513        Pixel10->Divide(2,4);
0514        
0515        TH1* clustChargeDisk2Plaquettes_[7];
0516        TH1* newclustChargeDisk2Plaquettes_[7];
0517        
0518        for (Int_t i=0; i<7; i++) 
0519      {
0520        sprintf(histo, "clustFPIX/Clust_charge_Disk2_Plaquette%d", i+1);
0521        rdir->GetObject(histo, clustChargeDisk2Plaquettes_[i]);
0522        sdir->GetObject(histo, newclustChargeDisk2Plaquettes_[i]);
0523        Pixel10->cd(i+1);
0524        gPad->SetLogy();
0525        clustChargeDisk2Plaquettes_[i]->SetLineColor(2);
0526        clustChargeDisk2Plaquettes_[i]->Sumw2();
0527        newclustChargeDisk2Plaquettes_[i]->Sumw2();
0528        scale = 1.0/clustChargeDisk2Plaquettes_[i]->Integral();
0529        clustChargeDisk2Plaquettes_[i]->Scale(scale);
0530        scale = 1.0/newclustChargeDisk2Plaquettes_[i]->Integral();
0531        newclustChargeDisk2Plaquettes_[i]->Scale(scale);
0532        clustChargeDisk2Plaquettes_[i]->Draw("h");
0533        newclustChargeDisk2Plaquettes_[i]->SetLineColor(4);
0534        newclustChargeDisk2Plaquettes_[i]->SetLineStyle(2);
0535        newclustChargeDisk2Plaquettes_[i]->Draw("sameh");
0536        myPV->PVCompute(clustChargeDisk2Plaquettes_[i], newclustChargeDisk2Plaquettes_[i], te);
0537     leg.Clear();
0538    leg.AddEntry(clustChargeDisk2Plaquettes_[i],rver , "l");
0539    leg.AddEntry(newclustChargeDisk2Plaquettes_[i],cver , "l");
0540    leg.Draw();
0541     }
0542        Pixel10->Print("Clust_charge_disk2_plaquettes.eps");   
0543      }
0544 
0545    
0546    //----------------------
0547    // RecHit Barrel
0548    //----------------------
0549    
0550    if (1) 
0551      {
0552        //RecHit x distribution for Full Modules
0553        
0554        Pixel11 = new TCanvas("Pixel11", "Pixel11", 200, 300);
0555        TH1* recHitXFullModules_;
0556        TH1* newrecHitXFullModules_;
0557        
0558        sprintf (histo, "recHitBPIX/RecHit_x_FullModules");
0559        rdir->GetObject(histo, recHitXFullModules_);
0560        sdir->GetObject(histo, newrecHitXFullModules_);
0561        
0562        gPad->SetLogy();
0563        recHitXFullModules_->SetLineColor(2);
0564        recHitXFullModules_->Sumw2();
0565        newrecHitXFullModules_->Sumw2();
0566        scale = 1.0/recHitXFullModules_->Integral();
0567        recHitXFullModules_->Scale(scale);
0568        scale = 1.0/newrecHitXFullModules_->Integral();
0569        newrecHitXFullModules_->Scale(scale);
0570        recHitXFullModules_->Draw("h");
0571        newrecHitXFullModules_->SetLineColor(4);
0572        newrecHitXFullModules_->SetLineStyle(2);
0573        newrecHitXFullModules_->Draw("sameh");
0574        myPV->PVCompute(recHitXFullModules_, newrecHitXFullModules_, te);
0575        leg.Clear();
0576        leg.AddEntry(recHitXFullModules_,rver , "l");
0577        leg.AddEntry(newrecHitXFullModules_,cver , "l");
0578        leg.Draw();
0579        
0580        Pixel11->Print("RecHit_XDist_FullModules.eps");
0581        
0582        //RecHit x distribution half modules
0583        
0584        Pixel12 = new TCanvas("Pixel12", "Pixel12", 200, 300);
0585        TH1* recHitXHalfModules_;
0586        TH1* newrecHitXHalfModules_;
0587        
0588        sprintf (histo, "recHitBPIX/RecHit_x_HalfModules");
0589        rdir->GetObject(histo, recHitXHalfModules_);
0590        sdir->GetObject(histo, newrecHitXHalfModules_);
0591        
0592        gPad->SetLogy();
0593        recHitXHalfModules_->SetLineColor(2);
0594        recHitXHalfModules_->Sumw2();
0595        newrecHitXHalfModules_->Sumw2();
0596        scale = 1.0/recHitXHalfModules_->Integral();
0597        recHitXHalfModules_->Scale(scale);
0598        scale = 1.0/newrecHitXHalfModules_->Integral();
0599        newrecHitXHalfModules_->Scale(scale);
0600        recHitXHalfModules_->Draw("h");
0601        newrecHitXHalfModules_->SetLineColor(4);
0602        newrecHitXHalfModules_->SetLineStyle(2);
0603        newrecHitXHalfModules_->Draw("sameh");
0604        myPV->PVCompute(recHitXHalfModules_, newrecHitXHalfModules_, te);
0605        leg.Clear();
0606        leg.AddEntry(recHitXHalfModules_,rver , "l");
0607        leg.AddEntry(newrecHitXHalfModules_,cver , "l");
0608        leg.Draw();
0609        
0610        Pixel12->Print("RecHit_XDist_HalfModules.eps");
0611        
0612        //RecHit y distribution all modules
0613        
0614        Pixel13 = new TCanvas("Pixel13", "Pixel13", 200, 300);
0615        TH1* recHitYAllModules_;
0616        TH1* newrecHitYAllModules_;
0617        
0618        sprintf (histo, "recHitBPIX/RecHit_y_AllModules");
0619        rdir->GetObject(histo, recHitYAllModules_);
0620        sdir->GetObject(histo, newrecHitYAllModules_);
0621        
0622        gPad->SetLogy();
0623        recHitYAllModules_->SetLineColor(2);
0624        recHitYAllModules_->Sumw2();
0625        newrecHitYAllModules_->Sumw2();
0626        scale = 1.0/recHitYAllModules_->Integral();
0627        recHitYAllModules_->Scale(scale);
0628        scale = 1.0/newrecHitYAllModules_->Integral();
0629        newrecHitYAllModules_->Scale(scale);
0630        recHitYAllModules_->Draw("h");
0631        newrecHitYAllModules_->SetLineColor(4);
0632        newrecHitYAllModules_->SetLineStyle(2);
0633        newrecHitYAllModules_->Draw("sameh");
0634        myPV->PVCompute(recHitYAllModules_, newrecHitYAllModules_, te);
0635        leg.Clear();
0636        leg.AddEntry(recHitYAllModules_,rver , "l");
0637        leg.AddEntry(newrecHitYAllModules_,cver , "l");
0638        leg.Draw();
0639        
0640        Pixel13->Print("RecHit_YDist_AllModules.eps");
0641      }
0642    
0643    if (1) 
0644      {
0645        TH1* recHitXResFlippedLadderLayers_[3];
0646        TH1* newrecHitXResFlippedLadderLayers_[3];
0647        Pixel14 = new TCanvas("Pixel14", "Pixel14", 400, 600);
0648        Pixel14->Divide(1,3);
0649        
0650        for (Int_t i=0; i<3; i++) 
0651      {
0652        //RecHit XRes Flipped ladders by layer
0653        
0654        sprintf(histo, "recHitBPIX/RecHit_XRes_FlippedLadder_Layer%d", i+1);
0655        rdir->GetObject(histo, recHitXResFlippedLadderLayers_[i]);
0656        sdir->GetObject(histo, newrecHitXResFlippedLadderLayers_[i]);
0657        
0658        Pixel14->cd(i+1);
0659        gPad->SetLogy();
0660        recHitXResFlippedLadderLayers_[i]->SetLineColor(2);
0661        recHitXResFlippedLadderLayers_[i]->Sumw2();
0662        newrecHitXResFlippedLadderLayers_[i]->Sumw2();
0663        scale = 1.0/recHitXResFlippedLadderLayers_[i]->Integral();
0664        recHitXResFlippedLadderLayers_[i]->Scale(scale);
0665        scale = 1.0/newrecHitXResFlippedLadderLayers_[i]->Integral();
0666        newrecHitXResFlippedLadderLayers_[i]->Scale(scale);
0667        recHitXResFlippedLadderLayers_[i]->Draw("h");
0668        newrecHitXResFlippedLadderLayers_[i]->SetLineColor(4);
0669        newrecHitXResFlippedLadderLayers_[i]->SetLineStyle(2);
0670        newrecHitXResFlippedLadderLayers_[i]->Draw("sameh");
0671        myPV->PVCompute(recHitXResFlippedLadderLayers_[i], newrecHitXResFlippedLadderLayers_[i], te);
0672        leg.Clear();
0673        leg.AddEntry(recHitXResFlippedLadderLayers_[i],rver , "l");
0674        leg.AddEntry(newrecHitXResFlippedLadderLayers_[i],cver , "l");
0675        leg.Draw();
0676        
0677      }
0678        Pixel14->Print("RecHit_XRes_FlippedLadder_Layers.eps");
0679      }
0680    
0681    if (1) 
0682      {
0683        TH1* recHitXResUnFlippedLadderLayers_[3];
0684        TH1* newrecHitXResUnFlippedLadderLayers_[3];
0685        Pixel15 = new TCanvas("Pixel15", "Pixel15", 400, 600);
0686        Pixel15->Divide(1,3);
0687        
0688        for (Int_t i=0; i<3; i++) 
0689      {
0690        //RecHit XRes unflipped ladders by layer
0691        
0692        sprintf(histo, "recHitBPIX/RecHit_XRes_UnFlippedLadder_Layer%d", i+1);
0693        rdir->GetObject(histo, recHitXResUnFlippedLadderLayers_[i]);
0694        sdir->GetObject(histo, newrecHitXResUnFlippedLadderLayers_[i]);
0695        
0696        Pixel15->cd(i+1);
0697        gPad->SetLogy();
0698        recHitXResUnFlippedLadderLayers_[i]->SetLineColor(2);
0699        recHitXResUnFlippedLadderLayers_[i]->Sumw2();
0700        newrecHitXResUnFlippedLadderLayers_[i]->Sumw2();
0701        scale = 1.0/recHitXResUnFlippedLadderLayers_[i]->Integral();
0702        recHitXResUnFlippedLadderLayers_[i]->Scale(scale);
0703        scale = 1.0/newrecHitXResUnFlippedLadderLayers_[i]->Integral();
0704        newrecHitXResUnFlippedLadderLayers_[i]->Scale(scale);
0705        recHitXResUnFlippedLadderLayers_[i]->Draw("h");
0706        newrecHitXResUnFlippedLadderLayers_[i]->SetLineColor(4);
0707        newrecHitXResUnFlippedLadderLayers_[i]->SetLineStyle(2);
0708        newrecHitXResUnFlippedLadderLayers_[i]->Draw("sameh");
0709        myPV->PVCompute(recHitXResUnFlippedLadderLayers_[i], newrecHitXResUnFlippedLadderLayers_[i], te);
0710        leg.Clear();
0711        leg.AddEntry(recHitXResUnFlippedLadderLayers_[i],rver , "l");
0712        leg.AddEntry(newrecHitXResUnFlippedLadderLayers_[i],cver , "l");
0713        leg.Draw();
0714        
0715      }
0716        Pixel15->Print("RecHit_XRes_UnFlippedLadder_Layers.eps");
0717      }
0718    
0719    if (1) 
0720      {
0721        TH1* recHitYResLayer1Modules_[8];
0722        TH1* newrecHitYResLayer1Modules_[8];
0723        Pixel16 = new TCanvas("Pixel16", "Pixel16", 800, 1200);
0724        Pixel16->Divide(2,4);
0725        
0726        for (Int_t i=0; i<8; i++) 
0727      {
0728        //RecHit Y resolution by module for layer 1
0729        
0730        sprintf(histo, "recHitBPIX/RecHit_YRes_Layer1_Module%d", i+1);
0731        rdir->GetObject(histo, recHitYResLayer1Modules_[i]);
0732        sdir->GetObject(histo, newrecHitYResLayer1Modules_[i]);
0733 
0734        Pixel16->cd(i+1);
0735        gPad->SetLogy();
0736        recHitYResLayer1Modules_[i]->SetLineColor(2);
0737        recHitYResLayer1Modules_[i]->Sumw2();
0738        newrecHitYResLayer1Modules_[i]->Sumw2();
0739        scale = 1.0/recHitYResLayer1Modules_[i]->Integral();
0740        recHitYResLayer1Modules_[i]->Scale(scale);
0741        scale = 1.0/newrecHitYResLayer1Modules_[i]->Integral();
0742        newrecHitYResLayer1Modules_[i]->Scale(scale);
0743        recHitYResLayer1Modules_[i]->Draw("h");
0744        newrecHitYResLayer1Modules_[i]->SetLineColor(4);
0745        newrecHitYResLayer1Modules_[i]->SetLineStyle(2);
0746        newrecHitYResLayer1Modules_[i]->Draw("sameh");
0747        myPV->PVCompute(recHitYResLayer1Modules_[i], newrecHitYResLayer1Modules_[i], te);
0748        leg.Clear();
0749        leg.AddEntry(recHitYResLayer1Modules_[i],rver , "l");
0750        leg.AddEntry(newrecHitYResLayer1Modules_[i],cver , "l");
0751        leg.Draw();
0752        
0753      }
0754        Pixel16->Print("RecHit_YRes_Layer1_Modules.eps");
0755      }
0756    
0757    if (1) 
0758      {
0759        TH1* recHitYResLayer2Modules_[8];
0760        TH1* newrecHitYResLayer2Modules_[8];
0761        Pixel17 = new TCanvas("Pixel17", "Pixel17", 800, 1200);
0762        Pixel17->Divide(2,4);
0763        
0764        for (Int_t i=0; i<8; i++)
0765      {
0766        //RecHit Y resolution by module for layer 2
0767        
0768        sprintf(histo, "recHitBPIX/RecHit_YRes_Layer2_Module%d", i+1);
0769        rdir->GetObject(histo, recHitYResLayer2Modules_[i]);
0770        sdir->GetObject(histo, newrecHitYResLayer2Modules_[i]);
0771 
0772        Pixel17->cd(i+1);
0773        gPad->SetLogy();
0774        recHitYResLayer2Modules_[i]->SetLineColor(2);
0775        recHitYResLayer2Modules_[i]->Sumw2();
0776        newrecHitYResLayer2Modules_[i]->Sumw2();
0777        scale = 1.0/recHitYResLayer2Modules_[i]->Integral();
0778        recHitYResLayer2Modules_[i]->Scale(scale);
0779        scale = 1.0/newrecHitYResLayer2Modules_[i]->Integral();
0780        newrecHitYResLayer2Modules_[i]->Scale(scale);
0781        recHitYResLayer2Modules_[i]->Draw("h");
0782        newrecHitYResLayer2Modules_[i]->SetLineColor(4);
0783        newrecHitYResLayer2Modules_[i]->SetLineStyle(2);
0784        newrecHitYResLayer2Modules_[i]->Draw("sameh");
0785        myPV->PVCompute(recHitYResLayer2Modules_[i], newrecHitYResLayer2Modules_[i], te);
0786        leg.Clear();
0787        leg.AddEntry(recHitYResLayer2Modules_[i],rver , "l");
0788        leg.AddEntry(newrecHitYResLayer2Modules_[i],cver , "l");
0789        leg.Draw();
0790        
0791     }
0792        Pixel17->Print("RecHit_YRes_Layer2_Modules.eps");
0793      }
0794    
0795    if (1) 
0796      {
0797        TH1* recHitYResLayer3Modules_[8];
0798        TH1* newrecHitYResLayer3Modules_[8];
0799        Pixel18 = new TCanvas("Pixel18", "Pixel18", 800, 1200);
0800        Pixel18->Divide(2,4);
0801        
0802        for (Int_t i=0; i<8; i++) 
0803      {
0804        //RecHit Y resolution by module for layer 3
0805        
0806        sprintf(histo, "recHitBPIX/RecHit_YRes_Layer3_Module%d", i+1);
0807        rdir->GetObject(histo, recHitYResLayer3Modules_[i]);
0808        sdir->GetObject(histo, newrecHitYResLayer3Modules_[i]);
0809 
0810        Pixel18->cd(i+1);
0811        gPad->SetLogy();
0812        recHitYResLayer3Modules_[i]->SetLineColor(2);
0813        recHitYResLayer3Modules_[i]->Sumw2();
0814        newrecHitYResLayer3Modules_[i]->Sumw2();
0815        scale = 1.0/recHitYResLayer3Modules_[i]->Integral();
0816        recHitYResLayer3Modules_[i]->Scale(scale);
0817        scale = 1.0/newrecHitYResLayer3Modules_[i]->Integral();
0818        newrecHitYResLayer3Modules_[i]->Scale(scale);
0819        recHitYResLayer3Modules_[i]->Draw("h");
0820        newrecHitYResLayer3Modules_[i]->SetLineColor(4);
0821        newrecHitYResLayer3Modules_[i]->SetLineStyle(2);
0822        newrecHitYResLayer3Modules_[i]->Draw("sameh");
0823        myPV->PVCompute(recHitYResLayer3Modules_[i], newrecHitYResLayer3Modules_[i], te);
0824        leg.Clear();
0825        leg.AddEntry(recHitYResLayer3Modules_[i],rver , "l");
0826        leg.AddEntry(newrecHitYResLayer3Modules_[i],cver , "l");
0827        leg.Draw();
0828        
0829      }
0830        Pixel18->Print("RecHit_YRes_Layer3_Modules.eps");
0831      }
0832    
0833    ////////////////////////////////
0834    //RecHit forward
0835    ////////////////////////////////
0836    
0837    if (1) 
0838      {
0839        //RecHit x distribution for plaquettes x-size 1
0840        
0841        Pixel19 = new TCanvas("Pixel19", "Pixel19", 200, 300);
0842        
0843        TH1* recHitXPlaquetteXSize1_;
0844        TH1* newrecHitXPlaquetteXSize1_;
0845        
0846        sprintf(histo, "recHitFPIX/RecHit_x_Plaquette_xsize1");
0847        rdir->GetObject(histo, recHitXPlaquetteXSize1_);
0848        sdir->GetObject(histo, newrecHitXPlaquetteXSize1_);
0849        
0850        gPad->SetLogy();
0851        recHitXPlaquetteXSize1_->SetLineColor(2);
0852        recHitXPlaquetteXSize1_->Sumw2();
0853        newrecHitXPlaquetteXSize1_->Sumw2();
0854        scale = 1.0/recHitXPlaquetteXSize1_->Integral();
0855        recHitXPlaquetteXSize1_->Scale(scale);
0856        scale = 1.0/newrecHitXPlaquetteXSize1_->Integral();
0857        newrecHitXPlaquetteXSize1_->Scale(scale);
0858        recHitXPlaquetteXSize1_->Draw("h");
0859        newrecHitXPlaquetteXSize1_->SetLineColor(4);
0860        newrecHitXPlaquetteXSize1_->SetLineStyle(2);
0861        newrecHitXPlaquetteXSize1_->Draw("sameh");
0862        myPV->PVCompute(recHitXPlaquetteXSize1_, newrecHitXPlaquetteXSize1_, te);
0863        leg.Clear();
0864        leg.AddEntry(recHitXPlaquetteXSize1_,rver , "l");
0865        leg.AddEntry(newrecHitXPlaquetteXSize1_,cver , "l");
0866        leg.Draw();
0867        
0868        Pixel19->Print("RecHit_X_Plaquette_xsize1.eps");
0869        
0870        //RecHit x distribution for plaquettes x-size 2
0871        
0872        Pixel20 = new TCanvas("Pixel20", "Pixel20", 200, 300);
0873        
0874        TH1* recHitXPlaquetteXSize2_;
0875        TH1* newrecHitXPlaquetteXSize2_;
0876        
0877        sprintf(histo, "recHitFPIX/RecHit_x_Plaquette_xsize2");
0878        rdir->GetObject(histo, recHitXPlaquetteXSize2_);
0879        sdir->GetObject(histo, newrecHitXPlaquetteXSize2_);
0880        
0881        gPad->SetLogy();
0882        recHitXPlaquetteXSize2_->SetLineColor(2);
0883        recHitXPlaquetteXSize2_->Sumw2();
0884        newrecHitXPlaquetteXSize2_->Sumw2();
0885        scale = 1.0/recHitXPlaquetteXSize2_->Integral();
0886        recHitXPlaquetteXSize2_->Scale(scale);
0887        scale = 1.0/newrecHitXPlaquetteXSize2_->Integral();
0888        newrecHitXPlaquetteXSize2_->Scale(scale);
0889        recHitXPlaquetteXSize2_->Draw("h");
0890        newrecHitXPlaquetteXSize2_->SetLineColor(4);
0891        newrecHitXPlaquetteXSize2_->SetLineStyle(2);
0892        newrecHitXPlaquetteXSize2_->Draw("sameh");
0893        myPV->PVCompute(recHitXPlaquetteXSize2_, newrecHitXPlaquetteXSize2_, te);
0894        leg.Clear();
0895        leg.AddEntry(recHitXPlaquetteXSize2_,rver , "l");
0896        leg.AddEntry(newrecHitXPlaquetteXSize2_,cver , "l");
0897        leg.Draw();
0898        
0899        Pixel20->Print("RecHit_X_Plaquette_xsize2.eps");
0900        
0901        //RecHit y distribution for plaquettes y-size 2
0902        
0903        Pixel21 = new TCanvas("Pixel21", "Pixel21", 200, 300);
0904        
0905        TH1* recHitYPlaquetteYSize2_;
0906        TH1* newrecHitYPlaquetteYSize2_;
0907        
0908        sprintf(histo, "recHitFPIX/RecHit_y_Plaquette_ysize2");
0909        rdir->GetObject(histo, recHitYPlaquetteYSize2_);
0910        sdir->GetObject(histo, newrecHitYPlaquetteYSize2_);
0911        
0912        gPad->SetLogy();
0913        recHitYPlaquetteYSize2_->SetLineColor(2);
0914        recHitYPlaquetteYSize2_->Sumw2();
0915        newrecHitYPlaquetteYSize2_->Sumw2();
0916        scale = 1.0/recHitYPlaquetteYSize2_->Integral();
0917        recHitYPlaquetteYSize2_->Scale(scale);
0918        scale = 1.0/newrecHitYPlaquetteYSize2_->Integral();
0919        newrecHitYPlaquetteYSize2_->Scale(scale);
0920        recHitYPlaquetteYSize2_->Draw("h");
0921        newrecHitYPlaquetteYSize2_->SetLineColor(4);
0922        newrecHitYPlaquetteYSize2_->SetLineStyle(2);
0923        newrecHitYPlaquetteYSize2_->Draw("sameh");
0924        myPV->PVCompute(recHitYPlaquetteYSize2_, newrecHitYPlaquetteYSize2_, te);
0925        leg.Clear();
0926        leg.AddEntry(recHitYPlaquetteYSize2_,rver , "l");
0927        leg.AddEntry(newrecHitYPlaquetteYSize2_,cver , "l");
0928        leg.Draw();
0929        
0930        Pixel21->Print("RecHit_Y_Plaquette_ysize2.eps");
0931        
0932        //RecHit y distribution for plaquettes y-size 3
0933        
0934        Pixel22 = new TCanvas("Pixel22", "Pixel22", 200, 300);
0935        
0936        TH1* recHitYPlaquetteYSize3_;
0937        TH1* newrecHitYPlaquetteYSize3_;
0938        
0939        sprintf(histo, "recHitFPIX/RecHit_y_Plaquette_ysize3");
0940        rdir->GetObject(histo, recHitYPlaquetteYSize3_);
0941        sdir->GetObject(histo, newrecHitYPlaquetteYSize3_);
0942        
0943        gPad->SetLogy();
0944        recHitYPlaquetteYSize3_->SetLineColor(2);
0945        recHitYPlaquetteYSize3_->Sumw2();
0946        newrecHitYPlaquetteYSize3_->Sumw2();
0947        scale = 1.0/recHitYPlaquetteYSize3_->Integral();
0948        recHitYPlaquetteYSize3_->Scale(scale);
0949        scale = 1.0/newrecHitYPlaquetteYSize3_->Integral();
0950        newrecHitYPlaquetteYSize3_->Scale(scale);
0951        recHitYPlaquetteYSize3_->Draw("h");
0952        newrecHitYPlaquetteYSize3_->SetLineColor(4);
0953        newrecHitYPlaquetteYSize3_->SetLineStyle(2);
0954        newrecHitYPlaquetteYSize3_->Draw("sameh");
0955        myPV->PVCompute(recHitYPlaquetteYSize3_, newrecHitYPlaquetteYSize3_, te);
0956        leg.Clear();
0957        leg.AddEntry(recHitYPlaquetteYSize3_,rver , "l");
0958        leg.AddEntry(newrecHitYPlaquetteYSize3_,cver , "l");
0959        leg.Draw();
0960        
0961        Pixel22->Print("RecHit_Y_Plaquette_ysize3.eps");
0962        
0963        //RecHit y distribution for plaquettes y-size 4
0964        
0965        Pixel23 = new TCanvas("Pixel23", "Pixel23", 200, 300);
0966        
0967        TH1* recHitYPlaquetteYSize4_;
0968        TH1* newrecHitYPlaquetteYSize4_;
0969        
0970        sprintf(histo, "recHitFPIX/RecHit_y_Plaquette_ysize4");
0971        rdir->GetObject(histo, recHitYPlaquetteYSize4_);
0972        sdir->GetObject(histo, newrecHitYPlaquetteYSize4_);
0973        
0974        gPad->SetLogy();
0975        recHitYPlaquetteYSize4_->SetLineColor(2);
0976        recHitYPlaquetteYSize4_->Sumw2();
0977        newrecHitYPlaquetteYSize4_->Sumw2();
0978        scale = 1.0/recHitYPlaquetteYSize4_->Integral();
0979        recHitYPlaquetteYSize4_->Scale(scale);
0980        scale = 1.0/newrecHitYPlaquetteYSize4_->Integral();
0981        newrecHitYPlaquetteYSize4_->Scale(scale);
0982        recHitYPlaquetteYSize4_->Draw("h");
0983        newrecHitYPlaquetteYSize4_->SetLineColor(4);
0984        newrecHitYPlaquetteYSize4_->SetLineStyle(2);
0985        newrecHitYPlaquetteYSize4_->Draw("sameh");
0986        myPV->PVCompute(recHitYPlaquetteYSize4_, newrecHitYPlaquetteYSize4_, te);
0987        leg.Clear();
0988        leg.AddEntry(recHitYPlaquetteYSize4_,rver , "l");
0989        leg.AddEntry(newrecHitYPlaquetteYSize4_,cver , "l");
0990        leg.Draw();
0991        
0992        Pixel23->Print("RecHit_Y_Plaquette_ysize4.eps");
0993        
0994        //RecHit y distribution for plaquettes y-size 5
0995        
0996        Pixel24 = new TCanvas("Pixel24", "Pixel24", 200, 300);
0997        
0998        TH1* recHitYPlaquetteYSize5_;
0999        TH1* newrecHitYPlaquetteYSize5_;
1000        
1001        sprintf(histo, "recHitFPIX/RecHit_y_Plaquette_ysize5");
1002        rdir->GetObject(histo, recHitYPlaquetteYSize5_);
1003        sdir->GetObject(histo, newrecHitYPlaquetteYSize5_);
1004        
1005        gPad->SetLogy();
1006        recHitYPlaquetteYSize5_->SetLineColor(2);
1007        recHitYPlaquetteYSize5_->Sumw2();
1008        newrecHitYPlaquetteYSize5_->Sumw2();
1009        scale = 1.0/recHitYPlaquetteYSize5_->Integral();
1010        recHitYPlaquetteYSize5_->Scale(scale);
1011        scale = 1.0/newrecHitYPlaquetteYSize5_->Integral();
1012        newrecHitYPlaquetteYSize5_->Scale(scale);
1013        recHitYPlaquetteYSize5_->Draw("h");
1014        newrecHitYPlaquetteYSize5_->SetLineColor(4);
1015        newrecHitYPlaquetteYSize5_->SetLineStyle(2);
1016        newrecHitYPlaquetteYSize5_->Draw("sameh");
1017        myPV->PVCompute(recHitYPlaquetteYSize5_, newrecHitYPlaquetteYSize5_, te);
1018        leg.Clear();
1019        leg.AddEntry(recHitYPlaquetteYSize5_,rver , "l");
1020        leg.AddEntry(newrecHitYPlaquetteYSize5_,cver , "l");
1021        leg.Draw();
1022        
1023        Pixel24->Print("RecHit_Y_Plaquette_ysize5.eps");
1024      }
1025    
1026    if (1) 
1027      {
1028        TH1* recHitXResDisk1Plaquettes_[7];
1029        TH1* newrecHitXResDisk1Plaquettes_[7];
1030        Pixel25 = new TCanvas("Pixel25", "Pixel25", 800, 1200);
1031        Pixel25->Divide(2,4);
1032        
1033        for (Int_t i=0; i<7; i++) 
1034      {
1035        //RecHit X resolution by plaquette for Disk1
1036        
1037        sprintf(histo, "recHitFPIX/RecHit_XRes_Disk1_Plaquette%d", i+1);
1038        rdir->GetObject(histo, recHitXResDisk1Plaquettes_[i]);
1039        sdir->GetObject(histo, newrecHitXResDisk1Plaquettes_[i]);
1040 
1041        Pixel25->cd(i+1);
1042        gPad->SetLogy();
1043        recHitXResDisk1Plaquettes_[i]->SetLineColor(2);
1044        recHitXResDisk1Plaquettes_[i]->Sumw2();
1045        newrecHitXResDisk1Plaquettes_[i]->Sumw2();
1046        scale = 1.0/recHitXResDisk1Plaquettes_[i]->Integral();
1047        recHitXResDisk1Plaquettes_[i]->Scale(scale);
1048        scale = 1.0/newrecHitXResDisk1Plaquettes_[i]->Integral();
1049        newrecHitXResDisk1Plaquettes_[i]->Scale(scale);
1050        recHitXResDisk1Plaquettes_[i]->Draw("h");
1051        newrecHitXResDisk1Plaquettes_[i]->SetLineColor(4);
1052        newrecHitXResDisk1Plaquettes_[i]->SetLineStyle(2);
1053        newrecHitXResDisk1Plaquettes_[i]->Draw("sameh");
1054        myPV->PVCompute(recHitXResDisk1Plaquettes_[i], newrecHitXResDisk1Plaquettes_[i], te);
1055        leg.Clear();
1056        leg.AddEntry(recHitXResDisk1Plaquettes_[i],rver , "l");
1057        leg.AddEntry(newrecHitXResDisk1Plaquettes_[i],cver , "l");
1058        leg.Draw();
1059        
1060     }
1061        Pixel25->Print("RecHit_XRes_disk1_plaquettes.eps");
1062      }
1063    
1064    if (1) 
1065      {
1066        TH1* recHitXResDisk2Plaquettes_[7];
1067        TH1* newrecHitXResDisk2Plaquettes_[7];
1068        Pixel26 = new TCanvas("Pixel26", "Pixel26", 800, 1200);
1069        Pixel26->Divide(2,4);
1070        
1071        for (Int_t i=0; i<7; i++) 
1072      {
1073        //RecHit X resolution by plaquette for Disk2
1074        
1075        sprintf(histo, "recHitFPIX/RecHit_XRes_Disk2_Plaquette%d", i+1);
1076        rdir->GetObject(histo, recHitXResDisk2Plaquettes_[i]);
1077        sdir->GetObject(histo, newrecHitXResDisk2Plaquettes_[i]);
1078 
1079        Pixel26->cd(i+1);
1080        gPad->SetLogy();
1081        recHitXResDisk2Plaquettes_[i]->SetLineColor(2);
1082        recHitXResDisk2Plaquettes_[i]->Sumw2();
1083        newrecHitXResDisk2Plaquettes_[i]->Sumw2();
1084        scale = 1.0/recHitXResDisk2Plaquettes_[i]->Integral();
1085        recHitXResDisk2Plaquettes_[i]->Scale(scale);
1086        scale = 1.0/newrecHitXResDisk2Plaquettes_[i]->Integral();
1087        newrecHitXResDisk2Plaquettes_[i]->Scale(scale);
1088        recHitXResDisk2Plaquettes_[i]->Draw("h");
1089        newrecHitXResDisk2Plaquettes_[i]->SetLineColor(4);
1090        newrecHitXResDisk2Plaquettes_[i]->SetLineStyle(2);
1091        newrecHitXResDisk2Plaquettes_[i]->Draw("sameh");
1092        myPV->PVCompute(recHitXResDisk2Plaquettes_[i], newrecHitXResDisk2Plaquettes_[i], te);
1093        leg.Clear();
1094        leg.AddEntry(recHitXResDisk2Plaquettes_[i],rver , "l");
1095        leg.AddEntry(newrecHitXResDisk2Plaquettes_[i],cver , "l");
1096        leg.Draw();
1097        
1098      }
1099        Pixel26->Print("RecHit_XRes_disk2_plaquettes.eps");
1100      }
1101    
1102    if (1) 
1103      {
1104        TH1* recHitYResDisk1Plaquettes_[7];
1105        TH1* newrecHitYResDisk1Plaquettes_[7];
1106        Pixel27 = new TCanvas("Pixel27", "Pixel27", 800, 1200);
1107        Pixel27->Divide(2,4);
1108        
1109        for (Int_t i=0; i<7; i++)
1110      {
1111        //RecHit Y resolution by plaquette for Disk1
1112        
1113        sprintf(histo, "recHitFPIX/RecHit_YRes_Disk1_Plaquette%d", i+1);
1114        rdir->GetObject(histo, recHitYResDisk1Plaquettes_[i]);
1115        sdir->GetObject(histo, newrecHitYResDisk1Plaquettes_[i]);
1116 
1117        Pixel27->cd(i+1);
1118        gPad->SetLogy();
1119        recHitYResDisk1Plaquettes_[i]->SetLineColor(2);
1120        recHitYResDisk1Plaquettes_[i]->Sumw2();
1121        newrecHitYResDisk1Plaquettes_[i]->Sumw2();
1122        scale = 1.0/recHitYResDisk1Plaquettes_[i]->Integral();
1123        recHitYResDisk1Plaquettes_[i]->Scale(scale);
1124        scale = 1.0/newrecHitYResDisk1Plaquettes_[i]->Integral();
1125        newrecHitYResDisk1Plaquettes_[i]->Scale(scale);
1126        recHitYResDisk1Plaquettes_[i]->Draw("h");
1127        newrecHitYResDisk1Plaquettes_[i]->SetLineColor(4);
1128        newrecHitYResDisk1Plaquettes_[i]->SetLineStyle(2);
1129        newrecHitYResDisk1Plaquettes_[i]->Draw("sameh");
1130        myPV->PVCompute(recHitYResDisk1Plaquettes_[i], newrecHitYResDisk1Plaquettes_[i], te);
1131        leg.Clear();
1132        leg.AddEntry(recHitYResDisk1Plaquettes_[i],rver , "l");
1133        leg.AddEntry(newrecHitYResDisk1Plaquettes_[i],cver , "l");
1134        leg.Draw();
1135        
1136      }
1137        Pixel27->Print("RecHit_YRes_disk1_plaquettes.eps");
1138      }
1139    
1140    if (1) 
1141      {
1142        TH1* recHitYResDisk2Plaquettes_[7];
1143        TH1* newrecHitYResDisk2Plaquettes_[7];
1144        Pixel28 = new TCanvas("Pixel28", "Pixel28", 800, 1200);
1145        Pixel28->Divide(2,4);
1146        
1147        for (Int_t i=0; i<7; i++) 
1148      {
1149        //RecHit X resolution by plaquette for Disk2
1150        
1151        sprintf(histo, "recHitFPIX/RecHit_YRes_Disk2_Plaquette%d", i+1);
1152        rdir->GetObject(histo, recHitYResDisk2Plaquettes_[i]);
1153        sdir->GetObject(histo, newrecHitYResDisk2Plaquettes_[i]);
1154 
1155        Pixel28->cd(i+1);
1156        gPad->SetLogy();
1157        recHitYResDisk2Plaquettes_[i]->SetLineColor(2);
1158        recHitYResDisk2Plaquettes_[i]->Sumw2();
1159        newrecHitYResDisk2Plaquettes_[i]->Sumw2();
1160        scale = 1.0/recHitYResDisk2Plaquettes_[i]->Integral();
1161        recHitYResDisk2Plaquettes_[i]->Scale(scale);
1162        scale = 1.0/newrecHitYResDisk2Plaquettes_[i]->Integral();
1163        newrecHitYResDisk2Plaquettes_[i]->Scale(scale);
1164        recHitYResDisk2Plaquettes_[i]->Draw("h");
1165        newrecHitYResDisk2Plaquettes_[i]->SetLineColor(4);
1166        newrecHitYResDisk2Plaquettes_[i]->SetLineStyle(2);
1167        newrecHitYResDisk2Plaquettes_[i]->Draw("sameh");
1168        myPV->PVCompute(recHitYResDisk2Plaquettes_[i], newrecHitYResDisk2Plaquettes_[i], te);
1169        leg.Clear();
1170        leg.AddEntry(recHitYResDisk2Plaquettes_[i],rver , "l");
1171        leg.AddEntry(newrecHitYResDisk2Plaquettes_[i],cver , "l");
1172        leg.Draw();
1173        
1174      }
1175        Pixel28->Print("RecHit_YRes_disk2_plaquettes.eps");
1176      }
1177    
1178       
1179    //------------------------
1180    // RecHit Pull Distributions Barrel
1181    //------------------------
1182    
1183    if (1) 
1184      {
1185        TH1* recHitXPullFlippedLadderLayers_[3];
1186        TH1* newrecHitXPullFlippedLadderLayers_[3];
1187        Pixel29 = new TCanvas("Pixel29", "Pixel29", 400, 600);
1188        Pixel29->Divide(1,3);
1189        
1190        for (Int_t i=0; i<3; i++) 
1191      {
1192        //RecHit XPull Flipped ladders by layer
1193        
1194        sprintf(histo, "recHitPullsBPIX/RecHit_XPull_FlippedLadder_Layer%d", i+1);
1195        rdir->GetObject(histo, recHitXPullFlippedLadderLayers_[i]);
1196        sdir->GetObject(histo, newrecHitXPullFlippedLadderLayers_[i]);
1197 
1198        Pixel29->cd(i+1);
1199        //gPad->SetLogy();
1200        recHitXPullFlippedLadderLayers_[i]->SetLineColor(2);
1201        recHitXPullFlippedLadderLayers_[i]->Sumw2();
1202        newrecHitXPullFlippedLadderLayers_[i]->Sumw2();
1203        scale = 1.0/recHitXPullFlippedLadderLayers_[i]->Integral();
1204        recHitXPullFlippedLadderLayers_[i]->Scale(scale);
1205        scale = 1.0/newrecHitXPullFlippedLadderLayers_[i]->Integral();
1206        newrecHitXPullFlippedLadderLayers_[i]->Scale(scale);
1207        recHitXPullFlippedLadderLayers_[i]->Draw("h");
1208        newrecHitXPullFlippedLadderLayers_[i]->SetLineColor(4);
1209        newrecHitXPullFlippedLadderLayers_[i]->SetLineStyle(2);
1210        newrecHitXPullFlippedLadderLayers_[i]->Draw("sameh");
1211        myPV->PVCompute(recHitXPullFlippedLadderLayers_[i], newrecHitXPullFlippedLadderLayers_[i], te);
1212        leg.Clear();
1213        leg.AddEntry(recHitXPullFlippedLadderLayers_[i],rver , "l");
1214        leg.AddEntry(newrecHitXPullFlippedLadderLayers_[i],cver , "l");
1215        leg.Draw();
1216        
1217     }
1218        Pixel29->Print("RecHit_XPull_FlippedLadder_Layers.eps");
1219      }
1220    
1221    if (1) 
1222      {
1223        TH1* recHitXPullUnFlippedLadderLayers_[3];
1224        TH1* newrecHitXPullUnFlippedLadderLayers_[3];
1225        Pixel30 = new TCanvas("Pixel30", "Pixel30", 400, 600);
1226        Pixel30->Divide(1,3);
1227        
1228        for (Int_t i=0; i<3; i++) 
1229      {
1230        //RecHit XPull unflipped ladders by layer
1231        
1232        sprintf(histo, "recHitPullsBPIX/RecHit_XPull_UnFlippedLadder_Layer%d", i+1);
1233        rdir->GetObject(histo, recHitXPullUnFlippedLadderLayers_[i]);
1234        sdir->GetObject(histo, newrecHitXPullUnFlippedLadderLayers_[i]);
1235 
1236        Pixel30->cd(i+1);
1237        //gPad->SetLogy();
1238        recHitXPullUnFlippedLadderLayers_[i]->SetLineColor(2);
1239        recHitXPullUnFlippedLadderLayers_[i]->Sumw2();
1240        newrecHitXPullUnFlippedLadderLayers_[i]->Sumw2();
1241        scale = 1.0/recHitXPullUnFlippedLadderLayers_[i]->Integral();
1242        recHitXPullUnFlippedLadderLayers_[i]->Scale(scale);
1243        scale = 1.0/newrecHitXPullUnFlippedLadderLayers_[i]->Integral();
1244        newrecHitXPullUnFlippedLadderLayers_[i]->Scale(scale);
1245        recHitXPullUnFlippedLadderLayers_[i]->Draw("h");
1246        newrecHitXPullUnFlippedLadderLayers_[i]->SetLineColor(4);
1247        newrecHitXPullUnFlippedLadderLayers_[i]->SetLineStyle(2);
1248        newrecHitXPullUnFlippedLadderLayers_[i]->Draw("sameh");
1249        myPV->PVCompute(recHitXPullUnFlippedLadderLayers_[i], newrecHitXPullUnFlippedLadderLayers_[i], te);
1250        leg.Clear();
1251        leg.AddEntry(recHitXPullUnFlippedLadderLayers_[i],rver , "l");
1252        leg.AddEntry(newrecHitXPullUnFlippedLadderLayers_[i],cver , "l");
1253        leg.Draw();
1254        
1255      }
1256        Pixel30->Print("RecHit_XPull_UnFlippedLadder_Layers.eps");
1257      }
1258    
1259    if (1) 
1260      {
1261        TH1* recHitPullYPullLayer1Modules_[8];
1262        TH1* newrecHitPullYPullLayer1Modules_[8];
1263        Pixel31 = new TCanvas("Pixel31", "Pixel31", 800, 1200);
1264        Pixel31->Divide(2,4);
1265        
1266        for (Int_t i=0; i<8; i++) 
1267      {
1268        //RecHit Y pullolution by module for layer 1
1269        
1270        sprintf(histo, "recHitPullsBPIX/RecHit_YPull_Layer1_Module%d", i+1);
1271        rdir->GetObject(histo, recHitPullYPullLayer1Modules_[i]);
1272        sdir->GetObject(histo, newrecHitPullYPullLayer1Modules_[i]);
1273 
1274        Pixel31->cd(i+1);
1275        //gPad->SetLogy();
1276        recHitPullYPullLayer1Modules_[i]->SetLineColor(2);
1277        recHitPullYPullLayer1Modules_[i]->Sumw2();
1278        newrecHitPullYPullLayer1Modules_[i]->Sumw2();
1279        scale = 1.0/recHitPullYPullLayer1Modules_[i]->Integral();
1280        recHitPullYPullLayer1Modules_[i]->Scale(scale);
1281        scale = 1.0/newrecHitPullYPullLayer1Modules_[i]->Integral();
1282        newrecHitPullYPullLayer1Modules_[i]->Scale(scale);
1283        recHitPullYPullLayer1Modules_[i]->Draw("h");
1284        newrecHitPullYPullLayer1Modules_[i]->SetLineColor(4);
1285        newrecHitPullYPullLayer1Modules_[i]->SetLineStyle(2);
1286        newrecHitPullYPullLayer1Modules_[i]->Draw("sameh");
1287        myPV->PVCompute(recHitPullYPullLayer1Modules_[i], newrecHitPullYPullLayer1Modules_[i], te);
1288        leg.Clear();
1289        leg.AddEntry(recHitPullYPullLayer1Modules_[i],rver , "l");
1290        leg.AddEntry(newrecHitPullYPullLayer1Modules_[i],cver , "l");
1291        leg.Draw();
1292        
1293      }
1294        Pixel31->Print("RecHit_YPull_Layer1_Modules.eps");
1295      }
1296    
1297    if (1) 
1298      {
1299        TH1* recHitPullYPullLayer2Modules_[8];
1300        TH1* newrecHitPullYPullLayer2Modules_[8];
1301        Pixel32 = new TCanvas("Pixel32", "Pixel32", 800, 1200);
1302        Pixel32->Divide(2,4);
1303        
1304        for (Int_t i=0; i<8; i++) 
1305      {
1306        //RecHit Y pullolution by module for layer 2
1307        
1308        sprintf(histo, "recHitPullsBPIX/RecHit_YPull_Layer2_Module%d", i+1);
1309        rdir->GetObject(histo, recHitPullYPullLayer2Modules_[i]);
1310        sdir->GetObject(histo, newrecHitPullYPullLayer2Modules_[i]);
1311        
1312        Pixel32->cd(i+1);
1313        // gPad->SetLogy();
1314        recHitPullYPullLayer2Modules_[i]->SetLineColor(2);
1315        recHitPullYPullLayer2Modules_[i]->Sumw2();
1316        newrecHitPullYPullLayer2Modules_[i]->Sumw2();
1317        scale = 1.0/recHitPullYPullLayer2Modules_[i]->Integral();
1318        recHitPullYPullLayer2Modules_[i]->Scale(scale);
1319        scale = 1.0/newrecHitPullYPullLayer2Modules_[i]->Integral();
1320        newrecHitPullYPullLayer2Modules_[i]->Scale(scale);
1321        recHitPullYPullLayer2Modules_[i]->Draw("h");
1322        newrecHitPullYPullLayer2Modules_[i]->SetLineColor(4);
1323        newrecHitPullYPullLayer2Modules_[i]->SetLineStyle(2);
1324        newrecHitPullYPullLayer2Modules_[i]->Draw("sameh");
1325        myPV->PVCompute(recHitPullYPullLayer2Modules_[i], newrecHitPullYPullLayer2Modules_[i], te);
1326        leg.Clear();
1327        leg.AddEntry(recHitPullYPullLayer2Modules_[i],rver , "l");
1328        leg.AddEntry(newrecHitPullYPullLayer2Modules_[i],cver , "l");
1329        leg.Draw();
1330        
1331      }
1332        Pixel32->Print("RecHit_YPull_Layer2_Modules.eps");
1333      }
1334 
1335    if (1) 
1336      {
1337        TH1* recHitPullYPullLayer3Modules_[8];
1338        TH1* newrecHitPullYPullLayer3Modules_[8];
1339        Pixel33 = new TCanvas("Pixel33", "Pixel33", 800, 1200);
1340        Pixel33->Divide(2,4);
1341        
1342        for (Int_t i=0; i<8; i++)
1343      {
1344        //RecHit Y pullolution by module for layer 3
1345        
1346        sprintf(histo, "recHitPullsBPIX/RecHit_YPull_Layer3_Module%d", i+1);
1347        rdir->GetObject(histo, recHitPullYPullLayer3Modules_[i]);
1348        sdir->GetObject(histo, newrecHitPullYPullLayer3Modules_[i]);
1349 
1350        Pixel33->cd(i+1);
1351        // gPad->SetLogy();
1352        recHitPullYPullLayer3Modules_[i]->SetLineColor(2);
1353        recHitPullYPullLayer3Modules_[i]->Sumw2();
1354        newrecHitPullYPullLayer3Modules_[i]->Sumw2();
1355        scale = 1.0/recHitPullYPullLayer3Modules_[i]->Integral();
1356        recHitPullYPullLayer3Modules_[i]->Scale(scale);
1357        scale = 1.0/newrecHitPullYPullLayer3Modules_[i]->Integral();
1358        newrecHitPullYPullLayer3Modules_[i]->Scale(scale);
1359        recHitPullYPullLayer3Modules_[i]->Draw("h");
1360        newrecHitPullYPullLayer3Modules_[i]->SetLineColor(4);
1361        newrecHitPullYPullLayer3Modules_[i]->SetLineStyle(2);
1362        newrecHitPullYPullLayer3Modules_[i]->Draw("sameh");
1363        myPV->PVCompute(recHitPullYPullLayer3Modules_[i], newrecHitPullYPullLayer3Modules_[i], te);
1364        leg.Clear();
1365        leg.AddEntry(recHitPullYPullLayer3Modules_[i],rver , "l");
1366        leg.AddEntry(newrecHitPullYPullLayer3Modules_[i],cver , "l");
1367        leg.Draw();
1368        
1369      }
1370        Pixel33->Print("RecHit_YPull_Layer3_Modules.eps");
1371      }
1372    
1373    ////////////////////////////////
1374    //RecHit forward
1375    ////////////////////////////////
1376    
1377    
1378    if (1) 
1379      {
1380        TH1* recHitXPullDisk1Plaquettes_[7];
1381        TH1* newrecHitXPullDisk1Plaquettes_[7];
1382        Pixel34 = new TCanvas("Pixel34", "Pixel34", 800, 1200);
1383        Pixel34->Divide(2,4);
1384        
1385        for (Int_t i=0; i<7; i++) 
1386      {
1387        //RecHit X pullolution by plaquette for Disk1
1388        
1389        sprintf(histo, "recHitPullsFPIX/RecHit_XPull_Disk1_Plaquette%d", i+1);
1390        rdir->GetObject(histo, recHitXPullDisk1Plaquettes_[i]);
1391        sdir->GetObject(histo, newrecHitXPullDisk1Plaquettes_[i]);
1392 
1393        Pixel34->cd(i+1);
1394        //gPad->SetLogy();
1395        recHitXPullDisk1Plaquettes_[i]->SetLineColor(2);
1396        recHitXPullDisk1Plaquettes_[i]->Sumw2();
1397        newrecHitXPullDisk1Plaquettes_[i]->Sumw2();
1398        scale = 1.0/recHitXPullDisk1Plaquettes_[i]->Integral();
1399        recHitXPullDisk1Plaquettes_[i]->Scale(scale);
1400        scale = 1.0/newrecHitXPullDisk1Plaquettes_[i]->Integral();
1401        newrecHitXPullDisk1Plaquettes_[i]->Scale(scale);
1402        recHitXPullDisk1Plaquettes_[i]->Draw("h");
1403        newrecHitXPullDisk1Plaquettes_[i]->SetLineColor(4);
1404        newrecHitXPullDisk1Plaquettes_[i]->SetLineStyle(2);
1405        newrecHitXPullDisk1Plaquettes_[i]->Draw("sameh");
1406        myPV->PVCompute(recHitXPullDisk1Plaquettes_[i], newrecHitXPullDisk1Plaquettes_[i], te);
1407        leg.Clear();
1408        leg.AddEntry(recHitXPullDisk1Plaquettes_[i],rver , "l");
1409        leg.AddEntry(newrecHitXPullDisk1Plaquettes_[i],cver , "l");
1410        leg.Draw();
1411        
1412      }
1413        Pixel34->Print("RecHit_XPull_disk1_plaquettes.eps");
1414      }
1415    
1416    if (1) 
1417      {
1418        TH1* recHitXPullDisk2Plaquettes_[7];
1419        TH1* newrecHitXPullDisk2Plaquettes_[7];
1420        Pixel35 = new TCanvas("Pixel35", "Pixel35", 800, 1200);
1421        Pixel35->Divide(2,4);
1422        
1423        for (Int_t i=0; i<7; i++) 
1424      {
1425        //RecHit X pullolution by plaquette for Disk2
1426        
1427        sprintf(histo, "recHitPullsFPIX/RecHit_XPull_Disk2_Plaquette%d", i+1);
1428        rdir->GetObject(histo, recHitXPullDisk2Plaquettes_[i]);
1429        sdir->GetObject(histo, newrecHitXPullDisk2Plaquettes_[i]);
1430 
1431        Pixel35->cd(i+1);
1432        //gPad->SetLogy();
1433        recHitXPullDisk2Plaquettes_[i]->SetLineColor(2);
1434        recHitXPullDisk2Plaquettes_[i]->Sumw2();
1435        newrecHitXPullDisk2Plaquettes_[i]->Sumw2();
1436        scale = 1.0/recHitXPullDisk2Plaquettes_[i]->Integral();
1437        recHitXPullDisk2Plaquettes_[i]->Scale(scale);
1438        scale = 1.0/newrecHitXPullDisk2Plaquettes_[i]->Integral();
1439        newrecHitXPullDisk2Plaquettes_[i]->Scale(scale);
1440        recHitXPullDisk2Plaquettes_[i]->Draw("h");
1441        newrecHitXPullDisk2Plaquettes_[i]->SetLineColor(4);
1442        newrecHitXPullDisk2Plaquettes_[i]->SetLineStyle(2);
1443        newrecHitXPullDisk2Plaquettes_[i]->Draw("sameh");
1444        myPV->PVCompute(recHitXPullDisk2Plaquettes_[i], newrecHitXPullDisk2Plaquettes_[i], te);
1445        leg.Clear();
1446        leg.AddEntry(recHitXPullDisk2Plaquettes_[i],rver , "l");
1447        leg.AddEntry(newrecHitXPullDisk2Plaquettes_[i],cver , "l");
1448        leg.Draw();
1449        
1450      }
1451        Pixel35->Print("RecHit_XPull_disk2_plaquettes.eps");
1452      }
1453    
1454    if (1) 
1455      {
1456        TH1* recHitPullYPullDisk1Plaquettes_[7];
1457        TH1* newrecHitPullYPullDisk1Plaquettes_[7];
1458        Pixel36 = new TCanvas("Pixel36", "Pixel36", 800, 1200);
1459        Pixel36->Divide(2,4);
1460        
1461        for (Int_t i=0; i<7; i++) 
1462      {
1463        //RecHit Y pullolution by plaquette for Disk1
1464        
1465        sprintf(histo, "recHitPullsFPIX/RecHit_YPull_Disk1_Plaquette%d", i+1);
1466        rdir->GetObject(histo, recHitPullYPullDisk1Plaquettes_[i]);
1467        sdir->GetObject(histo, newrecHitPullYPullDisk1Plaquettes_[i]);
1468        
1469        Pixel36->cd(i+1);
1470        //gPad->SetLogy();
1471        recHitPullYPullDisk1Plaquettes_[i]->SetLineColor(2);
1472        recHitPullYPullDisk1Plaquettes_[i]->Sumw2();
1473        newrecHitPullYPullDisk1Plaquettes_[i]->Sumw2();
1474        scale = 1.0/recHitPullYPullDisk1Plaquettes_[i]->Integral();
1475        recHitPullYPullDisk1Plaquettes_[i]->Scale(scale);
1476        scale = 1.0/newrecHitPullYPullDisk1Plaquettes_[i]->Integral();
1477        newrecHitPullYPullDisk1Plaquettes_[i]->Scale(scale);
1478        recHitPullYPullDisk1Plaquettes_[i]->Draw("h");
1479        newrecHitPullYPullDisk1Plaquettes_[i]->SetLineColor(4);
1480        newrecHitPullYPullDisk1Plaquettes_[i]->SetLineStyle(2);
1481        newrecHitPullYPullDisk1Plaquettes_[i]->Draw("sameh");
1482        myPV->PVCompute(recHitPullYPullDisk1Plaquettes_[i], newrecHitPullYPullDisk1Plaquettes_[i], te);
1483        leg.Clear();
1484        leg.AddEntry(recHitPullYPullDisk1Plaquettes_[i],rver , "l");
1485        leg.AddEntry(newrecHitPullYPullDisk1Plaquettes_[i],cver , "l");
1486        leg.Draw();
1487        
1488      }
1489        Pixel36->Print("RecHit_YPull_disk1_plaquettes.eps");
1490      }
1491    
1492    if (1) 
1493      {
1494        TH1* recHitPullYPullDisk2Plaquettes_[7];
1495        TH1* newrecHitPullYPullDisk2Plaquettes_[7];
1496        Pixel37 = new TCanvas("Pixel37", "Pixel37", 800, 1200);
1497        Pixel37->Divide(2,4);
1498        
1499        for (Int_t i=0; i<7; i++) 
1500      {
1501        //RecHit X pullolution by plaquette for Disk2
1502        
1503        sprintf(histo, "recHitPullsFPIX/RecHit_YPull_Disk2_Plaquette%d", i+1);
1504        rdir->GetObject(histo, recHitPullYPullDisk2Plaquettes_[i]);
1505        sdir->GetObject(histo, newrecHitPullYPullDisk2Plaquettes_[i]);
1506 
1507        Pixel37->cd(i+1);
1508        //gPad->SetLogy();
1509        recHitPullYPullDisk2Plaquettes_[i]->SetLineColor(2);
1510        recHitPullYPullDisk2Plaquettes_[i]->Sumw2();
1511        newrecHitPullYPullDisk2Plaquettes_[i]->Sumw2();
1512        scale = 1.0/recHitPullYPullDisk2Plaquettes_[i]->Integral();
1513        recHitPullYPullDisk2Plaquettes_[i]->Scale(scale);
1514        scale = 1.0/newrecHitPullYPullDisk2Plaquettes_[i]->Integral();
1515        newrecHitPullYPullDisk2Plaquettes_[i]->Scale(scale);
1516        recHitPullYPullDisk2Plaquettes_[i]->Draw("h");
1517        newrecHitPullYPullDisk2Plaquettes_[i]->SetLineColor(4);
1518        newrecHitPullYPullDisk2Plaquettes_[i]->SetLineStyle(2);
1519        newrecHitPullYPullDisk2Plaquettes_[i]->Draw("sameh");
1520        myPV->PVCompute(recHitPullYPullDisk2Plaquettes_[i], newrecHitPullYPullDisk2Plaquettes_[i], te);
1521        leg.Clear();
1522        leg.AddEntry(recHitPullYPullDisk2Plaquettes_[i],rver , "l");
1523        leg.AddEntry(newrecHitPullYPullDisk2Plaquettes_[i],cver , "l");
1524        leg.Draw();
1525        
1526     }
1527        Pixel37->Print("RecHit_YPull_disk2_plaquettes.eps");
1528      }
1529 
1530 } // end