]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx
Temporary protection if one runs raw->sdigits for the real data.
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliTPCtrackerCA.cxx
index 582e91eef05dc7a61fefb5d3f7a10acfea8a2bf6..82590d040e0bbb465f6bfeafada99f985b648662 100644 (file)
@@ -96,9 +96,7 @@ AliTPCtrackerCA::AliTPCtrackerCA( const AliTPCParam *par ):
 
   for ( int iSlice = 0; iSlice < hlt.NSlices(); iSlice++ ) {
 
-    const double kCLight = 0.000299792458;
-
-    float bz = AliTracker::GetBz() * kCLight;
+    float bz = AliTracker::GetBz();
 
     float inRmin = fkParam->GetInnerRadiusLow();
     //float inRmax = fkParam->GetInnerRadiusUp();
@@ -142,11 +140,16 @@ AliTPCtrackerCA::AliTPCtrackerCA( const AliTPCParam *par ):
       for ( int iyz = 0; iyz < 2; iyz++ ) {
         for ( int k = 0; k < 7; k++ ) {
           //std::cout<<param.fParamS0Par[iyz][type][k]<<" "<<clparam->fParamS0Par[iyz][type][k] - param.fParamS0Par[iyz][type][k]<<std::endl;
+#ifndef HAVE_NOT_ALITPCCLUSTERPARAM_r40128
+          param.SetParamS0Par( iyz, type, k, clparam->ParamS0Par(iyz, type, k));
+#else
           param.SetParamS0Par( iyz, type, k, clparam->fParamS0Par[iyz][type][k] );
+#endif //HAVE_NOT_ALITPCCLUSTERPARAM_r40128
         }
       }
     }
-    hlt.SliceTracker( iSlice ).Initialize( param );
+    //hlt.SliceTracker( iSlice ).Initialize( param );
+       hlt.InitializeSliceParam(iSlice, param);
   }
 }
 
@@ -311,17 +314,14 @@ int AliTPCtrackerCA::LoadClusters ( TTree * fromTree )
       lab2 = cluster->GetLabel( 2 );
 
       AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
+      transform->SetCurrentRecoParam((AliTPCRecoParam*)AliTPCReconstructor::GetRecoParam());
+
       if ( !transform ) {
         AliFatal( "Tranformations not in calibDB" );
       }
       double xx[3] = {cluster->GetRow(), cluster->GetPad(), cluster->GetTimeBin()};
       int id[1] = {cluster->GetDetector()};
       transform->Transform( xx, id, 0, 1 );
-      //if (!AliTPCReconstructor::GetRecoParam()->GetBYMirror()){
-      //if (cluster->GetDetector()%36>17){
-      //xx[1]*=-1;
-      //}
-      //}
 
       cluster->SetX( xx[0] );
       cluster->SetY( xx[1] );
@@ -410,15 +410,16 @@ int AliTPCtrackerCA::Clusters2Tracks( AliESDEvent *event )
         tTPC.SetClusterPointer( row, c );
         AliTPCTrackerPoint &point = *( tTPC.GetTrackPoint( row ) );
         {
-          AliHLTTPCCATracker &slice = hlt.SliceTracker( iSlice );
-          if ( slice.Param().Alpha() != alpha ) {
-            if ( ! t0.Rotate(  slice.Param().Alpha() - alpha, .999 ) ) continue;
-            alpha = slice.Param().Alpha();
+          //AliHLTTPCCATracker &slice = hlt.SliceTracker( iSlice );
+          if ( hlt.Param(iSlice).Alpha() != alpha ) {
+            if ( ! t0.Rotate(  hlt.Param(iSlice).Alpha() - alpha, .999 ) ) continue;
+            alpha = hlt.Param(iSlice).Alpha();
           }
-          float x = slice.Row( row ).X();
-          if ( !t0.TransportToX( x, slice.Param().GetBz( t0 ), .999 ) ) continue;
+          float x = hlt.Row(iSlice, row).X();
+          if ( !t0.TransportToX( x, hlt.Param(iSlice).GetBz( t0 ), .999 ) ) continue;
           float sy2, sz2;
-          slice.GetErrors2( row, t0, sy2, sz2 );
+          //slice.GetErrors2( row, t0, sy2, sz2 );
+                 hlt.Param(iSlice).GetClusterErrors2( row, t0.GetZ(), t0.SinPhi(), t0.GetCosPhi(), t0.DzDs(), sy2, sz2 );
           point.SetSigmaY( c->GetSigmaY2() / sy2 );
           point.SetSigmaZ( c->GetSigmaZ2() / sz2 );
           point.SetAngleY( TMath::Abs( t0.GetSinPhi() / t0.GetCosPhi() ) );
@@ -548,12 +549,14 @@ int AliTPCtrackerCA::RefitInward ( AliESDEvent *event )
       hits1[i] = i;
       int index = hits[i];
       infos[i].SetISlice( fClusterSliceRow[index] >> 8 );
+      infos[i].SetIRow( fClusterSliceRow[index] & 0xff );
+      infos[i].SetId( index );
       infos[i].SetX( fClusters[index].GetX() );
       infos[i].SetY( fClusters[index].GetY() );
       infos[i].SetZ( fClusters[index].GetZ() );
     }
 
-    bool ok = hlt.Merger().FitTrack( t, alpha, t0, alpha, hits1, nHits, 0, infos );
+    bool ok = hlt.Merger().FitTrack( t, alpha, t0, alpha, hits1, nHits, 0, 1,infos );
 
     if ( ok &&  nHits > 15 ) {
       if ( t.TransportToXWithMaterial( xTPC, hlt.Merger().SliceParam().GetBz( t ) ) ) {
@@ -606,12 +609,14 @@ int AliTPCtrackerCA::PropagateBack( AliESDEvent *event )
       hits1[i] = i;
       int index = hits[i];
       infos[i].SetISlice( fClusterSliceRow[index] >> 8 );
+      infos[i].SetIRow( fClusterSliceRow[index] & 0xff );
+      infos[i].SetId( index );
       infos[i].SetX( fClusters[index].GetX() );
       infos[i].SetY( fClusters[index].GetY() );
       infos[i].SetZ( fClusters[index].GetZ() );
     }
 
-    bool ok = hlt.Merger().FitTrack( t, alpha, t0, alpha, hits1, nHits, 1, infos );
+    bool ok = hlt.Merger().FitTrack( t, alpha, t0, alpha, hits1, nHits, 1, 1, infos );
 
     if ( ok &&  nHits > 15 ) {
       AliTPCtrack tt( *esd );