All modifications to track reconstruction removed with the exception of the flag...
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Mar 2011 18:05:45 +0000 (18:05 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 7 Mar 2011 18:05:45 +0000 (18:05 +0000)
ITS/AliITSRecoParam.cxx
ITS/AliITStrackerMI.cxx
ITS/AliITStrackerMI.h

index 61d92b8..686c8a8 100644 (file)
@@ -444,7 +444,7 @@ AliITSRecoParam *AliITSRecoParam::GetHighFluxParam()
   param->fTrackleterPhiWindow = 0.06;
   param->fScaleDTBySin2T = kTRUE;
   //
-  param->fSelectBestMIP03 = kTRUE;
+  param->fSelectBestMIP03 = kFALSE;//kTRUE;
   param->fFlagFakes       = kTRUE;
   param->fUseImproveKalman= kFALSE;
   //
@@ -900,3 +900,4 @@ void AliITSRecoParam::PrintParameters() const
   return;
 }
 
+
index 3b3ef5a..7f170b4 100644 (file)
@@ -276,7 +276,7 @@ fITSPid(0) {
   }
   //
   // RS
-  fSelectBestMIP03  = AliITSReconstructor::GetRecoParam()->GetSelectBestMIP03();
+  fSelectBestMIP03  = kFALSE;//AliITSReconstructor::GetRecoParam()->GetSelectBestMIP03();
   fFlagFakes        = AliITSReconstructor::GetRecoParam()->GetFlagFakes();
   fUseImproveKalman = AliITSReconstructor::GetRecoParam()->GetUseImproveKalman();
   //
