]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Only tracks in acceptance taken
authorkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Sep 2003 11:22:14 +0000 (11:22 +0000)
committerkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Sep 2003 11:22:14 +0000 (11:22 +0000)
TPC/AliTPCComparison.C

index 44091e134d53db3da4531884e7d716ab69e7210c..2e34701611ac2bdd9b58986dfd633e834d91397c 100644 (file)
@@ -29,7 +29,7 @@ good_tracks_tpc(GoodTrackTPC *gt, const Int_t max, const char* evfoldname);
 
 extern AliRun *gAlice;
 
-Int_t AliTPCComparison() {
+Int_t AliTPCComparison(Bool_t thcut=1.0) {
 
    if (gAlice) { 
        delete gAlice->GetRunLoader();
@@ -101,16 +101,27 @@ Int_t AliTPCComparison() {
       while (in>>gt[ngood].lab>>gt[ngood].code>>
                  gt[ngood].px>>gt[ngood].py>>gt[ngood].pz>>
                  gt[ngood].x >>gt[ngood].y >>gt[ngood].z) {
-         ngood++;
-         cerr<<ngood<<'\r';
-         if (ngood==MAX) {
-            cerr<<"Too many good tracks !\n";
-            break;
-         }
+       Double_t rin = TMath::Sqrt( gt[ngood].x*gt[ngood].x+gt[ngood].y*gt[ngood].y);
+       if (rin<1) continue;
+       Double_t theta = gt[ngood].z/rin;
+       //theta =0;
+       if (TMath::Abs(theta)<thcut){ 
+         ngood++;
+         cerr<<ngood<<'\r';
+         if (ngood==MAX) {
+           cerr<<"Too many good tracks !\n";
+           break;
+         }     
+       //ngood++;
+        // cerr<<ngood<<'\r';
+        // if (ngood==MAX) {
+        //    cerr<<"Too many good tracks !\n";
+        //    break;
+       }
       }
       if (!in.eof()) cerr<<"Read error (good_tracks_tpc) !\n";
    } else {
-      cerr<<"Marking good tracks (this will take a while)...\n";
+     cerr<<"Marking good tracks (this will take a while)...\n";
       ngood=good_tracks_tpc(gt,MAX,"COMPARISON");
       ofstream out("good_tracks_tpc");
       if (out) {