]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCComparison.C
Removing old classes from LinkDef
[u/mrichter/AliRoot.git] / TPC / AliTPCComparison.C
index 056f67f20f764009572e15534ef544d1ff04ff29..e938a881f15811290f0fb8e7e000b2df710bb91a 100644 (file)
@@ -2,7 +2,6 @@
  *           Very important, delicate and rather obscure macro.             *
  *                                                                          *
  *               Creates list of "trackable" tracks,                        *
- *             sorts tracks for matching with the ITS,                      *
  *             calculates efficiency, resolutions etc.                      *
  *                                                                          *
  *           Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch                 *
@@ -22,6 +21,7 @@ struct GoodTrackTPC {
 };
 
 Int_t AliTPCComparison(Int_t event=0) {
+
    cerr<<"Doing comparison...\n";
 
    const Int_t MAX=20000;
@@ -292,10 +292,12 @@ 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_150x60");
    if (!digp) { cerr<<"TPC parameters have not been found !\n"; exit(6); }
    TPC->SetParam(digp);
 
+   
+
    Int_t nrow_up=digp->GetNRowUp();
    Int_t nrows=digp->GetNRowLow()+nrow_up;
    Int_t zero=digp->GetZeroSup();
@@ -350,7 +352,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 +374,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) {
@@ -416,14 +418,21 @@ Int_t good_tracks_tpc(GoodTrackTPC *gt, const Int_t max, const Int_t event) {
 
       Int_t j=p->GetFirstMother();
       if (j>=0) {
-         TParticle *pp = (TParticle*)gAlice->Particle(j);
-         if (pp->GetFirstMother()>=0) continue;//only one decay is allowed
+        TParticle *pp = (TParticle*)gAlice->Particle(j);
+        if (pp->GetFirstMother()>=0) continue;//only one decay is allowed
+       /*  for cascade hyperons only
+        Int_t jj=pp->GetFirstMother();
+        if (jj>=0) {
+          TParticle *ppp = (TParticle*)gAlice->Particle(jj);
+          if (ppp->GetFirstMother()>=0) continue;//two decays are allowed
+        }
+       */
       }
 
       gt[nt].lab=i;
       gt[nt].code=p->GetPdgCode();
       gt[nt].px=0.; gt[nt].py=0.; gt[nt].pz=0.;
-      gt[nt].x=0.; gt[nt].z=0.; gt[nt].z=0.;
+      gt[nt].x=0.; gt[nt].y=0.; gt[nt].z=0.;
       nt++;
       if (nt==max) {cerr<<"Too many good tracks !\n"; break;}
       cerr<<np-i<<"                \r";