Track time measurement (S.Radomski)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 Feb 2003 08:42:26 +0000 (08:42 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 Feb 2003 08:42:26 +0000 (08:42 +0000)
ITS/AliITStrackV2.cxx
ITS/AliITStrackerV2.cxx

index db0c0af..9ca766e 100644 (file)
@@ -333,6 +333,9 @@ Int_t AliITStrackV2::PropagateTo(Double_t xk, Double_t d, Double_t x0) {
     return 0;
   }
 
+  // old position [SR, GSI, 17.02.2003]
+  Double_t oldX = fX, oldY = fP0, oldZ = fP1;
+
   Double_t r1=sqrt(1.- f1*f1), r2=sqrt(1.- f2*f2);
   
   fP0 += dx*(f1+f2)/(r1+r2);
@@ -383,6 +386,13 @@ Int_t AliITStrackV2::PropagateTo(Double_t xk, Double_t d, Double_t x0) {
 
   if (!CorrectForMaterial(d,x0)) return 0;
 
+  // Integrated Time [SR, GSI, 17.02.2003]
+  if (IsStartedTimeIntegral()) {
+    Double_t l2 = (fX-oldX)*(fX-oldX)+(fP0-oldY)*(fP0-oldY)+(fP1-oldZ)*(fP1-oldZ);
+    AddTimeStep(TMath::Sqrt(l2));
+  }
+  //
+
   return 1;
 }
 
index a3950f6..75a7168 100644 (file)
@@ -259,6 +259,10 @@ cout<<fBestTrack.GetNumberOfClusters()<<" number of clusters\n\n";
         fBestTrack.SetLabel(tpcLabel);
        fBestTrack.CookdEdx();
         CookLabel(&fBestTrack,0.); //For comparison only
+            
+        fBestTrack.PropagateTo(3.,0.0028,65.19);
+        fBestTrack.PropagateToVertex();
+        
         itsTree.Fill();
         UseClusters(&fBestTrack);
         delete itsTracks.RemoveAt(i);
@@ -318,15 +322,28 @@ Int_t AliITStrackerV2::PropagateBack(const TFile *inp, TFile *out) {
   sprintf(tname,"TreeT_ITSb_%d",GetEventNumber());
   TTree backTree(tname,"Tree with back propagated ITS tracks");
   AliTPCtrack *otrack=0;
-  backTree.Branch("tracks","AliTPCtrack",&otrack,32000,0);
+  backTree.Branch("tracks","AliTPCtrack",&otrack,32000,2);
 
   Int_t ntrk=0;
 
   Int_t nentr=(Int_t)itsTree->GetEntries();
   for (Int_t i=0; i<nentr; i++) {
+
     itsTree->GetEvent(i);
     ResetTrackToFollow(*itrack);
-    fTrackToFollow.ResetCovariance(); fTrackToFollow.ResetClusters();
+
+    // propagete to vertex [SR, GSI 17.02.2003]
+    fTrackToFollow.PropagateTo(3.,0.0028,65.19);
+    fTrackToFollow.PropagateToVertex();
+
+    // Start Time measurement [SR, GSI 17.02.2003]
+    fTrackToFollow.StartTimeIntegral();
+    fTrackToFollow.PropagateTo(3.,-0.0028,65.19);
+    //
+
+    fTrackToFollow.ResetCovariance(); 
+    fTrackToFollow.ResetClusters();
+
     Int_t itsLabel=fTrackToFollow.GetLabel(); //save the ITS track label
 
 #ifdef DEBUG
@@ -359,6 +376,11 @@ for (Int_t k=0; k<nc; k++) {
             if (!fTrackToFollow.PropagateTo(rs,-d,x0)) throw "";
          }
 
+         // remember old position [SR, GSI 18.02.2003]
+        Double_t oldX, oldY, oldZ;
+        fTrackToFollow.GetGlobalXYZat(fTrackToFollow.GetX(),oldX,oldY,oldZ);
+        //
+
          Double_t x,y,z;
          if (!fTrackToFollow.GetGlobalXYZat(r,x,y,z)) 
             throw "AliITStrackerV2::PropagateBack: failed to estimate track !";
@@ -414,14 +436,22 @@ for (Int_t k=0; k<nc; k++) {
          }
 
          if (cl) {
-            if (!fTrackToFollow.Update(cl,maxchi2,index)) 
-              cerr<<"AliITStrackerV2::PropagateBack: filtering failed !\n";
+           if (!fTrackToFollow.Update(cl,maxchi2,index)) 
+             cerr<<"AliITStrackerV2::PropagateBack: filtering failed !\n";
          }
          {
-         Double_t x0;
-         x=layer.GetThickness(fTrackToFollow.GetY(),fTrackToFollow.GetZ(),x0);
-         fTrackToFollow.CorrectForMaterial(-x,x0); 
+           Double_t x0;
+           x=layer.GetThickness(fTrackToFollow.GetY(),fTrackToFollow.GetZ(),x0);
+           fTrackToFollow.CorrectForMaterial(-x,x0); 
          }
+                
+         // track time update [SR, GSI 17.02.2003]
+         Double_t newX, newY, newZ;
+        fTrackToFollow.GetGlobalXYZat(fTrackToFollow.GetX(),newX,newY,newZ);
+         Double_t dL2 = (oldX-newX)*(oldX-newX)+(oldY-newY)*(oldY-newY)+(oldZ-newZ)*(oldZ-newZ);
+        fTrackToFollow.AddTimeStep(TMath::Sqrt(dL2));
+         //
+
        }
 
        fTrackToFollow.PropagateTo(50.,-0.001);