]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MFT/AliMuonForwardTrackFinder.cxx
add setter
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrackFinder.cxx
index f9bc1e726259901502521954b6eb01ad17ee64e1..aea32652d18488322959f08149b1e4fce6145fb8 100644 (file)
@@ -556,6 +556,7 @@ Int_t AliMuonForwardTrackFinder::LoadNextTrack() {
   Double_t yEndOfAbsorber = trackParamEndOfAbsorber.GetBendingCoor();
   Double_t rAbsorber      = TMath::Sqrt(xEndOfAbsorber*xEndOfAbsorber + yEndOfAbsorber*yEndOfAbsorber);
   fHistRadiusEndOfAbsorber -> Fill(rAbsorber);
+  track -> SetRAtAbsorberEnd(rAbsorber);
   
   // if the radial distance of the track at the end of the absorber is smaller than a given radius, skip to the next track
   if (rAbsorber < fRAbsorberCut) return 4;
@@ -576,7 +577,7 @@ Int_t AliMuonForwardTrackFinder::LoadNextTrack() {
        fCurrentTrack = (AliMuonForwardTrack*) fCandidateTracks->UncheckedAt(iTrack);
        // if the old track is compatible with the new cluster, the track is updated and inserted as new track in the array 
        // (several new tracks can be created for one old track)
-       if (FindClusterInPlane(iPlane) == 2) {
+       if (FindClusterInPlane(iPlane) == kDiverged) {
          fGlobalTrackingDiverged = kTRUE;
          if (fScaleSigmaClusterCut>0) fScaleSigmaClusterCut -= 0.1;
          return 6;
@@ -927,7 +928,7 @@ Int_t AliMuonForwardTrackFinder::FindClusterInPlane(Int_t planeId) {
     if (isGoodChi2) {
       AliDebug(3, Form("accepting cluster: chi2=%f (cut = %f)\n", chi2, chi2cut));
       AliMuonForwardTrack *newTrack = new ((*fCandidateTracks)[fCandidateTracks->GetEntriesFast()]) AliMuonForwardTrack(*fCurrentTrack);
-      if (fCandidateTracks->GetEntriesFast() > fMaxNCandidates) return 2;
+      if (fCandidateTracks->GetEntriesFast() > fMaxNCandidates) return kDiverged;
       newTrack->AddTrackParamAtMFTCluster(currentParamFront, *cluster);    // creating new track param and attaching the cluster
       AliDebug(2, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)", 
                       planeId, newTrack->GetNMFTClusters(), fCurrentTrack->GetNMFTClusters()));
@@ -981,7 +982,7 @@ Int_t AliMuonForwardTrackFinder::FindClusterInPlane(Int_t planeId) {
     if (isGoodChi2) {
       AliDebug(3,Form("accepting cluster: chi2=%f (cut = %f)\n", chi2, chi2cut));
       AliMuonForwardTrack *newTrack = new ((*fCandidateTracks)[fCandidateTracks->GetEntriesFast()]) AliMuonForwardTrack(*fCurrentTrack);
-      if (fCandidateTracks->GetEntriesFast() > fMaxNCandidates) return 2;
+      if (fCandidateTracks->GetEntriesFast() > fMaxNCandidates) return kDiverged;
       newTrack->AddTrackParamAtMFTCluster(currentParamBack, *cluster);    // creating new track param and attaching the cluster
       AliDebug(2, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)", 
                       planeId, newTrack->GetNMFTClusters(), fCurrentTrack->GetNMFTClusters()));
@@ -1013,7 +1014,7 @@ Int_t AliMuonForwardTrackFinder::FindClusterInPlane(Int_t planeId) {
     }
   }
 
-  return 0;
+  return kConverged;
   
 }
 
@@ -1183,6 +1184,7 @@ Double_t AliMuonForwardTrackFinder::TryOneCluster(const AliMUONTrackParam &track
 void AliMuonForwardTrackFinder::SeparateFrontBackClusters() {
 
   for (Int_t iPlane=0; iPlane<fNPlanesMFT; iPlane++) {
+    printf("Separating front/back clusters\n");
     fMFTClusterArrayFront[iPlane]->Delete();
     fMFTClusterArrayBack[iPlane] ->Delete();
     for (Int_t iCluster=0; iCluster<fMFTClusterArray[iPlane]->GetEntries(); iCluster++) {
@@ -1413,9 +1415,9 @@ void AliMuonForwardTrackFinder::PrintParticleHistory() {
   if (fLabelMC>=0) part = fStack->Particle(fLabelMC);
 
   AliDebug(1, Form("fStack->Particle(%d) = %p", fLabelMC, part));
-  AliDebug(1, Form("fStack->Particle(%d)->GetPdgCode() = %d", fLabelMC, part->GetPdgCode()));
 
   if (part) {
+    AliDebug(1, Form("fStack->Particle(%d)->GetPdgCode() = %d", fLabelMC, part->GetPdgCode()));
     if (part->GetFirstMother() != -1) {
       TParticle *partMother = fStack->Particle(part->GetFirstMother());
       AliDebug(1, Form("fStack->Particle(%d) = %p", part->GetFirstMother(), partMother));