@@ -534,7 +534,7 @@ Int_t AliITStrackerMI::Clusters2Tracks(AliESDEvent *event) {
   fTrackingPhase="Clusters2Tracks";
   //
   // RS
-  fSelectBestMIP03  = AliITSReconstructor::GetRecoParam()->GetSelectBestMIP03();
+  fSelectBestMIP03  = kFALSE;//AliITSReconstructor::GetRecoParam()->GetSelectBestMIP03();
   fFlagFakes        = AliITSReconstructor::GetRecoParam()->GetFlagFakes();
   fUseImproveKalman = AliITSReconstructor::GetRecoParam()->GetUseImproveKalman();
   //
@@ -637,7 +637,6 @@ Int_t AliITStrackerMI::Clusters2Tracks(AliESDEvent *event) {
        SortTrackHypothesys(fCurrentEsdTrack,20,0);  //MI change
        //
        AliITStrackMI *besttrack = GetBestHypothesys(fCurrentEsdTrack,t,15);
-       t->SetWinner(besttrack);
        if (!besttrack) continue;
        besttrack->SetLabel(tpcLabel);
        //       besttrack->CookdEdx();
@@ -1104,17 +1103,11 @@ void AliITStrackerMI::FollowProlongationTree(AliITStrackMI * otrack, Int_t esdin
       
       //propagate to the intersection with the detector plane
       const AliITSdetector &det=layer.GetDetector(idet);
-      /*
       new(&currenttrack2)  AliITStrackMI(currenttrack1);
       if (!currenttrack1.Propagate(det.GetPhi(),det.GetR())) continue;
       if (!currenttrack2.Propagate(det.GetPhi(),det.GetR())) continue;
       currenttrack1.SetDetectorIndex(idet);
       currenttrack2.SetDetectorIndex(idet);
-      */
-      if (!currenttrack1.Propagate(det.GetPhi(),det.GetR())) continue;
-      currenttrack1.SetDetectorIndex(idet);
-      new(&currenttrack2)  AliITStrackMI(currenttrack1);
-      //
       if(!LocalModuleCoord(ilayer,idet,&currenttrack1,xloc,zloc)) continue; // local module coords
 
       //***************
@@ -1366,7 +1359,7 @@ void AliITStrackerMI::FollowProlongationTree(AliITStrackMI * otrack, Int_t esdin
     ntracks[ilayer] = TMath::Min(accepted,7+2*ilayer);
     if (ntracks[ilayer]<golden+2+ilayer) ntracks[ilayer]=TMath::Min(golden+2+ilayer,accepted);
     //    if (ntracks[ilayer]>90) ntracks[ilayer]=90; 
-    if (ntracks[ilayer]>=int(kMaxTr*0.9)) ntracks[ilayer]=int(kMaxTr*0.9); 
+    if (ntracks[ilayer]>int(kMaxTr*0.9)) ntracks[ilayer]=int(kMaxTr*0.9); 
   } // end loop over layers
 
 
@@ -3135,7 +3128,7 @@ Int_t AliITStrackerMI::GetOverlapTrack(const AliITStrackMI *track, Int_t trackID
   return sharedtrack;
 }
 //------------------------------------------------------------------------
-AliITStrackMI *  AliITStrackerMI::GetBest2Tracks(Int_t trackID1, Int_t trackID2, Float_t th0, Float_t th1){
+AliITStrackMI *  AliITStrackerMI::GetBest2Tracks(Int_t trackID1, Int_t trackID2, Float_t th0, Float_t th1,AliITStrackMI* original){
   //
   // try to find track hypothesys without conflicts
   // with minimal chi2;
@@ -3149,7 +3142,6 @@ AliITStrackMI *  AliITStrackerMI::GetBest2Tracks(Int_t trackID1, Int_t trackID2,
   AliITStrackMI * track10=(AliITStrackMI*) arr1->UncheckedAt(0);
   AliITStrackMI * track20=(AliITStrackMI*) arr2->UncheckedAt(0);
   if (track10->Pt()>0.5+track20->Pt()) return track10;
-  AliITStrackMI* win = track10; 
   //
   for (Int_t itrack=0;itrack<entries1;itrack++){
     AliITStrackMI * track=(AliITStrackMI*) arr1->UncheckedAt(itrack);
@@ -3348,14 +3340,14 @@ AliITStrackMI *  AliITStrackerMI::GetBest2Tracks(Int_t trackID1, Int_t trackID2,
     track1->SetChi2MIP(8,index1);
     fBestTrackIndex[trackID1] =index1;
     UpdateESDtrack(track1, AliESDtrack::kITSin);
-    win = track1; // RS
+    original->SetWinner(track1);
   }  
   else if (track10->GetChi2MIP(0)<th1){
     track10->SetChi2MIP(5,maxconflicts);
     track10->SetChi2MIP(6,maxchi2);    
     //    track10->UpdateESDtrack(AliESDtrack::kITSin);
     UpdateESDtrack(track10,AliESDtrack::kITSin);
-    win = track10; // RS
+    original->SetWinner(track10);
   }   
   
   for (Int_t itrack=0;itrack<entries1;itrack++){
@@ -3380,7 +3372,7 @@ AliITStrackMI *  AliITStrackerMI::GetBest2Tracks(Int_t trackID1, Int_t trackID2,
     //  &&track20->fChi2MIP[2]<AliITSReconstructor::GetRecoParam()->GetMaxChi2PerCluster(2)&&track20->fChi2MIP[3]<AliITSReconstructor::GetRecoParam()->GetMaxChi2PerCluster(3)){ 
     RegisterClusterTracks(track20,trackID2);  
   }
-  return win; 
+  return track10; 
  
 }
 //------------------------------------------------------------------------
@@ -3428,7 +3420,7 @@ void AliITStrackerMI::SortTrackHypothesys(Int_t esdindex, Int_t maxcut, Int_t mo
   Int_t entries = array->GetEntriesFast();
   //
   //- find preliminary besttrack as a reference
-  Float_t minchi2=1e6;
+  Float_t minchi2=10000;
   Int_t maxn=0;
   AliITStrackMI * besttrack=0;
   //
@@ -3478,7 +3470,7 @@ void AliITStrackerMI::SortTrackHypothesys(Int_t esdindex, Int_t maxcut, Int_t mo
   //
   Float_t * chi2        = new Float_t[entries];
   Int_t * index         = new Int_t[entries];  
-  for (Int_t i=0;i<entries;i++) chi2[i] =1e6;
+  for (Int_t i=0;i<entries;i++) chi2[i] =10000;
   for (Int_t itrack=0;itrack<entries;itrack++){
     AliITStrackMI * track = (AliITStrackMI*)array->At(itrack);
     if (track){
@@ -3512,7 +3504,7 @@ void AliITStrackerMI::SortTrackHypothesys(Int_t esdindex, Int_t maxcut, Int_t mo
   }
   //
   // calculate one more time with updated normalized errors
-  for (Int_t i=0;i<entries;i++) chi2[i] =1e6;
+  for (Int_t i=0;i<entries;i++) chi2[i] =10000;  
   for (Int_t itrack=0;itrack<entries;itrack++){
     AliITStrackMI * track = (AliITStrackMI*)array->At(itrack);
     if (track){      
@@ -3606,7 +3598,7 @@ AliITStrackMI * AliITStrackerMI::GetBestHypothesys(Int_t esdindex, AliITStrackMI
   if (!array) return 0;
   Int_t entries = array->GetEntriesFast();
   if (!entries) return 0;  
-  Float_t minchi2 = 1e6;
+  Float_t minchi2 = 100000;
   AliITStrackMI * besttrack=0;
   //
   AliITStrackMI * backtrack    = new AliITStrackMI(*original);
@@ -3684,7 +3676,7 @@ AliITStrackMI * AliITStrackerMI::GetBestHypothesys(Int_t esdindex, AliITStrackMI
     }
     Double_t chi2 = track->GetChi2MIP(0); // +track->GetNUsed();    //RS
     if (fSelectBestMIP03) chi2 *= track->GetChi2MIP(3);
-    else chi2 += +track->GetNUsed();
+    else chi2 += track->GetNUsed();
     //
     for (Int_t ichi=0;ichi<5;ichi++){
       forwardtrack->SetChi2MIP(ichi, track->GetChi2MIP(ichi));
@@ -3751,7 +3743,7 @@ AliITStrackMI * AliITStrackerMI::GetBestHypothesys(Int_t esdindex, AliITStrackMI
   //if (longtrack) besttrack=longtrack;
   //
   // RS do shared cluster analysis here only if the new sharing analysis is not requested
-  if (fFlagFakes) return besttrack;
+  //RRR if (fFlagFakes) return besttrack;
 
   Int_t list[6];
   AliITSRecPoint * clist[6];
@@ -3768,7 +3760,7 @@ AliITStrackMI * AliITStrackerMI::GetBestHypothesys(Int_t esdindex, AliITStrackMI
     Int_t sharedtrack = GetOverlapTrack(besttrack, esdindex, nshared, list, overlist);
     if (sharedtrack>=0){
       //
-      besttrack = GetBest2Tracks(esdindex,sharedtrack,10,5.5);     
+      besttrack = GetBest2Tracks(esdindex,sharedtrack,10,5.5,original);     
       if (besttrack){
        shared = GetNumberOfSharedClusters(besttrack,esdindex,list,clist);
       }
@@ -3839,7 +3831,7 @@ void  AliITStrackerMI::GetBestHypothesysMIP(TObjArray &itsTracks)
     //
     AliITStrackMI* longtrack=0;
     Float_t minn=0;
-    Float_t maxchi2=1e6;
+    Float_t maxchi2=1000;
     for (Int_t j=0;j<array->GetEntriesFast();j++){
       AliITStrackMI* trackHyp = (AliITStrackMI*)array->At(j);
       if (!trackHyp) continue;
@@ -3869,44 +3861,38 @@ void  AliITStrackerMI::GetBestHypothesysMIP(TObjArray &itsTracks)
     else besttrack= longtrack;
     //
     if (besttrack) {
+      Int_t list[6];
+      AliITSRecPoint * clist[6];
+      Float_t shared = GetNumberOfSharedClusters(longtrack,i,list,clist);
+      //
+      track->SetNUsed(shared);      
       track->SetNSkipped(besttrack->GetNSkipped());
       track->SetChi2MIP(0,besttrack->GetChi2MIP(0));
-      //
-      if (!fFlagFakes) { // will flag them in separate analysis
-       Int_t list[6];
-       AliITSRecPoint * clist[6];
-       Float_t shared = GetNumberOfSharedClusters(longtrack,i,list,clist);
+      if (shared>0) {
+       if(!AliITSReconstructor::GetRecoParam()->GetAllowSharedClusters()) continue;
+       Int_t nshared;
+       Int_t overlist[6]; 
        //
-       track->SetNUsed(shared);      
-       if (shared>0) {
-         if(!AliITSReconstructor::GetRecoParam()->GetAllowSharedClusters()) continue;
-         Int_t nshared;
-         Int_t overlist[6]; 
-         //
-         Int_t sharedtrack = GetOverlapTrack(longtrack, i, nshared, list, overlist);
-         //if (sharedtrack==-1) sharedtrack=0;
-         if (sharedtrack>=0) {       
-           besttrack = GetBest2Tracks(i,sharedtrack,10,5.5);
-           if (besttrack) track->SetWinner(besttrack);
-         }
-       }   
-      }
-      //
-      if (fAfterV0) {
+       Int_t sharedtrack = GetOverlapTrack(longtrack, i, nshared, list, overlist);
+       //if (sharedtrack==-1) sharedtrack=0;
+       if (sharedtrack>=0) {       
+         besttrack = GetBest2Tracks(i,sharedtrack,10,5.5,track);                         
+       }
+      }   
+      if (besttrack&&fAfterV0) {
        UpdateESDtrack(besttrack,AliESDtrack::kITSin);
        track->SetWinner(besttrack);
       }
-      if (fConstraint[fPass]) {
-       UpdateESDtrack(besttrack,AliESDtrack::kITSin);
-       track->SetWinner(besttrack);
-       double chicut = besttrack->GetChi2MIP(0);
-       if (fSelectBestMIP03) chicut *= besttrack->GetChi2MIP(3);
-       else chicut += besttrack->GetNUsed();
-       if (chicut>1.5) {
+      if (besttrack) {
+       if (fConstraint[fPass]) {
+         UpdateESDtrack(besttrack,AliESDtrack::kITSin);
+         track->SetWinner(besttrack);
+       }
+       if (besttrack->GetChi2MIP(0)+besttrack->GetNUsed()>1.5 && fConstraint[fPass]) {
          if ( TMath::Abs(besttrack->GetD(0))>0.1 || 
               TMath::Abs(besttrack->GetD(1))>0.1 ) track->SetReconstructed(kFALSE);    
        }       
-      }    
+      }
     }
   }
 } 
@@ -5245,3 +5231,4 @@ Int_t AliITStrackerMI::AliITSlayer::FindClusterForLabel(Int_t label, Int_t *stor
   }
   return nfound;
 }
+
index 352ba09..086a97e 100644 (file)
@@ -267,7 +267,7 @@ protected:
   void UnRegisterClusterTracks(const AliITStrackMI* track, Int_t id);
   Float_t GetNumberOfSharedClusters(AliITStrackMI* track,Int_t id, Int_t list[6], AliITSRecPoint *clist[6]);
   Int_t GetOverlapTrack(const AliITStrackMI *track, Int_t trackID, Int_t &shared, Int_t clusterlist[6], Int_t overlist[6]);
-  AliITStrackMI * GetBest2Tracks(Int_t trackID1, Int_t treackID2, Float_t th0, Float_t th1);
+  AliITStrackMI * GetBest2Tracks(Int_t trackID1, Int_t treackID2, Float_t th0, Float_t th1,AliITStrackMI* original);
   Float_t  * GetErrY(Int_t trackindex) const {return &fCoefficients[trackindex*48];}
   Float_t  * GetErrZ(Int_t trackindex) const {return &fCoefficients[trackindex*48+12];}
   Float_t  * GetNy(Int_t trackindex) const {return &fCoefficients[trackindex*48+24];}
@@ -410,3 +410,4 @@ inline void  AliITStrackerMI::AliITSdetector::GetGlobalXYZ(const AliITSRecPoint
   xyz[1] = fR*fSinPhi + cl->GetY()*fCosPhi;
 }
 #endif
+