]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDtracker.cxx
adding getter for the streamer info list, do not add streamer infos which are already...
[u/mrichter/AliRoot.git] / PMD / AliPMDtracker.cxx
index a923a37cd316825f7a47c1a68de1d9358ec53478..d91d84e149b9bc468e9a967314c0b307b95a4f24 100644 (file)
@@ -170,7 +170,8 @@ void AliPMDtracker::Clusters2Tracks(AliESDEvent *event)
       return;
     }
   branch1->SetAddress(&fRechits);  
-  
+
+  Int_t ncrhit = 0;
   Int_t   nmodules = (Int_t) branch->GetEntries();
   
   AliDebug(1,Form("Number of modules filled in treeR = %d",nmodules));
@@ -181,8 +182,6 @@ void AliPMDtracker::Clusters2Tracks(AliESDEvent *event)
       AliDebug(2,Form("Number of clusters per modules filled in treeR = %d"
                      ,nentries));
 
-      Int_t ncrhit = 0;
-
       for(Int_t ient = 0; ient < nentries+1; ient++)
        {
          fPMDrecpoint = (AliPMDrecpoint1*)fRecpoints->UncheckedAt(ient);
@@ -194,8 +193,8 @@ void AliPMDtracker::Clusters2Tracks(AliESDEvent *event)
          clusdata[3] = fPMDrecpoint->GetClusCells();
          clusdata[4] = fPMDrecpoint->GetClusSigmaX();
          clusdata[5] = fPMDrecpoint->GetClusSigmaY();
-         
-         if (clusdata[4] != -99. && clusdata[5] != -99.)
+
+         if (clusdata[4] >= 0. && clusdata[5] >= 0.)
            { 
              // extract the associated cell information
              branch1->GetEntry(ncrhit); 
@@ -206,7 +205,7 @@ void AliPMDtracker::Clusters2Tracks(AliESDEvent *event)
              itra = new Int_t[nenbr1];
              ipid = new Int_t[nenbr1];
              cadc = new Float_t[nenbr1];
-
+             
              for (Int_t ient1 = 0; ient1 < nenbr1; ient1++)
                {
                  rechit = (AliPMDrechit*)fRechits->UncheckedAt(ient1);
@@ -216,8 +215,16 @@ void AliPMDtracker::Clusters2Tracks(AliESDEvent *event)
                  ipid[ient1] = rechit->GetCellPid();
                  cadc[ient1] = rechit->GetCellAdc();
                }
-             AssignTrPidToCluster(nenbr1, itra, ipid, cadc,
-                                  trackno, trackpid);
+             if (idet == 0)
+               {
+                 AssignTrPidToCluster(nenbr1, itra, ipid, cadc,
+                                      trackno, trackpid);
+               }
+             else if (idet == 1)
+               {
+                 trackno  = itra[0];
+                 trackpid = ipid[0];
+               }
 
              delete [] irow;
              delete [] icol;
@@ -338,7 +345,7 @@ void AliPMDtracker::AssignTrPidToCluster(Int_t nentry, Int_t *itra,
          ngtrack++;
        }
     }
-
+  
   if (ngtrack == 0)
     {
       // hadron track
@@ -356,7 +363,7 @@ void AliPMDtracker::AssignTrPidToCluster(Int_t nentry, Int_t *itra,
   else if (ngtrack > 1)
     {
       // more than one photon track
-
+      
       trenergy  = new Int_t [ngtrack];
       sortcoord = new Int_t [ngtrack];
       for (Int_t i = 0; i < ngtrack; i++)
@@ -370,21 +377,19 @@ void AliPMDtracker::AssignTrPidToCluster(Int_t nentry, Int_t *itra,
                }
            }
        }
-
+      
       Bool_t jsort = true;
       TMath::Sort(ngtrack,trenergy,sortcoord,jsort);
-
+      
       Int_t gtr = sortcoord[0];   
       trackno  = itra[phentry[gtr]];   // highest adc track
       trackpid = 1;
-
+      
       delete [] trenergy;
       delete [] sortcoord;
-
+      
     }   // end of ngtrack > 1
-
-
-
+  
 }
 //--------------------------------------------------------------------//
 void AliPMDtracker::SetVertex(Double_t vtx[3], Double_t evtx[3])