fITSModuleIndexInfo is now copied from the AliITStrackV2 to the AliESDtrack (A. Dainese)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jan 2009 08:19:54 +0000 (08:19 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jan 2009 08:19:54 +0000 (08:19 +0000)
ITS/AliITStrackerSA.cxx
ITS/AliITStrackerSA.h

index 2737902..8fe1c94 100644 (file)
@@ -474,10 +474,7 @@ Int_t AliITStrackerSA::FindTracks(AliESDEvent* event){
          if(!tr2) continue;
          //printf("-NPOINTS fit: %d\n",tr2->GetNumberOfClusters());      
 
-         
-         AliESDtrack outtrack;
-         outtrack.UpdateTrackParams(tr2,AliESDtrack::kITSin);
-         event->AddTrack(&outtrack);
+         StoreTrack(tr2,event);
          ntrack++;
        }
        delete trs;
@@ -550,9 +547,7 @@ Int_t AliITStrackerSA::FindTracks(AliESDEvent* event){
          if(!tr2) continue;
          //printf("--NPOINTS fit: %d\n",tr2->GetNumberOfClusters());
          
-         AliESDtrack outtrack;
-         outtrack.UpdateTrackParams(tr2,AliESDtrack::kITSin);
-         event->AddTrack(&outtrack);
+         StoreTrack(tr2,event);
          ntrack++;
          
        }   
@@ -625,9 +620,7 @@ Int_t AliITStrackerSA::FindTracks(AliESDEvent* event){
            if(!tr2) continue;
            //printf("---NPOINTS fit: %d\n",tr2->GetNumberOfClusters());
            
-           AliESDtrack outtrack;
-           outtrack.UpdateTrackParams(tr2,AliESDtrack::kITSin);
-           event->AddTrack(&outtrack);
+           StoreTrack(tr2,event);
            ntrack++;
            
          }   
@@ -700,9 +693,7 @@ Int_t AliITStrackerSA::FindTracks(AliESDEvent* event){
            if(!tr2) continue;
            //printf("----NPOINTS fit: %d\n",tr2->GetNumberOfClusters());
            
-           AliESDtrack outtrack;
-           outtrack.UpdateTrackParams(tr2,AliESDtrack::kITSin);
-           event->AddTrack(&outtrack);
+           StoreTrack(tr2,event);
            ntrack++;
            
          }   
@@ -1007,6 +998,21 @@ AliITStrackV2* AliITStrackerSA::FitTrack(AliITStrackSA* tr,Double_t *primaryVert
 
 }
 
+//_______________________________________________________
+void AliITStrackerSA::StoreTrack(AliITStrackV2 *t,AliESDEvent *event) const 
+{
+  //
+  // Add new track to the ESD
+  //
+  AliESDtrack outtrack;
+  outtrack.UpdateTrackParams(t,AliESDtrack::kITSin);
+  for(Int_t i=0;i<12;i++) {
+    outtrack.SetITSModuleIndex(i,t->GetModuleIndex(i));
+  }
+  event->AddTrack(&outtrack);
+
+  return;
+}
 
 
 //_______________________________________________________
index b4bf4c5..cb00378 100644 (file)
@@ -43,6 +43,7 @@ class AliITStrackerSA : public AliITStrackerMI {
   Int_t FindTracks(AliESDEvent* event);
 
   AliITStrackV2* FitTrack(AliITStrackSA* tr,Double_t* primaryVertex,Bool_t onePoint=kFALSE);
+  void StoreTrack(AliITStrackV2 *t,AliESDEvent *event) const; 
   Int_t FindTrackLowChiSquare() const;
   Int_t LoadClusters(TTree *cf) {Int_t rc=AliITStrackerMI::LoadClusters(cf); SetClusterTree(cf); SetSixPoints(kTRUE); return rc;}
   void SetVertex(AliESDVertex *vtx){fVert = vtx;}
@@ -121,4 +122,3 @@ class AliITStrackerSA : public AliITStrackerMI {
 };
 
 #endif
-