]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCComparison.C
Restored backward compatibility to use the hits from Dec. 2000 production.
[u/mrichter/AliRoot.git] / TPC / AliTPCComparison.C
index 056f67f20f764009572e15534ef544d1ff04ff29..e31f8a0ba3b98c75c5cef14235db06289b628236 100644 (file)
@@ -5,7 +5,7 @@
  *             sorts tracks for matching with the ITS,                      *
  *             calculates efficiency, resolutions etc.                      *
  *                                                                          *
- *           Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch                 *
+ *           Origin: J.Belikov, CERN, Jouri.Belikov@cern.ch                 *
  * with several nice improvements by: M.Ivanov, GSI, m.ivanov@gsi.de        *
  ****************************************************************************/
 
@@ -292,7 +292,16 @@ Int_t good_tracks_tpc(GoodTrackTPC *gt, const Int_t max, const Int_t event) {
    Int_t ver = TPC->IsVersion(); 
    cerr<<"TPC version "<<ver<<" has been found !\n";
 
-   AliTPCParam *digp=(AliTPCParam*)file->Get("75x40_100x60");
+   AliTPCParamSR *digp=(AliTPCParamSR*)file->Get("75x40_100x60");
+   if(digp){
+    cerr<<"2 pad-lenght geom hits with 3 pad-length geom digits...\n";
+    delete digp;
+    digp = new AliTPCParamSR();
+   }
+   else
+   {
+     digp =(AliTPCParamSR *)gDirectory->Get("75x40_100x60_150x60");
+   }
    if (!digp) { cerr<<"TPC parameters have not been found !\n"; exit(6); }
    TPC->SetParam(digp);
 
@@ -350,7 +359,7 @@ Int_t good_tracks_tpc(GoodTrackTPC *gt, const Int_t max, const Int_t event) {
      break;
    case 2:
      {
-      char dname[100]; sprintf(dname,"TreeD_75x40_100x60_%d",event);
+      char dname[100]; sprintf(dname,"TreeD_75x40_100x60_150x60_%d",event);
       TTree *TD=(TTree*)gDirectory->Get(dname);
       AliSimDigits da, *digits=&da;
       TD->GetBranch("Segment")->SetAddress(&digits);
@@ -372,9 +381,9 @@ Int_t good_tracks_tpc(GoodTrackTPC *gt, const Int_t max, const Int_t event) {
               Int_t idx0=digits->GetTrackID(it,ip,0); 
               Int_t idx1=digits->GetTrackID(it,ip,1);
               Int_t idx2=digits->GetTrackID(it,ip,2);
-              if (idx0>=0 && dig>=zero) count[idx0]+=1;
-              if (idx1>=0 && dig>=zero) count[idx1]+=1;
-              if (idx2>=0 && dig>=zero) count[idx2]+=1;
+              if (idx0>=0 && dig>=zero && idx0<np) count[idx0]+=1;
+              if (idx1>=0 && dig>=zero && idx1<np) count[idx1]+=1;
+              if (idx2>=0 && dig>=zero && idx2<np) count[idx2]+=1;
           } while (digits->Next());
           for (Int_t j=0; j<np; j++) {
               if (count[j]>1) {