Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 void SetUpHistograms(TH1F* h1, TH1F* h2)
0002   //, const char* xtitle, TLegend* leg = 0)
0003 {
0004   float scale1 = -9999.9;
0005   float scale2 = -9999.9;
0006 
0007   if ( h1->Integral() != 0 && h2->Integral() != 0 )
0008     {
0009       scale1 = 1.0/(float)h1->Integral();
0010       scale2 = 1.0/(float)h2->Integral();
0011       
0012       h1->Sumw2();
0013       h2->Sumw2();
0014       h1->Scale(scale1);
0015       h2->Scale(scale2);
0016   
0017       h1->SetLineWidth(1);
0018       h2->SetLineWidth(1);
0019       h1->SetLineColor(2);
0020       h2->SetLineColor(4);
0021       h2->SetLineStyle(2);  
0022     }
0023   /*
0024   h1->SetXTitle(xtitle);
0025   if ( leg != 0 )
0026     {
0027       leg->SetBorderSize(0);
0028       leg->AddEntry(h1, "reference  ", "l");
0029       leg->AddEntry(h2, "new release", "l");
0030     }
0031   */
0032 }
0033 
0034 void SiStripTrackingRecHitsCompare(char* originalNameR="DQM_V0001_R000000001__CMSSW_3_1_5__RelVal__Validation.root", char* originalNameS="DQM_V0001_R000000001__CMSSW_3_1_5__RelVal__Validation.root")
0035 {
0036   //color 2 = red  = rfile = new file
0037   //color 4 = blue = sfile = reference file
0038 
0039 
0040  gROOT ->Reset();
0041 
0042  char*  rfilename = "striptrackingrechitshisto.root";
0043  char*  sfilename = "../striptrackingrechitshisto.root";
0044 
0045  delete gROOT->GetListOfFiles()->FindObject(rfilename);
0046  delete gROOT->GetListOfFiles()->FindObject(sfilename); 
0047  gROOT->ProcessLine(".L HistoCompare_Strips.C");
0048 
0049  TText* te = new TText();
0050  TFile * rfile = new TFile(rfilename);
0051  TDirectory * rdir=gDirectory; 
0052  TFile * sfile = new TFile(sfilename);
0053  TDirectory * sdir=gDirectory; 
0054    
0055  char pathR[500];
0056  sprintf(pathR,"DQMData/Run 1/%s/DQMData/Run 1/RecoTrackV/Run summary/TrackingRecHits/Strip",originalNameR);
0057  cout << "pathR = " << pathR << endl;
0058  char pathS[500];
0059  sprintf(pathS,"DQMData/Run 1/%s/DQMData/Run 1/RecoTrackV/Run summary/TrackingRecHits/Strip",originalNameS);
0060  cout << "pathS = " << pathS << endl;
0061 
0062  bool rgood=true;
0063  if(rfile->cd("DQMData/Run 1/RecoTrackV"))rfile->cd("DQMData/Run 1/RecoTrackV/Run summary/TrackingRecHits/Strip");
0064  else if(rfile->cd("DQMData/Run 1/Tracking/Run summary/TrackingRecHits"))rfile->cd("DQMData/Run 1/Tracking/Run summary/TrackingRecHits/Strip");
0065  else if (rfile->cd("DQMData/RecoTrackV")) rfile->cd("DQMData/RecoTrackV/TrackingRecHits/Strip");
0066  else if (rfile->cd(pathR)) rfile->cd(pathR);
0067  else {cout << "NEW HISTOS: no RecoTrackV directory found! STOP" << endl; rgood=false;}
0068 
0069  if (rgood) rdir=gDirectory;
0070  else break;
0071 
0072  bool sgood=true;
0073  if(sfile->cd("DQMData/Run 1/RecoTrackV"))sfile->cd("DQMData/Run 1/RecoTrackV/Run summary/TrackingRecHits/Strip");
0074  else if(sfile->cd("DQMData/Run 1/Tracking/Run summary/TrackingRecHits"))sfile->cd("DQMData/Run 1/Tracking/Run summary/TrackingRecHits/Strip");
0075  else if (sfile->cd("DQMData/RecoTrackV")) sfile->cd("DQMData/RecoTrackV/TrackingRecHits/Strip");
0076  else if (sfile->cd(pathS)) sfile->cd(pathS);
0077  else {cout << "REFERENCE HISTOS: no RecoTrackV directory found! STOP" << endl; sgood=false;}
0078 
0079  if (sgood) sdir=gDirectory; 
0080  else break;
0081 
0082  Char_t histo[200];
0083 
0084  HistoCompare_Strips * myPV = new HistoCompare_Strips();
0085 
0086  TCanvas *Strip;
0087 
0088 
0089  //=============================================================== 
0090  // TIB
0091 
0092  TH1F* refplotsTIB[6];
0093  TH1F* newplotsTIB[6];
0094  
0095  TProfile* PullTrackangleProfiletib[6];
0096  TProfile* PullTrackwidthProfiletib[6];
0097  TProfile* PullTrackwidthProfileCategory1tib[6];
0098  TProfile* PullTrackwidthProfileCategory2tib[6];
0099  TProfile* PullTrackwidthProfileCategory3tib[6];
0100  TProfile* PullTrackwidthProfileCategory4tib[6];
0101  TH1F* matchedtib[16];
0102 
0103  TProfile* newPullTrackangleProfiletib[6];
0104  TProfile* newPullTrackwidthProfiletib[6];
0105  TProfile* newPullTrackwidthProfileCategory1tib[6];
0106  TProfile* newPullTrackwidthProfileCategory2tib[6];
0107  TProfile* newPullTrackwidthProfileCategory3tib[6];
0108  TProfile* newPullTrackwidthProfileCategory4tib[6];
0109  TH1F* newmatchedtib[16];
0110 
0111  //
0112  
0113  rdir->GetObject("TIB/Adc_rphi_layer1tib",refplotsTIB[0]);
0114  rdir->GetObject("TIB/Adc_rphi_layer2tib",refplotsTIB[1]);
0115  rdir->GetObject("TIB/Adc_rphi_layer3tib",refplotsTIB[2]);
0116  rdir->GetObject("TIB/Adc_rphi_layer4tib",refplotsTIB[3]);
0117  rdir->GetObject("TIB/Adc_sas_layer1tib",refplotsTIB[4]);
0118  rdir->GetObject("TIB/Adc_sas_layer2tib",refplotsTIB[5]);
0119  sdir->GetObject("TIB/Adc_rphi_layer1tib",newplotsTIB[0]);
0120  sdir->GetObject("TIB/Adc_rphi_layer2tib",newplotsTIB[1]);
0121  sdir->GetObject("TIB/Adc_rphi_layer3tib",newplotsTIB[2]);
0122  sdir->GetObject("TIB/Adc_rphi_layer4tib",newplotsTIB[3]);
0123  sdir->GetObject("TIB/Adc_sas_layer1tib",newplotsTIB[4]);
0124  sdir->GetObject("TIB/Adc_sas_layer2tib",newplotsTIB[5]);
0125  
0126  Strip = new TCanvas("Strip","Strip",1000,1000);
0127  Strip->Divide(2,3);
0128  for (Int_t i=0; i<6; i++) {
0129    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0130    Strip->cd(i+1);
0131    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0132    refplotsTIB[i]->Draw();
0133    newplotsTIB[i]->Draw("sames");
0134    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0135  }
0136 
0137  Strip->Print("AdcTIBCompare.eps");
0138  Strip->Print("AdcTIBCompare.gif");
0139  
0140  rdir->GetObject("TIB/Pull_LF_rphi_layer1tib",refplotsTIB[0]);
0141  rdir->GetObject("TIB/Pull_LF_rphi_layer2tib",refplotsTIB[1]);
0142  rdir->GetObject("TIB/Pull_LF_rphi_layer3tib",refplotsTIB[2]);
0143  rdir->GetObject("TIB/Pull_LF_rphi_layer4tib",refplotsTIB[3]);
0144  rdir->GetObject("TIB/Pull_LF_sas_layer1tib",refplotsTIB[4]);
0145  rdir->GetObject("TIB/Pull_LF_sas_layer2tib",refplotsTIB[5]);
0146  sdir->GetObject("TIB/Pull_LF_rphi_layer1tib",newplotsTIB[0]);
0147  sdir->GetObject("TIB/Pull_LF_rphi_layer2tib",newplotsTIB[1]);
0148  sdir->GetObject("TIB/Pull_LF_rphi_layer3tib",newplotsTIB[2]);
0149  sdir->GetObject("TIB/Pull_LF_rphi_layer4tib",newplotsTIB[3]);
0150  sdir->GetObject("TIB/Pull_LF_sas_layer1tib",newplotsTIB[4]);
0151  sdir->GetObject("TIB/Pull_LF_sas_layer2tib",newplotsTIB[5]);
0152 
0153  Strip = new TCanvas("Strip","Strip",1000,1000);
0154  Strip->Divide(2,3);
0155  for (Int_t i=0; i<6; i++) {
0156    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0157    Strip->cd(i+1);
0158    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0159    refplotsTIB[i]->Draw();
0160    newplotsTIB[i]->Draw("sames");
0161    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0162  }
0163  
0164  Strip->Print("PullLFTIBCompare.eps");
0165  Strip->Print("PullLFTIBCompare.gif");
0166 
0167  rdir->GetObject("TIB/Pull_MF_rphi_layer1tib",refplotsTIB[0]);
0168  rdir->GetObject("TIB/Pull_MF_rphi_layer2tib",refplotsTIB[1]);
0169  rdir->GetObject("TIB/Pull_MF_rphi_layer3tib",refplotsTIB[2]);
0170  rdir->GetObject("TIB/Pull_MF_rphi_layer4tib",refplotsTIB[3]);
0171  rdir->GetObject("TIB/Pull_MF_sas_layer1tib",refplotsTIB[4]);
0172  rdir->GetObject("TIB/Pull_MF_sas_layer2tib",refplotsTIB[5]);
0173  sdir->GetObject("TIB/Pull_MF_rphi_layer1tib",newplotsTIB[0]);
0174  sdir->GetObject("TIB/Pull_MF_rphi_layer2tib",newplotsTIB[1]);
0175  sdir->GetObject("TIB/Pull_MF_rphi_layer3tib",newplotsTIB[2]);
0176  sdir->GetObject("TIB/Pull_MF_rphi_layer4tib",newplotsTIB[3]);
0177  sdir->GetObject("TIB/Pull_MF_sas_layer1tib",newplotsTIB[4]);
0178  sdir->GetObject("TIB/Pull_MF_sas_layer2tib",newplotsTIB[5]);
0179  
0180  Strip = new TCanvas("Strip","Strip",1000,1000);
0181  Strip->Divide(2,3);
0182  for (Int_t i=0; i<6; i++) {
0183    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0184    Strip->cd(i+1);
0185    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0186    refplotsTIB[i]->Draw();
0187    newplotsTIB[i]->Draw("sames");
0188    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0189  }
0190  
0191  Strip->Print("PullMFTIBCompare.eps");
0192  Strip->Print("PullMFTIBCompare.gif");
0193 
0194  rdir->GetObject("TIB/Trackangle_rphi_layer1tib",refplotsTIB[0]);
0195  rdir->GetObject("TIB/Trackangle_rphi_layer2tib",refplotsTIB[1]);
0196  rdir->GetObject("TIB/Trackangle_rphi_layer3tib",refplotsTIB[2]);
0197  rdir->GetObject("TIB/Trackangle_rphi_layer4tib",refplotsTIB[3]);
0198  rdir->GetObject("TIB/Trackangle_sas_layer1tib",refplotsTIB[4]);
0199  rdir->GetObject("TIB/Trackangle_sas_layer2tib",refplotsTIB[5]);
0200  sdir->GetObject("TIB/Trackangle_rphi_layer1tib",newplotsTIB[0]);
0201  sdir->GetObject("TIB/Trackangle_rphi_layer2tib",newplotsTIB[1]);
0202  sdir->GetObject("TIB/Trackangle_rphi_layer3tib",newplotsTIB[2]);
0203  sdir->GetObject("TIB/Trackangle_rphi_layer4tib",newplotsTIB[3]);
0204  sdir->GetObject("TIB/Trackangle_sas_layer1tib",newplotsTIB[4]);
0205  sdir->GetObject("TIB/Trackangle_sas_layer2tib",newplotsTIB[5]);
0206  
0207  Strip = new TCanvas("Strip","Strip",1000,1000);
0208  Strip->Divide(2,3);
0209  for (Int_t i=0; i<6; i++) {
0210    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0211    Strip->cd(i+1);
0212    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0213    refplotsTIB[i]->Draw();
0214    newplotsTIB[i]->Draw("sames");
0215    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0216  }
0217  
0218  Strip->Print("TrackangleTIBCompare.eps");
0219  Strip->Print("TrackangleTIBCompare.gif");
0220  
0221  rdir->GetObject("TIB/Trackwidth_rphi_layer1tib",refplotsTIB[0]);
0222  rdir->GetObject("TIB/Trackwidth_rphi_layer2tib",refplotsTIB[1]);
0223  rdir->GetObject("TIB/Trackwidth_rphi_layer3tib",refplotsTIB[2]);
0224  rdir->GetObject("TIB/Trackwidth_rphi_layer4tib",refplotsTIB[3]);
0225  rdir->GetObject("TIB/Trackwidth_sas_layer1tib",refplotsTIB[4]);
0226  rdir->GetObject("TIB/Trackwidth_sas_layer2tib",refplotsTIB[5]);
0227  sdir->GetObject("TIB/Trackwidth_rphi_layer1tib",newplotsTIB[0]);
0228  sdir->GetObject("TIB/Trackwidth_rphi_layer2tib",newplotsTIB[1]);
0229  sdir->GetObject("TIB/Trackwidth_rphi_layer3tib",newplotsTIB[2]);
0230  sdir->GetObject("TIB/Trackwidth_rphi_layer4tib",newplotsTIB[3]);
0231  sdir->GetObject("TIB/Trackwidth_sas_layer1tib",newplotsTIB[4]);
0232  sdir->GetObject("TIB/Trackwidth_sas_layer2tib",newplotsTIB[5]);
0233  
0234  Strip = new TCanvas("Strip","Strip",1000,1000);
0235  Strip->Divide(2,3);
0236  for (Int_t i=0; i<6; i++) {
0237    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0238    Strip->cd(i+1);
0239    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0240    refplotsTIB[i]->Draw();
0241    newplotsTIB[i]->Draw("sames");
0242    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0243  }
0244  
0245  Strip->Print("TrackwidthTIBCompare.eps");
0246  Strip->Print("TrackwidthTIBCompare.gif");
0247  
0248  rdir->GetObject("TIB/Expectedwidth_rphi_layer1tib",refplotsTIB[0]);
0249  rdir->GetObject("TIB/Expectedwidth_rphi_layer2tib",refplotsTIB[1]);
0250  rdir->GetObject("TIB/Expectedwidth_rphi_layer3tib",refplotsTIB[2]);
0251  rdir->GetObject("TIB/Expectedwidth_rphi_layer4tib",refplotsTIB[3]);
0252  rdir->GetObject("TIB/Expectedwidth_sas_layer1tib",refplotsTIB[4]);
0253  rdir->GetObject("TIB/Expectedwidth_sas_layer2tib",refplotsTIB[5]);
0254  sdir->GetObject("TIB/Expectedwidth_rphi_layer1tib",newplotsTIB[0]);
0255  sdir->GetObject("TIB/Expectedwidth_rphi_layer2tib",newplotsTIB[1]);
0256  sdir->GetObject("TIB/Expectedwidth_rphi_layer3tib",newplotsTIB[2]);
0257  sdir->GetObject("TIB/Expectedwidth_rphi_layer4tib",newplotsTIB[3]);
0258  sdir->GetObject("TIB/Expectedwidth_sas_layer1tib",newplotsTIB[4]);
0259  sdir->GetObject("TIB/Expectedwidth_sas_layer2tib",newplotsTIB[5]);
0260  
0261  Strip = new TCanvas("Strip","Strip",1000,1000);
0262  Strip->Divide(2,3);
0263  for (Int_t i=0; i<6; i++) {
0264    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0265    Strip->cd(i+1);
0266    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0267    refplotsTIB[i]->Draw();
0268    newplotsTIB[i]->Draw("sames");
0269    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0270  }
0271  
0272  Strip->Print("ExpectedwidthTIBCompare.eps");
0273  Strip->Print("ExpectedwidthTIBCompare.gif");
0274  
0275  rdir->GetObject("TIB/Category_rphi_layer1tib",refplotsTIB[0]);
0276  rdir->GetObject("TIB/Category_rphi_layer2tib",refplotsTIB[1]);
0277  rdir->GetObject("TIB/Category_rphi_layer3tib",refplotsTIB[2]);
0278  rdir->GetObject("TIB/Category_rphi_layer4tib",refplotsTIB[3]);
0279  rdir->GetObject("TIB/Category_sas_layer1tib",refplotsTIB[4]);
0280  rdir->GetObject("TIB/Category_sas_layer2tib",refplotsTIB[5]);
0281  sdir->GetObject("TIB/Category_rphi_layer1tib",newplotsTIB[0]);
0282  sdir->GetObject("TIB/Category_rphi_layer2tib",newplotsTIB[1]);
0283  sdir->GetObject("TIB/Category_rphi_layer3tib",newplotsTIB[2]);
0284  sdir->GetObject("TIB/Category_rphi_layer4tib",newplotsTIB[3]);
0285  sdir->GetObject("TIB/Category_sas_layer1tib",newplotsTIB[4]);
0286  sdir->GetObject("TIB/Category_sas_layer2tib",newplotsTIB[5]);
0287  
0288  Strip = new TCanvas("Strip","Strip",1000,1000);
0289  Strip->Divide(2,3);
0290  for (Int_t i=0; i<6; i++) {
0291    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0292    Strip->cd(i+1);
0293    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0294    refplotsTIB[i]->Draw();
0295    newplotsTIB[i]->Draw("sames");
0296    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0297  }
0298  
0299  Strip->Print("CategoryTIBCompare.eps");
0300  Strip->Print("CategoryTIBCompare.gif");
0301  
0302  /*
0303  rdir->GetObject("TIB/PullTrackangleProfile_rphi_layer1tib",PullTrackangleProfiletib[0]);
0304  rdir->GetObject("TIB/PullTrackangleProfile_rphi_layer2tib",PullTrackangleProfiletib[1]);
0305  rdir->GetObject("TIB/PullTrackangleProfile_rphi_layer3tib",PullTrackangleProfiletib[2]);
0306  rdir->GetObject("TIB/PullTrackangleProfile_rphi_layer4tib",PullTrackangleProfiletib[3]);
0307  rdir->GetObject("TIB/PullTrackangleProfile_sas_layer1tib",PullTrackangleProfiletib[4]);
0308  rdir->GetObject("TIB/PullTrackangleProfile_sas_layer2tib",PullTrackangleProfiletib[5]);
0309  sdir->GetObject("TIB/PullTrackangleProfile_rphi_layer1tib",newPullTrackangleProfiletib[0]);
0310  sdir->GetObject("TIB/PullTrackangleProfile_rphi_layer2tib",newPullTrackangleProfiletib[1]);
0311  sdir->GetObject("TIB/PullTrackangleProfile_rphi_layer3tib",newPullTrackangleProfiletib[2]);
0312  sdir->GetObject("TIB/PullTrackangleProfile_rphi_layer4tib",newPullTrackangleProfiletib[3]);
0313  sdir->GetObject("TIB/PullTrackangleProfile_sas_layer1tib",newPullTrackangleProfiletib[4]);
0314  sdir->GetObject("TIB/PullTrackangleProfile_sas_layer2tib",newPullTrackangleProfiletib[5]);
0315  
0316  Strip = new TCanvas("Strip","Strip",1000,1000);
0317  Strip->Divide(2,3);
0318  for (Int_t i=0; i<6; i++) {
0319    Strip->cd(i+1);
0320    PullTrackangleProfiletib[i]->SetLineColor(2);
0321    newPullTrackangleProfiletib[i]->SetLineColor(4);
0322    newPullTrackangleProfiletib[i]->SetLineStyle(2);
0323    PullTrackangleProfiletib[i]->Draw();
0324    newPullTrackangleProfiletib[i]->Draw("sames");
0325    //    myPV->PVCompute(PullTrackangleProfiletib[i] , newPullTrackangleProfiletib[i] , te );
0326  }
0327  
0328  Strip->Print("PullTrackangleProfileTIBCompare.eps");
0329 
0330 
0331  rdir->GetObject("TIB/PullTrackwidthProfile_rphi_layer1tib",PullTrackwidthProfiletib[0]);
0332  rdir->GetObject("TIB/PullTrackwidthProfile_rphi_layer2tib",PullTrackwidthProfiletib[1]);
0333  rdir->GetObject("TIB/PullTrackwidthProfile_rphi_layer3tib",PullTrackwidthProfiletib[2]);
0334  rdir->GetObject("TIB/PullTrackwidthProfile_rphi_layer4tib",PullTrackwidthProfiletib[3]);
0335  rdir->GetObject("TIB/PullTrackwidthProfile_sas_layer1tib",PullTrackwidthProfiletib[4]);
0336  rdir->GetObject("TIB/PullTrackwidthProfile_sas_layer2tib",PullTrackwidthProfiletib[5]);
0337  sdir->GetObject("TIB/PullTrackwidthProfile_rphi_layer1tib",newPullTrackwidthProfiletib[0]);
0338  sdir->GetObject("TIB/PullTrackwidthProfile_rphi_layer2tib",newPullTrackwidthProfiletib[1]);
0339  sdir->GetObject("TIB/PullTrackwidthProfile_rphi_layer3tib",newPullTrackwidthProfiletib[2]);
0340  sdir->GetObject("TIB/PullTrackwidthProfile_rphi_layer4tib",newPullTrackwidthProfiletib[3]);
0341  sdir->GetObject("TIB/PullTrackwidthProfile_sas_layer1tib",newPullTrackwidthProfiletib[4]);
0342  sdir->GetObject("TIB/PullTrackwidthProfile_sas_layer2tib",newPullTrackwidthProfiletib[5]);
0343  
0344  Strip = new TCanvas("Strip","Strip",1000,1000);
0345  Strip->Divide(2,3);
0346  for (Int_t i=0; i<6; i++) {
0347    Strip->cd(i+1);
0348    PullTrackwidthProfiletib[i]->SetLineColor(2);
0349    newPullTrackwidthProfiletib[i]->SetLineColor(4);
0350    newPullTrackwidthProfiletib[i]->SetLineStyle(2);
0351    PullTrackwidthProfiletib[i]->Draw();
0352    newPullTrackwidthProfiletib[i]->Draw("sames");
0353    //    myPV->PVCompute(PullTrackwidthProfiletib[i] , newPullTrackwidthProfiletib[i] , te );
0354  }
0355  
0356  Strip->Print("PullTrackwidthProfileTIBCompare.eps");
0357 
0358 
0359  rdir->GetObject("TIB/PullTrackwidthProfile_Category1_rphi_layer1tib",PullTrackwidthProfileCategory1tib[0]);
0360  rdir->GetObject("TIB/PullTrackwidthProfile_Category1_rphi_layer2tib",PullTrackwidthProfileCategory1tib[1]);
0361  rdir->GetObject("TIB/PullTrackwidthProfile_Category1_rphi_layer3tib",PullTrackwidthProfileCategory1tib[2]);
0362  rdir->GetObject("TIB/PullTrackwidthProfile_Category1_rphi_layer4tib",PullTrackwidthProfileCategory1tib[3]);
0363  rdir->GetObject("TIB/PullTrackwidthProfile_Category1_sas_layer1tib",PullTrackwidthProfileCategory1tib[4]);
0364  rdir->GetObject("TIB/PullTrackwidthProfile_Category1_sas_layer2tib",PullTrackwidthProfileCategory1tib[5]);
0365  sdir->GetObject("TIB/PullTrackwidthProfile_Category1_rphi_layer1tib",newPullTrackwidthProfileCategory1tib[0]);
0366  sdir->GetObject("TIB/PullTrackwidthProfile_Category1_rphi_layer2tib",newPullTrackwidthProfileCategory1tib[1]);
0367  sdir->GetObject("TIB/PullTrackwidthProfile_Category1_rphi_layer3tib",newPullTrackwidthProfileCategory1tib[2]);
0368  sdir->GetObject("TIB/PullTrackwidthProfile_Category1_rphi_layer4tib",newPullTrackwidthProfileCategory1tib[3]);
0369  sdir->GetObject("TIB/PullTrackwidthProfile_Category1_sas_layer1tib",newPullTrackwidthProfileCategory1tib[4]);
0370  sdir->GetObject("TIB/PullTrackwidthProfile_Category1_sas_layer2tib",newPullTrackwidthProfileCategory1tib[5]);
0371  
0372  Strip = new TCanvas("Strip","Strip",1000,1000);
0373  Strip->Divide(2,3);
0374  for (Int_t i=0; i<6; i++) {
0375    Strip->cd(i+1);
0376    PullTrackwidthProfileCategory1tib[i]->SetLineColor(2);
0377    newPullTrackwidthProfileCategory1tib[i]->SetLineColor(4);
0378    newPullTrackwidthProfileCategory1tib[i]->SetLineStyle(2);
0379    PullTrackwidthProfileCategory1tib[i]->Draw();
0380    newPullTrackwidthProfileCategory1tib[i]->Draw("sames");
0381    //    myPV->PVCompute(PullTrackwidthProfileCategory1tib[i] , newPullTrackwidthProfileCategory1tib[i] , te );
0382  }
0383  
0384  Strip->Print("PullTrackwidthProfileCategory1TIBCompare.eps");
0385 
0386  rdir->GetObject("TIB/PullTrackwidthProfile_Category2_rphi_layer1tib",PullTrackwidthProfileCategory2tib[0]);
0387  rdir->GetObject("TIB/PullTrackwidthProfile_Category2_rphi_layer2tib",PullTrackwidthProfileCategory2tib[1]);
0388  rdir->GetObject("TIB/PullTrackwidthProfile_Category2_rphi_layer3tib",PullTrackwidthProfileCategory2tib[2]);
0389  rdir->GetObject("TIB/PullTrackwidthProfile_Category2_rphi_layer4tib",PullTrackwidthProfileCategory2tib[3]);
0390  rdir->GetObject("TIB/PullTrackwidthProfile_Category2_sas_layer1tib",PullTrackwidthProfileCategory2tib[4]);
0391  rdir->GetObject("TIB/PullTrackwidthProfile_Category2_sas_layer2tib",PullTrackwidthProfileCategory2tib[5]);
0392  sdir->GetObject("TIB/PullTrackwidthProfile_Category2_rphi_layer1tib",newPullTrackwidthProfileCategory2tib[0]);
0393  sdir->GetObject("TIB/PullTrackwidthProfile_Category2_rphi_layer2tib",newPullTrackwidthProfileCategory2tib[1]);
0394  sdir->GetObject("TIB/PullTrackwidthProfile_Category2_rphi_layer3tib",newPullTrackwidthProfileCategory2tib[2]);
0395  sdir->GetObject("TIB/PullTrackwidthProfile_Category2_rphi_layer4tib",newPullTrackwidthProfileCategory2tib[3]);
0396  sdir->GetObject("TIB/PullTrackwidthProfile_Category2_sas_layer1tib",newPullTrackwidthProfileCategory2tib[4]);
0397  sdir->GetObject("TIB/PullTrackwidthProfile_Category2_sas_layer2tib",newPullTrackwidthProfileCategory2tib[5]);
0398  
0399  Strip = new TCanvas("Strip","Strip",1000,1000);
0400  Strip->Divide(2,3);
0401  for (Int_t i=0; i<6; i++) {
0402    Strip->cd(i+1);
0403    PullTrackwidthProfileCategory2tib[i]->SetLineColor(2);
0404    newPullTrackwidthProfileCategory2tib[i]->SetLineColor(4);
0405    newPullTrackwidthProfileCategory2tib[i]->SetLineStyle(2);
0406    PullTrackwidthProfileCategory2tib[i]->Draw();
0407    newPullTrackwidthProfileCategory2tib[i]->Draw("sames");
0408    //    myPV->PVCompute(PullTrackwidthProfileCategory2tib[i] , newPullTrackwidthProfileCategory2tib[i] , te );
0409  }
0410  
0411  Strip->Print("PullTrackwidthProfileCategory2TIBCompare.eps");
0412 
0413  rdir->GetObject("TIB/PullTrackwidthProfile_Category3_rphi_layer1tib",PullTrackwidthProfileCategory3tib[0]);
0414  rdir->GetObject("TIB/PullTrackwidthProfile_Category3_rphi_layer2tib",PullTrackwidthProfileCategory3tib[1]);
0415  rdir->GetObject("TIB/PullTrackwidthProfile_Category3_rphi_layer3tib",PullTrackwidthProfileCategory3tib[2]);
0416  rdir->GetObject("TIB/PullTrackwidthProfile_Category3_rphi_layer4tib",PullTrackwidthProfileCategory3tib[3]);
0417  rdir->GetObject("TIB/PullTrackwidthProfile_Category3_sas_layer1tib",PullTrackwidthProfileCategory3tib[4]);
0418  rdir->GetObject("TIB/PullTrackwidthProfile_Category3_sas_layer2tib",PullTrackwidthProfileCategory3tib[5]);
0419  sdir->GetObject("TIB/PullTrackwidthProfile_Category3_rphi_layer1tib",newPullTrackwidthProfileCategory3tib[0]);
0420  sdir->GetObject("TIB/PullTrackwidthProfile_Category3_rphi_layer2tib",newPullTrackwidthProfileCategory3tib[1]);
0421  sdir->GetObject("TIB/PullTrackwidthProfile_Category3_rphi_layer3tib",newPullTrackwidthProfileCategory3tib[2]);
0422  sdir->GetObject("TIB/PullTrackwidthProfile_Category3_rphi_layer4tib",newPullTrackwidthProfileCategory3tib[3]);
0423  sdir->GetObject("TIB/PullTrackwidthProfile_Category3_sas_layer1tib",newPullTrackwidthProfileCategory3tib[4]);
0424  sdir->GetObject("TIB/PullTrackwidthProfile_Category3_sas_layer2tib",newPullTrackwidthProfileCategory3tib[5]);
0425  
0426  Strip = new TCanvas("Strip","Strip",1000,1000);
0427  Strip->Divide(2,3);
0428  for (Int_t i=0; i<6; i++) {
0429    Strip->cd(i+1);
0430    PullTrackwidthProfileCategory3tib[i]->SetLineColor(2);
0431    newPullTrackwidthProfileCategory3tib[i]->SetLineColor(4);
0432    newPullTrackwidthProfileCategory3tib[i]->SetLineStyle(2);
0433    PullTrackwidthProfileCategory3tib[i]->Draw();
0434    newPullTrackwidthProfileCategory3tib[i]->Draw("sames");
0435    //    myPV->PVCompute(PullTrackwidthProfileCategory3tib[i] , newPullTrackwidthProfileCategory3tib[i] , te );
0436  }
0437  
0438  Strip->Print("PullTrackwidthProfileCategory3TIBCompare.eps");
0439 
0440  rdir->GetObject("TIB/PullTrackwidthProfile_Category4_rphi_layer1tib",PullTrackwidthProfileCategory4tib[0]);
0441  rdir->GetObject("TIB/PullTrackwidthProfile_Category4_rphi_layer2tib",PullTrackwidthProfileCategory4tib[1]);
0442  rdir->GetObject("TIB/PullTrackwidthProfile_Category4_rphi_layer3tib",PullTrackwidthProfileCategory4tib[2]);
0443  rdir->GetObject("TIB/PullTrackwidthProfile_Category4_rphi_layer4tib",PullTrackwidthProfileCategory4tib[3]);
0444  rdir->GetObject("TIB/PullTrackwidthProfile_Category4_sas_layer1tib",PullTrackwidthProfileCategory4tib[4]);
0445  rdir->GetObject("TIB/PullTrackwidthProfile_Category4_sas_layer2tib",PullTrackwidthProfileCategory4tib[5]);
0446  sdir->GetObject("TIB/PullTrackwidthProfile_Category4_rphi_layer1tib",newPullTrackwidthProfileCategory4tib[0]);
0447  sdir->GetObject("TIB/PullTrackwidthProfile_Category4_rphi_layer2tib",newPullTrackwidthProfileCategory4tib[1]);
0448  sdir->GetObject("TIB/PullTrackwidthProfile_Category4_rphi_layer3tib",newPullTrackwidthProfileCategory4tib[2]);
0449  sdir->GetObject("TIB/PullTrackwidthProfile_Category4_rphi_layer4tib",newPullTrackwidthProfileCategory4tib[3]);
0450  sdir->GetObject("TIB/PullTrackwidthProfile_Category4_sas_layer1tib",newPullTrackwidthProfileCategory4tib[4]);
0451  sdir->GetObject("TIB/PullTrackwidthProfile_Category4_sas_layer2tib",newPullTrackwidthProfileCategory4tib[5]);
0452  
0453  Strip = new TCanvas("Strip","Strip",1000,1000);
0454  Strip->Divide(2,3);
0455  for (Int_t i=0; i<6; i++) {
0456    Strip->cd(i+1);
0457    PullTrackwidthProfileCategory4tib[i]->SetLineColor(2);
0458    newPullTrackwidthProfileCategory4tib[i]->SetLineColor(4);
0459    newPullTrackwidthProfileCategory4tib[i]->SetLineStyle(2);
0460    PullTrackwidthProfileCategory4tib[i]->Draw();
0461    newPullTrackwidthProfileCategory4tib[i]->Draw("sames");
0462    //    myPV->PVCompute(PullTrackwidthProfileCategory4tib[i] , newPullTrackwidthProfileCategory4tib[i] , te );
0463  }
0464  
0465  Strip->Print("PullTrackwidthProfileCategory4TIBCompare.eps");
0466  */
0467 
0468  rdir->GetObject("TIB/Nstp_rphi_layer1tib",refplotsTIB[0]);
0469  rdir->GetObject("TIB/Nstp_rphi_layer2tib",refplotsTIB[1]);
0470  rdir->GetObject("TIB/Nstp_rphi_layer3tib",refplotsTIB[2]);
0471  rdir->GetObject("TIB/Nstp_rphi_layer4tib",refplotsTIB[3]);
0472  rdir->GetObject("TIB/Nstp_sas_layer1tib",refplotsTIB[4]);
0473  rdir->GetObject("TIB/Nstp_sas_layer2tib",refplotsTIB[5]);
0474  sdir->GetObject("TIB/Nstp_rphi_layer1tib",newplotsTIB[0]);
0475  sdir->GetObject("TIB/Nstp_rphi_layer2tib",newplotsTIB[1]);
0476  sdir->GetObject("TIB/Nstp_rphi_layer3tib",newplotsTIB[2]);
0477  sdir->GetObject("TIB/Nstp_rphi_layer4tib",newplotsTIB[3]);
0478  sdir->GetObject("TIB/Nstp_sas_layer1tib",newplotsTIB[4]);
0479  sdir->GetObject("TIB/Nstp_sas_layer2tib",newplotsTIB[5]);
0480 
0481  Strip = new TCanvas("Strip","Strip",1000,1000);
0482  Strip->Divide(2,3);
0483  for (Int_t i=0; i<6; i++) {
0484    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0485    Strip->cd(i+1);
0486    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0487    refplotsTIB[i]->Draw();
0488    newplotsTIB[i]->Draw("sames");
0489    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0490  }
0491  
0492  Strip->Print("NstpTIBCompare.eps");
0493  Strip->Print("NstpTIBCompare.gif");
0494 
0495  rdir->GetObject("TIB/Posx_rphi_layer1tib",refplotsTIB[0]);
0496  rdir->GetObject("TIB/Posx_rphi_layer2tib",refplotsTIB[1]);
0497  rdir->GetObject("TIB/Posx_rphi_layer3tib",refplotsTIB[2]);
0498  rdir->GetObject("TIB/Posx_rphi_layer4tib",refplotsTIB[3]);
0499  rdir->GetObject("TIB/Posx_sas_layer1tib",refplotsTIB[4]);
0500  rdir->GetObject("TIB/Posx_sas_layer2tib",refplotsTIB[5]);
0501  sdir->GetObject("TIB/Posx_rphi_layer1tib",newplotsTIB[0]);
0502  sdir->GetObject("TIB/Posx_rphi_layer2tib",newplotsTIB[1]);
0503  sdir->GetObject("TIB/Posx_rphi_layer3tib",newplotsTIB[2]);
0504  sdir->GetObject("TIB/Posx_rphi_layer4tib",newplotsTIB[3]);
0505  sdir->GetObject("TIB/Posx_sas_layer1tib",newplotsTIB[4]);
0506  sdir->GetObject("TIB/Posx_sas_layer2tib",newplotsTIB[5]);
0507 
0508  Strip = new TCanvas("Strip","Strip",1000,1000);
0509  Strip->Divide(2,3);
0510  for (Int_t i=0; i<6; i++) {
0511    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0512    Strip->cd(i+1);
0513    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0514    refplotsTIB[i]->Draw();
0515    newplotsTIB[i]->Draw("sames");
0516    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0517  }
0518   
0519  Strip->Print("PosTIBCompare.eps");
0520  Strip->Print("PosTIBCompare.gif");
0521   
0522 
0523  rdir->GetObject("TIB/Errx_LF_rphi_layer1tib",refplotsTIB[0]);
0524  rdir->GetObject("TIB/Errx_LF_rphi_layer2tib",refplotsTIB[1]);
0525  rdir->GetObject("TIB/Errx_LF_rphi_layer3tib",refplotsTIB[2]);
0526  rdir->GetObject("TIB/Errx_LF_rphi_layer4tib",refplotsTIB[3]);
0527  rdir->GetObject("TIB/Errx_LF_sas_layer1tib",refplotsTIB[4]);
0528  rdir->GetObject("TIB/Errx_LF_sas_layer2tib",refplotsTIB[5]);
0529  sdir->GetObject("TIB/Errx_LF_rphi_layer1tib",newplotsTIB[0]);
0530  sdir->GetObject("TIB/Errx_LF_rphi_layer2tib",newplotsTIB[1]);
0531  sdir->GetObject("TIB/Errx_LF_rphi_layer3tib",newplotsTIB[2]);
0532  sdir->GetObject("TIB/Errx_LF_rphi_layer4tib",newplotsTIB[3]);
0533  sdir->GetObject("TIB/Errx_LF_sas_layer1tib",newplotsTIB[4]);
0534  sdir->GetObject("TIB/Errx_LF_sas_layer2tib",newplotsTIB[5]);
0535 
0536  Strip = new TCanvas("Strip","Strip",1000,1000);
0537  Strip->Divide(2,3);
0538  for (Int_t i=0; i<6; i++) {
0539    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0540    Strip->cd(i+1);
0541    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0542    refplotsTIB[i]->Draw();
0543    newplotsTIB[i]->Draw("sames");
0544    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0545  }
0546   
0547  Strip->Print("ErrxLFTIBCompare.eps");
0548  Strip->Print("ErrxLFTIBCompare.gif");
0549   
0550  
0551  rdir->GetObject("TIB/Errx_MF_rphi_layer1tib",refplotsTIB[0]);
0552  rdir->GetObject("TIB/Errx_MF_rphi_layer2tib",refplotsTIB[1]);
0553  rdir->GetObject("TIB/Errx_MF_rphi_layer3tib",refplotsTIB[2]);
0554  rdir->GetObject("TIB/Errx_MF_rphi_layer4tib",refplotsTIB[3]);
0555  rdir->GetObject("TIB/Errx_MF_sas_layer1tib",refplotsTIB[4]);
0556  rdir->GetObject("TIB/Errx_MF_sas_layer2tib",refplotsTIB[5]);
0557  sdir->GetObject("TIB/Errx_MF_rphi_layer1tib",newplotsTIB[0]);
0558  sdir->GetObject("TIB/Errx_MF_rphi_layer2tib",newplotsTIB[1]);
0559  sdir->GetObject("TIB/Errx_MF_rphi_layer3tib",newplotsTIB[2]);
0560  sdir->GetObject("TIB/Errx_MF_rphi_layer4tib",newplotsTIB[3]);
0561  sdir->GetObject("TIB/Errx_MF_sas_layer1tib",newplotsTIB[4]);
0562  sdir->GetObject("TIB/Errx_MF_sas_layer2tib",newplotsTIB[5]);
0563 
0564  Strip = new TCanvas("Strip","Strip",1000,1000);
0565  Strip->Divide(2,3);
0566  for (Int_t i=0; i<6; i++) {
0567    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0568    Strip->cd(i+1);
0569    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0570    refplotsTIB[i]->Draw();
0571    newplotsTIB[i]->Draw("sames");
0572    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0573  }
0574  Strip->Print("ErrxMFTIBCompare.eps");
0575  Strip->Print("ErrxMFTIBCompare.gif");
0576 
0577  rdir->GetObject("TIB/Res_LF_rphi_layer1tib",refplotsTIB[0]);
0578  rdir->GetObject("TIB/Res_LF_rphi_layer2tib",refplotsTIB[1]);
0579  rdir->GetObject("TIB/Res_LF_rphi_layer3tib",refplotsTIB[2]);
0580  rdir->GetObject("TIB/Res_LF_rphi_layer4tib",refplotsTIB[3]);
0581  rdir->GetObject("TIB/Res_LF_sas_layer1tib",refplotsTIB[4]);
0582  rdir->GetObject("TIB/Res_LF_sas_layer2tib",refplotsTIB[5]);
0583  sdir->GetObject("TIB/Res_LF_rphi_layer1tib",newplotsTIB[0]);
0584  sdir->GetObject("TIB/Res_LF_rphi_layer2tib",newplotsTIB[1]);
0585  sdir->GetObject("TIB/Res_LF_rphi_layer3tib",newplotsTIB[2]);
0586  sdir->GetObject("TIB/Res_LF_rphi_layer4tib",newplotsTIB[3]);
0587  sdir->GetObject("TIB/Res_LF_sas_layer1tib",newplotsTIB[4]);
0588  sdir->GetObject("TIB/Res_LF_sas_layer2tib",newplotsTIB[5]);
0589 
0590  Strip = new TCanvas("Strip","Strip",1000,1000);
0591  Strip->Divide(2,3);
0592  for (Int_t i=0; i<6; i++) {
0593    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0594    Strip->cd(i+1);
0595    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0596    refplotsTIB[i]->Draw();
0597    newplotsTIB[i]->Draw("sames");
0598    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0599  }
0600   
0601  Strip->Print("ResLFTIBCompare.eps");
0602  Strip->Print("ResLFTIBCompare.gif");
0603 
0604 
0605  rdir->GetObject("TIB/Res_MF_rphi_layer1tib",refplotsTIB[0]);
0606  rdir->GetObject("TIB/Res_MF_rphi_layer2tib",refplotsTIB[1]);
0607  rdir->GetObject("TIB/Res_MF_rphi_layer3tib",refplotsTIB[2]);
0608  rdir->GetObject("TIB/Res_MF_rphi_layer4tib",refplotsTIB[3]);
0609  rdir->GetObject("TIB/Res_MF_sas_layer1tib",refplotsTIB[4]);
0610  rdir->GetObject("TIB/Res_MF_sas_layer2tib",refplotsTIB[5]);
0611  sdir->GetObject("TIB/Res_MF_rphi_layer1tib",newplotsTIB[0]);
0612  sdir->GetObject("TIB/Res_MF_rphi_layer2tib",newplotsTIB[1]);
0613  sdir->GetObject("TIB/Res_MF_rphi_layer3tib",newplotsTIB[2]);
0614  sdir->GetObject("TIB/Res_MF_rphi_layer4tib",newplotsTIB[3]);
0615  sdir->GetObject("TIB/Res_MF_sas_layer1tib",newplotsTIB[4]);
0616  sdir->GetObject("TIB/Res_MF_sas_layer2tib",newplotsTIB[5]);
0617 
0618  Strip = new TCanvas("Strip","Strip",1000,1000);
0619  Strip->Divide(2,3);
0620  for (Int_t i=0; i<6; i++) {
0621    if (refplotsTIB[i]->GetEntries() == 0 || newplotsTIB[i]->GetEntries() == 0) continue;
0622    Strip->cd(i+1);
0623    SetUpHistograms(refplotsTIB[i],newplotsTIB[i]);
0624    refplotsTIB[i]->Draw();
0625    newplotsTIB[i]->Draw("sames");
0626    myPV->PVCompute(refplotsTIB[i] , newplotsTIB[i] , te );
0627  }
0628   
0629  Strip->Print("ResMFTIBCompare.eps");
0630  Strip->Print("ResMFTIBCompare.gif");
0631 
0632 
0633   /*
0634  rdir->GetObject("TIB/Chi2_rphi_layer1tib",chi2tib[0]);
0635  rdir->GetObject("TIB/Chi2_rphi_layer2tib",chi2tib[1]);
0636  rdir->GetObject("TIB/Chi2_rphi_layer3tib",chi2tib[2]);
0637  rdir->GetObject("TIB/Chi2_rphi_layer4tib",chi2tib[3]);
0638  rdir->GetObject("TIB/Chi2_sas_layer1tib",chi2tib[4]);
0639  rdir->GetObject("TIB/Chi2_sas_layer2tib",chi2tib[5]);
0640  sdir->GetObject("TIB/Chi2_rphi_layer1tib",newchi2tib[0]);
0641  sdir->GetObject("TIB/Chi2_rphi_layer2tib",newchi2tib[1]);
0642  sdir->GetObject("TIB/Chi2_rphi_layer3tib",newchi2tib[2]);
0643  sdir->GetObject("TIB/Chi2_rphi_layer4tib",newchi2tib[3]);
0644  sdir->GetObject("TIB/Chi2_sas_layer1tib",newchi2tib[4]);
0645  sdir->GetObject("TIB/Chi2_sas_layer2tib",newchi2tib[5]);
0646 
0647   Strip = new TCanvas("Strip","Strip",1000,1000);
0648   Strip->Divide(2,3);
0649   for (Int_t i=0; i<6; i++) {
0650     Strip->cd(i+1);
0651     chi2tib[i]->SetLineColor(2);
0652    refplotsTIB[i]->Add( refplotsTIB[i],refplotsTIB[i], 1/(refplotsTIB[i]->GetEntries()),0.);
0653     newchi2tib[i]->SetLineColor(4);
0654    newplotsTIB[i]->Add( newplotsTIB[i],newplotsTIB[i], 1/(newplotsTIB[i]->GetEntries()),0.);
0655     newchi2tib[i]->SetLineStyle(2);
0656     chi2tib[i]->Draw();
0657     newchi2tib[i]->Draw("sames");
0658     myPV->PVCompute(chi2tib[i] , newchi2tib[i] , te );
0659   }
0660   
0661   Strip->Print("Chi2TIBCompare.eps");
0662   */
0663   
0664  rdir->GetObject("TIB/Posx_matched_layer1tib",matchedtib[0]);
0665  rdir->GetObject("TIB/Posy_matched_layer1tib",matchedtib[1]);
0666  rdir->GetObject("TIB/Posx_matched_layer2tib",matchedtib[2]);
0667  rdir->GetObject("TIB/Posy_matched_layer2tib",matchedtib[3]);
0668  rdir->GetObject("TIB/Errx_matched_layer1tib",matchedtib[4]);
0669  rdir->GetObject("TIB/Erry_matched_layer1tib",matchedtib[5]);
0670  rdir->GetObject("TIB/Errx_matched_layer2tib",matchedtib[6]);
0671  rdir->GetObject("TIB/Erry_matched_layer2tib",matchedtib[7]);
0672  rdir->GetObject("TIB/Resx_matched_layer1tib",matchedtib[8]);
0673  rdir->GetObject("TIB/Resy_matched_layer1tib",matchedtib[9]);
0674  rdir->GetObject("TIB/Resx_matched_layer2tib",matchedtib[10]);
0675  rdir->GetObject("TIB/Resy_matched_layer2tib",matchedtib[11]);
0676  rdir->GetObject("TIB/Pullx_matched_layer1tib",matchedtib[12]);
0677  rdir->GetObject("TIB/Pully_matched_layer1tib",matchedtib[13]);
0678  rdir->GetObject("TIB/Pullx_matched_layer2tib",matchedtib[14]);
0679  rdir->GetObject("TIB/Pully_matched_layer2tib",matchedtib[15]);
0680  sdir->GetObject("TIB/Posx_matched_layer1tib",newmatchedtib[0]);
0681  sdir->GetObject("TIB/Posy_matched_layer1tib",newmatchedtib[1]);
0682  sdir->GetObject("TIB/Posx_matched_layer2tib",newmatchedtib[2]);
0683  sdir->GetObject("TIB/Posy_matched_layer2tib",newmatchedtib[3]);
0684  sdir->GetObject("TIB/Errx_matched_layer1tib",newmatchedtib[4]);
0685  sdir->GetObject("TIB/Erry_matched_layer1tib",newmatchedtib[5]);
0686  sdir->GetObject("TIB/Errx_matched_layer2tib",newmatchedtib[6]);
0687  sdir->GetObject("TIB/Erry_matched_layer2tib",newmatchedtib[7]);
0688  sdir->GetObject("TIB/Resx_matched_layer1tib",newmatchedtib[8]);
0689  sdir->GetObject("TIB/Resy_matched_layer1tib",newmatchedtib[9]);
0690  sdir->GetObject("TIB/Resx_matched_layer2tib",newmatchedtib[10]);
0691  sdir->GetObject("TIB/Resy_matched_layer2tib",newmatchedtib[11]);
0692  sdir->GetObject("TIB/Pullx_matched_layer1tib",newmatchedtib[12]);
0693  sdir->GetObject("TIB/Pully_matched_layer1tib",newmatchedtib[13]);
0694  sdir->GetObject("TIB/Pullx_matched_layer2tib",newmatchedtib[14]);
0695  sdir->GetObject("TIB/Pully_matched_layer2tib",newmatchedtib[15]);
0696 
0697  Strip = new TCanvas("Strip","Strip",1000,1000);
0698  Strip->Divide(4,4);
0699  for (Int_t i=0; i<16; i++) {
0700    if (matchedtib[i]->GetEntries() == 0 || newmatchedtib[i]->GetEntries() == 0) continue;
0701    Strip->cd(i+1);
0702    SetUpHistograms(matchedtib[i],newmatchedtib[i]);
0703    matchedtib[i]->Draw();
0704    newmatchedtib[i]->Draw("sames");
0705    myPV->PVCompute(matchedtib[i] , newmatchedtib[i] , te );
0706  }
0707  
0708  Strip->Print("MatchedTIBCompare.eps");
0709  Strip->Print("MatchedTIBCompare.gif");
0710 
0711  
0712  //======================================================================================================
0713 // TOB
0714 
0715  TH1F* refplotsTOB[8];
0716  TH1F* newplotsTOB[8];
0717 
0718  TProfile* PullTrackangleProfiletob[8];
0719  TProfile* PullTrackwidthProfiletob[8];
0720  TProfile* PullTrackwidthProfileCategory1tob[8];
0721  TProfile* PullTrackwidthProfileCategory2tob[8];
0722  TProfile* PullTrackwidthProfileCategory3tob[8];
0723  TProfile* PullTrackwidthProfileCategory4tob[8];
0724  TH1F* matchedtob[16];
0725  TProfile* newPullTrackangleProfiletob[8];
0726  TProfile* newPullTrackwidthProfiletob[8];
0727  TProfile* newPullTrackwidthProfileCategory1tob[8];
0728  TProfile* newPullTrackwidthProfileCategory2tob[8];
0729  TProfile* newPullTrackwidthProfileCategory3tob[8];
0730  TProfile* newPullTrackwidthProfileCategory4tob[8];
0731  TH1F* newmatchedtob[16];
0732  
0733  rdir->GetObject("TOB/Adc_rphi_layer1tob",refplotsTOB[0]);
0734  rdir->GetObject("TOB/Adc_rphi_layer2tob",refplotsTOB[1]);
0735  rdir->GetObject("TOB/Adc_rphi_layer3tob",refplotsTOB[2]);
0736  rdir->GetObject("TOB/Adc_rphi_layer4tob",refplotsTOB[3]);
0737  rdir->GetObject("TOB/Adc_rphi_layer5tob",refplotsTOB[4]);
0738  rdir->GetObject("TOB/Adc_rphi_layer6tob",refplotsTOB[5]);
0739  rdir->GetObject("TOB/Adc_sas_layer1tob",refplotsTOB[6]);
0740  rdir->GetObject("TOB/Adc_sas_layer2tob",refplotsTOB[7]);
0741  sdir->GetObject("TOB/Adc_rphi_layer1tob",newplotsTOB[0]);
0742  sdir->GetObject("TOB/Adc_rphi_layer2tob",newplotsTOB[1]);
0743  sdir->GetObject("TOB/Adc_rphi_layer3tob",newplotsTOB[2]);
0744  sdir->GetObject("TOB/Adc_rphi_layer4tob",newplotsTOB[3]);
0745  sdir->GetObject("TOB/Adc_rphi_layer5tob",newplotsTOB[4]);
0746  sdir->GetObject("TOB/Adc_rphi_layer6tob",newplotsTOB[5]);
0747  sdir->GetObject("TOB/Adc_sas_layer1tob",newplotsTOB[6]);
0748  sdir->GetObject("TOB/Adc_sas_layer2tob",newplotsTOB[7]);
0749  
0750  Strip = new TCanvas("Strip","Strip",1000,1000);
0751  Strip->Divide(3,3);
0752  for (Int_t i=0; i<8; i++) {
0753    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
0754    Strip->cd(i+1);
0755    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
0756    refplotsTOB[i]->Draw();
0757    newplotsTOB[i]->Draw("sames");
0758    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
0759  }
0760  
0761  Strip->Print("AdcTOBCompare.eps");
0762  Strip->Print("AdcTOBCompare.gif");
0763  
0764  rdir->GetObject("TOB/Pull_LF_rphi_layer1tob",refplotsTOB[0]);
0765  rdir->GetObject("TOB/Pull_LF_rphi_layer2tob",refplotsTOB[1]);
0766  rdir->GetObject("TOB/Pull_LF_rphi_layer3tob",refplotsTOB[2]);
0767  rdir->GetObject("TOB/Pull_LF_rphi_layer4tob",refplotsTOB[3]);
0768  rdir->GetObject("TOB/Pull_LF_rphi_layer5tob",refplotsTOB[4]);
0769  rdir->GetObject("TOB/Pull_LF_rphi_layer6tob",refplotsTOB[5]);
0770  rdir->GetObject("TOB/Pull_LF_sas_layer1tob",refplotsTOB[6]);
0771  rdir->GetObject("TOB/Pull_LF_sas_layer2tob",refplotsTOB[7]);
0772  sdir->GetObject("TOB/Pull_LF_rphi_layer1tob",newplotsTOB[0]);
0773  sdir->GetObject("TOB/Pull_LF_rphi_layer2tob",newplotsTOB[1]);
0774  sdir->GetObject("TOB/Pull_LF_rphi_layer3tob",newplotsTOB[2]);
0775  sdir->GetObject("TOB/Pull_LF_rphi_layer4tob",newplotsTOB[3]);
0776  sdir->GetObject("TOB/Pull_LF_rphi_layer5tob",newplotsTOB[4]);
0777  sdir->GetObject("TOB/Pull_LF_rphi_layer6tob",newplotsTOB[5]);
0778  sdir->GetObject("TOB/Pull_LF_sas_layer1tob",newplotsTOB[6]);
0779  sdir->GetObject("TOB/Pull_LF_sas_layer2tob",newplotsTOB[7]);
0780  
0781  Strip = new TCanvas("Strip","Strip",1000,1000);
0782  Strip->Divide(3,3);
0783  for (Int_t i=0; i<8; i++) {
0784    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
0785    Strip->cd(i+1);
0786    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
0787    refplotsTOB[i]->Draw();
0788    newplotsTOB[i]->Draw("sames");
0789    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
0790  }
0791  
0792  Strip->Print("PullLFTOBCompare.eps");
0793  Strip->Print("PullLFTOBCompare.gif");
0794 
0795  rdir->GetObject("TOB/Pull_MF_rphi_layer1tob",refplotsTOB[0]);
0796  rdir->GetObject("TOB/Pull_MF_rphi_layer2tob",refplotsTOB[1]);
0797  rdir->GetObject("TOB/Pull_MF_rphi_layer3tob",refplotsTOB[2]);
0798  rdir->GetObject("TOB/Pull_MF_rphi_layer4tob",refplotsTOB[3]);
0799  rdir->GetObject("TOB/Pull_MF_rphi_layer5tob",refplotsTOB[4]);
0800  rdir->GetObject("TOB/Pull_MF_rphi_layer6tob",refplotsTOB[5]);
0801  rdir->GetObject("TOB/Pull_MF_sas_layer1tob",refplotsTOB[6]);
0802  rdir->GetObject("TOB/Pull_MF_sas_layer2tob",refplotsTOB[7]);
0803  sdir->GetObject("TOB/Pull_MF_rphi_layer1tob",newplotsTOB[0]);
0804  sdir->GetObject("TOB/Pull_MF_rphi_layer2tob",newplotsTOB[1]);
0805  sdir->GetObject("TOB/Pull_MF_rphi_layer3tob",newplotsTOB[2]);
0806  sdir->GetObject("TOB/Pull_MF_rphi_layer4tob",newplotsTOB[3]);
0807  sdir->GetObject("TOB/Pull_MF_rphi_layer5tob",newplotsTOB[4]);
0808  sdir->GetObject("TOB/Pull_MF_rphi_layer6tob",newplotsTOB[5]);
0809  sdir->GetObject("TOB/Pull_MF_sas_layer1tob",newplotsTOB[6]);
0810  sdir->GetObject("TOB/Pull_MF_sas_layer2tob",newplotsTOB[7]);
0811  
0812  Strip = new TCanvas("Strip","Strip",1000,1000);
0813  Strip->Divide(3,3);
0814  for (Int_t i=0; i<8; i++) {
0815    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
0816    Strip->cd(i+1);
0817    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
0818    refplotsTOB[i]->Draw();
0819    newplotsTOB[i]->Draw("sames");
0820    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
0821  }
0822  
0823  Strip->Print("PullMFTOBCompare.eps");
0824  Strip->Print("PullMFTOBCompare.gif");
0825 
0826  rdir->GetObject("TOB/Trackangle_rphi_layer1tob",refplotsTOB[0]);
0827  rdir->GetObject("TOB/Trackangle_rphi_layer2tob",refplotsTOB[1]);
0828  rdir->GetObject("TOB/Trackangle_rphi_layer3tob",refplotsTOB[2]);
0829  rdir->GetObject("TOB/Trackangle_rphi_layer4tob",refplotsTOB[3]);
0830  rdir->GetObject("TOB/Trackangle_rphi_layer5tob",refplotsTOB[4]);
0831  rdir->GetObject("TOB/Trackangle_rphi_layer6tob",refplotsTOB[5]);
0832  rdir->GetObject("TOB/Trackangle_sas_layer1tob",refplotsTOB[6]);
0833  rdir->GetObject("TOB/Trackangle_sas_layer2tob",refplotsTOB[7]);
0834  sdir->GetObject("TOB/Trackangle_rphi_layer1tob",newplotsTOB[0]);
0835  sdir->GetObject("TOB/Trackangle_rphi_layer2tob",newplotsTOB[1]);
0836  sdir->GetObject("TOB/Trackangle_rphi_layer3tob",newplotsTOB[2]);
0837  sdir->GetObject("TOB/Trackangle_rphi_layer4tob",newplotsTOB[3]);
0838  sdir->GetObject("TOB/Trackangle_rphi_layer5tob",newplotsTOB[4]);
0839  sdir->GetObject("TOB/Trackangle_rphi_layer6tob",newplotsTOB[5]);
0840  sdir->GetObject("TOB/Trackangle_sas_layer1tob",newplotsTOB[6]);
0841  sdir->GetObject("TOB/Trackangle_sas_layer2tob",newplotsTOB[7]);
0842  
0843  Strip = new TCanvas("Strip","Strip",1000,1000);
0844  Strip->Divide(3,3);
0845  for (Int_t i=0; i<8; i++) {
0846    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
0847    Strip->cd(i+1);
0848    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
0849    refplotsTOB[i]->Draw();
0850    newplotsTOB[i]->Draw("sames");
0851    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
0852  }
0853  
0854  Strip->Print("TrackangleTOBCompare.eps");
0855  Strip->Print("TrackangleTOBCompare.gif");
0856 
0857 
0858  rdir->GetObject("TOB/Trackwidth_rphi_layer1tob",refplotsTOB[0]);
0859  rdir->GetObject("TOB/Trackwidth_rphi_layer2tob",refplotsTOB[1]);
0860  rdir->GetObject("TOB/Trackwidth_rphi_layer3tob",refplotsTOB[2]);
0861  rdir->GetObject("TOB/Trackwidth_rphi_layer4tob",refplotsTOB[3]);
0862  rdir->GetObject("TOB/Trackwidth_rphi_layer5tob",refplotsTOB[4]);
0863  rdir->GetObject("TOB/Trackwidth_rphi_layer6tob",refplotsTOB[5]);
0864  rdir->GetObject("TOB/Trackwidth_sas_layer1tob",refplotsTOB[6]);
0865  rdir->GetObject("TOB/Trackwidth_sas_layer2tob",refplotsTOB[7]);
0866  sdir->GetObject("TOB/Trackwidth_rphi_layer1tob",newplotsTOB[0]);
0867  sdir->GetObject("TOB/Trackwidth_rphi_layer2tob",newplotsTOB[1]);
0868  sdir->GetObject("TOB/Trackwidth_rphi_layer3tob",newplotsTOB[2]);
0869  sdir->GetObject("TOB/Trackwidth_rphi_layer4tob",newplotsTOB[3]);
0870  sdir->GetObject("TOB/Trackwidth_rphi_layer5tob",newplotsTOB[4]);
0871  sdir->GetObject("TOB/Trackwidth_rphi_layer6tob",newplotsTOB[5]);
0872  sdir->GetObject("TOB/Trackwidth_sas_layer1tob",newplotsTOB[6]);
0873  sdir->GetObject("TOB/Trackwidth_sas_layer2tob",newplotsTOB[7]);
0874  
0875  Strip = new TCanvas("Strip","Strip",1000,1000);
0876  Strip->Divide(3,3);
0877  for (Int_t i=0; i<8; i++) {
0878    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
0879    Strip->cd(i+1);
0880    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
0881    refplotsTOB[i]->Draw();
0882    newplotsTOB[i]->Draw("sames");
0883    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
0884  }
0885  
0886  Strip->Print("TrackwidthTOBCompare.eps");
0887  Strip->Print("TrackwidthTOBCompare.gif");
0888 
0889 
0890  rdir->GetObject("TOB/Expectedwidth_rphi_layer1tob",refplotsTOB[0]);
0891  rdir->GetObject("TOB/Expectedwidth_rphi_layer2tob",refplotsTOB[1]);
0892  rdir->GetObject("TOB/Expectedwidth_rphi_layer3tob",refplotsTOB[2]);
0893  rdir->GetObject("TOB/Expectedwidth_rphi_layer4tob",refplotsTOB[3]);
0894  rdir->GetObject("TOB/Expectedwidth_rphi_layer5tob",refplotsTOB[4]);
0895  rdir->GetObject("TOB/Expectedwidth_rphi_layer6tob",refplotsTOB[5]);
0896  rdir->GetObject("TOB/Expectedwidth_sas_layer1tob",refplotsTOB[6]);
0897  rdir->GetObject("TOB/Expectedwidth_sas_layer2tob",refplotsTOB[7]);
0898  sdir->GetObject("TOB/Expectedwidth_rphi_layer1tob",newplotsTOB[0]);
0899  sdir->GetObject("TOB/Expectedwidth_rphi_layer2tob",newplotsTOB[1]);
0900  sdir->GetObject("TOB/Expectedwidth_rphi_layer3tob",newplotsTOB[2]);
0901  sdir->GetObject("TOB/Expectedwidth_rphi_layer4tob",newplotsTOB[3]);
0902  sdir->GetObject("TOB/Expectedwidth_rphi_layer5tob",newplotsTOB[4]);
0903  sdir->GetObject("TOB/Expectedwidth_rphi_layer6tob",newplotsTOB[5]);
0904  sdir->GetObject("TOB/Expectedwidth_sas_layer1tob",newplotsTOB[6]);
0905  sdir->GetObject("TOB/Expectedwidth_sas_layer2tob",newplotsTOB[7]);
0906  
0907  Strip = new TCanvas("Strip","Strip",1000,1000);
0908  Strip->Divide(3,3);
0909  for (Int_t i=0; i<8; i++) {
0910    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
0911    Strip->cd(i+1);
0912    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
0913    refplotsTOB[i]->Draw();
0914    newplotsTOB[i]->Draw("sames");
0915    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
0916  }
0917  
0918  Strip->Print("ExpectedwidthTOBCompare.eps");
0919  Strip->Print("ExpectedwidthTOBCompare.gif");
0920 
0921 
0922  rdir->GetObject("TOB/Category_rphi_layer1tob",refplotsTOB[0]);
0923  rdir->GetObject("TOB/Category_rphi_layer2tob",refplotsTOB[1]);
0924  rdir->GetObject("TOB/Category_rphi_layer3tob",refplotsTOB[2]);
0925  rdir->GetObject("TOB/Category_rphi_layer4tob",refplotsTOB[3]);
0926  rdir->GetObject("TOB/Category_rphi_layer5tob",refplotsTOB[4]);
0927  rdir->GetObject("TOB/Category_rphi_layer6tob",refplotsTOB[5]);
0928  rdir->GetObject("TOB/Category_sas_layer1tob",refplotsTOB[6]);
0929  rdir->GetObject("TOB/Category_sas_layer2tob",refplotsTOB[7]);
0930  sdir->GetObject("TOB/Category_rphi_layer1tob",newplotsTOB[0]);
0931  sdir->GetObject("TOB/Category_rphi_layer2tob",newplotsTOB[1]);
0932  sdir->GetObject("TOB/Category_rphi_layer3tob",newplotsTOB[2]);
0933  sdir->GetObject("TOB/Category_rphi_layer4tob",newplotsTOB[3]);
0934  sdir->GetObject("TOB/Category_rphi_layer5tob",newplotsTOB[4]);
0935  sdir->GetObject("TOB/Category_rphi_layer6tob",newplotsTOB[5]);
0936  sdir->GetObject("TOB/Category_sas_layer1tob",newplotsTOB[6]);
0937  sdir->GetObject("TOB/Category_sas_layer2tob",newplotsTOB[7]);
0938  
0939  Strip = new TCanvas("Strip","Strip",1000,1000);
0940  Strip->Divide(3,3);
0941  for (Int_t i=0; i<8; i++) {
0942    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
0943    Strip->cd(i+1);
0944    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
0945    refplotsTOB[i]->Draw();
0946    newplotsTOB[i]->Draw("sames");
0947    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
0948  }
0949  
0950  Strip->Print("CategoryTOBCompare.eps");
0951  Strip->Print("CategoryTOBCompare.gif");
0952 
0953 
0954  /*
0955  rdir->GetObject("TOB/PullTrackangleProfile_rphi_layer1tob",PullTrackangleProfiletob[0]);
0956  rdir->GetObject("TOB/PullTrackangleProfile_rphi_layer2tob",PullTrackangleProfiletob[1]);
0957  rdir->GetObject("TOB/PullTrackangleProfile_rphi_layer3tob",PullTrackangleProfiletob[2]);
0958  rdir->GetObject("TOB/PullTrackangleProfile_rphi_layer4tob",PullTrackangleProfiletob[3]);
0959  rdir->GetObject("TOB/PullTrackangleProfile_rphi_layer5tob",PullTrackangleProfiletob[4]);
0960  rdir->GetObject("TOB/PullTrackangleProfile_rphi_layer6tob",PullTrackangleProfiletob[5]);
0961  rdir->GetObject("TOB/PullTrackangleProfile_sas_layer1tob",PullTrackangleProfiletob[6]);
0962  rdir->GetObject("TOB/PullTrackangleProfile_sas_layer2tob",PullTrackangleProfiletob[7]);
0963  sdir->GetObject("TOB/PullTrackangleProfile_rphi_layer1tob",newPullTrackangleProfiletob[0]);
0964  sdir->GetObject("TOB/PullTrackangleProfile_rphi_layer2tob",newPullTrackangleProfiletob[1]);
0965  sdir->GetObject("TOB/PullTrackangleProfile_rphi_layer3tob",newPullTrackangleProfiletob[2]);
0966  sdir->GetObject("TOB/PullTrackangleProfile_rphi_layer4tob",newPullTrackangleProfiletob[3]);
0967  sdir->GetObject("TOB/PullTrackangleProfile_rphi_layer5tob",newPullTrackangleProfiletob[4]);
0968  sdir->GetObject("TOB/PullTrackangleProfile_rphi_layer6tob",newPullTrackangleProfiletob[5]);
0969  sdir->GetObject("TOB/PullTrackangleProfile_sas_layer1tob",newPullTrackangleProfiletob[6]);
0970  sdir->GetObject("TOB/PullTrackangleProfile_sas_layer2tob",newPullTrackangleProfiletob[7]);
0971  
0972  Strip = new TCanvas("Strip","Strip",1000,1000);
0973  Strip->Divide(3,3);
0974  for (Int_t i=0; i<8; i++) {
0975    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
0976    Strip->cd(i+1);
0977    PullTrackangleProfiletob[i]->SetLineColor(2);
0978    newPullTrackangleProfiletob[i]->SetLineColor(4);
0979     newPullTrackangleProfiletob[i]->SetLineStyle(2);
0980     PullTrackangleProfiletob[i]->Draw();
0981     newPullTrackangleProfiletob[i]->Draw("sames");
0982     //myPV->PVCompute(PullTrackangleProfiletob[i] , newPullTrackangleProfiletob[i] , te );
0983  }
0984  
0985  Strip->Print("PullTrackangleProfileTOBCompare.eps");
0986 
0987  rdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer1tob",PullTrackwidthProfiletob[0]);
0988  rdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer2tob",PullTrackwidthProfiletob[1]);
0989  rdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer3tob",PullTrackwidthProfiletob[2]);
0990  rdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer4tob",PullTrackwidthProfiletob[3]);
0991  rdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer5tob",PullTrackwidthProfiletob[4]);
0992  rdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer6tob",PullTrackwidthProfiletob[5]);
0993  rdir->GetObject("TOB/PullTrackwidthProfile_sas_layer1tob",PullTrackwidthProfiletob[6]);
0994  rdir->GetObject("TOB/PullTrackwidthProfile_sas_layer2tob",PullTrackwidthProfiletob[7]);
0995  sdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer1tob",newPullTrackwidthProfiletob[0]);
0996  sdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer2tob",newPullTrackwidthProfiletob[1]);
0997  sdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer3tob",newPullTrackwidthProfiletob[2]);
0998  sdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer4tob",newPullTrackwidthProfiletob[3]);
0999  sdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer5tob",newPullTrackwidthProfiletob[4]);
1000  sdir->GetObject("TOB/PullTrackwidthProfile_rphi_layer6tob",newPullTrackwidthProfiletob[5]);
1001  sdir->GetObject("TOB/PullTrackwidthProfile_sas_layer1tob",newPullTrackwidthProfiletob[6]);
1002  sdir->GetObject("TOB/PullTrackwidthProfile_sas_layer2tob",newPullTrackwidthProfiletob[7]);
1003  
1004  Strip = new TCanvas("Strip","Strip",1000,1000);
1005  Strip->Divide(3,3);
1006  for (Int_t i=0; i<8; i++) {
1007    Strip->cd(i+1);
1008    PullTrackwidthProfiletob[i]->SetLineColor(2);
1009    newPullTrackwidthProfiletob[i]->SetLineColor(4);
1010     newPullTrackwidthProfiletob[i]->SetLineStyle(2);
1011     PullTrackwidthProfiletob[i]->Draw();
1012     newPullTrackwidthProfiletob[i]->Draw("sames");
1013     //myPV->PVCompute(PullTrackwidthProfiletob[i] , newPullTrackwidthProfiletob[i] , te );
1014  }
1015  
1016  Strip->Print("PullTrackwidthProfileTOBCompare.eps");
1017 
1018  rdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer1tob",PullTrackwidthProfileCategory1tob[0]);
1019  rdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer2tob",PullTrackwidthProfileCategory1tob[1]);
1020  rdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer3tob",PullTrackwidthProfileCategory1tob[2]);
1021  rdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer4tob",PullTrackwidthProfileCategory1tob[3]);
1022  rdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer5tob",PullTrackwidthProfileCategory1tob[4]);
1023  rdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer6tob",PullTrackwidthProfileCategory1tob[5]);
1024  rdir->GetObject("TOB/PullTrackwidthProfile_Category1_sas_layer1tob",PullTrackwidthProfileCategory1tob[6]);
1025  rdir->GetObject("TOB/PullTrackwidthProfile_Category1_sas_layer2tob",PullTrackwidthProfileCategory1tob[7]);
1026  sdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer1tob",newPullTrackwidthProfileCategory1tob[0]);
1027  sdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer2tob",newPullTrackwidthProfileCategory1tob[1]);
1028  sdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer3tob",newPullTrackwidthProfileCategory1tob[2]);
1029  sdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer4tob",newPullTrackwidthProfileCategory1tob[3]);
1030  sdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer5tob",newPullTrackwidthProfileCategory1tob[4]);
1031  sdir->GetObject("TOB/PullTrackwidthProfile_Category1_rphi_layer6tob",newPullTrackwidthProfileCategory1tob[5]);
1032  sdir->GetObject("TOB/PullTrackwidthProfile_Category1_sas_layer1tob",newPullTrackwidthProfileCategory1tob[6]);
1033  sdir->GetObject("TOB/PullTrackwidthProfile_Category1_sas_layer2tob",newPullTrackwidthProfileCategory1tob[7]);
1034  
1035  Strip = new TCanvas("Strip","Strip",1000,1000);
1036  Strip->Divide(3,3);
1037  for (Int_t i=0; i<8; i++) {
1038    Strip->cd(i+1);
1039    PullTrackwidthProfileCategory1tob[i]->SetLineColor(2);
1040    newPullTrackwidthProfileCategory1tob[i]->SetLineColor(4);
1041     newPullTrackwidthProfileCategory1tob[i]->SetLineStyle(2);
1042     PullTrackwidthProfileCategory1tob[i]->Draw();
1043     newPullTrackwidthProfileCategory1tob[i]->Draw("sames");
1044     //myPV->PVCompute(PullTrackwidthProfiletob[i] , newPullTrackwidthProfiletob[i] , te );
1045  }
1046  
1047  Strip->Print("PullTrackwidthProfileCategory1TOBCompare.eps");
1048 
1049  rdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer1tob",PullTrackwidthProfileCategory2tob[0]);
1050  rdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer2tob",PullTrackwidthProfileCategory2tob[1]);
1051  rdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer3tob",PullTrackwidthProfileCategory2tob[2]);
1052  rdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer4tob",PullTrackwidthProfileCategory2tob[3]);
1053  rdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer5tob",PullTrackwidthProfileCategory2tob[4]);
1054  rdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer6tob",PullTrackwidthProfileCategory2tob[5]);
1055  rdir->GetObject("TOB/PullTrackwidthProfile_Category2_sas_layer1tob",PullTrackwidthProfileCategory2tob[6]);
1056  rdir->GetObject("TOB/PullTrackwidthProfile_Category2_sas_layer2tob",PullTrackwidthProfileCategory2tob[7]);
1057  sdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer1tob",newPullTrackwidthProfileCategory2tob[0]);
1058  sdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer2tob",newPullTrackwidthProfileCategory2tob[1]);
1059  sdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer3tob",newPullTrackwidthProfileCategory2tob[2]);
1060  sdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer4tob",newPullTrackwidthProfileCategory2tob[3]);
1061  sdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer5tob",newPullTrackwidthProfileCategory2tob[4]);
1062  sdir->GetObject("TOB/PullTrackwidthProfile_Category2_rphi_layer6tob",newPullTrackwidthProfileCategory2tob[5]);
1063  sdir->GetObject("TOB/PullTrackwidthProfile_Category2_sas_layer1tob",newPullTrackwidthProfileCategory2tob[6]);
1064  sdir->GetObject("TOB/PullTrackwidthProfile_Category2_sas_layer2tob",newPullTrackwidthProfileCategory2tob[7]);
1065  
1066  Strip = new TCanvas("Strip","Strip",1000,1000);
1067  Strip->Divide(3,3);
1068  for (Int_t i=0; i<8; i++) {
1069    Strip->cd(i+1);
1070    PullTrackwidthProfileCategory2tob[i]->SetLineColor(2);
1071    newPullTrackwidthProfileCategory2tob[i]->SetLineColor(4);
1072     newPullTrackwidthProfileCategory2tob[i]->SetLineStyle(2);
1073     PullTrackwidthProfileCategory2tob[i]->Draw();
1074     newPullTrackwidthProfileCategory2tob[i]->Draw("sames");
1075     //myPV->PVCompute(PullTrackwidthProfiletob[i] , newPullTrackwidthProfiletob[i] , te );
1076  }
1077  
1078  Strip->Print("PullTrackwidthProfileCategory2TOBCompare.eps");
1079 
1080  rdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer1tob",PullTrackwidthProfileCategory3tob[0]);
1081  rdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer2tob",PullTrackwidthProfileCategory3tob[1]);
1082  rdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer3tob",PullTrackwidthProfileCategory3tob[2]);
1083  rdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer4tob",PullTrackwidthProfileCategory3tob[3]);
1084  rdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer5tob",PullTrackwidthProfileCategory3tob[4]);
1085  rdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer6tob",PullTrackwidthProfileCategory3tob[5]);
1086  rdir->GetObject("TOB/PullTrackwidthProfile_Category3_sas_layer1tob",PullTrackwidthProfileCategory3tob[6]);
1087  rdir->GetObject("TOB/PullTrackwidthProfile_Category3_sas_layer2tob",PullTrackwidthProfileCategory3tob[7]);
1088  sdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer1tob",newPullTrackwidthProfileCategory3tob[0]);
1089  sdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer2tob",newPullTrackwidthProfileCategory3tob[1]);
1090  sdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer3tob",newPullTrackwidthProfileCategory3tob[2]);
1091  sdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer4tob",newPullTrackwidthProfileCategory3tob[3]);
1092  sdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer5tob",newPullTrackwidthProfileCategory3tob[4]);
1093  sdir->GetObject("TOB/PullTrackwidthProfile_Category3_rphi_layer6tob",newPullTrackwidthProfileCategory3tob[5]);
1094  sdir->GetObject("TOB/PullTrackwidthProfile_Category3_sas_layer1tob",newPullTrackwidthProfileCategory3tob[6]);
1095  sdir->GetObject("TOB/PullTrackwidthProfile_Category3_sas_layer2tob",newPullTrackwidthProfileCategory3tob[7]);
1096  
1097  Strip = new TCanvas("Strip","Strip",1000,1000);
1098  Strip->Divide(3,3);
1099  for (Int_t i=0; i<8; i++) {
1100    Strip->cd(i+1);
1101    PullTrackwidthProfileCategory3tob[i]->SetLineColor(2);
1102    newPullTrackwidthProfileCategory3tob[i]->SetLineColor(4);
1103     newPullTrackwidthProfileCategory3tob[i]->SetLineStyle(2);
1104     PullTrackwidthProfileCategory3tob[i]->Draw();
1105     newPullTrackwidthProfileCategory3tob[i]->Draw("sames");
1106     //myPV->PVCompute(PullTrackwidthProfiletob[i] , newPullTrackwidthProfiletob[i] , te );
1107  }
1108  
1109  Strip->Print("PullTrackwidthProfileCategory3TOBCompare.eps");
1110 
1111  rdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer1tob",PullTrackwidthProfileCategory4tob[0]);
1112  rdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer2tob",PullTrackwidthProfileCategory4tob[1]);
1113  rdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer3tob",PullTrackwidthProfileCategory4tob[2]);
1114  rdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer4tob",PullTrackwidthProfileCategory4tob[3]);
1115  rdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer5tob",PullTrackwidthProfileCategory4tob[4]);
1116  rdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer6tob",PullTrackwidthProfileCategory4tob[5]);
1117  rdir->GetObject("TOB/PullTrackwidthProfile_Category4_sas_layer1tob",PullTrackwidthProfileCategory4tob[6]);
1118  rdir->GetObject("TOB/PullTrackwidthProfile_Category4_sas_layer2tob",PullTrackwidthProfileCategory4tob[7]);
1119  sdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer1tob",newPullTrackwidthProfileCategory4tob[0]);
1120  sdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer2tob",newPullTrackwidthProfileCategory4tob[1]);
1121  sdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer3tob",newPullTrackwidthProfileCategory4tob[2]);
1122  sdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer4tob",newPullTrackwidthProfileCategory4tob[3]);
1123  sdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer5tob",newPullTrackwidthProfileCategory4tob[4]);
1124  sdir->GetObject("TOB/PullTrackwidthProfile_Category4_rphi_layer6tob",newPullTrackwidthProfileCategory4tob[5]);
1125  sdir->GetObject("TOB/PullTrackwidthProfile_Category4_sas_layer1tob",newPullTrackwidthProfileCategory4tob[6]);
1126  sdir->GetObject("TOB/PullTrackwidthProfile_Category4_sas_layer2tob",newPullTrackwidthProfileCategory4tob[7]);
1127  
1128  Strip = new TCanvas("Strip","Strip",1000,1000);
1129  Strip->Divide(3,3);
1130  for (Int_t i=0; i<8; i++) {
1131    Strip->cd(i+1);
1132    PullTrackwidthProfileCategory4tob[i]->SetLineColor(2);
1133    newPullTrackwidthProfileCategory4tob[i]->SetLineColor(4);
1134     newPullTrackwidthProfileCategory4tob[i]->SetLineStyle(2);
1135     PullTrackwidthProfileCategory4tob[i]->Draw();
1136     newPullTrackwidthProfileCategory4tob[i]->Draw("sames");
1137     //myPV->PVCompute(PullTrackwidthProfiletob[i] , newPullTrackwidthProfiletob[i] , te );
1138  }
1139  
1140  Strip->Print("PullTrackwidthProfileCategory4TOBCompare.eps");
1141  */
1142 
1143  rdir->GetObject("TOB/Nstp_rphi_layer1tob",refplotsTOB[0]);
1144  rdir->GetObject("TOB/Nstp_rphi_layer2tob",refplotsTOB[1]);
1145  rdir->GetObject("TOB/Nstp_rphi_layer3tob",refplotsTOB[2]);
1146  rdir->GetObject("TOB/Nstp_rphi_layer4tob",refplotsTOB[3]);
1147  rdir->GetObject("TOB/Nstp_rphi_layer5tob",refplotsTOB[4]);
1148  rdir->GetObject("TOB/Nstp_rphi_layer6tob",refplotsTOB[5]);
1149  rdir->GetObject("TOB/Nstp_sas_layer1tob",refplotsTOB[6]);
1150  rdir->GetObject("TOB/Nstp_sas_layer2tob",refplotsTOB[7]);
1151  sdir->GetObject("TOB/Nstp_rphi_layer1tob",newplotsTOB[0]);
1152  sdir->GetObject("TOB/Nstp_rphi_layer2tob",newplotsTOB[1]);
1153  sdir->GetObject("TOB/Nstp_rphi_layer3tob",newplotsTOB[2]);
1154  sdir->GetObject("TOB/Nstp_rphi_layer4tob",newplotsTOB[3]);
1155  sdir->GetObject("TOB/Nstp_rphi_layer5tob",newplotsTOB[4]);
1156  sdir->GetObject("TOB/Nstp_rphi_layer6tob",newplotsTOB[5]);
1157  sdir->GetObject("TOB/Nstp_sas_layer1tob",newplotsTOB[6]);
1158  sdir->GetObject("TOB/Nstp_sas_layer2tob",newplotsTOB[7]);
1159 
1160  Strip = new TCanvas("Strip","Strip",1000,1000);
1161  Strip->Divide(3,3);
1162  for (Int_t i=0; i<8; i++) {
1163    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
1164    Strip->cd(i+1);
1165    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
1166    refplotsTOB[i]->Draw();
1167    newplotsTOB[i]->Draw("sames");
1168    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
1169  }
1170  
1171  Strip->Print("NstpTOBCompare.eps");
1172  Strip->Print("NstpTOBCompare.gif");
1173 
1174  rdir->GetObject("TOB/Posx_rphi_layer1tob",refplotsTOB[0]);
1175  rdir->GetObject("TOB/Posx_rphi_layer2tob",refplotsTOB[1]);
1176  rdir->GetObject("TOB/Posx_rphi_layer3tob",refplotsTOB[2]);
1177  rdir->GetObject("TOB/Posx_rphi_layer4tob",refplotsTOB[3]);
1178  rdir->GetObject("TOB/Posx_rphi_layer5tob",refplotsTOB[4]);
1179  rdir->GetObject("TOB/Posx_rphi_layer6tob",refplotsTOB[5]);
1180  rdir->GetObject("TOB/Posx_sas_layer1tob",refplotsTOB[6]);
1181  rdir->GetObject("TOB/Posx_sas_layer2tob",refplotsTOB[7]);
1182  sdir->GetObject("TOB/Posx_rphi_layer1tob",newplotsTOB[0]);
1183  sdir->GetObject("TOB/Posx_rphi_layer2tob",newplotsTOB[1]);
1184  sdir->GetObject("TOB/Posx_rphi_layer3tob",newplotsTOB[2]);
1185  sdir->GetObject("TOB/Posx_rphi_layer4tob",newplotsTOB[3]);
1186  sdir->GetObject("TOB/Posx_rphi_layer5tob",newplotsTOB[4]);
1187  sdir->GetObject("TOB/Posx_rphi_layer6tob",newplotsTOB[5]);
1188  sdir->GetObject("TOB/Posx_sas_layer1tob",newplotsTOB[6]);
1189  sdir->GetObject("TOB/Posx_sas_layer2tob",newplotsTOB[7]);
1190 
1191  Strip = new TCanvas("Strip","Strip",1000,1000);
1192  Strip->Divide(3,3);
1193  for (Int_t i=0; i<8; i++) {
1194    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
1195    Strip->cd(i+1);
1196    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
1197    refplotsTOB[i]->Draw();
1198    newplotsTOB[i]->Draw("sames");
1199    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
1200  }
1201   
1202  Strip->Print("PosTOBCompare.eps");
1203  Strip->Print("PosTOBCompare.gif");
1204   
1205 
1206  rdir->GetObject("TOB/Errx_LF_rphi_layer1tob",refplotsTOB[0]);
1207  rdir->GetObject("TOB/Errx_LF_rphi_layer2tob",refplotsTOB[1]);
1208  rdir->GetObject("TOB/Errx_LF_rphi_layer3tob",refplotsTOB[2]);
1209  rdir->GetObject("TOB/Errx_LF_rphi_layer4tob",refplotsTOB[3]);
1210  rdir->GetObject("TOB/Errx_LF_rphi_layer5tob",refplotsTOB[4]);
1211  rdir->GetObject("TOB/Errx_LF_rphi_layer6tob",refplotsTOB[5]);
1212  rdir->GetObject("TOB/Errx_LF_sas_layer1tob",refplotsTOB[6]);
1213  rdir->GetObject("TOB/Errx_LF_sas_layer2tob",refplotsTOB[7]);
1214  sdir->GetObject("TOB/Errx_LF_rphi_layer1tob",newplotsTOB[0]);
1215  sdir->GetObject("TOB/Errx_LF_rphi_layer2tob",newplotsTOB[1]);
1216  sdir->GetObject("TOB/Errx_LF_rphi_layer3tob",newplotsTOB[2]);
1217  sdir->GetObject("TOB/Errx_LF_rphi_layer4tob",newplotsTOB[3]);
1218  sdir->GetObject("TOB/Errx_LF_rphi_layer5tob",newplotsTOB[4]);
1219  sdir->GetObject("TOB/Errx_LF_rphi_layer6tob",newplotsTOB[5]);
1220  sdir->GetObject("TOB/Errx_LF_sas_layer1tob",newplotsTOB[6]);
1221  sdir->GetObject("TOB/Errx_LF_sas_layer2tob",newplotsTOB[7]);
1222 
1223  Strip = new TCanvas("Strip","Strip",1000,1000);
1224  Strip->Divide(3,3);
1225  for (Int_t i=0; i<8; i++) {
1226    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
1227    Strip->cd(i+1);
1228    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
1229    refplotsTOB[i]->Draw();
1230    newplotsTOB[i]->Draw("sames");
1231    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
1232  }
1233  
1234  Strip->Print("ErrxLFTOBCompare.eps");
1235  Strip->Print("ErrxLFTOBCompare.gif");
1236   
1237  rdir->GetObject("TOB/Errx_MF_rphi_layer1tob",refplotsTOB[0]);
1238  rdir->GetObject("TOB/Errx_MF_rphi_layer2tob",refplotsTOB[1]);
1239  rdir->GetObject("TOB/Errx_MF_rphi_layer3tob",refplotsTOB[2]);
1240  rdir->GetObject("TOB/Errx_MF_rphi_layer4tob",refplotsTOB[3]);
1241  rdir->GetObject("TOB/Errx_MF_rphi_layer5tob",refplotsTOB[4]);
1242  rdir->GetObject("TOB/Errx_MF_rphi_layer6tob",refplotsTOB[5]);
1243  rdir->GetObject("TOB/Errx_MF_sas_layer1tob",refplotsTOB[6]);
1244  rdir->GetObject("TOB/Errx_MF_sas_layer2tob",refplotsTOB[7]);
1245  sdir->GetObject("TOB/Errx_MF_rphi_layer1tob",newplotsTOB[0]);
1246  sdir->GetObject("TOB/Errx_MF_rphi_layer2tob",newplotsTOB[1]);
1247  sdir->GetObject("TOB/Errx_MF_rphi_layer3tob",newplotsTOB[2]);
1248  sdir->GetObject("TOB/Errx_MF_rphi_layer4tob",newplotsTOB[3]);
1249  sdir->GetObject("TOB/Errx_MF_rphi_layer5tob",newplotsTOB[4]);
1250  sdir->GetObject("TOB/Errx_MF_rphi_layer6tob",newplotsTOB[5]);
1251  sdir->GetObject("TOB/Errx_MF_sas_layer1tob",newplotsTOB[6]);
1252  sdir->GetObject("TOB/Errx_MF_sas_layer2tob",newplotsTOB[7]);
1253 
1254  Strip = new TCanvas("Strip","Strip",1000,1000);
1255  Strip->Divide(3,3);
1256  for (Int_t i=0; i<8; i++) {
1257    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
1258    Strip->cd(i+1);
1259    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
1260    refplotsTOB[i]->Draw();
1261    newplotsTOB[i]->Draw("sames");
1262    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
1263  }
1264   
1265  Strip->Print("ErrxMFTOBCompare.eps");
1266  Strip->Print("ErrxMFTOBCompare.gif");
1267   
1268  
1269  rdir->GetObject("TOB/Res_LF_rphi_layer1tob",refplotsTOB[0]);
1270  rdir->GetObject("TOB/Res_LF_rphi_layer2tob",refplotsTOB[1]);
1271  rdir->GetObject("TOB/Res_LF_rphi_layer3tob",refplotsTOB[2]);
1272  rdir->GetObject("TOB/Res_LF_rphi_layer4tob",refplotsTOB[3]);
1273  rdir->GetObject("TOB/Res_LF_rphi_layer5tob",refplotsTOB[4]);
1274  rdir->GetObject("TOB/Res_LF_rphi_layer6tob",refplotsTOB[5]);
1275  rdir->GetObject("TOB/Res_LF_sas_layer1tob",refplotsTOB[6]);
1276  rdir->GetObject("TOB/Res_LF_sas_layer2tob",refplotsTOB[7]);
1277  sdir->GetObject("TOB/Res_LF_rphi_layer1tob",newplotsTOB[0]);
1278  sdir->GetObject("TOB/Res_LF_rphi_layer2tob",newplotsTOB[1]);
1279  sdir->GetObject("TOB/Res_LF_rphi_layer3tob",newplotsTOB[2]);
1280  sdir->GetObject("TOB/Res_LF_rphi_layer4tob",newplotsTOB[3]);
1281  sdir->GetObject("TOB/Res_LF_rphi_layer5tob",newplotsTOB[4]);
1282  sdir->GetObject("TOB/Res_LF_rphi_layer6tob",newplotsTOB[5]);
1283  sdir->GetObject("TOB/Res_LF_sas_layer1tob",newplotsTOB[6]);
1284  sdir->GetObject("TOB/Res_LF_sas_layer2tob",newplotsTOB[7]);
1285 
1286  Strip = new TCanvas("Strip","Strip",1000,1000);
1287  Strip->Divide(3,3);
1288  for (Int_t i=0; i<8; i++) {
1289    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
1290    Strip->cd(i+1);
1291    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
1292    refplotsTOB[i]->Draw();
1293    newplotsTOB[i]->Draw("sames");
1294    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
1295  }
1296  
1297  Strip->Print("ResLFTOBCompare.eps");
1298  Strip->Print("ResLFTOBCompare.gif");
1299 
1300  rdir->GetObject("TOB/Res_MF_rphi_layer1tob",refplotsTOB[0]);
1301  rdir->GetObject("TOB/Res_MF_rphi_layer2tob",refplotsTOB[1]);
1302  rdir->GetObject("TOB/Res_MF_rphi_layer3tob",refplotsTOB[2]);
1303  rdir->GetObject("TOB/Res_MF_rphi_layer4tob",refplotsTOB[3]);
1304  rdir->GetObject("TOB/Res_MF_rphi_layer5tob",refplotsTOB[4]);
1305  rdir->GetObject("TOB/Res_MF_rphi_layer6tob",refplotsTOB[5]);
1306  rdir->GetObject("TOB/Res_MF_sas_layer1tob",refplotsTOB[6]);
1307  rdir->GetObject("TOB/Res_MF_sas_layer2tob",refplotsTOB[7]);
1308  sdir->GetObject("TOB/Res_MF_rphi_layer1tob",newplotsTOB[0]);
1309  sdir->GetObject("TOB/Res_MF_rphi_layer2tob",newplotsTOB[1]);
1310  sdir->GetObject("TOB/Res_MF_rphi_layer3tob",newplotsTOB[2]);
1311  sdir->GetObject("TOB/Res_MF_rphi_layer4tob",newplotsTOB[3]);
1312  sdir->GetObject("TOB/Res_MF_rphi_layer5tob",newplotsTOB[4]);
1313  sdir->GetObject("TOB/Res_MF_rphi_layer6tob",newplotsTOB[5]);
1314  sdir->GetObject("TOB/Res_MF_sas_layer1tob",newplotsTOB[6]);
1315  sdir->GetObject("TOB/Res_MF_sas_layer2tob",newplotsTOB[7]);
1316 
1317  Strip = new TCanvas("Strip","Strip",1000,1000);
1318  Strip->Divide(3,3);
1319  for (Int_t i=0; i<8; i++) {
1320    if (refplotsTOB[i]->GetEntries() == 0 || newplotsTOB[i]->GetEntries() == 0) continue;
1321    Strip->cd(i+1);
1322    SetUpHistograms(refplotsTOB[i],newplotsTOB[i]);
1323    refplotsTOB[i]->Draw();
1324    newplotsTOB[i]->Draw("sames");
1325    myPV->PVCompute(refplotsTOB[i] , newplotsTOB[i] , te );
1326  }
1327  
1328  Strip->Print("ResMFTOBCompare.eps");
1329  Strip->Print("ResMFTOBCompare.gif");
1330 
1331   /*
1332  rdir->GetObject("TOB/Chi2_rphi_layer1tob",chi2tob[0]);
1333  rdir->GetObject("TOB/Chi2_rphi_layer2tob",chi2tob[1]);
1334  rdir->GetObject("TOB/Chi2_rphi_layer3tob",chi2tob[2]);
1335  rdir->GetObject("TOB/Chi2_rphi_layer4tob",chi2tob[3]);
1336  rdir->GetObject("TOB/Chi2_rphi_layer5tob",chi2tob[4]);
1337  rdir->GetObject("TOB/Chi2_rphi_layer6tob",chi2tob[5]);
1338  rdir->GetObject("TOB/Chi2_sas_layer1tob",chi2tob[6]);
1339  rdir->GetObject("TOB/Chi2_sas_layer2tob",chi2tob[7]);
1340  sdir->GetObject("TOB/Chi2_rphi_layer1tob",newchi2tob[0]);
1341  sdir->GetObject("TOB/Chi2_rphi_layer2tob",newchi2tob[1]);
1342  sdir->GetObject("TOB/Chi2_rphi_layer3tob",newchi2tob[2]);
1343  sdir->GetObject("TOB/Chi2_rphi_layer4tob",newchi2tob[3]);
1344  sdir->GetObject("TOB/Chi2_rphi_layer5tob",newchi2tob[4]);
1345  sdir->GetObject("TOB/Chi2_rphi_layer6tob",newchi2tob[5]);
1346  sdir->GetObject("TOB/Chi2_sas_layer1tob",newchi2tob[6]);
1347  sdir->GetObject("TOB/Chi2_sas_layer2tob",newchi2tob[7]);
1348 
1349   Strip = new TCanvas("Strip","Strip",1000,1000);
1350   Strip->Divide(3,3);
1351   for (Int_t i=0; i<8; i++) {
1352     Strip->cd(i+1);
1353     chi2tob[i]->SetLineColor(2);
1354     newchi2tob[i]->SetLineColor(4);
1355     newchi2tob[i]->SetLineStyle(2);
1356     chi2tob[i]->Draw();
1357     newchi2tob[i]->Draw("sames");
1358     myPV->PVCompute(chi2tob[i] , newchi2tob[i] , te );
1359   }
1360   
1361   Strip->Print("Chi2TOBCompare.eps");
1362   */
1363   
1364  rdir->GetObject("TOB/Posx_matched_layer1tob",matchedtob[0]);
1365  rdir->GetObject("TOB/Posy_matched_layer1tob",matchedtob[1]);
1366  rdir->GetObject("TOB/Posx_matched_layer2tob",matchedtob[2]);
1367  rdir->GetObject("TOB/Posy_matched_layer2tob",matchedtob[3]);
1368  rdir->GetObject("TOB/Errx_matched_layer1tob",matchedtob[4]);
1369  rdir->GetObject("TOB/Erry_matched_layer1tob",matchedtob[5]);
1370  rdir->GetObject("TOB/Errx_matched_layer2tob",matchedtob[6]);
1371  rdir->GetObject("TOB/Erry_matched_layer2tob",matchedtob[7]);
1372  rdir->GetObject("TOB/Resx_matched_layer1tob",matchedtob[8]);
1373  rdir->GetObject("TOB/Resy_matched_layer1tob",matchedtob[9]);
1374  rdir->GetObject("TOB/Resx_matched_layer2tob",matchedtob[10]);
1375  rdir->GetObject("TOB/Resy_matched_layer2tob",matchedtob[11]);
1376  rdir->GetObject("TOB/Pullx_matched_layer1tob",matchedtob[12]);
1377  rdir->GetObject("TOB/Pully_matched_layer1tob",matchedtob[13]);
1378  rdir->GetObject("TOB/Pullx_matched_layer2tob",matchedtob[14]);
1379  rdir->GetObject("TOB/Pully_matched_layer2tob",matchedtob[15]);
1380  sdir->GetObject("TOB/Posx_matched_layer1tob",newmatchedtob[0]);
1381  sdir->GetObject("TOB/Posy_matched_layer1tob",newmatchedtob[1]);
1382  sdir->GetObject("TOB/Posx_matched_layer2tob",newmatchedtob[2]);
1383  sdir->GetObject("TOB/Posy_matched_layer2tob",newmatchedtob[3]);
1384  sdir->GetObject("TOB/Errx_matched_layer1tob",newmatchedtob[4]);
1385  sdir->GetObject("TOB/Erry_matched_layer1tob",newmatchedtob[5]);
1386  sdir->GetObject("TOB/Errx_matched_layer2tob",newmatchedtob[6]);
1387  sdir->GetObject("TOB/Erry_matched_layer2tob",newmatchedtob[7]);
1388  sdir->GetObject("TOB/Resx_matched_layer1tob",newmatchedtob[8]);
1389  sdir->GetObject("TOB/Resy_matched_layer1tob",newmatchedtob[9]);
1390  sdir->GetObject("TOB/Resx_matched_layer2tob",newmatchedtob[10]);
1391  sdir->GetObject("TOB/Resy_matched_layer2tob",newmatchedtob[11]);
1392  sdir->GetObject("TOB/Pullx_matched_layer1tob",newmatchedtob[12]);
1393  sdir->GetObject("TOB/Pully_matched_layer1tob",newmatchedtob[13]);
1394  sdir->GetObject("TOB/Pullx_matched_layer2tob",newmatchedtob[14]);
1395  sdir->GetObject("TOB/Pully_matched_layer2tob",newmatchedtob[15]);
1396 
1397  Strip = new TCanvas("Strip","Strip",1000,1000);
1398  Strip->Divide(4,4);
1399  for (Int_t i=0; i<16; i++) {
1400    if (matchedtob[i]->GetEntries() == 0 || newmatchedtob[i]->GetEntries() == 0) continue;
1401    Strip->cd(i+1);
1402    SetUpHistograms(matchedtob[i],newmatchedtob[i]);
1403    matchedtob[i]->Draw();
1404    newmatchedtob[i]->Draw("sames");
1405    myPV->PVCompute(matchedtob[i] , newmatchedtob[i] , te );
1406  }
1407  
1408  Strip->Print("MatchedTOBCompare.eps");
1409  Strip->Print("MatchedTOBCompare.gif");
1410  
1411 
1412  //=============================================================== 
1413 // TID
1414 
1415  TH1F* refplotsTID[5];
1416  TH1F* newplotsTID[5];
1417 
1418  TProfile* PullTrackangleProfiletid[5];
1419  TProfile* PullTrackwidthProfiletid[5];
1420  TProfile* PullTrackwidthProfileCategory1tid[5];
1421  TProfile* PullTrackwidthProfileCategory2tid[5];
1422  TProfile* PullTrackwidthProfileCategory3tid[5];
1423  TProfile* PullTrackwidthProfileCategory4tid[5];
1424  TH1F* matchedtid[16];
1425 
1426  TProfile* newPullTrackangleProfiletid[5];
1427  TProfile* newPullTrackwidthProfiletid[5];
1428  TProfile* newPullTrackwidthProfileCategory1tid[5];
1429  TProfile* newPullTrackwidthProfileCategory2tid[5];
1430  TProfile* newPullTrackwidthProfileCategory3tid[5];
1431  TProfile* newPullTrackwidthProfileCategory4tid[5];
1432  TH1F* newmatchedtid[16];
1433 
1434  
1435  rdir->GetObject("TID/Adc_rphi_layer1tid",refplotsTID[0]);
1436  rdir->GetObject("TID/Adc_rphi_layer2tid",refplotsTID[1]);
1437  rdir->GetObject("TID/Adc_rphi_layer3tid",refplotsTID[2]);
1438  rdir->GetObject("TID/Adc_sas_layer1tid",refplotsTID[3]);
1439  rdir->GetObject("TID/Adc_sas_layer2tid",refplotsTID[4]);
1440  sdir->GetObject("TID/Adc_rphi_layer1tid",newplotsTID[0]);
1441  sdir->GetObject("TID/Adc_rphi_layer2tid",newplotsTID[1]);
1442  sdir->GetObject("TID/Adc_rphi_layer3tid",newplotsTID[2]);
1443  sdir->GetObject("TID/Adc_sas_layer1tid",newplotsTID[3]);
1444  sdir->GetObject("TID/Adc_sas_layer2tid",newplotsTID[4]);
1445  
1446  Strip = new TCanvas("Strip","Strip",1000,1000);
1447  Strip->Divide(2,3);
1448  for (Int_t i=0; i<5; i++) {
1449    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1450    Strip->cd(i+1);
1451    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1452    refplotsTID[i]->Draw();
1453    newplotsTID[i]->Draw("sames");
1454    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1455  }
1456  
1457  Strip->Print("AdcTIDCompare.eps");
1458  Strip->Print("AdcTIDCompare.gif");
1459 
1460  
1461  rdir->GetObject("TID/Pull_LF_rphi_layer1tid",refplotsTID[0]);
1462  rdir->GetObject("TID/Pull_LF_rphi_layer2tid",refplotsTID[1]);
1463  rdir->GetObject("TID/Pull_LF_rphi_layer3tid",refplotsTID[2]);
1464  rdir->GetObject("TID/Pull_LF_sas_layer1tid",refplotsTID[3]);
1465  rdir->GetObject("TID/Pull_LF_sas_layer2tid",refplotsTID[4]);
1466  sdir->GetObject("TID/Pull_LF_rphi_layer1tid",newplotsTID[0]);
1467  sdir->GetObject("TID/Pull_LF_rphi_layer2tid",newplotsTID[1]);
1468  sdir->GetObject("TID/Pull_LF_rphi_layer3tid",newplotsTID[2]);
1469  sdir->GetObject("TID/Pull_LF_sas_layer1tid",newplotsTID[3]);
1470  sdir->GetObject("TID/Pull_LF_sas_layer2tid",newplotsTID[4]);
1471  
1472  Strip = new TCanvas("Strip","Strip",1000,1000);
1473  Strip->Divide(2,3);
1474  for (Int_t i=0; i<5; i++) {
1475    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1476    Strip->cd(i+1);
1477    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1478    refplotsTID[i]->Draw();
1479    newplotsTID[i]->Draw("sames");
1480    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1481  }
1482  
1483  Strip->Print("PullLFTIDCompare.eps");
1484  Strip->Print("PullLFTIDCompare.gif");
1485 
1486  rdir->GetObject("TID/Pull_MF_rphi_layer1tid",refplotsTID[0]);
1487  rdir->GetObject("TID/Pull_MF_rphi_layer2tid",refplotsTID[1]);
1488  rdir->GetObject("TID/Pull_MF_rphi_layer3tid",refplotsTID[2]);
1489  rdir->GetObject("TID/Pull_MF_sas_layer1tid",refplotsTID[3]);
1490  rdir->GetObject("TID/Pull_MF_sas_layer2tid",refplotsTID[4]);
1491  sdir->GetObject("TID/Pull_MF_rphi_layer1tid",newplotsTID[0]);
1492  sdir->GetObject("TID/Pull_MF_rphi_layer2tid",newplotsTID[1]);
1493  sdir->GetObject("TID/Pull_MF_rphi_layer3tid",newplotsTID[2]);
1494  sdir->GetObject("TID/Pull_MF_sas_layer1tid",newplotsTID[3]);
1495  sdir->GetObject("TID/Pull_MF_sas_layer2tid",newplotsTID[4]);
1496  
1497  Strip = new TCanvas("Strip","Strip",1000,1000);
1498  Strip->Divide(2,3);
1499  for (Int_t i=0; i<5; i++) {
1500    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1501    Strip->cd(i+1);
1502    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1503    refplotsTID[i]->Draw();
1504    newplotsTID[i]->Draw("sames");
1505    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1506  }
1507  
1508  Strip->Print("PullMFTIDCompare.eps");
1509  Strip->Print("PullMFTIDCompare.gif");
1510 
1511  rdir->GetObject("TID/Trackangle_rphi_layer1tid",refplotsTID[0]);
1512  rdir->GetObject("TID/Trackangle_rphi_layer2tid",refplotsTID[1]);
1513  rdir->GetObject("TID/Trackangle_rphi_layer3tid",refplotsTID[2]);
1514  rdir->GetObject("TID/Trackangle_sas_layer1tid",refplotsTID[3]);
1515  rdir->GetObject("TID/Trackangle_sas_layer2tid",refplotsTID[4]);
1516  sdir->GetObject("TID/Trackangle_rphi_layer1tid",newplotsTID[0]);
1517  sdir->GetObject("TID/Trackangle_rphi_layer2tid",newplotsTID[1]);
1518  sdir->GetObject("TID/Trackangle_rphi_layer3tid",newplotsTID[2]);
1519  sdir->GetObject("TID/Trackangle_sas_layer1tid",newplotsTID[3]);
1520  sdir->GetObject("TID/Trackangle_sas_layer2tid",newplotsTID[4]);
1521  
1522  Strip = new TCanvas("Strip","Strip",1000,1000);
1523  Strip->Divide(2,3);
1524  for (Int_t i=0; i<5; i++) {
1525    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1526    Strip->cd(i+1);
1527    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1528    refplotsTID[i]->Draw();
1529    newplotsTID[i]->Draw("sames");
1530    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1531  }
1532  
1533  Strip->Print("TrackangleTIDCompare.eps");
1534  Strip->Print("TrackangleTIDCompare.gif");
1535 
1536  rdir->GetObject("TID/Trackwidth_rphi_layer1tid",refplotsTID[0]);
1537  rdir->GetObject("TID/Trackwidth_rphi_layer2tid",refplotsTID[1]);
1538  rdir->GetObject("TID/Trackwidth_rphi_layer3tid",refplotsTID[2]);
1539  rdir->GetObject("TID/Trackwidth_sas_layer1tid",refplotsTID[3]);
1540  rdir->GetObject("TID/Trackwidth_sas_layer2tid",refplotsTID[4]);
1541  sdir->GetObject("TID/Trackwidth_rphi_layer1tid",newplotsTID[0]);
1542  sdir->GetObject("TID/Trackwidth_rphi_layer2tid",newplotsTID[1]);
1543  sdir->GetObject("TID/Trackwidth_rphi_layer3tid",newplotsTID[2]);
1544  sdir->GetObject("TID/Trackwidth_sas_layer1tid",newplotsTID[3]);
1545  sdir->GetObject("TID/Trackwidth_sas_layer2tid",newplotsTID[4]);
1546  
1547  Strip = new TCanvas("Strip","Strip",1000,1000);
1548  Strip->Divide(2,3);
1549  for (Int_t i=0; i<5; i++) {
1550    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1551    Strip->cd(i+1);
1552    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1553    refplotsTID[i]->Draw();
1554    newplotsTID[i]->Draw("sames");
1555    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1556  }
1557  
1558  Strip->Print("TrackwidthTIDCompare.eps");
1559  Strip->Print("TrackwidthTIDCompare.gif");
1560 
1561  rdir->GetObject("TID/Expectedwidth_rphi_layer1tid",refplotsTID[0]);
1562  rdir->GetObject("TID/Expectedwidth_rphi_layer2tid",refplotsTID[1]);
1563  rdir->GetObject("TID/Expectedwidth_rphi_layer3tid",refplotsTID[2]);
1564  rdir->GetObject("TID/Expectedwidth_sas_layer1tid",refplotsTID[3]);
1565  rdir->GetObject("TID/Expectedwidth_sas_layer2tid",refplotsTID[4]);
1566  sdir->GetObject("TID/Expectedwidth_rphi_layer1tid",newplotsTID[0]);
1567  sdir->GetObject("TID/Expectedwidth_rphi_layer2tid",newplotsTID[1]);
1568  sdir->GetObject("TID/Expectedwidth_rphi_layer3tid",newplotsTID[2]);
1569  sdir->GetObject("TID/Expectedwidth_sas_layer1tid",newplotsTID[3]);
1570  sdir->GetObject("TID/Expectedwidth_sas_layer2tid",newplotsTID[4]);
1571  
1572  Strip = new TCanvas("Strip","Strip",1000,1000);
1573  Strip->Divide(2,3);
1574  for (Int_t i=0; i<5; i++) {
1575    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1576    Strip->cd(i+1);
1577    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1578    refplotsTID[i]->Draw();
1579    newplotsTID[i]->Draw("sames");
1580    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1581  }
1582  
1583  Strip->Print("ExpectedwidthTIDCompare.eps");
1584  Strip->Print("ExpectedwidthTIDCompare.gif");
1585 
1586  rdir->GetObject("TID/Category_rphi_layer1tid",refplotsTID[0]);
1587  rdir->GetObject("TID/Category_rphi_layer2tid",refplotsTID[1]);
1588  rdir->GetObject("TID/Category_rphi_layer3tid",refplotsTID[2]);
1589  rdir->GetObject("TID/Category_sas_layer1tid",refplotsTID[3]);
1590  rdir->GetObject("TID/Category_sas_layer2tid",refplotsTID[4]);
1591  sdir->GetObject("TID/Category_rphi_layer1tid",newplotsTID[0]);
1592  sdir->GetObject("TID/Category_rphi_layer2tid",newplotsTID[1]);
1593  sdir->GetObject("TID/Category_rphi_layer3tid",newplotsTID[2]);
1594  sdir->GetObject("TID/Category_sas_layer1tid",newplotsTID[3]);
1595  sdir->GetObject("TID/Category_sas_layer2tid",newplotsTID[4]);
1596  
1597  Strip = new TCanvas("Strip","Strip",1000,1000);
1598  Strip->Divide(2,3);
1599  for (Int_t i=0; i<5; i++) {
1600    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1601    Strip->cd(i+1);
1602    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1603    refplotsTID[i]->Draw();
1604    newplotsTID[i]->Draw("sames");
1605    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1606  }
1607  
1608  Strip->Print("CategoryTIDCompare.eps");
1609  Strip->Print("CategoryTIDCompare.gif");
1610  /*
1611  rdir->GetObject("TID/PullTrackangleProfile_rphi_layer1tid",PullTrackangleProfiletid[0]);
1612  rdir->GetObject("TID/PullTrackangleProfile_rphi_layer2tid",PullTrackangleProfiletid[1]);
1613  rdir->GetObject("TID/PullTrackangleProfile_rphi_layer3tid",PullTrackangleProfiletid[2]);
1614  rdir->GetObject("TID/PullTrackangleProfile_sas_layer1tid",PullTrackangleProfiletid[3]);
1615  rdir->GetObject("TID/PullTrackangleProfile_sas_layer2tid",PullTrackangleProfiletid[4]);
1616  sdir->GetObject("TID/PullTrackangleProfile_rphi_layer1tid",newPullTrackangleProfiletid[0]);
1617  sdir->GetObject("TID/PullTrackangleProfile_rphi_layer2tid",newPullTrackangleProfiletid[1]);
1618  sdir->GetObject("TID/PullTrackangleProfile_rphi_layer3tid",newPullTrackangleProfiletid[2]);
1619  sdir->GetObject("TID/PullTrackangleProfile_sas_layer1tid",newPullTrackangleProfiletid[3]);
1620  sdir->GetObject("TID/PullTrackangleProfile_sas_layer2tid",newPullTrackangleProfiletid[4]);
1621  
1622  Strip = new TCanvas("Strip","Strip",1000,1000);
1623  Strip->Divide(2,3);
1624  for (Int_t i=0; i<5; i++) {
1625    Strip->cd(i+1);
1626    PullTrackangleProfiletid[i]->SetLineColor(2);
1627    newPullTrackangleProfiletid[i]->SetLineColor(4);
1628     newPullTrackangleProfiletid[i]->SetLineStyle(2);
1629     PullTrackangleProfiletid[i]->Draw();
1630     newPullTrackangleProfiletid[i]->Draw("sames");
1631     //myPV->PVCompute(PullTrackangleProfiletid[i] , newPullTrackangleProfiletid[i] , te );
1632  }
1633  
1634  Strip->Print("PullTrackangleProfileTIDCompare.eps");
1635 
1636  rdir->GetObject("TID/PullTrackwidthProfile_rphi_layer1tid",PullTrackwidthProfiletid[0]);
1637  rdir->GetObject("TID/PullTrackwidthProfile_rphi_layer2tid",PullTrackwidthProfiletid[1]);
1638  rdir->GetObject("TID/PullTrackwidthProfile_rphi_layer3tid",PullTrackwidthProfiletid[2]);
1639  rdir->GetObject("TID/PullTrackwidthProfile_sas_layer1tid",PullTrackwidthProfiletid[3]);
1640  rdir->GetObject("TID/PullTrackwidthProfile_sas_layer2tid",PullTrackwidthProfiletid[4]);
1641  sdir->GetObject("TID/PullTrackwidthProfile_rphi_layer1tid",newPullTrackwidthProfiletid[0]);
1642  sdir->GetObject("TID/PullTrackwidthProfile_rphi_layer2tid",newPullTrackwidthProfiletid[1]);
1643  sdir->GetObject("TID/PullTrackwidthProfile_rphi_layer3tid",newPullTrackwidthProfiletid[2]);
1644  sdir->GetObject("TID/PullTrackwidthProfile_sas_layer1tid",newPullTrackwidthProfiletid[3]);
1645  sdir->GetObject("TID/PullTrackwidthProfile_sas_layer2tid",newPullTrackwidthProfiletid[4]);
1646  
1647  Strip = new TCanvas("Strip","Strip",1000,1000);
1648  Strip->Divide(2,3);
1649  for (Int_t i=0; i<5; i++) {
1650    Strip->cd(i+1);
1651    PullTrackwidthProfiletid[i]->SetLineColor(2);
1652    newPullTrackwidthProfiletid[i]->SetLineColor(4);
1653     newPullTrackwidthProfiletid[i]->SetLineStyle(2);
1654     PullTrackwidthProfiletid[i]->Draw();
1655     newPullTrackwidthProfiletid[i]->Draw("sames");
1656     //myPV->PVCompute(PullTrackwidthProfiletid[i] , newPullTrackwidthProfiletid[i] , te );
1657  }
1658  
1659  Strip->Print("PullTrackwidthProfileTIDCompare.eps");
1660 
1661  rdir->GetObject("TID/PullTrackwidthProfile_Category1_rphi_layer1tid",PullTrackwidthProfileCategory1tid[0]);
1662  rdir->GetObject("TID/PullTrackwidthProfile_Category1_rphi_layer2tid",PullTrackwidthProfileCategory1tid[1]);
1663  rdir->GetObject("TID/PullTrackwidthProfile_Category1_rphi_layer3tid",PullTrackwidthProfileCategory1tid[2]);
1664  rdir->GetObject("TID/PullTrackwidthProfile_Category1_sas_layer1tid",PullTrackwidthProfileCategory1tid[3]);
1665  rdir->GetObject("TID/PullTrackwidthProfile_Category1_sas_layer2tid",PullTrackwidthProfileCategory1tid[4]);
1666  sdir->GetObject("TID/PullTrackwidthProfile_Category1_rphi_layer1tid",newPullTrackwidthProfileCategory1tid[0]);
1667  sdir->GetObject("TID/PullTrackwidthProfile_Category1_rphi_layer2tid",newPullTrackwidthProfileCategory1tid[1]);
1668  sdir->GetObject("TID/PullTrackwidthProfile_Category1_rphi_layer3tid",newPullTrackwidthProfileCategory1tid[2]);
1669  sdir->GetObject("TID/PullTrackwidthProfile_Category1_sas_layer1tid",newPullTrackwidthProfileCategory1tid[3]);
1670  sdir->GetObject("TID/PullTrackwidthProfile_Category1_sas_layer2tid",newPullTrackwidthProfileCategory1tid[4]);
1671  
1672  Strip = new TCanvas("Strip","Strip",1000,1000);
1673  Strip->Divide(2,3);
1674  for (Int_t i=0; i<5; i++) {
1675    Strip->cd(i+1);
1676    PullTrackwidthProfileCategory1tid[i]->SetLineColor(2);
1677    newPullTrackwidthProfileCategory1tid[i]->SetLineColor(4);
1678     newPullTrackwidthProfileCategory1tid[i]->SetLineStyle(2);
1679     PullTrackwidthProfileCategory1tid[i]->Draw();
1680     newPullTrackwidthProfileCategory1tid[i]->Draw("sames");
1681     //myPV->PVCompute(PullTrackwidthProfiletid[i] , newPullTrackwidthProfiletid[i] , te );
1682  }
1683  
1684  Strip->Print("PullTrackwidthProfileCategory1TIDCompare.eps");
1685 
1686  rdir->GetObject("TID/PullTrackwidthProfile_Category2_rphi_layer1tid",PullTrackwidthProfileCategory2tid[0]);
1687  rdir->GetObject("TID/PullTrackwidthProfile_Category2_rphi_layer2tid",PullTrackwidthProfileCategory2tid[1]);
1688  rdir->GetObject("TID/PullTrackwidthProfile_Category2_rphi_layer3tid",PullTrackwidthProfileCategory2tid[2]);
1689  rdir->GetObject("TID/PullTrackwidthProfile_Category2_sas_layer1tid",PullTrackwidthProfileCategory2tid[3]);
1690  rdir->GetObject("TID/PullTrackwidthProfile_Category2_sas_layer2tid",PullTrackwidthProfileCategory2tid[4]);
1691  sdir->GetObject("TID/PullTrackwidthProfile_Category2_rphi_layer1tid",newPullTrackwidthProfileCategory2tid[0]);
1692  sdir->GetObject("TID/PullTrackwidthProfile_Category2_rphi_layer2tid",newPullTrackwidthProfileCategory2tid[1]);
1693  sdir->GetObject("TID/PullTrackwidthProfile_Category2_rphi_layer3tid",newPullTrackwidthProfileCategory2tid[2]);
1694  sdir->GetObject("TID/PullTrackwidthProfile_Category2_sas_layer1tid",newPullTrackwidthProfileCategory2tid[3]);
1695  sdir->GetObject("TID/PullTrackwidthProfile_Category2_sas_layer2tid",newPullTrackwidthProfileCategory2tid[4]);
1696  
1697  Strip = new TCanvas("Strip","Strip",1000,1000);
1698  Strip->Divide(2,3);
1699  for (Int_t i=0; i<5; i++) {
1700    Strip->cd(i+1);
1701    PullTrackwidthProfileCategory2tid[i]->SetLineColor(2);
1702    newPullTrackwidthProfileCategory2tid[i]->SetLineColor(4);
1703     newPullTrackwidthProfileCategory2tid[i]->SetLineStyle(2);
1704     PullTrackwidthProfileCategory2tid[i]->Draw();
1705     newPullTrackwidthProfileCategory2tid[i]->Draw("sames");
1706     //myPV->PVCompute(PullTrackwidthProfiletid[i] , newPullTrackwidthProfiletid[i] , te );
1707  }
1708  
1709  Strip->Print("PullTrackwidthProfileCategory2TIDCompare.eps");
1710 
1711  rdir->GetObject("TID/PullTrackwidthProfile_Category3_rphi_layer1tid",PullTrackwidthProfileCategory3tid[0]);
1712  rdir->GetObject("TID/PullTrackwidthProfile_Category3_rphi_layer2tid",PullTrackwidthProfileCategory3tid[1]);
1713  rdir->GetObject("TID/PullTrackwidthProfile_Category3_rphi_layer3tid",PullTrackwidthProfileCategory3tid[2]);
1714  rdir->GetObject("TID/PullTrackwidthProfile_Category3_sas_layer1tid",PullTrackwidthProfileCategory3tid[3]);
1715  rdir->GetObject("TID/PullTrackwidthProfile_Category3_sas_layer2tid",PullTrackwidthProfileCategory3tid[4]);
1716  sdir->GetObject("TID/PullTrackwidthProfile_Category3_rphi_layer1tid",newPullTrackwidthProfileCategory3tid[0]);
1717  sdir->GetObject("TID/PullTrackwidthProfile_Category3_rphi_layer2tid",newPullTrackwidthProfileCategory3tid[1]);
1718  sdir->GetObject("TID/PullTrackwidthProfile_Category3_rphi_layer3tid",newPullTrackwidthProfileCategory3tid[2]);
1719  sdir->GetObject("TID/PullTrackwidthProfile_Category3_sas_layer1tid",newPullTrackwidthProfileCategory3tid[3]);
1720  sdir->GetObject("TID/PullTrackwidthProfile_Category3_sas_layer2tid",newPullTrackwidthProfileCategory3tid[4]);
1721  
1722  Strip = new TCanvas("Strip","Strip",1000,1000);
1723  Strip->Divide(2,3);
1724  for (Int_t i=0; i<5; i++) {
1725    Strip->cd(i+1);
1726    PullTrackwidthProfileCategory3tid[i]->SetLineColor(2);
1727    newPullTrackwidthProfileCategory3tid[i]->SetLineColor(4);
1728     newPullTrackwidthProfileCategory3tid[i]->SetLineStyle(2);
1729     PullTrackwidthProfileCategory3tid[i]->Draw();
1730     newPullTrackwidthProfileCategory3tid[i]->Draw("sames");
1731     //myPV->PVCompute(PullTrackwidthProfiletid[i] , newPullTrackwidthProfiletid[i] , te );
1732  }
1733  
1734  Strip->Print("PullTrackwidthProfileCategory3TIDCompare.eps");
1735 
1736  rdir->GetObject("TID/PullTrackwidthProfile_Category4_rphi_layer1tid",PullTrackwidthProfileCategory4tid[0]);
1737  rdir->GetObject("TID/PullTrackwidthProfile_Category4_rphi_layer2tid",PullTrackwidthProfileCategory4tid[1]);
1738  rdir->GetObject("TID/PullTrackwidthProfile_Category4_rphi_layer3tid",PullTrackwidthProfileCategory4tid[2]);
1739  rdir->GetObject("TID/PullTrackwidthProfile_Category4_sas_layer1tid",PullTrackwidthProfileCategory4tid[3]);
1740  rdir->GetObject("TID/PullTrackwidthProfile_Category4_sas_layer2tid",PullTrackwidthProfileCategory4tid[4]);
1741  sdir->GetObject("TID/PullTrackwidthProfile_Category4_rphi_layer1tid",newPullTrackwidthProfileCategory4tid[0]);
1742  sdir->GetObject("TID/PullTrackwidthProfile_Category4_rphi_layer2tid",newPullTrackwidthProfileCategory4tid[1]);
1743  sdir->GetObject("TID/PullTrackwidthProfile_Category4_rphi_layer3tid",newPullTrackwidthProfileCategory4tid[2]);
1744  sdir->GetObject("TID/PullTrackwidthProfile_Category4_sas_layer1tid",newPullTrackwidthProfileCategory4tid[3]);
1745  sdir->GetObject("TID/PullTrackwidthProfile_Category4_sas_layer2tid",newPullTrackwidthProfileCategory4tid[4]);
1746  
1747  Strip = new TCanvas("Strip","Strip",1000,1000);
1748  Strip->Divide(2,3);
1749  for (Int_t i=0; i<5; i++) {
1750    Strip->cd(i+1);
1751    PullTrackwidthProfileCategory4tid[i]->SetLineColor(2);
1752    newPullTrackwidthProfileCategory4tid[i]->SetLineColor(4);
1753     newPullTrackwidthProfileCategory4tid[i]->SetLineStyle(2);
1754     PullTrackwidthProfileCategory4tid[i]->Draw();
1755     newPullTrackwidthProfileCategory4tid[i]->Draw("sames");
1756     //myPV->PVCompute(PullTrackwidthProfiletid[i] , newPullTrackwidthProfiletid[i] , te );
1757  }
1758  
1759  Strip->Print("PullTrackwidthProfileCategory4TIDCompare.eps");
1760  */
1761  rdir->GetObject("TID/Nstp_rphi_layer1tid",refplotsTID[0]);
1762  rdir->GetObject("TID/Nstp_rphi_layer2tid",refplotsTID[1]);
1763  rdir->GetObject("TID/Nstp_rphi_layer3tid",refplotsTID[2]);
1764  rdir->GetObject("TID/Nstp_sas_layer1tid",refplotsTID[3]);
1765  rdir->GetObject("TID/Nstp_sas_layer2tid",refplotsTID[4]);
1766  sdir->GetObject("TID/Nstp_rphi_layer1tid",newplotsTID[0]);
1767  sdir->GetObject("TID/Nstp_rphi_layer2tid",newplotsTID[1]);
1768  sdir->GetObject("TID/Nstp_rphi_layer3tid",newplotsTID[2]);
1769  sdir->GetObject("TID/Nstp_sas_layer1tid",newplotsTID[3]);
1770  sdir->GetObject("TID/Nstp_sas_layer2tid",newplotsTID[4]);
1771 
1772  Strip = new TCanvas("Strip","Strip",1000,1000);
1773  Strip->Divide(2,3);
1774  for (Int_t i=0; i<5; i++) {
1775    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1776    Strip->cd(i+1);
1777    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1778    refplotsTID[i]->Draw();
1779    newplotsTID[i]->Draw("sames");
1780    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1781  }
1782  
1783  Strip->Print("NstpTIDCompare.eps");
1784  Strip->Print("NstpTIDCompare.gif");
1785 
1786  rdir->GetObject("TID/Posx_rphi_layer1tid",refplotsTID[0]);
1787  rdir->GetObject("TID/Posx_rphi_layer2tid",refplotsTID[1]);
1788  rdir->GetObject("TID/Posx_rphi_layer3tid",refplotsTID[2]);
1789  rdir->GetObject("TID/Posx_sas_layer1tid",refplotsTID[3]);
1790  rdir->GetObject("TID/Posx_sas_layer2tid",refplotsTID[4]);
1791  sdir->GetObject("TID/Posx_rphi_layer1tid",newplotsTID[0]);
1792  sdir->GetObject("TID/Posx_rphi_layer2tid",newplotsTID[1]);
1793  sdir->GetObject("TID/Posx_rphi_layer3tid",newplotsTID[2]);
1794  sdir->GetObject("TID/Posx_sas_layer1tid",newplotsTID[3]);
1795  sdir->GetObject("TID/Posx_sas_layer2tid",newplotsTID[4]);
1796 
1797  Strip = new TCanvas("Strip","Strip",1000,1000);
1798  Strip->Divide(2,3);
1799  for (Int_t i=0; i<5; i++) {
1800    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1801    Strip->cd(i+1);
1802    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1803    refplotsTID[i]->Draw();
1804    newplotsTID[i]->Draw("sames");
1805    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1806  }
1807   
1808  Strip->Print("PosTIDCompare.eps");
1809  Strip->Print("PosTIDCompare.gif");
1810   
1811 
1812  rdir->GetObject("TID/Errx_LF_rphi_layer1tid",refplotsTID[0]);
1813  rdir->GetObject("TID/Errx_LF_rphi_layer2tid",refplotsTID[1]);
1814  rdir->GetObject("TID/Errx_LF_rphi_layer3tid",refplotsTID[2]);
1815  rdir->GetObject("TID/Errx_LF_sas_layer1tid",refplotsTID[3]);
1816  rdir->GetObject("TID/Errx_LF_sas_layer2tid",refplotsTID[4]);
1817  sdir->GetObject("TID/Errx_LF_rphi_layer1tid",newplotsTID[0]);
1818  sdir->GetObject("TID/Errx_LF_rphi_layer2tid",newplotsTID[1]);
1819  sdir->GetObject("TID/Errx_LF_rphi_layer3tid",newplotsTID[2]);
1820  sdir->GetObject("TID/Errx_LF_sas_layer1tid",newplotsTID[3]);
1821  sdir->GetObject("TID/Errx_LF_sas_layer2tid",newplotsTID[4]);
1822 
1823   Strip = new TCanvas("Strip","Strip",1000,1000);
1824   Strip->Divide(2,3);
1825   for (Int_t i=0; i<5; i++) {
1826    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1827    Strip->cd(i+1);
1828    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1829    refplotsTID[i]->Draw();
1830    newplotsTID[i]->Draw("sames");
1831    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1832   }
1833   
1834   Strip->Print("ErrxLFTIDCompare.eps");
1835   Strip->Print("ErrxLFTIDCompare.gif");
1836   
1837  rdir->GetObject("TID/Errx_MF_rphi_layer1tid",refplotsTID[0]);
1838  rdir->GetObject("TID/Errx_MF_rphi_layer2tid",refplotsTID[1]);
1839  rdir->GetObject("TID/Errx_MF_rphi_layer3tid",refplotsTID[2]);
1840  rdir->GetObject("TID/Errx_MF_sas_layer1tid",refplotsTID[3]);
1841  rdir->GetObject("TID/Errx_MF_sas_layer2tid",refplotsTID[4]);
1842  sdir->GetObject("TID/Errx_MF_rphi_layer1tid",newplotsTID[0]);
1843  sdir->GetObject("TID/Errx_MF_rphi_layer2tid",newplotsTID[1]);
1844  sdir->GetObject("TID/Errx_MF_rphi_layer3tid",newplotsTID[2]);
1845  sdir->GetObject("TID/Errx_MF_sas_layer1tid",newplotsTID[3]);
1846  sdir->GetObject("TID/Errx_MF_sas_layer2tid",newplotsTID[4]);
1847 
1848   Strip = new TCanvas("Strip","Strip",1000,1000);
1849   Strip->Divide(2,3);
1850   for (Int_t i=0; i<5; i++) {
1851    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1852    Strip->cd(i+1);
1853    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1854    refplotsTID[i]->Draw();
1855    newplotsTID[i]->Draw("sames");
1856    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1857   }
1858   
1859   Strip->Print("ErrxMFTIDCompare.eps");
1860   Strip->Print("ErrxMFTIDCompare.gif");
1861   
1862  
1863  rdir->GetObject("TID/Res_LF_rphi_layer1tid",refplotsTID[0]);
1864  rdir->GetObject("TID/Res_LF_rphi_layer2tid",refplotsTID[1]);
1865  rdir->GetObject("TID/Res_LF_rphi_layer3tid",refplotsTID[2]);
1866  rdir->GetObject("TID/Res_LF_sas_layer1tid",refplotsTID[3]);
1867  rdir->GetObject("TID/Res_LF_sas_layer2tid",refplotsTID[4]);
1868  sdir->GetObject("TID/Res_LF_rphi_layer1tid",newplotsTID[0]);
1869  sdir->GetObject("TID/Res_LF_rphi_layer2tid",newplotsTID[1]);
1870  sdir->GetObject("TID/Res_LF_rphi_layer3tid",newplotsTID[2]);
1871  sdir->GetObject("TID/Res_LF_sas_layer1tid",newplotsTID[3]);
1872  sdir->GetObject("TID/Res_LF_sas_layer2tid",newplotsTID[4]);
1873 
1874   Strip = new TCanvas("Strip","Strip",1000,1000);
1875   Strip->Divide(2,3);
1876   for (Int_t i=0; i<5; i++) {
1877    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1878    Strip->cd(i+1);
1879    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1880    refplotsTID[i]->Draw();
1881    newplotsTID[i]->Draw("sames");
1882    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1883   }
1884   
1885   Strip->Print("ResLFTIDCompare.eps");
1886   Strip->Print("ResLFTIDCompare.gif");
1887 
1888 
1889  rdir->GetObject("TID/Res_MF_rphi_layer1tid",refplotsTID[0]);
1890  rdir->GetObject("TID/Res_MF_rphi_layer2tid",refplotsTID[1]);
1891  rdir->GetObject("TID/Res_MF_rphi_layer3tid",refplotsTID[2]);
1892  rdir->GetObject("TID/Res_MF_sas_layer1tid",refplotsTID[3]);
1893  rdir->GetObject("TID/Res_MF_sas_layer2tid",refplotsTID[4]);
1894  sdir->GetObject("TID/Res_MF_rphi_layer1tid",newplotsTID[0]);
1895  sdir->GetObject("TID/Res_MF_rphi_layer2tid",newplotsTID[1]);
1896  sdir->GetObject("TID/Res_MF_rphi_layer3tid",newplotsTID[2]);
1897  sdir->GetObject("TID/Res_MF_sas_layer1tid",newplotsTID[3]);
1898  sdir->GetObject("TID/Res_MF_sas_layer2tid",newplotsTID[4]);
1899 
1900   Strip = new TCanvas("Strip","Strip",1000,1000);
1901   Strip->Divide(2,3);
1902   for (Int_t i=0; i<5; i++) {
1903    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1904    Strip->cd(i+1);
1905    SetUpHistograms(refplotsTID[i],newplotsTID[i]);
1906    refplotsTID[i]->Draw();
1907    newplotsTID[i]->Draw("sames");
1908    myPV->PVCompute(refplotsTID[i] , newplotsTID[i] , te );
1909   }
1910   
1911   Strip->Print("ResMFTIDCompare.eps");
1912   Strip->Print("ResMFTIDCompare.gif");
1913   /*
1914  rdir->GetObject("TID/Chi2_rphi_layer1tid",chi2tid[0]);
1915  rdir->GetObject("TID/Chi2_rphi_layer2tid",chi2tid[1]);
1916  rdir->GetObject("TID/Chi2_rphi_layer3tid",chi2tid[2]);
1917  rdir->GetObject("TID/Chi2_sas_layer1tid",chi2tid[3]);
1918  rdir->GetObject("TID/Chi2_sas_layer2tid",chi2tid[4]);
1919  sdir->GetObject("TID/Chi2_rphi_layer1tid",newchi2tid[0]);
1920  sdir->GetObject("TID/Chi2_rphi_layer2tid",newchi2tid[1]);
1921  sdir->GetObject("TID/Chi2_rphi_layer3tid",newchi2tid[2]);
1922  sdir->GetObject("TID/Chi2_sas_layer1tid",newchi2tid[3]);
1923  sdir->GetObject("TID/Chi2_sas_layer2tid",newchi2tid[4]);
1924 
1925   Strip = new TCanvas("Strip","Strip",1000,1000);
1926   Strip->Divide(2,3);
1927   for (Int_t i=0; i<5; i++) {
1928    if (refplotsTID[i]->GetEntries() == 0 || newplotsTID[i]->GetEntries() == 0) continue;
1929     Strip->cd(i+1);
1930     chi2tid[i]->SetLineColor(2);
1931    refplotsTID[i]->Add( refplotsTID[i],refplotsTID[i], 1/(refplotsTID[i]->GetEntries()),0.);
1932     newchi2tid[i]->SetLineColor(4);
1933    newplotsTID[i]->Add( newplotsTID[i],newplotsTID[i], 1/(newplotsTID[i]->GetEntries()),0.);
1934     newchi2tid[i]->SetLineStyle(2);
1935     chi2tid[i]->Draw();
1936     newchi2tid[i]->Draw("sames");
1937     myPV->PVCompute(chi2tid[i] , newchi2tid[i] , te );
1938   }
1939   
1940   Strip->Print("Chi2TIDCompare.eps");
1941   */
1942  rdir->GetObject("TID/Posx_matched_layer1tid",matchedtid[0]);
1943  rdir->GetObject("TID/Posy_matched_layer1tid",matchedtid[1]);
1944  rdir->GetObject("TID/Posx_matched_layer2tid",matchedtid[2]);
1945  rdir->GetObject("TID/Posy_matched_layer2tid",matchedtid[3]);
1946  rdir->GetObject("TID/Errx_matched_layer1tid",matchedtid[4]);
1947  rdir->GetObject("TID/Erry_matched_layer1tid",matchedtid[5]);
1948  rdir->GetObject("TID/Errx_matched_layer2tid",matchedtid[6]);
1949  rdir->GetObject("TID/Erry_matched_layer2tid",matchedtid[7]);
1950  rdir->GetObject("TID/Resx_matched_layer1tid",matchedtid[8]);
1951  rdir->GetObject("TID/Resy_matched_layer1tid",matchedtid[9]);
1952  rdir->GetObject("TID/Resx_matched_layer2tid",matchedtid[10]);
1953  rdir->GetObject("TID/Resy_matched_layer2tid",matchedtid[11]);
1954  rdir->GetObject("TID/Pullx_matched_layer1tid",matchedtid[12]);
1955  rdir->GetObject("TID/Pully_matched_layer1tid",matchedtid[13]);
1956  rdir->GetObject("TID/Pullx_matched_layer2tid",matchedtid[14]);
1957  rdir->GetObject("TID/Pully_matched_layer2tid",matchedtid[15]);
1958  sdir->GetObject("TID/Posx_matched_layer1tid",newmatchedtid[0]);
1959  sdir->GetObject("TID/Posy_matched_layer1tid",newmatchedtid[1]);
1960  sdir->GetObject("TID/Posx_matched_layer2tid",newmatchedtid[2]);
1961  sdir->GetObject("TID/Posy_matched_layer2tid",newmatchedtid[3]);
1962  sdir->GetObject("TID/Errx_matched_layer1tid",newmatchedtid[4]);
1963  sdir->GetObject("TID/Erry_matched_layer1tid",newmatchedtid[5]);
1964  sdir->GetObject("TID/Errx_matched_layer2tid",newmatchedtid[6]);
1965  sdir->GetObject("TID/Erry_matched_layer2tid",newmatchedtid[7]);
1966  sdir->GetObject("TID/Resx_matched_layer1tid",newmatchedtid[8]);
1967  sdir->GetObject("TID/Resy_matched_layer1tid",newmatchedtid[9]);
1968  sdir->GetObject("TID/Resx_matched_layer2tid",newmatchedtid[10]);
1969  sdir->GetObject("TID/Resy_matched_layer2tid",newmatchedtid[11]);
1970  sdir->GetObject("TID/Pullx_matched_layer1tid",newmatchedtid[12]);
1971  sdir->GetObject("TID/Pully_matched_layer1tid",newmatchedtid[13]);
1972  sdir->GetObject("TID/Pullx_matched_layer2tid",newmatchedtid[14]);
1973  sdir->GetObject("TID/Pully_matched_layer2tid",newmatchedtid[15]);
1974 
1975  Strip = new TCanvas("Strip","Strip",1000,1000);
1976  Strip->Divide(4,4);
1977  for (Int_t i=0; i<16; i++) {
1978    if (matchedtid[i]->GetEntries() == 0 || newmatchedtid[i]->GetEntries() == 0) continue;
1979    Strip->cd(i+1);
1980    SetUpHistograms(matchedtid[i],newmatchedtid[i]);
1981    matchedtid[i]->Draw();
1982    newmatchedtid[i]->Draw("sames");
1983    myPV->PVCompute(matchedtid[i] , newmatchedtid[i] , te );
1984  }
1985  
1986  Strip->Print("MatchedTIDCompare.eps");
1987  Strip->Print("MatchedTIDCompare.gif");
1988 
1989 
1990  //======================================================================================================
1991 // TEC
1992 
1993  TH1F* refplotsTEC[10];
1994  TH1F* newplotsTEC[10];
1995 
1996  TProfile* PullTrackangleProfiletec[10];
1997  TProfile* PullTrackwidthProfiletec[10];
1998  TProfile* PullTrackwidthProfileCategory1tec[10];
1999  TProfile* PullTrackwidthProfileCategory2tec[10];
2000  TProfile* PullTrackwidthProfileCategory3tec[10];
2001  TProfile* PullTrackwidthProfileCategory4tec[10];
2002  TH1F* matchedtec1[12];
2003  TH1F* matchedtec2[12];
2004 
2005  TProfile* newPullTrackangleProfiletec[10];
2006  TProfile* newPullTrackwidthProfiletec[10];
2007  TProfile* newPullTrackwidthProfileCategory1tec[10];
2008  TProfile* newPullTrackwidthProfileCategory2tec[10];
2009  TProfile* newPullTrackwidthProfileCategory3tec[10];
2010  TProfile* newPullTrackwidthProfileCategory4tec[10];
2011  TH1F* newmatchedtec1[12];
2012  TH1F* newmatchedtec2[12];
2013 
2014  
2015  rdir->GetObject("TEC/Adc_rphi_layer1tec",refplotsTEC[0]);
2016  rdir->GetObject("TEC/Adc_rphi_layer2tec",refplotsTEC[1]);
2017  rdir->GetObject("TEC/Adc_rphi_layer3tec",refplotsTEC[2]);
2018  rdir->GetObject("TEC/Adc_rphi_layer4tec",refplotsTEC[3]);
2019  rdir->GetObject("TEC/Adc_rphi_layer5tec",refplotsTEC[4]);
2020  rdir->GetObject("TEC/Adc_rphi_layer6tec",refplotsTEC[5]);
2021  rdir->GetObject("TEC/Adc_rphi_layer7tec",refplotsTEC[6]);
2022  rdir->GetObject("TEC/Adc_sas_layer1tec",refplotsTEC[7]);
2023  rdir->GetObject("TEC/Adc_sas_layer2tec",refplotsTEC[8]);
2024  rdir->GetObject("TEC/Adc_sas_layer5tec",refplotsTEC[9]);
2025  sdir->GetObject("TEC/Adc_rphi_layer1tec",newplotsTEC[0]);
2026  sdir->GetObject("TEC/Adc_rphi_layer2tec",newplotsTEC[1]);
2027  sdir->GetObject("TEC/Adc_rphi_layer3tec",newplotsTEC[2]);
2028  sdir->GetObject("TEC/Adc_rphi_layer4tec",newplotsTEC[3]);
2029  sdir->GetObject("TEC/Adc_rphi_layer5tec",newplotsTEC[4]);
2030  sdir->GetObject("TEC/Adc_rphi_layer6tec",newplotsTEC[5]);
2031  sdir->GetObject("TEC/Adc_rphi_layer7tec",newplotsTEC[6]);
2032  sdir->GetObject("TEC/Adc_sas_layer1tec",newplotsTEC[7]);
2033  sdir->GetObject("TEC/Adc_sas_layer2tec",newplotsTEC[8]);
2034  sdir->GetObject("TEC/Adc_sas_layer5tec",newplotsTEC[9]);
2035  
2036  Strip = new TCanvas("Strip","Strip",1000,1000);
2037  Strip->Divide(4,3);
2038  for (Int_t i=0; i<10; i++) {
2039    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2040    Strip->cd(i+1);
2041    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2042    refplotsTEC[i]->Draw();
2043    newplotsTEC[i]->Draw("sames");
2044    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2045  }
2046  
2047  Strip->Print("AdcTECCompare.eps");
2048  Strip->Print("AdcTECCompare.gif");
2049  
2050  rdir->GetObject("TEC/Pull_LF_rphi_layer1tec",refplotsTEC[0]);
2051  rdir->GetObject("TEC/Pull_LF_rphi_layer2tec",refplotsTEC[1]);
2052  rdir->GetObject("TEC/Pull_LF_rphi_layer3tec",refplotsTEC[2]);
2053  rdir->GetObject("TEC/Pull_LF_rphi_layer4tec",refplotsTEC[3]);
2054  rdir->GetObject("TEC/Pull_LF_rphi_layer5tec",refplotsTEC[4]);
2055  rdir->GetObject("TEC/Pull_LF_rphi_layer6tec",refplotsTEC[5]);
2056  rdir->GetObject("TEC/Pull_LF_rphi_layer7tec",refplotsTEC[6]);
2057  rdir->GetObject("TEC/Pull_LF_sas_layer1tec",refplotsTEC[7]);
2058  rdir->GetObject("TEC/Pull_LF_sas_layer2tec",refplotsTEC[8]);
2059  rdir->GetObject("TEC/Pull_LF_sas_layer5tec",refplotsTEC[9]);
2060  sdir->GetObject("TEC/Pull_LF_rphi_layer1tec",newplotsTEC[0]);
2061  sdir->GetObject("TEC/Pull_LF_rphi_layer2tec",newplotsTEC[1]);
2062  sdir->GetObject("TEC/Pull_LF_rphi_layer3tec",newplotsTEC[2]);
2063  sdir->GetObject("TEC/Pull_LF_rphi_layer4tec",newplotsTEC[3]);
2064  sdir->GetObject("TEC/Pull_LF_rphi_layer5tec",newplotsTEC[4]);
2065  sdir->GetObject("TEC/Pull_LF_rphi_layer6tec",newplotsTEC[5]);
2066  sdir->GetObject("TEC/Pull_LF_rphi_layer7tec",newplotsTEC[6]);
2067  sdir->GetObject("TEC/Pull_LF_sas_layer1tec",newplotsTEC[7]);
2068  sdir->GetObject("TEC/Pull_LF_sas_layer2tec",newplotsTEC[8]);
2069  sdir->GetObject("TEC/Pull_LF_sas_layer5tec",newplotsTEC[9]);
2070  
2071  Strip = new TCanvas("Strip","Strip",1000,1000);
2072  Strip->Divide(4,3);
2073  for (Int_t i=0; i<10; i++) {
2074    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2075    Strip->cd(i+1);
2076    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2077    refplotsTEC[i]->Draw();
2078    newplotsTEC[i]->Draw("sames");
2079    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2080  }
2081  
2082  Strip->Print("PullLFTECCompare.eps");
2083  Strip->Print("PullLFTECCompare.gif");
2084 
2085  rdir->GetObject("TEC/Pull_MF_rphi_layer1tec",refplotsTEC[0]);
2086  rdir->GetObject("TEC/Pull_MF_rphi_layer2tec",refplotsTEC[1]);
2087  rdir->GetObject("TEC/Pull_MF_rphi_layer3tec",refplotsTEC[2]);
2088  rdir->GetObject("TEC/Pull_MF_rphi_layer4tec",refplotsTEC[3]);
2089  rdir->GetObject("TEC/Pull_MF_rphi_layer5tec",refplotsTEC[4]);
2090  rdir->GetObject("TEC/Pull_MF_rphi_layer6tec",refplotsTEC[5]);
2091  rdir->GetObject("TEC/Pull_MF_rphi_layer7tec",refplotsTEC[6]);
2092  rdir->GetObject("TEC/Pull_MF_sas_layer1tec",refplotsTEC[7]);
2093  rdir->GetObject("TEC/Pull_MF_sas_layer2tec",refplotsTEC[8]);
2094  rdir->GetObject("TEC/Pull_MF_sas_layer5tec",refplotsTEC[9]);
2095  sdir->GetObject("TEC/Pull_MF_rphi_layer1tec",newplotsTEC[0]);
2096  sdir->GetObject("TEC/Pull_MF_rphi_layer2tec",newplotsTEC[1]);
2097  sdir->GetObject("TEC/Pull_MF_rphi_layer3tec",newplotsTEC[2]);
2098  sdir->GetObject("TEC/Pull_MF_rphi_layer4tec",newplotsTEC[3]);
2099  sdir->GetObject("TEC/Pull_MF_rphi_layer5tec",newplotsTEC[4]);
2100  sdir->GetObject("TEC/Pull_MF_rphi_layer6tec",newplotsTEC[5]);
2101  sdir->GetObject("TEC/Pull_MF_rphi_layer7tec",newplotsTEC[6]);
2102  sdir->GetObject("TEC/Pull_MF_sas_layer1tec",newplotsTEC[7]);
2103  sdir->GetObject("TEC/Pull_MF_sas_layer2tec",newplotsTEC[8]);
2104  sdir->GetObject("TEC/Pull_MF_sas_layer5tec",newplotsTEC[9]);
2105  
2106  Strip = new TCanvas("Strip","Strip",1000,1000);
2107  Strip->Divide(4,3);
2108  for (Int_t i=0; i<10; i++) {
2109    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2110    Strip->cd(i+1);
2111    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2112    refplotsTEC[i]->Draw();
2113    newplotsTEC[i]->Draw("sames");
2114    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2115  }
2116  
2117  Strip->Print("PullMFTECCompare.eps");
2118  Strip->Print("PullMFTECCompare.gif");
2119 
2120  rdir->GetObject("TEC/Trackangle_rphi_layer1tec",refplotsTEC[0]);
2121  rdir->GetObject("TEC/Trackangle_rphi_layer2tec",refplotsTEC[1]);
2122  rdir->GetObject("TEC/Trackangle_rphi_layer3tec",refplotsTEC[2]);
2123  rdir->GetObject("TEC/Trackangle_rphi_layer4tec",refplotsTEC[3]);
2124  rdir->GetObject("TEC/Trackangle_rphi_layer5tec",refplotsTEC[4]);
2125  rdir->GetObject("TEC/Trackangle_rphi_layer6tec",refplotsTEC[5]);
2126  rdir->GetObject("TEC/Trackangle_rphi_layer7tec",refplotsTEC[6]);
2127  rdir->GetObject("TEC/Trackangle_sas_layer1tec",refplotsTEC[7]);
2128  rdir->GetObject("TEC/Trackangle_sas_layer2tec",refplotsTEC[8]);
2129  rdir->GetObject("TEC/Trackangle_sas_layer5tec",refplotsTEC[9]);
2130  sdir->GetObject("TEC/Trackangle_rphi_layer1tec",newplotsTEC[0]);
2131  sdir->GetObject("TEC/Trackangle_rphi_layer2tec",newplotsTEC[1]);
2132  sdir->GetObject("TEC/Trackangle_rphi_layer3tec",newplotsTEC[2]);
2133  sdir->GetObject("TEC/Trackangle_rphi_layer4tec",newplotsTEC[3]);
2134  sdir->GetObject("TEC/Trackangle_rphi_layer5tec",newplotsTEC[4]);
2135  sdir->GetObject("TEC/Trackangle_rphi_layer6tec",newplotsTEC[5]);
2136  sdir->GetObject("TEC/Trackangle_rphi_layer7tec",newplotsTEC[6]);
2137  sdir->GetObject("TEC/Trackangle_sas_layer1tec",newplotsTEC[7]);
2138  sdir->GetObject("TEC/Trackangle_sas_layer2tec",newplotsTEC[8]);
2139  sdir->GetObject("TEC/Trackangle_sas_layer5tec",newplotsTEC[9]);
2140  
2141  Strip = new TCanvas("Strip","Strip",1000,1000);
2142  Strip->Divide(4,3);
2143  for (Int_t i=0; i<10; i++) {
2144    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2145    Strip->cd(i+1);
2146    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2147    refplotsTEC[i]->Draw();
2148    newplotsTEC[i]->Draw("sames");
2149    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2150  }
2151  
2152  Strip->Print("TrackangleTECCompare.eps");
2153  Strip->Print("TrackangleTECCompare.gif");
2154 
2155  rdir->GetObject("TEC/Trackwidth_rphi_layer1tec",refplotsTEC[0]);
2156  rdir->GetObject("TEC/Trackwidth_rphi_layer2tec",refplotsTEC[1]);
2157  rdir->GetObject("TEC/Trackwidth_rphi_layer3tec",refplotsTEC[2]);
2158  rdir->GetObject("TEC/Trackwidth_rphi_layer4tec",refplotsTEC[3]);
2159  rdir->GetObject("TEC/Trackwidth_rphi_layer5tec",refplotsTEC[4]);
2160  rdir->GetObject("TEC/Trackwidth_rphi_layer6tec",refplotsTEC[5]);
2161  rdir->GetObject("TEC/Trackwidth_rphi_layer7tec",refplotsTEC[6]);
2162  rdir->GetObject("TEC/Trackwidth_sas_layer1tec",refplotsTEC[7]);
2163  rdir->GetObject("TEC/Trackwidth_sas_layer2tec",refplotsTEC[8]);
2164  rdir->GetObject("TEC/Trackwidth_sas_layer5tec",refplotsTEC[9]);
2165  sdir->GetObject("TEC/Trackwidth_rphi_layer1tec",newplotsTEC[0]);
2166  sdir->GetObject("TEC/Trackwidth_rphi_layer2tec",newplotsTEC[1]);
2167  sdir->GetObject("TEC/Trackwidth_rphi_layer3tec",newplotsTEC[2]);
2168  sdir->GetObject("TEC/Trackwidth_rphi_layer4tec",newplotsTEC[3]);
2169  sdir->GetObject("TEC/Trackwidth_rphi_layer5tec",newplotsTEC[4]);
2170  sdir->GetObject("TEC/Trackwidth_rphi_layer6tec",newplotsTEC[5]);
2171  sdir->GetObject("TEC/Trackwidth_rphi_layer7tec",newplotsTEC[6]);
2172  sdir->GetObject("TEC/Trackwidth_sas_layer1tec",newplotsTEC[7]);
2173  sdir->GetObject("TEC/Trackwidth_sas_layer2tec",newplotsTEC[8]);
2174  sdir->GetObject("TEC/Trackwidth_sas_layer5tec",newplotsTEC[9]);
2175  
2176  Strip = new TCanvas("Strip","Strip",1000,1000);
2177  Strip->Divide(4,3);
2178  for (Int_t i=0; i<10; i++) {
2179    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2180    Strip->cd(i+1);
2181    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2182    refplotsTEC[i]->Draw();
2183    newplotsTEC[i]->Draw("sames");
2184    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2185  }
2186  
2187  Strip->Print("TrackwidthTECCompare.eps");
2188  Strip->Print("TrackwidthTECCompare.gif");
2189 
2190  rdir->GetObject("TEC/Expectedwidth_rphi_layer1tec",refplotsTEC[0]);
2191  rdir->GetObject("TEC/Expectedwidth_rphi_layer2tec",refplotsTEC[1]);
2192  rdir->GetObject("TEC/Expectedwidth_rphi_layer3tec",refplotsTEC[2]);
2193  rdir->GetObject("TEC/Expectedwidth_rphi_layer4tec",refplotsTEC[3]);
2194  rdir->GetObject("TEC/Expectedwidth_rphi_layer5tec",refplotsTEC[4]);
2195  rdir->GetObject("TEC/Expectedwidth_rphi_layer6tec",refplotsTEC[5]);
2196  rdir->GetObject("TEC/Expectedwidth_rphi_layer7tec",refplotsTEC[6]);
2197  rdir->GetObject("TEC/Expectedwidth_sas_layer1tec",refplotsTEC[7]);
2198  rdir->GetObject("TEC/Expectedwidth_sas_layer2tec",refplotsTEC[8]);
2199  rdir->GetObject("TEC/Expectedwidth_sas_layer5tec",refplotsTEC[9]);
2200  sdir->GetObject("TEC/Expectedwidth_rphi_layer1tec",newplotsTEC[0]);
2201  sdir->GetObject("TEC/Expectedwidth_rphi_layer2tec",newplotsTEC[1]);
2202  sdir->GetObject("TEC/Expectedwidth_rphi_layer3tec",newplotsTEC[2]);
2203  sdir->GetObject("TEC/Expectedwidth_rphi_layer4tec",newplotsTEC[3]);
2204  sdir->GetObject("TEC/Expectedwidth_rphi_layer5tec",newplotsTEC[4]);
2205  sdir->GetObject("TEC/Expectedwidth_rphi_layer6tec",newplotsTEC[5]);
2206  sdir->GetObject("TEC/Expectedwidth_rphi_layer7tec",newplotsTEC[6]);
2207  sdir->GetObject("TEC/Expectedwidth_sas_layer1tec",newplotsTEC[7]);
2208  sdir->GetObject("TEC/Expectedwidth_sas_layer2tec",newplotsTEC[8]);
2209  sdir->GetObject("TEC/Expectedwidth_sas_layer5tec",newplotsTEC[9]);
2210  
2211  Strip = new TCanvas("Strip","Strip",1000,1000);
2212  Strip->Divide(4,3);
2213  for (Int_t i=0; i<10; i++) {
2214    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2215    Strip->cd(i+1);
2216    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2217    refplotsTEC[i]->Draw();
2218    newplotsTEC[i]->Draw("sames");
2219    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2220  }
2221  
2222  Strip->Print("ExpectedwidthTECCompare.eps");
2223  Strip->Print("ExpectedwidthTECCompare.gif");
2224 
2225  rdir->GetObject("TEC/Category_rphi_layer1tec",refplotsTEC[0]);
2226  rdir->GetObject("TEC/Category_rphi_layer2tec",refplotsTEC[1]);
2227  rdir->GetObject("TEC/Category_rphi_layer3tec",refplotsTEC[2]);
2228  rdir->GetObject("TEC/Category_rphi_layer4tec",refplotsTEC[3]);
2229  rdir->GetObject("TEC/Category_rphi_layer5tec",refplotsTEC[4]);
2230  rdir->GetObject("TEC/Category_rphi_layer6tec",refplotsTEC[5]);
2231  rdir->GetObject("TEC/Category_rphi_layer7tec",refplotsTEC[6]);
2232  rdir->GetObject("TEC/Category_sas_layer1tec",refplotsTEC[7]);
2233  rdir->GetObject("TEC/Category_sas_layer2tec",refplotsTEC[8]);
2234  rdir->GetObject("TEC/Category_sas_layer5tec",refplotsTEC[9]);
2235  sdir->GetObject("TEC/Category_rphi_layer1tec",newplotsTEC[0]);
2236  sdir->GetObject("TEC/Category_rphi_layer2tec",newplotsTEC[1]);
2237  sdir->GetObject("TEC/Category_rphi_layer3tec",newplotsTEC[2]);
2238  sdir->GetObject("TEC/Category_rphi_layer4tec",newplotsTEC[3]);
2239  sdir->GetObject("TEC/Category_rphi_layer5tec",newplotsTEC[4]);
2240  sdir->GetObject("TEC/Category_rphi_layer6tec",newplotsTEC[5]);
2241  sdir->GetObject("TEC/Category_rphi_layer7tec",newplotsTEC[6]);
2242  sdir->GetObject("TEC/Category_sas_layer1tec",newplotsTEC[7]);
2243  sdir->GetObject("TEC/Category_sas_layer2tec",newplotsTEC[8]);
2244  sdir->GetObject("TEC/Category_sas_layer5tec",newplotsTEC[9]);
2245  
2246  Strip = new TCanvas("Strip","Strip",1000,1000);
2247  Strip->Divide(4,3);
2248  for (Int_t i=0; i<10; i++) {
2249    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2250    Strip->cd(i+1);
2251    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2252    refplotsTEC[i]->Draw();
2253    newplotsTEC[i]->Draw("sames");
2254    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2255  }
2256  
2257  Strip->Print("CategoryTECCompare.eps");
2258  Strip->Print("CategoryTECCompare.gif");
2259 
2260  /*
2261  rdir->GetObject("TEC/PullTrackangleProfile_rphi_layer1tec",PullTrackangleProfiletec[0]);
2262  rdir->GetObject("TEC/PullTrackangleProfile_rphi_layer2tec",PullTrackangleProfiletec[1]);
2263  rdir->GetObject("TEC/PullTrackangleProfile_rphi_layer3tec",PullTrackangleProfiletec[2]);
2264  rdir->GetObject("TEC/PullTrackangleProfile_rphi_layer4tec",PullTrackangleProfiletec[3]);
2265  rdir->GetObject("TEC/PullTrackangleProfile_rphi_layer5tec",PullTrackangleProfiletec[4]);
2266  rdir->GetObject("TEC/PullTrackangleProfile_rphi_layer6tec",PullTrackangleProfiletec[5]);
2267  rdir->GetObject("TEC/PullTrackangleProfile_rphi_layer7tec",PullTrackangleProfiletec[6]);
2268  rdir->GetObject("TEC/PullTrackangleProfile_sas_layer1tec",PullTrackangleProfiletec[7]);
2269  rdir->GetObject("TEC/PullTrackangleProfile_sas_layer2tec",PullTrackangleProfiletec[8]);
2270  rdir->GetObject("TEC/PullTrackangleProfile_sas_layer5tec",PullTrackangleProfiletec[9]);
2271  sdir->GetObject("TEC/PullTrackangleProfile_rphi_layer1tec",newPullTrackangleProfiletec[0]);
2272  sdir->GetObject("TEC/PullTrackangleProfile_rphi_layer2tec",newPullTrackangleProfiletec[1]);
2273  sdir->GetObject("TEC/PullTrackangleProfile_rphi_layer3tec",newPullTrackangleProfiletec[2]);
2274  sdir->GetObject("TEC/PullTrackangleProfile_rphi_layer4tec",newPullTrackangleProfiletec[3]);
2275  sdir->GetObject("TEC/PullTrackangleProfile_rphi_layer5tec",newPullTrackangleProfiletec[4]);
2276  sdir->GetObject("TEC/PullTrackangleProfile_rphi_layer6tec",newPullTrackangleProfiletec[5]);
2277  sdir->GetObject("TEC/PullTrackangleProfile_rphi_layer7tec",newPullTrackangleProfiletec[6]);
2278  sdir->GetObject("TEC/PullTrackangleProfile_sas_layer1tec",newPullTrackangleProfiletec[7]);
2279  sdir->GetObject("TEC/PullTrackangleProfile_sas_layer2tec",newPullTrackangleProfiletec[8]);
2280  sdir->GetObject("TEC/PullTrackangleProfile_sas_layer5tec",newPullTrackangleProfiletec[9]);
2281  
2282  Strip = new TCanvas("Strip","Strip",1000,1000);
2283  Strip->Divide(4,3);
2284  for (Int_t i=0; i<10; i++) {
2285    Strip->cd(i+1);
2286    PullTrackangleProfiletec[i]->SetLineColor(2);
2287    newPullTrackangleProfiletec[i]->SetLineColor(4);
2288     newPullTrackangleProfiletec[i]->SetLineStyle(2);
2289     PullTrackangleProfiletec[i]->Draw();
2290     newPullTrackangleProfiletec[i]->Draw("sames");
2291     //myPV->PVCompute(PullTrackangleProfiletec[i] , newPullTrackangleProfiletec[i] , te );
2292  }
2293  
2294  Strip->Print("PullTrackangleProfileTECCompare.eps");
2295 
2296  rdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer1tec",PullTrackwidthProfiletec[0]);
2297  rdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer2tec",PullTrackwidthProfiletec[1]);
2298  rdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer3tec",PullTrackwidthProfiletec[2]);
2299  rdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer4tec",PullTrackwidthProfiletec[3]);
2300  rdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer5tec",PullTrackwidthProfiletec[4]);
2301  rdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer6tec",PullTrackwidthProfiletec[5]);
2302  rdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer7tec",PullTrackwidthProfiletec[6]);
2303  rdir->GetObject("TEC/PullTrackwidthProfile_sas_layer1tec",PullTrackwidthProfiletec[7]);
2304  rdir->GetObject("TEC/PullTrackwidthProfile_sas_layer2tec",PullTrackwidthProfiletec[8]);
2305  rdir->GetObject("TEC/PullTrackwidthProfile_sas_layer5tec",PullTrackwidthProfiletec[9]);
2306  sdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer1tec",newPullTrackwidthProfiletec[0]);
2307  sdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer2tec",newPullTrackwidthProfiletec[1]);
2308  sdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer3tec",newPullTrackwidthProfiletec[2]);
2309  sdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer4tec",newPullTrackwidthProfiletec[3]);
2310  sdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer5tec",newPullTrackwidthProfiletec[4]);
2311  sdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer6tec",newPullTrackwidthProfiletec[5]);
2312  sdir->GetObject("TEC/PullTrackwidthProfile_rphi_layer7tec",newPullTrackwidthProfiletec[6]);
2313  sdir->GetObject("TEC/PullTrackwidthProfile_sas_layer1tec",newPullTrackwidthProfiletec[7]);
2314  sdir->GetObject("TEC/PullTrackwidthProfile_sas_layer2tec",newPullTrackwidthProfiletec[8]);
2315  sdir->GetObject("TEC/PullTrackwidthProfile_sas_layer5tec",newPullTrackwidthProfiletec[9]);
2316  
2317  Strip = new TCanvas("Strip","Strip",1000,1000);
2318  Strip->Divide(4,3);
2319  for (Int_t i=0; i<10; i++) {
2320    Strip->cd(i+1);
2321    PullTrackwidthProfiletec[i]->SetLineColor(2);
2322    newPullTrackwidthProfiletec[i]->SetLineColor(4);
2323     newPullTrackwidthProfiletec[i]->SetLineStyle(2);
2324     PullTrackwidthProfiletec[i]->Draw();
2325     newPullTrackwidthProfiletec[i]->Draw("sames");
2326     //myPV->PVCompute(PullTrackwidthProfiletec[i] , newPullTrackwidthProfiletec[i] , te );
2327  }
2328  
2329  Strip->Print("PullTrackwidthProfileTECCompare.eps");
2330  */
2331  rdir->GetObject("TEC/Nstp_rphi_layer1tec",refplotsTEC[0]);
2332  rdir->GetObject("TEC/Nstp_rphi_layer2tec",refplotsTEC[1]);
2333  rdir->GetObject("TEC/Nstp_rphi_layer3tec",refplotsTEC[2]);
2334  rdir->GetObject("TEC/Nstp_rphi_layer4tec",refplotsTEC[3]);
2335  rdir->GetObject("TEC/Nstp_rphi_layer5tec",refplotsTEC[4]);
2336  rdir->GetObject("TEC/Nstp_rphi_layer6tec",refplotsTEC[5]);
2337  rdir->GetObject("TEC/Nstp_rphi_layer7tec",refplotsTEC[6]);
2338  rdir->GetObject("TEC/Nstp_sas_layer1tec",refplotsTEC[7]);
2339  rdir->GetObject("TEC/Nstp_sas_layer2tec",refplotsTEC[8]);
2340  rdir->GetObject("TEC/Nstp_sas_layer5tec",refplotsTEC[9]);
2341  sdir->GetObject("TEC/Nstp_rphi_layer1tec",newplotsTEC[0]);
2342  sdir->GetObject("TEC/Nstp_rphi_layer2tec",newplotsTEC[1]);
2343  sdir->GetObject("TEC/Nstp_rphi_layer3tec",newplotsTEC[2]);
2344  sdir->GetObject("TEC/Nstp_rphi_layer4tec",newplotsTEC[3]);
2345  sdir->GetObject("TEC/Nstp_rphi_layer5tec",newplotsTEC[4]);
2346  sdir->GetObject("TEC/Nstp_rphi_layer6tec",newplotsTEC[5]);
2347  sdir->GetObject("TEC/Nstp_rphi_layer7tec",newplotsTEC[6]);
2348  sdir->GetObject("TEC/Nstp_sas_layer1tec",newplotsTEC[7]);
2349  sdir->GetObject("TEC/Nstp_sas_layer2tec",newplotsTEC[8]);
2350  sdir->GetObject("TEC/Nstp_sas_layer5tec",newplotsTEC[9]);
2351 
2352  Strip = new TCanvas("Strip","Strip",1000,1000);
2353  Strip->Divide(4,3);
2354  for (Int_t i=0; i<10; i++) {
2355    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2356    Strip->cd(i+1);
2357    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2358    refplotsTEC[i]->Draw();
2359    newplotsTEC[i]->Draw("sames");
2360    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2361  }
2362  
2363  Strip->Print("NstpTECCompare.eps");
2364  Strip->Print("NstpTECCompare.gif");
2365 
2366  rdir->GetObject("TEC/Posx_rphi_layer1tec",refplotsTEC[0]);
2367  rdir->GetObject("TEC/Posx_rphi_layer2tec",refplotsTEC[1]);
2368  rdir->GetObject("TEC/Posx_rphi_layer3tec",refplotsTEC[2]);
2369  rdir->GetObject("TEC/Posx_rphi_layer4tec",refplotsTEC[3]);
2370  rdir->GetObject("TEC/Posx_rphi_layer5tec",refplotsTEC[4]);
2371  rdir->GetObject("TEC/Posx_rphi_layer6tec",refplotsTEC[5]);
2372  rdir->GetObject("TEC/Posx_rphi_layer7tec",refplotsTEC[6]);
2373  rdir->GetObject("TEC/Posx_sas_layer1tec",refplotsTEC[7]);
2374  rdir->GetObject("TEC/Posx_sas_layer2tec",refplotsTEC[8]);
2375  rdir->GetObject("TEC/Posx_sas_layer5tec",refplotsTEC[9]);
2376  sdir->GetObject("TEC/Posx_rphi_layer1tec",newplotsTEC[0]);
2377  sdir->GetObject("TEC/Posx_rphi_layer2tec",newplotsTEC[1]);
2378  sdir->GetObject("TEC/Posx_rphi_layer3tec",newplotsTEC[2]);
2379  sdir->GetObject("TEC/Posx_rphi_layer4tec",newplotsTEC[3]);
2380  sdir->GetObject("TEC/Posx_rphi_layer5tec",newplotsTEC[4]);
2381  sdir->GetObject("TEC/Posx_rphi_layer6tec",newplotsTEC[5]);
2382  sdir->GetObject("TEC/Posx_rphi_layer7tec",newplotsTEC[6]);
2383  sdir->GetObject("TEC/Posx_sas_layer1tec",newplotsTEC[7]);
2384  sdir->GetObject("TEC/Posx_sas_layer2tec",newplotsTEC[8]);
2385  sdir->GetObject("TEC/Posx_sas_layer5tec",newplotsTEC[9]);
2386 
2387  Strip = new TCanvas("Strip","Strip",1000,1000);
2388  Strip->Divide(4,3);
2389  for (Int_t i=0; i<10; i++) {
2390    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2391    Strip->cd(i+1);
2392    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2393    refplotsTEC[i]->Draw();
2394    newplotsTEC[i]->Draw("sames");
2395    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2396  }
2397   
2398  Strip->Print("PosTECCompare.eps");
2399  Strip->Print("PosTECCompare.gif");
2400   
2401 
2402  rdir->GetObject("TEC/Errx_LF_rphi_layer1tec",refplotsTEC[0]);
2403  rdir->GetObject("TEC/Errx_LF_rphi_layer2tec",refplotsTEC[1]);
2404  rdir->GetObject("TEC/Errx_LF_rphi_layer3tec",refplotsTEC[2]);
2405  rdir->GetObject("TEC/Errx_LF_rphi_layer4tec",refplotsTEC[3]);
2406  rdir->GetObject("TEC/Errx_LF_rphi_layer5tec",refplotsTEC[4]);
2407  rdir->GetObject("TEC/Errx_LF_rphi_layer6tec",refplotsTEC[5]);
2408  rdir->GetObject("TEC/Errx_LF_rphi_layer7tec",refplotsTEC[6]);
2409  rdir->GetObject("TEC/Errx_LF_sas_layer1tec",refplotsTEC[7]);
2410  rdir->GetObject("TEC/Errx_LF_sas_layer2tec",refplotsTEC[8]);
2411  rdir->GetObject("TEC/Errx_LF_sas_layer5tec",refplotsTEC[9]);
2412  sdir->GetObject("TEC/Errx_LF_rphi_layer1tec",newplotsTEC[0]);
2413  sdir->GetObject("TEC/Errx_LF_rphi_layer2tec",newplotsTEC[1]);
2414  sdir->GetObject("TEC/Errx_LF_rphi_layer3tec",newplotsTEC[2]);
2415  sdir->GetObject("TEC/Errx_LF_rphi_layer4tec",newplotsTEC[3]);
2416  sdir->GetObject("TEC/Errx_LF_rphi_layer5tec",newplotsTEC[4]);
2417  sdir->GetObject("TEC/Errx_LF_rphi_layer6tec",newplotsTEC[5]);
2418  sdir->GetObject("TEC/Errx_LF_rphi_layer7tec",newplotsTEC[6]);
2419  sdir->GetObject("TEC/Errx_LF_sas_layer1tec",newplotsTEC[7]);
2420  sdir->GetObject("TEC/Errx_LF_sas_layer2tec",newplotsTEC[8]);
2421  sdir->GetObject("TEC/Errx_LF_sas_layer5tec",newplotsTEC[9]);
2422 
2423  Strip = new TCanvas("Strip","Strip",1000,1000);
2424  Strip->Divide(4,3);
2425  for (Int_t i=0; i<10; i++) {
2426    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2427    Strip->cd(i+1);
2428    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2429    refplotsTEC[i]->Draw();
2430    newplotsTEC[i]->Draw("sames");
2431    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2432  }
2433   
2434  Strip->Print("ErrxLFTECCompare.eps");
2435  Strip->Print("ErrxLFTECCompare.gif");
2436   
2437  rdir->GetObject("TEC/Errx_MF_rphi_layer1tec",refplotsTEC[0]);
2438  rdir->GetObject("TEC/Errx_MF_rphi_layer2tec",refplotsTEC[1]);
2439  rdir->GetObject("TEC/Errx_MF_rphi_layer3tec",refplotsTEC[2]);
2440  rdir->GetObject("TEC/Errx_MF_rphi_layer4tec",refplotsTEC[3]);
2441  rdir->GetObject("TEC/Errx_MF_rphi_layer5tec",refplotsTEC[4]);
2442  rdir->GetObject("TEC/Errx_MF_rphi_layer6tec",refplotsTEC[5]);
2443  rdir->GetObject("TEC/Errx_MF_rphi_layer7tec",refplotsTEC[6]);
2444  rdir->GetObject("TEC/Errx_MF_sas_layer1tec",refplotsTEC[7]);
2445  rdir->GetObject("TEC/Errx_MF_sas_layer2tec",refplotsTEC[8]);
2446  rdir->GetObject("TEC/Errx_MF_sas_layer5tec",refplotsTEC[9]);
2447  sdir->GetObject("TEC/Errx_MF_rphi_layer1tec",newplotsTEC[0]);
2448  sdir->GetObject("TEC/Errx_MF_rphi_layer2tec",newplotsTEC[1]);
2449  sdir->GetObject("TEC/Errx_MF_rphi_layer3tec",newplotsTEC[2]);
2450  sdir->GetObject("TEC/Errx_MF_rphi_layer4tec",newplotsTEC[3]);
2451  sdir->GetObject("TEC/Errx_MF_rphi_layer5tec",newplotsTEC[4]);
2452  sdir->GetObject("TEC/Errx_MF_rphi_layer6tec",newplotsTEC[5]);
2453  sdir->GetObject("TEC/Errx_MF_rphi_layer7tec",newplotsTEC[6]);
2454  sdir->GetObject("TEC/Errx_MF_sas_layer1tec",newplotsTEC[7]);
2455  sdir->GetObject("TEC/Errx_MF_sas_layer2tec",newplotsTEC[8]);
2456  sdir->GetObject("TEC/Errx_MF_sas_layer5tec",newplotsTEC[9]);
2457 
2458  Strip = new TCanvas("Strip","Strip",1000,1000);
2459  Strip->Divide(4,3);
2460  for (Int_t i=0; i<10; i++) {
2461    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2462    Strip->cd(i+1);
2463    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2464    refplotsTEC[i]->Draw();
2465    newplotsTEC[i]->Draw("sames");
2466    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2467  }
2468   
2469  Strip->Print("ErrxMFTECCompare.eps");
2470  Strip->Print("ErrxMFTECCompare.gif");
2471   
2472  
2473  rdir->GetObject("TEC/Res_LF_rphi_layer1tec",refplotsTEC[0]);
2474  rdir->GetObject("TEC/Res_LF_rphi_layer2tec",refplotsTEC[1]);
2475  rdir->GetObject("TEC/Res_LF_rphi_layer3tec",refplotsTEC[2]);
2476  rdir->GetObject("TEC/Res_LF_rphi_layer4tec",refplotsTEC[3]);
2477  rdir->GetObject("TEC/Res_LF_rphi_layer5tec",refplotsTEC[4]);
2478  rdir->GetObject("TEC/Res_LF_rphi_layer6tec",refplotsTEC[5]);
2479  rdir->GetObject("TEC/Res_LF_rphi_layer7tec",refplotsTEC[6]);
2480  rdir->GetObject("TEC/Res_LF_sas_layer1tec",refplotsTEC[7]);
2481  rdir->GetObject("TEC/Res_LF_sas_layer2tec",refplotsTEC[8]);
2482  rdir->GetObject("TEC/Res_LF_sas_layer5tec",refplotsTEC[9]);
2483  sdir->GetObject("TEC/Res_LF_rphi_layer1tec",newplotsTEC[0]);
2484  sdir->GetObject("TEC/Res_LF_rphi_layer2tec",newplotsTEC[1]);
2485  sdir->GetObject("TEC/Res_LF_rphi_layer3tec",newplotsTEC[2]);
2486  sdir->GetObject("TEC/Res_LF_rphi_layer4tec",newplotsTEC[3]);
2487  sdir->GetObject("TEC/Res_LF_rphi_layer5tec",newplotsTEC[4]);
2488  sdir->GetObject("TEC/Res_LF_rphi_layer6tec",newplotsTEC[5]);
2489  sdir->GetObject("TEC/Res_LF_rphi_layer7tec",newplotsTEC[6]);
2490  sdir->GetObject("TEC/Res_LF_sas_layer1tec",newplotsTEC[7]);
2491  sdir->GetObject("TEC/Res_LF_sas_layer2tec",newplotsTEC[8]);
2492  sdir->GetObject("TEC/Res_LF_sas_layer5tec",newplotsTEC[9]);
2493 
2494  Strip = new TCanvas("Strip","Strip",1000,1000);
2495  Strip->Divide(4,3);
2496  for (Int_t i=0; i<10; i++) {
2497    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2498    Strip->cd(i+1);
2499    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2500    refplotsTEC[i]->Draw();
2501    newplotsTEC[i]->Draw("sames");
2502    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2503  }
2504   
2505  Strip->Print("ResLFTECCompare.eps");
2506  Strip->Print("ResLFTECCompare.gif");
2507 
2508 
2509  rdir->GetObject("TEC/Res_MF_rphi_layer1tec",refplotsTEC[0]);
2510  rdir->GetObject("TEC/Res_MF_rphi_layer2tec",refplotsTEC[1]);
2511  rdir->GetObject("TEC/Res_MF_rphi_layer3tec",refplotsTEC[2]);
2512  rdir->GetObject("TEC/Res_MF_rphi_layer4tec",refplotsTEC[3]);
2513  rdir->GetObject("TEC/Res_MF_rphi_layer5tec",refplotsTEC[4]);
2514  rdir->GetObject("TEC/Res_MF_rphi_layer6tec",refplotsTEC[5]);
2515  rdir->GetObject("TEC/Res_MF_rphi_layer7tec",refplotsTEC[6]);
2516  rdir->GetObject("TEC/Res_MF_sas_layer1tec",refplotsTEC[7]);
2517  rdir->GetObject("TEC/Res_MF_sas_layer2tec",refplotsTEC[8]);
2518  rdir->GetObject("TEC/Res_MF_sas_layer5tec",refplotsTEC[9]);
2519  sdir->GetObject("TEC/Res_MF_rphi_layer1tec",newplotsTEC[0]);
2520  sdir->GetObject("TEC/Res_MF_rphi_layer2tec",newplotsTEC[1]);
2521  sdir->GetObject("TEC/Res_MF_rphi_layer3tec",newplotsTEC[2]);
2522  sdir->GetObject("TEC/Res_MF_rphi_layer4tec",newplotsTEC[3]);
2523  sdir->GetObject("TEC/Res_MF_rphi_layer5tec",newplotsTEC[4]);
2524  sdir->GetObject("TEC/Res_MF_rphi_layer6tec",newplotsTEC[5]);
2525  sdir->GetObject("TEC/Res_MF_rphi_layer7tec",newplotsTEC[6]);
2526  sdir->GetObject("TEC/Res_MF_sas_layer1tec",newplotsTEC[7]);
2527  sdir->GetObject("TEC/Res_MF_sas_layer2tec",newplotsTEC[8]);
2528  sdir->GetObject("TEC/Res_MF_sas_layer5tec",newplotsTEC[9]);
2529 
2530  Strip = new TCanvas("Strip","Strip",1000,1000);
2531  Strip->Divide(4,3);
2532  for (Int_t i=0; i<10; i++) {
2533    if (refplotsTEC[i]->GetEntries() == 0 || newplotsTEC[i]->GetEntries() == 0) continue;
2534    Strip->cd(i+1);
2535    SetUpHistograms(refplotsTEC[i],newplotsTEC[i]);
2536    refplotsTEC[i]->Draw();
2537    newplotsTEC[i]->Draw("sames");
2538    myPV->PVCompute(refplotsTEC[i] , newplotsTEC[i] , te );
2539  }
2540   
2541  Strip->Print("ResMFTECCompare.eps");
2542  Strip->Print("ResMFTECCompare.gif");
2543 
2544 
2545 
2546   /*
2547  rdir->GetObject("TEC/Chi2_rphi_layer1tec",chi2tec[0]);
2548  rdir->GetObject("TEC/Chi2_rphi_layer2tec",chi2tec[1]);
2549  rdir->GetObject("TEC/Chi2_rphi_layer3tec",chi2tec[2]);
2550  rdir->GetObject("TEC/Chi2_rphi_layer4tec",chi2tec[3]);
2551  rdir->GetObject("TEC/Chi2_rphi_layer5tec",chi2tec[4]);
2552  rdir->GetObject("TEC/Chi2_rphi_layer6tec",chi2tec[5]);
2553  rdir->GetObject("TEC/Chi2_rphi_layer7tec",chi2tec[6]);
2554  rdir->GetObject("TEC/Chi2_sas_layer1tec",chi2tec[7]);
2555  rdir->GetObject("TEC/Chi2_sas_layer2tec",chi2tec[8]);
2556  rdir->GetObject("TEC/Chi2_sas_layer5tec",chi2tec[9]);
2557  sdir->GetObject("TEC/Chi2_rphi_layer1tec",newchi2tec[0]);
2558  sdir->GetObject("TEC/Chi2_rphi_layer2tec",newchi2tec[1]);
2559  sdir->GetObject("TEC/Chi2_rphi_layer3tec",newchi2tec[2]);
2560  sdir->GetObject("TEC/Chi2_rphi_layer4tec",newchi2tec[3]);
2561  sdir->GetObject("TEC/Chi2_rphi_layer5tec",newchi2tec[4]);
2562  sdir->GetObject("TEC/Chi2_rphi_layer6tec",newchi2tec[5]);
2563  sdir->GetObject("TEC/Chi2_rphi_layer7tec",newchi2tec[6]);
2564  sdir->GetObject("TEC/Chi2_sas_layer1tec",newchi2tec[7]);
2565  sdir->GetObject("TEC/Chi2_sas_layer2tec",newchi2tec[8]);
2566  sdir->GetObject("TEC/Chi2_sas_layer5tec",newchi2tec[9]);
2567 
2568   Strip = new TCanvas("Strip","Strip",1000,1000);
2569   Strip->Divide(4,3);
2570   for (Int_t i=0; i<10; i++) {
2571     Strip->cd(i+1);
2572     chi2tec[i]->SetLineColor(2);
2573    refplotsTEC[i]->Add( refplotsTEC[i],refplotsTEC[i], 1/(refplotsTEC[i]->GetEntries()),0.);
2574     newchi2tec[i]->SetLineColor(4);
2575     newchi2tec[i]->SetLineStyle(2);
2576     chi2tec[i]->Draw();
2577     newchi2tec[i]->Draw("sames");
2578     myPV->PVCompute(chi2tec[i] , newchi2tec[i] , te );
2579   }
2580   
2581   Strip->Print("Chi2TECCompare.eps");
2582   */
2583  rdir->GetObject("TEC/Posx_matched_layer1tec",matchedtec1[0]);
2584  rdir->GetObject("TEC/Posy_matched_layer1tec",matchedtec1[1]);
2585  rdir->GetObject("TEC/Posx_matched_layer2tec",matchedtec1[2]);
2586  rdir->GetObject("TEC/Posy_matched_layer2tec",matchedtec1[3]);
2587  rdir->GetObject("TEC/Posx_matched_layer5tec",matchedtec1[4]);
2588  rdir->GetObject("TEC/Posy_matched_layer5tec",matchedtec1[5]);
2589  rdir->GetObject("TEC/Errx_matched_layer1tec",matchedtec1[6]);
2590  rdir->GetObject("TEC/Erry_matched_layer1tec",matchedtec1[7]);
2591  rdir->GetObject("TEC/Errx_matched_layer2tec",matchedtec1[8]);
2592  rdir->GetObject("TEC/Erry_matched_layer2tec",matchedtec1[9]);
2593  rdir->GetObject("TEC/Errx_matched_layer5tec",matchedtec1[10]);
2594  rdir->GetObject("TEC/Erry_matched_layer5tec",matchedtec1[11]);
2595  sdir->GetObject("TEC/Posx_matched_layer1tec",newmatchedtec1[0]);
2596  sdir->GetObject("TEC/Posy_matched_layer1tec",newmatchedtec1[1]);
2597  sdir->GetObject("TEC/Posx_matched_layer2tec",newmatchedtec1[2]);
2598  sdir->GetObject("TEC/Posy_matched_layer2tec",newmatchedtec1[3]);
2599  sdir->GetObject("TEC/Posx_matched_layer5tec",newmatchedtec1[4]);
2600  sdir->GetObject("TEC/Posy_matched_layer5tec",newmatchedtec1[5]);
2601  sdir->GetObject("TEC/Errx_matched_layer1tec",newmatchedtec1[6]);
2602  sdir->GetObject("TEC/Erry_matched_layer1tec",newmatchedtec1[7]);
2603  sdir->GetObject("TEC/Errx_matched_layer2tec",newmatchedtec1[8]);
2604  sdir->GetObject("TEC/Erry_matched_layer2tec",newmatchedtec1[9]);
2605  sdir->GetObject("TEC/Errx_matched_layer5tec",newmatchedtec1[10]);
2606  sdir->GetObject("TEC/Erry_matched_layer5tec",newmatchedtec1[11]);
2607 
2608  Strip = new TCanvas("Strip","Strip",1000,1000);
2609  Strip->Divide(4,3);
2610  for (Int_t i=0; i<12; i++) {
2611    if (matchedtec1[i]->GetEntries() == 0 || newmatchedtec1[i]->GetEntries() == 0) continue;
2612    Strip->cd(i+1);
2613    SetUpHistograms(matchedtec1[i],newmatchedtec1[i]);
2614    matchedtec1[i]->Draw();
2615    newmatchedtec1[i]->Draw("sames");
2616    myPV->PVCompute(matchedtec1[i] , newmatchedtec1[i] , te );
2617  }
2618  
2619  Strip->Print("MatchedTECCompare_1.eps");
2620  Strip->Print("MatchedTECCompare_1.gif");
2621  
2622  rdir->GetObject("TEC/Resx_matched_layer1tec",matchedtec2[0]);
2623  rdir->GetObject("TEC/Resy_matched_layer1tec",matchedtec2[1]);
2624  rdir->GetObject("TEC/Resx_matched_layer2tec",matchedtec2[2]);
2625  rdir->GetObject("TEC/Resy_matched_layer2tec",matchedtec2[3]);
2626  rdir->GetObject("TEC/Resx_matched_layer5tec",matchedtec2[4]);
2627  rdir->GetObject("TEC/Resy_matched_layer5tec",matchedtec2[5]);
2628  rdir->GetObject("TEC/Pullx_matched_layer1tec",matchedtec2[6]);
2629  rdir->GetObject("TEC/Pully_matched_layer1tec",matchedtec2[7]);
2630  rdir->GetObject("TEC/Pullx_matched_layer2tec",matchedtec2[8]);
2631  rdir->GetObject("TEC/Pully_matched_layer2tec",matchedtec2[9]);
2632  rdir->GetObject("TEC/Pullx_matched_layer5tec",matchedtec2[10]);
2633  rdir->GetObject("TEC/Pully_matched_layer5tec",matchedtec2[11]);
2634  sdir->GetObject("TEC/Resx_matched_layer1tec",newmatchedtec2[0]);
2635  sdir->GetObject("TEC/Resy_matched_layer1tec",newmatchedtec2[1]);
2636  sdir->GetObject("TEC/Resx_matched_layer2tec",newmatchedtec2[2]);
2637  sdir->GetObject("TEC/Resy_matched_layer2tec",newmatchedtec2[3]);
2638  sdir->GetObject("TEC/Resx_matched_layer5tec",newmatchedtec2[4]);
2639  sdir->GetObject("TEC/Resy_matched_layer5tec",newmatchedtec2[5]);
2640  sdir->GetObject("TEC/Pullx_matched_layer1tec",newmatchedtec2[6]);
2641  sdir->GetObject("TEC/Pully_matched_layer1tec",newmatchedtec2[7]);
2642  sdir->GetObject("TEC/Pullx_matched_layer2tec",newmatchedtec2[8]);
2643  sdir->GetObject("TEC/Pully_matched_layer2tec",newmatchedtec2[9]);
2644  sdir->GetObject("TEC/Pullx_matched_layer5tec",newmatchedtec2[10]);
2645  sdir->GetObject("TEC/Pully_matched_layer5tec",newmatchedtec2[11]);
2646 
2647  Strip = new TCanvas("Strip","Strip",1000,1000);
2648  Strip->Divide(4,3);
2649  for (Int_t i=0; i<12; i++) {
2650    if (matchedtec2[i]->GetEntries() == 0 || newmatchedtec2[i]->GetEntries() == 0) continue;
2651    Strip->cd(i+1);
2652    SetUpHistograms(matchedtec2[i],newmatchedtec2[i]);
2653    matchedtec2[i]->Draw();
2654    newmatchedtec2[i]->Draw("sames");
2655    myPV->PVCompute(matchedtec2[i] , newmatchedtec2[i] , te );
2656  }
2657  
2658  Strip->Print("MatchedTECCompare_2.eps");
2659  Strip->Print("MatchedTECCompare_2.gif");
2660 
2661 
2662  /*
2663  rdir->GetObject("TEC/Chi2_matched_layer1tec",matchedchi2tec[0]);
2664  rdir->GetObject("TEC/Chi2_matched_layer2tec",matchedchi2tec[1]);
2665  rdir->GetObject("TEC/Chi2_matched_layer5tec",matchedchi2tec[2]);
2666  sdir->GetObject("TEC/Chi2_matched_layer1tec",newmatchedchi2tec[0]);
2667  sdir->GetObject("TEC/Chi2_matched_layer2tec",newmatchedchi2tec[1]);
2668  sdir->GetObject("TEC/Chi2_matched_layer5tec",newmatchedchi2tec[2]);
2669 
2670  Strip = new TCanvas("Strip","Strip",1000,1000);
2671  Strip->Divide(2,3);
2672  for (Int_t i=0; i<6; i++) {
2673    Strip->cd(i+1);
2674    matchedchi2tec[i]->SetLineColor(2);
2675    newmatchedchi2tec[i]->SetLineColor(4);
2676    newmatchedchi2tec[i]->SetLineStyle(2);
2677    matchedchi2tec[i]->Draw();
2678    newmatchedchi2tec[i]->Draw("sames");
2679    myPV->PVCompute(matchedchi2tec[i] , newmatchedchi2tec[i] , te );
2680  }
2681  
2682  Strip->Print("MatchedChi2TECCompare.eps");
2683  */
2684 }
2685