Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 void SiStripRecHitsCompare()
0002 {
0003 
0004  gROOT ->Reset();
0005  char*  sfilename = "sistriprechitshisto.root";
0006  char*  rfilename = "../sistriprechitshisto.root";
0007 
0008  delete gROOT->GetListOfFiles()->FindObject(rfilename);
0009  delete gROOT->GetListOfFiles()->FindObject(sfilename); 
0010 
0011  TText* te = new TText();
0012  TFile * rfile = new TFile(rfilename);
0013  TDirectory * rdir=gDirectory; 
0014  TFile * sfile = new TFile(sfilename);
0015  TDirectory * sdir=gDirectory; 
0016 
0017  if(rfile->cd("DQMData/Run 1/TrackerRecHitsV"))rfile->cd("DQMData/Run 1/TrackerRecHitsV/Run summary/TrackerRecHits/Strip");
0018  else rfile->cd("DQMData/TrackerRecHitsV/TrackerRecHits/Strip");
0019  rdir=gDirectory;
0020 
0021  if(sfile->cd("DQMData/Run 1/TrackerRecHitsV"))sfile->cd("DQMData/Run 1/TrackerRecHitsV/Run summary/TrackerRecHits/Strip");
0022  else sfile->cd("DQMData/TrackerRecHitsV/TrackerRecHits/Strip");
0023  sdir=gDirectory; 
0024  
0025   TLegend leg(0.3, 0.80, 0.55, 0.90);
0026  //Get list of Keys from the Reference file.
0027   TList* ref_list = rfile->GetListOfKeys() ;
0028   if (!ref_list) {
0029       std::cout<<"=========>> AutoComaprison:: There is no Keys available in the Reference file."<<std::endl;
0030       exit(1) ;
0031    }
0032 
0033   //Get list of Keys from the New file.
0034   TList* new_list = sfile->GetListOfKeys() ;
0035   if (!new_list) {
0036       std::cout<<"=========>> AutoComaprison:: There is no Keys available in New file."<<std::endl;
0037       exit(1) ;
0038    }
0039 
0040 
0041   //Iterate on the List of Keys of the  Reference file.
0042   TIter     refkey_iter( ref_list) ;
0043   TKey*     ref_key ;
0044   TObject*  ref_obj ;
0045 
0046   char rver[50];
0047   char cver[50];
0048   while ( ref_key = (TKey*) refkey_iter() ) {
0049       ref_obj = ref_key->ReadObj() ;
0050       if (strcmp(ref_obj->IsA()->GetName(),"TObjString")==0) {
0051 
0052          TObjString * rversion = dynamic_cast< TObjString*> (ref_obj);
0053          sprintf(rver, "%s", rversion->GetName());
0054          std::cout<<" Ref. version =" << rver<<std::endl;
0055          break;
0056       }
0057   }
0058 
0059   //Iterate on the List of Keys of the  Reference file.
0060   TIter     newkey_iter( new_list) ;
0061   TKey*     new_key ;
0062   TObject*  new_obj ;
0063   while ( new_key = (TKey*) newkey_iter() ) {
0064       new_obj = new_key->ReadObj() ;
0065       if (strcmp(new_obj->IsA()->GetName(),"TObjString")==0) {
0066 
0067          TObjString * cversion = dynamic_cast< TObjString*> (new_obj);
0068          sprintf(cver, "%s", cversion->GetName());
0069          std::cout<<" Cur version =" << cver<<std::endl;
0070          break;
0071 
0072       }
0073   }
0074 
0075 
0076 
0077  Char_t histo[200];
0078 
0079  gROOT->ProcessLine(".x HistoCompare.C");
0080  HistoCompare * myPV = new HistoCompare();
0081 
0082  TCanvas *Strip0;
0083  TCanvas *Strip1;
0084  TCanvas *Strip2;
0085  TCanvas *Strip3;
0086  TCanvas *Strip4;
0087  TCanvas *Strip5;
0088  TCanvas *Strip6;
0089  TCanvas *Strip7;
0090  TCanvas *Strip8;
0091  TCanvas *Strip9;
0092  TCanvas *Strip10;
0093  TCanvas *Strip11;
0094  TCanvas *Strip12;
0095  TCanvas *Strip13;
0096  TCanvas *Strip14;
0097  TCanvas *Strip15;
0098  TCanvas *Strip16;
0099  TCanvas *Strip17;
0100  TCanvas *Strip18;
0101  TCanvas *Strip19;
0102  TCanvas *Strip20;
0103  TCanvas *Strip21;
0104  TCanvas *Strip22;
0105  TCanvas *Strip23;
0106  TCanvas *Strip24;
0107  TCanvas *Strip25;
0108  TCanvas *Strip26;
0109  TCanvas *Strip27;
0110  TCanvas *Strip28;
0111  TCanvas *Strip29;
0112  TCanvas *Strip30;
0113  TCanvas *Strip31;
0114  TCanvas *Strip32;
0115  TCanvas *Strip33;
0116  TCanvas *Strip34;
0117 
0118  //=============================================================== 
0119 // TIB
0120  
0121  TH1F* adctib[6];
0122  TH1F* pulltib[6];
0123  TH1F* nstptib[6];
0124  TH1F* postib[6];
0125  TH1F* errxtib[6];
0126  TH1F* restib[6];
0127  TH1F* chi2tib[6];
0128  TH1F* matchedtib[12];
0129 
0130  TH1F* newadctib[6];
0131  TH1F* newpulltib[6];
0132  TH1F* newnstptib[6];
0133  TH1F* newpostib[6];
0134  TH1F* newerrxtib[6];
0135  TH1F* newrestib[6];
0136  TH1F* newchi2tib[6];
0137  TH1F* newmatchedtib[12];
0138  
0139  rdir->GetObject("TIB/Adc_rphi_layer1tib",adctib[0]);
0140  rdir->GetObject("TIB/Adc_rphi_layer2tib",adctib[1]);
0141  rdir->GetObject("TIB/Adc_rphi_layer3tib",adctib[2]);
0142  rdir->GetObject("TIB/Adc_rphi_layer4tib",adctib[3]);
0143  rdir->GetObject("TIB/Adc_sas_layer1tib",adctib[4]);
0144  rdir->GetObject("TIB/Adc_sas_layer2tib",adctib[5]);
0145  sdir->GetObject("TIB/Adc_rphi_layer1tib",newadctib[0]);
0146  sdir->GetObject("TIB/Adc_rphi_layer2tib",newadctib[1]);
0147  sdir->GetObject("TIB/Adc_rphi_layer3tib",newadctib[2]);
0148  sdir->GetObject("TIB/Adc_rphi_layer4tib",newadctib[3]);
0149  sdir->GetObject("TIB/Adc_sas_layer1tib",newadctib[4]);
0150  sdir->GetObject("TIB/Adc_sas_layer2tib",newadctib[5]);
0151  
0152  Strip0 = new TCanvas("Strip0","Strip0",800,500);
0153  Strip0->Divide(2,3);
0154  for (Int_t i=0; i<6; i++) {
0155    Strip0->cd(i+1);
0156    adctib[i]->SetLineColor(2);
0157    newadctib[i]->SetLineColor(4);
0158    newadctib[i]->SetLineStyle(2);
0159    adctib[i]->Sumw2();
0160    newadctib[i]->Sumw2();
0161    adctib[i]->SetNormFactor(1.0);
0162    newadctib[i]->SetNormFactor(1.0);
0163    adctib[i]->Draw("h");
0164    newadctib[i]->Draw("sameh");
0165    myPV->PVCompute(adctib[i] , newadctib[i] , te );
0166     leg.Clear();
0167    leg.AddEntry(adctib[i],rver , "l");
0168    leg.AddEntry(newadctib[i],cver , "l");
0169    leg.Draw();
0170  }
0171  
0172  Strip0->Print("AdcTIBCompare.eps");
0173  Strip0->Print("AdcTIBCompare.gif");
0174  
0175 
0176  rdir->GetObject("TIB/Nstp_rphi_layer1tib",nstptib[0]);
0177  rdir->GetObject("TIB/Nstp_rphi_layer2tib",nstptib[1]);
0178  rdir->GetObject("TIB/Nstp_rphi_layer3tib",nstptib[2]);
0179  rdir->GetObject("TIB/Nstp_rphi_layer4tib",nstptib[3]);
0180  rdir->GetObject("TIB/Nstp_sas_layer1tib",nstptib[4]);
0181  rdir->GetObject("TIB/Nstp_sas_layer2tib",nstptib[5]);
0182  sdir->GetObject("TIB/Nstp_rphi_layer1tib",newnstptib[0]);
0183  sdir->GetObject("TIB/Nstp_rphi_layer2tib",newnstptib[1]);
0184  sdir->GetObject("TIB/Nstp_rphi_layer3tib",newnstptib[2]);
0185  sdir->GetObject("TIB/Nstp_rphi_layer4tib",newnstptib[3]);
0186  sdir->GetObject("TIB/Nstp_sas_layer1tib",newnstptib[4]);
0187  sdir->GetObject("TIB/Nstp_sas_layer2tib",newnstptib[5]);
0188 
0189  Strip1 = new TCanvas("Strip1","Strip1",800,500);
0190  Strip1->Divide(2,3);
0191  for (Int_t i=0; i<6; i++) {
0192    Strip1->cd(i+1);
0193    nstptib[i]->SetLineColor(2);
0194    newnstptib[i]->SetLineColor(4);
0195    newnstptib[i]->SetLineStyle(2);
0196    nstptib[i]->Sumw2();
0197    newnstptib[i]->Sumw2();
0198    nstptib[i]->SetNormFactor(1.0);
0199    newnstptib[i]->SetNormFactor(1.0);
0200    nstptib[i]->Draw("h");
0201    newnstptib[i]->Draw("sameh");
0202    myPV->PVCompute(nstptib[i] , newnstptib[i] , te );
0203    //   leg.Clear();
0204    leg.AddEntry(nstptib[i],rver , "l");
0205    leg.AddEntry(newnstptib[i],cver , "l");
0206    leg.Draw();
0207  }
0208  
0209  Strip1->Print("NstpTIBCompare.eps");
0210  Strip1->Print("NstpTIBCompare.gif");
0211 
0212  rdir->GetObject("TIB/Posx_rphi_layer1tib",postib[0]);
0213  rdir->GetObject("TIB/Posx_rphi_layer2tib",postib[1]);
0214  rdir->GetObject("TIB/Posx_rphi_layer3tib",postib[2]);
0215  rdir->GetObject("TIB/Posx_rphi_layer4tib",postib[3]);
0216  rdir->GetObject("TIB/Posx_sas_layer1tib",postib[4]);
0217  rdir->GetObject("TIB/Posx_sas_layer2tib",postib[5]);
0218  sdir->GetObject("TIB/Posx_rphi_layer1tib",newpostib[0]);
0219  sdir->GetObject("TIB/Posx_rphi_layer2tib",newpostib[1]);
0220  sdir->GetObject("TIB/Posx_rphi_layer3tib",newpostib[2]);
0221  sdir->GetObject("TIB/Posx_rphi_layer4tib",newpostib[3]);
0222  sdir->GetObject("TIB/Posx_sas_layer1tib",newpostib[4]);
0223  sdir->GetObject("TIB/Posx_sas_layer2tib",newpostib[5]);
0224 
0225  Strip2 = new TCanvas("Strip2","Strip2",800,500);
0226   Strip2->Divide(2,3);
0227   for (Int_t i=0; i<6; i++) {
0228     Strip2->cd(i+1);
0229     postib[i]->SetLineColor(2);
0230     newpostib[i]->SetLineColor(4);
0231     newpostib[i]->SetLineStyle(2);
0232     postib[i]->Sumw2();
0233     newpostib[i]->Sumw2();
0234     postib[i]->SetNormFactor(1.0);
0235     newpostib[i]->SetNormFactor(1.0);
0236     postib[i]->Draw("h");
0237     newpostib[i]->Draw("sameh");
0238     myPV->PVCompute(postib[i] , newpostib[i] , te );
0239    leg.Clear();
0240    leg.AddEntry(postib[i],rver , "l");
0241    leg.AddEntry(newpostib[i],cver , "l");
0242    leg.Draw();
0243   }
0244   
0245   Strip2->Print("PosTIBCompare.eps");
0246   Strip2->Print("PosTIBCompare.gif");
0247   
0248 
0249  rdir->GetObject("TIB/Errx_rphi_layer1tib",errxtib[0]);
0250  rdir->GetObject("TIB/Errx_rphi_layer2tib",errxtib[1]);
0251  rdir->GetObject("TIB/Errx_rphi_layer3tib",errxtib[2]);
0252  rdir->GetObject("TIB/Errx_rphi_layer4tib",errxtib[3]);
0253  rdir->GetObject("TIB/Errx_sas_layer1tib",errxtib[4]);
0254  rdir->GetObject("TIB/Errx_sas_layer2tib",errxtib[5]);
0255  sdir->GetObject("TIB/Errx_rphi_layer1tib",newerrxtib[0]);
0256  sdir->GetObject("TIB/Errx_rphi_layer2tib",newerrxtib[1]);
0257  sdir->GetObject("TIB/Errx_rphi_layer3tib",newerrxtib[2]);
0258  sdir->GetObject("TIB/Errx_rphi_layer4tib",newerrxtib[3]);
0259  sdir->GetObject("TIB/Errx_sas_layer1tib",newerrxtib[4]);
0260  sdir->GetObject("TIB/Errx_sas_layer2tib",newerrxtib[5]);
0261 
0262   Strip3 = new TCanvas("Strip3","Strip3",800,500);
0263   Strip3->Divide(2,3);
0264   for (Int_t i=0; i<6; i++) {
0265     Strip3->cd(i+1);
0266     errxtib[i]->SetLineColor(2);
0267     newerrxtib[i]->SetLineColor(4);
0268     newerrxtib[i]->SetLineStyle(2);
0269     errxtib[i]->Sumw2();
0270     newerrxtib[i]->Sumw2();
0271     errxtib[i]->SetNormFactor(1.0);
0272     newerrxtib[i]->SetNormFactor(1.0);
0273     errxtib[i]->Draw("h");
0274     newerrxtib[i]->Draw("sameh");
0275     myPV->PVCompute(errxtib[i] , newerrxtib[i] , te );
0276     leg.Clear();
0277    leg.AddEntry(errxtib[i],rver , "l");
0278    leg.AddEntry(newerrxtib[i],cver , "l");
0279    leg.Draw();
0280  }
0281   
0282   Strip3->Print("ErrxTIBCompare.eps");
0283   Strip3->Print("ErrxTIBCompare.gif");
0284   
0285  rdir->GetObject("TIB/Res_rphi_layer1tib",restib[0]);
0286  rdir->GetObject("TIB/Res_rphi_layer2tib",restib[1]);
0287  rdir->GetObject("TIB/Res_rphi_layer3tib",restib[2]);
0288  rdir->GetObject("TIB/Res_rphi_layer4tib",restib[3]);
0289  rdir->GetObject("TIB/Res_sas_layer1tib",restib[4]);
0290  rdir->GetObject("TIB/Res_sas_layer2tib",restib[5]);
0291  sdir->GetObject("TIB/Res_rphi_layer1tib",newrestib[0]);
0292  sdir->GetObject("TIB/Res_rphi_layer2tib",newrestib[1]);
0293  sdir->GetObject("TIB/Res_rphi_layer3tib",newrestib[2]);
0294  sdir->GetObject("TIB/Res_rphi_layer4tib",newrestib[3]);
0295  sdir->GetObject("TIB/Res_sas_layer1tib",newrestib[4]);
0296  sdir->GetObject("TIB/Res_sas_layer2tib",newrestib[5]);
0297 
0298   Strip4 = new TCanvas("Strip4","Strip4",800,500);
0299   Strip4->Divide(2,3);
0300   for (Int_t i=0; i<6; i++) {
0301     Strip4->cd(i+1);
0302     restib[i]->SetLineColor(2);
0303     newrestib[i]->SetLineColor(4);
0304     newrestib[i]->SetLineStyle(2);
0305     restib[i]->Sumw2();
0306     newrestib[i]->Sumw2();
0307     restib[i]->SetNormFactor(1.0);
0308     newrestib[i]->SetNormFactor(1.0);
0309     restib[i]->Draw("h");
0310     newrestib[i]->Draw("sameh");
0311     myPV->PVCompute(restib[i] , newrestib[i] , te );
0312     leg.Clear();
0313    leg.AddEntry(restib[i],rver , "l");
0314    leg.AddEntry(newrestib[i],cver , "l");
0315    leg.Draw();
0316  }
0317   
0318   Strip4->Print("ResTIBCompare.eps");
0319   Strip4->Print("ResTIBCompare.gif");
0320 
0321  rdir->GetObject("TIB/Pull_MF_rphi_layer1tib",pulltib[0]);
0322  rdir->GetObject("TIB/Pull_MF_rphi_layer2tib",pulltib[1]);
0323  rdir->GetObject("TIB/Pull_MF_rphi_layer3tib",pulltib[2]);
0324  rdir->GetObject("TIB/Pull_MF_rphi_layer4tib",pulltib[3]);
0325  rdir->GetObject("TIB/Pull_MF_sas_layer1tib",pulltib[4]);
0326  rdir->GetObject("TIB/Pull_MF_sas_layer2tib",pulltib[5]);
0327  sdir->GetObject("TIB/Pull_MF_rphi_layer1tib",newpulltib[0]);
0328  sdir->GetObject("TIB/Pull_MF_rphi_layer2tib",newpulltib[1]);
0329  sdir->GetObject("TIB/Pull_MF_rphi_layer3tib",newpulltib[2]);
0330  sdir->GetObject("TIB/Pull_MF_rphi_layer4tib",newpulltib[3]);
0331  sdir->GetObject("TIB/Pull_MF_sas_layer1tib",newpulltib[4]);
0332  sdir->GetObject("TIB/Pull_MF_sas_layer2tib",newpulltib[5]);
0333  
0334  Strip31 = new TCanvas("Strip31","Strip31",800,500);
0335  Strip31->Divide(2,3);
0336  for (Int_t i=0; i<6; i++) {
0337    Strip31->cd(i+1);
0338    pulltib[i]->SetLineColor(2);
0339    newpulltib[i]->SetLineColor(4);
0340    newpulltib[i]->SetLineStyle(2);
0341    pulltib[i]->Sumw2();
0342    newpulltib[i]->Sumw2();
0343    pulltib[i]->SetNormFactor(1.0);
0344    newpulltib[i]->SetNormFactor(1.0);
0345    pulltib[i]->Draw("h");
0346    newpulltib[i]->Draw("sameh");
0347    myPV->PVCompute(pulltib[i] , newpulltib[i] , te );
0348    leg.Clear();
0349    leg.AddEntry(pulltib[i],rver , "l");
0350    leg.AddEntry(newpulltib[i],cver , "l");
0351    leg.Draw();
0352  }
0353  
0354  Strip31->Print("PullTIBCompare.eps");
0355  Strip31->Print("PullTIBCompare.gif");
0356 
0357  rdir->GetObject("TIB/Chi2_rphi_layer1tib",chi2tib[0]);
0358  rdir->GetObject("TIB/Chi2_rphi_layer2tib",chi2tib[1]);
0359  rdir->GetObject("TIB/Chi2_rphi_layer3tib",chi2tib[2]);
0360  rdir->GetObject("TIB/Chi2_rphi_layer4tib",chi2tib[3]);
0361  rdir->GetObject("TIB/Chi2_sas_layer1tib",chi2tib[4]);
0362  rdir->GetObject("TIB/Chi2_sas_layer2tib",chi2tib[5]);
0363  sdir->GetObject("TIB/Chi2_rphi_layer1tib",newchi2tib[0]);
0364  sdir->GetObject("TIB/Chi2_rphi_layer2tib",newchi2tib[1]);
0365  sdir->GetObject("TIB/Chi2_rphi_layer3tib",newchi2tib[2]);
0366  sdir->GetObject("TIB/Chi2_rphi_layer4tib",newchi2tib[3]);
0367  sdir->GetObject("TIB/Chi2_sas_layer1tib",newchi2tib[4]);
0368  sdir->GetObject("TIB/Chi2_sas_layer2tib",newchi2tib[5]);
0369 
0370 
0371   Strip5 = new TCanvas("Strip5","Strip5",800,500);
0372   Strip5->Divide(2,3);
0373   for (Int_t i=0; i<6; i++) {
0374     Strip5->cd(i+1);
0375     chi2tib[i]->SetLineColor(2);
0376     newchi2tib[i]->SetLineColor(4);
0377     newchi2tib[i]->SetLineStyle(2);
0378     chi2tib[i]->Sumw2();
0379     newchi2tib[i]->Sumw2();
0380     chi2tib[i]->SetNormFactor(1.0);
0381     newchi2tib[i]->SetNormFactor(1.0);
0382     chi2tib[i]->Draw("h");
0383     newchi2tib[i]->Draw("sameh");
0384     myPV->PVCompute(chi2tib[i] , newchi2tib[i] , te );
0385      leg.Clear();
0386    leg.AddEntry(chi2tib[i],rver , "l");
0387    leg.AddEntry(newchi2tib[i],cver , "l");
0388    leg.Draw();
0389 }
0390   
0391   Strip5->Print("Chi2TIBCompare.eps");
0392   Strip5->Print("Chi2TIBCompare.gif");
0393 
0394 
0395  rdir->GetObject("TIB/Posx_matched_layer1tib",matchedtib[0]);
0396  rdir->GetObject("TIB/Posy_matched_layer1tib",matchedtib[1]);
0397  rdir->GetObject("TIB/Posx_matched_layer2tib",matchedtib[2]);
0398  rdir->GetObject("TIB/Posy_matched_layer2tib",matchedtib[3]);
0399  rdir->GetObject("TIB/Errx_matched_layer1tib",matchedtib[4]);
0400  rdir->GetObject("TIB/Erry_matched_layer1tib",matchedtib[5]);
0401  rdir->GetObject("TIB/Errx_matched_layer2tib",matchedtib[6]);
0402  rdir->GetObject("TIB/Erry_matched_layer2tib",matchedtib[7]);
0403  rdir->GetObject("TIB/Resx_matched_layer1tib",matchedtib[8]);
0404  rdir->GetObject("TIB/Resy_matched_layer1tib",matchedtib[9]);
0405  rdir->GetObject("TIB/Resx_matched_layer2tib",matchedtib[10]);
0406  rdir->GetObject("TIB/Resy_matched_layer2tib",matchedtib[11]);
0407  sdir->GetObject("TIB/Posx_matched_layer1tib",newmatchedtib[0]);
0408  sdir->GetObject("TIB/Posy_matched_layer1tib",newmatchedtib[1]);
0409  sdir->GetObject("TIB/Posx_matched_layer2tib",newmatchedtib[2]);
0410  sdir->GetObject("TIB/Posy_matched_layer2tib",newmatchedtib[3]);
0411  sdir->GetObject("TIB/Errx_matched_layer1tib",newmatchedtib[4]);
0412  sdir->GetObject("TIB/Erry_matched_layer1tib",newmatchedtib[5]);
0413  sdir->GetObject("TIB/Errx_matched_layer2tib",newmatchedtib[6]);
0414  sdir->GetObject("TIB/Erry_matched_layer2tib",newmatchedtib[7]);
0415  sdir->GetObject("TIB/Resx_matched_layer1tib",newmatchedtib[8]);
0416  sdir->GetObject("TIB/Resy_matched_layer1tib",newmatchedtib[9]);
0417  sdir->GetObject("TIB/Resx_matched_layer2tib",newmatchedtib[10]);
0418  sdir->GetObject("TIB/Resy_matched_layer2tib",newmatchedtib[11]);
0419 
0420  Strip6 = new TCanvas("Strip6","Strip6",800,500);
0421  Strip6->Divide(4,3);
0422  for (Int_t i=0; i<12; i++) {
0423    Strip6->cd(i+1);
0424    matchedtib[i]->SetLineColor(2);
0425    newmatchedtib[i]->SetLineColor(4);
0426    newmatchedtib[i]->SetLineStyle(2);
0427    matchedtib[i]->Sumw2();
0428    newmatchedtib[i]->Sumw2();
0429    matchedtib[i]->SetNormFactor(1.0);
0430    newmatchedtib[i]->SetNormFactor(1.0);
0431    matchedtib[i]->Draw("h");
0432    newmatchedtib[i]->Draw("sameh");
0433    myPV->PVCompute(matchedtib[i] , newmatchedtib[i] , te );
0434     leg.Clear();
0435    leg.AddEntry(matchedtib[i],rver , "l");
0436    leg.AddEntry(newmatchedtib[i],cver , "l");
0437    leg.Draw();
0438 }
0439  
0440  Strip6->Print("MatchedTIBCompare.eps");
0441  Strip6->Print("MatchedTIBCompare.gif");
0442 
0443 
0444  //======================================================================================================
0445 // TOB
0446  
0447  TH1F* adctob[8];
0448  TH1F* pulltob[8];
0449  TH1F* nstptob[8];
0450  TH1F* postob[8];
0451  TH1F* errxtob[8];
0452  TH1F* restob[8];
0453  TH1F* chi2tob[8];
0454  TH1F* matchedtob[12];
0455  TH1F* newadctob[8];
0456  TH1F* newpulltob[8];
0457  TH1F* newnstptob[8];
0458  TH1F* newpostob[8];
0459  TH1F* newerrxtob[8];
0460  TH1F* newrestob[8];
0461  TH1F* newchi2tob[8];
0462  TH1F* newmatchedtob[12];
0463  
0464  rdir->GetObject("TOB/Adc_rphi_layer1tob",adctob[0]);
0465  rdir->GetObject("TOB/Adc_rphi_layer2tob",adctob[1]);
0466  rdir->GetObject("TOB/Adc_rphi_layer3tob",adctob[2]);
0467  rdir->GetObject("TOB/Adc_rphi_layer4tob",adctob[3]);
0468  rdir->GetObject("TOB/Adc_rphi_layer5tob",adctob[4]);
0469  rdir->GetObject("TOB/Adc_rphi_layer6tob",adctob[5]);
0470  rdir->GetObject("TOB/Adc_sas_layer1tob",adctob[6]);
0471  rdir->GetObject("TOB/Adc_sas_layer2tob",adctob[7]);
0472  sdir->GetObject("TOB/Adc_rphi_layer1tob",newadctob[0]);
0473  sdir->GetObject("TOB/Adc_rphi_layer2tob",newadctob[1]);
0474  sdir->GetObject("TOB/Adc_rphi_layer3tob",newadctob[2]);
0475  sdir->GetObject("TOB/Adc_rphi_layer4tob",newadctob[3]);
0476  sdir->GetObject("TOB/Adc_rphi_layer5tob",newadctob[4]);
0477  sdir->GetObject("TOB/Adc_rphi_layer6tob",newadctob[5]);
0478  sdir->GetObject("TOB/Adc_sas_layer1tob",newadctob[6]);
0479  sdir->GetObject("TOB/Adc_sas_layer2tob",newadctob[7]);
0480  
0481  Strip7 = new TCanvas("Strip7","Strip7",800,500);
0482  Strip7->Divide(3,3);
0483  for (Int_t i=0; i<8; i++) {
0484    Strip7->cd(i+1);
0485    adctob[i]->SetLineColor(2);
0486    newadctob[i]->SetLineColor(4);
0487    newadctob[i]->SetLineStyle(2);
0488    adctob[i]->Sumw2();
0489    newadctob[i]->Sumw2();
0490    adctob[i]->SetNormFactor(1.0);
0491    newadctob[i]->SetNormFactor(1.0);
0492    adctob[i]->Draw("h");
0493    newadctob[i]->Draw("sameh");
0494    myPV->PVCompute(adctob[i] , newadctob[i] , te );
0495    leg.Clear();
0496    leg.AddEntry(adctob[i],rver , "l");
0497    leg.AddEntry(newadctob[i],cver , "l");
0498    leg.Draw();
0499  }
0500  
0501  Strip7->Print("AdcTOBCompare.eps");
0502  Strip7->Print("AdcTOBCompare.gif");
0503  
0504  rdir->GetObject("TOB/Nstp_rphi_layer1tob",nstptob[0]);
0505  rdir->GetObject("TOB/Nstp_rphi_layer2tob",nstptob[1]);
0506  rdir->GetObject("TOB/Nstp_rphi_layer3tob",nstptob[2]);
0507  rdir->GetObject("TOB/Nstp_rphi_layer4tob",nstptob[3]);
0508  rdir->GetObject("TOB/Nstp_rphi_layer5tob",nstptob[4]);
0509  rdir->GetObject("TOB/Nstp_rphi_layer6tob",nstptob[5]);
0510  rdir->GetObject("TOB/Nstp_sas_layer1tob",nstptob[6]);
0511  rdir->GetObject("TOB/Nstp_sas_layer2tob",nstptob[7]);
0512  sdir->GetObject("TOB/Nstp_rphi_layer1tob",newnstptob[0]);
0513  sdir->GetObject("TOB/Nstp_rphi_layer2tob",newnstptob[1]);
0514  sdir->GetObject("TOB/Nstp_rphi_layer3tob",newnstptob[2]);
0515  sdir->GetObject("TOB/Nstp_rphi_layer4tob",newnstptob[3]);
0516  sdir->GetObject("TOB/Nstp_rphi_layer5tob",newnstptob[4]);
0517  sdir->GetObject("TOB/Nstp_rphi_layer6tob",newnstptob[5]);
0518  sdir->GetObject("TOB/Nstp_sas_layer1tob",newnstptob[6]);
0519  sdir->GetObject("TOB/Nstp_sas_layer2tob",newnstptob[7]);
0520 
0521  Strip8 = new TCanvas("Strip8","Strip8",800,500);
0522  Strip8->Divide(3,3);
0523  for (Int_t i=0; i<8; i++) {
0524    Strip8->cd(i+1);
0525    nstptob[i]->SetLineColor(2);
0526    newnstptob[i]->SetLineColor(4);
0527    newnstptob[i]->SetLineStyle(2);
0528    nstptob[i]->Sumw2();
0529    newnstptob[i]->Sumw2();
0530    nstptob[i]->SetNormFactor(1.0);
0531    newnstptob[i]->SetNormFactor(1.0);
0532    nstptob[i]->Draw("h");
0533    newnstptob[i]->Draw("sameh");
0534    myPV->PVCompute(nstptob[i] , newnstptob[i] , te );
0535    leg.Clear();
0536    leg.AddEntry(nstptob[i],rver , "l");
0537    leg.AddEntry(newnstptob[i],cver , "l");
0538    leg.Draw();
0539  }
0540  
0541  Strip8->Print("NstpTOBCompare.eps");
0542  Strip8->Print("NstpTOBCompare.gif");
0543 
0544  rdir->GetObject("TOB/Posx_rphi_layer1tob",postob[0]);
0545  rdir->GetObject("TOB/Posx_rphi_layer2tob",postob[1]);
0546  rdir->GetObject("TOB/Posx_rphi_layer3tob",postob[2]);
0547  rdir->GetObject("TOB/Posx_rphi_layer4tob",postob[3]);
0548  rdir->GetObject("TOB/Posx_rphi_layer5tob",postob[4]);
0549  rdir->GetObject("TOB/Posx_rphi_layer6tob",postob[5]);
0550  rdir->GetObject("TOB/Posx_sas_layer1tob",postob[6]);
0551  rdir->GetObject("TOB/Posx_sas_layer2tob",postob[7]);
0552  sdir->GetObject("TOB/Posx_rphi_layer1tob",newpostob[0]);
0553  sdir->GetObject("TOB/Posx_rphi_layer2tob",newpostob[1]);
0554  sdir->GetObject("TOB/Posx_rphi_layer3tob",newpostob[2]);
0555  sdir->GetObject("TOB/Posx_rphi_layer4tob",newpostob[3]);
0556  sdir->GetObject("TOB/Posx_rphi_layer5tob",newpostob[4]);
0557  sdir->GetObject("TOB/Posx_rphi_layer6tob",newpostob[5]);
0558  sdir->GetObject("TOB/Posx_sas_layer1tob",newpostob[6]);
0559  sdir->GetObject("TOB/Posx_sas_layer2tob",newpostob[7]);
0560 
0561  Strip9 = new TCanvas("Strip9","Strip9",800,500);
0562   Strip9->Divide(3,3);
0563   for (Int_t i=0; i<8; i++) {
0564     Strip9->cd(i+1);
0565     postob[i]->SetLineColor(2);
0566     newpostob[i]->SetLineColor(4);
0567     newpostob[i]->SetLineStyle(2);
0568     postob[i]->Sumw2();
0569     newpostob[i]->Sumw2();
0570     postob[i]->SetNormFactor(1.0);
0571     newpostob[i]->SetNormFactor(1.0);
0572     postob[i]->Draw("h");
0573     newpostob[i]->Draw("sameh");
0574     myPV->PVCompute(postob[i] , newpostob[i] , te );
0575      leg.Clear();
0576    leg.AddEntry(postob[i],rver , "l");
0577    leg.AddEntry(newpostob[i],cver , "l");
0578    leg.Draw();
0579 }
0580   
0581   Strip9->Print("PosTOBCompare.eps");
0582   Strip9->Print("PosTOBCompare.gif");
0583   
0584 
0585  rdir->GetObject("TOB/Errx_rphi_layer1tob",errxtob[0]);
0586  rdir->GetObject("TOB/Errx_rphi_layer2tob",errxtob[1]);
0587  rdir->GetObject("TOB/Errx_rphi_layer3tob",errxtob[2]);
0588  rdir->GetObject("TOB/Errx_rphi_layer4tob",errxtob[3]);
0589  rdir->GetObject("TOB/Errx_rphi_layer5tob",errxtob[4]);
0590  rdir->GetObject("TOB/Errx_rphi_layer6tob",errxtob[5]);
0591  rdir->GetObject("TOB/Errx_sas_layer1tob",errxtob[6]);
0592  rdir->GetObject("TOB/Errx_sas_layer2tob",errxtob[7]);
0593  sdir->GetObject("TOB/Errx_rphi_layer1tob",newerrxtob[0]);
0594  sdir->GetObject("TOB/Errx_rphi_layer2tob",newerrxtob[1]);
0595  sdir->GetObject("TOB/Errx_rphi_layer3tob",newerrxtob[2]);
0596  sdir->GetObject("TOB/Errx_rphi_layer4tob",newerrxtob[3]);
0597  sdir->GetObject("TOB/Errx_rphi_layer5tob",newerrxtob[4]);
0598  sdir->GetObject("TOB/Errx_rphi_layer6tob",newerrxtob[5]);
0599  sdir->GetObject("TOB/Errx_sas_layer1tob",newerrxtob[6]);
0600  sdir->GetObject("TOB/Errx_sas_layer2tob",newerrxtob[7]);
0601 
0602   Strip10 = new TCanvas("Strip10","Strip10",800,500);
0603   Strip10->Divide(2,3);
0604   for (Int_t i=0; i<8; i++) {
0605     Strip10->cd(i+1);
0606     errxtob[i]->SetLineColor(2);
0607     newerrxtob[i]->SetLineColor(4);
0608     newerrxtob[i]->SetLineStyle(2);
0609     errxtob[i]->Sumw2();
0610     newerrxtob[i]->Sumw2();
0611     errxtob[i]->SetNormFactor(1.0);
0612     newerrxtob[i]->SetNormFactor(1.0);
0613     errxtob[i]->Draw("h");
0614     newerrxtob[i]->Draw("sameh");
0615     myPV->PVCompute(errxtob[i] , newerrxtob[i] , te );
0616      leg.Clear();
0617    leg.AddEntry(errxtob[i],rver , "l");
0618    leg.AddEntry(newerrxtob[i],cver , "l");
0619    leg.Draw();
0620 }
0621   
0622   Strip10->Print("ErrxTOBCompare.eps");
0623   Strip10->Print("ErrxTOBCompare.gif");
0624   
0625  
0626  rdir->GetObject("TOB/Res_rphi_layer1tob",restob[0]);
0627  rdir->GetObject("TOB/Res_rphi_layer2tob",restob[1]);
0628  rdir->GetObject("TOB/Res_rphi_layer3tob",restob[2]);
0629  rdir->GetObject("TOB/Res_rphi_layer4tob",restob[3]);
0630  rdir->GetObject("TOB/Res_rphi_layer5tob",restob[4]);
0631  rdir->GetObject("TOB/Res_rphi_layer6tob",restob[5]);
0632  rdir->GetObject("TOB/Res_sas_layer1tob",restob[6]);
0633  rdir->GetObject("TOB/Res_sas_layer2tob",restob[7]);
0634  sdir->GetObject("TOB/Res_rphi_layer1tob",newrestob[0]);
0635  sdir->GetObject("TOB/Res_rphi_layer2tob",newrestob[1]);
0636  sdir->GetObject("TOB/Res_rphi_layer3tob",newrestob[2]);
0637  sdir->GetObject("TOB/Res_rphi_layer4tob",newrestob[3]);
0638  sdir->GetObject("TOB/Res_rphi_layer5tob",newrestob[4]);
0639  sdir->GetObject("TOB/Res_rphi_layer6tob",newrestob[5]);
0640  sdir->GetObject("TOB/Res_sas_layer1tob",newrestob[6]);
0641  sdir->GetObject("TOB/Res_sas_layer2tob",newrestob[7]);
0642 
0643   Strip11 = new TCanvas("Strip11","Strip11",800,500);
0644   Strip11->Divide(3,3);
0645   for (Int_t i=0; i<8; i++) {
0646     Strip11->cd(i+1);
0647     restob[i]->SetLineColor(2);
0648     newrestob[i]->SetLineColor(4);
0649     newrestob[i]->SetLineStyle(2);
0650     restob[i]->Sumw2();
0651     newrestob[i]->Sumw2();
0652     restob[i]->SetNormFactor(1.0);
0653     newrestob[i]->SetNormFactor(1.0);
0654     restob[i]->Draw("h");
0655     newrestob[i]->Draw("sameh");
0656     myPV->PVCompute(restob[i] , newrestob[i] , te );
0657     leg.Clear();
0658    leg.AddEntry(restob[i],rver , "l");
0659    leg.AddEntry(newrestob[i],cver , "l");
0660    leg.Draw();
0661  }
0662   
0663   Strip11->Print("ResTOBCompare.eps");
0664   Strip11->Print("ResTOBCompare.gif");
0665 
0666  rdir->GetObject("TOB/Pull_MF_rphi_layer1tob",pulltob[0]);
0667  rdir->GetObject("TOB/Pull_MF_rphi_layer2tob",pulltob[1]);
0668  rdir->GetObject("TOB/Pull_MF_rphi_layer3tob",pulltob[2]);
0669  rdir->GetObject("TOB/Pull_MF_rphi_layer4tob",pulltob[3]);
0670  rdir->GetObject("TOB/Pull_MF_rphi_layer5tob",pulltob[4]);
0671  rdir->GetObject("TOB/Pull_MF_rphi_layer6tob",pulltob[5]);
0672  rdir->GetObject("TOB/Pull_MF_sas_layer1tob",pulltob[6]);
0673  rdir->GetObject("TOB/Pull_MF_sas_layer2tob",pulltob[7]);
0674  sdir->GetObject("TOB/Pull_MF_rphi_layer1tob",newpulltob[0]);
0675  sdir->GetObject("TOB/Pull_MF_rphi_layer2tob",newpulltob[1]);
0676  sdir->GetObject("TOB/Pull_MF_rphi_layer3tob",newpulltob[2]);
0677  sdir->GetObject("TOB/Pull_MF_rphi_layer4tob",newpulltob[3]);
0678  sdir->GetObject("TOB/Pull_MF_rphi_layer5tob",newpulltob[4]);
0679  sdir->GetObject("TOB/Pull_MF_rphi_layer6tob",newpulltob[5]);
0680  sdir->GetObject("TOB/Pull_MF_sas_layer1tob",newpulltob[6]);
0681  sdir->GetObject("TOB/Pull_MF_sas_layer2tob",newpulltob[7]);
0682  
0683  Strip32 = new TCanvas("Strip32","Strip32",800,500);
0684  Strip32->Divide(3,3);
0685  for (Int_t i=0; i<8; i++) {
0686    Strip32->cd(i+1);
0687    pulltob[i]->SetLineColor(2);
0688    newpulltob[i]->SetLineColor(4);
0689    newpulltob[i]->SetLineStyle(2);
0690    pulltob[i]->Sumw2();
0691    newpulltob[i]->Sumw2();
0692    pulltob[i]->SetNormFactor(1.0);
0693    newpulltob[i]->SetNormFactor(1.0);
0694    pulltob[i]->Draw("h");
0695    newpulltob[i]->Draw("sameh");
0696     leg.Clear();
0697   myPV->PVCompute(pulltob[i] , newpulltob[i] , te );
0698    leg.AddEntry(pulltob[i],rver , "l");
0699    leg.AddEntry(newpulltob[i],cver , "l");
0700    leg.Draw();
0701  }
0702  
0703  Strip32->Print("PullTOBCompare.eps");
0704  Strip32->Print("PullTOBCompare.gif");
0705 
0706 
0707  rdir->GetObject("TOB/Chi2_rphi_layer1tob",chi2tob[0]);
0708  rdir->GetObject("TOB/Chi2_rphi_layer2tob",chi2tob[1]);
0709  rdir->GetObject("TOB/Chi2_rphi_layer3tob",chi2tob[2]);
0710  rdir->GetObject("TOB/Chi2_rphi_layer4tob",chi2tob[3]);
0711  rdir->GetObject("TOB/Chi2_rphi_layer5tob",chi2tob[4]);
0712  rdir->GetObject("TOB/Chi2_rphi_layer6tob",chi2tob[5]);
0713  rdir->GetObject("TOB/Chi2_sas_layer1tob",chi2tob[6]);
0714  rdir->GetObject("TOB/Chi2_sas_layer2tob",chi2tob[7]);
0715  sdir->GetObject("TOB/Chi2_rphi_layer1tob",newchi2tob[0]);
0716  sdir->GetObject("TOB/Chi2_rphi_layer2tob",newchi2tob[1]);
0717  sdir->GetObject("TOB/Chi2_rphi_layer3tob",newchi2tob[2]);
0718  sdir->GetObject("TOB/Chi2_rphi_layer4tob",newchi2tob[3]);
0719  sdir->GetObject("TOB/Chi2_rphi_layer5tob",newchi2tob[4]);
0720  sdir->GetObject("TOB/Chi2_rphi_layer6tob",newchi2tob[5]);
0721  sdir->GetObject("TOB/Chi2_sas_layer1tob",newchi2tob[6]);
0722  sdir->GetObject("TOB/Chi2_sas_layer2tob",newchi2tob[7]);
0723 
0724   Strip12 = new TCanvas("Strip12","Strip12",800,500);
0725   Strip12->Divide(3,3);
0726   for (Int_t i=0; i<8; i++) {
0727     Strip12->cd(i+1);
0728     chi2tob[i]->SetLineColor(2);
0729     newchi2tob[i]->SetLineColor(4);
0730     newchi2tob[i]->SetLineStyle(2);
0731     chi2tob[i]->Sumw2();
0732     newchi2tob[i]->Sumw2();
0733     chi2tob[i]->SetNormFactor(1.0);
0734     newchi2tob[i]->SetNormFactor(1.0);
0735     chi2tob[i]->Draw("h");
0736     newchi2tob[i]->Draw("sameh");
0737     myPV->PVCompute(chi2tob[i] , newchi2tob[i] , te );
0738     leg.Clear();
0739    leg.AddEntry(chi2tob[i],rver , "l");
0740    leg.AddEntry(newchi2tob[i],cver , "l");
0741    leg.Draw();
0742  }
0743   
0744   Strip12->Print("Chi2TOBCompare.eps");
0745   Strip12->Print("Chi2TOBCompare.gif");
0746 
0747   
0748  rdir->GetObject("TOB/Posx_matched_layer1tob",matchedtob[0]);
0749  rdir->GetObject("TOB/Posy_matched_layer1tob",matchedtob[1]);
0750  rdir->GetObject("TOB/Posx_matched_layer2tob",matchedtob[2]);
0751  rdir->GetObject("TOB/Posy_matched_layer2tob",matchedtob[3]);
0752  rdir->GetObject("TOB/Errx_matched_layer1tob",matchedtob[4]);
0753  rdir->GetObject("TOB/Erry_matched_layer1tob",matchedtob[5]);
0754  rdir->GetObject("TOB/Errx_matched_layer2tob",matchedtob[6]);
0755  rdir->GetObject("TOB/Erry_matched_layer2tob",matchedtob[7]);
0756  rdir->GetObject("TOB/Resx_matched_layer1tob",matchedtob[8]);
0757  rdir->GetObject("TOB/Resy_matched_layer1tob",matchedtob[9]);
0758  rdir->GetObject("TOB/Resx_matched_layer2tob",matchedtob[10]);
0759  rdir->GetObject("TOB/Resy_matched_layer2tob",matchedtob[11]);
0760  sdir->GetObject("TOB/Posx_matched_layer1tob",newmatchedtob[0]);
0761  sdir->GetObject("TOB/Posy_matched_layer1tob",newmatchedtob[1]);
0762  sdir->GetObject("TOB/Posx_matched_layer2tob",newmatchedtob[2]);
0763  sdir->GetObject("TOB/Posy_matched_layer2tob",newmatchedtob[3]);
0764  sdir->GetObject("TOB/Errx_matched_layer1tob",newmatchedtob[4]);
0765  sdir->GetObject("TOB/Erry_matched_layer1tob",newmatchedtob[5]);
0766  sdir->GetObject("TOB/Errx_matched_layer2tob",newmatchedtob[6]);
0767  sdir->GetObject("TOB/Erry_matched_layer2tob",newmatchedtob[7]);
0768  sdir->GetObject("TOB/Resx_matched_layer1tob",newmatchedtob[8]);
0769  sdir->GetObject("TOB/Resy_matched_layer1tob",newmatchedtob[9]);
0770  sdir->GetObject("TOB/Resx_matched_layer2tob",newmatchedtob[10]);
0771  sdir->GetObject("TOB/Resy_matched_layer2tob",newmatchedtob[11]);
0772 
0773  Strip13 = new TCanvas("Strip13","Strip13",800,500);
0774  Strip13->Divide(4,3);
0775  for (Int_t i=0; i<12; i++) {
0776    Strip13->cd(i+1);
0777    matchedtob[i]->SetLineColor(2);
0778    newmatchedtob[i]->SetLineColor(4);
0779    newmatchedtob[i]->SetLineStyle(2);
0780    matchedtob[i]->Sumw2();
0781    newmatchedtob[i]->Sumw2();
0782    matchedtob[i]->SetNormFactor(1.0);
0783    newmatchedtob[i]->SetNormFactor(1.0);
0784    matchedtob[i]->Draw("h");
0785    newmatchedtob[i]->Draw("sameh");
0786    myPV->PVCompute(matchedtob[i] , newmatchedtob[i] , te );
0787     leg.Clear();
0788    leg.AddEntry(matchedtob[i],rver , "l");
0789    leg.AddEntry(newmatchedtob[i],cver , "l");
0790    leg.Draw();
0791 }
0792  
0793  Strip13->Print("MatchedTOBCompare.eps");
0794  Strip13->Print("MatchedTOBCompare.gif");
0795  
0796 
0797  //=============================================================== 
0798 // TID
0799  
0800  TH1F* adctid[5];
0801  TH1F* pulltid[5];
0802  TH1F* nstptid[5];
0803  TH1F* postid[5];
0804  TH1F* errxtid[5];
0805  TH1F* restid[5];
0806  TH1F* chi2tid[5];
0807  TH1F* matchedtid[12];
0808  TH1F* matchedchi2tid[6];
0809  TH1F* newadctid[5];
0810  TH1F* newpulltid[5];
0811  TH1F* newnstptid[5];
0812  TH1F* newpostid[5];
0813  TH1F* newerrxtid[5];
0814  TH1F* newrestid[5];
0815  TH1F* newchi2tid[5];
0816  TH1F* newmatchedtid[12];
0817  TH1F* newmatchedchi2tid[6];
0818  
0819  rdir->GetObject("TID/Adc_rphi_layer1tid",adctid[0]);
0820  rdir->GetObject("TID/Adc_rphi_layer2tid",adctid[1]);
0821  rdir->GetObject("TID/Adc_rphi_layer3tid",adctid[2]);
0822  rdir->GetObject("TID/Adc_sas_layer1tid",adctid[3]);
0823  rdir->GetObject("TID/Adc_sas_layer2tid",adctid[4]);
0824  sdir->GetObject("TID/Adc_rphi_layer1tid",newadctid[0]);
0825  sdir->GetObject("TID/Adc_rphi_layer2tid",newadctid[1]);
0826  sdir->GetObject("TID/Adc_rphi_layer3tid",newadctid[2]);
0827  sdir->GetObject("TID/Adc_sas_layer1tid",newadctid[3]);
0828  sdir->GetObject("TID/Adc_sas_layer2tid",newadctid[4]);
0829  
0830  Strip14 = new TCanvas("Strip14","Strip14",800,500);
0831  Strip14->Divide(2,3);
0832  for (Int_t i=0; i<5; i++) {
0833    Strip14->cd(i+1);
0834    adctid[i]->SetLineColor(2);
0835    newadctid[i]->SetLineColor(4);
0836    newadctid[i]->SetLineStyle(2);
0837    adctid[i]->Sumw2();
0838    newadctid[i]->Sumw2();
0839    adctid[i]->SetNormFactor(1.0);
0840    newadctid[i]->SetNormFactor(1.0);
0841    adctid[i]->Draw("h");
0842    newadctid[i]->Draw("sameh");
0843    myPV->PVCompute(adctid[i] , newadctid[i] , te );
0844     leg.Clear();
0845    leg.AddEntry(adctid[i],rver , "l");
0846    leg.AddEntry(newadctid[i],cver , "l");
0847    leg.Draw();
0848 }
0849  
0850  Strip14->Print("AdcTIDCompare.eps");
0851  Strip14->Print("AdcTIDCompare.gif");
0852  
0853  rdir->GetObject("TID/Nstp_rphi_layer1tid",nstptid[0]);
0854  rdir->GetObject("TID/Nstp_rphi_layer2tid",nstptid[1]);
0855  rdir->GetObject("TID/Nstp_rphi_layer3tid",nstptid[2]);
0856  rdir->GetObject("TID/Nstp_sas_layer1tid",nstptid[3]);
0857  rdir->GetObject("TID/Nstp_sas_layer2tid",nstptid[4]);
0858  sdir->GetObject("TID/Nstp_rphi_layer1tid",newnstptid[0]);
0859  sdir->GetObject("TID/Nstp_rphi_layer2tid",newnstptid[1]);
0860  sdir->GetObject("TID/Nstp_rphi_layer3tid",newnstptid[2]);
0861  sdir->GetObject("TID/Nstp_sas_layer1tid",newnstptid[3]);
0862  sdir->GetObject("TID/Nstp_sas_layer2tid",newnstptid[4]);
0863 
0864  Strip15 = new TCanvas("Strip15","Strip15",800,500);
0865  Strip15->Divide(2,3);
0866  for (Int_t i=0; i<5; i++) {
0867    Strip15->cd(i+1);
0868    nstptid[i]->SetLineColor(2);
0869    newnstptid[i]->SetLineColor(4);
0870    newnstptid[i]->SetLineStyle(2);
0871    nstptid[i]->Sumw2();
0872    newnstptid[i]->Sumw2();
0873    nstptid[i]->SetNormFactor(1.0);
0874    newnstptid[i]->SetNormFactor(1.0);
0875    nstptid[i]->Draw("h");
0876    newnstptid[i]->Draw("sameh");
0877    myPV->PVCompute(nstptid[i] , newnstptid[i] , te );
0878     leg.Clear();
0879    leg.AddEntry(nstptid[i],rver , "l");
0880    leg.AddEntry(newnstptid[i],cver , "l");
0881    leg.Draw();
0882 }
0883  
0884  Strip15->Print("NstpTIDCompare.eps");
0885  Strip15->Print("NstpTIDCompare.gif");
0886 
0887  rdir->GetObject("TID/Posx_rphi_layer1tid",postid[0]);
0888  rdir->GetObject("TID/Posx_rphi_layer2tid",postid[1]);
0889  rdir->GetObject("TID/Posx_rphi_layer3tid",postid[2]);
0890  rdir->GetObject("TID/Posx_sas_layer1tid",postid[3]);
0891  rdir->GetObject("TID/Posx_sas_layer2tid",postid[4]);
0892  sdir->GetObject("TID/Posx_rphi_layer1tid",newpostid[0]);
0893  sdir->GetObject("TID/Posx_rphi_layer2tid",newpostid[1]);
0894  sdir->GetObject("TID/Posx_rphi_layer3tid",newpostid[2]);
0895  sdir->GetObject("TID/Posx_sas_layer1tid",newpostid[3]);
0896  sdir->GetObject("TID/Posx_sas_layer2tid",newpostid[4]);
0897 
0898  Strip16 = new TCanvas("Strip16","Strip16",800,500);
0899   Strip16->Divide(2,3);
0900   for (Int_t i=0; i<5; i++) {
0901     Strip16->cd(i+1);
0902     postid[i]->SetLineColor(2);
0903     newpostid[i]->SetLineColor(4);
0904     newpostid[i]->SetLineStyle(2);
0905     postid[i]->Sumw2();
0906     newpostid[i]->Sumw2();
0907     postid[i]->SetNormFactor(1.0);
0908     newpostid[i]->SetNormFactor(1.0);
0909     postid[i]->Draw("h");
0910     newpostid[i]->Draw("sameh");
0911     myPV->PVCompute(postid[i] , newpostid[i] , te );
0912      leg.Clear();
0913    leg.AddEntry(postid[i],rver , "l");
0914    leg.AddEntry(newpostid[i],cver , "l");
0915    leg.Draw();
0916 }
0917   
0918   Strip16->Print("PosTIDCompare.eps");
0919   Strip16->Print("PosTIDCompare.gif");
0920   
0921 
0922  rdir->GetObject("TID/Errx_rphi_layer1tid",errxtid[0]);
0923  rdir->GetObject("TID/Errx_rphi_layer2tid",errxtid[1]);
0924  rdir->GetObject("TID/Errx_rphi_layer3tid",errxtid[2]);
0925  rdir->GetObject("TID/Errx_sas_layer1tid",errxtid[3]);
0926  rdir->GetObject("TID/Errx_sas_layer2tid",errxtid[4]);
0927  sdir->GetObject("TID/Errx_rphi_layer1tid",newerrxtid[0]);
0928  sdir->GetObject("TID/Errx_rphi_layer2tid",newerrxtid[1]);
0929  sdir->GetObject("TID/Errx_rphi_layer3tid",newerrxtid[2]);
0930  sdir->GetObject("TID/Errx_sas_layer1tid",newerrxtid[3]);
0931  sdir->GetObject("TID/Errx_sas_layer2tid",newerrxtid[4]);
0932 
0933   Strip17 = new TCanvas("Strip17","Strip17",800,500);
0934   Strip17->Divide(2,3);
0935   for (Int_t i=0; i<5; i++) {
0936     Strip17->cd(i+1);
0937     errxtid[i]->SetLineColor(2);
0938     newerrxtid[i]->SetLineColor(4);
0939     newerrxtid[i]->SetLineStyle(2);
0940     errxtid[i]->Sumw2();
0941     newerrxtid[i]->Sumw2();
0942     errxtid[i]->SetNormFactor(1.0);
0943     newerrxtid[i]->SetNormFactor(1.0);
0944     errxtid[i]->Draw("h");
0945     newerrxtid[i]->Draw("sameh");
0946     myPV->PVCompute(errxtid[i] , newerrxtid[i] , te );
0947     leg.Clear();
0948    leg.AddEntry(errxtid[i],rver , "l");
0949    leg.AddEntry(newerrxtid[i],cver , "l");
0950    leg.Draw();
0951  }
0952   
0953   Strip17->Print("ErrxTIDCompare.eps");
0954   Strip17->Print("ErrxTIDCompare.gif");
0955   
0956  
0957  rdir->GetObject("TID/Res_rphi_layer1tid",restid[0]);
0958  rdir->GetObject("TID/Res_rphi_layer2tid",restid[1]);
0959  rdir->GetObject("TID/Res_rphi_layer3tid",restid[2]);
0960  rdir->GetObject("TID/Res_sas_layer1tid",restid[3]);
0961  rdir->GetObject("TID/Res_sas_layer2tid",restid[4]);
0962  sdir->GetObject("TID/Res_rphi_layer1tid",newrestid[0]);
0963  sdir->GetObject("TID/Res_rphi_layer2tid",newrestid[1]);
0964  sdir->GetObject("TID/Res_rphi_layer3tid",newrestid[2]);
0965  sdir->GetObject("TID/Res_sas_layer1tid",newrestid[3]);
0966  sdir->GetObject("TID/Res_sas_layer2tid",newrestid[4]);
0967 
0968   Strip18 = new TCanvas("Strip18","Strip18",800,500);
0969   Strip18->Divide(2,3);
0970   for (Int_t i=0; i<5; i++) {
0971     Strip18->cd(i+1);
0972     restid[i]->SetLineColor(2);
0973     newrestid[i]->SetLineColor(4);
0974     newrestid[i]->SetLineStyle(2);
0975     restid[i]->Sumw2();
0976     newrestid[i]->Sumw2();
0977     restid[i]->SetNormFactor(1.0);
0978     newrestid[i]->SetNormFactor(1.0);
0979     restid[i]->Draw("h");
0980     newrestid[i]->Draw("sameh");
0981     myPV->PVCompute(restid[i] , newrestid[i] , te );
0982    leg.Clear();
0983    leg.AddEntry(restid[i],rver , "l");
0984    leg.AddEntry(newrestid[i],cver , "l");
0985    leg.Draw();
0986   }
0987   
0988   Strip18->Print("ResTIDCompare.eps");
0989   Strip18->Print("ResTIDCompare.gif");
0990 
0991  rdir->GetObject("TID/Pull_MF_rphi_layer1tid",pulltid[0]);
0992  rdir->GetObject("TID/Pull_MF_rphi_layer2tid",pulltid[1]);
0993  rdir->GetObject("TID/Pull_MF_rphi_layer3tid",pulltid[2]);
0994  rdir->GetObject("TID/Pull_MF_sas_layer1tid",pulltid[3]);
0995  rdir->GetObject("TID/Pull_MF_sas_layer2tid",pulltid[4]);
0996  sdir->GetObject("TID/Pull_MF_rphi_layer1tid",newpulltid[0]);
0997  sdir->GetObject("TID/Pull_MF_rphi_layer2tid",newpulltid[1]);
0998  sdir->GetObject("TID/Pull_MF_rphi_layer3tid",newpulltid[2]);
0999  sdir->GetObject("TID/Pull_MF_sas_layer1tid",newpulltid[3]);
1000  sdir->GetObject("TID/Pull_MF_sas_layer2tid",newpulltid[4]);
1001  
1002  Strip33 = new TCanvas("Strip33","Strip33",800,500);
1003  Strip33->Divide(2,3);
1004  for (Int_t i=0; i<5; i++) {
1005    Strip33->cd(i+1);
1006    pulltid[i]->SetLineColor(2);
1007    newpulltid[i]->SetLineColor(4);
1008    newpulltid[i]->SetLineStyle(2);
1009    pulltid[i]->Sumw2();
1010    newpulltid[i]->Sumw2();
1011    pulltid[i]->SetNormFactor(1.0);
1012    newpulltid[i]->SetNormFactor(1.0);
1013    pulltid[i]->Draw("h");
1014    newpulltid[i]->Draw("sameh");
1015    myPV->PVCompute(pulltid[i] , newpulltid[i] , te );
1016    leg.Clear();
1017    leg.AddEntry(pulltid[i],rver , "l");
1018    leg.AddEntry(newpulltid[i],cver , "l");
1019    leg.Draw();
1020  }
1021  
1022  Strip33->Print("PullTIDCompare.eps");
1023  Strip33->Print("PullTIDCompare.gif");
1024 
1025  rdir->GetObject("TID/Chi2_rphi_layer1tid",chi2tid[0]);
1026  rdir->GetObject("TID/Chi2_rphi_layer2tid",chi2tid[1]);
1027  rdir->GetObject("TID/Chi2_rphi_layer3tid",chi2tid[2]);
1028  rdir->GetObject("TID/Chi2_sas_layer1tid",chi2tid[3]);
1029  rdir->GetObject("TID/Chi2_sas_layer2tid",chi2tid[4]);
1030  sdir->GetObject("TID/Chi2_rphi_layer1tid",newchi2tid[0]);
1031  sdir->GetObject("TID/Chi2_rphi_layer2tid",newchi2tid[1]);
1032  sdir->GetObject("TID/Chi2_rphi_layer3tid",newchi2tid[2]);
1033  sdir->GetObject("TID/Chi2_sas_layer1tid",newchi2tid[3]);
1034  sdir->GetObject("TID/Chi2_sas_layer2tid",newchi2tid[4]);
1035 
1036   Strip19 = new TCanvas("Strip19","Strip19",800,500);
1037   Strip19->Divide(2,3);
1038   for (Int_t i=0; i<5; i++) {
1039     Strip19->cd(i+1);
1040     chi2tid[i]->SetLineColor(2);
1041     newchi2tid[i]->SetLineColor(4);
1042     newchi2tid[i]->SetLineStyle(2);
1043     chi2tid[i]->Sumw2();
1044     newchi2tid[i]->Sumw2();
1045     chi2tid[i]->SetNormFactor(1.0);
1046     newchi2tid[i]->SetNormFactor(1.0);
1047     chi2tid[i]->Draw("h");
1048     newchi2tid[i]->Draw("sameh");
1049     myPV->PVCompute(chi2tid[i] , newchi2tid[i] , te );
1050     leg.Clear();
1051    leg.AddEntry(chi2tid[i],rver , "l");
1052    leg.AddEntry(newchi2tid[i],cver , "l");
1053    leg.Draw();
1054  }
1055   
1056   Strip19->Print("Chi2TIDCompare.eps");
1057   Strip19->Print("Chi2TIDCompare.gif");
1058   
1059  rdir->GetObject("TID/Posx_matched_layer1tid",matchedtid[0]);
1060  rdir->GetObject("TID/Posy_matched_layer1tid",matchedtid[1]);
1061  rdir->GetObject("TID/Posx_matched_layer2tid",matchedtid[2]);
1062  rdir->GetObject("TID/Posy_matched_layer2tid",matchedtid[3]);
1063  rdir->GetObject("TID/Errx_matched_layer1tid",matchedtid[4]);
1064  rdir->GetObject("TID/Erry_matched_layer1tid",matchedtid[5]);
1065  rdir->GetObject("TID/Errx_matched_layer2tid",matchedtid[6]);
1066  rdir->GetObject("TID/Erry_matched_layer2tid",matchedtid[7]);
1067  rdir->GetObject("TID/Resx_matched_layer1tid",matchedtid[8]);
1068  rdir->GetObject("TID/Resy_matched_layer1tid",matchedtid[9]);
1069  rdir->GetObject("TID/Resx_matched_layer2tid",matchedtid[10]);
1070  rdir->GetObject("TID/Resy_matched_layer2tid",matchedtid[11]);
1071  sdir->GetObject("TID/Posx_matched_layer1tid",newmatchedtid[0]);
1072  sdir->GetObject("TID/Posy_matched_layer1tid",newmatchedtid[1]);
1073  sdir->GetObject("TID/Posx_matched_layer2tid",newmatchedtid[2]);
1074  sdir->GetObject("TID/Posy_matched_layer2tid",newmatchedtid[3]);
1075  sdir->GetObject("TID/Errx_matched_layer1tid",newmatchedtid[4]);
1076  sdir->GetObject("TID/Erry_matched_layer1tid",newmatchedtid[5]);
1077  sdir->GetObject("TID/Errx_matched_layer2tid",newmatchedtid[6]);
1078  sdir->GetObject("TID/Erry_matched_layer2tid",newmatchedtid[7]);
1079  sdir->GetObject("TID/Resx_matched_layer1tid",newmatchedtid[8]);
1080  sdir->GetObject("TID/Resy_matched_layer1tid",newmatchedtid[9]);
1081  sdir->GetObject("TID/Resx_matched_layer2tid",newmatchedtid[10]);
1082  sdir->GetObject("TID/Resy_matched_layer2tid",newmatchedtid[11]);
1083 
1084 
1085  Strip20 = new TCanvas("Strip20","Strip20",800,500);
1086  Strip20->Divide(4,3);
1087  for (Int_t i=0; i<12; i++) {
1088    Strip20->cd(i+1);
1089    matchedtid[i]->SetLineColor(2);
1090    newmatchedtid[i]->SetLineColor(4);
1091    newmatchedtid[i]->SetLineStyle(2);
1092    matchedtid[i]->Sumw2();
1093    newmatchedtid[i]->Sumw2();
1094    matchedtid[i]->SetNormFactor(1.0);
1095    newmatchedtid[i]->SetNormFactor(1.0);
1096    matchedtid[i]->Draw("h");
1097    newmatchedtid[i]->Draw("sameh");
1098    myPV->PVCompute(matchedtid[i] , newmatchedtid[i] , te );
1099     leg.Clear();
1100    leg.AddEntry(matchedtid[i],rver , "l");
1101    leg.AddEntry(newmatchedtid[i],cver , "l");
1102    leg.Draw();
1103 }
1104  
1105  Strip20->Print("MatchedTIDCompare.eps");
1106  Strip20->Print("MatchedTIDCompare.gif");
1107 
1108  rdir->GetObject("TID/Resx_matched_layer1tid",matchedchi2tid[0]);
1109  rdir->GetObject("TID/Resy_matched_layer1tid",matchedchi2tid[1]);
1110  rdir->GetObject("TID/Resx_matched_layer2tid",matchedchi2tid[2]);
1111  rdir->GetObject("TID/Resy_matched_layer2tid",matchedchi2tid[3]);
1112  rdir->GetObject("TID/Chi2_matched_layer1tid",matchedchi2tid[4]);
1113  rdir->GetObject("TID/Chi2_matched_layer2tid",matchedchi2tid[5]);
1114  sdir->GetObject("TID/Resx_matched_layer1tid",newmatchedchi2tid[0]);
1115  sdir->GetObject("TID/Resy_matched_layer1tid",newmatchedchi2tid[1]);
1116  sdir->GetObject("TID/Resx_matched_layer2tid",newmatchedchi2tid[2]);
1117  sdir->GetObject("TID/Resy_matched_layer2tid",newmatchedchi2tid[3]);
1118  sdir->GetObject("TID/Chi2_matched_layer1tid",newmatchedchi2tid[4]);
1119  sdir->GetObject("TID/Chi2_matched_layer2tid",newmatchedchi2tid[5]);
1120 
1121   Strip21 = new TCanvas("Strip21","Strip21",800,500);
1122   Strip21->Divide(2,3);
1123   for (Int_t i=0; i<5; i++) {
1124     Strip21->cd(i+1);
1125     chi2tid[i]->SetLineColor(2);
1126     newchi2tid[i]->SetLineColor(4);
1127     newchi2tid[i]->SetLineStyle(2);
1128     chi2tid[i]->Sumw2();
1129     newchi2tid[i]->Sumw2();
1130     chi2tid[i]->SetNormFactor(1.0);
1131     newchi2tid[i]->SetNormFactor(1.0);
1132     chi2tid[i]->Draw("h");
1133     newchi2tid[i]->Draw("sameh");
1134     myPV->PVCompute(matchedchi2tid[i] , newmatchedchi2tid[i] , te );
1135     leg.Clear();
1136    leg.AddEntry(chi2tid[i],rver , "l");
1137    leg.AddEntry(newchi2tid[i],cver , "l");
1138    leg.Draw();
1139  }
1140   
1141   Strip21->Print("Chi2MatchedTIDCompare.eps");
1142   Strip21->Print("Chi2MatchedTIDCompare.gif");
1143 
1144  //======================================================================================================
1145 // TEC
1146  
1147  TH1F* adctec[10];
1148  TH1F* pulltec[10];
1149  TH1F* nstptec[10];
1150  TH1F* postec[10];
1151  TH1F* errxtec[10];
1152  TH1F* restec[10];
1153  TH1F* chi2tec[10];
1154  TH1F* matchedtec[12];
1155  TH1F* matchedrestec[6];
1156  TH1F* matchedchi2tec[3];
1157  TH1F* newadctec[10];
1158  TH1F* newpulltec[10];
1159  TH1F* newnstptec[10];
1160  TH1F* newpostec[10];
1161  TH1F* newerrxtec[10];
1162  TH1F* newrestec[10];
1163  TH1F* newmatchedtec[12];
1164  TH1F* newchi2tec[10];
1165  TH1F* newmatchedrestec[6];
1166  TH1F* newmatchedchi2tec[3];
1167  
1168  rdir->GetObject("TEC/Adc_rphi_layer1tec",adctec[0]);
1169  rdir->GetObject("TEC/Adc_rphi_layer2tec",adctec[1]);
1170  rdir->GetObject("TEC/Adc_rphi_layer3tec",adctec[2]);
1171  rdir->GetObject("TEC/Adc_rphi_layer4tec",adctec[3]);
1172  rdir->GetObject("TEC/Adc_rphi_layer5tec",adctec[4]);
1173  rdir->GetObject("TEC/Adc_rphi_layer6tec",adctec[5]);
1174  rdir->GetObject("TEC/Adc_rphi_layer7tec",adctec[6]);
1175  rdir->GetObject("TEC/Adc_sas_layer1tec",adctec[7]);
1176  rdir->GetObject("TEC/Adc_sas_layer2tec",adctec[8]);
1177  rdir->GetObject("TEC/Adc_sas_layer5tec",adctec[9]);
1178  sdir->GetObject("TEC/Adc_rphi_layer1tec",newadctec[0]);
1179  sdir->GetObject("TEC/Adc_rphi_layer2tec",newadctec[1]);
1180  sdir->GetObject("TEC/Adc_rphi_layer3tec",newadctec[2]);
1181  sdir->GetObject("TEC/Adc_rphi_layer4tec",newadctec[3]);
1182  sdir->GetObject("TEC/Adc_rphi_layer5tec",newadctec[4]);
1183  sdir->GetObject("TEC/Adc_rphi_layer6tec",newadctec[5]);
1184  sdir->GetObject("TEC/Adc_rphi_layer7tec",newadctec[6]);
1185  sdir->GetObject("TEC/Adc_sas_layer1tec",newadctec[7]);
1186  sdir->GetObject("TEC/Adc_sas_layer2tec",newadctec[8]);
1187  sdir->GetObject("TEC/Adc_sas_layer5tec",newadctec[9]);
1188  
1189  Strip22 = new TCanvas("Strip22","Strip22",800,500);
1190  Strip22->Divide(4,3);
1191  for (Int_t i=0; i<10; i++) {
1192    Strip22->cd(i+1);
1193    adctec[i]->SetLineColor(2);
1194    newadctec[i]->SetLineColor(4);
1195    newadctec[i]->SetLineStyle(2);
1196    adctec[i]->Sumw2();
1197    newadctec[i]->Sumw2();
1198    adctec[i]->SetNormFactor(1.0);
1199    newadctec[i]->SetNormFactor(1.0);
1200    adctec[i]->Draw("h");
1201    newadctec[i]->Draw("sameh");
1202    myPV->PVCompute(adctec[i] , newadctec[i] , te );
1203     leg.Clear();
1204    leg.AddEntry(adctec[i],rver , "l");
1205    leg.AddEntry(newadctec[i],cver , "l");
1206    leg.Draw();
1207 }
1208  
1209  Strip22->Print("AdcTECCompare.eps");
1210  Strip22->Print("AdcTECCompare.gif");
1211  
1212  rdir->GetObject("TEC/Nstp_rphi_layer1tec",nstptec[0]);
1213  rdir->GetObject("TEC/Nstp_rphi_layer2tec",nstptec[1]);
1214  rdir->GetObject("TEC/Nstp_rphi_layer3tec",nstptec[2]);
1215  rdir->GetObject("TEC/Nstp_rphi_layer4tec",nstptec[3]);
1216  rdir->GetObject("TEC/Nstp_rphi_layer5tec",nstptec[4]);
1217  rdir->GetObject("TEC/Nstp_rphi_layer6tec",nstptec[5]);
1218  rdir->GetObject("TEC/Nstp_rphi_layer7tec",nstptec[6]);
1219  rdir->GetObject("TEC/Nstp_sas_layer1tec",nstptec[7]);
1220  rdir->GetObject("TEC/Nstp_sas_layer2tec",nstptec[8]);
1221  rdir->GetObject("TEC/Nstp_sas_layer5tec",nstptec[9]);
1222  sdir->GetObject("TEC/Nstp_rphi_layer1tec",newnstptec[0]);
1223  sdir->GetObject("TEC/Nstp_rphi_layer2tec",newnstptec[1]);
1224  sdir->GetObject("TEC/Nstp_rphi_layer3tec",newnstptec[2]);
1225  sdir->GetObject("TEC/Nstp_rphi_layer4tec",newnstptec[3]);
1226  sdir->GetObject("TEC/Nstp_rphi_layer5tec",newnstptec[4]);
1227  sdir->GetObject("TEC/Nstp_rphi_layer6tec",newnstptec[5]);
1228  sdir->GetObject("TEC/Nstp_rphi_layer7tec",newnstptec[6]);
1229  sdir->GetObject("TEC/Nstp_sas_layer1tec",newnstptec[7]);
1230  sdir->GetObject("TEC/Nstp_sas_layer2tec",newnstptec[8]);
1231  sdir->GetObject("TEC/Nstp_sas_layer5tec",newnstptec[9]);
1232 
1233  Strip23 = new TCanvas("Strip23","Strip23",800,500);
1234  Strip23->Divide(4,3);
1235  for (Int_t i=0; i<10; i++) {
1236    Strip23->cd(i+1);
1237    nstptec[i]->SetLineColor(2);
1238    newnstptec[i]->SetLineColor(4);
1239    newnstptec[i]->SetLineStyle(2);
1240    nstptec[i]->Sumw2();
1241    newnstptec[i]->Sumw2();
1242    nstptec[i]->SetNormFactor(1.0);
1243    newnstptec[i]->SetNormFactor(1.0);
1244    nstptec[i]->Draw("h");
1245    newnstptec[i]->Draw("sameh");
1246    myPV->PVCompute(nstptec[i] , newnstptec[i] , te );
1247     leg.Clear();
1248    leg.AddEntry(nstptec[i],rver , "l");
1249    leg.AddEntry(newnstptec[i],cver , "l");
1250    leg.Draw();
1251 }
1252  
1253  Strip23->Print("NstpTECCompare.eps");
1254  Strip23->Print("NstpTECCompare.gif");
1255 
1256  rdir->GetObject("TEC/Posx_rphi_layer1tec",postec[0]);
1257  rdir->GetObject("TEC/Posx_rphi_layer2tec",postec[1]);
1258  rdir->GetObject("TEC/Posx_rphi_layer3tec",postec[2]);
1259  rdir->GetObject("TEC/Posx_rphi_layer4tec",postec[3]);
1260  rdir->GetObject("TEC/Posx_rphi_layer5tec",postec[4]);
1261  rdir->GetObject("TEC/Posx_rphi_layer6tec",postec[5]);
1262  rdir->GetObject("TEC/Posx_rphi_layer7tec",postec[6]);
1263  rdir->GetObject("TEC/Posx_sas_layer1tec",postec[7]);
1264  rdir->GetObject("TEC/Posx_sas_layer2tec",postec[8]);
1265  rdir->GetObject("TEC/Posx_sas_layer5tec",postec[9]);
1266  sdir->GetObject("TEC/Posx_rphi_layer1tec",newpostec[0]);
1267  sdir->GetObject("TEC/Posx_rphi_layer2tec",newpostec[1]);
1268  sdir->GetObject("TEC/Posx_rphi_layer3tec",newpostec[2]);
1269  sdir->GetObject("TEC/Posx_rphi_layer4tec",newpostec[3]);
1270  sdir->GetObject("TEC/Posx_rphi_layer5tec",newpostec[4]);
1271  sdir->GetObject("TEC/Posx_rphi_layer6tec",newpostec[5]);
1272  sdir->GetObject("TEC/Posx_rphi_layer7tec",newpostec[6]);
1273  sdir->GetObject("TEC/Posx_sas_layer1tec",newpostec[7]);
1274  sdir->GetObject("TEC/Posx_sas_layer2tec",newpostec[8]);
1275  sdir->GetObject("TEC/Posx_sas_layer5tec",newpostec[9]);
1276 
1277  Strip24 = new TCanvas("Strip24","Strip24",800,500);
1278   Strip24->Divide(4,3);
1279   for (Int_t i=0; i<10; i++) {
1280     Strip24->cd(i+1);
1281     postec[i]->SetLineColor(2);
1282     newpostec[i]->SetLineColor(4);
1283     newpostec[i]->SetLineStyle(2);
1284     postec[i]->Sumw2();
1285     newpostec[i]->Sumw2();
1286     postec[i]->SetNormFactor(1.0);
1287     newpostec[i]->SetNormFactor(1.0);
1288     postec[i]->Draw("h");
1289     newpostec[i]->Draw("sameh");
1290     myPV->PVCompute(postec[i] , newpostec[i] , te );
1291      leg.Clear();
1292    leg.AddEntry(postec[i],rver , "l");
1293    leg.AddEntry(newpostec[i],cver , "l");
1294    leg.Draw();
1295 }
1296   
1297   Strip24->Print("PosTECCompare.eps");
1298   Strip24->Print("PosTECCompare.gif");
1299   
1300 
1301  rdir->GetObject("TEC/Errx_rphi_layer1tec",errxtec[0]);
1302  rdir->GetObject("TEC/Errx_rphi_layer2tec",errxtec[1]);
1303  rdir->GetObject("TEC/Errx_rphi_layer3tec",errxtec[2]);
1304  rdir->GetObject("TEC/Errx_rphi_layer4tec",errxtec[3]);
1305  rdir->GetObject("TEC/Errx_rphi_layer5tec",errxtec[4]);
1306  rdir->GetObject("TEC/Errx_rphi_layer6tec",errxtec[5]);
1307  rdir->GetObject("TEC/Errx_rphi_layer7tec",errxtec[6]);
1308  rdir->GetObject("TEC/Errx_sas_layer1tec",errxtec[7]);
1309  rdir->GetObject("TEC/Errx_sas_layer2tec",errxtec[8]);
1310  rdir->GetObject("TEC/Errx_sas_layer5tec",errxtec[9]);
1311  sdir->GetObject("TEC/Errx_rphi_layer1tec",newerrxtec[0]);
1312  sdir->GetObject("TEC/Errx_rphi_layer2tec",newerrxtec[1]);
1313  sdir->GetObject("TEC/Errx_rphi_layer3tec",newerrxtec[2]);
1314  sdir->GetObject("TEC/Errx_rphi_layer4tec",newerrxtec[3]);
1315  sdir->GetObject("TEC/Errx_rphi_layer5tec",newerrxtec[4]);
1316  sdir->GetObject("TEC/Errx_rphi_layer6tec",newerrxtec[5]);
1317  sdir->GetObject("TEC/Errx_rphi_layer7tec",newerrxtec[6]);
1318  sdir->GetObject("TEC/Errx_sas_layer1tec",newerrxtec[7]);
1319  sdir->GetObject("TEC/Errx_sas_layer2tec",newerrxtec[8]);
1320  sdir->GetObject("TEC/Errx_sas_layer5tec",newerrxtec[9]);
1321 
1322 
1323   Strip25 = new TCanvas("Strip25","Strip25",800,500);
1324   Strip25->Divide(4,3);
1325   for (Int_t i=0; i<10; i++) {
1326     Strip25->cd(i+1);
1327     errxtec[i]->SetLineColor(2);
1328     newerrxtec[i]->SetLineColor(4);
1329     newerrxtec[i]->SetLineStyle(2);
1330     errxtec[i]->Sumw2();
1331     newerrxtec[i]->Sumw2();
1332     errxtec[i]->SetNormFactor(1.0);
1333     newerrxtec[i]->SetNormFactor(1.0);
1334     errxtec[i]->Draw("h");
1335     newerrxtec[i]->Draw("sameh");
1336     myPV->PVCompute(errxtec[i] , newerrxtec[i] , te );
1337     leg.Clear();
1338    leg.AddEntry(errxtec[i],rver , "l");
1339    leg.AddEntry(newerrxtec[i],cver , "l");
1340    leg.Draw();
1341  }
1342   
1343   Strip25->Print("ErrxTECCompare.eps");
1344   Strip25->Print("ErrxTECCompare.gif");
1345   
1346  
1347  rdir->GetObject("TEC/Res_rphi_layer1tec",restec[0]);
1348  rdir->GetObject("TEC/Res_rphi_layer2tec",restec[1]);
1349  rdir->GetObject("TEC/Res_rphi_layer3tec",restec[2]);
1350  rdir->GetObject("TEC/Res_rphi_layer4tec",restec[3]);
1351  rdir->GetObject("TEC/Res_rphi_layer5tec",restec[4]);
1352  rdir->GetObject("TEC/Res_rphi_layer6tec",restec[5]);
1353  rdir->GetObject("TEC/Res_rphi_layer7tec",restec[6]);
1354  rdir->GetObject("TEC/Res_sas_layer1tec",restec[7]);
1355  rdir->GetObject("TEC/Res_sas_layer2tec",restec[8]);
1356  rdir->GetObject("TEC/Res_sas_layer5tec",restec[9]);
1357  sdir->GetObject("TEC/Res_rphi_layer1tec",newrestec[0]);
1358  sdir->GetObject("TEC/Res_rphi_layer2tec",newrestec[1]);
1359  sdir->GetObject("TEC/Res_rphi_layer3tec",newrestec[2]);
1360  sdir->GetObject("TEC/Res_rphi_layer4tec",newrestec[3]);
1361  sdir->GetObject("TEC/Res_rphi_layer5tec",newrestec[4]);
1362  sdir->GetObject("TEC/Res_rphi_layer6tec",newrestec[5]);
1363  sdir->GetObject("TEC/Res_rphi_layer7tec",newrestec[6]);
1364  sdir->GetObject("TEC/Res_sas_layer1tec",newrestec[7]);
1365  sdir->GetObject("TEC/Res_sas_layer2tec",newrestec[8]);
1366  sdir->GetObject("TEC/Res_sas_layer5tec",newrestec[9]);
1367 
1368   Strip26 = new TCanvas("Strip26","Strip26",800,500);
1369   Strip26->Divide(4,3);
1370   for (Int_t i=0; i<10; i++) {
1371     Strip26->cd(i+1);
1372     restec[i]->SetLineColor(2);
1373     newrestec[i]->SetLineColor(4);
1374     newrestec[i]->SetLineStyle(2);
1375     restec[i]->Sumw2();
1376     newrestec[i]->Sumw2();
1377     restec[i]->SetNormFactor(1.0);
1378     newrestec[i]->SetNormFactor(1.0);
1379     restec[i]->Draw("h");
1380     newrestec[i]->Draw("sameh");
1381     myPV->PVCompute(restec[i] , newrestec[i] , te );
1382     leg.Clear();
1383    leg.AddEntry(restec[i],rver , "l");
1384    leg.AddEntry(newrestec[i],cver , "l");
1385    leg.Draw();
1386  }
1387   
1388   Strip26->Print("ResTECCompare.eps");
1389   Strip26->Print("ResTECCompare.gif");
1390 
1391   rdir->GetObject("TEC/Pull_MF_rphi_layer1tec",pulltec[0]);
1392   rdir->GetObject("TEC/Pull_MF_rphi_layer2tec",pulltec[1]);
1393   rdir->GetObject("TEC/Pull_MF_rphi_layer3tec",pulltec[2]);
1394   rdir->GetObject("TEC/Pull_MF_rphi_layer4tec",pulltec[3]);
1395   rdir->GetObject("TEC/Pull_MF_rphi_layer5tec",pulltec[4]);
1396   rdir->GetObject("TEC/Pull_MF_rphi_layer6tec",pulltec[5]);
1397   rdir->GetObject("TEC/Pull_MF_rphi_layer7tec",pulltec[6]);
1398   rdir->GetObject("TEC/Pull_MF_sas_layer1tec",pulltec[7]);
1399   rdir->GetObject("TEC/Pull_MF_sas_layer2tec",pulltec[8]);
1400   rdir->GetObject("TEC/Pull_MF_sas_layer5tec",pulltec[9]);
1401   sdir->GetObject("TEC/Pull_MF_rphi_layer1tec",newpulltec[0]);
1402   sdir->GetObject("TEC/Pull_MF_rphi_layer2tec",newpulltec[1]);
1403   sdir->GetObject("TEC/Pull_MF_rphi_layer3tec",newpulltec[2]);
1404   sdir->GetObject("TEC/Pull_MF_rphi_layer4tec",newpulltec[3]);
1405   sdir->GetObject("TEC/Pull_MF_rphi_layer5tec",newpulltec[4]);
1406   sdir->GetObject("TEC/Pull_MF_rphi_layer6tec",newpulltec[5]);
1407   sdir->GetObject("TEC/Pull_MF_rphi_layer7tec",newpulltec[6]);
1408   sdir->GetObject("TEC/Pull_MF_sas_layer1tec",newpulltec[7]);
1409   sdir->GetObject("TEC/Pull_MF_sas_layer2tec",newpulltec[8]);
1410   sdir->GetObject("TEC/Pull_MF_sas_layer5tec",newpulltec[9]);
1411   
1412   Strip34 = new TCanvas("Strip34","Strip34",800,500);
1413   Strip34->Divide(4,3);
1414   for (Int_t i=0; i<10; i++) {
1415     Strip34->cd(i+1);
1416     pulltec[i]->SetLineColor(2);
1417     newpulltec[i]->SetLineColor(4);
1418     newpulltec[i]->SetLineStyle(2);
1419     pulltec[i]->Sumw2();
1420     newpulltec[i]->Sumw2();
1421     pulltec[i]->SetNormFactor(1.0);
1422     newpulltec[i]->SetNormFactor(1.0);
1423     pulltec[i]->Draw("h");
1424     newpulltec[i]->Draw("sameh");
1425     myPV->PVCompute(pulltec[i] , newpulltec[i] , te );
1426      leg.Clear();
1427    leg.AddEntry(pulltec[i],rver , "l");
1428    leg.AddEntry(newpulltec[i],cver , "l");
1429    leg.Draw();
1430 }
1431   
1432   Strip34->Print("PullTECCompare.eps");
1433   Strip34->Print("PullTECCompare.gif");
1434 
1435  rdir->GetObject("TEC/Chi2_rphi_layer1tec",chi2tec[0]);
1436  rdir->GetObject("TEC/Chi2_rphi_layer2tec",chi2tec[1]);
1437  rdir->GetObject("TEC/Chi2_rphi_layer3tec",chi2tec[2]);
1438  rdir->GetObject("TEC/Chi2_rphi_layer4tec",chi2tec[3]);
1439  rdir->GetObject("TEC/Chi2_rphi_layer5tec",chi2tec[4]);
1440  rdir->GetObject("TEC/Chi2_rphi_layer6tec",chi2tec[5]);
1441  rdir->GetObject("TEC/Chi2_rphi_layer7tec",chi2tec[6]);
1442  rdir->GetObject("TEC/Chi2_sas_layer1tec",chi2tec[7]);
1443  rdir->GetObject("TEC/Chi2_sas_layer2tec",chi2tec[8]);
1444  rdir->GetObject("TEC/Chi2_sas_layer5tec",chi2tec[9]);
1445  sdir->GetObject("TEC/Chi2_rphi_layer1tec",newchi2tec[0]);
1446  sdir->GetObject("TEC/Chi2_rphi_layer2tec",newchi2tec[1]);
1447  sdir->GetObject("TEC/Chi2_rphi_layer3tec",newchi2tec[2]);
1448  sdir->GetObject("TEC/Chi2_rphi_layer4tec",newchi2tec[3]);
1449  sdir->GetObject("TEC/Chi2_rphi_layer5tec",newchi2tec[4]);
1450  sdir->GetObject("TEC/Chi2_rphi_layer6tec",newchi2tec[5]);
1451  sdir->GetObject("TEC/Chi2_rphi_layer7tec",newchi2tec[6]);
1452  sdir->GetObject("TEC/Chi2_sas_layer1tec",newchi2tec[7]);
1453  sdir->GetObject("TEC/Chi2_sas_layer2tec",newchi2tec[8]);
1454  sdir->GetObject("TEC/Chi2_sas_layer5tec",newchi2tec[9]);
1455 
1456   Strip27 = new TCanvas("Strip27","Strip27",800,500);
1457   Strip27->Divide(4,3);
1458   for (Int_t i=0; i<10; i++) {
1459     Strip27->cd(i+1);
1460     chi2tec[i]->SetLineColor(2);
1461     newchi2tec[i]->SetLineColor(4);
1462     newchi2tec[i]->SetLineStyle(2);
1463     chi2tec[i]->Sumw2();
1464     newchi2tec[i]->Sumw2();
1465     chi2tec[i]->SetNormFactor(1.0);
1466     newchi2tec[i]->SetNormFactor(1.0);
1467     chi2tec[i]->Draw("h");
1468     newchi2tec[i]->Draw("sameh");
1469     myPV->PVCompute(chi2tec[i] , newchi2tec[i] , te );
1470      leg.Clear();
1471    leg.AddEntry(chi2tec[i],rver , "l");
1472    leg.AddEntry(newchi2tec[i],cver , "l");
1473    leg.Draw();
1474 }
1475   
1476   Strip27->Print("Chi2TECCompare.eps");
1477   Strip27->Print("Chi2TECCompare.gif");
1478   
1479  rdir->GetObject("TEC/Posx_matched_layer1tec",matchedtec[0]);
1480  rdir->GetObject("TEC/Posy_matched_layer1tec",matchedtec[1]);
1481  rdir->GetObject("TEC/Posx_matched_layer2tec",matchedtec[2]);
1482  rdir->GetObject("TEC/Posy_matched_layer2tec",matchedtec[3]);
1483  rdir->GetObject("TEC/Posx_matched_layer5tec",matchedtec[4]);
1484  rdir->GetObject("TEC/Posy_matched_layer5tec",matchedtec[5]);
1485  rdir->GetObject("TEC/Errx_matched_layer1tec",matchedtec[6]);
1486  rdir->GetObject("TEC/Erry_matched_layer1tec",matchedtec[7]);
1487  rdir->GetObject("TEC/Errx_matched_layer2tec",matchedtec[8]);
1488  rdir->GetObject("TEC/Erry_matched_layer2tec",matchedtec[9]);
1489  rdir->GetObject("TEC/Errx_matched_layer5tec",matchedtec[10]);
1490  rdir->GetObject("TEC/Erry_matched_layer5tec",matchedtec[11]);
1491  sdir->GetObject("TEC/Posx_matched_layer1tec",newmatchedtec[0]);
1492  sdir->GetObject("TEC/Posy_matched_layer1tec",newmatchedtec[1]);
1493  sdir->GetObject("TEC/Posx_matched_layer2tec",newmatchedtec[2]);
1494  sdir->GetObject("TEC/Posy_matched_layer2tec",newmatchedtec[3]);
1495  sdir->GetObject("TEC/Posx_matched_layer5tec",newmatchedtec[4]);
1496  sdir->GetObject("TEC/Posy_matched_layer5tec",newmatchedtec[5]);
1497  sdir->GetObject("TEC/Errx_matched_layer1tec",newmatchedtec[6]);
1498  sdir->GetObject("TEC/Erry_matched_layer1tec",newmatchedtec[7]);
1499  sdir->GetObject("TEC/Errx_matched_layer2tec",newmatchedtec[8]);
1500  sdir->GetObject("TEC/Erry_matched_layer2tec",newmatchedtec[9]);
1501  sdir->GetObject("TEC/Errx_matched_layer5tec",newmatchedtec[10]);
1502  sdir->GetObject("TEC/Erry_matched_layer5tec",newmatchedtec[11]);
1503 
1504  Strip28 = new TCanvas("Strip28","Strip28",800,500);
1505  Strip28->Divide(4,3);
1506  for (Int_t i=0; i<12; i++) {
1507    Strip28->cd(i+1);
1508    matchedtec[i]->SetLineColor(2);
1509    newmatchedtec[i]->SetLineColor(4);
1510    newmatchedtec[i]->SetLineStyle(2);
1511    matchedtec[i]->Sumw2();
1512    newmatchedtec[i]->Sumw2();
1513    matchedtec[i]->SetNormFactor(1.0);
1514    newmatchedtec[i]->SetNormFactor(1.0);
1515    matchedtec[i]->Draw("h");
1516    newmatchedtec[i]->Draw("sameh");
1517    myPV->PVCompute(matchedtec[i] , newmatchedtec[i] , te );
1518     leg.Clear();
1519    leg.AddEntry(matchedtec[i],rver , "l");
1520    leg.AddEntry(newmatchedtec[i],cver , "l");
1521    leg.Draw();
1522 }
1523  
1524  Strip28->Print("MatchedTECCompare.eps");
1525  Strip28->Print("MatchedTECCompare.gif");
1526  
1527  rdir->GetObject("TEC/Resx_matched_layer1tec",matchedrestec[0]);
1528  rdir->GetObject("TEC/Resy_matched_layer1tec",matchedrestec[1]);
1529  rdir->GetObject("TEC/Resx_matched_layer2tec",matchedrestec[2]);
1530  rdir->GetObject("TEC/Resy_matched_layer2tec",matchedrestec[3]);
1531  rdir->GetObject("TEC/Resx_matched_layer5tec",matchedrestec[4]);
1532  rdir->GetObject("TEC/Resy_matched_layer5tec",matchedrestec[5]);
1533  sdir->GetObject("TEC/Resx_matched_layer1tec",newmatchedrestec[0]);
1534  sdir->GetObject("TEC/Resy_matched_layer1tec",newmatchedrestec[1]);
1535  sdir->GetObject("TEC/Resx_matched_layer2tec",newmatchedrestec[2]);
1536  sdir->GetObject("TEC/Resy_matched_layer2tec",newmatchedrestec[3]);
1537  sdir->GetObject("TEC/Resx_matched_layer5tec",newmatchedrestec[4]);
1538  sdir->GetObject("TEC/Resy_matched_layer5tec",newmatchedrestec[5]);
1539 
1540  Strip29 = new TCanvas("Strip29","Strip29",800,500);
1541  Strip29->Divide(2,3);
1542  for (Int_t i=0; i<6; i++) {
1543    Strip29->cd(i+1);
1544    matchedrestec[i]->SetLineColor(2);
1545    newmatchedrestec[i]->SetLineColor(4);
1546    newmatchedrestec[i]->SetLineStyle(2);
1547    matchedrestec[i]->Sumw2();
1548    newmatchedrestec[i]->Sumw2();
1549    matchedrestec[i]->SetNormFactor(1.0);
1550    newmatchedrestec[i]->SetNormFactor(1.0);
1551    matchedrestec[i]->Draw("h");
1552    newmatchedrestec[i]->Draw("sameh");
1553    myPV->PVCompute(matchedrestec[i] , newmatchedrestec[i] , te );
1554     leg.Clear();
1555    leg.AddEntry(matchedrestec[i],rver , "l");
1556    leg.AddEntry(newmatchedrestec[i],cver , "l");
1557    leg.Draw();
1558 }
1559  
1560  Strip29->Print("MatchedResTECCompare.eps");
1561  Strip29->Print("MatchedResTECCompare.gif");
1562 
1563  rdir->GetObject("TEC/Chi2_matched_layer1tec",matchedchi2tec[0]);
1564  rdir->GetObject("TEC/Chi2_matched_layer2tec",matchedchi2tec[1]);
1565  rdir->GetObject("TEC/Chi2_matched_layer5tec",matchedchi2tec[2]);
1566  sdir->GetObject("TEC/Chi2_matched_layer1tec",newmatchedchi2tec[0]);
1567  sdir->GetObject("TEC/Chi2_matched_layer2tec",newmatchedchi2tec[1]);
1568  sdir->GetObject("TEC/Chi2_matched_layer5tec",newmatchedchi2tec[2]);
1569  
1570  Strip30 = new TCanvas("Strip30","Strip30",800,500);
1571  Strip30->Divide(1,3);
1572  for (Int_t i=0; i<3; i++) {
1573    Strip30->cd(i+1);
1574    matchedchi2tec[i]->SetLineColor(2);
1575    newmatchedchi2tec[i]->SetLineColor(4);
1576    newmatchedchi2tec[i]->SetLineStyle(2);
1577    matchedchi2tec[i]->Sumw2();
1578    newmatchedchi2tec[i]->Sumw2();
1579    matchedchi2tec[i]->SetNormFactor(1.0);
1580    newmatchedchi2tec[i]->SetNormFactor(1.0);
1581    matchedchi2tec[i]->Draw("h");
1582    newmatchedchi2tec[i]->Draw("sameh");
1583    myPV->PVCompute(matchedchi2tec[i] , newmatchedchi2tec[i] , te );
1584     leg.Clear();
1585    leg.AddEntry(matchedchi2tec[i],rver , "l");
1586    leg.AddEntry(newmatchedchi2tec[i],cver , "l");
1587    leg.Draw();
1588 }
1589  
1590  Strip30->Print("MatchedChi2TECCompare.eps");
1591  Strip30->Print("MatchedChi2TECCompare.gif");
1592 
1593  
1594 }
1595